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. |
| notify$ |
Type : unknown
|
Default value : new Subject<WidgetConfigNotification>()
|
|
A bus for broadcasting WidgetConfigNotification events between independent widget config sections during an active configuration session. Who emits: Any config section component (or its service) that needs to
inform other sections about a state change — for example,
Who subscribes: Config section components that hold references to data owned
by other sections. Subscribers should filter by Subscription management: Each subscriber is responsible for unsubscribing
(e.g. via Unknown notification types: Because |
| 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 |