@c8y/ngx-components 1021.75.7 → 1021.76.3
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.
- package/branding/shared/supports-branding.service.d.ts.map +1 -1
- package/core/dashboard/widgets-dashboard.component.d.ts +4 -2
- package/core/dashboard/widgets-dashboard.component.d.ts.map +1 -1
- package/core/navigator/navigator-bottom/navigator-bottom.service.d.ts +3 -1
- package/core/navigator/navigator-bottom/navigator-bottom.service.d.ts.map +1 -1
- package/esm2022/branding/shared/supports-branding.service.mjs +6 -3
- package/esm2022/core/dashboard/widgets-dashboard.component.mjs +9 -5
- package/esm2022/core/navigator/navigator-bottom/navigator-bottom.service.mjs +13 -6
- package/esm2022/device-map/device-map.component.mjs +2 -2
- package/esm2022/map/cluster-map.component.mjs +6 -3
- package/esm2022/map/map-status.component.mjs +23 -5
- package/esm2022/map/map.model.mjs +5 -2
- package/esm2022/map/map.service.mjs +17 -1
- package/esm2022/widgets/implementations/map/map-widget-config.component.mjs +25 -6
- package/esm2022/widgets/implementations/map/map-widget.component.mjs +40 -11
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +5 -2
- package/fesm2022/c8y-ngx-components-branding-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +47 -7
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +67 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +17 -8
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +3 -0
- package/map/cluster-map.component.d.ts +2 -1
- package/map/cluster-map.component.d.ts.map +1 -1
- package/map/map-status.component.d.ts +7 -2
- package/map/map-status.component.d.ts.map +1 -1
- package/map/map.model.d.ts +1 -0
- package/map/map.model.d.ts.map +1 -1
- package/map/map.service.d.ts +1 -0
- package/map/map.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/widgets/implementations/map/map-widget-config.component.d.ts +1 -0
- package/widgets/implementations/map/map-widget-config.component.d.ts.map +1 -1
- package/widgets/implementations/map/map-widget.component.d.ts +10 -4
- package/widgets/implementations/map/map-widget.component.d.ts.map +1 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, Input, Inject, ViewChild, Optional } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@c8y/client';
|
|
6
|
-
import * as i2 from '@c8y/ngx-components';
|
|
6
|
+
import * as i2$1 from '@c8y/ngx-components';
|
|
7
7
|
import { C8yTranslateDirective, DatePipe, LoadingComponent, gettext, CommonModule as CommonModule$1, FormsModule as FormsModule$1, AssetLinkPipe, DismissAlertStrategy, DynamicComponentAlert } from '@c8y/ngx-components';
|
|
8
8
|
import * as i5 from '@angular/forms';
|
|
9
9
|
import { FormsModule, ControlContainer, NgForm } from '@angular/forms';
|
|
10
|
-
import * as
|
|
11
|
-
import { MAP_DEFAULT_CONFIG, MapComponent, MapModule, ClusterMapComponent } from '@c8y/ngx-components/map';
|
|
10
|
+
import * as i4 from '@c8y/ngx-components/map';
|
|
11
|
+
import { defaultFitBoundsOptions, MAP_DEFAULT_CONFIG, MapComponent, MapModule, ClusterMapComponent } from '@c8y/ngx-components/map';
|
|
12
12
|
import * as i3 from '@ngx-translate/core';
|
|
13
13
|
import * as i8 from 'rxjs';
|
|
14
|
-
import { Subject } from 'rxjs';
|
|
15
|
-
import { takeUntil, filter } from 'rxjs/operators';
|
|
14
|
+
import { Subject, fromEvent } from 'rxjs';
|
|
15
|
+
import { takeUntil, combineLatestWith, take, filter } from 'rxjs/operators';
|
|
16
16
|
import * as i6 from '@c8y/ngx-components/icon-selector';
|
|
17
17
|
import { IconSelectorModule } from '@c8y/ngx-components/icon-selector';
|
|
18
18
|
import * as i7 from 'ngx-bootstrap/tooltip';
|
|
19
19
|
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
20
|
-
import * as i2$
|
|
20
|
+
import * as i2$2 from '@c8y/ngx-components/context-dashboard';
|
|
21
21
|
import { RouterLink } from '@angular/router';
|
|
22
|
+
import { debounce } from 'lodash-es';
|
|
22
23
|
|
|
23
24
|
class MapEventInfoComponent {
|
|
24
25
|
constructor(eventService) {
|
|
@@ -38,7 +39,7 @@ class MapEventInfoComponent {
|
|
|
38
39
|
this.loading = false;
|
|
39
40
|
}
|
|
40
41
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapEventInfoComponent, deps: [{ token: i1.EventService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MapEventInfoComponent, isStandalone: true, selector: "c8y-map-event-info", inputs: { asset: "asset" }, usesOnChanges: true, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MapEventInfoComponent, isStandalone: true, selector: "c8y-map-event-info", inputs: { asset: "asset" }, usesOnChanges: true, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }] }); }
|
|
42
43
|
}
|
|
43
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapEventInfoComponent, decorators: [{
|
|
44
45
|
type: Component,
|
|
@@ -148,6 +149,25 @@ class MapWidgetConfigComponent {
|
|
|
148
149
|
];
|
|
149
150
|
this.changeCenter();
|
|
150
151
|
}
|
|
152
|
+
async fitToBounds() {
|
|
153
|
+
if (!this.assets?.length || !this.previewMap?.map) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const bounds = await this.mapService.getAssetsBounds(this.assets);
|
|
157
|
+
// map.fitBounds causes zoom and move events, so get new center and zoom level only when these events are finished
|
|
158
|
+
fromEvent(this.previewMap.map, 'moveend')
|
|
159
|
+
.pipe(combineLatestWith(fromEvent(this.previewMap.map, 'zoomend')), take(1))
|
|
160
|
+
.subscribe(() => {
|
|
161
|
+
const center = this.previewMap.map.getCenter();
|
|
162
|
+
const zoom = this.previewMap.map.getZoom();
|
|
163
|
+
const fixedLat = +center.lat.toFixed(this.FIXED_POINT_DIGITS);
|
|
164
|
+
const fixedLng = +center.lng.toFixed(this.FIXED_POINT_DIGITS);
|
|
165
|
+
this.formConfig.center = [fixedLat, fixedLng];
|
|
166
|
+
this.formConfig.zoomLevel = Math.floor(zoom);
|
|
167
|
+
this.changeCenter();
|
|
168
|
+
});
|
|
169
|
+
this.previewMap.map.fitBounds(bounds, defaultFitBoundsOptions);
|
|
170
|
+
}
|
|
151
171
|
updateRefreshOption() {
|
|
152
172
|
this.formConfig.realtime = this.refreshOption === 'realtime';
|
|
153
173
|
this.config.widgetInstanceGlobalAutoRefreshContext =
|
|
@@ -216,8 +236,8 @@ class MapWidgetConfigComponent {
|
|
|
216
236
|
});
|
|
217
237
|
this.previewMap.addMarkerToMap(this.centerIcon);
|
|
218
238
|
}
|
|
219
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapWidgetConfigComponent, deps: [{ token:
|
|
220
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MapWidgetConfigComponent, isStandalone: true, selector: "c8y-map-widget-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "previewMap", first: true, predicate: MapComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"row p-t-16\"\n *ngIf=\"formConfig\"\n>\n <div class=\"col-xs-2\">\n <c8y-form-group class=\"m-b-0 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-10\">\n <div class=\"row tight-grid separator-bottom\">\n <div class=\"col-xs-4\">\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=\"2\"\n max=\"18\"\n step=\"1\"\n />\n </c8y-range>\n </div>\n </div>\n <div class=\"col-xs-8\">\n <c8y-form-group class=\"form-group-sm m-b-8\">\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\n class=\"input-group-btn\"\n *ngIf=\"canAutoCenter\"\n >\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 (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n </div>\n </div>\n <c8y-messages\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row tight-grid p-t-8 d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-0 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-8\">\n <div class=\"form-group form-group-sm m-b-0\">\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 </div>\n</div>\n\n<div\n class=\"p-t-16 p-b-16\"\n style=\"width: 100%; height: 240px\"\n>\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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i2.MinValidationDirective, selector: "[min]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidationDirective, selector: "[max]", inputs: ["max"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i2.RangeDirective, selector: "input[type=\"range\"]" }, { kind: "component", type: i2.RangeComponent, selector: "c8y-range", inputs: ["valueDisplayMode"] }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "component", type: i6.IconSelectorWrapperComponent, selector: "c8y-icon-selector-wrapper", inputs: ["canRemoveIcon", "selectedIcon", "iconSize"], outputs: ["onSelect"] }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i1$1.MapComponent, selector: "c8y-map", inputs: ["config", "assets", "polyline$", "polylineOptions"], outputs: ["onRealtimeUpdate", "onMove", "onMoveEnd", "onZoomStart", "onZoomEnd", "onMap", "onInit"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7.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"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
|
|
239
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapWidgetConfigComponent, deps: [{ token: i4.MapService }, { token: i2$1.AlertService }, { token: i3.TranslateService }, { token: MAP_DEFAULT_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
240
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MapWidgetConfigComponent, isStandalone: true, selector: "c8y-map-widget-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "previewMap", first: true, predicate: MapComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"row p-t-16\"\n *ngIf=\"formConfig\"\n>\n <div class=\"col-xs-2\">\n <c8y-form-group class=\"m-b-0 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-10\">\n <div class=\"row tight-grid separator-bottom\">\n <div class=\"col-xs-4\">\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 class=\"col-xs-8\">\n <c8y-form-group class=\"form-group-sm m-b-8\">\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\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row tight-grid p-t-8 d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-0 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-8\">\n <div class=\"form-group form-group-sm m-b-0\">\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 </div>\n</div>\n\n<div\n class=\"p-t-16 p-b-16\"\n style=\"width: 100%; height: 240px\"\n>\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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2$1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i2$1.MinValidationDirective, selector: "[min]", inputs: ["min"] }, { kind: "directive", type: i2$1.MaxValidationDirective, selector: "[max]", inputs: ["max"] }, { kind: "component", type: i2$1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2$1.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2$1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i2$1.RangeDirective, selector: "input[type=\"range\"]" }, { kind: "component", type: i2$1.RangeComponent, selector: "c8y-range", inputs: ["valueDisplayMode"] }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "component", type: i6.IconSelectorWrapperComponent, selector: "c8y-icon-selector-wrapper", inputs: ["canRemoveIcon", "selectedIcon", "iconSize"], outputs: ["onSelect"] }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i4.MapComponent, selector: "c8y-map", inputs: ["config", "assets", "polyline$", "polylineOptions"], outputs: ["onRealtimeUpdate", "onMove", "onMoveEnd", "onZoomStart", "onZoomEnd", "onMap", "onInit"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7.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"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
|
|
221
241
|
}
|
|
222
242
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapWidgetConfigComponent, decorators: [{
|
|
223
243
|
type: Component,
|
|
@@ -230,8 +250,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
230
250
|
MapModule,
|
|
231
251
|
AssetLinkPipe,
|
|
232
252
|
TooltipModule
|
|
233
|
-
], template: "<div\n class=\"row p-t-16\"\n *ngIf=\"formConfig\"\n>\n <div class=\"col-xs-2\">\n <c8y-form-group class=\"m-b-0 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-10\">\n <div class=\"row tight-grid separator-bottom\">\n <div class=\"col-xs-4\">\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=\"
|
|
234
|
-
}], ctorParameters: () => [{ type:
|
|
253
|
+
], template: "<div\n class=\"row p-t-16\"\n *ngIf=\"formConfig\"\n>\n <div class=\"col-xs-2\">\n <c8y-form-group class=\"m-b-0 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-10\">\n <div class=\"row tight-grid separator-bottom\">\n <div class=\"col-xs-4\">\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 class=\"col-xs-8\">\n <c8y-form-group class=\"form-group-sm m-b-8\">\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\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row tight-grid p-t-8 d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-0 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-8\">\n <div class=\"form-group form-group-sm m-b-0\">\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 </div>\n</div>\n\n<div\n class=\"p-t-16 p-b-16\"\n style=\"width: 100%; height: 240px\"\n>\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" }]
|
|
254
|
+
}], ctorParameters: () => [{ type: i4.MapService }, { type: i2$1.AlertService }, { type: i3.TranslateService }, { type: i8.Observable, decorators: [{
|
|
235
255
|
type: Inject,
|
|
236
256
|
args: [MAP_DEFAULT_CONFIG]
|
|
237
257
|
}] }], propDecorators: { config: [{
|
|
@@ -242,9 +262,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
242
262
|
}] } });
|
|
243
263
|
|
|
244
264
|
class MapWidgetComponent {
|
|
245
|
-
constructor(dashboardChild, dashboardContextComponent, inventory) {
|
|
265
|
+
constructor(dashboardChild, dashboardContextComponent, inventory, mapService, widgetsDashboardComponent) {
|
|
246
266
|
this.dashboardContextComponent = dashboardContextComponent;
|
|
247
267
|
this.inventory = inventory;
|
|
268
|
+
this.mapService = mapService;
|
|
269
|
+
this.widgetsDashboardComponent = widgetsDashboardComponent;
|
|
248
270
|
this.mapConfig = { center: [0, 0] };
|
|
249
271
|
this.TIMEOUT_ERROR_TEXT = gettext('The request is taking longer than usual. We apologize for the inconvenience.');
|
|
250
272
|
this.SERVER_ERROR_TEXT = gettext('Server error occurred.');
|
|
@@ -268,6 +290,7 @@ class MapWidgetComponent {
|
|
|
268
290
|
this.updateMapConfigRealtime();
|
|
269
291
|
}
|
|
270
292
|
this.savedNode = this.rootNode;
|
|
293
|
+
await this.updateAssets();
|
|
271
294
|
}
|
|
272
295
|
ngOnChanges(changes) {
|
|
273
296
|
if (changes.config?.currentValue?.widgetInstanceGlobalTimeContext) {
|
|
@@ -276,6 +299,15 @@ class MapWidgetComponent {
|
|
|
276
299
|
}
|
|
277
300
|
ngAfterViewInit() {
|
|
278
301
|
this.subscribeToErrorsOccurred();
|
|
302
|
+
if (this.widgetsDashboardComponent) {
|
|
303
|
+
const resizeCallback = debounce(() => {
|
|
304
|
+
// initial size of map is assigned when left drawer is closed, but if it is opened after initialization
|
|
305
|
+
// the map size is not updated, so we need to call invalidateSize so that map use the correct size
|
|
306
|
+
this.clusterMap.map?.invalidateSize(false);
|
|
307
|
+
}, 100);
|
|
308
|
+
this.resizeObserver = new ResizeObserver(resizeCallback);
|
|
309
|
+
this.resizeObserver.observe(this.widgetsDashboardComponent.nativeElement);
|
|
310
|
+
}
|
|
279
311
|
}
|
|
280
312
|
startFollow(context) {
|
|
281
313
|
if (context.id !== this.rootNode?.id) {
|
|
@@ -298,8 +330,22 @@ class MapWidgetComponent {
|
|
|
298
330
|
this.rootNode = this.savedNode;
|
|
299
331
|
}
|
|
300
332
|
ngOnDestroy() {
|
|
333
|
+
if (this.resizeObserver) {
|
|
334
|
+
this.resizeObserver.disconnect();
|
|
335
|
+
}
|
|
301
336
|
this.destroy$.next();
|
|
302
337
|
}
|
|
338
|
+
async fitToBounds() {
|
|
339
|
+
await this.updateAssets();
|
|
340
|
+
if (this.assets.length === 0 || !this.clusterMap?.map) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const bounds = await this.mapService.getAssetsBounds(this.assets);
|
|
344
|
+
this.clusterMap.map.fitBounds(bounds, defaultFitBoundsOptions);
|
|
345
|
+
}
|
|
346
|
+
async updateAssets() {
|
|
347
|
+
this.assets = (await this.mapService.getAllPositionMOs(this.config.device)).data;
|
|
348
|
+
}
|
|
303
349
|
listenToWidgetResizeEvent(dashboardChild) {
|
|
304
350
|
dashboardChild.changeEnd
|
|
305
351
|
.pipe(filter(child => child.lastChange === 'resize'), takeUntil(this.destroy$))
|
|
@@ -315,15 +361,15 @@ class MapWidgetComponent {
|
|
|
315
361
|
type: 'warning',
|
|
316
362
|
text: error?.name === 'TimeoutError'
|
|
317
363
|
? this.TIMEOUT_ERROR_TEXT
|
|
318
|
-
: error?.message ?? this.SERVER_ERROR_TEXT
|
|
364
|
+
: (error?.message ?? this.SERVER_ERROR_TEXT)
|
|
319
365
|
}));
|
|
320
366
|
});
|
|
321
367
|
}
|
|
322
368
|
updateMapConfigRealtime() {
|
|
323
369
|
this.mapConfig.realtime = this.config.realtime || false;
|
|
324
370
|
}
|
|
325
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapWidgetComponent, deps: [{ token: i2.DashboardChildComponent }, { token: i2$
|
|
326
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 [buttonsConfig]=\"config.widgetInstanceGlobalTimeContext ? { realtime: { show: false } } : null\"\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:
|
|
371
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapWidgetComponent, deps: [{ token: i2$1.DashboardChildComponent }, { token: i2$2.ContextDashboardComponent, optional: true }, { token: i1.InventoryService }, { token: i4.MapService }, { token: i2$1.WidgetsDashboardComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
372
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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]=\"config.widgetInstanceGlobalTimeContext ? { realtime: { show: false } } : null\"\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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "pipe", type: i2$1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: i2$1.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"] }] }); }
|
|
327
373
|
}
|
|
328
374
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapWidgetComponent, decorators: [{
|
|
329
375
|
type: Component,
|
|
@@ -338,10 +384,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
338
384
|
AssetLinkPipe,
|
|
339
385
|
TooltipModule,
|
|
340
386
|
RouterLink
|
|
341
|
-
], template: "<c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n [buttonsConfig]=\"config.widgetInstanceGlobalTimeContext ? { realtime: { show: false } } : null\"\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" }]
|
|
342
|
-
}], ctorParameters: () => [{ type: i2.DashboardChildComponent }, { type: i2$
|
|
387
|
+
], template: "<c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [buttonsConfig]=\"config.widgetInstanceGlobalTimeContext ? { realtime: { show: false } } : null\"\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" }]
|
|
388
|
+
}], ctorParameters: () => [{ type: i2$1.DashboardChildComponent }, { type: i2$2.ContextDashboardComponent, decorators: [{
|
|
389
|
+
type: Optional
|
|
390
|
+
}] }, { type: i1.InventoryService }, { type: i4.MapService }, { type: i2$1.WidgetsDashboardComponent, decorators: [{
|
|
343
391
|
type: Optional
|
|
344
|
-
}] }
|
|
392
|
+
}] }], propDecorators: { config: [{
|
|
345
393
|
type: Input
|
|
346
394
|
}], clusterMap: [{
|
|
347
395
|
type: ViewChild,
|
|
@@ -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 {\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { CommonModule as NgCommonModule } from '@angular/common';\nimport { FormsModule as NgFormsModule } from '@angular/forms';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport {\n AlertService,\n AssetLinkPipe,\n CommonModule,\n FormsModule,\n gettext\n} from '@c8y/ngx-components';\nimport type { MapDefaultConfig } from '@c8y/options';\nimport {\n ClusterMapConfig,\n MAP_DEFAULT_CONFIG,\n MapComponent,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport { TranslateService } from '@ngx-translate/core';\nimport type L from 'leaflet';\nimport { Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { MapWidgetConfig, MapRefreshOption } from './map-widget.model';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\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 constructor(\n private mapService: MapService,\n private alertService: AlertService,\n private translateService: TranslateService,\n @Inject(MAP_DEFAULT_CONFIG) private defaultMapConfig: Observable<MapDefaultConfig>\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 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","<div\n class=\"row p-t-16\"\n *ngIf=\"formConfig\"\n>\n <div class=\"col-xs-2\">\n <c8y-form-group class=\"m-b-0 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-10\">\n <div class=\"row tight-grid separator-bottom\">\n <div class=\"col-xs-4\">\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=\"2\"\n max=\"18\"\n step=\"1\"\n />\n </c8y-range>\n </div>\n </div>\n <div class=\"col-xs-8\">\n <c8y-form-group class=\"form-group-sm m-b-8\">\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\n class=\"input-group-btn\"\n *ngIf=\"canAutoCenter\"\n >\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 (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n </div>\n </div>\n <c8y-messages\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row tight-grid p-t-8 d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-0 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-8\">\n <div class=\"form-group form-group-sm m-b-0\">\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 </div>\n</div>\n\n<div\n class=\"p-t-16 p-b-16\"\n style=\"width: 100%; height: 240px\"\n>\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","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 { IManagedObject, InventoryService } from '@c8y/client';\nimport { ClusterMapComponent, ClusterMapConfig, MapModule } from '@c8y/ngx-components/map';\nimport {\n AssetLinkPipe,\n CommonModule,\n DashboardChildComponent,\n DismissAlertStrategy,\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n FormsModule,\n gettext\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';\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: IManagedObject;\n @Input() config: MapWidgetConfig;\n\n @ViewChild(ClusterMapComponent)\n clusterMap: ClusterMapComponent;\n alerts: DynamicComponentAlertAggregator;\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: IManagedObject;\n private destroy$ = new Subject<void>();\n\n constructor(\n dashboardChild: DashboardChildComponent,\n @Optional() private dashboardContextComponent: ContextDashboardComponent,\n private inventory: InventoryService\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 }\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\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 this.destroy$.next();\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 [buttonsConfig]=\"config.widgetInstanceGlobalTimeContext ? { realtime: { show: false } } : null\"\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","NgFormsModule","CommonModule","FormsModule","i1","i2","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AAQhC,IAAA,WAAA,CAAoB,YAA0B,EAAA;QAA1B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;QAJ9C,IAAO,CAAA,OAAA,GAAG,IA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,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjB9B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EACP,OAAA,EAAA;wBACP,qBAAqB;wBACrBP,YAAc;wBACdC,WAAa;wBACbC,cAAY;wBACZC,aAAW;wBACX,kBAAkB;wBAClB,SAAS;wBACT,aAAa;wBACb,aAAa;wBACb,UAAU;AACX,qBAAA,EAAA,QAAA,EAAA,qwCAAA,EAAA,CAAA;;0BAsBE,QAAQ;wEAfF,MAAM,EAAA,CAAA;sBAAd,KAAK;gBAGN,UAAU,EAAA,CAAA;sBADT,SAAS;uBAAC,mBAAmB,CAAA;;;AE3DhC;;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 {\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { CommonModule as NgCommonModule } from '@angular/common';\nimport { FormsModule as NgFormsModule } from '@angular/forms';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport {\n AlertService,\n AssetLinkPipe,\n CommonModule,\n FormsModule,\n gettext\n} from '@c8y/ngx-components';\nimport type { MapDefaultConfig } from '@c8y/options';\nimport {\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MAP_DEFAULT_CONFIG,\n MapComponent,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport { TranslateService } from '@ngx-translate/core';\nimport type L from 'leaflet';\nimport { fromEvent, Observable, Subject } from 'rxjs';\nimport { combineLatestWith, take, takeUntil } from 'rxjs/operators';\nimport { MapWidgetConfig, MapRefreshOption } from './map-widget.model';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\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 constructor(\n private mapService: MapService,\n private alertService: AlertService,\n private translateService: TranslateService,\n @Inject(MAP_DEFAULT_CONFIG) private defaultMapConfig: Observable<MapDefaultConfig>\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","<div\n class=\"row p-t-16\"\n *ngIf=\"formConfig\"\n>\n <div class=\"col-xs-2\">\n <c8y-form-group class=\"m-b-0 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-10\">\n <div class=\"row tight-grid separator-bottom\">\n <div class=\"col-xs-4\">\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 class=\"col-xs-8\">\n <c8y-form-group class=\"form-group-sm m-b-8\">\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\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row tight-grid p-t-8 d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-0 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-8\">\n <div class=\"form-group form-group-sm m-b-0\">\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 </div>\n</div>\n\n<div\n class=\"p-t-16 p-b-16\"\n style=\"width: 100%; height: 240px\"\n>\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","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 { IManagedObject, InventoryService } from '@c8y/client';\nimport {\n ClusterMapComponent,\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport {\n AssetLinkPipe,\n CommonModule,\n DashboardChildComponent,\n DismissAlertStrategy,\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n FormsModule,\n gettext,\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: IManagedObject;\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: IManagedObject;\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]=\"config.widgetInstanceGlobalTimeContext ? { realtime: { show: false } } : null\"\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","i2","FormsModule","i1","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AAQhC,IAAA,WAAA,CAAoB,YAA0B,EAAA;QAA1B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;QAJ9C,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC;KAImC;AAElD,IAAA,MAAM,WAAW,GAAA;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,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,EAAE;AACtB,SAAA,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACrB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;+GArBU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EA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