iobroker.vis-2-widgets-inventwo 0.4.2 → 0.5.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
@@ -21,6 +21,8 @@ Various widgets for switching, navigating and more.
21
21
 
22
22
  ![Preview Colorpicker](img/preview_content_types.png)
23
23
 
24
+ ![Preview AnalogClock](img/preview_content_type_clock_analog.png)
25
+
24
26
  Color picker
25
27
 
26
28
  ![Preview Colorpicker](img/preview_colorpicker.png)
@@ -54,6 +56,11 @@ All widgets come with extensive design options to customize the look and feel to
54
56
  Placeholder for the next version (at the beginning of the line):
55
57
  ### **WORK IN PROGRESS**
56
58
  -->
59
+ ### 0.5.0 (2025-12-24)
60
+ - Added radial slider widget (#17)
61
+ - Added analog clock content type to universal widget (#100)
62
+ - Changed german translation for "custom"
63
+
57
64
  ### 0.4.2 (2025-12-22)
58
65
  - Vite downgrade
59
66
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "vis-2-widgets-inventwo",
4
- "version": "0.4.2",
4
+ "version": "0.5.0",
5
5
  "news": {
6
+ "0.5.0": {
7
+ "en": "Added radial slider widget (#17)\nAdded analog clock content type to universal widget (#100)\nChanged german translation for \"custom\"",
8
+ "de": "Hinzugefügt Radialschieber Widget (#17)\nHinzugefügt analoge Taktinhaltsart zu universellem Widget (#100)\nGeänderte deutsche Übersetzung für \"custom\"",
9
+ "ru": "Добавлен виджет радиального слайдера (#17)\nДобавлен тип содержимого аналоговых часов в универсальный виджет (#100)\nИзменился немецкий перевод на «таможенный»",
10
+ "pt": "Adicionado widget de controle deslizante radial (# 17)\nAdicionado o tipo de conteúdo de relógio analógico ao widget universal (# 100)\nTradução alemã alterada para \"custom\"",
11
+ "nl": "Toegevoegd radiale schuifregelaar-widget (#17)\nAnaloge klokinhoud toegevoegd aan universele widget (#100)\nVeranderde Duitse vertaling voor \"custom\"",
12
+ "fr": "Ajout du widget slider radial (#17)\nAjout du type d'horloge analogique au widget universel (#100)\nTraduction allemande modifiée pour \"ustom\"",
13
+ "it": "Aggiunto widget cursore radiale (#17)\nAggiunto tipo di contenuto orologio analogico al widget universale (#100)\nCambiata traduzione tedesca per \"custom\"",
14
+ "es": "Añadido widget de deslizador radial (#17)\nAñadido tipo de contenido de reloj analógico al widget universal (#100)\nTraducción modificada alemana para \"costo\"",
15
+ "pl": "Dodano radial slider widget (# 17)\nDodano analogowy typ zawartości zegara do uniwersalnego widgetu (# 100)\nZmieniono tłumaczenie germana na \"niestandardowe\"",
16
+ "uk": "Додано радіальний слайдер віджет (#17)\nДодано аналоговий тип вмісту годинника в універсальний віджет (#100)\nЗмінений німецький переклад для \"кутом\"",
17
+ "zh-cn": "添加的光圈滑动部件( # 17)\n将模拟时钟内容类型添加到通用部件(# 100)\n更改的德国语翻译为“ Custom” Name"
18
+ },
6
19
  "0.4.2": {
7
20
  "en": "Vite downgrade",
8
21
  "de": "Vit Downgrade",
@@ -80,19 +93,6 @@
80
93
  "pl": "Aktualizacja zależności",
81
94
  "uk": "Оновлені залежності",
82
95
  "zh-cn": "更新的依赖关系"
83
- },
84
- "0.3.9": {
85
- "en": "Fixed border color label in universal widget states (#120)",
86
- "de": "Fehler behoben: Randfarbe des Labels im Universal Widget Zustände (#120)",
87
- "ru": "Исправлен цвет рамки метки в универсальном виджете состояний (#120)",
88
- "pt": "Corrigida a cor da borda do rótulo nos estados do widget universal (#120)",
89
- "nl": "Oplossing voor de kleur van de rand van het label in universele widgetstaten (#120)",
90
- "fr": "Correction de la couleur de bordure du libellé dans les états du widget universel (#120)",
91
- "it": "Risolto il colore del bordo dell'etichetta nello stato del widget universale (#120)",
92
- "es": "Se corrigió el color del borde de la etiqueta en los estados del widget universal (#120)",
93
- "pl": "Naprawiono kolor granicy etykiety w stanie uniwersalnego widżetu (#120)",
94
- "uk": "Виправлено колір межі мітки в універсальному віджеті станів (#120)",
95
- "zh-cn": "修复了通用小部件状态中边框颜色标签的问题 (#120)"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.vis-2-widgets-inventwo",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "ioBroker vis2 inventwo widgets",
5
5
  "author": "jkvarel <jk@inventwo.com>",
6
6
  "contributors": [
@@ -4,53 +4,53 @@ class g extends window.visRxWidget {
4
4
  return "vis_2_widgets_inventwo_";
5
5
  }
6
6
  constructor(t) {
7
- super(t), this.getWidgetInfo().visAttrs.forEach((s) => {
8
- s.fields.forEach((r) => {
9
- r.name !== void 0 && (r.name.endsWith("FromWidget") || (this.groupAttrs[s.name] === void 0 && (this.groupAttrs[s.name] = []), this.groupAttrs[s.name].push(r.name)));
7
+ super(t), this.getWidgetInfo().visAttrs.forEach((n) => {
8
+ n.fields.forEach((s) => {
9
+ s.name !== void 0 && (s.name.endsWith("FromWidget") || (this.groupAttrs[n.name] === void 0 && (this.groupAttrs[n.name] = []), this.groupAttrs[n.name].push(s.name)));
10
10
  });
11
11
  });
12
12
  }
13
13
  onChange(t, e) {
14
14
  if (this.props.editMode) return;
15
- const s = this.state.rxData.oid;
16
- this.props.context.setValue(s, parseFloat(e));
15
+ const n = this.state.rxData.oid;
16
+ this.props.context.setValue(n, parseFloat(e));
17
17
  }
18
18
  getValue(t) {
19
19
  if (t !== void 0 && t !== "" && t !== "nothing_selected") return this.state.values[`${t}.val`];
20
20
  }
21
- getStyle(t, e, s = null) {
21
+ getStyle(t, e, n = null) {
22
22
  var _a, _b, _c, _d, _e;
23
- const r = {}, c = this.state.rxData[t], n = s ?? false;
23
+ const s = {}, c = this.state.rxData[t], i = n ?? false;
24
24
  if (c) {
25
- let o = false;
26
- const u = (_c = (_b = (_a = this.props.context.views[this.props.view]) == null ? void 0 : _a.widgets) == null ? void 0 : _b[c]) == null ? void 0 : _c.data;
27
- if (u) e.forEach((l) => {
28
- let i = l;
29
- n && (i = `${l}${s}`), r[i] = u[i];
30
- }), o = true;
25
+ let a = false;
26
+ const d = (_c = (_b = (_a = this.props.context.views[this.props.view]) == null ? void 0 : _a.widgets) == null ? void 0 : _b[c]) == null ? void 0 : _c.data;
27
+ if (d) e.forEach((l) => {
28
+ let r = l;
29
+ i && (r = `${l}${n}`), s[r] = d[r];
30
+ }), a = true;
31
31
  else {
32
32
  const l = Object.keys(this.props.context.views);
33
- for (let i = 0; i < l.length; i++) {
34
- const f = this.props.context.views[l[i]];
33
+ for (let r = 0; r < l.length; r++) {
34
+ const f = this.props.context.views[l[r]];
35
35
  if (f.name !== this.props.view && ((_e = (_d = f.widgets) == null ? void 0 : _d[c]) == null ? void 0 : _e.data)) {
36
36
  const p = f.widgets[c].data;
37
- e.forEach((d) => {
38
- let h = d;
39
- n && (h = `${d}${s}`), r[h] = p[h];
40
- }), o = true;
37
+ e.forEach((h) => {
38
+ let u = h;
39
+ i && (u = `${h}${n}`), s[u] = p[u];
40
+ }), a = true;
41
41
  break;
42
42
  }
43
43
  }
44
44
  }
45
- o || e.forEach((l) => {
46
- let i = l;
47
- n && (i = `${l}${s}`), r[i] = this.state.rxData[i];
45
+ a || e.forEach((l) => {
46
+ let r = l;
47
+ i && (r = `${l}${n}`), s[r] = this.state.rxData[r];
48
48
  });
49
- } else e.forEach((o) => {
50
- let a = o;
51
- n && (a = `${o}${s}`), r[a] = this.state.rxData[a];
49
+ } else e.forEach((a) => {
50
+ let o = a;
51
+ i && (o = `${a}${n}`), s[o] = this.state.rxData[o];
52
52
  });
53
- return r;
53
+ return s;
54
54
  }
55
55
  convertValue(t, e = null) {
56
56
  return t === "true" ? true : t === "false" ? false : isNaN(t) ? (t == null || t === "") && e !== null ? e : t : parseFloat(t);
@@ -62,12 +62,12 @@ class g extends window.visRxWidget {
62
62
  if (!t) return null;
63
63
  const e = t.match(/(\d+),(\d+),(\d+),(\d+)/);
64
64
  if (!e) return null;
65
- const [s, r, c] = e.slice(1, 5).map(parseFloat);
66
- function n(o) {
67
- const a = o.toString(16);
68
- return a.length === 1 ? `0${a}` : a;
65
+ const [n, s, c] = e.slice(1, 5).map(parseFloat);
66
+ function i(a) {
67
+ const o = a.toString(16);
68
+ return o.length === 1 ? `0${o}` : o;
69
69
  }
70
- return `#${n(s)}${n(r)}${n(c)}`;
70
+ return `#${i(n)}${i(s)}${i(c)}`;
71
71
  }
72
72
  isInteractionAllowed(t) {
73
73
  var _a, _b;
@@ -1,6 +1,6 @@
1
1
  import { j as i, __tla as __tla_0 } from "./jsx-runtime-1KR4UBAX.js";
2
2
  import { v as a, __tla as __tla_1 } from "./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-DJz8HY0m.js";
3
- import { I as h } from "./InventwoGeneric-DmPldO6z.js";
3
+ import { I as h } from "./InventwoGeneric-B2F0c5yL.js";
4
4
  import { __tla as __tla_2 } from "./vis2Inventwo__loadShare__react__loadShare__-Bg9SqOOr.js";
5
5
  import "./_commonjsHelpers-Cpj98o6Y.js";
6
6
  import "./vis2Inventwo__mf_v__runtimeInit__mf_v__-CSj4pa4_.js";
@@ -148,7 +148,7 @@ let __tla = Promise.all([
148
148
  }
149
149
  renderWidgetBody(t) {
150
150
  super.renderWidgetBody(t);
151
- const o = this.state.rxData.oid, r = this.getValue(o), s = this.validOid(o) && r === this.convertValue(this.state.rxData.valueTrue), e = this.getStyle("styleFromWidget", this.groupAttrs.attr_group_css_style), n = {
151
+ const s = this.state.rxData.oid, r = this.getValue(s), o = this.validOid(s) && r === this.convertValue(this.state.rxData.valueTrue), e = this.getStyle("styleFromWidget", this.groupAttrs.attr_group_css_style), n = {
152
152
  color: e.boxColor,
153
153
  "&.Mui-checked": {
154
154
  color: e.boxColorActive
@@ -175,9 +175,9 @@ let __tla = Promise.all([
175
175
  control: i.jsx(a.Checkbox, {
176
176
  sx: n,
177
177
  onClick: () => this.onChange(),
178
- checked: s
178
+ checked: o
179
179
  }),
180
- label: s ? this.state.rxData.textTrue : this.state.rxData.textFalse,
180
+ label: o ? this.state.rxData.textTrue : this.state.rxData.textFalse,
181
181
  labelPlacement: this.state.rxData.textPosition
182
182
  })
183
183
  });