context-dashboard/widget-config.service.ts
Properties |
Methods |
Accessors |
constructor(widgetConfigSectionService: WidgetConfigSectionService)
|
||||||
|
Parameters :
|
| addOnBeforeSave | ||||||
addOnBeforeSave(callback: (config: ContextWidgetConfig) => void)
|
||||||
|
Adds a callback which can check the configuration before saving.
Parameters :
Returns :
void
|
| canSave |
canSave()
|
|
Returns true if the configuration can be saved.
Returns :
Promise<boolean>
|
| deselectWidget |
deselectWidget()
|
|
Deselect the currently selected.
Returns :
void
|
| initConfig | ||||||||
initConfig(config: ContextWidgetConfig)
|
||||||||
|
Used to initialize the configuration of the selected widget.
Parameters :
Returns :
void
|
| selectWidget | ||||||||||||||||||||
selectWidget(selected: DynamicComponentDefinition, identifier: string, isDeviceTypeDashboard: unknown)
|
||||||||||||||||||||
|
Select a widget
Parameters :
Returns :
void
|
| setPreview | ||||||||
setPreview(preview: unknown | DynamicComponentDefinition | TemplateRef<any>)
|
||||||||
|
Enables a preview. If set to a DynamicComponentDefinition, the preview will be rendered with the given component. If set to a TemplateRef, the preview will be rendered with the given template.
Parameters :
Returns :
void
|
| updateConfig | |||||||||||||||
updateConfig(change: Partial
|
|||||||||||||||
|
Updates the configuration of the selected widget. Also concurrency checks are ignored and no change is emitted on the component. Use with caution and only if you want to reset the configuration to some default.
Parameters :
Returns :
void
|
| hasConfig$ |
Type : unknown
|
Default value : this.currentSections$.pipe(map(sections => sections.length > 0))
|
|
Indicates if the current selected widget has a configuration or not. |
| instanceId$ |
Type : unknown
|
Default value : this._instanceId$.asObservable()
|
|
The unique identifier of the current widget instance. |
| isDeviceTypeDashboard$ |
Type : unknown
|
Default value : this._isDeviceTypeDashboard$.asObservable()
|
|
Indicates if the selected widget is placed on a device type dashboard. |
| selected$ |
Type : unknown
|
Default value : new BehaviorSubject<DynamicComponentDefinition>(null)
|
|
The currently selected widget definition. |
| selectedComponent$ |
Type : unknown
|
Default value : new BehaviorSubject<DynamicComponentComponent>(null)
|
|
The currently selected widget component. |
| currentConfig |
getcurrentConfig()
|
|
The current configuration of the selected widget.
Only to read the value. Use |