@camstack/addon-provider-homematic 1.2.209 → 1.2.210
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 +7 -0
- package/dist/.bundle-modules.json +11 -6
- package/dist/_stub.js +2791 -1972
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-B8JEAJoX.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-DqBsgmV2.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-BkwWlzBp.mjs +26 -0
- package/dist/addon-provider-homematic.css +1 -1
- package/dist/addon.js +440 -237
- package/dist/addon.mjs +440 -237
- package/dist/{hostInit-dkdwmlIf.mjs → hostInit-Veh_hTYB.mjs} +3 -3
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-D2zDM5LH.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-B6NDlkw9.mjs} +1 -1
- package/dist/widgets/_stub.js +222 -48
- package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-CR6dsJ2l.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-D4FsZKYN.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-dFo8NWrS.mjs +26 -0
- package/dist/widgets/{hostInit-C1PiC4_E.mjs → hostInit-xLDLUgao.mjs} +2 -2
- package/dist/widgets/remoteEntry.js +1 -1
- package/package.json +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DUSr1RDG.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-DkWTmjd2.mjs +0 -26
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/types": {
|
|
48
|
-
version: "1.2.
|
|
48
|
+
version: "1.2.616",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,11 +81,11 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.486",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
88
|
-
requiredVersion: ">=1.2.
|
|
88
|
+
requiredVersion: ">=1.2.486",
|
|
89
89
|
import: !1
|
|
90
90
|
}
|
|
91
91
|
},
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-B6NDlkw9.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -2753,7 +2753,7 @@ async function rr(e) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
2755
|
async function ir() {
|
|
2756
|
-
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-
|
|
2756
|
+
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-DqBsgmV2.mjs")).catch((e) => {
|
|
2757
2757
|
throw tr = void 0, e;
|
|
2758
2758
|
}), tr;
|
|
2759
2759
|
}
|
package/dist/widgets/_stub.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-dFo8NWrS.mjs";
|
|
2
2
|
import { a as p, i as m, n as h, o as ee, r as g, s as _, t as v } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react__loadShare__.js-Cz6ebdBh.mjs";
|
|
3
3
|
import { n as y, t as b } from "./_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B8RWlLTT.mjs";
|
|
4
4
|
//#region ../../node_modules/zod/v4/core/core.js
|
|
@@ -3684,9 +3684,27 @@ Z.extend({
|
|
|
3684
3684
|
deviceId: K().int().optional(),
|
|
3685
3685
|
confirmed: Q
|
|
3686
3686
|
});
|
|
3687
|
+
var as = Y({
|
|
3688
|
+
code: W(),
|
|
3689
|
+
label: W(),
|
|
3690
|
+
severity: X(["error", "warning"])
|
|
3691
|
+
});
|
|
3692
|
+
Y({
|
|
3693
|
+
faults: J(Y({
|
|
3694
|
+
address: W(),
|
|
3695
|
+
name: W().nullable(),
|
|
3696
|
+
deviceId: K().int().nullable(),
|
|
3697
|
+
severity: X(["error", "warning"]),
|
|
3698
|
+
code: W(),
|
|
3699
|
+
label: W(),
|
|
3700
|
+
since: K().nullable(),
|
|
3701
|
+
faults: J(as)
|
|
3702
|
+
})),
|
|
3703
|
+
unreported: J(W())
|
|
3704
|
+
});
|
|
3687
3705
|
//#endregion
|
|
3688
3706
|
//#region src/i18n/index.ts
|
|
3689
|
-
var { useT: $, Trans:
|
|
3707
|
+
var { useT: $, Trans: os, translate: ss } = d("provider-homematic", {
|
|
3690
3708
|
en: {
|
|
3691
3709
|
common: { loading: "Loading…" },
|
|
3692
3710
|
write: { failedTitle: "The CCU refused the change" },
|
|
@@ -3735,7 +3753,19 @@ var { useT: $, Trans: as, translate: os } = d("provider-homematic", {
|
|
|
3735
3753
|
ack: "Acknowledge",
|
|
3736
3754
|
ackTitle: "Acknowledge service message",
|
|
3737
3755
|
ackMessage: "Acknowledge {{type}} for {{name}} on the CCU? The message disappears from the CCU as well.",
|
|
3738
|
-
ackConfirm: "Acknowledge"
|
|
3756
|
+
ackConfirm: "Acknowledge",
|
|
3757
|
+
faultsTitle: "Active faults",
|
|
3758
|
+
faultsUnavailable: "Active faults unavailable",
|
|
3759
|
+
noFaults: "No active faults",
|
|
3760
|
+
colSeverity: "Severity",
|
|
3761
|
+
colFault: "Fault",
|
|
3762
|
+
colSince: "Since",
|
|
3763
|
+
severityError: "Error",
|
|
3764
|
+
severityWarning: "Warning",
|
|
3765
|
+
faultsMore: "+{{count}} more",
|
|
3766
|
+
openDevice: "Open device",
|
|
3767
|
+
faultsUnreported_one: "{{count}} device has not reported its service flags yet, so its state is unknown",
|
|
3768
|
+
faultsUnreported_other: "{{count}} devices have not reported their service flags yet, so their state is unknown"
|
|
3739
3769
|
},
|
|
3740
3770
|
devices: {
|
|
3741
3771
|
colDevice: "Device",
|
|
@@ -3793,7 +3823,12 @@ var { useT: $, Trans: as, translate: os } = d("provider-homematic", {
|
|
|
3793
3823
|
renameAction: "Rename on the CCU",
|
|
3794
3824
|
buttonEventsSaving: "Saving…",
|
|
3795
3825
|
buttonEventsSaved: "Saved",
|
|
3796
|
-
openDevicePage: "Open device page"
|
|
3826
|
+
openDevicePage: "Open device page",
|
|
3827
|
+
colEvents: "Events",
|
|
3828
|
+
eventsOk: "Events: ok",
|
|
3829
|
+
eventsMissing: "Events: no program",
|
|
3830
|
+
eventsInactive: "Events: program off",
|
|
3831
|
+
eventsUnknown: "Events: unknown"
|
|
3797
3832
|
},
|
|
3798
3833
|
heating: {
|
|
3799
3834
|
loadFailed: "Could not read the heating setup",
|
|
@@ -4051,6 +4086,67 @@ var { useT: $, Trans: as, translate: os } = d("provider-homematic", {
|
|
|
4051
4086
|
minutesAgo: "{{count}} min ago",
|
|
4052
4087
|
hoursAgo: "{{count}} h ago",
|
|
4053
4088
|
daysAgo: "{{count}} d ago"
|
|
4089
|
+
},
|
|
4090
|
+
detail: {
|
|
4091
|
+
back: "Back to devices",
|
|
4092
|
+
notFound: "Device {{address}} is not on this CCU.",
|
|
4093
|
+
notFoundTitle: "Device not found",
|
|
4094
|
+
identityTitle: "Identity",
|
|
4095
|
+
fieldName: "Name",
|
|
4096
|
+
fieldAddress: "Address",
|
|
4097
|
+
fieldType: "Type",
|
|
4098
|
+
fieldFirmware: "Firmware",
|
|
4099
|
+
fieldInterface: "Interface",
|
|
4100
|
+
fieldRooms: "Room",
|
|
4101
|
+
fieldFunctions: "Function",
|
|
4102
|
+
camstackDevice: "CamStack device",
|
|
4103
|
+
notAdopted: "Not adopted in CamStack",
|
|
4104
|
+
stateTitle: "Live state",
|
|
4105
|
+
stateUnavailable: "Live values unavailable",
|
|
4106
|
+
fieldSignal: "Signal",
|
|
4107
|
+
fieldDuty: "Duty cycle",
|
|
4108
|
+
fieldUnreach: "Unreachable",
|
|
4109
|
+
fieldBattery: "Low battery",
|
|
4110
|
+
fieldConfigPending: "Config pending",
|
|
4111
|
+
yes: "Yes",
|
|
4112
|
+
no: "No",
|
|
4113
|
+
unknown: "Unknown",
|
|
4114
|
+
colChannel: "Channel",
|
|
4115
|
+
colParameter: "Parameter",
|
|
4116
|
+
colValue: "Value",
|
|
4117
|
+
noValues: "This device has no readable values",
|
|
4118
|
+
eventsTitle: "Button events",
|
|
4119
|
+
eventsHint: "A button sends its presses outside the CCU only while an active CCU program references its key.",
|
|
4120
|
+
colKey: "Key",
|
|
4121
|
+
colCentral: "Central link",
|
|
4122
|
+
colProgram: "Event program",
|
|
4123
|
+
programNone: "No program references this key",
|
|
4124
|
+
programInactive: "Only disabled: {{names}}",
|
|
4125
|
+
programsUnavailable: "The programs could not be read",
|
|
4126
|
+
createProgram: "Create event program",
|
|
4127
|
+
createProgramTitle: "Create the event program",
|
|
4128
|
+
createProgramMessage: "Create a CCU program that references the keys of {{name}} so the CCU sends their presses.",
|
|
4129
|
+
createProgramConfirm: "Create program",
|
|
4130
|
+
createProgramUnavailable: "A program can only be created for an HmIP button.",
|
|
4131
|
+
manageCentral: "Central link",
|
|
4132
|
+
pressShort: "Short press",
|
|
4133
|
+
pressLong: "Long press",
|
|
4134
|
+
configTitle: "Configuration",
|
|
4135
|
+
configHint: "MASTER parameters of each channel, as stored on the device.",
|
|
4136
|
+
configOpen: "Edit configuration",
|
|
4137
|
+
groupsTitle: "Heating groups",
|
|
4138
|
+
groupsNone: "Not a member of any group",
|
|
4139
|
+
groupsUnavailable: "Groups unavailable",
|
|
4140
|
+
linksTitle: "Direct links",
|
|
4141
|
+
linksNone: "No direct links",
|
|
4142
|
+
linksUnavailable: "Direct links unavailable",
|
|
4143
|
+
colSender: "Sender",
|
|
4144
|
+
colReceiver: "Receiver",
|
|
4145
|
+
faultsTitle: "Faults and service messages",
|
|
4146
|
+
faultsNone: "No active faults or service messages",
|
|
4147
|
+
faultsUnavailable: "Faults unavailable",
|
|
4148
|
+
messagesUnavailable: "Service messages unavailable",
|
|
4149
|
+
faultsUnreported: "The CCU has not reported this device's service flags yet"
|
|
4054
4150
|
}
|
|
4055
4151
|
},
|
|
4056
4152
|
it: {
|
|
@@ -4101,7 +4197,19 @@ var { useT: $, Trans: as, translate: os } = d("provider-homematic", {
|
|
|
4101
4197
|
ack: "Conferma",
|
|
4102
4198
|
ackTitle: "Conferma messaggio di servizio",
|
|
4103
4199
|
ackMessage: "Confermare {{type}} per {{name}} sulla CCU? Il messaggio sparisce anche dalla CCU.",
|
|
4104
|
-
ackConfirm: "Conferma"
|
|
4200
|
+
ackConfirm: "Conferma",
|
|
4201
|
+
faultsTitle: "Guasti attivi",
|
|
4202
|
+
faultsUnavailable: "Guasti attivi non disponibili",
|
|
4203
|
+
noFaults: "Nessun guasto attivo",
|
|
4204
|
+
colSeverity: "Gravità",
|
|
4205
|
+
colFault: "Guasto",
|
|
4206
|
+
colSince: "Da",
|
|
4207
|
+
severityError: "Errore",
|
|
4208
|
+
severityWarning: "Avviso",
|
|
4209
|
+
faultsMore: "+{{count}} altri",
|
|
4210
|
+
openDevice: "Apri dispositivo",
|
|
4211
|
+
faultsUnreported_one: "{{count}} dispositivo non ha ancora riportato i flag di servizio, quindi il suo stato è sconosciuto",
|
|
4212
|
+
faultsUnreported_other: "{{count}} dispositivi non hanno ancora riportato i flag di servizio, quindi il loro stato è sconosciuto"
|
|
4105
4213
|
},
|
|
4106
4214
|
devices: {
|
|
4107
4215
|
colDevice: "Dispositivo",
|
|
@@ -4159,7 +4267,12 @@ var { useT: $, Trans: as, translate: os } = d("provider-homematic", {
|
|
|
4159
4267
|
renameAction: "Rinomina sulla CCU",
|
|
4160
4268
|
buttonEventsSaving: "Salvataggio…",
|
|
4161
4269
|
buttonEventsSaved: "Salvato",
|
|
4162
|
-
openDevicePage: "Apri la pagina del dispositivo"
|
|
4270
|
+
openDevicePage: "Apri la pagina del dispositivo",
|
|
4271
|
+
colEvents: "Eventi",
|
|
4272
|
+
eventsOk: "Eventi: ok",
|
|
4273
|
+
eventsMissing: "Eventi: nessun programma",
|
|
4274
|
+
eventsInactive: "Eventi: programma spento",
|
|
4275
|
+
eventsUnknown: "Eventi: sconosciuto"
|
|
4163
4276
|
},
|
|
4164
4277
|
heating: {
|
|
4165
4278
|
loadFailed: "Impossibile leggere il riscaldamento",
|
|
@@ -4417,12 +4530,73 @@ var { useT: $, Trans: as, translate: os } = d("provider-homematic", {
|
|
|
4417
4530
|
minutesAgo: "{{count}} min fa",
|
|
4418
4531
|
hoursAgo: "{{count}} h fa",
|
|
4419
4532
|
daysAgo: "{{count}} g fa"
|
|
4533
|
+
},
|
|
4534
|
+
detail: {
|
|
4535
|
+
back: "Torna ai dispositivi",
|
|
4536
|
+
notFound: "Il dispositivo {{address}} non è su questa CCU.",
|
|
4537
|
+
notFoundTitle: "Dispositivo non trovato",
|
|
4538
|
+
identityTitle: "Identità",
|
|
4539
|
+
fieldName: "Nome",
|
|
4540
|
+
fieldAddress: "Indirizzo",
|
|
4541
|
+
fieldType: "Tipo",
|
|
4542
|
+
fieldFirmware: "Firmware",
|
|
4543
|
+
fieldInterface: "Interfaccia",
|
|
4544
|
+
fieldRooms: "Stanza",
|
|
4545
|
+
fieldFunctions: "Funzione",
|
|
4546
|
+
camstackDevice: "Dispositivo CamStack",
|
|
4547
|
+
notAdopted: "Non adottato in CamStack",
|
|
4548
|
+
stateTitle: "Stato attuale",
|
|
4549
|
+
stateUnavailable: "Valori attuali non disponibili",
|
|
4550
|
+
fieldSignal: "Segnale",
|
|
4551
|
+
fieldDuty: "Duty cycle",
|
|
4552
|
+
fieldUnreach: "Non raggiungibile",
|
|
4553
|
+
fieldBattery: "Batteria scarica",
|
|
4554
|
+
fieldConfigPending: "Configurazione in attesa",
|
|
4555
|
+
yes: "Sì",
|
|
4556
|
+
no: "No",
|
|
4557
|
+
unknown: "Sconosciuto",
|
|
4558
|
+
colChannel: "Canale",
|
|
4559
|
+
colParameter: "Parametro",
|
|
4560
|
+
colValue: "Valore",
|
|
4561
|
+
noValues: "Il dispositivo non ha valori leggibili",
|
|
4562
|
+
eventsTitle: "Eventi dei tasti",
|
|
4563
|
+
eventsHint: "Un tasto invia le pressioni fuori dalla CCU solo mentre un programma attivo della CCU ne fa riferimento.",
|
|
4564
|
+
colKey: "Tasto",
|
|
4565
|
+
colCentral: "Collegamento centrale",
|
|
4566
|
+
colProgram: "Programma eventi",
|
|
4567
|
+
programNone: "Nessun programma fa riferimento a questo tasto",
|
|
4568
|
+
programInactive: "Solo disattivati: {{names}}",
|
|
4569
|
+
programsUnavailable: "Impossibile leggere i programmi",
|
|
4570
|
+
createProgram: "Crea programma eventi",
|
|
4571
|
+
createProgramTitle: "Crea il programma eventi",
|
|
4572
|
+
createProgramMessage: "Crea sulla CCU un programma che fa riferimento ai tasti di {{name}} così che la CCU ne invii le pressioni.",
|
|
4573
|
+
createProgramConfirm: "Crea programma",
|
|
4574
|
+
createProgramUnavailable: "Un programma si può creare solo per un tasto HmIP.",
|
|
4575
|
+
manageCentral: "Collegamento centrale",
|
|
4576
|
+
pressShort: "Pressione breve",
|
|
4577
|
+
pressLong: "Pressione lunga",
|
|
4578
|
+
configTitle: "Configurazione",
|
|
4579
|
+
configHint: "Parametri MASTER di ogni canale, come memorizzati nel dispositivo.",
|
|
4580
|
+
configOpen: "Modifica configurazione",
|
|
4581
|
+
groupsTitle: "Gruppi di riscaldamento",
|
|
4582
|
+
groupsNone: "Non appartiene ad alcun gruppo",
|
|
4583
|
+
groupsUnavailable: "Gruppi non disponibili",
|
|
4584
|
+
linksTitle: "Collegamenti diretti",
|
|
4585
|
+
linksNone: "Nessun collegamento diretto",
|
|
4586
|
+
linksUnavailable: "Collegamenti diretti non disponibili",
|
|
4587
|
+
colSender: "Mittente",
|
|
4588
|
+
colReceiver: "Destinatario",
|
|
4589
|
+
faultsTitle: "Guasti e messaggi di servizio",
|
|
4590
|
+
faultsNone: "Nessun guasto o messaggio di servizio attivo",
|
|
4591
|
+
faultsUnavailable: "Guasti non disponibili",
|
|
4592
|
+
messagesUnavailable: "Messaggi di servizio non disponibili",
|
|
4593
|
+
faultsUnreported: "La CCU non ha ancora riportato i flag di servizio di questo dispositivo"
|
|
4420
4594
|
}
|
|
4421
4595
|
}
|
|
4422
4596
|
});
|
|
4423
4597
|
//#endregion
|
|
4424
4598
|
//#region src/ui/ParamField.tsx
|
|
4425
|
-
function
|
|
4599
|
+
function cs(e, t) {
|
|
4426
4600
|
if (typeof t == "boolean") return t;
|
|
4427
4601
|
if (e.type === "INTEGER" || e.type === "FLOAT") {
|
|
4428
4602
|
if (t.trim() === "") return;
|
|
@@ -4431,7 +4605,7 @@ function ss(e, t) {
|
|
|
4431
4605
|
}
|
|
4432
4606
|
return t;
|
|
4433
4607
|
}
|
|
4434
|
-
function
|
|
4608
|
+
function ls(e) {
|
|
4435
4609
|
let { param: n, edit: i, onEdit: s } = e, { t: c } = $(), l = n.unit === null ? n.parameter : `${n.parameter} (${n.unit})`, u = n.min !== null && n.max !== null ? c("config.range", {
|
|
4436
4610
|
min: n.min,
|
|
4437
4611
|
max: n.max
|
|
@@ -4481,10 +4655,10 @@ function cs(e) {
|
|
|
4481
4655
|
}
|
|
4482
4656
|
//#endregion
|
|
4483
4657
|
//#region src/ui/ccu-client.ts
|
|
4484
|
-
var
|
|
4485
|
-
async function
|
|
4658
|
+
var us = "provider-homematic";
|
|
4659
|
+
async function ds(e, t, n, r) {
|
|
4486
4660
|
let i = await e.addons.custom.mutate({
|
|
4487
|
-
addonId:
|
|
4661
|
+
addonId: us,
|
|
4488
4662
|
action: t,
|
|
4489
4663
|
input: n
|
|
4490
4664
|
});
|
|
@@ -4492,7 +4666,7 @@ async function us(e, t, n, r) {
|
|
|
4492
4666
|
}
|
|
4493
4667
|
//#endregion
|
|
4494
4668
|
//#region src/ui/use-ccu-data.ts
|
|
4495
|
-
function
|
|
4669
|
+
function fs(e, t, n, r, i = {}) {
|
|
4496
4670
|
let [a, o] = _(void 0), [s, c] = _(null), [l, u] = _(n !== null), [d, f] = _(0), p = ee(0), h = JSON.stringify(n), v = i.pollMs;
|
|
4497
4671
|
return m(() => {
|
|
4498
4672
|
if (n === null) {
|
|
@@ -4500,7 +4674,7 @@ function ds(e, t, n, r, i = {}) {
|
|
|
4500
4674
|
return;
|
|
4501
4675
|
}
|
|
4502
4676
|
let i = ++p.current, a, s = (l) => {
|
|
4503
|
-
l && u(!0),
|
|
4677
|
+
l && u(!0), ds(e, t, n, r).then((e) => {
|
|
4504
4678
|
p.current === i && (o(e), c(null), u(!1), v !== void 0 && (a = setTimeout(() => s(!1), v)));
|
|
4505
4679
|
}, (e) => {
|
|
4506
4680
|
p.current === i && (c(e instanceof Error ? e.message : String(e)), u(!1), v !== void 0 && (a = setTimeout(() => s(!1), v)));
|
|
@@ -4525,7 +4699,7 @@ function ds(e, t, n, r, i = {}) {
|
|
|
4525
4699
|
}
|
|
4526
4700
|
//#endregion
|
|
4527
4701
|
//#region src/ui/use-ccu-write.ts
|
|
4528
|
-
function
|
|
4702
|
+
function ps(e) {
|
|
4529
4703
|
let t = i(), n = l(), { t: r } = $();
|
|
4530
4704
|
return g(async (i) => {
|
|
4531
4705
|
if (!await t({
|
|
@@ -4535,7 +4709,7 @@ function fs(e) {
|
|
|
4535
4709
|
variant: i.variant ?? "default"
|
|
4536
4710
|
})) return null;
|
|
4537
4711
|
try {
|
|
4538
|
-
return await
|
|
4712
|
+
return await ds(e, i.action, {
|
|
4539
4713
|
...i.input,
|
|
4540
4714
|
confirmed: !0
|
|
4541
4715
|
}, i.schema);
|
|
@@ -4555,8 +4729,8 @@ function fs(e) {
|
|
|
4555
4729
|
}
|
|
4556
4730
|
//#endregion
|
|
4557
4731
|
//#region src/ui/ChannelConfigDialog.tsx
|
|
4558
|
-
function
|
|
4559
|
-
let { trpc: n, integrationId: i, device: a, onClose: o } = e, { t: s } = $(), l =
|
|
4732
|
+
function ms(e) {
|
|
4733
|
+
let { trpc: n, integrationId: i, device: a, onClose: o } = e, { t: s } = $(), l = ps(n), d = fs(n, "getCcuDeviceConfig", p(() => ({
|
|
4560
4734
|
integrationId: i,
|
|
4561
4735
|
address: a.address
|
|
4562
4736
|
}), [i, a.address]), Wo), [m, h] = _(null), [ee, g] = _({}), [v, x] = _(!1), S = d.data?.channels ?? [], C = S.find((e) => e.channel === m) ?? S[0], te = p(() => {
|
|
@@ -4564,7 +4738,7 @@ function ps(e) {
|
|
|
4564
4738
|
for (let t of C?.params ?? []) {
|
|
4565
4739
|
let n = ee[`${C?.channel}/${t.parameter}`];
|
|
4566
4740
|
if (n === void 0) continue;
|
|
4567
|
-
let r =
|
|
4741
|
+
let r = cs(t, n);
|
|
4568
4742
|
r !== void 0 && r !== t.value && (e[t.parameter] = r);
|
|
4569
4743
|
}
|
|
4570
4744
|
return e;
|
|
@@ -4633,7 +4807,7 @@ function ps(e) {
|
|
|
4633
4807
|
className: "text-xs text-danger",
|
|
4634
4808
|
children: s("config.valuesUnreadable", { error: C.error })
|
|
4635
4809
|
}),
|
|
4636
|
-
C.params.map((e) => /* @__PURE__ */ b(
|
|
4810
|
+
C.params.map((e) => /* @__PURE__ */ b(ls, {
|
|
4637
4811
|
param: e,
|
|
4638
4812
|
edit: ee[`${C.channel}/${e.parameter}`],
|
|
4639
4813
|
onEdit: (t) => g((n) => ({
|
|
@@ -4651,28 +4825,28 @@ function ps(e) {
|
|
|
4651
4825
|
}
|
|
4652
4826
|
//#endregion
|
|
4653
4827
|
//#region src/ui/value-format.ts
|
|
4654
|
-
function
|
|
4828
|
+
function hs(e) {
|
|
4655
4829
|
return e.type !== "ENUM" || e.valueList === null || typeof e.value != "number" ? e : {
|
|
4656
4830
|
...e,
|
|
4657
4831
|
value: e.valueList[e.value] ?? null
|
|
4658
4832
|
};
|
|
4659
4833
|
}
|
|
4660
|
-
function
|
|
4834
|
+
function gs(e, t) {
|
|
4661
4835
|
if (e.type === "ENUM" && e.valueList !== null && typeof t == "string") {
|
|
4662
4836
|
let n = e.valueList.indexOf(t);
|
|
4663
4837
|
return n < 0 ? void 0 : n;
|
|
4664
4838
|
}
|
|
4665
|
-
return
|
|
4839
|
+
return cs(e, t);
|
|
4666
4840
|
}
|
|
4667
|
-
function
|
|
4841
|
+
function _s(e) {
|
|
4668
4842
|
if (!e.readable || e.value === null || typeof e.value == "boolean") return null;
|
|
4669
|
-
let t =
|
|
4843
|
+
let t = hs(e).value;
|
|
4670
4844
|
return t === null ? null : e.unit === null || e.unit === "" ? String(t) : `${String(t)} ${e.unit}`;
|
|
4671
4845
|
}
|
|
4672
4846
|
//#endregion
|
|
4673
4847
|
//#region src/ui/SetValueDialog.tsx
|
|
4674
|
-
function
|
|
4675
|
-
let { param: t, channelLabel: n, onClose: r, onSet: i } = e, { t: a } = $(), [o, s] = _(void 0), [l, u] = _(!1), d = o === void 0 ? void 0 :
|
|
4848
|
+
function vs(e) {
|
|
4849
|
+
let { param: t, channelLabel: n, onClose: r, onSet: i } = e, { t: a } = $(), [o, s] = _(void 0), [l, u] = _(!1), d = o === void 0 ? void 0 : gs(t, o), p = async () => {
|
|
4676
4850
|
if (d !== void 0) {
|
|
4677
4851
|
u(!0);
|
|
4678
4852
|
try {
|
|
@@ -4697,8 +4871,8 @@ function _s(e) {
|
|
|
4697
4871
|
disabled: d === void 0 || l,
|
|
4698
4872
|
children: a("panel.set")
|
|
4699
4873
|
}),
|
|
4700
|
-
children: /* @__PURE__ */ b(
|
|
4701
|
-
param:
|
|
4874
|
+
children: /* @__PURE__ */ b(ls, {
|
|
4875
|
+
param: hs(t),
|
|
4702
4876
|
edit: o,
|
|
4703
4877
|
onEdit: s
|
|
4704
4878
|
})
|
|
@@ -4706,10 +4880,10 @@ function _s(e) {
|
|
|
4706
4880
|
}
|
|
4707
4881
|
//#endregion
|
|
4708
4882
|
//#region src/ui/DevicePanel.tsx
|
|
4709
|
-
function
|
|
4883
|
+
function ys(e) {
|
|
4710
4884
|
return e.name ?? `${e.type ?? e.address} · ${e.index}`;
|
|
4711
4885
|
}
|
|
4712
|
-
function
|
|
4886
|
+
function bs(e) {
|
|
4713
4887
|
let { diagnostics: t, firmware: r } = e.state, { t: i } = $(), a = (e) => e === null ? "—" : String(e);
|
|
4714
4888
|
return /* @__PURE__ */ y("div", {
|
|
4715
4889
|
className: "flex flex-wrap items-center gap-2",
|
|
@@ -4744,12 +4918,12 @@ function ys(e) {
|
|
|
4744
4918
|
]
|
|
4745
4919
|
});
|
|
4746
4920
|
}
|
|
4747
|
-
function
|
|
4748
|
-
let { trpc: r, integrationId: i, address: a, deviceId: o } = t, { t: s } = $(), l =
|
|
4921
|
+
function xs(t) {
|
|
4922
|
+
let { trpc: r, integrationId: i, address: a, deviceId: o } = t, { t: s } = $(), l = fs(r, "getCcuDeviceState", p(() => ({
|
|
4749
4923
|
integrationId: i,
|
|
4750
4924
|
address: a
|
|
4751
|
-
}), [i, a]), is), d =
|
|
4752
|
-
let r = t.type === "ACTION", a =
|
|
4925
|
+
}), [i, a]), is), d = ps(r), [f, m] = _({ kind: "closed" }), h = async (e, t, n) => {
|
|
4926
|
+
let r = t.type === "ACTION", a = hs({
|
|
4753
4927
|
...t,
|
|
4754
4928
|
value: n
|
|
4755
4929
|
}).value;
|
|
@@ -4766,10 +4940,10 @@ function bs(t) {
|
|
|
4766
4940
|
title: s("panel.writeTitle"),
|
|
4767
4941
|
message: r ? s("panel.pressMessage", {
|
|
4768
4942
|
parameter: t.parameter,
|
|
4769
|
-
channel:
|
|
4943
|
+
channel: ys(e)
|
|
4770
4944
|
}) : s("panel.writeMessage", {
|
|
4771
4945
|
parameter: t.parameter,
|
|
4772
|
-
channel:
|
|
4946
|
+
channel: ys(e),
|
|
4773
4947
|
value: String(a)
|
|
4774
4948
|
}),
|
|
4775
4949
|
confirmLabel: s("panel.writeConfirm"),
|
|
@@ -4810,7 +4984,7 @@ function bs(t) {
|
|
|
4810
4984
|
children: e.value ? s("panel.yes") : s("panel.no")
|
|
4811
4985
|
}) : /* @__PURE__ */ b("span", {
|
|
4812
4986
|
className: "text-sm text-foreground",
|
|
4813
|
-
children:
|
|
4987
|
+
children: _s(e) ?? "—"
|
|
4814
4988
|
}), v = (e) => [
|
|
4815
4989
|
{
|
|
4816
4990
|
key: "parameter",
|
|
@@ -4873,13 +5047,13 @@ function bs(t) {
|
|
|
4873
5047
|
})]
|
|
4874
5048
|
})]
|
|
4875
5049
|
}),
|
|
4876
|
-
/* @__PURE__ */ b(
|
|
5050
|
+
/* @__PURE__ */ b(bs, { state: x }),
|
|
4877
5051
|
x.channels.filter((e) => e.values.length > 0).map((t) => /* @__PURE__ */ y("div", {
|
|
4878
5052
|
className: "flex flex-col gap-1",
|
|
4879
5053
|
children: [/* @__PURE__ */ y("span", {
|
|
4880
5054
|
className: "text-xs font-medium text-foreground-muted",
|
|
4881
5055
|
children: [
|
|
4882
|
-
t.index === 0 ? s("panel.maintenance") :
|
|
5056
|
+
t.index === 0 ? s("panel.maintenance") : ys(t),
|
|
4883
5057
|
" ·",
|
|
4884
5058
|
" ",
|
|
4885
5059
|
t.address
|
|
@@ -4892,7 +5066,7 @@ function bs(t) {
|
|
|
4892
5066
|
emptyMessage: s("panel.none")
|
|
4893
5067
|
})]
|
|
4894
5068
|
}, t.address)),
|
|
4895
|
-
f.kind === "configure" && /* @__PURE__ */ b(
|
|
5069
|
+
f.kind === "configure" && /* @__PURE__ */ b(ms, {
|
|
4896
5070
|
trpc: r,
|
|
4897
5071
|
integrationId: i,
|
|
4898
5072
|
device: {
|
|
@@ -4901,9 +5075,9 @@ function bs(t) {
|
|
|
4901
5075
|
},
|
|
4902
5076
|
onClose: () => m({ kind: "closed" })
|
|
4903
5077
|
}),
|
|
4904
|
-
f.kind === "set" && /* @__PURE__ */ b(
|
|
5078
|
+
f.kind === "set" && /* @__PURE__ */ b(vs, {
|
|
4905
5079
|
param: f.param,
|
|
4906
|
-
channelLabel:
|
|
5080
|
+
channelLabel: ys(f.channel),
|
|
4907
5081
|
onClose: () => m({ kind: "closed" }),
|
|
4908
5082
|
onSet: async (e) => {
|
|
4909
5083
|
await h(f.channel, f.param, e) && m({ kind: "closed" });
|
|
@@ -4914,13 +5088,13 @@ function bs(t) {
|
|
|
4914
5088
|
}
|
|
4915
5089
|
//#endregion
|
|
4916
5090
|
//#region src/widgets/DevicePanelWidget.tsx
|
|
4917
|
-
var
|
|
5091
|
+
var Ss = Y({
|
|
4918
5092
|
integrationId: W().min(1),
|
|
4919
5093
|
address: W().min(1)
|
|
4920
5094
|
});
|
|
4921
|
-
function
|
|
4922
|
-
let t = s(), { t: n } = $(), r =
|
|
4923
|
-
return r.success ? /* @__PURE__ */ b(
|
|
5095
|
+
function Cs(e) {
|
|
5096
|
+
let t = s(), { t: n } = $(), r = Ss.safeParse(e.config ?? {});
|
|
5097
|
+
return r.success ? /* @__PURE__ */ b(xs, {
|
|
4924
5098
|
trpc: t,
|
|
4925
5099
|
integrationId: r.data.integrationId,
|
|
4926
5100
|
address: r.data.address,
|
|
@@ -4932,6 +5106,6 @@ function Ss(e) {
|
|
|
4932
5106
|
}
|
|
4933
5107
|
//#endregion
|
|
4934
5108
|
//#region src/widgets/index.tsx
|
|
4935
|
-
var
|
|
5109
|
+
var ws = { "device-panel": Cs };
|
|
4936
5110
|
//#endregion
|
|
4937
|
-
export {
|
|
5111
|
+
export { ws as default };
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.616",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_provider_homematic_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.486",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_provider_homematic_widgets",
|