@c8y/ngx-components 1023.48.3 → 1023.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset-properties/index.d.ts +1 -2
- package/asset-properties/index.d.ts.map +1 -1
- package/context-dashboard/index.d.ts.map +1 -1
- package/datapoint-explorer/view/index.d.ts +8 -0
- package/datapoint-explorer/view/index.d.ts.map +1 -1
- package/datapoint-selector/index.d.ts +14 -1
- package/datapoint-selector/index.d.ts.map +1 -1
- package/echart/index.d.ts +7 -2
- package/echart/index.d.ts.map +1 -1
- package/echart/models/index.d.ts +1 -0
- package/echart/models/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +3 -4
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -3
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +33 -4
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +24 -7
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +128 -52
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +7 -2
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-table.mjs +127 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-table.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs +1 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +1959 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +90 -56
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1724 -1464
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts +1 -0
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +1453 -1339
- package/index.d.ts.map +1 -1
- package/locales/de.po +213 -3
- package/locales/es.po +213 -3
- package/locales/fr.po +213 -3
- package/locales/ja_JP.po +213 -3
- package/locales/ko.po +213 -3
- package/locales/locales.pot +219 -3
- package/locales/nl.po +213 -3
- package/locales/pl.po +213 -3
- package/locales/pt_BR.po +213 -3
- package/locales/zh_CN.po +213 -3
- package/locales/zh_TW.po +213 -3
- package/package.json +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/definitions/asset-table/index.d.ts +6 -0
- package/widgets/definitions/asset-table/index.d.ts.map +1 -0
- package/widgets/definitions/index.d.ts +1 -0
- package/widgets/definitions/index.d.ts.map +1 -1
- package/widgets/device-management-exports/index.d.ts +6 -0
- package/widgets/device-management-exports/index.d.ts.map +1 -1
- package/widgets/exports/index.d.ts +8 -1
- package/widgets/exports/index.d.ts.map +1 -1
- package/widgets/implementations/asset-table/index.d.ts +229 -0
- package/widgets/implementations/asset-table/index.d.ts.map +1 -0
- package/widgets/implementations/datapoints-graph/index.d.ts +14 -3
- package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
|
@@ -10,6 +10,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
10
10
|
import * as i2$1 from '@angular/forms';
|
|
11
11
|
import { FormBuilder, FormsModule, ReactiveFormsModule, FormControl, FormGroup, Validators } from '@angular/forms';
|
|
12
12
|
import { Router, ActivatedRoute, NavigationStart } from '@angular/router';
|
|
13
|
+
import { InventoryService, MeasurementService } from '@c8y/client';
|
|
13
14
|
import * as i4$1 from '@c8y/ngx-components/alarm-event-selector';
|
|
14
15
|
import { AlarmEventSelectorModule } from '@c8y/ngx-components/alarm-event-selector';
|
|
15
16
|
import * as i1 from '@c8y/ngx-components/context-dashboard';
|
|
@@ -28,8 +29,7 @@ import { PopoverModule } from 'ngx-bootstrap/popover';
|
|
|
28
29
|
import { INTERVALS } from '@c8y/ngx-components/interval-picker';
|
|
29
30
|
import { TimeContextComponent } from '@c8y/ngx-components/time-context';
|
|
30
31
|
import { BsModalService } from 'ngx-bootstrap/modal';
|
|
31
|
-
import { firstValueFrom, merge, of, map as map$1 } from 'rxjs';
|
|
32
|
-
import { InventoryService } from '@c8y/client';
|
|
32
|
+
import { firstValueFrom, merge, of, map as map$1, filter, take } from 'rxjs';
|
|
33
33
|
import * as i3 from '@angular/common';
|
|
34
34
|
import { ReportDashboardModule, ReportDashboardService } from '@c8y/ngx-components/report-dashboard';
|
|
35
35
|
import { map } from 'rxjs/operators';
|
|
@@ -813,7 +813,8 @@ class DatapointExplorerComponent {
|
|
|
813
813
|
this.canAddReport = false;
|
|
814
814
|
this.datapointSelectDefaultFormOptions = {
|
|
815
815
|
showRange: true,
|
|
816
|
-
showChart: true
|
|
816
|
+
showChart: true,
|
|
817
|
+
showAdvancedChartOptions: false
|
|
817
818
|
};
|
|
818
819
|
/** Flag to skip onTimeContextChange during zoom handling */
|
|
819
820
|
this.isHandlingZoom = false;
|
|
@@ -835,6 +836,7 @@ class DatapointExplorerComponent {
|
|
|
835
836
|
this.chartHelpersService = inject(ChartHelpersService);
|
|
836
837
|
this.gainsightService = inject(GainsightService);
|
|
837
838
|
this.datapointSyncService = inject(DatapointSyncService);
|
|
839
|
+
this.measurementService = inject(MeasurementService);
|
|
838
840
|
this.formGroup = this.initForm();
|
|
839
841
|
this.settings$ = this.activatedRoute.data.pipe(map$1(data => data.settings));
|
|
840
842
|
}
|
|
@@ -857,6 +859,13 @@ class DatapointExplorerComponent {
|
|
|
857
859
|
aggregation: this.config.aggregation
|
|
858
860
|
};
|
|
859
861
|
}
|
|
862
|
+
this.formGroup.controls.datapoints.valueChanges
|
|
863
|
+
.pipe(takeUntilDestroyed(this.#destroyRef), filter(value => value.length > 0), take(1))
|
|
864
|
+
.subscribe(async (value) => {
|
|
865
|
+
const isMigrated = await this.detectTimeSeriesMigration(value[0]);
|
|
866
|
+
this.datapointSelectDefaultFormOptions.showAdvancedChartOptions = isMigrated;
|
|
867
|
+
this.formGroup.patchValue({ showAdvancedChartOptions: isMigrated }, { emitEvent: false });
|
|
868
|
+
});
|
|
860
869
|
this.formGroup.valueChanges
|
|
861
870
|
.pipe(takeUntilDestroyed(this.#destroyRef))
|
|
862
871
|
.subscribe(configChange => {
|
|
@@ -1103,6 +1112,25 @@ class DatapointExplorerComponent {
|
|
|
1103
1112
|
// else: modal was closed
|
|
1104
1113
|
}
|
|
1105
1114
|
}
|
|
1115
|
+
/**
|
|
1116
|
+
* DEPRECATED: to be removed when there is another way to identify time series migration.
|
|
1117
|
+
* This method checks if the tenant is migrated to time series by making a call to measurement detail endpoint.
|
|
1118
|
+
* If the endpoint returns 405, it means the tenant is migrated. This is a workaround for now until we have a
|
|
1119
|
+
* better way to identify time series migration.
|
|
1120
|
+
*/
|
|
1121
|
+
async detectTimeSeriesMigration(firstDp) {
|
|
1122
|
+
const targetId = firstDp?.__target?.id;
|
|
1123
|
+
if (!targetId) {
|
|
1124
|
+
return false;
|
|
1125
|
+
}
|
|
1126
|
+
try {
|
|
1127
|
+
await this.measurementService.detail(targetId);
|
|
1128
|
+
return false;
|
|
1129
|
+
}
|
|
1130
|
+
catch (err) {
|
|
1131
|
+
return err?.res?.status === 405;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1106
1134
|
isActualDate(val) {
|
|
1107
1135
|
if (!val)
|
|
1108
1136
|
return false;
|
|
@@ -1188,7 +1216,8 @@ class DatapointExplorerComponent {
|
|
|
1188
1216
|
displayDateSelection: [false, []],
|
|
1189
1217
|
yAxisSplitLines: [false],
|
|
1190
1218
|
xAxisSplitLines: [false],
|
|
1191
|
-
numberOfDecimalPlaces: [2, [Validators.required, Validators.min(0), Validators.max(10)]]
|
|
1219
|
+
numberOfDecimalPlaces: [2, [Validators.required, Validators.min(0), Validators.max(10)]],
|
|
1220
|
+
showAdvancedChartOptions: [false]
|
|
1192
1221
|
});
|
|
1193
1222
|
}
|
|
1194
1223
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DatapointExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|