Interface
Properties that declare the widget capability.
Some properties are automatically generated on compilation, and some need to be set in the manifest.json .
Properties
| Property | Type | Notes |
|---|---|---|
canConsumeDataAction | boolean | Default value is false. If true, the widget can provide a data set to the data action. |
canCreateMapView | boolean | Default value is false. If true, the widget will be shown in the |
canCrossLayoutBoundary | boolean | Default value is false. By default, a widget is constrained in the layout. Setting this property to true will make the widget overflow out of the layout. |
canGenerateMultipleOutputDataSources | boolean | Default value is false. If true, the widget can generate multiple output data sources. |
canProvideRepeatDataSource | boolean | Default value is false. If true, the widget can provide a repeat data source. |
coverLayoutBackground | boolean | Default value is false. By default, a widget does not have background and the background set in the layout style will take effect. If it is true, the background setting in the layout style will be hidden. |
deactivateOtherWidgets | boolean | Default value is true. |
defaultOffPanel | boolean | This is the default value of the WidgetJson.offPanel. If true, the newly added widgets will have be off panel by default. |
flipIcon | boolean | Default value is false. If true, flips the icon on RTL. |
forbidOneByOneEffect | boolean | Default value is false. If true, the layout widget can not have one by one animation. |
handleA11yLabelInWidget | boolean | Whether to handle the accessible label by widget itself. If false, the accessible label will be handled by framework. |
hasBuilderSupportModule | boolean | This property is automatically set. If |
hasConfig | boolean | This property is automatically set. If |
hasConfigInSettingPage | boolean | Default value is true.
If false, the builder will not load the setting page.
One use case of setting the value to |
hasEmbeddedLayout | boolean | Default value is false. If true, the framework will create the layouts for the widget, see |
hasMainClass | boolean | This property is automatically set. If |
hasSettingPage | boolean | This property is automatically set. If |
isWidgetController | boolean | Default value is false. A widget controller widget is used to control (open/close) other widgets. |
lockChildren | boolean | Default value is true. If true, the children layout items are constrained in the widget. |
needActiveState | boolean | Default value is false. |
needHiddenState | boolean | Default value is false. |
notAutoLoadUsedFieldsData | boolean | Default value is false. Set this property to true, won't load the used fields of the widget. |
notShareDynamicModules | boolean | By default, the widget will share dynamic modules (load by import()) with other widgets, which means these modules will be compiled into the |
showDescription | boolean | Default value is false.
If true, the description of the widget will be shown in the widget list.
To support i18n, please define this string key in the translations/default.ts: |
supportAutoSize | boolean | Default value is true. If true, the height/width of the widget can be set to auto. |
supportInlineEditing | boolean | Default value is false. If true, an edit button will show when widget is selected. |
supportRepeat | boolean | Default value is false. If true, the widget can be put in a list. |
useDragHandler | boolean | Default value is false. Will the builder provider a drag handler for this widget. |
useOwnBorder | boolean | Whether the widget uses its own border. |
watchViewportVisibility | boolean | Default value is false.
Set this property to true, the widget can use |
canConsumeDataAction
canConsumeDataAction: booleanDefault value is false. If true, the widget can provide a data set to the data action.
canCreateMapView
Interface PropertycanCreateMapView: booleanDefault value is false. If true, the widget will be shown in the MapWidgetSelector .
canCrossLayoutBoundary
canCrossLayoutBoundary: booleanDefault value is false. By default, a widget is constrained in the layout. Setting this property to true will make the widget overflow out of the layout.
canGenerateMultipleOutputDataSources
canGenerateMultipleOutputDataSources: booleanDefault value is false. If true, the widget can generate multiple output data sources.
canProvideRepeatDataSource
canProvideRepeatDataSource: booleanDefault value is false. If true, the widget can provide a repeat data source.
coverLayoutBackground
coverLayoutBackground: booleanDefault value is false. By default, a widget does not have background and the background set in the layout style will take effect. If it is true, the background setting in the layout style will be hidden.
deactivateOtherWidgets
deactivateOtherWidgets: booleanDefault value is true.
For map widget, we can set this as false to enable other widgets to interact with map. True, means when this widget is activated, all other widgets will be deactivated. False, means when this widget is activated, will not change other widget's state.
This means there may be more than one active widgets.
defaultOffPanel
defaultOffPanel: booleanThis is the default value of the WidgetJson.offPanel. If true, the newly added widgets will have be off panel by default.
flipIcon
flipIcon: booleanDefault value is false. If true, flips the icon on RTL.
forbidOneByOneEffect
Interface PropertyforbidOneByOneEffect: booleanDefault value is false. If true, the layout widget can not have one by one animation.
handleA11yLabelInWidget
handleA11yLabelInWidget: booleanWhether to handle the accessible label by widget itself. If false, the accessible label will be handled by framework.
hasBuilderSupportModule
Interface PropertyhasBuilderSupportModule: booleanThis property is automatically set. If runtime/builder-support.tsx exists, this property is true.
hasConfig
Interface PropertyhasConfig: booleanThis property is automatically set. If config.json exists, this property is true.
hasConfigInSettingPage
Interface PropertyhasConfigInSettingPage: booleanDefault value is true.
If false, the builder will not load the setting page.
One use case of setting the value to false is when a widget supports inline editing, as it does not need to show the setting page even though it has config.
hasEmbeddedLayout
Interface PropertyhasEmbeddedLayout: booleanDefault value is false. If true, the framework will create the layouts for the widget, see layouts property.
hasMainClass
Interface PropertyhasMainClass: booleanThis property is automatically set. If runtime/widget.tsx exists, this property is true.
hasSettingPage
Interface PropertyhasSettingPage: booleanThis property is automatically set. If setting/setting.tsx exists, this property is true.
isWidgetController
isWidgetController: booleanDefault value is false. A widget controller widget is used to control (open/close) other widgets.
lockChildren
Interface PropertylockChildren: booleanDefault value is true. If true, the children layout items are constrained in the widget.
needActiveState
needActiveState: booleanDefault value is false.
When user click a widget, we can activate the widget (change the widget state to active), but not all widget needs this active state. So, for performance reason, we do not activate a widget by default.
When this property is true, and when a widget is activated, we'll use deactivateOtherWidgets to check whether deactivate other widgets.
needHiddenState
needHiddenState: booleanDefault value is false.
When a widget is put in the page/window/view/sidebar/accordion, the widget can be hidden. When a widget is scrolled out of view or is put in the screen group, we don't change the widget state to hidden. For performance reason, a widget does not get a state value when it's rendered. When this property is true, we change the widget state to hidden when it's layout container is hidden. When it's layout container is shown, we change the widget state to undefined.
For example, when this property is true and the widget is added to a view. When the view is hidden, the widget state will be changed to hidden. When the view is shown, the widget state will be changed to undefined.
notAutoLoadUsedFieldsData
notAutoLoadUsedFieldsData: booleanDefault value is false. Set this property to true, won't load the used fields of the widget.
Some widgets use fields but do not use these fields for display or not use data source to load these fields. For example, table widget uses fields but doesn't use data source to load these fields, chart widget uses fields but doesn't use these fields for display (it for statistic). In this case, we do not need to load these fields. After enable client-side query, the more fields we load, the slower the interaction with the map will be.
notShareDynamicModules
notShareDynamicModules: booleanBy default, the widget will share dynamic modules (load by import()) with other widgets, which means these modules will be compiled into the widgets/chunks folder.
If this property is true, the dynamic modules will be compiled into the chunks folder of the widget.
showDescription
showDescription: booleanDefault value is false.
If true, the description of the widget will be shown in the widget list.
To support i18n, please define this string key in the translations/default.ts: _widgetDescription .
supportAutoSize
Interface PropertysupportAutoSize: booleanDefault value is true. If true, the height/width of the widget can be set to auto.
supportInlineEditing
Interface PropertysupportInlineEditing: booleanDefault value is false. If true, an edit button will show when widget is selected.
supportRepeat
Interface PropertysupportRepeat: booleanDefault value is false. If true, the widget can be put in a list.