@5minds/node-red-contrib-processcube 0.3.3-feature-cefc25-lx7iaahd → 0.3.3-feature-f05bb1-lxj0xkx4
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/.node-red/data/.config.nodes.json +0 -129
- package/.node-red/data/.config.nodes.json.backup +1 -119
- package/.node-red/data/.config.users.json.backup +2 -2
- package/.node-red/data/flows.json +0 -218
- package/Dockerfile +0 -1
- package/externaltask-output.js +5 -1
- package/package.json +1 -3
- package/.node-red/data/uibuilder/.config/sioMiddleware.js-template +0 -53
- package/.node-red/data/uibuilder/.config/sioMsgOut.js-template +0 -22
- package/.node-red/data/uibuilder/.config/sioUse.js-template +0 -43
- package/.node-red/data/uibuilder/.config/uibMiddleware.js-template +0 -26
- package/.node-red/data/uibuilder/common/images/node-blue.ico +0 -0
- package/.node-red/data/uibuilder/package.json +0 -15
- package/.node-red/data/uibuilder/package.json.bak +0 -15
- package/.node-red/data/uibuilder/usertasks/.eslintrc.js +0 -80
- package/.node-red/data/uibuilder/usertasks/LICENSE +0 -178
- package/.node-red/data/uibuilder/usertasks/README.md +0 -57
- package/.node-red/data/uibuilder/usertasks/api/.keep +0 -0
- package/.node-red/data/uibuilder/usertasks/package.json +0 -26
- package/.node-red/data/uibuilder/usertasks/routes/.keep +0 -0
- package/.node-red/data/uibuilder/usertasks/src/index.css +0 -7
- package/.node-red/data/uibuilder/usertasks/src/index.html +0 -26
- package/.node-red/data/uibuilder/usertasks/src/index.js +0 -8
- package/processes/SampleUserTask.bpmn +0 -75
- package/usertask-input.html +0 -31
- package/usertask-input.js +0 -89
- package/usertask-output.html +0 -31
- package/usertask-output.js +0 -45
@@ -1,43 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Template Socket.IO `use` middleware for uibuilder. Fn will be called for EVERY inbound msg from a client to Node-RED/uibuilder.
|
3
|
-
* UPDATED: 2022-04-01
|
4
|
-
*
|
5
|
-
* NOTES & WARNINGS:
|
6
|
-
* 1) This function is called when a client sends a "packet" of data to the server.
|
7
|
-
* 2) Failing to either return or call `next()` will mean that your clients will never be able to get responses.
|
8
|
-
* 3) You can amend the incoming msg in this middleware.
|
9
|
-
* 4) An error in this function will probably cause Node-RED to fail to start at all.
|
10
|
-
* 5) You have to restart Node-RED if you change this file.
|
11
|
-
* 6) If you call `next( new Error('blah') )` The error is sent back to the client and further proessing of the incoming msg stops.
|
12
|
-
* 7) To use for authentication/authorisation with Express and sio connection middleware, create a common node.js module.
|
13
|
-
*
|
14
|
-
* Allows you to process incoming data from clients.
|
15
|
-
*
|
16
|
-
* see: https://socket.io/docs/v4/server-api/#socketusefn
|
17
|
-
* see also: uibRoot/.config/sioMiddleware.js & sioMsgOut.js
|
18
|
-
* and https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#websocket-implementation-hints
|
19
|
-
*
|
20
|
-
* @param {[string,Array<Object>]} data The channel name (strictly the event name) and args send by a client (Socket.IO calls it a "packet"). data[0] is the channel/event name, data[args][0] is the actual msg
|
21
|
-
* @param {function} next The callback to hand off to the next middleware
|
22
|
-
*/
|
23
|
-
function sioUseMw([ channel, ...args ], next) {
|
24
|
-
|
25
|
-
const msg = args[0]
|
26
|
-
|
27
|
-
console.log('[uibuilder:Socket.IO:sioUse.js] msg from client: ', 'Channel Name:', channel, ' Msg:', msg)
|
28
|
-
|
29
|
-
// Simplistic error example - looking for specific property on the inbound msg
|
30
|
-
if ( msg.i_am_an_error ) {
|
31
|
-
// The error is sent back to the client and further processing of the msg stops
|
32
|
-
next(new Error('Oops! Some kind of error happened'))
|
33
|
-
return
|
34
|
-
}
|
35
|
-
|
36
|
-
// You can amend the incoming msg
|
37
|
-
msg._test = 'added by sioUse.js middleware'
|
38
|
-
|
39
|
-
next()
|
40
|
-
|
41
|
-
} // Do not forget to end with a call to `next()` or clients will not be able to connect
|
42
|
-
|
43
|
-
module.exports = sioUseMw
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Template ExpressJS Middleware for uibuilder.
|
3
|
-
* UPDATED: 2022-04-01
|
4
|
-
*
|
5
|
-
* NOTES & WARNINGS:
|
6
|
-
* 1) This function is called EVERY TIME any web call is made to the URL defined by your uib instance.
|
7
|
-
* So it should be kept short and efficient.
|
8
|
-
* 2) Failing to either return or call `next()` will cause an ExpressJS error.
|
9
|
-
* 3) An error in this function will probably cause Node-RED to fail to start at all.
|
10
|
-
* 4) You have to restart Node-RED if you change this file.
|
11
|
-
* 5) To use for authentication/authorisation with sio connection middleware, create a common node.js module.
|
12
|
-
*
|
13
|
-
* Allows custom processing for authentication, session management, custom logging, etc.
|
14
|
-
*
|
15
|
-
* @param {object} req The ExpressJS request object
|
16
|
-
* @param {object} res The ExpressJS result object
|
17
|
-
* @param {function} next The callback to hand off to the next middleware
|
18
|
-
*/
|
19
|
-
function uibMw(req,res,next) {
|
20
|
-
|
21
|
-
console.log('[uibuilder:uibMiddleware.js] Custom ExpressJS middleware called.')
|
22
|
-
next()
|
23
|
-
|
24
|
-
} // Do not forget to end with a call to `next()`
|
25
|
-
|
26
|
-
module.exports = uibMw
|
Binary file
|
@@ -1,15 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "uib_root",
|
3
|
-
"version": "6.8.2",
|
4
|
-
"description": "Root configuration and data folder for uibuilder",
|
5
|
-
"scripts": {},
|
6
|
-
"dependencies": {},
|
7
|
-
"homepage": "",
|
8
|
-
"bugs": "",
|
9
|
-
"author": "",
|
10
|
-
"license": "Apache-2.0",
|
11
|
-
"repository": "",
|
12
|
-
"uibuilder": {
|
13
|
-
"packages": {}
|
14
|
-
}
|
15
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "uib_root",
|
3
|
-
"version": "6.8.2",
|
4
|
-
"description": "Root configuration and data folder for uibuilder",
|
5
|
-
"scripts": {},
|
6
|
-
"dependencies": {},
|
7
|
-
"homepage": "",
|
8
|
-
"bugs": "",
|
9
|
-
"author": "",
|
10
|
-
"license": "Apache-2.0",
|
11
|
-
"repository": "",
|
12
|
-
"uibuilder": {
|
13
|
-
"packages": {}
|
14
|
-
}
|
15
|
-
}
|
@@ -1,80 +0,0 @@
|
|
1
|
-
/** JavaScript Versions
|
2
|
-
* 5 is minimum -> Last IE11
|
3
|
-
* 6 = 2015 -> Node >8.10, iOS12+
|
4
|
-
* 7 = 2016 -> FF78+,
|
5
|
-
* 8 = 2017 -> Node 10.9+
|
6
|
-
* 9 = 2018 -> Node 12.11+
|
7
|
-
* 10 = 2019
|
8
|
-
* 11 = 2020
|
9
|
-
* 12 = 2021
|
10
|
-
*/
|
11
|
-
module.exports = { // eslint-disable-line no-undef
|
12
|
-
env: {
|
13
|
-
browser: true,
|
14
|
-
node: false,
|
15
|
-
'shared-node-browser': false,
|
16
|
-
},
|
17
|
-
parserOptions: {
|
18
|
-
ecmaVersion: 2015,
|
19
|
-
sourceType: 'script',
|
20
|
-
},
|
21
|
-
root: true,
|
22
|
-
globals: {
|
23
|
-
uibuilder: true,
|
24
|
-
$: true,
|
25
|
-
},
|
26
|
-
overrides: [
|
27
|
-
{
|
28
|
-
files: ['*.esm.js', '*.module.js', '*.mod.js', '*.mjs'],
|
29
|
-
parserOptions: { sourceType: 'module' },
|
30
|
-
}
|
31
|
-
],
|
32
|
-
plugins: [
|
33
|
-
'html', // Check scripts in HTML. https://www.npmjs.com/package/eslint-plugin-html
|
34
|
-
'es', // Help avoid js that is too new. https://eslint-plugin-es.mysticatea.dev/
|
35
|
-
'jsdoc', // JSDoc. https://www.npmjs.com/package/eslint-plugin-jsdoc
|
36
|
-
'promise', // Better promises. https://www.npmjs.com/package/eslint-plugin-promise
|
37
|
-
'sonarjs', // Detect bugs and suspicious patterns. https://github.com/SonarSource/eslint-plugin-sonarjs
|
38
|
-
],
|
39
|
-
extends: [
|
40
|
-
'standard',
|
41
|
-
// 'eslint:recommended',
|
42
|
-
'plugin:es/restrict-to-es2015',
|
43
|
-
'plugin:jsdoc/recommended',
|
44
|
-
'plugin:promise/recommended',
|
45
|
-
'plugin:sonarjs/recommended',
|
46
|
-
],
|
47
|
-
rules: {
|
48
|
-
// TODO remove once min engines moves to node.js v15+
|
49
|
-
'es/no-logical-assignment-operators': 'error',
|
50
|
-
'es/no-promise-any': 'error',
|
51
|
-
'es/no-numeric-separators': 'error',
|
52
|
-
|
53
|
-
'sonarjs/no-duplicate-string': ['warn', { 'threshold': 6 }], // Default is 3
|
54
|
-
// 'sonarjs/cognitive-complexity': ['error', 15], // Default is 15
|
55
|
-
'sonarjs/no-nested-template-literals': 0,
|
56
|
-
|
57
|
-
// Tidy up some jsdoc oddities
|
58
|
-
'jsdoc/multiline-blocks': 0,
|
59
|
-
'jsdoc/newline-after-description': 0,
|
60
|
-
'jsdoc/no-multi-asterisks': 0,
|
61
|
-
'jsdoc/tag-lines': 0,
|
62
|
-
'jsdoc/valid-types': 0, // Rubbish, fails on common type configs
|
63
|
-
'jsdoc/no-undefined-types': 0, // ['error'|'warn', {'definedTypes':['Promise']}],
|
64
|
-
|
65
|
-
// Make Standard less annoying
|
66
|
-
'brace-style': 'off', // You should only use one-true-brace style but sometimes we want to compress things a bit.
|
67
|
-
'comma-dangle': 'off', // Lack of dangles wastes soo much time correcting lists
|
68
|
-
'dot-notation': 'off', // Turn off to allow for tslint's brain-dead treatment of expando objects in JS
|
69
|
-
'indent': ['error', 4, { 'SwitchCase': 1 }], // Standard wants 2, I like 4
|
70
|
-
'space-before-function-paren': 'off', // No, don't need space between fn and arg!
|
71
|
-
'no-multi-spaces': 'off', // Readability is more important than size (reduce size using uglify)
|
72
|
-
'object-shorthand': ['error', 'consistent'],
|
73
|
-
'padded-blocks': 'off', // Sometimes you just need some space! See above.
|
74
|
-
'space-in-parens': 'off', // Sometimes you just need some space!
|
75
|
-
'spaced-comment': ['error', 'always', {
|
76
|
-
'markers': ['html', '#region', '#endregion']
|
77
|
-
}],
|
78
|
-
'quote-props': 'off', // Sometimes it is necessary and then much nicer to be able to quote things that don't need it.
|
79
|
-
},
|
80
|
-
}
|
@@ -1,178 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Apache License
|
4
|
-
Version 2.0, January 2004
|
5
|
-
http://www.apache.org/licenses/
|
6
|
-
|
7
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
8
|
-
|
9
|
-
1. Definitions.
|
10
|
-
|
11
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
12
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
13
|
-
|
14
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
15
|
-
the copyright owner that is granting the License.
|
16
|
-
|
17
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
18
|
-
other entities that control, are controlled by, or are under common
|
19
|
-
control with that entity. For the purposes of this definition,
|
20
|
-
"control" means (i) the power, direct or indirect, to cause the
|
21
|
-
direction or management of such entity, whether by contract or
|
22
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
23
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
24
|
-
|
25
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
26
|
-
exercising permissions granted by this License.
|
27
|
-
|
28
|
-
"Source" form shall mean the preferred form for making modifications,
|
29
|
-
including but not limited to software source code, documentation
|
30
|
-
source, and configuration files.
|
31
|
-
|
32
|
-
"Object" form shall mean any form resulting from mechanical
|
33
|
-
transformation or translation of a Source form, including but
|
34
|
-
not limited to compiled object code, generated documentation,
|
35
|
-
and conversions to other media types.
|
36
|
-
|
37
|
-
"Work" shall mean the work of authorship, whether in Source or
|
38
|
-
Object form, made available under the License, as indicated by a
|
39
|
-
copyright notice that is included in or attached to the work
|
40
|
-
(an example is provided in the Appendix below).
|
41
|
-
|
42
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
43
|
-
form, that is based on (or derived from) the Work and for which the
|
44
|
-
editorial revisions, annotations, elaborations, or other modifications
|
45
|
-
represent, as a whole, an original work of authorship. For the purposes
|
46
|
-
of this License, Derivative Works shall not include works that remain
|
47
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
48
|
-
the Work and Derivative Works thereof.
|
49
|
-
|
50
|
-
"Contribution" shall mean any work of authorship, including
|
51
|
-
the original version of the Work and any modifications or additions
|
52
|
-
to that Work or Derivative Works thereof, that is intentionally
|
53
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
54
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
55
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
56
|
-
means any form of electronic, verbal, or written communication sent
|
57
|
-
to the Licensor or its representatives, including but not limited to
|
58
|
-
communication on electronic mailing lists, source code control systems,
|
59
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
60
|
-
Licensor for the purpose of discussing and improving the Work, but
|
61
|
-
excluding communication that is conspicuously marked or otherwise
|
62
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
63
|
-
|
64
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
65
|
-
on behalf of whom a Contribution has been received by Licensor and
|
66
|
-
subsequently incorporated within the Work.
|
67
|
-
|
68
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
69
|
-
this License, each Contributor hereby grants to You a perpetual,
|
70
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
71
|
-
copyright license to reproduce, prepare Derivative Works of,
|
72
|
-
publicly display, publicly perform, sublicense, and distribute the
|
73
|
-
Work and such Derivative Works in Source or Object form.
|
74
|
-
|
75
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
76
|
-
this License, each Contributor hereby grants to You a perpetual,
|
77
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
78
|
-
(except as stated in this section) patent license to make, have made,
|
79
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
80
|
-
where such license applies only to those patent claims licensable
|
81
|
-
by such Contributor that are necessarily infringed by their
|
82
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
83
|
-
with the Work to which such Contribution(s) was submitted. If You
|
84
|
-
institute patent litigation against any entity (including a
|
85
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
86
|
-
or a Contribution incorporated within the Work constitutes direct
|
87
|
-
or contributory patent infringement, then any patent licenses
|
88
|
-
granted to You under this License for that Work shall terminate
|
89
|
-
as of the date such litigation is filed.
|
90
|
-
|
91
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
92
|
-
Work or Derivative Works thereof in any medium, with or without
|
93
|
-
modifications, and in Source or Object form, provided that You
|
94
|
-
meet the following conditions:
|
95
|
-
|
96
|
-
(a) You must give any other recipients of the Work or
|
97
|
-
Derivative Works a copy of this License; and
|
98
|
-
|
99
|
-
(b) You must cause any modified files to carry prominent notices
|
100
|
-
stating that You changed the files; and
|
101
|
-
|
102
|
-
(c) You must retain, in the Source form of any Derivative Works
|
103
|
-
that You distribute, all copyright, patent, trademark, and
|
104
|
-
attribution notices from the Source form of the Work,
|
105
|
-
excluding those notices that do not pertain to any part of
|
106
|
-
the Derivative Works; and
|
107
|
-
|
108
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
109
|
-
distribution, then any Derivative Works that You distribute must
|
110
|
-
include a readable copy of the attribution notices contained
|
111
|
-
within such NOTICE file, excluding those notices that do not
|
112
|
-
pertain to any part of the Derivative Works, in at least one
|
113
|
-
of the following places: within a NOTICE text file distributed
|
114
|
-
as part of the Derivative Works; within the Source form or
|
115
|
-
documentation, if provided along with the Derivative Works; or,
|
116
|
-
within a display generated by the Derivative Works, if and
|
117
|
-
wherever such third-party notices normally appear. The contents
|
118
|
-
of the NOTICE file are for informational purposes only and
|
119
|
-
do not modify the License. You may add Your own attribution
|
120
|
-
notices within Derivative Works that You distribute, alongside
|
121
|
-
or as an addendum to the NOTICE text from the Work, provided
|
122
|
-
that such additional attribution notices cannot be construed
|
123
|
-
as modifying the License.
|
124
|
-
|
125
|
-
You may add Your own copyright statement to Your modifications and
|
126
|
-
may provide additional or different license terms and conditions
|
127
|
-
for use, reproduction, or distribution of Your modifications, or
|
128
|
-
for any such Derivative Works as a whole, provided Your use,
|
129
|
-
reproduction, and distribution of the Work otherwise complies with
|
130
|
-
the conditions stated in this License.
|
131
|
-
|
132
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
133
|
-
any Contribution intentionally submitted for inclusion in the Work
|
134
|
-
by You to the Licensor shall be under the terms and conditions of
|
135
|
-
this License, without any additional terms or conditions.
|
136
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
137
|
-
the terms of any separate license agreement you may have executed
|
138
|
-
with Licensor regarding such Contributions.
|
139
|
-
|
140
|
-
6. Trademarks. This License does not grant permission to use the trade
|
141
|
-
names, trademarks, service marks, or product names of the Licensor,
|
142
|
-
except as required for reasonable and customary use in describing the
|
143
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
144
|
-
|
145
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
146
|
-
agreed to in writing, Licensor provides the Work (and each
|
147
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
148
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
149
|
-
implied, including, without limitation, any warranties or conditions
|
150
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
151
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
152
|
-
appropriateness of using or redistributing the Work and assume any
|
153
|
-
risks associated with Your exercise of permissions under this License.
|
154
|
-
|
155
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
156
|
-
whether in tort (including negligence), contract, or otherwise,
|
157
|
-
unless required by applicable law (such as deliberate and grossly
|
158
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
159
|
-
liable to You for damages, including any direct, indirect, special,
|
160
|
-
incidental, or consequential damages of any character arising as a
|
161
|
-
result of this License or out of the use or inability to use the
|
162
|
-
Work (including but not limited to damages for loss of goodwill,
|
163
|
-
work stoppage, computer failure or malfunction, or any and all
|
164
|
-
other commercial damages or losses), even if such Contributor
|
165
|
-
has been advised of the possibility of such damages.
|
166
|
-
|
167
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
168
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
169
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
170
|
-
or other liability obligations and/or rights consistent with this
|
171
|
-
License. However, in accepting such obligations, You may act only
|
172
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
173
|
-
of any other Contributor, and only if You agree to indemnify,
|
174
|
-
defend, and hold each Contributor harmless for any liability
|
175
|
-
incurred by, or claims asserted against, such Contributor by reason
|
176
|
-
of your accepting any such warranty or additional liability.
|
177
|
-
|
178
|
-
END OF TERMS AND CONDITIONS
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# uibuilder Template: Blank
|
2
|
-
|
3
|
-
> NOTE: You can replace the contents of this README with text that describes your UI.
|
4
|
-
|
5
|
-
This is about the simplest template you can get for uibuilder. Is is also (as of uibuilder v5+), the default template.
|
6
|
-
|
7
|
-
It does not use any frameworks and has no other dependencies.
|
8
|
-
|
9
|
-
It demonstrates that you can use uibuilder purely with HTML/JavaScript or even just HTML and still easily build a simple, dynamic, data-driven user interface with the help of Node-RED.
|
10
|
-
|
11
|
-
All it does is start up uibuilder.
|
12
|
-
|
13
|
-
From uibuilder v6.1.0+, it uses the IIFE client library.
|
14
|
-
|
15
|
-
## Folders
|
16
|
-
|
17
|
-
* `/` - The root folder contains this file. It can be used for other things **but** it will not be served up in the Node-RED web server.
|
18
|
-
* `/src/` - the default folder that serves files as web resources. However, this can be changed to a different folder if desired.
|
19
|
-
* `/dist/` - the default folder for serving files as web resources where a build step is used. In that case, the `/src` folder is the source used by the build tool and `/dist` is the destination for the build (the "distribution" folder).
|
20
|
-
* `/routes/` - This folder can contain `.js` files defining routing middleware for uibuilder's ExpressJS web server.
|
21
|
-
* `/api/` - This folder can contain `.js` files defining REST API's specific to this uibuilder instance.
|
22
|
-
|
23
|
-
The above folders will all pre-exist for the built-in uibuilder templates. The folders can safely be removed if not needed but one folder must exist to serve the web resources from (this cannot be the root folder).
|
24
|
-
|
25
|
-
The template only has files in the root and `src` folders. The `src` folder is the default used by uibuilder to serve up files to clients.
|
26
|
-
|
27
|
-
One reserved item in the root folder however will be a `package.json` file. This will be used in the future to help with build/compile steps. You can still use it yourself, just bear in mind that a future version of uibuilder will make use it as well. If you need to have any development packages installed to build your UI, don't forget to tell `npm` to save them as development dependencies not normal dependencies.
|
28
|
-
|
29
|
-
The `dist` folder should be used if you have a build step to convert your source code to something that browsers understand. So if you are using a build (compile) step to produce your production code, ensure that it is configured to use the `dist` folder as the output folder and that it creates at least an `index.html` file.
|
30
|
-
|
31
|
-
You can switch between the `src` and `dist` (or other) folders using the matching setting in the Editor. See uibuilder's advanced settings tab.
|
32
|
-
|
33
|
-
Also note that you can use **linked** folders and files in this folder structure. This can be handy if you want to maintain your code in a different folder somewhere or if your default build process needs to use sub-folders other than `src` and `dist`.(Though as of v6, you can specify any sub-folder to be served)
|
34
|
-
|
35
|
-
## Files in this template
|
36
|
-
|
37
|
-
* `package.json`: REQUIRED. Defines the basic structure, name, description of the project and defines any local development dependencies if any. Also works with `npm` allowing the installation of dev packages (such as build or linting tools).
|
38
|
-
* `README.md`: This file. Change this to describe your web app and provide documentation for it.
|
39
|
-
* `.eslintrc.js`: A pre-configured configuration for the ESLINT tool. Helps when writing front-end code.
|
40
|
-
* `LICENSE`: A copy of the Apache 2.0 license. Replace with a different license if needed. Always license your code. Apache 2.0 matches the licensing of uibuilder.
|
41
|
-
* `src/index.html`: REQUIRED. Contains your basic HTML and will be the file loaded and displayed in the browser when going to the uibuilder defined URL.
|
42
|
-
* `src/index.js`: Contains all of the logic for your UI. It must be linked to in the html file. Optional.
|
43
|
-
* `src/index.css`: Contains your custom CSS for styling. It must be linked to in the html file. Optional.
|
44
|
-
|
45
|
-
Note that only the `package.json` and `index.html` files are actually _required_. uibuilder will not function as expected without them.
|
46
|
-
|
47
|
-
It is possible to use the index.html file simply as a link to other files but it must be present.
|
48
|
-
|
49
|
-
The other files are all optional. However, you will need to change the index.html file accordingly if you rename or remove them.
|
50
|
-
|
51
|
-
## Multiple HTML pages
|
52
|
-
|
53
|
-
uibuilder will happily serve up any number of web pages from a single instance. It will also make use of sub-folders. However, each folder should have an `index.html` file so that a URL that ends with the folder name will still work without error.
|
54
|
-
|
55
|
-
Note that each html file is a separate page and requires its own JavaScript and uibuilder library reference. When moving between pages, remember that every page is stand-alone, a new environment. You can share one `index.js` file between multiple pages if you prefer but each page will run a separate instance.
|
56
|
-
|
57
|
-
If multiple pages are connected to the same uibuilder instance, they will all get the same broadcast messages from Node-RED. So if you want to handle different messages on different pages, remember to filter them in your front-end JavaScript in `uibuilder.onChange('msg', ....)` function. Turn on the advanced flag for including a `msg._uib` property in output if you need to differentiate between pages and/or clients in Node-RED.
|
File without changes
|
@@ -1,26 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "uib-blank",
|
3
|
-
"version": "6.1.0",
|
4
|
-
"private": true,
|
5
|
-
"description": "This is about the simplest template you can get for uibuilder.",
|
6
|
-
"browser": "./src/index.js",
|
7
|
-
"scripts": {
|
8
|
-
"build": "echo \"Error: no build process specified\" && exit 1"
|
9
|
-
},
|
10
|
-
"keywords": ["uibuilder", "node-red", "node-red-contrib-uibuilder"],
|
11
|
-
"author": "Julian Knight (Totally Information)",
|
12
|
-
"license": "Apache-2.0",
|
13
|
-
"homepage": "https://github.com/TotallyInformation/node-red-contrib-uibuilder",
|
14
|
-
"bugs": "https://github.com/TotallyInformation/node-red-contrib-uibuilder/issues",
|
15
|
-
"repository": {
|
16
|
-
"type": "git",
|
17
|
-
"url": "https://github.com/TotallyInformation/node-red-contrib-uibuilder.git"
|
18
|
-
},
|
19
|
-
"browserslist": [
|
20
|
-
"> 0.5%",
|
21
|
-
"maintained versions",
|
22
|
-
"last 2 versions",
|
23
|
-
"not dead",
|
24
|
-
"not ie > 0"
|
25
|
-
]
|
26
|
-
}
|
File without changes
|
@@ -1,7 +0,0 @@
|
|
1
|
-
/* Load defaults from `<userDir>/node_modules/node-red-contrib-uibuilder/front-end/uib-brand.min.css`
|
2
|
-
* This version auto-adjusts for light/dark browser settings but might not be as complete.
|
3
|
-
*/
|
4
|
-
@import url("../uibuilder/uib-brand.min.css");
|
5
|
-
|
6
|
-
/* OR, load the defaults from the older `<userDir>/node_modules/node-red-contrib-uibuilder/front-end/uib-styles.css` */
|
7
|
-
/* @import url("../uibuilder/uib-styles.css"); */
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en"><head>
|
3
|
-
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6
|
-
<link rel="icon" href="../uibuilder/images/node-blue.ico">
|
7
|
-
|
8
|
-
<title>Blank template - Node-RED uibuilder</title>
|
9
|
-
<meta name="description" content="Node-RED uibuilder - Blank template">
|
10
|
-
|
11
|
-
<!-- Your own CSS (defaults to loading uibuilders css)-->
|
12
|
-
<link type="text/css" rel="stylesheet" href="./index.css" media="all">
|
13
|
-
|
14
|
-
<!-- #region Supporting Scripts. These MUST be in the right order. Note no leading / -->
|
15
|
-
<script defer src="../uibuilder/uibuilder.iife.min.js"></script>
|
16
|
-
<!-- <script defer src="./index.js">/* OPTIONAL: Put your custom code in that */</script> -->
|
17
|
-
<!-- #endregion -->
|
18
|
-
|
19
|
-
</head><body class="uib">
|
20
|
-
|
21
|
-
<h1 class="with-subtitle">uibuilder Blank Template</h1>
|
22
|
-
<div role="doc-subtitle">Using the IIFE library.</div>
|
23
|
-
|
24
|
-
<div id="more"><!-- '#more' is used as a parent for dynamic HTML content in examples --></div>
|
25
|
-
|
26
|
-
</body></html>
|
@@ -1,75 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="SampleUserTask_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
|
3
|
-
<bpmn:collaboration id="Collaboration_1cidyxu" name="">
|
4
|
-
<bpmn:participant id="Participant_0px403d" name="SampleUserTask" processRef="SampleUserTask_Process" />
|
5
|
-
</bpmn:collaboration>
|
6
|
-
<bpmn:process id="SampleUserTask_Process" name="SampleUserTask" isExecutable="true">
|
7
|
-
<bpmn:laneSet>
|
8
|
-
<bpmn:lane id="Lane_1xzf0d3" name="Lane">
|
9
|
-
<bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
|
10
|
-
<bpmn:flowNodeRef>Event_1eeiwx4</bpmn:flowNodeRef>
|
11
|
-
<bpmn:flowNodeRef>Activity_0ljiko7</bpmn:flowNodeRef>
|
12
|
-
</bpmn:lane>
|
13
|
-
</bpmn:laneSet>
|
14
|
-
<bpmn:startEvent id="StartEvent_1" name="Start">
|
15
|
-
<bpmn:extensionElements>
|
16
|
-
<camunda:properties>
|
17
|
-
<camunda:property name="studio.defaultCustomStartToken" value="{ "sample": "hello" }" />
|
18
|
-
</camunda:properties>
|
19
|
-
</bpmn:extensionElements>
|
20
|
-
<bpmn:outgoing>Flow_1h0giih</bpmn:outgoing>
|
21
|
-
</bpmn:startEvent>
|
22
|
-
<bpmn:sequenceFlow id="Flow_1h0giih" sourceRef="StartEvent_1" targetRef="Activity_0ljiko7" />
|
23
|
-
<bpmn:endEvent id="Event_1eeiwx4">
|
24
|
-
<bpmn:incoming>Flow_1laqnja</bpmn:incoming>
|
25
|
-
</bpmn:endEvent>
|
26
|
-
<bpmn:sequenceFlow id="Flow_1laqnja" sourceRef="Activity_0ljiko7" targetRef="Event_1eeiwx4" />
|
27
|
-
<bpmn:userTask id="Activity_0ljiko7" name="Hello world">
|
28
|
-
<bpmn:extensionElements>
|
29
|
-
<camunda:formData>
|
30
|
-
<camunda:formField id="text_id" label="Text Label" type="string" />
|
31
|
-
<camunda:formField id="number_id" label="Number Label" type="long" defaultValue="${token.current.sample}" customForm="{"hint":"Sample"}" />
|
32
|
-
<camunda:formField id="date_id" label="Date Label" type="date" />
|
33
|
-
<camunda:formField id="select_id" label="Select Label" type="enum">
|
34
|
-
<camunda:value id="value_01" name="Value 01" />
|
35
|
-
<camunda:value id="value_02" name="Value 02" />
|
36
|
-
</camunda:formField>
|
37
|
-
<camunda:formField id="boolean_id" label="Boolean Label" type="boolean" />
|
38
|
-
</camunda:formData>
|
39
|
-
</bpmn:extensionElements>
|
40
|
-
<bpmn:incoming>Flow_1h0giih</bpmn:incoming>
|
41
|
-
<bpmn:outgoing>Flow_1laqnja</bpmn:outgoing>
|
42
|
-
</bpmn:userTask>
|
43
|
-
</bpmn:process>
|
44
|
-
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
45
|
-
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
|
46
|
-
<bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
|
47
|
-
<dc:Bounds x="5" y="4" width="435" height="346" />
|
48
|
-
</bpmndi:BPMNShape>
|
49
|
-
<bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
|
50
|
-
<dc:Bounds x="35" y="4" width="405" height="346" />
|
51
|
-
</bpmndi:BPMNShape>
|
52
|
-
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
53
|
-
<dc:Bounds x="92" y="152" width="36" height="36" />
|
54
|
-
<bpmndi:BPMNLabel>
|
55
|
-
<dc:Bounds x="98" y="195" width="24" height="14" />
|
56
|
-
</bpmndi:BPMNLabel>
|
57
|
-
</bpmndi:BPMNShape>
|
58
|
-
<bpmndi:BPMNShape id="Event_1eeiwx4_di" bpmnElement="Event_1eeiwx4">
|
59
|
-
<dc:Bounds x="332" y="152" width="36" height="36" />
|
60
|
-
</bpmndi:BPMNShape>
|
61
|
-
<bpmndi:BPMNShape id="Activity_1uodwbi_di" bpmnElement="Activity_0ljiko7">
|
62
|
-
<dc:Bounds x="180" y="130" width="100" height="80" />
|
63
|
-
<bpmndi:BPMNLabel />
|
64
|
-
</bpmndi:BPMNShape>
|
65
|
-
<bpmndi:BPMNEdge id="Flow_1h0giih_di" bpmnElement="Flow_1h0giih">
|
66
|
-
<di:waypoint x="128" y="170" />
|
67
|
-
<di:waypoint x="180" y="170" />
|
68
|
-
</bpmndi:BPMNEdge>
|
69
|
-
<bpmndi:BPMNEdge id="Flow_1laqnja_di" bpmnElement="Flow_1laqnja">
|
70
|
-
<di:waypoint x="280" y="170" />
|
71
|
-
<di:waypoint x="332" y="170" />
|
72
|
-
</bpmndi:BPMNEdge>
|
73
|
-
</bpmndi:BPMNPlane>
|
74
|
-
</bpmndi:BPMNDiagram>
|
75
|
-
</bpmn:definitions>
|
package/usertask-input.html
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
<script type="text/javascript">
|
2
|
-
RED.nodes.registerType('usertask-input',{
|
3
|
-
category: 'ProcessCube',
|
4
|
-
color: '#00aed7',
|
5
|
-
defaults: {
|
6
|
-
name: {value: ""},
|
7
|
-
engine: {value: "", type: "processcube-engine-config"}
|
8
|
-
},
|
9
|
-
inputs: 0,
|
10
|
-
outputs: 1,
|
11
|
-
icon: "font-awesome/fa-envelope-open",
|
12
|
-
label: function() {
|
13
|
-
return this.name || "usertask-input";
|
14
|
-
}
|
15
|
-
});
|
16
|
-
</script>
|
17
|
-
|
18
|
-
<script type="text/html" data-template-name="usertask-input">
|
19
|
-
<div class="form-row">
|
20
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
21
|
-
<input type="text" id="node-input-name" placeholder="Name">
|
22
|
-
</div>
|
23
|
-
<div class="form-row">
|
24
|
-
<label for="node-input-engine"><i class="fa fa-tag"></i> Engine-URL</label>
|
25
|
-
<input type="text" id="node-input-engine" placeholder="http://engine:8000">
|
26
|
-
</div>
|
27
|
-
</script>
|
28
|
-
|
29
|
-
<script type="text/html" data-help-name="usertask-input">
|
30
|
-
<p>A node which subscribes to an User Task of https://processcube.io</p>
|
31
|
-
</script>
|