iobroker.webui 1.24.4 → 1.25.0

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/README.md CHANGED
@@ -133,6 +133,9 @@ runtime.html?screenName=screen2
133
133
  Placeholder for next versions:
134
134
  ### __WORK IN PROGRESS__
135
135
  -->
136
+ ### 1.25.0 (2025-01-21)
137
+ - fix bindings in custom controls
138
+
136
139
  ### 1.24.4 (2025-01-20)
137
140
  - switch again to old module shims (error in new one)
138
141
 
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "webui",
4
- "version": "1.24.4",
4
+ "version": "1.25.0",
5
5
  "titleLang": {
6
6
  "en": "webui",
7
7
  "de": "webui",
@@ -29,6 +29,19 @@
29
29
  "zh-cn": "使用万维网传送器的高锰用户接口"
30
30
  },
31
31
  "news": {
32
+ "1.25.0": {
33
+ "en": "fix bindings in custom controls",
34
+ "de": "fixe bindungen in benutzerdefinierten steuerungen",
35
+ "ru": "фиксации в пользовательском контроле",
36
+ "pt": "corrigir ligações em controles personalizados",
37
+ "nl": "fix bindingen in aangepaste controles",
38
+ "fr": "fixer les fixations dans les contrôles personnalisés",
39
+ "it": "fissare i binding nei controlli personalizzati",
40
+ "es": "fijaciones en controles personalizados",
41
+ "pl": "naprawić wiązania w niestandardowych kontrolach",
42
+ "uk": "фіксувати прив'язки в користувацьких управліннях",
43
+ "zh-cn": "定制控制中的固定绑定"
44
+ },
32
45
  "1.24.4": {
33
46
  "en": "switch again to old module shims (error in new one)",
34
47
  "de": "wieder auf alte modul-shimmel wechseln (error in new one)",
@@ -106,19 +119,6 @@
106
119
  "pl": "jeszcze jeden fix w gulpfile",
107
120
  "uk": "ще одна фіксація в gulpfile",
108
121
  "zh-cn": "再加一个固醇"
109
- },
110
- "1.23.1": {
111
- "en": "fix gulp should work again",
112
- "de": "gulp sollte wieder funktionieren",
113
- "ru": "исправить gulp должно работать снова",
114
- "pt": "corrigir gulp deve funcionar novamente",
115
- "nl": "fix gulp moet weer werken",
116
- "fr": "réparer gulp devrait fonctionner à nouveau",
117
- "it": "fissare gulp dovrebbe funzionare di nuovo",
118
- "es": "arreglar golp debe trabajar de nuevo",
119
- "pl": "fix gulp powinien działać ponownie",
120
- "uk": "закріпити гельпом потрібно знову",
121
- "zh-cn": "修补 gulp 应再次工作"
122
122
  }
123
123
  },
124
124
  "icon": "logo.png",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.webui",
3
- "version": "1.24.4",
3
+ "version": "1.25.0",
4
4
  "description": "ioBroker webui",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -51,7 +51,7 @@ export class BaseCustomControl extends BaseCustomWebComponentConstructorAppend {
51
51
  for (let e of this.#eventListeners) {
52
52
  this.addEventListener(e[0], e[1]);
53
53
  }
54
- this.#resizeObserver.observe(this);
54
+ this.#resizeObserver?.observe(this);
55
55
  }
56
56
  disconnectedCallback() {
57
57
  for (let e of this.#eventListeners) {
@@ -61,7 +61,7 @@ export class BaseCustomControl extends BaseCustomWebComponentConstructorAppend {
61
61
  for (const b of this.#bindings)
62
62
  b();
63
63
  this.#bindings = null;
64
- this.#resizeObserver.unobserve(this);
64
+ this.#resizeObserver?.unobserve(this);
65
65
  }
66
66
  _assignEvent(event, callback) {
67
67
  const arrayEl = [event, callback];
@@ -133,6 +133,11 @@ export function generateCustomControl(name, control) {
133
133
  let instance = Reflect.construct(BaseCustomControl, [], window['IobrokerWebuiCustomControl' + name]);
134
134
  let currControl = window['IobrokerWebuiCustomControl' + name][webuiCustomControlSymbol].control;
135
135
  for (let p in currControl.properties) {
136
+ let backup = undefined;
137
+ if (p in instance) {
138
+ backup = instance[p];
139
+ delete instance[p];
140
+ }
136
141
  Object.defineProperty(instance, p, {
137
142
  get() {
138
143
  return this['_' + p];
@@ -147,7 +152,10 @@ export function generateCustomControl(name, control) {
147
152
  enumerable: true,
148
153
  configurable: true,
149
154
  });
150
- if (currControl.properties[p].default) {
155
+ if (backup !== undefined) {
156
+ instance[p] = backup;
157
+ }
158
+ else if (currControl.properties[p].default) {
151
159
  instance['_' + p] = currControl.properties[p].default;
152
160
  }
153
161
  }
package/www/index.html CHANGED
@@ -218,7 +218,7 @@
218
218
  </button>
219
219
  <button data-command="save" title="save" disabled><img src="./node_modules/@node-projects/web-component-designer/assets/icons/save.svg"></button>
220
220
  <div style="margin-left: 30px;">
221
- webui - 1.24.4 - 12f122d
221
+ webui - 1.25.0 - e441c00
222
222
  </div>
223
223
  <button style="margin-left: 30px;" data-command="paste" title="paste" disabled><img
224
224
  src="./node_modules/@node-projects/web-component-designer/assets/icons/paste.svg"></button>