iobroker.vis-jsontemplate 4.4.3 → 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 +55 -14
- package/io-package.json +14 -1
- package/package.json +7 -7
- package/widgets/vis-jsontemplate/dist/jsontemplate-dist.js +9 -2
- package/widgets/vis-jsontemplate/dist/jsontemplate-dist.js.map +2 -2
- package/widgets/vis-jsontemplate/js/jsontemplate.js +8 -1
- package/widgets/vis2vis-jsontemplate/assets/{JSONTemplateWidget-CFWfawQI.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/__mfe_internal__vis2visjsonTemplateWidgets__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.js-QpWQ0Ruy.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/__mfe_internal__vis2visjsonTemplateWidgets__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.js-BQaWQZDA.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/__mfe_internal__vis2visjsonTemplateWidgets__loadShare___mf_0_mui_mf_1_material__loadShare__.js-Dx3IZ7gE.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/__mfe_internal__vis2visjsonTemplateWidgets__loadShare__react__loadShare__.js-CHk2ZYam.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/__mfe_internal__vis2visjsonTemplateWidgets__loadShare__react__loadShare__.js_commonjs-proxy-CUH0x0Yj.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/__mfe_internal__vis2visjsonTemplateWidgets__loadShare__react_mf_2_dom__loadShare__.js-D4urraZ3.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/createSvgIcon-B8ThVg2b.js +0 -7
- package/widgets/vis2vis-jsontemplate/assets/defaultTheme-DFkU_9OO.js +0 -16
- package/widgets/vis2vis-jsontemplate/assets/hostInit-BAnxsgnF.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/index-BNKB3_RX.js +0 -228
- package/widgets/vis2vis-jsontemplate/assets/index-BgpFuj22.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/index-BqqizSPU.js +0 -24
- package/widgets/vis2vis-jsontemplate/assets/index-ChI1xHGw.js +0 -9
- package/widgets/vis2vis-jsontemplate/assets/index-DcYjVbuP.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/index-DjZG8BEx.js +0 -934
- package/widgets/vis2vis-jsontemplate/assets/jsx-runtime-CEfGRA9H.js +0 -9
- package/widgets/vis2vis-jsontemplate/assets/localSharedImportMap-CqryS6J3.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/useTheme-COBplpnx.js +0 -1
- package/widgets/vis2vis-jsontemplate/assets/virtualExposes-C-V1Jo9L.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 |
|
|
@@ -148,32 +171,46 @@ a specific layout. Here is an example:
|
|
|
148
171
|
- [Use Case loading scripts](documentation/usecase-loadingscripts.md)
|
|
149
172
|
- [Use Case Tasklist](documentation/usecase-tasklist.md)
|
|
150
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)
|
|
151
177
|
|
|
152
178
|
## Templatesystem
|
|
153
179
|
|
|
154
|
-
|
|
180
|
+
### Very Important Note for use in vis / vis-2
|
|
155
181
|
|
|
156
|
-
|
|
157
|
-
and replaced as bindings.
|
|
182
|
+
#### Curly braces in CSS and JSON
|
|
158
183
|
|
|
159
|
-
|
|
160
|
-
|
|
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`.
|
|
161
189
|
|
|
162
|
-
|
|
190
|
+
##### Example
|
|
163
191
|
|
|
164
|
-
```
|
|
165
|
-
{
|
|
192
|
+
```text
|
|
193
|
+
#w_id_<%- widgetid %> { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
|
|
166
194
|
```
|
|
167
195
|
|
|
168
|
-
|
|
196
|
+
must be written as follows:
|
|
169
197
|
|
|
170
|
-
```
|
|
171
|
-
{
|
|
172
|
-
|
|
173
|
-
"b": 2
|
|
198
|
+
```text
|
|
199
|
+
#w_id_<%- widgetid %> {
|
|
200
|
+
height: 100%; display: flex; flex-direction: column; overflow: hidden;
|
|
174
201
|
}
|
|
175
202
|
```
|
|
176
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
|
+
|
|
177
214
|
## Tags
|
|
178
215
|
|
|
179
216
|
The template system works with certain tags.
|
|
@@ -364,6 +401,10 @@ Loop over the attributes of an object
|
|
|
364
401
|
Placeholder for the next version (at the beginning of the line):
|
|
365
402
|
### **WORK IN PROGRESS**
|
|
366
403
|
-->
|
|
404
|
+
### 4.4.4 (2026-07-22)
|
|
405
|
+
|
|
406
|
+
- some changes. see readme
|
|
407
|
+
|
|
367
408
|
### 4.4.3 (2026-04-21)
|
|
368
409
|
|
|
369
410
|
- revert repochecker warning about fs/node:fs and path/node:path
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
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
|
+
},
|
|
6
19
|
"4.4.3": {
|
|
7
20
|
"en": "- revert repochecker warning about fs/node:fs and path/node:path\n because of error loading ejs",
|
|
8
21
|
"de": "- revert repochecker warnung über fs/node:fs und pfad/node:path\naufgrund der fehlerbelastung ejs",
|
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": [
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
var version;
|
|
59
59
|
var init_package = __esm({
|
|
60
60
|
"../package.json"() {
|
|
61
|
-
version = "4.4.
|
|
61
|
+
version = "4.4.4";
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
|
|
@@ -217,7 +217,14 @@
|
|
|
217
217
|
try {
|
|
218
218
|
text = yield ejs.render(
|
|
219
219
|
template,
|
|
220
|
-
{
|
|
220
|
+
{
|
|
221
|
+
widgetID,
|
|
222
|
+
widgetid: widgetID,
|
|
223
|
+
data: oiddata,
|
|
224
|
+
dp: datapoints,
|
|
225
|
+
widget: data,
|
|
226
|
+
style
|
|
227
|
+
},
|
|
221
228
|
{ async: true }
|
|
222
229
|
);
|
|
223
230
|
} catch (e) {
|