@c8y/ngx-components 1023.10.1 → 1023.14.2

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 (56) hide show
  1. package/context-dashboard/index.d.ts +11 -2
  2. package/context-dashboard/index.d.ts.map +1 -1
  3. package/datapoint-explorer/index.d.ts +78 -1
  4. package/datapoint-explorer/index.d.ts.map +1 -1
  5. package/datapoint-explorer/view/index.d.ts +150 -14
  6. package/datapoint-explorer/view/index.d.ts.map +1 -1
  7. package/echart/index.d.ts +12 -2
  8. package/echart/index.d.ts.map +1 -1
  9. package/echart/models/index.d.ts +12 -2
  10. package/echart/models/index.d.ts.map +1 -1
  11. package/fesm2022/c8y-ngx-components-alarms.mjs +2 -2
  12. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +17 -5
  14. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +388 -64
  16. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +329 -4
  18. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-echart-models.mjs +6 -1
  20. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-echart.mjs +6 -1
  22. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-global-context.mjs +1093 -40
  24. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs +3 -4
  26. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +86 -99
  28. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +129 -17
  30. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +4 -4
  32. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components.mjs +16037 -15943
  34. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  35. package/global-context/index.d.ts +180 -4
  36. package/global-context/index.d.ts.map +1 -1
  37. package/index.d.ts +10754 -10654
  38. package/index.d.ts.map +1 -1
  39. package/locales/de.po +26 -11
  40. package/locales/es.po +25 -10
  41. package/locales/fr.po +25 -10
  42. package/locales/ja_JP.po +22 -7
  43. package/locales/ko.po +24 -11
  44. package/locales/locales.pot +23 -8
  45. package/locales/nl.po +26 -10
  46. package/locales/pl.po +25 -10
  47. package/locales/pt_BR.po +25 -10
  48. package/locales/zh_CN.po +24 -9
  49. package/locales/zh_TW.po +26 -10
  50. package/package.json +1 -1
  51. package/widgets/definitions/alarms/alarm-list/index.d.ts +1 -2
  52. package/widgets/definitions/alarms/alarm-list/index.d.ts.map +1 -1
  53. package/widgets/implementations/alarms/index.d.ts +35 -28
  54. package/widgets/implementations/alarms/index.d.ts.map +1 -1
  55. package/widgets/implementations/datapoints-graph/index.d.ts +19 -5
  56. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
@@ -29,7 +29,7 @@ import * as i1$3 from 'ngx-bootstrap/dropdown';
29
29
  import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
30
30
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
31
31
  import { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';
32
- import { GlobalContextWidgetWrapperComponent } from '@c8y/ngx-components/global-context';
32
+ import { GlobalContextWidgetWrapperComponent, ConfigModeControlsComponent } from '@c8y/ngx-components/global-context';
33
33
 
34
34
  const newDashboardTab = {
35
35
  featureId: 'newDashboard',
@@ -4301,26 +4301,38 @@ class GlobalContextSectionComponent {
4301
4301
  constructor() {
4302
4302
  this.widgetConfigService = inject(WidgetConfigService);
4303
4303
  }
4304
+ /** Whether to use the new controls-based approach */
4305
+ get useControls() {
4306
+ return !!this.controls;
4307
+ }
4304
4308
  onGlobalContext(event) {
4305
4309
  if (isEmpty(event.diff)) {
4306
4310
  return;
4307
4311
  }
4308
4312
  this.widgetConfigService.updateConfig(event.context);
4309
4313
  }
4314
+ onConfigChange(event) {
4315
+ if (isEmpty(event.diff)) {
4316
+ return;
4317
+ }
4318
+ this.widgetConfigService.updateConfig(event.context);
4319
+ }
4310
4320
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4311
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: GlobalContextSectionComponent, isStandalone: true, selector: "c8y-global-context-section", inputs: { widgetControls: "widgetControls" }, ngImport: i0, template: "<div>\n <c8y-global-context-widget-wrapper\n *ngIf=\"widgetControls\"\n [widgetControls]=\"widgetControls\"\n [displayMode]=\"'config'\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n</div>\n\n<c8y-widget-config-feedback>\n <span class=\"tag tag--info chip text-12 m-4\">\n <span\n class=\"text-truncate\"\n [title]=\"'The time context can only get changed in the configuration.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'config'\"\n translate\n >\n Configuration\n </span>\n <span\n [title]=\"'The widget is bound to the global time context.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'dashboard'\"\n translate\n >\n Dashboard\n </span>\n <span\n [title]=\"'The time context can be configured in the widget view mode.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'view_and_config'\"\n translate\n >\n Configuration and widget view\n </span>\n </span>\n</c8y-widget-config-feedback>\n", dependencies: [{ kind: "component", type: GlobalContextWidgetWrapperComponent, selector: "c8y-global-context-widget-wrapper", inputs: ["isLoading", "displayMode", "widgetControls", "controlLinks", "dashboardChildForLegacy", "config"], outputs: ["globalContextChange"] }, { kind: "component", type: WidgetConfigFeedbackComponent, selector: "c8y-widget-config-feedback" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
4321
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: GlobalContextSectionComponent, isStandalone: true, selector: "c8y-global-context-section", inputs: { widgetControls: "widgetControls", controls: "controls" }, ngImport: i0, template: "<div>\n @if (useControls) {\n <c8y-config-mode-controls\n [controls]=\"controls\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (configChange)=\"onConfigChange($event)\"\n ></c8y-config-mode-controls>\n } @else if (widgetControls) {\n <c8y-global-context-widget-wrapper\n [widgetControls]=\"widgetControls\"\n [displayMode]=\"'config'\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n }\n</div>\n\n<c8y-widget-config-feedback>\n <span class=\"tag tag--info chip text-12 m-4\">\n @if (widgetConfigService.currentConfig.displayMode === 'config') {\n <span\n class=\"text-truncate\"\n [title]=\"'The time context can only get changed in the configuration.' | translate\"\n translate\n >\n Configuration\n </span>\n }\n @if (widgetConfigService.currentConfig.displayMode === 'dashboard') {\n <span\n [title]=\"'The widget is bound to the global time context.' | translate\"\n translate\n >\n Dashboard\n </span>\n }\n @if (widgetConfigService.currentConfig.displayMode === 'view_and_config') {\n <span\n [title]=\"'The time context can be configured in the widget view mode.' | translate\"\n translate\n >\n Configuration and widget view\n </span>\n }\n </span>\n</c8y-widget-config-feedback>\n", dependencies: [{ kind: "component", type: GlobalContextWidgetWrapperComponent, selector: "c8y-global-context-widget-wrapper", inputs: ["isLoading", "displayMode", "widgetControls", "controlLinks", "dashboardChildForLegacy", "config"], outputs: ["globalContextChange"] }, { kind: "component", type: ConfigModeControlsComponent, selector: "c8y-config-mode-controls", inputs: ["controls", "config"], outputs: ["configChange"] }, { kind: "component", type: WidgetConfigFeedbackComponent, selector: "c8y-widget-config-feedback" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
4312
4322
  }
4313
4323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: GlobalContextSectionComponent, decorators: [{
4314
4324
  type: Component,
4315
4325
  args: [{ selector: 'c8y-global-context-section', standalone: true, imports: [
4316
4326
  GlobalContextWidgetWrapperComponent,
4327
+ ConfigModeControlsComponent,
4317
4328
  AsyncPipe,
4318
4329
  WidgetConfigFeedbackComponent,
4319
- C8yTranslatePipe,
4320
- NgIf
4321
- ], template: "<div>\n <c8y-global-context-widget-wrapper\n *ngIf=\"widgetControls\"\n [widgetControls]=\"widgetControls\"\n [displayMode]=\"'config'\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n</div>\n\n<c8y-widget-config-feedback>\n <span class=\"tag tag--info chip text-12 m-4\">\n <span\n class=\"text-truncate\"\n [title]=\"'The time context can only get changed in the configuration.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'config'\"\n translate\n >\n Configuration\n </span>\n <span\n [title]=\"'The widget is bound to the global time context.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'dashboard'\"\n translate\n >\n Dashboard\n </span>\n <span\n [title]=\"'The time context can be configured in the widget view mode.' | translate\"\n *ngIf=\"widgetConfigService.currentConfig.displayMode === 'view_and_config'\"\n translate\n >\n Configuration and widget view\n </span>\n </span>\n</c8y-widget-config-feedback>\n" }]
4330
+ C8yTranslatePipe
4331
+ ], template: "<div>\n @if (useControls) {\n <c8y-config-mode-controls\n [controls]=\"controls\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (configChange)=\"onConfigChange($event)\"\n ></c8y-config-mode-controls>\n } @else if (widgetControls) {\n <c8y-global-context-widget-wrapper\n [widgetControls]=\"widgetControls\"\n [displayMode]=\"'config'\"\n [config]=\"widgetConfigService.currentConfig$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n }\n</div>\n\n<c8y-widget-config-feedback>\n <span class=\"tag tag--info chip text-12 m-4\">\n @if (widgetConfigService.currentConfig.displayMode === 'config') {\n <span\n class=\"text-truncate\"\n [title]=\"'The time context can only get changed in the configuration.' | translate\"\n translate\n >\n Configuration\n </span>\n }\n @if (widgetConfigService.currentConfig.displayMode === 'dashboard') {\n <span\n [title]=\"'The widget is bound to the global time context.' | translate\"\n translate\n >\n Dashboard\n </span>\n }\n @if (widgetConfigService.currentConfig.displayMode === 'view_and_config') {\n <span\n [title]=\"'The time context can be configured in the widget view mode.' | translate\"\n translate\n >\n Configuration and widget view\n </span>\n }\n </span>\n</c8y-widget-config-feedback>\n" }]
4322
4332
  }], propDecorators: { widgetControls: [{
4323
4333
  type: Input
4334
+ }], controls: [{
4335
+ type: Input
4324
4336
  }] } });
4325
4337
 
4326
4338
  /**