@siemens/dashboards-ng 51.0.0-rc.7 → 51.0.0-rc.9
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.
|
@@ -724,6 +724,7 @@ class SiWidgetHostComponent {
|
|
|
724
724
|
...(ngDevMode ? [{ debugName: "accentLine" }] : /* istanbul ignore next */ []));
|
|
725
725
|
setupPending = computed(() => !!this.widgetConfig().setupPending, /* @ts-ignore */
|
|
726
726
|
...(ngDevMode ? [{ debugName: "setupPending" }] : /* istanbul ignore next */ []));
|
|
727
|
+
moveInProgress = false;
|
|
727
728
|
ngOnChanges(changes) {
|
|
728
729
|
if (changes.widgetConfig) {
|
|
729
730
|
const options = {
|
|
@@ -792,7 +793,7 @@ class SiWidgetHostComponent {
|
|
|
792
793
|
this.announceTranslated(this.a11yWidgetDeactivatedMessage, {});
|
|
793
794
|
}
|
|
794
795
|
onFocusOut() {
|
|
795
|
-
if (this.keyboardActive()) {
|
|
796
|
+
if (this.keyboardActive() && !this.moveInProgress) {
|
|
796
797
|
this.keyboardActive.set(false);
|
|
797
798
|
}
|
|
798
799
|
}
|
|
@@ -806,12 +807,15 @@ class SiWidgetHostComponent {
|
|
|
806
807
|
return;
|
|
807
808
|
}
|
|
808
809
|
const keyEvent = event;
|
|
810
|
+
this.moveInProgress = true;
|
|
809
811
|
if (keyEvent.shiftKey) {
|
|
810
812
|
this.handleResize(keyEvent, node);
|
|
811
813
|
}
|
|
812
814
|
else {
|
|
813
815
|
this.handleMove(keyEvent, node);
|
|
814
816
|
}
|
|
817
|
+
this.card().element.nativeElement.focus();
|
|
818
|
+
this.moveInProgress = false;
|
|
815
819
|
}
|
|
816
820
|
handleResize(event, node) {
|
|
817
821
|
const el = this.elementRef;
|
|
@@ -1036,7 +1040,7 @@ class SiWidgetHostComponent {
|
|
|
1036
1040
|
});
|
|
1037
1041
|
}
|
|
1038
1042
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1039
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetHostComponent, isStandalone: true, selector: "si-widget-host", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, componentFactory: { classPropertyName: "componentFactory", publicName: "componentFactory", isSignal: true, isRequired: false, transformFunction: null }, widgetIcon: { classPropertyName: "widgetIcon", publicName: "widgetIcon", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove", edit: "edit", gridEvent: "gridEvent" }, host: { properties: { "attr.role": "editable() ? null : 'listitem'", "attr.aria-roledescription": "editable() ? null : 'widget'", "attr.aria-label": "editable() || !widgetAriaLabel() ? null : widgetAriaLabel()" }, classAttribute: "grid-stack-item" }, viewQueries: [{ propertyName: "card", first: true, predicate: ["card"], descendants: true, isSignal: true }, { propertyName: "widgetHost", first: true, predicate: ["widgetHost"], descendants: true, read: ViewContainerRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.
|
|
1043
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetHostComponent, isStandalone: true, selector: "si-widget-host", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, componentFactory: { classPropertyName: "componentFactory", publicName: "componentFactory", isSignal: true, isRequired: false, transformFunction: null }, widgetIcon: { classPropertyName: "widgetIcon", publicName: "widgetIcon", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove", edit: "edit", gridEvent: "gridEvent" }, host: { properties: { "attr.role": "editable() ? null : 'listitem'", "attr.aria-roledescription": "editable() ? null : 'widget'", "attr.aria-label": "editable() || !widgetAriaLabel() ? null : widgetAriaLabel()" }, classAttribute: "grid-stack-item" }, viewQueries: [{ propertyName: "card", first: true, predicate: ["card"], descendants: true, isSignal: true }, { propertyName: "widgetHost", first: true, predicate: ["widgetHost"], descendants: true, read: ViewContainerRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.shadow-3]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? widgetConfig().heading : 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]=\"!setupPending() ? widgetConfig().image?.src : ''\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n @if (setupPending()) {\n <si-empty-state\n [icon]=\"emptyStateIcon()\"\n [heading]=\"labelSetup\"\n [content]=\"labelSetupMessage\"\n />\n }\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer && !setupPending()) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:var(--si-sys-effects-shadow-3)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important;inset-block-end:var(--si-sys-sizing-spacing-y-30)!important;inset-inline-end:var(--si-sys-sizing-spacing-x-30)!important}.resize-handle{inset-block-end:var(--si-sys-sizing-spacing-y-30);color:var(--si-sys-text-secondary);pointer-events:none;position:absolute;inset-inline-end:var(--si-sys-sizing-spacing-x-30);text-align:center;z-index:10}.draggable-overlay{inset:var(--si-sys-sizing-spacing-y-40) var(--si-sys-sizing-spacing-x-40);position:absolute;z-index:100}si-empty-state{display:block;block-size:100%;inline-size:100%;overflow:auto}\n"], dependencies: [{ kind: "component", type: SiDashboardCardComponent, selector: "si-dashboard-card", inputs: ["restoreText", "expandText", "enableExpandInteraction", "showMenubar"], outputs: ["expandChange"] }, { kind: "component", type: SiEmptyStateComponent, selector: "si-empty-state", inputs: ["icon", "heading", "content"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
1040
1044
|
}
|
|
1041
1045
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetHostComponent, decorators: [{
|
|
1042
1046
|
type: Component,
|
|
@@ -1048,7 +1052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1048
1052
|
'[attr.role]': "editable() ? null : 'listitem'",
|
|
1049
1053
|
'[attr.aria-roledescription]': "editable() ? null : 'widget'",
|
|
1050
1054
|
'[attr.aria-label]': 'editable() || !widgetAriaLabel() ? null : widgetAriaLabel()'
|
|
1051
|
-
}, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.
|
|
1055
|
+
}, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.shadow-3]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? widgetConfig().heading : 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]=\"!setupPending() ? widgetConfig().image?.src : ''\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n @if (setupPending()) {\n <si-empty-state\n [icon]=\"emptyStateIcon()\"\n [heading]=\"labelSetup\"\n [content]=\"labelSetupMessage\"\n />\n }\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer && !setupPending()) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:var(--si-sys-effects-shadow-3)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important;inset-block-end:var(--si-sys-sizing-spacing-y-30)!important;inset-inline-end:var(--si-sys-sizing-spacing-x-30)!important}.resize-handle{inset-block-end:var(--si-sys-sizing-spacing-y-30);color:var(--si-sys-text-secondary);pointer-events:none;position:absolute;inset-inline-end:var(--si-sys-sizing-spacing-x-30);text-align:center;z-index:10}.draggable-overlay{inset:var(--si-sys-sizing-spacing-y-40) var(--si-sys-sizing-spacing-x-40);position:absolute;z-index:100}si-empty-state{display:block;block-size:100%;inline-size:100%;overflow:auto}\n"] }]
|
|
1052
1056
|
}], propDecorators: { widgetConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfig", required: true }] }], grid: [{ type: i0.Input, args: [{ isSignal: true, alias: "grid", required: false }] }], componentFactory: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentFactory", required: false }] }], widgetIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetIcon", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], remove: [{ type: i0.Output, args: ["remove"] }], edit: [{ type: i0.Output, args: ["edit"] }], gridEvent: [{ type: i0.Output, args: ["gridEvent"] }], card: [{ type: i0.ViewChild, args: ['card', { isSignal: true }] }], widgetHost: [{ type: i0.ViewChild, args: ['widgetHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
1053
1057
|
|
|
1054
1058
|
/**
|
|
@@ -1138,9 +1142,12 @@ class SiGridstackWrapperComponent {
|
|
|
1138
1142
|
...this.gridConfig()?.gridStackOptions,
|
|
1139
1143
|
...initialViewMode
|
|
1140
1144
|
};
|
|
1141
|
-
this.grid =
|
|
1145
|
+
this.grid =
|
|
1146
|
+
GridStack.init(options, this.elementRef.nativeElement.firstChild) ?? undefined;
|
|
1142
1147
|
this.startBatch();
|
|
1143
|
-
|
|
1148
|
+
if (this.grid) {
|
|
1149
|
+
this.hookEvents(this.grid);
|
|
1150
|
+
}
|
|
1144
1151
|
this.destroyRef.onDestroy(() => this.grid?.destroy());
|
|
1145
1152
|
}
|
|
1146
1153
|
startBatch() {
|
|
@@ -1394,11 +1401,11 @@ class SiWidgetInstanceEditorDialogComponent extends SiWidgetEditorBase {
|
|
|
1394
1401
|
this.closed.emit(this.widgetConfig());
|
|
1395
1402
|
}
|
|
1396
1403
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetInstanceEditorDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1397
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", 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
|
|
1404
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", 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:calc(var(--si-sys-sizing-spacing-x-20) * -1);margin-block-start:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.editor-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.editor-footer>*{margin-inline-start:var(--si-sys-sizing-spacing-x-60)}\n"], dependencies: [{ kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1398
1405
|
}
|
|
1399
1406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetInstanceEditorDialogComponent, decorators: [{
|
|
1400
1407
|
type: Component,
|
|
1401
|
-
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
|
|
1408
|
+
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:calc(var(--si-sys-sizing-spacing-x-20) * -1);margin-block-start:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.editor-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.editor-footer>*{margin-inline-start:var(--si-sys-sizing-spacing-x-60)}\n"] }]
|
|
1402
1409
|
}], 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"] }] } });
|
|
1403
1410
|
|
|
1404
1411
|
/**
|
|
@@ -2106,7 +2113,7 @@ class SiWidgetCatalogComponent extends SiWidgetEditorBase {
|
|
|
2106
2113
|
return config;
|
|
2107
2114
|
}
|
|
2108
2115
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetCatalogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetCatalogComponent, isStandalone: true, selector: "si-widget-catalog", inputs: { multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, usesInheritance: true, ngImport: i0, template: "<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n @if (view() === 'list') {\n <div class=\"si-layout-fixed-height\">\n <div class=\"mx-0 d-flex\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6
|
|
2116
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiWidgetCatalogComponent, isStandalone: true, selector: "si-widget-catalog", inputs: { multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, usesInheritance: true, ngImport: i0, template: "<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n @if (view() === 'list') {\n <div class=\"si-layout-fixed-height\">\n <div class=\"mx-0 d-flex\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6 background-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]=\"selectedWidgets()\"\n [cdkListboxMultiple]=\"multiSelect()\"\n (cdkListboxValueChange)=\"selectWidgets($event.value)\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-group-item d-flex list-group-item-action\"\n [cdkOption]=\"widget\"\n [class.active]=\"selectedWidgets().includes(widget)\"\n >\n @if (multiSelect()) {\n <div class=\"form-check d-flex align-items-center me-5 my-n1\" inert>\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n aria-hidden=\"true\"\n [checked]=\"selectedWidgets().includes(widget)\"\n />\n </div>\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:calc(var(--si-sys-sizing-spacing-x-20) * -1);margin-block-start:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.list-group-item{cursor:pointer}.list-group-item .form-check{block-size:2.5rem}.catalog-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.catalog-footer>*{margin-inline-start:var(--si-sys-sizing-spacing-x-60)}\n"], dependencies: [{ kind: "component", type: SiSearchBarComponent, selector: "si-search-bar", inputs: ["debounceTime", "prohibitedCharacters", "placeholder", "showIcon", "value", "readonly", "colorVariant", "disabled", "maxlength", "clearButtonAriaLabel"], outputs: ["searchChange"] }, { kind: "component", type: 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 });
|
|
2110
2117
|
}
|
|
2111
2118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiWidgetCatalogComponent, decorators: [{
|
|
2112
2119
|
type: Component,
|
|
@@ -2117,7 +2124,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2117
2124
|
SiTranslatePipe,
|
|
2118
2125
|
CdkListbox,
|
|
2119
2126
|
CdkOption
|
|
2120
|
-
], 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 d-flex\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6
|
|
2127
|
+
], 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 d-flex\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6 background-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]=\"selectedWidgets()\"\n [cdkListboxMultiple]=\"multiSelect()\"\n (cdkListboxValueChange)=\"selectWidgets($event.value)\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-group-item d-flex list-group-item-action\"\n [cdkOption]=\"widget\"\n [class.active]=\"selectedWidgets().includes(widget)\"\n >\n @if (multiSelect()) {\n <div class=\"form-check d-flex align-items-center me-5 my-n1\" inert>\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n aria-hidden=\"true\"\n [checked]=\"selectedWidgets().includes(widget)\"\n />\n </div>\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:calc(var(--si-sys-sizing-spacing-x-20) * -1);margin-block-start:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.list-group-item{cursor:pointer}.list-group-item .form-check{block-size:2.5rem}.catalog-footer{align-items:center;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}.catalog-footer>*{margin-inline-start:var(--si-sys-sizing-spacing-x-60)}\n"] }]
|
|
2121
2128
|
}], ctorParameters: () => [], propDecorators: { multiSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelect", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
2122
2129
|
|
|
2123
2130
|
/**
|