@siemens/dashboards-ng 51.5.0 → 51.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -95,6 +95,7 @@ class SiWidgetStorage {
|
|
|
95
95
|
* configurations in the session of local storage.
|
|
96
96
|
*/
|
|
97
97
|
const STORAGE_KEY = 'dashboard-store';
|
|
98
|
+
const getStorageKey = (dashboardId) => dashboardId ? `${STORAGE_KEY}-${dashboardId}` : STORAGE_KEY;
|
|
98
99
|
/**
|
|
99
100
|
* Injection token to optionally inject the {@link Storage} implementation
|
|
100
101
|
* that will be used by the {@link SiDefaultWidgetStorage}. The default implementation
|
|
@@ -117,20 +118,16 @@ const DEFAULT_WIDGET_STORAGE_TOKEN = new InjectionToken('default storage for das
|
|
|
117
118
|
class SiDefaultWidgetStorage extends SiWidgetStorage {
|
|
118
119
|
storage;
|
|
119
120
|
map = new Map();
|
|
120
|
-
widgets;
|
|
121
121
|
constructor() {
|
|
122
122
|
super();
|
|
123
123
|
this.storage = inject(DEFAULT_WIDGET_STORAGE_TOKEN, { optional: true }) ?? sessionStorage;
|
|
124
124
|
}
|
|
125
125
|
load(dashboardId) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const key = dashboardId ?? '';
|
|
127
|
+
if (!this.map.has(key)) {
|
|
128
|
+
this.map.set(key, new BehaviorSubject(dashboardId ? this.loadFromStorage(dashboardId) : this.loadFromStorage()));
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
this.map.set(dashboardId, new BehaviorSubject(this.loadFromStorage(dashboardId)));
|
|
132
|
-
}
|
|
133
|
-
return this.map.get(dashboardId);
|
|
130
|
+
return this.map.get(key);
|
|
134
131
|
}
|
|
135
132
|
save(modifiedWidgets, addedWidgets, removedWidgets, dashboardId) {
|
|
136
133
|
const newWidgets = [...addedWidgets, ...modifiedWidgets];
|
|
@@ -140,21 +137,10 @@ class SiDefaultWidgetStorage extends SiWidgetStorage {
|
|
|
140
137
|
update(widgetConfigs, dashboardId) {
|
|
141
138
|
const widgets$ = this.load(dashboardId);
|
|
142
139
|
widgets$.next(widgetConfigs);
|
|
143
|
-
|
|
144
|
-
this.storage.setItem(STORAGE_KEY, JSON.stringify(widgetConfigs));
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
this.storage.setItem(`${STORAGE_KEY}-${dashboardId}`, JSON.stringify(widgetConfigs));
|
|
148
|
-
}
|
|
140
|
+
this.storage.setItem(getStorageKey(dashboardId), JSON.stringify(widgetConfigs));
|
|
149
141
|
}
|
|
150
142
|
loadFromStorage(dashboardId) {
|
|
151
|
-
|
|
152
|
-
if (!dashboardId) {
|
|
153
|
-
configStr = this.storage.getItem(STORAGE_KEY);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
configStr = this.storage.getItem(`${STORAGE_KEY}-${dashboardId}`);
|
|
157
|
-
}
|
|
143
|
+
const configStr = this.storage.getItem(getStorageKey(dashboardId));
|
|
158
144
|
let widgetConfigs = [];
|
|
159
145
|
if (configStr) {
|
|
160
146
|
widgetConfigs = JSON.parse(configStr);
|
|
@@ -1048,7 +1034,7 @@ class SiWidgetHostComponent {
|
|
|
1048
1034
|
});
|
|
1049
1035
|
}
|
|
1050
1036
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1051
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetHostComponent, isStandalone: true, selector: "si-widget-host", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, componentFactory: { classPropertyName: "componentFactory", publicName: "componentFactory", isSignal: true, isRequired: false, transformFunction: null }, widgetIcon: { classPropertyName: "widgetIcon", publicName: "widgetIcon", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove", edit: "edit", gridEvent: "gridEvent" }, host: { properties: { "attr.role": "editable() ? null : 'listitem'", "attr.aria-roledescription": "editable() ? null : 'widget'", "attr.aria-label": "editable() || !widgetAriaLabel() ? null : widgetAriaLabel()" }, classAttribute: "grid-stack-item" }, viewQueries: [{ propertyName: "card", first: true, predicate: ["card"], descendants: true, isSignal: true }, { propertyName: "widgetHost", first: true, predicate: ["widgetHost"], descendants: true, read: ViewContainerRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.shadow-3]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? (widgetConfig().heading | translate) : null\"\n [attr.aria-description]=\"\n editable() && !card.isExpanded() ? (a11yWidgetDescription | translate) : null\n \"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionBarViewType]=\"actionBarViewType()\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"!setupPending() ? widgetConfig().image?.src : ''\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n @let headingIcon = headingIconName();\n @if (headingIcon) {\n <si-icon headerIcon class=\"icon me-3\" [icon]=\"headingIcon\" />\n }\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n @if (setupPending()) {\n <si-empty-state\n [icon]=\"emptyStateIcon()\"\n [heading]=\"labelSetup\"\n [content]=\"labelSetupMessage\"\n />\n }\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer && !setupPending()) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:var(--si-sys-color-effects-shadow-
|
|
1037
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetHostComponent, isStandalone: true, selector: "si-widget-host", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, componentFactory: { classPropertyName: "componentFactory", publicName: "componentFactory", isSignal: true, isRequired: false, transformFunction: null }, widgetIcon: { classPropertyName: "widgetIcon", publicName: "widgetIcon", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove", edit: "edit", gridEvent: "gridEvent" }, host: { properties: { "attr.role": "editable() ? null : 'listitem'", "attr.aria-roledescription": "editable() ? null : 'widget'", "attr.aria-label": "editable() || !widgetAriaLabel() ? null : widgetAriaLabel()" }, classAttribute: "grid-stack-item" }, viewQueries: [{ propertyName: "card", first: true, predicate: ["card"], descendants: true, isSignal: true }, { propertyName: "widgetHost", first: true, predicate: ["widgetHost"], descendants: true, read: ViewContainerRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.shadow-3]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? (widgetConfig().heading | translate) : null\"\n [attr.aria-description]=\"\n editable() && !card.isExpanded() ? (a11yWidgetDescription | translate) : null\n \"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionBarViewType]=\"actionBarViewType()\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"!setupPending() ? widgetConfig().image?.src : ''\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n @let headingIcon = headingIconName();\n @if (headingIcon) {\n <si-icon headerIcon class=\"icon me-3\" [icon]=\"headingIcon\" />\n }\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n @if (setupPending()) {\n <si-empty-state\n [icon]=\"emptyStateIcon()\"\n [heading]=\"labelSetup\"\n [content]=\"labelSetupMessage\"\n />\n }\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer && !setupPending()) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:var(--si-sys-color-effects-shadow-40)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important;inset-block-end:var(--si-sys-sizing-spacing-y-30)!important;inset-inline-end:var(--si-sys-sizing-spacing-x-30)!important}.resize-handle{inset-block-end:var(--si-sys-sizing-spacing-y-30);color:var(--si-sys-color-text-secondary);pointer-events:none;position:absolute;inset-inline-end:var(--si-sys-sizing-spacing-x-30);text-align:center;z-index:10}.draggable-overlay{inset:var(--si-sys-sizing-spacing-y-40) var(--si-sys-sizing-spacing-x-40);position:absolute;z-index:100}si-empty-state{display:block;block-size:100%;inline-size:100%;overflow:auto}\n"], dependencies: [{ kind: "component", type: SiDashboardCardComponent, selector: "si-dashboard-card", inputs: ["restoreText", "expandText", "enableExpandInteraction", "showMenubar"], outputs: ["expandChange"] }, { kind: "component", type: SiEmptyStateComponent, selector: "si-empty-state", inputs: ["icon", "heading", "content", "responsiveMode"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
1052
1038
|
}
|
|
1053
1039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetHostComponent, decorators: [{
|
|
1054
1040
|
type: Component,
|
|
@@ -1066,7 +1052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1066
1052
|
'[attr.role]': "editable() ? null : 'listitem'",
|
|
1067
1053
|
'[attr.aria-roledescription]': "editable() ? null : 'widget'",
|
|
1068
1054
|
'[attr.aria-label]': 'editable() || !widgetAriaLabel() ? null : widgetAriaLabel()'
|
|
1069
|
-
}, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.shadow-3]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? (widgetConfig().heading | translate) : null\"\n [attr.aria-description]=\"\n editable() && !card.isExpanded() ? (a11yWidgetDescription | translate) : null\n \"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionBarViewType]=\"actionBarViewType()\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"!setupPending() ? widgetConfig().image?.src : ''\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n @let headingIcon = headingIconName();\n @if (headingIcon) {\n <si-icon headerIcon class=\"icon me-3\" [icon]=\"headingIcon\" />\n }\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n @if (setupPending()) {\n <si-empty-state\n [icon]=\"emptyStateIcon()\"\n [heading]=\"labelSetup\"\n [content]=\"labelSetupMessage\"\n />\n }\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer && !setupPending()) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:var(--si-sys-color-effects-shadow-
|
|
1055
|
+
}, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.shadow-3]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? (widgetConfig().heading | translate) : null\"\n [attr.aria-description]=\"\n editable() && !card.isExpanded() ? (a11yWidgetDescription | translate) : null\n \"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionBarViewType]=\"actionBarViewType()\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"!setupPending() ? widgetConfig().image?.src : ''\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n @let headingIcon = headingIconName();\n @if (headingIcon) {\n <si-icon headerIcon class=\"icon me-3\" [icon]=\"headingIcon\" />\n }\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n @if (setupPending()) {\n <si-empty-state\n [icon]=\"emptyStateIcon()\"\n [heading]=\"labelSetup\"\n [content]=\"labelSetupMessage\"\n />\n }\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer && !setupPending()) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:var(--si-sys-color-effects-shadow-40)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important;inset-block-end:var(--si-sys-sizing-spacing-y-30)!important;inset-inline-end:var(--si-sys-sizing-spacing-x-30)!important}.resize-handle{inset-block-end:var(--si-sys-sizing-spacing-y-30);color:var(--si-sys-color-text-secondary);pointer-events:none;position:absolute;inset-inline-end:var(--si-sys-sizing-spacing-x-30);text-align:center;z-index:10}.draggable-overlay{inset:var(--si-sys-sizing-spacing-y-40) var(--si-sys-sizing-spacing-x-40);position:absolute;z-index:100}si-empty-state{display:block;block-size:100%;inline-size:100%;overflow:auto}\n"] }]
|
|
1070
1056
|
}], propDecorators: { widgetConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfig", required: true }] }], grid: [{ type: i0.Input, args: [{ isSignal: true, alias: "grid", required: false }] }], componentFactory: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentFactory", required: false }] }], widgetIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetIcon", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], remove: [{ type: i0.Output, args: ["remove"] }], edit: [{ type: i0.Output, args: ["edit"] }], gridEvent: [{ type: i0.Output, args: ["gridEvent"] }], card: [{ type: i0.ViewChild, args: ['card', { isSignal: true }] }], widgetHost: [{ type: i0.ViewChild, args: ['widgetHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
1071
1057
|
|
|
1072
1058
|
/**
|
|
@@ -1696,12 +1682,12 @@ class SiGridComponent {
|
|
|
1696
1682
|
* @param editedWidgetConfig - The config of the widget instance that was updated.
|
|
1697
1683
|
*/
|
|
1698
1684
|
updateWidgetInstance(editedWidgetConfig) {
|
|
1699
|
-
const
|
|
1685
|
+
const widgets = this.visibleWidgetInstances$.value;
|
|
1686
|
+
const index = widgets.findIndex(wc => wc.id === editedWidgetConfig.id);
|
|
1700
1687
|
if (index >= 0) {
|
|
1701
|
-
|
|
1688
|
+
const nextWidgets = [...widgets];
|
|
1702
1689
|
nextWidgets[index] = editedWidgetConfig;
|
|
1703
|
-
|
|
1704
|
-
this.visibleWidgetInstances$.next(nextWidgets);
|
|
1690
|
+
this.visibleWidgetInstances$.next(this.updateWidgetPositions(nextWidgets));
|
|
1705
1691
|
setTimeout(() => this.setModified(true), 0);
|
|
1706
1692
|
}
|
|
1707
1693
|
}
|
|
@@ -2130,7 +2116,7 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
2130
2116
|
return config;
|
|
2131
2117
|
}
|
|
2132
2118
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetCatalogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2133
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetCatalogComponent, isStandalone: true, selector: "si-widget-catalog", inputs: { multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, usesInheritance: true, ngImport: i0, template: "<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n @if (view() === 'list') {\n <div class=\"si-layout-fixed-height\">\n <div class=\"mx-0 d-flex\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6\">\n @if (filteredWidgetCatalog.length > 0) {\n <span id=\"widget-catalog-list-description\" class=\"visually-hidden\">\n {{ labelWidgetCatalogList | translate }}\n </span>\n <div class=\"card overflow-auto\">\n <ul\n class=\"list list-divider\"\n aria-labelledby=\"widget-catalog-list-description\"\n cdkListbox\n [cdkListboxValue]=\"selectedWidgets()\"\n [cdkListboxMultiple]=\"multiSelect()\"\n (cdkListboxValueChange)=\"selectWidgets($event.value)\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-item list-item-action\"\n [cdkOption]=\"widget\"\n [class.active]=\"selectedWidgets().includes(widget)\"\n >\n @if (multiSelect()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input list-item-check\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n inert\n [checked]=\"selectedWidgets().includes(widget)\"\n />\n }\n <si-icon\n class=\"list-item-indicator icon\"\n [icon]=\"widget.iconClass || icons.elementSpecialObject\"\n />\n <span class=\"list-item-title\">{{ widget.name | translate }}</span>\n @if (widget.description?.trim(); as description) {\n <p class=\"list-item-description\">{{ description | translate }}</p>\n }\n </li>\n }\n </ul>\n </div>\n } @else {\n <div>\n <si-empty-state\n icon=\"element-search\"\n [heading]=\"labelEmpty\"\n [content]=\"searchTerm ? labelEmptyMessage : undefined\"\n />\n </div>\n }\n </div>\n </div>\n }\n <ng-container #editorHost />\n</div>\n\n<div class=\"catalog-footer pb-4 px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n @if (showPreviousButton()) {\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onPrevious()\">{{\n labelPrevious | translate\n }}</button>\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn\"\n [class.btn-primary]=\"view() === 'list'\"\n [class.btn-secondary]=\"view() !== 'list'\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n @if (showAddButton()) {\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"disableAddButton()\"\n (click)=\"onAddWidget()\"\n >{{ labelAdd | translate }}</button\n >\n }\n</div>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column;margin-inline:calc(var(--si-sys-sizing-spacing-x-20) * -1);margin-block-start:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.catalog-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.catalog-footer>*{margin-inline-start:var(--si-sys-sizing-spacing-x-60)}\n"], dependencies: [{ kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "value", "readonly", "colorVariant", "disabled", "maxlength", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiEmptyStateComponent, selector: "si-empty-state", inputs: ["icon", "heading", "content"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetCatalogComponent, isStandalone: true, selector: "si-widget-catalog", inputs: { multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, usesInheritance: true, ngImport: i0, template: "<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n @if (view() === 'list') {\n <div class=\"si-layout-fixed-height\">\n <div class=\"mx-0 d-flex\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6\">\n @if (filteredWidgetCatalog.length > 0) {\n <span id=\"widget-catalog-list-description\" class=\"visually-hidden\">\n {{ labelWidgetCatalogList | translate }}\n </span>\n <div class=\"card overflow-auto\">\n <ul\n class=\"list list-divider\"\n aria-labelledby=\"widget-catalog-list-description\"\n cdkListbox\n [cdkListboxValue]=\"selectedWidgets()\"\n [cdkListboxMultiple]=\"multiSelect()\"\n (cdkListboxValueChange)=\"selectWidgets($event.value)\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-item list-item-action\"\n [cdkOption]=\"widget\"\n [class.active]=\"selectedWidgets().includes(widget)\"\n >\n @if (multiSelect()) {\n <input\n type=\"checkbox\"\n class=\"form-check-input list-item-check\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n inert\n [checked]=\"selectedWidgets().includes(widget)\"\n />\n }\n <si-icon\n class=\"list-item-indicator icon\"\n [icon]=\"widget.iconClass || icons.elementSpecialObject\"\n />\n <span class=\"list-item-title\">{{ widget.name | translate }}</span>\n @if (widget.description?.trim(); as description) {\n <p class=\"list-item-description\">{{ description | translate }}</p>\n }\n </li>\n }\n </ul>\n </div>\n } @else {\n <div>\n <si-empty-state\n icon=\"element-search\"\n [heading]=\"labelEmpty\"\n [content]=\"searchTerm ? labelEmptyMessage : undefined\"\n />\n </div>\n }\n </div>\n </div>\n }\n <ng-container #editorHost />\n</div>\n\n<div class=\"catalog-footer pb-4 px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n @if (showPreviousButton()) {\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onPrevious()\">{{\n labelPrevious | translate\n }}</button>\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn\"\n [class.btn-primary]=\"view() === 'list'\"\n [class.btn-secondary]=\"view() !== 'list'\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n @if (showAddButton()) {\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"disableAddButton()\"\n (click)=\"onAddWidget()\"\n >{{ labelAdd | translate }}</button\n >\n }\n</div>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column;margin-inline:calc(var(--si-sys-sizing-spacing-x-20) * -1);margin-block-start:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.catalog-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.catalog-footer>*{margin-inline-start:var(--si-sys-sizing-spacing-x-60)}\n"], dependencies: [{ kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "value", "readonly", "colorVariant", "disabled", "maxlength", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiEmptyStateComponent, selector: "si-empty-state", inputs: ["icon", "heading", "content", "responsiveMode"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2134
2120
|
}
|
|
2135
2121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetCatalogComponent, decorators: [{
|
|
2136
2122
|
type: Component,
|
|
@@ -2162,6 +2148,10 @@ class SiFlexibleDashboardComponent {
|
|
|
2162
2148
|
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
2163
2149
|
/**
|
|
2164
2150
|
* Heading for the dashboard.
|
|
2151
|
+
*
|
|
2152
|
+
* To show a custom header instead, e.g. with a description or page actions,
|
|
2153
|
+
* project it using the `header` attribute. The heading is ignored in that case.
|
|
2154
|
+
* While adding or editing widgets, the respective title is shown instead.
|
|
2165
2155
|
*/
|
|
2166
2156
|
heading = input(/* @ts-ignore */
|
|
2167
2157
|
...(ngDevMode ? [undefined, { debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
@@ -2386,19 +2376,18 @@ class SiFlexibleDashboardComponent {
|
|
|
2386
2376
|
...this.secondaryEditActions(),
|
|
2387
2377
|
...this.globalEditActions.secondary
|
|
2388
2378
|
];
|
|
2379
|
+
const storageMenuItems = primaryEditActions.length && secondaryEditActions.length
|
|
2380
|
+
? undefined
|
|
2381
|
+
: this.widgetStorage.getToolbarMenuItems?.(this.dashboardId());
|
|
2389
2382
|
const primaryMenuItems = primaryEditActions.length
|
|
2390
2383
|
? of(primaryEditActions)
|
|
2391
|
-
:
|
|
2392
|
-
? this.widgetStorage.getToolbarMenuItems(this.dashboardId()).primary
|
|
2393
|
-
: of([]);
|
|
2384
|
+
: (storageMenuItems?.primary ?? of([]));
|
|
2394
2385
|
combineLatest([primaryMenuItems, this.hideAddWidgetInstanceButton$])
|
|
2395
2386
|
.pipe(takeUntil(this.dashboardId$))
|
|
2396
2387
|
.subscribe(([items, hideAddButton]) => this.setupPrimaryMenuItems(items, hideAddButton));
|
|
2397
2388
|
const secondaryMenuItems = secondaryEditActions.length
|
|
2398
2389
|
? of(secondaryEditActions)
|
|
2399
|
-
:
|
|
2400
|
-
? this.widgetStorage.getToolbarMenuItems(this.dashboardId()).secondary
|
|
2401
|
-
: undefined;
|
|
2390
|
+
: storageMenuItems?.secondary;
|
|
2402
2391
|
if (secondaryMenuItems) {
|
|
2403
2392
|
secondaryMenuItems
|
|
2404
2393
|
.pipe(takeUntil(this.dashboardId$))
|
|
@@ -2439,11 +2428,18 @@ class SiFlexibleDashboardComponent {
|
|
|
2439
2428
|
return this.widgetCatalog().find(widget => widget.id === id);
|
|
2440
2429
|
}
|
|
2441
2430
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFlexibleDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2442
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2431
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiFlexibleDashboardComponent, isStandalone: true, selector: "si-flexible-dashboard", inputs: { editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, widgetCatalogComponent: { classPropertyName: "widgetCatalogComponent", publicName: "widgetCatalogComponent", isSignal: true, isRequired: false, transformFunction: null }, widgetInstanceEditorDialogComponent: { classPropertyName: "widgetInstanceEditorDialogComponent", publicName: "widgetInstanceEditorDialogComponent", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, widgetCatalog: { classPropertyName: "widgetCatalog", publicName: "widgetCatalog", isSignal: true, isRequired: false, transformFunction: null }, hideAddWidgetInstanceButton: { classPropertyName: "hideAddWidgetInstanceButton", publicName: "hideAddWidgetInstanceButton", isSignal: true, isRequired: false, transformFunction: null }, hideEditButton: { classPropertyName: "hideEditButton", publicName: "hideEditButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButtonLabel: { classPropertyName: "showEditButtonLabel", publicName: "showEditButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, hideProgressIndicator: { classPropertyName: "hideProgressIndicator", publicName: "hideProgressIndicator", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, primaryEditActions: { classPropertyName: "primaryEditActions", publicName: "primaryEditActions", isSignal: true, isRequired: false, transformFunction: null }, secondaryEditActions: { classPropertyName: "secondaryEditActions", publicName: "secondaryEditActions", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { editable: "editableChange", isModified: "isModified" }, viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }, { propertyName: "dashboard", first: true, predicate: ["dashboard"], descendants: true, isSignal: true }, { propertyName: "catalogHost", first: true, predicate: ["catalogHost"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<si-dashboard #dashboard [sticky]=\"true\">\n <!--\n Do not replace the default title below with [heading]=\"pageTitle()\" on si-dashboard.\n Forwarding the header slot always fills it, even if no custom header is supplied. Angular then\n never renders the heading fallback of si-dashboard, so the default title is rendered here.\n -->\n <ng-container header>\n @if (isDashboardVisible()) {\n <ng-content select=\"[header]\">\n <ng-container *ngTemplateOutlet=\"pageHeader\" />\n </ng-content>\n } @else {\n <ng-container *ngTemplateOutlet=\"pageHeader\" />\n }\n </ng-container>\n <si-dashboard-toolbar\n #toolbar\n menubar\n [class.d-none]=\"!isDashboardVisible()\"\n [primaryEditActions]=\"(primaryEditActions$ | async) ?? []\"\n [secondaryEditActions]=\"(secondaryEditActions$ | async) ?? []\"\n [disabled]=\"(grid.isLoading | async) ?? false\"\n [hideEditButton]=\"hideEditButton()\"\n [showEditButtonLabel]=\"showEditButtonLabel()\"\n [grid]=\"grid\"\n [(editable)]=\"editable\"\n (save)=\"grid.save()\"\n >\n <ng-content select=\"[filters-slot]\" filters-slot />\n </si-dashboard-toolbar>\n\n <div dashboard class=\"d-contents\">\n <si-grid\n #grid\n [class.d-none]=\"!isDashboardVisible()\"\n [gridConfig]=\"config()?.grid\"\n [dashboardId]=\"dashboardId()\"\n [widgetCatalog]=\"widgetCatalog()\"\n [hideProgressIndicator]=\"hideProgressIndicator()\"\n [widgetInstanceEditorDialogComponent]=\"widgetInstanceEditorDialogComponent()\"\n [emitWidgetInstanceEditEvents]=\"true\"\n [(editable)]=\"editable\"\n (isModified)=\"onModified($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n >\n <ng-content select=\"[empty-state]\" empty-state />\n </si-grid>\n <ng-container #catalogHost />\n </div>\n</si-dashboard>\n\n<ng-template #pageHeader>\n @if (pageTitle()) {\n <div class=\"si-layout-header\">\n <h2 class=\"si-layout-title si-layout-top-element\">{{ pageTitle() | translate }}</h2>\n </div>\n }\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column}\n"], dependencies: [{ kind: "component", type: SiDashboardComponent, selector: "si-dashboard", inputs: ["heading", "enableExpandInteractions", "sticky", "hideMenubar"] }, { kind: "component", type: SiDashboardToolbarComponent, selector: "si-dashboard-toolbar", inputs: ["primaryEditActions", "secondaryEditActions", "disableSaveButton", "disabled", "editable", "hideEditButton", "showEditButtonLabel", "grid"], outputs: ["disableSaveButtonChange", "editableChange", "save"] }, { kind: "component", type: SiGridComponent, selector: "si-grid", inputs: ["gridConfig", "editable", "dashboardId", "widgetCatalog", "emitWidgetInstanceEditEvents", "hideProgressIndicator", "widgetInstanceEditorDialogComponent"], outputs: ["editableChange", "isModified", "widgetInstanceEdit"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2443
2432
|
}
|
|
2444
2433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFlexibleDashboardComponent, decorators: [{
|
|
2445
2434
|
type: Component,
|
|
2446
|
-
args: [{ selector: 'si-flexible-dashboard', imports: [
|
|
2435
|
+
args: [{ selector: 'si-flexible-dashboard', imports: [
|
|
2436
|
+
SiDashboardComponent,
|
|
2437
|
+
SiDashboardToolbarComponent,
|
|
2438
|
+
SiGridComponent,
|
|
2439
|
+
AsyncPipe,
|
|
2440
|
+
NgTemplateOutlet,
|
|
2441
|
+
SiTranslatePipe
|
|
2442
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<si-dashboard #dashboard [sticky]=\"true\">\n <!--\n Do not replace the default title below with [heading]=\"pageTitle()\" on si-dashboard.\n Forwarding the header slot always fills it, even if no custom header is supplied. Angular then\n never renders the heading fallback of si-dashboard, so the default title is rendered here.\n -->\n <ng-container header>\n @if (isDashboardVisible()) {\n <ng-content select=\"[header]\">\n <ng-container *ngTemplateOutlet=\"pageHeader\" />\n </ng-content>\n } @else {\n <ng-container *ngTemplateOutlet=\"pageHeader\" />\n }\n </ng-container>\n <si-dashboard-toolbar\n #toolbar\n menubar\n [class.d-none]=\"!isDashboardVisible()\"\n [primaryEditActions]=\"(primaryEditActions$ | async) ?? []\"\n [secondaryEditActions]=\"(secondaryEditActions$ | async) ?? []\"\n [disabled]=\"(grid.isLoading | async) ?? false\"\n [hideEditButton]=\"hideEditButton()\"\n [showEditButtonLabel]=\"showEditButtonLabel()\"\n [grid]=\"grid\"\n [(editable)]=\"editable\"\n (save)=\"grid.save()\"\n >\n <ng-content select=\"[filters-slot]\" filters-slot />\n </si-dashboard-toolbar>\n\n <div dashboard class=\"d-contents\">\n <si-grid\n #grid\n [class.d-none]=\"!isDashboardVisible()\"\n [gridConfig]=\"config()?.grid\"\n [dashboardId]=\"dashboardId()\"\n [widgetCatalog]=\"widgetCatalog()\"\n [hideProgressIndicator]=\"hideProgressIndicator()\"\n [widgetInstanceEditorDialogComponent]=\"widgetInstanceEditorDialogComponent()\"\n [emitWidgetInstanceEditEvents]=\"true\"\n [(editable)]=\"editable\"\n (isModified)=\"onModified($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n >\n <ng-content select=\"[empty-state]\" empty-state />\n </si-grid>\n <ng-container #catalogHost />\n </div>\n</si-dashboard>\n\n<ng-template #pageHeader>\n @if (pageTitle()) {\n <div class=\"si-layout-header\">\n <h2 class=\"si-layout-title si-layout-top-element\">{{ pageTitle() | translate }}</h2>\n </div>\n }\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column}\n"] }]
|
|
2447
2443
|
}], propDecorators: { editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }, { type: i0.Output, args: ["editableChange"] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], widgetCatalogComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetCatalogComponent", required: false }] }], widgetInstanceEditorDialogComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetInstanceEditorDialogComponent", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], widgetCatalog: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetCatalog", required: false }] }], hideAddWidgetInstanceButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideAddWidgetInstanceButton", required: false }] }], hideEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideEditButton", required: false }] }], showEditButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButtonLabel", required: false }] }], hideProgressIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideProgressIndicator", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], primaryEditActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryEditActions", required: false }] }], secondaryEditActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryEditActions", required: false }] }], multiSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelect", required: false }] }], grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }], dashboard: [{ type: i0.ViewChild, args: ['dashboard', { isSignal: true }] }], catalogHost: [{ type: i0.ViewChild, args: ['catalogHost', { ...{ read: ViewContainerRef }, isSignal: true }] }], isModified: [{ type: i0.Output, args: ["isModified"] }], toolbar: [{ type: i0.ViewChild, args: ['toolbar', { isSignal: true }] }] } });
|
|
2448
2444
|
|
|
2449
2445
|
/**
|