@matter-server/dashboard 0.2.0-alpha.0-00000000-000000000
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/LICENSE +201 -0
- package/README.md +11 -0
- package/dist/esm/client/client-context.d.ts +10 -0
- package/dist/esm/client/client-context.d.ts.map +1 -0
- package/dist/esm/client/client-context.js +11 -0
- package/dist/esm/client/client-context.js.map +6 -0
- package/dist/esm/client/models/descriptions.d.ts +20 -0
- package/dist/esm/client/models/descriptions.d.ts.map +1 -0
- package/dist/esm/client/models/descriptions.js +10929 -0
- package/dist/esm/client/models/descriptions.js.map +6 -0
- package/dist/esm/components/dialog-box/dialog-box.d.ts +25 -0
- package/dist/esm/components/dialog-box/dialog-box.d.ts.map +1 -0
- package/dist/esm/components/dialog-box/dialog-box.js +66 -0
- package/dist/esm/components/dialog-box/dialog-box.js.map +6 -0
- package/dist/esm/components/dialog-box/show-dialog-box.d.ts +18 -0
- package/dist/esm/components/dialog-box/show-dialog-box.d.ts.map +1 -0
- package/dist/esm/components/dialog-box/show-dialog-box.js +22 -0
- package/dist/esm/components/dialog-box/show-dialog-box.js.map +6 -0
- package/dist/esm/components/dialogs/acl/model.d.ts +33 -0
- package/dist/esm/components/dialogs/acl/model.d.ts.map +1 -0
- package/dist/esm/components/dialogs/acl/model.js +79 -0
- package/dist/esm/components/dialogs/acl/model.js.map +6 -0
- package/dist/esm/components/dialogs/binding/model.d.ts +20 -0
- package/dist/esm/components/dialogs/binding/model.d.ts.map +1 -0
- package/dist/esm/components/dialogs/binding/model.js +45 -0
- package/dist/esm/components/dialogs/binding/model.js.map +6 -0
- package/dist/esm/components/dialogs/binding/node-binding-dialog.d.ts +49 -0
- package/dist/esm/components/dialogs/binding/node-binding-dialog.d.ts.map +1 -0
- package/dist/esm/components/dialogs/binding/node-binding-dialog.js +357 -0
- package/dist/esm/components/dialogs/binding/node-binding-dialog.js.map +6 -0
- package/dist/esm/components/dialogs/binding/show-node-binding-dialog.d.ts +8 -0
- package/dist/esm/components/dialogs/binding/show-node-binding-dialog.d.ts.map +1 -0
- package/dist/esm/components/dialogs/binding/show-node-binding-dialog.js +17 -0
- package/dist/esm/components/dialogs/binding/show-node-binding-dialog.js.map +6 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts +31 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts.map +1 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js +94 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js.map +6 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.d.ts +17 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.d.ts.map +1 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.js +64 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.js.map +6 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.d.ts +19 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.d.ts.map +1 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js +91 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js.map +6 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.d.ts +20 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.d.ts.map +1 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js +106 -0
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js.map +6 -0
- package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.d.ts +8 -0
- package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.d.ts.map +1 -0
- package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.js +15 -0
- package/dist/esm/components/dialogs/commission-node-dialog/show-commission-node-dialog.js.map +6 -0
- package/dist/esm/components/ha-svg-icon.d.ts +19 -0
- package/dist/esm/components/ha-svg-icon.d.ts.map +1 -0
- package/dist/esm/components/ha-svg-icon.js +77 -0
- package/dist/esm/components/ha-svg-icon.js.map +6 -0
- package/dist/esm/entrypoint/main.d.ts +7 -0
- package/dist/esm/entrypoint/main.d.ts.map +1 -0
- package/dist/esm/entrypoint/main.js +45 -0
- package/dist/esm/entrypoint/main.js.map +6 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pages/components/context.d.ts +9 -0
- package/dist/esm/pages/components/context.d.ts.map +1 -0
- package/dist/esm/pages/components/context.js +11 -0
- package/dist/esm/pages/components/context.js.map +6 -0
- package/dist/esm/pages/components/footer.d.ts +11 -0
- package/dist/esm/pages/components/footer.d.ts.map +1 -0
- package/dist/esm/pages/components/footer.js +52 -0
- package/dist/esm/pages/components/footer.js.map +6 -0
- package/dist/esm/pages/components/header.d.ts +27 -0
- package/dist/esm/pages/components/header.d.ts.map +1 -0
- package/dist/esm/pages/components/header.js +90 -0
- package/dist/esm/pages/components/header.js.map +6 -0
- package/dist/esm/pages/components/node-details.d.ts +29 -0
- package/dist/esm/pages/components/node-details.d.ts.map +1 -0
- package/dist/esm/pages/components/node-details.js +241 -0
- package/dist/esm/pages/components/node-details.js.map +6 -0
- package/dist/esm/pages/components/server-details.d.ts +24 -0
- package/dist/esm/pages/components/server-details.d.ts.map +1 -0
- package/dist/esm/pages/components/server-details.js +130 -0
- package/dist/esm/pages/components/server-details.js.map +6 -0
- package/dist/esm/pages/matter-cluster-view.d.ts +30 -0
- package/dist/esm/pages/matter-cluster-view.d.ts.map +1 -0
- package/dist/esm/pages/matter-cluster-view.js +154 -0
- package/dist/esm/pages/matter-cluster-view.js.map +6 -0
- package/dist/esm/pages/matter-dashboard-app.d.ts +27 -0
- package/dist/esm/pages/matter-dashboard-app.d.ts.map +1 -0
- package/dist/esm/pages/matter-dashboard-app.js +122 -0
- package/dist/esm/pages/matter-dashboard-app.js.map +6 -0
- package/dist/esm/pages/matter-endpoint-view.d.ts +29 -0
- package/dist/esm/pages/matter-endpoint-view.d.ts.map +1 -0
- package/dist/esm/pages/matter-endpoint-view.js +149 -0
- package/dist/esm/pages/matter-endpoint-view.js.map +6 -0
- package/dist/esm/pages/matter-node-view.d.ts +28 -0
- package/dist/esm/pages/matter-node-view.d.ts.map +1 -0
- package/dist/esm/pages/matter-node-view.js +122 -0
- package/dist/esm/pages/matter-node-view.js.map +6 -0
- package/dist/esm/pages/matter-server-view.d.ts +31 -0
- package/dist/esm/pages/matter-server-view.d.ts.map +1 -0
- package/dist/esm/pages/matter-server-view.js +113 -0
- package/dist/esm/pages/matter-server-view.js.map +6 -0
- package/dist/esm/util/clone_class.d.ts +7 -0
- package/dist/esm/util/clone_class.d.ts.map +1 -0
- package/dist/esm/util/clone_class.js +10 -0
- package/dist/esm/util/clone_class.js.map +6 -0
- package/dist/esm/util/fire_event.d.ts +34 -0
- package/dist/esm/util/fire_event.d.ts.map +1 -0
- package/dist/esm/util/fire_event.js +21 -0
- package/dist/esm/util/fire_event.js.map +6 -0
- package/dist/esm/util/prevent_default.d.ts +7 -0
- package/dist/esm/util/prevent_default.d.ts.map +1 -0
- package/dist/esm/util/prevent_default.js +10 -0
- package/dist/esm/util/prevent_default.js.map +6 -0
- package/dist/esm/util/routing.d.ts +10 -0
- package/dist/esm/util/routing.d.ts.map +1 -0
- package/dist/esm/util/routing.js +6 -0
- package/dist/esm/util/routing.js.map +6 -0
- package/dist/web/index.html +40 -0
- package/dist/web/js/commission-node-dialog-BJsfA4IV.js +78 -0
- package/dist/web/js/commission-node-dialog-DEZ3EqYO.js +78 -0
- package/dist/web/js/commission-node-existing-CzRtUgBm.js +50 -0
- package/dist/web/js/commission-node-existing-OK1ybPFI.js +50 -0
- package/dist/web/js/commission-node-thread-DLmclivF.js +75 -0
- package/dist/web/js/commission-node-thread-FcLFz84I.js +75 -0
- package/dist/web/js/commission-node-wifi-C8ho-UYb.js +88 -0
- package/dist/web/js/commission-node-wifi-C8iGfy7c.js +88 -0
- package/dist/web/js/dialog-box-BPz-oO3d.js +52 -0
- package/dist/web/js/dialog-box-DN32sjfR.js +52 -0
- package/dist/web/js/fire_event-BERTqZpV.js +169 -0
- package/dist/web/js/fire_event-BlsbXpOL.js +169 -0
- package/dist/web/js/main.js +547 -0
- package/dist/web/js/matter-dashboard-app-5UjO1Ik8.js +16068 -0
- package/dist/web/js/matter-dashboard-app-BazvuIIi.js +16068 -0
- package/dist/web/js/node-binding-dialog-2yitVn0R.js +443 -0
- package/dist/web/js/node-binding-dialog-Cw6QEmL3.js +443 -0
- package/dist/web/js/outlined-text-field-BMLYwwlc.js +2086 -0
- package/dist/web/js/outlined-text-field-Sqd4JHxo.js +2086 -0
- package/dist/web/js/prevent_default-BsT53c0u.js +814 -0
- package/dist/web/js/prevent_default-D4GG_QeD.js +814 -0
- package/package.json +54 -0
- package/src/client/client-context.ts +10 -0
- package/src/client/models/descriptions.ts +10948 -0
- package/src/components/dialog-box/dialog-box.ts +62 -0
- package/src/components/dialog-box/show-dialog-box.ts +32 -0
- package/src/components/dialogs/acl/model.ts +105 -0
- package/src/components/dialogs/binding/model.ts +58 -0
- package/src/components/dialogs/binding/node-binding-dialog.ts +419 -0
- package/src/components/dialogs/binding/show-node-binding-dialog.ts +16 -0
- package/src/components/dialogs/commission-node-dialog/commission-node-dialog.ts +102 -0
- package/src/components/dialogs/commission-node-dialog/commission-node-existing.ts +49 -0
- package/src/components/dialogs/commission-node-dialog/commission-node-thread.ts +76 -0
- package/src/components/dialogs/commission-node-dialog/commission-node-wifi.ts +90 -0
- package/src/components/dialogs/commission-node-dialog/show-commission-node-dialog.ts +14 -0
- package/src/components/ha-svg-icon.ts +66 -0
- package/src/entrypoint/main.ts +60 -0
- package/src/pages/components/context.ts +10 -0
- package/src/pages/components/footer.ts +39 -0
- package/src/pages/components/header.ts +87 -0
- package/src/pages/components/node-details.ts +252 -0
- package/src/pages/components/server-details.ts +124 -0
- package/src/pages/matter-cluster-view.ts +162 -0
- package/src/pages/matter-dashboard-app.ts +125 -0
- package/src/pages/matter-endpoint-view.ts +152 -0
- package/src/pages/matter-node-view.ts +126 -0
- package/src/pages/matter-server-view.ts +117 -0
- package/src/tsconfig.json +16 -0
- package/src/util/clone_class.ts +7 -0
- package/src/util/fire_event.ts +83 -0
- package/src/util/prevent_default.ts +7 -0
- package/src/util/routing.ts +10 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="utf-8" />
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
<meta name="theme-color" content="#03a9f4" />
|
|
6
|
+
<title>Open Home Foundation Matter Server</title>
|
|
7
|
+
<script type="module" src="js/main.js"></script>
|
|
8
|
+
<style>
|
|
9
|
+
body {
|
|
10
|
+
--roboto-font: Roboto, system-ui;
|
|
11
|
+
--text-color: rgba(0, 0, 0, 0.6);
|
|
12
|
+
--danger-color: #db4437;
|
|
13
|
+
|
|
14
|
+
--md-sys-color-primary: #03a9f4;;
|
|
15
|
+
--md-sys-color-on-primary: #fff;
|
|
16
|
+
--md-ref-typeface-brand: var(--roboto-font);
|
|
17
|
+
--md-ref-typeface-plain: var(--roboto-font);
|
|
18
|
+
|
|
19
|
+
--md-sys-color-background: #f5f5f5;
|
|
20
|
+
--md-sys-color-surface: #fff;
|
|
21
|
+
--md-sys-color-surface-container: #fff;
|
|
22
|
+
--md-sys-color-surface-container-high: #fff;
|
|
23
|
+
--md-sys-color-surface-container-highest: #f5f5f5;
|
|
24
|
+
--md-sys-color-secondary-container: #e0e0e0;
|
|
25
|
+
|
|
26
|
+
--md-sys-typescale-headline-font: var(--roboto-font);
|
|
27
|
+
--md-sys-typescale-title-font: var(--roboto-font);
|
|
28
|
+
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
font-family: var(--roboto-font);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
a {
|
|
35
|
+
color: var(--primary-color);
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
</head>
|
|
39
|
+
<body></body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { r, n, t, i, b } from './matter-dashboard-app-5UjO1Ik8.js';
|
|
2
|
+
import { p as preventDefault } from './prevent_default-BsT53c0u.js';
|
|
3
|
+
import './main.js';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
let ComissionNodeDialog = class extends i {
|
|
14
|
+
render() {
|
|
15
|
+
return b`
|
|
16
|
+
<md-dialog open @cancel=${preventDefault} @closed=${this._handleClosed}>
|
|
17
|
+
<div slot="headline">Commission node</div>
|
|
18
|
+
<div slot="content" @node-commissioned=${this._nodeCommissioned}>
|
|
19
|
+
${!this._mode ? b`<md-list>
|
|
20
|
+
<md-list-item
|
|
21
|
+
type="button"
|
|
22
|
+
.disabled=${!this.client.serverInfo.bluetooth_enabled}
|
|
23
|
+
@click=${this._commissionWifi}
|
|
24
|
+
>Commission new WiFi device</md-list-item
|
|
25
|
+
>
|
|
26
|
+
<md-list-item
|
|
27
|
+
type="button"
|
|
28
|
+
.disabled=${!this.client.serverInfo.bluetooth_enabled}
|
|
29
|
+
@click=${this._commissionThread}
|
|
30
|
+
>Commission new Thread device</md-list-item
|
|
31
|
+
>
|
|
32
|
+
<md-list-item type="button" @click=${this._commissionExisting}
|
|
33
|
+
>Commission existing device</md-list-item
|
|
34
|
+
>
|
|
35
|
+
</md-list>` : this._mode === "wifi" ? b`<commission-node-wifi></commission-node-wifi>` : this._mode === "thread" ? b`<commission-node-thread></commission-node-thread>` : b`<commission-node-existing></commission-node-existing>`}
|
|
36
|
+
</div>
|
|
37
|
+
<div slot="actions">
|
|
38
|
+
<md-text-button @click=${this._close}>Cancel</md-text-button>
|
|
39
|
+
</div>
|
|
40
|
+
</md-dialog>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
_commissionWifi() {
|
|
44
|
+
if (!this.client.serverInfo.bluetooth_enabled) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
import('./commission-node-wifi-C8iGfy7c.js');
|
|
48
|
+
this._mode = "wifi";
|
|
49
|
+
}
|
|
50
|
+
_commissionThread() {
|
|
51
|
+
if (!this.client.serverInfo.bluetooth_enabled) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
import('./commission-node-thread-FcLFz84I.js');
|
|
55
|
+
this._mode = "thread";
|
|
56
|
+
}
|
|
57
|
+
_commissionExisting() {
|
|
58
|
+
import('./commission-node-existing-CzRtUgBm.js');
|
|
59
|
+
this._mode = "existing";
|
|
60
|
+
}
|
|
61
|
+
_nodeCommissioned(ev) {
|
|
62
|
+
window.location.href = `#node/${ev.detail.node_id}`;
|
|
63
|
+
this._close();
|
|
64
|
+
}
|
|
65
|
+
_close() {
|
|
66
|
+
this.shadowRoot.querySelector("md-dialog").close();
|
|
67
|
+
}
|
|
68
|
+
_handleClosed() {
|
|
69
|
+
this.parentNode.removeChild(this);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([n({
|
|
73
|
+
attribute: false
|
|
74
|
+
})], ComissionNodeDialog.prototype, "client", 2);
|
|
75
|
+
__decorateClass([r()], ComissionNodeDialog.prototype, "_mode", 2);
|
|
76
|
+
ComissionNodeDialog = __decorateClass([t("commission-node-dialog")], ComissionNodeDialog);
|
|
77
|
+
|
|
78
|
+
export { ComissionNodeDialog };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { r, n, t, i, b } from './matter-dashboard-app-BazvuIIi.js';
|
|
2
|
+
import { p as preventDefault } from './prevent_default-D4GG_QeD.js';
|
|
3
|
+
import './main.js';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
let ComissionNodeDialog = class extends i {
|
|
14
|
+
render() {
|
|
15
|
+
return b`
|
|
16
|
+
<md-dialog open @cancel=${preventDefault} @closed=${this._handleClosed}>
|
|
17
|
+
<div slot="headline">Commission node</div>
|
|
18
|
+
<div slot="content" @node-commissioned=${this._nodeCommissioned}>
|
|
19
|
+
${!this._mode ? b`<md-list>
|
|
20
|
+
<md-list-item
|
|
21
|
+
type="button"
|
|
22
|
+
.disabled=${!this.client.serverInfo.bluetooth_enabled}
|
|
23
|
+
@click=${this._commissionWifi}
|
|
24
|
+
>Commission new WiFi device</md-list-item
|
|
25
|
+
>
|
|
26
|
+
<md-list-item
|
|
27
|
+
type="button"
|
|
28
|
+
.disabled=${!this.client.serverInfo.bluetooth_enabled}
|
|
29
|
+
@click=${this._commissionThread}
|
|
30
|
+
>Commission new Thread device</md-list-item
|
|
31
|
+
>
|
|
32
|
+
<md-list-item type="button" @click=${this._commissionExisting}
|
|
33
|
+
>Commission existing device</md-list-item
|
|
34
|
+
>
|
|
35
|
+
</md-list>` : this._mode === "wifi" ? b`<commission-node-wifi></commission-node-wifi>` : this._mode === "thread" ? b`<commission-node-thread></commission-node-thread>` : b`<commission-node-existing></commission-node-existing>`}
|
|
36
|
+
</div>
|
|
37
|
+
<div slot="actions">
|
|
38
|
+
<md-text-button @click=${this._close}>Cancel</md-text-button>
|
|
39
|
+
</div>
|
|
40
|
+
</md-dialog>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
_commissionWifi() {
|
|
44
|
+
if (!this.client.serverInfo.bluetooth_enabled) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
import('./commission-node-wifi-C8ho-UYb.js');
|
|
48
|
+
this._mode = "wifi";
|
|
49
|
+
}
|
|
50
|
+
_commissionThread() {
|
|
51
|
+
if (!this.client.serverInfo.bluetooth_enabled) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
import('./commission-node-thread-DLmclivF.js');
|
|
55
|
+
this._mode = "thread";
|
|
56
|
+
}
|
|
57
|
+
_commissionExisting() {
|
|
58
|
+
import('./commission-node-existing-OK1ybPFI.js');
|
|
59
|
+
this._mode = "existing";
|
|
60
|
+
}
|
|
61
|
+
_nodeCommissioned(ev) {
|
|
62
|
+
window.location.href = `#node/${ev.detail.node_id}`;
|
|
63
|
+
this._close();
|
|
64
|
+
}
|
|
65
|
+
_close() {
|
|
66
|
+
this.shadowRoot.querySelector("md-dialog").close();
|
|
67
|
+
}
|
|
68
|
+
_handleClosed() {
|
|
69
|
+
this.parentNode.removeChild(this);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([n({
|
|
73
|
+
attribute: false
|
|
74
|
+
})], ComissionNodeDialog.prototype, "client", 2);
|
|
75
|
+
__decorateClass([r()], ComissionNodeDialog.prototype, "_mode", 2);
|
|
76
|
+
ComissionNodeDialog = __decorateClass([t("commission-node-dialog")], ComissionNodeDialog);
|
|
77
|
+
|
|
78
|
+
export { ComissionNodeDialog };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { r, c, n, d as clientContext, e, t, i, A, b } from './matter-dashboard-app-5UjO1Ik8.js';
|
|
2
|
+
import { f as fireEvent } from './fire_event-BlsbXpOL.js';
|
|
3
|
+
import './outlined-text-field-BMLYwwlc.js';
|
|
4
|
+
import './main.js';
|
|
5
|
+
import './prevent_default-BsT53c0u.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let CommissionNodeExisting = class extends i {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._loading = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return b`<md-outlined-text-field label="Share code" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
22
|
+
<br />
|
|
23
|
+
<br />
|
|
24
|
+
<md-outlined-button @click=${this._commissionNode} .disabled="${this._loading}"
|
|
25
|
+
>Commission</md-outlined-button
|
|
26
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
27
|
+
}
|
|
28
|
+
async _commissionNode() {
|
|
29
|
+
this._loading = true;
|
|
30
|
+
try {
|
|
31
|
+
const node = await this.client.commissionWithCode(this._pairingCodeField.value, true);
|
|
32
|
+
fireEvent(this, "node-commissioned", node);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
alert(`Error commissioning node: ${err.message}`);
|
|
35
|
+
} finally {
|
|
36
|
+
this._loading = false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
__decorateClass([c({
|
|
41
|
+
context: clientContext,
|
|
42
|
+
subscribe: true
|
|
43
|
+
}), n({
|
|
44
|
+
attribute: false
|
|
45
|
+
})], CommissionNodeExisting.prototype, "client", 2);
|
|
46
|
+
__decorateClass([r()], CommissionNodeExisting.prototype, "_loading", 2);
|
|
47
|
+
__decorateClass([e("md-outlined-text-field[label='Share code']")], CommissionNodeExisting.prototype, "_pairingCodeField", 2);
|
|
48
|
+
CommissionNodeExisting = __decorateClass([t("commission-node-existing")], CommissionNodeExisting);
|
|
49
|
+
|
|
50
|
+
export { CommissionNodeExisting };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { r, c, n, d as clientContext, e, t, i, A, b } from './matter-dashboard-app-BazvuIIi.js';
|
|
2
|
+
import { f as fireEvent } from './fire_event-BERTqZpV.js';
|
|
3
|
+
import './outlined-text-field-Sqd4JHxo.js';
|
|
4
|
+
import './main.js';
|
|
5
|
+
import './prevent_default-D4GG_QeD.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let CommissionNodeExisting = class extends i {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._loading = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return b`<md-outlined-text-field label="Share code" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
22
|
+
<br />
|
|
23
|
+
<br />
|
|
24
|
+
<md-outlined-button @click=${this._commissionNode} .disabled="${this._loading}"
|
|
25
|
+
>Commission</md-outlined-button
|
|
26
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
27
|
+
}
|
|
28
|
+
async _commissionNode() {
|
|
29
|
+
this._loading = true;
|
|
30
|
+
try {
|
|
31
|
+
const node = await this.client.commissionWithCode(this._pairingCodeField.value, true);
|
|
32
|
+
fireEvent(this, "node-commissioned", node);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
alert(`Error commissioning node: ${err.message}`);
|
|
35
|
+
} finally {
|
|
36
|
+
this._loading = false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
__decorateClass([c({
|
|
41
|
+
context: clientContext,
|
|
42
|
+
subscribe: true
|
|
43
|
+
}), n({
|
|
44
|
+
attribute: false
|
|
45
|
+
})], CommissionNodeExisting.prototype, "client", 2);
|
|
46
|
+
__decorateClass([r()], CommissionNodeExisting.prototype, "_loading", 2);
|
|
47
|
+
__decorateClass([e("md-outlined-text-field[label='Share code']")], CommissionNodeExisting.prototype, "_pairingCodeField", 2);
|
|
48
|
+
CommissionNodeExisting = __decorateClass([t("commission-node-existing")], CommissionNodeExisting);
|
|
49
|
+
|
|
50
|
+
export { CommissionNodeExisting };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { r, c, n, d as clientContext, e, t, i, A, b } from './matter-dashboard-app-BazvuIIi.js';
|
|
2
|
+
import { f as fireEvent } from './fire_event-BERTqZpV.js';
|
|
3
|
+
import './outlined-text-field-Sqd4JHxo.js';
|
|
4
|
+
import './main.js';
|
|
5
|
+
import './prevent_default-D4GG_QeD.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let CommissionNodeThread = class extends i {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._loading = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
if (!this.client.serverInfo.thread_credentials_set) {
|
|
22
|
+
return b`<md-outlined-text-field label="Thread dataset" .disabled="${this._loading}">
|
|
23
|
+
</md-outlined-text-field>
|
|
24
|
+
<br />
|
|
25
|
+
<br />
|
|
26
|
+
<md-outlined-button @click=${this._setThreadDataset} .disabled="${this._loading}"
|
|
27
|
+
>Set Thread Dataset</md-outlined-button
|
|
28
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
29
|
+
}
|
|
30
|
+
return b`<md-outlined-text-field label="Pairing code" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
31
|
+
<br />
|
|
32
|
+
<br />
|
|
33
|
+
<md-outlined-button @click=${this._commissionNode} .disabled="${this._loading}"
|
|
34
|
+
>Commission</md-outlined-button
|
|
35
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
36
|
+
}
|
|
37
|
+
async _setThreadDataset() {
|
|
38
|
+
const dataset = this._datasetField.value;
|
|
39
|
+
if (!dataset) {
|
|
40
|
+
alert("Dataset is required");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this._loading = true;
|
|
44
|
+
try {
|
|
45
|
+
await this.client.setThreadOperationalDataset(dataset);
|
|
46
|
+
} catch (err) {
|
|
47
|
+
alert(`Error setting Thread dataset: ${err.message}`);
|
|
48
|
+
} finally {
|
|
49
|
+
this._loading = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async _commissionNode() {
|
|
53
|
+
this._loading = true;
|
|
54
|
+
try {
|
|
55
|
+
const node = await this.client.commissionWithCode(this._pairingCodeField.value, false);
|
|
56
|
+
fireEvent(this, "node-commissioned", node);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
alert(`Error commissioning node: ${err.message}`);
|
|
59
|
+
} finally {
|
|
60
|
+
this._loading = false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
__decorateClass([c({
|
|
65
|
+
context: clientContext,
|
|
66
|
+
subscribe: true
|
|
67
|
+
}), n({
|
|
68
|
+
attribute: false
|
|
69
|
+
})], CommissionNodeThread.prototype, "client", 2);
|
|
70
|
+
__decorateClass([r()], CommissionNodeThread.prototype, "_loading", 2);
|
|
71
|
+
__decorateClass([e("md-outlined-text-field[label='Thread dataset']")], CommissionNodeThread.prototype, "_datasetField", 2);
|
|
72
|
+
__decorateClass([e("md-outlined-text-field[label='Pairing code']")], CommissionNodeThread.prototype, "_pairingCodeField", 2);
|
|
73
|
+
CommissionNodeThread = __decorateClass([t("commission-node-thread")], CommissionNodeThread);
|
|
74
|
+
|
|
75
|
+
export { CommissionNodeThread };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { r, c, n, d as clientContext, e, t, i, A, b } from './matter-dashboard-app-5UjO1Ik8.js';
|
|
2
|
+
import { f as fireEvent } from './fire_event-BlsbXpOL.js';
|
|
3
|
+
import './outlined-text-field-BMLYwwlc.js';
|
|
4
|
+
import './main.js';
|
|
5
|
+
import './prevent_default-BsT53c0u.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let CommissionNodeThread = class extends i {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._loading = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
if (!this.client.serverInfo.thread_credentials_set) {
|
|
22
|
+
return b`<md-outlined-text-field label="Thread dataset" .disabled="${this._loading}">
|
|
23
|
+
</md-outlined-text-field>
|
|
24
|
+
<br />
|
|
25
|
+
<br />
|
|
26
|
+
<md-outlined-button @click=${this._setThreadDataset} .disabled="${this._loading}"
|
|
27
|
+
>Set Thread Dataset</md-outlined-button
|
|
28
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
29
|
+
}
|
|
30
|
+
return b`<md-outlined-text-field label="Pairing code" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
31
|
+
<br />
|
|
32
|
+
<br />
|
|
33
|
+
<md-outlined-button @click=${this._commissionNode} .disabled="${this._loading}"
|
|
34
|
+
>Commission</md-outlined-button
|
|
35
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
36
|
+
}
|
|
37
|
+
async _setThreadDataset() {
|
|
38
|
+
const dataset = this._datasetField.value;
|
|
39
|
+
if (!dataset) {
|
|
40
|
+
alert("Dataset is required");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this._loading = true;
|
|
44
|
+
try {
|
|
45
|
+
await this.client.setThreadOperationalDataset(dataset);
|
|
46
|
+
} catch (err) {
|
|
47
|
+
alert(`Error setting Thread dataset: ${err.message}`);
|
|
48
|
+
} finally {
|
|
49
|
+
this._loading = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async _commissionNode() {
|
|
53
|
+
this._loading = true;
|
|
54
|
+
try {
|
|
55
|
+
const node = await this.client.commissionWithCode(this._pairingCodeField.value, false);
|
|
56
|
+
fireEvent(this, "node-commissioned", node);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
alert(`Error commissioning node: ${err.message}`);
|
|
59
|
+
} finally {
|
|
60
|
+
this._loading = false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
__decorateClass([c({
|
|
65
|
+
context: clientContext,
|
|
66
|
+
subscribe: true
|
|
67
|
+
}), n({
|
|
68
|
+
attribute: false
|
|
69
|
+
})], CommissionNodeThread.prototype, "client", 2);
|
|
70
|
+
__decorateClass([r()], CommissionNodeThread.prototype, "_loading", 2);
|
|
71
|
+
__decorateClass([e("md-outlined-text-field[label='Thread dataset']")], CommissionNodeThread.prototype, "_datasetField", 2);
|
|
72
|
+
__decorateClass([e("md-outlined-text-field[label='Pairing code']")], CommissionNodeThread.prototype, "_pairingCodeField", 2);
|
|
73
|
+
CommissionNodeThread = __decorateClass([t("commission-node-thread")], CommissionNodeThread);
|
|
74
|
+
|
|
75
|
+
export { CommissionNodeThread };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { r, c, n, d as clientContext, e, t, i, A, b } from './matter-dashboard-app-BazvuIIi.js';
|
|
2
|
+
import { f as fireEvent } from './fire_event-BERTqZpV.js';
|
|
3
|
+
import './outlined-text-field-Sqd4JHxo.js';
|
|
4
|
+
import './main.js';
|
|
5
|
+
import './prevent_default-D4GG_QeD.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let CommissionNodeWifi = class extends i {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._loading = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
if (!this.client.serverInfo.wifi_credentials_set) {
|
|
22
|
+
return b`<md-outlined-text-field label="SSID" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
23
|
+
<md-outlined-text-field label="Password" type="password" .disabled="${this._loading}">
|
|
24
|
+
</md-outlined-text-field>
|
|
25
|
+
<br />
|
|
26
|
+
<br />
|
|
27
|
+
<md-outlined-button @click=${this._setWifiCredentials} .disabled="${this._loading}"
|
|
28
|
+
>Set WiFi Credentials</md-outlined-button
|
|
29
|
+
>${this._loading ? b`<md-circular-progress indeterminate .visible="${this._loading}"></md-circular-progress>` : A}`;
|
|
30
|
+
}
|
|
31
|
+
return b`<md-outlined-text-field label="Pairing code" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
32
|
+
<br />
|
|
33
|
+
<br />
|
|
34
|
+
<md-outlined-button @click=${this._commissionNode} .disabled="${this._loading}"
|
|
35
|
+
>Commission</md-outlined-button
|
|
36
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
37
|
+
}
|
|
38
|
+
_setWifiCredentials() {
|
|
39
|
+
const ssid = this._ssidField.value;
|
|
40
|
+
if (!ssid) {
|
|
41
|
+
alert("SSID is required");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const password = this._passwordField.value;
|
|
45
|
+
if (!password) {
|
|
46
|
+
alert("Password is required");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this._loading = true;
|
|
50
|
+
try {
|
|
51
|
+
this.client.setWifiCredentials(ssid, password);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
alert(`Error setting WiFi credentials:
|
|
54
|
+
${err.message}`);
|
|
55
|
+
} finally {
|
|
56
|
+
this._loading = false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async _commissionNode() {
|
|
60
|
+
try {
|
|
61
|
+
if (!this._pairingCodeField.value) {
|
|
62
|
+
alert("Pairing code is required");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this._loading = true;
|
|
66
|
+
const node = await this.client.commissionWithCode(this._pairingCodeField.value, false);
|
|
67
|
+
fireEvent(this, "node-commissioned", node);
|
|
68
|
+
} catch (err) {
|
|
69
|
+
alert(`Error commissioning node:
|
|
70
|
+
${err.message}`);
|
|
71
|
+
} finally {
|
|
72
|
+
this._loading = false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
__decorateClass([c({
|
|
77
|
+
context: clientContext,
|
|
78
|
+
subscribe: true
|
|
79
|
+
}), n({
|
|
80
|
+
attribute: false
|
|
81
|
+
})], CommissionNodeWifi.prototype, "client", 2);
|
|
82
|
+
__decorateClass([r()], CommissionNodeWifi.prototype, "_loading", 2);
|
|
83
|
+
__decorateClass([e("md-outlined-text-field[label='SSID']")], CommissionNodeWifi.prototype, "_ssidField", 2);
|
|
84
|
+
__decorateClass([e("md-outlined-text-field[label='Password']")], CommissionNodeWifi.prototype, "_passwordField", 2);
|
|
85
|
+
__decorateClass([e("md-outlined-text-field[label='Pairing code']")], CommissionNodeWifi.prototype, "_pairingCodeField", 2);
|
|
86
|
+
CommissionNodeWifi = __decorateClass([t("commission-node-wifi")], CommissionNodeWifi);
|
|
87
|
+
|
|
88
|
+
export { CommissionNodeWifi };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { r, c, n, d as clientContext, e, t, i, A, b } from './matter-dashboard-app-5UjO1Ik8.js';
|
|
2
|
+
import { f as fireEvent } from './fire_event-BlsbXpOL.js';
|
|
3
|
+
import './outlined-text-field-BMLYwwlc.js';
|
|
4
|
+
import './main.js';
|
|
5
|
+
import './prevent_default-BsT53c0u.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let CommissionNodeWifi = class extends i {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._loading = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
if (!this.client.serverInfo.wifi_credentials_set) {
|
|
22
|
+
return b`<md-outlined-text-field label="SSID" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
23
|
+
<md-outlined-text-field label="Password" type="password" .disabled="${this._loading}">
|
|
24
|
+
</md-outlined-text-field>
|
|
25
|
+
<br />
|
|
26
|
+
<br />
|
|
27
|
+
<md-outlined-button @click=${this._setWifiCredentials} .disabled="${this._loading}"
|
|
28
|
+
>Set WiFi Credentials</md-outlined-button
|
|
29
|
+
>${this._loading ? b`<md-circular-progress indeterminate .visible="${this._loading}"></md-circular-progress>` : A}`;
|
|
30
|
+
}
|
|
31
|
+
return b`<md-outlined-text-field label="Pairing code" .disabled="${this._loading}"> </md-outlined-text-field>
|
|
32
|
+
<br />
|
|
33
|
+
<br />
|
|
34
|
+
<md-outlined-button @click=${this._commissionNode} .disabled="${this._loading}"
|
|
35
|
+
>Commission</md-outlined-button
|
|
36
|
+
>${this._loading ? b`<md-circular-progress indeterminate></md-circular-progress>` : A}`;
|
|
37
|
+
}
|
|
38
|
+
_setWifiCredentials() {
|
|
39
|
+
const ssid = this._ssidField.value;
|
|
40
|
+
if (!ssid) {
|
|
41
|
+
alert("SSID is required");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const password = this._passwordField.value;
|
|
45
|
+
if (!password) {
|
|
46
|
+
alert("Password is required");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this._loading = true;
|
|
50
|
+
try {
|
|
51
|
+
this.client.setWifiCredentials(ssid, password);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
alert(`Error setting WiFi credentials:
|
|
54
|
+
${err.message}`);
|
|
55
|
+
} finally {
|
|
56
|
+
this._loading = false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async _commissionNode() {
|
|
60
|
+
try {
|
|
61
|
+
if (!this._pairingCodeField.value) {
|
|
62
|
+
alert("Pairing code is required");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this._loading = true;
|
|
66
|
+
const node = await this.client.commissionWithCode(this._pairingCodeField.value, false);
|
|
67
|
+
fireEvent(this, "node-commissioned", node);
|
|
68
|
+
} catch (err) {
|
|
69
|
+
alert(`Error commissioning node:
|
|
70
|
+
${err.message}`);
|
|
71
|
+
} finally {
|
|
72
|
+
this._loading = false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
__decorateClass([c({
|
|
77
|
+
context: clientContext,
|
|
78
|
+
subscribe: true
|
|
79
|
+
}), n({
|
|
80
|
+
attribute: false
|
|
81
|
+
})], CommissionNodeWifi.prototype, "client", 2);
|
|
82
|
+
__decorateClass([r()], CommissionNodeWifi.prototype, "_loading", 2);
|
|
83
|
+
__decorateClass([e("md-outlined-text-field[label='SSID']")], CommissionNodeWifi.prototype, "_ssidField", 2);
|
|
84
|
+
__decorateClass([e("md-outlined-text-field[label='Password']")], CommissionNodeWifi.prototype, "_passwordField", 2);
|
|
85
|
+
__decorateClass([e("md-outlined-text-field[label='Pairing code']")], CommissionNodeWifi.prototype, "_pairingCodeField", 2);
|
|
86
|
+
CommissionNodeWifi = __decorateClass([t("commission-node-wifi")], CommissionNodeWifi);
|
|
87
|
+
|
|
88
|
+
export { CommissionNodeWifi };
|