@siemens/dashboards-ng 49.13.0 → 51.0.0-rc.3
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.
- package/README.md +3 -3
- package/fesm2022/siemens-dashboards-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-dashboards-ng.mjs +230 -135
- package/fesm2022/siemens-dashboards-ng.mjs.map +1 -1
- package/package.json +13 -11
- package/template-i18n.json +1 -0
- package/types/siemens-dashboards-ng-translate.d.ts +1 -0
- package/types/siemens-dashboards-ng.d.ts +2 -1
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgTemplateOutlet, isPlatformBrowser, AsyncPipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject, input, model, output, viewChild, computed,
|
|
3
|
+
import { InjectionToken, inject, input, model, output, viewChild, computed, Component, Injectable, ElementRef, Renderer2, DOCUMENT, Directive, EventEmitter, createNgModule, Injector, EnvironmentInjector, DestroyRef, signal, ViewContainerRef, isSignal, viewChildren, NgZone, PLATFORM_ID, afterNextRender, ChangeDetectionStrategy, inputBinding, outputBinding, NgModule } from '@angular/core';
|
|
4
4
|
import { SiDashboardCardComponent, SiDashboardComponent } from '@siemens/element-ng/dashboard';
|
|
5
5
|
import { t, SiTranslatePipe, injectSiTranslateService } from '@siemens/element-translate-ng/translate';
|
|
6
6
|
import { BehaviorSubject, of, Subject, throwError, ReplaySubject, first, combineLatest } from 'rxjs';
|
|
@@ -183,45 +183,53 @@ class SiDashboardToolbarComponent {
|
|
|
183
183
|
*
|
|
184
184
|
* @defaultValue []
|
|
185
185
|
*/
|
|
186
|
-
primaryEditActions = input([],
|
|
186
|
+
primaryEditActions = input([], /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "primaryEditActions" }] : /* istanbul ignore next */ []));
|
|
187
188
|
/**
|
|
188
189
|
* Set secondary actions that are in `editable` mode second visible or in
|
|
189
190
|
* the dropdown part of the content action bar of the toolbar.
|
|
190
191
|
*
|
|
191
192
|
* @defaultValue [] */
|
|
192
|
-
secondaryEditActions = input([],
|
|
193
|
+
secondaryEditActions = input([], /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "secondaryEditActions" }] : /* istanbul ignore next */ []));
|
|
193
195
|
/**
|
|
194
196
|
* Input to disable the save button. Note, the input `disabled` disables all
|
|
195
197
|
* actions and the save button of the toolbar.
|
|
196
198
|
*
|
|
197
199
|
* @defaultValue true
|
|
198
200
|
*/
|
|
199
|
-
disableSaveButton = model(true,
|
|
201
|
+
disableSaveButton = model(true, /* @ts-ignore */
|
|
202
|
+
...(ngDevMode ? [{ debugName: "disableSaveButton" }] : /* istanbul ignore next */ []));
|
|
200
203
|
/**
|
|
201
204
|
* Input to disable all actions and buttons of the toolbar.
|
|
202
205
|
*
|
|
203
206
|
* @defaultValue false */
|
|
204
|
-
disabled = input(false,
|
|
207
|
+
disabled = input(false, /* @ts-ignore */
|
|
208
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
205
209
|
/**
|
|
206
210
|
* Input option to set the `editable` mode. When editable
|
|
207
211
|
* the toolbar shows a cancel and save button. Otherwise,
|
|
208
212
|
* it displays an edit button.
|
|
209
213
|
*
|
|
210
214
|
* @defaultValue false */
|
|
211
|
-
editable = model(false,
|
|
215
|
+
editable = model(false, /* @ts-ignore */
|
|
216
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
212
217
|
/**
|
|
213
218
|
* Option to hide the dashboard edit button.
|
|
214
219
|
*
|
|
215
220
|
* @defaultValue false
|
|
216
221
|
*/
|
|
217
|
-
hideEditButton = input(false,
|
|
222
|
+
hideEditButton = input(false, /* @ts-ignore */
|
|
223
|
+
...(ngDevMode ? [{ debugName: "hideEditButton" }] : /* istanbul ignore next */ []));
|
|
218
224
|
/**
|
|
219
225
|
* Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.
|
|
220
226
|
*
|
|
221
227
|
* @defaultValue false
|
|
222
228
|
*/
|
|
223
|
-
showEditButtonLabel = input(false,
|
|
224
|
-
|
|
229
|
+
showEditButtonLabel = input(false, /* @ts-ignore */
|
|
230
|
+
...(ngDevMode ? [{ debugName: "showEditButtonLabel" }] : /* istanbul ignore next */ []));
|
|
231
|
+
grid = input.required(/* @ts-ignore */
|
|
232
|
+
...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
225
233
|
/**
|
|
226
234
|
* Emits on save button click.
|
|
227
235
|
*/
|
|
@@ -231,17 +239,21 @@ class SiDashboardToolbarComponent {
|
|
|
231
239
|
labelSave = t(() => $localize `:@@DASHBOARD.SAVE:Save`);
|
|
232
240
|
activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
233
241
|
dashboardToolbarContainer = viewChild.required(SiResponsiveContainerDirective);
|
|
234
|
-
showContentActionBar = computed(() => this.primaryEditActions()?.length + this.secondaryEditActions()?.length > 3,
|
|
242
|
+
showContentActionBar = computed(() => this.primaryEditActions()?.length + this.secondaryEditActions()?.length > 3, /* @ts-ignore */
|
|
243
|
+
...(ngDevMode ? [{ debugName: "showContentActionBar" }] : /* istanbul ignore next */ []));
|
|
235
244
|
editActions = computed(() => [
|
|
236
245
|
...this.primaryEditActions(),
|
|
237
246
|
...this.secondaryEditActions()
|
|
238
|
-
],
|
|
247
|
+
], /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "editActions" }] : /* istanbul ignore next */ []));
|
|
239
249
|
primaryEditActionsComputed = computed(() => {
|
|
240
250
|
return this.primaryEditActions().map(item => this.proxyMenuItemAction(item));
|
|
241
|
-
},
|
|
251
|
+
}, /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "primaryEditActionsComputed" }] : /* istanbul ignore next */ []));
|
|
242
253
|
secondaryEditActionsComputed = computed(() => {
|
|
243
254
|
return this.secondaryEditActions().map(item => this.proxyMenuItemAction(item));
|
|
244
|
-
},
|
|
255
|
+
}, /* @ts-ignore */
|
|
256
|
+
...(ngDevMode ? [{ debugName: "secondaryEditActionsComputed" }] : /* istanbul ignore next */ []));
|
|
245
257
|
onEdit() {
|
|
246
258
|
this.editable.set(true);
|
|
247
259
|
}
|
|
@@ -260,17 +272,18 @@ class SiDashboardToolbarComponent {
|
|
|
260
272
|
}
|
|
261
273
|
showEditButtonLabelDesktop = computed(() => {
|
|
262
274
|
return this.showEditButtonLabel() && !this.dashboardToolbarContainer()?.xs();
|
|
263
|
-
},
|
|
275
|
+
}, /* @ts-ignore */
|
|
276
|
+
...(ngDevMode ? [{ debugName: "showEditButtonLabelDesktop" }] : /* istanbul ignore next */ []));
|
|
264
277
|
proxyMenuItemAction(item) {
|
|
265
278
|
if (item.type === 'action' && typeof item.action === 'function') {
|
|
266
279
|
item.action = item.action.bind(this, this.grid());
|
|
267
280
|
}
|
|
268
281
|
return item;
|
|
269
282
|
}
|
|
270
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
271
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDashboardToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
284
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiDashboardToolbarComponent, isStandalone: true, selector: "si-dashboard-toolbar", inputs: { primaryEditActions: { classPropertyName: "primaryEditActions", publicName: "primaryEditActions", isSignal: true, isRequired: false, transformFunction: null }, secondaryEditActions: { classPropertyName: "secondaryEditActions", publicName: "secondaryEditActions", isSignal: true, isRequired: false, transformFunction: null }, disableSaveButton: { classPropertyName: "disableSaveButton", publicName: "disableSaveButton", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", 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 }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { disableSaveButton: "disableSaveButtonChange", editable: "editableChange", save: "save" }, host: { classAttribute: "d-flex flex-column flex-grow-1" }, viewQueries: [{ propertyName: "dashboardToolbarContainer", first: true, predicate: SiResponsiveContainerDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"row mb-3\" siResponsiveContainer>\n <div class=\"col-12 d-flex justify-content-between\">\n @if (!editable()) {\n <ng-content select=\"[filters-slot]\" />\n @if (!hideEditButton()) {\n @let showEditButtonLabelDesktop = this.showEditButtonLabelDesktop();\n <button\n type=\"button\"\n class=\"btn ms-auto\"\n [class]=\"showEditButtonLabelDesktop ? 'btn-secondary' : 'btn-icon btn-tertiary'\"\n [attr.aria-label]=\"labelEdit | translate\"\n [siTooltip]=\"labelEdit\"\n [isDisabled]=\"showEditButtonLabelDesktop\"\n [disabled]=\"disabled()\"\n (click)=\"onEdit()\"\n >\n @if (showEditButtonLabelDesktop) {\n {{ labelEdit | translate }}\n } @else {\n <si-icon [icon]=\"icons.elementEdit\" />\n }\n </button>\n }\n } @else {\n @if (showContentActionBar()) {\n <si-content-action-bar\n toggleItemLabel=\"toggle\"\n viewType=\"expanded\"\n [disabled]=\"disabled()\"\n [primaryActions]=\"primaryEditActionsComputed()\"\n [secondaryActions]=\"secondaryEditActionsComputed()\"\n />\n } @else {\n <div>\n @for (action of editActions(); track $index) {\n @if (isToolbarItem(action)) {\n @if (disabled()) {\n <!-- Links do not support disabled, so we need to render a button instead in this case. -->\n <button type=\"button\" class=\"btn btn-secondary me-4\" disabled>\n {{ action.label! | translate }}\n </button>\n } @else {\n @switch (action.type) {\n @case ('action') {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n (click)=\"action.action(grid())\"\n >\n {{ action.label! | translate }}\n </button>\n }\n @case ('router-link') {\n <a\n class=\"btn btn-secondary me-4\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n >\n {{ action.label! | translate }}\n </a>\n }\n @case ('link') {\n <a class=\"btn btn-secondary me-4\" [href]=\"action.href\" [target]=\"action.target\">\n {{ action.label! | translate }}\n </a>\n }\n }\n }\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n [siLink]=\"action\"\n >\n {{ action.title! | translate }}\n </button>\n }\n }\n </div>\n }\n <div>\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n (click)=\"onCancel()\"\n >\n {{ labelCancel | translate }}\n </button>\n <si-loading-button\n class=\"align-top\"\n buttonClass=\"btn btn-primary\"\n [disabled]=\"disableSaveButton()\"\n [loading]=\"disabled()\"\n (click)=\"onSave()\"\n >\n {{ labelSave | translate }}\n </si-loading-button>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SiContentActionBarComponent, selector: "si-content-action-bar", inputs: ["primaryActions", "secondaryActions", "actionParam", "viewType", "toggleItemLabel", "preventIconsInDropdownMenus", "disabled"] }, { kind: "directive", type: SiLinkDirective, selector: "[siLink]", inputs: ["siLink", "siLinkDefaultTarget", "actionParam", "activeClass", "exactMatch", "ariaCurrent"], outputs: ["activeChange"], exportAs: ["siLink"] }, { kind: "component", type: SiLoadingButtonComponent, selector: "si-loading-button", inputs: ["disabled", "loading", "type", "ariaLabel", "ariaLabelledBy", "buttonClass"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: SiResponsiveContainerDirective, selector: "[siResponsiveContainer]", inputs: ["resizeThrottle", "breakpoints"], exportAs: ["siResponsiveContainer"] }, { kind: "directive", type: SiTooltipDirective, selector: "[siTooltip]", inputs: ["siTooltip", "placement", "isDisabled", "tooltipScrollStrategy", "tooltipContext"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
272
285
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDashboardToolbarComponent, decorators: [{
|
|
274
287
|
type: Component,
|
|
275
288
|
args: [{ selector: 'si-dashboard-toolbar', imports: [
|
|
276
289
|
SiContentActionBarComponent,
|
|
@@ -281,7 +294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
281
294
|
SiResponsiveContainerDirective,
|
|
282
295
|
SiTranslatePipe,
|
|
283
296
|
SiTooltipDirective
|
|
284
|
-
],
|
|
297
|
+
], host: {
|
|
285
298
|
class: 'd-flex flex-column flex-grow-1'
|
|
286
299
|
}, template: "<div class=\"row mb-3\" siResponsiveContainer>\n <div class=\"col-12 d-flex justify-content-between\">\n @if (!editable()) {\n <ng-content select=\"[filters-slot]\" />\n @if (!hideEditButton()) {\n @let showEditButtonLabelDesktop = this.showEditButtonLabelDesktop();\n <button\n type=\"button\"\n class=\"btn ms-auto\"\n [class]=\"showEditButtonLabelDesktop ? 'btn-secondary' : 'btn-icon btn-tertiary'\"\n [attr.aria-label]=\"labelEdit | translate\"\n [siTooltip]=\"labelEdit\"\n [isDisabled]=\"showEditButtonLabelDesktop\"\n [disabled]=\"disabled()\"\n (click)=\"onEdit()\"\n >\n @if (showEditButtonLabelDesktop) {\n {{ labelEdit | translate }}\n } @else {\n <si-icon [icon]=\"icons.elementEdit\" />\n }\n </button>\n }\n } @else {\n @if (showContentActionBar()) {\n <si-content-action-bar\n toggleItemLabel=\"toggle\"\n viewType=\"expanded\"\n [disabled]=\"disabled()\"\n [primaryActions]=\"primaryEditActionsComputed()\"\n [secondaryActions]=\"secondaryEditActionsComputed()\"\n />\n } @else {\n <div>\n @for (action of editActions(); track $index) {\n @if (isToolbarItem(action)) {\n @if (disabled()) {\n <!-- Links do not support disabled, so we need to render a button instead in this case. -->\n <button type=\"button\" class=\"btn btn-secondary me-4\" disabled>\n {{ action.label! | translate }}\n </button>\n } @else {\n @switch (action.type) {\n @case ('action') {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n (click)=\"action.action(grid())\"\n >\n {{ action.label! | translate }}\n </button>\n }\n @case ('router-link') {\n <a\n class=\"btn btn-secondary me-4\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n >\n {{ action.label! | translate }}\n </a>\n }\n @case ('link') {\n <a class=\"btn btn-secondary me-4\" [href]=\"action.href\" [target]=\"action.target\">\n {{ action.label! | translate }}\n </a>\n }\n }\n }\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n [siLink]=\"action\"\n >\n {{ action.title! | translate }}\n </button>\n }\n }\n </div>\n }\n <div>\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n (click)=\"onCancel()\"\n >\n {{ labelCancel | translate }}\n </button>\n <si-loading-button\n class=\"align-top\"\n buttonClass=\"btn btn-primary\"\n [disabled]=\"disableSaveButton()\"\n [loading]=\"disabled()\"\n (click)=\"onSave()\"\n >\n {{ labelSave | translate }}\n </si-loading-button>\n </div>\n }\n </div>\n</div>\n" }]
|
|
287
300
|
}], propDecorators: { primaryEditActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryEditActions", required: false }] }], secondaryEditActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryEditActions", required: false }] }], disableSaveButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSaveButton", required: false }] }, { type: i0.Output, args: ["disableSaveButtonChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }, { type: i0.Output, args: ["editableChange"] }], hideEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideEditButton", required: false }] }], showEditButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButtonLabel", required: false }] }], grid: [{ type: i0.Input, args: [{ isSignal: true, alias: "grid", required: true }] }], save: [{ type: i0.Output, args: ["save"] }], dashboardToolbarContainer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiResponsiveContainerDirective), { isSignal: true }] }] } });
|
|
@@ -326,10 +339,10 @@ class SiWidgetDefaultIdProvider extends SiWidgetIdProvider {
|
|
|
326
339
|
generateWidgetId(widget, dashboardId) {
|
|
327
340
|
return crypto.randomUUID();
|
|
328
341
|
}
|
|
329
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
330
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetDefaultIdProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
343
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetDefaultIdProvider, providedIn: 'root' });
|
|
331
344
|
}
|
|
332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetDefaultIdProvider, decorators: [{
|
|
333
346
|
type: Injectable,
|
|
334
347
|
args: [{ providedIn: 'root' }]
|
|
335
348
|
}] });
|
|
@@ -339,9 +352,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
339
352
|
* SPDX-License-Identifier: MIT
|
|
340
353
|
*/
|
|
341
354
|
class SiWebComponentWrapperBaseComponent {
|
|
342
|
-
config = input.required(
|
|
343
|
-
|
|
344
|
-
|
|
355
|
+
config = input.required(/* @ts-ignore */
|
|
356
|
+
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
357
|
+
elementTagName = input.required(/* @ts-ignore */
|
|
358
|
+
...(ngDevMode ? [{ debugName: "elementTagName" }] : /* istanbul ignore next */ []));
|
|
359
|
+
url = input.required(/* @ts-ignore */
|
|
360
|
+
...(ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []));
|
|
345
361
|
webComponentHost = viewChild.required('webComponentHost', {
|
|
346
362
|
read: ElementRef
|
|
347
363
|
});
|
|
@@ -368,10 +384,10 @@ class SiWebComponentWrapperBaseComponent {
|
|
|
368
384
|
const script = document.querySelector(`script[src='${url}']`);
|
|
369
385
|
return script ? true : false;
|
|
370
386
|
}
|
|
371
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
372
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWebComponentWrapperBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
388
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.5", type: SiWebComponentWrapperBaseComponent, isStandalone: true, inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, elementTagName: { classPropertyName: "elementTagName", publicName: "elementTagName", isSignal: true, isRequired: true, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "webComponentHost", first: true, predicate: ["webComponentHost"], descendants: true, read: ElementRef, isSignal: true }], usesOnChanges: true, ngImport: i0 });
|
|
373
389
|
}
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWebComponentWrapperBaseComponent, decorators: [{
|
|
375
391
|
type: Directive
|
|
376
392
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], elementTagName: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementTagName", required: true }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: true }] }], webComponentHost: [{ type: i0.ViewChild, args: ['webComponentHost', { ...{
|
|
377
393
|
read: ElementRef
|
|
@@ -419,12 +435,12 @@ class SiWebComponentEditorWrapperComponent extends SiWebComponentWrapperBaseComp
|
|
|
419
435
|
previous() {
|
|
420
436
|
this.webComponent?.dispatchEvent(new CustomEvent('previous'));
|
|
421
437
|
}
|
|
422
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
423
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWebComponentEditorWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
439
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiWebComponentEditorWrapperComponent, isStandalone: true, selector: "si-web-component-editor-wrapper", usesInheritance: true, ngImport: i0, template: "<div #webComponentHost class=\"h-100\"></div>\n" });
|
|
424
440
|
}
|
|
425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWebComponentEditorWrapperComponent, decorators: [{
|
|
426
442
|
type: Component,
|
|
427
|
-
args: [{ selector: 'si-web-component-editor-wrapper',
|
|
443
|
+
args: [{ selector: 'si-web-component-editor-wrapper', template: "<div #webComponentHost class=\"h-100\"></div>\n" }]
|
|
428
444
|
}] });
|
|
429
445
|
|
|
430
446
|
/**
|
|
@@ -463,12 +479,12 @@ class SiWebComponentWrapperComponent extends SiWebComponentWrapperBaseComponent
|
|
|
463
479
|
this.secondaryEditActions = event.secondaryEditActions ?? this.secondaryEditActions;
|
|
464
480
|
this.configChange.emit(event);
|
|
465
481
|
}
|
|
466
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
467
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWebComponentWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
483
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: SiWebComponentWrapperComponent, isStandalone: true, selector: "si-web-component-wrapper", usesInheritance: true, ngImport: i0, template: "<div #webComponentHost class=\"h-100\"></div>\n" });
|
|
468
484
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWebComponentWrapperComponent, decorators: [{
|
|
470
486
|
type: Component,
|
|
471
|
-
args: [{ selector: 'si-web-component-wrapper',
|
|
487
|
+
args: [{ selector: 'si-web-component-wrapper', template: "<div #webComponentHost class=\"h-100\"></div>\n" }]
|
|
472
488
|
}] });
|
|
473
489
|
|
|
474
490
|
/**
|
|
@@ -587,19 +603,24 @@ class SiWidgetHostComponent {
|
|
|
587
603
|
/** @internal */
|
|
588
604
|
elementRef = inject(ElementRef).nativeElement;
|
|
589
605
|
/** @defaultValue false */
|
|
590
|
-
keyboardActive = signal(false,
|
|
591
|
-
|
|
592
|
-
|
|
606
|
+
keyboardActive = signal(false, /* @ts-ignore */
|
|
607
|
+
...(ngDevMode ? [{ debugName: "keyboardActive" }] : /* istanbul ignore next */ []));
|
|
608
|
+
widgetConfig = input.required(/* @ts-ignore */
|
|
609
|
+
...(ngDevMode ? [{ debugName: "widgetConfig" }] : /* istanbul ignore next */ []));
|
|
610
|
+
grid = input(/* @ts-ignore */
|
|
611
|
+
...(ngDevMode ? [undefined, { debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
593
612
|
/**
|
|
594
613
|
* The component factory for this widget's type.
|
|
595
614
|
*/
|
|
596
|
-
componentFactory = input(
|
|
615
|
+
componentFactory = input(/* @ts-ignore */
|
|
616
|
+
...(ngDevMode ? [undefined, { debugName: "componentFactory" }] : /* istanbul ignore next */ []));
|
|
597
617
|
/**
|
|
598
618
|
* Sets the widget host into editable mode.
|
|
599
619
|
*
|
|
600
620
|
* @defaultValue false
|
|
601
621
|
*/
|
|
602
|
-
editable = input(false,
|
|
622
|
+
editable = input(false, /* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
603
624
|
remove = output();
|
|
604
625
|
edit = output();
|
|
605
626
|
gridEvent = output();
|
|
@@ -618,18 +639,31 @@ class SiWidgetHostComponent {
|
|
|
618
639
|
a11yWidgetActivatedMessage = t(() => $localize `:@@DASHBOARD.WIDGET.A11Y.ACTIVATED:Widget activated. Use arrow keys to move, Shift+arrow keys to resize, Escape to exit.`);
|
|
619
640
|
a11yWidgetDeactivatedMessage = t(() => $localize `:@@DASHBOARD.WIDGET.A11Y.DEACTIVATED:Widget deactivated.`);
|
|
620
641
|
a11yWidgetDescription = t(() => $localize `:@@DASHBOARD.WIDGET.A11Y.DESCRIPTION:Press Enter or Space to activate. Then use arrow keys to move, Shift+arrow keys to resize, Escape to exit.`);
|
|
642
|
+
widgetAriaLabel = computed(() => {
|
|
643
|
+
const widgetHeading = this.widgetConfig().heading;
|
|
644
|
+
if (widgetHeading) {
|
|
645
|
+
return this.translateService.translateSync(widgetHeading);
|
|
646
|
+
}
|
|
647
|
+
return null;
|
|
648
|
+
}, /* @ts-ignore */
|
|
649
|
+
...(ngDevMode ? [{ debugName: "widgetAriaLabel" }] : /* istanbul ignore next */ []));
|
|
621
650
|
widgetInstance;
|
|
622
651
|
widgetRef;
|
|
623
652
|
/** @defaultValue [] */
|
|
624
|
-
primaryActions = signal([],
|
|
653
|
+
primaryActions = signal([], /* @ts-ignore */
|
|
654
|
+
...(ngDevMode ? [{ debugName: "primaryActions" }] : /* istanbul ignore next */ []));
|
|
625
655
|
/** @defaultValue [] */
|
|
626
|
-
secondaryActions = signal([],
|
|
656
|
+
secondaryActions = signal([], /* @ts-ignore */
|
|
657
|
+
...(ngDevMode ? [{ debugName: "secondaryActions" }] : /* istanbul ignore next */ []));
|
|
627
658
|
/** @defaultValue 'expanded' */
|
|
628
|
-
actionBarViewType = signal('expanded',
|
|
659
|
+
actionBarViewType = signal('expanded', /* @ts-ignore */
|
|
660
|
+
...(ngDevMode ? [{ debugName: "actionBarViewType" }] : /* istanbul ignore next */ []));
|
|
629
661
|
/** @defaultValue [] */
|
|
630
|
-
editablePrimaryActions = signal([],
|
|
662
|
+
editablePrimaryActions = signal([], /* @ts-ignore */
|
|
663
|
+
...(ngDevMode ? [{ debugName: "editablePrimaryActions" }] : /* istanbul ignore next */ []));
|
|
631
664
|
/** @defaultValue [] */
|
|
632
|
-
editableSecondaryActions = signal([],
|
|
665
|
+
editableSecondaryActions = signal([], /* @ts-ignore */
|
|
666
|
+
...(ngDevMode ? [{ debugName: "editableSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
633
667
|
/**
|
|
634
668
|
* @defaultValue
|
|
635
669
|
* ```
|
|
@@ -668,11 +702,13 @@ class SiWidgetHostComponent {
|
|
|
668
702
|
iconOnly: true,
|
|
669
703
|
action: () => this.onRemove()
|
|
670
704
|
};
|
|
671
|
-
widgetInstanceFooter = signal(undefined,
|
|
705
|
+
widgetInstanceFooter = signal(undefined, /* @ts-ignore */
|
|
706
|
+
...(ngDevMode ? [{ debugName: "widgetInstanceFooter" }] : /* istanbul ignore next */ []));
|
|
672
707
|
accentLine = computed(() => {
|
|
673
708
|
const { accentLine } = this.widgetConfig();
|
|
674
709
|
return accentLine ? 'accent-' + accentLine : '';
|
|
675
|
-
},
|
|
710
|
+
}, /* @ts-ignore */
|
|
711
|
+
...(ngDevMode ? [{ debugName: "accentLine" }] : /* istanbul ignore next */ []));
|
|
676
712
|
ngOnChanges(changes) {
|
|
677
713
|
if (changes.widgetConfig) {
|
|
678
714
|
const options = {
|
|
@@ -952,13 +988,19 @@ class SiWidgetHostComponent {
|
|
|
952
988
|
}
|
|
953
989
|
});
|
|
954
990
|
}
|
|
955
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
956
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
991
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
992
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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 }, 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 <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.elevation-2]=\"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 : null\"\n [attr.aria-description]=\"editable() ? (a11yWidgetDescription | translate) : null\"\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]=\"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 <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer) {\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:0 0 8px var(--element-box-shadow-color-1),0 8px 8px var(--element-box-shadow-color-2)!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:6px!important;inset-inline-end:6px!important}.resize-handle{inset-block-end:6px;color:var(--element-ui-2);pointer-events:none;position:absolute;inset-inline-end:6px;text-align:center;z-index:10}.draggable-overlay{inset:8px;position:absolute;z-index:100}\n"], dependencies: [{ kind: "component", type: SiDashboardCardComponent, selector: "si-dashboard-card", inputs: ["restoreText", "expandText", "enableExpandInteraction", "showMenubar"], outputs: ["expandChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
957
993
|
}
|
|
958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetHostComponent, decorators: [{
|
|
959
995
|
type: Component,
|
|
960
|
-
args: [{ selector: 'si-widget-host', imports: [SiDashboardCardComponent, NgTemplateOutlet, SiTranslatePipe],
|
|
961
|
-
class: 'grid-stack-item'
|
|
996
|
+
args: [{ selector: 'si-widget-host', imports: [SiDashboardCardComponent, NgTemplateOutlet, SiTranslatePipe], host: {
|
|
997
|
+
class: 'grid-stack-item',
|
|
998
|
+
// In non-edit mode, expose each widget as a labeled list item so screen
|
|
999
|
+
// readers group the widgets and let users jump between them. In edit mode
|
|
1000
|
+
// the inner card carries the interactive `application` role instead.
|
|
1001
|
+
'[attr.role]': "editable() ? null : 'listitem'",
|
|
1002
|
+
'[attr.aria-roledescription]': "editable() ? null : 'widget'",
|
|
1003
|
+
'[attr.aria-label]': 'editable() || !widgetAriaLabel() ? null : widgetAriaLabel()'
|
|
962
1004
|
}, 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 <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.elevation-2]=\"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 : null\"\n [attr.aria-description]=\"editable() ? (a11yWidgetDescription | translate) : null\"\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]=\"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 <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer) {\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:0 0 8px var(--element-box-shadow-color-1),0 8px 8px var(--element-box-shadow-color-2)!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:6px!important;inset-inline-end:6px!important}.resize-handle{inset-block-end:6px;color:var(--element-ui-2);pointer-events:none;position:absolute;inset-inline-end:6px;text-align:center;z-index:10}.draggable-overlay{inset:8px;position:absolute;z-index:100}\n"] }]
|
|
963
1005
|
}], 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 }] }], 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 }] }] } });
|
|
964
1006
|
|
|
@@ -972,23 +1014,27 @@ class SiGridstackWrapperComponent {
|
|
|
972
1014
|
*
|
|
973
1015
|
* @defaultValue []
|
|
974
1016
|
*/
|
|
975
|
-
widgetConfigs = input([],
|
|
1017
|
+
widgetConfigs = input([], /* @ts-ignore */
|
|
1018
|
+
...(ngDevMode ? [{ debugName: "widgetConfigs" }] : /* istanbul ignore next */ []));
|
|
976
1019
|
/**
|
|
977
1020
|
* Whenever gridstack allows to drag, resize or delete the grid item
|
|
978
1021
|
*
|
|
979
1022
|
* @defaultValue false
|
|
980
1023
|
*/
|
|
981
|
-
editable = input(false,
|
|
1024
|
+
editable = input(false, /* @ts-ignore */
|
|
1025
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
982
1026
|
/**
|
|
983
1027
|
* Module configuration
|
|
984
1028
|
*/
|
|
985
|
-
gridConfig = input(
|
|
1029
|
+
gridConfig = input(/* @ts-ignore */
|
|
1030
|
+
...(ngDevMode ? [undefined, { debugName: "gridConfig" }] : /* istanbul ignore next */ []));
|
|
986
1031
|
/**
|
|
987
1032
|
* Map of widget id to widget definition, passed through to widget hosts.
|
|
988
1033
|
*
|
|
989
1034
|
* @defaultValue new Map()
|
|
990
1035
|
*/
|
|
991
|
-
widgetCatalogMap = input(new Map(),
|
|
1036
|
+
widgetCatalogMap = input(new Map(), /* @ts-ignore */
|
|
1037
|
+
...(ngDevMode ? [{ debugName: "widgetCatalogMap" }] : /* istanbul ignore next */ []));
|
|
992
1038
|
/**
|
|
993
1039
|
* Emits dashboard grid events.
|
|
994
1040
|
*/
|
|
@@ -1001,8 +1047,11 @@ class SiGridstackWrapperComponent {
|
|
|
1001
1047
|
* Emits the id of a widget instance that shall be edited.
|
|
1002
1048
|
*/
|
|
1003
1049
|
widgetInstanceEdit = output();
|
|
1004
|
-
widgetHosts = viewChildren(SiWidgetHostComponent,
|
|
1005
|
-
|
|
1050
|
+
widgetHosts = viewChildren(SiWidgetHostComponent, /* @ts-ignore */
|
|
1051
|
+
...(ngDevMode ? [{ debugName: "widgetHosts" }] : /* istanbul ignore next */ []));
|
|
1052
|
+
widgetHostsMap = computed(() => new Map(this.widgetHosts().map(host => [host.widgetConfig().id, host])), /* @ts-ignore */
|
|
1053
|
+
...(ngDevMode ? [{ debugName: "widgetHostsMap" }] : /* istanbul ignore next */ []));
|
|
1054
|
+
a11yWidgetsListLabel = t(() => $localize `:@@DASHBOARD.A11Y.WIDGETS_LIST:Dashboard widgets`);
|
|
1006
1055
|
grid;
|
|
1007
1056
|
ngZone = inject(NgZone);
|
|
1008
1057
|
elementRef = inject(ElementRef);
|
|
@@ -1080,12 +1129,12 @@ class SiGridstackWrapperComponent {
|
|
|
1080
1129
|
});
|
|
1081
1130
|
});
|
|
1082
1131
|
}
|
|
1083
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1084
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiGridstackWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1133
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiGridstackWrapperComponent, isStandalone: true, selector: "si-gridstack-wrapper", inputs: { widgetConfigs: { classPropertyName: "widgetConfigs", publicName: "widgetConfigs", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, gridConfig: { classPropertyName: "gridConfig", publicName: "gridConfig", isSignal: true, isRequired: false, transformFunction: null }, widgetCatalogMap: { classPropertyName: "widgetCatalogMap", publicName: "widgetCatalogMap", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gridEvent: "gridEvent", widgetInstanceRemove: "widgetInstanceRemove", widgetInstanceEdit: "widgetInstanceEdit" }, viewQueries: [{ propertyName: "widgetHosts", predicate: SiWidgetHostComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"grid-stack\"\n [attr.role]=\"editable() ? null : 'list'\"\n [attr.aria-label]=\"editable() ? null : (a11yWidgetsListLabel | translate)\"\n>\n @if (grid) {\n @for (item of widgetConfigs(); track item.id) {\n <si-widget-host\n [grid]=\"grid\"\n [editable]=\"editable()\"\n [widgetConfig]=\"item\"\n [componentFactory]=\"widgetCatalogMap().get(item.widgetId)?.componentFactory\"\n (remove)=\"widgetInstanceRemove.emit(item.id)\"\n (edit)=\"widgetInstanceEdit.emit(item)\"\n />\n }\n }\n</div>\n", styles: ["::ng-deep .si-grid-stack-placeholder{background-color:var(--element-base-information);opacity:.3}:host{display:flex;flex:1 1 0;flex-direction:column;margin-inline-start:-8px;margin-inline-end:-8px;margin-block-start:-8px}.grid-stack{display:block}\n"], dependencies: [{ kind: "component", type: SiWidgetHostComponent, selector: "si-widget-host", inputs: ["widgetConfig", "grid", "componentFactory", "editable"], outputs: ["remove", "edit", "gridEvent"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
1085
1134
|
}
|
|
1086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiGridstackWrapperComponent, decorators: [{
|
|
1087
1136
|
type: Component,
|
|
1088
|
-
args: [{ selector: 'si-gridstack-wrapper', imports: [SiWidgetHostComponent
|
|
1137
|
+
args: [{ selector: 'si-gridstack-wrapper', imports: [SiWidgetHostComponent, SiTranslatePipe], template: "<div\n class=\"grid-stack\"\n [attr.role]=\"editable() ? null : 'list'\"\n [attr.aria-label]=\"editable() ? null : (a11yWidgetsListLabel | translate)\"\n>\n @if (grid) {\n @for (item of widgetConfigs(); track item.id) {\n <si-widget-host\n [grid]=\"grid\"\n [editable]=\"editable()\"\n [widgetConfig]=\"item\"\n [componentFactory]=\"widgetCatalogMap().get(item.widgetId)?.componentFactory\"\n (remove)=\"widgetInstanceRemove.emit(item.id)\"\n (edit)=\"widgetInstanceEdit.emit(item)\"\n />\n }\n }\n</div>\n", styles: ["::ng-deep .si-grid-stack-placeholder{background-color:var(--element-base-information);opacity:.3}:host{display:flex;flex:1 1 0;flex-direction:column;margin-inline-start:-8px;margin-inline-end:-8px;margin-block-start:-8px}.grid-stack{display:block}\n"] }]
|
|
1089
1138
|
}], propDecorators: { widgetConfigs: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfigs", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], gridConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridConfig", required: false }] }], widgetCatalogMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetCatalogMap", required: false }] }], gridEvent: [{ type: i0.Output, args: ["gridEvent"] }], widgetInstanceRemove: [{ type: i0.Output, args: ["widgetInstanceRemove"] }], widgetInstanceEdit: [{ type: i0.Output, args: ["widgetInstanceEdit"] }], widgetHosts: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SiWidgetHostComponent), { isSignal: true }] }] } });
|
|
1090
1139
|
|
|
1091
1140
|
/**
|
|
@@ -1099,10 +1148,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1099
1148
|
*/
|
|
1100
1149
|
class SiWidgetEditorBase {
|
|
1101
1150
|
/** Indicates if the current config is valid or not. */
|
|
1102
|
-
invalidConfig = signal(false,
|
|
1151
|
+
invalidConfig = signal(false, /* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "invalidConfig" }] : /* istanbul ignore next */ []));
|
|
1103
1153
|
/** Marks the widget configuration as modified. */
|
|
1104
|
-
widgetConfigModified = signal(false,
|
|
1105
|
-
|
|
1154
|
+
widgetConfigModified = signal(false, /* @ts-ignore */
|
|
1155
|
+
...(ngDevMode ? [{ debugName: "widgetConfigModified" }] : /* istanbul ignore next */ []));
|
|
1156
|
+
editorWizardState = signal(undefined, /* @ts-ignore */
|
|
1157
|
+
...(ngDevMode ? [{ debugName: "editorWizardState" }] : /* istanbul ignore next */ []));
|
|
1106
1158
|
widgetInstanceEditor;
|
|
1107
1159
|
subscriptions = [];
|
|
1108
1160
|
editorHost = viewChild.required('editorHost', { read: ViewContainerRef });
|
|
@@ -1158,10 +1210,10 @@ class SiWidgetEditorBase {
|
|
|
1158
1210
|
this.widgetConfigModified.set(statusChanges.modified);
|
|
1159
1211
|
}
|
|
1160
1212
|
}
|
|
1161
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1162
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
1213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetEditorBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1214
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.5", type: SiWidgetEditorBase, isStandalone: true, viewQueries: [{ propertyName: "editorHost", first: true, predicate: ["editorHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0 });
|
|
1163
1215
|
}
|
|
1164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetEditorBase, decorators: [{
|
|
1165
1217
|
type: Directive
|
|
1166
1218
|
}], propDecorators: { editorHost: [{ type: i0.ViewChild, args: ['editorHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
1167
1219
|
|
|
@@ -1180,12 +1232,14 @@ class SiWidgetInstanceEditorDialogComponent extends SiWidgetEditorBase {
|
|
|
1180
1232
|
* Input for the widget instance configuration. It is used to populate the
|
|
1181
1233
|
* widget editor.
|
|
1182
1234
|
*/
|
|
1183
|
-
widgetConfig = model.required(
|
|
1235
|
+
widgetConfig = model.required(/* @ts-ignore */
|
|
1236
|
+
...(ngDevMode ? [{ debugName: "widgetConfig" }] : /* istanbul ignore next */ []));
|
|
1184
1237
|
/**
|
|
1185
1238
|
* Input for the widget definition. It is required to retrieve the component
|
|
1186
1239
|
* factory to instantiate the widget editor.
|
|
1187
1240
|
*/
|
|
1188
|
-
widget = input.required(
|
|
1241
|
+
widget = input.required(/* @ts-ignore */
|
|
1242
|
+
...(ngDevMode ? [{ debugName: "widget" }] : /* istanbul ignore next */ []));
|
|
1189
1243
|
/**
|
|
1190
1244
|
* Emits the edited widget instance configuration if the user confirms by
|
|
1191
1245
|
* saving, or `undefined` if the user cancels the dialog.
|
|
@@ -1195,7 +1249,8 @@ class SiWidgetInstanceEditorDialogComponent extends SiWidgetEditorBase {
|
|
|
1195
1249
|
* Emits when the editor instantiation is completed.
|
|
1196
1250
|
*/
|
|
1197
1251
|
editorSetupCompleted = output();
|
|
1198
|
-
showNextButton = computed(() => this.editorWizardState() !== undefined ? true : false,
|
|
1252
|
+
showNextButton = computed(() => this.editorWizardState() !== undefined ? true : false, /* @ts-ignore */
|
|
1253
|
+
...(ngDevMode ? [{ debugName: "showNextButton" }] : /* istanbul ignore next */ []));
|
|
1199
1254
|
disableNextButton = computed(() => {
|
|
1200
1255
|
const wizardState = this.editorWizardState();
|
|
1201
1256
|
if (!wizardState) {
|
|
@@ -1210,12 +1265,15 @@ class SiWidgetInstanceEditorDialogComponent extends SiWidgetEditorBase {
|
|
|
1210
1265
|
else {
|
|
1211
1266
|
return false;
|
|
1212
1267
|
}
|
|
1213
|
-
},
|
|
1214
|
-
|
|
1268
|
+
}, /* @ts-ignore */
|
|
1269
|
+
...(ngDevMode ? [{ debugName: "disableNextButton" }] : /* istanbul ignore next */ []));
|
|
1270
|
+
showPreviousButton = computed(() => !!this.editorWizardState(), /* @ts-ignore */
|
|
1271
|
+
...(ngDevMode ? [{ debugName: "showPreviousButton" }] : /* istanbul ignore next */ []));
|
|
1215
1272
|
disablePreviousButton = computed(() => {
|
|
1216
1273
|
const wizardState = this.editorWizardState();
|
|
1217
1274
|
return wizardState ? !wizardState.hasPrevious : true;
|
|
1218
|
-
},
|
|
1275
|
+
}, /* @ts-ignore */
|
|
1276
|
+
...(ngDevMode ? [{ debugName: "disablePreviousButton" }] : /* istanbul ignore next */ []));
|
|
1219
1277
|
labelSave = t(() => $localize `:@@DASHBOARD.WIDGET_EDITOR_DIALOG.SAVE:Save`);
|
|
1220
1278
|
labelCancel = t(() => $localize `:@@DASHBOARD.WIDGET_EDITOR_DIALOG.CANCEL:Cancel`);
|
|
1221
1279
|
labelPrevious = t(() => $localize `:@@DASHBOARD.WIDGET_EDITOR_DIALOG.PREVIOUS:Previous`);
|
|
@@ -1285,12 +1343,12 @@ class SiWidgetInstanceEditorDialogComponent extends SiWidgetEditorBase {
|
|
|
1285
1343
|
}
|
|
1286
1344
|
this.closed.emit(this.widgetConfig());
|
|
1287
1345
|
}
|
|
1288
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1289
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1346
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetInstanceEditorDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1347
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiWidgetInstanceEditorDialogComponent, isStandalone: true, selector: "si-widget-instance-editor-dialog", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null }, widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { widgetConfig: "widgetConfigChange", closed: "closed", editorSetupCompleted: "editorSetupCompleted" }, usesInheritance: true, ngImport: i0, template: "<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n <ng-container #editorHost />\n</div>\n\n<div class=\"editor-footer px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n\n @if (showPreviousButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disablePreviousButton()\"\n (click)=\"onPrevious()\"\n >{{ labelPrevious | translate }}</button\n >\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n\n <button type=\"button\" class=\"btn btn-primary\" [disabled]=\"invalidConfig()\" (click)=\"onSave()\">{{\n labelSave | translate\n }}</button>\n</div>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column;margin-inline:-4px;margin-block-start:-4px}.editor-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.editor-footer>*{margin-inline-start:16px}\n"], dependencies: [{ kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1290
1348
|
}
|
|
1291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetInstanceEditorDialogComponent, decorators: [{
|
|
1292
1350
|
type: Component,
|
|
1293
|
-
args: [{ selector: 'si-widget-instance-editor-dialog', imports: [SiTranslatePipe], changeDetection: ChangeDetectionStrategy.
|
|
1351
|
+
args: [{ selector: 'si-widget-instance-editor-dialog', imports: [SiTranslatePipe], changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n <ng-container #editorHost />\n</div>\n\n<div class=\"editor-footer px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n\n @if (showPreviousButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disablePreviousButton()\"\n (click)=\"onPrevious()\"\n >{{ labelPrevious | translate }}</button\n >\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n\n <button type=\"button\" class=\"btn btn-primary\" [disabled]=\"invalidConfig()\" (click)=\"onSave()\">{{\n labelSave | translate\n }}</button>\n</div>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column;margin-inline:-4px;margin-block-start:-4px}.editor-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.editor-footer>*{margin-inline-start:16px}\n"] }]
|
|
1294
1352
|
}], propDecorators: { widgetConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfig", required: true }] }, { type: i0.Output, args: ["widgetConfigChange"] }], widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], editorSetupCompleted: [{ type: i0.Output, args: ["editorSetupCompleted"] }] } });
|
|
1295
1353
|
|
|
1296
1354
|
/**
|
|
@@ -1312,27 +1370,32 @@ class SiGridComponent {
|
|
|
1312
1370
|
*
|
|
1313
1371
|
* @defaultValue inject(SI_DASHBOARD_CONFIGURATION)?.grid
|
|
1314
1372
|
*/
|
|
1315
|
-
gridConfig = input(inject(SI_DASHBOARD_CONFIGURATION)?.grid,
|
|
1373
|
+
gridConfig = input(inject(SI_DASHBOARD_CONFIGURATION)?.grid, /* @ts-ignore */
|
|
1374
|
+
...(ngDevMode ? [{ debugName: "gridConfig" }] : /* istanbul ignore next */ []));
|
|
1316
1375
|
/**
|
|
1317
1376
|
* Sets the grid into editable mode, in which the widget instances can be moved,
|
|
1318
1377
|
* resized, removed or new ones added.
|
|
1319
1378
|
*
|
|
1320
1379
|
* @defaultValue false
|
|
1321
1380
|
*/
|
|
1322
|
-
editable = model(false,
|
|
1381
|
+
editable = model(false, /* @ts-ignore */
|
|
1382
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
1323
1383
|
/**
|
|
1324
1384
|
* An optional, but recommended dashboard id that is used in persistence and passed
|
|
1325
1385
|
* to the widget store for saving and loading data.
|
|
1326
1386
|
*/
|
|
1327
|
-
dashboardId = input(
|
|
1387
|
+
dashboardId = input(/* @ts-ignore */
|
|
1388
|
+
...(ngDevMode ? [undefined, { debugName: "dashboardId" }] : /* istanbul ignore next */ []));
|
|
1328
1389
|
/**
|
|
1329
1390
|
* Provides the available widgets to the grid. When loading the widget configurations from
|
|
1330
1391
|
* the storage, we need to have the widget definition available to be able to create the widget
|
|
1331
1392
|
* instances on the grid.
|
|
1332
1393
|
*
|
|
1333
1394
|
* @defaultValue [] */
|
|
1334
|
-
widgetCatalog = input([],
|
|
1335
|
-
|
|
1395
|
+
widgetCatalog = input([], /* @ts-ignore */
|
|
1396
|
+
...(ngDevMode ? [{ debugName: "widgetCatalog" }] : /* istanbul ignore next */ []));
|
|
1397
|
+
widgetCatalogMap = computed(() => new Map(this.widgetCatalog().map(widget => [widget.id, widget])), /* @ts-ignore */
|
|
1398
|
+
...(ngDevMode ? [{ debugName: "widgetCatalogMap" }] : /* istanbul ignore next */ []));
|
|
1336
1399
|
/**
|
|
1337
1400
|
* When the user clicks edit on a widget instance, an editor need to appear and the
|
|
1338
1401
|
* widget editor component need to be loaded. When the grid is used standalone, it
|
|
@@ -1343,18 +1406,21 @@ class SiGridComponent {
|
|
|
1343
1406
|
* widget `edit` action.
|
|
1344
1407
|
*
|
|
1345
1408
|
* @defaultValue false */
|
|
1346
|
-
emitWidgetInstanceEditEvents = input(false,
|
|
1409
|
+
emitWidgetInstanceEditEvents = input(false, /* @ts-ignore */
|
|
1410
|
+
...(ngDevMode ? [{ debugName: "emitWidgetInstanceEditEvents" }] : /* istanbul ignore next */ []));
|
|
1347
1411
|
/**
|
|
1348
1412
|
* Option to turn off the loading spinner on save and load operations.
|
|
1349
1413
|
*
|
|
1350
1414
|
* @defaultValue false
|
|
1351
1415
|
*/
|
|
1352
|
-
hideProgressIndicator = input(false,
|
|
1416
|
+
hideProgressIndicator = input(false, /* @ts-ignore */
|
|
1417
|
+
...(ngDevMode ? [{ debugName: "hideProgressIndicator" }] : /* istanbul ignore next */ []));
|
|
1353
1418
|
/**
|
|
1354
1419
|
* Option to configure a custom widget instance editor dialog component. The component provides the
|
|
1355
1420
|
* editor hosting and the buttons to save and cancel.
|
|
1356
1421
|
*/
|
|
1357
|
-
widgetInstanceEditorDialogComponent = input(
|
|
1422
|
+
widgetInstanceEditorDialogComponent = input(/* @ts-ignore */
|
|
1423
|
+
...(ngDevMode ? [undefined, { debugName: "widgetInstanceEditorDialogComponent" }] : /* istanbul ignore next */ []));
|
|
1358
1424
|
/**
|
|
1359
1425
|
* Emits the modification state of the grid. It is `unmodified` when the visible state
|
|
1360
1426
|
* is equal to the loaded state from the widget storage. When the user modifies the dashboard by
|
|
@@ -1651,12 +1717,12 @@ class SiGridComponent {
|
|
|
1651
1717
|
this.isModified.emit(this.modified);
|
|
1652
1718
|
}
|
|
1653
1719
|
}
|
|
1654
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1655
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1721
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiGridComponent, isStandalone: true, selector: "si-grid", inputs: { gridConfig: { classPropertyName: "gridConfig", publicName: "gridConfig", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", 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 }, emitWidgetInstanceEditEvents: { classPropertyName: "emitWidgetInstanceEditEvents", publicName: "emitWidgetInstanceEditEvents", isSignal: true, isRequired: false, transformFunction: null }, hideProgressIndicator: { classPropertyName: "hideProgressIndicator", publicName: "hideProgressIndicator", isSignal: true, isRequired: false, transformFunction: null }, widgetInstanceEditorDialogComponent: { classPropertyName: "widgetInstanceEditorDialogComponent", publicName: "widgetInstanceEditorDialogComponent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { editable: "editableChange", isModified: "isModified", widgetInstanceEdit: "widgetInstanceEdit" }, viewQueries: [{ propertyName: "gridStackWrapper", first: true, predicate: SiGridstackWrapperComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (showEmptyState) {\n <ng-content select=\"[empty-state]\" />\n}\n<si-gridstack-wrapper\n [widgetConfigs]=\"(visibleWidgetInstances$ | async) ?? []\"\n [gridConfig]=\"gridConfig()\"\n [editable]=\"editable()\"\n [widgetCatalogMap]=\"widgetCatalogMap()\"\n [siLoading]=\"!hideProgressIndicator() && initialLoad && (isLoading | async)!\"\n [blocking]=\"false\"\n (gridEvent)=\"handleGridEvent($event)\"\n (widgetInstanceRemove)=\"removeWidgetInstance($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n/>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column}::ng-deep .grid-stack-animate,::ng-deep .grid-stack-animate .grid-stack-item{transition-property:inset-inline-start,inset-block-start}\n"], dependencies: [{ kind: "component", type: SiGridstackWrapperComponent, selector: "si-gridstack-wrapper", inputs: ["widgetConfigs", "editable", "gridConfig", "widgetCatalogMap"], outputs: ["gridEvent", "widgetInstanceRemove", "widgetInstanceEdit"] }, { kind: "directive", type: SiLoadingSpinnerDirective, selector: "[siLoading]", inputs: ["siLoading", "blocking", "initialDelay"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1656
1722
|
}
|
|
1657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiGridComponent, decorators: [{
|
|
1658
1724
|
type: Component,
|
|
1659
|
-
args: [{ selector: 'si-grid', imports: [SiGridstackWrapperComponent, SiLoadingSpinnerDirective, AsyncPipe], changeDetection: ChangeDetectionStrategy.
|
|
1725
|
+
args: [{ selector: 'si-grid', imports: [SiGridstackWrapperComponent, SiLoadingSpinnerDirective, AsyncPipe], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (showEmptyState) {\n <ng-content select=\"[empty-state]\" />\n}\n<si-gridstack-wrapper\n [widgetConfigs]=\"(visibleWidgetInstances$ | async) ?? []\"\n [gridConfig]=\"gridConfig()\"\n [editable]=\"editable()\"\n [widgetCatalogMap]=\"widgetCatalogMap()\"\n [siLoading]=\"!hideProgressIndicator() && initialLoad && (isLoading | async)!\"\n [blocking]=\"false\"\n (gridEvent)=\"handleGridEvent($event)\"\n (widgetInstanceRemove)=\"removeWidgetInstance($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n/>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column}::ng-deep .grid-stack-animate,::ng-deep .grid-stack-animate .grid-stack-item{transition-property:inset-inline-start,inset-block-start}\n"] }]
|
|
1660
1726
|
}], propDecorators: { gridConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridConfig", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }, { type: i0.Output, args: ["editableChange"] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], widgetCatalog: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetCatalog", required: false }] }], emitWidgetInstanceEditEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "emitWidgetInstanceEditEvents", required: false }] }], hideProgressIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideProgressIndicator", required: false }] }], widgetInstanceEditorDialogComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetInstanceEditorDialogComponent", required: false }] }], isModified: [{ type: i0.Output, args: ["isModified"] }], widgetInstanceEdit: [{ type: i0.Output, args: ["widgetInstanceEdit"] }], gridStackWrapper: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiGridstackWrapperComponent), { isSignal: true }] }] } });
|
|
1661
1727
|
|
|
1662
1728
|
/**
|
|
@@ -1696,7 +1762,8 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
1696
1762
|
* t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)
|
|
1697
1763
|
* ```
|
|
1698
1764
|
*/
|
|
1699
|
-
searchPlaceholder = input(t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`),
|
|
1765
|
+
searchPlaceholder = input(t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`), /* @ts-ignore */
|
|
1766
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1700
1767
|
/**
|
|
1701
1768
|
* Emits when the catalog is `closed`, either by canceling or by adding or saving
|
|
1702
1769
|
* a widget configuration. On cancel `undefined` is emitted, otherwise the related
|
|
@@ -1709,7 +1776,8 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
1709
1776
|
* @internal
|
|
1710
1777
|
* @defaultValue 'list'
|
|
1711
1778
|
*/
|
|
1712
|
-
view = signal('list',
|
|
1779
|
+
view = signal('list', /* @ts-ignore */
|
|
1780
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
1713
1781
|
/**
|
|
1714
1782
|
* Property to provide the available widgets to the catalog. The flexible
|
|
1715
1783
|
* dashboard creates the catalog by Angular's `createComponent()` method
|
|
@@ -1726,9 +1794,11 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
1726
1794
|
* Array used to hold the search result on the widget catalog.
|
|
1727
1795
|
* @defaultValue [] */
|
|
1728
1796
|
filteredWidgetCatalog = [];
|
|
1729
|
-
selected = signal(undefined,
|
|
1797
|
+
selected = signal(undefined, /* @ts-ignore */
|
|
1798
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
1730
1799
|
widgetConfig;
|
|
1731
|
-
hasEditor = computed(() => !!this.selected()?.componentFactory.editorComponentName,
|
|
1800
|
+
hasEditor = computed(() => !!this.selected()?.componentFactory.editorComponentName, /* @ts-ignore */
|
|
1801
|
+
...(ngDevMode ? [{ debugName: "hasEditor" }] : /* istanbul ignore next */ []));
|
|
1732
1802
|
translateService = injectSiTranslateService();
|
|
1733
1803
|
labelCancel = t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.CANCEL:Cancel`);
|
|
1734
1804
|
labelPrevious = t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.PREVIOUS:Previous`);
|
|
@@ -1740,10 +1810,14 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
1740
1810
|
labelDialogMessage = t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE:The widget configuration changed. Do you want to discard the changes?`);
|
|
1741
1811
|
labelDialogDiscard = t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD:Discard`);
|
|
1742
1812
|
labelWidgetCatalogList = t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.WIDGET_CATALOG_LIST:Widget catalog list`);
|
|
1743
|
-
showAddButton = computed(() => this.view() === 'list' ? !this.hasEditor() : true,
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1813
|
+
showAddButton = computed(() => this.view() === 'list' ? !this.hasEditor() : true, /* @ts-ignore */
|
|
1814
|
+
...(ngDevMode ? [{ debugName: "showAddButton" }] : /* istanbul ignore next */ []));
|
|
1815
|
+
showNextButton = computed(() => this.view() === 'list' ? this.hasEditor() : this.editorWizardState() !== undefined, /* @ts-ignore */
|
|
1816
|
+
...(ngDevMode ? [{ debugName: "showNextButton" }] : /* istanbul ignore next */ []));
|
|
1817
|
+
showPreviousButton = computed(() => this.view() === 'editor', /* @ts-ignore */
|
|
1818
|
+
...(ngDevMode ? [{ debugName: "showPreviousButton" }] : /* istanbul ignore next */ []));
|
|
1819
|
+
disableAddButton = computed(() => !this.selected() || this.invalidConfig(), /* @ts-ignore */
|
|
1820
|
+
...(ngDevMode ? [{ debugName: "disableAddButton" }] : /* istanbul ignore next */ []));
|
|
1747
1821
|
disableNextButton = computed(() => {
|
|
1748
1822
|
const wizardState = this.editorWizardState();
|
|
1749
1823
|
if (this.view() === 'list') {
|
|
@@ -1761,9 +1835,11 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
1761
1835
|
else {
|
|
1762
1836
|
return false;
|
|
1763
1837
|
}
|
|
1764
|
-
},
|
|
1838
|
+
}, /* @ts-ignore */
|
|
1839
|
+
...(ngDevMode ? [{ debugName: "disableNextButton" }] : /* istanbul ignore next */ []));
|
|
1765
1840
|
dialogService = inject(SiActionDialogService);
|
|
1766
|
-
widgetCdkListbox = viewChild((CdkListbox),
|
|
1841
|
+
widgetCdkListbox = viewChild((CdkListbox), /* @ts-ignore */
|
|
1842
|
+
...(ngDevMode ? [{ debugName: "widgetCdkListbox" }] : /* istanbul ignore next */ []));
|
|
1767
1843
|
ngOnInit() {
|
|
1768
1844
|
this.filteredWidgetCatalog = this.widgetCatalog;
|
|
1769
1845
|
if (this.widgetCatalog.length > 0) {
|
|
@@ -1898,10 +1974,10 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
1898
1974
|
});
|
|
1899
1975
|
}
|
|
1900
1976
|
}
|
|
1901
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1902
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetCatalogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1978
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiWidgetCatalogComponent, isStandalone: true, selector: "si-widget-catalog", inputs: { searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "widgetCdkListbox", first: true, predicate: (CdkListbox), descendants: true, isSignal: true }], 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\">\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 bg-base-1 rounded-2\">\n @if (filteredWidgetCatalog.length > 0) {\n <span id=\"widget-catalog-list-description\" class=\"visually-hidden\">\n {{ labelWidgetCatalogList | translate }}\n </span>\n <ul\n class=\"si-layout-fixed-height list-group overflow-auto mb-0\"\n aria-labelledby=\"widget-catalog-list-description\"\n cdkListbox\n [cdkListboxValue]=\"[]\"\n (cdkListboxValueChange)=\"selectWidget($event.value[0])\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-group-item list-group-item-action d-flex\"\n [cdkOption]=\"widget\"\n [class.active]=\"selected() === widget\"\n >\n <si-circle-status class=\"my-n4 me-5\" [icon]=\"widget.iconClass\" />\n <div class=\"d-flex flex-column align-items-start align-self-center\">\n <span class=\"si-h5\">{{ widget.name | translate }}</span>\n <span class=\"si-body\">{{ widget.description?.trim() | translate }}</span>\n </div>\n </li>\n }\n </ul>\n } @else {\n <div>\n <si-empty-state icon=\"element-report\" [heading]=\"labelEmpty\" />\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:-4px;margin-block-start:-4px}.list-group-item{cursor:pointer}.catalog-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.catalog-footer>*{margin-inline-start:16px}\n"], dependencies: [{ kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "tabbable", "value", "readonly", "colorVariant", "disabled", "maxlength", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "component", type: SiCircleStatusComponent, selector: "si-circle-status", inputs: ["status", "color", "icon", "size", "eventOut", "eventIcon", "blink", "blinkPulse", "ariaLabel"] }, { 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 });
|
|
1903
1979
|
}
|
|
1904
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetCatalogComponent, decorators: [{
|
|
1905
1981
|
type: Component,
|
|
1906
1982
|
args: [{ selector: 'si-widget-catalog', imports: [
|
|
1907
1983
|
SiSearchBarComponent,
|
|
@@ -1910,7 +1986,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1910
1986
|
SiTranslatePipe,
|
|
1911
1987
|
CdkListbox,
|
|
1912
1988
|
CdkOption
|
|
1913
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
1989
|
+
], changeDetection: ChangeDetectionStrategy.Eager, 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\">\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 bg-base-1 rounded-2\">\n @if (filteredWidgetCatalog.length > 0) {\n <span id=\"widget-catalog-list-description\" class=\"visually-hidden\">\n {{ labelWidgetCatalogList | translate }}\n </span>\n <ul\n class=\"si-layout-fixed-height list-group overflow-auto mb-0\"\n aria-labelledby=\"widget-catalog-list-description\"\n cdkListbox\n [cdkListboxValue]=\"[]\"\n (cdkListboxValueChange)=\"selectWidget($event.value[0])\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-group-item list-group-item-action d-flex\"\n [cdkOption]=\"widget\"\n [class.active]=\"selected() === widget\"\n >\n <si-circle-status class=\"my-n4 me-5\" [icon]=\"widget.iconClass\" />\n <div class=\"d-flex flex-column align-items-start align-self-center\">\n <span class=\"si-h5\">{{ widget.name | translate }}</span>\n <span class=\"si-body\">{{ widget.description?.trim() | translate }}</span>\n </div>\n </li>\n }\n </ul>\n } @else {\n <div>\n <si-empty-state icon=\"element-report\" [heading]=\"labelEmpty\" />\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:-4px;margin-block-start:-4px}.list-group-item{cursor:pointer}.catalog-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.catalog-footer>*{margin-inline-start:16px}\n"] }]
|
|
1914
1990
|
}], propDecorators: { searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], widgetCdkListbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkListbox), { isSignal: true }] }] } });
|
|
1915
1991
|
|
|
1916
1992
|
/**
|
|
@@ -1927,62 +2003,73 @@ class SiFlexibleDashboardComponent {
|
|
|
1927
2003
|
*
|
|
1928
2004
|
* @defaultValue false
|
|
1929
2005
|
*/
|
|
1930
|
-
editable = model(false,
|
|
2006
|
+
editable = model(false, /* @ts-ignore */
|
|
2007
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
1931
2008
|
/**
|
|
1932
2009
|
* Heading for the dashboard.
|
|
1933
2010
|
*/
|
|
1934
|
-
heading = input(
|
|
2011
|
+
heading = input(/* @ts-ignore */
|
|
2012
|
+
...(ngDevMode ? [undefined, { debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
1935
2013
|
/**
|
|
1936
2014
|
* Optionally, provide a custom subclass of the SiWidgetCatalogComponent
|
|
1937
2015
|
* to use your own catalog component.
|
|
1938
2016
|
*/
|
|
1939
|
-
widgetCatalogComponent = input(
|
|
2017
|
+
widgetCatalogComponent = input(/* @ts-ignore */
|
|
2018
|
+
...(ngDevMode ? [undefined, { debugName: "widgetCatalogComponent" }] : /* istanbul ignore next */ []));
|
|
1940
2019
|
/**
|
|
1941
2020
|
* Optionally, provide a custom subclass of the {@link SiWidgetInstanceEditorDialogComponent}
|
|
1942
2021
|
* to use your own implementation.
|
|
1943
2022
|
*/
|
|
1944
|
-
widgetInstanceEditorDialogComponent = input(
|
|
2023
|
+
widgetInstanceEditorDialogComponent = input(/* @ts-ignore */
|
|
2024
|
+
...(ngDevMode ? [undefined, { debugName: "widgetInstanceEditorDialogComponent" }] : /* istanbul ignore next */ []));
|
|
1945
2025
|
/**
|
|
1946
2026
|
* Optionally, but it is recommended to include an id for a dashboard.
|
|
1947
2027
|
* The id is utilized in the persistence calls on the {@link SiWidgetStorage}.
|
|
1948
2028
|
*/
|
|
1949
|
-
dashboardId = input(
|
|
2029
|
+
dashboardId = input(/* @ts-ignore */
|
|
2030
|
+
...(ngDevMode ? [undefined, { debugName: "dashboardId" }] : /* istanbul ignore next */ []));
|
|
1950
2031
|
/**
|
|
1951
2032
|
* Sets the available widgets for the widget catalog to the dashboard.
|
|
1952
2033
|
*
|
|
1953
2034
|
* @defaultValue [] */
|
|
1954
|
-
widgetCatalog = input([],
|
|
2035
|
+
widgetCatalog = input([], /* @ts-ignore */
|
|
2036
|
+
...(ngDevMode ? [{ debugName: "widgetCatalog" }] : /* istanbul ignore next */ []));
|
|
1955
2037
|
/**
|
|
1956
2038
|
* Option to remove the add widget instance button from the primary toolbar.
|
|
1957
2039
|
*
|
|
1958
2040
|
* @defaultValue false
|
|
1959
2041
|
*/
|
|
1960
|
-
hideAddWidgetInstanceButton = input(false,
|
|
2042
|
+
hideAddWidgetInstanceButton = input(false, /* @ts-ignore */
|
|
2043
|
+
...(ngDevMode ? [{ debugName: "hideAddWidgetInstanceButton" }] : /* istanbul ignore next */ []));
|
|
1961
2044
|
/**
|
|
1962
2045
|
* Option to hide the dashboard edit button.
|
|
1963
2046
|
*
|
|
1964
2047
|
* @defaultValue false
|
|
1965
2048
|
*/
|
|
1966
|
-
hideEditButton = input(false,
|
|
2049
|
+
hideEditButton = input(false, /* @ts-ignore */
|
|
2050
|
+
...(ngDevMode ? [{ debugName: "hideEditButton" }] : /* istanbul ignore next */ []));
|
|
1967
2051
|
/**
|
|
1968
2052
|
* Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.
|
|
1969
2053
|
*
|
|
1970
2054
|
* @defaultValue false
|
|
1971
2055
|
*/
|
|
1972
|
-
showEditButtonLabel = input(false,
|
|
2056
|
+
showEditButtonLabel = input(false, /* @ts-ignore */
|
|
2057
|
+
...(ngDevMode ? [{ debugName: "showEditButtonLabel" }] : /* istanbul ignore next */ []));
|
|
1973
2058
|
/**
|
|
1974
2059
|
* Option to turn off the loading spinner on save and load operations.
|
|
1975
2060
|
*
|
|
1976
2061
|
* @defaultValue false
|
|
1977
2062
|
*/
|
|
1978
|
-
hideProgressIndicator = input(false,
|
|
2063
|
+
hideProgressIndicator = input(false, /* @ts-ignore */
|
|
2064
|
+
...(ngDevMode ? [{ debugName: "hideProgressIndicator" }] : /* istanbul ignore next */ []));
|
|
1979
2065
|
/**
|
|
1980
2066
|
* Option to configure a dashboard instance. Default is the optional value from
|
|
1981
2067
|
* the {@link SI_DASHBOARD_CONFIGURATION}.
|
|
1982
2068
|
*
|
|
1983
2069
|
* @defaultValue inject(SI_DASHBOARD_CONFIGURATION)
|
|
1984
2070
|
*/
|
|
1985
|
-
config = input(inject(SI_DASHBOARD_CONFIGURATION),
|
|
2071
|
+
config = input(inject(SI_DASHBOARD_CONFIGURATION), /* @ts-ignore */
|
|
2072
|
+
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
1986
2073
|
/**
|
|
1987
2074
|
* Placeholder text for the search input field in the widget catalog.
|
|
1988
2075
|
*
|
|
@@ -1991,17 +2078,20 @@ class SiFlexibleDashboardComponent {
|
|
|
1991
2078
|
* t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)
|
|
1992
2079
|
* ```
|
|
1993
2080
|
*/
|
|
1994
|
-
searchPlaceholder = input(t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`),
|
|
2081
|
+
searchPlaceholder = input(t(() => $localize `:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`), /* @ts-ignore */
|
|
2082
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1995
2083
|
/**
|
|
1996
2084
|
* Primary action menu items shown in the edit mode of the dashboard.
|
|
1997
2085
|
* @defaultValue []
|
|
1998
2086
|
*/
|
|
1999
|
-
primaryEditActions = input([],
|
|
2087
|
+
primaryEditActions = input([], /* @ts-ignore */
|
|
2088
|
+
...(ngDevMode ? [{ debugName: "primaryEditActions" }] : /* istanbul ignore next */ []));
|
|
2000
2089
|
/**
|
|
2001
2090
|
* Secondary action menu items shown in the edit mode of the dashboard.
|
|
2002
2091
|
* @defaultValue []
|
|
2003
2092
|
*/
|
|
2004
|
-
secondaryEditActions = input([],
|
|
2093
|
+
secondaryEditActions = input([], /* @ts-ignore */
|
|
2094
|
+
...(ngDevMode ? [{ debugName: "secondaryEditActions" }] : /* istanbul ignore next */ []));
|
|
2005
2095
|
/**
|
|
2006
2096
|
* The grid component is the actual container for the widgets.
|
|
2007
2097
|
*/
|
|
@@ -2042,7 +2132,8 @@ class SiFlexibleDashboardComponent {
|
|
|
2042
2132
|
/**
|
|
2043
2133
|
* @returns True, if the dashboard shows its widgets and not a catalog or and editor.
|
|
2044
2134
|
*/
|
|
2045
|
-
isDashboardVisible = computed(() => this.viewState() === 'dashboard',
|
|
2135
|
+
isDashboardVisible = computed(() => this.viewState() === 'dashboard', /* @ts-ignore */
|
|
2136
|
+
...(ngDevMode ? [{ debugName: "isDashboardVisible" }] : /* istanbul ignore next */ []));
|
|
2046
2137
|
/**
|
|
2047
2138
|
* The page title of the dashboard, which is either {@link SiFlexibleDashboardComponent.heading} for the
|
|
2048
2139
|
* default widget view or `DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE` or 'DASHBOARD.WIDGET_LIBRARY.TITLE' when
|
|
@@ -2058,8 +2149,10 @@ class SiFlexibleDashboardComponent {
|
|
|
2058
2149
|
default:
|
|
2059
2150
|
return this.heading();
|
|
2060
2151
|
}
|
|
2061
|
-
},
|
|
2062
|
-
|
|
2152
|
+
}, /* @ts-ignore */
|
|
2153
|
+
...(ngDevMode ? [{ debugName: "pageTitle" }] : /* istanbul ignore next */ []));
|
|
2154
|
+
viewState = signal('dashboard', /* @ts-ignore */
|
|
2155
|
+
...(ngDevMode ? [{ debugName: "viewState" }] : /* istanbul ignore next */ []));
|
|
2063
2156
|
widgetStorage = inject(SI_WIDGET_STORE);
|
|
2064
2157
|
hideAddWidgetInstanceButton$ = new BehaviorSubject(this.hideAddWidgetInstanceButton());
|
|
2065
2158
|
dashboardId$ = new Subject();
|
|
@@ -2182,12 +2275,12 @@ class SiFlexibleDashboardComponent {
|
|
|
2182
2275
|
getWidget(id) {
|
|
2183
2276
|
return this.widgetCatalog().find(widget => widget.id === id);
|
|
2184
2277
|
}
|
|
2185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
2278
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFlexibleDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2279
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", 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 } }, 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 [heading]=\"pageTitle()\" [sticky]=\"true\">\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", 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: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2187
2280
|
}
|
|
2188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiFlexibleDashboardComponent, decorators: [{
|
|
2189
2282
|
type: Component,
|
|
2190
|
-
args: [{ selector: 'si-flexible-dashboard', imports: [SiDashboardComponent, SiDashboardToolbarComponent, SiGridComponent, AsyncPipe], changeDetection: ChangeDetectionStrategy.
|
|
2283
|
+
args: [{ selector: 'si-flexible-dashboard', imports: [SiDashboardComponent, SiDashboardToolbarComponent, SiGridComponent, AsyncPipe], changeDetection: ChangeDetectionStrategy.Eager, template: "<si-dashboard #dashboard [heading]=\"pageTitle()\" [sticky]=\"true\">\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", styles: [":host{display:flex;flex:1 1 0;flex-direction:column}\n"] }]
|
|
2191
2284
|
}], 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 }] }], 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 }] }] } });
|
|
2192
2285
|
|
|
2193
2286
|
/**
|
|
@@ -2215,18 +2308,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
2215
2308
|
*/
|
|
2216
2309
|
class SiWidgetRendererComponent {
|
|
2217
2310
|
/** The configuration of the widget instance to render. */
|
|
2218
|
-
widgetConfig = input.required(
|
|
2311
|
+
widgetConfig = input.required(/* @ts-ignore */
|
|
2312
|
+
...(ngDevMode ? [{ debugName: "widgetConfig" }] : /* istanbul ignore next */ []));
|
|
2219
2313
|
/**
|
|
2220
2314
|
* The {@link Widget} definition used to render the given {@link widgetConfig}.
|
|
2221
2315
|
* It must match the config's `widgetId`.
|
|
2222
2316
|
*/
|
|
2223
|
-
widget = input.required(
|
|
2224
|
-
|
|
2225
|
-
static
|
|
2317
|
+
widget = input.required(/* @ts-ignore */
|
|
2318
|
+
...(ngDevMode ? [{ debugName: "widget" }] : /* istanbul ignore next */ []));
|
|
2319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: SiWidgetRendererComponent, isStandalone: true, selector: "si-widget-renderer", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null }, widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<si-widget-host\n class=\"h-100\"\n [widgetConfig]=\"widgetConfig()\"\n [componentFactory]=\"widget().componentFactory\"\n/>\n", styles: ["si-widget-host ::ng-deep .grid-stack-item-content{flex:1 1 auto;min-inline-size:0;min-block-size:0;padding:0!important}\n"], dependencies: [{ kind: "component", type: SiWidgetHostComponent, selector: "si-widget-host", inputs: ["widgetConfig", "grid", "componentFactory", "editable"], outputs: ["remove", "edit", "gridEvent"] }] });
|
|
2226
2321
|
}
|
|
2227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiWidgetRendererComponent, decorators: [{
|
|
2228
2323
|
type: Component,
|
|
2229
|
-
args: [{ selector: 'si-widget-renderer', imports: [SiWidgetHostComponent],
|
|
2324
|
+
args: [{ selector: 'si-widget-renderer', imports: [SiWidgetHostComponent], template: "<si-widget-host\n class=\"h-100\"\n [widgetConfig]=\"widgetConfig()\"\n [componentFactory]=\"widget().componentFactory\"\n/>\n", styles: ["si-widget-host ::ng-deep .grid-stack-item-content{flex:1 1 auto;min-inline-size:0;min-block-size:0;padding:0!important}\n"] }]
|
|
2230
2325
|
}], propDecorators: { widgetConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfig", required: true }] }], widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: true }] }] } });
|
|
2231
2326
|
|
|
2232
2327
|
/**
|
|
@@ -2265,19 +2360,19 @@ const handleFederatedModuleLoad = ({ loadPromise, factory, componentName, host,
|
|
|
2265
2360
|
* SPDX-License-Identifier: MIT
|
|
2266
2361
|
*/
|
|
2267
2362
|
class SiDashboardsNgModule {
|
|
2268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2269
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2363
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDashboardsNgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2364
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiDashboardsNgModule, imports: [SiFlexibleDashboardComponent,
|
|
2270
2365
|
SiGridComponent,
|
|
2271
2366
|
SiWidgetCatalogComponent,
|
|
2272
2367
|
SiWidgetInstanceEditorDialogComponent], exports: [SiFlexibleDashboardComponent,
|
|
2273
2368
|
SiGridComponent,
|
|
2274
2369
|
SiWidgetCatalogComponent,
|
|
2275
2370
|
SiWidgetInstanceEditorDialogComponent] });
|
|
2276
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2371
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDashboardsNgModule, imports: [SiFlexibleDashboardComponent,
|
|
2277
2372
|
SiGridComponent,
|
|
2278
2373
|
SiWidgetCatalogComponent] });
|
|
2279
2374
|
}
|
|
2280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDashboardsNgModule, decorators: [{
|
|
2281
2376
|
type: NgModule,
|
|
2282
2377
|
args: [{
|
|
2283
2378
|
imports: [
|