@c8y/ngx-components 1023.37.0 → 1023.42.1

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 (36) hide show
  1. package/context-dashboard/index.d.ts.map +1 -1
  2. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -1
  3. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  4. package/fesm2022/c8y-ngx-components-global-context.mjs +39 -11
  5. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  6. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +2 -2
  7. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  8. package/fesm2022/c8y-ngx-components-upgrade.mjs +13 -1
  9. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  10. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +1 -1
  11. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  12. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -2
  13. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  14. package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +156 -67
  15. package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
  16. package/fesm2022/c8y-ngx-components.mjs +10 -2
  17. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  18. package/global-context/index.d.ts +11 -2
  19. package/global-context/index.d.ts.map +1 -1
  20. package/index.d.ts +5 -0
  21. package/index.d.ts.map +1 -1
  22. package/locales/de.po +189 -93
  23. package/locales/es.po +129 -33
  24. package/locales/fr.po +287 -186
  25. package/locales/ja_JP.po +334 -238
  26. package/locales/ko.po +130 -34
  27. package/locales/locales.pot +12 -9
  28. package/locales/nl.po +130 -34
  29. package/locales/pl.po +129 -33
  30. package/locales/pt_BR.po +130 -34
  31. package/locales/zh_CN.po +129 -33
  32. package/locales/zh_TW.po +130 -34
  33. package/package.json +1 -1
  34. package/upgrade/index.d.ts.map +1 -1
  35. package/widgets/implementations/markdown/index.d.ts +52 -18
  36. package/widgets/implementations/markdown/index.d.ts.map +1 -1
@@ -8181,6 +8181,12 @@ class GlobalContextInlineComponent {
8181
8181
  this.refresh.emit(null);
8182
8182
  }
8183
8183
  }
8184
+ /**
8185
+ * Sets the auto-refresh form control value without affecting link states.
8186
+ * Used when AngularJS widgets update their config directly (e.g., drag X axis in DPE 1.0).
8187
+ * Note: This only updates the form value, NOT calling pauseAutoRefresh() which would
8188
+ * also unlink controls and break the global context flow for date changes.
8189
+ */
8184
8190
  setAutoRefreshEnabled(enabled) {
8185
8191
  const autoRefreshControl = this.form?.get('isAutoRefreshEnabled');
8186
8192
  if (autoRefreshControl && autoRefreshControl.value !== enabled) {
@@ -10596,6 +10602,12 @@ class GlobalContextWidgetWrapperComponent {
10596
10602
  }
10597
10603
  // Update the signal state immutably.
10598
10604
  this.internalConfig.update(cfg => merge({}, cfg, processedDiff));
10605
+ // Sync inline component's form when isAutoRefreshEnabled changes from external config.
10606
+ // This is needed for legacy AngularJS widgets that update config directly.
10607
+ // Example: drag X axis in the DPE 1.0 widget.
10608
+ if (processedDiff.isAutoRefreshEnabled !== undefined) {
10609
+ this.globalContextInlineComponent?.setAutoRefreshEnabled(processedDiff.isAutoRefreshEnabled);
10610
+ }
10599
10611
  // the widget enters config mode. This provides a consistent "reset" point for the user.
10600
10612
  if (!this.widgetInitialConfig && this.displayMode() === WIDGET_DISPLAY_MODE.CONFIG) {
10601
10613
  this.widgetInitialConfig = structuredClone(this.internalConfig());
@@ -11560,8 +11572,11 @@ class GlobalContextConnectorComponent {
11560
11572
  this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
11561
11573
  this.dashboardChild = input.required(...(ngDevMode ? [{ debugName: "dashboardChild" }] : []));
11562
11574
  this.linked = input(undefined, ...(ngDevMode ? [{ debugName: "linked" }] : []));
11575
+ /** When false, refresh events are not emitted as configChange - only user-initiated state changes */
11576
+ this.emitRefresh = input(true, ...(ngDevMode ? [{ debugName: "emitRefresh" }] : []));
11563
11577
  this.configChange = output();
11564
11578
  this.refresh = output();
11579
+ this.linkedChange = output();
11565
11580
  this.isLinked = signal(true, ...(ngDevMode ? [{ debugName: "isLinked" }] : []));
11566
11581
  this.syncExternalLinkState();
11567
11582
  this.subscribeToGlobalContext();
@@ -11574,6 +11589,7 @@ class GlobalContextConnectorComponent {
11574
11589
  }
11575
11590
  onLinkToggle(linked) {
11576
11591
  this.isLinked.set(linked);
11592
+ this.linkedChange.emit(linked);
11577
11593
  if (linked) {
11578
11594
  const cached = this.eventService.getLatestValue(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
11579
11595
  if (cached)
@@ -11628,15 +11644,20 @@ class GlobalContextConnectorComponent {
11628
11644
  if (cached)
11629
11645
  this.emitIfChanged(cached);
11630
11646
  const stateChanges$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.STATE_CHANGE);
11631
- const refresh$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.REFRESH).pipe(map$1(data => ({
11632
- ...this.config(),
11633
- dateTimeContext: {
11634
- dateFrom: data.dateFrom,
11635
- dateTo: data.dateTo,
11636
- interval: data.interval
11637
- }
11638
- })));
11639
- subscription = merge$1(stateChanges$, refresh$)
11647
+ // Only include refresh events if emitRefresh is true
11648
+ let source$ = stateChanges$;
11649
+ if (this.emitRefresh()) {
11650
+ const refresh$ = this.eventService.on(GLOBAL_CONTEXT_EVENTS.REFRESH).pipe(map$1(data => ({
11651
+ ...this.config(),
11652
+ dateTimeContext: {
11653
+ dateFrom: data.dateFrom,
11654
+ dateTo: data.dateTo,
11655
+ interval: data.interval
11656
+ }
11657
+ })));
11658
+ source$ = merge$1(stateChanges$, refresh$);
11659
+ }
11660
+ subscription = source$
11640
11661
  .pipe(takeUntilDestroyed(this.destroyRef), catchError(() => EMPTY))
11641
11662
  .subscribe(state => {
11642
11663
  if (state)
@@ -11646,6 +11667,13 @@ class GlobalContextConnectorComponent {
11646
11667
  }
11647
11668
  registerWithGlobalContext() {
11648
11669
  effect(() => {
11670
+ // Auto-unlink if not in dashboard mode
11671
+ const displayMode = this.config().displayMode;
11672
+ if (displayMode && displayMode !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
11673
+ this.isLinked.set(false);
11674
+ this.globalContextService.unregister(this.componentId);
11675
+ return;
11676
+ }
11649
11677
  if (this.isLinked()) {
11650
11678
  const settings = controlsToSettings(this.controls(), GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, this.config().refreshOption || REFRESH_OPTION.LIVE);
11651
11679
  this.globalContextService.register(this.componentId, settings);
@@ -11667,7 +11695,7 @@ class GlobalContextConnectorComponent {
11667
11695
  });
11668
11696
  }
11669
11697
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalContextConnectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11670
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextConnectorComponent, isStandalone: true, selector: "c8y-global-context-connector", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChild: { classPropertyName: "dashboardChild", publicName: "dashboardChild", isSignal: true, isRequired: true, transformFunction: null }, linked: { classPropertyName: "linked", publicName: "linked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh" }, ngImport: i0, template: `
11698
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GlobalContextConnectorComponent, isStandalone: true, selector: "c8y-global-context-connector", inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, dashboardChild: { classPropertyName: "dashboardChild", publicName: "dashboardChild", isSignal: true, isRequired: true, transformFunction: null }, linked: { classPropertyName: "linked", publicName: "linked", isSignal: true, isRequired: false, transformFunction: null }, emitRefresh: { classPropertyName: "emitRefresh", publicName: "emitRefresh", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", refresh: "refresh", linkedChange: "linkedChange" }, ngImport: i0, template: `
11671
11699
  <c8y-link-buttons
11672
11700
  [dashboardChild]="dashboardChild()"
11673
11701
  [isLinked]="isLinked()"
@@ -11715,7 +11743,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
11715
11743
  }
11716
11744
  `
11717
11745
  }]
11718
- }], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChild", required: true }] }], linked: [{ type: i0.Input, args: [{ isSignal: true, alias: "linked", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
11746
+ }], ctorParameters: () => [], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], dashboardChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardChild", required: true }] }], linked: [{ type: i0.Input, args: [{ isSignal: true, alias: "linked", required: false }] }], emitRefresh: [{ type: i0.Input, args: [{ isSignal: true, alias: "emitRefresh", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }], linkedChange: [{ type: i0.Output, args: ["linkedChange"] }] } });
11719
11747
 
11720
11748
  class LocalControlsComponent {
11721
11749
  constructor() {