@cyprnet/node-red-contrib-uibuilder-formgen 0.4.11

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +22 -0
  3. package/README.md +58 -0
  4. package/docs/user-guide.html +565 -0
  5. package/examples/formgen-builder/src/index.html +921 -0
  6. package/examples/formgen-builder/src/index.js +1338 -0
  7. package/examples/portalsmith-formgen-example.json +531 -0
  8. package/examples/schema-builder-integration.json +109 -0
  9. package/examples/schemas/Banking/banking_fraud_report.json +102 -0
  10. package/examples/schemas/Banking/banking_kyc_update.json +59 -0
  11. package/examples/schemas/Banking/banking_loan_application.json +113 -0
  12. package/examples/schemas/Banking/banking_new_account.json +98 -0
  13. package/examples/schemas/Banking/banking_wire_transfer_request.json +94 -0
  14. package/examples/schemas/HR/hr_employee_change_form.json +65 -0
  15. package/examples/schemas/HR/hr_exit_interview.json +105 -0
  16. package/examples/schemas/HR/hr_job_application.json +166 -0
  17. package/examples/schemas/HR/hr_onboarding_request.json +140 -0
  18. package/examples/schemas/HR/hr_time_off_request.json +95 -0
  19. package/examples/schemas/HR/hr_training_request.json +70 -0
  20. package/examples/schemas/Healthcare/health_appointment_request.json +103 -0
  21. package/examples/schemas/Healthcare/health_incident_report.json +82 -0
  22. package/examples/schemas/Healthcare/health_lab_order_request.json +72 -0
  23. package/examples/schemas/Healthcare/health_medication_refill.json +72 -0
  24. package/examples/schemas/Healthcare/health_patient_intake.json +113 -0
  25. package/examples/schemas/IT/it_access_request.json +145 -0
  26. package/examples/schemas/IT/it_dhcp_reservation.json +175 -0
  27. package/examples/schemas/IT/it_dns_domain_external.json +192 -0
  28. package/examples/schemas/IT/it_dns_domain_internal.json +171 -0
  29. package/examples/schemas/IT/it_network_change_request.json +126 -0
  30. package/examples/schemas/IT/it_network_request-form.json +299 -0
  31. package/examples/schemas/IT/it_new_hardware_request.json +155 -0
  32. package/examples/schemas/IT/it_password_reset.json +133 -0
  33. package/examples/schemas/IT/it_software_license_request.json +93 -0
  34. package/examples/schemas/IT/it_static_ip_request.json +199 -0
  35. package/examples/schemas/IT/it_subnet_request_form.json +216 -0
  36. package/examples/schemas/Maintenance/maint_checklist.json +176 -0
  37. package/examples/schemas/Maintenance/maint_facility_issue_report.json +127 -0
  38. package/examples/schemas/Maintenance/maint_incident_intake.json +174 -0
  39. package/examples/schemas/Maintenance/maint_inventory_restock.json +79 -0
  40. package/examples/schemas/Maintenance/maint_safety_audit.json +92 -0
  41. package/examples/schemas/Maintenance/maint_vehicle_inspection.json +112 -0
  42. package/examples/schemas/Maintenance/maint_work_order.json +134 -0
  43. package/index.js +12 -0
  44. package/lib/licensing.js +254 -0
  45. package/nodes/portalsmith-license.html +40 -0
  46. package/nodes/portalsmith-license.js +23 -0
  47. package/nodes/uibuilder-formgen.html +261 -0
  48. package/nodes/uibuilder-formgen.js +598 -0
  49. package/package.json +47 -0
  50. package/scripts/normalize_schema_titles.py +77 -0
  51. package/templates/index.html.mustache +541 -0
  52. package/templates/index.js.mustache +1135 -0
@@ -0,0 +1,102 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "banking_fraud_report",
4
+ "title": "Banking - Fraud Report",
5
+ "description": "Report suspected fraud or unauthorized transactions.",
6
+ "sections": [
7
+ {
8
+ "id": "reporter",
9
+ "title": "Reporter",
10
+ "fields": [
11
+ {
12
+ "id": "reporter_name",
13
+ "type": "text",
14
+ "label": "Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "reporter_email",
19
+ "type": "text",
20
+ "label": "Email",
21
+ "validate": "email"
22
+ },
23
+ {
24
+ "id": "reporter_phone",
25
+ "type": "text",
26
+ "label": "Phone",
27
+ "validate": "phone"
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "account",
33
+ "title": "Account",
34
+ "fields": [
35
+ {
36
+ "id": "account_last4",
37
+ "type": "text",
38
+ "label": "Account Last 4",
39
+ "required": true,
40
+ "validate": "regex:\\\\d{4}",
41
+ "validateMessage": "Enter 4 digits"
42
+ },
43
+ {
44
+ "id": "incident_date",
45
+ "type": "date",
46
+ "label": "Incident Date",
47
+ "required": true
48
+ },
49
+ {
50
+ "id": "incident_type",
51
+ "type": "select",
52
+ "label": "Type",
53
+ "required": true,
54
+ "options": [
55
+ {
56
+ "value": "",
57
+ "text": "Select..."
58
+ },
59
+ {
60
+ "value": "card",
61
+ "text": "Card fraud"
62
+ },
63
+ {
64
+ "value": "ach",
65
+ "text": "ACH fraud"
66
+ },
67
+ {
68
+ "value": "wire",
69
+ "text": "Wire fraud"
70
+ },
71
+ {
72
+ "value": "identity",
73
+ "text": "Identity theft"
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "id": "transactions",
81
+ "title": "Transactions",
82
+ "fields": [
83
+ {
84
+ "id": "transactions_list",
85
+ "type": "keyvalue",
86
+ "label": "Suspect Transactions (delimiter)",
87
+ "help": "One per line: amount=merchant (e.g., 199.99=Online Store)",
88
+ "keyvalueMode": "delimiter",
89
+ "keyvalueDelimiter": "=",
90
+ "required": true
91
+ },
92
+ {
93
+ "id": "notes",
94
+ "type": "textarea",
95
+ "label": "Notes",
96
+ "rows": 4
97
+ }
98
+ ]
99
+ }
100
+ ],
101
+ "actions": []
102
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "banking_kyc_update",
4
+ "title": "Banking - KYC Update",
5
+ "description": "Update customer KYC information.",
6
+ "sections": [
7
+ {
8
+ "id": "customer",
9
+ "title": "Customer",
10
+ "fields": [
11
+ {
12
+ "id": "customer_name",
13
+ "type": "text",
14
+ "label": "Customer Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "customer_id",
19
+ "type": "text",
20
+ "label": "Customer ID",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "update_date",
25
+ "type": "date",
26
+ "label": "Update Date",
27
+ "required": true
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "updates",
33
+ "title": "Updates",
34
+ "fields": [
35
+ {
36
+ "id": "fields_updated",
37
+ "type": "keyvalue",
38
+ "label": "Fields Updated (pairs)",
39
+ "help": "Use key=field and value=new_value (e.g., address=123 Main St).",
40
+ "required": true,
41
+ "keyvalueMode": "pairs",
42
+ "pairs": [
43
+ {
44
+ "key": "address",
45
+ "value": "123 Main St"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "id": "verified",
51
+ "type": "checkbox",
52
+ "label": "Verified by staff",
53
+ "defaultValue": false
54
+ }
55
+ ]
56
+ }
57
+ ],
58
+ "actions": []
59
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "banking_loan_application",
4
+ "title": "Banking - Loan Application",
5
+ "description": "Basic loan application intake form.",
6
+ "sections": [
7
+ {
8
+ "id": "applicant",
9
+ "title": "Applicant",
10
+ "fields": [
11
+ {
12
+ "id": "full_name",
13
+ "type": "text",
14
+ "label": "Full Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "email",
19
+ "type": "text",
20
+ "label": "Email",
21
+ "validate": "email",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "phone",
26
+ "type": "text",
27
+ "label": "Phone",
28
+ "validate": "phone",
29
+ "required": true
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "id": "loan",
35
+ "title": "Loan",
36
+ "fields": [
37
+ {
38
+ "id": "loan_type",
39
+ "type": "select",
40
+ "label": "Loan Type",
41
+ "required": true,
42
+ "options": [
43
+ {
44
+ "value": "",
45
+ "text": "Select..."
46
+ },
47
+ {
48
+ "value": "personal",
49
+ "text": "Personal"
50
+ },
51
+ {
52
+ "value": "auto",
53
+ "text": "Auto"
54
+ },
55
+ {
56
+ "value": "mortgage",
57
+ "text": "Mortgage"
58
+ },
59
+ {
60
+ "value": "business",
61
+ "text": "Business"
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "id": "amount",
67
+ "type": "number",
68
+ "label": "Requested Amount (USD)",
69
+ "min": 0,
70
+ "step": 100,
71
+ "required": true
72
+ },
73
+ {
74
+ "id": "term_months",
75
+ "type": "number",
76
+ "label": "Term (months)",
77
+ "min": 6,
78
+ "max": 360,
79
+ "step": 1,
80
+ "required": true
81
+ },
82
+ {
83
+ "id": "has_collateral",
84
+ "type": "radio",
85
+ "label": "Collateral?",
86
+ "required": true,
87
+ "options": [
88
+ {
89
+ "value": "no",
90
+ "text": "No"
91
+ },
92
+ {
93
+ "value": "yes",
94
+ "text": "Yes"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "id": "collateral_notes",
100
+ "type": "textarea",
101
+ "label": "Collateral Notes",
102
+ "rows": 3,
103
+ "showIf": {
104
+ "field": "has_collateral",
105
+ "operator": "equals",
106
+ "value": "yes"
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ ],
112
+ "actions": []
113
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "banking_new_account",
4
+ "title": "Banking - New Account Opening",
5
+ "description": "Collect information to open a new account.",
6
+ "sections": [
7
+ {
8
+ "id": "customer",
9
+ "title": "Customer",
10
+ "fields": [
11
+ {
12
+ "id": "full_name",
13
+ "type": "text",
14
+ "label": "Full Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "email",
19
+ "type": "text",
20
+ "label": "Email",
21
+ "validate": "email",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "phone",
26
+ "type": "text",
27
+ "label": "Phone",
28
+ "validate": "phone",
29
+ "required": true
30
+ },
31
+ {
32
+ "id": "dob",
33
+ "type": "date",
34
+ "label": "Date of Birth",
35
+ "required": true
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "id": "account",
41
+ "title": "Account",
42
+ "fields": [
43
+ {
44
+ "id": "account_type",
45
+ "type": "select",
46
+ "label": "Account Type",
47
+ "required": true,
48
+ "options": [
49
+ {
50
+ "value": "",
51
+ "text": "Select..."
52
+ },
53
+ {
54
+ "value": "checking",
55
+ "text": "Checking"
56
+ },
57
+ {
58
+ "value": "savings",
59
+ "text": "Savings"
60
+ },
61
+ {
62
+ "value": "money_market",
63
+ "text": "Money Market"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "id": "initial_deposit",
69
+ "type": "number",
70
+ "label": "Initial Deposit (USD)",
71
+ "min": 0,
72
+ "step": 0.01,
73
+ "required": true
74
+ },
75
+ {
76
+ "id": "agree_terms",
77
+ "type": "checkbox",
78
+ "label": "Customer agrees to terms",
79
+ "defaultValue": false,
80
+ "required": true
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "id": "notes",
86
+ "title": "Notes",
87
+ "fields": [
88
+ {
89
+ "id": "notes",
90
+ "type": "textarea",
91
+ "label": "Notes",
92
+ "rows": 4
93
+ }
94
+ ]
95
+ }
96
+ ],
97
+ "actions": []
98
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "banking_wire_transfer_request",
4
+ "title": "Banking - Wire Transfer Request",
5
+ "description": "Collect details to initiate a wire transfer.",
6
+ "sections": [
7
+ {
8
+ "id": "requester",
9
+ "title": "Requester",
10
+ "fields": [
11
+ {
12
+ "id": "requester_name",
13
+ "type": "text",
14
+ "label": "Requester Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "requester_email",
19
+ "type": "text",
20
+ "label": "Requester Email",
21
+ "validate": "email",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "request_date",
26
+ "type": "date",
27
+ "label": "Request Date",
28
+ "required": true
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "id": "wire",
34
+ "title": "Wire Details",
35
+ "fields": [
36
+ {
37
+ "id": "amount_usd",
38
+ "type": "number",
39
+ "label": "Amount (USD)",
40
+ "min": 0,
41
+ "step": 0.01,
42
+ "required": true
43
+ },
44
+ {
45
+ "id": "beneficiary_name",
46
+ "type": "text",
47
+ "label": "Beneficiary Name",
48
+ "required": true
49
+ },
50
+ {
51
+ "id": "beneficiary_bank",
52
+ "type": "text",
53
+ "label": "Beneficiary Bank",
54
+ "required": true
55
+ },
56
+ {
57
+ "id": "routing_number",
58
+ "type": "text",
59
+ "label": "Routing Number",
60
+ "required": true,
61
+ "validate": "regex:\\\\d{9}",
62
+ "validateMessage": "Enter 9 digits"
63
+ },
64
+ {
65
+ "id": "account_number",
66
+ "type": "text",
67
+ "label": "Account Number",
68
+ "required": true
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "id": "compliance",
74
+ "title": "Compliance",
75
+ "fields": [
76
+ {
77
+ "id": "purpose",
78
+ "type": "textarea",
79
+ "label": "Purpose of Wire",
80
+ "rows": 3,
81
+ "required": true
82
+ },
83
+ {
84
+ "id": "sanctions_checked",
85
+ "type": "checkbox",
86
+ "label": "Sanctions screening completed",
87
+ "defaultValue": false,
88
+ "required": true
89
+ }
90
+ ]
91
+ }
92
+ ],
93
+ "actions": []
94
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "hr_employee_change",
4
+ "title": "HR - Employee Change Form",
5
+ "description": "Request changes such as title, manager, department, or location.",
6
+ "sections": [
7
+ {
8
+ "id": "employee",
9
+ "title": "Employee",
10
+ "fields": [
11
+ {
12
+ "id": "employee_id",
13
+ "type": "text",
14
+ "label": "Employee ID",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "employee_name",
19
+ "type": "text",
20
+ "label": "Employee Name",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "effective_date",
25
+ "type": "date",
26
+ "label": "Effective Date",
27
+ "required": true
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "changes",
33
+ "title": "Changes",
34
+ "fields": [
35
+ {
36
+ "id": "change_types",
37
+ "type": "keyvalue",
38
+ "label": "Changes (pairs)",
39
+ "help": "Use key=field and value=new_value (e.g., title=Senior Analyst).",
40
+ "required": true,
41
+ "keyvalueMode": "pairs",
42
+ "pairs": [
43
+ {
44
+ "key": "title",
45
+ "value": "Senior Analyst"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "id": "requires_approval",
51
+ "type": "checkbox",
52
+ "label": "Requires executive approval",
53
+ "defaultValue": false
54
+ },
55
+ {
56
+ "id": "notes",
57
+ "type": "textarea",
58
+ "label": "Notes",
59
+ "rows": 4
60
+ }
61
+ ]
62
+ }
63
+ ],
64
+ "actions": []
65
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "hr_exit_interview",
4
+ "title": "HR - Exit Interview",
5
+ "description": "Collect feedback during employee offboarding.",
6
+ "sections": [
7
+ {
8
+ "id": "employee",
9
+ "title": "Employee",
10
+ "fields": [
11
+ {
12
+ "id": "employee_name",
13
+ "type": "text",
14
+ "label": "Employee Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "last_day",
19
+ "type": "date",
20
+ "label": "Last Day",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "departure_reason",
25
+ "type": "select",
26
+ "label": "Primary Reason for Leaving",
27
+ "required": true,
28
+ "options": [
29
+ {
30
+ "value": "",
31
+ "text": "Select..."
32
+ },
33
+ {
34
+ "value": "comp",
35
+ "text": "Compensation"
36
+ },
37
+ {
38
+ "value": "career",
39
+ "text": "Career growth"
40
+ },
41
+ {
42
+ "value": "management",
43
+ "text": "Management"
44
+ },
45
+ {
46
+ "value": "worklife",
47
+ "text": "Work/Life balance"
48
+ },
49
+ {
50
+ "value": "other",
51
+ "text": "Other"
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "id": "feedback",
59
+ "title": "Feedback",
60
+ "fields": [
61
+ {
62
+ "id": "overall_satisfaction",
63
+ "type": "radio",
64
+ "label": "Overall Satisfaction",
65
+ "required": true,
66
+ "options": [
67
+ {
68
+ "value": "1",
69
+ "text": "1 (Low)"
70
+ },
71
+ {
72
+ "value": "2",
73
+ "text": "2"
74
+ },
75
+ {
76
+ "value": "3",
77
+ "text": "3"
78
+ },
79
+ {
80
+ "value": "4",
81
+ "text": "4"
82
+ },
83
+ {
84
+ "value": "5",
85
+ "text": "5 (High)"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "id": "what_worked",
91
+ "type": "textarea",
92
+ "label": "What worked well?",
93
+ "rows": 4
94
+ },
95
+ {
96
+ "id": "what_to_improve",
97
+ "type": "textarea",
98
+ "label": "What should improve?",
99
+ "rows": 4
100
+ }
101
+ ]
102
+ }
103
+ ],
104
+ "actions": []
105
+ }