iobroker.vis-jsontemplate 4.4.2 → 4.4.4
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 +61 -14
- package/io-package.json +27 -1
- package/package.json +7 -7
- package/widgets/vis-jsontemplate/dist/jsontemplate-dist.js +924 -875
- package/widgets/vis-jsontemplate/dist/jsontemplate-dist.js.map +2 -2
- package/widgets/vis-jsontemplate/js/ejs.js +1615 -1526
- package/widgets/vis-jsontemplate/js/jsontemplate.js +8 -1
- package/widgets/vis2vis-jsontemplate/assets/{JSONTemplateWidget-C4epIyqD.js → JSONTemplateWidget-yyCbMS9p.js} +57 -57
- package/widgets/vis2vis-jsontemplate/assets/__virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-BOWbXY-a.js +9 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf-localSharedImportMap___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1-DTP-x3uq.js +1 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.js-UVZpfuHn.js +934 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.js-aJI08Jbu.js +1 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare___mf_0_mui_mf_1_material__loadShare__.js-D9SlSZTL.js +255 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare__react__loadShare__.js-aUvyFWzJ.js +1 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-BV_qME-2.js +9 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-COMF2iGb.js +24 -0
- package/widgets/vis2vis-jsontemplate/assets/_virtual_mf___mfe_internal__vis2visjsonTemplateWidgets__mf_owner__1__prebuild___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__prebuild__-ChG7hT9x.js +1 -0
- package/widgets/vis2vis-jsontemplate/assets/hostInit-B-WTvIYW.js +1 -0
- package/widgets/vis2vis-jsontemplate/assets/index-Cvixz-n_.js +7 -0
- package/widgets/vis2vis-jsontemplate/assets/virtualExposes-Cjcx6tD9.js +1 -0
- package/widgets/vis2vis-jsontemplate/customWidgets.js +1 -7
- package/widgets/vis2vis-jsontemplate/assets/createSvgIcon-DA3KcVqi.js +0 -7
- package/widgets/vis2vis-jsontemplate/assets/defaultTheme-kiJLTqpM.js +0 -16
- package/widgets/vis2vis-jsontemplate/assets/hostInit-BAnxsgnF.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/index-B4g3Uqrp.js +0 -934
- package/widgets/vis2vis-jsontemplate/assets/index-CgtArtd6.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/index-DPgSwWJY.js +0 -9
- package/widgets/vis2vis-jsontemplate/assets/index-DYF2SjKE.js +0 -228
- package/widgets/vis2vis-jsontemplate/assets/index-KHkCh06t.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/index-wgINFdb3.js +0 -24
- package/widgets/vis2vis-jsontemplate/assets/jsx-runtime-EJ1eazSQ.js +0 -9
- package/widgets/vis2vis-jsontemplate/assets/localSharedImportMap-DDM89DWG.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/useTheme-Dnh4pjiM.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/virtualExposes-DZUl9izO.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.js-xmvnXG7E.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.js-BSXKX17P.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare___mf_0_mui_mf_1_material__loadShare__.js-CVYwpY1e.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare__react__loadShare__.js-vfrWv2rD.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare__react__loadShare__.js_commonjs-proxy-Q0lGMY-Q.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/vis2visjsonTemplateWidgets__loadShare__react_mf_2_dom__loadShare__.js-C1cGEk2m.js +0 -1
package/README.md
CHANGED
|
@@ -24,6 +24,28 @@ The jsontemplate widget was previously available in the rssfeed (for vis1) and
|
|
|
24
24
|
vis-2-widgets-ovarious adapters. The widgets will be removed from these
|
|
25
25
|
adapters in the near future.
|
|
26
26
|
|
|
27
|
+
## Table of Contents
|
|
28
|
+
|
|
29
|
+
- [Overview](#overview)
|
|
30
|
+
- [Installation](#installation)
|
|
31
|
+
- [Configuration](#configuration)
|
|
32
|
+
- [vis and widgets](#vis-and-widgets)
|
|
33
|
+
- [JSON Template](#json-template)
|
|
34
|
+
- [Advanced use case](#advanced-use-case)
|
|
35
|
+
- [More Use Cases](#more-use-cases)
|
|
36
|
+
- [Templatesystem](#templatesystem)
|
|
37
|
+
- [Very Important Note for use in vis / vis-2](#very-important-note-for-use-in-vis--vis-2)
|
|
38
|
+
- [Curly braces in CSS and JSON](#curly-braces-in-css-and-json)
|
|
39
|
+
- [Use of setInterval](#use-of-setinterval)
|
|
40
|
+
- [Tags](#tags)
|
|
41
|
+
- [Example object](#example-object)
|
|
42
|
+
- [Development and Debugging](#development-and-debugging)
|
|
43
|
+
- [Vis1 Widgets](#vis1-widgets)
|
|
44
|
+
- [Vis2 Widgets](#vis2-widgets)
|
|
45
|
+
- [Todo](#todo)
|
|
46
|
+
- [Changelog](#changelog)
|
|
47
|
+
- [License](#license)
|
|
48
|
+
|
|
27
49
|
## Installation
|
|
28
50
|
|
|
29
51
|
Install the adapter as normal from the stable repository.
|
|
@@ -79,7 +101,8 @@ Available data objects in the template:
|
|
|
79
101
|
|
|
80
102
|
| object/variable | description |
|
|
81
103
|
| --------------- | ------------------------------------------------------------------------ |
|
|
82
|
-
|
|
|
104
|
+
| widgetid | widgetid of the widget. |
|
|
105
|
+
| widgetID | widgetid of the widget. |
|
|
83
106
|
| data | JSON object referenced by the datapoint in json_oid. |
|
|
84
107
|
| dp | Array of the datapoint data, referenced by the additional datapoints |
|
|
85
108
|
| widget | internal widget data. object with all available widget settings |
|
|
@@ -147,32 +170,47 @@ a specific layout. Here is an example:
|
|
|
147
170
|
- [Use Case Async calls](documentation/usecase-asynccall.md)
|
|
148
171
|
- [Use Case loading scripts](documentation/usecase-loadingscripts.md)
|
|
149
172
|
- [Use Case Tasklist](documentation/usecase-tasklist.md)
|
|
173
|
+
- [Use Case public-transport](documentation/usecase-public-transport.md)
|
|
174
|
+
- [Use Case simple gauge](documentation/usecase-simplegauge.md)
|
|
175
|
+
- [Use Case Github Issues and PRs](documentation/usecase-githubissues.md)
|
|
176
|
+
- [Use Case FRITZ!Box call list](documentation/usecase-fritzbox-call-list.md)
|
|
150
177
|
|
|
151
178
|
## Templatesystem
|
|
152
179
|
|
|
153
|
-
|
|
180
|
+
### Very Important Note for use in vis / vis-2
|
|
154
181
|
|
|
155
|
-
|
|
156
|
-
and replaced as bindings.
|
|
182
|
+
#### Curly braces in CSS and JSON
|
|
157
183
|
|
|
158
|
-
|
|
159
|
-
|
|
184
|
+
The binding mechanism in vis / vis-2 uses the pattern `{ ... }`
|
|
185
|
+
to detect binding expressions within HTML.
|
|
186
|
+
For this reason, when specifying CSS or JSON, the curly braces must
|
|
187
|
+
always be placed on separate lines. Otherwise, the content of
|
|
188
|
+
the vis widget will be overwritten with `undefined`.
|
|
160
189
|
|
|
161
|
-
|
|
190
|
+
##### Example
|
|
162
191
|
|
|
163
|
-
```
|
|
164
|
-
{
|
|
192
|
+
```text
|
|
193
|
+
#w_id_<%- widgetid %> { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
|
|
165
194
|
```
|
|
166
195
|
|
|
167
|
-
|
|
196
|
+
must be written as follows:
|
|
168
197
|
|
|
169
|
-
```
|
|
170
|
-
{
|
|
171
|
-
|
|
172
|
-
"b": 2
|
|
198
|
+
```text
|
|
199
|
+
#w_id_<%- widgetid %> {
|
|
200
|
+
height: 100%; display: flex; flex-direction: column; overflow: hidden;
|
|
173
201
|
}
|
|
174
202
|
```
|
|
175
203
|
|
|
204
|
+
#### Use of setInterval
|
|
205
|
+
|
|
206
|
+
Please do not use `setInterval`. Since the template is re-invoked
|
|
207
|
+
every time a data point changes, any existing `setInterval` calls
|
|
208
|
+
cannot be properly cleared. Consequently, an increasing number
|
|
209
|
+
of overlapping `setInterval` calls accumulate over time; this consumes RAM and
|
|
210
|
+
can lead to unpredictable side effects. While reloading the page can resolve
|
|
211
|
+
this issue, the code should not be implemented in this manner.
|
|
212
|
+
As an alternative, such scenarios should be implemented using `setTimeout`.
|
|
213
|
+
|
|
176
214
|
## Tags
|
|
177
215
|
|
|
178
216
|
The template system works with certain tags.
|
|
@@ -363,6 +401,15 @@ Loop over the attributes of an object
|
|
|
363
401
|
Placeholder for the next version (at the beginning of the line):
|
|
364
402
|
### **WORK IN PROGRESS**
|
|
365
403
|
-->
|
|
404
|
+
### 4.4.4 (2026-07-22)
|
|
405
|
+
|
|
406
|
+
- some changes. see readme
|
|
407
|
+
|
|
408
|
+
### 4.4.3 (2026-04-21)
|
|
409
|
+
|
|
410
|
+
- revert repochecker warning about fs/node:fs and path/node:path
|
|
411
|
+
because of error loading ejs
|
|
412
|
+
|
|
366
413
|
### 4.4.2 (2026-04-13)
|
|
367
414
|
|
|
368
415
|
- fix runtime
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "vis-jsontemplate",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.4",
|
|
5
5
|
"news": {
|
|
6
|
+
"4.4.4": {
|
|
7
|
+
"en": "some changes. see readme",
|
|
8
|
+
"de": "einige änderungen. siehe readme",
|
|
9
|
+
"ru": "некоторые изменения. см. readme",
|
|
10
|
+
"pt": "algumas mudanças. ver lerme",
|
|
11
|
+
"nl": "wat veranderingen. zie readme",
|
|
12
|
+
"fr": "quelques changements. voir lecture",
|
|
13
|
+
"it": "alcuni cambiamenti. vedi leggere",
|
|
14
|
+
"es": "algunos cambios. ver readme",
|
|
15
|
+
"pl": "kilka zmian. patrz readme",
|
|
16
|
+
"uk": "деякі зміни. переглянути файл",
|
|
17
|
+
"zh-cn": "一些变化。 参见readme"
|
|
18
|
+
},
|
|
19
|
+
"4.4.3": {
|
|
20
|
+
"en": "- revert repochecker warning about fs/node:fs and path/node:path\n because of error loading ejs",
|
|
21
|
+
"de": "- revert repochecker warnung über fs/node:fs und pfad/node:path\naufgrund der fehlerbelastung ejs",
|
|
22
|
+
"ru": "- повторное предупреждение о репочекере fs/node:fs и path/node:path\nиз-за ошибки загрузки ejs",
|
|
23
|
+
"pt": "- reverter o aviso de repochecker sobre fs/node:fs e caminho/node:path\ndevido ao erro ao carregar ejs",
|
|
24
|
+
"nl": "- return repochecker waarschuwing over fs/node:fs en pad/node:path\nvanwege fout bij het laden van ejs",
|
|
25
|
+
"fr": "- retourner l'avertissement de repochecker sur fs/node:fs et chemin/node:path\nen raison d'une erreur de chargement ejs",
|
|
26
|
+
"it": "- reverte l'avvertimento del repochecker su fs/node:fs e percorso/nodo:path\na causa di errori di caricamento ejs",
|
|
27
|
+
"es": "- revertir la advertencia de repochecker sobre fs/node:fs and path/node:path\npor error carga ejs",
|
|
28
|
+
"pl": "- revert repochecker warning about fs / node: fs and path / node: path\nz powodu błędu wczytywania dżinsów",
|
|
29
|
+
"uk": "- перевернути повторне попередження про fs/node:fs і шлях/node:path\nчерез завантаження помилок",
|
|
30
|
+
"zh-cn": "- 恢复关于fs/节点:fs和路径/节点:路径的重新检查器警告\n因为装入 ejs 出错"
|
|
31
|
+
},
|
|
6
32
|
"4.4.2": {
|
|
7
33
|
"en": "fix runtime",
|
|
8
34
|
"de": "die laufzeit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.vis-jsontemplate",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.4",
|
|
4
4
|
"description": "vis-jsontemplate",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "oweitman",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@alcalzone/release-script": "^5.
|
|
25
|
-
"@alcalzone/release-script-plugin-iobroker": "^5.
|
|
26
|
-
"@alcalzone/release-script-plugin-license": "^5.
|
|
27
|
-
"@alcalzone/release-script-plugin-manual-review": "^5.
|
|
24
|
+
"@alcalzone/release-script": "^5.2.1",
|
|
25
|
+
"@alcalzone/release-script-plugin-iobroker": "^5.2.0",
|
|
26
|
+
"@alcalzone/release-script-plugin-license": "^5.2.0",
|
|
27
|
+
"@alcalzone/release-script-plugin-manual-review": "^5.2.0",
|
|
28
28
|
"@iobroker/adapter-dev": "^1.5.0",
|
|
29
29
|
"@iobroker/eslint-config": "^2.2.0",
|
|
30
|
-
"@iobroker/testing": "^5.
|
|
30
|
+
"@iobroker/testing": "^5.3.0",
|
|
31
31
|
"@iobroker/build-tools": "^3.0.1",
|
|
32
32
|
"@iobroker/vis-2-widgets-react-dev": "^4.0.4",
|
|
33
33
|
"@iobroker/vis-2-widgets-testing": "^1.0.6",
|
|
34
|
-
"@types/node": "^25.
|
|
34
|
+
"@types/node": "^25.9.3"
|
|
35
35
|
},
|
|
36
36
|
"main": "widgets/vis2jsontemplate/customWidgets.js",
|
|
37
37
|
"files": [
|