@c8y/ngx-components 1023.97.4 → 1023.97.7

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 (52) hide show
  1. package/alarms/index.d.ts.map +1 -1
  2. package/context-dashboard/index.d.ts +29 -3
  3. package/context-dashboard/index.d.ts.map +1 -1
  4. package/ecosystem/index.d.ts.map +1 -1
  5. package/fesm2022/c8y-ngx-components-alarms.mjs +10 -7
  6. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  7. package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +2 -2
  8. package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs.map +1 -1
  9. package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +2 -2
  10. package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +3 -3
  12. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +2 -2
  14. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +2 -2
  16. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +2 -2
  18. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +142 -19
  20. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-ecosystem.mjs +6 -7
  22. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-report-dashboard.mjs +4 -4
  24. package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-upgrade.mjs +40 -8
  26. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +12 -5
  28. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +7 -2
  30. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +19 -0
  32. package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components.mjs +229 -31
  34. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  35. package/index.d.ts +83 -7
  36. package/index.d.ts.map +1 -1
  37. package/locales/de.po +3 -0
  38. package/locales/es.po +3 -0
  39. package/locales/fr.po +3 -0
  40. package/locales/ja_JP.po +3 -0
  41. package/locales/ko.po +3 -0
  42. package/locales/nl.po +3 -0
  43. package/locales/pl.po +3 -0
  44. package/locales/pt_BR.po +3 -0
  45. package/locales/zh_CN.po +3 -0
  46. package/locales/zh_TW.po +3 -0
  47. package/package.json +1 -1
  48. package/upgrade/index.d.ts +8 -0
  49. package/upgrade/index.d.ts.map +1 -1
  50. package/widgets/implementations/asset-table/index.d.ts.map +1 -1
  51. package/widgets/implementations/quick-links/index.d.ts.map +1 -1
  52. package/widgets/implementations/three-d-rotation/index.d.ts.map +1 -1
package/index.d.ts CHANGED
@@ -5543,6 +5543,7 @@ declare class HeaderService extends StateService {
5543
5543
  titlePrefix: string;
5544
5544
  } | undefined;
5545
5545
  readonly DELAY_TO_AVOID_FLICKERING_ON_ASYNC_NODES = 1000;
5546
+ private navOpenSubscription?;
5546
5547
  constructor(options: OptionsService, humanizeAppName: HumanizeAppNamePipe, drawerService: DrawerService, serviceRegistry: ServiceRegistry);
5547
5548
  get state(): Header;
5548
5549
  get navigatorHiddenOnStartup(): boolean;
@@ -7836,9 +7837,10 @@ declare class TitleOutletComponent {
7836
7837
  private headerService;
7837
7838
  private element;
7838
7839
  private zone;
7840
+ private destroyRef;
7839
7841
  title: any;
7840
7842
  pageTitleUpdate: boolean;
7841
- constructor(headerService: HeaderService, element: ElementRef, zone: NgZone);
7843
+ constructor(headerService: HeaderService, element: ElementRef, zone: NgZone, destroyRef: DestroyRef);
7842
7844
  static ɵfac: i0.ɵɵFactoryDeclaration<TitleOutletComponent, never>;
7843
7845
  static ɵcmp: i0.ɵɵComponentDeclaration<TitleOutletComponent, "c8y-title-outlet", never, {}, {}, never, never, true, never>;
7844
7846
  }
@@ -12047,6 +12049,11 @@ declare class NavigatorNodeComponent implements AfterViewInit, OnChanges, OnDest
12047
12049
  */
12048
12050
  confirm: PopoverConfirmComponent;
12049
12051
  private viewInitTimeout;
12052
+ /**
12053
+ * The bound updateIcon callback stored on the (long-lived) navigator node, kept as a field so it
12054
+ * can be identity-compared and cleared on destroy — otherwise the node retains this component.
12055
+ */
12056
+ private refreshCallbackRef;
12050
12057
  /**
12051
12058
  * A subject that is triggered as soon as the navigator node is initialized.
12052
12059
  */
@@ -17645,6 +17652,15 @@ declare class DynamicComponentComponent implements OnDestroy {
17645
17652
  dynamicComponentErrorStrategy: typeof DynamicComponentErrorStrategy;
17646
17653
  private destroy$;
17647
17654
  private componentRef;
17655
+ /**
17656
+ * `ngOnChanges` is async (it awaits the component lookup, lazy chunk loading and resolvers), so a
17657
+ * navigation can destroy this host while a (re-)creation is still in flight. Creating the widget
17658
+ * after destroy would insert it into the destroyed `ViewContainerRef` — such a view is never
17659
+ * destroyed and permanently retains the whole detached dashboard DOM (Angular keeps every live
17660
+ * view in an internal registry until it is destroyed). This flag lets the pending async work
17661
+ * bail out instead.
17662
+ */
17663
+ private isDestroyed;
17648
17664
  /**
17649
17665
  * @ignore only DI
17650
17666
  */
@@ -18294,6 +18310,15 @@ declare class DashboardChildComponent implements DashboardChildDimension {
18294
18310
  dashboard: DashboardComponent;
18295
18311
  private sanitizer;
18296
18312
  element: ElementRef;
18313
+ private static readonly WIDGET_THEME_FOUNDATION_MAP;
18314
+ private static readonly MD_BOOTSTRAP_BREAKPOINT_READONLY_CLASS_PROPERTY;
18315
+ /**
18316
+ * Emits true in one-column (mobile) view. SHARED across all instances via a single static
18317
+ * `window 'resize'` subscription — previously every widget card created its own listener +
18318
+ * debounce timer (N per dashboard), wasteful on dashboards with many widgets. One listener now
18319
+ * serves them all (refCount:false keeps it warm for the app's lifetime).
18320
+ */
18321
+ private static readonly oneColumnView$;
18297
18322
  actions: DashboardChildActionComponent[];
18298
18323
  set templateActions(actions: DashboardChildActionComponent[]);
18299
18324
  dragSource: CdkDrag;
@@ -18305,7 +18330,6 @@ declare class DashboardChildComponent implements DashboardChildDimension {
18305
18330
  _pxWidth: string;
18306
18331
  _pxHeight: string;
18307
18332
  fullscreen: boolean;
18308
- readonly MD_BOOTSTRAP_BREAKPOINT_READONLY_CLASS_PROPERTY = 768;
18309
18333
  /**
18310
18334
  * The x position of the child.
18311
18335
  */
@@ -18372,14 +18396,18 @@ declare class DashboardChildComponent implements DashboardChildDimension {
18372
18396
  * Updates the pixel height of the child (used for resizing)
18373
18397
  */
18374
18398
  set pxHeight(value: any);
18375
- /**
18376
- * Triggers on every resize and returns true if in one column view (mobile view)
18377
- */
18399
+ /** Triggers on resize and returns true if in one column view (mobile view). */
18378
18400
  isOneColumnView$: Observable<boolean>;
18379
18401
  /**
18380
18402
  * An indicator if the child is intersected (that mean visible for the user)
18381
18403
  */
18382
18404
  intersected: boolean;
18405
+ /**
18406
+ * Observes this card's element to lazily mount its content. Kept as a field so it can be
18407
+ * disconnected on destroy — an undisconnected IntersectionObserver retains its observed element
18408
+ * (the detached widget card), which would otherwise keep the card alive after navigation.
18409
+ */
18410
+ private intersectionObserver?;
18383
18411
  /**
18384
18412
  * Tells if the last change was a dragging or resizing event;
18385
18413
  */
@@ -18404,9 +18432,16 @@ declare class DashboardChildComponent implements DashboardChildDimension {
18404
18432
  reset($event?: CdkDragEnd): void;
18405
18433
  ngOnDestroy(): void;
18406
18434
  addActions(actions: DashboardChildActionComponent[], prepend?: boolean): void;
18435
+ /**
18436
+ * Re-arms intersection tracking after a card was restored following a cancelled navigation. The
18437
+ * observer one-shot-unobserves on first intersection, so once a card has been shown and then
18438
+ * blanked it would no longer be watched; this lets the dashboard put it back under observation.
18439
+ */
18440
+ reobserve(): void;
18407
18441
  private removeSelfFromDashboard;
18408
18442
  private sortByPriority;
18409
18443
  private getOrder;
18444
+ private observeIntersection;
18410
18445
  private childInView;
18411
18446
  static ɵfac: i0.ɵɵFactoryDeclaration<DashboardChildComponent, never>;
18412
18447
  static ɵcmp: i0.ɵɵComponentDeclaration<DashboardChildComponent, "c8y-dashboard-child", never, { "x": { "alias": "x"; "required": false; }; "y": { "alias": "y"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "data": { "alias": "data"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "useIntersection": { "alias": "useIntersection"; "required": false; }; "isFrozen": { "alias": "isFrozen"; "required": false; }; "canToggleFullscreen": { "alias": "canToggleFullscreen"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "changeStart": "changeStart"; "changeEnd": "changeEnd"; "toggleFullscreen": "toggleFullscreen"; }, ["templateActions"], ["c8y-dashboard-child-title", "*"], true, never>;
@@ -18707,6 +18742,7 @@ declare class WidgetsDashboardComponent {
18707
18742
  private widgetGlobalAutoRefresh;
18708
18743
  private router;
18709
18744
  private elementRef;
18745
+ private cdr;
18710
18746
  set widgets(value: Widget[]);
18711
18747
  get widgets(): Widget[];
18712
18748
  context: any;
@@ -18746,6 +18782,24 @@ declare class WidgetsDashboardComponent {
18746
18782
  private widgetFullscreenChangeListener;
18747
18783
  inFullScreen$: Observable<boolean>;
18748
18784
  editMode$: BehaviorSubject<boolean>;
18785
+ private dashboardChildren;
18786
+ /**
18787
+ * When navigating AWAY from this dashboard to a different one, drop each widget's heavy content
18788
+ * (`intersected = false`) before Angular tears the view down. The widget bodies — the bulk of the
18789
+ * DOM — are removed from the lingering/detached dashboard tree, so the single detached
18790
+ * c8y-context-dashboard entry collapses toward its chrome shell instead of carrying a
18791
+ * multi-thousand-node subtree on every view change. (We intentionally do NOT remove the whole
18792
+ * grid: that orphans every card as a separate multi-root-retained fragment, which clutters the
18793
+ * Detached-elements panel worse and risks accumulating.) Robust across tab switches — the `@for`
18794
+ * just creates fresh children for the next dashboard. No remount cost on a real leave.
18795
+ */
18796
+ clearWidgetContentOnLeave: boolean;
18797
+ /**
18798
+ * The cards blanked by the most recent {@link clearWidgetContentBeforeLeaving}, kept so a
18799
+ * cancelled/failed navigation can restore exactly those (and only those — never a card that was
18800
+ * legitimately below the fold and not yet intersected).
18801
+ */
18802
+ private clearedChildren;
18749
18803
  get nativeElement(): any;
18750
18804
  readonly copyDashboardLabel: "Copy dashboard";
18751
18805
  readonly undoMessage: "Undo: \"{{ changeToUndo }}\"";
@@ -18754,7 +18808,7 @@ declare class WidgetsDashboardComponent {
18754
18808
  private _widgets;
18755
18809
  private isLoading$;
18756
18810
  private isExecutingResolvers$;
18757
- constructor(dynamic: DynamicComponentService, translateService: TranslateService$1, route: ActivatedRoute, modal: ModalService, widgetGlobalAutoRefresh: WidgetGlobalAutoRefreshService, router: Router, elementRef: ElementRef);
18811
+ constructor(dynamic: DynamicComponentService, translateService: TranslateService$1, route: ActivatedRoute, modal: ModalService, widgetGlobalAutoRefresh: WidgetGlobalAutoRefreshService, router: Router, elementRef: ElementRef, cdr: ChangeDetectorRef);
18758
18812
  ngOnChanges(changes: SimpleChanges): void;
18759
18813
  canDeactivate(omitConfirm?: boolean): Promise<boolean>;
18760
18814
  toggleFullscreen(hasWidget?: boolean): void;
@@ -18766,6 +18820,28 @@ declare class WidgetsDashboardComponent {
18766
18820
  cancelDashboardSave(): Promise<void>;
18767
18821
  saveDashboard(): void;
18768
18822
  enableEditMode(): void;
18823
+ /**
18824
+ * Clears widget content only when truly leaving this dashboard for a different one. Guards:
18825
+ * - opt-out flag;
18826
+ * - skip in edit mode (navigation may be cancelled by canDeactivate, and editing must keep content);
18827
+ * - skip when only the auxiliary outlet (e.g. the "Dashboard settings" drawer), query params
18828
+ * (auto-refresh / date range) or matrix params change — i.e. the PRIMARY dashboard route is the
18829
+ * same, so the dashboard stays mounted and must NOT be blanked.
18830
+ */
18831
+ private clearWidgetContentBeforeLeaving;
18832
+ /**
18833
+ * Re-shows the cards blanked by a clear that was followed by a cancelled/failed navigation. The
18834
+ * IntersectionObserver one-shot-unobserves a visible card, so it cannot bring the content back on
18835
+ * its own; we restore `intersected` directly and re-arm observation for future scrolling.
18836
+ */
18837
+ private restoreClearedWidgetContent;
18838
+ /**
18839
+ * Primary route path, parsed with the Router (not a hand-rolled regex) so query params, auxiliary
18840
+ * outlets (e.g. the dashboard-settings drawer `(dashboard-details:...)`) and matrix params are
18841
+ * correctly excluded. Two URLs with the same primary path mean the dashboard stays mounted
18842
+ * (settings/refresh/param change) — do not clear.
18843
+ */
18844
+ private toPrimaryPath;
18769
18845
  private exitFullScreen;
18770
18846
  private setCopyDisabledPopoverMsg;
18771
18847
  private confirmClosing;
@@ -18778,7 +18854,7 @@ declare class WidgetsDashboardComponent {
18778
18854
  */
18779
18855
  private replaceKeysWithContext;
18780
18856
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetsDashboardComponent, never>;
18781
- static ɵcmp: i0.ɵɵComponentDeclaration<WidgetsDashboardComponent, "c8y-widgets-dashboard", never, { "widgets": { "alias": "widgets"; "required": false; }; "context": { "alias": "context"; "required": false; }; "contextDashboard": { "alias": "contextDashboard"; "required": false; }; "_settings": { "alias": "settings"; "required": false; }; "isCopyDisabled": { "alias": "isCopyDisabled"; "required": false; }; "breadcrumb": { "alias": "breadcrumb"; "required": false; }; "editModeButtons": { "alias": "editModeButtons"; "required": false; }; "isSaveDisabled": { "alias": "isSaveDisabled"; "required": false; }; }, { "onAddWidget": "onAddWidget"; "onEditWidget": "onEditWidget"; "onDeleteWidget": "onDeleteWidget"; "onChangeDashboard": "onChangeDashboard"; "onResize": "onResize"; "onEditDashboard": "onEditDashboard"; "onCopyDashboard": "onCopyDashboard"; "onDeleteDashboard": "onDeleteDashboard"; "onChangeStart": "onChangeStart"; "onChangeEnd": "onChangeEnd"; "onSaveDashboard": "onSaveDashboard"; "onCancelDashboard": "onCancelDashboard"; "revertChange": "revertChange"; }, never, never, true, never>;
18857
+ static ɵcmp: i0.ɵɵComponentDeclaration<WidgetsDashboardComponent, "c8y-widgets-dashboard", never, { "widgets": { "alias": "widgets"; "required": false; }; "context": { "alias": "context"; "required": false; }; "contextDashboard": { "alias": "contextDashboard"; "required": false; }; "_settings": { "alias": "settings"; "required": false; }; "isCopyDisabled": { "alias": "isCopyDisabled"; "required": false; }; "breadcrumb": { "alias": "breadcrumb"; "required": false; }; "editModeButtons": { "alias": "editModeButtons"; "required": false; }; "isSaveDisabled": { "alias": "isSaveDisabled"; "required": false; }; "clearWidgetContentOnLeave": { "alias": "clearWidgetContentOnLeave"; "required": false; }; }, { "onAddWidget": "onAddWidget"; "onEditWidget": "onEditWidget"; "onDeleteWidget": "onDeleteWidget"; "onChangeDashboard": "onChangeDashboard"; "onResize": "onResize"; "onEditDashboard": "onEditDashboard"; "onCopyDashboard": "onCopyDashboard"; "onDeleteDashboard": "onDeleteDashboard"; "onChangeStart": "onChangeStart"; "onChangeEnd": "onChangeEnd"; "onSaveDashboard": "onSaveDashboard"; "onCancelDashboard": "onCancelDashboard"; "revertChange": "revertChange"; }, never, never, true, never>;
18782
18858
  }
18783
18859
 
18784
18860
  type Aggregation = {