@c8y/ngx-components 1022.44.7 → 1022.45.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 (60) hide show
  1. package/asset-properties/asset-properties.model.d.ts +1 -1
  2. package/asset-properties/asset-properties.model.d.ts.map +1 -1
  3. package/asset-properties/asset-property-list/asset-property-value.pipe.d.ts.map +1 -1
  4. package/computed-asset-properties/last-measurement/last-measurement-value.d.ts +2 -1
  5. package/computed-asset-properties/last-measurement/last-measurement-value.d.ts.map +1 -1
  6. package/computed-asset-properties/strategies/last-measurement-strategy.d.ts +4 -3
  7. package/computed-asset-properties/strategies/last-measurement-strategy.d.ts.map +1 -1
  8. package/context-dashboard/context-dashboard.service.d.ts +20 -2
  9. package/context-dashboard/context-dashboard.service.d.ts.map +1 -1
  10. package/context-dashboard/widget-config/widget-asset-selector.component.d.ts +8 -2
  11. package/context-dashboard/widget-config/widget-asset-selector.component.d.ts.map +1 -1
  12. package/context-dashboard/widget-config.component.d.ts.map +1 -1
  13. package/context-dashboard/widget-config.service.d.ts +7 -1
  14. package/context-dashboard/widget-config.service.d.ts.map +1 -1
  15. package/core/router/router.service.d.ts +1 -0
  16. package/core/router/router.service.d.ts.map +1 -1
  17. package/dashboard-manager/dashboard-manager.service.d.ts +5 -4
  18. package/dashboard-manager/dashboard-manager.service.d.ts.map +1 -1
  19. package/dashboard-manager/devicemanagement/dashboard-manager-navigation.factory.d.ts +10 -0
  20. package/dashboard-manager/devicemanagement/dashboard-manager-navigation.factory.d.ts.map +1 -0
  21. package/dashboard-manager/devicemanagement/dashboard-manager-tabs.factory.d.ts +11 -0
  22. package/dashboard-manager/devicemanagement/dashboard-manager-tabs.factory.d.ts.map +1 -0
  23. package/dashboard-manager/devicemanagement/index.d.ts +4 -0
  24. package/dashboard-manager/devicemanagement/index.d.ts.map +1 -1
  25. package/dashboard-manager/index.d.ts +2 -1
  26. package/dashboard-manager/index.d.ts.map +1 -1
  27. package/dashboard-manager/type-dashboards-list/index.d.ts +2 -0
  28. package/dashboard-manager/type-dashboards-list/index.d.ts.map +1 -0
  29. package/fesm2022/c8y-ngx-components-asset-properties.mjs +1 -1
  30. package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +1 -1
  32. package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +54 -24
  34. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +81 -6
  36. package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -1
  37. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +185 -166
  38. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
  39. package/fesm2022/c8y-ngx-components-map.mjs +1 -1
  40. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  41. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +2 -2
  42. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
  43. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +12 -7
  44. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
  45. package/fesm2022/c8y-ngx-components.mjs +14 -4
  46. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  47. package/locales/de.po +19 -0
  48. package/locales/es.po +19 -0
  49. package/locales/fr.po +19 -0
  50. package/locales/ja_JP.po +17 -0
  51. package/locales/ko.po +18 -0
  52. package/locales/locales.pot +18 -0
  53. package/locales/nl.po +19 -0
  54. package/locales/pl.po +19 -0
  55. package/locales/pt_BR.po +19 -0
  56. package/locales/zh_CN.po +18 -0
  57. package/locales/zh_TW.po +18 -0
  58. package/package.json +1 -1
  59. package/widgets/implementations/map/map-widget.component.d.ts +1 -0
  60. package/widgets/implementations/map/map-widget.component.d.ts.map +1 -1
@@ -287,13 +287,7 @@ class MapWidgetComponent {
287
287
  }
288
288
  async ngOnInit() {
289
289
  this.alerts.setAlertGroupDismissStrategy('warning', DismissAlertStrategy.TEMPORARY_OR_PERMANENT);
290
- if (this.dashboardContextComponent?.dashboard?.deviceType && !this.config.device) {
291
- const context = this.dashboardContextComponent.context;
292
- if (context?.id) {
293
- const { id } = context;
294
- this.config.device = (await this.inventory.detail(id)).data;
295
- }
296
- }
290
+ await this.applyDeviceTypeTarget();
297
291
  if (this.config.device) {
298
292
  this.rootNode = this.config.device;
299
293
  }
@@ -380,6 +374,17 @@ class MapWidgetComponent {
380
374
  updateMapConfigRealtime() {
381
375
  this.mapConfig.realtime = this.config.realtime || false;
382
376
  }
377
+ async applyDeviceTypeTarget() {
378
+ const hasDeviceTarget = !!this.config.device; // The map widget supports not selecting any target
379
+ const isDeviceTypeDashboard = !!this.dashboardContextComponent?.dashboard?.deviceType;
380
+ if (isDeviceTypeDashboard && hasDeviceTarget) {
381
+ const context = this.dashboardContextComponent.context;
382
+ if (context?.id) {
383
+ const { id } = context;
384
+ this.config.device = (await this.inventory.detail(id)).data;
385
+ }
386
+ }
387
+ }
383
388
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapWidgetComponent, deps: [{ token: i2.DashboardChildComponent }, { token: i4$1.ContextDashboardComponent, optional: true }, { token: i1.InventoryService }, { token: i4.MapService }, { token: i2.WidgetsDashboardComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
384
389
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MapWidgetComponent, isStandalone: true, selector: "c8y-map-widget", inputs: { config: "config" }, viewQueries: [{ propertyName: "clusterMap", first: true, predicate: ClusterMapComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [buttonsConfig]=\"\n config.widgetInstanceGlobalTimeContext\n ? { realtime: { show: false }, fitToBounds: { show: true } }\n : { fitToBounds: { show: true } }\n \"\n [assets]=\"assets\"\n></c8y-map-status>\n<c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n>\n <div\n class=\"map-marker\"\n *c8yMapPopup=\"let context\"\n >\n <a\n class=\"text-truncate deviceLink text-12\"\n routerLink=\"{{ context | assetLink }}\"\n >\n <strong>{{ context.name }}</strong>\n </a>\n <c8y-map-event-info [asset]=\"context\">\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Activate realtime on this asset and follow it if it moves' | translate\"\n type=\"button\"\n (click)=\"startFollow(context)\"\n *ngIf=\"!mapConfig.follow\"\n translate\n >\n Follow\n </button>\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Stop following this asset.' | translate\"\n type=\"button\"\n (click)=\"stopFollow()\"\n *ngIf=\"mapConfig.follow\"\n translate\n >\n Unfollow\n </button>\n </c8y-map-event-info>\n </div>\n</c8y-cluster-map>\n", dependencies: [{ kind: "component", type: MapEventInfoComponent, selector: "c8y-map-event-info", inputs: ["asset"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: i2.AssetLinkPipe, name: "assetLink" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i4.MapStatusComponent, selector: "c8y-map-status", inputs: ["config", "assets", "clusterMap", "buttonsConfig"], outputs: ["configChange", "onUnfollow", "fitAssetsToBounds"] }, { kind: "component", type: i4.ClusterMapComponent, selector: "c8y-cluster-map", inputs: ["config", "rootNode", "asset", "showClusterColor"], outputs: ["mapChange"] }, { kind: "directive", type: i4.MapPopupDirective, selector: "[c8yMapPopup]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
385
390
  }
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-widgets-implementations-map.mjs","sources":["../../widgets/implementations/map/map-event-info.component.ts","../../widgets/implementations/map/map-event-info.component.html","../../widgets/implementations/map/map-widget-config.component.ts","../../widgets/implementations/map/map-widget-config.component.html","../../widgets/implementations/map/map-widget.component.ts","../../widgets/implementations/map/map-widget.component.html","../../widgets/implementations/map/c8y-ngx-components-widgets-implementations-map.ts"],"sourcesContent":["import { Component, Input, OnChanges } from '@angular/core';\nimport { CommonModule as NgCommonModule } from '@angular/common';\nimport { EventService, IEvent, IManagedObject } from '@c8y/client';\nimport { C8yTranslateDirective, DatePipe, LoadingComponent } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-map-event-info',\n templateUrl: './map-event-info.component.html',\n standalone: true,\n imports: [NgCommonModule, C8yTranslateDirective, DatePipe, LoadingComponent]\n})\nexport class MapEventInfoComponent implements OnChanges {\n @Input()\n asset: IManagedObject;\n\n loading = true;\n\n event: IEvent;\n\n constructor(private eventService: EventService) {}\n\n async ngOnChanges() {\n this.loading = true;\n const { data } = await this.eventService.list({\n dateFrom: '1970-01-01',\n dateTo: new Date(Date.now()).toISOString(),\n fragmentType: 'c8y_Position',\n pageSize: 1,\n source: this.asset.id\n });\n this.event = data[0];\n this.loading = false;\n }\n}\n","<div class=\"text-muted text-10 p-t-4 p-b-4\">\n <span translate>Last position update:</span>\n <br />\n <c8y-loading *ngIf=\"loading\"></c8y-loading>\n <ng-container *ngIf=\"!loading\">\n <i *ngIf=\"!event\" translate>No information found</i>\n <ng-container *ngIf=\"event\">\n <i>{{ event.time | c8yDate }}</i>\n <ng-content></ng-content>\n </ng-container>\n </ng-container>\n</div>\n","import { CommonModule as NgCommonModule } from '@angular/common';\nimport {\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { ControlContainer, NgForm, FormsModule as NgFormsModule } from '@angular/forms';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AlertService, AssetLinkPipe, CommonModule, FormsModule } from '@c8y/ngx-components';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport {\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MAP_DEFAULT_CONFIG,\n MapComponent,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport type { MapDefaultConfig } from '@c8y/options';\nimport { TranslateService } from '@ngx-translate/core';\nimport type L from 'leaflet';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { fromEvent, Observable, Subject } from 'rxjs';\nimport { combineLatestWith, take, takeUntil } from 'rxjs/operators';\nimport { MapRefreshOption, MapWidgetConfig } from './map-widget.model';\n\n@Component({\n selector: 'c8y-map-widget-config',\n templateUrl: './map-widget-config.component.html',\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],\n standalone: true,\n imports: [\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n AssetLinkPipe,\n TooltipModule\n ]\n})\nexport class MapWidgetConfigComponent implements OnInit, OnChanges, OnDestroy {\n @Input() config: MapWidgetConfig = {\n mapConfig: undefined\n };\n\n formConfig: ClusterMapConfig;\n\n canAutoCenter = true;\n isPositionedDevice = false;\n assets: PositionManagedObject[];\n refreshOption: MapRefreshOption = 'none';\n\n private destroyed$ = new Subject<void>();\n private leaflet: typeof L;\n private centerIcon: L.Marker;\n // JS precision for floating point number is 15 for 64-bit and because of this provided to leaflet are recalculated\n // to values almost-like provided (e.g. 0 is recalculated to 1.46e-14; for 180 it's 180.00000000000003).\n // To ensure provided value has no floating point error, number needs to be rounded to fixed point 13.\n private readonly FIXED_POINT_DIGITS = 13;\n\n @ViewChild(MapComponent)\n previewMap: MapComponent;\n\n @ViewChild('previewMap')\n set previewMapSet(template: TemplateRef<any>) {\n if (template) {\n this.widgetConfigService.setPreview(template);\n return;\n }\n this.widgetConfigService.setPreview(null);\n }\n\n constructor(\n private mapService: MapService,\n private alertService: AlertService,\n private translateService: TranslateService,\n @Inject(MAP_DEFAULT_CONFIG) private defaultMapConfig: Observable<MapDefaultConfig>,\n private widgetConfigService: WidgetConfigService\n ) {}\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n }\n\n ngOnInit() {\n this.defaultMapConfig.pipe(takeUntil(this.destroyed$)).subscribe(defaultConfig => {\n this.formConfig = {\n zoomLevel: defaultConfig.zoomLevel,\n center: defaultConfig.center\n };\n this.initForm();\n });\n }\n\n async initForm() {\n if (!this.config.mapConfig) {\n this.config.mapConfig = this.formConfig;\n }\n this.formConfig = {\n ...this.formConfig,\n ...this.config.mapConfig,\n disablePan: false\n };\n await this.updateAsset();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (\n changes.config.currentValue !== changes.config.previousValue &&\n !changes.config.firstChange\n ) {\n await this.updateAsset();\n }\n }\n\n previewMapInit(leaflet: typeof L): void {\n this.leaflet = leaflet;\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n onBeforeSave() {\n this.config.mapConfig = this.formConfig;\n return true;\n }\n\n zoomLevelChanged() {\n this.config.mapConfig = {\n ...this.config.mapConfig,\n zoomLevel: this.formConfig.zoomLevel\n };\n }\n\n changeCenter() {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n this.config.mapConfig = { ...this.formConfig, center: [...this.formConfig.center] };\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n changeCenterOnEnterKey(event: KeyboardEvent): void {\n event.preventDefault();\n this.changeCenter();\n }\n\n onPreviewZoomStart() {\n this.centerIcon.remove();\n }\n\n onPreviewZoomEnd(event: L.LeafletEvent) {\n this.formConfig.zoomLevel = Math.floor(event.target.getZoom());\n }\n\n onPreviewMapMove(event: L.LeafletEvent) {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n const { lat, lng } = event.target.getCenter();\n const fixedLat = +lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +lng.toFixed(this.FIXED_POINT_DIGITS);\n this.addCenterIcon(fixedLat, fixedLng);\n this.formConfig.center = [fixedLat, fixedLng];\n }\n\n useOwnPosition() {\n navigator.geolocation.getCurrentPosition(({ coords }) => {\n this.formConfig.center = [coords.latitude, coords.longitude];\n this.changeCenter();\n });\n }\n\n centerToAsset() {\n this.formConfig.center = [\n this.config.device.c8y_Position.lat,\n this.config.device.c8y_Position.lng\n ];\n this.changeCenter();\n }\n\n async fitToBounds() {\n if (!this.assets?.length || !this.previewMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(this.assets);\n\n // map.fitBounds causes zoom and move events, so get new center and zoom level only when these events are finished\n fromEvent<L.LeafletEvent>(this.previewMap.map, 'moveend')\n .pipe(combineLatestWith(fromEvent<L.LeafletEvent>(this.previewMap.map, 'zoomend')), take(1))\n .subscribe(() => {\n const center = this.previewMap.map.getCenter();\n const zoom = this.previewMap.map.getZoom();\n\n const fixedLat = +center.lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +center.lng.toFixed(this.FIXED_POINT_DIGITS);\n this.formConfig.center = [fixedLat, fixedLng];\n this.formConfig.zoomLevel = Math.floor(zoom);\n\n this.changeCenter();\n });\n\n this.previewMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n updateRefreshOption() {\n this.formConfig.realtime = this.refreshOption === 'realtime';\n this.config.widgetInstanceGlobalAutoRefreshContext =\n this.refreshOption === 'dashboard-auto-refresh-context';\n this.formConfig.widgetInstanceGlobalAutoRefreshContext =\n this.refreshOption === 'dashboard-auto-refresh-context';\n if (this.refreshOption === 'interval') {\n this.formConfig.refreshInterval ??= 5000;\n } else {\n this.formConfig.refreshInterval = null;\n }\n if (!this.formConfig.realtime) {\n this.formConfig.follow = false;\n }\n this.config.widgetInstanceGlobalTimeContext =\n this.refreshOption === 'dashboard-realtime-context';\n if (this.config.widgetInstanceGlobalTimeContext) {\n this.formConfig.realtime = null;\n }\n }\n\n selectIcon(icon: string) {\n this.formConfig.icon = icon;\n this.config.mapConfig.icon = icon;\n this.previewMap.refreshMarkers();\n }\n\n private async updateAsset() {\n this.canAutoCenter = this.mapService.hasPosition(this.config.device);\n this.isPositionedDevice = this.mapService.isPositionedDevice(this.config.device);\n this.refreshOption = this.getRefreshOption();\n this.updateRefreshOption();\n\n const { data, paging } = await this.mapService.getAllPositionMOs(this.config.device);\n this.assets = data;\n if (paging.totalPages > 1) {\n this.alertService.danger(\n gettext(\n 'It might be possible that assets are not shown in the preview, as the current selection has more than 500 assets and the preview only supports a maximum of 500 assets.'\n )\n );\n }\n }\n\n private getRefreshOption(): MapRefreshOption {\n let option: MapRefreshOption = 'none';\n if (this.formConfig.realtime) {\n option = 'realtime';\n } else if (this.formConfig.refreshInterval) {\n option = 'interval';\n } else if (this.config.widgetInstanceGlobalTimeContext) {\n option = 'dashboard-realtime-context';\n } else if (\n this.config.widgetInstanceGlobalAutoRefreshContext ||\n this.formConfig.widgetInstanceGlobalAutoRefreshContext\n ) {\n option = 'dashboard-auto-refresh-context';\n }\n const isNotAllowedOption =\n (!this.isPositionedDevice && option === 'dashboard-realtime-context') ||\n (!this.isPositionedDevice && option === 'realtime') ||\n (this.isPositionedDevice && option === 'interval');\n option = isNotAllowedOption ? 'none' : option;\n return option;\n }\n\n private addCenterIcon(lat: number, lng: number) {\n const titleText = this.translateService.instant(gettext('Map center'));\n const icon = this.leaflet.divIcon({\n html: `<i style=\"pointer-events: none\" class=\"c8y-map-marker-icon text-muted dlt-c8y-icon-target icon-2x\" title=\"${titleText}\" />`\n });\n this.centerIcon = this.leaflet.marker([lat, lng], {\n icon\n });\n this.previewMap.addMarkerToMap(this.centerIcon);\n }\n}\n","<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Map' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-xs-3\">\n <c8y-form-group class=\"m-b-16 text-center form-group-sm\">\n <label translate>Marker icon</label>\n <c8y-icon-selector-wrapper\n [canRemoveIcon]=\"true\"\n [selectedIcon]=\"formConfig.icon\"\n (onSelect)=\"selectIcon($event)\"\n ></c8y-icon-selector-wrapper>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-9\">\n <div class=\"form-group form-group-sm\">\n <label translate>Zoom level</label>\n <c8y-range\n class=\"label-bottom\"\n name=\"zoomLevel\"\n #range\n [(ngModel)]=\"formConfig.zoomLevel\"\n (change)=\"zoomLevelChanged()\"\n >\n <input\n type=\"range\"\n min=\"0\"\n max=\"18\"\n step=\"1\"\n />\n </c8y-range>\n </div>\n </div>\n </div>\n <c8y-form-group class=\"form-group-sm\">\n <label translate>Center bound</label>\n <div class=\"input-group input-group-sm\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lat.`latitude`' | translate }}\"\n name=\"centerLat\"\n type=\"number\"\n required\n [(ngModel)]=\"formConfig.center[0]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-90\"\n max=\"90\"\n step=\"0.1\"\n />\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lng.`longitude`' | translate }}\"\n name=\"centerLng\"\n type=\"number\"\n required\n min=\"-180\"\n max=\"180\"\n [(ngModel)]=\"formConfig.center[1]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-180\"\n max=\"180\"\n step=\"0.1\"\n />\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use your location' | translate\"\n [tooltip]=\"'Use your location' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"useOwnPosition()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location-arrow\"\n ></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use selected asset location' | translate\"\n [tooltip]=\"'Use selected asset location' | translate\"\n placement=\"top\"\n container=\"body\"\n *ngIf=\"canAutoCenter; else fitToBoundsButton\"\n (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n </div>\n </div>\n\n <ng-template #fitToBoundsButton>\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Fit to assets bounds' | translate\"\n [tooltip]=\"'Fit to assets bounds' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"fitToBounds()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"waypoint-map\"\n ></i>\n </button>\n </ng-template>\n <c8y-messages [helpMessage]=\"'Drag the map to the desired position' | translate\"></c8y-messages>\n </c8y-form-group>\n</fieldset>\n\n<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Auto refresh' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n id=\"selectExample\"\n name=\"refreshSelection\"\n [(ngModel)]=\"refreshOption\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Only refreshing on interaction' | translate\"\n value=\"none\"\n translate\n >\n No automatic refresh\n </option>\n <option\n [title]=\"'Refreshing after the given interval and on interaction' | translate\"\n value=\"interval\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use refresh interval\n </option>\n <option\n [title]=\"\n 'Refreshing after the given interval and on interaction, synchronized globally'\n | translate\n \"\n value=\"dashboard-auto-refresh-context\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use global refresh interval\n </option>\n <option\n [title]=\"'Live updating on each position change' | translate\"\n value=\"realtime\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Realtime\n </option>\n <option\n [title]=\"'Bind widget to dashboard realtime context' | translate\"\n value=\"dashboard-realtime-context\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Dashboard realtime context\n </option>\n </select>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-6\">\n <div class=\"form-group form-group-sm m-b-16\">\n <c8y-range\n class=\"label-bottom\"\n name=\"refreshInterval\"\n #intervalRange\n *ngIf=\"refreshOption === 'interval'\"\n [(ngModel)]=\"formConfig.refreshInterval\"\n >\n <ng-template #c8yRangeValue>\n <div>\n <span\n [translateParams]=\"{ intervalInSeconds: intervalRange.value * 0.001 }\"\n translate\n ngNonBindable\n >\n {{ intervalInSeconds }}s\n </span>\n </div>\n </ng-template>\n <input\n type=\"range\"\n min=\"5000\"\n max=\"100000\"\n step=\"1000\"\n />\n </c8y-range>\n </div>\n <label\n class=\"c8y-switch c8y-switch--inline\"\n *ngIf=\"refreshOption === 'realtime' || refreshOption === 'dashboard-realtime-context'\"\n >\n <input\n name=\"follow\"\n type=\"checkbox\"\n [(ngModel)]=\"formConfig.follow\"\n />\n <span></span>\n <span\n class=\"text-12\"\n translate\n >\n Follow selected\n </span>\n </label>\n </div>\n </div>\n</fieldset>\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n <c8y-map\n *ngIf=\"config.mapConfig\"\n [assets]=\"assets\"\n [config]=\"config.mapConfig\"\n (onMove)=\"onPreviewMapMove($event)\"\n (onZoomStart)=\"onPreviewZoomStart()\"\n (onZoomEnd)=\"onPreviewZoomEnd($event)\"\n (onInit)=\"previewMapInit($event)\"\n ></c8y-map>\n </div>\n</ng-template>\n","import {\n AfterViewInit,\n Component,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { CommonModule as NgCommonModule } from '@angular/common';\nimport { FormsModule as NgFormsModule } from '@angular/forms';\nimport { IIdentified, InventoryService } from '@c8y/client';\nimport {\n ClusterMapComponent,\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AssetLinkPipe,\n CommonModule,\n DashboardChildComponent,\n DismissAlertStrategy,\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n FormsModule,\n WidgetsDashboardComponent\n} from '@c8y/ngx-components';\nimport { MapWidgetConfig } from './map-widget.model';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { MapEventInfoComponent } from './map-event-info.component';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { RouterLink } from '@angular/router';\nimport { debounce } from 'lodash-es';\n\n@Component({\n selector: 'c8y-map-widget',\n templateUrl: './map-widget.component.html',\n standalone: true,\n imports: [\n MapEventInfoComponent,\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n AssetLinkPipe,\n TooltipModule,\n RouterLink\n ]\n})\nexport class MapWidgetComponent\n implements OnInit, OnChanges, OnDestroy, AfterViewInit, DynamicComponent\n{\n mapConfig: ClusterMapConfig = { center: [0, 0] };\n rootNode: IIdentified;\n @Input() config: MapWidgetConfig;\n\n @ViewChild(ClusterMapComponent)\n clusterMap: ClusterMapComponent;\n alerts: DynamicComponentAlertAggregator;\n assets: PositionManagedObject[];\n\n private TIMEOUT_ERROR_TEXT = gettext(\n 'The request is taking longer than usual. We apologize for the inconvenience.'\n );\n private SERVER_ERROR_TEXT = gettext('Server error occurred.');\n private savedNode: IIdentified;\n private destroy$ = new Subject<void>();\n private resizeObserver: ResizeObserver;\n\n constructor(\n dashboardChild: DashboardChildComponent,\n @Optional() private dashboardContextComponent: ContextDashboardComponent,\n private inventory: InventoryService,\n private mapService: MapService,\n @Optional() private widgetsDashboardComponent: WidgetsDashboardComponent\n ) {\n this.listenToWidgetResizeEvent(dashboardChild);\n }\n\n async ngOnInit() {\n this.alerts.setAlertGroupDismissStrategy(\n 'warning',\n DismissAlertStrategy.TEMPORARY_OR_PERMANENT\n );\n if (this.dashboardContextComponent?.dashboard?.deviceType && !this.config.device) {\n const context = this.dashboardContextComponent.context;\n if (context?.id) {\n const { id } = context;\n this.config.device = (await this.inventory.detail(id)).data;\n }\n }\n if (this.config.device) {\n this.rootNode = this.config.device;\n }\n this.mapConfig = { ...this.config.mapConfig };\n if (this.config.widgetInstanceGlobalTimeContext) {\n this.updateMapConfigRealtime();\n }\n this.savedNode = this.rootNode;\n await this.updateAssets();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.config?.currentValue?.widgetInstanceGlobalTimeContext) {\n this.updateMapConfigRealtime();\n }\n }\n\n ngAfterViewInit(): void {\n this.subscribeToErrorsOccurred();\n\n if (this.widgetsDashboardComponent) {\n const resizeCallback = debounce(() => {\n // initial size of map is assigned when left drawer is closed, but if it is opened after initialization\n // the map size is not updated, so we need to call invalidateSize so that map use the correct size\n this.clusterMap.map?.invalidateSize(false);\n }, 100);\n this.resizeObserver = new ResizeObserver(resizeCallback);\n\n this.resizeObserver.observe(this.widgetsDashboardComponent.nativeElement);\n }\n }\n\n startFollow(context) {\n if (context.id !== this.rootNode?.id) {\n this.rootNode = context;\n }\n this.mapConfig = {\n ...this.config.mapConfig,\n follow: true,\n realtime: true\n };\n }\n\n stopFollow() {\n this.mapConfig = {\n ...this.config.mapConfig,\n follow: false\n };\n if (this.config.widgetInstanceGlobalTimeContext) {\n this.updateMapConfigRealtime();\n }\n this.rootNode = this.savedNode;\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n this.destroy$.next();\n }\n\n async fitToBounds() {\n await this.updateAssets();\n if (this.assets.length === 0 || !this.clusterMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(this.assets);\n\n this.clusterMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n private async updateAssets() {\n this.assets = (await this.mapService.getAllPositionMOs(this.config.device)).data;\n }\n\n private listenToWidgetResizeEvent(dashboardChild: DashboardChildComponent) {\n dashboardChild.changeEnd\n .pipe(\n filter(child => child.lastChange === 'resize'),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.clusterMap.reset();\n });\n }\n\n private subscribeToErrorsOccurred() {\n this.clusterMap.errorNotifier\n .pipe(filter(Boolean), takeUntil(this.destroy$))\n .subscribe(error => {\n this.alerts.addAlerts(\n new DynamicComponentAlert({\n type: 'warning',\n text:\n error?.name === 'TimeoutError'\n ? this.TIMEOUT_ERROR_TEXT\n : (error?.message ?? this.SERVER_ERROR_TEXT)\n })\n );\n });\n }\n\n private updateMapConfigRealtime() {\n this.mapConfig.realtime = this.config.realtime || false;\n }\n}\n","<c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [buttonsConfig]=\"\n config.widgetInstanceGlobalTimeContext\n ? { realtime: { show: false }, fitToBounds: { show: true } }\n : { fitToBounds: { show: true } }\n \"\n [assets]=\"assets\"\n></c8y-map-status>\n<c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n>\n <div\n class=\"map-marker\"\n *c8yMapPopup=\"let context\"\n >\n <a\n class=\"text-truncate deviceLink text-12\"\n routerLink=\"{{ context | assetLink }}\"\n >\n <strong>{{ context.name }}</strong>\n </a>\n <c8y-map-event-info [asset]=\"context\">\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Activate realtime on this asset and follow it if it moves' | translate\"\n type=\"button\"\n (click)=\"startFollow(context)\"\n *ngIf=\"!mapConfig.follow\"\n translate\n >\n Follow\n </button>\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Stop following this asset.' | translate\"\n type=\"button\"\n (click)=\"stopFollow()\"\n *ngIf=\"mapConfig.follow\"\n translate\n >\n Unfollow\n </button>\n </c8y-map-event-info>\n </div>\n</c8y-cluster-map>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCommonModule","i4","NgFormsModule","CommonModule","FormsModule","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AAQhC,IAAA,WAAA,CAAoB,YAA0B,EAAA;QAA1B,IAAA,CAAA,YAAY,GAAZ,YAAY;QAJhC,IAAA,CAAA,OAAO,GAAG,IAAI;IAImC;AAEjD,IAAA,MAAM,WAAW,GAAA;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;QACnB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AAC5C,YAAA,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,EAAE;AAC1C,YAAA,YAAY,EAAE,cAAc;AAC5B,YAAA,QAAQ,EAAE,CAAC;AACX,YAAA,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;AACpB,SAAA,CAAC;AACF,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;AACpB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;IACtB;+GArBW,qBAAqB,EAAA,IAAA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EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAET,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACb,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjB9B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EAAA,OAAA,EACP;wBACP,qBAAqB;wBACrBJ,YAAc;wBACdE,WAAa;wBACbC,cAAY;wBACZC,aAAW;wBACX,kBAAkB;wBAClB,SAAS;wBACT,aAAa;wBACb,aAAa;wBACb;AACD,qBAAA,EAAA,QAAA,EAAA,q5CAAA,EAAA;;0BAwBE;;0BAGA;yCApBM,MAAM,EAAA,CAAA;sBAAd;gBAGD,UAAU,EAAA,CAAA;sBADT,SAAS;uBAAC,mBAAmB;;;AEpEhC;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-widgets-implementations-map.mjs","sources":["../../widgets/implementations/map/map-event-info.component.ts","../../widgets/implementations/map/map-event-info.component.html","../../widgets/implementations/map/map-widget-config.component.ts","../../widgets/implementations/map/map-widget-config.component.html","../../widgets/implementations/map/map-widget.component.ts","../../widgets/implementations/map/map-widget.component.html","../../widgets/implementations/map/c8y-ngx-components-widgets-implementations-map.ts"],"sourcesContent":["import { Component, Input, OnChanges } from '@angular/core';\nimport { CommonModule as NgCommonModule } from '@angular/common';\nimport { EventService, IEvent, IManagedObject } from '@c8y/client';\nimport { C8yTranslateDirective, DatePipe, LoadingComponent } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-map-event-info',\n templateUrl: './map-event-info.component.html',\n standalone: true,\n imports: [NgCommonModule, C8yTranslateDirective, DatePipe, LoadingComponent]\n})\nexport class MapEventInfoComponent implements OnChanges {\n @Input()\n asset: IManagedObject;\n\n loading = true;\n\n event: IEvent;\n\n constructor(private eventService: EventService) {}\n\n async ngOnChanges() {\n this.loading = true;\n const { data } = await this.eventService.list({\n dateFrom: '1970-01-01',\n dateTo: new Date(Date.now()).toISOString(),\n fragmentType: 'c8y_Position',\n pageSize: 1,\n source: this.asset.id\n });\n this.event = data[0];\n this.loading = false;\n }\n}\n","<div class=\"text-muted text-10 p-t-4 p-b-4\">\n <span translate>Last position update:</span>\n <br />\n <c8y-loading *ngIf=\"loading\"></c8y-loading>\n <ng-container *ngIf=\"!loading\">\n <i *ngIf=\"!event\" translate>No information found</i>\n <ng-container *ngIf=\"event\">\n <i>{{ event.time | c8yDate }}</i>\n <ng-content></ng-content>\n </ng-container>\n </ng-container>\n</div>\n","import { CommonModule as NgCommonModule } from '@angular/common';\nimport {\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { ControlContainer, NgForm, FormsModule as NgFormsModule } from '@angular/forms';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AlertService, AssetLinkPipe, CommonModule, FormsModule } from '@c8y/ngx-components';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport {\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MAP_DEFAULT_CONFIG,\n MapComponent,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport type { MapDefaultConfig } from '@c8y/options';\nimport { TranslateService } from '@ngx-translate/core';\nimport type L from 'leaflet';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { fromEvent, Observable, Subject } from 'rxjs';\nimport { combineLatestWith, take, takeUntil } from 'rxjs/operators';\nimport { MapRefreshOption, MapWidgetConfig } from './map-widget.model';\n\n@Component({\n selector: 'c8y-map-widget-config',\n templateUrl: './map-widget-config.component.html',\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],\n standalone: true,\n imports: [\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n AssetLinkPipe,\n TooltipModule\n ]\n})\nexport class MapWidgetConfigComponent implements OnInit, OnChanges, OnDestroy {\n @Input() config: MapWidgetConfig = {\n mapConfig: undefined\n };\n\n formConfig: ClusterMapConfig;\n\n canAutoCenter = true;\n isPositionedDevice = false;\n assets: PositionManagedObject[];\n refreshOption: MapRefreshOption = 'none';\n\n private destroyed$ = new Subject<void>();\n private leaflet: typeof L;\n private centerIcon: L.Marker;\n // JS precision for floating point number is 15 for 64-bit and because of this provided to leaflet are recalculated\n // to values almost-like provided (e.g. 0 is recalculated to 1.46e-14; for 180 it's 180.00000000000003).\n // To ensure provided value has no floating point error, number needs to be rounded to fixed point 13.\n private readonly FIXED_POINT_DIGITS = 13;\n\n @ViewChild(MapComponent)\n previewMap: MapComponent;\n\n @ViewChild('previewMap')\n set previewMapSet(template: TemplateRef<any>) {\n if (template) {\n this.widgetConfigService.setPreview(template);\n return;\n }\n this.widgetConfigService.setPreview(null);\n }\n\n constructor(\n private mapService: MapService,\n private alertService: AlertService,\n private translateService: TranslateService,\n @Inject(MAP_DEFAULT_CONFIG) private defaultMapConfig: Observable<MapDefaultConfig>,\n private widgetConfigService: WidgetConfigService\n ) {}\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n }\n\n ngOnInit() {\n this.defaultMapConfig.pipe(takeUntil(this.destroyed$)).subscribe(defaultConfig => {\n this.formConfig = {\n zoomLevel: defaultConfig.zoomLevel,\n center: defaultConfig.center\n };\n this.initForm();\n });\n }\n\n async initForm() {\n if (!this.config.mapConfig) {\n this.config.mapConfig = this.formConfig;\n }\n this.formConfig = {\n ...this.formConfig,\n ...this.config.mapConfig,\n disablePan: false\n };\n await this.updateAsset();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (\n changes.config.currentValue !== changes.config.previousValue &&\n !changes.config.firstChange\n ) {\n await this.updateAsset();\n }\n }\n\n previewMapInit(leaflet: typeof L): void {\n this.leaflet = leaflet;\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n onBeforeSave() {\n this.config.mapConfig = this.formConfig;\n return true;\n }\n\n zoomLevelChanged() {\n this.config.mapConfig = {\n ...this.config.mapConfig,\n zoomLevel: this.formConfig.zoomLevel\n };\n }\n\n changeCenter() {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n this.config.mapConfig = { ...this.formConfig, center: [...this.formConfig.center] };\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n changeCenterOnEnterKey(event: KeyboardEvent): void {\n event.preventDefault();\n this.changeCenter();\n }\n\n onPreviewZoomStart() {\n this.centerIcon.remove();\n }\n\n onPreviewZoomEnd(event: L.LeafletEvent) {\n this.formConfig.zoomLevel = Math.floor(event.target.getZoom());\n }\n\n onPreviewMapMove(event: L.LeafletEvent) {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n const { lat, lng } = event.target.getCenter();\n const fixedLat = +lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +lng.toFixed(this.FIXED_POINT_DIGITS);\n this.addCenterIcon(fixedLat, fixedLng);\n this.formConfig.center = [fixedLat, fixedLng];\n }\n\n useOwnPosition() {\n navigator.geolocation.getCurrentPosition(({ coords }) => {\n this.formConfig.center = [coords.latitude, coords.longitude];\n this.changeCenter();\n });\n }\n\n centerToAsset() {\n this.formConfig.center = [\n this.config.device.c8y_Position.lat,\n this.config.device.c8y_Position.lng\n ];\n this.changeCenter();\n }\n\n async fitToBounds() {\n if (!this.assets?.length || !this.previewMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(this.assets);\n\n // map.fitBounds causes zoom and move events, so get new center and zoom level only when these events are finished\n fromEvent<L.LeafletEvent>(this.previewMap.map, 'moveend')\n .pipe(combineLatestWith(fromEvent<L.LeafletEvent>(this.previewMap.map, 'zoomend')), take(1))\n .subscribe(() => {\n const center = this.previewMap.map.getCenter();\n const zoom = this.previewMap.map.getZoom();\n\n const fixedLat = +center.lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +center.lng.toFixed(this.FIXED_POINT_DIGITS);\n this.formConfig.center = [fixedLat, fixedLng];\n this.formConfig.zoomLevel = Math.floor(zoom);\n\n this.changeCenter();\n });\n\n this.previewMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n updateRefreshOption() {\n this.formConfig.realtime = this.refreshOption === 'realtime';\n this.config.widgetInstanceGlobalAutoRefreshContext =\n this.refreshOption === 'dashboard-auto-refresh-context';\n this.formConfig.widgetInstanceGlobalAutoRefreshContext =\n this.refreshOption === 'dashboard-auto-refresh-context';\n if (this.refreshOption === 'interval') {\n this.formConfig.refreshInterval ??= 5000;\n } else {\n this.formConfig.refreshInterval = null;\n }\n if (!this.formConfig.realtime) {\n this.formConfig.follow = false;\n }\n this.config.widgetInstanceGlobalTimeContext =\n this.refreshOption === 'dashboard-realtime-context';\n if (this.config.widgetInstanceGlobalTimeContext) {\n this.formConfig.realtime = null;\n }\n }\n\n selectIcon(icon: string) {\n this.formConfig.icon = icon;\n this.config.mapConfig.icon = icon;\n this.previewMap.refreshMarkers();\n }\n\n private async updateAsset() {\n this.canAutoCenter = this.mapService.hasPosition(this.config.device);\n this.isPositionedDevice = this.mapService.isPositionedDevice(this.config.device);\n this.refreshOption = this.getRefreshOption();\n this.updateRefreshOption();\n\n const { data, paging } = await this.mapService.getAllPositionMOs(this.config.device);\n this.assets = data;\n if (paging.totalPages > 1) {\n this.alertService.danger(\n gettext(\n 'It might be possible that assets are not shown in the preview, as the current selection has more than 500 assets and the preview only supports a maximum of 500 assets.'\n )\n );\n }\n }\n\n private getRefreshOption(): MapRefreshOption {\n let option: MapRefreshOption = 'none';\n if (this.formConfig.realtime) {\n option = 'realtime';\n } else if (this.formConfig.refreshInterval) {\n option = 'interval';\n } else if (this.config.widgetInstanceGlobalTimeContext) {\n option = 'dashboard-realtime-context';\n } else if (\n this.config.widgetInstanceGlobalAutoRefreshContext ||\n this.formConfig.widgetInstanceGlobalAutoRefreshContext\n ) {\n option = 'dashboard-auto-refresh-context';\n }\n const isNotAllowedOption =\n (!this.isPositionedDevice && option === 'dashboard-realtime-context') ||\n (!this.isPositionedDevice && option === 'realtime') ||\n (this.isPositionedDevice && option === 'interval');\n option = isNotAllowedOption ? 'none' : option;\n return option;\n }\n\n private addCenterIcon(lat: number, lng: number) {\n const titleText = this.translateService.instant(gettext('Map center'));\n const icon = this.leaflet.divIcon({\n html: `<i style=\"pointer-events: none\" class=\"c8y-map-marker-icon text-muted dlt-c8y-icon-target icon-2x\" title=\"${titleText}\" />`\n });\n this.centerIcon = this.leaflet.marker([lat, lng], {\n icon\n });\n this.previewMap.addMarkerToMap(this.centerIcon);\n }\n}\n","<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Map' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-xs-3\">\n <c8y-form-group class=\"m-b-16 text-center form-group-sm\">\n <label translate>Marker icon</label>\n <c8y-icon-selector-wrapper\n [canRemoveIcon]=\"true\"\n [selectedIcon]=\"formConfig.icon\"\n (onSelect)=\"selectIcon($event)\"\n ></c8y-icon-selector-wrapper>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-9\">\n <div class=\"form-group form-group-sm\">\n <label translate>Zoom level</label>\n <c8y-range\n class=\"label-bottom\"\n name=\"zoomLevel\"\n #range\n [(ngModel)]=\"formConfig.zoomLevel\"\n (change)=\"zoomLevelChanged()\"\n >\n <input\n type=\"range\"\n min=\"0\"\n max=\"18\"\n step=\"1\"\n />\n </c8y-range>\n </div>\n </div>\n </div>\n <c8y-form-group class=\"form-group-sm\">\n <label translate>Center bound</label>\n <div class=\"input-group input-group-sm\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lat.`latitude`' | translate }}\"\n name=\"centerLat\"\n type=\"number\"\n required\n [(ngModel)]=\"formConfig.center[0]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-90\"\n max=\"90\"\n step=\"0.1\"\n />\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lng.`longitude`' | translate }}\"\n name=\"centerLng\"\n type=\"number\"\n required\n min=\"-180\"\n max=\"180\"\n [(ngModel)]=\"formConfig.center[1]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-180\"\n max=\"180\"\n step=\"0.1\"\n />\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use your location' | translate\"\n [tooltip]=\"'Use your location' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"useOwnPosition()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location-arrow\"\n ></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use selected asset location' | translate\"\n [tooltip]=\"'Use selected asset location' | translate\"\n placement=\"top\"\n container=\"body\"\n *ngIf=\"canAutoCenter; else fitToBoundsButton\"\n (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n </div>\n </div>\n\n <ng-template #fitToBoundsButton>\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Fit to assets bounds' | translate\"\n [tooltip]=\"'Fit to assets bounds' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"fitToBounds()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"waypoint-map\"\n ></i>\n </button>\n </ng-template>\n <c8y-messages [helpMessage]=\"'Drag the map to the desired position' | translate\"></c8y-messages>\n </c8y-form-group>\n</fieldset>\n\n<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Auto refresh' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n id=\"selectExample\"\n name=\"refreshSelection\"\n [(ngModel)]=\"refreshOption\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Only refreshing on interaction' | translate\"\n value=\"none\"\n translate\n >\n No automatic refresh\n </option>\n <option\n [title]=\"'Refreshing after the given interval and on interaction' | translate\"\n value=\"interval\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use refresh interval\n </option>\n <option\n [title]=\"\n 'Refreshing after the given interval and on interaction, synchronized globally'\n | translate\n \"\n value=\"dashboard-auto-refresh-context\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use global refresh interval\n </option>\n <option\n [title]=\"'Live updating on each position change' | translate\"\n value=\"realtime\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Realtime\n </option>\n <option\n [title]=\"'Bind widget to dashboard realtime context' | translate\"\n value=\"dashboard-realtime-context\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Dashboard realtime context\n </option>\n </select>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-6\">\n <div class=\"form-group form-group-sm m-b-16\">\n <c8y-range\n class=\"label-bottom\"\n name=\"refreshInterval\"\n #intervalRange\n *ngIf=\"refreshOption === 'interval'\"\n [(ngModel)]=\"formConfig.refreshInterval\"\n >\n <ng-template #c8yRangeValue>\n <div>\n <span\n [translateParams]=\"{ intervalInSeconds: intervalRange.value * 0.001 }\"\n translate\n ngNonBindable\n >\n {{ intervalInSeconds }}s\n </span>\n </div>\n </ng-template>\n <input\n type=\"range\"\n min=\"5000\"\n max=\"100000\"\n step=\"1000\"\n />\n </c8y-range>\n </div>\n <label\n class=\"c8y-switch c8y-switch--inline\"\n *ngIf=\"refreshOption === 'realtime' || refreshOption === 'dashboard-realtime-context'\"\n >\n <input\n name=\"follow\"\n type=\"checkbox\"\n [(ngModel)]=\"formConfig.follow\"\n />\n <span></span>\n <span\n class=\"text-12\"\n translate\n >\n Follow selected\n </span>\n </label>\n </div>\n </div>\n</fieldset>\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n <c8y-map\n *ngIf=\"config.mapConfig\"\n [assets]=\"assets\"\n [config]=\"config.mapConfig\"\n (onMove)=\"onPreviewMapMove($event)\"\n (onZoomStart)=\"onPreviewZoomStart()\"\n (onZoomEnd)=\"onPreviewZoomEnd($event)\"\n (onInit)=\"previewMapInit($event)\"\n ></c8y-map>\n </div>\n</ng-template>\n","import {\n AfterViewInit,\n Component,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { CommonModule as NgCommonModule } from '@angular/common';\nimport { FormsModule as NgFormsModule } from '@angular/forms';\nimport { IIdentified, InventoryService } from '@c8y/client';\nimport {\n ClusterMapComponent,\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n AssetLinkPipe,\n CommonModule,\n DashboardChildComponent,\n DismissAlertStrategy,\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n FormsModule,\n WidgetsDashboardComponent\n} from '@c8y/ngx-components';\nimport { MapWidgetConfig } from './map-widget.model';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { MapEventInfoComponent } from './map-event-info.component';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { RouterLink } from '@angular/router';\nimport { debounce } from 'lodash-es';\n\n@Component({\n selector: 'c8y-map-widget',\n templateUrl: './map-widget.component.html',\n standalone: true,\n imports: [\n MapEventInfoComponent,\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n AssetLinkPipe,\n TooltipModule,\n RouterLink\n ]\n})\nexport class MapWidgetComponent\n implements OnInit, OnChanges, OnDestroy, AfterViewInit, DynamicComponent\n{\n mapConfig: ClusterMapConfig = { center: [0, 0] };\n rootNode: IIdentified;\n @Input() config: MapWidgetConfig;\n\n @ViewChild(ClusterMapComponent)\n clusterMap: ClusterMapComponent;\n alerts: DynamicComponentAlertAggregator;\n assets: PositionManagedObject[];\n\n private TIMEOUT_ERROR_TEXT = gettext(\n 'The request is taking longer than usual. We apologize for the inconvenience.'\n );\n private SERVER_ERROR_TEXT = gettext('Server error occurred.');\n private savedNode: IIdentified;\n private destroy$ = new Subject<void>();\n private resizeObserver: ResizeObserver;\n\n constructor(\n dashboardChild: DashboardChildComponent,\n @Optional() private dashboardContextComponent: ContextDashboardComponent,\n private inventory: InventoryService,\n private mapService: MapService,\n @Optional() private widgetsDashboardComponent: WidgetsDashboardComponent\n ) {\n this.listenToWidgetResizeEvent(dashboardChild);\n }\n\n async ngOnInit() {\n this.alerts.setAlertGroupDismissStrategy(\n 'warning',\n DismissAlertStrategy.TEMPORARY_OR_PERMANENT\n );\n\n await this.applyDeviceTypeTarget();\n\n if (this.config.device) {\n this.rootNode = this.config.device;\n }\n this.mapConfig = { ...this.config.mapConfig };\n if (this.config.widgetInstanceGlobalTimeContext) {\n this.updateMapConfigRealtime();\n }\n this.savedNode = this.rootNode;\n await this.updateAssets();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.config?.currentValue?.widgetInstanceGlobalTimeContext) {\n this.updateMapConfigRealtime();\n }\n }\n\n ngAfterViewInit(): void {\n this.subscribeToErrorsOccurred();\n\n if (this.widgetsDashboardComponent) {\n const resizeCallback = debounce(() => {\n // initial size of map is assigned when left drawer is closed, but if it is opened after initialization\n // the map size is not updated, so we need to call invalidateSize so that map use the correct size\n this.clusterMap.map?.invalidateSize(false);\n }, 100);\n this.resizeObserver = new ResizeObserver(resizeCallback);\n\n this.resizeObserver.observe(this.widgetsDashboardComponent.nativeElement);\n }\n }\n\n startFollow(context) {\n if (context.id !== this.rootNode?.id) {\n this.rootNode = context;\n }\n this.mapConfig = {\n ...this.config.mapConfig,\n follow: true,\n realtime: true\n };\n }\n\n stopFollow() {\n this.mapConfig = {\n ...this.config.mapConfig,\n follow: false\n };\n if (this.config.widgetInstanceGlobalTimeContext) {\n this.updateMapConfigRealtime();\n }\n this.rootNode = this.savedNode;\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n this.destroy$.next();\n }\n\n async fitToBounds() {\n await this.updateAssets();\n if (this.assets.length === 0 || !this.clusterMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(this.assets);\n\n this.clusterMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n private async updateAssets() {\n this.assets = (await this.mapService.getAllPositionMOs(this.config.device)).data;\n }\n\n private listenToWidgetResizeEvent(dashboardChild: DashboardChildComponent) {\n dashboardChild.changeEnd\n .pipe(\n filter(child => child.lastChange === 'resize'),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.clusterMap.reset();\n });\n }\n\n private subscribeToErrorsOccurred() {\n this.clusterMap.errorNotifier\n .pipe(filter(Boolean), takeUntil(this.destroy$))\n .subscribe(error => {\n this.alerts.addAlerts(\n new DynamicComponentAlert({\n type: 'warning',\n text:\n error?.name === 'TimeoutError'\n ? this.TIMEOUT_ERROR_TEXT\n : (error?.message ?? this.SERVER_ERROR_TEXT)\n })\n );\n });\n }\n\n private updateMapConfigRealtime() {\n this.mapConfig.realtime = this.config.realtime || false;\n }\n\n private async applyDeviceTypeTarget() {\n const hasDeviceTarget = !!this.config.device; // The map widget supports not selecting any target\n const isDeviceTypeDashboard = !!this.dashboardContextComponent?.dashboard?.deviceType;\n if (isDeviceTypeDashboard && hasDeviceTarget) {\n const context = this.dashboardContextComponent.context;\n if (context?.id) {\n const { id } = context;\n this.config.device = (await this.inventory.detail(id)).data;\n }\n }\n }\n}\n","<c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [buttonsConfig]=\"\n config.widgetInstanceGlobalTimeContext\n ? { realtime: { show: false }, fitToBounds: { show: true } }\n : { fitToBounds: { show: true } }\n \"\n [assets]=\"assets\"\n></c8y-map-status>\n<c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n>\n <div\n class=\"map-marker\"\n *c8yMapPopup=\"let context\"\n >\n <a\n class=\"text-truncate deviceLink text-12\"\n routerLink=\"{{ context | assetLink }}\"\n >\n <strong>{{ context.name }}</strong>\n </a>\n <c8y-map-event-info [asset]=\"context\">\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Activate realtime on this asset and follow it if it moves' | translate\"\n type=\"button\"\n (click)=\"startFollow(context)\"\n *ngIf=\"!mapConfig.follow\"\n translate\n >\n Follow\n </button>\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Stop following this asset.' | translate\"\n type=\"button\"\n (click)=\"stopFollow()\"\n *ngIf=\"mapConfig.follow\"\n translate\n >\n Unfollow\n </button>\n </c8y-map-event-info>\n </div>\n</c8y-cluster-map>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCommonModule","i4","NgFormsModule","CommonModule","FormsModule","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AAQhC,IAAA,WAAA,CAAoB,YAA0B,EAAA;QAA1B,IAAA,CAAA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;kBAjB9B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EAAA,OAAA,EACP;wBACP,qBAAqB;wBACrBJ,YAAc;wBACdE,WAAa;wBACbC,cAAY;wBACZC,aAAW;wBACX,kBAAkB;wBAClB,SAAS;wBACT,aAAa;wBACb,aAAa;wBACb;AACD,qBAAA,EAAA,QAAA,EAAA,q5CAAA,EAAA;;0BAwBE;;0BAGA;yCApBM,MAAM,EAAA,CAAA;sBAAd;gBAGD,UAAU,EAAA,CAAA;sBADT,SAAS;uBAAC,mBAAmB;;;AEpEhC;;AAEG;;;;"}
@@ -32,7 +32,7 @@ import * as i1$2 from '@angular/platform-browser';
32
32
  import { BlobReader, ZipReader, BlobWriter, ZipWriter } from '@zip.js/zip.js';
33
33
  import * as i2$2 from 'ngx-bootstrap/collapse';
34
34
  import { CollapseModule } from 'ngx-bootstrap/collapse';
35
- import { sortBy as sortBy$1, isEmpty as isEmpty$1, findIndex, assign as assign$1, flatten as flatten$1, get as get$1, set as set$1, pick as pick$1 } from 'lodash';
35
+ import { sortBy as sortBy$1, isEmpty as isEmpty$1, findIndex, assign as assign$1, get as get$1, set as set$1, flatten as flatten$1, pick as pick$1 } from 'lodash';
36
36
  import * as i1$6 from '@angular/cdk/bidi';
37
37
  import * as i2$1 from '@angular/cdk/stepper';
38
38
  import { CdkStepper, STEP_STATE, CdkStep, CdkStepperModule, STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';
@@ -25548,12 +25548,22 @@ class RouterService extends ExtensionPointWithoutStateForPlugins {
25548
25548
  // if ** route hit, the angularjs routes are loaded.
25549
25549
  const emptyRoute = this.router.config.find(r => r.path === '**');
25550
25550
  const rootContextRoutes = this.findAllRootContextRoutes([...this.router.config, ...routes]);
25551
+ this.attachExistingChildRoutes(this.router.config, routes);
25551
25552
  this.router.resetConfig([
25552
25553
  ...this.router.config.filter(r => r.path !== '**'),
25553
25554
  ...routes.map((r) => this.convertRoute(rootContextRoutes, r)),
25554
25555
  emptyRoute
25555
25556
  ].filter(Boolean));
25556
25557
  }
25558
+ attachExistingChildRoutes(existing, toAdd) {
25559
+ const existingRootRoutes = this.findAllRootContextRoutes(existing || []);
25560
+ const toAddRootRoutes = this.findAllRootContextRoutes(toAdd || []);
25561
+ forEach(toAddRootRoutes, (r) => {
25562
+ map$1(filter$2(existingRootRoutes, { rootContext: r.rootContext }), (er) => {
25563
+ r.children = [...(er.children || []), ...(r.children || [])];
25564
+ });
25565
+ });
25566
+ }
25557
25567
  convertRoute(rootContextRoutes, route) {
25558
25568
  if (route.context) {
25559
25569
  rootContextRoutes.forEach((r) => {
@@ -25581,7 +25591,7 @@ class RouterService extends ExtensionPointWithoutStateForPlugins {
25581
25591
  resolveRouterForChildRoutes(moduleRef, remoteNgModule) {
25582
25592
  // NOTE: stolen from lazy loaded routes from Angular itself.
25583
25593
  // https://github.com/angular/angular/blob/da58801f95c66c201e332189af25702bdd722f3f/packages/router/src/router_config_loader.ts#L103-L108
25584
- const rawRoutes = flatten$1(moduleRef.injector.get(ROUTES, [], { self: true, optional: true }));
25594
+ const rawRoutes = flatten(moduleRef.injector.get(ROUTES, [], { self: true, optional: true }));
25585
25595
  if (rawRoutes.length > 0) {
25586
25596
  const routeWithInjector = rawRoutes.map(route => {
25587
25597
  route.providers = [importProvidersFrom(remoteNgModule)];
@@ -26697,7 +26707,7 @@ class ArrayTypeComponent extends FieldArrayType {
26697
26707
  }
26698
26708
  }
26699
26709
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
26700
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ArrayTypeComponent, isStandalone: true, selector: "c8y-array-type", usesInheritance: true, ngImport: i0, template: "<div role=\"group\" [attr.aria-labelledby]=\"id + '-fieldset'\">\n <div id=\"{{ id + '-fieldset' }}\" class=\"legend form-block\" *ngIf=\"to.label || to.description\">\n {{ to.label | humanize }}\n <button\n class=\"btn-help btn-help--sm m-t-auto m-b-auto\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"to.description\"\n placement=\"right\"\n triggers=\"focus\"\n *ngIf=\"to.description\"\n ></button>\n </div>\n\n <div\n class=\"form-control-feedback-message has-error\"\n role=\"alert\"\n *ngIf=\"showError && formControl.errors\"\n >\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <div *ngFor=\"let ifield of field.fieldGroup; let i = index\" class=\"input-group-array\">\n <formly-field [field]=\"ifield | c8yArrayTypeInjectTemplate: customTemplate\"></formly-field>\n <ng-container\n *ngIf=\"ifield.type === 'formly-group' || ifield.type === 'array'\"\n [ngTemplateOutlet]=\"customTemplate\"\n ></ng-container>\n <ng-template #customTemplate>\n <div class=\"input-group-btn delete-row\">\n <button\n class=\"btn btn-dot btn-dot--danger flex-item-right\"\n type=\"button\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n [disabled]=\"to.disabled || (field.fieldGroup.length === 1 && to.required)\"\n (click)=\"remove(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"p-t-8\">\n <button\n class=\"btn btn-sm btn-default\"\n type=\"button\"\n title=\"{{\n (field.templateOptions?.addText | translate) || 'Add \\{\\{ label \\}\\}'\n | translate: fieldArrayProps\n }}\"\n [disabled]=\"to.disabled\"\n (click)=\"add()\"\n [attr.data-cy]=\"field.templateOptions?.addTextDataCy || 'add-array-item'\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span\n *ngIf=\"!field.templateOptions?.addText\"\n ngNonBindable\n translate\n [translateParams]=\"fieldArrayProps\"\n >\n Add {{ label }}\n </span>\n <span *ngIf=\"field.templateOptions?.addText\">\n {{ field.templateOptions?.addText | translate }}\n </span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i1$9.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1$5.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: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: HumanizePipe, name: "humanize" }, { kind: "pipe", type: C8yArrayTypeInjectTemplatePipe, name: "c8yArrayTypeInjectTemplate" }] }); }
26710
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ArrayTypeComponent, isStandalone: true, selector: "c8y-array-type", usesInheritance: true, ngImport: i0, template: "<div role=\"group\" [attr.aria-labelledby]=\"id + '-fieldset'\">\n <div id=\"{{ id + '-fieldset' }}\" class=\"legend form-block\" *ngIf=\"to.label || to.description\">\n {{ to.label | humanize }}\n <button\n class=\"btn-help btn-help--sm m-t-auto m-b-auto\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"to.description\"\n placement=\"right\"\n triggers=\"focus\"\n *ngIf=\"to.description\"\n ></button>\n </div>\n\n <div\n class=\"form-control-feedback-message has-error\"\n role=\"alert\"\n *ngIf=\"showError && formControl.errors\"\n >\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <div *ngFor=\"let ifield of field.fieldGroup; let i = index\" class=\"input-group-array\">\n <formly-field [field]=\"ifield | c8yArrayTypeInjectTemplate: customTemplate\"></formly-field>\n <ng-container\n *ngIf=\"ifield.type === 'formly-group' || ifield.type === 'object' || ifield.type === 'array'\"\n [ngTemplateOutlet]=\"customTemplate\"\n ></ng-container>\n <ng-template #customTemplate>\n <div class=\"input-group-btn delete-row\">\n <button\n class=\"btn btn-dot btn-dot--danger flex-item-right\"\n type=\"button\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n [disabled]=\"to.disabled || (field.fieldGroup.length === 1 && to.required)\"\n [attr.data-cy]=\"'array-type-component--remove-array-item-' + i\"\n (click)=\"remove(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"p-t-8\">\n <button\n class=\"btn btn-sm btn-default\"\n type=\"button\"\n title=\"{{\n (field.templateOptions?.addText | translate) || 'Add \\{\\{ label \\}\\}'\n | translate: fieldArrayProps\n }}\"\n [disabled]=\"to.disabled\"\n (click)=\"add()\"\n [attr.data-cy]=\"field.templateOptions?.addTextDataCy || 'add-array-item'\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span\n *ngIf=\"!field.templateOptions?.addText\"\n ngNonBindable\n translate\n [translateParams]=\"fieldArrayProps\"\n >\n Add {{ label }}\n </span>\n <span *ngIf=\"field.templateOptions?.addText\">\n {{ field.templateOptions?.addText | translate }}\n </span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i1$9.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1$5.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: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: HumanizePipe, name: "humanize" }, { kind: "pipe", type: C8yArrayTypeInjectTemplatePipe, name: "c8yArrayTypeInjectTemplate" }] }); }
26701
26711
  }
26702
26712
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArrayTypeComponent, decorators: [{
26703
26713
  type: Component,
@@ -26713,7 +26723,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
26713
26723
  C8yTranslatePipe,
26714
26724
  HumanizePipe,
26715
26725
  C8yArrayTypeInjectTemplatePipe
26716
- ], template: "<div role=\"group\" [attr.aria-labelledby]=\"id + '-fieldset'\">\n <div id=\"{{ id + '-fieldset' }}\" class=\"legend form-block\" *ngIf=\"to.label || to.description\">\n {{ to.label | humanize }}\n <button\n class=\"btn-help btn-help--sm m-t-auto m-b-auto\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"to.description\"\n placement=\"right\"\n triggers=\"focus\"\n *ngIf=\"to.description\"\n ></button>\n </div>\n\n <div\n class=\"form-control-feedback-message has-error\"\n role=\"alert\"\n *ngIf=\"showError && formControl.errors\"\n >\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <div *ngFor=\"let ifield of field.fieldGroup; let i = index\" class=\"input-group-array\">\n <formly-field [field]=\"ifield | c8yArrayTypeInjectTemplate: customTemplate\"></formly-field>\n <ng-container\n *ngIf=\"ifield.type === 'formly-group' || ifield.type === 'array'\"\n [ngTemplateOutlet]=\"customTemplate\"\n ></ng-container>\n <ng-template #customTemplate>\n <div class=\"input-group-btn delete-row\">\n <button\n class=\"btn btn-dot btn-dot--danger flex-item-right\"\n type=\"button\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n [disabled]=\"to.disabled || (field.fieldGroup.length === 1 && to.required)\"\n (click)=\"remove(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"p-t-8\">\n <button\n class=\"btn btn-sm btn-default\"\n type=\"button\"\n title=\"{{\n (field.templateOptions?.addText | translate) || 'Add \\{\\{ label \\}\\}'\n | translate: fieldArrayProps\n }}\"\n [disabled]=\"to.disabled\"\n (click)=\"add()\"\n [attr.data-cy]=\"field.templateOptions?.addTextDataCy || 'add-array-item'\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span\n *ngIf=\"!field.templateOptions?.addText\"\n ngNonBindable\n translate\n [translateParams]=\"fieldArrayProps\"\n >\n Add {{ label }}\n </span>\n <span *ngIf=\"field.templateOptions?.addText\">\n {{ field.templateOptions?.addText | translate }}\n </span>\n </button>\n </div>\n</div>\n" }]
26726
+ ], template: "<div role=\"group\" [attr.aria-labelledby]=\"id + '-fieldset'\">\n <div id=\"{{ id + '-fieldset' }}\" class=\"legend form-block\" *ngIf=\"to.label || to.description\">\n {{ to.label | humanize }}\n <button\n class=\"btn-help btn-help--sm m-t-auto m-b-auto\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"to.description\"\n placement=\"right\"\n triggers=\"focus\"\n *ngIf=\"to.description\"\n ></button>\n </div>\n\n <div\n class=\"form-control-feedback-message has-error\"\n role=\"alert\"\n *ngIf=\"showError && formControl.errors\"\n >\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <div *ngFor=\"let ifield of field.fieldGroup; let i = index\" class=\"input-group-array\">\n <formly-field [field]=\"ifield | c8yArrayTypeInjectTemplate: customTemplate\"></formly-field>\n <ng-container\n *ngIf=\"ifield.type === 'formly-group' || ifield.type === 'object' || ifield.type === 'array'\"\n [ngTemplateOutlet]=\"customTemplate\"\n ></ng-container>\n <ng-template #customTemplate>\n <div class=\"input-group-btn delete-row\">\n <button\n class=\"btn btn-dot btn-dot--danger flex-item-right\"\n type=\"button\"\n [attr.aria-label]=\"'Delete' | translate\"\n tooltip=\"{{ 'Delete' | translate }}\"\n [delay]=\"500\"\n placement=\"right\"\n [disabled]=\"to.disabled || (field.fieldGroup.length === 1 && to.required)\"\n [attr.data-cy]=\"'array-type-component--remove-array-item-' + i\"\n (click)=\"remove(i)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </ng-template>\n </div>\n\n <div class=\"p-t-8\">\n <button\n class=\"btn btn-sm btn-default\"\n type=\"button\"\n title=\"{{\n (field.templateOptions?.addText | translate) || 'Add \\{\\{ label \\}\\}'\n | translate: fieldArrayProps\n }}\"\n [disabled]=\"to.disabled\"\n (click)=\"add()\"\n [attr.data-cy]=\"field.templateOptions?.addTextDataCy || 'add-array-item'\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span\n *ngIf=\"!field.templateOptions?.addText\"\n ngNonBindable\n translate\n [translateParams]=\"fieldArrayProps\"\n >\n Add {{ label }}\n </span>\n <span *ngIf=\"field.templateOptions?.addText\">\n {{ field.templateOptions?.addText | translate }}\n </span>\n </button>\n </div>\n</div>\n" }]
26717
26727
  }] });
26718
26728
 
26719
26729
  const fieldCheckboxTypeConfig = () => importProvidersFrom(FormlyModule.forChild({