@c8y/ngx-components 1023.7.0 → 1023.9.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 (27) hide show
  1. package/context-dashboard/index.d.ts.map +1 -1
  2. package/context-dashboard-state/index.d.ts.map +1 -1
  3. package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs +0 -1
  4. package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs.map +1 -1
  5. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +0 -6
  6. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  7. package/fesm2022/c8y-ngx-components-global-context.mjs +296 -283
  8. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  9. package/fesm2022/c8y-ngx-components-map.mjs +11 -4
  10. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +2 -8
  12. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +2 -1
  14. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +4 -16
  16. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components.mjs +2 -2
  18. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  19. package/global-context/index.d.ts +68 -57
  20. package/global-context/index.d.ts.map +1 -1
  21. package/locales/locales.pot +40 -31
  22. package/map/index.d.ts +8 -0
  23. package/map/index.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/widgets/implementations/alarms/index.d.ts.map +1 -1
  26. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
  27. package/widgets/implementations/datapoints-table/index.d.ts.map +1 -1
@@ -12,7 +12,7 @@ import { QueriesUtil } from '@c8y/client';
12
12
  import { latLng, latLngBounds } from 'leaflet';
13
13
  import { get, remove, isUndefined, flatten, every, isNull, isEmpty, cloneDeep } from 'lodash-es';
14
14
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
15
- import { NgIf, NgClass, AsyncPipe, CommonModule } from '@angular/common';
15
+ import { NgClass, AsyncPipe, CommonModule } from '@angular/common';
16
16
  import { TooltipDirective, TooltipModule } from 'ngx-bootstrap/tooltip';
17
17
  import { FormsModule } from '@angular/forms';
18
18
 
@@ -1579,6 +1579,14 @@ class MapStatusComponent {
1579
1579
  * @ignore
1580
1580
  */
1581
1581
  this.refreshPaused = false;
1582
+ /**
1583
+ * @ignore
1584
+ */
1585
+ this.autoRefreshPausedLabel = gettext('Auto refresh paused');
1586
+ /**
1587
+ * @ignore
1588
+ */
1589
+ this.autoRefreshEnabledLabel = gettext('Auto refresh enabled');
1582
1590
  this.destroy$ = new Subject();
1583
1591
  }
1584
1592
  /**
@@ -1735,19 +1743,18 @@ class MapStatusComponent {
1735
1743
  };
1736
1744
  }
1737
1745
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1738
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: MapStatusComponent, isStandalone: true, selector: "c8y-map-status", inputs: { config: "config", assets: "assets", clusterMap: "clusterMap", buttonsConfig: "buttonsConfig" }, outputs: { configChange: "configChange", onUnfollow: "onUnfollow", fitAssetsToBounds: "fitAssetsToBounds" }, viewQueries: [{ propertyName: "countdownIntervalComp", first: true, predicate: CountdownIntervalComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"c8y-map-status\">\n <div class=\"leaflet-touch\">\n <div\n class=\"leaflet-bar\"\n role=\"group\"\n >\n <button\n class=\"c8y-realtime\"\n title=\"{{ 'Realtime' | translate }}\"\n type=\"button\"\n *ngIf=\"buttonsConfig.realtime.show\"\n (click)=\"toggleRealtime()\"\n [disabled]=\"buttonsConfig.realtime.disabled\"\n >\n <span\n class=\"c8y-pulse\"\n [ngClass]=\"{\n active: clusterMap?.config.realtime,\n inactive: !clusterMap?.config.realtime\n }\"\n ></span>\n </button>\n\n <label\n class=\"toggle-countdown vertical\"\n [attr.aria-label]=\"\n refreshPaused ? ('Enable auto refresh' | translate) : ('Disable auto refresh' | translate)\n \"\n [tooltip]=\"\n refreshPaused ? ('Enable auto refresh' | translate) : ('Disable auto refresh' | translate)\n \"\n placement=\"left\"\n *ngIf=\"\n buttonsConfig.autoRefresh.show &&\n !config.widgetInstanceGlobalAutoRefreshContext &&\n clusterMap?.config.refreshInterval &&\n !clusterMap?.config.follow\n \"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"1000\"\n >\n <input\n type=\"checkbox\"\n (click)=\"toggleAutoRefresh($event)\"\n />\n <c8y-countdown-interval\n [hidden]=\"refreshPaused\"\n [countdownInterval]=\"clusterMap?.config.refreshInterval\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"refreshPaused\"\n ></i>\n </label>\n\n <button\n title=\"{{ 'Cancel reload' | translate }}\"\n type=\"button\"\n *ngIf=\"\n buttonsConfig.refresh.show &&\n (clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n \"\n (click)=\"cancelReload()\"\n >\n <i\n class=\"icon-spin\"\n c8yIcon=\"refresh\"\n ></i>\n </button>\n <button\n [title]=\"'Reload' | translate\"\n type=\"button\"\n *ngIf=\"\n buttonsConfig.refresh.show &&\n !clusterMap?.config.realtime &&\n !clusterMap?.assets &&\n !(clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n \"\n (click)=\"reload()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n <ng-content></ng-content>\n <button\n title=\"{{ 'Center map' | translate }}\"\n type=\"button\"\n (click)=\"center()\"\n [disabled]=\"buttonsConfig.center.disabled || clusterMap?.config.follow\"\n *ngIf=\"buttonsConfig.center.show\"\n >\n <i c8yIcon=\"target1\"></i>\n </button>\n <button\n title=\"{{ 'Fit to assets bounds' | translate }}\"\n type=\"button\"\n (click)=\"fitToBounds()\"\n [disabled]=\"buttonsConfig.fitToBounds.disabled || clusterMap?.config.follow\"\n *ngIf=\"buttonsConfig.fitToBounds.show\"\n >\n <i c8yIcon=\"waypoint-map\"></i>\n </button>\n <button\n title=\"{{ 'Unfollow' | translate }}\"\n type=\"button\"\n *ngIf=\"clusterMap?.config.follow\"\n (click)=\"unfollow()\"\n >\n <i c8yIcon=\"marker-off\"></i>\n </button>\n\n <button\n title=\"{{ 'Follow' | translate }}\"\n type=\"button\"\n *ngIf=\"initConfig.follow && !clusterMap?.config.follow\"\n (click)=\"follow()\"\n >\n <i c8yIcon=\"marker\"></i>\n </button>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: 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: "component", type: CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval", "config"], outputs: ["countdownEnded"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1746
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: MapStatusComponent, isStandalone: true, selector: "c8y-map-status", inputs: { config: "config", assets: "assets", clusterMap: "clusterMap", buttonsConfig: "buttonsConfig" }, outputs: { configChange: "configChange", onUnfollow: "onUnfollow", fitAssetsToBounds: "fitAssetsToBounds" }, viewQueries: [{ propertyName: "countdownIntervalComp", first: true, predicate: CountdownIntervalComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"c8y-map-status\">\n <div class=\"leaflet-touch\">\n <div\n class=\"leaflet-bar\"\n role=\"group\"\n >\n @if (buttonsConfig.realtime.show) {\n <button\n class=\"c8y-realtime\"\n title=\"{{ 'Realtime' | translate }}\"\n type=\"button\"\n (click)=\"toggleRealtime()\"\n [disabled]=\"buttonsConfig.realtime.disabled\"\n >\n <span\n class=\"c8y-pulse\"\n [ngClass]=\"{\n active: clusterMap?.config.realtime,\n inactive: !clusterMap?.config.realtime\n }\"\n ></span>\n </button>\n }\n @if (\n buttonsConfig.autoRefresh.show &&\n !config.widgetInstanceGlobalAutoRefreshContext &&\n clusterMap?.config.refreshInterval &&\n !clusterMap?.config.follow\n ) {\n <label\n class=\"toggle-countdown vertical\"\n [attr.aria-label]=\"\n (refreshPaused ? autoRefreshPausedLabel : autoRefreshEnabledLabel) | translate\n \"\n [tooltip]=\"(refreshPaused ? autoRefreshPausedLabel : autoRefreshEnabledLabel) | translate\"\n placement=\"left\"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"1000\"\n >\n <input\n type=\"checkbox\"\n (click)=\"toggleAutoRefresh($event)\"\n />\n <c8y-countdown-interval\n [hidden]=\"refreshPaused\"\n [countdownInterval]=\"clusterMap?.config.refreshInterval\"\n ></c8y-countdown-interval>\n @if (refreshPaused) {\n <i c8yIcon=\"pause\"></i>\n }\n </label>\n }\n @if (\n buttonsConfig.refresh.show &&\n (clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n ) {\n <button\n title=\"{{ 'Cancel reload' | translate }}\"\n type=\"button\"\n (click)=\"cancelReload()\"\n >\n <i\n class=\"icon-spin\"\n c8yIcon=\"refresh\"\n ></i>\n </button>\n }\n @if (\n buttonsConfig.refresh.show &&\n !clusterMap?.config.realtime &&\n !clusterMap?.assets &&\n !(clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n ) {\n <button\n [title]=\"'Reload' | translate\"\n type=\"button\"\n (click)=\"reload()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n }\n <ng-content></ng-content>\n @if (buttonsConfig.center.show) {\n <button\n title=\"{{ 'Center map' | translate }}\"\n type=\"button\"\n (click)=\"center()\"\n [disabled]=\"buttonsConfig.center.disabled || clusterMap?.config.follow\"\n >\n <i c8yIcon=\"target1\"></i>\n </button>\n }\n @if (buttonsConfig.fitToBounds.show) {\n <button\n title=\"{{ 'Fit to assets bounds' | translate }}\"\n type=\"button\"\n (click)=\"fitToBounds()\"\n [disabled]=\"buttonsConfig.fitToBounds.disabled || clusterMap?.config.follow\"\n >\n <i c8yIcon=\"waypoint-map\"></i>\n </button>\n }\n @if (clusterMap?.config.follow) {\n <button\n title=\"{{ 'Unfollow' | translate }}\"\n type=\"button\"\n (click)=\"unfollow()\"\n >\n <i c8yIcon=\"marker-off\"></i>\n </button>\n }\n @if (initConfig.follow && !clusterMap?.config.follow) {\n <button\n title=\"{{ 'Follow' | translate }}\"\n type=\"button\"\n (click)=\"follow()\"\n >\n <i c8yIcon=\"marker\"></i>\n </button>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: 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: "component", type: CountdownIntervalComponent, selector: "c8y-countdown-interval", inputs: ["countdownInterval", "config"], outputs: ["countdownEnded"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1739
1747
  }
1740
1748
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapStatusComponent, decorators: [{
1741
1749
  type: Component,
1742
1750
  args: [{ selector: 'c8y-map-status', imports: [
1743
- NgIf,
1744
1751
  NgClass,
1745
1752
  TooltipDirective,
1746
1753
  CountdownIntervalComponent,
1747
1754
  IconDirective,
1748
1755
  AsyncPipe,
1749
1756
  C8yTranslatePipe
1750
- ], template: "<div class=\"c8y-map-status\">\n <div class=\"leaflet-touch\">\n <div\n class=\"leaflet-bar\"\n role=\"group\"\n >\n <button\n class=\"c8y-realtime\"\n title=\"{{ 'Realtime' | translate }}\"\n type=\"button\"\n *ngIf=\"buttonsConfig.realtime.show\"\n (click)=\"toggleRealtime()\"\n [disabled]=\"buttonsConfig.realtime.disabled\"\n >\n <span\n class=\"c8y-pulse\"\n [ngClass]=\"{\n active: clusterMap?.config.realtime,\n inactive: !clusterMap?.config.realtime\n }\"\n ></span>\n </button>\n\n <label\n class=\"toggle-countdown vertical\"\n [attr.aria-label]=\"\n refreshPaused ? ('Enable auto refresh' | translate) : ('Disable auto refresh' | translate)\n \"\n [tooltip]=\"\n refreshPaused ? ('Enable auto refresh' | translate) : ('Disable auto refresh' | translate)\n \"\n placement=\"left\"\n *ngIf=\"\n buttonsConfig.autoRefresh.show &&\n !config.widgetInstanceGlobalAutoRefreshContext &&\n clusterMap?.config.refreshInterval &&\n !clusterMap?.config.follow\n \"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"1000\"\n >\n <input\n type=\"checkbox\"\n (click)=\"toggleAutoRefresh($event)\"\n />\n <c8y-countdown-interval\n [hidden]=\"refreshPaused\"\n [countdownInterval]=\"clusterMap?.config.refreshInterval\"\n ></c8y-countdown-interval>\n <i\n c8yIcon=\"pause\"\n *ngIf=\"refreshPaused\"\n ></i>\n </label>\n\n <button\n title=\"{{ 'Cancel reload' | translate }}\"\n type=\"button\"\n *ngIf=\"\n buttonsConfig.refresh.show &&\n (clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n \"\n (click)=\"cancelReload()\"\n >\n <i\n class=\"icon-spin\"\n c8yIcon=\"refresh\"\n ></i>\n </button>\n <button\n [title]=\"'Reload' | translate\"\n type=\"button\"\n *ngIf=\"\n buttonsConfig.refresh.show &&\n !clusterMap?.config.realtime &&\n !clusterMap?.assets &&\n !(clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n \"\n (click)=\"reload()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n <ng-content></ng-content>\n <button\n title=\"{{ 'Center map' | translate }}\"\n type=\"button\"\n (click)=\"center()\"\n [disabled]=\"buttonsConfig.center.disabled || clusterMap?.config.follow\"\n *ngIf=\"buttonsConfig.center.show\"\n >\n <i c8yIcon=\"target1\"></i>\n </button>\n <button\n title=\"{{ 'Fit to assets bounds' | translate }}\"\n type=\"button\"\n (click)=\"fitToBounds()\"\n [disabled]=\"buttonsConfig.fitToBounds.disabled || clusterMap?.config.follow\"\n *ngIf=\"buttonsConfig.fitToBounds.show\"\n >\n <i c8yIcon=\"waypoint-map\"></i>\n </button>\n <button\n title=\"{{ 'Unfollow' | translate }}\"\n type=\"button\"\n *ngIf=\"clusterMap?.config.follow\"\n (click)=\"unfollow()\"\n >\n <i c8yIcon=\"marker-off\"></i>\n </button>\n\n <button\n title=\"{{ 'Follow' | translate }}\"\n type=\"button\"\n *ngIf=\"initConfig.follow && !clusterMap?.config.follow\"\n (click)=\"follow()\"\n >\n <i c8yIcon=\"marker\"></i>\n </button>\n </div>\n </div>\n</div>\n" }]
1757
+ ], template: "<div class=\"c8y-map-status\">\n <div class=\"leaflet-touch\">\n <div\n class=\"leaflet-bar\"\n role=\"group\"\n >\n @if (buttonsConfig.realtime.show) {\n <button\n class=\"c8y-realtime\"\n title=\"{{ 'Realtime' | translate }}\"\n type=\"button\"\n (click)=\"toggleRealtime()\"\n [disabled]=\"buttonsConfig.realtime.disabled\"\n >\n <span\n class=\"c8y-pulse\"\n [ngClass]=\"{\n active: clusterMap?.config.realtime,\n inactive: !clusterMap?.config.realtime\n }\"\n ></span>\n </button>\n }\n @if (\n buttonsConfig.autoRefresh.show &&\n !config.widgetInstanceGlobalAutoRefreshContext &&\n clusterMap?.config.refreshInterval &&\n !clusterMap?.config.follow\n ) {\n <label\n class=\"toggle-countdown vertical\"\n [attr.aria-label]=\"\n (refreshPaused ? autoRefreshPausedLabel : autoRefreshEnabledLabel) | translate\n \"\n [tooltip]=\"(refreshPaused ? autoRefreshPausedLabel : autoRefreshEnabledLabel) | translate\"\n placement=\"left\"\n [adaptivePosition]=\"false\"\n [container]=\"'body'\"\n [delay]=\"1000\"\n >\n <input\n type=\"checkbox\"\n (click)=\"toggleAutoRefresh($event)\"\n />\n <c8y-countdown-interval\n [hidden]=\"refreshPaused\"\n [countdownInterval]=\"clusterMap?.config.refreshInterval\"\n ></c8y-countdown-interval>\n @if (refreshPaused) {\n <i c8yIcon=\"pause\"></i>\n }\n </label>\n }\n @if (\n buttonsConfig.refresh.show &&\n (clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n ) {\n <button\n title=\"{{ 'Cancel reload' | translate }}\"\n type=\"button\"\n (click)=\"cancelReload()\"\n >\n <i\n class=\"icon-spin\"\n c8yIcon=\"refresh\"\n ></i>\n </button>\n }\n @if (\n buttonsConfig.refresh.show &&\n !clusterMap?.config.realtime &&\n !clusterMap?.assets &&\n !(clusterMap?.isLoading$ | async) &&\n !config.widgetInstanceGlobalAutoRefreshContext\n ) {\n <button\n [title]=\"'Reload' | translate\"\n type=\"button\"\n (click)=\"reload()\"\n >\n <i c8yIcon=\"refresh\"></i>\n </button>\n }\n <ng-content></ng-content>\n @if (buttonsConfig.center.show) {\n <button\n title=\"{{ 'Center map' | translate }}\"\n type=\"button\"\n (click)=\"center()\"\n [disabled]=\"buttonsConfig.center.disabled || clusterMap?.config.follow\"\n >\n <i c8yIcon=\"target1\"></i>\n </button>\n }\n @if (buttonsConfig.fitToBounds.show) {\n <button\n title=\"{{ 'Fit to assets bounds' | translate }}\"\n type=\"button\"\n (click)=\"fitToBounds()\"\n [disabled]=\"buttonsConfig.fitToBounds.disabled || clusterMap?.config.follow\"\n >\n <i c8yIcon=\"waypoint-map\"></i>\n </button>\n }\n @if (clusterMap?.config.follow) {\n <button\n title=\"{{ 'Unfollow' | translate }}\"\n type=\"button\"\n (click)=\"unfollow()\"\n >\n <i c8yIcon=\"marker-off\"></i>\n </button>\n }\n @if (initConfig.follow && !clusterMap?.config.follow) {\n <button\n title=\"{{ 'Follow' | translate }}\"\n type=\"button\"\n (click)=\"follow()\"\n >\n <i c8yIcon=\"marker\"></i>\n </button>\n }\n </div>\n </div>\n</div>\n" }]
1751
1758
  }], propDecorators: { config: [{
1752
1759
  type: Input
1753
1760
  }], assets: [{