@matter-server/dashboard 0.6.7 → 0.7.0-alpha.0-20260512-b404bea

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.
Files changed (42) hide show
  1. package/dist/esm/client/models/descriptions.d.ts.map +1 -1
  2. package/dist/esm/client/models/descriptions.js +2485 -415
  3. package/dist/esm/client/models/descriptions.js.map +1 -1
  4. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts +2 -0
  5. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts.map +1 -1
  6. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js +11 -1
  7. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js.map +1 -1
  8. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.d.ts +7 -0
  9. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.d.ts.map +1 -1
  10. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js +43 -2
  11. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js.map +1 -1
  12. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.d.ts +7 -0
  13. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.d.ts.map +1 -1
  14. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js +43 -2
  15. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js.map +1 -1
  16. package/dist/esm/components/dialogs/settings/settings-dialog.d.ts +19 -0
  17. package/dist/esm/components/dialogs/settings/settings-dialog.d.ts.map +1 -1
  18. package/dist/esm/components/dialogs/settings/settings-dialog.js +287 -2
  19. package/dist/esm/components/dialogs/settings/settings-dialog.js.map +1 -1
  20. package/dist/esm/components/dialogs/settings/show-settings-dialog.d.ts +1 -1
  21. package/dist/esm/components/dialogs/settings/show-settings-dialog.d.ts.map +1 -1
  22. package/dist/esm/components/dialogs/settings/show-settings-dialog.js +2 -1
  23. package/dist/esm/components/dialogs/settings/show-settings-dialog.js.map +1 -1
  24. package/dist/web/js/{attribute-write-dialog-DvCdBC5h.js → attribute-write-dialog-DzMWN_T3.js} +1 -1
  25. package/dist/web/js/{command-invoke-dialog-wg-tTS3n.js → command-invoke-dialog-BhAOXzjX.js} +1 -1
  26. package/dist/web/js/{commission-node-dialog-DrlOw53q.js → commission-node-dialog-DF87YIqR.js} +17 -5
  27. package/dist/web/js/{commission-node-existing-BujgZH95.js → commission-node-existing-DLcWvJTL.js} +2 -2
  28. package/dist/web/js/{commission-node-thread-C8FyqV6l.js → commission-node-thread-m2fqED-2.js} +43 -4
  29. package/dist/web/js/{commission-node-wifi-DiaG9EmR.js → commission-node-wifi-PCsot-CX.js} +43 -4
  30. package/dist/web/js/{dialog-box-QK2bjCAa.js → dialog-box-DiqYXM8c.js} +1 -1
  31. package/dist/web/js/{fire_event-CfuDUSb7.js → fire_event-BnpND_gK.js} +1 -1
  32. package/dist/web/js/main.js +7 -1
  33. package/dist/web/js/{matter-dashboard-app-Dh-6FL-7.js → matter-dashboard-app-BZOhBELR.js} +2345 -335
  34. package/dist/web/js/{node-binding-dialog-DbsGaTS6.js → node-binding-dialog-B3lVN-FU.js} +1 -1
  35. package/dist/web/js/{settings-dialog-BZwpJ82T.js → settings-dialog-D75IAPKe.js} +289 -1
  36. package/package.json +4 -4
  37. package/src/client/models/descriptions.ts +2485 -415
  38. package/src/components/dialogs/commission-node-dialog/commission-node-dialog.ts +13 -1
  39. package/src/components/dialogs/commission-node-dialog/commission-node-thread.ts +49 -2
  40. package/src/components/dialogs/commission-node-dialog/commission-node-wifi.ts +49 -2
  41. package/src/components/dialogs/settings/settings-dialog.ts +294 -2
  42. package/src/components/dialogs/settings/show-settings-dialog.ts +2 -1
@@ -1,4 +1,4 @@
1
- import { q as i, P as c, Q as clientContext, n, d as e, i as i$1, R as showPromptDialog, J as showAlertDialog, A, j as b, K as handleAsync, t } from './matter-dashboard-app-Dh-6FL-7.js';
1
+ import { q as i, T as c, U as clientContext, n, d as e, i as i$1, W as showPromptDialog, J as showAlertDialog, A, j as b, K as handleAsync, t } from './matter-dashboard-app-BZOhBELR.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { e, m as mixinDelegatesAria, a as mixinConstraintValidation, b as mixinFormAssociated, c as mixinElementInternals, i, _ as __decorate, n as n$1, d as e$1, f as isActivationClick, g as dispatchActivationClick, A, h as e$2, j as b, r as redispatchEvent, k as getFormValue, l as getFormState, o as createValidator, C as CheckboxValidator, p as getValidityAnchor, q as i$1, t, N as NavigableKeys, s as o, u as r, v as createAnimationSignal, L as ListController, w as getActiveItem, x as getLastActivatableItem, y as getFirstActivatableItem, z as o$1, E as EASING, V as Validator, D, B as mixinOnReportValidity, F as onReportValidity, G as u, H as i$2, I as fireAndForget, J as showAlertDialog, K as handleAsync, M as DevModeService } from './matter-dashboard-app-Dh-6FL-7.js';
1
+ import { e, m as mixinDelegatesAria, a as mixinConstraintValidation, b as mixinFormAssociated, c as mixinElementInternals, i, _ as __decorate, n as n$1, d as e$1, f as isActivationClick, g as dispatchActivationClick, A, h as e$2, j as b, r as redispatchEvent, k as getFormValue, l as getFormState, o as createValidator, C as CheckboxValidator, p as getValidityAnchor, q as i$1, t, N as NavigableKeys, s as o, u as r, v as createAnimationSignal, L as ListController, w as getActiveItem, x as getLastActivatableItem, y as getFirstActivatableItem, z as o$1, E as EASING, V as Validator, D, B as mixinOnReportValidity, F as onReportValidity, G as u, H as i$2, I as fireAndForget, J as showAlertDialog, K as handleAsync, M as DevModeService, O as mdiWifi, P as mdiAccessPoint, Q as mdiEyeOff, R as mdiEye } from './matter-dashboard-app-BZOhBELR.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -3617,6 +3617,9 @@ let SettingsDialog = class extends i {
3617
3617
  constructor() {
3618
3618
  super(...arguments);
3619
3619
  this._devMode = DevModeService.active;
3620
+ this._expandedRow = null;
3621
+ this._credLoading = false;
3622
+ this._showPassword = false;
3620
3623
  }
3621
3624
  connectedCallback() {
3622
3625
  super.connectedCallback();
@@ -3629,6 +3632,18 @@ let SettingsDialog = class extends i {
3629
3632
  super.disconnectedCallback();
3630
3633
  (_this$_unsubscribeDev = this._unsubscribeDev) === null || _this$_unsubscribeDev === void 0 || _this$_unsubscribeDev.call(this);
3631
3634
  }
3635
+ firstUpdated() {
3636
+ const knownSections = /* @__PURE__ */new Set(["network-credentials"]);
3637
+ if (this.scrollToSection && knownSections.has(this.scrollToSection)) {
3638
+ requestAnimationFrame(() => {
3639
+ var _this$renderRoot$quer;
3640
+ (_this$renderRoot$quer = this.renderRoot.querySelector(`#${this.scrollToSection}`)) === null || _this$renderRoot$quer === void 0 || _this$renderRoot$quer.scrollIntoView({
3641
+ behavior: "smooth",
3642
+ block: "start"
3643
+ });
3644
+ });
3645
+ }
3646
+ }
3632
3647
  _close() {
3633
3648
  this.shadowRoot.querySelector("md-dialog").close();
3634
3649
  }
@@ -3645,6 +3660,107 @@ let SettingsDialog = class extends i {
3645
3660
  url.searchParams.set("dev", "on");
3646
3661
  (_navigator$clipboard = navigator.clipboard) === null || _navigator$clipboard === void 0 || _navigator$clipboard.writeText(url.toString()).catch(() => {});
3647
3662
  }
3663
+ _toggleExpand(row) {
3664
+ this._expandedRow = this._expandedRow === row ? null : row;
3665
+ this._showPassword = false;
3666
+ }
3667
+ _cancelCred() {
3668
+ this._expandedRow = null;
3669
+ this._showPassword = false;
3670
+ }
3671
+ _togglePassword() {
3672
+ this._showPassword = !this._showPassword;
3673
+ }
3674
+ async _saveWifi() {
3675
+ const ssid = this._wifiSsidField.value.trim();
3676
+ if (!ssid) {
3677
+ showAlertDialog({
3678
+ title: "Validation error",
3679
+ text: "SSID is required"
3680
+ });
3681
+ return;
3682
+ }
3683
+ const password = this._wifiPasswordField.value;
3684
+ if (!password) {
3685
+ showAlertDialog({
3686
+ title: "Validation error",
3687
+ text: "Password is required"
3688
+ });
3689
+ return;
3690
+ }
3691
+ this._credLoading = true;
3692
+ try {
3693
+ await this.client.setWifiCredentials(ssid, password);
3694
+ this._expandedRow = null;
3695
+ this._showPassword = false;
3696
+ } catch (err) {
3697
+ showAlertDialog({
3698
+ title: "Error saving WiFi credentials",
3699
+ text: err.message
3700
+ });
3701
+ } finally {
3702
+ this._credLoading = false;
3703
+ }
3704
+ }
3705
+ async _removeWifi() {
3706
+ this._credLoading = true;
3707
+ try {
3708
+ await this.client.removeWifiCredentials();
3709
+ this._expandedRow = null;
3710
+ this._showPassword = false;
3711
+ } catch (err) {
3712
+ showAlertDialog({
3713
+ title: "Error removing WiFi credentials",
3714
+ text: err.message
3715
+ });
3716
+ } finally {
3717
+ this._credLoading = false;
3718
+ }
3719
+ }
3720
+ async _saveThread() {
3721
+ const dataset = this._threadDatasetField.value.trim();
3722
+ if (!dataset) {
3723
+ showAlertDialog({
3724
+ title: "Validation error",
3725
+ text: "Thread dataset is required"
3726
+ });
3727
+ return;
3728
+ }
3729
+ if (!/^[0-9a-fA-F]*$/.test(dataset) || dataset.length % 2 !== 0) {
3730
+ showAlertDialog({
3731
+ title: "Invalid Thread dataset",
3732
+ text: "Must be a hex string with even length (each byte is two hex characters)"
3733
+ });
3734
+ return;
3735
+ }
3736
+ this._credLoading = true;
3737
+ try {
3738
+ await this.client.setThreadOperationalDataset(dataset);
3739
+ this._expandedRow = null;
3740
+ } catch (err) {
3741
+ showAlertDialog({
3742
+ title: "Error saving Thread dataset",
3743
+ text: err.message
3744
+ });
3745
+ } finally {
3746
+ this._credLoading = false;
3747
+ }
3748
+ }
3749
+ async _removeThread() {
3750
+ this._credLoading = true;
3751
+ try {
3752
+ await this.client.removeThreadDataset();
3753
+ this._expandedRow = null;
3754
+ this._showPassword = false;
3755
+ } catch (err) {
3756
+ showAlertDialog({
3757
+ title: "Error removing Thread dataset",
3758
+ text: err.message
3759
+ });
3760
+ } finally {
3761
+ this._credLoading = false;
3762
+ }
3763
+ }
3648
3764
  render() {
3649
3765
  return b`
3650
3766
  <md-dialog open @cancel=${preventDefault} @closed=${this._handleClosed}>
@@ -3677,6 +3793,95 @@ let SettingsDialog = class extends i {
3677
3793
  <h3 class="section-title">Server log levels</h3>
3678
3794
  <log-level-section .client=${this.client}></log-level-section>
3679
3795
  </section>
3796
+
3797
+ <md-divider></md-divider>
3798
+
3799
+ <section id="network-credentials" class="section">
3800
+ <h3 class="section-title">Network credentials</h3>
3801
+
3802
+ <div class="cred-row">
3803
+ <div class="cred-info">
3804
+ <ha-svg-icon .path=${mdiWifi}></ha-svg-icon>
3805
+ <span class="cred-label">WiFi</span>
3806
+ ${this.client.serverInfo.wifi_credentials_set ? b`<span class="cred-value">${this.client.serverInfo.wifi_ssid}</span>` : b`<span class="cred-unset">Not configured</span>`}
3807
+ </div>
3808
+ <md-text-button @click=${() => this._toggleExpand("wifi")} .disabled=${this._credLoading}
3809
+ >Edit</md-text-button
3810
+ >
3811
+ </div>
3812
+
3813
+ ${this._expandedRow === "wifi" ? b` <div class="cred-form">
3814
+ <md-outlined-text-field
3815
+ id="cred-wifi-ssid"
3816
+ label="SSID"
3817
+ .value=${this.client.serverInfo.wifi_ssid ?? ""}
3818
+ .disabled=${this._credLoading}
3819
+ ></md-outlined-text-field>
3820
+ <div class="password-row">
3821
+ <md-outlined-text-field
3822
+ id="cred-wifi-password"
3823
+ label="Password"
3824
+ .type=${this._showPassword ? "text" : "password"}
3825
+ .disabled=${this._credLoading}
3826
+ ></md-outlined-text-field>
3827
+ <md-icon-button @click=${this._togglePassword}>
3828
+ <ha-svg-icon .path=${this._showPassword ? mdiEyeOff : mdiEye}></ha-svg-icon>
3829
+ </md-icon-button>
3830
+ </div>
3831
+ <div class="form-actions">
3832
+ <md-text-button @click=${this._cancelCred} .disabled=${this._credLoading}
3833
+ >Cancel</md-text-button
3834
+ >
3835
+ ${this.client.serverInfo.wifi_credentials_set ? b`<md-text-button
3836
+ @click=${handleAsync(() => this._removeWifi())}
3837
+ .disabled=${this._credLoading}
3838
+ >Remove</md-text-button
3839
+ >` : A}
3840
+ <md-filled-button
3841
+ @click=${handleAsync(() => this._saveWifi())}
3842
+ .disabled=${this._credLoading}
3843
+ >Save</md-filled-button
3844
+ >
3845
+ </div>
3846
+ </div>` : A}
3847
+
3848
+ <div class="cred-row cred-row-thread">
3849
+ <div class="cred-info">
3850
+ <ha-svg-icon .path=${mdiAccessPoint}></ha-svg-icon>
3851
+ <span class="cred-label">Thread</span>
3852
+ ${this.client.serverInfo.thread_credentials_set ? b`<span class="cred-value">Thread network set</span>` : b`<span class="cred-unset">Not configured</span>`}
3853
+ </div>
3854
+ <md-text-button @click=${() => this._toggleExpand("thread")} .disabled=${this._credLoading}
3855
+ >Edit</md-text-button
3856
+ >
3857
+ </div>
3858
+
3859
+ ${this._expandedRow === "thread" ? b` <div class="cred-form">
3860
+ <md-outlined-text-field
3861
+ id="cred-thread-dataset"
3862
+ label="Thread dataset"
3863
+ supporting-text="Hex string (e.g. 0E080000...)"
3864
+ .disabled=${this._credLoading}
3865
+ ></md-outlined-text-field>
3866
+ <div class="form-actions">
3867
+ <md-text-button @click=${this._cancelCred} .disabled=${this._credLoading}
3868
+ >Cancel</md-text-button
3869
+ >
3870
+ ${this.client.serverInfo.thread_credentials_set ? b`<md-text-button
3871
+ @click=${handleAsync(() => this._removeThread())}
3872
+ .disabled=${this._credLoading}
3873
+ >Remove</md-text-button
3874
+ >` : A}
3875
+ <md-filled-button
3876
+ @click=${handleAsync(() => this._saveThread())}
3877
+ .disabled=${this._credLoading}
3878
+ >Save</md-filled-button
3879
+ >
3880
+ </div>
3881
+ </div>` : A}
3882
+
3883
+ <p class="cred-hint">Used when commissioning new devices. Existing devices are not affected.</p>
3884
+ </section>
3680
3885
  </div>
3681
3886
  <div slot="actions">
3682
3887
  <md-text-button @click=${this._close}>Close</md-text-button>
@@ -3741,11 +3946,94 @@ SettingsDialog.styles = i$1`
3741
3946
  md-divider {
3742
3947
  margin: 12px 0;
3743
3948
  }
3949
+
3950
+ .cred-row {
3951
+ display: flex;
3952
+ align-items: center;
3953
+ justify-content: space-between;
3954
+ padding: 4px 0;
3955
+ }
3956
+
3957
+ .cred-row-thread {
3958
+ margin-top: 8px;
3959
+ }
3960
+
3961
+ .cred-info {
3962
+ display: flex;
3963
+ align-items: center;
3964
+ gap: 10px;
3965
+ font-size: 0.9rem;
3966
+ color: var(--md-sys-color-on-surface);
3967
+ }
3968
+
3969
+ .cred-label {
3970
+ font-weight: 500;
3971
+ min-width: 52px;
3972
+ }
3973
+
3974
+ .cred-value {
3975
+ color: var(--md-sys-color-on-surface-variant);
3976
+ }
3977
+
3978
+ .cred-unset {
3979
+ color: var(--md-sys-color-on-surface-variant);
3980
+ font-style: italic;
3981
+ }
3982
+
3983
+ .cred-form {
3984
+ display: flex;
3985
+ flex-direction: column;
3986
+ gap: 10px;
3987
+ padding: 8px 0 4px 0;
3988
+ }
3989
+
3990
+ .password-row {
3991
+ display: flex;
3992
+ align-items: center;
3993
+ gap: 4px;
3994
+ }
3995
+
3996
+ .password-row md-outlined-text-field {
3997
+ flex: 1;
3998
+ }
3999
+
4000
+ .form-actions {
4001
+ display: flex;
4002
+ gap: 4px;
4003
+ justify-content: flex-end;
4004
+ }
4005
+
4006
+ .cred-hint {
4007
+ margin: 10px 0 0 0;
4008
+ font-size: 0.8rem;
4009
+ color: var(--md-sys-color-on-surface-variant);
4010
+ }
4011
+
4012
+ .cred-info ha-svg-icon {
4013
+ width: 18px;
4014
+ height: 18px;
4015
+ color: var(--md-sys-color-on-surface-variant);
4016
+ }
4017
+
4018
+ .password-row ha-svg-icon {
4019
+ width: 18px;
4020
+ height: 18px;
4021
+ color: var(--md-sys-color-on-surface-variant);
4022
+ }
3744
4023
  `;
3745
4024
  __decorateClass([n$1({
3746
4025
  attribute: false
3747
4026
  })], SettingsDialog.prototype, "client", 2);
3748
4027
  __decorateClass([r()], SettingsDialog.prototype, "_devMode", 2);
4028
+ __decorateClass([n$1({
4029
+ attribute: false
4030
+ })], SettingsDialog.prototype, "scrollToSection", 2);
4031
+ __decorateClass([r()], SettingsDialog.prototype, "_expandedRow", 2);
4032
+ __decorateClass([r()], SettingsDialog.prototype, "_credLoading", 2);
4033
+ __decorateClass([r()], SettingsDialog.prototype, "_showPassword", 2);
4034
+ __decorateClass([e$1("#cred-wifi-ssid")], SettingsDialog.prototype, "_wifiSsidField", 2);
4035
+ __decorateClass([e$1("#cred-wifi-password")], SettingsDialog.prototype, "_wifiPasswordField", 2);
4036
+ __decorateClass([e$1("#cred-thread-dataset")], SettingsDialog.prototype, "_threadDatasetField", 2);
3749
4037
  SettingsDialog = __decorateClass([t("settings-dialog")], SettingsDialog);
3750
4038
 
3751
4039
  export { SettingsDialog };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter-server/dashboard",
3
- "version": "0.6.7",
3
+ "version": "0.7.0-alpha.0-20260512-b404bea",
4
4
  "description": "Dashboard for OHF Matter Server",
5
5
  "homepage": "https://github.com/matter-js/matterjs-server",
6
6
  "bugs": {
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@lit/context": "^1.1.6",
35
35
  "@material/web": "^2.4.1",
36
- "@matter-server/custom-clusters": "0.6.7",
37
- "@matter-server/ws-client": "0.6.7",
36
+ "@matter-server/custom-clusters": "0.7.0-alpha.0-20260512-b404bea",
37
+ "@matter-server/ws-client": "0.7.0-alpha.0-20260512-b404bea",
38
38
  "@mdi/js": "^7.4.47",
39
39
  "lit": "^3.3.2",
40
40
  "tslib": "^2.8.1",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/preset-env": "^7.29.5",
45
- "@matter/main": "0.17.0-alpha.0-20260504-e005cc190",
45
+ "@matter/main": "0.17.0-alpha.0-20260512-576f5796c",
46
46
  "@rollup/plugin-babel": "^7.0.0",
47
47
  "@rollup/plugin-commonjs": "^29.0.2",
48
48
  "@rollup/plugin-json": "^6.1.0",