@c8y/ngx-components 1023.15.0 → 1023.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/ai/index.d.ts +4 -2
  2. package/ai/index.d.ts.map +1 -1
  3. package/alarms/index.d.ts +110 -53
  4. package/alarms/index.d.ts.map +1 -1
  5. package/context-dashboard/index.d.ts +1 -0
  6. package/context-dashboard/index.d.ts.map +1 -1
  7. package/datapoint-explorer/view/index.d.ts.map +1 -1
  8. package/echart/index.d.ts +2 -0
  9. package/echart/index.d.ts.map +1 -1
  10. package/echart/models/index.d.ts +2 -0
  11. package/echart/models/index.d.ts.map +1 -1
  12. package/fesm2022/c8y-ngx-components-ai.mjs +8 -6
  13. package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
  14. package/fesm2022/c8y-ngx-components-alarms.mjs +365 -205
  15. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  16. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +14 -9
  17. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  18. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +3 -2
  19. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  20. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +2 -2
  21. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  22. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-echart.mjs +52 -23
  24. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-icon-selector.mjs +3 -3
  26. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-tracking.mjs +5 -5
  28. package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +1 -1
  30. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +2 -2
  32. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +4 -2
  34. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components.mjs +3976 -2935
  36. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  37. package/index.d.ts +7958 -7141
  38. package/index.d.ts.map +1 -1
  39. package/locales/de.po +44 -30
  40. package/locales/es.po +42 -30
  41. package/locales/fr.po +43 -31
  42. package/locales/ja_JP.po +39 -29
  43. package/locales/ko.po +42 -30
  44. package/locales/locales.pot +41 -16
  45. package/locales/nl.po +43 -31
  46. package/locales/pl.po +46 -34
  47. package/locales/pt_BR.po +42 -30
  48. package/locales/zh_CN.po +40 -30
  49. package/locales/zh_TW.po +44 -30
  50. package/package.json +1 -1
  51. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, inject, InjectionToken, EventEmitter, Output, Input, TemplateRef, ViewChild, Optional, Inject, input, HostListener, HostBinding, NgModule } from '@angular/core';
2
+ import { Injectable, Component, inject, InjectionToken, EventEmitter, Output, Input, TemplateRef, ViewChild, Optional, Inject, HostListener, input, HostBinding, NgModule } from '@angular/core';
3
3
  import * as i2 from '@c8y/ngx-components';
4
4
  import { IconDirective, C8yTranslatePipe, Permissions, ContextRouteService, Status, NavigatorNode, NEW_DASHBOARD_ROUTER_STATE_PROP, getActivatedRoute, ViewContext, TabsOutletComponent, memoize, hookGeneric, ExtensionPointForPlugins, fromTriggerOnce, getInjectedHooks, stateToFactory, ListGroupModule, C8yComponentOutlet, AlertService, C8yTranslateDirective, DynamicComponentModule, DynamicComponentComponent, sortByPriority, isPromise, CoreModule, WIDGET_CONFIGURATION_GRID_SIZE, HighlightComponent, EmptyStateComponent, FormGroupComponent, RequiredInputPlaceholderDirective, ProductExperienceDirective, ResizableGridComponent, DashboardChildChange, CopyDashboardDisabledReason, TitleComponent, ActionBarItemComponent, HelpComponent, WidgetsDashboardComponent, DatePipe, hookRoute, hookTab, PreviewService, hookNavigator } from '@c8y/ngx-components';
5
5
  import * as i1 from '@angular/router';
@@ -1813,7 +1813,7 @@ class WidgetConfigSectionComponent {
1813
1813
  this.feedbackTemplate = template;
1814
1814
  }
1815
1815
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1816
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetConfigSectionComponent, isStandalone: true, selector: "c8y-widget-config-section", inputs: { section: "section" }, ngImport: i0, template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-grow flex-no-shrink\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n", dependencies: [{ kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1816
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetConfigSectionComponent, isStandalone: true, selector: "c8y-widget-config-section", inputs: { section: "section" }, ngImport: i0, template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-no-shrink p-r-8 flex-grow\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n", dependencies: [{ kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1817
1817
  }
1818
1818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigSectionComponent, decorators: [{
1819
1819
  type: Component,
@@ -1824,7 +1824,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1824
1824
  NgTemplateOutlet,
1825
1825
  CommonModule,
1826
1826
  C8yTranslatePipe
1827
- ], template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-grow flex-no-shrink\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n" }]
1827
+ ], template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-no-shrink p-r-8 flex-grow\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n" }]
1828
1828
  }], propDecorators: { section: [{
1829
1829
  type: Input
1830
1830
  }] } });
@@ -1928,7 +1928,7 @@ class WidgetAssetSelectorComponent {
1928
1928
  this.widgetConfigService.updateConfig({ device });
1929
1929
  }
1930
1930
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetAssetSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1931
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetAssetSelectorComponent, isStandalone: true, selector: "c8y-widget-asset-selector", inputs: { isRequired: "isRequired", showUnassigned: "showUnassigned", groupsSelectable: "groupsSelectable", assetSelectorConfig: "assetSelectorConfig", selectedDevice: "selectedDevice" }, host: { classAttribute: "bg-level-1" }, ngImport: i0, template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n <div\n class=\"alert alert-info m-4\"\n *ngIf=\"widgetConfigService.isDeviceTypeDashboard$ | async\"\n >\n <i class=\"fa fa-info-circle m-r-4\"></i>\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n <div\n class=\"p-t-8\"\n *ngIf=\"!isRequired\"\n >\n <p translate>Asset selection is optional for this widget.</p>\n <button\n class=\"btn btn-primary btn-sm m-t-8\"\n *ngIf=\"!selectedDevice\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : { id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n <button\n class=\"btn btn-default btn-sm m-t-8\"\n *ngIf=\"selectedDevice\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n </div>\n </div>\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n *ngIf=\"!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n *ngIf=\"\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n \"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n *ngIf=\"selectedDevice\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n <span\n *ngIf=\"!selectedDevice\"\n translate\n >\n No asset selected\n </span>\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AssetSelectorModule }, { kind: "component", type: i1$2.MillerViewComponent, selector: "c8y-asset-selector-miller", inputs: ["config", "asset", "selectedDevice", "rootNode", "container"], outputs: ["onSelected", "onClearSelected"] }, { kind: "component", type: WidgetConfigFeedbackComponent, selector: "c8y-widget-config-feedback" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
1931
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WidgetAssetSelectorComponent, isStandalone: true, selector: "c8y-widget-asset-selector", inputs: { isRequired: "isRequired", showUnassigned: "showUnassigned", groupsSelectable: "groupsSelectable", assetSelectorConfig: "assetSelectorConfig", selectedDevice: "selectedDevice" }, host: { classAttribute: "bg-level-1" }, ngImport: i0, template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n @if (widgetConfigService.isDeviceTypeDashboard$ | async) {\n <div class=\"alert alert-info m-4\">\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n @if (!isRequired) {\n <div class=\"p-t-8\">\n <p translate>Asset selection is optional for this widget.</p>\n @if (!selectedDevice) {\n <button\n class=\"btn btn-primary btn-sm m-t-8 text-truncate\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : {\n id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id\n })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n }\n @if (selectedDevice) {\n <button\n class=\"btn btn-default btn-sm m-t-8 text-truncate\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n }\n </div>\n }\n </div>\n }\n @if (!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig) {\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n }\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n @if (\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n ) {\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n }\n @if (selectedDevice) {\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n }\n @if (!selectedDevice) {\n <span translate>No asset selected</span>\n }\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AssetSelectorModule }, { kind: "component", type: i1$2.MillerViewComponent, selector: "c8y-asset-selector-miller", inputs: ["config", "asset", "selectedDevice", "rootNode", "container"], outputs: ["onSelected", "onClearSelected"] }, { kind: "component", type: WidgetConfigFeedbackComponent, selector: "c8y-widget-config-feedback" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
1932
1932
  }
1933
1933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetAssetSelectorComponent, decorators: [{
1934
1934
  type: Component,
@@ -1942,7 +1942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1942
1942
  IconDirective,
1943
1943
  FormsModule,
1944
1944
  C8yTranslateDirective
1945
- ], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n <div\n class=\"alert alert-info m-4\"\n *ngIf=\"widgetConfigService.isDeviceTypeDashboard$ | async\"\n >\n <i class=\"fa fa-info-circle m-r-4\"></i>\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n <div\n class=\"p-t-8\"\n *ngIf=\"!isRequired\"\n >\n <p translate>Asset selection is optional for this widget.</p>\n <button\n class=\"btn btn-primary btn-sm m-t-8\"\n *ngIf=\"!selectedDevice\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : { id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n <button\n class=\"btn btn-default btn-sm m-t-8\"\n *ngIf=\"selectedDevice\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n </div>\n </div>\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n *ngIf=\"!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n *ngIf=\"\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n \"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n *ngIf=\"selectedDevice\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n <span\n *ngIf=\"!selectedDevice\"\n translate\n >\n No asset selected\n </span>\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n" }]
1945
+ ], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n @if (widgetConfigService.isDeviceTypeDashboard$ | async) {\n <div class=\"alert alert-info m-4\">\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n @if (!isRequired) {\n <div class=\"p-t-8\">\n <p translate>Asset selection is optional for this widget.</p>\n @if (!selectedDevice) {\n <button\n class=\"btn btn-primary btn-sm m-t-8 text-truncate\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : {\n id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id\n })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n }\n @if (selectedDevice) {\n <button\n class=\"btn btn-default btn-sm m-t-8 text-truncate\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n }\n </div>\n }\n </div>\n }\n @if (!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig) {\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n }\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n @if (\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n ) {\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n }\n @if (selectedDevice) {\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n }\n @if (!selectedDevice) {\n <span translate>No asset selected</span>\n }\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n" }]
1946
1946
  }], propDecorators: { isRequired: [{
1947
1947
  type: Input
1948
1948
  }], showUnassigned: [{
@@ -2460,6 +2460,10 @@ class WidgetConfigComponent {
2460
2460
  this._cancel = reject;
2461
2461
  });
2462
2462
  }
2463
+ async onEscapePress(event) {
2464
+ event.preventDefault();
2465
+ await this.close();
2466
+ }
2463
2467
  async ngAfterContentInit() {
2464
2468
  this.components = this.widgetService.getWidgetDefinitions();
2465
2469
  if (this.selected) {
@@ -2650,15 +2654,13 @@ class WidgetConfigComponent {
2650
2654
  return widgetConfig;
2651
2655
  }
2652
2656
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigComponent, deps: [{ token: WidgetService }, { token: i2.BottomDrawerRef }, { token: ContextDashboardService }, { token: WidgetConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
2653
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetConfigComponent, isStandalone: true, selector: "c8y-widget-config", host: { classAttribute: "d-contents" }, viewQueries: [{ propertyName: "configForm", first: true, predicate: ["configForm"], descendants: true }], ngImport: i0, template: "<!-- select widget -->\n<ng-container *ngIf=\"!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n *ngFor=\"let cmp of searchResult || components\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n <ng-container *ngIf=\"!cmp.previewImage; else previewImage\">\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n </ng-container>\n <ng-template #previewImage>\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n </ng-template>\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"' Rephrase your search term.' | translate\"\n *ngIf=\"searchResult && searchResult.length === 0\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n</ng-container>\n\n<!-- widget configuration -->\n<ng-container *ngIf=\"!!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n <div\n class=\"p-t-8\"\n *ngIf=\"selected\"\n >\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n *ngIf=\"!(widgetConfigService.hasConfig$ | async)\"\n ></c8y-ui-empty-state>\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n <ng-container *ngIf=\"widgetConfigService.hasConfig$ | async\">\n <ng-container *ngIf=\"widgetConfigService.providers$ | async as providers\">\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n </ng-container>\n </ng-container>\n </form>\n </div>\n </div>\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "component", type: WidgetPreviewComponent, selector: "c8y-widget-preview", inputs: ["previewClasses"] }, { kind: "component", type: AppearanceSettingsComponent, selector: "c8y-appearance-settings", inputs: ["themeClass", "headerClass", "defaultThemeClass", "defaultHeaderClass", "dashboardSettings", "possibleStylingTheme", "possibleStylingHeader", "columns"], outputs: ["themeClassChange", "headerClassChange", "onChange"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: ResizableGridComponent, selector: "c8y-resizable-grid", inputs: ["leftColumnWidth", "trackId", "collapseThreshold"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
2657
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WidgetConfigComponent, isStandalone: true, selector: "c8y-widget-config", host: { listeners: { "document:keydown.escape": "onEscapePress($event)" }, classAttribute: "d-contents" }, viewQueries: [{ propertyName: "configForm", first: true, predicate: ["configForm"], descendants: true }], ngImport: i0, template: "<!-- select widget -->\n@if (!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n @for (cmp of searchResult || components; track cmp) {\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n @if (!cmp.previewImage) {\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n } @else {\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n }\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n }\n @if (searchResult && searchResult.length === 0) {\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"'Rephrase your search term.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n}\n\n<!-- widget configuration -->\n@if (!!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n @if (selected) {\n <div class=\"p-t-8\">\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n }\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [collapsible]=\"false\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n @if (!(widgetConfigService.hasConfig$ | async)) {\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n @if (widgetConfigService.hasConfig$ | async) {\n @if (widgetConfigService.providers$ | async; as providers) {\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n }\n }\n </form>\n </div>\n </div>\n\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "component", type: WidgetPreviewComponent, selector: "c8y-widget-preview", inputs: ["previewClasses"] }, { kind: "component", type: AppearanceSettingsComponent, selector: "c8y-appearance-settings", inputs: ["themeClass", "headerClass", "defaultThemeClass", "defaultHeaderClass", "dashboardSettings", "possibleStylingTheme", "possibleStylingHeader", "columns"], outputs: ["themeClassChange", "headerClassChange", "onChange"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: ResizableGridComponent, selector: "c8y-resizable-grid", inputs: ["leftColumnWidth", "trackId", "collapseThreshold", "collapsible"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
2654
2658
  }
2655
2659
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigComponent, decorators: [{
2656
2660
  type: Component,
2657
2661
  args: [{ selector: 'c8y-widget-config', host: { class: 'd-contents' }, imports: [
2658
- NgIf,
2659
2662
  FormsModule,
2660
2663
  IconDirective,
2661
- NgFor,
2662
2664
  C8yTranslateDirective,
2663
2665
  HighlightComponent,
2664
2666
  EmptyStateComponent,
@@ -2671,10 +2673,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2671
2673
  C8yTranslatePipe,
2672
2674
  AsyncPipe,
2673
2675
  ResizableGridComponent
2674
- ], standalone: true, template: "<!-- select widget -->\n<ng-container *ngIf=\"!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n *ngFor=\"let cmp of searchResult || components\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n <ng-container *ngIf=\"!cmp.previewImage; else previewImage\">\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n </ng-container>\n <ng-template #previewImage>\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n </ng-template>\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"' Rephrase your search term.' | translate\"\n *ngIf=\"searchResult && searchResult.length === 0\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n</ng-container>\n\n<!-- widget configuration -->\n<ng-container *ngIf=\"!!(widgetConfigService.selected$ | async)\">\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n <div\n class=\"p-t-8\"\n *ngIf=\"selected\"\n >\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n *ngIf=\"!(widgetConfigService.hasConfig$ | async)\"\n ></c8y-ui-empty-state>\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n <ng-container *ngIf=\"widgetConfigService.hasConfig$ | async\">\n <ng-container *ngIf=\"widgetConfigService.providers$ | async as providers\">\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n </ng-container>\n </ng-container>\n </form>\n </div>\n </div>\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</ng-container>\n" }]
2676
+ ], standalone: true, template: "<!-- select widget -->\n@if (!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n @for (cmp of searchResult || components; track cmp) {\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n @if (!cmp.previewImage) {\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n } @else {\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n }\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n }\n @if (searchResult && searchResult.length === 0) {\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"'Rephrase your search term.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n}\n\n<!-- widget configuration -->\n@if (!!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n @if (selected) {\n <div class=\"p-t-8\">\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n }\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [collapsible]=\"false\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n @if (!(widgetConfigService.hasConfig$ | async)) {\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n @if (widgetConfigService.hasConfig$ | async) {\n @if (widgetConfigService.providers$ | async; as providers) {\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n }\n }\n </form>\n </div>\n </div>\n\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n}\n" }]
2675
2677
  }], ctorParameters: () => [{ type: WidgetService }, { type: i2.BottomDrawerRef }, { type: ContextDashboardService }, { type: WidgetConfigService }], propDecorators: { configForm: [{
2676
2678
  type: ViewChild,
2677
2679
  args: ['configForm', { static: false }]
2680
+ }], onEscapePress: [{
2681
+ type: HostListener,
2682
+ args: ['document:keydown.escape', ['$event']]
2678
2683
  }] } });
2679
2684
 
2680
2685
  /**