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)
|
|||||||||||||||
|
Select a widget
Parameters :
Returns :
void
|
| setPreview | ||||||||
setPreview(preview: | 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. Use with caution and only if you want to reset the configuration to some default.
Parameters :
Returns :
void
|
| hasConfig$ |
Default value : this.currentSections$.pipe(map(sections => sections.length > 0))
|
|
Indicates if the current selected widget has a configuration or not. |
| instanceId$ |
Default value : this._instanceId$.asObservable()
|
|
The unique identifier of the current widget instance. |
| selected$ |
Default value : new BehaviorSubject<DynamicComponentDefinition>(null)
|
|
The currently selected widget definition. |
| selectedComponent$ |
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 |