@5minds/node-red-dashboard-2-processcube-dynamic-form 2.0.4 → 2.0.5-feature-2f01ec-mcergl3n
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/nodes/ui-dynamic-form.html +325 -324
- package/nodes/ui-dynamic-form.js +31 -41
- package/package.json +87 -87
- package/resources/ui-dynamic-form.umd.js +1 -1
- package/ui/components/UIDynamicForm.vue +538 -545
package/nodes/ui-dynamic-form.js
CHANGED
|
@@ -1,50 +1,40 @@
|
|
|
1
1
|
module.exports = function (RED) {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
function UIDynamicFormNode(config) {
|
|
3
|
+
RED.nodes.createNode(this, config);
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const node = this;
|
|
6
|
+
const group = RED.nodes.getNode(config.group);
|
|
7
|
+
const base = group.getBase();
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
const evts = {
|
|
10
|
+
onAction: true,
|
|
11
|
+
beforeSend: function (msg) {
|
|
12
|
+
if (config.title_text_type && config.title_text_type !== 'str') {
|
|
13
|
+
msg.dynamicTitle = RED.util.evaluateNodeProperty(config.title_text, config.title_text_type, node, msg);
|
|
14
|
+
}
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
return msg;
|
|
17
|
+
},
|
|
18
|
+
onInput: function (msg, send, done) {
|
|
19
|
+
base.stores.data.save(base, node, msg);
|
|
11
20
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onInput: function (msg, send, done) {
|
|
16
|
-
// store the latest value in our Node-RED datastore
|
|
17
|
-
base.stores.data.save(base, node, msg);
|
|
18
|
-
},
|
|
19
|
-
// TODO: mm - begin
|
|
20
|
-
// onSocket: {
|
|
21
|
-
// 'my-custom-event': function (conn, id, msg) {
|
|
22
|
-
// console.info('"my-custom-event" received:', conn.id, id, msg);
|
|
23
|
-
// console.info('conn.id:', conn.id);
|
|
24
|
-
// console.info('id:', id);
|
|
25
|
-
// console.info('msg:', msg);
|
|
26
|
-
// console.info('node.id:', node.id);
|
|
27
|
-
// // emit a msg in Node-RED from this node
|
|
28
|
-
// node.send(msg);
|
|
29
|
-
// },
|
|
30
|
-
//},
|
|
31
|
-
// TODO: mm - end
|
|
32
|
-
};
|
|
21
|
+
if (done) done();
|
|
22
|
+
},
|
|
23
|
+
};
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
node.error('No group configured');
|
|
39
|
-
}
|
|
25
|
+
if (group) {
|
|
26
|
+
group.register(node, config, evts);
|
|
27
|
+
} else {
|
|
28
|
+
node.error('No group configured');
|
|
40
29
|
}
|
|
30
|
+
}
|
|
41
31
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
RED.nodes.registerType('ui-dynamic-form', UIDynamicFormNode, {
|
|
33
|
+
defaults: {
|
|
34
|
+
outputs: { value: 1 },
|
|
35
|
+
},
|
|
36
|
+
outputs: function (config) {
|
|
37
|
+
return config.outputs || 1;
|
|
38
|
+
},
|
|
39
|
+
});
|
|
50
40
|
};
|
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
"name": "@5minds/node-red-dashboard-2-processcube-dynamic-form",
|
|
3
|
+
"version": "2.0.5-feature-2f01ec-mcergl3n",
|
|
4
|
+
"description": "The ui component for the ProcessCube dynamic-form",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"processcube",
|
|
7
|
+
"dynamic-form",
|
|
8
|
+
"node-red",
|
|
9
|
+
"node-red-dashboard-2"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/5minds/node-red-dashboard-2-processcube-dynamic-form"
|
|
14
|
+
},
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Martin Moellenbeck",
|
|
18
|
+
"url": "https://github.com/moellenbeck"
|
|
19
|
+
},
|
|
20
|
+
"contributors": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Robin Lenz",
|
|
23
|
+
"url": "https://github.com/roblen45"
|
|
14
24
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"url": "https://github.com/moellenbeck"
|
|
25
|
+
{
|
|
26
|
+
"name": "Luis Thieme",
|
|
27
|
+
"url": "https://github.com/luisthieme"
|
|
19
28
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"node-red-dashboard-2": {
|
|
84
|
-
"version": "1.0.0",
|
|
85
|
-
"widgets": {
|
|
86
|
-
"ui-dynamic-form": {
|
|
87
|
-
"output": "ui-dynamic-form.umd.js",
|
|
88
|
-
"component": "UIDynamicForm"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
29
|
+
{
|
|
30
|
+
"name": "Colin Law",
|
|
31
|
+
"url": "https://github.com/colinl"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"exports": {
|
|
35
|
+
"import": "./resources/ui-dynamic-form.esm.js",
|
|
36
|
+
"require": "./resources/ui-dynamic-form.umd.js"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist/*",
|
|
40
|
+
"nodes/*",
|
|
41
|
+
"ui/*",
|
|
42
|
+
"resources/*"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "vite build",
|
|
46
|
+
"build:dev": "NODE_ENV=development vite build",
|
|
47
|
+
"dev": "NODE_ENV=development vite build --watch",
|
|
48
|
+
"dev:prod": "vite build --watch",
|
|
49
|
+
"lint": "npm run lint:js && npm run lint:package",
|
|
50
|
+
"lint:fix": "npm run lint:js:fix && npm run lint:package:fix",
|
|
51
|
+
"lint:js": "eslint --ext .js,.vue,.cjs,.mjs .",
|
|
52
|
+
"lint:js:fix": "yarn lint:js --fix",
|
|
53
|
+
"lint:package": "sort-package-json --check 'package.json'",
|
|
54
|
+
"lint:package:fix": "sort-package-json 'package.json'"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@formkit/i18n": "^1.6.9",
|
|
58
|
+
"@formkit/themes": "^1.6.9",
|
|
59
|
+
"@formkit/vue": "^1.6.9",
|
|
60
|
+
"to-title-case": "^1.0.0",
|
|
61
|
+
"vue": "^3.3.8",
|
|
62
|
+
"vuex": "^4.1.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@vitejs/plugin-vue": "^4.5.0",
|
|
66
|
+
"eslint": "^8.53.0",
|
|
67
|
+
"eslint-config-standard": "^17.1.0",
|
|
68
|
+
"eslint-plugin-import": "^2.29.0",
|
|
69
|
+
"eslint-plugin-n": "^16.3.1",
|
|
70
|
+
"eslint-plugin-vue": "^9.18.1",
|
|
71
|
+
"vite": "^5.0.13",
|
|
72
|
+
"vite-plugin-css-injected-by-js": "^3.3.0"
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=14"
|
|
76
|
+
},
|
|
77
|
+
"node-red": {
|
|
78
|
+
"version": ">=3.0.0",
|
|
79
|
+
"nodes": {
|
|
80
|
+
"ui-dynamic-form": "nodes/ui-dynamic-form.js"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"node-red-dashboard-2": {
|
|
84
|
+
"version": "1.0.0",
|
|
85
|
+
"widgets": {
|
|
86
|
+
"ui-dynamic-form": {
|
|
87
|
+
"output": "ui-dynamic-form.umd.js",
|
|
88
|
+
"component": "UIDynamicForm"
|
|
89
|
+
}
|
|
91
90
|
}
|
|
91
|
+
}
|
|
92
92
|
}
|