@c8y/ngx-components 1024.15.16 → 1024.16.5
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/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +303 -63
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agents-html.mjs +9 -0
- package/fesm2022/c8y-ngx-components-ai-agents-html.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs +4 -0
- package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +394 -52
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +329 -19
- package/fesm2022/c8y-ngx-components-ai.mjs.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-datapoint-explorer-view.mjs +95 -76
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +92 -47
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +25 -4
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +13 -9
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +3 -2
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +4 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +3 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +65 -14
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +147 -16
- package/locales/es.po +143 -11
- package/locales/fr.po +459 -324
- package/locales/ja_JP.po +143 -11
- package/locales/ko.po +143 -11
- package/locales/locales.pot +136 -10
- package/locales/nl.po +143 -11
- package/locales/pl.po +143 -11
- package/locales/pt_BR.po +143 -11
- package/locales/zh_CN.po +143 -11
- package/locales/zh_TW.po +143 -11
- package/package.json +1 -1
- package/types/c8y-ngx-components-ai-agent-chat.d.ts +111 -4
- package/types/c8y-ngx-components-ai-agent-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-agents-html.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-agents-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-ai-chat.d.ts +224 -10
- package/types/c8y-ngx-components-ai-ai-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai.d.ts +176 -6
- package/types/c8y-ngx-components-ai.d.ts.map +1 -1
- package/types/c8y-ngx-components-context-dashboard.d.ts.map +1 -1
- package/types/c8y-ngx-components-datapoint-explorer-view.d.ts +7 -2
- package/types/c8y-ngx-components-datapoint-explorer-view.d.ts.map +1 -1
- package/types/c8y-ngx-components-datapoint-selector.d.ts +63 -50
- package/types/c8y-ngx-components-datapoint-selector.d.ts.map +1 -1
- package/types/c8y-ngx-components-echart.d.ts +12 -0
- package/types/c8y-ngx-components-echart.d.ts.map +1 -1
- package/types/c8y-ngx-components-time-context.d.ts +2 -0
- package/types/c8y-ngx-components-time-context.d.ts.map +1 -1
- package/types/c8y-ngx-components-widgets-implementations-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components.d.ts +10 -1
- package/types/c8y-ngx-components.d.ts.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, inject, SecurityContext, ViewChild, Input, Component, EventEmitter, Output, DestroyRef } from '@angular/core';
|
|
3
3
|
import { gettext } from '@c8y/ngx-components/gettext';
|
|
4
|
+
import { isEqual, cloneDeep } from 'lodash-es';
|
|
4
5
|
import { from, merge, interval, BehaviorSubject, of, lastValueFrom, defer, forkJoin } from 'rxjs';
|
|
5
6
|
import { mergeMap, map, tap, throttleTime, buffer, switchMap } from 'rxjs/operators';
|
|
6
7
|
import * as i1$1 from '@c8y/ngx-components';
|
|
@@ -2706,12 +2707,24 @@ class ChartsComponent {
|
|
|
2706
2707
|
*/
|
|
2707
2708
|
this.duplicateAggregationsDetected = new EventEmitter();
|
|
2708
2709
|
this.CHART_VIEW_CONTEXT = CHART_VIEW_CONTEXT;
|
|
2710
|
+
/**
|
|
2711
|
+
* Aggregation params are serialized verbatim into the query string, so a missing
|
|
2712
|
+
* `aggregationFunction` would reach the platform as the literal string 'undefined' and get the
|
|
2713
|
+
* whole request rejected. Every site that sends one falls back to 'avg', matching the default
|
|
2714
|
+
* the chart renders with (see `EchartsOptionsService.getSingleSeries`).
|
|
2715
|
+
*/
|
|
2709
2716
|
this.AGGREGATION_INTERVAL_MAP = {
|
|
2710
2717
|
[aggregationType.MINUTELY]: '1m',
|
|
2711
2718
|
[aggregationType.HOURLY]: '60m',
|
|
2712
2719
|
[aggregationType.DAILY]: '1d'
|
|
2713
2720
|
};
|
|
2714
2721
|
this.configChangedSubject = new BehaviorSubject(null);
|
|
2722
|
+
/**
|
|
2723
|
+
* Deep copy of the config the last reload ran with; content-identical rebuilds are skipped.
|
|
2724
|
+
* A copy, not a reference: the chart mutates datapoints in place (e.g. backfills `unit`), and a
|
|
2725
|
+
* stored reference would mutate along with the config and always compare as unchanged.
|
|
2726
|
+
*/
|
|
2727
|
+
this.lastConfig = null;
|
|
2715
2728
|
/** Series names hidden by the user via per-function legend toggles; re-applied after each setOption. */
|
|
2716
2729
|
this.userHiddenSeriesNames = new Set();
|
|
2717
2730
|
/** DpIds whose per-fn series were stripped to a single series on the last render. */
|
|
@@ -2820,6 +2833,8 @@ class ChartsComponent {
|
|
|
2820
2833
|
}
|
|
2821
2834
|
const wasFromZoom = this.isChangeFromZoom;
|
|
2822
2835
|
this.isChangeFromZoom = false;
|
|
2836
|
+
const configContentChanged = !isEqual(this.config, this.lastConfig);
|
|
2837
|
+
this.lastConfig = cloneDeep(this.config);
|
|
2823
2838
|
if (wasFromZoom) {
|
|
2824
2839
|
const currentRange = this.getTimeRange();
|
|
2825
2840
|
const isWithinLoadedRange = this.loadedTimeRange &&
|
|
@@ -2854,6 +2869,12 @@ class ChartsComponent {
|
|
|
2854
2869
|
}
|
|
2855
2870
|
}
|
|
2856
2871
|
else {
|
|
2872
|
+
// Parent forms rebuild the config object on every valueChanges emission;
|
|
2873
|
+
// a content-identical rebuild must not restart the fetch pipeline.
|
|
2874
|
+
if (!configContentChanged) {
|
|
2875
|
+
this.mediator.isSliderZoomUpdate.set(false);
|
|
2876
|
+
return;
|
|
2877
|
+
}
|
|
2857
2878
|
// Only reset initialTimeRange if the change is NOT from a slider zoom on another widget
|
|
2858
2879
|
if (!this.mediator.isSliderZoomUpdate()) {
|
|
2859
2880
|
this.widgetTimeContextDateRangeService.updateInitialTimeRange(null);
|
|
@@ -3537,7 +3558,7 @@ class ChartsComponent {
|
|
|
3537
3558
|
return {};
|
|
3538
3559
|
if (this.config.showAdvancedChartOptions) {
|
|
3539
3560
|
return {
|
|
3540
|
-
aggregationFunction: dp.renderType
|
|
3561
|
+
aggregationFunction: dp.renderType || 'avg',
|
|
3541
3562
|
aggregationInterval: interval
|
|
3542
3563
|
};
|
|
3543
3564
|
}
|
|
@@ -3554,7 +3575,7 @@ class ChartsComponent {
|
|
|
3554
3575
|
this.config.aggregation &&
|
|
3555
3576
|
this.config.showAdvancedChartOptions &&
|
|
3556
3577
|
dp.renderType !== 'area' && {
|
|
3557
|
-
aggregationFunction: dp.renderType,
|
|
3578
|
+
aggregationFunction: dp.renderType || 'avg',
|
|
3558
3579
|
aggregationInterval: this.AGGREGATION_INTERVAL_MAP[this.config.aggregation]
|
|
3559
3580
|
})
|
|
3560
3581
|
})).pipe(map(res => {
|
|
@@ -3619,7 +3640,7 @@ class ChartsComponent {
|
|
|
3619
3640
|
return {};
|
|
3620
3641
|
if (this.config.showAdvancedChartOptions) {
|
|
3621
3642
|
return {
|
|
3622
|
-
aggregationFunction: aggregatedDatapoint.renderType
|
|
3643
|
+
aggregationFunction: aggregatedDatapoint.renderType || 'avg',
|
|
3623
3644
|
aggregationInterval: interval
|
|
3624
3645
|
};
|
|
3625
3646
|
}
|
|
@@ -3638,7 +3659,7 @@ class ChartsComponent {
|
|
|
3638
3659
|
(this.config.aggregation || customTimeRange) &&
|
|
3639
3660
|
this.config.showAdvancedChartOptions &&
|
|
3640
3661
|
aggregatedDatapoint.renderType !== 'area' && {
|
|
3641
|
-
aggregationFunction: aggregatedDatapoint.renderType,
|
|
3662
|
+
aggregationFunction: aggregatedDatapoint.renderType || 'avg',
|
|
3642
3663
|
aggregationInterval: this.AGGREGATION_INTERVAL_MAP[(customTimeRange ? this.getAggregationTypeForTimeRange() : this.config.aggregation)]
|
|
3643
3664
|
})
|
|
3644
3665
|
})).pipe(map(res => {
|