@c8y/ngx-components 1023.78.7 → 1023.80.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 (64) hide show
  1. package/ai/agent-chat/index.d.ts +22 -11
  2. package/ai/agent-chat/index.d.ts.map +1 -1
  3. package/ai/ai-chat/index.d.ts +31 -10
  4. package/ai/ai-chat/index.d.ts.map +1 -1
  5. package/ai/index.d.ts +64 -49
  6. package/ai/index.d.ts.map +1 -1
  7. package/ecosystem/index.d.ts +34 -4
  8. package/ecosystem/index.d.ts.map +1 -1
  9. package/ecosystem/shared/index.d.ts +1 -1
  10. package/ecosystem/shared/index.d.ts.map +1 -1
  11. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +237 -129
  12. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +112 -51
  14. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-ai.mjs +92 -61
  16. package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
  17. package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DFytXNdc.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-C8QX6xlf.mjs} +3 -3
  18. package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-C8QX6xlf.mjs.map +1 -0
  19. package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +2 -2
  20. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +7 -7
  21. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  22. package/fesm2022/c8y-ngx-components-device-enrolment-modal.mjs +3 -3
  23. package/fesm2022/c8y-ngx-components-device-enrolment-modal.mjs.map +1 -1
  24. package/fesm2022/c8y-ngx-components-device-grid.mjs +1 -1
  25. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  26. package/fesm2022/c8y-ngx-components-device-list.mjs +2 -2
  27. package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
  28. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +4 -1
  29. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  30. package/fesm2022/c8y-ngx-components-ecosystem.mjs +151 -53
  31. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  32. package/fesm2022/c8y-ngx-components-feature-toggles-list.mjs +3 -3
  33. package/fesm2022/c8y-ngx-components-feature-toggles-list.mjs.map +1 -1
  34. package/fesm2022/c8y-ngx-components-search.mjs +2 -2
  35. package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
  36. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +31 -29
  37. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
  38. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +4 -4
  39. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
  40. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +5 -5
  41. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  42. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs +2 -2
  43. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs.map +1 -1
  44. package/fesm2022/c8y-ngx-components-widgets-implementations-pie-chart.mjs +2 -2
  45. package/fesm2022/c8y-ngx-components-widgets-implementations-pie-chart.mjs.map +1 -1
  46. package/fesm2022/c8y-ngx-components.mjs +5 -5
  47. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  48. package/index.d.ts +1 -0
  49. package/index.d.ts.map +1 -1
  50. package/locales/de.po +152 -198
  51. package/locales/es.po +126 -123
  52. package/locales/fr.po +151 -197
  53. package/locales/ja_JP.po +102 -113
  54. package/locales/ko.po +128 -127
  55. package/locales/locales.pot +101 -92
  56. package/locales/nl.po +129 -128
  57. package/locales/pl.po +126 -127
  58. package/locales/pt_BR.po +125 -126
  59. package/locales/zh_CN.po +126 -128
  60. package/locales/zh_TW.po +128 -129
  61. package/package.json +1 -1
  62. package/search/index.d.ts.map +1 -1
  63. package/widgets/implementations/asset-table/index.d.ts +1 -1
  64. package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DFytXNdc.mjs.map +0 -1
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
3
3
  import { inject, Pipe, Component } from '@angular/core';
4
4
  import { ActivatedRoute } from '@angular/router';
5
5
  import { FeatureService } from '@c8y/client';
6
- import { Permissions, AppStateService, AlertService, ContextRouteService, TitleComponent, C8yTranslateDirective, DataGridComponent, EmptyStateComponent, CellRendererDefDirective, ColumnDirective, HeaderCellRendererDefDirective, C8yTranslatePipe } from '@c8y/ngx-components';
6
+ import { Permissions, AppStateService, AlertService, ContextRouteService, TitleComponent, DataGridComponent, EmptyStateComponent, CellRendererDefDirective, ColumnDirective, HeaderCellRendererDefDirective, C8yTranslatePipe, C8yTranslateDirective } from '@c8y/ngx-components';
7
7
  import { gettext } from '@c8y/ngx-components/gettext';
8
8
  import { PopoverDirective } from 'ngx-bootstrap/popover';
9
9
  import * as i1 from '@angular/forms';
@@ -206,7 +206,7 @@ class FeatureToggleListComponent {
206
206
  await this.reload();
207
207
  }
208
208
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureToggleListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
209
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FeatureToggleListComponent, isStandalone: true, selector: "c8y-feature-toggle-list", ngImport: i0, template: "<c8y-title translate>{{ 'Feature toggles' | translate }}</c8y-title>\n\n<div class=\"content-fullpage d-flex d-col border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Feature toggles' | translate\"\n [actionControls]=\"actionControls\"\n [columns]=\"columns\"\n [rows]=\"items\"\n [pagination]=\"pagination\"\n [displayOptions]=\"displayOptions\"\n (onReload)=\"reload()\"\n >\n <c8y-column name=\"name\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <strong>{{ context.value || '--' | translate }}</strong>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"description\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <p>{{ context.value || '--' | translate }}</p>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"status\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n [ngModel]=\"context.value\"\n [disabled]=\"!(context.item | canToggleStatusOfFeatureToggle)\"\n (ngModelChange)=\"updateFeature(context.item, !context.value)\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n <span></span>\n <span class=\"text-12 a-s-center\">\n @if (context.value) {\n {{ 'Enabled' | translate }}\n } @else {\n {{ 'Disabled' | translate }}\n }\n </span>\n </label>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"phase\">\n <ng-template #phasePopoverHelp>\n <p>\n <strong>{{ 'Feature phases' | translate }}</strong>\n </p>\n @for (phaseKey of phaseKeysOrder; track phaseKey) {\n @if (phaseKey !== 'PRIVATE_PREVIEW' || hasPrivatePreviewFeatures) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"phaseDetails[phaseKey].class\"\n >\n {{ phaseDetails[phaseKey].name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ phaseDetails[phaseKey].description | translate }}\n </p>\n }\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Phase' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"phasePopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"tag\"\n [ngClass]=\"phaseDetails[context.value]?.class || 'tag--warning'\"\n >\n {{ phaseDetails[context.value]?.name || context.value | translate }}\n </span>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"strategy\">\n <ng-template #strategyPopoverHelp>\n <p>\n <strong>{{ 'Feature strategies' | translate }}</strong>\n </p>\n @for (strategy of strategyDetails; track strategy) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ strategy.description | translate }}\n </p>\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Strategy' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"strategyPopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n @for (strategy of strategyDetails; track strategy) {\n @if (context.value === strategy.key) {\n <span\n class=\"tag\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n }\n }\n </ng-container>\n </c8y-column>\n <c8y-ui-empty-state\n [icon]=\"'toggle-on'\"\n [title]=\"'No feature toggles available.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: CellRendererDefDirective, selector: "[c8yCellRendererDef]" }, { kind: "directive", type: ColumnDirective, selector: "c8y-column", inputs: ["name"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HeaderCellRendererDefDirective, selector: "[c8yHeaderCellRendererDef]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: CanToggleStatusOfFeatureTogglePipe, name: "canToggleStatusOfFeatureToggle" }] }); }
209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FeatureToggleListComponent, isStandalone: true, selector: "c8y-feature-toggle-list", ngImport: i0, template: "<c8y-title>{{ 'Feature toggles' | translate }}</c8y-title>\n\n<div class=\"content-fullpage d-flex d-col border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Feature toggles' | translate\"\n [actionControls]=\"actionControls\"\n [columns]=\"columns\"\n [rows]=\"items\"\n [pagination]=\"pagination\"\n [displayOptions]=\"displayOptions\"\n (onReload)=\"reload()\"\n >\n <c8y-column name=\"name\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <strong>{{ context.value || '--' | translate }}</strong>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"description\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <p>{{ context.value || '--' | translate }}</p>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"status\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n [ngModel]=\"context.value\"\n [disabled]=\"!(context.item | canToggleStatusOfFeatureToggle)\"\n (ngModelChange)=\"updateFeature(context.item, !context.value)\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n <span></span>\n <span class=\"text-12 a-s-center\">\n @if (context.value) {\n {{ 'Enabled' | translate }}\n } @else {\n {{ 'Disabled' | translate }}\n }\n </span>\n </label>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"phase\">\n <ng-template #phasePopoverHelp>\n <p>\n <strong>{{ 'Feature phases' | translate }}</strong>\n </p>\n @for (phaseKey of phaseKeysOrder; track phaseKey) {\n @if (phaseKey !== 'PRIVATE_PREVIEW' || hasPrivatePreviewFeatures) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"phaseDetails[phaseKey].class\"\n >\n {{ phaseDetails[phaseKey].name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ phaseDetails[phaseKey].description | translate }}\n </p>\n }\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Phase' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"phasePopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"tag\"\n [ngClass]=\"phaseDetails[context.value]?.class || 'tag--warning'\"\n >\n {{ phaseDetails[context.value]?.name || context.value | translate }}\n </span>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"strategy\">\n <ng-template #strategyPopoverHelp>\n <p>\n <strong>{{ 'Feature strategies' | translate }}</strong>\n </p>\n @for (strategy of strategyDetails; track strategy) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ strategy.description | translate }}\n </p>\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Strategy' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"strategyPopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n @for (strategy of strategyDetails; track strategy) {\n @if (context.value === strategy.key) {\n <span\n class=\"tag\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n }\n }\n </ng-container>\n </c8y-column>\n <c8y-ui-empty-state\n [icon]=\"'toggle-on'\"\n [title]=\"'No feature toggles available.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: CellRendererDefDirective, selector: "[c8yCellRendererDef]" }, { kind: "directive", type: ColumnDirective, selector: "c8y-column", inputs: ["name"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HeaderCellRendererDefDirective, selector: "[c8yHeaderCellRendererDef]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: CanToggleStatusOfFeatureTogglePipe, name: "canToggleStatusOfFeatureToggle" }] }); }
210
210
  }
211
211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureToggleListComponent, decorators: [{
212
212
  type: Component,
@@ -223,7 +223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
223
223
  FormsModule,
224
224
  CanToggleStatusOfFeatureTogglePipe,
225
225
  HeaderCellRendererDefDirective
226
- ], template: "<c8y-title translate>{{ 'Feature toggles' | translate }}</c8y-title>\n\n<div class=\"content-fullpage d-flex d-col border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Feature toggles' | translate\"\n [actionControls]=\"actionControls\"\n [columns]=\"columns\"\n [rows]=\"items\"\n [pagination]=\"pagination\"\n [displayOptions]=\"displayOptions\"\n (onReload)=\"reload()\"\n >\n <c8y-column name=\"name\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <strong>{{ context.value || '--' | translate }}</strong>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"description\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <p>{{ context.value || '--' | translate }}</p>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"status\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n [ngModel]=\"context.value\"\n [disabled]=\"!(context.item | canToggleStatusOfFeatureToggle)\"\n (ngModelChange)=\"updateFeature(context.item, !context.value)\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n <span></span>\n <span class=\"text-12 a-s-center\">\n @if (context.value) {\n {{ 'Enabled' | translate }}\n } @else {\n {{ 'Disabled' | translate }}\n }\n </span>\n </label>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"phase\">\n <ng-template #phasePopoverHelp>\n <p>\n <strong>{{ 'Feature phases' | translate }}</strong>\n </p>\n @for (phaseKey of phaseKeysOrder; track phaseKey) {\n @if (phaseKey !== 'PRIVATE_PREVIEW' || hasPrivatePreviewFeatures) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"phaseDetails[phaseKey].class\"\n >\n {{ phaseDetails[phaseKey].name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ phaseDetails[phaseKey].description | translate }}\n </p>\n }\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Phase' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"phasePopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"tag\"\n [ngClass]=\"phaseDetails[context.value]?.class || 'tag--warning'\"\n >\n {{ phaseDetails[context.value]?.name || context.value | translate }}\n </span>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"strategy\">\n <ng-template #strategyPopoverHelp>\n <p>\n <strong>{{ 'Feature strategies' | translate }}</strong>\n </p>\n @for (strategy of strategyDetails; track strategy) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ strategy.description | translate }}\n </p>\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Strategy' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"strategyPopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n @for (strategy of strategyDetails; track strategy) {\n @if (context.value === strategy.key) {\n <span\n class=\"tag\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n }\n }\n </ng-container>\n </c8y-column>\n <c8y-ui-empty-state\n [icon]=\"'toggle-on'\"\n [title]=\"'No feature toggles available.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n" }]
226
+ ], template: "<c8y-title>{{ 'Feature toggles' | translate }}</c8y-title>\n\n<div class=\"content-fullpage d-flex d-col border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Feature toggles' | translate\"\n [actionControls]=\"actionControls\"\n [columns]=\"columns\"\n [rows]=\"items\"\n [pagination]=\"pagination\"\n [displayOptions]=\"displayOptions\"\n (onReload)=\"reload()\"\n >\n <c8y-column name=\"name\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <strong>{{ context.value || '--' | translate }}</strong>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"description\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <p>{{ context.value || '--' | translate }}</p>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"status\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n [ngModel]=\"context.value\"\n [disabled]=\"!(context.item | canToggleStatusOfFeatureToggle)\"\n (ngModelChange)=\"updateFeature(context.item, !context.value)\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n <span></span>\n <span class=\"text-12 a-s-center\">\n @if (context.value) {\n {{ 'Enabled' | translate }}\n } @else {\n {{ 'Disabled' | translate }}\n }\n </span>\n </label>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"phase\">\n <ng-template #phasePopoverHelp>\n <p>\n <strong>{{ 'Feature phases' | translate }}</strong>\n </p>\n @for (phaseKey of phaseKeysOrder; track phaseKey) {\n @if (phaseKey !== 'PRIVATE_PREVIEW' || hasPrivatePreviewFeatures) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"phaseDetails[phaseKey].class\"\n >\n {{ phaseDetails[phaseKey].name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ phaseDetails[phaseKey].description | translate }}\n </p>\n }\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Phase' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"phasePopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"tag\"\n [ngClass]=\"phaseDetails[context.value]?.class || 'tag--warning'\"\n >\n {{ phaseDetails[context.value]?.name || context.value | translate }}\n </span>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"strategy\">\n <ng-template #strategyPopoverHelp>\n <p>\n <strong>{{ 'Feature strategies' | translate }}</strong>\n </p>\n @for (strategy of strategyDetails; track strategy) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ strategy.description | translate }}\n </p>\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Strategy' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"strategyPopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n @for (strategy of strategyDetails; track strategy) {\n @if (context.value === strategy.key) {\n <span\n class=\"tag\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n }\n }\n </ng-container>\n </c8y-column>\n <c8y-ui-empty-state\n [icon]=\"'toggle-on'\"\n [title]=\"'No feature toggles available.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n" }]
227
227
  }], ctorParameters: () => [] });
228
228
 
229
229
  const childRoutes = [
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-feature-toggles-list.mjs","sources":["../../feature-toggles/list/can-toggle-status-of-feature-toggle.pipe.ts","../../feature-toggles/list/feature-toggle-list/feature-toggle-list.component.ts","../../feature-toggles/list/feature-toggle-list/feature-toggle-list.component.html","../../feature-toggles/list/index.ts","../../feature-toggles/list/c8y-ngx-components-feature-toggles-list.ts"],"sourcesContent":["import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { IFeatureToggle } from '@c8y/client';\nimport { AppStateService, Permissions } from '@c8y/ngx-components';\n\n@Pipe({\n name: 'canToggleStatusOfFeatureToggle'\n})\nexport class CanToggleStatusOfFeatureTogglePipe implements PipeTransform {\n private permissions = inject(Permissions);\n private appState = inject(AppStateService);\n\n transform(value: IFeatureToggle): boolean {\n if (!this.permissions.hasRole(Permissions.ROLE_TENANT_MANAGEMENT_ADMIN)) {\n return false;\n }\n if (this.appState.currentTenant.value?.name === 'management') {\n return true;\n }\n if (value.phase === 'PUBLIC_PREVIEW' || value.phase === 'GENERALLY_AVAILABLE') {\n return true;\n }\n return false;\n }\n}\n","import { NgClass } from '@angular/common';\nimport { Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FeatureService, IFeatureToggle } from '@c8y/client';\nimport {\n C8yTranslateDirective,\n TitleComponent,\n DataGridComponent,\n Column,\n C8yTranslatePipe,\n EmptyStateComponent,\n Pagination,\n DisplayOptions,\n CellRendererDefDirective,\n ColumnDirective,\n ActionControl,\n AlertService,\n Permissions,\n AppStateService,\n ContextRouteService,\n HeaderCellRendererDefDirective\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { PopoverDirective } from 'ngx-bootstrap/popover';\nimport { FormsModule } from '@angular/forms';\nimport { CanToggleStatusOfFeatureTogglePipe } from '../can-toggle-status-of-feature-toggle.pipe';\n\n@Component({\n selector: 'c8y-feature-toggle-list',\n templateUrl: './feature-toggle-list.component.html',\n imports: [\n TitleComponent,\n C8yTranslateDirective,\n C8yTranslatePipe,\n DataGridComponent,\n EmptyStateComponent,\n CellRendererDefDirective,\n ColumnDirective,\n PopoverDirective,\n NgClass,\n FormsModule,\n CanToggleStatusOfFeatureTogglePipe,\n HeaderCellRendererDefDirective\n ]\n})\nexport class FeatureToggleListComponent implements OnInit {\n columns: Column[] = [\n { name: 'name', header: gettext('Name'), sortable: true, path: 'name' },\n { name: 'description', header: gettext('Description'), sortable: true, path: 'description' },\n { name: 'key', header: gettext('Toggle key'), sortable: true, path: 'key' },\n { name: 'status', header: gettext('Status'), sortable: true, path: 'active' },\n { name: 'phase', header: gettext('Phase'), sortable: true, path: 'phase' },\n { name: 'strategy', header: gettext('Strategy'), sortable: true, path: 'strategy' }\n ];\n actionControls: ActionControl[] = [\n {\n name: 'clearOverride',\n icon: 'reset',\n type: 'clearOverride',\n text: gettext('Reset the toggle to the default state depending on the phase'),\n callback: async (item: IFeatureToggle, reload) => {\n await this.removeTenantOverride(item);\n reload();\n },\n showIf: (item: IFeatureToggle) =>\n item.strategy !== 'DEFAULT' &&\n this.permissions.hasRole('ROLE_TENANT_MANAGEMENT_ADMIN') &&\n (this.isManagementTenant ||\n item.phase === 'PUBLIC_PREVIEW' ||\n item.phase === 'GENERALLY_AVAILABLE')\n }\n ];\n items: (IFeatureToggle & { id: string })[] = [];\n pagination: Pagination = {\n pageSize: 50,\n currentPage: 1\n };\n displayOptions: DisplayOptions = {\n bordered: false,\n striped: true,\n filter: true,\n gridHeader: true,\n hover: true\n };\n hasPrivatePreviewFeatures = false;\n phaseDetails = {\n PUBLIC_PREVIEW: {\n class: 'tag--info',\n name: gettext('Public preview`feature phase`'),\n description: gettext(\n 'The feature is available for public preview and can be used by all users. It is disabled by default.'\n )\n },\n PRIVATE_PREVIEW: {\n class: 'tag--default',\n name: gettext('Private preview`feature phase`'),\n description: gettext(\n 'The feature is in private preview and available to a selected set of users. It is disabled by default.'\n )\n },\n GENERALLY_AVAILABLE: {\n class: 'tag--success',\n name: gettext('Generally available`feature phase`'),\n description: gettext(\n 'The feature is generally available and can be used by all users. It is enabled by default.'\n )\n }\n };\n phaseKeysOrder = [\n 'PRIVATE_PREVIEW',\n 'PUBLIC_PREVIEW',\n 'GENERALLY_AVAILABLE'\n ] as const satisfies Array<keyof typeof this.phaseDetails>;\n strategyDetails = [\n {\n key: 'DEFAULT',\n class: 'tag--success',\n name: gettext('Default`strategy`'),\n description: gettext('The feature toggle is using the default state based on its phase.')\n },\n {\n key: 'TENANT',\n class: 'tag--info',\n name: gettext('Custom`strategy`'),\n description: gettext(\n 'The feature toggle has been customized. When the phase of the feature changes, the custom state remains unchanged.'\n )\n }\n ];\n\n activatedRoute: ActivatedRoute = inject(ActivatedRoute, { optional: true });\n private featureToggle = inject(FeatureService);\n private alertService = inject(AlertService);\n private permissions = inject(Permissions);\n private isManagementTenant = inject(AppStateService).currentTenant.value?.name === 'management';\n private contextRouteService = inject(ContextRouteService);\n\n constructor() {\n this.items = this.activatedRoute?.snapshot.data['features'] || [];\n }\n\n async ngOnInit(): Promise<void> {\n await this.reload();\n }\n\n async reload() {\n let { data: toggles } = await this.featureToggle.list({ pageSize: 1000 });\n toggles = toggles.filter(\n toggle =>\n toggle.phase !== 'IN_DEVELOPMENT' &&\n (toggle.phase !== 'PRIVATE_PREVIEW' || toggle.active === true)\n );\n this.hasPrivatePreviewFeatures = toggles.some(toggle => toggle.phase === 'PRIVATE_PREVIEW');\n const contextData = this.contextRouteService.getContextData(this.activatedRoute);\n if (!contextData) {\n this.items = toggles.map(toggle => ({ ...toggle, id: toggle.key }));\n return;\n }\n\n const tenantId = contextData.contextData.id;\n const promises = toggles.map(toggle => {\n return this.featureToggle.detailByTenant(toggle.key).then(({ data }) => {\n const override = data.find(ft => ft.tenantId === tenantId);\n if (override) {\n return {\n ...toggle,\n id: toggle.key,\n strategy: 'TENANT',\n active: override.active\n } as const;\n }\n return {\n ...toggle,\n id: toggle.key,\n strategy: 'DEFAULT',\n active: toggle.phase === 'GENERALLY_AVAILABLE'\n } as const;\n });\n });\n const results = await Promise.all(promises);\n this.items = results;\n }\n\n async updateFeature(feature: IFeatureToggle, newActiveValue: boolean) {\n try {\n const contextData = this.contextRouteService.getContextData(this.activatedRoute);\n if (contextData) {\n const tenantId = contextData.contextData.id as string;\n await this.featureToggle.updateFeatureByTenant(\n {\n key: feature.key,\n active: newActiveValue\n },\n tenantId\n );\n } else {\n await this.featureToggle.updateFeature({ key: feature.key, active: newActiveValue });\n }\n\n if (newActiveValue) {\n this.alertService.success(gettext('Feature enabled.'));\n } else {\n this.alertService.success(gettext('Feature disabled.'));\n }\n } catch (e) {\n console.error('Error updating feature:', e);\n if (newActiveValue) {\n this.alertService.warning(gettext('Failed to enable feature.'));\n } else {\n this.alertService.warning(gettext('Failed to disable feature.'));\n }\n }\n await this.reload();\n }\n\n async removeTenantOverride(feature: IFeatureToggle) {\n try {\n const contextData = this.contextRouteService.getContextData(this.activatedRoute);\n if (contextData) {\n const tenantId = contextData.contextData.id as string;\n await this.featureToggle.removeTenantOverrideByTenant(feature, tenantId);\n } else {\n await this.featureToggle.removeTenantOverride(feature);\n }\n this.alertService.success(gettext('Feature reset to default state.'));\n } catch (e) {\n console.error('Error removing feature override:', e);\n this.alertService.warning(gettext('Failed to reset feature state.'));\n }\n await this.reload();\n }\n}\n","<c8y-title translate>{{ 'Feature toggles' | translate }}</c8y-title>\n\n<div class=\"content-fullpage d-flex d-col border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Feature toggles' | translate\"\n [actionControls]=\"actionControls\"\n [columns]=\"columns\"\n [rows]=\"items\"\n [pagination]=\"pagination\"\n [displayOptions]=\"displayOptions\"\n (onReload)=\"reload()\"\n >\n <c8y-column name=\"name\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <strong>{{ context.value || '--' | translate }}</strong>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"description\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <p>{{ context.value || '--' | translate }}</p>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"status\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n [ngModel]=\"context.value\"\n [disabled]=\"!(context.item | canToggleStatusOfFeatureToggle)\"\n (ngModelChange)=\"updateFeature(context.item, !context.value)\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n <span></span>\n <span class=\"text-12 a-s-center\">\n @if (context.value) {\n {{ 'Enabled' | translate }}\n } @else {\n {{ 'Disabled' | translate }}\n }\n </span>\n </label>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"phase\">\n <ng-template #phasePopoverHelp>\n <p>\n <strong>{{ 'Feature phases' | translate }}</strong>\n </p>\n @for (phaseKey of phaseKeysOrder; track phaseKey) {\n @if (phaseKey !== 'PRIVATE_PREVIEW' || hasPrivatePreviewFeatures) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"phaseDetails[phaseKey].class\"\n >\n {{ phaseDetails[phaseKey].name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ phaseDetails[phaseKey].description | translate }}\n </p>\n }\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Phase' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"phasePopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"tag\"\n [ngClass]=\"phaseDetails[context.value]?.class || 'tag--warning'\"\n >\n {{ phaseDetails[context.value]?.name || context.value | translate }}\n </span>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"strategy\">\n <ng-template #strategyPopoverHelp>\n <p>\n <strong>{{ 'Feature strategies' | translate }}</strong>\n </p>\n @for (strategy of strategyDetails; track strategy) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ strategy.description | translate }}\n </p>\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Strategy' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"strategyPopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n @for (strategy of strategyDetails; track strategy) {\n @if (context.value === strategy.key) {\n <span\n class=\"tag\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n }\n }\n </ng-container>\n </c8y-column>\n <c8y-ui-empty-state\n [icon]=\"'toggle-on'\"\n [title]=\"'No feature toggles available.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n","import { Routes } from '@angular/router';\nimport { FeatureToggleListComponent } from './feature-toggle-list/feature-toggle-list.component';\n\nexport * from './feature-toggle-list/feature-toggle-list.component';\n\nexport const childRoutes: Routes = [\n {\n path: '',\n pathMatch: 'full',\n component: FeatureToggleListComponent\n }\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAOa,kCAAkC,CAAA;AAH/C,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;AAc3C,IAAA;AAZC,IAAA,SAAS,CAAC,KAAqB,EAAA;AAC7B,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,EAAE;AACvE,YAAA,OAAO,KAAK;QACd;AACA,QAAA,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,KAAK,YAAY,EAAE;AAC5D,YAAA,OAAO,IAAI;QACb;AACA,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,gBAAgB,IAAI,KAAK,CAAC,KAAK,KAAK,qBAAqB,EAAE;AAC7E,YAAA,OAAO,IAAI;QACb;AACA,QAAA,OAAO,KAAK;IACd;+GAfW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MA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,UAAA,EAAA,CAAA;kBAlBtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAE1B;wBACP,cAAc;wBACd,qBAAqB;wBACrB,gBAAgB;wBAChB,iBAAiB;wBACjB,mBAAmB;wBACnB,wBAAwB;wBACxB,eAAe;wBACf,gBAAgB;wBAChB,OAAO;wBACP,WAAW;wBACX,kCAAkC;wBAClC;AACD,qBAAA,EAAA,QAAA,EAAA,48IAAA,EAAA;;;AEtCI,MAAM,WAAW,GAAW;AACjC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,SAAS,EAAE;AACZ;;;ACVH;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-feature-toggles-list.mjs","sources":["../../feature-toggles/list/can-toggle-status-of-feature-toggle.pipe.ts","../../feature-toggles/list/feature-toggle-list/feature-toggle-list.component.ts","../../feature-toggles/list/feature-toggle-list/feature-toggle-list.component.html","../../feature-toggles/list/index.ts","../../feature-toggles/list/c8y-ngx-components-feature-toggles-list.ts"],"sourcesContent":["import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { IFeatureToggle } from '@c8y/client';\nimport { AppStateService, Permissions } from '@c8y/ngx-components';\n\n@Pipe({\n name: 'canToggleStatusOfFeatureToggle'\n})\nexport class CanToggleStatusOfFeatureTogglePipe implements PipeTransform {\n private permissions = inject(Permissions);\n private appState = inject(AppStateService);\n\n transform(value: IFeatureToggle): boolean {\n if (!this.permissions.hasRole(Permissions.ROLE_TENANT_MANAGEMENT_ADMIN)) {\n return false;\n }\n if (this.appState.currentTenant.value?.name === 'management') {\n return true;\n }\n if (value.phase === 'PUBLIC_PREVIEW' || value.phase === 'GENERALLY_AVAILABLE') {\n return true;\n }\n return false;\n }\n}\n","import { NgClass } from '@angular/common';\nimport { Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FeatureService, IFeatureToggle } from '@c8y/client';\nimport {\n C8yTranslateDirective,\n TitleComponent,\n DataGridComponent,\n Column,\n C8yTranslatePipe,\n EmptyStateComponent,\n Pagination,\n DisplayOptions,\n CellRendererDefDirective,\n ColumnDirective,\n ActionControl,\n AlertService,\n Permissions,\n AppStateService,\n ContextRouteService,\n HeaderCellRendererDefDirective\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { PopoverDirective } from 'ngx-bootstrap/popover';\nimport { FormsModule } from '@angular/forms';\nimport { CanToggleStatusOfFeatureTogglePipe } from '../can-toggle-status-of-feature-toggle.pipe';\n\n@Component({\n selector: 'c8y-feature-toggle-list',\n templateUrl: './feature-toggle-list.component.html',\n imports: [\n TitleComponent,\n C8yTranslateDirective,\n C8yTranslatePipe,\n DataGridComponent,\n EmptyStateComponent,\n CellRendererDefDirective,\n ColumnDirective,\n PopoverDirective,\n NgClass,\n FormsModule,\n CanToggleStatusOfFeatureTogglePipe,\n HeaderCellRendererDefDirective\n ]\n})\nexport class FeatureToggleListComponent implements OnInit {\n columns: Column[] = [\n { name: 'name', header: gettext('Name'), sortable: true, path: 'name' },\n { name: 'description', header: gettext('Description'), sortable: true, path: 'description' },\n { name: 'key', header: gettext('Toggle key'), sortable: true, path: 'key' },\n { name: 'status', header: gettext('Status'), sortable: true, path: 'active' },\n { name: 'phase', header: gettext('Phase'), sortable: true, path: 'phase' },\n { name: 'strategy', header: gettext('Strategy'), sortable: true, path: 'strategy' }\n ];\n actionControls: ActionControl[] = [\n {\n name: 'clearOverride',\n icon: 'reset',\n type: 'clearOverride',\n text: gettext('Reset the toggle to the default state depending on the phase'),\n callback: async (item: IFeatureToggle, reload) => {\n await this.removeTenantOverride(item);\n reload();\n },\n showIf: (item: IFeatureToggle) =>\n item.strategy !== 'DEFAULT' &&\n this.permissions.hasRole('ROLE_TENANT_MANAGEMENT_ADMIN') &&\n (this.isManagementTenant ||\n item.phase === 'PUBLIC_PREVIEW' ||\n item.phase === 'GENERALLY_AVAILABLE')\n }\n ];\n items: (IFeatureToggle & { id: string })[] = [];\n pagination: Pagination = {\n pageSize: 50,\n currentPage: 1\n };\n displayOptions: DisplayOptions = {\n bordered: false,\n striped: true,\n filter: true,\n gridHeader: true,\n hover: true\n };\n hasPrivatePreviewFeatures = false;\n phaseDetails = {\n PUBLIC_PREVIEW: {\n class: 'tag--info',\n name: gettext('Public preview`feature phase`'),\n description: gettext(\n 'The feature is available for public preview and can be used by all users. It is disabled by default.'\n )\n },\n PRIVATE_PREVIEW: {\n class: 'tag--default',\n name: gettext('Private preview`feature phase`'),\n description: gettext(\n 'The feature is in private preview and available to a selected set of users. It is disabled by default.'\n )\n },\n GENERALLY_AVAILABLE: {\n class: 'tag--success',\n name: gettext('Generally available`feature phase`'),\n description: gettext(\n 'The feature is generally available and can be used by all users. It is enabled by default.'\n )\n }\n };\n phaseKeysOrder = [\n 'PRIVATE_PREVIEW',\n 'PUBLIC_PREVIEW',\n 'GENERALLY_AVAILABLE'\n ] as const satisfies Array<keyof typeof this.phaseDetails>;\n strategyDetails = [\n {\n key: 'DEFAULT',\n class: 'tag--success',\n name: gettext('Default`strategy`'),\n description: gettext('The feature toggle is using the default state based on its phase.')\n },\n {\n key: 'TENANT',\n class: 'tag--info',\n name: gettext('Custom`strategy`'),\n description: gettext(\n 'The feature toggle has been customized. When the phase of the feature changes, the custom state remains unchanged.'\n )\n }\n ];\n\n activatedRoute: ActivatedRoute = inject(ActivatedRoute, { optional: true });\n private featureToggle = inject(FeatureService);\n private alertService = inject(AlertService);\n private permissions = inject(Permissions);\n private isManagementTenant = inject(AppStateService).currentTenant.value?.name === 'management';\n private contextRouteService = inject(ContextRouteService);\n\n constructor() {\n this.items = this.activatedRoute?.snapshot.data['features'] || [];\n }\n\n async ngOnInit(): Promise<void> {\n await this.reload();\n }\n\n async reload() {\n let { data: toggles } = await this.featureToggle.list({ pageSize: 1000 });\n toggles = toggles.filter(\n toggle =>\n toggle.phase !== 'IN_DEVELOPMENT' &&\n (toggle.phase !== 'PRIVATE_PREVIEW' || toggle.active === true)\n );\n this.hasPrivatePreviewFeatures = toggles.some(toggle => toggle.phase === 'PRIVATE_PREVIEW');\n const contextData = this.contextRouteService.getContextData(this.activatedRoute);\n if (!contextData) {\n this.items = toggles.map(toggle => ({ ...toggle, id: toggle.key }));\n return;\n }\n\n const tenantId = contextData.contextData.id;\n const promises = toggles.map(toggle => {\n return this.featureToggle.detailByTenant(toggle.key).then(({ data }) => {\n const override = data.find(ft => ft.tenantId === tenantId);\n if (override) {\n return {\n ...toggle,\n id: toggle.key,\n strategy: 'TENANT',\n active: override.active\n } as const;\n }\n return {\n ...toggle,\n id: toggle.key,\n strategy: 'DEFAULT',\n active: toggle.phase === 'GENERALLY_AVAILABLE'\n } as const;\n });\n });\n const results = await Promise.all(promises);\n this.items = results;\n }\n\n async updateFeature(feature: IFeatureToggle, newActiveValue: boolean) {\n try {\n const contextData = this.contextRouteService.getContextData(this.activatedRoute);\n if (contextData) {\n const tenantId = contextData.contextData.id as string;\n await this.featureToggle.updateFeatureByTenant(\n {\n key: feature.key,\n active: newActiveValue\n },\n tenantId\n );\n } else {\n await this.featureToggle.updateFeature({ key: feature.key, active: newActiveValue });\n }\n\n if (newActiveValue) {\n this.alertService.success(gettext('Feature enabled.'));\n } else {\n this.alertService.success(gettext('Feature disabled.'));\n }\n } catch (e) {\n console.error('Error updating feature:', e);\n if (newActiveValue) {\n this.alertService.warning(gettext('Failed to enable feature.'));\n } else {\n this.alertService.warning(gettext('Failed to disable feature.'));\n }\n }\n await this.reload();\n }\n\n async removeTenantOverride(feature: IFeatureToggle) {\n try {\n const contextData = this.contextRouteService.getContextData(this.activatedRoute);\n if (contextData) {\n const tenantId = contextData.contextData.id as string;\n await this.featureToggle.removeTenantOverrideByTenant(feature, tenantId);\n } else {\n await this.featureToggle.removeTenantOverride(feature);\n }\n this.alertService.success(gettext('Feature reset to default state.'));\n } catch (e) {\n console.error('Error removing feature override:', e);\n this.alertService.warning(gettext('Failed to reset feature state.'));\n }\n await this.reload();\n }\n}\n","<c8y-title>{{ 'Feature toggles' | translate }}</c8y-title>\n\n<div class=\"content-fullpage d-flex d-col border-top border-bottom\">\n <c8y-data-grid\n [title]=\"'Feature toggles' | translate\"\n [actionControls]=\"actionControls\"\n [columns]=\"columns\"\n [rows]=\"items\"\n [pagination]=\"pagination\"\n [displayOptions]=\"displayOptions\"\n (onReload)=\"reload()\"\n >\n <c8y-column name=\"name\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <strong>{{ context.value || '--' | translate }}</strong>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"description\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <p>{{ context.value || '--' | translate }}</p>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"status\">\n <ng-container *c8yCellRendererDef=\"let context\">\n <label class=\"c8y-switch c8y-switch--inline\">\n <input\n type=\"checkbox\"\n [ngModel]=\"context.value\"\n [disabled]=\"!(context.item | canToggleStatusOfFeatureToggle)\"\n (ngModelChange)=\"updateFeature(context.item, !context.value)\"\n [ngModelOptions]=\"{ standalone: true }\"\n />\n <span></span>\n <span class=\"text-12 a-s-center\">\n @if (context.value) {\n {{ 'Enabled' | translate }}\n } @else {\n {{ 'Disabled' | translate }}\n }\n </span>\n </label>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"phase\">\n <ng-template #phasePopoverHelp>\n <p>\n <strong>{{ 'Feature phases' | translate }}</strong>\n </p>\n @for (phaseKey of phaseKeysOrder; track phaseKey) {\n @if (phaseKey !== 'PRIVATE_PREVIEW' || hasPrivatePreviewFeatures) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"phaseDetails[phaseKey].class\"\n >\n {{ phaseDetails[phaseKey].name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ phaseDetails[phaseKey].description | translate }}\n </p>\n }\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Phase' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"phasePopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n <span\n class=\"tag\"\n [ngClass]=\"phaseDetails[context.value]?.class || 'tag--warning'\"\n >\n {{ phaseDetails[context.value]?.name || context.value | translate }}\n </span>\n </ng-container>\n </c8y-column>\n <c8y-column name=\"strategy\">\n <ng-template #strategyPopoverHelp>\n <p>\n <strong>{{ 'Feature strategies' | translate }}</strong>\n </p>\n @for (strategy of strategyDetails; track strategy) {\n <span\n class=\"tag chip m-b-4\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n <p class=\"text-12 m-b-8\">\n {{ strategy.description | translate }}\n </p>\n }\n </ng-template>\n <ng-container *c8yHeaderCellRendererDef>\n {{ 'Strategy' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"strategyPopoverHelp\"\n placement=\"bottom\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n </ng-container>\n <ng-container *c8yCellRendererDef=\"let context\">\n @for (strategy of strategyDetails; track strategy) {\n @if (context.value === strategy.key) {\n <span\n class=\"tag\"\n [ngClass]=\"strategy.class\"\n >\n {{ strategy.name | translate }}\n </span>\n }\n }\n </ng-container>\n </c8y-column>\n <c8y-ui-empty-state\n [icon]=\"'toggle-on'\"\n [title]=\"'No feature toggles available.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n","import { Routes } from '@angular/router';\nimport { FeatureToggleListComponent } from './feature-toggle-list/feature-toggle-list.component';\n\nexport * from './feature-toggle-list/feature-toggle-list.component';\n\nexport const childRoutes: Routes = [\n {\n path: '',\n pathMatch: 'full',\n component: FeatureToggleListComponent\n }\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './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kCAAkC,EAAA,IAAA,EAAA,gCAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIzB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAlBtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAE1B;wBACP,cAAc;wBACd,qBAAqB;wBACrB,gBAAgB;wBAChB,iBAAiB;wBACjB,mBAAmB;wBACnB,wBAAwB;wBACxB,eAAe;wBACf,gBAAgB;wBAChB,OAAO;wBACP,WAAW;wBACX,kCAAkC;wBAClC;AACD,qBAAA,EAAA,QAAA,EAAA,k8IAAA,EAAA;;;AEtCI,MAAM,WAAW,GAAW;AACjC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,SAAS,EAAE;AACZ;;;ACVH;;AAEG;;;;"}
@@ -847,11 +847,11 @@ class SearchResultsComponent {
847
847
  return true;
848
848
  }
849
849
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SearchResultsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
850
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SearchResultsComponent, isStandalone: true, selector: "c8y-search-results", viewQueries: [{ propertyName: "searchGrid", first: true, predicate: SearchGridComponent, descendants: true, static: true }], ngImport: i0, template: "@if (!(isWildcardSearchEnabled$ | async)) {\n <c8y-title>\n <span\n class=\"p-r-4\"\n translate\n >\n Search\n </span>\n @if (searchText) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n searchHint: searchText\n }\"\n >\n searching \"{{ searchHint }}\"\n </small>\n }\n @if (filter) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n filterHint: filter\n }\"\n >\n filtered by \"{{ filterHint }}\"\n </small>\n }\n </c8y-title>\n}\n\n@if (isWildcardSearchEnabled$ | async) {\n <c8y-title translate>Asset table</c8y-title>\n}\n\n<c8y-search-grid\n [searchText]=\"searchText\"\n [filteringName]=\"filteringName\"\n></c8y-search-grid>\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: SearchGridComponent, selector: "c8y-search-grid", inputs: ["parent-group", "title", "loadingItemsLabel", "columns", "pagination", "actionControls", "selectable", "bulkActionControls", "searchText", "filteringName", "columnsConfigKey"], outputs: ["onColumnsChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
850
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SearchResultsComponent, isStandalone: true, selector: "c8y-search-results", viewQueries: [{ propertyName: "searchGrid", first: true, predicate: SearchGridComponent, descendants: true, static: true }], ngImport: i0, template: "@if (!(isWildcardSearchEnabled$ | async)) {\n <c8y-title>\n <span\n class=\"p-r-4\"\n translate\n >\n Search\n </span>\n @if (searchText) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n searchHint: searchText\n }\"\n >\n searching \"{{ searchHint }}\"\n </small>\n }\n @if (filter) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n filterHint: filter\n }\"\n >\n filtered by \"{{ filterHint }}\"\n </small>\n }\n </c8y-title>\n}\n\n@if (isWildcardSearchEnabled$ | async) {\n <c8y-title>{{ 'Asset table' | translate }}</c8y-title>\n}\n\n<c8y-search-grid\n [searchText]=\"searchText\"\n [filteringName]=\"filteringName\"\n></c8y-search-grid>\n", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: SearchGridComponent, selector: "c8y-search-grid", inputs: ["parent-group", "title", "loadingItemsLabel", "columns", "pagination", "actionControls", "selectable", "bulkActionControls", "searchText", "filteringName", "columnsConfigKey"], outputs: ["onColumnsChange"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
851
851
  }
852
852
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SearchResultsComponent, decorators: [{
853
853
  type: Component,
854
- args: [{ selector: 'c8y-search-results', imports: [TitleComponent, C8yTranslateDirective, SearchGridComponent, AsyncPipe], template: "@if (!(isWildcardSearchEnabled$ | async)) {\n <c8y-title>\n <span\n class=\"p-r-4\"\n translate\n >\n Search\n </span>\n @if (searchText) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n searchHint: searchText\n }\"\n >\n searching \"{{ searchHint }}\"\n </small>\n }\n @if (filter) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n filterHint: filter\n }\"\n >\n filtered by \"{{ filterHint }}\"\n </small>\n }\n </c8y-title>\n}\n\n@if (isWildcardSearchEnabled$ | async) {\n <c8y-title translate>Asset table</c8y-title>\n}\n\n<c8y-search-grid\n [searchText]=\"searchText\"\n [filteringName]=\"filteringName\"\n></c8y-search-grid>\n" }]
854
+ args: [{ selector: 'c8y-search-results', imports: [TitleComponent, C8yTranslateDirective, C8yTranslatePipe, SearchGridComponent, AsyncPipe], template: "@if (!(isWildcardSearchEnabled$ | async)) {\n <c8y-title>\n <span\n class=\"p-r-4\"\n translate\n >\n Search\n </span>\n @if (searchText) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n searchHint: searchText\n }\"\n >\n searching \"{{ searchHint }}\"\n </small>\n }\n @if (filter) {\n <small\n ngNonBindable\n translate\n [translateParams]=\"{\n filterHint: filter\n }\"\n >\n filtered by \"{{ filterHint }}\"\n </small>\n }\n </c8y-title>\n}\n\n@if (isWildcardSearchEnabled$ | async) {\n <c8y-title>{{ 'Asset table' | translate }}</c8y-title>\n}\n\n<c8y-search-grid\n [searchText]=\"searchText\"\n [filteringName]=\"filteringName\"\n></c8y-search-grid>\n" }]
855
855
  }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2.AlertService }], propDecorators: { searchGrid: [{
856
856
  type: ViewChild,
857
857
  args: [SearchGridComponent, { static: true }]