@camstack/addon-provider-homematic 1.2.195 → 1.2.197
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/CHANGELOG.md +14 -0
- package/dist/.bundle-modules.json +12 -11
- package/dist/_stub.js +514 -376
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BxmxWSOr.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-C4Fww_oV.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D0unHZPY.mjs +26 -0
- package/dist/addon-provider-homematic.css +1 -1
- package/dist/addon.js +998 -525
- package/dist/addon.mjs +998 -525
- package/dist/{hostInit-DVAY-ltL.mjs → hostInit-DTPxs8RG.mjs} +3 -3
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-B3yyDS0x.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DSDGvcoJ.mjs} +1 -1
- package/dist/widgets/_stub.js +24 -7
- package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-BPDLKZtI.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-p7WFaZQH.mjs} +2 -2
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C7ks8wIZ.mjs +26 -0
- package/dist/widgets/{hostInit-BlyQmRnG.mjs → hostInit-CtVv-2Cj.mjs} +2 -2
- package/dist/widgets/remoteEntry.js +1 -1
- package/package.json +6 -6
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DMlVGmnP.mjs +0 -26
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C6zY_Ytj.mjs +0 -26
package/dist/_stub.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./virtualExposes-v5SsyBZj.mjs";
|
|
2
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-
|
|
2
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DSDGvcoJ.mjs";
|
|
3
3
|
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react__loadShare__.js-iX7UoD9E.mjs";
|
|
4
|
-
import { C as s, S as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, l as v, m as y, n as b, o as x, p as S, r as ee, s as te, t as ne, u as C, v as w, x as re, y as ie } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
4
|
+
import { C as s, S as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, l as v, m as y, n as b, o as x, p as S, r as ee, s as te, t as ne, u as C, v as w, x as re, y as ie } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D0unHZPY.mjs";
|
|
5
5
|
import { n as T, r as E, t as ae } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-D_jZoh_U.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
7
7
|
var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), se = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ce = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), le = (e) => {
|
|
@@ -59,10 +59,23 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
59
59
|
d: "M22 20h-3",
|
|
60
60
|
key: "vhrsz"
|
|
61
61
|
}]
|
|
62
|
-
]), me = D("
|
|
62
|
+
]), me = D("external-link", [
|
|
63
|
+
["path", {
|
|
64
|
+
d: "M15 3h6v6",
|
|
65
|
+
key: "1q9fwt"
|
|
66
|
+
}],
|
|
67
|
+
["path", {
|
|
68
|
+
d: "M10 14 21 3",
|
|
69
|
+
key: "gplh6r"
|
|
70
|
+
}],
|
|
71
|
+
["path", {
|
|
72
|
+
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
|
|
73
|
+
key: "a6xqqp"
|
|
74
|
+
}]
|
|
75
|
+
]), he = D("flame", [["path", {
|
|
63
76
|
d: "M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",
|
|
64
77
|
key: "1slcih"
|
|
65
|
-
}]]),
|
|
78
|
+
}]]), ge = D("link-2", [
|
|
66
79
|
["path", {
|
|
67
80
|
d: "M9 17H7A5 5 0 0 1 7 7h2",
|
|
68
81
|
key: "8i5ue5"
|
|
@@ -78,7 +91,7 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
78
91
|
y2: "12",
|
|
79
92
|
key: "1jonct"
|
|
80
93
|
}]
|
|
81
|
-
]),
|
|
94
|
+
]), _e = D("mouse-pointer-click", [
|
|
82
95
|
["path", {
|
|
83
96
|
d: "M14 4.1 12 6",
|
|
84
97
|
key: "ita8i4"
|
|
@@ -99,19 +112,19 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
99
112
|
d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",
|
|
100
113
|
key: "s0h3yz"
|
|
101
114
|
}]
|
|
102
|
-
]),
|
|
115
|
+
]), ve = D("pencil", [["path", {
|
|
103
116
|
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
104
117
|
key: "1a8usu"
|
|
105
118
|
}], ["path", {
|
|
106
119
|
d: "m15 5 4 4",
|
|
107
120
|
key: "1mk7zo"
|
|
108
|
-
}]]),
|
|
121
|
+
}]]), ye = D("plus", [["path", {
|
|
109
122
|
d: "M5 12h14",
|
|
110
123
|
key: "1ays0h"
|
|
111
124
|
}], ["path", {
|
|
112
125
|
d: "M12 5v14",
|
|
113
126
|
key: "s699le"
|
|
114
|
-
}]]),
|
|
127
|
+
}]]), be = D("plug", [
|
|
115
128
|
["path", {
|
|
116
129
|
d: "M12 22v-5",
|
|
117
130
|
key: "1ega77"
|
|
@@ -128,7 +141,7 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
128
141
|
d: "M9 8V2",
|
|
129
142
|
key: "14iosj"
|
|
130
143
|
}]
|
|
131
|
-
]),
|
|
144
|
+
]), xe = D("radio", [
|
|
132
145
|
["path", {
|
|
133
146
|
d: "M16.247 7.761a6 6 0 0 1 0 8.478",
|
|
134
147
|
key: "1fwjs5"
|
|
@@ -151,7 +164,7 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
151
164
|
r: "2",
|
|
152
165
|
key: "1c9p78"
|
|
153
166
|
}]
|
|
154
|
-
]),
|
|
167
|
+
]), Se = D("sliders-horizontal", [
|
|
155
168
|
["path", {
|
|
156
169
|
d: "M10 5H3",
|
|
157
170
|
key: "1qgfaw"
|
|
@@ -188,7 +201,7 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
188
201
|
d: "M8 12H3",
|
|
189
202
|
key: "a7s4jb"
|
|
190
203
|
}]
|
|
191
|
-
]),
|
|
204
|
+
]), Ce = D("trash-2", [
|
|
192
205
|
["path", {
|
|
193
206
|
d: "M10 11v6",
|
|
194
207
|
key: "nco0om"
|
|
@@ -209,19 +222,6 @@ var oe = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
|
|
|
209
222
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
210
223
|
key: "e791ji"
|
|
211
224
|
}]
|
|
212
|
-
]), Ce = D("triangle-alert", [
|
|
213
|
-
["path", {
|
|
214
|
-
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
215
|
-
key: "wmoenq"
|
|
216
|
-
}],
|
|
217
|
-
["path", {
|
|
218
|
-
d: "M12 9v4",
|
|
219
|
-
key: "juzpu7"
|
|
220
|
-
}],
|
|
221
|
-
["path", {
|
|
222
|
-
d: "M12 17h.01",
|
|
223
|
-
key: "p32p05"
|
|
224
|
-
}]
|
|
225
225
|
]), we;
|
|
226
226
|
function O(e, t, n) {
|
|
227
227
|
function r(n, r) {
|
|
@@ -316,22 +316,22 @@ function Fe(e, t, n) {
|
|
|
316
316
|
configurable: !0
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function j(...e) {
|
|
320
320
|
let t = {};
|
|
321
321
|
for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
|
|
322
322
|
return Object.defineProperties({}, t);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Ie(e) {
|
|
325
325
|
return JSON.stringify(e);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Le(e) {
|
|
328
328
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
329
329
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
330
|
+
var Re = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
331
|
+
function ze(e) {
|
|
332
332
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
333
333
|
}
|
|
334
|
-
var
|
|
334
|
+
var Be = /* @__PURE__*/ Ae(() => {
|
|
335
335
|
if (De.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
336
336
|
try {
|
|
337
337
|
return Function(""), !0;
|
|
@@ -339,25 +339,25 @@ var Ve = /* @__PURE__*/ Ae(() => {
|
|
|
339
339
|
return !1;
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
|
-
function
|
|
343
|
-
if (
|
|
342
|
+
function Ve(e) {
|
|
343
|
+
if (ze(e) === !1) return !1;
|
|
344
344
|
let t = e.constructor;
|
|
345
345
|
if (t === void 0 || typeof t != "function") return !0;
|
|
346
346
|
let n = t.prototype;
|
|
347
|
-
return !(
|
|
347
|
+
return !(ze(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
return
|
|
349
|
+
function He(e) {
|
|
350
|
+
return Ve(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
351
351
|
}
|
|
352
|
-
var
|
|
352
|
+
var Ue = /* @__PURE__*/ new Set([
|
|
353
353
|
"string",
|
|
354
354
|
"number",
|
|
355
355
|
"symbol"
|
|
356
356
|
]);
|
|
357
|
-
function
|
|
357
|
+
function We(e) {
|
|
358
358
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ge(e, t, n) {
|
|
361
361
|
let r = new e._zod.constr(t ?? e._zod.def);
|
|
362
362
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
363
363
|
}
|
|
@@ -387,7 +387,7 @@ var qe = {
|
|
|
387
387
|
function Je(e, t) {
|
|
388
388
|
let n = e._zod.def, r = n.checks;
|
|
389
389
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
390
|
-
return
|
|
390
|
+
return Ge(e, j(e._zod.def, {
|
|
391
391
|
get shape() {
|
|
392
392
|
let e = {};
|
|
393
393
|
for (let r in t) {
|
|
@@ -402,7 +402,7 @@ function Je(e, t) {
|
|
|
402
402
|
function Ye(e, t) {
|
|
403
403
|
let n = e._zod.def, r = n.checks;
|
|
404
404
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
405
|
-
return
|
|
405
|
+
return Ge(e, j(e._zod.def, {
|
|
406
406
|
get shape() {
|
|
407
407
|
let r = { ...e._zod.def.shape };
|
|
408
408
|
for (let e in t) {
|
|
@@ -415,13 +415,13 @@ function Ye(e, t) {
|
|
|
415
415
|
}));
|
|
416
416
|
}
|
|
417
417
|
function Xe(e, t) {
|
|
418
|
-
if (!
|
|
418
|
+
if (!Ve(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
419
419
|
let n = e._zod.def.checks;
|
|
420
420
|
if (n && n.length > 0) {
|
|
421
421
|
let n = e._zod.def.shape;
|
|
422
422
|
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
423
423
|
}
|
|
424
|
-
return
|
|
424
|
+
return Ge(e, j(e._zod.def, { get shape() {
|
|
425
425
|
let n = {
|
|
426
426
|
...e._zod.def.shape,
|
|
427
427
|
...t
|
|
@@ -430,8 +430,8 @@ function Xe(e, t) {
|
|
|
430
430
|
} }));
|
|
431
431
|
}
|
|
432
432
|
function Ze(e, t) {
|
|
433
|
-
if (!
|
|
434
|
-
return
|
|
433
|
+
if (!Ve(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
434
|
+
return Ge(e, j(e._zod.def, { get shape() {
|
|
435
435
|
let n = {
|
|
436
436
|
...e._zod.def.shape,
|
|
437
437
|
...t
|
|
@@ -441,7 +441,7 @@ function Ze(e, t) {
|
|
|
441
441
|
}
|
|
442
442
|
function Qe(e, t) {
|
|
443
443
|
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
444
|
-
return
|
|
444
|
+
return Ge(e, j(e._zod.def, {
|
|
445
445
|
get shape() {
|
|
446
446
|
let n = {
|
|
447
447
|
...e._zod.def.shape,
|
|
@@ -458,7 +458,7 @@ function Qe(e, t) {
|
|
|
458
458
|
function $e(e, t, n) {
|
|
459
459
|
let r = t._zod.def.checks;
|
|
460
460
|
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
461
|
-
return
|
|
461
|
+
return Ge(t, j(t._zod.def, {
|
|
462
462
|
get shape() {
|
|
463
463
|
let r = t._zod.def.shape, i = { ...r };
|
|
464
464
|
if (n) for (let t in n) {
|
|
@@ -478,7 +478,7 @@ function $e(e, t, n) {
|
|
|
478
478
|
}));
|
|
479
479
|
}
|
|
480
480
|
function et(e, t, n) {
|
|
481
|
-
return
|
|
481
|
+
return Ge(t, j(t._zod.def, { get shape() {
|
|
482
482
|
let r = t._zod.def.shape, i = { ...r };
|
|
483
483
|
if (n) for (let t in n) {
|
|
484
484
|
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
@@ -583,7 +583,7 @@ var ft = (e) => (t, n, r, i) => {
|
|
|
583
583
|
if (o instanceof Promise) throw new Te();
|
|
584
584
|
if (o.issues.length) {
|
|
585
585
|
let t = new (i?.Err ?? e)(o.issues.map((e) => N(e, a, k())));
|
|
586
|
-
throw
|
|
586
|
+
throw Re(t, i?.callee), t;
|
|
587
587
|
}
|
|
588
588
|
return o.value;
|
|
589
589
|
}, pt = (e) => async (t, n, r, i) => {
|
|
@@ -596,7 +596,7 @@ var ft = (e) => (t, n, r, i) => {
|
|
|
596
596
|
}, a);
|
|
597
597
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
598
598
|
let t = new (i?.Err ?? e)(o.issues.map((e) => N(e, a, k())));
|
|
599
|
-
throw
|
|
599
|
+
throw Re(t, i?.callee), t;
|
|
600
600
|
}
|
|
601
601
|
return o.value;
|
|
602
602
|
}, mt = (e) => (t, n, r) => {
|
|
@@ -898,7 +898,7 @@ var Zt = (e) => {
|
|
|
898
898
|
t.pattern ??= rn, pn.init(e, t);
|
|
899
899
|
}), _n = /*@__PURE__*/ O("$ZodCheckIncludes", (e, t) => {
|
|
900
900
|
P.init(e, t);
|
|
901
|
-
let n =
|
|
901
|
+
let n = We(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
902
902
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
903
903
|
let t = e._zod.bag;
|
|
904
904
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
@@ -915,7 +915,7 @@ var Zt = (e) => {
|
|
|
915
915
|
};
|
|
916
916
|
}), vn = /*@__PURE__*/ O("$ZodCheckStartsWith", (e, t) => {
|
|
917
917
|
P.init(e, t);
|
|
918
|
-
let n = RegExp(`^${
|
|
918
|
+
let n = RegExp(`^${We(t.prefix)}.*`);
|
|
919
919
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
920
920
|
let t = e._zod.bag;
|
|
921
921
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -932,7 +932,7 @@ var Zt = (e) => {
|
|
|
932
932
|
};
|
|
933
933
|
}), yn = /*@__PURE__*/ O("$ZodCheckEndsWith", (e, t) => {
|
|
934
934
|
P.init(e, t);
|
|
935
|
-
let n = RegExp(`.*${
|
|
935
|
+
let n = RegExp(`.*${We(t.suffix)}$`);
|
|
936
936
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
937
937
|
let t = e._zod.bag;
|
|
938
938
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -1386,7 +1386,7 @@ var sr = /*@__PURE__*/ O("$ZodObject", (e, t) => {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
return n;
|
|
1388
1388
|
});
|
|
1389
|
-
let r =
|
|
1389
|
+
let r = ze, i = t.catchall, a;
|
|
1390
1390
|
e._zod.parse = (t, o) => {
|
|
1391
1391
|
a ??= n.value;
|
|
1392
1392
|
let s = t.value;
|
|
@@ -1415,7 +1415,7 @@ var sr = /*@__PURE__*/ O("$ZodObject", (e, t) => {
|
|
|
1415
1415
|
"payload",
|
|
1416
1416
|
"ctx"
|
|
1417
1417
|
]), n = r.value, i = (e) => {
|
|
1418
|
-
let t =
|
|
1418
|
+
let t = Ie(e);
|
|
1419
1419
|
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
|
|
1420
1420
|
};
|
|
1421
1421
|
t.write("const input = payload.value;");
|
|
@@ -1423,7 +1423,7 @@ var sr = /*@__PURE__*/ O("$ZodObject", (e, t) => {
|
|
|
1423
1423
|
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1424
1424
|
t.write("const newResult = {};");
|
|
1425
1425
|
for (let r of n.keys) {
|
|
1426
|
-
let n = a[r], o =
|
|
1426
|
+
let n = a[r], o = Ie(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
|
|
1427
1427
|
t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
|
|
1428
1428
|
if (${n}.issues.length) {
|
|
1429
1429
|
if (${o} in input) {
|
|
@@ -1488,7 +1488,7 @@ var sr = /*@__PURE__*/ O("$ZodObject", (e, t) => {
|
|
|
1488
1488
|
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1489
1489
|
let s = t.compile();
|
|
1490
1490
|
return (t, n) => s(e, t, n);
|
|
1491
|
-
}, a, o =
|
|
1491
|
+
}, a, o = ze, s = !De.jitless, c = s && Be.value, l = t.catchall, u;
|
|
1492
1492
|
e._zod.parse = (d, f) => {
|
|
1493
1493
|
u ??= r.value;
|
|
1494
1494
|
let p = d.value;
|
|
@@ -1565,7 +1565,7 @@ var ur = /*@__PURE__*/ O("$ZodUnion", (e, t) => {
|
|
|
1565
1565
|
});
|
|
1566
1566
|
e._zod.parse = (i, a) => {
|
|
1567
1567
|
let o = i.value;
|
|
1568
|
-
if (!
|
|
1568
|
+
if (!ze(o)) return i.issues.push({
|
|
1569
1569
|
code: "invalid_type",
|
|
1570
1570
|
expected: "object",
|
|
1571
1571
|
input: o,
|
|
@@ -1600,7 +1600,7 @@ function pr(e, t) {
|
|
|
1600
1600
|
valid: !0,
|
|
1601
1601
|
data: e
|
|
1602
1602
|
};
|
|
1603
|
-
if (
|
|
1603
|
+
if (Ve(e) && Ve(t)) {
|
|
1604
1604
|
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1605
1605
|
...e,
|
|
1606
1606
|
...t
|
|
@@ -1662,7 +1662,7 @@ function mr(e, t, n) {
|
|
|
1662
1662
|
var hr = /*@__PURE__*/ O("$ZodRecord", (e, t) => {
|
|
1663
1663
|
F.init(e, t), e._zod.parse = (n, r) => {
|
|
1664
1664
|
let i = n.value;
|
|
1665
|
-
if (!
|
|
1665
|
+
if (!Ve(i)) return n.issues.push({
|
|
1666
1666
|
expected: "record",
|
|
1667
1667
|
code: "invalid_type",
|
|
1668
1668
|
input: i,
|
|
@@ -1748,7 +1748,7 @@ var hr = /*@__PURE__*/ O("$ZodRecord", (e, t) => {
|
|
|
1748
1748
|
}), gr = /*@__PURE__*/ O("$ZodEnum", (e, t) => {
|
|
1749
1749
|
F.init(e, t);
|
|
1750
1750
|
let n = Oe(t.entries), r = new Set(n);
|
|
1751
|
-
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) =>
|
|
1751
|
+
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => Ue.has(typeof e)).map((e) => typeof e == "string" ? We(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1752
1752
|
let a = t.value;
|
|
1753
1753
|
return r.has(a) || t.issues.push({
|
|
1754
1754
|
code: "invalid_value",
|
|
@@ -1760,7 +1760,7 @@ var hr = /*@__PURE__*/ O("$ZodRecord", (e, t) => {
|
|
|
1760
1760
|
}), _r = /*@__PURE__*/ O("$ZodLiteral", (e, t) => {
|
|
1761
1761
|
if (F.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
|
|
1762
1762
|
let n = new Set(t.values);
|
|
1763
|
-
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ?
|
|
1763
|
+
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? We(e) : e ? We(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
|
|
1764
1764
|
let a = r.value;
|
|
1765
1765
|
return n.has(a) || r.issues.push({
|
|
1766
1766
|
code: "invalid_value",
|
|
@@ -2391,7 +2391,7 @@ function Ii() {
|
|
|
2391
2391
|
}
|
|
2392
2392
|
// @__NO_SIDE_EFFECTS__
|
|
2393
2393
|
function Li() {
|
|
2394
|
-
return /* @__PURE__ */ Mi((e) =>
|
|
2394
|
+
return /* @__PURE__ */ Mi((e) => Le(e));
|
|
2395
2395
|
}
|
|
2396
2396
|
// @__NO_SIDE_EFFECTS__
|
|
2397
2397
|
function Ri(e, t, n) {
|
|
@@ -2897,7 +2897,7 @@ var B = /*@__PURE__*/ O("ZodType", (e, t) => (F.init(e, t), Object.assign(e["~st
|
|
|
2897
2897
|
} }), e.toJSONSchema = Gi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => wa(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => Ea(e, t, n), e.parseAsync = async (t, n) => Ta(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Da(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Oa(e, t, n), e.decode = (t, n) => ka(e, t, n), e.encodeAsync = async (t, n) => Aa(e, t, n), e.decodeAsync = async (t, n) => ja(e, t, n), e.safeEncode = (t, n) => Ma(e, t, n), e.safeDecode = (t, n) => Na(e, t, n), e.safeEncodeAsync = async (t, n) => Pa(e, t, n), e.safeDecodeAsync = async (t, n) => Fa(e, t, n), La(e, "ZodType", {
|
|
2898
2898
|
check(...e) {
|
|
2899
2899
|
let t = this.def;
|
|
2900
|
-
return this.clone(
|
|
2900
|
+
return this.clone(j(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
2901
2901
|
check: e,
|
|
2902
2902
|
def: { check: "custom" },
|
|
2903
2903
|
onattach: []
|
|
@@ -2907,7 +2907,7 @@ var B = /*@__PURE__*/ O("ZodType", (e, t) => (F.init(e, t), Object.assign(e["~st
|
|
|
2907
2907
|
return this.check(...e);
|
|
2908
2908
|
},
|
|
2909
2909
|
clone(e, t) {
|
|
2910
|
-
return
|
|
2910
|
+
return Ge(this, e, t);
|
|
2911
2911
|
},
|
|
2912
2912
|
brand() {
|
|
2913
2913
|
return this;
|
|
@@ -3403,7 +3403,7 @@ function zo(e, t) {
|
|
|
3403
3403
|
type: "default",
|
|
3404
3404
|
innerType: e,
|
|
3405
3405
|
get defaultValue() {
|
|
3406
|
-
return typeof t == "function" ? t() :
|
|
3406
|
+
return typeof t == "function" ? t() : He(t);
|
|
3407
3407
|
}
|
|
3408
3408
|
});
|
|
3409
3409
|
}
|
|
@@ -3415,7 +3415,7 @@ function Vo(e, t) {
|
|
|
3415
3415
|
type: "prefault",
|
|
3416
3416
|
innerType: e,
|
|
3417
3417
|
get defaultValue() {
|
|
3418
|
-
return typeof t == "function" ? t() :
|
|
3418
|
+
return typeof t == "function" ? t() : He(t);
|
|
3419
3419
|
}
|
|
3420
3420
|
});
|
|
3421
3421
|
}
|
|
@@ -3564,6 +3564,7 @@ var as = K({
|
|
|
3564
3564
|
unreach: W().nullable(),
|
|
3565
3565
|
configPending: W().nullable(),
|
|
3566
3566
|
sabotage: W().nullable(),
|
|
3567
|
+
deviceId: U().int().nullable().default(null),
|
|
3567
3568
|
keyChannels: G(os).default([]),
|
|
3568
3569
|
channels: G(ss).default([])
|
|
3569
3570
|
})) }), ls = ["hmip.heating.group", "HomeMatic.heating"], us = K({
|
|
@@ -3879,11 +3880,14 @@ var { useT: X, Trans: Is, translate: Ls } = s("provider-homematic", {
|
|
|
3879
3880
|
buttonChannel: "Channel {{index}}",
|
|
3880
3881
|
enableButtonEvents: "Enable button events",
|
|
3881
3882
|
disableButtonEvents: "Disable button events",
|
|
3882
|
-
enableButtonEventsMessage: "Create a central link for {{name}}. Direct links stay.",
|
|
3883
|
+
enableButtonEventsMessage: "Create a central link for {{name}} and, for HomematicIP, a CCU program named \"CamStack: … events\" (named after the device) that uses the key (a HomematicIP device sends key presses only for a used key). Direct links stay.",
|
|
3883
3884
|
disableButtonEventsMessage: "Remove the central link for {{name}}. Direct links stay.",
|
|
3884
3885
|
directLinks: "Direct links: {{targets}}",
|
|
3885
3886
|
directLinksNone: "No direct links",
|
|
3886
|
-
renameAction: "Rename on the CCU"
|
|
3887
|
+
renameAction: "Rename on the CCU",
|
|
3888
|
+
buttonEventsSaving: "Saving…",
|
|
3889
|
+
buttonEventsSaved: "Saved",
|
|
3890
|
+
openDevicePage: "Open device page"
|
|
3887
3891
|
},
|
|
3888
3892
|
heating: {
|
|
3889
3893
|
loadFailed: "Could not read the heating setup",
|
|
@@ -3998,7 +4002,12 @@ var { useT: X, Trans: Is, translate: Ls } = s("provider-homematic", {
|
|
|
3998
4002
|
profileConfirm: "Write profile",
|
|
3999
4003
|
deleteTitle: "Delete direct link",
|
|
4000
4004
|
deleteMessage: "Delete the link {{link}} on the CCU? The key will no longer switch that actuator directly.",
|
|
4001
|
-
deleteConfirm: "Delete link"
|
|
4005
|
+
deleteConfirm: "Delete link",
|
|
4006
|
+
searchPlaceholder: "Search sender, receiver, name, profile",
|
|
4007
|
+
searchLabel: "Search links",
|
|
4008
|
+
facetsLabel: "Profile",
|
|
4009
|
+
clearFilters: "Clear filters",
|
|
4010
|
+
noMatch: "No links match the filter"
|
|
4002
4011
|
},
|
|
4003
4012
|
rename: {
|
|
4004
4013
|
title: "Rename {{name}}",
|
|
@@ -4177,11 +4186,14 @@ var { useT: X, Trans: Is, translate: Ls } = s("provider-homematic", {
|
|
|
4177
4186
|
buttonChannel: "Canale {{index}}",
|
|
4178
4187
|
enableButtonEvents: "Abilita eventi pulsante",
|
|
4179
4188
|
disableButtonEvents: "Disabilita eventi pulsante",
|
|
4180
|
-
enableButtonEventsMessage: "Crea un collegamento centrale per {{name}}. I collegamenti diretti restano.",
|
|
4189
|
+
enableButtonEventsMessage: "Crea un collegamento centrale per {{name}} e, per HomematicIP, un programma CCU \"CamStack: … events\" (col nome del dispositivo) che usa il tasto (un dispositivo HomematicIP invia le pressioni solo per un tasto usato). I collegamenti diretti restano.",
|
|
4181
4190
|
disableButtonEventsMessage: "Rimuove il collegamento centrale di {{name}}. I collegamenti diretti restano.",
|
|
4182
4191
|
directLinks: "Collegamenti diretti: {{targets}}",
|
|
4183
4192
|
directLinksNone: "Nessun collegamento diretto",
|
|
4184
|
-
renameAction: "Rinomina sulla CCU"
|
|
4193
|
+
renameAction: "Rinomina sulla CCU",
|
|
4194
|
+
buttonEventsSaving: "Salvataggio…",
|
|
4195
|
+
buttonEventsSaved: "Salvato",
|
|
4196
|
+
openDevicePage: "Apri la pagina del dispositivo"
|
|
4185
4197
|
},
|
|
4186
4198
|
heating: {
|
|
4187
4199
|
loadFailed: "Impossibile leggere il riscaldamento",
|
|
@@ -4296,7 +4308,12 @@ var { useT: X, Trans: Is, translate: Ls } = s("provider-homematic", {
|
|
|
4296
4308
|
profileConfirm: "Scrivi profilo",
|
|
4297
4309
|
deleteTitle: "Elimina collegamento diretto",
|
|
4298
4310
|
deleteMessage: "Eliminare il collegamento {{link}} sulla CCU? Il tasto non comanderà più direttamente quell'attuatore.",
|
|
4299
|
-
deleteConfirm: "Elimina collegamento"
|
|
4311
|
+
deleteConfirm: "Elimina collegamento",
|
|
4312
|
+
searchPlaceholder: "Cerca mittente, destinatario, nome, profilo",
|
|
4313
|
+
searchLabel: "Cerca collegamenti",
|
|
4314
|
+
facetsLabel: "Profilo",
|
|
4315
|
+
clearFilters: "Azzera filtri",
|
|
4316
|
+
noMatch: "Nessun collegamento corrisponde al filtro"
|
|
4300
4317
|
},
|
|
4301
4318
|
rename: {
|
|
4302
4319
|
title: "Rinomina {{name}}",
|
|
@@ -4566,7 +4583,7 @@ function Gs(t) {
|
|
|
4566
4583
|
return /* @__PURE__ */ T(S, {
|
|
4567
4584
|
open: !0,
|
|
4568
4585
|
onClose: o,
|
|
4569
|
-
icon:
|
|
4586
|
+
icon: Se,
|
|
4570
4587
|
width: "lg",
|
|
4571
4588
|
title: s("config.title", { name: i.name ?? i.address }),
|
|
4572
4589
|
testId: "hm-config-dialog",
|
|
@@ -4630,30 +4647,43 @@ function qs(e) {
|
|
|
4630
4647
|
return t === null ? e.receiver : `${t} (${e.receiver})`;
|
|
4631
4648
|
}
|
|
4632
4649
|
function Js(e) {
|
|
4633
|
-
let { trpc: t, integrationId: n, device: r, onClose: i, onChanged: o } = e, { t: s } = X(),
|
|
4634
|
-
let
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4650
|
+
let { trpc: t, integrationId: n, device: r, onClose: i, onChanged: o } = e, { t: s } = X(), c = ee(), [l, u] = a({}), d = async (e) => {
|
|
4651
|
+
let i = e.central !== "on", a = e.name ?? `${r.name ?? r.address} ch${e.index}`;
|
|
4652
|
+
if (await c({
|
|
4653
|
+
title: s(i ? "devices.enableButtonEvents" : "devices.disableButtonEvents"),
|
|
4654
|
+
message: s(i ? "devices.enableButtonEventsMessage" : "devices.disableButtonEventsMessage", { name: a }),
|
|
4655
|
+
confirmLabel: s(i ? "devices.enableButtonEvents" : "devices.disableButtonEvents")
|
|
4656
|
+
})) {
|
|
4657
|
+
u((t) => ({
|
|
4658
|
+
...t,
|
|
4659
|
+
[e.address]: { kind: "busy" }
|
|
4660
|
+
}));
|
|
4661
|
+
try {
|
|
4662
|
+
await Us(t, "setButtonEvents", {
|
|
4640
4663
|
integrationId: n,
|
|
4641
4664
|
address: e.address,
|
|
4642
|
-
enabled:
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
}
|
|
4649
|
-
|
|
4650
|
-
|
|
4665
|
+
enabled: i,
|
|
4666
|
+
confirmed: !0
|
|
4667
|
+
}, Y), u((t) => ({
|
|
4668
|
+
...t,
|
|
4669
|
+
[e.address]: { kind: "saved" }
|
|
4670
|
+
})), o();
|
|
4671
|
+
} catch (t) {
|
|
4672
|
+
let n = t instanceof Error ? t.message : String(t);
|
|
4673
|
+
u((t) => ({
|
|
4674
|
+
...t,
|
|
4675
|
+
[e.address]: {
|
|
4676
|
+
kind: "error",
|
|
4677
|
+
message: n
|
|
4678
|
+
}
|
|
4679
|
+
}));
|
|
4680
|
+
}
|
|
4651
4681
|
}
|
|
4652
4682
|
};
|
|
4653
4683
|
return /* @__PURE__ */ T(S, {
|
|
4654
4684
|
open: !0,
|
|
4655
4685
|
onClose: i,
|
|
4656
|
-
icon:
|
|
4686
|
+
icon: _e,
|
|
4657
4687
|
width: "md",
|
|
4658
4688
|
title: s("devices.buttonEventsTitle", { name: r.name ?? r.address }),
|
|
4659
4689
|
testId: "hm-button-events-dialog",
|
|
@@ -4662,41 +4692,66 @@ function Js(e) {
|
|
|
4662
4692
|
children: [/* @__PURE__ */ T("p", {
|
|
4663
4693
|
className: "text-sm text-foreground-subtle",
|
|
4664
4694
|
children: s("devices.buttonEventsHint")
|
|
4665
|
-
}), r.keyChannels.map((e) => /* @__PURE__ */
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
children: [
|
|
4670
|
-
/* @__PURE__ */ T("span", {
|
|
4671
|
-
className: "text-sm text-foreground",
|
|
4672
|
-
children: e.name ?? s("devices.buttonChannel", { index: e.index })
|
|
4673
|
-
}),
|
|
4674
|
-
/* @__PURE__ */ T("span", {
|
|
4675
|
-
className: "text-xs text-foreground-subtle",
|
|
4676
|
-
children: s("devices.buttonEventsStatus", { state: s(Ks(e.central)) })
|
|
4677
|
-
}),
|
|
4678
|
-
e.central !== "unknown" && /* @__PURE__ */ T("span", {
|
|
4679
|
-
className: "text-xs text-foreground-subtle",
|
|
4680
|
-
children: e.links.length === 0 ? s("devices.directLinksNone") : s("devices.directLinks", { targets: e.links.map(qs).join(", ") })
|
|
4681
|
-
})
|
|
4682
|
-
]
|
|
4683
|
-
}), e.central === "on" || e.central === "off" ? /* @__PURE__ */ T(c, {
|
|
4684
|
-
type: "button",
|
|
4685
|
-
variant: e.central === "on" ? "secondary" : "primary",
|
|
4686
|
-
disabled: u !== null,
|
|
4687
|
-
onClick: () => void f(e),
|
|
4688
|
-
children: s(e.central === "on" ? "devices.disableButtonEvents" : "devices.enableButtonEvents")
|
|
4689
|
-
}) : /* @__PURE__ */ T(g, {
|
|
4690
|
-
variant: "info",
|
|
4691
|
-
children: s(Ks(e.central))
|
|
4692
|
-
})]
|
|
4695
|
+
}), r.keyChannels.map((e) => /* @__PURE__ */ T(Ys, {
|
|
4696
|
+
channel: e,
|
|
4697
|
+
write: l[e.address],
|
|
4698
|
+
onToggle: () => void d(e)
|
|
4693
4699
|
}, e.address))]
|
|
4694
4700
|
})
|
|
4695
4701
|
});
|
|
4696
4702
|
}
|
|
4703
|
+
function Ys(e) {
|
|
4704
|
+
let { channel: t, write: n, onToggle: r } = e, { t: i } = X();
|
|
4705
|
+
return /* @__PURE__ */ E("div", {
|
|
4706
|
+
className: "flex items-center justify-between gap-3",
|
|
4707
|
+
"aria-busy": n?.kind === "busy",
|
|
4708
|
+
children: [/* @__PURE__ */ E("div", {
|
|
4709
|
+
className: "flex flex-col",
|
|
4710
|
+
children: [
|
|
4711
|
+
/* @__PURE__ */ T("span", {
|
|
4712
|
+
className: "text-sm text-foreground",
|
|
4713
|
+
children: t.name ?? i("devices.buttonChannel", { index: t.index })
|
|
4714
|
+
}),
|
|
4715
|
+
/* @__PURE__ */ T("span", {
|
|
4716
|
+
className: "text-xs text-foreground-subtle",
|
|
4717
|
+
children: i("devices.buttonEventsStatus", { state: i(Ks(t.central)) })
|
|
4718
|
+
}),
|
|
4719
|
+
t.central !== "unknown" && /* @__PURE__ */ T("span", {
|
|
4720
|
+
className: "text-xs text-foreground-subtle",
|
|
4721
|
+
children: t.links.length === 0 ? i("devices.directLinksNone") : i("devices.directLinks", { targets: t.links.map(qs).join(", ") })
|
|
4722
|
+
})
|
|
4723
|
+
]
|
|
4724
|
+
}), /* @__PURE__ */ E("div", {
|
|
4725
|
+
className: "flex flex-col items-end gap-1",
|
|
4726
|
+
children: [/* @__PURE__ */ T(Xs, { write: n }), t.central === "on" || t.central === "off" ? /* @__PURE__ */ T(c, {
|
|
4727
|
+
type: "button",
|
|
4728
|
+
variant: t.central === "on" ? "secondary" : "primary",
|
|
4729
|
+
disabled: n?.kind === "busy",
|
|
4730
|
+
onClick: r,
|
|
4731
|
+
children: i(t.central === "on" ? "devices.disableButtonEvents" : "devices.enableButtonEvents")
|
|
4732
|
+
}) : /* @__PURE__ */ T(g, {
|
|
4733
|
+
variant: "info",
|
|
4734
|
+
children: i(Ks(t.central))
|
|
4735
|
+
})]
|
|
4736
|
+
})]
|
|
4737
|
+
});
|
|
4738
|
+
}
|
|
4739
|
+
function Xs(e) {
|
|
4740
|
+
let { write: t } = e, { t: n } = X();
|
|
4741
|
+
return t === void 0 ? null : t.kind === "busy" ? /* @__PURE__ */ T("span", {
|
|
4742
|
+
className: "text-xs text-foreground-subtle",
|
|
4743
|
+
children: n("devices.buttonEventsSaving")
|
|
4744
|
+
}) : t.kind === "saved" ? /* @__PURE__ */ T("span", {
|
|
4745
|
+
className: "text-xs text-success",
|
|
4746
|
+
children: n("devices.buttonEventsSaved")
|
|
4747
|
+
}) : /* @__PURE__ */ T("span", {
|
|
4748
|
+
className: "text-xs text-danger",
|
|
4749
|
+
children: t.message
|
|
4750
|
+
});
|
|
4751
|
+
}
|
|
4697
4752
|
//#endregion
|
|
4698
4753
|
//#region src/ui/DeleteDeviceDialog.tsx
|
|
4699
|
-
function
|
|
4754
|
+
function Zs(e) {
|
|
4700
4755
|
let { device: t, onClose: n, onDelete: r } = e, { t: i } = X(), [o, s] = a(!1), [l, u] = a(!1), [d, f] = a(!1), m = async () => {
|
|
4701
4756
|
f(!0);
|
|
4702
4757
|
try {
|
|
@@ -4711,7 +4766,7 @@ function Ys(e) {
|
|
|
4711
4766
|
return /* @__PURE__ */ T(S, {
|
|
4712
4767
|
open: !0,
|
|
4713
4768
|
onClose: n,
|
|
4714
|
-
icon:
|
|
4769
|
+
icon: Ce,
|
|
4715
4770
|
width: "md",
|
|
4716
4771
|
title: i("devices.deleteDialogTitle", { name: t.name ?? t.address }),
|
|
4717
4772
|
testId: "hm-delete-device-dialog",
|
|
@@ -4750,7 +4805,7 @@ function Ys(e) {
|
|
|
4750
4805
|
}
|
|
4751
4806
|
//#endregion
|
|
4752
4807
|
//#region src/ui/RenameDeviceDialog.tsx
|
|
4753
|
-
function
|
|
4808
|
+
function Qs(e) {
|
|
4754
4809
|
let { channel: t, onRename: n } = e, { t: r } = X(), [i, o] = a(t.name ?? ""), [s, l] = a(!1), u = i.trim() !== "" && i.trim() !== (t.name ?? ""), d = async () => {
|
|
4755
4810
|
l(!0);
|
|
4756
4811
|
try {
|
|
@@ -4783,7 +4838,7 @@ function Xs(e) {
|
|
|
4783
4838
|
]
|
|
4784
4839
|
});
|
|
4785
4840
|
}
|
|
4786
|
-
function
|
|
4841
|
+
function $s(e) {
|
|
4787
4842
|
let { device: t, onClose: n, onRenameDevice: r, onRenameChannel: i } = e, { t: o } = X(), [s, l] = a(t.name ?? ""), [u, d] = a(!1), [f, h] = a(!1), g = s.trim() !== "" && !f, _ = async () => {
|
|
4788
4843
|
h(!0);
|
|
4789
4844
|
try {
|
|
@@ -4798,7 +4853,7 @@ function Zs(e) {
|
|
|
4798
4853
|
return /* @__PURE__ */ T(S, {
|
|
4799
4854
|
open: !0,
|
|
4800
4855
|
onClose: n,
|
|
4801
|
-
icon:
|
|
4856
|
+
icon: ve,
|
|
4802
4857
|
width: "md",
|
|
4803
4858
|
title: o("rename.title", { name: t.name ?? t.address }),
|
|
4804
4859
|
testId: "hm-rename-dialog",
|
|
@@ -4832,7 +4887,7 @@ function Zs(e) {
|
|
|
4832
4887
|
description: o("rename.channelsHint"),
|
|
4833
4888
|
children: /* @__PURE__ */ T("ul", {
|
|
4834
4889
|
className: "flex flex-col gap-2",
|
|
4835
|
-
children: t.channels.map((e) => /* @__PURE__ */ T(
|
|
4890
|
+
children: t.channels.map((e) => /* @__PURE__ */ T(Qs, {
|
|
4836
4891
|
channel: e,
|
|
4837
4892
|
onRename: i
|
|
4838
4893
|
}, e.address))
|
|
@@ -4844,10 +4899,10 @@ function Zs(e) {
|
|
|
4844
4899
|
}
|
|
4845
4900
|
//#endregion
|
|
4846
4901
|
//#region src/ui/CcuDevicesTab.tsx
|
|
4847
|
-
function
|
|
4902
|
+
function ec(e) {
|
|
4848
4903
|
return e.unreach === !0 ? "unreach" : e.sabotage === !0 ? "sabotage" : e.lowBattery === !0 ? "lowBattery" : e.configPending === !0 ? "configPending" : "ok";
|
|
4849
4904
|
}
|
|
4850
|
-
var
|
|
4905
|
+
var tc = {
|
|
4851
4906
|
searchText: (e) => [
|
|
4852
4907
|
e.name ?? "",
|
|
4853
4908
|
e.address,
|
|
@@ -4857,18 +4912,56 @@ var $s = {
|
|
|
4857
4912
|
],
|
|
4858
4913
|
facetGroups: [{
|
|
4859
4914
|
id: "issue",
|
|
4860
|
-
value:
|
|
4915
|
+
value: ec
|
|
4861
4916
|
}, {
|
|
4862
4917
|
id: "type",
|
|
4863
4918
|
value: (e) => e.type
|
|
4864
4919
|
}]
|
|
4865
4920
|
};
|
|
4866
|
-
function
|
|
4921
|
+
function nc(e) {
|
|
4867
4922
|
return e.rssi === null ? "—" : `${e.rssi} dBm`;
|
|
4868
4923
|
}
|
|
4869
|
-
function
|
|
4870
|
-
|
|
4871
|
-
|
|
4924
|
+
function rc(e) {
|
|
4925
|
+
return `/devices/${e}`;
|
|
4926
|
+
}
|
|
4927
|
+
function ic(e, t, n) {
|
|
4928
|
+
let r = ac(e, t, n);
|
|
4929
|
+
return r === null ? [] : [r];
|
|
4930
|
+
}
|
|
4931
|
+
function ac(e, t, n) {
|
|
4932
|
+
let r = e.deviceId;
|
|
4933
|
+
if (r === null) return null;
|
|
4934
|
+
let i = rc(r);
|
|
4935
|
+
return {
|
|
4936
|
+
id: "open-device",
|
|
4937
|
+
label: t,
|
|
4938
|
+
icon: me,
|
|
4939
|
+
onClick: () => n(i)
|
|
4940
|
+
};
|
|
4941
|
+
}
|
|
4942
|
+
function oc(e) {
|
|
4943
|
+
let { row: t, navigate: n } = e, r = t.name ?? t.address, i = t.deviceId, a = i === null ? null : rc(i);
|
|
4944
|
+
return /* @__PURE__ */ E("div", {
|
|
4945
|
+
className: "flex flex-col",
|
|
4946
|
+
children: [a === null ? /* @__PURE__ */ T("span", {
|
|
4947
|
+
className: "text-foreground",
|
|
4948
|
+
children: r
|
|
4949
|
+
}) : /* @__PURE__ */ T("a", {
|
|
4950
|
+
href: a,
|
|
4951
|
+
className: "text-primary hover:underline",
|
|
4952
|
+
onClick: (e) => {
|
|
4953
|
+
e.preventDefault(), n(a);
|
|
4954
|
+
},
|
|
4955
|
+
children: r
|
|
4956
|
+
}), t.name !== null && /* @__PURE__ */ T("span", {
|
|
4957
|
+
className: "text-xs text-foreground-subtle",
|
|
4958
|
+
children: t.address
|
|
4959
|
+
})]
|
|
4960
|
+
});
|
|
4961
|
+
}
|
|
4962
|
+
function sc(t) {
|
|
4963
|
+
let { trpc: n, integrationId: r, navigate: i } = t, { t: o } = X(), s = Q(n, "listCcuDevices", e(() => ({ integrationId: r }), [r]), cs), c = e(() => s.data?.devices ?? [], [s.data]), l = _(c, tc), u = Ws(n), [d, f] = a(null), [p, m] = a(null), [h, v] = a(null), [b, S] = a(null), ee = async (e, t) => {
|
|
4964
|
+
await u({
|
|
4872
4965
|
action: "renameCcuDevice",
|
|
4873
4966
|
input: {
|
|
4874
4967
|
integrationId: r,
|
|
@@ -4877,15 +4970,15 @@ function tc(t) {
|
|
|
4877
4970
|
renameChannels: t.renameChannels
|
|
4878
4971
|
},
|
|
4879
4972
|
schema: Os,
|
|
4880
|
-
title:
|
|
4881
|
-
message:
|
|
4973
|
+
title: o("rename.deviceTitle"),
|
|
4974
|
+
message: o(t.renameChannels ? "rename.deviceMessageChannels" : "rename.deviceMessage", {
|
|
4882
4975
|
from: e.name ?? e.address,
|
|
4883
4976
|
to: t.name.trim()
|
|
4884
4977
|
}),
|
|
4885
|
-
confirmLabel:
|
|
4886
|
-
}) !== null && (
|
|
4887
|
-
},
|
|
4888
|
-
await
|
|
4978
|
+
confirmLabel: o("rename.deviceConfirm")
|
|
4979
|
+
}) !== null && (S(null), s.reload());
|
|
4980
|
+
}, ne = async (e, t) => {
|
|
4981
|
+
await u({
|
|
4889
4982
|
action: "renameCcuChannel",
|
|
4890
4983
|
input: {
|
|
4891
4984
|
integrationId: r,
|
|
@@ -4893,15 +4986,15 @@ function tc(t) {
|
|
|
4893
4986
|
name: t
|
|
4894
4987
|
},
|
|
4895
4988
|
schema: Ds,
|
|
4896
|
-
title:
|
|
4897
|
-
message:
|
|
4989
|
+
title: o("rename.channelTitle"),
|
|
4990
|
+
message: o("rename.channelMessage", {
|
|
4898
4991
|
from: e.name ?? e.address,
|
|
4899
4992
|
to: t.trim()
|
|
4900
4993
|
}),
|
|
4901
|
-
confirmLabel:
|
|
4902
|
-
}) !== null &&
|
|
4903
|
-
},
|
|
4904
|
-
await
|
|
4994
|
+
confirmLabel: o("rename.channelConfirm")
|
|
4995
|
+
}) !== null && s.reload();
|
|
4996
|
+
}, w = async (e, t) => {
|
|
4997
|
+
await u({
|
|
4905
4998
|
action: "deleteCcuDevice",
|
|
4906
4999
|
input: {
|
|
4907
5000
|
integrationId: r,
|
|
@@ -4910,72 +5003,66 @@ function tc(t) {
|
|
|
4910
5003
|
force: t.force
|
|
4911
5004
|
},
|
|
4912
5005
|
schema: Y,
|
|
4913
|
-
title:
|
|
4914
|
-
message:
|
|
4915
|
-
confirmLabel:
|
|
5006
|
+
title: o("devices.deleteTitle"),
|
|
5007
|
+
message: o(t.reset ? "devices.deleteMessageReset" : "devices.deleteMessage", { name: e.name ?? e.address }),
|
|
5008
|
+
confirmLabel: o("devices.deleteConfirm"),
|
|
4916
5009
|
variant: "danger"
|
|
4917
|
-
}) !== null && (
|
|
4918
|
-
},
|
|
5010
|
+
}) !== null && (f(null), s.reload());
|
|
5011
|
+
}, re = e(() => [
|
|
4919
5012
|
{
|
|
4920
5013
|
key: "name",
|
|
4921
|
-
header:
|
|
4922
|
-
render: (e) => /* @__PURE__ */
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
className: "text-foreground",
|
|
4926
|
-
children: e.name ?? e.address
|
|
4927
|
-
}), e.name !== null && /* @__PURE__ */ T("span", {
|
|
4928
|
-
className: "text-xs text-foreground-subtle",
|
|
4929
|
-
children: e.address
|
|
4930
|
-
})]
|
|
5014
|
+
header: o("devices.colDevice"),
|
|
5015
|
+
render: (e) => /* @__PURE__ */ T(oc, {
|
|
5016
|
+
row: e,
|
|
5017
|
+
navigate: i
|
|
4931
5018
|
}),
|
|
4932
5019
|
sortValue: (e) => e.name ?? e.address
|
|
4933
5020
|
},
|
|
4934
5021
|
{
|
|
4935
5022
|
key: "type",
|
|
4936
|
-
header:
|
|
5023
|
+
header: o("devices.colType"),
|
|
4937
5024
|
render: (e) => e.type,
|
|
4938
5025
|
sortValue: (e) => e.type
|
|
4939
5026
|
},
|
|
4940
5027
|
{
|
|
4941
5028
|
key: "place",
|
|
4942
|
-
header:
|
|
5029
|
+
header: o("devices.colPlace"),
|
|
4943
5030
|
nowrap: !1,
|
|
4944
5031
|
render: (e) => Z([...e.rooms, ...e.functions].join(", ")),
|
|
4945
5032
|
sortValue: (e) => e.rooms.join(", ")
|
|
4946
5033
|
},
|
|
4947
5034
|
{
|
|
4948
5035
|
key: "firmware",
|
|
4949
|
-
header:
|
|
5036
|
+
header: o("devices.colFirmware"),
|
|
4950
5037
|
render: (e) => /* @__PURE__ */ E("span", {
|
|
4951
5038
|
className: "flex items-center gap-1",
|
|
4952
5039
|
children: [Z(e.firmware), e.updatable === !0 && e.availableFirmware !== null && /* @__PURE__ */ T(g, {
|
|
4953
5040
|
variant: "info",
|
|
4954
|
-
children:
|
|
5041
|
+
children: o("devices.updateTo", { version: e.availableFirmware })
|
|
4955
5042
|
})]
|
|
4956
5043
|
}),
|
|
4957
5044
|
sortValue: (e) => e.firmware
|
|
4958
5045
|
},
|
|
4959
5046
|
{
|
|
4960
5047
|
key: "signal",
|
|
4961
|
-
header:
|
|
5048
|
+
header: o("devices.colSignal"),
|
|
4962
5049
|
align: "right",
|
|
4963
|
-
render:
|
|
5050
|
+
render: nc,
|
|
4964
5051
|
sortValue: (e) => e.rssi
|
|
4965
5052
|
},
|
|
4966
5053
|
{
|
|
4967
5054
|
key: "duty",
|
|
4968
|
-
header:
|
|
5055
|
+
header: o("devices.colDutyCycle"),
|
|
4969
5056
|
align: "right",
|
|
4970
5057
|
render: (e) => e.dutyCycleLimited === !0 ? /* @__PURE__ */ T(g, {
|
|
4971
5058
|
variant: "warning",
|
|
4972
|
-
children:
|
|
5059
|
+
children: o("devices.dutyLimited")
|
|
4973
5060
|
}) : Rs(e.dutyCycle),
|
|
4974
5061
|
sortValue: (e) => e.dutyCycle
|
|
4975
5062
|
},
|
|
4976
5063
|
{
|
|
4977
5064
|
key: "health",
|
|
4978
|
-
header:
|
|
5065
|
+
header: o("devices.colHealth"),
|
|
4979
5066
|
nowrap: !1,
|
|
4980
5067
|
notSortableReason: "A set of flags, not one value",
|
|
4981
5068
|
render: (e) => /* @__PURE__ */ E("span", {
|
|
@@ -4983,29 +5070,29 @@ function tc(t) {
|
|
|
4983
5070
|
children: [
|
|
4984
5071
|
e.unreach === !0 && /* @__PURE__ */ T(g, {
|
|
4985
5072
|
variant: "danger",
|
|
4986
|
-
children:
|
|
5073
|
+
children: o("devices.unreach")
|
|
4987
5074
|
}),
|
|
4988
5075
|
e.sabotage === !0 && /* @__PURE__ */ T(g, {
|
|
4989
5076
|
variant: "danger",
|
|
4990
|
-
children:
|
|
5077
|
+
children: o("devices.sabotage")
|
|
4991
5078
|
}),
|
|
4992
5079
|
e.lowBattery === !0 && /* @__PURE__ */ T(g, {
|
|
4993
5080
|
variant: "warning",
|
|
4994
|
-
children:
|
|
5081
|
+
children: o("devices.lowBattery")
|
|
4995
5082
|
}),
|
|
4996
5083
|
e.configPending === !0 && /* @__PURE__ */ T(g, {
|
|
4997
5084
|
variant: "info",
|
|
4998
|
-
children:
|
|
5085
|
+
children: o("devices.configPending")
|
|
4999
5086
|
}),
|
|
5000
|
-
|
|
5087
|
+
ec(e) === "ok" && /* @__PURE__ */ T(g, {
|
|
5001
5088
|
variant: "success",
|
|
5002
|
-
children:
|
|
5089
|
+
children: o("devices.ok")
|
|
5003
5090
|
}),
|
|
5004
5091
|
e.keyChannels.map((e) => /* @__PURE__ */ T(g, {
|
|
5005
5092
|
variant: e.central === "on" ? "success" : "warning",
|
|
5006
|
-
children:
|
|
5093
|
+
children: o("devices.buttonEventsBadge", {
|
|
5007
5094
|
index: e.index,
|
|
5008
|
-
state:
|
|
5095
|
+
state: o(Ks(e.central))
|
|
5009
5096
|
})
|
|
5010
5097
|
}, e.address))
|
|
5011
5098
|
]
|
|
@@ -5017,105 +5104,104 @@ function tc(t) {
|
|
|
5017
5104
|
align: "right",
|
|
5018
5105
|
notSortableReason: "Action column",
|
|
5019
5106
|
render: (e) => /* @__PURE__ */ T(y, { items: [
|
|
5107
|
+
...ic(e, o("devices.openDevicePage"), i),
|
|
5020
5108
|
...e.keyChannels.length > 0 ? [{
|
|
5021
5109
|
id: "button-events",
|
|
5022
|
-
label:
|
|
5023
|
-
icon:
|
|
5024
|
-
onClick: () =>
|
|
5110
|
+
label: o("devices.buttonEventsAction"),
|
|
5111
|
+
icon: _e,
|
|
5112
|
+
onClick: () => v(e.address)
|
|
5025
5113
|
}] : [],
|
|
5026
5114
|
{
|
|
5027
5115
|
id: "rename",
|
|
5028
|
-
label:
|
|
5029
|
-
icon:
|
|
5030
|
-
onClick: () =>
|
|
5116
|
+
label: o("devices.renameAction"),
|
|
5117
|
+
icon: ve,
|
|
5118
|
+
onClick: () => S(e)
|
|
5031
5119
|
},
|
|
5032
5120
|
{
|
|
5033
5121
|
id: "configure",
|
|
5034
|
-
label:
|
|
5035
|
-
icon:
|
|
5036
|
-
onClick: () =>
|
|
5122
|
+
label: o("devices.configureAction"),
|
|
5123
|
+
icon: Se,
|
|
5124
|
+
onClick: () => m(e)
|
|
5037
5125
|
},
|
|
5038
5126
|
{
|
|
5039
5127
|
id: "delete",
|
|
5040
|
-
label:
|
|
5041
|
-
icon:
|
|
5128
|
+
label: o("devices.deleteAction"),
|
|
5129
|
+
icon: Ce,
|
|
5042
5130
|
danger: !0,
|
|
5043
|
-
onClick: () =>
|
|
5131
|
+
onClick: () => f(e)
|
|
5044
5132
|
}
|
|
5045
5133
|
] })
|
|
5046
5134
|
}
|
|
5047
|
-
], [i]);
|
|
5048
|
-
if (
|
|
5049
|
-
title:
|
|
5050
|
-
message:
|
|
5051
|
-
onRetry:
|
|
5135
|
+
], [i, o]);
|
|
5136
|
+
if (s.error !== null) return /* @__PURE__ */ T(C, {
|
|
5137
|
+
title: o("devices.loadFailed"),
|
|
5138
|
+
message: s.error,
|
|
5139
|
+
onRetry: s.reload
|
|
5052
5140
|
});
|
|
5053
|
-
let
|
|
5054
|
-
issue:
|
|
5055
|
-
type:
|
|
5056
|
-
},
|
|
5141
|
+
let ie = h === null ? null : c.find((e) => e.address === h) ?? null, ae = {
|
|
5142
|
+
issue: o("devices.groupIssue"),
|
|
5143
|
+
type: o("devices.groupType")
|
|
5144
|
+
}, oe = (e) => e === "unreach" || e === "sabotage" || e === "lowBattery" || e === "configPending" || e === "ok" ? o(`devices.${e}`) : e;
|
|
5057
5145
|
return /* @__PURE__ */ E("div", {
|
|
5058
5146
|
className: "flex flex-col gap-3",
|
|
5059
5147
|
children: [
|
|
5060
|
-
/* @__PURE__ */ T(
|
|
5061
|
-
state:
|
|
5062
|
-
facets:
|
|
5063
|
-
groups:
|
|
5148
|
+
/* @__PURE__ */ T(te, {
|
|
5149
|
+
state: l.state,
|
|
5150
|
+
facets: l.facets,
|
|
5151
|
+
groups: l.groups.map((e) => ({
|
|
5064
5152
|
...e,
|
|
5065
|
-
label:
|
|
5066
|
-
...e.id === "issue" ? { facetLabel:
|
|
5153
|
+
label: ae[e.id] ?? e.id,
|
|
5154
|
+
...e.id === "issue" ? { facetLabel: oe } : {}
|
|
5067
5155
|
})),
|
|
5068
5156
|
labels: {
|
|
5069
|
-
searchPlaceholder:
|
|
5070
|
-
searchLabel:
|
|
5071
|
-
facetsLabel:
|
|
5072
|
-
clearLabel:
|
|
5157
|
+
searchPlaceholder: o("devices.searchPlaceholder"),
|
|
5158
|
+
searchLabel: o("devices.searchLabel"),
|
|
5159
|
+
facetsLabel: o("devices.facetsLabel"),
|
|
5160
|
+
clearLabel: o("devices.clearFilters")
|
|
5073
5161
|
},
|
|
5074
|
-
onSearch:
|
|
5075
|
-
onToggleFacet:
|
|
5076
|
-
onToggleGroupFacet:
|
|
5077
|
-
onClear:
|
|
5162
|
+
onSearch: l.setSearch,
|
|
5163
|
+
onToggleFacet: l.toggleFacet,
|
|
5164
|
+
onToggleGroupFacet: l.toggleGroupFacet,
|
|
5165
|
+
onClear: l.clear
|
|
5078
5166
|
}),
|
|
5079
|
-
/* @__PURE__ */ T(
|
|
5080
|
-
columns:
|
|
5081
|
-
rows:
|
|
5167
|
+
/* @__PURE__ */ T(x, {
|
|
5168
|
+
columns: re,
|
|
5169
|
+
rows: l.rows,
|
|
5082
5170
|
rowKey: (e) => e.address,
|
|
5083
5171
|
minWidthPx: 760,
|
|
5084
5172
|
pageSize: 25,
|
|
5085
|
-
emptyMessage:
|
|
5173
|
+
emptyMessage: s.loading ? o("common.loading") : l.active ? o("devices.noMatch") : o("devices.none")
|
|
5086
5174
|
}),
|
|
5087
|
-
|
|
5175
|
+
p !== null && /* @__PURE__ */ T(Gs, {
|
|
5088
5176
|
trpc: n,
|
|
5089
5177
|
integrationId: r,
|
|
5090
|
-
device:
|
|
5091
|
-
onClose: () =>
|
|
5178
|
+
device: p,
|
|
5179
|
+
onClose: () => m(null)
|
|
5092
5180
|
}),
|
|
5093
|
-
|
|
5181
|
+
ie !== null && /* @__PURE__ */ T(Js, {
|
|
5094
5182
|
trpc: n,
|
|
5095
5183
|
integrationId: r,
|
|
5096
|
-
device:
|
|
5097
|
-
onClose: () =>
|
|
5098
|
-
onChanged: () =>
|
|
5099
|
-
h(null), o.reload();
|
|
5100
|
-
}
|
|
5184
|
+
device: ie,
|
|
5185
|
+
onClose: () => v(null),
|
|
5186
|
+
onChanged: () => s.reload()
|
|
5101
5187
|
}),
|
|
5102
|
-
|
|
5103
|
-
device:
|
|
5104
|
-
onClose: () =>
|
|
5105
|
-
onRenameDevice: (e) =>
|
|
5106
|
-
onRenameChannel:
|
|
5188
|
+
b !== null && /* @__PURE__ */ T($s, {
|
|
5189
|
+
device: b,
|
|
5190
|
+
onClose: () => S(null),
|
|
5191
|
+
onRenameDevice: (e) => ee(b, e),
|
|
5192
|
+
onRenameChannel: ne
|
|
5107
5193
|
}),
|
|
5108
|
-
|
|
5109
|
-
device:
|
|
5110
|
-
onClose: () =>
|
|
5111
|
-
onDelete: (e) =>
|
|
5194
|
+
d !== null && /* @__PURE__ */ T(Zs, {
|
|
5195
|
+
device: d,
|
|
5196
|
+
onClose: () => f(null),
|
|
5197
|
+
onDelete: (e) => w(d, e)
|
|
5112
5198
|
})
|
|
5113
5199
|
]
|
|
5114
5200
|
});
|
|
5115
5201
|
}
|
|
5116
5202
|
//#endregion
|
|
5117
5203
|
//#region src/ui/GroupFormDialog.tsx
|
|
5118
|
-
function
|
|
5204
|
+
function cc(e) {
|
|
5119
5205
|
let { group: t, candidates: n, onClose: r, onSave: i } = e, { t: o } = X(), [s, l] = a(t?.name ?? ""), [u, d] = a(t?.type ?? ls[0]), [f, h] = a(() => t?.members.map((e) => e.address) ?? []), [g, _] = a(!1), v = (e) => h((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), y = s.trim() !== "" && f.length > 0 && !g, b = async () => {
|
|
5120
5206
|
_(!0);
|
|
5121
5207
|
try {
|
|
@@ -5131,7 +5217,7 @@ function nc(e) {
|
|
|
5131
5217
|
return /* @__PURE__ */ T(S, {
|
|
5132
5218
|
open: !0,
|
|
5133
5219
|
onClose: r,
|
|
5134
|
-
icon:
|
|
5220
|
+
icon: he,
|
|
5135
5221
|
width: "md",
|
|
5136
5222
|
title: t === null ? o("heating.newGroup") : o("heating.editGroup", { name: t.name }),
|
|
5137
5223
|
testId: "hm-group-dialog",
|
|
@@ -5192,12 +5278,29 @@ function nc(e) {
|
|
|
5192
5278
|
});
|
|
5193
5279
|
}
|
|
5194
5280
|
//#endregion
|
|
5281
|
+
//#region src/ui/TableBlock.tsx
|
|
5282
|
+
function lc(e) {
|
|
5283
|
+
let { headingId: t, title: n, actions: r, children: i } = e;
|
|
5284
|
+
return /* @__PURE__ */ E("section", {
|
|
5285
|
+
"aria-labelledby": t,
|
|
5286
|
+
className: "flex flex-col gap-2",
|
|
5287
|
+
children: [/* @__PURE__ */ E("header", {
|
|
5288
|
+
className: "flex min-h-9 flex-wrap items-center gap-2",
|
|
5289
|
+
children: [/* @__PURE__ */ T("h2", {
|
|
5290
|
+
id: t,
|
|
5291
|
+
className: "min-w-0 flex-1 text-xs font-semibold uppercase tracking-wider text-foreground",
|
|
5292
|
+
children: n
|
|
5293
|
+
}), r]
|
|
5294
|
+
}), i]
|
|
5295
|
+
});
|
|
5296
|
+
}
|
|
5297
|
+
//#endregion
|
|
5195
5298
|
//#region src/ui/CcuHeatingTab.tsx
|
|
5196
|
-
function
|
|
5299
|
+
function uc(e) {
|
|
5197
5300
|
return e === null ? "—" : `${e} °C`;
|
|
5198
5301
|
}
|
|
5199
|
-
function
|
|
5200
|
-
let { trpc: n, integrationId: r } = t, { t: i } = X(), o = Q(n, "listHeatingGroups", e(() => ({ integrationId: r }), [r]), ms), s = Ws(n), [l,
|
|
5302
|
+
function dc(t) {
|
|
5303
|
+
let { trpc: n, integrationId: r } = t, { t: i } = X(), o = Q(n, "listHeatingGroups", e(() => ({ integrationId: r }), [r]), ms), s = Ws(n), [l, u] = a({ kind: "closed" }), d = async (e, t) => {
|
|
5201
5304
|
(e === null ? await s({
|
|
5202
5305
|
action: "createHeatingGroup",
|
|
5203
5306
|
input: {
|
|
@@ -5228,8 +5331,8 @@ function ic(t) {
|
|
|
5228
5331
|
count: t.members.length
|
|
5229
5332
|
}),
|
|
5230
5333
|
confirmLabel: i("heating.updateConfirm")
|
|
5231
|
-
})) !== null && (
|
|
5232
|
-
},
|
|
5334
|
+
})) !== null && (u({ kind: "closed" }), o.reload());
|
|
5335
|
+
}, f = async (e) => {
|
|
5233
5336
|
await s({
|
|
5234
5337
|
action: "deleteHeatingGroup",
|
|
5235
5338
|
input: {
|
|
@@ -5242,7 +5345,7 @@ function ic(t) {
|
|
|
5242
5345
|
confirmLabel: i("heating.deleteConfirm"),
|
|
5243
5346
|
variant: "danger"
|
|
5244
5347
|
}) !== null && o.reload();
|
|
5245
|
-
},
|
|
5348
|
+
}, p = [
|
|
5246
5349
|
{
|
|
5247
5350
|
key: "name",
|
|
5248
5351
|
header: i("heating.colGroup"),
|
|
@@ -5270,19 +5373,19 @@ function ic(t) {
|
|
|
5270
5373
|
render: (e) => /* @__PURE__ */ T(y, { items: [{
|
|
5271
5374
|
id: "edit",
|
|
5272
5375
|
label: i("heating.edit"),
|
|
5273
|
-
icon:
|
|
5274
|
-
onClick: () =>
|
|
5376
|
+
icon: ve,
|
|
5377
|
+
onClick: () => u({
|
|
5275
5378
|
kind: "form",
|
|
5276
5379
|
group: e
|
|
5277
5380
|
})
|
|
5278
5381
|
}, {
|
|
5279
5382
|
id: "delete",
|
|
5280
5383
|
label: i("heating.delete"),
|
|
5281
|
-
icon:
|
|
5282
|
-
onClick: () => void
|
|
5384
|
+
icon: Ce,
|
|
5385
|
+
onClick: () => void f(e)
|
|
5283
5386
|
}] })
|
|
5284
5387
|
}
|
|
5285
|
-
],
|
|
5388
|
+
], m = [
|
|
5286
5389
|
{
|
|
5287
5390
|
key: "name",
|
|
5288
5391
|
header: i("heating.colThermostat"),
|
|
@@ -5293,14 +5396,14 @@ function ic(t) {
|
|
|
5293
5396
|
key: "current",
|
|
5294
5397
|
header: i("heating.colCurrent"),
|
|
5295
5398
|
align: "right",
|
|
5296
|
-
render: (e) =>
|
|
5399
|
+
render: (e) => uc(e.currentTemperature),
|
|
5297
5400
|
sortValue: (e) => e.currentTemperature
|
|
5298
5401
|
},
|
|
5299
5402
|
{
|
|
5300
5403
|
key: "target",
|
|
5301
5404
|
header: i("heating.colTarget"),
|
|
5302
5405
|
align: "right",
|
|
5303
|
-
render: (e) =>
|
|
5406
|
+
render: (e) => uc(e.targetTemperature),
|
|
5304
5407
|
sortValue: (e) => e.targetTemperature
|
|
5305
5408
|
},
|
|
5306
5409
|
{
|
|
@@ -5324,51 +5427,51 @@ function ic(t) {
|
|
|
5324
5427
|
message: o.error,
|
|
5325
5428
|
onRetry: o.reload
|
|
5326
5429
|
});
|
|
5327
|
-
let
|
|
5430
|
+
let h = o.data;
|
|
5328
5431
|
return /* @__PURE__ */ E("div", {
|
|
5329
5432
|
className: "flex flex-col gap-3",
|
|
5330
5433
|
children: [
|
|
5331
|
-
/* @__PURE__ */ T(
|
|
5434
|
+
/* @__PURE__ */ T(lc, {
|
|
5332
5435
|
headingId: "hm-heating-groups",
|
|
5333
5436
|
title: i("heating.groupsTitle"),
|
|
5334
5437
|
actions: /* @__PURE__ */ E(c, {
|
|
5335
5438
|
type: "button",
|
|
5336
5439
|
size: "sm",
|
|
5337
|
-
disabled:
|
|
5338
|
-
onClick: () =>
|
|
5440
|
+
disabled: h === void 0 || h.groupsError !== null,
|
|
5441
|
+
onClick: () => u({
|
|
5339
5442
|
kind: "form",
|
|
5340
5443
|
group: null
|
|
5341
5444
|
}),
|
|
5342
|
-
children: [/* @__PURE__ */ T(
|
|
5445
|
+
children: [/* @__PURE__ */ T(ye, { className: "h-4 w-4" }), i("heating.newGroup")]
|
|
5343
5446
|
}),
|
|
5344
|
-
children:
|
|
5447
|
+
children: h?.groupsError ? /* @__PURE__ */ T(C, {
|
|
5345
5448
|
variant: "warning",
|
|
5346
5449
|
title: i("heating.groupsUnavailable"),
|
|
5347
|
-
message:
|
|
5348
|
-
}) : /* @__PURE__ */ T(
|
|
5349
|
-
columns:
|
|
5350
|
-
rows:
|
|
5450
|
+
message: h.groupsError
|
|
5451
|
+
}) : /* @__PURE__ */ T(x, {
|
|
5452
|
+
columns: p,
|
|
5453
|
+
rows: h?.groups ?? [],
|
|
5351
5454
|
rowKey: (e) => e.id,
|
|
5352
5455
|
minWidthPx: 520,
|
|
5353
5456
|
emptyMessage: o.loading ? i("common.loading") : i("heating.noGroups")
|
|
5354
5457
|
})
|
|
5355
5458
|
}),
|
|
5356
|
-
/* @__PURE__ */ T(
|
|
5459
|
+
/* @__PURE__ */ T(lc, {
|
|
5357
5460
|
headingId: "hm-heating-thermostats",
|
|
5358
5461
|
title: i("heating.thermostatsTitle"),
|
|
5359
|
-
children: /* @__PURE__ */ T(
|
|
5360
|
-
columns:
|
|
5361
|
-
rows:
|
|
5462
|
+
children: /* @__PURE__ */ T(x, {
|
|
5463
|
+
columns: m,
|
|
5464
|
+
rows: h?.thermostats ?? [],
|
|
5362
5465
|
rowKey: (e) => e.channel,
|
|
5363
5466
|
minWidthPx: 520,
|
|
5364
5467
|
emptyMessage: o.loading ? i("common.loading") : i("heating.noThermostats")
|
|
5365
5468
|
})
|
|
5366
5469
|
}),
|
|
5367
|
-
l.kind === "form" &&
|
|
5470
|
+
l.kind === "form" && h !== void 0 && /* @__PURE__ */ T(cc, {
|
|
5368
5471
|
group: l.group,
|
|
5369
|
-
candidates:
|
|
5370
|
-
onClose: () =>
|
|
5371
|
-
onSave: (e) =>
|
|
5472
|
+
candidates: h.candidates,
|
|
5473
|
+
onClose: () => u({ kind: "closed" }),
|
|
5474
|
+
onSave: (e) => d(l.group, e)
|
|
5372
5475
|
})
|
|
5373
5476
|
]
|
|
5374
5477
|
});
|
|
@@ -5382,17 +5485,17 @@ function $(e) {
|
|
|
5382
5485
|
}
|
|
5383
5486
|
//#endregion
|
|
5384
5487
|
//#region src/ui/LinkFormDialog.tsx
|
|
5385
|
-
function
|
|
5488
|
+
function fc(e) {
|
|
5386
5489
|
return bs.some((t) => t === e);
|
|
5387
5490
|
}
|
|
5388
|
-
function
|
|
5491
|
+
function pc(e) {
|
|
5389
5492
|
let t = e.deviceName === null ? "" : ` — ${e.deviceName}`;
|
|
5390
5493
|
return {
|
|
5391
5494
|
value: e.address,
|
|
5392
5495
|
label: `${$(e)}${t} (${e.address})`
|
|
5393
5496
|
};
|
|
5394
5497
|
}
|
|
5395
|
-
function
|
|
5498
|
+
function mc(e) {
|
|
5396
5499
|
let { link: t, senders: n, receivers: r, onClose: i, onSave: o } = e, { t: s } = X(), l = t?.profile?.kind === "switch" ? t.profile : null, [u, d] = a(t?.sender.address ?? ""), [f, m] = a(t?.receiver.address ?? ""), [h, g] = a(l?.short ?? "toggle"), [_, v] = a(l?.long ?? "toggle"), [y, b] = a(!1), x = bs.map((e) => ({
|
|
5397
5500
|
value: e,
|
|
5398
5501
|
label: s(`links.action_${e}`)
|
|
@@ -5412,7 +5515,7 @@ function sc(e) {
|
|
|
5412
5515
|
return /* @__PURE__ */ T(S, {
|
|
5413
5516
|
open: !0,
|
|
5414
5517
|
onClose: i,
|
|
5415
|
-
icon:
|
|
5518
|
+
icon: ge,
|
|
5416
5519
|
width: "md",
|
|
5417
5520
|
title: s(t === null ? "links.newLink" : "links.editProfile"),
|
|
5418
5521
|
testId: "hm-link-dialog",
|
|
@@ -5436,7 +5539,7 @@ function sc(e) {
|
|
|
5436
5539
|
options: [{
|
|
5437
5540
|
value: "",
|
|
5438
5541
|
label: s("links.pick")
|
|
5439
|
-
}, ...n.map(
|
|
5542
|
+
}, ...n.map(pc)]
|
|
5440
5543
|
})
|
|
5441
5544
|
}), /* @__PURE__ */ T(p, {
|
|
5442
5545
|
label: s("links.fieldReceiver"),
|
|
@@ -5449,7 +5552,7 @@ function sc(e) {
|
|
|
5449
5552
|
options: [{
|
|
5450
5553
|
value: "",
|
|
5451
5554
|
label: s("links.pick")
|
|
5452
|
-
}, ...r.map(
|
|
5555
|
+
}, ...r.map(pc)]
|
|
5453
5556
|
})
|
|
5454
5557
|
})] }) : /* @__PURE__ */ E("p", {
|
|
5455
5558
|
className: "text-sm text-foreground",
|
|
@@ -5465,7 +5568,7 @@ function sc(e) {
|
|
|
5465
5568
|
"aria-label": s("links.fieldShort"),
|
|
5466
5569
|
value: h,
|
|
5467
5570
|
onChange: (e) => {
|
|
5468
|
-
|
|
5571
|
+
fc(e.target.value) && g(e.target.value);
|
|
5469
5572
|
},
|
|
5470
5573
|
options: x
|
|
5471
5574
|
})
|
|
@@ -5476,7 +5579,7 @@ function sc(e) {
|
|
|
5476
5579
|
"aria-label": s("links.fieldLong"),
|
|
5477
5580
|
value: _,
|
|
5478
5581
|
onChange: (e) => {
|
|
5479
|
-
|
|
5582
|
+
fc(e.target.value) && v(e.target.value);
|
|
5480
5583
|
},
|
|
5481
5584
|
options: x
|
|
5482
5585
|
})
|
|
@@ -5487,10 +5590,31 @@ function sc(e) {
|
|
|
5487
5590
|
}
|
|
5488
5591
|
//#endregion
|
|
5489
5592
|
//#region src/ui/CcuLinksTab.tsx
|
|
5490
|
-
function
|
|
5593
|
+
function hc(e) {
|
|
5491
5594
|
return `${e.sender.address}>${e.receiver.address}`;
|
|
5492
5595
|
}
|
|
5493
|
-
function
|
|
5596
|
+
function gc(e) {
|
|
5597
|
+
let t = e.profile === null ? [] : e.profile.kind === "switch" ? [
|
|
5598
|
+
e.profile.kind,
|
|
5599
|
+
e.profile.short,
|
|
5600
|
+
e.profile.long
|
|
5601
|
+
] : [e.profile.kind];
|
|
5602
|
+
return [
|
|
5603
|
+
e.sender.address,
|
|
5604
|
+
e.sender.name ?? "",
|
|
5605
|
+
e.sender.deviceName ?? "",
|
|
5606
|
+
e.sender.deviceType ?? "",
|
|
5607
|
+
e.receiver.address,
|
|
5608
|
+
e.receiver.name ?? "",
|
|
5609
|
+
e.receiver.deviceName ?? "",
|
|
5610
|
+
e.receiver.deviceType ?? "",
|
|
5611
|
+
e.name,
|
|
5612
|
+
e.description,
|
|
5613
|
+
...t
|
|
5614
|
+
];
|
|
5615
|
+
}
|
|
5616
|
+
var _c = { searchText: gc };
|
|
5617
|
+
function vc(e) {
|
|
5494
5618
|
let { endpoint: t } = e;
|
|
5495
5619
|
return /* @__PURE__ */ E("div", {
|
|
5496
5620
|
className: "flex min-w-0 flex-col",
|
|
@@ -5503,8 +5627,8 @@ function lc(e) {
|
|
|
5503
5627
|
})]
|
|
5504
5628
|
});
|
|
5505
5629
|
}
|
|
5506
|
-
function
|
|
5507
|
-
let { trpc: n, integrationId: r } = t, { t: i } = X(), o = Q(n, "listCcuLinks", e(() => ({ integrationId: r }), [r]), Es), s = Ws(n), [l,
|
|
5630
|
+
function yc(t) {
|
|
5631
|
+
let { trpc: n, integrationId: r } = t, { t: i } = X(), o = Q(n, "listCcuLinks", e(() => ({ integrationId: r }), [r]), Es), s = Ws(n), [l, u] = a({ kind: "closed" }), d = _(o.data?.links ?? [], _c), f = (e, t) => {
|
|
5508
5632
|
let n = [...o.data?.senders ?? [], ...o.data?.receivers ?? []], r = (e) => {
|
|
5509
5633
|
let t = n.find((t) => t.address === e);
|
|
5510
5634
|
return t === void 0 ? e : $(t);
|
|
@@ -5528,7 +5652,7 @@ function uc(t) {
|
|
|
5528
5652
|
...n
|
|
5529
5653
|
}),
|
|
5530
5654
|
confirmLabel: i(e === null ? "links.createConfirm" : "links.profileConfirm")
|
|
5531
|
-
}) !== null && (
|
|
5655
|
+
}) !== null && (u({ kind: "closed" }), o.reload());
|
|
5532
5656
|
}, m = async (e) => {
|
|
5533
5657
|
await s({
|
|
5534
5658
|
action: "deleteCcuLink",
|
|
@@ -5543,7 +5667,7 @@ function uc(t) {
|
|
|
5543
5667
|
confirmLabel: i("links.deleteConfirm"),
|
|
5544
5668
|
variant: "danger"
|
|
5545
5669
|
}) !== null && o.reload();
|
|
5546
|
-
},
|
|
5670
|
+
}, h = (e) => e.profile === null ? /* @__PURE__ */ T("span", {
|
|
5547
5671
|
className: "text-foreground-subtle",
|
|
5548
5672
|
children: "—"
|
|
5549
5673
|
}) : e.profile.kind === "custom" ? /* @__PURE__ */ T(g, { children: i("links.profileCustom") }) : /* @__PURE__ */ T("span", {
|
|
@@ -5555,29 +5679,29 @@ function uc(t) {
|
|
|
5555
5679
|
}), v = (e) => [...e.profile?.kind === "switch" ? [{
|
|
5556
5680
|
id: "edit",
|
|
5557
5681
|
label: i("links.editProfile"),
|
|
5558
|
-
icon:
|
|
5559
|
-
onClick: () =>
|
|
5682
|
+
icon: ve,
|
|
5683
|
+
onClick: () => u({
|
|
5560
5684
|
kind: "form",
|
|
5561
5685
|
link: e
|
|
5562
5686
|
})
|
|
5563
5687
|
}] : [], {
|
|
5564
5688
|
id: "delete",
|
|
5565
5689
|
label: i("links.delete"),
|
|
5566
|
-
icon:
|
|
5690
|
+
icon: Ce,
|
|
5567
5691
|
onClick: () => void m(e)
|
|
5568
5692
|
}], b = [
|
|
5569
5693
|
{
|
|
5570
5694
|
key: "sender",
|
|
5571
5695
|
header: i("links.colSender"),
|
|
5572
5696
|
nowrap: !1,
|
|
5573
|
-
render: (e) => /* @__PURE__ */ T(
|
|
5697
|
+
render: (e) => /* @__PURE__ */ T(vc, { endpoint: e.sender }),
|
|
5574
5698
|
sortValue: (e) => $(e.sender)
|
|
5575
5699
|
},
|
|
5576
5700
|
{
|
|
5577
5701
|
key: "receiver",
|
|
5578
5702
|
header: i("links.colReceiver"),
|
|
5579
5703
|
nowrap: !1,
|
|
5580
|
-
render: (e) => /* @__PURE__ */ T(
|
|
5704
|
+
render: (e) => /* @__PURE__ */ T(vc, { endpoint: e.receiver }),
|
|
5581
5705
|
sortValue: (e) => $(e.receiver)
|
|
5582
5706
|
},
|
|
5583
5707
|
{
|
|
@@ -5590,7 +5714,7 @@ function uc(t) {
|
|
|
5590
5714
|
key: "profile",
|
|
5591
5715
|
header: i("links.colProfile"),
|
|
5592
5716
|
nowrap: !1,
|
|
5593
|
-
render:
|
|
5717
|
+
render: h,
|
|
5594
5718
|
sortValue: (e) => e.profile === null ? "" : e.profile.kind
|
|
5595
5719
|
},
|
|
5596
5720
|
{
|
|
@@ -5606,59 +5730,73 @@ function uc(t) {
|
|
|
5606
5730
|
message: o.error,
|
|
5607
5731
|
onRetry: o.reload
|
|
5608
5732
|
});
|
|
5609
|
-
let
|
|
5733
|
+
let S = o.data, ee = S?.failures ?? [];
|
|
5610
5734
|
return /* @__PURE__ */ E("div", {
|
|
5611
5735
|
className: "flex flex-col gap-3",
|
|
5612
|
-
children: [/* @__PURE__ */ E(
|
|
5736
|
+
children: [/* @__PURE__ */ E(lc, {
|
|
5613
5737
|
headingId: "hm-links",
|
|
5614
5738
|
title: i("links.title"),
|
|
5615
5739
|
actions: /* @__PURE__ */ E(c, {
|
|
5616
5740
|
type: "button",
|
|
5617
5741
|
size: "sm",
|
|
5618
|
-
disabled:
|
|
5619
|
-
onClick: () =>
|
|
5742
|
+
disabled: S === void 0,
|
|
5743
|
+
onClick: () => u({
|
|
5620
5744
|
kind: "form",
|
|
5621
5745
|
link: null
|
|
5622
5746
|
}),
|
|
5623
|
-
children: [/* @__PURE__ */ T(
|
|
5747
|
+
children: [/* @__PURE__ */ T(ye, { className: "h-4 w-4" }), i("links.newLink")]
|
|
5624
5748
|
}),
|
|
5625
|
-
children: [
|
|
5626
|
-
|
|
5627
|
-
children: [/* @__PURE__ */ T("p", {
|
|
5749
|
+
children: [
|
|
5750
|
+
/* @__PURE__ */ T("p", {
|
|
5628
5751
|
className: "text-xs text-foreground-muted",
|
|
5629
5752
|
children: i("links.hint")
|
|
5630
|
-
}),
|
|
5753
|
+
}),
|
|
5754
|
+
ee.length > 0 && /* @__PURE__ */ T(C, {
|
|
5631
5755
|
variant: "warning",
|
|
5632
|
-
title: i("links.partial", { count:
|
|
5633
|
-
message:
|
|
5634
|
-
})
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5756
|
+
title: i("links.partial", { count: ee.length }),
|
|
5757
|
+
message: ee.map((e) => `${e.deviceName ?? e.address}: ${e.error}`).join("\n")
|
|
5758
|
+
}),
|
|
5759
|
+
/* @__PURE__ */ T(te, {
|
|
5760
|
+
state: d.state,
|
|
5761
|
+
facets: d.facets,
|
|
5762
|
+
labels: {
|
|
5763
|
+
searchPlaceholder: i("links.searchPlaceholder"),
|
|
5764
|
+
searchLabel: i("links.searchLabel"),
|
|
5765
|
+
facetsLabel: i("links.facetsLabel"),
|
|
5766
|
+
clearLabel: i("links.clearFilters")
|
|
5767
|
+
},
|
|
5768
|
+
onSearch: d.setSearch,
|
|
5769
|
+
onToggleFacet: d.toggleFacet,
|
|
5770
|
+
onClear: d.clear
|
|
5771
|
+
}),
|
|
5772
|
+
/* @__PURE__ */ T(x, {
|
|
5773
|
+
columns: b,
|
|
5774
|
+
rows: d.rows,
|
|
5775
|
+
rowKey: hc,
|
|
5776
|
+
minWidthPx: 640,
|
|
5777
|
+
defaultSort: {
|
|
5778
|
+
columnKey: "sender",
|
|
5779
|
+
dir: "asc"
|
|
5780
|
+
},
|
|
5781
|
+
emptyMessage: o.loading ? i("common.loading") : d.active ? i("links.noMatch") : i("links.none")
|
|
5782
|
+
})
|
|
5783
|
+
]
|
|
5784
|
+
}), l.kind === "form" && S !== void 0 && /* @__PURE__ */ T(mc, {
|
|
5647
5785
|
link: l.link,
|
|
5648
|
-
senders:
|
|
5649
|
-
receivers:
|
|
5650
|
-
onClose: () =>
|
|
5786
|
+
senders: S.senders,
|
|
5787
|
+
receivers: S.receivers,
|
|
5788
|
+
onClose: () => u({ kind: "closed" }),
|
|
5651
5789
|
onSave: (e) => p(l.link, e)
|
|
5652
5790
|
})]
|
|
5653
5791
|
});
|
|
5654
5792
|
}
|
|
5655
5793
|
//#endregion
|
|
5656
5794
|
//#region src/ui/CcuOverviewTab.tsx
|
|
5657
|
-
function
|
|
5795
|
+
function bc(e) {
|
|
5658
5796
|
return e === null ? "unknown" : e ? "online" : "offline";
|
|
5659
5797
|
}
|
|
5660
|
-
function
|
|
5661
|
-
let { trpc: n, integrationId: r } = t, { t: i } = X(), a = e(() => ({ integrationId: r }), [r]), o = Q(n, "ccuOverview", a, rs), s = Q(n, "listServiceMessages", a, is), l = Ws(n),
|
|
5798
|
+
function xc(t) {
|
|
5799
|
+
let { trpc: n, integrationId: r } = t, { t: i } = X(), a = e(() => ({ integrationId: r }), [r]), o = Q(n, "ccuOverview", a, rs), s = Q(n, "listServiceMessages", a, is), l = Ws(n), u = async (e) => {
|
|
5662
5800
|
await l({
|
|
5663
5801
|
action: "acknowledgeServiceMessage",
|
|
5664
5802
|
input: {
|
|
@@ -5673,7 +5811,7 @@ function fc(t) {
|
|
|
5673
5811
|
}),
|
|
5674
5812
|
confirmLabel: i("overview.ackConfirm")
|
|
5675
5813
|
}) !== null && s.reload();
|
|
5676
|
-
},
|
|
5814
|
+
}, f = [
|
|
5677
5815
|
{
|
|
5678
5816
|
key: "name",
|
|
5679
5817
|
header: i("overview.colInterface"),
|
|
@@ -5683,7 +5821,7 @@ function fc(t) {
|
|
|
5683
5821
|
{
|
|
5684
5822
|
key: "state",
|
|
5685
5823
|
header: i("overview.colState"),
|
|
5686
|
-
render: (e) => /* @__PURE__ */ T(re, { status:
|
|
5824
|
+
render: (e) => /* @__PURE__ */ T(re, { status: bc(e.connected) }),
|
|
5687
5825
|
sortValue: (e) => e.connected === null ? null : +!!e.connected
|
|
5688
5826
|
},
|
|
5689
5827
|
{
|
|
@@ -5712,7 +5850,7 @@ function fc(t) {
|
|
|
5712
5850
|
render: (e) => e.gateways.length,
|
|
5713
5851
|
sortValue: (e) => e.gateways.length
|
|
5714
5852
|
}
|
|
5715
|
-
],
|
|
5853
|
+
], p = [
|
|
5716
5854
|
{
|
|
5717
5855
|
key: "time",
|
|
5718
5856
|
header: i("overview.colWhen"),
|
|
@@ -5743,11 +5881,11 @@ function fc(t) {
|
|
|
5743
5881
|
type: "button",
|
|
5744
5882
|
size: "sm",
|
|
5745
5883
|
variant: "outline",
|
|
5746
|
-
onClick: () => void
|
|
5884
|
+
onClick: () => void u(e),
|
|
5747
5885
|
children: i("overview.ack")
|
|
5748
5886
|
}) : null
|
|
5749
5887
|
}
|
|
5750
|
-
],
|
|
5888
|
+
], m = o.data?.info ?? null;
|
|
5751
5889
|
return /* @__PURE__ */ E("div", {
|
|
5752
5890
|
className: "flex flex-col gap-3",
|
|
5753
5891
|
children: [
|
|
@@ -5759,8 +5897,8 @@ function fc(t) {
|
|
|
5759
5897
|
/* @__PURE__ */ T(h, {
|
|
5760
5898
|
headingId: "hm-ccu-info",
|
|
5761
5899
|
title: i("overview.ccuTitle"),
|
|
5762
|
-
icon:
|
|
5763
|
-
children: o.loading && o.data === void 0 ? /* @__PURE__ */ T(ie, { className: "h-16 w-full" }) :
|
|
5900
|
+
icon: xe,
|
|
5901
|
+
children: o.loading && o.data === void 0 ? /* @__PURE__ */ T(ie, { className: "h-16 w-full" }) : m === null ? /* @__PURE__ */ T(C, {
|
|
5764
5902
|
variant: "warning",
|
|
5765
5903
|
title: i("overview.infoUnavailable"),
|
|
5766
5904
|
message: o.data?.infoError ?? i("overview.infoNoAnswer")
|
|
@@ -5769,49 +5907,48 @@ function fc(t) {
|
|
|
5769
5907
|
children: [
|
|
5770
5908
|
/* @__PURE__ */ T(d, {
|
|
5771
5909
|
label: i("overview.version"),
|
|
5772
|
-
value: Z(
|
|
5910
|
+
value: Z(m.version)
|
|
5773
5911
|
}),
|
|
5774
5912
|
/* @__PURE__ */ T(d, {
|
|
5775
5913
|
label: i("overview.product"),
|
|
5776
|
-
value: Z(
|
|
5777
|
-
subtext:
|
|
5914
|
+
value: Z(m.product),
|
|
5915
|
+
subtext: m.platform ?? void 0
|
|
5778
5916
|
}),
|
|
5779
5917
|
/* @__PURE__ */ T(d, {
|
|
5780
5918
|
label: i("overview.hostname"),
|
|
5781
|
-
value: Z(
|
|
5919
|
+
value: Z(m.hostname)
|
|
5782
5920
|
}),
|
|
5783
5921
|
/* @__PURE__ */ T(d, {
|
|
5784
5922
|
label: i("overview.serial"),
|
|
5785
|
-
value: Z(
|
|
5923
|
+
value: Z(m.serial)
|
|
5786
5924
|
})
|
|
5787
5925
|
]
|
|
5788
5926
|
})
|
|
5789
5927
|
}),
|
|
5790
|
-
/* @__PURE__ */ T(
|
|
5928
|
+
/* @__PURE__ */ T(lc, {
|
|
5791
5929
|
headingId: "hm-ccu-interfaces",
|
|
5792
5930
|
title: i("overview.interfacesTitle"),
|
|
5793
5931
|
children: o.data?.interfacesError ? /* @__PURE__ */ T(C, {
|
|
5794
5932
|
variant: "warning",
|
|
5795
5933
|
title: i("overview.interfacesUnavailable"),
|
|
5796
5934
|
message: o.data.interfacesError
|
|
5797
|
-
}) : /* @__PURE__ */ T(
|
|
5798
|
-
columns:
|
|
5935
|
+
}) : /* @__PURE__ */ T(x, {
|
|
5936
|
+
columns: f,
|
|
5799
5937
|
rows: o.data?.interfaces ?? [],
|
|
5800
5938
|
rowKey: (e) => e.name,
|
|
5801
5939
|
emptyMessage: o.loading ? i("common.loading") : i("overview.noInterfaces"),
|
|
5802
5940
|
minWidthPx: 560
|
|
5803
5941
|
})
|
|
5804
5942
|
}),
|
|
5805
|
-
/* @__PURE__ */ T(
|
|
5943
|
+
/* @__PURE__ */ T(lc, {
|
|
5806
5944
|
headingId: "hm-ccu-messages",
|
|
5807
5945
|
title: i("overview.messagesTitle"),
|
|
5808
|
-
icon: Ce,
|
|
5809
5946
|
children: s.data?.error ? /* @__PURE__ */ T(C, {
|
|
5810
5947
|
variant: "warning",
|
|
5811
5948
|
title: i("overview.messagesUnavailable"),
|
|
5812
5949
|
message: s.data.error
|
|
5813
|
-
}) : s.error === null ? s.data !== void 0 && s.data.messages.length === 0 ? /* @__PURE__ */ T(v, { title: i("overview.noMessages") }) : /* @__PURE__ */ T(
|
|
5814
|
-
columns:
|
|
5950
|
+
}) : s.error === null ? s.data !== void 0 && s.data.messages.length === 0 ? /* @__PURE__ */ T(v, { title: i("overview.noMessages") }) : /* @__PURE__ */ T(x, {
|
|
5951
|
+
columns: p,
|
|
5815
5952
|
rows: s.data?.messages ?? [],
|
|
5816
5953
|
rowKey: (e) => e.id,
|
|
5817
5954
|
emptyMessage: i("common.loading"),
|
|
@@ -5830,15 +5967,15 @@ function fc(t) {
|
|
|
5830
5967
|
}
|
|
5831
5968
|
//#endregion
|
|
5832
5969
|
//#region src/ui/CcuPairingTab.tsx
|
|
5833
|
-
var
|
|
5834
|
-
function
|
|
5970
|
+
var Sc = 3e3, Cc = 4e3, wc = 60;
|
|
5971
|
+
function Tc(e) {
|
|
5835
5972
|
return e.secondsLeft !== null && e.secondsLeft > 0;
|
|
5836
5973
|
}
|
|
5837
|
-
function
|
|
5838
|
-
let { iface: t, busy: n, onStart: r, onStop: i } = e, { t: o } = X(), [s, l] = a(String(
|
|
5974
|
+
function Ec(e) {
|
|
5975
|
+
let { iface: t, busy: n, onStart: r, onStop: i } = e, { t: o } = X(), [s, l] = a(String(wc)), [u, d] = a(hs[0]), f = Number(s), _ = Number.isInteger(f) && f >= 1 && f <= 3600, v = t.error === null ? t.secondsLeft === null ? /* @__PURE__ */ T(g, {
|
|
5839
5976
|
variant: "neutral",
|
|
5840
5977
|
children: o("pairing.statusUnknown")
|
|
5841
|
-
}) :
|
|
5978
|
+
}) : Tc(t) ? /* @__PURE__ */ T(g, {
|
|
5842
5979
|
variant: "success",
|
|
5843
5980
|
children: o("pairing.statusOpen", { seconds: t.secondsLeft })
|
|
5844
5981
|
}) : /* @__PURE__ */ T(g, {
|
|
@@ -5888,7 +6025,7 @@ function _c(e) {
|
|
|
5888
6025
|
onClick: () => r(f, t.supportsSecure ? u : void 0),
|
|
5889
6026
|
children: o("pairing.start")
|
|
5890
6027
|
}),
|
|
5891
|
-
|
|
6028
|
+
Tc(t) && /* @__PURE__ */ T(c, {
|
|
5892
6029
|
type: "button",
|
|
5893
6030
|
variant: "secondary",
|
|
5894
6031
|
disabled: n,
|
|
@@ -5900,8 +6037,8 @@ function _c(e) {
|
|
|
5900
6037
|
})
|
|
5901
6038
|
});
|
|
5902
6039
|
}
|
|
5903
|
-
function
|
|
5904
|
-
let { trpc: r, integrationId: i } = n, { t: o } = X(), s = Ws(r), c = e(() => ({ integrationId: i }), [i]), l = Q(r, "ccuPairingStatus", c, gs, { pollMs:
|
|
6040
|
+
function Dc(n) {
|
|
6041
|
+
let { trpc: r, integrationId: i } = n, { t: o } = X(), s = Ws(r), c = e(() => ({ integrationId: i }), [i]), l = Q(r, "ccuPairingStatus", c, gs, { pollMs: Sc }), u = (l.data?.interfaces ?? []).some(Tc), d = Q(r, "listCcuDevices", c, cs, { ...u ? { pollMs: Cc } : {} }), [f, p] = a(!1), [m, g] = a(null);
|
|
5905
6042
|
t(() => {
|
|
5906
6043
|
m === null && d.data !== void 0 && g(new Set(d.data.devices.map((e) => e.address)));
|
|
5907
6044
|
}, [m, d.data]);
|
|
@@ -5943,7 +6080,7 @@ function vc(n) {
|
|
|
5943
6080
|
l.data.interfaces.length === 0 ? /* @__PURE__ */ T("p", {
|
|
5944
6081
|
className: "text-sm text-foreground-subtle",
|
|
5945
6082
|
children: o("pairing.noInterfaces")
|
|
5946
|
-
}) : l.data.interfaces.map((e) => /* @__PURE__ */ T(
|
|
6083
|
+
}) : l.data.interfaces.map((e) => /* @__PURE__ */ T(Ec, {
|
|
5947
6084
|
iface: e,
|
|
5948
6085
|
busy: f,
|
|
5949
6086
|
onStart: (t, n) => void v(e, !0, t, n),
|
|
@@ -5988,15 +6125,15 @@ function vc(n) {
|
|
|
5988
6125
|
}
|
|
5989
6126
|
//#endregion
|
|
5990
6127
|
//#region src/ui/RoomChannelsDialog.tsx
|
|
5991
|
-
function
|
|
6128
|
+
function Oc(e, t) {
|
|
5992
6129
|
return t === "" ? !0 : [
|
|
5993
6130
|
e.address,
|
|
5994
6131
|
e.name ?? "",
|
|
5995
6132
|
e.deviceName ?? ""
|
|
5996
6133
|
].some((e) => e.toLowerCase().includes(t));
|
|
5997
6134
|
}
|
|
5998
|
-
function
|
|
5999
|
-
let { room: n, channels: r, onClose: i, onSave: o } = t, { t: s } = X(), [l, u] = a(() => n.channels.map((e) => e.address)), [d, f] = a(""), [p, h] = a(!1), g = d.trim().toLowerCase(), _ = e(() => r.filter((e) =>
|
|
6135
|
+
function kc(t) {
|
|
6136
|
+
let { room: n, channels: r, onClose: i, onSave: o } = t, { t: s } = X(), [l, u] = a(() => n.channels.map((e) => e.address)), [d, f] = a(""), [p, h] = a(!1), g = d.trim().toLowerCase(), _ = e(() => r.filter((e) => Oc(e, g)), [r, g]), v = (e) => u((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), y = async () => {
|
|
6000
6137
|
h(!0);
|
|
6001
6138
|
try {
|
|
6002
6139
|
await o(l);
|
|
@@ -6053,8 +6190,8 @@ function bc(t) {
|
|
|
6053
6190
|
}
|
|
6054
6191
|
//#endregion
|
|
6055
6192
|
//#region src/ui/CcuSettingsTab.tsx
|
|
6056
|
-
function
|
|
6057
|
-
let { trpc: n, integrationId: r } = t, { t: i } = X(), o = Q(n, "listCcuRooms", e(() => ({ integrationId: r }), [r]), As), s = Ws(n), l =
|
|
6193
|
+
function Ac(t) {
|
|
6194
|
+
let { trpc: n, integrationId: r } = t, { t: i } = X(), o = Q(n, "listCcuRooms", e(() => ({ integrationId: r }), [r]), As), s = Ws(n), l = u(), [d, f] = a(null), p = async () => {
|
|
6058
6195
|
let e = await l({
|
|
6059
6196
|
title: i("rooms.newRoom"),
|
|
6060
6197
|
label: i("rooms.fieldName")
|
|
@@ -6091,7 +6228,7 @@ function xc(t) {
|
|
|
6091
6228
|
}),
|
|
6092
6229
|
confirmLabel: i("rooms.renameConfirm")
|
|
6093
6230
|
}) !== null && o.reload();
|
|
6094
|
-
},
|
|
6231
|
+
}, h = async (e) => {
|
|
6095
6232
|
await s({
|
|
6096
6233
|
action: "deleteCcuRoom",
|
|
6097
6234
|
input: {
|
|
@@ -6104,7 +6241,7 @@ function xc(t) {
|
|
|
6104
6241
|
confirmLabel: i("rooms.deleteConfirm"),
|
|
6105
6242
|
variant: "danger"
|
|
6106
6243
|
}) !== null && o.reload();
|
|
6107
|
-
},
|
|
6244
|
+
}, g = async (e, t) => {
|
|
6108
6245
|
await s({
|
|
6109
6246
|
action: "setCcuRoomChannels",
|
|
6110
6247
|
input: {
|
|
@@ -6120,7 +6257,7 @@ function xc(t) {
|
|
|
6120
6257
|
}),
|
|
6121
6258
|
confirmLabel: i("rooms.membersConfirm")
|
|
6122
6259
|
}) !== null && (f(null), o.reload());
|
|
6123
|
-
},
|
|
6260
|
+
}, _ = [
|
|
6124
6261
|
{
|
|
6125
6262
|
key: "name",
|
|
6126
6263
|
header: i("rooms.colRoom"),
|
|
@@ -6149,15 +6286,15 @@ function xc(t) {
|
|
|
6149
6286
|
{
|
|
6150
6287
|
id: "rename",
|
|
6151
6288
|
label: i("rooms.rename"),
|
|
6152
|
-
icon:
|
|
6289
|
+
icon: ve,
|
|
6153
6290
|
onClick: () => void m(e)
|
|
6154
6291
|
},
|
|
6155
6292
|
{
|
|
6156
6293
|
id: "delete",
|
|
6157
6294
|
label: i("rooms.delete"),
|
|
6158
|
-
icon:
|
|
6295
|
+
icon: Ce,
|
|
6159
6296
|
danger: !0,
|
|
6160
|
-
onClick: () => void
|
|
6297
|
+
onClick: () => void h(e)
|
|
6161
6298
|
}
|
|
6162
6299
|
] })
|
|
6163
6300
|
}
|
|
@@ -6167,22 +6304,22 @@ function xc(t) {
|
|
|
6167
6304
|
message: o.error,
|
|
6168
6305
|
onRetry: o.reload
|
|
6169
6306
|
});
|
|
6170
|
-
let
|
|
6307
|
+
let v = o.data;
|
|
6171
6308
|
return /* @__PURE__ */ E("div", {
|
|
6172
6309
|
className: "flex flex-col gap-3",
|
|
6173
|
-
children: [/* @__PURE__ */ T(
|
|
6310
|
+
children: [/* @__PURE__ */ T(lc, {
|
|
6174
6311
|
headingId: "hm-rooms",
|
|
6175
6312
|
title: i("rooms.title"),
|
|
6176
6313
|
actions: /* @__PURE__ */ E(c, {
|
|
6177
6314
|
type: "button",
|
|
6178
6315
|
size: "sm",
|
|
6179
|
-
disabled:
|
|
6316
|
+
disabled: v === void 0,
|
|
6180
6317
|
onClick: () => void p(),
|
|
6181
|
-
children: [/* @__PURE__ */ T(
|
|
6318
|
+
children: [/* @__PURE__ */ T(ye, { className: "h-4 w-4" }), i("rooms.newRoom")]
|
|
6182
6319
|
}),
|
|
6183
|
-
children: /* @__PURE__ */ T(
|
|
6184
|
-
columns:
|
|
6185
|
-
rows:
|
|
6320
|
+
children: /* @__PURE__ */ T(x, {
|
|
6321
|
+
columns: _,
|
|
6322
|
+
rows: v?.rooms ?? [],
|
|
6186
6323
|
rowKey: (e) => e.id,
|
|
6187
6324
|
minWidthPx: 340,
|
|
6188
6325
|
defaultSort: {
|
|
@@ -6191,19 +6328,19 @@ function xc(t) {
|
|
|
6191
6328
|
},
|
|
6192
6329
|
emptyMessage: o.loading ? i("common.loading") : i("rooms.none")
|
|
6193
6330
|
})
|
|
6194
|
-
}), d !== null &&
|
|
6331
|
+
}), d !== null && v !== void 0 && /* @__PURE__ */ T(kc, {
|
|
6195
6332
|
room: d,
|
|
6196
|
-
channels:
|
|
6333
|
+
channels: v.channels,
|
|
6197
6334
|
onClose: () => f(null),
|
|
6198
|
-
onSave: (e) =>
|
|
6335
|
+
onSave: (e) => g(d, e)
|
|
6199
6336
|
})]
|
|
6200
6337
|
});
|
|
6201
6338
|
}
|
|
6202
6339
|
//#endregion
|
|
6203
6340
|
//#region src/page.tsx
|
|
6204
|
-
var
|
|
6205
|
-
function
|
|
6206
|
-
let n = t.trpc, { t: r } = X(), [i, a] = f("ccu"), [o, s] = f("tab"), c = Q(n, "listCcus",
|
|
6341
|
+
var jc = G($o), Mc = {};
|
|
6342
|
+
function Nc(t) {
|
|
6343
|
+
let n = t.trpc, { t: r } = X(), [i, a] = f("ccu"), [o, s] = f("tab"), c = Q(n, "listCcus", Mc, jc), u = c.data, d = e(() => u === void 0 || u.length === 0 ? null : u.find((e) => e.integrationId === i) ?? u.find((e) => e.connected) ?? u[0] ?? null, [u, i]), p = (e) => c.error === null ? u === void 0 ? /* @__PURE__ */ T(ie, { className: "h-32 w-full" }) : d === null ? /* @__PURE__ */ T(v, {
|
|
6207
6344
|
title: r("page.noCcu"),
|
|
6208
6345
|
description: r("page.noCcuHint")
|
|
6209
6346
|
}) : d.connected ? e : /* @__PURE__ */ T(v, {
|
|
@@ -6215,7 +6352,7 @@ function wc(t) {
|
|
|
6215
6352
|
onRetry: c.reload
|
|
6216
6353
|
}), m = d?.integrationId ?? "";
|
|
6217
6354
|
return /* @__PURE__ */ T(l, {
|
|
6218
|
-
icon:
|
|
6355
|
+
icon: be,
|
|
6219
6356
|
title: r("page.title"),
|
|
6220
6357
|
subtitle: d === null ? r("page.subtitle") : d.name,
|
|
6221
6358
|
defaultSection: "overview",
|
|
@@ -6235,7 +6372,7 @@ function wc(t) {
|
|
|
6235
6372
|
{
|
|
6236
6373
|
id: "overview",
|
|
6237
6374
|
label: r("page.tabOverview"),
|
|
6238
|
-
content: p(/* @__PURE__ */ T(
|
|
6375
|
+
content: p(/* @__PURE__ */ T(xc, {
|
|
6239
6376
|
trpc: n,
|
|
6240
6377
|
integrationId: m
|
|
6241
6378
|
}))
|
|
@@ -6243,15 +6380,16 @@ function wc(t) {
|
|
|
6243
6380
|
{
|
|
6244
6381
|
id: "devices",
|
|
6245
6382
|
label: r("page.tabDevices"),
|
|
6246
|
-
content: p(/* @__PURE__ */ T(
|
|
6383
|
+
content: p(/* @__PURE__ */ T(sc, {
|
|
6247
6384
|
trpc: n,
|
|
6248
|
-
integrationId: m
|
|
6385
|
+
integrationId: m,
|
|
6386
|
+
navigate: t.navigate
|
|
6249
6387
|
}))
|
|
6250
6388
|
},
|
|
6251
6389
|
{
|
|
6252
6390
|
id: "links",
|
|
6253
6391
|
label: r("page.tabLinks"),
|
|
6254
|
-
content: p(/* @__PURE__ */ T(
|
|
6392
|
+
content: p(/* @__PURE__ */ T(yc, {
|
|
6255
6393
|
trpc: n,
|
|
6256
6394
|
integrationId: m
|
|
6257
6395
|
}))
|
|
@@ -6259,7 +6397,7 @@ function wc(t) {
|
|
|
6259
6397
|
{
|
|
6260
6398
|
id: "heating",
|
|
6261
6399
|
label: r("page.tabHeating"),
|
|
6262
|
-
content: p(/* @__PURE__ */ T(
|
|
6400
|
+
content: p(/* @__PURE__ */ T(dc, {
|
|
6263
6401
|
trpc: n,
|
|
6264
6402
|
integrationId: m
|
|
6265
6403
|
}))
|
|
@@ -6267,7 +6405,7 @@ function wc(t) {
|
|
|
6267
6405
|
{
|
|
6268
6406
|
id: "pairing",
|
|
6269
6407
|
label: r("page.tabPairing"),
|
|
6270
|
-
content: p(/* @__PURE__ */ T(
|
|
6408
|
+
content: p(/* @__PURE__ */ T(Dc, {
|
|
6271
6409
|
trpc: n,
|
|
6272
6410
|
integrationId: m
|
|
6273
6411
|
}))
|
|
@@ -6275,7 +6413,7 @@ function wc(t) {
|
|
|
6275
6413
|
{
|
|
6276
6414
|
id: "settings",
|
|
6277
6415
|
label: r("page.tabSettings"),
|
|
6278
|
-
content: p(/* @__PURE__ */ T(
|
|
6416
|
+
content: p(/* @__PURE__ */ T(Ac, {
|
|
6279
6417
|
trpc: n,
|
|
6280
6418
|
integrationId: m
|
|
6281
6419
|
}))
|
|
@@ -6284,4 +6422,4 @@ function wc(t) {
|
|
|
6284
6422
|
});
|
|
6285
6423
|
}
|
|
6286
6424
|
//#endregion
|
|
6287
|
-
export {
|
|
6425
|
+
export { Nc as default };
|