Releases: eclipsesource/tabris-decorators
Version 3.3.0
Revise GitPod links to remove dev parameter This parameter was only needed before the 3.3 release
Version 3.2.1
no changes
Version 3.2.0
v3.2.0 Version 3.2.0
Version 3.1.0
v3.1.0 Version 3.1.0
Version 2.8.0
v2.8.0 Update version to 2.8.0
Version 3.0.1
v3.0.1 Update Version to 3.0.1
Version 3.0.0
Update to Version 3.0 Depend on tabris 3.0 Minor fix in @component.md
Version 3.0.0-rc1
Ported to Tabris.js 3.x
Version 2.6.0
This is the simultaneous release for Tabris.js 2.6.0/2.6.1
New and Noteworthy
Dependency Injection
@injectable and @injectionHandler now have a numeric priority parameter.
Previously, with multiple injection handlers for the same type the only way to determine which has the highest priority was to modify the order in which they are added. This was inconvenient an error-prone. With the new property it can be made explicit which handler has the highest priority.
Data Binding
One-way binding converter
It is now possible to assign a converter function to one-way bindings. It takes the new value of the base property and returns the value to be applied to the target property. This can be used to change the type of the value, or to modify it within a type, e.g. limiting a number to a specific range.
In this example a Date object is converted to a localized string:
<textView bind-text={{path: 'person.dob', converter: v => v.toLocaleString())} />There is also the utility function to exported by tabris-decorators that makes this expression slightly shorter:
<textView bind-text={to('person.dob', v => v.toLocaleString())} />`It can also be used to define reuseable shorthands:
// define shorthand, maybe in some other module:
const toLocaleString = (path: string) => to(path, v => v.toLocaleString());
// later use:
<textView bind-text={toLocaleString('person.dob')} />Version 2.5.1
v2.5.1 Move to version 2.5.1