@iobroker/gui-components 10.0.10 → 10.0.12
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/README.md +6 -2
- package/build/Components/ObjectBrowser/HistoryChart.d.ts +43 -0
- package/build/Components/ObjectBrowser/HistoryChart.js +205 -0
- package/build/Components/ObjectBrowser/HistoryChart.js.map +1 -0
- package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +0 -8
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js +9 -53
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
- package/build/Components/ObjectBrowser/renderLeaf.js +1 -1
- package/build/Components/ObjectBrowser/renderLeaf.js.map +1 -1
- package/build/Components/ObjectBrowser/utils.d.ts +0 -1
- package/build/Components/ObjectBrowser/utils.js +0 -33
- package/build/Components/ObjectBrowser/utils.js.map +1 -1
- package/build/Components/Utils.js +2 -2
- package/build/Components/Utils.js.map +1 -1
- package/build/i18n/de.json +2 -0
- package/build/i18n/en.json +2 -0
- package/build/i18n/es.json +2 -0
- package/build/i18n/fr.json +2 -0
- package/build/i18n/it.json +2 -0
- package/build/i18n/nl.json +2 -0
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pt.json +2 -0
- package/build/i18n/ru.json +2 -0
- package/build/i18n/uk.json +2 -0
- package/build/i18n/zh-cn.json +2 -0
- package/i18n/de.json +2 -0
- package/i18n/en.json +2 -0
- package/i18n/es.json +2 -0
- package/i18n/fr.json +2 -0
- package/i18n/it.json +2 -0
- package/i18n/nl.json +2 -0
- package/i18n/pl.json +2 -0
- package/i18n/pt.json +2 -0
- package/i18n/ru.json +2 -0
- package/i18n/uk.json +2 -0
- package/i18n/zh-cn.json +2 -0
- package/package.json +2 -2
|
@@ -1276,39 +1276,6 @@ export function getValueStyle(options) {
|
|
|
1276
1276
|
// }
|
|
1277
1277
|
return { color };
|
|
1278
1278
|
}
|
|
1279
|
-
export function prepareSparkData(values, from) {
|
|
1280
|
-
// set one point every hour
|
|
1281
|
-
let time = from;
|
|
1282
|
-
let i = 1;
|
|
1283
|
-
const v = [];
|
|
1284
|
-
while (i < values.length && time < from + 25 * 3600000) {
|
|
1285
|
-
// find the interval
|
|
1286
|
-
while (values[i - 1].ts < time && time <= values[i].ts && i < values.length) {
|
|
1287
|
-
i++;
|
|
1288
|
-
}
|
|
1289
|
-
if (i === 1 && values[i - 1].ts >= time) {
|
|
1290
|
-
// assume the value was always null
|
|
1291
|
-
v.push(0);
|
|
1292
|
-
}
|
|
1293
|
-
else if (i < values.length) {
|
|
1294
|
-
if (typeof values[i].val === 'boolean' || typeof values[i - 1].val === 'boolean') {
|
|
1295
|
-
v.push(values[i].val ? 1 : 0);
|
|
1296
|
-
}
|
|
1297
|
-
else {
|
|
1298
|
-
// remove nulls
|
|
1299
|
-
values[i - 1].val ||= 0;
|
|
1300
|
-
values[i].val ||= 0;
|
|
1301
|
-
// interpolate
|
|
1302
|
-
const nm1 = values[i - 1].val;
|
|
1303
|
-
const n = values[i].val;
|
|
1304
|
-
const val = nm1 + ((n - nm1) * (time - values[i - 1].ts)) / (values[i].ts - values[i - 1].ts);
|
|
1305
|
-
v.push(val);
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
time += 3600000;
|
|
1309
|
-
}
|
|
1310
|
-
return v;
|
|
1311
|
-
}
|
|
1312
1279
|
export function getCustomValue(obj, it) {
|
|
1313
1280
|
if (obj?._id?.startsWith(`${it.adapter}.`) && it.path.length > 1) {
|
|
1314
1281
|
const p = it.path;
|