@c8y/ngx-components 1023.77.1 → 1023.78.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/alarms/cockpit/index.d.ts.map +1 -1
- package/alarms/devicemanagement/index.d.ts.map +1 -1
- package/alarms/index.d.ts +2 -25
- package/alarms/index.d.ts.map +1 -1
- package/asset-properties/index.d.ts.map +1 -1
- package/exports/list/index.d.ts +7 -4
- package/exports/list/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +11 -6
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs +11 -37
- package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +16 -57
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +7 -5
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +2 -2
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-exports-list.mjs +35 -10
- package/fesm2022/c8y-ngx-components-exports-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +40 -0
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs +3 -5
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +8 -5
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +26 -8
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +8 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +57 -42
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +11 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts +2 -0
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/locales/de.po +6 -9
- package/locales/es.po +3 -6
- package/locales/fr.po +3 -6
- package/locales/ja_JP.po +3 -6
- package/locales/ko.po +3 -6
- package/locales/locales.pot +9 -0
- package/locales/nl.po +3 -6
- package/locales/pl.po +3 -6
- package/locales/pt_BR.po +3 -6
- package/locales/zh_CN.po +3 -6
- package/locales/zh_TW.po +3 -6
- package/package.json +1 -1
- package/widgets/definitions/datapoints-table/index.d.ts +1 -2
- package/widgets/definitions/datapoints-table/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/asset-table/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-graph/index.d.ts +1 -0
- package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/index.d.ts +16 -8
- package/widgets/implementations/datapoints-table/index.d.ts.map +1 -1
- package/widgets/implementations/device-management-welcome/index.d.ts +2 -3
- package/widgets/implementations/device-management-welcome/index.d.ts.map +1 -1
- package/widgets/implementations/html-widget/index.d.ts +2 -0
- package/widgets/implementations/html-widget/index.d.ts.map +1 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Pipe, Input, Directive, EventEmitter, Output, ChangeDetectionStrategy, Component, signal,
|
|
2
|
+
import { Injectable, Pipe, Input, Directive, EventEmitter, Output, ChangeDetectionStrategy, Component, signal, Optional, inject, DestroyRef, ViewChild } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import * as i2$1 from '@angular/forms';
|
|
5
|
-
import {
|
|
5
|
+
import { FormBuilder, NgForm, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
6
6
|
import * as i1$2 from '@c8y/ngx-components';
|
|
7
7
|
import { DynamicComponentAlertAggregator, DynamicComponentAlert, CommonModule, DocsModule, DynamicComponentModule, ListGroupModule, VirtualScrollListenerDirective, ApplyRangeClassPipe, DismissAlertStrategy, CoreModule } from '@c8y/ngx-components';
|
|
8
8
|
import * as i4 from '@c8y/ngx-components/context-dashboard';
|
|
9
9
|
import { WidgetConfigComponent, WidgetConfigService } from '@c8y/ngx-components/context-dashboard';
|
|
10
10
|
import { DatapointSelectorModule } from '@c8y/ngx-components/datapoint-selector';
|
|
11
11
|
import * as i5 from '@c8y/ngx-components/global-context';
|
|
12
|
-
import { REFRESH_OPTION,
|
|
12
|
+
import { GLOBAL_CONTEXT_DISPLAY_MODE, PRESET_NAME, REFRESH_OPTION, GlobalContextConnectorComponent, LocalControlsComponent, AGGREGATION_LABELS, AGGREGATION_VALUES_ARR } from '@c8y/ngx-components/global-context';
|
|
13
13
|
import { INTERVAL_VALUES } from '@c8y/ngx-components/interval-picker';
|
|
14
14
|
import { PopoverModule } from 'ngx-bootstrap/popover';
|
|
15
15
|
import { auditTime, debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
16
|
+
import * as i2 from '@angular/common';
|
|
17
|
+
import { AsyncPipe } from '@angular/common';
|
|
16
18
|
import { gettext } from '@c8y/ngx-components/gettext';
|
|
17
19
|
import * as i1 from '@c8y/ngx-components/datapoints-export-selector';
|
|
18
20
|
import { DatapointsExportSelectorComponent } from '@c8y/ngx-components/datapoints-export-selector';
|
|
@@ -20,7 +22,6 @@ import * as i1$1 from '@ngx-translate/core';
|
|
|
20
22
|
import { merge } from 'lodash-es';
|
|
21
23
|
import { BehaviorSubject, Subject, debounceTime } from 'rxjs';
|
|
22
24
|
import { aggregationType } from '@c8y/client';
|
|
23
|
-
import * as i2 from '@angular/common';
|
|
24
25
|
|
|
25
26
|
const DEFAULT_DPT_REFRESH_INTERVAL_VALUE = 30_000;
|
|
26
27
|
/**
|
|
@@ -847,8 +848,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
847
848
|
}] } });
|
|
848
849
|
|
|
849
850
|
class DatapointsTableViewWidgetComponent {
|
|
850
|
-
constructor(alertService, datapointsTableViewService, translateService, dashboardContextComponent, widgetConfigMigrationService) {
|
|
851
|
+
constructor(alertService, dashboardChild, datapointsTableViewService, translateService, dashboardContextComponent, widgetConfigMigrationService) {
|
|
851
852
|
this.alertService = alertService;
|
|
853
|
+
this.dashboardChild = dashboardChild;
|
|
852
854
|
this.datapointsTableViewService = datapointsTableViewService;
|
|
853
855
|
this.translateService = translateService;
|
|
854
856
|
this.dashboardContextComponent = dashboardContextComponent;
|
|
@@ -882,9 +884,11 @@ class DatapointsTableViewWidgetComponent {
|
|
|
882
884
|
*/
|
|
883
885
|
this.isLoading$ = new BehaviorSubject(true);
|
|
884
886
|
this.isScrolling = signal(false, ...(ngDevMode ? [{ debugName: "isScrolling" }] : []));
|
|
885
|
-
this.
|
|
886
|
-
|
|
887
|
-
};
|
|
887
|
+
this.displayMode = signal(GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD, ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
|
|
888
|
+
this.contextConfig = signal({}, ...(ngDevMode ? [{ debugName: "contextConfig" }] : []));
|
|
889
|
+
this.isLinkedToGlobal = signal(undefined, ...(ngDevMode ? [{ debugName: "isLinkedToGlobal" }] : []));
|
|
890
|
+
this.widgetControls = signal(PRESET_NAME.DATA_TABLE, ...(ngDevMode ? [{ debugName: "widgetControls" }] : []));
|
|
891
|
+
this.GLOBAL_CONTEXT_DISPLAY_MODE = GLOBAL_CONTEXT_DISPLAY_MODE;
|
|
888
892
|
this.TIMEOUT_ERROR_TEXT = gettext('The request is taking longer than usual. We apologize for the inconvenience.');
|
|
889
893
|
this.SERVER_ERROR_TEXT = gettext('Server error occurred.');
|
|
890
894
|
this.destroy$ = new Subject();
|
|
@@ -902,6 +906,20 @@ class DatapointsTableViewWidgetComponent {
|
|
|
902
906
|
this.setScrollingSubscription();
|
|
903
907
|
const migratedConfig = this.widgetConfigMigrationService.migrateWidgetConfig(this.config);
|
|
904
908
|
this.config = merge(this.config, migratedConfig);
|
|
909
|
+
const displayMode = this.config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;
|
|
910
|
+
this.displayMode.set(displayMode);
|
|
911
|
+
const initialContextConfig = {
|
|
912
|
+
dateTimeContext: this.config.dateTimeContext,
|
|
913
|
+
aggregation: this.config.aggregation,
|
|
914
|
+
isAutoRefreshEnabled: this.config.isAutoRefreshEnabled,
|
|
915
|
+
refreshInterval: this.config.refreshInterval,
|
|
916
|
+
refreshOption: this.config.refreshOption
|
|
917
|
+
};
|
|
918
|
+
this.contextConfig.set(initialContextConfig);
|
|
919
|
+
if (displayMode !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
|
|
920
|
+
await this.prepareTableData(false);
|
|
921
|
+
this.updateExportConfig();
|
|
922
|
+
}
|
|
905
923
|
}
|
|
906
924
|
async ngOnChanges() {
|
|
907
925
|
if (this.isInPreviewMode) {
|
|
@@ -919,32 +937,34 @@ class DatapointsTableViewWidgetComponent {
|
|
|
919
937
|
this.destroy$.next();
|
|
920
938
|
this.destroy$.complete();
|
|
921
939
|
}
|
|
922
|
-
|
|
923
|
-
const { context, diff } =
|
|
940
|
+
onContextChange(event) {
|
|
941
|
+
const { context, diff } = event;
|
|
924
942
|
this.config = { ...this.config, ...context, dateTimeContext: { ...context.dateTimeContext } };
|
|
925
943
|
// Allows widget to load on old version of dashboard
|
|
926
944
|
if (context?.dateTimeContext?.interval !== undefined) {
|
|
927
945
|
this.config = merge(this.config, { interval: context.dateTimeContext.interval });
|
|
928
946
|
}
|
|
929
|
-
|
|
947
|
+
this.contextConfig.set(context);
|
|
948
|
+
// Prevent fetching data after disableAutoRefresh handler was triggered
|
|
930
949
|
if (diff.isAutoRefreshEnabled === false &&
|
|
931
950
|
Object.keys(diff).length === 1 &&
|
|
932
951
|
context.refreshOption === REFRESH_OPTION.LIVE) {
|
|
933
952
|
return;
|
|
934
953
|
}
|
|
935
|
-
|
|
954
|
+
void this.prepareTableData(false);
|
|
955
|
+
this.updateExportConfig();
|
|
956
|
+
}
|
|
957
|
+
onRefresh() {
|
|
958
|
+
void this.prepareTableData(false);
|
|
936
959
|
this.updateExportConfig();
|
|
937
960
|
}
|
|
938
961
|
async onExportModalOpen(isOpened) {
|
|
939
962
|
if (this.isInPreviewMode) {
|
|
940
963
|
return;
|
|
941
964
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
else {
|
|
946
|
-
this.globalContextWidgetWrapperComponent.resumeAutoRefresh();
|
|
947
|
-
}
|
|
965
|
+
const current = this.contextConfig();
|
|
966
|
+
this.contextConfig.set({ ...current, isAutoRefreshEnabled: !isOpened });
|
|
967
|
+
this.isLinkedToGlobal.set(!isOpened);
|
|
948
968
|
}
|
|
949
969
|
onScrolling(isScrolling) {
|
|
950
970
|
if (this.isInPreviewMode) {
|
|
@@ -953,15 +973,12 @@ class DatapointsTableViewWidgetComponent {
|
|
|
953
973
|
if (this.config.refreshOption === REFRESH_OPTION.HISTORY) {
|
|
954
974
|
return;
|
|
955
975
|
}
|
|
956
|
-
if (
|
|
957
|
-
|
|
958
|
-
return;
|
|
959
|
-
}
|
|
960
|
-
this.globalContextWidgetWrapperComponent.pauseAutoRefresh();
|
|
961
|
-
}
|
|
962
|
-
else {
|
|
963
|
-
this.globalContextWidgetWrapperComponent.resumeAutoRefresh();
|
|
976
|
+
if (this.config.isAutoRefreshEnabled === false) {
|
|
977
|
+
return;
|
|
964
978
|
}
|
|
979
|
+
const current = this.contextConfig();
|
|
980
|
+
this.contextConfig.set({ ...current, isAutoRefreshEnabled: !isScrolling });
|
|
981
|
+
this.isLinkedToGlobal.set(!isScrolling);
|
|
965
982
|
}
|
|
966
983
|
/**
|
|
967
984
|
* Sets up the scrolling subscription.
|
|
@@ -1128,24 +1145,24 @@ class DatapointsTableViewWidgetComponent {
|
|
|
1128
1145
|
datapoint.__target = { name, id };
|
|
1129
1146
|
}
|
|
1130
1147
|
}
|
|
1131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatapointsTableViewWidgetComponent, deps: [{ token: i1$2.AlertService }, { token: DatapointsTableViewService }, { token: i1$1.TranslateService }, { token: i4.ContextDashboardComponent, optional: true }, { token: i5.WidgetConfigMigrationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatapointsTableViewWidgetComponent, deps: [{ token: i1$2.AlertService }, { token: i1$2.DashboardChildComponent, optional: true }, { token: DatapointsTableViewService }, { token: i1$1.TranslateService }, { token: i4.ContextDashboardComponent, optional: true }, { token: i5.WidgetConfigMigrationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DatapointsTableViewWidgetComponent, isStandalone: true, selector: "c8y-datapoints-table-view", inputs: { config: "config", isInPreviewMode: "isInPreviewMode" }, host: { classAttribute: "d-col fit-h" }, usesOnChanges: true, ngImport: i0, template: "@if (!isInPreviewMode) {\n @if (displayMode() === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {\n <c8y-global-context-connector\n [controls]=\"widgetControls()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading$ | async\"\n [dashboardChild]=\"dashboardChild\"\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$ | async\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-local-controls>\n }\n\n <c8y-datapoints-export-selector\n class=\"m-l-auto p-b-8\"\n [containerClass]=\"containerClass\"\n [exportConfig]=\"exportConfig\"\n (isOpen)=\"onExportModalOpen($event)\"\n ></c8y-datapoints-export-selector>\n}\n@if (devicesColumnHeaders) {\n <c8y-datapoints-table\n [aggregationType]=\"config.aggregation\"\n [datapointsTableItems]=\"datapointsTableItems\"\n [decimalPlaces]=\"config.decimalPlaces\"\n [devicesColumnHeaders]=\"devicesColumnHeaders\"\n [hasMultipleDatapoints]=\"hasMultipleDatapoints\"\n [isLoading]=\"isLoading$ | async\"\n [seriesWithoutPermissionToReadCount]=\"seriesWithoutPermissionToRead?.length\"\n (isScrolling)=\"onScrolling($event)\"\n ></c8y-datapoints-table>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["displayMode", "containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: DatapointsTableComponent, selector: "c8y-datapoints-table", inputs: ["aggregationType", "datapointsTableItems", "devicesColumnHeaders", "decimalPlaces", "hasMultipleDatapoints", "isLoading", "seriesWithoutPermissionToReadCount"], outputs: ["isScrolling"] }, { kind: "component", type: GlobalContextConnectorComponent, selector: "c8y-global-context-connector", inputs: ["controls", "config", "isLoading", "dashboardChild", "linked", "emitRefresh"], outputs: ["configChange", "refresh", "linkedChange"] }, { kind: "component", type: LocalControlsComponent, selector: "c8y-local-controls", inputs: ["controls", "displayMode", "config", "isLoading", "disabled", "emitRefresh"], outputs: ["configChange", "refresh"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
1133
1150
|
}
|
|
1134
1151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatapointsTableViewWidgetComponent, decorators: [{
|
|
1135
1152
|
type: Component,
|
|
1136
1153
|
args: [{ selector: 'c8y-datapoints-table-view', host: { class: 'd-col fit-h' }, standalone: true, imports: [
|
|
1154
|
+
AsyncPipe,
|
|
1137
1155
|
CommonModule,
|
|
1138
1156
|
DatapointsExportSelectorComponent,
|
|
1139
1157
|
DatapointsTableComponent,
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
], template: "
|
|
1143
|
-
}], ctorParameters: () => [{ type: i1$2.AlertService }, { type:
|
|
1158
|
+
GlobalContextConnectorComponent,
|
|
1159
|
+
LocalControlsComponent
|
|
1160
|
+
], template: "@if (!isInPreviewMode) {\n @if (displayMode() === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {\n <c8y-global-context-connector\n [controls]=\"widgetControls()\"\n [config]=\"contextConfig()\"\n [isLoading]=\"isLoading$ | async\"\n [dashboardChild]=\"dashboardChild\"\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$ | async\"\n (configChange)=\"onContextChange($event)\"\n (refresh)=\"onRefresh()\"\n ></c8y-local-controls>\n }\n\n <c8y-datapoints-export-selector\n class=\"m-l-auto p-b-8\"\n [containerClass]=\"containerClass\"\n [exportConfig]=\"exportConfig\"\n (isOpen)=\"onExportModalOpen($event)\"\n ></c8y-datapoints-export-selector>\n}\n@if (devicesColumnHeaders) {\n <c8y-datapoints-table\n [aggregationType]=\"config.aggregation\"\n [datapointsTableItems]=\"datapointsTableItems\"\n [decimalPlaces]=\"config.decimalPlaces\"\n [devicesColumnHeaders]=\"devicesColumnHeaders\"\n [hasMultipleDatapoints]=\"hasMultipleDatapoints\"\n [isLoading]=\"isLoading$ | async\"\n [seriesWithoutPermissionToReadCount]=\"seriesWithoutPermissionToRead?.length\"\n (isScrolling)=\"onScrolling($event)\"\n ></c8y-datapoints-table>\n}\n" }]
|
|
1161
|
+
}], ctorParameters: () => [{ type: i1$2.AlertService }, { type: i1$2.DashboardChildComponent, decorators: [{
|
|
1144
1162
|
type: Optional
|
|
1145
|
-
}] }, { type:
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
}], config: [{
|
|
1163
|
+
}] }, { type: DatapointsTableViewService }, { type: i1$1.TranslateService }, { type: i4.ContextDashboardComponent, decorators: [{
|
|
1164
|
+
type: Optional
|
|
1165
|
+
}] }, { type: i5.WidgetConfigMigrationService }], propDecorators: { config: [{
|
|
1149
1166
|
type: Input
|
|
1150
1167
|
}], isInPreviewMode: [{
|
|
1151
1168
|
type: Input
|
|
@@ -1178,9 +1195,7 @@ class DatapointsTableWidgetConfigComponent {
|
|
|
1178
1195
|
showRedRange: true,
|
|
1179
1196
|
showYellowRange: true
|
|
1180
1197
|
};
|
|
1181
|
-
this.widgetControls =
|
|
1182
|
-
presets: ['defaultWithAggregation']
|
|
1183
|
-
};
|
|
1198
|
+
this.widgetControls = PRESET_NAME.DATA_TABLE;
|
|
1184
1199
|
/**
|
|
1185
1200
|
* Debounced config for preview to prevent multiple series requests on initial load.
|
|
1186
1201
|
* Uses auditTime to batch rapid emissions (e.g., from initConfig + GlobalContext processing).
|
|
@@ -1234,7 +1249,7 @@ class DatapointsTableWidgetConfigComponent {
|
|
|
1234
1249
|
});
|
|
1235
1250
|
}
|
|
1236
1251
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatapointsTableWidgetConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1237
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DatapointsTableWidgetConfigComponent, isStandalone: true, selector: "c8y-datapoints-table-view-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "previewMapSet", first: true, predicate: ["datapointsTablePreview"], descendants: true }], ngImport: i0, template: "<div class=\"p-l-24 p-r-24\">\n @if (formGroup) {\n <form [formGroup]=\"formGroup\">\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 />\n </c8y-form-group>\n </fieldset>\n </form>\n }\n</div>\n\n<ng-template #datapointsTablePreview>\n @let previewConfig = previewConfig$ | async;\n\n @if (previewConfig?.datapoints?.length > 0) {\n <c8y-
|
|
1252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: DatapointsTableWidgetConfigComponent, isStandalone: true, selector: "c8y-datapoints-table-view-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "previewMapSet", first: true, predicate: ["datapointsTablePreview"], descendants: true }], ngImport: i0, template: "<div class=\"p-l-24 p-r-24\">\n @if (formGroup) {\n <form [formGroup]=\"formGroup\">\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 />\n </c8y-form-group>\n </fieldset>\n </form>\n }\n</div>\n\n<ng-template #datapointsTablePreview>\n @let previewConfig = previewConfig$ | async;\n\n @if (previewConfig?.datapoints?.length > 0) {\n @if (previewConfig?.displayMode !== 'dashboard') {\n <c8y-local-controls\n [controls]=\"widgetControls\"\n [displayMode]=\"previewConfig?.displayMode\"\n [config]=\"previewConfig\"\n [disabled]=\"true\"\n ></c8y-local-controls>\n }\n <c8y-datapoints-table-view\n [config]=\"previewConfig\"\n [isInPreviewMode]=\"true\"\n ></c8y-datapoints-table-view>\n } @else {\n <div class=\"col-md-6 d-col a-i-start j-c-center\">\n <c8y-ui-empty-state\n [icon]=\"'c8y-data-points'\"\n [title]=\"'No data points selected' | translate\"\n [subtitle]=\"'Select data point to render content' | translate\"\n [horizontal]=\"false\"\n data-cy=\"datapoints-table-list--empty-state-no-data-point-selected\"\n >\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/widgets-collection/#data-point-table\">\n user documentation</a\n >.\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1$2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1$2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i1$2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i1$2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1$2.GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: i1$2.GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: DatapointsTableViewWidgetComponent, selector: "c8y-datapoints-table-view", inputs: ["config", "isInPreviewMode"] }, { kind: "component", type: LocalControlsComponent, selector: "c8y-local-controls", inputs: ["controls", "displayMode", "config", "isLoading", "disabled", "emitRefresh"], outputs: ["configChange", "refresh"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: i1$2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
1238
1253
|
}
|
|
1239
1254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: DatapointsTableWidgetConfigComponent, decorators: [{
|
|
1240
1255
|
type: Component,
|
|
@@ -1242,10 +1257,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1242
1257
|
CoreModule,
|
|
1243
1258
|
DatapointSelectorModule,
|
|
1244
1259
|
DatapointsTableViewWidgetComponent,
|
|
1245
|
-
|
|
1260
|
+
LocalControlsComponent,
|
|
1246
1261
|
PopoverModule,
|
|
1247
1262
|
ReactiveFormsModule
|
|
1248
|
-
], template: "<div class=\"p-l-24 p-r-24\">\n @if (formGroup) {\n <form [formGroup]=\"formGroup\">\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 />\n </c8y-form-group>\n </fieldset>\n </form>\n }\n</div>\n\n<ng-template #datapointsTablePreview>\n @let previewConfig = previewConfig$ | async;\n\n @if (previewConfig?.datapoints?.length > 0) {\n <c8y-
|
|
1263
|
+
], template: "<div class=\"p-l-24 p-r-24\">\n @if (formGroup) {\n <form [formGroup]=\"formGroup\">\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 />\n </c8y-form-group>\n </fieldset>\n </form>\n }\n</div>\n\n<ng-template #datapointsTablePreview>\n @let previewConfig = previewConfig$ | async;\n\n @if (previewConfig?.datapoints?.length > 0) {\n @if (previewConfig?.displayMode !== 'dashboard') {\n <c8y-local-controls\n [controls]=\"widgetControls\"\n [displayMode]=\"previewConfig?.displayMode\"\n [config]=\"previewConfig\"\n [disabled]=\"true\"\n ></c8y-local-controls>\n }\n <c8y-datapoints-table-view\n [config]=\"previewConfig\"\n [isInPreviewMode]=\"true\"\n ></c8y-datapoints-table-view>\n } @else {\n <div class=\"col-md-6 d-col a-i-start j-c-center\">\n <c8y-ui-empty-state\n [icon]=\"'c8y-data-points'\"\n [title]=\"'No data points selected' | translate\"\n [subtitle]=\"'Select data point to render content' | translate\"\n [horizontal]=\"false\"\n data-cy=\"datapoints-table-list--empty-state-no-data-point-selected\"\n >\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"/docs/cockpit/widgets-collection/#data-point-table\">\n user documentation</a\n >.\n </small>\n </p>\n </c8y-ui-empty-state>\n </div>\n }\n</ng-template>\n" }]
|
|
1249
1264
|
}], propDecorators: { previewMapSet: [{
|
|
1250
1265
|
type: ViewChild,
|
|
1251
1266
|
args: ['datapointsTablePreview']
|