@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,72 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "health_lab_order_request",
4
+ "title": "Healthcare - Lab Order Request",
5
+ "description": "Request lab tests and provide basic ordering details.",
6
+ "sections": [
7
+ {
8
+ "id": "requester",
9
+ "title": "Requester",
10
+ "fields": [
11
+ {
12
+ "id": "provider_name",
13
+ "type": "text",
14
+ "label": "Provider Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "provider_email",
19
+ "type": "text",
20
+ "label": "Provider Email",
21
+ "validate": "email"
22
+ },
23
+ {
24
+ "id": "order_date",
25
+ "type": "date",
26
+ "label": "Order Date",
27
+ "required": true
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "patient",
33
+ "title": "Patient",
34
+ "fields": [
35
+ {
36
+ "id": "patient_name",
37
+ "type": "text",
38
+ "label": "Patient Name",
39
+ "required": true
40
+ },
41
+ {
42
+ "id": "patient_dob",
43
+ "type": "date",
44
+ "label": "Date of Birth",
45
+ "required": true
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "id": "tests",
51
+ "title": "Tests",
52
+ "fields": [
53
+ {
54
+ "id": "test_codes",
55
+ "type": "keyvalue",
56
+ "label": "Tests (delimiter)",
57
+ "help": "One per line: test=priority (e.g., CBC=STAT)",
58
+ "keyvalueMode": "delimiter",
59
+ "keyvalueDelimiter": "=",
60
+ "required": true
61
+ },
62
+ {
63
+ "id": "clinical_notes",
64
+ "type": "textarea",
65
+ "label": "Clinical Notes",
66
+ "rows": 4
67
+ }
68
+ ]
69
+ }
70
+ ],
71
+ "actions": []
72
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "health_medication_refill",
4
+ "title": "Healthcare - Medication Refill Request",
5
+ "description": "Request a medication refill (example form).",
6
+ "sections": [
7
+ {
8
+ "id": "patient",
9
+ "title": "Patient",
10
+ "fields": [
11
+ {
12
+ "id": "full_name",
13
+ "type": "text",
14
+ "label": "Full Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "dob",
19
+ "type": "date",
20
+ "label": "Date of Birth",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "type": "text",
26
+ "label": "Phone",
27
+ "validate": "phone",
28
+ "required": true
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "id": "med",
34
+ "title": "Medication",
35
+ "fields": [
36
+ {
37
+ "id": "medication_name",
38
+ "type": "text",
39
+ "label": "Medication Name",
40
+ "required": true
41
+ },
42
+ {
43
+ "id": "dosage",
44
+ "type": "text",
45
+ "label": "Dosage",
46
+ "placeholder": "e.g., 10mg"
47
+ },
48
+ {
49
+ "id": "pharmacy",
50
+ "type": "text",
51
+ "label": "Preferred Pharmacy"
52
+ },
53
+ {
54
+ "id": "days_supply",
55
+ "type": "number",
56
+ "label": "Days Supply",
57
+ "min": 1,
58
+ "max": 365,
59
+ "step": 1,
60
+ "required": true
61
+ },
62
+ {
63
+ "id": "notes",
64
+ "type": "textarea",
65
+ "label": "Notes",
66
+ "rows": 3
67
+ }
68
+ ]
69
+ }
70
+ ],
71
+ "actions": []
72
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "health_patient_intake",
4
+ "title": "Healthcare - Patient Intake",
5
+ "description": "Basic patient intake form (non-clinical example).",
6
+ "sections": [
7
+ {
8
+ "id": "patient",
9
+ "title": "Patient",
10
+ "fields": [
11
+ {
12
+ "id": "full_name",
13
+ "type": "text",
14
+ "label": "Full Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "dob",
19
+ "type": "date",
20
+ "label": "Date of Birth",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "type": "text",
26
+ "label": "Phone",
27
+ "validate": "phone",
28
+ "required": true
29
+ },
30
+ {
31
+ "id": "email",
32
+ "type": "text",
33
+ "label": "Email",
34
+ "validate": "email"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "id": "visit",
40
+ "title": "Visit",
41
+ "fields": [
42
+ {
43
+ "id": "visit_type",
44
+ "type": "select",
45
+ "label": "Visit Type",
46
+ "required": true,
47
+ "options": [
48
+ {
49
+ "value": "",
50
+ "text": "Select..."
51
+ },
52
+ {
53
+ "value": "new",
54
+ "text": "New patient"
55
+ },
56
+ {
57
+ "value": "followup",
58
+ "text": "Follow-up"
59
+ },
60
+ {
61
+ "value": "urgent",
62
+ "text": "Urgent"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "id": "chief_complaint",
68
+ "type": "textarea",
69
+ "label": "Chief Complaint",
70
+ "rows": 3,
71
+ "required": true
72
+ },
73
+ {
74
+ "id": "allergies",
75
+ "type": "textarea",
76
+ "label": "Allergies",
77
+ "rows": 2
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "id": "insurance",
83
+ "title": "Insurance",
84
+ "fields": [
85
+ {
86
+ "id": "has_insurance",
87
+ "type": "checkbox",
88
+ "label": "Has insurance",
89
+ "defaultValue": true
90
+ },
91
+ {
92
+ "id": "insurance_info",
93
+ "type": "keyvalue",
94
+ "label": "Insurance Info (pairs)",
95
+ "help": "Example: provider=Acme Health, member_id=12345",
96
+ "keyvalueMode": "pairs",
97
+ "pairs": [
98
+ {
99
+ "key": "provider",
100
+ "value": "Acme Health"
101
+ }
102
+ ],
103
+ "showIf": {
104
+ "field": "has_insurance",
105
+ "operator": "equals",
106
+ "value": true
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ ],
112
+ "actions": []
113
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "it_access_request",
4
+ "title": "IT - Access Request",
5
+ "description": "Request access to systems, groups, and applications.",
6
+ "sections": [
7
+ {
8
+ "id": "request",
9
+ "title": "Request",
10
+ "fields": [
11
+ {
12
+ "id": "requestor_name",
13
+ "type": "text",
14
+ "label": "Requestor Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "requestor_email",
19
+ "type": "text",
20
+ "label": "Requestor Email",
21
+ "required": true,
22
+ "validate": "email"
23
+ },
24
+ {
25
+ "id": "needed_by",
26
+ "type": "date",
27
+ "label": "Needed By",
28
+ "required": true
29
+ },
30
+ {
31
+ "id": "access_type",
32
+ "type": "radio",
33
+ "label": "Access Type",
34
+ "required": true,
35
+ "options": [
36
+ {
37
+ "value": "new",
38
+ "text": "New access"
39
+ },
40
+ {
41
+ "value": "change",
42
+ "text": "Change existing access"
43
+ },
44
+ {
45
+ "value": "remove",
46
+ "text": "Remove access"
47
+ }
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "id": "target",
54
+ "title": "Target User",
55
+ "fields": [
56
+ {
57
+ "id": "target_username",
58
+ "type": "text",
59
+ "label": "Target Username",
60
+ "required": true,
61
+ "placeholder": "jdoe"
62
+ },
63
+ {
64
+ "id": "target_manager",
65
+ "type": "text",
66
+ "label": "Manager Name",
67
+ "required": true
68
+ },
69
+ {
70
+ "id": "department",
71
+ "type": "select",
72
+ "label": "Department",
73
+ "required": true,
74
+ "options": [
75
+ {
76
+ "value": "",
77
+ "text": "Select..."
78
+ },
79
+ {
80
+ "value": "it",
81
+ "text": "IT"
82
+ },
83
+ {
84
+ "value": "hr",
85
+ "text": "HR"
86
+ },
87
+ {
88
+ "value": "finance",
89
+ "text": "Finance"
90
+ },
91
+ {
92
+ "value": "ops",
93
+ "text": "Operations"
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "id": "access",
101
+ "title": "Access Details",
102
+ "fields": [
103
+ {
104
+ "id": "systems",
105
+ "type": "keyvalue",
106
+ "label": "Systems and Roles (pairs)",
107
+ "help": "Add key=value pairs like system=role (e.g., jira=developer).",
108
+ "required": true,
109
+ "keyvalueMode": "pairs",
110
+ "pairs": [
111
+ {
112
+ "key": "jira",
113
+ "value": "developer"
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ "id": "groups",
119
+ "type": "keyvalue",
120
+ "label": "AD Groups (delimiter)",
121
+ "help": "One per line, like group=membership.",
122
+ "required": false,
123
+ "keyvalueMode": "delimiter",
124
+ "keyvalueDelimiter": "="
125
+ },
126
+ {
127
+ "id": "business_justification",
128
+ "type": "textarea",
129
+ "label": "Business Justification",
130
+ "required": true,
131
+ "rows": 4
132
+ }
133
+ ]
134
+ }
135
+ ],
136
+ "actions": [
137
+ {
138
+ "id": "copy_access_summary",
139
+ "type": "copyBlock",
140
+ "label": "Copy Summary",
141
+ "template": "IT Access Request\\nUser: {{target_username}}\\nRequester: {{requestor_name}} ({{requestor_email}})\\nNeeded By: {{needed_by}}\\nType: {{access_type}}\\nJustification: {{business_justification}}",
142
+ "successMessage": "Copied access request summary"
143
+ }
144
+ ]
145
+ }
@@ -0,0 +1,175 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "ddi_dhcp_manual_reservation",
4
+ "title": "DDI - Manual DHCP Reservation (MAC IP)",
5
+ "description": "Request a manual DHCP reservation for a device by MAC address, with location + DHCP server scope.",
6
+ "sections": [
7
+ {
8
+ "id": "req",
9
+ "title": "Request Details",
10
+ "fields": [
11
+ {
12
+ "id": "requestor_name",
13
+ "type": "text",
14
+ "label": "Requestor Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "requestor_email",
19
+ "type": "text",
20
+ "label": "Requestor Email",
21
+ "validate": "email",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "needed_by",
26
+ "type": "date",
27
+ "label": "Needed By",
28
+ "required": true
29
+ },
30
+ {
31
+ "id": "ticket_id",
32
+ "type": "text",
33
+ "label": "Ticket / Change ID"
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "id": "location",
39
+ "title": "Location / Scope",
40
+ "fields": [
41
+ {
42
+ "id": "site_name",
43
+ "type": "text",
44
+ "label": "Site / Facility",
45
+ "required": true
46
+ },
47
+ {
48
+ "id": "vrf_name",
49
+ "type": "text",
50
+ "label": "VRF (if applicable)"
51
+ },
52
+ {
53
+ "id": "vlan_id",
54
+ "type": "number",
55
+ "label": "VLAN ID",
56
+ "min": 1,
57
+ "max": 4094
58
+ },
59
+ {
60
+ "id": "subnet_prefix",
61
+ "type": "text",
62
+ "label": "Subnet/Prefix",
63
+ "required": true,
64
+ "placeholder": "e.g., 10.20.30.0/24"
65
+ },
66
+ {
67
+ "id": "dhcp_server",
68
+ "type": "text",
69
+ "label": "DHCP Server / Cluster",
70
+ "placeholder": "e.g., dhcp01, Infoblox grid member"
71
+ },
72
+ {
73
+ "id": "relay_helper",
74
+ "type": "text",
75
+ "label": "DHCP Relay / Helper Address (if applicable)"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "id": "reservation",
81
+ "title": "Reservation Details",
82
+ "fields": [
83
+ {
84
+ "id": "hostname",
85
+ "type": "text",
86
+ "label": "Device Hostname (if known)"
87
+ },
88
+ {
89
+ "id": "mac_address",
90
+ "type": "text",
91
+ "label": "MAC Address",
92
+ "required": true,
93
+ "placeholder": "AA:BB:CC:DD:EE:FF",
94
+ "help": "Use colon-separated hex. Example: 00:11:22:33:44:55",
95
+ "validate": "regex:^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$"
96
+ },
97
+ {
98
+ "id": "reserved_ip",
99
+ "type": "text",
100
+ "label": "Reserved IP Address",
101
+ "required": true,
102
+ "placeholder": "e.g., 10.20.30.45"
103
+ },
104
+ {
105
+ "id": "reservation_type",
106
+ "type": "select",
107
+ "label": "Reservation Type",
108
+ "required": true,
109
+ "options": [
110
+ "Fixed Address",
111
+ "MAC Allowlist Only",
112
+ "PXE/Boot Reservation",
113
+ "Other"
114
+ ]
115
+ },
116
+ {
117
+ "id": "dns_update",
118
+ "type": "select",
119
+ "label": "Update DNS from DHCP?",
120
+ "required": true,
121
+ "options": [
122
+ "No",
123
+ "Yes (Forward Only)",
124
+ "Yes (Forward + PTR)",
125
+ "Unknown"
126
+ ]
127
+ },
128
+ {
129
+ "id": "dhcp_options",
130
+ "type": "textarea",
131
+ "label": "DHCP Options / Notes",
132
+ "help": "Option overrides: DNS servers, search domain, NTP, PXE (66/67), vendor options, etc."
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "id": "validation",
138
+ "title": "Validation / Attachments (manual fields)",
139
+ "fields": [
140
+ {
141
+ "id": "how_obtained_mac",
142
+ "type": "select",
143
+ "label": "How was the MAC obtained?",
144
+ "options": [
145
+ "Device label",
146
+ "Switch MAC table",
147
+ "DHCP logs",
148
+ "OS command output",
149
+ "Other"
150
+ ]
151
+ },
152
+ {
153
+ "id": "switch_port",
154
+ "type": "text",
155
+ "label": "Switch / Port (if known)",
156
+ "placeholder": "e.g., access-sw01 Gi1/0/24"
157
+ },
158
+ {
159
+ "id": "notes",
160
+ "type": "textarea",
161
+ "label": "Implementation Notes"
162
+ }
163
+ ]
164
+ }
165
+ ],
166
+ "actions": [
167
+ {
168
+ "id": "copy_reservation_summary",
169
+ "type": "copyBlock",
170
+ "label": "Copy Reservation Summary",
171
+ "template": "Manual DHCP Reservation\\nSite: {{site_name}} VRF: {{vrf_name}} VLAN: {{vlan_id}}\\nSubnet: {{subnet_prefix}}\\nDHCP Server: {{dhcp_server}}\\nMAC: {{mac_address}}\\nReserved IP: {{reserved_ip}}\\nDNS Update: {{dns_update}}\\nPort: {{switch_port}}\\nNeeded By: {{needed_by}}\\nTicket: {{ticket_id}}",
172
+ "successMessage": "Copied reservation summary"
173
+ }
174
+ ]
175
+ }