Dynamic module idget

Index

Interfaces

Functions

Functions

convertKindToModulePath(kind: string): string

Converts a kind name to it's module path. Used to conventionally map kinds who aren't explicitly mapped through mapKind.

Parameters

  • kind: string

    The kind name.

Returns

string

The module path.

convertKindToViewPath(kind: string): string

Converts a kind name to it's view id. Used to conventionally map kinds who aren't explicitly mapped through mapKind.

Parameters

  • kind: string

    The kind name.

Returns

string

The view id.

create(element: HTMLElement, settings: WidgetSettings, bindingContext?: KnockoutBindingContext): any

Creates a widget.

Parameters

  • element: HTMLElement

    The DOMElement or knockout virtual element that serves as the target element for the widget.

  • settings: WidgetSettings

    The widget settings.

  • bindingContext?: KnockoutBindingContext optional

Returns

any

mapKind(kind: string, viewId?: string, moduleId?: string): any

Maps views and module to the kind identifier if a non-standard pattern is desired.

Parameters

  • kind: string

    The kind name.

  • viewId?: string optional
  • moduleId?: string optional

Returns

any

mapKindToModuleId(kind: string): string

Maps a kind name to it's module id. First it looks up a custom mapped kind, then falls back to convertKindToModulePath.

Parameters

  • kind: string

    The kind name.

Returns

string

The module id.

mapKindToViewId(kind: string): string

Maps a kind name to it's view id. First it looks up a custom mapped kind, then falls back to convertKindToViewPath.

Parameters

  • kind: string

    The kind name.

Returns

string

The view id.

registerKind(kind: string): any

Creates a ko binding handler for the specified kind.

Parameters

  • kind: string

    The kind to create a custom binding handler for.

Returns

any