@c8y/ngx-components 1023.14.70 → 1023.14.92
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/ai/agent-chat/index.d.ts +1 -1
- package/ai/agent-chat/index.d.ts.map +1 -1
- package/ai/index.d.ts +1 -0
- package/ai/index.d.ts.map +1 -1
- package/asset-properties/index.d.ts +20 -2
- package/asset-properties/index.d.ts.map +1 -1
- package/cockpit-config/index.d.ts.map +1 -1
- package/echart/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +19 -2
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +2 -2
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +36 -12
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +7 -7
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +47 -16
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +40 -17
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services.mjs +2 -2
- package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tenants.mjs +3 -3
- package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +2 -2
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +13 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +2 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +5 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +3 -5
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +4 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +30 -5
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts +11 -2
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +13 -2
- package/index.d.ts.map +1 -1
- package/locales/de.po +392 -102
- package/locales/es.po +337 -100
- package/locales/fr.po +400 -131
- package/locales/ja_JP.po +395 -168
- package/locales/ko.po +341 -80
- package/locales/locales.pot +10 -13
- package/locales/nl.po +326 -60
- package/locales/pl.po +331 -66
- package/locales/pt_BR.po +332 -67
- package/locales/zh_CN.po +340 -77
- package/locales/zh_TW.po +349 -80
- package/package.json +1 -1
- package/upgrade/index.d.ts.map +1 -1
- package/widgets/implementations/alarms/index.d.ts.map +1 -1
- package/widgets/implementations/html-widget/index.d.ts +2 -2
- package/widgets/implementations/html-widget/index.d.ts.map +1 -1
- package/widgets/implementations/info-gauge/index.d.ts.map +1 -1
- package/widgets/implementations/three-d-rotation/index.d.ts.map +1 -1
|
@@ -97,6 +97,8 @@ class YAxisService {
|
|
|
97
97
|
}
|
|
98
98
|
getYAxis(datapointsWithValues, YAxisOptions) {
|
|
99
99
|
const YAxisPlacement = this.getYAxisPlacement(datapointsWithValues, YAxisOptions);
|
|
100
|
+
const hasValues = datapointsWithValues.some(dp => dp.values && Object.keys(dp.values).length > 0);
|
|
101
|
+
const nameGap = hasValues ? 25 : 15;
|
|
100
102
|
if (YAxisOptions.forceMergeDatapoints) {
|
|
101
103
|
return {
|
|
102
104
|
name: Array.from(datapointsWithValues)
|
|
@@ -106,7 +108,7 @@ class YAxisService {
|
|
|
106
108
|
nameTruncate: {
|
|
107
109
|
maxWidth: 350
|
|
108
110
|
},
|
|
109
|
-
nameGap
|
|
111
|
+
nameGap,
|
|
110
112
|
nameTextStyle: {
|
|
111
113
|
// add rich text to support multiple colors for different dp units
|
|
112
114
|
rich: this.buildRichTextStyle(datapointsWithValues)
|
|
@@ -172,7 +174,7 @@ class YAxisService {
|
|
|
172
174
|
nameTruncate: {
|
|
173
175
|
maxWidth: 350
|
|
174
176
|
},
|
|
175
|
-
nameGap
|
|
177
|
+
nameGap,
|
|
176
178
|
nameTextStyle: {
|
|
177
179
|
rich: this.buildRichTextStyle(uniqueUnitDps)
|
|
178
180
|
},
|
|
@@ -440,15 +442,11 @@ class EchartsOptionsService {
|
|
|
440
442
|
setYaxisStartToZero: displayOptions.setYaxisStartToZero,
|
|
441
443
|
showLabelAndUnit: displayOptions.showLabelAndUnit
|
|
442
444
|
});
|
|
443
|
-
const
|
|
445
|
+
const hasValues = datapointsWithValues.some(dp => dp.values && Object.keys(dp.values).length > 0);
|
|
444
446
|
const leftAxis = Array.isArray(yAxis) ? yAxis.filter(yx => yx.position === 'left') : [];
|
|
445
|
-
const gridLeft = leftAxis.length
|
|
446
|
-
? leftAxis.length * (this.yAxisService.Y_AXIS_OFFSET - AXIS_PADDING)
|
|
447
|
-
: 32;
|
|
448
447
|
const rightAxis = Array.isArray(yAxis) ? yAxis.filter(yx => yx.position === 'right') : [];
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
: 16;
|
|
448
|
+
const gridLeft = this.calculateGridLeft(leftAxis.length, displayOptions.forceMergeDatapoints);
|
|
449
|
+
const gridRight = this.calculateGridRight(rightAxis.length, hasValues);
|
|
452
450
|
const selectedLanguage = this.translate.currentLang;
|
|
453
451
|
let intervalInMs = this.calculateExtendedIntervalInMs(selectedTimeRange?.interval || timeRange.interval || 'hours', selectedTimeRange || timeRange);
|
|
454
452
|
if (sliderZoomUsed) {
|
|
@@ -487,17 +485,23 @@ class EchartsOptionsService {
|
|
|
487
485
|
filterMode: datapointsWithValues.some(dp => dp.lineType === 'bars') ? 'filter' : 'none',
|
|
488
486
|
zoomOnMouseWheel: true,
|
|
489
487
|
startValue: selectedTimeRange
|
|
490
|
-
? selectedTimeRange.dateFrom.valueOf()
|
|
491
|
-
: timeRange.dateFrom.valueOf(),
|
|
488
|
+
? new Date(selectedTimeRange.dateFrom).valueOf()
|
|
489
|
+
: new Date(timeRange.dateFrom).valueOf(),
|
|
492
490
|
endValue: selectedTimeRange
|
|
493
|
-
? selectedTimeRange.dateTo.valueOf()
|
|
494
|
-
: timeRange.dateTo.valueOf()
|
|
491
|
+
? new Date(selectedTimeRange.dateTo).valueOf()
|
|
492
|
+
: new Date(timeRange.dateTo).valueOf()
|
|
495
493
|
},
|
|
496
494
|
{
|
|
497
495
|
type: 'slider',
|
|
498
496
|
show: displayOptions.showSlider,
|
|
499
497
|
bottom: 8,
|
|
500
498
|
realtime: false,
|
|
499
|
+
startValue: selectedTimeRange
|
|
500
|
+
? new Date(selectedTimeRange.dateFrom).valueOf()
|
|
501
|
+
: new Date(timeRange.dateFrom).valueOf(),
|
|
502
|
+
endValue: selectedTimeRange
|
|
503
|
+
? new Date(selectedTimeRange.dateTo).valueOf()
|
|
504
|
+
: new Date(timeRange.dateTo).valueOf(),
|
|
501
505
|
left: displayOptions.sliderPositionMode === 'compact' ? '64px' : '64px',
|
|
502
506
|
right: displayOptions.sliderPositionMode === 'compact' ? '172px' : '64px',
|
|
503
507
|
labelFormatter(_value, valueStr) {
|
|
@@ -557,7 +561,7 @@ class EchartsOptionsService {
|
|
|
557
561
|
.map(date => new Date(date).valueOf())
|
|
558
562
|
.sort((a, b) => a - b)[0]
|
|
559
563
|
: new Date(timeRange.dateFrom).valueOf() - intervalInMs,
|
|
560
|
-
max: timeRange.dateTo,
|
|
564
|
+
max: new Date(timeRange.dateTo).valueOf(),
|
|
561
565
|
type: 'time',
|
|
562
566
|
animation: false,
|
|
563
567
|
axisPointer: {
|
|
@@ -796,8 +800,9 @@ class EchartsOptionsService {
|
|
|
796
800
|
const allDataPointSeries = allSeries.filter(series => series['typeOfSeries'] !== 'alarm' && series['typeOfSeries'] !== 'event');
|
|
797
801
|
this.processSeries(allDataPointSeries, XAxisValue, YAxisReadings, displayOptions);
|
|
798
802
|
// find event and alarm of the same type as the hovered markedLine or markedPoint
|
|
799
|
-
const event = allEvents.find(e => e.type === params.data.itemType);
|
|
800
|
-
const alarm = allAlarms.find(a => a.type === params.data.itemType)
|
|
803
|
+
const event = allEvents.find(e => e.type === params.data.itemType && params.data.value === e.time);
|
|
804
|
+
const alarm = allAlarms.find(a => a.type === params.data.itemType && params.data.value === a.lastUpdated) ??
|
|
805
|
+
allAlarms.find(a => a.type === params.data.itemType && params.data.value === a.creationTime); // fallback to creationTime for cleared alarms.
|
|
801
806
|
let value = '';
|
|
802
807
|
if (event) {
|
|
803
808
|
value = this.processEvent(event, XAxisValue);
|
|
@@ -1123,6 +1128,24 @@ class EchartsOptionsService {
|
|
|
1123
1128
|
return grouped;
|
|
1124
1129
|
}, {});
|
|
1125
1130
|
}
|
|
1131
|
+
calculateGridLeft(leftAxisCount, forceMergeDatapoints) {
|
|
1132
|
+
const AXIS_PADDING = 20;
|
|
1133
|
+
if (!leftAxisCount) {
|
|
1134
|
+
return forceMergeDatapoints ? this.yAxisService.Y_AXIS_OFFSET : 32;
|
|
1135
|
+
}
|
|
1136
|
+
return leftAxisCount * (this.yAxisService.Y_AXIS_OFFSET - AXIS_PADDING);
|
|
1137
|
+
}
|
|
1138
|
+
calculateGridRight(rightAxisCount, hasValues) {
|
|
1139
|
+
const RIGHT_AXIS_BASE_SPACE = 48;
|
|
1140
|
+
const RIGHT_AXIS_INCREMENT_WITH_DATA = 32;
|
|
1141
|
+
if (!rightAxisCount) {
|
|
1142
|
+
return 32;
|
|
1143
|
+
}
|
|
1144
|
+
if (hasValues) {
|
|
1145
|
+
return rightAxisCount * RIGHT_AXIS_INCREMENT_WITH_DATA;
|
|
1146
|
+
}
|
|
1147
|
+
return (rightAxisCount - 1) * this.yAxisService.Y_AXIS_OFFSET + RIGHT_AXIS_BASE_SPACE;
|
|
1148
|
+
}
|
|
1126
1149
|
/**
|
|
1127
1150
|
* This method interpolates between two data points. The goal is to place the markPoint on the chart in the right place.
|
|
1128
1151
|
* @param dpValuesArray array of data points
|
|
@@ -2041,6 +2064,12 @@ class ChartsComponent {
|
|
|
2041
2064
|
}
|
|
2042
2065
|
}
|
|
2043
2066
|
else {
|
|
2067
|
+
// Only reset initialTimeRange if the change is NOT from a slider zoom on another widget
|
|
2068
|
+
if (!this.mediator.isSliderZoomUpdate()) {
|
|
2069
|
+
this.widgetTimeContextDateRangeService.updateInitialTimeRange(null);
|
|
2070
|
+
}
|
|
2071
|
+
// Clear the slider zoom flag after processing
|
|
2072
|
+
this.mediator.isSliderZoomUpdate.set(false);
|
|
2044
2073
|
this.configChangedSubject.next();
|
|
2045
2074
|
}
|
|
2046
2075
|
}
|
|
@@ -2065,6 +2094,8 @@ class ChartsComponent {
|
|
|
2065
2094
|
const options = this.echartsInstance.getOption();
|
|
2066
2095
|
const dataZoom = options['dataZoom'][0];
|
|
2067
2096
|
this.isChangeFromZoom = true;
|
|
2097
|
+
// Set global flag so other widgets know this change is from slider zoom
|
|
2098
|
+
this.mediator.isSliderZoomUpdate.set(true);
|
|
2068
2099
|
const zoomDates = {
|
|
2069
2100
|
dateFrom: new Date(dataZoom['startValue']),
|
|
2070
2101
|
dateTo: new Date(dataZoom['endValue']),
|