iobroker.webui 1.24.4 → 1.25.1

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,13 @@ runtime.html?screenName=screen2
133
133
  Placeholder for next versions:
134
134
  ### __WORK IN PROGRESS__
135
135
  -->
136
+ ### 1.25.1 (2025-01-24)
137
+ - escape xml
138
+ - switch to official selector package
139
+
140
+ ### 1.25.0 (2025-01-21)
141
+ - fix bindings in custom controls
142
+
136
143
  ### 1.24.4 (2025-01-20)
137
144
  - switch again to old module shims (error in new one)
138
145
 
@@ -31,6 +31,6 @@ declare const importMapConfig: {
31
31
  wunderbaum: string;
32
32
  "wunderbaum/": string;
33
33
  "toastify-js": string;
34
- "iobroker-webcomponent-object-selector/": string;
34
+ "@iobroker/webcomponent-selectid-dialog/": string;
35
35
  };
36
36
  };
@@ -32,7 +32,7 @@ const importMapConfig = {
32
32
  "wunderbaum": "./node_modules/wunderbaum/dist/wunderbaum.esm.min.js",
33
33
  "wunderbaum/": "./node_modules/wunderbaum/",
34
34
  "toastify-js": "./node_modules/toastify-js/src/toastify-es.js",
35
- "iobroker-webcomponent-object-selector/": "./node_modules/iobroker-webcomponent-object-selector/"
35
+ "@iobroker/webcomponent-selectid-dialog/": "./node_modules/@iobroker/webcomponent-selectid-dialog/"
36
36
  }
37
37
  };
38
38
  //@ts-ignore
package/gulpfile.mjs CHANGED
@@ -68,9 +68,9 @@ function copyNodeFiles() {
68
68
  "toastify-js/src/toastify-es.js",
69
69
  "toastify-js/src/toastify.css",
70
70
  "dayjs/dayjs.min.js",
71
- "iobroker-webcomponent-object-selector/dist/iobrokerSelectId.es.js",
72
- "iobroker-webcomponent-object-selector/dist/selectIdHelper.js",
73
- "iobroker-webcomponent-object-selector/dist/socket.iob.js"
71
+ "@iobroker/webcomponent-selectid-dialog/dist/iobrokerSelectId.es.js",
72
+ "@iobroker/webcomponent-selectid-dialog/dist/selectIdHelper.js",
73
+ "@iobroker/webcomponent-selectid-dialog/dist/socket.iob.js"
74
74
  ]
75
75
 
76
76
  runtimeModules = runtimeModules.map(x => './node_modules/' + x)
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.1",
5
5
  "titleLang": {
6
6
  "en": "webui",
7
7
  "de": "webui",
@@ -29,6 +29,32 @@
29
29
  "zh-cn": "使用万维网传送器的高锰用户接口"
30
30
  },
31
31
  "news": {
32
+ "1.25.1": {
33
+ "en": "escape xml\nswitch to official selector package",
34
+ "de": "entkommen xml\nwechsel zum offiziellen auswahlpaket",
35
+ "ru": "xml\nпереход на официальный пакет селектора",
36
+ "pt": "escapar xml\nmudar para o pacote seletor oficial",
37
+ "nl": "ontsnappen xml\nschakel over op officiële selectiepakket",
38
+ "fr": "évasion xml\npasser au sélecteur officiel",
39
+ "it": "fuga xml\npassare al pacchetto selettore ufficiale",
40
+ "es": "escape xml\ncambiar al paquete oficial selector",
41
+ "pl": "escape xml\nprzełączanie na oficjalny pakiet wyboru",
42
+ "uk": "втеча xml\nвимикач на офіційному пакеті selector",
43
+ "zh-cn": "越狱 xml\n切换到正式选择软件包"
44
+ },
45
+ "1.25.0": {
46
+ "en": "fix bindings in custom controls",
47
+ "de": "fixe bindungen in benutzerdefinierten steuerungen",
48
+ "ru": "фиксации в пользовательском контроле",
49
+ "pt": "corrigir ligações em controles personalizados",
50
+ "nl": "fix bindingen in aangepaste controles",
51
+ "fr": "fixer les fixations dans les contrôles personnalisés",
52
+ "it": "fissare i binding nei controlli personalizzati",
53
+ "es": "fijaciones en controles personalizados",
54
+ "pl": "naprawić wiązania w niestandardowych kontrolach",
55
+ "uk": "фіксувати прив'язки в користувацьких управліннях",
56
+ "zh-cn": "定制控制中的固定绑定"
57
+ },
32
58
  "1.24.4": {
33
59
  "en": "switch again to old module shims (error in new one)",
34
60
  "de": "wieder auf alte modul-shimmel wechseln (error in new one)",
@@ -93,32 +119,6 @@
93
119
  "pl": "czyszczenie dir www",
94
120
  "uk": "очищувач www dir",
95
121
  "zh-cn": "清理 www dir"
96
- },
97
- "1.23.2": {
98
- "en": "one more fix in gulpfile",
99
- "de": "noch eine fix in gulpfile",
100
- "ru": "еще одно исправление в gulpfile",
101
- "pt": "mais uma correção no gulpfile",
102
- "nl": "nog een fix in gulpfile",
103
- "fr": "une autre correction dans gulpfile",
104
- "it": "un altro fix in gulpfile",
105
- "es": "uno más se fijan en el archivo del gulp",
106
- "pl": "jeszcze jeden fix w gulpfile",
107
- "uk": "ще одна фіксація в gulpfile",
108
- "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.1",
4
4
  "description": "ioBroker webui",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -54,6 +54,7 @@
54
54
  "@blockly/zoom-to-fit": "^6.0.12",
55
55
  "@iobroker/socket-client": "^4.0.0",
56
56
  "@iobroker/testing": "^5.0.0",
57
+ "@iobroker/webcomponent-selectid-dialog": "^1.0.3",
57
58
  "@node-projects/base-custom-webcomponent": "0.27.8",
58
59
  "@node-projects/lean-he-esm": "^3.3.0",
59
60
  "@node-projects/node-html-parser-esm": "^6.2.0",
@@ -82,7 +83,6 @@
82
83
  "gulp": "^5.0.0",
83
84
  "gulp-git": "^2.11.0",
84
85
  "gulp-replace": "^1.1.4",
85
- "iobroker-webcomponent-object-selector": "file:binary/iobroker-webcomponent-object-selector-0.0.1.tgz",
86
86
  "long": "^5.2.4",
87
87
  "mobile-drag-drop": "^3.0.0-rc.0",
88
88
  "mocha": "^11.0.1",
@@ -1,5 +1,5 @@
1
1
  import { BindingsEditor } from "@node-projects/web-component-designer-visualization-addons";
2
- import { openSelectIdDialog } from "iobroker-webcomponent-object-selector/dist/selectIdHelper.js";
2
+ import { openSelectIdDialog } from "@iobroker/webcomponent-selectid-dialog/dist/selectIdHelper.js";
3
3
  //@ts-ignore
4
4
  export class IobrokerWebuiBindingsEditor extends BindingsEditor {
5
5
  static is = 'iobroker-webui-bindings-editor';
@@ -1,5 +1,5 @@
1
1
  import { SignalPropertyEditor } from "@node-projects/web-component-designer-visualization-addons";
2
- import { openSelectIdDialog } from "iobroker-webcomponent-object-selector/dist/selectIdHelper.js";
2
+ import { openSelectIdDialog } from "@iobroker/webcomponent-selectid-dialog/dist/selectIdHelper.js";
3
3
  export class IobrokerWebuiSignalPropertyEditor extends SignalPropertyEditor {
4
4
  constructor(property, shell) {
5
5
  super(property, shell);
@@ -39,7 +39,7 @@
39
39
  "arguments",
40
40
  "caller",
41
41
  "name",
42
- "__@hasInstance@5144"
42
+ "__@hasInstance@2369"
43
43
  ],
44
44
  "type": "object"
45
45
  },
@@ -1,6 +1,18 @@
1
1
  export function escapeCData(text) {
2
2
  return text.replaceAll("]]>", "]]]]><![CDATA[>");
3
3
  }
4
+ export function escapeXml(text) {
5
+ return text.replace(/[<>&'"]/g, c => {
6
+ switch (c) {
7
+ case '<': return '&lt;';
8
+ case '>': return '&gt;';
9
+ case '&': return '&amp;';
10
+ case '\'': return '&apos;';
11
+ case '"': return '&quot;';
12
+ }
13
+ return null;
14
+ });
15
+ }
4
16
  export function parseXml(xml) {
5
17
  let doc = new DOMParser().parseFromString(xml, "text/xml");
6
18
  let obj = {};
@@ -67,7 +79,7 @@ export function convertToXml(type, screen) {
67
79
  if (screen.properties[p].type)
68
80
  xml += ` type="${screen.properties[p].type}"`;
69
81
  if (screen.properties[p].default)
70
- xml += ` default="${screen.properties[p].default}"`;
82
+ xml += ` default="${escapeXml(screen.properties[p].default)}"`;
71
83
  if (screen.properties[p].values)
72
84
  xml += ` values="${screen.properties[p].values.join('|')}"`;
73
85
  if (screen.properties[p].internal)
@@ -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
  }
@@ -32,7 +32,7 @@ const importMapConfig = {
32
32
  "wunderbaum": "./node_modules/wunderbaum/dist/wunderbaum.esm.min.js",
33
33
  "wunderbaum/": "./node_modules/wunderbaum/",
34
34
  "toastify-js": "./node_modules/toastify-js/src/toastify-es.js",
35
- "iobroker-webcomponent-object-selector/": "./node_modules/iobroker-webcomponent-object-selector/"
35
+ "@iobroker/webcomponent-selectid-dialog/": "./node_modules/@iobroker/webcomponent-selectid-dialog/"
36
36
  }
37
37
  };
38
38
  //@ts-ignore
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.1 - b3caac3
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>