zigbee2mqtt-frontend 0.6.51 → 0.6.52
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/dist/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"><title>Zigbee2MQTT</title><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/><link rel="subresource" href="./css/light.css"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous"/><link rel="apple-touch-icon" href="apple-touch-icon.png" sizes="150x150"><script defer="defer" src="runtime.3296ac9a5caef629c7d6.js"></script><script defer="defer" src="scripts/vendor.5dabbcd696a53e37d1fe.js"></script><script defer="defer" src="main.
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"><title>Zigbee2MQTT</title><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/><link rel="subresource" href="./css/light.css"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous"/><link rel="apple-touch-icon" href="apple-touch-icon.png" sizes="150x150"><script defer="defer" src="runtime.3296ac9a5caef629c7d6.js"></script><script defer="defer" src="scripts/vendor.5dabbcd696a53e37d1fe.js"></script><script defer="defer" src="main.0e3a6654686987fba4af.js"></script><link href="scripts/vendor.109be7bda8112bf971cc.css" rel="stylesheet"><link href="main.d2cd079cb3f5a80b4aac.css" rel="stylesheet"></head><body><div id="root" class="wrapper"></div></body></html>
|
package/dist/index.html.gz
CHANGED
Binary file
|
@@ -59,10 +59,14 @@ var FileSaver_min = __webpack_require__(93162);
|
|
59
59
|
var FileSaver_min_default = /*#__PURE__*/__webpack_require__.n(FileSaver_min);
|
60
60
|
// EXTERNAL MODULE: ./node_modules/@toolz/local-storage/src/local.js + 4 modules
|
61
61
|
var local = __webpack_require__(36502);
|
62
|
+
// EXTERNAL MODULE: ./node_modules/lodash/debounce.js
|
63
|
+
var debounce = __webpack_require__(23279);
|
64
|
+
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce);
|
62
65
|
;// CONCATENATED MODULE: ./src/utils.ts
|
63
66
|
|
64
67
|
|
65
68
|
|
69
|
+
|
66
70
|
const genDeviceDetailsLink = (deviceIdentifier) => (`/device/${deviceIdentifier}`);
|
67
71
|
const toHex = (input, padding = 4) => {
|
68
72
|
return `0x${(`${'0'.repeat(padding)}${input.toString(16)}`).substr(-1 * padding).toUpperCase()}`;
|
@@ -164,6 +168,17 @@ const isOnlyOneBitIsSet = (b) => {
|
|
164
168
|
const THEME_STORAGE_KEY = 'z2m-theme';
|
165
169
|
const getCurrentTheme = () => { var _a; return (_a = local/* local.getItem */.I.getItem(THEME_STORAGE_KEY)) !== null && _a !== void 0 ? _a : 'light'; };
|
166
170
|
const saveCurrentTheme = (theme) => local/* local.setItem */.I.setItem(THEME_STORAGE_KEY, theme);
|
171
|
+
const debounceArgs = (fn, options) => {
|
172
|
+
var __dbArgs = [];
|
173
|
+
var __dbFn = debounce_default()(() => {
|
174
|
+
fn.call(undefined, __dbArgs);
|
175
|
+
__dbArgs = [];
|
176
|
+
}, options);
|
177
|
+
return (...args) => {
|
178
|
+
__dbArgs.push([...args]);
|
179
|
+
__dbFn();
|
180
|
+
};
|
181
|
+
};
|
167
182
|
|
168
183
|
;// CONCATENATED MODULE: ./src/components/device-image/style.css
|
169
184
|
// extracted by mini-css-extract-plugin
|
@@ -429,6 +444,7 @@ const showNotity = (data) => {
|
|
429
444
|
break;
|
430
445
|
}
|
431
446
|
};
|
447
|
+
const apiDebouceDelay = 250;
|
432
448
|
class Api {
|
433
449
|
constructor(url) {
|
434
450
|
this.requests = new Map();
|
@@ -463,11 +479,13 @@ class Api {
|
|
463
479
|
}
|
464
480
|
return url.toString();
|
465
481
|
};
|
466
|
-
this.processDeviceStateMessage = (
|
482
|
+
this.processDeviceStateMessage = debounceArgs((messages) => {
|
467
483
|
let { deviceStates } = src_store.getState();
|
468
|
-
|
484
|
+
messages.forEach(data => {
|
485
|
+
deviceStates = { ...deviceStates, ...{ [data.topic]: { ...deviceStates[data.topic], ...data.payload } } };
|
486
|
+
});
|
469
487
|
src_store.setState({ deviceStates });
|
470
|
-
};
|
488
|
+
}, { trailing: true, maxWait: apiDebouceDelay });
|
471
489
|
this.procsessBridgeMessage = (data) => {
|
472
490
|
switch (data.topic) {
|
473
491
|
case "bridge/config":
|
@@ -561,12 +579,14 @@ class Api {
|
|
561
579
|
this.resolvePromises(data.payload);
|
562
580
|
}
|
563
581
|
};
|
564
|
-
this.processAvailabilityMessage = (
|
582
|
+
this.processAvailabilityMessage = debounceArgs((messages) => {
|
565
583
|
let { avalilability } = src_store.getState();
|
566
|
-
|
567
|
-
|
584
|
+
messages.forEach(data => {
|
585
|
+
const friendlyName = data.topic.split(AVALIABILITY_FEATURE_TOPIC_ENDING, 1)[0];
|
586
|
+
avalilability = { ...avalilability, ...{ [friendlyName]: data.payload } };
|
587
|
+
});
|
568
588
|
src_store.setState({ avalilability });
|
569
|
-
};
|
589
|
+
}, { trailing: true, maxWait: apiDebouceDelay });
|
570
590
|
this.onClose = (e) => {
|
571
591
|
if (e.code === UNAUTHORIZED_ERROR_CODE) {
|
572
592
|
local/* local.setItem */.I.setItem(AUTH_FLAG_LOCAL_STORAGE_ITEM_NAME, true);
|
@@ -581,19 +601,19 @@ class Api {
|
|
581
601
|
let data = {};
|
582
602
|
try {
|
583
603
|
data = JSON.parse(event.data);
|
604
|
+
if (data.topic.endsWith(AVALIABILITY_FEATURE_TOPIC_ENDING)) {
|
605
|
+
this.processAvailabilityMessage(data);
|
606
|
+
}
|
607
|
+
else if (data.topic.startsWith("bridge/")) {
|
608
|
+
this.procsessBridgeMessage(data);
|
609
|
+
}
|
610
|
+
else {
|
611
|
+
this.processDeviceStateMessage(data);
|
612
|
+
}
|
584
613
|
}
|
585
614
|
catch (e) {
|
586
615
|
notyf.error(e.message);
|
587
|
-
|
588
|
-
}
|
589
|
-
if (data.topic.endsWith(AVALIABILITY_FEATURE_TOPIC_ENDING)) {
|
590
|
-
this.processAvailabilityMessage(data);
|
591
|
-
}
|
592
|
-
else if (data.topic.startsWith("bridge/")) {
|
593
|
-
this.procsessBridgeMessage(data);
|
594
|
-
}
|
595
|
-
else {
|
596
|
-
this.processDeviceStateMessage(data);
|
616
|
+
console.error(event.data);
|
597
617
|
}
|
598
618
|
};
|
599
619
|
this.url = url;
|
@@ -1542,9 +1562,6 @@ function DisplayValue(props) {
|
|
1542
1562
|
/* harmony default export */ const zigbee_style = ({"action-column":"GDDPje7BU_a2CqHQQeRS","device-pic":"V7dffAiFpKHihMzFsuev","device-image":"NBzXAYfJkobb1Zfroqnt"});
|
1543
1563
|
// EXTERNAL MODULE: ./node_modules/react-table/index.js
|
1544
1564
|
var react_table = __webpack_require__(79521);
|
1545
|
-
// EXTERNAL MODULE: ./node_modules/lodash/debounce.js
|
1546
|
-
var debounce = __webpack_require__(23279);
|
1547
|
-
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce);
|
1548
1565
|
;// CONCATENATED MODULE: ./src/components/grid/ReactTableCom.tsx
|
1549
1566
|
|
1550
1567
|
|
@@ -3951,7 +3968,7 @@ class SettingsPage extends react.Component {
|
|
3951
3968
|
zigbee2mqttCommit) },
|
3952
3969
|
{ translationKey: 'coordinator_type', content: react.createElement(react.Fragment, null, (_c = (_b = bridgeInfo.coordinator) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : t('common:unknown')) },
|
3953
3970
|
{ translationKey: 'coordinator_revision', content: react.createElement(react.Fragment, null, (_f = (_e = (_d = bridgeInfo.coordinator) === null || _d === void 0 ? void 0 : _d.meta) === null || _e === void 0 ? void 0 : _e.revision) !== null && _f !== void 0 ? _f : t('common:unknown')) },
|
3954
|
-
{ translationKey: 'frontend_version', content: "0.6.
|
3971
|
+
{ translationKey: 'frontend_version', content: "0.6.52" },
|
3955
3972
|
{ translationKey: 'stats', content: react.createElement(Stats, { devices: devices }) },
|
3956
3973
|
];
|
3957
3974
|
return react.createElement("div", { className: "p-3" }, rows.map(row => react.createElement("dl", { key: row.translationKey, className: "row" },
|
@@ -5348,4 +5365,4 @@ module.exports = "class MyExampleExtension_TS_ {\n constructor(zigbee, mqtt,
|
|
5348
5365
|
/******/ var __webpack_exports__ = __webpack_require__.O();
|
5349
5366
|
/******/ }
|
5350
5367
|
]);
|
5351
|
-
//# sourceMappingURL=main.
|
5368
|
+
//# sourceMappingURL=main.0e3a6654686987fba4af.js.map
|
Binary file
|
package/package.json
CHANGED
Binary file
|