@ng-forge/dynamic-form-mcp 0.7.0 → 0.8.0-next.2

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.
@@ -14,7 +14,9 @@
14
14
  "key": "title",
15
15
  "type": "text",
16
16
  "label": "Sign In",
17
- "props": { "elementType": "h2" }
17
+ "props": {
18
+ "elementType": "h2"
19
+ }
18
20
  },
19
21
  {
20
22
  "key": "email",
@@ -22,8 +24,13 @@
22
24
  "label": "Email Address",
23
25
  "required": true,
24
26
  "email": true,
25
- "validationMessages": { "email": "Please enter a valid email address" },
26
- "props": { "type": "email", "placeholder": "your@email.com" }
27
+ "validationMessages": {
28
+ "email": "Please enter a valid email address"
29
+ },
30
+ "props": {
31
+ "type": "email"
32
+ },
33
+ "placeholder": "your@email.com"
27
34
  },
28
35
  {
29
36
  "key": "password",
@@ -31,7 +38,10 @@
31
38
  "label": "Password",
32
39
  "required": true,
33
40
  "minLength": 8,
34
- "props": { "type": "password", "placeholder": "Enter your password" }
41
+ "props": {
42
+ "type": "password"
43
+ },
44
+ "placeholder": "Enter your password"
35
45
  },
36
46
  {
37
47
  "key": "remember",
@@ -42,7 +52,9 @@
42
52
  "key": "submit",
43
53
  "type": "submit",
44
54
  "label": "Sign In",
45
- "props": { "color": "primary" }
55
+ "props": {
56
+ "color": "primary"
57
+ }
46
58
  }
47
59
  ]
48
60
  }
@@ -64,7 +76,7 @@
64
76
  "required": "First name is required",
65
77
  "minLength": "Must be at least {{requiredLength}} characters"
66
78
  },
67
- "props": { "placeholder": "Enter your first name" }
79
+ "placeholder": "Enter your first name"
68
80
  },
69
81
  {
70
82
  "key": "lastName",
@@ -76,7 +88,7 @@
76
88
  "required": "Last name is required",
77
89
  "minLength": "Must be at least {{requiredLength}} characters"
78
90
  },
79
- "props": { "placeholder": "Enter your last name" }
91
+ "placeholder": "Enter your last name"
80
92
  },
81
93
  {
82
94
  "key": "email",
@@ -88,7 +100,10 @@
88
100
  "required": "Email is required",
89
101
  "email": "Please enter a valid email address"
90
102
  },
91
- "props": { "type": "email", "placeholder": "user@example.com" }
103
+ "props": {
104
+ "type": "email"
105
+ },
106
+ "placeholder": "user@example.com"
92
107
  },
93
108
  {
94
109
  "key": "age",
@@ -102,22 +117,42 @@
102
117
  "min": "Must be at least {{min}}",
103
118
  "max": "Must not exceed {{max}}"
104
119
  },
105
- "props": { "type": "number", "placeholder": "18" }
120
+ "props": {
121
+ "type": "number"
122
+ },
123
+ "placeholder": "18"
106
124
  },
107
125
  {
108
126
  "key": "country",
109
127
  "type": "select",
110
128
  "label": "Country",
111
129
  "required": true,
112
- "validationMessages": { "required": "Please select a country" },
130
+ "validationMessages": {
131
+ "required": "Please select a country"
132
+ },
113
133
  "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" }
134
+ {
135
+ "value": "us",
136
+ "label": "United States"
137
+ },
138
+ {
139
+ "value": "uk",
140
+ "label": "United Kingdom"
141
+ },
142
+ {
143
+ "value": "ca",
144
+ "label": "Canada"
145
+ },
146
+ {
147
+ "value": "au",
148
+ "label": "Australia"
149
+ },
150
+ {
151
+ "value": "de",
152
+ "label": "Germany"
153
+ }
119
154
  ],
120
- "props": { "placeholder": "Select your country" }
155
+ "placeholder": "Select your country"
121
156
  },
122
157
  {
123
158
  "key": "newsletter",
@@ -129,13 +164,17 @@
129
164
  "type": "checkbox",
130
165
  "label": "I agree to the terms and conditions",
131
166
  "required": true,
132
- "validationMessages": { "required": "You must accept the terms" }
167
+ "validationMessages": {
168
+ "required": "You must accept the terms"
169
+ }
133
170
  },
134
171
  {
135
172
  "key": "submit",
136
173
  "type": "submit",
137
174
  "label": "Create Account",
138
- "props": { "color": "primary" }
175
+ "props": {
176
+ "color": "primary"
177
+ }
139
178
  }
140
179
  ]
141
180
  }
@@ -160,7 +199,7 @@
160
199
  "label": "First Name",
161
200
  "required": true,
162
201
  "col": 6,
163
- "props": { "placeholder": "Your first name" }
202
+ "placeholder": "Your first name"
164
203
  },
165
204
  {
166
205
  "key": "lastName",
@@ -168,7 +207,7 @@
168
207
  "label": "Last Name",
169
208
  "required": true,
170
209
  "col": 6,
171
- "props": { "placeholder": "Your last name" }
210
+ "placeholder": "Your last name"
172
211
  }
173
212
  ]
174
213
  },
@@ -178,8 +217,13 @@
178
217
  "label": "Email Address",
179
218
  "required": true,
180
219
  "email": true,
181
- "validationMessages": { "email": "Please enter a valid email" },
182
- "props": { "type": "email", "placeholder": "email@example.com" }
220
+ "validationMessages": {
221
+ "email": "Please enter a valid email"
222
+ },
223
+ "props": {
224
+ "type": "email"
225
+ },
226
+ "placeholder": "email@example.com"
183
227
  },
184
228
  {
185
229
  "key": "subject",
@@ -187,12 +231,24 @@
187
231
  "label": "Subject",
188
232
  "required": true,
189
233
  "options": [
190
- { "value": "general", "label": "General Inquiry" },
191
- { "value": "support", "label": "Technical Support" },
192
- { "value": "billing", "label": "Billing Question" },
193
- { "value": "feedback", "label": "Feedback" }
234
+ {
235
+ "value": "general",
236
+ "label": "General Inquiry"
237
+ },
238
+ {
239
+ "value": "support",
240
+ "label": "Technical Support"
241
+ },
242
+ {
243
+ "value": "billing",
244
+ "label": "Billing Question"
245
+ },
246
+ {
247
+ "value": "feedback",
248
+ "label": "Feedback"
249
+ }
194
250
  ],
195
- "props": { "placeholder": "Select a subject" }
251
+ "placeholder": "Select a subject"
196
252
  },
197
253
  {
198
254
  "key": "message",
@@ -205,13 +261,18 @@
205
261
  "minLength": "Message must be at least {{requiredLength}} characters",
206
262
  "maxLength": "Message cannot exceed {{requiredLength}} characters"
207
263
  },
208
- "props": { "rows": 5, "placeholder": "How can we help you?" }
264
+ "props": {
265
+ "rows": 5
266
+ },
267
+ "placeholder": "How can we help you?"
209
268
  },
210
269
  {
211
270
  "key": "submit",
212
271
  "type": "submit",
213
272
  "label": "Send Message",
214
- "props": { "color": "primary" }
273
+ "props": {
274
+ "color": "primary"
275
+ }
215
276
  }
216
277
  ]
217
278
  }
@@ -238,13 +299,17 @@
238
299
  "label": "Email",
239
300
  "required": true,
240
301
  "email": true,
241
- "props": { "type": "email" }
302
+ "props": {
303
+ "type": "email"
304
+ }
242
305
  },
243
306
  {
244
307
  "key": "addressTitle",
245
308
  "type": "text",
246
309
  "label": "Shipping Address",
247
- "props": { "elementType": "h4" }
310
+ "props": {
311
+ "elementType": "h4"
312
+ }
248
313
  },
249
314
  {
250
315
  "key": "address",
@@ -260,8 +325,20 @@
260
325
  "key": "cityStateRow",
261
326
  "type": "row",
262
327
  "fields": [
263
- { "key": "city", "type": "input", "label": "City", "required": true, "col": 6 },
264
- { "key": "state", "type": "input", "label": "State", "required": true, "col": 3 },
328
+ {
329
+ "key": "city",
330
+ "type": "input",
331
+ "label": "City",
332
+ "required": true,
333
+ "col": 6
334
+ },
335
+ {
336
+ "key": "state",
337
+ "type": "input",
338
+ "label": "State",
339
+ "required": true,
340
+ "col": 3
341
+ },
265
342
  {
266
343
  "key": "zip",
267
344
  "type": "input",
@@ -269,7 +346,9 @@
269
346
  "required": true,
270
347
  "col": 3,
271
348
  "pattern": "^\\d{5}$",
272
- "validationMessages": { "pattern": "ZIP must be 5 digits" }
349
+ "validationMessages": {
350
+ "pattern": "ZIP must be 5 digits"
351
+ }
273
352
  }
274
353
  ]
275
354
  },
@@ -279,8 +358,14 @@
279
358
  "label": "Country",
280
359
  "required": true,
281
360
  "options": [
282
- { "value": "us", "label": "United States" },
283
- { "value": "ca", "label": "Canada" }
361
+ {
362
+ "value": "us",
363
+ "label": "United States"
364
+ },
365
+ {
366
+ "value": "ca",
367
+ "label": "Canada"
368
+ }
284
369
  ]
285
370
  }
286
371
  ]
@@ -311,12 +396,37 @@
311
396
  "key": "stepTitle1",
312
397
  "type": "text",
313
398
  "label": "Step 1: Personal Information",
314
- "props": { "elementType": "h3" }
399
+ "props": {
400
+ "elementType": "h3"
401
+ }
402
+ },
403
+ {
404
+ "key": "firstName",
405
+ "type": "input",
406
+ "label": "First Name",
407
+ "required": true
315
408
  },
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" }
409
+ {
410
+ "key": "lastName",
411
+ "type": "input",
412
+ "label": "Last Name",
413
+ "required": true
414
+ },
415
+ {
416
+ "key": "email",
417
+ "type": "input",
418
+ "label": "Email",
419
+ "required": true,
420
+ "email": true,
421
+ "props": {
422
+ "type": "email"
423
+ }
424
+ },
425
+ {
426
+ "key": "next1",
427
+ "type": "next",
428
+ "label": "Continue"
429
+ }
320
430
  ]
321
431
  },
322
432
  {
@@ -327,17 +437,44 @@
327
437
  "key": "stepTitle2",
328
438
  "type": "text",
329
439
  "label": "Step 2: Address",
330
- "props": { "elementType": "h3" }
440
+ "props": {
441
+ "elementType": "h3"
442
+ }
443
+ },
444
+ {
445
+ "key": "street",
446
+ "type": "input",
447
+ "label": "Street Address",
448
+ "required": true
449
+ },
450
+ {
451
+ "key": "city",
452
+ "type": "input",
453
+ "label": "City",
454
+ "required": true
455
+ },
456
+ {
457
+ "key": "state",
458
+ "type": "input",
459
+ "label": "State",
460
+ "required": true
331
461
  },
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
462
  {
336
463
  "key": "navRow2",
337
464
  "type": "row",
338
465
  "fields": [
339
- { "key": "prev2", "type": "previous", "label": "Back", "col": 6 },
340
- { "key": "next2", "type": "next", "label": "Continue", "col": 6 }
466
+ {
467
+ "key": "prev2",
468
+ "type": "previous",
469
+ "label": "Back",
470
+ "col": 6
471
+ },
472
+ {
473
+ "key": "next2",
474
+ "type": "next",
475
+ "label": "Continue",
476
+ "col": 6
477
+ }
341
478
  ]
342
479
  }
343
480
  ]
@@ -350,21 +487,35 @@
350
487
  "key": "stepTitle3",
351
488
  "type": "text",
352
489
  "label": "Step 3: Review & Submit",
353
- "props": { "elementType": "h3" }
490
+ "props": {
491
+ "elementType": "h3"
492
+ }
354
493
  },
355
494
  {
356
495
  "key": "confirm",
357
496
  "type": "checkbox",
358
497
  "label": "I confirm all information is correct",
359
498
  "required": true,
360
- "validationMessages": { "required": "Please confirm before submitting" }
499
+ "validationMessages": {
500
+ "required": "Please confirm before submitting"
501
+ }
361
502
  },
362
503
  {
363
504
  "key": "navRow3",
364
505
  "type": "row",
365
506
  "fields": [
366
- { "key": "prev3", "type": "previous", "label": "Back", "col": 6 },
367
- { "key": "submit", "type": "submit", "label": "Submit", "col": 6 }
507
+ {
508
+ "key": "prev3",
509
+ "type": "previous",
510
+ "label": "Back",
511
+ "col": 6
512
+ },
513
+ {
514
+ "key": "submit",
515
+ "type": "submit",
516
+ "label": "Submit",
517
+ "col": 6
518
+ }
368
519
  ]
369
520
  }
370
521
  ]
@@ -385,8 +536,14 @@
385
536
  "label": "Account Type",
386
537
  "required": true,
387
538
  "options": [
388
- { "value": "personal", "label": "Personal" },
389
- { "value": "business", "label": "Business" }
539
+ {
540
+ "value": "personal",
541
+ "label": "Personal"
542
+ },
543
+ {
544
+ "value": "business",
545
+ "label": "Business"
546
+ }
390
547
  ]
391
548
  },
392
549
  {
@@ -413,7 +570,9 @@
413
570
  }
414
571
  }
415
572
  ],
416
- "validationMessages": { "required": "Business name is required" }
573
+ "validationMessages": {
574
+ "required": "Business name is required"
575
+ }
417
576
  },
418
577
  {
419
578
  "key": "taxId",
@@ -430,7 +589,7 @@
430
589
  }
431
590
  }
432
591
  ],
433
- "props": { "placeholder": "XX-XXXXXXX" }
592
+ "placeholder": "XX-XXXXXXX"
434
593
  },
435
594
  {
436
595
  "key": "newsletter",
@@ -442,9 +601,18 @@
442
601
  "type": "select",
443
602
  "label": "Email Frequency",
444
603
  "options": [
445
- { "value": "daily", "label": "Daily" },
446
- { "value": "weekly", "label": "Weekly" },
447
- { "value": "monthly", "label": "Monthly" }
604
+ {
605
+ "value": "daily",
606
+ "label": "Daily"
607
+ },
608
+ {
609
+ "value": "weekly",
610
+ "label": "Weekly"
611
+ },
612
+ {
613
+ "value": "monthly",
614
+ "label": "Monthly"
615
+ }
448
616
  ],
449
617
  "logic": [
450
618
  {
@@ -486,7 +654,9 @@
486
654
  "key": "contactsTitle",
487
655
  "type": "text",
488
656
  "label": "Emergency Contacts",
489
- "props": { "elementType": "h4" }
657
+ "props": {
658
+ "elementType": "h4"
659
+ }
490
660
  },
491
661
  {
492
662
  "key": "contacts",
@@ -501,19 +671,49 @@
501
671
  "key": "contactRow",
502
672
  "type": "row",
503
673
  "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" } },
674
+ {
675
+ "key": "name",
676
+ "type": "input",
677
+ "label": "Contact Name",
678
+ "required": true,
679
+ "col": 4
680
+ },
681
+ {
682
+ "key": "phone",
683
+ "type": "input",
684
+ "label": "Phone",
685
+ "required": true,
686
+ "col": 4,
687
+ "props": {
688
+ "type": "tel"
689
+ }
690
+ },
506
691
  {
507
692
  "key": "relationship",
508
693
  "type": "select",
509
694
  "label": "Relationship",
510
695
  "col": 4,
511
696
  "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" }
697
+ {
698
+ "value": "spouse",
699
+ "label": "Spouse"
700
+ },
701
+ {
702
+ "value": "parent",
703
+ "label": "Parent"
704
+ },
705
+ {
706
+ "value": "sibling",
707
+ "label": "Sibling"
708
+ },
709
+ {
710
+ "value": "friend",
711
+ "label": "Friend"
712
+ },
713
+ {
714
+ "value": "other",
715
+ "label": "Other"
716
+ }
517
717
  ]
518
718
  }
519
719
  ]
@@ -541,15 +741,23 @@
541
741
  "key": "title",
542
742
  "type": "text",
543
743
  "label": "Customer Feedback",
544
- "props": { "elementType": "h2" }
744
+ "props": {
745
+ "elementType": "h2"
746
+ }
545
747
  },
546
748
  {
547
749
  "key": "satisfaction",
548
750
  "type": "slider",
549
751
  "label": "Overall Satisfaction (1-10)",
550
752
  "required": true,
551
- "props": { "min": 1, "max": 10, "step": 1 },
552
- "validationMessages": { "required": "Please rate your satisfaction" }
753
+ "props": {
754
+ "min": 1,
755
+ "max": 10,
756
+ "step": 1
757
+ },
758
+ "validationMessages": {
759
+ "required": "Please rate your satisfaction"
760
+ }
553
761
  },
554
762
  {
555
763
  "key": "recommend",
@@ -557,30 +765,62 @@
557
765
  "label": "Would you recommend us?",
558
766
  "required": true,
559
767
  "options": [
560
- { "value": "yes", "label": "Yes, definitely" },
561
- { "value": "maybe", "label": "Maybe" },
562
- { "value": "no", "label": "No" }
768
+ {
769
+ "value": "yes",
770
+ "label": "Yes, definitely"
771
+ },
772
+ {
773
+ "value": "maybe",
774
+ "label": "Maybe"
775
+ },
776
+ {
777
+ "value": "no",
778
+ "label": "No"
779
+ }
563
780
  ],
564
- "validationMessages": { "required": "Please select an option" }
781
+ "validationMessages": {
782
+ "required": "Please select an option"
783
+ }
565
784
  },
566
785
  {
567
786
  "key": "improvements",
568
787
  "type": "select",
569
788
  "label": "What could we improve?",
570
- "props": { "multiple": true, "placeholder": "Select all that apply" },
789
+ "props": {
790
+ "multiple": true
791
+ },
571
792
  "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
- ]
793
+ {
794
+ "value": "speed",
795
+ "label": "Response Time"
796
+ },
797
+ {
798
+ "value": "quality",
799
+ "label": "Product Quality"
800
+ },
801
+ {
802
+ "value": "price",
803
+ "label": "Pricing"
804
+ },
805
+ {
806
+ "value": "support",
807
+ "label": "Customer Support"
808
+ },
809
+ {
810
+ "value": "ui",
811
+ "label": "User Interface"
812
+ }
813
+ ],
814
+ "placeholder": "Select all that apply"
578
815
  },
579
816
  {
580
817
  "key": "comments",
581
818
  "type": "textarea",
582
819
  "label": "Additional Comments",
583
- "props": { "rows": 4, "placeholder": "Share any additional feedback..." }
820
+ "props": {
821
+ "rows": 4
822
+ },
823
+ "placeholder": "Share any additional feedback..."
584
824
  },
585
825
  {
586
826
  "key": "followUp",
@@ -592,7 +832,9 @@
592
832
  "type": "input",
593
833
  "label": "Email Address",
594
834
  "email": true,
595
- "props": { "type": "email", "placeholder": "your@email.com" },
835
+ "props": {
836
+ "type": "email"
837
+ },
596
838
  "logic": [
597
839
  {
598
840
  "type": "hidden",
@@ -616,7 +858,8 @@
616
858
  "validationMessages": {
617
859
  "required": "Email required for follow-up",
618
860
  "email": "Please enter a valid email"
619
- }
861
+ },
862
+ "placeholder": "your@email.com"
620
863
  },
621
864
  {
622
865
  "key": "submit",