@c8y/ngx-components 1023.65.2 → 1023.66.4
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/context-dashboard/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +4 -0
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +38 -9
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-kpi.mjs +11 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-kpi.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +245 -142
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
- package/global-context/index.d.ts +4 -1
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/locales/de.po +6 -0
- package/locales/es.po +6 -0
- package/locales/fr.po +6 -0
- package/locales/ja_JP.po +6 -0
- package/locales/ko.po +6 -0
- package/locales/locales.pot +6 -0
- package/locales/nl.po +6 -0
- package/locales/pl.po +6 -0
- package/locales/pt_BR.po +6 -0
- package/locales/zh_CN.po +6 -0
- package/locales/zh_TW.po +6 -0
- package/package.json +1 -1
- package/widgets/definitions/kpi/index.d.ts +1 -0
- package/widgets/definitions/kpi/index.d.ts.map +1 -1
- package/widgets/implementations/alarms/index.d.ts +2 -0
- package/widgets/implementations/alarms/index.d.ts.map +1 -1
- package/widgets/implementations/kpi/index.d.ts +75 -52
- package/widgets/implementations/kpi/index.d.ts.map +1 -1
|
@@ -533,7 +533,7 @@ class DatapointsListViewComponent {
|
|
|
533
533
|
}));
|
|
534
534
|
}
|
|
535
535
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatapointsListViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
536
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DatapointsListViewComponent, isStandalone: true, selector: "c8y-datapoints-list", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isInPreviewMode: { classPropertyName: "isInPreviewMode", publicName: "isInPreviewMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-col fit-h" }, ngImport: i0, template: "@if (!isInPreviewMode()) {\n <div class=\"d-flex gap-16 p-r-16 inner-scroll h-auto min-width-0\">\n @if (displayMode() === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {\n <c8y-global-context-connector\n [controls]=\"widgetControls()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n [dashboardChild]=\"getDashboardChild()!\"\n [linked]=\"isLinkedToGlobal()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-global-context-connector>\n } @else {\n <c8y-local-controls\n [controls]=\"widgetControls()\"\n [displayMode]=\"displayMode()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-local-controls>\n }\n </div>\n}\n\n@if (!isInPreviewMode() && exportConfig(); as config) {\n <c8y-widget-action>\n <c8y-datapoints-export-selector\n [displayMode]=\"'icon-only'\"\n [exportConfig]=\"config\"\n [containerClass]=\"'d-contents'\"\n (isOpen)=\"onExportModalOpen($event)\"\n ></c8y-datapoints-export-selector>\n </c8y-widget-action>\n}\n\n@if (!hasNoPermissionsToReadAnyMeasurement()) {\n <!-- the .page-sticky-header -->\n @if (dataPoints().length > 0) {\n <div class=\"hidden-xs hidden-sm c8y-list__item\">\n <div class=\"c8y-list__item__block flex-grow min-width-0\">\n <div class=\"c8y-list__item__icon\">\n <i style=\"width: 22px\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n <div\n [class]=\"\n column.id === 'kpi' || column.id === 'asset'\n ? 'col-md-3 flex-grow min-width-0'\n : column.id == 'diff' || column.id == 'diffPercentage'\n ? 'col-md-1 flex-grow min-width-0'\n : 'col-md-2 flex-grow min-width-0'\n \"\n [class.text-right]=\"column.id !== 'asset' && column.id !== 'kpi'\"\n >\n <span\n class=\"text-medium text-truncate\"\n translate\n >\n {{ column.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <!-- The record list -->\n @if (isLoading() && !hasLoadedOnce()) {\n <!-- Initial load: full spinner -->\n <ng-container [ngTemplateOutlet]=\"loading\"></ng-container>\n } @else {\n @if (isLoading()) {\n <!-- Refresh: inline loading overlay -->\n <div class=\"p-absolute fit-w overflow-hidden p-b-4\">\n <c8y-loading [layout]=\"'page'\"></c8y-loading>\n </div>\n }\n @if (dataPoints().length) {\n <c8y-list-group\n class=\"flex-grow\"\n role=\"list\"\n c8yVirtualScrollListener\n (scrolled)=\"onListScrolled()\"\n (scrolledToTop)=\"onListScrolledToTop()\"\n >\n <c8y-li\n role=\"listitem\"\n *c8yFor=\"\n let dp of { data: dataPoints(), res: null! };\n enableVirtualScroll: true;\n virtualScrollElementSize: 48;\n virtualScrollStrategy: 'fixed'\n \"\n >\n <c8y-li-icon>\n <i\n c8yIcon=\"circle\"\n [style.color]=\"dp.color\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n @switch (column.id) {\n @case ('kpi') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n {{ dp.label | translate }}\n @if (dp.unit) {\n <small class=\"text-muted\">{{ dp.unit }}</small>\n }\n </div>\n </div>\n }\n @case ('target') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>{{ dp.target }}</span>\n </div>\n </div>\n }\n @case ('current') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span\n [class]=\"dp.currentValue | applyRangeClass: getRangeValues(dp)\"\n [title]=\"dp.timestamp | c8yDate: 'medium'\"\n [attr.aria-label]=\"\n ('Last updated: ' | translate) + (dp.timestamp | c8yDate: 'medium')\n \"\n >\n {{ dp.currentValue | number: dp.currentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diff') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffValue | number: dp.diffFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diffPercentage') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffPercentValue | number: dp.diffPercentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('asset') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <button\n class=\"btn-clean d-flex a-i-center gap-4 text-muted\"\n [attr.aria-label]=\"('Navigate to ' | translate) + dp.__target?.name\"\n type=\"button\"\n (click)=\"redirectToAsset(dp.__target?.id)\"\n >\n @if (dp.__target?.id && getTargetManagedObject(dp.__target.id); as mo) {\n <c8y-device-status\n [mo]=\"mo\"\n [size]=\"16\"\n ></c8y-device-status>\n }\n <small\n class=\"text-truncate\"\n [title]=\"dp.__target?.name\"\n >{{ dp.__target?.name }}</small\n >\n </button>\n </div>\n </div>\n }\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n }\n} @else {\n <div class=\"p-t-24 p-r-16 p-l-16 p-b-16 d-flex\">\n <div class=\"center-block\">\n <c8y-dynamic-component-alerts\n [alerts]=\"missingAllPermissionsAlert\"\n ></c8y-dynamic-component-alerts>\n </div>\n </div>\n}\n\n<ng-template #loading>\n <c8y-loading></c8y-loading>\n</ng-template>\n\n<ng-template #emptyState>\n <div class=\"p-relative p-l-24\">\n <c8y-ui-empty-state\n [icon]=\"'c8y-alert-idle'\"\n [title]=\"'No data to display.' | translate\"\n [horizontal]=\"true\"\n data-cy=\"datapoints-list--empty-state\"\n >\n <p c8y-guide-docs>\n <small translate>\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/widgets-collection/#data-point-list\">\n user documentation\n </a>\n .\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["displayMode", "containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: DeviceStatusComponent, selector: "device-status, c8y-device-status", inputs: ["mo", "size"] }, { kind: "ngmodule", type: DynamicComponentModule }, { kind: "component", type: i1.DynamicComponentAlertsComponent, selector: "c8y-dynamic-component-alerts", inputs: ["alerts"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: GlobalContextConnectorComponent, selector: "c8y-global-context-connector", inputs: ["controls", "config", "isLoading", "dashboardChild", "linked", "emitRefresh"], outputs: ["configChange", "refresh", "linkedChange"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i1.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: LocalControlsComponent, selector: "c8y-local-controls", inputs: ["controls", "displayMode", "config", "isLoading", "disabled"], outputs: ["configChange", "refresh"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: VirtualScrollListenerDirective, selector: "[c8yVirtualScrollListener]", inputs: ["scrollThreshold"], outputs: ["scrolled", "scrolledToTop"] }, { kind: "component", type: WidgetActionWrapperComponent, selector: "c8y-widget-action" }, { kind: "pipe", type: ApplyRangeClassPipe, name: "applyRangeClass" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
536
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DatapointsListViewComponent, isStandalone: true, selector: "c8y-datapoints-list", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isInPreviewMode: { classPropertyName: "isInPreviewMode", publicName: "isInPreviewMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-col fit-h" }, ngImport: i0, template: "@if (!isInPreviewMode()) {\n <div class=\"d-flex gap-16 p-r-16 inner-scroll h-auto min-width-0\">\n @if (displayMode() === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {\n <c8y-global-context-connector\n [controls]=\"widgetControls()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n [dashboardChild]=\"getDashboardChild()!\"\n [linked]=\"isLinkedToGlobal()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-global-context-connector>\n } @else {\n <c8y-local-controls\n [controls]=\"widgetControls()\"\n [displayMode]=\"displayMode()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-local-controls>\n }\n </div>\n}\n\n@if (!isInPreviewMode() && exportConfig(); as config) {\n <c8y-widget-action>\n <c8y-datapoints-export-selector\n [displayMode]=\"'icon-only'\"\n [exportConfig]=\"config\"\n [containerClass]=\"'d-contents'\"\n (isOpen)=\"onExportModalOpen($event)\"\n ></c8y-datapoints-export-selector>\n </c8y-widget-action>\n}\n\n@if (!hasNoPermissionsToReadAnyMeasurement()) {\n <!-- the .page-sticky-header -->\n @if (dataPoints().length > 0) {\n <div class=\"hidden-xs hidden-sm c8y-list__item\">\n <div class=\"c8y-list__item__block flex-grow min-width-0\">\n <div class=\"c8y-list__item__icon\">\n <i style=\"width: 22px\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n <div\n [class]=\"\n column.id === 'kpi' || column.id === 'asset'\n ? 'col-md-3 flex-grow min-width-0'\n : column.id == 'diff' || column.id == 'diffPercentage'\n ? 'col-md-1 flex-grow min-width-0'\n : 'col-md-2 flex-grow min-width-0'\n \"\n [class.text-right]=\"column.id !== 'asset' && column.id !== 'kpi'\"\n >\n <span\n class=\"text-medium text-truncate\"\n translate\n >\n {{ column.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <!-- The record list -->\n @if (isLoading() && !hasLoadedOnce()) {\n <!-- Initial load: full spinner -->\n <ng-container [ngTemplateOutlet]=\"loading\"></ng-container>\n } @else {\n @if (isLoading()) {\n <!-- Refresh: inline loading overlay -->\n <div class=\"p-absolute fit-w overflow-hidden p-b-4\">\n <c8y-loading [layout]=\"'page'\"></c8y-loading>\n </div>\n }\n @if (dataPoints().length) {\n <c8y-list-group\n class=\"flex-grow\"\n role=\"list\"\n c8yVirtualScrollListener\n (scrolled)=\"onListScrolled()\"\n (scrolledToTop)=\"onListScrolledToTop()\"\n >\n <c8y-li\n role=\"listitem\"\n *c8yFor=\"\n let dp of { data: dataPoints(), res: null! };\n enableVirtualScroll: true;\n virtualScrollElementSize: 48;\n virtualScrollStrategy: 'fixed'\n \"\n >\n <c8y-li-icon>\n <i\n c8yIcon=\"circle\"\n [style.color]=\"dp.color\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n @switch (column.id) {\n @case ('kpi') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n {{ dp.label | translate }}\n @if (dp.unit) {\n <small class=\"text-muted\">{{ dp.unit }}</small>\n }\n </div>\n </div>\n }\n @case ('target') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>{{ dp.target }}</span>\n </div>\n </div>\n }\n @case ('current') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span\n [class]=\"dp.currentValue | applyRangeClass: getRangeValues(dp)\"\n [title]=\"dp.timestamp | c8yDate: 'medium'\"\n [attr.aria-label]=\"\n ('Last updated: ' | translate) + (dp.timestamp | c8yDate: 'medium')\n \"\n >\n {{ dp.currentValue | number: dp.currentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diff') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffValue | number: dp.diffFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diffPercentage') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffPercentValue | number: dp.diffPercentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('asset') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <button\n class=\"btn-clean d-flex a-i-center gap-4 text-muted\"\n [attr.aria-label]=\"('Navigate to ' | translate) + dp.__target?.name\"\n type=\"button\"\n (click)=\"redirectToAsset(dp.__target?.id)\"\n >\n @if (dp.__target?.id && getTargetManagedObject(dp.__target.id); as mo) {\n <c8y-device-status\n [mo]=\"mo\"\n [size]=\"16\"\n ></c8y-device-status>\n }\n <small\n class=\"text-truncate\"\n [title]=\"dp.__target?.name\"\n >{{ dp.__target?.name }}</small\n >\n </button>\n </div>\n </div>\n }\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n }\n} @else {\n <div class=\"p-t-24 p-r-16 p-l-16 p-b-16 d-flex\">\n <div class=\"center-block\">\n <c8y-dynamic-component-alerts\n [alerts]=\"missingAllPermissionsAlert\"\n ></c8y-dynamic-component-alerts>\n </div>\n </div>\n}\n\n<ng-template #loading>\n <c8y-loading></c8y-loading>\n</ng-template>\n\n<ng-template #emptyState>\n <div class=\"p-relative p-l-24\">\n <c8y-ui-empty-state\n [icon]=\"'c8y-alert-idle'\"\n [title]=\"'No data to display.' | translate\"\n [horizontal]=\"true\"\n data-cy=\"datapoints-list--empty-state\"\n >\n <p c8y-guide-docs>\n <small translate>\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/widgets-collection/#data-point-list\">\n user documentation\n </a>\n .\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["displayMode", "containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: DeviceStatusComponent, selector: "device-status, c8y-device-status", inputs: ["mo", "size"] }, { kind: "ngmodule", type: DynamicComponentModule }, { kind: "component", type: i1.DynamicComponentAlertsComponent, selector: "c8y-dynamic-component-alerts", inputs: ["alerts"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: GlobalContextConnectorComponent, selector: "c8y-global-context-connector", inputs: ["controls", "config", "isLoading", "dashboardChild", "linked", "emitRefresh"], outputs: ["configChange", "refresh", "linkedChange"] }, { kind: "component", type: GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "directive", type: GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i1.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: LocalControlsComponent, selector: "c8y-local-controls", inputs: ["controls", "displayMode", "config", "isLoading", "disabled", "emitRefresh"], outputs: ["configChange", "refresh"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: VirtualScrollListenerDirective, selector: "[c8yVirtualScrollListener]", inputs: ["scrollThreshold"], outputs: ["scrolled", "scrolledToTop"] }, { kind: "component", type: WidgetActionWrapperComponent, selector: "c8y-widget-action" }, { kind: "pipe", type: ApplyRangeClassPipe, name: "applyRangeClass" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
537
537
|
}
|
|
538
538
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatapointsListViewComponent, decorators: [{
|
|
539
539
|
type: Component,
|
|
@@ -675,7 +675,7 @@ class DatapointsListConfigComponent {
|
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
677
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatapointsListConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
678
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DatapointsListConfigComponent, isStandalone: true, selector: "c8y-datapoints-list-view-config", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "previewTemplate", first: true, predicate: ["dataPointsListPreview"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (configForm(); as form) {\n <form\n class=\"no-card-context\"\n [formGroup]=\"form\"\n >\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Columns (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n formArrayName=\"columns\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (columnsFormArray().errors?.atLeastOneColumnMustBeVisible) {\n <div\n class=\"alert alert-warning m-t-8\"\n role=\"alert\"\n >\n {{ 'At least 1 column must be visible.' | translate }}\n </div>\n }\n\n @for (column of columnsFormArray().controls; track column.value.id; let i = $index) {\n <c8y-li\n class=\"c8y-list__item__collapse--container-small\"\n [formGroupName]=\"i\"\n cdkDrag\n >\n <c8y-li-drag-handle\n [title]=\"'Click and drag to reorder' | translate\"\n cdkDragHandle\n >\n <i c8yIcon=\"drag-reorder\"></i>\n </c8y-li-drag-handle>\n <c8y-li-checkbox\n class=\"a-s-center p-r-0\"\n [displayAsSwitch]=\"true\"\n formControlName=\"visible\"\n (click)=\"$event.stopPropagation()\"\n ></c8y-li-checkbox>\n <c8y-li-body>\n <div class=\"d-flex a-i-center\">\n <span class=\"text-truncate\">{{ column.value.label | translate }}</span>\n @switch (column.value.label) {\n @case ('Target') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Target column shows the value set on the target field of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n @case ('Diff') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Diff column shows the difference between the current value and the target value of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n </c8y-list-group>\n </fieldset>\n\n <!-- decimal input -->\n <fieldset class=\"c8y-fieldset\">\n <legend>\n {{ 'Decimal places' | translate }}\n </legend>\n <c8y-form-group class=\"p-t-8\">\n <input\n class=\"form-control\"\n name=\"decimalPlaces\"\n type=\"number\"\n formControlName=\"decimalPlaces\"\n step=\"1\"\n [min]=\"minDecimalPlaces\"\n [max]=\"maxDecimalPlaces\"\n />\n </c8y-form-group>\n </fieldset>\n </form>\n}\n\n<ng-template #dataPointsListPreview>\n @let previewConfig = previewConfig$ | async;\n @if (previewConfig && previewConfig.displayMode !== 'dashboard') {\n <c8y-local-controls\n [controls]=\"controls\"\n [displayMode]=\"previewConfig.displayMode!\"\n [config]=\"previewConfig\"\n [disabled]=\"true\"\n ></c8y-local-controls>\n }\n\n @if (previewConfig) {\n <c8y-datapoints-list\n [config]=\"previewConfig\"\n [isInPreviewMode]=\"true\"\n data-cy=\"c8y-datapoints-list-widget-config--preview-datapoints-list\"\n ></c8y-datapoints-list>\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: DatapointsListViewComponent, selector: "c8y-datapoints-list", inputs: ["config", "isInPreviewMode"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: DynamicComponentModule }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i1.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "component", type: i1.ListItemDragHandleComponent, selector: "c8y-list-item-drag-handle, c8y-li-drag-handle" }, { kind: "component", type: LocalControlsComponent, selector: "c8y-local-controls", inputs: ["controls", "displayMode", "config", "isLoading", "disabled"], outputs: ["configChange", "refresh"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
678
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DatapointsListConfigComponent, isStandalone: true, selector: "c8y-datapoints-list-view-config", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "previewTemplate", first: true, predicate: ["dataPointsListPreview"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (configForm(); as form) {\n <form\n class=\"no-card-context\"\n [formGroup]=\"form\"\n >\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Columns (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n formArrayName=\"columns\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (columnsFormArray().errors?.atLeastOneColumnMustBeVisible) {\n <div\n class=\"alert alert-warning m-t-8\"\n role=\"alert\"\n >\n {{ 'At least 1 column must be visible.' | translate }}\n </div>\n }\n\n @for (column of columnsFormArray().controls; track column.value.id; let i = $index) {\n <c8y-li\n class=\"c8y-list__item__collapse--container-small\"\n [formGroupName]=\"i\"\n cdkDrag\n >\n <c8y-li-drag-handle\n [title]=\"'Click and drag to reorder' | translate\"\n cdkDragHandle\n >\n <i c8yIcon=\"drag-reorder\"></i>\n </c8y-li-drag-handle>\n <c8y-li-checkbox\n class=\"a-s-center p-r-0\"\n [displayAsSwitch]=\"true\"\n formControlName=\"visible\"\n (click)=\"$event.stopPropagation()\"\n ></c8y-li-checkbox>\n <c8y-li-body>\n <div class=\"d-flex a-i-center\">\n <span class=\"text-truncate\">{{ column.value.label | translate }}</span>\n @switch (column.value.label) {\n @case ('Target') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Target column shows the value set on the target field of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n @case ('Diff') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Diff column shows the difference between the current value and the target value of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n </c8y-list-group>\n </fieldset>\n\n <!-- decimal input -->\n <fieldset class=\"c8y-fieldset\">\n <legend>\n {{ 'Decimal places' | translate }}\n </legend>\n <c8y-form-group class=\"p-t-8\">\n <input\n class=\"form-control\"\n name=\"decimalPlaces\"\n type=\"number\"\n formControlName=\"decimalPlaces\"\n step=\"1\"\n [min]=\"minDecimalPlaces\"\n [max]=\"maxDecimalPlaces\"\n />\n </c8y-form-group>\n </fieldset>\n </form>\n}\n\n<ng-template #dataPointsListPreview>\n @let previewConfig = previewConfig$ | async;\n @if (previewConfig && previewConfig.displayMode !== 'dashboard') {\n <c8y-local-controls\n [controls]=\"controls\"\n [displayMode]=\"previewConfig.displayMode!\"\n [config]=\"previewConfig\"\n [disabled]=\"true\"\n ></c8y-local-controls>\n }\n\n @if (previewConfig) {\n <c8y-datapoints-list\n [config]=\"previewConfig\"\n [isInPreviewMode]=\"true\"\n data-cy=\"c8y-datapoints-list-widget-config--preview-datapoints-list\"\n ></c8y-datapoints-list>\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: DatapointsListViewComponent, selector: "c8y-datapoints-list", inputs: ["config", "isInPreviewMode"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: DynamicComponentModule }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i1.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "component", type: i1.ListItemDragHandleComponent, selector: "c8y-list-item-drag-handle, c8y-li-drag-handle" }, { kind: "component", type: LocalControlsComponent, selector: "c8y-local-controls", inputs: ["controls", "displayMode", "config", "isLoading", "disabled", "emitRefresh"], outputs: ["configChange", "refresh"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
679
679
|
}
|
|
680
680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatapointsListConfigComponent, decorators: [{
|
|
681
681
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-datapoints-list.mjs","sources":["../../widgets/implementations/datapoints-list/datapoints-list.constants.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-view.service.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-fetch.service.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-view.component.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-view.component.html","../../widgets/implementations/datapoints-list/datapoints-list-config/datapoints-list-config.component.ts","../../widgets/implementations/datapoints-list/datapoints-list-config/datapoints-list-config.component.html","../../widgets/implementations/datapoints-list/c8y-ngx-components-widgets-implementations-datapoints-list.ts"],"sourcesContent":["import { gettext } from '@c8y/ngx-components/gettext';\n\nimport { ColumnConfig } from './datapoints-list-widget.model';\n\n/**\n * Default column configuration for datapoints list widget\n */\nexport const DEFAULT_DATAPOINTS_LIST_COLUMNS: ColumnConfig[] = [\n { id: 'kpi', label: gettext('Label'), visible: true, order: 0 },\n { id: 'target', label: gettext('Target'), visible: true, order: 1 },\n { id: 'current', label: gettext('Current'), visible: true, order: 2 },\n { id: 'diff', label: gettext('Diff'), visible: true, order: 3 },\n { id: 'diffPercentage', label: gettext('Diff %'), visible: true, order: 4 },\n { id: 'asset', label: gettext('Asset'), visible: true, order: 5 }\n];\n","import { Injectable } from '@angular/core';\nimport { IMeasurement } from '@c8y/client';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { DatapointWithMeasurement } from '../datapoints-list-widget.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DatapointsListService {\n /**\n * Calculate difference between current value and target\n * @param datapoint - Datapoint record\n * @returns Difference value or null if value/target is undefined\n */\n diff(datapoint: DatapointWithMeasurement): number | null {\n const { currentValue, target } = datapoint;\n // != checks both null and undefined\n if (currentValue != null && target != null) {\n return currentValue - target;\n }\n return null;\n }\n\n /**\n * Calculate percentage difference between current value and target\n * @param datapoint - Datapoint record\n * @returns Percentage difference or null if target is undefined\n */\n diffPercent(datapoint: DatapointWithMeasurement): number | null {\n const target = datapoint.target;\n\n if (target !== null && target !== undefined) {\n const _diff = this.diff(datapoint);\n if (_diff !== null) {\n // Intentionally allows division by zero to return Infinity\n // when target is 0, representing mathematically undefined percentage.\n // This follows the previous AngularJS implementation behavior.\n return (_diff / target) * 100;\n }\n }\n\n return null;\n }\n\n /**\n * Get fraction size format based on whether the value is an integer\n * @param value - Number to check\n * @param defaultFractionSize - Default fraction size format to use for non-integers\n * @returns Fraction size format ('1.0-0' for integers, defaultFractionSize for decimals)\n */\n getFractionSize(value: number | null | undefined, defaultFractionSize: string): string {\n if (value === null || value === undefined) {\n return defaultFractionSize;\n }\n return value % 1 === 0 ? '1.0-0' : defaultFractionSize;\n }\n\n /**\n * Extract current value and timestamp from a measurement\n * @param datapoint - Datapoint configuration (contains fragment and series)\n * @param measurement - Measurement to extract value from\n * @returns Object containing extracted value and timestamp (null if not found)\n */\n extractMeasurementValue(\n datapoint: KPIDetails,\n measurement: IMeasurement | undefined\n ): { value: number | null; timestamp: Date | null } {\n // Return null values if measurement is missing\n if (!measurement) {\n return { value: null, timestamp: null };\n }\n\n // Return null values if datapoint configuration is incomplete\n if (!datapoint.fragment || !datapoint.series) {\n return { value: null, timestamp: null };\n }\n\n // Access the fragment (e.g., \"c8y_Steam\")\n const fragmentData = measurement[datapoint.fragment];\n if (!fragmentData) {\n return { value: null, timestamp: null };\n }\n\n // Access the series within the fragment (e.g., \"Temperature\")\n const seriesData = fragmentData[datapoint.series];\n if (!seriesData || seriesData.value === undefined) {\n return { value: null, timestamp: null };\n }\n\n // Extract and return the value and timestamp\n return {\n value: seriesData.value,\n timestamp: new Date(measurement.time)\n };\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport {\n IManagedObject,\n IMeasurement,\n IMeasurementFilter,\n InventoryService,\n MeasurementService\n} from '@c8y/client';\nimport { AlertService } from '@c8y/ngx-components';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { DatapointWithMeasurement } from '../datapoints-list-widget.model';\nimport { DatapointsListService } from './datapoints-list-view.service';\n\ninterface FetchConfig {\n fractionSize: string;\n dateFrom?: string;\n dateTo?: string;\n}\n\ninterface FetchResult {\n dataPoints: DatapointWithMeasurement[];\n seriesWithoutPermissionCount: number;\n targetManagedObjects: Map<string, IManagedObject>;\n}\n\ninterface SingleDatapointResult {\n datapoint: DatapointWithMeasurement;\n hasPermissionError: boolean;\n}\n\n/**\n * Service that handles all data-fetching operations for the datapoints list widget.\n * Encapsulates measurement fetching, data enrichment, and error handling.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DatapointsListFetchService {\n private alertService = inject(AlertService);\n private measurementService = inject(MeasurementService);\n private inventoryService = inject(InventoryService);\n private datapointsListService = inject(DatapointsListService);\n\n /**\n * Fetch measurements for all active datapoints and enrich them with calculated values.\n */\n async fetchDatapointsWithMeasurements(\n datapoints: KPIDetails[],\n config: FetchConfig\n ): Promise<FetchResult> {\n const targetManagedObjects = new Map<string, IManagedObject>();\n\n const results = await this.fetchAllDatapoints(datapoints, config);\n\n const enrichedDataPoints = results.map(r => r.datapoint);\n const seriesWithoutPermissionCount = results.filter(r => r.hasPermissionError).length;\n\n await this.fetchTargetManagedObjects(enrichedDataPoints, targetManagedObjects);\n\n return {\n dataPoints: enrichedDataPoints,\n seriesWithoutPermissionCount,\n targetManagedObjects\n };\n }\n\n /**\n * Fetch and enrich all datapoints in parallel.\n * Each datapoint fetch is independent - one failure doesn't affect others.\n */\n private fetchAllDatapoints(\n datapoints: KPIDetails[],\n config: FetchConfig\n ): Promise<SingleDatapointResult[]> {\n return Promise.all(\n datapoints.map((datapoint, index) => this.fetchSingleDatapoint(datapoint, index, config))\n );\n }\n\n /**\n * Fetch measurement for a single datapoint and return enriched result.\n * Handles errors gracefully - returns empty datapoint on failure.\n */\n private async fetchSingleDatapoint(\n datapoint: KPIDetails,\n index: number,\n config: FetchConfig\n ): Promise<SingleDatapointResult> {\n try {\n const measurement = await this.getMeasurementForDatapoint(datapoint, config);\n const measurementValue = this.datapointsListService.extractMeasurementValue(\n datapoint,\n measurement\n );\n\n return {\n datapoint: this.createEnrichedDatapoint(datapoint, index, measurementValue, config),\n hasPermissionError: false\n };\n } catch (error) {\n return this.handleFetchError(error, datapoint, index, config);\n }\n }\n\n /**\n * Handle fetch error and return appropriate result.\n */\n private handleFetchError(\n error: unknown,\n datapoint: KPIDetails,\n index: number,\n config: FetchConfig\n ): SingleDatapointResult {\n const isPermissionError = (error as HttpErrorResponse)?.status === 403;\n\n if (!isPermissionError) {\n this.alertService.addServerFailure(error);\n }\n\n return {\n datapoint: this.createEnrichedDatapoint(\n datapoint,\n index,\n { value: null, timestamp: null },\n config\n ),\n hasPermissionError: isPermissionError\n };\n }\n\n /**\n * Create an enriched datapoint with measurement value and all calculated fields.\n */\n private createEnrichedDatapoint(\n datapoint: KPIDetails,\n index: number,\n measurementValue: { value: number | null; timestamp: Date | null },\n config: FetchConfig\n ): DatapointWithMeasurement {\n const enrichedDatapoint: DatapointWithMeasurement = {\n ...datapoint,\n id: this.getDatapointId(datapoint, index),\n currentValue: measurementValue.value,\n timestamp: measurementValue.timestamp\n };\n\n this.calculateDerivedFields(enrichedDatapoint, config.fractionSize);\n\n return enrichedDatapoint;\n }\n\n /**\n * Calculate and set all derived fields on a datapoint.\n * Includes diff, diffPercent, and fraction sizes for display formatting.\n */\n private calculateDerivedFields(datapoint: DatapointWithMeasurement, fractionSize: string): void {\n datapoint.diffValue = this.datapointsListService.diff(datapoint);\n datapoint.diffPercentValue = this.datapointsListService.diffPercent(datapoint);\n datapoint.currentFractionSize = this.datapointsListService.getFractionSize(\n datapoint.currentValue,\n fractionSize\n );\n datapoint.diffFractionSize = this.datapointsListService.getFractionSize(\n datapoint.diffValue,\n fractionSize\n );\n datapoint.diffPercentFractionSize = this.datapointsListService.getFractionSize(\n datapoint.diffPercentValue,\n fractionSize\n );\n }\n\n /**\n * Fetch managed objects for device status display.\n */\n private async fetchTargetManagedObjects(\n dataPoints: DatapointWithMeasurement[],\n targetManagedObjects: Map<string, IManagedObject>\n ): Promise<void> {\n const uniqueTargetIds = this.getUniqueTargetIds(dataPoints);\n\n if (uniqueTargetIds.size === 0) {\n return;\n }\n\n await Promise.all(\n Array.from(uniqueTargetIds).map(targetId =>\n this.fetchManagedObject(targetId, targetManagedObjects)\n )\n );\n }\n\n /**\n * Get unique target IDs from datapoints.\n */\n private getUniqueTargetIds(dataPoints: DatapointWithMeasurement[]): Set<string> {\n const uniqueTargetIds = new Set<string>();\n\n for (const dp of dataPoints) {\n if (dp.__target?.id) {\n uniqueTargetIds.add(dp.__target.id.toString());\n }\n }\n\n return uniqueTargetIds;\n }\n\n /**\n * Fetch a single managed object and add to the map.\n */\n private async fetchManagedObject(\n targetId: string,\n targetManagedObjects: Map<string, IManagedObject>\n ): Promise<void> {\n try {\n const { data } = await this.inventoryService.detail(targetId);\n targetManagedObjects.set(targetId, data);\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n /**\n * Fetch the most recent measurement for a datapoint within the specified date range.\n */\n private async getMeasurementForDatapoint(\n datapoint: KPIDetails,\n config: FetchConfig\n ): Promise<IMeasurement | null> {\n const sourceId = datapoint.__target?.id;\n if (!sourceId || !datapoint.fragment || !datapoint.series) {\n return null;\n }\n\n const filter: IMeasurementFilter = {\n dateFrom: config.dateFrom || '1970-01-01',\n dateTo: config.dateTo || new Date().toISOString(),\n source: sourceId,\n valueFragmentSeries: datapoint.series,\n valueFragmentType: datapoint.fragment,\n pageSize: 1,\n revert: true\n };\n\n const { data } = await this.measurementService.list(filter);\n return data?.[0] ?? null;\n }\n\n /**\n * Get unique ID for a datapoint.\n * Uses target ID if available, otherwise generates fallback based on index.\n */\n private getDatapointId(datapoint: KPIDetails, fallbackIndex: number): string {\n return datapoint.__target?.id?.toString() || `dp-${fallbackIndex}`;\n }\n}\n","import { DecimalPipe, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n OnInit,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { Router } from '@angular/router';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport {\n AlertService,\n ApplyRangeClassPipe,\n C8yTranslateDirective,\n C8yTranslatePipe,\n ColorRangeBoundaries,\n DashboardChildComponent,\n DatePipe,\n DeviceStatusComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n DynamicComponentModule,\n EmptyStateComponent,\n ForOfDirective,\n GroupService,\n GuideDocsComponent,\n GuideHrefDirective,\n IconDirective,\n ListGroupModule,\n LoadingComponent,\n VirtualScrollListenerDirective,\n WidgetActionWrapperComponent\n} from '@c8y/ngx-components';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport {\n DatapointsExportSelectorComponent,\n ExportConfig\n} from '@c8y/ngx-components/datapoints-export-selector';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CONTEXT_FEATURE,\n DisplayMode,\n GLOBAL_CONTEXT_DISPLAY_MODE,\n GlobalContextConnectorComponent,\n GlobalContextState,\n LocalControlsComponent,\n PRESET_NAME,\n PresetName,\n REFRESH_OPTION,\n WidgetConfigMigrationService\n} from '@c8y/ngx-components/global-context';\nimport { isEqual, merge } from 'lodash-es';\nimport { pairwise } from 'rxjs';\nimport { DatapointsListConfig, DatapointWithMeasurement } from '../datapoints-list-widget.model';\nimport { DEFAULT_DATAPOINTS_LIST_COLUMNS } from '../datapoints-list.constants';\nimport { DatapointsListFetchService } from './datapoints-list-fetch.service';\n\n@Component({\n selector: 'c8y-datapoints-list',\n templateUrl: './datapoints-list-view.component.html',\n host: { class: 'd-col fit-h' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ApplyRangeClassPipe,\n C8yTranslateDirective,\n C8yTranslatePipe,\n DatapointsExportSelectorComponent,\n DatePipe,\n DecimalPipe,\n DeviceStatusComponent,\n DynamicComponentModule,\n EmptyStateComponent,\n ForOfDirective,\n GlobalContextConnectorComponent,\n GuideDocsComponent,\n GuideHrefDirective,\n IconDirective,\n ListGroupModule,\n LoadingComponent,\n LocalControlsComponent,\n NgTemplateOutlet,\n VirtualScrollListenerDirective,\n WidgetActionWrapperComponent\n ]\n})\nexport class DatapointsListViewComponent implements OnInit {\n config = input.required<DatapointsListConfig>();\n isInPreviewMode = input(false);\n\n private readonly alertService = inject(AlertService);\n private readonly dashboardChild = inject(DashboardChildComponent, { optional: true });\n private readonly defaultColumns = DEFAULT_DATAPOINTS_LIST_COLUMNS;\n private readonly fetchService = inject(DatapointsListFetchService);\n private readonly groupService = inject(GroupService);\n private readonly inventoryService = inject(InventoryService);\n private readonly router = inject(Router);\n private readonly widgetConfigMigrationService = inject(WidgetConfigMigrationService);\n\n readonly CONTEXT_FEATURE = CONTEXT_FEATURE;\n readonly GLOBAL_CONTEXT_DISPLAY_MODE = GLOBAL_CONTEXT_DISPLAY_MODE;\n missingAllPermissionsAlert = new DynamicComponentAlertAggregator();\n targetManagedObjects = new Map<string, IManagedObject>();\n\n configSignal = linkedSignal(() => {\n const raw = this.config();\n const migrated = this.widgetConfigMigrationService.migrateWidgetConfig(raw);\n return merge({}, raw, migrated) as DatapointsListConfig;\n });\n contextConfig = signal<GlobalContextState>({});\n dataPoints = signal<DatapointWithMeasurement[]>([]);\n displayMode = signal<DisplayMode>(GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD);\n hasLoadedOnce = signal(false);\n hasNoPermissionsToReadAnyMeasurement = signal(false);\n isLinkedToGlobal = signal<boolean | undefined>(undefined);\n isLoading = signal(false);\n widgetControls = signal<PresetName>(PRESET_NAME.DATA_POINTS_LIST);\n\n fractionSize = computed(() => {\n const decimalPlaces = this.configSignal()?.decimalPlaces;\n if (typeof decimalPlaces === 'number' && !Number.isNaN(decimalPlaces)) {\n return `1.${decimalPlaces}-${decimalPlaces}`;\n }\n return '1.2-2';\n });\n\n columns = computed(() => {\n const options = this.configSignal()?.options;\n\n if (options?.columns?.length > 0) {\n return [...options.columns].sort((a, b) => a.order - b.order);\n }\n\n return this.defaultColumns.map(defaultCol => ({\n ...defaultCol,\n visible: options?.[defaultCol.id] ?? defaultCol.visible\n }));\n });\n\n visibleColumns = computed(() => {\n return this.columns().filter(col => col.visible !== false);\n });\n\n exportConfig = computed<ExportConfig | null>(() => {\n const effectiveConfig = { ...this.configSignal(), ...this.contextConfig() };\n const dateFrom = effectiveConfig.dateTimeContext?.dateFrom;\n const dateTo = effectiveConfig.dateTimeContext?.dateTo;\n\n if (!dateFrom || !dateTo || (this.isLoading() && !this.hasLoadedOnce())) {\n return null;\n }\n\n return {\n exportType: 'latestWithDetails',\n datapointDetails:\n effectiveConfig.datapoints\n ?.filter(dp => dp.__active === true)\n .map(dp => ({\n deviceName: dp.__target?.name || '',\n source: dp.__target?.id || '',\n valueFragmentSeries: dp.series,\n valueFragmentType: dp.fragment,\n target: dp.target,\n label: dp.label\n })) || [],\n dateFrom: dateFrom instanceof Date ? dateFrom.toISOString() : dateFrom,\n dateTo: dateTo instanceof Date ? dateTo.toISOString() : dateTo,\n columns: this.columns()\n .filter(col => col.visible)\n .map(col => ({\n id: col.id,\n label: col.label,\n visible: col.visible,\n order: col.order\n }))\n };\n });\n\n activeDataPoints = computed(() => {\n return this.configSignal()?.datapoints?.filter(dp => dp.__active === true) ?? [];\n });\n\n private loadRequestId = 0;\n private readonly seriesWithoutPermissionToReadCount = signal(0);\n\n constructor() {\n toObservable(this.config)\n .pipe(pairwise(), takeUntilDestroyed())\n .subscribe(([prevConfig, currentConfig]) => {\n if (!this.isInPreviewMode()) {\n return;\n }\n\n const prevContext = this.extractContextState(prevConfig);\n const newContext = this.extractContextState(currentConfig);\n this.contextConfig.set(newContext);\n\n const datapointsChanged = !isEqual(prevConfig.datapoints, currentConfig.datapoints);\n const decimalPlacesChanged = prevConfig.decimalPlaces !== currentConfig.decimalPlaces;\n const contextChanged = !isEqual(prevContext, newContext);\n\n if (datapointsChanged || decimalPlacesChanged || contextChanged) {\n this.isLoading.set(true);\n this.loadDatapoints();\n }\n });\n }\n\n ngOnInit(): void {\n const config = this.configSignal();\n\n const displayMode = config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;\n this.displayMode.set(displayMode as DisplayMode);\n\n this.contextConfig.set(this.extractContextState(config));\n\n if (displayMode !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD || this.isInPreviewMode()) {\n this.loadDatapoints();\n }\n }\n\n onContextChange(event: { context: GlobalContextState; diff: GlobalContextState }): void {\n const { diff, context } = event;\n\n if (\n diff.isAutoRefreshEnabled === false &&\n Object.keys(diff).length === 1 &&\n context.refreshOption === REFRESH_OPTION.LIVE\n ) {\n return;\n }\n\n this.contextConfig.set(context);\n this.isLoading.set(true);\n this.loadDatapoints();\n }\n\n onRefresh(): void {\n this.isLoading.set(true);\n this.loadDatapoints();\n }\n\n onExportModalOpen(isOpened: boolean): void {\n this.setAutoRefreshPaused(isOpened);\n }\n\n async redirectToAsset(assetId: string | number | undefined): Promise<void> {\n if (this.isInPreviewMode() || !assetId) {\n return;\n }\n\n try {\n const { data: mo } = await this.inventoryService.detail(assetId);\n\n if (mo) {\n const assetPath = this.groupService.getAssetPath(mo);\n this.router.navigateByUrl(`/${assetPath}/${mo.id}`);\n }\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n getTargetManagedObject(targetId: string | number): IManagedObject | undefined {\n return this.targetManagedObjects.get(targetId.toString());\n }\n\n getDashboardChild(): DashboardChildComponent | null {\n return this.dashboardChild ?? null;\n }\n\n getRangeValues(dp: KPIDetails): ColorRangeBoundaries {\n return {\n yellowRangeMin: dp.yellowRangeMin,\n yellowRangeMax: dp.yellowRangeMax,\n redRangeMin: dp.redRangeMin,\n redRangeMax: dp.redRangeMax\n };\n }\n\n onListScrolled(): void {\n this.setAutoRefreshPaused(true);\n }\n\n onListScrolledToTop(): void {\n this.setAutoRefreshPaused(false);\n }\n\n private extractContextState(config: Partial<GlobalContextState>): GlobalContextState {\n return {\n dateTimeContext: config.dateTimeContext,\n aggregation: config.aggregation,\n isAutoRefreshEnabled: config.isAutoRefreshEnabled,\n refreshInterval: config.refreshInterval,\n refreshOption: config.refreshOption\n };\n }\n\n private setAutoRefreshPaused(paused: boolean): void {\n if (this.isInPreviewMode()) {\n return;\n }\n\n const current = this.contextConfig();\n if (current.refreshOption === REFRESH_OPTION.HISTORY) {\n return;\n }\n\n this.contextConfig.set({\n ...current,\n isAutoRefreshEnabled: !paused\n });\n this.isLinkedToGlobal.set(!paused);\n }\n\n private loadDatapoints(): void {\n if (this.activeDataPoints().length > 0) {\n this.fetchMeasurements();\n } else {\n this.dataPoints.set([]);\n this.hasLoadedOnce.set(true);\n this.isLoading.set(false);\n }\n }\n\n private async fetchMeasurements(): Promise<void> {\n const requestId = ++this.loadRequestId;\n\n try {\n this.isLoading.set(true);\n\n const effectiveConfig = {\n ...this.configSignal(),\n ...this.contextConfig()\n };\n\n const dateFrom = effectiveConfig.dateTimeContext?.dateFrom;\n const dateTo = effectiveConfig.dateTimeContext?.dateTo;\n\n const dateFromStr = dateFrom instanceof Date ? dateFrom.toISOString() : dateFrom;\n const dateToStr = dateTo instanceof Date ? dateTo.toISOString() : dateTo;\n\n const result = await this.fetchService.fetchDatapointsWithMeasurements(\n this.activeDataPoints(),\n { fractionSize: this.fractionSize(), dateFrom: dateFromStr, dateTo: dateToStr }\n );\n\n if (requestId === this.loadRequestId) {\n this.dataPoints.set(result.dataPoints);\n this.targetManagedObjects = result.targetManagedObjects;\n this.hasLoadedOnce.set(true);\n this.seriesWithoutPermissionToReadCount.set(result.seriesWithoutPermissionCount);\n this.checkAndDisplayPermissionErrors();\n }\n } finally {\n if (requestId === this.loadRequestId) {\n this.isLoading.set(false);\n }\n }\n }\n\n private checkAndDisplayPermissionErrors(): void {\n if (this.seriesWithoutPermissionToReadCount()) {\n this.missingAllPermissionsAlert.clear();\n this.handleNoPermissionErrorMessage();\n }\n }\n\n private handleNoPermissionErrorMessage(): void {\n const noPermissions =\n this.seriesWithoutPermissionToReadCount() === this.activeDataPoints().length;\n this.hasNoPermissionsToReadAnyMeasurement.set(noPermissions);\n\n if (noPermissions) {\n this.showMessageForMissingPermissionsForAllSeries();\n }\n }\n\n private showMessageForMissingPermissionsForAllSeries(): void {\n this.missingAllPermissionsAlert.addAlerts(\n new DynamicComponentAlert({\n allowHtml: true,\n text: gettext(`<p>To view data, you must meet at least one of these criteria:</p>\n <ul>\n <li>\n Have\n <b>READ permission for \"Measurements\" permission type</b>\n (either as a global role or for the specific source)\n </li>\n <li>\n Be the\n <b>owner of the source</b>\n you want to export data from\n </li>\n </ul>\n <p>Don't meet these requirements? Contact your system administrator for assistance.</p>`),\n type: 'system'\n })\n );\n }\n}\n","@if (!isInPreviewMode()) {\n <div class=\"d-flex gap-16 p-r-16 inner-scroll h-auto min-width-0\">\n @if (displayMode() === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {\n <c8y-global-context-connector\n [controls]=\"widgetControls()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n [dashboardChild]=\"getDashboardChild()!\"\n [linked]=\"isLinkedToGlobal()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-global-context-connector>\n } @else {\n <c8y-local-controls\n [controls]=\"widgetControls()\"\n [displayMode]=\"displayMode()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-local-controls>\n }\n </div>\n}\n\n@if (!isInPreviewMode() && exportConfig(); as config) {\n <c8y-widget-action>\n <c8y-datapoints-export-selector\n [displayMode]=\"'icon-only'\"\n [exportConfig]=\"config\"\n [containerClass]=\"'d-contents'\"\n (isOpen)=\"onExportModalOpen($event)\"\n ></c8y-datapoints-export-selector>\n </c8y-widget-action>\n}\n\n@if (!hasNoPermissionsToReadAnyMeasurement()) {\n <!-- the .page-sticky-header -->\n @if (dataPoints().length > 0) {\n <div class=\"hidden-xs hidden-sm c8y-list__item\">\n <div class=\"c8y-list__item__block flex-grow min-width-0\">\n <div class=\"c8y-list__item__icon\">\n <i style=\"width: 22px\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n <div\n [class]=\"\n column.id === 'kpi' || column.id === 'asset'\n ? 'col-md-3 flex-grow min-width-0'\n : column.id == 'diff' || column.id == 'diffPercentage'\n ? 'col-md-1 flex-grow min-width-0'\n : 'col-md-2 flex-grow min-width-0'\n \"\n [class.text-right]=\"column.id !== 'asset' && column.id !== 'kpi'\"\n >\n <span\n class=\"text-medium text-truncate\"\n translate\n >\n {{ column.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <!-- The record list -->\n @if (isLoading() && !hasLoadedOnce()) {\n <!-- Initial load: full spinner -->\n <ng-container [ngTemplateOutlet]=\"loading\"></ng-container>\n } @else {\n @if (isLoading()) {\n <!-- Refresh: inline loading overlay -->\n <div class=\"p-absolute fit-w overflow-hidden p-b-4\">\n <c8y-loading [layout]=\"'page'\"></c8y-loading>\n </div>\n }\n @if (dataPoints().length) {\n <c8y-list-group\n class=\"flex-grow\"\n role=\"list\"\n c8yVirtualScrollListener\n (scrolled)=\"onListScrolled()\"\n (scrolledToTop)=\"onListScrolledToTop()\"\n >\n <c8y-li\n role=\"listitem\"\n *c8yFor=\"\n let dp of { data: dataPoints(), res: null! };\n enableVirtualScroll: true;\n virtualScrollElementSize: 48;\n virtualScrollStrategy: 'fixed'\n \"\n >\n <c8y-li-icon>\n <i\n c8yIcon=\"circle\"\n [style.color]=\"dp.color\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n @switch (column.id) {\n @case ('kpi') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n {{ dp.label | translate }}\n @if (dp.unit) {\n <small class=\"text-muted\">{{ dp.unit }}</small>\n }\n </div>\n </div>\n }\n @case ('target') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>{{ dp.target }}</span>\n </div>\n </div>\n }\n @case ('current') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span\n [class]=\"dp.currentValue | applyRangeClass: getRangeValues(dp)\"\n [title]=\"dp.timestamp | c8yDate: 'medium'\"\n [attr.aria-label]=\"\n ('Last updated: ' | translate) + (dp.timestamp | c8yDate: 'medium')\n \"\n >\n {{ dp.currentValue | number: dp.currentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diff') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffValue | number: dp.diffFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diffPercentage') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffPercentValue | number: dp.diffPercentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('asset') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <button\n class=\"btn-clean d-flex a-i-center gap-4 text-muted\"\n [attr.aria-label]=\"('Navigate to ' | translate) + dp.__target?.name\"\n type=\"button\"\n (click)=\"redirectToAsset(dp.__target?.id)\"\n >\n @if (dp.__target?.id && getTargetManagedObject(dp.__target.id); as mo) {\n <c8y-device-status\n [mo]=\"mo\"\n [size]=\"16\"\n ></c8y-device-status>\n }\n <small\n class=\"text-truncate\"\n [title]=\"dp.__target?.name\"\n >{{ dp.__target?.name }}</small\n >\n </button>\n </div>\n </div>\n }\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n }\n} @else {\n <div class=\"p-t-24 p-r-16 p-l-16 p-b-16 d-flex\">\n <div class=\"center-block\">\n <c8y-dynamic-component-alerts\n [alerts]=\"missingAllPermissionsAlert\"\n ></c8y-dynamic-component-alerts>\n </div>\n </div>\n}\n\n<ng-template #loading>\n <c8y-loading></c8y-loading>\n</ng-template>\n\n<ng-template #emptyState>\n <div class=\"p-relative p-l-24\">\n <c8y-ui-empty-state\n [icon]=\"'c8y-alert-idle'\"\n [title]=\"'No data to display.' | translate\"\n [horizontal]=\"true\"\n data-cy=\"datapoints-list--empty-state\"\n >\n <p c8y-guide-docs>\n <small translate>\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/widgets-collection/#data-point-list\">\n user documentation\n </a>\n .\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n</ng-template>\n","import { CdkDragDrop, DragDropModule } from '@angular/cdk/drag-drop';\nimport { AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n OnInit,\n signal,\n TemplateRef,\n viewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AbstractControl,\n FormArray,\n FormBuilder,\n FormGroup,\n NgForm,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport {\n C8yTranslatePipe,\n DynamicComponentModule,\n FormGroupComponent,\n IconDirective,\n ListGroupModule\n} from '@c8y/ngx-components';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport {\n LocalControlsComponent,\n PRESET_NAME,\n PresetName\n} from '@c8y/ngx-components/global-context';\nimport { isEqual } from 'lodash-es';\nimport { debounceTime, distinctUntilChanged, filter, Observable, take } from 'rxjs';\nimport { DatapointsListViewComponent } from '../datapoints-list-view/datapoints-list-view.component';\nimport { ColumnConfig, DatapointsListConfig } from '../datapoints-list-widget.model';\nimport { DEFAULT_DATAPOINTS_LIST_COLUMNS } from '../datapoints-list.constants';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\n\nconst DEFAULT_DECIMAL_PLACES = 2;\nconst MIN_DECIMAL_PLACES = 0;\nconst MAX_DECIMAL_PLACES = 10;\n\n@Component({\n selector: 'c8y-datapoints-list-view-config',\n templateUrl: './datapoints-list-config.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n C8yTranslatePipe,\n DatapointsListViewComponent,\n DragDropModule,\n DynamicComponentModule,\n FormGroupComponent,\n IconDirective,\n ListGroupModule,\n LocalControlsComponent,\n ReactiveFormsModule,\n PopoverModule\n ]\n})\nexport class DatapointsListConfigComponent implements OnInit, AfterViewInit {\n config = input.required<DatapointsListConfig>();\n private readonly previewTemplate = viewChild<TemplateRef<unknown>>('dataPointsListPreview');\n\n private readonly defaultColumns = DEFAULT_DATAPOINTS_LIST_COLUMNS;\n private readonly destroyRef = inject(DestroyRef);\n private readonly form = inject(NgForm);\n private readonly formBuilder = inject(FormBuilder);\n private readonly widgetConfigService = inject(WidgetConfigService);\n\n readonly controls: PresetName = PRESET_NAME.DATA_POINTS_LIST;\n readonly minDecimalPlaces = MIN_DECIMAL_PLACES;\n readonly maxDecimalPlaces = MAX_DECIMAL_PLACES;\n configForm = signal<ReturnType<DatapointsListConfigComponent['createForm']> | undefined>(\n undefined\n );\n readonly columnsFormArray = computed(() => this.configForm()?.get('columns') as FormArray);\n\n /**\n * Debounced config for preview to prevent multiple series requests on initial load.\n * Uses debounceTime to batch rapid emissions (e.g., from initConfig + GlobalContext processing).\n */\n previewConfig$ = this.widgetConfigService.currentConfig$.pipe(\n filter(config => !!config?.dateTimeContext),\n debounceTime(300)\n ) as Observable<DatapointsListConfig>;\n\n ngOnInit(): void {\n this.widgetConfigService.currentConfig$\n .pipe(\n filter(config => !!config?.dateTimeContext),\n take(1),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.initForm());\n }\n\n ngAfterViewInit(): void {\n this.widgetConfigService.setPreview(this.previewTemplate() ?? null);\n }\n\n onColumnDrop(event: CdkDragDrop<ColumnConfig[]>): void {\n const columnsArray = this.columnsFormArray();\n const item = columnsArray.at(event.previousIndex);\n columnsArray.removeAt(event.previousIndex);\n columnsArray.insert(event.currentIndex, item);\n columnsArray.controls.forEach((control, index) => control.patchValue({ order: index }));\n }\n\n private initForm(): void {\n const form = this.createForm();\n this.form.form.addControl('config', form);\n form.patchValue(this.config(), { emitEvent: false });\n\n this.pushFormToService(form.value);\n\n form.valueChanges\n .pipe(\n distinctUntilChanged((prev, curr) => isEqual(prev, curr)),\n debounceTime(300),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(formValue => {\n if (form.invalid) {\n return;\n }\n\n const { decimalPlaces } = formValue;\n if (\n typeof decimalPlaces === 'number' &&\n (decimalPlaces < MIN_DECIMAL_PLACES || decimalPlaces > MAX_DECIMAL_PLACES)\n ) {\n return;\n }\n\n this.pushFormToService(formValue);\n });\n\n this.configForm.set(form);\n }\n\n private pushFormToService(formValue: unknown): void {\n const formData = formValue as { columns?: ColumnConfig[]; [key: string]: unknown };\n const { columns, ...formValueWithoutColumns } = formData;\n const currentOptions = this.widgetConfigService.currentConfig?.options;\n this.widgetConfigService.updateConfig({\n ...formValueWithoutColumns,\n options: {\n ...currentOptions,\n columns: columns || []\n }\n });\n }\n\n private createForm() {\n const currentConfig = this.config();\n const columns = this.migrateColumnsConfig(currentConfig);\n\n return this.formBuilder.group({\n decimalPlaces: [\n currentConfig?.decimalPlaces ?? DEFAULT_DECIMAL_PLACES,\n [\n Validators.required,\n Validators.min(MIN_DECIMAL_PLACES),\n Validators.max(MAX_DECIMAL_PLACES),\n Validators.pattern('^[0-9]+$')\n ]\n ],\n columns: this.formBuilder.array(\n columns.map(col => this.createColumnFormGroup(col)),\n [Validators.required, Validators.minLength(1), this.minOneColumnVisible()]\n )\n });\n }\n\n private createColumnFormGroup(column: ColumnConfig): FormGroup {\n return this.formBuilder.group({\n id: [column.id, Validators.required],\n label: [column.label, Validators.required],\n visible: [column.visible],\n order: [column.order]\n });\n }\n\n private migrateColumnsConfig(config: DatapointsListConfig): ColumnConfig[] {\n if (config?.options?.columns?.length > 0) {\n return [...config.options.columns].sort((a, b) => a.order - b.order);\n }\n\n return this.defaultColumns.map(defaultCol => ({\n ...defaultCol,\n visible: config?.options?.[defaultCol.id] ?? defaultCol.visible\n }));\n }\n\n private minOneColumnVisible(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const columns: ColumnConfig[] = control.value;\n\n if (!columns?.length) {\n return null;\n }\n\n const visibleColumns = columns.filter(column => column.visible);\n return visibleColumns.length >= 1 ? null : { atLeastOneColumnMustBeVisible: true };\n };\n }\n}\n","@if (configForm(); as form) {\n <form\n class=\"no-card-context\"\n [formGroup]=\"form\"\n >\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Columns (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n formArrayName=\"columns\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (columnsFormArray().errors?.atLeastOneColumnMustBeVisible) {\n <div\n class=\"alert alert-warning m-t-8\"\n role=\"alert\"\n >\n {{ 'At least 1 column must be visible.' | translate }}\n </div>\n }\n\n @for (column of columnsFormArray().controls; track column.value.id; let i = $index) {\n <c8y-li\n class=\"c8y-list__item__collapse--container-small\"\n [formGroupName]=\"i\"\n cdkDrag\n >\n <c8y-li-drag-handle\n [title]=\"'Click and drag to reorder' | translate\"\n cdkDragHandle\n >\n <i c8yIcon=\"drag-reorder\"></i>\n </c8y-li-drag-handle>\n <c8y-li-checkbox\n class=\"a-s-center p-r-0\"\n [displayAsSwitch]=\"true\"\n formControlName=\"visible\"\n (click)=\"$event.stopPropagation()\"\n ></c8y-li-checkbox>\n <c8y-li-body>\n <div class=\"d-flex a-i-center\">\n <span class=\"text-truncate\">{{ column.value.label | translate }}</span>\n @switch (column.value.label) {\n @case ('Target') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Target column shows the value set on the target field of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n @case ('Diff') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Diff column shows the difference between the current value and the target value of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n </c8y-list-group>\n </fieldset>\n\n <!-- decimal input -->\n <fieldset class=\"c8y-fieldset\">\n <legend>\n {{ 'Decimal places' | translate }}\n </legend>\n <c8y-form-group class=\"p-t-8\">\n <input\n class=\"form-control\"\n name=\"decimalPlaces\"\n type=\"number\"\n formControlName=\"decimalPlaces\"\n step=\"1\"\n [min]=\"minDecimalPlaces\"\n [max]=\"maxDecimalPlaces\"\n />\n </c8y-form-group>\n </fieldset>\n </form>\n}\n\n<ng-template #dataPointsListPreview>\n @let previewConfig = previewConfig$ | async;\n @if (previewConfig && previewConfig.displayMode !== 'dashboard') {\n <c8y-local-controls\n [controls]=\"controls\"\n [displayMode]=\"previewConfig.displayMode!\"\n [config]=\"previewConfig\"\n [disabled]=\"true\"\n ></c8y-local-controls>\n }\n\n @if (previewConfig) {\n <c8y-datapoints-list\n [config]=\"previewConfig\"\n [isInPreviewMode]=\"true\"\n data-cy=\"c8y-datapoints-list-widget-config--preview-datapoints-list\"\n ></c8y-datapoints-list>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIA;;AAEG;AACI,MAAM,+BAA+B,GAAmB;AAC7D,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;AAC/D,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;AACnE,IAAA,EAAE,EAAE,EAAE,S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,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAYP,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAlBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,EAAA,eAAA,EAE1B,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,SAAS;wBACT,gBAAgB;wBAChB,2BAA2B;wBAC3B,cAAc;wBACd,sBAAsB;wBACtB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,sBAAsB;wBACtB,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,29HAAA,EAAA;wKAIkE,uBAAuB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvE5F;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-datapoints-list.mjs","sources":["../../widgets/implementations/datapoints-list/datapoints-list.constants.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-view.service.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-fetch.service.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-view.component.ts","../../widgets/implementations/datapoints-list/datapoints-list-view/datapoints-list-view.component.html","../../widgets/implementations/datapoints-list/datapoints-list-config/datapoints-list-config.component.ts","../../widgets/implementations/datapoints-list/datapoints-list-config/datapoints-list-config.component.html","../../widgets/implementations/datapoints-list/c8y-ngx-components-widgets-implementations-datapoints-list.ts"],"sourcesContent":["import { gettext } from '@c8y/ngx-components/gettext';\n\nimport { ColumnConfig } from './datapoints-list-widget.model';\n\n/**\n * Default column configuration for datapoints list widget\n */\nexport const DEFAULT_DATAPOINTS_LIST_COLUMNS: ColumnConfig[] = [\n { id: 'kpi', label: gettext('Label'), visible: true, order: 0 },\n { id: 'target', label: gettext('Target'), visible: true, order: 1 },\n { id: 'current', label: gettext('Current'), visible: true, order: 2 },\n { id: 'diff', label: gettext('Diff'), visible: true, order: 3 },\n { id: 'diffPercentage', label: gettext('Diff %'), visible: true, order: 4 },\n { id: 'asset', label: gettext('Asset'), visible: true, order: 5 }\n];\n","import { Injectable } from '@angular/core';\nimport { IMeasurement } from '@c8y/client';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { DatapointWithMeasurement } from '../datapoints-list-widget.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DatapointsListService {\n /**\n * Calculate difference between current value and target\n * @param datapoint - Datapoint record\n * @returns Difference value or null if value/target is undefined\n */\n diff(datapoint: DatapointWithMeasurement): number | null {\n const { currentValue, target } = datapoint;\n // != checks both null and undefined\n if (currentValue != null && target != null) {\n return currentValue - target;\n }\n return null;\n }\n\n /**\n * Calculate percentage difference between current value and target\n * @param datapoint - Datapoint record\n * @returns Percentage difference or null if target is undefined\n */\n diffPercent(datapoint: DatapointWithMeasurement): number | null {\n const target = datapoint.target;\n\n if (target !== null && target !== undefined) {\n const _diff = this.diff(datapoint);\n if (_diff !== null) {\n // Intentionally allows division by zero to return Infinity\n // when target is 0, representing mathematically undefined percentage.\n // This follows the previous AngularJS implementation behavior.\n return (_diff / target) * 100;\n }\n }\n\n return null;\n }\n\n /**\n * Get fraction size format based on whether the value is an integer\n * @param value - Number to check\n * @param defaultFractionSize - Default fraction size format to use for non-integers\n * @returns Fraction size format ('1.0-0' for integers, defaultFractionSize for decimals)\n */\n getFractionSize(value: number | null | undefined, defaultFractionSize: string): string {\n if (value === null || value === undefined) {\n return defaultFractionSize;\n }\n return value % 1 === 0 ? '1.0-0' : defaultFractionSize;\n }\n\n /**\n * Extract current value and timestamp from a measurement\n * @param datapoint - Datapoint configuration (contains fragment and series)\n * @param measurement - Measurement to extract value from\n * @returns Object containing extracted value and timestamp (null if not found)\n */\n extractMeasurementValue(\n datapoint: KPIDetails,\n measurement: IMeasurement | undefined\n ): { value: number | null; timestamp: Date | null } {\n // Return null values if measurement is missing\n if (!measurement) {\n return { value: null, timestamp: null };\n }\n\n // Return null values if datapoint configuration is incomplete\n if (!datapoint.fragment || !datapoint.series) {\n return { value: null, timestamp: null };\n }\n\n // Access the fragment (e.g., \"c8y_Steam\")\n const fragmentData = measurement[datapoint.fragment];\n if (!fragmentData) {\n return { value: null, timestamp: null };\n }\n\n // Access the series within the fragment (e.g., \"Temperature\")\n const seriesData = fragmentData[datapoint.series];\n if (!seriesData || seriesData.value === undefined) {\n return { value: null, timestamp: null };\n }\n\n // Extract and return the value and timestamp\n return {\n value: seriesData.value,\n timestamp: new Date(measurement.time)\n };\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport {\n IManagedObject,\n IMeasurement,\n IMeasurementFilter,\n InventoryService,\n MeasurementService\n} from '@c8y/client';\nimport { AlertService } from '@c8y/ngx-components';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { DatapointWithMeasurement } from '../datapoints-list-widget.model';\nimport { DatapointsListService } from './datapoints-list-view.service';\n\ninterface FetchConfig {\n fractionSize: string;\n dateFrom?: string;\n dateTo?: string;\n}\n\ninterface FetchResult {\n dataPoints: DatapointWithMeasurement[];\n seriesWithoutPermissionCount: number;\n targetManagedObjects: Map<string, IManagedObject>;\n}\n\ninterface SingleDatapointResult {\n datapoint: DatapointWithMeasurement;\n hasPermissionError: boolean;\n}\n\n/**\n * Service that handles all data-fetching operations for the datapoints list widget.\n * Encapsulates measurement fetching, data enrichment, and error handling.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DatapointsListFetchService {\n private alertService = inject(AlertService);\n private measurementService = inject(MeasurementService);\n private inventoryService = inject(InventoryService);\n private datapointsListService = inject(DatapointsListService);\n\n /**\n * Fetch measurements for all active datapoints and enrich them with calculated values.\n */\n async fetchDatapointsWithMeasurements(\n datapoints: KPIDetails[],\n config: FetchConfig\n ): Promise<FetchResult> {\n const targetManagedObjects = new Map<string, IManagedObject>();\n\n const results = await this.fetchAllDatapoints(datapoints, config);\n\n const enrichedDataPoints = results.map(r => r.datapoint);\n const seriesWithoutPermissionCount = results.filter(r => r.hasPermissionError).length;\n\n await this.fetchTargetManagedObjects(enrichedDataPoints, targetManagedObjects);\n\n return {\n dataPoints: enrichedDataPoints,\n seriesWithoutPermissionCount,\n targetManagedObjects\n };\n }\n\n /**\n * Fetch and enrich all datapoints in parallel.\n * Each datapoint fetch is independent - one failure doesn't affect others.\n */\n private fetchAllDatapoints(\n datapoints: KPIDetails[],\n config: FetchConfig\n ): Promise<SingleDatapointResult[]> {\n return Promise.all(\n datapoints.map((datapoint, index) => this.fetchSingleDatapoint(datapoint, index, config))\n );\n }\n\n /**\n * Fetch measurement for a single datapoint and return enriched result.\n * Handles errors gracefully - returns empty datapoint on failure.\n */\n private async fetchSingleDatapoint(\n datapoint: KPIDetails,\n index: number,\n config: FetchConfig\n ): Promise<SingleDatapointResult> {\n try {\n const measurement = await this.getMeasurementForDatapoint(datapoint, config);\n const measurementValue = this.datapointsListService.extractMeasurementValue(\n datapoint,\n measurement\n );\n\n return {\n datapoint: this.createEnrichedDatapoint(datapoint, index, measurementValue, config),\n hasPermissionError: false\n };\n } catch (error) {\n return this.handleFetchError(error, datapoint, index, config);\n }\n }\n\n /**\n * Handle fetch error and return appropriate result.\n */\n private handleFetchError(\n error: unknown,\n datapoint: KPIDetails,\n index: number,\n config: FetchConfig\n ): SingleDatapointResult {\n const isPermissionError = (error as HttpErrorResponse)?.status === 403;\n\n if (!isPermissionError) {\n this.alertService.addServerFailure(error);\n }\n\n return {\n datapoint: this.createEnrichedDatapoint(\n datapoint,\n index,\n { value: null, timestamp: null },\n config\n ),\n hasPermissionError: isPermissionError\n };\n }\n\n /**\n * Create an enriched datapoint with measurement value and all calculated fields.\n */\n private createEnrichedDatapoint(\n datapoint: KPIDetails,\n index: number,\n measurementValue: { value: number | null; timestamp: Date | null },\n config: FetchConfig\n ): DatapointWithMeasurement {\n const enrichedDatapoint: DatapointWithMeasurement = {\n ...datapoint,\n id: this.getDatapointId(datapoint, index),\n currentValue: measurementValue.value,\n timestamp: measurementValue.timestamp\n };\n\n this.calculateDerivedFields(enrichedDatapoint, config.fractionSize);\n\n return enrichedDatapoint;\n }\n\n /**\n * Calculate and set all derived fields on a datapoint.\n * Includes diff, diffPercent, and fraction sizes for display formatting.\n */\n private calculateDerivedFields(datapoint: DatapointWithMeasurement, fractionSize: string): void {\n datapoint.diffValue = this.datapointsListService.diff(datapoint);\n datapoint.diffPercentValue = this.datapointsListService.diffPercent(datapoint);\n datapoint.currentFractionSize = this.datapointsListService.getFractionSize(\n datapoint.currentValue,\n fractionSize\n );\n datapoint.diffFractionSize = this.datapointsListService.getFractionSize(\n datapoint.diffValue,\n fractionSize\n );\n datapoint.diffPercentFractionSize = this.datapointsListService.getFractionSize(\n datapoint.diffPercentValue,\n fractionSize\n );\n }\n\n /**\n * Fetch managed objects for device status display.\n */\n private async fetchTargetManagedObjects(\n dataPoints: DatapointWithMeasurement[],\n targetManagedObjects: Map<string, IManagedObject>\n ): Promise<void> {\n const uniqueTargetIds = this.getUniqueTargetIds(dataPoints);\n\n if (uniqueTargetIds.size === 0) {\n return;\n }\n\n await Promise.all(\n Array.from(uniqueTargetIds).map(targetId =>\n this.fetchManagedObject(targetId, targetManagedObjects)\n )\n );\n }\n\n /**\n * Get unique target IDs from datapoints.\n */\n private getUniqueTargetIds(dataPoints: DatapointWithMeasurement[]): Set<string> {\n const uniqueTargetIds = new Set<string>();\n\n for (const dp of dataPoints) {\n if (dp.__target?.id) {\n uniqueTargetIds.add(dp.__target.id.toString());\n }\n }\n\n return uniqueTargetIds;\n }\n\n /**\n * Fetch a single managed object and add to the map.\n */\n private async fetchManagedObject(\n targetId: string,\n targetManagedObjects: Map<string, IManagedObject>\n ): Promise<void> {\n try {\n const { data } = await this.inventoryService.detail(targetId);\n targetManagedObjects.set(targetId, data);\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n /**\n * Fetch the most recent measurement for a datapoint within the specified date range.\n */\n private async getMeasurementForDatapoint(\n datapoint: KPIDetails,\n config: FetchConfig\n ): Promise<IMeasurement | null> {\n const sourceId = datapoint.__target?.id;\n if (!sourceId || !datapoint.fragment || !datapoint.series) {\n return null;\n }\n\n const filter: IMeasurementFilter = {\n dateFrom: config.dateFrom || '1970-01-01',\n dateTo: config.dateTo || new Date().toISOString(),\n source: sourceId,\n valueFragmentSeries: datapoint.series,\n valueFragmentType: datapoint.fragment,\n pageSize: 1,\n revert: true\n };\n\n const { data } = await this.measurementService.list(filter);\n return data?.[0] ?? null;\n }\n\n /**\n * Get unique ID for a datapoint.\n * Uses target ID if available, otherwise generates fallback based on index.\n */\n private getDatapointId(datapoint: KPIDetails, fallbackIndex: number): string {\n return datapoint.__target?.id?.toString() || `dp-${fallbackIndex}`;\n }\n}\n","import { DecimalPipe, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n OnInit,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { Router } from '@angular/router';\nimport { IManagedObject, InventoryService } from '@c8y/client';\nimport {\n AlertService,\n ApplyRangeClassPipe,\n C8yTranslateDirective,\n C8yTranslatePipe,\n ColorRangeBoundaries,\n DashboardChildComponent,\n DatePipe,\n DeviceStatusComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n DynamicComponentModule,\n EmptyStateComponent,\n ForOfDirective,\n GroupService,\n GuideDocsComponent,\n GuideHrefDirective,\n IconDirective,\n ListGroupModule,\n LoadingComponent,\n VirtualScrollListenerDirective,\n WidgetActionWrapperComponent\n} from '@c8y/ngx-components';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport {\n DatapointsExportSelectorComponent,\n ExportConfig\n} from '@c8y/ngx-components/datapoints-export-selector';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CONTEXT_FEATURE,\n DisplayMode,\n GLOBAL_CONTEXT_DISPLAY_MODE,\n GlobalContextConnectorComponent,\n GlobalContextState,\n LocalControlsComponent,\n PRESET_NAME,\n PresetName,\n REFRESH_OPTION,\n WidgetConfigMigrationService\n} from '@c8y/ngx-components/global-context';\nimport { isEqual, merge } from 'lodash-es';\nimport { pairwise } from 'rxjs';\nimport { DatapointsListConfig, DatapointWithMeasurement } from '../datapoints-list-widget.model';\nimport { DEFAULT_DATAPOINTS_LIST_COLUMNS } from '../datapoints-list.constants';\nimport { DatapointsListFetchService } from './datapoints-list-fetch.service';\n\n@Component({\n selector: 'c8y-datapoints-list',\n templateUrl: './datapoints-list-view.component.html',\n host: { class: 'd-col fit-h' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ApplyRangeClassPipe,\n C8yTranslateDirective,\n C8yTranslatePipe,\n DatapointsExportSelectorComponent,\n DatePipe,\n DecimalPipe,\n DeviceStatusComponent,\n DynamicComponentModule,\n EmptyStateComponent,\n ForOfDirective,\n GlobalContextConnectorComponent,\n GuideDocsComponent,\n GuideHrefDirective,\n IconDirective,\n ListGroupModule,\n LoadingComponent,\n LocalControlsComponent,\n NgTemplateOutlet,\n VirtualScrollListenerDirective,\n WidgetActionWrapperComponent\n ]\n})\nexport class DatapointsListViewComponent implements OnInit {\n config = input.required<DatapointsListConfig>();\n isInPreviewMode = input(false);\n\n private readonly alertService = inject(AlertService);\n private readonly dashboardChild = inject(DashboardChildComponent, { optional: true });\n private readonly defaultColumns = DEFAULT_DATAPOINTS_LIST_COLUMNS;\n private readonly fetchService = inject(DatapointsListFetchService);\n private readonly groupService = inject(GroupService);\n private readonly inventoryService = inject(InventoryService);\n private readonly router = inject(Router);\n private readonly widgetConfigMigrationService = inject(WidgetConfigMigrationService);\n\n readonly CONTEXT_FEATURE = CONTEXT_FEATURE;\n readonly GLOBAL_CONTEXT_DISPLAY_MODE = GLOBAL_CONTEXT_DISPLAY_MODE;\n missingAllPermissionsAlert = new DynamicComponentAlertAggregator();\n targetManagedObjects = new Map<string, IManagedObject>();\n\n configSignal = linkedSignal(() => {\n const raw = this.config();\n const migrated = this.widgetConfigMigrationService.migrateWidgetConfig(raw);\n return merge({}, raw, migrated) as DatapointsListConfig;\n });\n contextConfig = signal<GlobalContextState>({});\n dataPoints = signal<DatapointWithMeasurement[]>([]);\n displayMode = signal<DisplayMode>(GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD);\n hasLoadedOnce = signal(false);\n hasNoPermissionsToReadAnyMeasurement = signal(false);\n isLinkedToGlobal = signal<boolean | undefined>(undefined);\n isLoading = signal(false);\n widgetControls = signal<PresetName>(PRESET_NAME.DATA_POINTS_LIST);\n\n fractionSize = computed(() => {\n const decimalPlaces = this.configSignal()?.decimalPlaces;\n if (typeof decimalPlaces === 'number' && !Number.isNaN(decimalPlaces)) {\n return `1.${decimalPlaces}-${decimalPlaces}`;\n }\n return '1.2-2';\n });\n\n columns = computed(() => {\n const options = this.configSignal()?.options;\n\n if (options?.columns?.length > 0) {\n return [...options.columns].sort((a, b) => a.order - b.order);\n }\n\n return this.defaultColumns.map(defaultCol => ({\n ...defaultCol,\n visible: options?.[defaultCol.id] ?? defaultCol.visible\n }));\n });\n\n visibleColumns = computed(() => {\n return this.columns().filter(col => col.visible !== false);\n });\n\n exportConfig = computed<ExportConfig | null>(() => {\n const effectiveConfig = { ...this.configSignal(), ...this.contextConfig() };\n const dateFrom = effectiveConfig.dateTimeContext?.dateFrom;\n const dateTo = effectiveConfig.dateTimeContext?.dateTo;\n\n if (!dateFrom || !dateTo || (this.isLoading() && !this.hasLoadedOnce())) {\n return null;\n }\n\n return {\n exportType: 'latestWithDetails',\n datapointDetails:\n effectiveConfig.datapoints\n ?.filter(dp => dp.__active === true)\n .map(dp => ({\n deviceName: dp.__target?.name || '',\n source: dp.__target?.id || '',\n valueFragmentSeries: dp.series,\n valueFragmentType: dp.fragment,\n target: dp.target,\n label: dp.label\n })) || [],\n dateFrom: dateFrom instanceof Date ? dateFrom.toISOString() : dateFrom,\n dateTo: dateTo instanceof Date ? dateTo.toISOString() : dateTo,\n columns: this.columns()\n .filter(col => col.visible)\n .map(col => ({\n id: col.id,\n label: col.label,\n visible: col.visible,\n order: col.order\n }))\n };\n });\n\n activeDataPoints = computed(() => {\n return this.configSignal()?.datapoints?.filter(dp => dp.__active === true) ?? [];\n });\n\n private loadRequestId = 0;\n private readonly seriesWithoutPermissionToReadCount = signal(0);\n\n constructor() {\n toObservable(this.config)\n .pipe(pairwise(), takeUntilDestroyed())\n .subscribe(([prevConfig, currentConfig]) => {\n if (!this.isInPreviewMode()) {\n return;\n }\n\n const prevContext = this.extractContextState(prevConfig);\n const newContext = this.extractContextState(currentConfig);\n this.contextConfig.set(newContext);\n\n const datapointsChanged = !isEqual(prevConfig.datapoints, currentConfig.datapoints);\n const decimalPlacesChanged = prevConfig.decimalPlaces !== currentConfig.decimalPlaces;\n const contextChanged = !isEqual(prevContext, newContext);\n\n if (datapointsChanged || decimalPlacesChanged || contextChanged) {\n this.isLoading.set(true);\n this.loadDatapoints();\n }\n });\n }\n\n ngOnInit(): void {\n const config = this.configSignal();\n\n const displayMode = config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;\n this.displayMode.set(displayMode as DisplayMode);\n\n this.contextConfig.set(this.extractContextState(config));\n\n if (displayMode !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD || this.isInPreviewMode()) {\n this.loadDatapoints();\n }\n }\n\n onContextChange(event: { context: GlobalContextState; diff: GlobalContextState }): void {\n const { diff, context } = event;\n\n if (\n diff.isAutoRefreshEnabled === false &&\n Object.keys(diff).length === 1 &&\n context.refreshOption === REFRESH_OPTION.LIVE\n ) {\n return;\n }\n\n this.contextConfig.set(context);\n this.isLoading.set(true);\n this.loadDatapoints();\n }\n\n onRefresh(): void {\n this.isLoading.set(true);\n this.loadDatapoints();\n }\n\n onExportModalOpen(isOpened: boolean): void {\n this.setAutoRefreshPaused(isOpened);\n }\n\n async redirectToAsset(assetId: string | number | undefined): Promise<void> {\n if (this.isInPreviewMode() || !assetId) {\n return;\n }\n\n try {\n const { data: mo } = await this.inventoryService.detail(assetId);\n\n if (mo) {\n const assetPath = this.groupService.getAssetPath(mo);\n this.router.navigateByUrl(`/${assetPath}/${mo.id}`);\n }\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n getTargetManagedObject(targetId: string | number): IManagedObject | undefined {\n return this.targetManagedObjects.get(targetId.toString());\n }\n\n getDashboardChild(): DashboardChildComponent | null {\n return this.dashboardChild ?? null;\n }\n\n getRangeValues(dp: KPIDetails): ColorRangeBoundaries {\n return {\n yellowRangeMin: dp.yellowRangeMin,\n yellowRangeMax: dp.yellowRangeMax,\n redRangeMin: dp.redRangeMin,\n redRangeMax: dp.redRangeMax\n };\n }\n\n onListScrolled(): void {\n this.setAutoRefreshPaused(true);\n }\n\n onListScrolledToTop(): void {\n this.setAutoRefreshPaused(false);\n }\n\n private extractContextState(config: Partial<GlobalContextState>): GlobalContextState {\n return {\n dateTimeContext: config.dateTimeContext,\n aggregation: config.aggregation,\n isAutoRefreshEnabled: config.isAutoRefreshEnabled,\n refreshInterval: config.refreshInterval,\n refreshOption: config.refreshOption\n };\n }\n\n private setAutoRefreshPaused(paused: boolean): void {\n if (this.isInPreviewMode()) {\n return;\n }\n\n const current = this.contextConfig();\n if (current.refreshOption === REFRESH_OPTION.HISTORY) {\n return;\n }\n\n this.contextConfig.set({\n ...current,\n isAutoRefreshEnabled: !paused\n });\n this.isLinkedToGlobal.set(!paused);\n }\n\n private loadDatapoints(): void {\n if (this.activeDataPoints().length > 0) {\n this.fetchMeasurements();\n } else {\n this.dataPoints.set([]);\n this.hasLoadedOnce.set(true);\n this.isLoading.set(false);\n }\n }\n\n private async fetchMeasurements(): Promise<void> {\n const requestId = ++this.loadRequestId;\n\n try {\n this.isLoading.set(true);\n\n const effectiveConfig = {\n ...this.configSignal(),\n ...this.contextConfig()\n };\n\n const dateFrom = effectiveConfig.dateTimeContext?.dateFrom;\n const dateTo = effectiveConfig.dateTimeContext?.dateTo;\n\n const dateFromStr = dateFrom instanceof Date ? dateFrom.toISOString() : dateFrom;\n const dateToStr = dateTo instanceof Date ? dateTo.toISOString() : dateTo;\n\n const result = await this.fetchService.fetchDatapointsWithMeasurements(\n this.activeDataPoints(),\n { fractionSize: this.fractionSize(), dateFrom: dateFromStr, dateTo: dateToStr }\n );\n\n if (requestId === this.loadRequestId) {\n this.dataPoints.set(result.dataPoints);\n this.targetManagedObjects = result.targetManagedObjects;\n this.hasLoadedOnce.set(true);\n this.seriesWithoutPermissionToReadCount.set(result.seriesWithoutPermissionCount);\n this.checkAndDisplayPermissionErrors();\n }\n } finally {\n if (requestId === this.loadRequestId) {\n this.isLoading.set(false);\n }\n }\n }\n\n private checkAndDisplayPermissionErrors(): void {\n if (this.seriesWithoutPermissionToReadCount()) {\n this.missingAllPermissionsAlert.clear();\n this.handleNoPermissionErrorMessage();\n }\n }\n\n private handleNoPermissionErrorMessage(): void {\n const noPermissions =\n this.seriesWithoutPermissionToReadCount() === this.activeDataPoints().length;\n this.hasNoPermissionsToReadAnyMeasurement.set(noPermissions);\n\n if (noPermissions) {\n this.showMessageForMissingPermissionsForAllSeries();\n }\n }\n\n private showMessageForMissingPermissionsForAllSeries(): void {\n this.missingAllPermissionsAlert.addAlerts(\n new DynamicComponentAlert({\n allowHtml: true,\n text: gettext(`<p>To view data, you must meet at least one of these criteria:</p>\n <ul>\n <li>\n Have\n <b>READ permission for \"Measurements\" permission type</b>\n (either as a global role or for the specific source)\n </li>\n <li>\n Be the\n <b>owner of the source</b>\n you want to export data from\n </li>\n </ul>\n <p>Don't meet these requirements? Contact your system administrator for assistance.</p>`),\n type: 'system'\n })\n );\n }\n}\n","@if (!isInPreviewMode()) {\n <div class=\"d-flex gap-16 p-r-16 inner-scroll h-auto min-width-0\">\n @if (displayMode() === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {\n <c8y-global-context-connector\n [controls]=\"widgetControls()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n [dashboardChild]=\"getDashboardChild()!\"\n [linked]=\"isLinkedToGlobal()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-global-context-connector>\n } @else {\n <c8y-local-controls\n [controls]=\"widgetControls()\"\n [displayMode]=\"displayMode()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading()\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-local-controls>\n }\n </div>\n}\n\n@if (!isInPreviewMode() && exportConfig(); as config) {\n <c8y-widget-action>\n <c8y-datapoints-export-selector\n [displayMode]=\"'icon-only'\"\n [exportConfig]=\"config\"\n [containerClass]=\"'d-contents'\"\n (isOpen)=\"onExportModalOpen($event)\"\n ></c8y-datapoints-export-selector>\n </c8y-widget-action>\n}\n\n@if (!hasNoPermissionsToReadAnyMeasurement()) {\n <!-- the .page-sticky-header -->\n @if (dataPoints().length > 0) {\n <div class=\"hidden-xs hidden-sm c8y-list__item\">\n <div class=\"c8y-list__item__block flex-grow min-width-0\">\n <div class=\"c8y-list__item__icon\">\n <i style=\"width: 22px\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n <div\n [class]=\"\n column.id === 'kpi' || column.id === 'asset'\n ? 'col-md-3 flex-grow min-width-0'\n : column.id == 'diff' || column.id == 'diffPercentage'\n ? 'col-md-1 flex-grow min-width-0'\n : 'col-md-2 flex-grow min-width-0'\n \"\n [class.text-right]=\"column.id !== 'asset' && column.id !== 'kpi'\"\n >\n <span\n class=\"text-medium text-truncate\"\n translate\n >\n {{ column.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <!-- The record list -->\n @if (isLoading() && !hasLoadedOnce()) {\n <!-- Initial load: full spinner -->\n <ng-container [ngTemplateOutlet]=\"loading\"></ng-container>\n } @else {\n @if (isLoading()) {\n <!-- Refresh: inline loading overlay -->\n <div class=\"p-absolute fit-w overflow-hidden p-b-4\">\n <c8y-loading [layout]=\"'page'\"></c8y-loading>\n </div>\n }\n @if (dataPoints().length) {\n <c8y-list-group\n class=\"flex-grow\"\n role=\"list\"\n c8yVirtualScrollListener\n (scrolled)=\"onListScrolled()\"\n (scrolledToTop)=\"onListScrolledToTop()\"\n >\n <c8y-li\n role=\"listitem\"\n *c8yFor=\"\n let dp of { data: dataPoints(), res: null! };\n enableVirtualScroll: true;\n virtualScrollElementSize: 48;\n virtualScrollStrategy: 'fixed'\n \"\n >\n <c8y-li-icon>\n <i\n c8yIcon=\"circle\"\n [style.color]=\"dp.color\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex-md row\">\n @for (column of visibleColumns(); track column.id) {\n @switch (column.id) {\n @case ('kpi') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n {{ dp.label | translate }}\n @if (dp.unit) {\n <small class=\"text-muted\">{{ dp.unit }}</small>\n }\n </div>\n </div>\n }\n @case ('target') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>{{ dp.target }}</span>\n </div>\n </div>\n }\n @case ('current') {\n <div\n class=\"col-md-2 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span\n [class]=\"dp.currentValue | applyRangeClass: getRangeValues(dp)\"\n [title]=\"dp.timestamp | c8yDate: 'medium'\"\n [attr.aria-label]=\"\n ('Last updated: ' | translate) + (dp.timestamp | c8yDate: 'medium')\n \"\n >\n {{ dp.currentValue | number: dp.currentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diff') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffValue | number: dp.diffFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('diffPercentage') {\n <div\n class=\"col-md-1 text-right-md flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <span>\n {{ dp.diffPercentValue | number: dp.diffPercentFractionSize }}\n </span>\n </div>\n </div>\n }\n @case ('asset') {\n <div\n class=\"col-md-3 flex-grow\"\n [attr.data-cy]=\"'datapointlist-' + column.id\"\n >\n <div class=\"d-flex a-i-center d-contents-md p-t-4 p-b-4 separator-bottom\">\n <small\n class=\"text-label-small flex-grow visible-xs-inline-block visible-sm-inline-block\"\n >{{ column.label }}</small\n >\n <button\n class=\"btn-clean d-flex a-i-center gap-4 text-muted\"\n [attr.aria-label]=\"('Navigate to ' | translate) + dp.__target?.name\"\n type=\"button\"\n (click)=\"redirectToAsset(dp.__target?.id)\"\n >\n @if (dp.__target?.id && getTargetManagedObject(dp.__target.id); as mo) {\n <c8y-device-status\n [mo]=\"mo\"\n [size]=\"16\"\n ></c8y-device-status>\n }\n <small\n class=\"text-truncate\"\n [title]=\"dp.__target?.name\"\n >{{ dp.__target?.name }}</small\n >\n </button>\n </div>\n </div>\n }\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n </c8y-list-group>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n }\n} @else {\n <div class=\"p-t-24 p-r-16 p-l-16 p-b-16 d-flex\">\n <div class=\"center-block\">\n <c8y-dynamic-component-alerts\n [alerts]=\"missingAllPermissionsAlert\"\n ></c8y-dynamic-component-alerts>\n </div>\n </div>\n}\n\n<ng-template #loading>\n <c8y-loading></c8y-loading>\n</ng-template>\n\n<ng-template #emptyState>\n <div class=\"p-relative p-l-24\">\n <c8y-ui-empty-state\n [icon]=\"'c8y-alert-idle'\"\n [title]=\"'No data to display.' | translate\"\n [horizontal]=\"true\"\n data-cy=\"datapoints-list--empty-state\"\n >\n <p c8y-guide-docs>\n <small translate>\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/widgets-collection/#data-point-list\">\n user documentation\n </a>\n .\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n</ng-template>\n","import { CdkDragDrop, DragDropModule } from '@angular/cdk/drag-drop';\nimport { AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n OnInit,\n signal,\n TemplateRef,\n viewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AbstractControl,\n FormArray,\n FormBuilder,\n FormGroup,\n NgForm,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport {\n C8yTranslatePipe,\n DynamicComponentModule,\n FormGroupComponent,\n IconDirective,\n ListGroupModule\n} from '@c8y/ngx-components';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport {\n LocalControlsComponent,\n PRESET_NAME,\n PresetName\n} from '@c8y/ngx-components/global-context';\nimport { isEqual } from 'lodash-es';\nimport { debounceTime, distinctUntilChanged, filter, Observable, take } from 'rxjs';\nimport { DatapointsListViewComponent } from '../datapoints-list-view/datapoints-list-view.component';\nimport { ColumnConfig, DatapointsListConfig } from '../datapoints-list-widget.model';\nimport { DEFAULT_DATAPOINTS_LIST_COLUMNS } from '../datapoints-list.constants';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\n\nconst DEFAULT_DECIMAL_PLACES = 2;\nconst MIN_DECIMAL_PLACES = 0;\nconst MAX_DECIMAL_PLACES = 10;\n\n@Component({\n selector: 'c8y-datapoints-list-view-config',\n templateUrl: './datapoints-list-config.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n C8yTranslatePipe,\n DatapointsListViewComponent,\n DragDropModule,\n DynamicComponentModule,\n FormGroupComponent,\n IconDirective,\n ListGroupModule,\n LocalControlsComponent,\n ReactiveFormsModule,\n PopoverModule\n ]\n})\nexport class DatapointsListConfigComponent implements OnInit, AfterViewInit {\n config = input.required<DatapointsListConfig>();\n private readonly previewTemplate = viewChild<TemplateRef<unknown>>('dataPointsListPreview');\n\n private readonly defaultColumns = DEFAULT_DATAPOINTS_LIST_COLUMNS;\n private readonly destroyRef = inject(DestroyRef);\n private readonly form = inject(NgForm);\n private readonly formBuilder = inject(FormBuilder);\n private readonly widgetConfigService = inject(WidgetConfigService);\n\n readonly controls: PresetName = PRESET_NAME.DATA_POINTS_LIST;\n readonly minDecimalPlaces = MIN_DECIMAL_PLACES;\n readonly maxDecimalPlaces = MAX_DECIMAL_PLACES;\n configForm = signal<ReturnType<DatapointsListConfigComponent['createForm']> | undefined>(\n undefined\n );\n readonly columnsFormArray = computed(() => this.configForm()?.get('columns') as FormArray);\n\n /**\n * Debounced config for preview to prevent multiple series requests on initial load.\n * Uses debounceTime to batch rapid emissions (e.g., from initConfig + GlobalContext processing).\n */\n previewConfig$ = this.widgetConfigService.currentConfig$.pipe(\n filter(config => !!config?.dateTimeContext),\n debounceTime(300)\n ) as Observable<DatapointsListConfig>;\n\n ngOnInit(): void {\n this.widgetConfigService.currentConfig$\n .pipe(\n filter(config => !!config?.dateTimeContext),\n take(1),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.initForm());\n }\n\n ngAfterViewInit(): void {\n this.widgetConfigService.setPreview(this.previewTemplate() ?? null);\n }\n\n onColumnDrop(event: CdkDragDrop<ColumnConfig[]>): void {\n const columnsArray = this.columnsFormArray();\n const item = columnsArray.at(event.previousIndex);\n columnsArray.removeAt(event.previousIndex);\n columnsArray.insert(event.currentIndex, item);\n columnsArray.controls.forEach((control, index) => control.patchValue({ order: index }));\n }\n\n private initForm(): void {\n const form = this.createForm();\n this.form.form.addControl('config', form);\n form.patchValue(this.config(), { emitEvent: false });\n\n this.pushFormToService(form.value);\n\n form.valueChanges\n .pipe(\n distinctUntilChanged((prev, curr) => isEqual(prev, curr)),\n debounceTime(300),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(formValue => {\n if (form.invalid) {\n return;\n }\n\n const { decimalPlaces } = formValue;\n if (\n typeof decimalPlaces === 'number' &&\n (decimalPlaces < MIN_DECIMAL_PLACES || decimalPlaces > MAX_DECIMAL_PLACES)\n ) {\n return;\n }\n\n this.pushFormToService(formValue);\n });\n\n this.configForm.set(form);\n }\n\n private pushFormToService(formValue: unknown): void {\n const formData = formValue as { columns?: ColumnConfig[]; [key: string]: unknown };\n const { columns, ...formValueWithoutColumns } = formData;\n const currentOptions = this.widgetConfigService.currentConfig?.options;\n this.widgetConfigService.updateConfig({\n ...formValueWithoutColumns,\n options: {\n ...currentOptions,\n columns: columns || []\n }\n });\n }\n\n private createForm() {\n const currentConfig = this.config();\n const columns = this.migrateColumnsConfig(currentConfig);\n\n return this.formBuilder.group({\n decimalPlaces: [\n currentConfig?.decimalPlaces ?? DEFAULT_DECIMAL_PLACES,\n [\n Validators.required,\n Validators.min(MIN_DECIMAL_PLACES),\n Validators.max(MAX_DECIMAL_PLACES),\n Validators.pattern('^[0-9]+$')\n ]\n ],\n columns: this.formBuilder.array(\n columns.map(col => this.createColumnFormGroup(col)),\n [Validators.required, Validators.minLength(1), this.minOneColumnVisible()]\n )\n });\n }\n\n private createColumnFormGroup(column: ColumnConfig): FormGroup {\n return this.formBuilder.group({\n id: [column.id, Validators.required],\n label: [column.label, Validators.required],\n visible: [column.visible],\n order: [column.order]\n });\n }\n\n private migrateColumnsConfig(config: DatapointsListConfig): ColumnConfig[] {\n if (config?.options?.columns?.length > 0) {\n return [...config.options.columns].sort((a, b) => a.order - b.order);\n }\n\n return this.defaultColumns.map(defaultCol => ({\n ...defaultCol,\n visible: config?.options?.[defaultCol.id] ?? defaultCol.visible\n }));\n }\n\n private minOneColumnVisible(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const columns: ColumnConfig[] = control.value;\n\n if (!columns?.length) {\n return null;\n }\n\n const visibleColumns = columns.filter(column => column.visible);\n return visibleColumns.length >= 1 ? null : { atLeastOneColumnMustBeVisible: true };\n };\n }\n}\n","@if (configForm(); as form) {\n <form\n class=\"no-card-context\"\n [formGroup]=\"form\"\n >\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Columns (drag to reorder)' | translate }}</legend>\n <c8y-list-group\n formArrayName=\"columns\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (columnsFormArray().errors?.atLeastOneColumnMustBeVisible) {\n <div\n class=\"alert alert-warning m-t-8\"\n role=\"alert\"\n >\n {{ 'At least 1 column must be visible.' | translate }}\n </div>\n }\n\n @for (column of columnsFormArray().controls; track column.value.id; let i = $index) {\n <c8y-li\n class=\"c8y-list__item__collapse--container-small\"\n [formGroupName]=\"i\"\n cdkDrag\n >\n <c8y-li-drag-handle\n [title]=\"'Click and drag to reorder' | translate\"\n cdkDragHandle\n >\n <i c8yIcon=\"drag-reorder\"></i>\n </c8y-li-drag-handle>\n <c8y-li-checkbox\n class=\"a-s-center p-r-0\"\n [displayAsSwitch]=\"true\"\n formControlName=\"visible\"\n (click)=\"$event.stopPropagation()\"\n ></c8y-li-checkbox>\n <c8y-li-body>\n <div class=\"d-flex a-i-center\">\n <span class=\"text-truncate\">{{ column.value.label | translate }}</span>\n @switch (column.value.label) {\n @case ('Target') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Target column shows the value set on the target field of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n @case ('Diff') {\n <button\n class=\"btn-help\"\n [attr.aria-label]=\"'Help content' | translate\"\n [popover]=\"\n 'The Diff column shows the difference between the current value and the target value of the data point'\n | translate\n \"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n ></button>\n }\n }\n </div>\n </c8y-li-body>\n </c8y-li>\n }\n </c8y-list-group>\n </fieldset>\n\n <!-- decimal input -->\n <fieldset class=\"c8y-fieldset\">\n <legend>\n {{ 'Decimal places' | translate }}\n </legend>\n <c8y-form-group class=\"p-t-8\">\n <input\n class=\"form-control\"\n name=\"decimalPlaces\"\n type=\"number\"\n formControlName=\"decimalPlaces\"\n step=\"1\"\n [min]=\"minDecimalPlaces\"\n [max]=\"maxDecimalPlaces\"\n />\n </c8y-form-group>\n </fieldset>\n </form>\n}\n\n<ng-template #dataPointsListPreview>\n @let previewConfig = previewConfig$ | async;\n @if (previewConfig && previewConfig.displayMode !== 'dashboard') {\n <c8y-local-controls\n [controls]=\"controls\"\n [displayMode]=\"previewConfig.displayMode!\"\n [config]=\"previewConfig\"\n [disabled]=\"true\"\n ></c8y-local-controls>\n }\n\n @if (previewConfig) {\n <c8y-datapoints-list\n [config]=\"previewConfig\"\n [isInPreviewMode]=\"true\"\n data-cy=\"c8y-datapoints-list-widget-config--preview-datapoints-list\"\n ></c8y-datapoints-list>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;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