@c8y/ngx-components 1023.14.41 → 1023.14.44
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/datapoint-explorer/view/index.d.ts +2 -0
- package/datapoint-explorer/view/index.d.ts.map +1 -1
- package/echart/index.d.ts +7 -1
- package/echart/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +21 -36
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +127 -83
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +21 -6
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/global-context/index.d.ts +12 -2
- package/global-context/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -814,6 +814,8 @@ class DatapointExplorerComponent {
|
|
|
814
814
|
showRange: true,
|
|
815
815
|
showChart: true
|
|
816
816
|
};
|
|
817
|
+
/** Flag to skip onTimeContextChange during zoom handling */
|
|
818
|
+
this.isHandlingZoom = false;
|
|
817
819
|
this.chartViewContext = CHART_VIEW_CONTEXT.DATAPOINT_EXPLORER;
|
|
818
820
|
this.TIME_PICKER_CONFIG = {
|
|
819
821
|
showMinutes: true,
|
|
@@ -873,6 +875,10 @@ class DatapointExplorerComponent {
|
|
|
873
875
|
});
|
|
874
876
|
}
|
|
875
877
|
onTimeContextChange(timeProps) {
|
|
878
|
+
// Skip context changes during zoom handling - zoom already set the correct dates
|
|
879
|
+
if (this.isHandlingZoom) {
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
876
882
|
const realtime = this.formGroup.controls.realtime.value;
|
|
877
883
|
if (timeProps.realtime !== realtime) {
|
|
878
884
|
this.formGroup.patchValue({
|
|
@@ -949,6 +955,7 @@ class DatapointExplorerComponent {
|
|
|
949
955
|
...configSummaryGS
|
|
950
956
|
});
|
|
951
957
|
// Ensure realtime properties and dates are set correctly
|
|
958
|
+
// formGroup.valueChanges subscription will update this.config
|
|
952
959
|
this.formGroup.patchValue({
|
|
953
960
|
alarms: this.alarms,
|
|
954
961
|
events: this.events,
|
|
@@ -958,59 +965,37 @@ class DatapointExplorerComponent {
|
|
|
958
965
|
isAutoRefreshEnabled: config.realtime ? true : config.isAutoRefreshEnabled || false,
|
|
959
966
|
refreshInterval: config.realtime ? 5000 : config.refreshInterval || 0
|
|
960
967
|
});
|
|
961
|
-
// Update config directly to ensure ChartsComponent receives correct values
|
|
962
|
-
// Create NEW object reference so Angular detects the change
|
|
963
|
-
const { alarms, events, ...configValues } = this.formGroup.value;
|
|
964
|
-
this.config = {
|
|
965
|
-
...this.config, // Keep existing properties
|
|
966
|
-
...configValues,
|
|
967
|
-
alarmsEventsConfigs: [...(alarms || []), ...(events || [])]
|
|
968
|
-
};
|
|
969
968
|
}
|
|
970
969
|
onSliderZoom(timeProps) {
|
|
971
|
-
|
|
970
|
+
this.isHandlingZoom = true;
|
|
971
|
+
// Update main form - pause realtime and disable auto-refresh
|
|
972
972
|
this.formGroup.patchValue({
|
|
973
973
|
...timeProps,
|
|
974
974
|
realtime: false,
|
|
975
975
|
isAutoRefreshEnabled: false,
|
|
976
976
|
refreshInterval: 0
|
|
977
977
|
});
|
|
978
|
-
//
|
|
978
|
+
// Update timeProps binding
|
|
979
979
|
this.timeProps = {
|
|
980
980
|
dateFrom: new Date(timeProps.dateFrom.getTime()),
|
|
981
981
|
dateTo: new Date(timeProps.dateTo.getTime()),
|
|
982
982
|
interval: 'custom',
|
|
983
983
|
realtime: false
|
|
984
984
|
};
|
|
985
|
-
//
|
|
985
|
+
// Sync timeContext state
|
|
986
986
|
if (this.timeContext) {
|
|
987
987
|
this.timeContext.stopRealtime();
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
// Enable aggregation control since realtime is now off
|
|
998
|
-
this.timeContext.form.controls.aggregation.enable();
|
|
999
|
-
if (currentInterval !== 'custom') {
|
|
1000
|
-
this.timeContext.form.patchValue({
|
|
1001
|
-
currentDateContextInterval: 'custom'
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
else {
|
|
1005
|
-
this.timeContext['update']({
|
|
1006
|
-
date: [timeProps.dateFrom, timeProps.dateTo],
|
|
1007
|
-
interval: 'custom',
|
|
1008
|
-
realtime: false,
|
|
1009
|
-
aggregation: this.timeContext.form.value.aggregation
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
}, 0);
|
|
988
|
+
this.timeContext.form.patchValue({
|
|
989
|
+
currentDateContextFromDate: timeProps.dateFrom.toISOString(),
|
|
990
|
+
currentDateContextToDate: timeProps.dateTo.toISOString(),
|
|
991
|
+
temporaryUserSelectedFromDate: timeProps.dateFrom.toISOString(),
|
|
992
|
+
temporaryUserSelectedToDate: timeProps.dateTo.toISOString(),
|
|
993
|
+
currentDateContextInterval: 'custom',
|
|
994
|
+
realtime: false
|
|
995
|
+
}, { emitEvent: false });
|
|
996
|
+
this.timeContext.form.controls.aggregation.enable();
|
|
1013
997
|
}
|
|
998
|
+
this.isHandlingZoom = false;
|
|
1014
999
|
}
|
|
1015
1000
|
updateTimeRangeOnRealtime(timeRange) {
|
|
1016
1001
|
this.formGroup.patchValue(timeRange, { emitEvent: false });
|