@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,166 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "job_application",
4
+ "title": "Job Application Form",
5
+ "description": "Please complete all required fields to submit your application.",
6
+ "sections": [
7
+ {
8
+ "id": "personal",
9
+ "title": "Personal Information",
10
+ "description": "Basic contact and identification details",
11
+ "fields": [
12
+ {
13
+ "id": "fullName",
14
+ "label": "Full Name",
15
+ "type": "text",
16
+ "required": true,
17
+ "placeholder": "John Doe",
18
+ "help": "Enter your legal name as it appears on official documents"
19
+ },
20
+ {
21
+ "id": "email",
22
+ "label": "Email Address",
23
+ "type": "text",
24
+ "inputType": "email",
25
+ "required": true,
26
+ "validate": "email",
27
+ "placeholder": "john.doe@example.com"
28
+ },
29
+ {
30
+ "id": "phone",
31
+ "label": "Phone Number",
32
+ "type": "text",
33
+ "required": true,
34
+ "validate": "phone",
35
+ "placeholder": "+1 (555) 123-4567",
36
+ "help": "Include country code if outside US"
37
+ },
38
+ {
39
+ "id": "address",
40
+ "label": "Street Address",
41
+ "type": "textarea",
42
+ "required": true,
43
+ "rows": 2,
44
+ "placeholder": "123 Main St, City, State ZIP"
45
+ },
46
+ {
47
+ "id": "dateOfBirth",
48
+ "label": "Date of Birth",
49
+ "type": "date",
50
+ "required": true
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "id": "position",
56
+ "title": "Position Details",
57
+ "fields": [
58
+ {
59
+ "id": "positionApplied",
60
+ "label": "Position Applied For",
61
+ "type": "select",
62
+ "required": true,
63
+ "options": [
64
+ { "value": "", "text": "Select a position..." },
65
+ { "value": "developer", "text": "Software Developer" },
66
+ { "value": "designer", "text": "UI/UX Designer" },
67
+ { "value": "manager", "text": "Project Manager" },
68
+ { "value": "analyst", "text": "Business Analyst" }
69
+ ]
70
+ },
71
+ {
72
+ "id": "startDate",
73
+ "label": "Available Start Date",
74
+ "type": "date",
75
+ "required": true
76
+ },
77
+ {
78
+ "id": "salaryExpectation",
79
+ "label": "Salary Expectation (USD)",
80
+ "type": "number",
81
+ "min": 0,
82
+ "step": 1000,
83
+ "placeholder": "50000"
84
+ },
85
+ {
86
+ "id": "remoteWork",
87
+ "label": "Open to Remote Work",
88
+ "type": "checkbox",
89
+ "defaultValue": false
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "id": "experience",
95
+ "title": "Work Experience",
96
+ "fields": [
97
+ {
98
+ "id": "yearsExperience",
99
+ "label": "Years of Experience",
100
+ "type": "number",
101
+ "required": true,
102
+ "min": 0,
103
+ "max": 50,
104
+ "step": 1
105
+ },
106
+ {
107
+ "id": "previousEmployer",
108
+ "label": "Previous Employer",
109
+ "type": "text",
110
+ "placeholder": "Company Name"
111
+ },
112
+ {
113
+ "id": "coverLetter",
114
+ "label": "Cover Letter",
115
+ "type": "textarea",
116
+ "required": true,
117
+ "rows": 6,
118
+ "placeholder": "Tell us why you're interested in this position..."
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "id": "references",
124
+ "title": "References",
125
+ "description": "Optional: Provide professional references",
126
+ "fields": [
127
+ {
128
+ "id": "hasReferences",
129
+ "label": "I have references to provide",
130
+ "type": "checkbox",
131
+ "defaultValue": false
132
+ },
133
+ {
134
+ "id": "referenceName",
135
+ "label": "Reference Name",
136
+ "type": "text",
137
+ "showIf": {
138
+ "field": "hasReferences",
139
+ "operator": "equals",
140
+ "value": true
141
+ }
142
+ },
143
+ {
144
+ "id": "referenceContact",
145
+ "label": "Reference Contact",
146
+ "type": "text",
147
+ "showIf": {
148
+ "field": "hasReferences",
149
+ "operator": "equals",
150
+ "value": true
151
+ }
152
+ }
153
+ ]
154
+ }
155
+ ],
156
+ "actions": [
157
+ {
158
+ "id": "copyEmail",
159
+ "type": "copyBlock",
160
+ "label": "Copy Email Template",
161
+ "template": "Subject: Application for {{positionApplied}}\n\nDear Hiring Manager,\n\nI am writing to apply for the {{positionApplied}} position. My name is {{fullName}} and I have {{yearsExperience}} years of experience.\n\nBest regards,\n{{fullName}}",
162
+ "successMessage": "Email template copied to clipboard"
163
+ }
164
+ ]
165
+ }
166
+
@@ -0,0 +1,140 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "hr_onboarding_request",
4
+ "title": "HR - New Hire Onboarding Request",
5
+ "description": "Request onboarding for a new employee or contractor.",
6
+ "sections": [
7
+ {
8
+ "id": "hire",
9
+ "title": "New Hire",
10
+ "fields": [
11
+ {
12
+ "id": "full_name",
13
+ "type": "text",
14
+ "label": "Full Name",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "start_date",
19
+ "type": "date",
20
+ "label": "Start Date",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "employment_type",
25
+ "type": "radio",
26
+ "label": "Employment Type",
27
+ "required": true,
28
+ "options": [
29
+ {
30
+ "value": "employee",
31
+ "text": "Employee"
32
+ },
33
+ {
34
+ "value": "contractor",
35
+ "text": "Contractor"
36
+ },
37
+ {
38
+ "value": "intern",
39
+ "text": "Intern"
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "id": "manager",
45
+ "type": "text",
46
+ "label": "Manager",
47
+ "required": true
48
+ },
49
+ {
50
+ "id": "work_email",
51
+ "type": "text",
52
+ "label": "Work Email (if known)",
53
+ "validate": "email"
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "id": "job",
59
+ "title": "Job Details",
60
+ "fields": [
61
+ {
62
+ "id": "job_title",
63
+ "type": "text",
64
+ "label": "Job Title",
65
+ "required": true
66
+ },
67
+ {
68
+ "id": "department",
69
+ "type": "select",
70
+ "label": "Department",
71
+ "required": true,
72
+ "options": [
73
+ {
74
+ "value": "",
75
+ "text": "Select..."
76
+ },
77
+ {
78
+ "value": "it",
79
+ "text": "IT"
80
+ },
81
+ {
82
+ "value": "finance",
83
+ "text": "Finance"
84
+ },
85
+ {
86
+ "value": "hr",
87
+ "text": "HR"
88
+ },
89
+ {
90
+ "value": "ops",
91
+ "text": "Operations"
92
+ },
93
+ {
94
+ "value": "sales",
95
+ "text": "Sales"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "id": "location",
101
+ "type": "text",
102
+ "label": "Work Location",
103
+ "required": true
104
+ },
105
+ {
106
+ "id": "equipment_needed",
107
+ "type": "checkbox",
108
+ "label": "Needs equipment setup",
109
+ "defaultValue": true
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "id": "notes",
115
+ "title": "Notes",
116
+ "fields": [
117
+ {
118
+ "id": "accounts",
119
+ "type": "keyvalue",
120
+ "label": "Accounts Needed (pairs)",
121
+ "help": "Example: system=role (e.g., payroll=user)",
122
+ "keyvalueMode": "pairs",
123
+ "pairs": [
124
+ {
125
+ "key": "payroll",
126
+ "value": "user"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "id": "comments",
132
+ "type": "textarea",
133
+ "label": "Comments",
134
+ "rows": 4
135
+ }
136
+ ]
137
+ }
138
+ ],
139
+ "actions": []
140
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "hr_time_off_request",
4
+ "title": "HR - Time Off Request",
5
+ "description": "Request PTO/leave and track approvals.",
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": "employee_email",
19
+ "type": "text",
20
+ "label": "Employee Email",
21
+ "validate": "email",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "manager_email",
26
+ "type": "text",
27
+ "label": "Manager Email",
28
+ "validate": "email",
29
+ "required": true
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "id": "request",
35
+ "title": "Request",
36
+ "fields": [
37
+ {
38
+ "id": "leave_type",
39
+ "type": "select",
40
+ "label": "Leave Type",
41
+ "required": true,
42
+ "options": [
43
+ {
44
+ "value": "",
45
+ "text": "Select..."
46
+ },
47
+ {
48
+ "value": "pto",
49
+ "text": "PTO"
50
+ },
51
+ {
52
+ "value": "sick",
53
+ "text": "Sick"
54
+ },
55
+ {
56
+ "value": "bereavement",
57
+ "text": "Bereavement"
58
+ },
59
+ {
60
+ "value": "unpaid",
61
+ "text": "Unpaid"
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "id": "start_date",
67
+ "type": "date",
68
+ "label": "Start Date",
69
+ "required": true
70
+ },
71
+ {
72
+ "id": "end_date",
73
+ "type": "date",
74
+ "label": "End Date",
75
+ "required": true
76
+ },
77
+ {
78
+ "id": "days_requested",
79
+ "type": "number",
80
+ "label": "Days Requested",
81
+ "min": 0.5,
82
+ "step": 0.5,
83
+ "required": true
84
+ },
85
+ {
86
+ "id": "handoff_notes",
87
+ "type": "textarea",
88
+ "label": "Handoff Notes",
89
+ "rows": 3
90
+ }
91
+ ]
92
+ }
93
+ ],
94
+ "actions": []
95
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "hr_training_request",
4
+ "title": "HR - Training Request",
5
+ "description": "Request professional training and track approval.",
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": "employee_email",
19
+ "type": "text",
20
+ "label": "Email",
21
+ "validate": "email",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "manager_name",
26
+ "type": "text",
27
+ "label": "Manager",
28
+ "required": true
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "id": "training",
34
+ "title": "Training",
35
+ "fields": [
36
+ {
37
+ "id": "course_name",
38
+ "type": "text",
39
+ "label": "Course Name",
40
+ "required": true
41
+ },
42
+ {
43
+ "id": "provider",
44
+ "type": "text",
45
+ "label": "Provider"
46
+ },
47
+ {
48
+ "id": "start_date",
49
+ "type": "date",
50
+ "label": "Start Date"
51
+ },
52
+ {
53
+ "id": "cost",
54
+ "type": "number",
55
+ "label": "Cost (USD)",
56
+ "min": 0,
57
+ "step": 0.01
58
+ },
59
+ {
60
+ "id": "business_case",
61
+ "type": "textarea",
62
+ "label": "Business Case",
63
+ "rows": 4,
64
+ "required": true
65
+ }
66
+ ]
67
+ }
68
+ ],
69
+ "actions": []
70
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "health_appointment_request",
4
+ "title": "Healthcare - Appointment Request",
5
+ "description": "Request an appointment and preferred schedule.",
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": "phone",
19
+ "type": "text",
20
+ "label": "Phone",
21
+ "validate": "phone",
22
+ "required": true
23
+ },
24
+ {
25
+ "id": "email",
26
+ "type": "text",
27
+ "label": "Email",
28
+ "validate": "email"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "id": "request",
34
+ "title": "Request",
35
+ "fields": [
36
+ {
37
+ "id": "preferred_date",
38
+ "type": "date",
39
+ "label": "Preferred Date"
40
+ },
41
+ {
42
+ "id": "preferred_time",
43
+ "type": "select",
44
+ "label": "Preferred Time",
45
+ "options": [
46
+ {
47
+ "value": "",
48
+ "text": "Select..."
49
+ },
50
+ {
51
+ "value": "morning",
52
+ "text": "Morning"
53
+ },
54
+ {
55
+ "value": "afternoon",
56
+ "text": "Afternoon"
57
+ },
58
+ {
59
+ "value": "evening",
60
+ "text": "Evening"
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "id": "service",
66
+ "type": "select",
67
+ "label": "Service",
68
+ "required": true,
69
+ "options": [
70
+ {
71
+ "value": "",
72
+ "text": "Select..."
73
+ },
74
+ {
75
+ "value": "primary",
76
+ "text": "Primary care"
77
+ },
78
+ {
79
+ "value": "lab",
80
+ "text": "Lab"
81
+ },
82
+ {
83
+ "value": "imaging",
84
+ "text": "Imaging"
85
+ },
86
+ {
87
+ "value": "specialist",
88
+ "text": "Specialist"
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "id": "reason",
94
+ "type": "textarea",
95
+ "label": "Reason for Visit",
96
+ "rows": 4,
97
+ "required": true
98
+ }
99
+ ]
100
+ }
101
+ ],
102
+ "actions": []
103
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "formId": "health_incident_report",
4
+ "title": "Healthcare - Incident Report",
5
+ "description": "Report an incident for follow-up and documentation.",
6
+ "sections": [
7
+ {
8
+ "id": "report",
9
+ "title": "Report",
10
+ "fields": [
11
+ {
12
+ "id": "report_date",
13
+ "type": "date",
14
+ "label": "Report Date",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "reporter_name",
19
+ "type": "text",
20
+ "label": "Reporter Name",
21
+ "required": true
22
+ },
23
+ {
24
+ "id": "location",
25
+ "type": "text",
26
+ "label": "Location",
27
+ "required": true
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "incident",
33
+ "title": "Incident",
34
+ "fields": [
35
+ {
36
+ "id": "severity",
37
+ "type": "radio",
38
+ "label": "Severity",
39
+ "required": true,
40
+ "options": [
41
+ {
42
+ "value": "low",
43
+ "text": "Low"
44
+ },
45
+ {
46
+ "value": "medium",
47
+ "text": "Medium"
48
+ },
49
+ {
50
+ "value": "high",
51
+ "text": "High"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "id": "description",
57
+ "type": "textarea",
58
+ "label": "Description",
59
+ "rows": 5,
60
+ "required": true
61
+ },
62
+ {
63
+ "id": "requires_followup",
64
+ "type": "checkbox",
65
+ "label": "Requires follow-up",
66
+ "defaultValue": true
67
+ },
68
+ {
69
+ "id": "followup_owner",
70
+ "type": "text",
71
+ "label": "Follow-up Owner",
72
+ "showIf": {
73
+ "field": "requires_followup",
74
+ "operator": "equals",
75
+ "value": true
76
+ }
77
+ }
78
+ ]
79
+ }
80
+ ],
81
+ "actions": []
82
+ }