@5minds/node-red-dashboard-2-processcube-dynamic-form 1.1.2-feature-997de4-m7nhlmql → 1.1.2-feature-3cca8f-m849ffl5

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.
@@ -27,8 +27,14 @@
27
27
  readonly: {
28
28
  value: false,
29
29
  },
30
+ collapsible: {
31
+ value: false,
32
+ },
33
+ collapse_when_finished: {
34
+ value: false,
35
+ },
30
36
  actions_inside_card: {
31
- value: true,
37
+ value: true,
32
38
  },
33
39
  card_size_styling: {
34
40
  value: "",
@@ -300,36 +306,51 @@
300
306
  <label for="node-input-form_columns"><i class="fa fa-hand"></i>Columns in form</label>
301
307
  <input type="number" min="1" id="node-input-form_columns" title="Control the amount of columns, that your form fields should be placed in.">
302
308
  </div>
303
-
304
- <hr />
305
-
306
- <h4>Other</h4>
307
309
  <div class="form-row">
308
310
  <label for="node-input-readonly"><i class="fa fa-hand"></i>Readonly</label>
309
311
  <input type="checkbox" id="node-input-readonly" title="Makes all form fields read only.">
310
312
  </div>
311
313
  <div class="form-row">
312
- <label for="node-input-trigger_on_change"><i class="fa fa-hand"></i>Trigger on change</label>
313
- <input type="checkbox" id="node-input-trigger_on_change" title="A new output will be added. Each time a value inside the form changes, this output will be triggered.">
314
+ <label for="node-input-collapsible"><i class="fa fa-hand"></i>Collapsible</label>
315
+ <input type="checkbox" id="node-input-collapsible" title="When checked, the card can be folded at any time.">
316
+ </div>
317
+ <div class="form-row">
318
+ <label for="node-input-collapse_when_finished"><i class="fa fa-hand"></i>Collapsible when finished</label>
319
+ <input type="checkbox" id="node-input-collapse_when_finished" title="When checked, the card will automatically collapse after finishing the form.">
314
320
  </div>
315
321
  <div class="form-row">
316
322
  <label for="node-input-waiting_title"><i class="fa fa-hand"></i>Title for waiting text</label>
317
- <input type="text" id="node-input-waiting_title">
318
- </div>
319
- <div class="form-row">
320
- <label for="node-input-waiting_info"><i class="fa fa-hand"></i>Text for waiting text</label>
321
- <input type="text" id="node-input-waiting_info">
322
- </div>
323
+ <input type="text" id="node-input-waiting_title" title="Displayed while no UserTask is present.">
324
+ </div>
325
+ <div class="form-row">
326
+ <label for="node-input-waiting_info"><i class="fa fa-hand"></i>Text for waiting text</label>
327
+ <input type="text" id="node-input-waiting_info" title="Displayed while no UserTask is present.">
328
+ </div>
329
+ <hr />
330
+ <h4>Other</h4>
331
+ <div class="form-row">
332
+ <label for="node-input-trigger_on_change"><i class="fa fa-hand"></i>Trigger on change</label>
333
+ <input type="checkbox" id="node-input-trigger_on_change" title="A new output will be added. Each time a value inside the form changes, this output will be triggered.">
334
+ </div>
323
335
  </script>
324
336
 
325
337
 
326
338
  <script type="text/markdown" data-help-name="ui-dynamic-form">
327
339
  A UI-Node to display Forms for UserTasks from the ProcessCube Engine.
328
340
 
341
+ ## States
342
+
343
+ This component can have one of three states. `Waiting`, `active` and `finished`.
344
+ - `Waiting` is the initial state. This node will either display the waiting text and waiting title, or nothing. This dependes on your configuration. This state can be set at any time by passing a message with an empty payload into this node.
345
+ - `Active` will display a dynamic form for a UserTask. This state can be set by passing the result of the `usertask-input` or `wait-for-usertask` node into it.
346
+ - `Finished` will display the last filled form in a disabled mode. This state can be set by passing the result of the `dynamic-form` node into itself.
347
+
329
348
  ## Usage
330
349
 
331
- Connect the UI-Node to the `usertask-input` or `wait-for-usertask` node. It will use the UserTasks FormFields configuration to display a dynamically generated Form inside a Card.
350
+ Connect the input to the `usertask-input` or `wait-for-usertask` node. It will use the UserTasks FormFields configuration to display a dynamically generated Form inside a Card.
332
351
  After configuring an action, connect it's output to an `usertask-output` node.
352
+ In case you want to display the `finished` state, place a `link in` and a `link out` node to pipe the `dynamic-form` nodes output into its input.
353
+ In case you want to clear the node and set it back into `waiting` state, place a `function` node that clears the `payload` object. The pipe the `dynamic-form` nodes output into the `function` node and the `function` nodes output into th e`dynamic-form` nodes input.
333
354
 
334
355
  ## Action Configuration
335
356
 
@@ -391,15 +412,17 @@ Enter custom css rules to control the size and placement of the whole card. It c
391
412
  This value controls the amount of columns the card will have. It can be used to place multiple FormFields in one row.
392
413
  Configure `hidden` FormFields in your UserTask configuration to leave spaces open between FormFields. FormFields with type `heading` will always take up a whole line regardless of the `Columns in Form` value.
393
414
 
394
- ## Other
395
-
396
415
  ### Readonly
397
416
 
398
417
  When checked, all fields in the Form will not be editable. To mark single FormFields as readOnly, add the custom property `readOnly` with the value `true` to the FormField configuration of the UserTask.
399
418
 
400
- ### Trigger on change
419
+ ### Collapsible
401
420
 
402
- Adds a new output to the node. This output will be triggered each time a FormFields value changes. This can be used for live, server-side validation or for Forms without action buttons.
421
+ When checked, the card will have a collapse icon and can be folded at any.
422
+
423
+ ### Collapsible when finished
424
+
425
+ When checked, the card will gain a collapse icon and automatically fold, after the node entered `finished` state. This is independed to `Collapsible`.
403
426
 
404
427
  ### Title for waiting text
405
428
 
@@ -409,6 +432,12 @@ While no UserTask is present, this text will be displayed.
409
432
 
410
433
  While no UserTask is present, this text will be displayed.
411
434
 
435
+ ## Other
436
+
437
+ ### Trigger on change
438
+
439
+ Adds a new output to the node. This output will be triggered each time a FormFields value changes. This can be used for live, server-side validation or for Forms without action buttons.
440
+
412
441
  ## References
413
442
 
414
443
  - [The ProcessCube Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; Plattform
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-dashboard-2-processcube-dynamic-form",
3
- "version": "1.1.2-feature-997de4-m7nhlmql",
3
+ "version": "1.1.2-feature-3cca8f-m849ffl5",
4
4
  "description": "The ui component for the ProcessCube dynamic-form",
5
5
  "keywords": [
6
6
  "processcube",