Entry point into the fluent template builder API
The API to the fluent object is dynamic and can't be documented as a typical API interface.
See the (Fluent Templates](templateFluent) for how to use this API.
let $: any;
Compiles a template into a DomTreeConstructor function.
Usually templates are automatically compiled by Components and this function isn't used directly. For more information, see Template Internals.
function compileTemplate(rootTemplate: object): DomTreeConstructor;
rootTemplate
The template to be compiledMarks a string as being raw HTML instead of plain text
Normally strings passed to templates are treated as plain text. Wrapping a value by calling this function indicates the string should be treated as raw HTML instead.
See Text and HTML for more information.
function html(html: string | ((...args: any[]) => string)): HtmlString;
html
The HTML value to be wrapped, or a function that returns a stringDeclares additional settings for bi-direction input field binding.
See InputOptions
for available options.
See Input Bindings for more information.
function input(options: InputOptions): object;
options
Additional input optionsOptions for controlling input bindings.
If the get
and set
handlers are specified
they override both target
and prop
which are no
longer used.
type InputOptions = {
event: string;
prop?: string;
target?: string | ((model: object) => string);
format?: (value: any) => string;
parse?: (value: string) => any;
get?: (model: any, context: any) => any;
set?: (model: any, value: any, context: any) => void;
on_change?: (model: any, event: Event) => any;
};
The name of the event (usually "change" or "input") to trigger the input binding. If not specified, "input" is used.
event: string;
Format the property value into a string for display.
format?: (value: any) => string;
Get the value of the property.
get?: (model: any, context: any) => any;
A callback to be invoked when the property value is changed by the user.
on_change?: (model: any, event: Event) => any;
Parse a display string into a property value.
parse?: (value: string) => any;
The name of the property on the target object.
prop?: string;
Set the value of the property.
set?: (model: any, value: any, context: any) => void;
The target object providing the binding property. If not specified, the template's model
object is used.
target?: string | ((model: object) => string);
Declares addition settings transition directives
function transition(...options: any[]): {
(...args: any[]): any;
withTransition(context: any): any;
};
options
Options for controlling behaviour of transitions.
See Transition Options for more information.
type TransitionOptions = {
value: (model: object, context: object) => any;
mode?: string;
name?: void;
classNames?: object;
duration?: number;
subtree?: boolean;
};
A map of class name mappings.
classNames?: object;
The duration of the animation in milliseconds.
duration?: number;
Transition order - "concurrent", "enter-leave" or "leave-enter"
mode?: string;
Transition name - used as prefix to CSS class names, default = "tx"
name?: void;
Whether to monitor the element's sub-trees for animations.
subtree?: boolean;
The value callback that triggers the animation when it changes
value: (model: object, context: object) => any;