@c8y/ngx-components 1023.30.0 → 1023.37.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 (120) hide show
  1. package/alarms/cockpit/index.d.ts.map +1 -1
  2. package/alarms/devicemanagement/index.d.ts.map +1 -1
  3. package/alarms/index.d.ts +25 -2
  4. package/alarms/index.d.ts.map +1 -1
  5. package/asset-properties/index.d.ts +20 -2
  6. package/asset-properties/index.d.ts.map +1 -1
  7. package/bookmarks/index.d.ts +15 -7
  8. package/bookmarks/index.d.ts.map +1 -1
  9. package/datapoint-explorer/view/index.d.ts +2 -0
  10. package/datapoint-explorer/view/index.d.ts.map +1 -1
  11. package/device-grid/index.d.ts.map +1 -1
  12. package/echart/index.d.ts +19 -3
  13. package/echart/index.d.ts.map +1 -1
  14. package/feature-toggles/index.d.ts +6 -0
  15. package/feature-toggles/index.d.ts.map +1 -0
  16. package/feature-toggles/list/index.d.ts +63 -0
  17. package/feature-toggles/list/index.d.ts.map +1 -0
  18. package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +6 -11
  19. package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
  20. package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs +37 -11
  21. package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs.map +1 -1
  22. package/fesm2022/c8y-ngx-components-alarms.mjs +58 -10
  23. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  24. package/fesm2022/c8y-ngx-components-asset-properties.mjs +36 -12
  25. package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
  26. package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B04ixTyA.mjs → c8y-ngx-components-asset-property-grid.component-BoVrIpap.mjs} +5 -12
  27. package/fesm2022/c8y-ngx-components-asset-property-grid.component-BoVrIpap.mjs.map +1 -0
  28. package/fesm2022/c8y-ngx-components-bookmarks.mjs +86 -39
  29. package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
  30. package/fesm2022/c8y-ngx-components-cockpit-config.mjs +2 -2
  31. package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
  32. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +1 -1
  33. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  34. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +21 -36
  35. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  36. package/fesm2022/c8y-ngx-components-device-grid.mjs +5 -2
  37. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  38. package/fesm2022/c8y-ngx-components-echart.mjs +101 -42
  39. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  40. package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +3 -3
  41. package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs.map +1 -1
  42. package/fesm2022/c8y-ngx-components-feature-toggles-list.mjs +242 -0
  43. package/fesm2022/c8y-ngx-components-feature-toggles-list.mjs.map +1 -0
  44. package/fesm2022/c8y-ngx-components-feature-toggles.mjs +36 -0
  45. package/fesm2022/c8y-ngx-components-feature-toggles.mjs.map +1 -0
  46. package/fesm2022/c8y-ngx-components-global-context.mjs +21 -6
  47. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  48. package/fesm2022/c8y-ngx-components-map.mjs +127 -33
  49. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-tenants.mjs +2 -2
  51. package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +5 -1
  53. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-upgrade-not-found.component-CuCuYAkK.mjs +19 -0
  55. package/fesm2022/c8y-ngx-components-upgrade-not-found.component-CuCuYAkK.mjs.map +1 -0
  56. package/fesm2022/c8y-ngx-components-upgrade.mjs +33 -3
  57. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  58. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +3 -3
  59. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
  60. package/fesm2022/c8y-ngx-components-widgets-definitions-pie-chart.mjs +30 -0
  61. package/fesm2022/c8y-ngx-components-widgets-definitions-pie-chart.mjs.map +1 -0
  62. package/fesm2022/c8y-ngx-components-widgets-definitions.mjs +2 -1
  63. package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
  64. package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
  65. package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
  66. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +4 -4
  67. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  68. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +3 -3
  69. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  70. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -2
  71. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  72. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +4 -3
  73. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
  74. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +18 -11
  75. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
  76. package/fesm2022/c8y-ngx-components-widgets-implementations-pie-chart.mjs +366 -0
  77. package/fesm2022/c8y-ngx-components-widgets-implementations-pie-chart.mjs.map +1 -0
  78. package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs +5 -2
  79. package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs.map +1 -1
  80. package/fesm2022/c8y-ngx-components.mjs +34 -13
  81. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  82. package/global-context/index.d.ts +12 -2
  83. package/global-context/index.d.ts.map +1 -1
  84. package/index.d.ts +6 -1
  85. package/index.d.ts.map +1 -1
  86. package/locales/de.po +88 -66
  87. package/locales/es.po +26 -20
  88. package/locales/fr.po +25 -20
  89. package/locales/ja_JP.po +18 -20
  90. package/locales/ko.po +24 -20
  91. package/locales/locales.pot +130 -32
  92. package/locales/nl.po +26 -20
  93. package/locales/pl.po +26 -20
  94. package/locales/pt_BR.po +24 -20
  95. package/locales/zh_CN.po +26 -20
  96. package/locales/zh_TW.po +26 -20
  97. package/map/index.d.ts +41 -10
  98. package/map/index.d.ts.map +1 -1
  99. package/package.json +1 -1
  100. package/trusted-certificates/index.d.ts +2 -0
  101. package/trusted-certificates/index.d.ts.map +1 -1
  102. package/upgrade/index.d.ts.map +1 -1
  103. package/widgets/cockpit-exports/index.d.ts +6 -0
  104. package/widgets/cockpit-exports/index.d.ts.map +1 -1
  105. package/widgets/definitions/index.d.ts +1 -0
  106. package/widgets/definitions/index.d.ts.map +1 -1
  107. package/widgets/definitions/pie-chart/index.d.ts +25 -0
  108. package/widgets/definitions/pie-chart/index.d.ts.map +1 -0
  109. package/widgets/device-management-exports/index.d.ts +6 -0
  110. package/widgets/device-management-exports/index.d.ts.map +1 -1
  111. package/widgets/exports/index.d.ts +8 -1
  112. package/widgets/exports/index.d.ts.map +1 -1
  113. package/widgets/implementations/html-widget/index.d.ts +2 -2
  114. package/widgets/implementations/html-widget/index.d.ts.map +1 -1
  115. package/widgets/implementations/map/index.d.ts +1 -0
  116. package/widgets/implementations/map/index.d.ts.map +1 -1
  117. package/widgets/implementations/pie-chart/index.d.ts +129 -0
  118. package/widgets/implementations/pie-chart/index.d.ts.map +1 -0
  119. package/widgets/widget-providers/index.d.ts.map +1 -1
  120. package/fesm2022/c8y-ngx-components-asset-property-grid.component-B04ixTyA.mjs.map +0 -1
@@ -6,7 +6,7 @@ import { map, filter } from 'rxjs/operators';
6
6
  import * as i2 from '@c8y/ngx-components/ecosystem/application-plugins';
7
7
  import { ApplicationPluginsModule } from '@c8y/ngx-components/ecosystem/application-plugins';
8
8
  import { LicenseConfirmModule } from '@c8y/ngx-components/ecosystem/license-confirm';
9
- import { NgIf, AsyncPipe } from '@angular/common';
9
+ import { AsyncPipe, NgIf } from '@angular/common';
10
10
  import { gettext } from '@c8y/ngx-components/gettext';
11
11
 
12
12
  class PluginSetupStepperComponent {
@@ -24,11 +24,11 @@ class PluginSetupStepperComponent {
24
24
  this.stepper.previous();
25
25
  }
26
26
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PluginSetupStepperComponent, deps: [{ token: i1.AppStateService }, { token: i1.C8yStepper }, { token: i1.SetupComponent }], target: i0.ɵɵFactoryTarget.Component }); }
27
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: PluginSetupStepperComponent, isStandalone: true, selector: "c8y-plugin-setup-stepper", host: { classAttribute: "d-contents" }, ngImport: i0, template: "<div class=\"container-fluid flex-no-shrink fit-w\">\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 p-t-24 p-l-16 p-r-16\">\n <h3 translate class=\"text-medium l-h-base\">Plugins</h3>\n <p class=\"lead text-normal\" translate>\n Manage the application plugins.\n </p>\n </div>\n </div>\n</div>\n<div class=\"inner-scroll flex-grow\">\n <c8y-app-plugins *ngIf=\"appId$ | async as appId\" [appId]=\"appId\"></c8y-app-plugins>\n</div>\n<div class=\"card-footer separator d-flex j-c-center\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"c8y-plugin-setup-stepper--cancel-button\"\n *ngIf=\"stepper.selectedIndex !== 0\"\n (click)=\"back()\"\n translate\n >\n Previous\n </button>\n <button class=\"btn btn-primary\" type=\"submit\" data-cy=\"c8y-plugin-setup-stepper--continue-button\" (click)=\"next()\" translate>\n Continue\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ApplicationPluginsModule }, { kind: "component", type: i2.ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: ["appId"] }, { kind: "ngmodule", type: LicenseConfirmModule }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
27
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: PluginSetupStepperComponent, isStandalone: true, selector: "c8y-plugin-setup-stepper", host: { classAttribute: "d-contents" }, ngImport: i0, template: "<div class=\"container-fluid flex-no-shrink fit-w\">\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 p-t-24 p-l-16 p-r-16\">\n <h3\n class=\"text-medium l-h-base\"\n translate\n >\n Plugins\n </h3>\n <p\n class=\"lead text-normal\"\n translate\n >\n Manage the application plugins.\n </p>\n </div>\n </div>\n</div>\n<div class=\"inner-scroll flex-grow\">\n @if (appId$ | async; as appId) {\n <c8y-app-plugins [appId]=\"appId\"></c8y-app-plugins>\n }\n</div>\n<div class=\"card-footer separator d-flex gap-8 j-c-center\">\n @if (stepper.selectedIndex !== 0) {\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"c8y-plugin-setup-stepper--cancel-button\"\n (click)=\"back()\"\n translate\n >\n Previous\n </button>\n }\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n data-cy=\"c8y-plugin-setup-stepper--continue-button\"\n (click)=\"next()\"\n translate\n >\n Continue\n </button>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ApplicationPluginsModule }, { kind: "component", type: i2.ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: ["appId"] }, { kind: "ngmodule", type: LicenseConfirmModule }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
28
28
  }
29
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PluginSetupStepperComponent, decorators: [{
30
30
  type: Component,
31
- args: [{ selector: 'c8y-plugin-setup-stepper', standalone: true, imports: [NgIf, AsyncPipe, ApplicationPluginsModule, LicenseConfirmModule, C8yTranslateDirective], host: { class: 'd-contents' }, template: "<div class=\"container-fluid flex-no-shrink fit-w\">\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 p-t-24 p-l-16 p-r-16\">\n <h3 translate class=\"text-medium l-h-base\">Plugins</h3>\n <p class=\"lead text-normal\" translate>\n Manage the application plugins.\n </p>\n </div>\n </div>\n</div>\n<div class=\"inner-scroll flex-grow\">\n <c8y-app-plugins *ngIf=\"appId$ | async as appId\" [appId]=\"appId\"></c8y-app-plugins>\n</div>\n<div class=\"card-footer separator d-flex j-c-center\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"c8y-plugin-setup-stepper--cancel-button\"\n *ngIf=\"stepper.selectedIndex !== 0\"\n (click)=\"back()\"\n translate\n >\n Previous\n </button>\n <button class=\"btn btn-primary\" type=\"submit\" data-cy=\"c8y-plugin-setup-stepper--continue-button\" (click)=\"next()\" translate>\n Continue\n </button>\n</div>\n" }]
31
+ args: [{ selector: 'c8y-plugin-setup-stepper', standalone: true, imports: [NgIf, AsyncPipe, ApplicationPluginsModule, LicenseConfirmModule, C8yTranslateDirective], host: { class: 'd-contents' }, template: "<div class=\"container-fluid flex-no-shrink fit-w\">\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 p-t-24 p-l-16 p-r-16\">\n <h3\n class=\"text-medium l-h-base\"\n translate\n >\n Plugins\n </h3>\n <p\n class=\"lead text-normal\"\n translate\n >\n Manage the application plugins.\n </p>\n </div>\n </div>\n</div>\n<div class=\"inner-scroll flex-grow\">\n @if (appId$ | async; as appId) {\n <c8y-app-plugins [appId]=\"appId\"></c8y-app-plugins>\n }\n</div>\n<div class=\"card-footer separator d-flex gap-8 j-c-center\">\n @if (stepper.selectedIndex !== 0) {\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"c8y-plugin-setup-stepper--cancel-button\"\n (click)=\"back()\"\n translate\n >\n Previous\n </button>\n }\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n data-cy=\"c8y-plugin-setup-stepper--continue-button\"\n (click)=\"next()\"\n translate\n >\n Continue\n </button>\n</div>\n" }]
32
32
  }], ctorParameters: () => [{ type: i1.AppStateService }, { type: i1.C8yStepper }, { type: i1.SetupComponent }] });
33
33
 
34
34
  class PluginSetupStepperModule {
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs","sources":["../../ecosystem/plugin-setup-stepper/plugin-setup-stepper.component.ts","../../ecosystem/plugin-setup-stepper/plugin-setup-stepper.component.html","../../ecosystem/plugin-setup-stepper/plugin-setup-stepper.module.ts","../../ecosystem/plugin-setup-stepper/c8y-ngx-components-ecosystem-plugin-setup-stepper.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport {\n AppStateService,\n C8yStepper,\n C8yTranslateDirective,\n SetupComponent\n} from '@c8y/ngx-components';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\nimport { ApplicationPluginsModule } from '@c8y/ngx-components/ecosystem/application-plugins';\nimport { LicenseConfirmModule } from '@c8y/ngx-components/ecosystem/license-confirm';\nimport { AsyncPipe, NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-plugin-setup-stepper',\n templateUrl: './plugin-setup-stepper.component.html',\n standalone: true,\n imports: [NgIf, AsyncPipe, ApplicationPluginsModule, LicenseConfirmModule, C8yTranslateDirective],\n host: { class: 'd-contents' }\n})\nexport class PluginSetupStepperComponent {\n appId$: Observable<string | number>;\n\n constructor(\n private appState: AppStateService,\n public stepper: C8yStepper,\n private setup: SetupComponent\n ) {\n this.appId$ = this.appState.currentApplication.pipe(\n map(app => app?.id),\n filter(appId => !!appId)\n );\n }\n\n next() {\n this.setup.stepCompleted(this.stepper.selectedIndex);\n this.stepper.next();\n }\n\n back() {\n this.stepper.previous();\n }\n}\n","<div class=\"container-fluid flex-no-shrink fit-w\">\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 p-t-24 p-l-16 p-r-16\">\n <h3 translate class=\"text-medium l-h-base\">Plugins</h3>\n <p class=\"lead text-normal\" translate>\n Manage the application plugins.\n </p>\n </div>\n </div>\n</div>\n<div class=\"inner-scroll flex-grow\">\n <c8y-app-plugins *ngIf=\"appId$ | async as appId\" [appId]=\"appId\"></c8y-app-plugins>\n</div>\n<div class=\"card-footer separator d-flex j-c-center\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"c8y-plugin-setup-stepper--cancel-button\"\n *ngIf=\"stepper.selectedIndex !== 0\"\n (click)=\"back()\"\n translate\n >\n Previous\n </button>\n <button class=\"btn btn-primary\" type=\"submit\" data-cy=\"c8y-plugin-setup-stepper--continue-button\" (click)=\"next()\" translate>\n Continue\n </button>\n</div>\n","import { NgModule } from '@angular/core';\nimport { PluginSetupStepperComponent } from './plugin-setup-stepper.component';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { hookStepper, Steppers } from '@c8y/ngx-components';\n\n@NgModule({\n imports: [PluginSetupStepperComponent],\n providers: [\n hookStepper([\n {\n stepperId: Steppers.SETUP,\n component: PluginSetupStepperComponent,\n label: gettext('Plugins'),\n setupId: 'plugins',\n priority: 30\n }\n ])\n ]\n})\nexport class PluginSetupStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAoBa,2BAA2B,CAAA;AAGtC,IAAA,WAAA,CACU,QAAy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,SAAS,EAAE,QAAQ,CAAC,KAAK;AACzB,oBAAA,SAAS,EAAE,2BAA2B;AACtC,oBAAA,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;AACzB,oBAAA,OAAO,EAAE,SAAS;AAClB,oBAAA,QAAQ,EAAE;AACX;aACF;AACF,SAAA,EAAA,OAAA,EAAA,CAXS,2BAA2B,CAAA,EAAA,CAAA,CAAA;;4FAa1B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAdpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACtC,oBAAA,SAAS,EAAE;AACT,wBAAA,WAAW,CAAC;AACV,4BAAA;gCACE,SAAS,EAAE,QAAQ,CAAC,KAAK;AACzB,gCAAA,SAAS,EAAE,2BAA2B;AACtC,gCAAA,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;AACzB,gCAAA,OAAO,EAAE,SAAS;AAClB,gCAAA,QAAQ,EAAE;AACX;yBACF;AACF;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs","sources":["../../ecosystem/plugin-setup-stepper/plugin-setup-stepper.component.ts","../../ecosystem/plugin-setup-stepper/plugin-setup-stepper.component.html","../../ecosystem/plugin-setup-stepper/plugin-setup-stepper.module.ts","../../ecosystem/plugin-setup-stepper/c8y-ngx-components-ecosystem-plugin-setup-stepper.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport {\n AppStateService,\n C8yStepper,\n C8yTranslateDirective,\n SetupComponent\n} from '@c8y/ngx-components';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\nimport { ApplicationPluginsModule } from '@c8y/ngx-components/ecosystem/application-plugins';\nimport { LicenseConfirmModule } from '@c8y/ngx-components/ecosystem/license-confirm';\nimport { AsyncPipe, NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-plugin-setup-stepper',\n templateUrl: './plugin-setup-stepper.component.html',\n standalone: true,\n imports: [NgIf, AsyncPipe, ApplicationPluginsModule, LicenseConfirmModule, C8yTranslateDirective],\n host: { class: 'd-contents' }\n})\nexport class PluginSetupStepperComponent {\n appId$: Observable<string | number>;\n\n constructor(\n private appState: AppStateService,\n public stepper: C8yStepper,\n private setup: SetupComponent\n ) {\n this.appId$ = this.appState.currentApplication.pipe(\n map(app => app?.id),\n filter(appId => !!appId)\n );\n }\n\n next() {\n this.setup.stepCompleted(this.stepper.selectedIndex);\n this.stepper.next();\n }\n\n back() {\n this.stepper.previous();\n }\n}\n","<div class=\"container-fluid flex-no-shrink fit-w\">\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 p-t-24 p-l-16 p-r-16\">\n <h3\n class=\"text-medium l-h-base\"\n translate\n >\n Plugins\n </h3>\n <p\n class=\"lead text-normal\"\n translate\n >\n Manage the application plugins.\n </p>\n </div>\n </div>\n</div>\n<div class=\"inner-scroll flex-grow\">\n @if (appId$ | async; as appId) {\n <c8y-app-plugins [appId]=\"appId\"></c8y-app-plugins>\n }\n</div>\n<div class=\"card-footer separator d-flex gap-8 j-c-center\">\n @if (stepper.selectedIndex !== 0) {\n <button\n class=\"btn btn-default\"\n type=\"button\"\n data-cy=\"c8y-plugin-setup-stepper--cancel-button\"\n (click)=\"back()\"\n translate\n >\n Previous\n </button>\n }\n <button\n class=\"btn btn-primary\"\n type=\"submit\"\n data-cy=\"c8y-plugin-setup-stepper--continue-button\"\n (click)=\"next()\"\n translate\n >\n Continue\n </button>\n</div>\n","import { NgModule } from '@angular/core';\nimport { PluginSetupStepperComponent } from './plugin-setup-stepper.component';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { hookStepper, Steppers } from '@c8y/ngx-components';\n\n@NgModule({\n imports: [PluginSetupStepperComponent],\n providers: [\n hookStepper([\n {\n stepperId: Steppers.SETUP,\n component: PluginSetupStepperComponent,\n label: gettext('Plugins'),\n setupId: 'plugins',\n priority: 30\n }\n ])\n ]\n})\nexport class PluginSetupStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAoBa,2BAA2B,CAAA;AAGtC,IAAA,WAAA,CACU,QAAyB,EAC1B,OAAmB,EAClB,KAAqB,EAAA;QAFrB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACT,IAAA,CAAA,OAAO,GAAP,OAAO;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;AAEb,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CACjD,GAAG,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,CAAC,EACnB,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,CACzB;IACH;IAEA,IAAI,GAAA;QACF,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;AACpD,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;IACrB;IAEA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;IACzB;+GArBW,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpBxC,8kCA6CA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED5B6B,wBAAw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oBAAA,QAAQ,EAAE;AACX;aACF;AACF,SAAA,EAAA,OAAA,EAAA,CAXS,2BAA2B,CAAA,EAAA,CAAA,CAAA;;4FAa1B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAdpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACtC,oBAAA,SAAS,EAAE;AACT,wBAAA,WAAW,CAAC;AACV,4BAAA;gCACE,SAAS,EAAE,QAAQ,CAAC,KAAK;AACzB,gCAAA,SAAS,EAAE,2BAA2B;AACtC,gCAAA,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;AACzB,gCAAA,OAAO,EAAE,SAAS;AAClB,gCAAA,QAAQ,EAAE;AACX;yBACF;AACF;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
@@ -0,0 +1,242 @@
1
+ import { NgClass } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Pipe, Component } from '@angular/core';
4
+ import { ActivatedRoute } from '@angular/router';
5
+ import { FeatureService } from '@c8y/client';
6
+ import { Permissions, AppStateService, AlertService, ContextRouteService, TitleComponent, C8yTranslateDirective, DataGridComponent, EmptyStateComponent, CellRendererDefDirective, ColumnDirective, HeaderCellRendererDefDirective, C8yTranslatePipe } from '@c8y/ngx-components';
7
+ import { gettext } from '@c8y/ngx-components/gettext';
8
+ import { PopoverDirective } from 'ngx-bootstrap/popover';
9
+ import * as i1 from '@angular/forms';
10
+ import { FormsModule } from '@angular/forms';
11
+
12
+ class CanToggleStatusOfFeatureTogglePipe {
13
+ constructor() {
14
+ this.permissions = inject(Permissions);
15
+ this.appState = inject(AppStateService);
16
+ }
17
+ transform(value) {
18
+ if (!this.permissions.hasRole(Permissions.ROLE_TENANT_MANAGEMENT_ADMIN)) {
19
+ return false;
20
+ }
21
+ if (this.appState.currentTenant.value?.name === 'management') {
22
+ return true;
23
+ }
24
+ if (value.phase === 'PUBLIC_PREVIEW' || value.phase === 'GENERALLY_AVAILABLE') {
25
+ return true;
26
+ }
27
+ return false;
28
+ }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CanToggleStatusOfFeatureTogglePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
30
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: CanToggleStatusOfFeatureTogglePipe, isStandalone: true, name: "canToggleStatusOfFeatureToggle" }); }
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CanToggleStatusOfFeatureTogglePipe, decorators: [{
33
+ type: Pipe,
34
+ args: [{
35
+ name: 'canToggleStatusOfFeatureToggle'
36
+ }]
37
+ }] });
38
+
39
+ class FeatureToggleListComponent {
40
+ constructor() {
41
+ this.columns = [
42
+ { name: 'name', header: gettext('Name'), sortable: true, path: 'name' },
43
+ { name: 'description', header: gettext('Description'), sortable: true, path: 'description' },
44
+ { name: 'key', header: gettext('Toggle key'), sortable: true, path: 'key' },
45
+ { name: 'status', header: gettext('Status'), sortable: true, path: 'active' },
46
+ { name: 'phase', header: gettext('Phase'), sortable: true, path: 'phase' },
47
+ { name: 'strategy', header: gettext('Strategy'), sortable: true, path: 'strategy' }
48
+ ];
49
+ this.actionControls = [
50
+ {
51
+ name: 'clearOverride',
52
+ icon: 'reset',
53
+ type: 'clearOverride',
54
+ text: gettext('Reset the toggle to the default state depending on the phase'),
55
+ callback: async (item, reload) => {
56
+ await this.removeTenantOverride(item);
57
+ reload();
58
+ },
59
+ showIf: (item) => item.strategy !== 'DEFAULT' &&
60
+ this.permissions.hasRole('ROLE_TENANT_MANAGEMENT_ADMIN') &&
61
+ (this.isManagementTenant ||
62
+ item.phase === 'PUBLIC_PREVIEW' ||
63
+ item.phase === 'GENERALLY_AVAILABLE')
64
+ }
65
+ ];
66
+ this.items = [];
67
+ this.pagination = {
68
+ pageSize: 50,
69
+ currentPage: 1
70
+ };
71
+ this.displayOptions = {
72
+ bordered: false,
73
+ striped: true,
74
+ filter: true,
75
+ gridHeader: true,
76
+ hover: true
77
+ };
78
+ this.hasPrivatePreviewFeatures = false;
79
+ this.phaseDetails = {
80
+ PUBLIC_PREVIEW: {
81
+ class: 'tag--info',
82
+ name: gettext('Public preview`feature phase`'),
83
+ description: gettext('The feature is available for public preview and can be used by all users. It is disabled by default.')
84
+ },
85
+ PRIVATE_PREVIEW: {
86
+ class: 'tag--default',
87
+ name: gettext('Private preview`feature phase`'),
88
+ description: gettext('The feature is in private preview and available to a selected set of users. It is disabled by default.')
89
+ },
90
+ GENERALLY_AVAILABLE: {
91
+ class: 'tag--success',
92
+ name: gettext('Generally available`feature phase`'),
93
+ description: gettext('The feature is generally available and can be used by all users. It is enabled by default.')
94
+ }
95
+ };
96
+ this.phaseKeysOrder = [
97
+ 'PRIVATE_PREVIEW',
98
+ 'PUBLIC_PREVIEW',
99
+ 'GENERALLY_AVAILABLE'
100
+ ];
101
+ this.strategyDetails = [
102
+ {
103
+ key: 'DEFAULT',
104
+ class: 'tag--success',
105
+ name: gettext('Default`strategy`'),
106
+ description: gettext('The feature toggle is using the default state based on its phase.')
107
+ },
108
+ {
109
+ key: 'TENANT',
110
+ class: 'tag--info',
111
+ name: gettext('Custom`strategy`'),
112
+ description: gettext('The feature toggle has been customized. When the phase of the feature changes, the custom state remains unchanged.')
113
+ }
114
+ ];
115
+ this.activatedRoute = inject(ActivatedRoute, { optional: true });
116
+ this.featureToggle = inject(FeatureService);
117
+ this.alertService = inject(AlertService);
118
+ this.permissions = inject(Permissions);
119
+ this.isManagementTenant = inject(AppStateService).currentTenant.value?.name === 'management';
120
+ this.contextRouteService = inject(ContextRouteService);
121
+ this.items = this.activatedRoute?.snapshot.data['features'] || [];
122
+ }
123
+ async ngOnInit() {
124
+ await this.reload();
125
+ }
126
+ async reload() {
127
+ let { data: toggles } = await this.featureToggle.list({ pageSize: 1000 });
128
+ toggles = toggles.filter(toggle => toggle.phase !== 'IN_DEVELOPMENT' &&
129
+ (toggle.phase !== 'PRIVATE_PREVIEW' || toggle.active === true));
130
+ this.hasPrivatePreviewFeatures = toggles.some(toggle => toggle.phase === 'PRIVATE_PREVIEW');
131
+ const contextData = this.contextRouteService.getContextData(this.activatedRoute);
132
+ if (!contextData) {
133
+ this.items = toggles.map(toggle => ({ ...toggle, id: toggle.key }));
134
+ return;
135
+ }
136
+ const tenantId = contextData.contextData.id;
137
+ const promises = toggles.map(toggle => {
138
+ return this.featureToggle.detailByTenant(toggle.key).then(({ data }) => {
139
+ const override = data.find(ft => ft.tenantId === tenantId);
140
+ if (override) {
141
+ return {
142
+ ...toggle,
143
+ id: toggle.key,
144
+ strategy: 'TENANT',
145
+ active: override.active
146
+ };
147
+ }
148
+ return {
149
+ ...toggle,
150
+ id: toggle.key,
151
+ strategy: 'DEFAULT',
152
+ active: toggle.phase === 'GENERALLY_AVAILABLE'
153
+ };
154
+ });
155
+ });
156
+ const results = await Promise.all(promises);
157
+ this.items = results;
158
+ }
159
+ async updateFeature(feature, newActiveValue) {
160
+ try {
161
+ const contextData = this.contextRouteService.getContextData(this.activatedRoute);
162
+ if (contextData) {
163
+ const tenantId = contextData.contextData.id;
164
+ await this.featureToggle.updateFeatureByTenant({
165
+ key: feature.key,
166
+ active: newActiveValue
167
+ }, tenantId);
168
+ }
169
+ else {
170
+ await this.featureToggle.updateFeature({ key: feature.key, active: newActiveValue });
171
+ }
172
+ if (newActiveValue) {
173
+ this.alertService.success(gettext('Feature enabled.'));
174
+ }
175
+ else {
176
+ this.alertService.success(gettext('Feature disabled.'));
177
+ }
178
+ }
179
+ catch (e) {
180
+ console.error('Error updating feature:', e);
181
+ if (newActiveValue) {
182
+ this.alertService.warning(gettext('Failed to enable feature.'));
183
+ }
184
+ else {
185
+ this.alertService.warning(gettext('Failed to disable feature.'));
186
+ }
187
+ }
188
+ await this.reload();
189
+ }
190
+ async removeTenantOverride(feature) {
191
+ try {
192
+ const contextData = this.contextRouteService.getContextData(this.activatedRoute);
193
+ if (contextData) {
194
+ const tenantId = contextData.contextData.id;
195
+ await this.featureToggle.removeTenantOverrideByTenant(feature, tenantId);
196
+ }
197
+ else {
198
+ await this.featureToggle.removeTenantOverride(feature);
199
+ }
200
+ this.alertService.success(gettext('Feature reset to default state.'));
201
+ }
202
+ catch (e) {
203
+ console.error('Error removing feature override:', e);
204
+ this.alertService.warning(gettext('Failed to reset feature state.'));
205
+ }
206
+ await this.reload();
207
+ }
208
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FeatureToggleListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", 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" }] }); }
210
+ }
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FeatureToggleListComponent, decorators: [{
212
+ type: Component,
213
+ args: [{ selector: 'c8y-feature-toggle-list', imports: [
214
+ TitleComponent,
215
+ C8yTranslateDirective,
216
+ C8yTranslatePipe,
217
+ DataGridComponent,
218
+ EmptyStateComponent,
219
+ CellRendererDefDirective,
220
+ ColumnDirective,
221
+ PopoverDirective,
222
+ NgClass,
223
+ FormsModule,
224
+ CanToggleStatusOfFeatureTogglePipe,
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" }]
227
+ }], ctorParameters: () => [] });
228
+
229
+ const childRoutes = [
230
+ {
231
+ path: '',
232
+ pathMatch: 'full',
233
+ component: FeatureToggleListComponent
234
+ }
235
+ ];
236
+
237
+ /**
238
+ * Generated bundle index. Do not edit.
239
+ */
240
+
241
+ export { FeatureToggleListComponent, childRoutes };
242
+ //# sourceMappingURL=c8y-ngx-components-feature-toggles-list.mjs.map
@@ -0,0 +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,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAlC,kCAAkC,EAAA,YAAA,EA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,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;;;;"}
@@ -0,0 +1,36 @@
1
+ import { inject } from '@angular/core';
2
+ import { hookNavigator, hookRoute, NavigatorNode, AppStateService, ViewContext } from '@c8y/ngx-components';
3
+ import { gettext } from '@c8y/ngx-components/gettext';
4
+
5
+ const featureTogglePath = 'feature-toggles';
6
+ const featureToggleProviders = [
7
+ hookNavigator(new NavigatorNode({
8
+ path: featureTogglePath,
9
+ label: gettext('Feature toggles'),
10
+ icon: 'toggle-on',
11
+ parent: 'Settings'
12
+ })),
13
+ hookRoute({
14
+ path: featureTogglePath,
15
+ context: ViewContext.Tenant,
16
+ loadChildren: () => import('@c8y/ngx-components/feature-toggles/list').then(m => m.childRoutes),
17
+ icon: 'toggle-on',
18
+ label: gettext('Feature toggles'),
19
+ canActivate: [
20
+ () => {
21
+ return inject(AppStateService).currentTenant.value?.name === 'management';
22
+ }
23
+ ]
24
+ }),
25
+ hookRoute({
26
+ path: featureTogglePath,
27
+ loadChildren: () => import('@c8y/ngx-components/feature-toggles/list').then(m => m.childRoutes)
28
+ })
29
+ ];
30
+
31
+ /**
32
+ * Generated bundle index. Do not edit.
33
+ */
34
+
35
+ export { featureToggleProviders };
36
+ //# sourceMappingURL=c8y-ngx-components-feature-toggles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-feature-toggles.mjs","sources":["../../feature-toggles/index.ts","../../feature-toggles/c8y-ngx-components-feature-toggles.ts"],"sourcesContent":["import { inject, Provider } from '@angular/core';\nimport {\n AppStateService,\n hookNavigator,\n hookRoute,\n NavigatorNode,\n ViewContext\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\n\nconst featureTogglePath = 'feature-toggles' as const;\n\nexport const featureToggleProviders: Provider[] = [\n hookNavigator(\n new NavigatorNode({\n path: featureTogglePath,\n label: gettext('Feature toggles'),\n icon: 'toggle-on',\n parent: 'Settings'\n })\n ),\n hookRoute({\n path: featureTogglePath,\n context: ViewContext.Tenant,\n loadChildren: () => import('@c8y/ngx-components/feature-toggles/list').then(m => m.childRoutes),\n icon: 'toggle-on',\n label: gettext('Feature toggles'),\n canActivate: [\n () => {\n return inject(AppStateService).currentTenant.value?.name === 'management';\n }\n ]\n }),\n hookRoute({\n path: featureTogglePath,\n loadChildren: () => import('@c8y/ngx-components/feature-toggles/list').then(m => m.childRoutes)\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAUA,MAAM,iBAAiB,GAAG,iBAA0B;AAE7C,MAAM,sBAAsB,GAAe;IAChD,aAAa,CACX,IAAI,aAAa,CAAC;AAChB,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC;AACjC,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,MAAM,EAAE;AACT,KAAA,CAAC,CACH;AACD,IAAA,SAAS,CAAC;AACR,QAAA,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,QAAA,YAAY,EAAE,MAAM,OAAO,0CAA0C,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;AAC/F,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC;AACjC,QAAA,WAAW,EAAE;AACX,YAAA,MAAK;AACH,gBAAA,OAAO,MAAM,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,KAAK,YAAY;YAC3E;AACD;KACF,CAAC;AACF,IAAA,SAAS,CAAC;AACR,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,YAAY,EAAE,MAAM,OAAO,0CAA0C,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW;KAC/F;;;ACpCH;;AAEG;;;;"}
@@ -7992,6 +7992,11 @@ class GlobalContextInlineComponent {
7992
7992
  this.config = input(null, ...(ngDevMode ? [{ debugName: "config" }] : []));
7993
7993
  this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
7994
7994
  this.dashboardChildForLegacy = input(...(ngDevMode ? [undefined, { debugName: "dashboardChildForLegacy" }] : []));
7995
+ /**
7996
+ * When true, disables refresh event emissions.
7997
+ * Use when widget handles its own data refresh (e.g., via realtime subscriptions).
7998
+ */
7999
+ this.disableRefreshEmits = input(false, ...(ngDevMode ? [{ debugName: "disableRefreshEmits" }] : []));
7995
8000
  // --- Outputs ---
7996
8001
  this.refresh = output();
7997
8002
  this.globalContextChange = output();
@@ -8166,6 +8171,9 @@ class GlobalContextInlineComponent {
8166
8171
  });
8167
8172
  }
8168
8173
  onLocalRefreshTrigger() {
8174
+ if (this.disableRefreshEmits()) {
8175
+ return;
8176
+ }
8169
8177
  const outcome = this.processRefreshEvent({
8170
8178
  globalDateTimeContext: this.getGlobalState().dateTimeContext ?? this.config()?.dateTimeContext ?? null
8171
8179
  });
@@ -8368,7 +8376,7 @@ class GlobalContextInlineComponent {
8368
8376
  subscribeToGlobalRefreshEvents() {
8369
8377
  this.globalContextEventService
8370
8378
  .on(GLOBAL_CONTEXT_EVENTS.REFRESH)
8371
- .pipe(takeUntilDestroyed(this.destroyReference))
8379
+ .pipe(filter$1(() => !this.disableRefreshEmits()), takeUntilDestroyed(this.destroyReference))
8372
8380
  .subscribe(dateTimeContext => {
8373
8381
  if (dateTimeContext) {
8374
8382
  this.handleGlobalRefresh(dateTimeContext);
@@ -8505,7 +8513,7 @@ class GlobalContextInlineComponent {
8505
8513
  };
8506
8514
  }
8507
8515
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8508
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextInlineComponent, isStandalone: true, selector: "c8y-global-context-inline", inputs: { widgetControls: { classPropertyName: "widgetControls", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh", globalContextChange: "globalContextChange" }, providers: [GlobalContextInlineOrchestratorService], viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["globalContextInline"], ngImport: i0, template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 inner-scroll\"\n [ngClass]=\"{\n 'p-b-8':\n settings.showTimeContext ||\n settings.showRefresh ||\n settings.showAutoRefresh ||\n settings.showAggregation\n }\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: GlobalContextLinkControlsComponent, selector: "c8y-global-context-link-controls", inputs: ["linkStates", "controlConfigs"], outputs: ["allLinksToggled"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8516
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextInlineComponent, isStandalone: true, selector: "c8y-global-context-inline", inputs: { widgetControls: { classPropertyName: "widgetControls", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null }, disableRefreshEmits: { classPropertyName: "disableRefreshEmits", publicName: "disableRefreshEmits", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh", globalContextChange: "globalContextChange" }, providers: [GlobalContextInlineOrchestratorService], viewQueries: [{ propertyName: "headerTemplateRef", first: true, predicate: ["headerContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["globalContextInline"], ngImport: i0, template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 inner-scroll\"\n [ngClass]=\"{\n 'p-b-8':\n settings.showTimeContext ||\n settings.showRefresh ||\n settings.showAutoRefresh ||\n settings.showAggregation\n }\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: GlobalContextLinkControlsComponent, selector: "c8y-global-context-link-controls", inputs: ["linkStates", "controlConfigs"], outputs: ["allLinksToggled"] }, { kind: "component", type: AggregationPickerComponent, selector: "c8y-aggregation-picker", inputs: ["disabledAggregations", "resetToDefault", "layout"] }, { kind: "component", type: AutoRefreshControlComponent, selector: "c8y-auto-refresh-control", inputs: ["isAutoRefreshConnected", "autoRefreshSeconds", "disableCounter", "isEnabled", "isLoading"], outputs: ["loadingChange", "refresh"] }, { kind: "component", type: DateTimeContextPickerComponent, selector: "c8y-date-time-context-picker", inputs: ["disabled", "shouldDisableInterval", "config"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8509
8517
  }
8510
8518
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextInlineComponent, decorators: [{
8511
8519
  type: Component,
@@ -8521,7 +8529,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
8521
8529
  NgTemplateOutlet,
8522
8530
  NgClass
8523
8531
  ], selector: 'c8y-global-context-inline', exportAs: 'globalContextInline', providers: [GlobalContextInlineOrchestratorService], template: "<ng-template #headerContent>\n @let linkModel = linkDisplayModel();\n <ng-content select=\"#header\"></ng-content>\n\n @if (shouldShowHeaderLinks()) {\n <c8y-global-context-link-controls\n [linkStates]=\"linkModel.linkStates\"\n [controlConfigs]=\"linkModel.controlConfig\"\n (allLinksToggled)=\"toggleAllLinks($event)\"\n ></c8y-global-context-link-controls>\n }\n</ng-template>\n\n<ng-template #inlineContent>\n @let settings = inlineSettings();\n @let linkModel = linkDisplayModel();\n\n @if (form && settings) {\n <form\n class=\"d-flex gap-16 p-l-16 p-r-16 inner-scroll\"\n [ngClass]=\"{\n 'p-b-8':\n settings.showTimeContext ||\n settings.showRefresh ||\n settings.showAutoRefresh ||\n settings.showAggregation\n }\"\n [formGroup]=\"form\"\n >\n <div class=\"input-group w-auto input-group-sm\">\n @if (settings.showAggregation) {\n <c8y-aggregation-picker\n data-cy=\"global-inline-date-context--Aggregation-display\"\n [disabledAggregations]=\"getDisabledAggregations()\"\n formControlName=\"aggregation\"\n [resetToDefault]=\"true\"\n ></c8y-aggregation-picker>\n }\n\n @if (settings.showAutoRefresh) {\n <c8y-auto-refresh-control\n [isLoading]=\"isLoading()\"\n [disableCounter]=\"shouldDisableCounter\"\n formControlName=\"isAutoRefreshEnabled\"\n [autoRefreshSeconds]=\"getAutoRefreshSeconds()\"\n [isAutoRefreshConnected]=\"linkModel.linkStates.isAutoRefreshEnabled ?? false\"\n (refresh)=\"onLocalRefreshTrigger()\"\n ></c8y-auto-refresh-control>\n }\n\n @if (settings.showTimeContext) {\n @let isHistoryMode = form.get('refreshOption')?.value === REFRESH_OPTION.HISTORY;\n <c8y-date-time-context-picker\n style=\"margin-left: -1px\"\n formControlName=\"dateTimeContext\"\n [shouldDisableInterval]=\"getIntervalDisableConfig()\"\n [config]=\"\n isHistoryMode\n ? { showDateTo: true, showDateFrom: true }\n : { showDateTo: false, showDateFrom: true }\n \"\n ></c8y-date-time-context-picker>\n }\n\n @if (settings.showRefresh) {\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Refresh' | translate\"\n [tooltip]=\"'Refresh' | translate\"\n placement=\"bottom\"\n container=\"body\"\n type=\"button\"\n data-cy=\"global-inline-date-context--reload-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n [disabled]=\"isLoading()\"\n (click)=\"refresh.emit(null)\"\n >\n <i\n [class.icon-spin]=\"isLoading()\"\n [c8yIcon]=\"'refresh'\"\n ></i>\n </button>\n </div>\n }\n </div>\n </form>\n }\n\n <ng-content select=\"#body\"></ng-content>\n</ng-template>\n\n@switch (effectiveConfig().displayMode) {\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.CONFIG) {\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @case (GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n @default {\n @if (shouldRenderHeaderInline()) {\n <ng-container [ngTemplateOutlet]=\"headerContent\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"inlineContent\"></ng-container>\n }\n}\n" }]
8524
- }], ctorParameters: () => [], propDecorators: { widgetControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], refresh: [{ type: i0.Output, args: ["refresh"] }], globalContextChange: [{ type: i0.Output, args: ["globalContextChange"] }], headerTemplateRef: [{
8532
+ }], ctorParameters: () => [], propDecorators: { widgetControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], disableRefreshEmits: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRefreshEmits", required: false }] }], refresh: [{ type: i0.Output, args: ["refresh"] }], globalContextChange: [{ type: i0.Output, args: ["globalContextChange"] }], headerTemplateRef: [{
8525
8533
  type: ViewChild,
8526
8534
  args: ['headerContent', { static: true, read: TemplateRef }]
8527
8535
  }] } });
@@ -10467,6 +10475,11 @@ class GlobalContextWidgetWrapperComponent {
10467
10475
  this.controlLinks = input({}, ...(ngDevMode ? [{ debugName: "controlLinks" }] : []));
10468
10476
  this.dashboardChildForLegacy = input(...(ngDevMode ? [undefined, { debugName: "dashboardChildForLegacy" }] : []));
10469
10477
  this.config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : []));
10478
+ /**
10479
+ * When true, disables refresh event emissions.
10480
+ * Use when widget handles its own data refresh (e.g., via realtime subscriptions).
10481
+ */
10482
+ this.disableRefreshEmits = input(false, ...(ngDevMode ? [{ debugName: "disableRefreshEmits" }] : []));
10470
10483
  // --- State Management ---
10471
10484
  this.internalConfig = signal({}, ...(ngDevMode ? [{ debugName: "internalConfig" }] : []));
10472
10485
  // Latest global snapshot cached for child config updates on mode change
@@ -10604,7 +10617,7 @@ class GlobalContextWidgetWrapperComponent {
10604
10617
  return diff;
10605
10618
  }
10606
10619
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextWidgetWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10607
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextWidgetWrapperComponent, isStandalone: true, selector: "c8y-global-context-widget-wrapper", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, widgetControlsConfig: { classPropertyName: "widgetControlsConfig", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, controlLinks: { classPropertyName: "controlLinks", publicName: "controlLinks", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { globalContextChange: "globalContextChange" }, host: { classAttribute: "sticky-top bg-component d-block min-width-0" }, queries: [{ propertyName: "widgetBodyRef", first: true, predicate: ["widgetBody"], descendants: true }, { propertyName: "widgetHeaderRef", first: true, predicate: ["widgetHeader"], descendants: true }], viewQueries: [{ propertyName: "globalContextInlineComponent", first: true, predicate: GlobalContextInlineComponent, descendants: true }], ngImport: i0, template: `
10620
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextWidgetWrapperComponent, isStandalone: true, selector: "c8y-global-context-widget-wrapper", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, widgetControlsConfig: { classPropertyName: "widgetControlsConfig", publicName: "widgetControls", isSignal: true, isRequired: true, transformFunction: null }, controlLinks: { classPropertyName: "controlLinks", publicName: "controlLinks", isSignal: true, isRequired: false, transformFunction: null }, dashboardChildForLegacy: { classPropertyName: "dashboardChildForLegacy", publicName: "dashboardChildForLegacy", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, disableRefreshEmits: { classPropertyName: "disableRefreshEmits", publicName: "disableRefreshEmits", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { globalContextChange: "globalContextChange" }, host: { classAttribute: "sticky-top bg-component d-block min-width-0" }, queries: [{ propertyName: "widgetBodyRef", first: true, predicate: ["widgetBody"], descendants: true }, { propertyName: "widgetHeaderRef", first: true, predicate: ["widgetHeader"], descendants: true }], viewQueries: [{ propertyName: "globalContextInlineComponent", first: true, predicate: GlobalContextInlineComponent, descendants: true }], ngImport: i0, template: `
10608
10621
  @if (widgetControls()) {
10609
10622
  @let GLOBAL_CONTEXT_CONFIG = internalConfig();
10610
10623
  @let INLINE = WIDGET_DISPLAY_MODE.INLINE;
@@ -10621,6 +10634,7 @@ class GlobalContextWidgetWrapperComponent {
10621
10634
  [widgetControls]="widgetControls()"
10622
10635
  [isLoading]="isLoading()"
10623
10636
  [dashboardChildForLegacy]="dashboardChildForLegacy()"
10637
+ [disableRefreshEmits]="disableRefreshEmits()"
10624
10638
  (refresh)="onRefresh()"
10625
10639
  (globalContextChange)="onGlobalContextChange($event)"
10626
10640
  >
@@ -10654,7 +10668,7 @@ class GlobalContextWidgetWrapperComponent {
10654
10668
  }
10655
10669
  }
10656
10670
  }
10657
- `, isInline: true, dependencies: [{ kind: "component", type: GlobalContextInlineComponent, selector: "c8y-global-context-inline", inputs: ["widgetControls", "config", "isLoading", "dashboardChildForLegacy"], outputs: ["refresh", "globalContextChange"], exportAs: ["globalContextInline"] }, { kind: "component", type: GlobalContextWidgetConfigComponent, selector: "c8y-global-context-widget-config", inputs: ["config", "widgetControls", "isLoading"], outputs: ["displayModeChange", "refresh", "globalContextChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: PreviewControlsComponent, selector: "c8y-preview-controls", inputs: ["widgetControls", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10671
+ `, isInline: true, dependencies: [{ kind: "component", type: GlobalContextInlineComponent, selector: "c8y-global-context-inline", inputs: ["widgetControls", "config", "isLoading", "dashboardChildForLegacy", "disableRefreshEmits"], outputs: ["refresh", "globalContextChange"], exportAs: ["globalContextInline"] }, { kind: "component", type: GlobalContextWidgetConfigComponent, selector: "c8y-global-context-widget-config", inputs: ["config", "widgetControls", "isLoading"], outputs: ["displayModeChange", "refresh", "globalContextChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: PreviewControlsComponent, selector: "c8y-preview-controls", inputs: ["widgetControls", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10658
10672
  }
10659
10673
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextWidgetWrapperComponent, decorators: [{
10660
10674
  type: Component,
@@ -10688,6 +10702,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
10688
10702
  [widgetControls]="widgetControls()"
10689
10703
  [isLoading]="isLoading()"
10690
10704
  [dashboardChildForLegacy]="dashboardChildForLegacy()"
10705
+ [disableRefreshEmits]="disableRefreshEmits()"
10691
10706
  (refresh)="onRefresh()"
10692
10707
  (globalContextChange)="onGlobalContextChange($event)"
10693
10708
  >
@@ -10732,7 +10747,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
10732
10747
  }], globalContextInlineComponent: [{
10733
10748
  type: ViewChild,
10734
10749
  args: [GlobalContextInlineComponent]
10735
- }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], widgetControlsConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], controlLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlLinks", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], globalContextChange: [{
10750
+ }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], widgetControlsConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetControls", required: true }] }], controlLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlLinks", required: false }] }], dashboardChildForLegacy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChildForLegacy", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], disableRefreshEmits: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRefreshEmits", required: false }] }], globalContextChange: [{
10736
10751
  type: Output
10737
10752
  }] } });
10738
10753