@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,127 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "maint_facility_issue_report",
4
+ "title": "Maintenance - Facility Issue Report",
5
+ "description": "Report an issue in a building or facility area.",
6
+ "sections": [
7
+ {
8
+ "id": "reporter",
9
+ "title": "Reporter",
10
+ "fields": [
11
+ {
12
+ "id": "name",
13
+ "type": "text",
14
+ "label": "Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "email",
19
+ "type": "text",
20
+ "label": "Email",
21
+ "validate": "email"
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "type": "text",
26
+ "label": "Phone",
27
+ "validate": "phone"
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "location",
33
+ "title": "Location",
34
+ "fields": [
35
+ {
36
+ "id": "building",
37
+ "type": "text",
38
+ "label": "Building",
39
+ "required": true
40
+ },
41
+ {
42
+ "id": "floor",
43
+ "type": "text",
44
+ "label": "Floor"
45
+ },
46
+ {
47
+ "id": "area",
48
+ "type": "text",
49
+ "label": "Area/Room",
50
+ "required": true
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "id": "issue",
56
+ "title": "Issue",
57
+ "fields": [
58
+ {
59
+ "id": "issue_type",
60
+ "type": "select",
61
+ "label": "Issue Type",
62
+ "required": true,
63
+ "options": [
64
+ {
65
+ "value": "",
66
+ "text": "Select..."
67
+ },
68
+ {
69
+ "value": "leak",
70
+ "text": "Leak"
71
+ },
72
+ {
73
+ "value": "power",
74
+ "text": "Power"
75
+ },
76
+ {
77
+ "value": "hvac",
78
+ "text": "HVAC"
79
+ },
80
+ {
81
+ "value": "safety",
82
+ "text": "Safety"
83
+ },
84
+ {
85
+ "value": "other",
86
+ "text": "Other"
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "id": "severity",
92
+ "type": "radio",
93
+ "label": "Severity",
94
+ "required": true,
95
+ "options": [
96
+ {
97
+ "value": "minor",
98
+ "text": "Minor"
99
+ },
100
+ {
101
+ "value": "major",
102
+ "text": "Major"
103
+ },
104
+ {
105
+ "value": "critical",
106
+ "text": "Critical"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "id": "details",
112
+ "type": "textarea",
113
+ "label": "Details",
114
+ "rows": 5,
115
+ "required": true
116
+ },
117
+ {
118
+ "id": "safe_to_use",
119
+ "type": "checkbox",
120
+ "label": "Area is safe to use",
121
+ "defaultValue": true
122
+ }
123
+ ]
124
+ }
125
+ ],
126
+ "actions": []
127
+ }
@@ -0,0 +1,174 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "incident_intake",
4
+ "title": "Incident Report Intake Form",
5
+ "description": "Report a security incident, system outage, or other critical event",
6
+ "sections": [
7
+ {
8
+ "id": "incident",
9
+ "title": "Incident Details",
10
+ "fields": [
11
+ {
12
+ "id": "incidentType",
13
+ "label": "Incident Type",
14
+ "type": "select",
15
+ "required": true,
16
+ "options": [
17
+ { "value": "", "text": "Select type..." },
18
+ { "value": "security", "text": "Security Breach" },
19
+ { "value": "outage", "text": "System Outage" },
20
+ { "value": "data_loss", "text": "Data Loss" },
21
+ { "value": "performance", "text": "Performance Issue" },
22
+ { "value": "other", "text": "Other" }
23
+ ]
24
+ },
25
+ {
26
+ "id": "severity",
27
+ "label": "Severity Level",
28
+ "type": "radio",
29
+ "required": true,
30
+ "options": [
31
+ { "value": "low", "text": "Low - Minor impact" },
32
+ { "value": "medium", "text": "Medium - Moderate impact" },
33
+ { "value": "high", "text": "High - Significant impact" },
34
+ { "value": "critical", "text": "Critical - System down or data breach" }
35
+ ]
36
+ },
37
+ {
38
+ "id": "incidentDate",
39
+ "label": "Incident Date & Time",
40
+ "type": "text",
41
+ "inputType": "datetime-local",
42
+ "required": true
43
+ },
44
+ {
45
+ "id": "discoveredBy",
46
+ "label": "Discovered By",
47
+ "type": "text",
48
+ "required": true,
49
+ "placeholder": "Your name or team"
50
+ },
51
+ {
52
+ "id": "affectedSystems",
53
+ "label": "Affected Systems",
54
+ "type": "textarea",
55
+ "required": true,
56
+ "rows": 3,
57
+ "placeholder": "List all systems, services, or components affected"
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "id": "description",
63
+ "title": "Incident Description",
64
+ "fields": [
65
+ {
66
+ "id": "summary",
67
+ "label": "Brief Summary",
68
+ "type": "textarea",
69
+ "required": true,
70
+ "rows": 3,
71
+ "placeholder": "Provide a brief summary of what happened"
72
+ },
73
+ {
74
+ "id": "detailedDescription",
75
+ "label": "Detailed Description",
76
+ "type": "textarea",
77
+ "required": true,
78
+ "rows": 6,
79
+ "placeholder": "Provide detailed information about the incident, including timeline, symptoms, and any error messages"
80
+ },
81
+ {
82
+ "id": "impact",
83
+ "label": "Impact Assessment",
84
+ "type": "textarea",
85
+ "required": true,
86
+ "rows": 4,
87
+ "placeholder": "Describe the impact on operations, users, data, or business processes"
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "id": "response",
93
+ "title": "Initial Response",
94
+ "fields": [
95
+ {
96
+ "id": "actionsTaken",
97
+ "label": "Actions Taken",
98
+ "type": "textarea",
99
+ "required": true,
100
+ "rows": 4,
101
+ "placeholder": "Describe any immediate actions taken to contain or mitigate the incident"
102
+ },
103
+ {
104
+ "id": "isContained",
105
+ "label": "Incident Contained",
106
+ "type": "checkbox",
107
+ "defaultValue": false
108
+ },
109
+ {
110
+ "id": "estimatedResolution",
111
+ "label": "Estimated Resolution Time",
112
+ "type": "text",
113
+ "placeholder": "e.g., 2 hours, 1 day"
114
+ },
115
+ {
116
+ "id": "requiresEscalation",
117
+ "label": "Requires Escalation",
118
+ "type": "checkbox",
119
+ "defaultValue": false
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "id": "contact",
125
+ "title": "Contact Information",
126
+ "fields": [
127
+ {
128
+ "id": "reporterName",
129
+ "label": "Reporter Name",
130
+ "type": "text",
131
+ "required": true
132
+ },
133
+ {
134
+ "id": "reporterEmail",
135
+ "label": "Reporter Email",
136
+ "type": "text",
137
+ "inputType": "email",
138
+ "required": true,
139
+ "validate": "email"
140
+ },
141
+ {
142
+ "id": "reporterPhone",
143
+ "label": "Reporter Phone",
144
+ "type": "text",
145
+ "validate": "phone",
146
+ "placeholder": "+1 (555) 123-4567"
147
+ },
148
+ {
149
+ "id": "department",
150
+ "label": "Department",
151
+ "type": "select",
152
+ "options": [
153
+ { "value": "", "text": "Select department..." },
154
+ { "value": "it", "text": "IT" },
155
+ { "value": "security", "text": "Security" },
156
+ { "value": "operations", "text": "Operations" },
157
+ { "value": "support", "text": "Support" },
158
+ { "value": "other", "text": "Other" }
159
+ ]
160
+ }
161
+ ]
162
+ }
163
+ ],
164
+ "actions": [
165
+ {
166
+ "id": "copyIncident",
167
+ "type": "copyBlock",
168
+ "label": "Copy Incident Summary",
169
+ "template": "INCIDENT REPORT\n\nType: {{incidentType}}\nSeverity: {{severity}}\nDate: {{incidentDate}}\nDiscovered By: {{discoveredBy}}\n\nSummary:\n{{summary}}\n\nAffected Systems:\n{{affectedSystems}}\n\nImpact:\n{{impact}}\n\nActions Taken:\n{{actionsTaken}}\n\nReporter: {{reporterName}} ({{reporterEmail}})",
170
+ "successMessage": "Incident summary copied to clipboard"
171
+ }
172
+ ]
173
+ }
174
+
@@ -0,0 +1,79 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "maint_inventory_restock",
4
+ "title": "Maintenance - Inventory Restock Request",
5
+ "description": "Request consumables/parts restock for maintenance inventory.",
6
+ "sections": [
7
+ {
8
+ "id": "request",
9
+ "title": "Request",
10
+ "fields": [
11
+ {
12
+ "id": "request_date",
13
+ "type": "date",
14
+ "label": "Request Date",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "requested_by",
19
+ "type": "text",
20
+ "label": "Requested By",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "urgency",
25
+ "type": "select",
26
+ "label": "Urgency",
27
+ "required": true,
28
+ "options": [
29
+ {
30
+ "value": "",
31
+ "text": "Select..."
32
+ },
33
+ {
34
+ "value": "normal",
35
+ "text": "Normal"
36
+ },
37
+ {
38
+ "value": "rush",
39
+ "text": "Rush"
40
+ }
41
+ ]
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "id": "items",
47
+ "title": "Items",
48
+ "fields": [
49
+ {
50
+ "id": "items_needed",
51
+ "type": "keyvalue",
52
+ "label": "Items Needed (pairs)",
53
+ "help": "Use key=item and value=qty (e.g., gloves=4 boxes).",
54
+ "required": true,
55
+ "keyvalueMode": "pairs",
56
+ "pairs": [
57
+ {
58
+ "key": "gloves",
59
+ "value": "4 boxes"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "id": "budget_code",
65
+ "type": "text",
66
+ "label": "Budget/Cost Center",
67
+ "required": true
68
+ },
69
+ {
70
+ "id": "notes",
71
+ "type": "textarea",
72
+ "label": "Notes",
73
+ "rows": 3
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ "actions": []
79
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "maint_safety_audit",
4
+ "title": "Maintenance - Safety Audit",
5
+ "description": "Safety walk-through checklist and remediation tracking.",
6
+ "sections": [
7
+ {
8
+ "id": "audit",
9
+ "title": "Audit Info",
10
+ "fields": [
11
+ {
12
+ "id": "audit_date",
13
+ "type": "date",
14
+ "label": "Audit Date",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "auditor",
19
+ "type": "text",
20
+ "label": "Auditor",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "site",
25
+ "type": "text",
26
+ "label": "Site",
27
+ "required": true
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "checks",
33
+ "title": "Checklist",
34
+ "fields": [
35
+ {
36
+ "id": "ppe_available",
37
+ "type": "checkbox",
38
+ "label": "PPE available and in good condition",
39
+ "defaultValue": true
40
+ },
41
+ {
42
+ "id": "exits_clear",
43
+ "type": "checkbox",
44
+ "label": "Emergency exits clear",
45
+ "defaultValue": true
46
+ },
47
+ {
48
+ "id": "extinguishers_ok",
49
+ "type": "checkbox",
50
+ "label": "Fire extinguishers inspected",
51
+ "defaultValue": true
52
+ },
53
+ {
54
+ "id": "hazards_found",
55
+ "type": "radio",
56
+ "label": "Hazards Found?",
57
+ "required": true,
58
+ "options": [
59
+ {
60
+ "value": "no",
61
+ "text": "No"
62
+ },
63
+ {
64
+ "value": "yes",
65
+ "text": "Yes"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "id": "hazard_list",
71
+ "type": "keyvalue",
72
+ "label": "Hazards (delimiter)",
73
+ "help": "One per line: hazard=location (e.g., trip_hazard=Dock 2)",
74
+ "keyvalueMode": "delimiter",
75
+ "keyvalueDelimiter": "=",
76
+ "showIf": {
77
+ "field": "hazards_found",
78
+ "operator": "equals",
79
+ "value": "yes"
80
+ }
81
+ },
82
+ {
83
+ "id": "notes",
84
+ "type": "textarea",
85
+ "label": "Notes",
86
+ "rows": 4
87
+ }
88
+ ]
89
+ }
90
+ ],
91
+ "actions": []
92
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "maint_vehicle_inspection",
4
+ "title": "Maintenance - Vehicle Inspection",
5
+ "description": "Daily/weekly inspection form for fleet vehicles.",
6
+ "sections": [
7
+ {
8
+ "id": "vehicle",
9
+ "title": "Vehicle",
10
+ "fields": [
11
+ {
12
+ "id": "inspection_date",
13
+ "type": "date",
14
+ "label": "Inspection Date",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "vehicle_id",
19
+ "type": "text",
20
+ "label": "Vehicle ID",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "odometer",
25
+ "type": "number",
26
+ "label": "Odometer",
27
+ "min": 0,
28
+ "step": 1,
29
+ "required": true
30
+ },
31
+ {
32
+ "id": "inspector",
33
+ "type": "text",
34
+ "label": "Inspector Name",
35
+ "required": true
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "id": "checks",
41
+ "title": "Checks",
42
+ "fields": [
43
+ {
44
+ "id": "lights_ok",
45
+ "type": "checkbox",
46
+ "label": "Lights OK",
47
+ "defaultValue": true
48
+ },
49
+ {
50
+ "id": "tires_ok",
51
+ "type": "checkbox",
52
+ "label": "Tires OK",
53
+ "defaultValue": true
54
+ },
55
+ {
56
+ "id": "brakes_ok",
57
+ "type": "checkbox",
58
+ "label": "Brakes OK",
59
+ "defaultValue": true
60
+ },
61
+ {
62
+ "id": "fluids_ok",
63
+ "type": "checkbox",
64
+ "label": "Fluids OK",
65
+ "defaultValue": true
66
+ },
67
+ {
68
+ "id": "any_issues",
69
+ "type": "radio",
70
+ "label": "Any Issues Found?",
71
+ "required": true,
72
+ "options": [
73
+ {
74
+ "value": "no",
75
+ "text": "No"
76
+ },
77
+ {
78
+ "value": "yes",
79
+ "text": "Yes"
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "id": "issues_detail",
85
+ "type": "textarea",
86
+ "label": "Issues Detail",
87
+ "rows": 4,
88
+ "showIf": {
89
+ "field": "any_issues",
90
+ "operator": "equals",
91
+ "value": "yes"
92
+ }
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "id": "notes",
98
+ "title": "Notes",
99
+ "fields": [
100
+ {
101
+ "id": "parts_needed",
102
+ "type": "keyvalue",
103
+ "label": "Parts Needed (delimiter)",
104
+ "help": "One per line: part=qty (e.g., wiper_blade=2)",
105
+ "keyvalueMode": "delimiter",
106
+ "keyvalueDelimiter": "="
107
+ }
108
+ ]
109
+ }
110
+ ],
111
+ "actions": []
112
+ }