@ng-forge/dynamic-form-mcp 0.5.1
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.
- package/README.md +221 -0
- package/bin/ng-forge-mcp.d.ts +8 -0
- package/bin/ng-forge-mcp.d.ts.map +1 -0
- package/bin/ng-forge-mcp.js +10202 -0
- package/package.json +61 -0
- package/src/index.d.ts +14 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +10265 -0
- package/src/registry/api-reference.json +510 -0
- package/src/registry/docs.json +230 -0
- package/src/registry/examples.json +629 -0
- package/src/registry/field-types.json +490 -0
- package/src/registry/index.d.ts +110 -0
- package/src/registry/index.d.ts.map +1 -0
- package/src/registry/instructions.d.ts +8 -0
- package/src/registry/instructions.d.ts.map +1 -0
- package/src/registry/ui-adapters.json +225 -0
- package/src/registry/validators.json +158 -0
- package/src/resources/documentation.resource.d.ts +8 -0
- package/src/resources/documentation.resource.d.ts.map +1 -0
- package/src/resources/examples.resource.d.ts +8 -0
- package/src/resources/examples.resource.d.ts.map +1 -0
- package/src/resources/field-types.resource.d.ts +8 -0
- package/src/resources/field-types.resource.d.ts.map +1 -0
- package/src/resources/index.d.ts +11 -0
- package/src/resources/index.d.ts.map +1 -0
- package/src/resources/instructions.resource.d.ts +8 -0
- package/src/resources/instructions.resource.d.ts.map +1 -0
- package/src/resources/schemas.resource.d.ts +9 -0
- package/src/resources/schemas.resource.d.ts.map +1 -0
- package/src/resources/ui-adapters.resource.d.ts +8 -0
- package/src/resources/ui-adapters.resource.d.ts.map +1 -0
- package/src/resources/validators.resource.d.ts +8 -0
- package/src/resources/validators.resource.d.ts.map +1 -0
- package/src/server.d.ts +22 -0
- package/src/server.d.ts.map +1 -0
- package/src/tools/data/lookup-topics.d.ts +18 -0
- package/src/tools/data/lookup-topics.d.ts.map +1 -0
- package/src/tools/examples.tool.d.ts +12 -0
- package/src/tools/examples.tool.d.ts.map +1 -0
- package/src/tools/index.d.ts +33 -0
- package/src/tools/index.d.ts.map +1 -0
- package/src/tools/lookup.tool.d.ts +15 -0
- package/src/tools/lookup.tool.d.ts.map +1 -0
- package/src/tools/scaffold.tool.d.ts +11 -0
- package/src/tools/scaffold.tool.d.ts.map +1 -0
- package/src/tools/validate.tool.d.ts +14 -0
- package/src/tools/validate.tool.d.ts.map +1 -0
- package/src/utils/ast-extractor.d.ts +88 -0
- package/src/utils/ast-extractor.d.ts.map +1 -0
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "login-form",
|
|
4
|
+
"name": "Login Form",
|
|
5
|
+
"description": "Simple authentication form with email and password",
|
|
6
|
+
"category": "authentication",
|
|
7
|
+
"config": {
|
|
8
|
+
"defaultValidationMessages": {
|
|
9
|
+
"required": "This field is required",
|
|
10
|
+
"minLength": "Must be at least {{requiredLength}} characters"
|
|
11
|
+
},
|
|
12
|
+
"fields": [
|
|
13
|
+
{
|
|
14
|
+
"key": "title",
|
|
15
|
+
"type": "text",
|
|
16
|
+
"label": "Sign In",
|
|
17
|
+
"props": { "elementType": "h2" }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"key": "email",
|
|
21
|
+
"type": "input",
|
|
22
|
+
"label": "Email Address",
|
|
23
|
+
"required": true,
|
|
24
|
+
"email": true,
|
|
25
|
+
"validationMessages": { "email": "Please enter a valid email address" },
|
|
26
|
+
"props": { "type": "email", "placeholder": "your@email.com" }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "password",
|
|
30
|
+
"type": "input",
|
|
31
|
+
"label": "Password",
|
|
32
|
+
"required": true,
|
|
33
|
+
"minLength": 8,
|
|
34
|
+
"props": { "type": "password", "placeholder": "Enter your password" }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"key": "remember",
|
|
38
|
+
"type": "checkbox",
|
|
39
|
+
"label": "Remember me for 30 days"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"key": "submit",
|
|
43
|
+
"type": "submit",
|
|
44
|
+
"label": "Sign In",
|
|
45
|
+
"props": { "color": "primary" }
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "user-registration",
|
|
52
|
+
"name": "User Registration",
|
|
53
|
+
"description": "Complete registration form with personal info, country selection, and newsletter opt-in",
|
|
54
|
+
"category": "authentication",
|
|
55
|
+
"config": {
|
|
56
|
+
"fields": [
|
|
57
|
+
{
|
|
58
|
+
"key": "firstName",
|
|
59
|
+
"type": "input",
|
|
60
|
+
"label": "First Name",
|
|
61
|
+
"required": true,
|
|
62
|
+
"minLength": 2,
|
|
63
|
+
"validationMessages": {
|
|
64
|
+
"required": "First name is required",
|
|
65
|
+
"minLength": "Must be at least {{requiredLength}} characters"
|
|
66
|
+
},
|
|
67
|
+
"props": { "placeholder": "Enter your first name" }
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"key": "lastName",
|
|
71
|
+
"type": "input",
|
|
72
|
+
"label": "Last Name",
|
|
73
|
+
"required": true,
|
|
74
|
+
"minLength": 2,
|
|
75
|
+
"validationMessages": {
|
|
76
|
+
"required": "Last name is required",
|
|
77
|
+
"minLength": "Must be at least {{requiredLength}} characters"
|
|
78
|
+
},
|
|
79
|
+
"props": { "placeholder": "Enter your last name" }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"key": "email",
|
|
83
|
+
"type": "input",
|
|
84
|
+
"label": "Email Address",
|
|
85
|
+
"required": true,
|
|
86
|
+
"email": true,
|
|
87
|
+
"validationMessages": {
|
|
88
|
+
"required": "Email is required",
|
|
89
|
+
"email": "Please enter a valid email address"
|
|
90
|
+
},
|
|
91
|
+
"props": { "type": "email", "placeholder": "user@example.com" }
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"key": "age",
|
|
95
|
+
"type": "input",
|
|
96
|
+
"label": "Age",
|
|
97
|
+
"required": true,
|
|
98
|
+
"min": 18,
|
|
99
|
+
"max": 120,
|
|
100
|
+
"validationMessages": {
|
|
101
|
+
"required": "Age is required",
|
|
102
|
+
"min": "Must be at least {{min}}",
|
|
103
|
+
"max": "Must not exceed {{max}}"
|
|
104
|
+
},
|
|
105
|
+
"props": { "type": "number", "placeholder": "18" }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"key": "country",
|
|
109
|
+
"type": "select",
|
|
110
|
+
"label": "Country",
|
|
111
|
+
"required": true,
|
|
112
|
+
"validationMessages": { "required": "Please select a country" },
|
|
113
|
+
"options": [
|
|
114
|
+
{ "value": "us", "label": "United States" },
|
|
115
|
+
{ "value": "uk", "label": "United Kingdom" },
|
|
116
|
+
{ "value": "ca", "label": "Canada" },
|
|
117
|
+
{ "value": "au", "label": "Australia" },
|
|
118
|
+
{ "value": "de", "label": "Germany" }
|
|
119
|
+
],
|
|
120
|
+
"props": { "placeholder": "Select your country" }
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"key": "newsletter",
|
|
124
|
+
"type": "checkbox",
|
|
125
|
+
"label": "Subscribe to newsletter"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"key": "terms",
|
|
129
|
+
"type": "checkbox",
|
|
130
|
+
"label": "I agree to the terms and conditions",
|
|
131
|
+
"required": true,
|
|
132
|
+
"validationMessages": { "required": "You must accept the terms" }
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"key": "submit",
|
|
136
|
+
"type": "submit",
|
|
137
|
+
"label": "Create Account",
|
|
138
|
+
"props": { "color": "primary" }
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "contact-form",
|
|
145
|
+
"name": "Contact Form",
|
|
146
|
+
"description": "Basic contact form with name, email, and message",
|
|
147
|
+
"category": "contact",
|
|
148
|
+
"config": {
|
|
149
|
+
"defaultValidationMessages": {
|
|
150
|
+
"required": "This field is required"
|
|
151
|
+
},
|
|
152
|
+
"fields": [
|
|
153
|
+
{
|
|
154
|
+
"key": "nameRow",
|
|
155
|
+
"type": "row",
|
|
156
|
+
"fields": [
|
|
157
|
+
{
|
|
158
|
+
"key": "firstName",
|
|
159
|
+
"type": "input",
|
|
160
|
+
"label": "First Name",
|
|
161
|
+
"required": true,
|
|
162
|
+
"col": 6,
|
|
163
|
+
"props": { "placeholder": "Your first name" }
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"key": "lastName",
|
|
167
|
+
"type": "input",
|
|
168
|
+
"label": "Last Name",
|
|
169
|
+
"required": true,
|
|
170
|
+
"col": 6,
|
|
171
|
+
"props": { "placeholder": "Your last name" }
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"key": "email",
|
|
177
|
+
"type": "input",
|
|
178
|
+
"label": "Email Address",
|
|
179
|
+
"required": true,
|
|
180
|
+
"email": true,
|
|
181
|
+
"validationMessages": { "email": "Please enter a valid email" },
|
|
182
|
+
"props": { "type": "email", "placeholder": "email@example.com" }
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"key": "subject",
|
|
186
|
+
"type": "select",
|
|
187
|
+
"label": "Subject",
|
|
188
|
+
"required": true,
|
|
189
|
+
"options": [
|
|
190
|
+
{ "value": "general", "label": "General Inquiry" },
|
|
191
|
+
{ "value": "support", "label": "Technical Support" },
|
|
192
|
+
{ "value": "billing", "label": "Billing Question" },
|
|
193
|
+
{ "value": "feedback", "label": "Feedback" }
|
|
194
|
+
],
|
|
195
|
+
"props": { "placeholder": "Select a subject" }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"key": "message",
|
|
199
|
+
"type": "textarea",
|
|
200
|
+
"label": "Message",
|
|
201
|
+
"required": true,
|
|
202
|
+
"minLength": 10,
|
|
203
|
+
"maxLength": 1000,
|
|
204
|
+
"validationMessages": {
|
|
205
|
+
"minLength": "Message must be at least {{requiredLength}} characters",
|
|
206
|
+
"maxLength": "Message cannot exceed {{requiredLength}} characters"
|
|
207
|
+
},
|
|
208
|
+
"props": { "rows": 5, "placeholder": "How can we help you?" }
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"key": "submit",
|
|
212
|
+
"type": "submit",
|
|
213
|
+
"label": "Send Message",
|
|
214
|
+
"props": { "color": "primary" }
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "address-form",
|
|
221
|
+
"name": "Address Form with Group",
|
|
222
|
+
"description": "Form demonstrating nested object structure using group fields",
|
|
223
|
+
"category": "data-entry",
|
|
224
|
+
"config": {
|
|
225
|
+
"defaultValidationMessages": {
|
|
226
|
+
"required": "This field is required"
|
|
227
|
+
},
|
|
228
|
+
"fields": [
|
|
229
|
+
{
|
|
230
|
+
"key": "name",
|
|
231
|
+
"type": "input",
|
|
232
|
+
"label": "Full Name",
|
|
233
|
+
"required": true
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"key": "email",
|
|
237
|
+
"type": "input",
|
|
238
|
+
"label": "Email",
|
|
239
|
+
"required": true,
|
|
240
|
+
"email": true,
|
|
241
|
+
"props": { "type": "email" }
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"key": "addressTitle",
|
|
245
|
+
"type": "text",
|
|
246
|
+
"label": "Shipping Address",
|
|
247
|
+
"props": { "elementType": "h4" }
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"key": "address",
|
|
251
|
+
"type": "group",
|
|
252
|
+
"fields": [
|
|
253
|
+
{
|
|
254
|
+
"key": "street",
|
|
255
|
+
"type": "input",
|
|
256
|
+
"label": "Street Address",
|
|
257
|
+
"required": true
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"key": "cityStateRow",
|
|
261
|
+
"type": "row",
|
|
262
|
+
"fields": [
|
|
263
|
+
{ "key": "city", "type": "input", "label": "City", "required": true, "col": 6 },
|
|
264
|
+
{ "key": "state", "type": "input", "label": "State", "required": true, "col": 3 },
|
|
265
|
+
{
|
|
266
|
+
"key": "zip",
|
|
267
|
+
"type": "input",
|
|
268
|
+
"label": "ZIP",
|
|
269
|
+
"required": true,
|
|
270
|
+
"col": 3,
|
|
271
|
+
"pattern": "^\\d{5}$",
|
|
272
|
+
"validationMessages": { "pattern": "ZIP must be 5 digits" }
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"key": "country",
|
|
278
|
+
"type": "select",
|
|
279
|
+
"label": "Country",
|
|
280
|
+
"required": true,
|
|
281
|
+
"options": [
|
|
282
|
+
{ "value": "us", "label": "United States" },
|
|
283
|
+
{ "value": "ca", "label": "Canada" }
|
|
284
|
+
]
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"key": "submit",
|
|
290
|
+
"type": "submit",
|
|
291
|
+
"label": "Save Address"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"id": "wizard-form",
|
|
298
|
+
"name": "Multi-Step Wizard",
|
|
299
|
+
"description": "Multi-page form with navigation between steps",
|
|
300
|
+
"category": "wizard",
|
|
301
|
+
"config": {
|
|
302
|
+
"defaultValidationMessages": {
|
|
303
|
+
"required": "This field is required"
|
|
304
|
+
},
|
|
305
|
+
"fields": [
|
|
306
|
+
{
|
|
307
|
+
"key": "step1",
|
|
308
|
+
"type": "page",
|
|
309
|
+
"fields": [
|
|
310
|
+
{
|
|
311
|
+
"key": "stepTitle1",
|
|
312
|
+
"type": "text",
|
|
313
|
+
"label": "Step 1: Personal Information",
|
|
314
|
+
"props": { "elementType": "h3" }
|
|
315
|
+
},
|
|
316
|
+
{ "key": "firstName", "type": "input", "label": "First Name", "required": true },
|
|
317
|
+
{ "key": "lastName", "type": "input", "label": "Last Name", "required": true },
|
|
318
|
+
{ "key": "email", "type": "input", "label": "Email", "required": true, "email": true, "props": { "type": "email" } },
|
|
319
|
+
{ "key": "next1", "type": "next", "label": "Continue" }
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"key": "step2",
|
|
324
|
+
"type": "page",
|
|
325
|
+
"fields": [
|
|
326
|
+
{
|
|
327
|
+
"key": "stepTitle2",
|
|
328
|
+
"type": "text",
|
|
329
|
+
"label": "Step 2: Address",
|
|
330
|
+
"props": { "elementType": "h3" }
|
|
331
|
+
},
|
|
332
|
+
{ "key": "street", "type": "input", "label": "Street Address", "required": true },
|
|
333
|
+
{ "key": "city", "type": "input", "label": "City", "required": true },
|
|
334
|
+
{ "key": "state", "type": "input", "label": "State", "required": true },
|
|
335
|
+
{
|
|
336
|
+
"key": "navRow2",
|
|
337
|
+
"type": "row",
|
|
338
|
+
"fields": [
|
|
339
|
+
{ "key": "prev2", "type": "previous", "label": "Back", "col": 6 },
|
|
340
|
+
{ "key": "next2", "type": "next", "label": "Continue", "col": 6 }
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"key": "step3",
|
|
347
|
+
"type": "page",
|
|
348
|
+
"fields": [
|
|
349
|
+
{
|
|
350
|
+
"key": "stepTitle3",
|
|
351
|
+
"type": "text",
|
|
352
|
+
"label": "Step 3: Review & Submit",
|
|
353
|
+
"props": { "elementType": "h3" }
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"key": "confirm",
|
|
357
|
+
"type": "checkbox",
|
|
358
|
+
"label": "I confirm all information is correct",
|
|
359
|
+
"required": true,
|
|
360
|
+
"validationMessages": { "required": "Please confirm before submitting" }
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"key": "navRow3",
|
|
364
|
+
"type": "row",
|
|
365
|
+
"fields": [
|
|
366
|
+
{ "key": "prev3", "type": "previous", "label": "Back", "col": 6 },
|
|
367
|
+
{ "key": "submit", "type": "submit", "label": "Submit", "col": 6 }
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"id": "conditional-form",
|
|
377
|
+
"name": "Conditional Fields",
|
|
378
|
+
"description": "Form with fields that show/hide based on other field values",
|
|
379
|
+
"category": "advanced",
|
|
380
|
+
"config": {
|
|
381
|
+
"fields": [
|
|
382
|
+
{
|
|
383
|
+
"key": "accountType",
|
|
384
|
+
"type": "radio",
|
|
385
|
+
"label": "Account Type",
|
|
386
|
+
"required": true,
|
|
387
|
+
"options": [
|
|
388
|
+
{ "value": "personal", "label": "Personal" },
|
|
389
|
+
{ "value": "business", "label": "Business" }
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"key": "businessName",
|
|
394
|
+
"type": "input",
|
|
395
|
+
"label": "Business Name",
|
|
396
|
+
"logic": [
|
|
397
|
+
{
|
|
398
|
+
"type": "hidden",
|
|
399
|
+
"condition": {
|
|
400
|
+
"type": "fieldValue",
|
|
401
|
+
"fieldPath": "accountType",
|
|
402
|
+
"operator": "notEquals",
|
|
403
|
+
"value": "business"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"type": "required",
|
|
408
|
+
"condition": {
|
|
409
|
+
"type": "fieldValue",
|
|
410
|
+
"fieldPath": "accountType",
|
|
411
|
+
"operator": "equals",
|
|
412
|
+
"value": "business"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"validationMessages": { "required": "Business name is required" }
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"key": "taxId",
|
|
420
|
+
"type": "input",
|
|
421
|
+
"label": "Tax ID",
|
|
422
|
+
"logic": [
|
|
423
|
+
{
|
|
424
|
+
"type": "hidden",
|
|
425
|
+
"condition": {
|
|
426
|
+
"type": "fieldValue",
|
|
427
|
+
"fieldPath": "accountType",
|
|
428
|
+
"operator": "notEquals",
|
|
429
|
+
"value": "business"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"props": { "placeholder": "XX-XXXXXXX" }
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"key": "newsletter",
|
|
437
|
+
"type": "checkbox",
|
|
438
|
+
"label": "Subscribe to newsletter"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"key": "frequency",
|
|
442
|
+
"type": "select",
|
|
443
|
+
"label": "Email Frequency",
|
|
444
|
+
"options": [
|
|
445
|
+
{ "value": "daily", "label": "Daily" },
|
|
446
|
+
{ "value": "weekly", "label": "Weekly" },
|
|
447
|
+
{ "value": "monthly", "label": "Monthly" }
|
|
448
|
+
],
|
|
449
|
+
"logic": [
|
|
450
|
+
{
|
|
451
|
+
"type": "hidden",
|
|
452
|
+
"condition": {
|
|
453
|
+
"type": "fieldValue",
|
|
454
|
+
"fieldPath": "newsletter",
|
|
455
|
+
"operator": "notEquals",
|
|
456
|
+
"value": true
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"key": "submit",
|
|
463
|
+
"type": "submit",
|
|
464
|
+
"label": "Continue"
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"id": "emergency-contacts",
|
|
471
|
+
"name": "Dynamic Array Form",
|
|
472
|
+
"description": "Form with repeatable contact entries using array fields",
|
|
473
|
+
"category": "advanced",
|
|
474
|
+
"config": {
|
|
475
|
+
"defaultValidationMessages": {
|
|
476
|
+
"required": "This field is required"
|
|
477
|
+
},
|
|
478
|
+
"fields": [
|
|
479
|
+
{
|
|
480
|
+
"key": "name",
|
|
481
|
+
"type": "input",
|
|
482
|
+
"label": "Your Name",
|
|
483
|
+
"required": true
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"key": "contactsTitle",
|
|
487
|
+
"type": "text",
|
|
488
|
+
"label": "Emergency Contacts",
|
|
489
|
+
"props": { "elementType": "h4" }
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"key": "contacts",
|
|
493
|
+
"type": "array",
|
|
494
|
+
"label": "Contacts",
|
|
495
|
+
"fields": [
|
|
496
|
+
{
|
|
497
|
+
"key": "contact",
|
|
498
|
+
"type": "group",
|
|
499
|
+
"fields": [
|
|
500
|
+
{
|
|
501
|
+
"key": "contactRow",
|
|
502
|
+
"type": "row",
|
|
503
|
+
"fields": [
|
|
504
|
+
{ "key": "name", "type": "input", "label": "Contact Name", "required": true, "col": 4 },
|
|
505
|
+
{ "key": "phone", "type": "input", "label": "Phone", "required": true, "col": 4, "props": { "type": "tel" } },
|
|
506
|
+
{
|
|
507
|
+
"key": "relationship",
|
|
508
|
+
"type": "select",
|
|
509
|
+
"label": "Relationship",
|
|
510
|
+
"col": 4,
|
|
511
|
+
"options": [
|
|
512
|
+
{ "value": "spouse", "label": "Spouse" },
|
|
513
|
+
{ "value": "parent", "label": "Parent" },
|
|
514
|
+
{ "value": "sibling", "label": "Sibling" },
|
|
515
|
+
{ "value": "friend", "label": "Friend" },
|
|
516
|
+
{ "value": "other", "label": "Other" }
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"key": "submit",
|
|
527
|
+
"type": "submit",
|
|
528
|
+
"label": "Save Contacts"
|
|
529
|
+
}
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"id": "survey-form",
|
|
535
|
+
"name": "Survey/Feedback Form",
|
|
536
|
+
"description": "Form with rating slider, radio options, and optional comments",
|
|
537
|
+
"category": "feedback",
|
|
538
|
+
"config": {
|
|
539
|
+
"fields": [
|
|
540
|
+
{
|
|
541
|
+
"key": "title",
|
|
542
|
+
"type": "text",
|
|
543
|
+
"label": "Customer Feedback",
|
|
544
|
+
"props": { "elementType": "h2" }
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"key": "satisfaction",
|
|
548
|
+
"type": "slider",
|
|
549
|
+
"label": "Overall Satisfaction (1-10)",
|
|
550
|
+
"required": true,
|
|
551
|
+
"props": { "min": 1, "max": 10, "step": 1 },
|
|
552
|
+
"validationMessages": { "required": "Please rate your satisfaction" }
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"key": "recommend",
|
|
556
|
+
"type": "radio",
|
|
557
|
+
"label": "Would you recommend us?",
|
|
558
|
+
"required": true,
|
|
559
|
+
"options": [
|
|
560
|
+
{ "value": "yes", "label": "Yes, definitely" },
|
|
561
|
+
{ "value": "maybe", "label": "Maybe" },
|
|
562
|
+
{ "value": "no", "label": "No" }
|
|
563
|
+
],
|
|
564
|
+
"validationMessages": { "required": "Please select an option" }
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"key": "improvements",
|
|
568
|
+
"type": "select",
|
|
569
|
+
"label": "What could we improve?",
|
|
570
|
+
"props": { "multiple": true, "placeholder": "Select all that apply" },
|
|
571
|
+
"options": [
|
|
572
|
+
{ "value": "speed", "label": "Response Time" },
|
|
573
|
+
{ "value": "quality", "label": "Product Quality" },
|
|
574
|
+
{ "value": "price", "label": "Pricing" },
|
|
575
|
+
{ "value": "support", "label": "Customer Support" },
|
|
576
|
+
{ "value": "ui", "label": "User Interface" }
|
|
577
|
+
]
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"key": "comments",
|
|
581
|
+
"type": "textarea",
|
|
582
|
+
"label": "Additional Comments",
|
|
583
|
+
"props": { "rows": 4, "placeholder": "Share any additional feedback..." }
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"key": "followUp",
|
|
587
|
+
"type": "toggle",
|
|
588
|
+
"label": "May we contact you for follow-up?"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"key": "email",
|
|
592
|
+
"type": "input",
|
|
593
|
+
"label": "Email Address",
|
|
594
|
+
"email": true,
|
|
595
|
+
"props": { "type": "email", "placeholder": "your@email.com" },
|
|
596
|
+
"logic": [
|
|
597
|
+
{
|
|
598
|
+
"type": "hidden",
|
|
599
|
+
"condition": {
|
|
600
|
+
"type": "fieldValue",
|
|
601
|
+
"fieldPath": "followUp",
|
|
602
|
+
"operator": "notEquals",
|
|
603
|
+
"value": true
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"type": "required",
|
|
608
|
+
"condition": {
|
|
609
|
+
"type": "fieldValue",
|
|
610
|
+
"fieldPath": "followUp",
|
|
611
|
+
"operator": "equals",
|
|
612
|
+
"value": true
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"validationMessages": {
|
|
617
|
+
"required": "Email required for follow-up",
|
|
618
|
+
"email": "Please enter a valid email"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"key": "submit",
|
|
623
|
+
"type": "submit",
|
|
624
|
+
"label": "Submit Feedback"
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
]
|