Class: View
Represents all the metadata of the form viewer components.
Hierarchy
View
Constructors
constructor
• new View(models?
)
Creates an instance of the View.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
models | Model <any >[] | [] | the components metadata. |
Accessors
viewerWrappers
• get
viewerWrappers(): FormViewerWrapper
[]
Retrieves the viewer wrappers array.
Returns
the viewer wrappers array.
Methods
all
▸ all(): Model
<any
>[]
Returns
Model
<any
>[]
all component metadata for the form viewer.
define
▸ define(model
): void
Defines the component's metadata for the form viewer.
Parameters
Name | Type | Description |
---|---|---|
model | Model <any > | the component's metadata. |
Returns
void
find
▸ find(type
): undefined
| Model
<any
>
Returns the component's metadata for the form viewer for the specified type.
Parameters
Name | Type | Description |
---|---|---|
type | string | the component type. |
Returns
undefined
| Model
<any
>
the component metadata for the form viewer for the specified type or undefined.
get
▸ get(type
): Model
<any
>
Returns the component's metadata for the form viewer for the specified type.
Parameters
Name | Type | Description |
---|---|---|
type | string | the component type. |
Returns
Model
<any
>
the component metadata for the form viewer for the specified type.
getCssLoaders
▸ getCssLoaders(biDi
): () => Promise
<void
>[]
Retrieves the CSS loaders for a given BiDi.
Parameters
Name | Type | Description |
---|---|---|
biDi | BiDi | the BiDi object for which to retrieve the CSS loaders. |
Returns
() => Promise
<void
>[]
the array containing the CSS loaders for the specified BiDi.
withCssLoader
▸ withCssLoader(cssLoaderType
, loader
): View
Applies the given CSS loader to the component based on the BiDi layout.
Parameters
Name | Type | Description |
---|---|---|
cssLoaderType | CssLoaderType | the BiDi layout type, either 'common', 'ltr', or 'rtl'. |
loader | () => Promise <void > | the function that returns a Promise to load CSS or other required localization resources. |
Returns
the View instance.
withViewerWrapper
▸ withViewerWrapper(wrapper
): this
Adds a wrapper to the list of viewers for this viewer wrapper.
Parameters
Name | Type | Description |
---|---|---|
wrapper | FormViewerWrapper | the viewer wrapper to be added. The wrapper is a component that wraps the form viewer. |
Returns
this
the View instance.
create
▸ Static
create(models
): View
Static wrapper for the View constructor.
Parameters
Name | Type | Description |
---|---|---|
models | Model <any >[] | the components metadata. |
Returns
the View instance.