@defra/forms-model 3.0.466 → 3.0.467

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.
@@ -218,178 +218,556 @@
218
218
  "title": "Title"
219
219
  },
220
220
  "components": {
221
- "type": "array",
222
- "description": "Components schema for V2 forms",
223
- "uniqueItems": true,
224
- "items": {
225
- "type": "object",
226
- "description": "Component schema for V2 forms",
227
- "properties": {
228
- "type": {
229
- "type": "string",
230
- "description": "Component type (TextField, RadioButtons, DateField, etc.)",
231
- "title": "Type"
232
- },
233
- "shortDescription": {
234
- "type": "string",
235
- "description": "Brief description of the component purpose",
236
- "title": "Short Description"
237
- },
238
- "name": {
239
- "type": [
240
- "array",
241
- "boolean",
242
- "number",
243
- "object",
244
- "string",
245
- "null"
246
- ],
247
- "oneOf": [
248
- {
249
- "type": "string",
250
- "description": "Name format for display-only components like HTML, Markdown, etc.",
251
- "pattern": "^[a-zA-Z]+$",
252
- "title": "Display Component Name"
253
- },
254
- {
255
- "type": "string",
256
- "description": "Name format for input components that collect user data.",
257
- "pattern": "^[a-zA-Z]+$",
258
- "title": "Input Component Name"
259
- }
260
- ],
261
- "title": "Name",
262
- "description": "The name value.",
263
- "oneOfTitles": [
264
- "Display Component Name",
265
- "Input Component Name"
266
- ]
267
- },
268
- "title": {
269
- "type": [
270
- "array",
271
- "boolean",
272
- "number",
273
- "object",
274
- "string",
275
- "null"
276
- ],
277
- "oneOf": [
221
+ "type": [
222
+ "array",
223
+ "boolean",
224
+ "number",
225
+ "object",
226
+ "string",
227
+ "null"
228
+ ],
229
+ "anyOf": [
230
+ {
231
+ "type": "array",
232
+ "description": "Components allowed on Page Upload schema",
233
+ "uniqueItems": true,
234
+ "minItems": 1,
235
+ "maxItems": 2,
236
+ "items": {
237
+ "anyOf": [
278
238
  {
279
- "type": "string",
280
- "description": "Title format for display-only components.",
281
- "title": "Display Component Title"
239
+ "type": "object",
240
+ "description": "Component schema for V2 forms",
241
+ "properties": {
242
+ "shortDescription": {
243
+ "type": "string",
244
+ "description": "Brief description of the component purpose",
245
+ "title": "Short Description"
246
+ },
247
+ "hint": {
248
+ "type": "string",
249
+ "description": "Additional guidance text displayed below the component title",
250
+ "title": "Hint"
251
+ },
252
+ "options": {
253
+ "type": "object",
254
+ "description": "Component-specific configuration options",
255
+ "default": {},
256
+ "properties": {
257
+ "rows": {
258
+ "type": "number",
259
+ "description": "Number of rows for textarea components",
260
+ "title": "Rows"
261
+ },
262
+ "maxWords": {
263
+ "type": "number",
264
+ "description": "Maximum number of words allowed in text inputs",
265
+ "title": "Max Words"
266
+ },
267
+ "maxDaysInPast": {
268
+ "type": "number",
269
+ "description": "Maximum days in the past allowed for date inputs",
270
+ "title": "Max Days In Past"
271
+ },
272
+ "maxDaysInFuture": {
273
+ "type": "number",
274
+ "description": "Maximum days in the future allowed for date inputs",
275
+ "title": "Max Days In Future"
276
+ },
277
+ "customValidationMessage": {
278
+ "type": "string",
279
+ "description": "Custom error message for validation failures",
280
+ "title": "Custom Validation Message"
281
+ },
282
+ "customValidationMessages": {
283
+ "type": "object",
284
+ "description": "Custom error messages keyed by validation rule name",
285
+ "properties": {},
286
+ "additionalProperties": true,
287
+ "title": "Custom Validation Messages"
288
+ }
289
+ },
290
+ "additionalProperties": true,
291
+ "title": "Options"
292
+ },
293
+ "schema": {
294
+ "type": "object",
295
+ "description": "Validation rules for the component",
296
+ "default": {},
297
+ "properties": {
298
+ "min": {
299
+ "type": "number",
300
+ "description": "Minimum value or length for validation",
301
+ "title": "Min"
302
+ },
303
+ "max": {
304
+ "type": "number",
305
+ "description": "Maximum value or length for validation",
306
+ "title": "Max"
307
+ },
308
+ "length": {
309
+ "type": "number",
310
+ "description": "Exact length required for validation",
311
+ "title": "Length"
312
+ }
313
+ },
314
+ "additionalProperties": true,
315
+ "title": "Schema"
316
+ },
317
+ "id": {
318
+ "type": "string",
319
+ "description": "Unique identifier for the component",
320
+ "format": "uuid",
321
+ "title": "Id"
322
+ },
323
+ "list": {
324
+ "description": "List id reference to a predefined list of options for select components",
325
+ "const": {
326
+ "ref": {
327
+ "path": [
328
+ "lists"
329
+ ],
330
+ "ancestor": "root",
331
+ "in": true
332
+ }
333
+ },
334
+ "title": "List"
335
+ },
336
+ "type": {
337
+ "description": "Component that can only be a FileUploadField",
338
+ "const": "FileUploadField",
339
+ "title": "Type"
340
+ },
341
+ "name": {
342
+ "type": [
343
+ "array",
344
+ "boolean",
345
+ "number",
346
+ "object",
347
+ "string",
348
+ "null"
349
+ ],
350
+ "oneOf": [
351
+ {
352
+ "type": "string",
353
+ "description": "Name format for display-only components like HTML, Markdown, etc.",
354
+ "pattern": "^[a-zA-Z]+$",
355
+ "title": "Display Component Name"
356
+ },
357
+ {
358
+ "type": "string",
359
+ "description": "Name format for input components that collect user data.",
360
+ "pattern": "^[a-zA-Z]+$",
361
+ "title": "Input Component Name"
362
+ }
363
+ ],
364
+ "title": "Name",
365
+ "description": "The name value.",
366
+ "oneOfTitles": [
367
+ "Display Component Name",
368
+ "Input Component Name"
369
+ ]
370
+ },
371
+ "title": {
372
+ "type": [
373
+ "array",
374
+ "boolean",
375
+ "number",
376
+ "object",
377
+ "string",
378
+ "null"
379
+ ],
380
+ "oneOf": [
381
+ {
382
+ "type": "string",
383
+ "description": "Title format for display-only components.",
384
+ "title": "Display Component Title"
385
+ },
386
+ {
387
+ "type": "string",
388
+ "description": "Title displayed above input components.",
389
+ "title": "Input Component Title"
390
+ }
391
+ ],
392
+ "title": "Title",
393
+ "description": "The title value.",
394
+ "oneOfTitles": [
395
+ "Display Component Title",
396
+ "Input Component Title"
397
+ ]
398
+ }
399
+ },
400
+ "required": [
401
+ "type"
402
+ ],
403
+ "additionalProperties": true,
404
+ "title": "Components (array) Item (object)"
282
405
  },
283
406
  {
284
- "type": "string",
285
- "description": "Title displayed above input components.",
286
- "title": "Input Component Title"
407
+ "type": "object",
408
+ "description": "Component schema for V2 forms",
409
+ "properties": {
410
+ "shortDescription": {
411
+ "type": "string",
412
+ "description": "Brief description of the component purpose",
413
+ "title": "Short Description"
414
+ },
415
+ "hint": {
416
+ "type": "string",
417
+ "description": "Additional guidance text displayed below the component title",
418
+ "title": "Hint"
419
+ },
420
+ "options": {
421
+ "type": "object",
422
+ "description": "Component-specific configuration options",
423
+ "default": {},
424
+ "properties": {
425
+ "rows": {
426
+ "type": "number",
427
+ "description": "Number of rows for textarea components",
428
+ "title": "Rows"
429
+ },
430
+ "maxWords": {
431
+ "type": "number",
432
+ "description": "Maximum number of words allowed in text inputs",
433
+ "title": "Max Words"
434
+ },
435
+ "maxDaysInPast": {
436
+ "type": "number",
437
+ "description": "Maximum days in the past allowed for date inputs",
438
+ "title": "Max Days In Past"
439
+ },
440
+ "maxDaysInFuture": {
441
+ "type": "number",
442
+ "description": "Maximum days in the future allowed for date inputs",
443
+ "title": "Max Days In Future"
444
+ },
445
+ "customValidationMessage": {
446
+ "type": "string",
447
+ "description": "Custom error message for validation failures",
448
+ "title": "Custom Validation Message"
449
+ },
450
+ "customValidationMessages": {
451
+ "type": "object",
452
+ "description": "Custom error messages keyed by validation rule name",
453
+ "properties": {},
454
+ "additionalProperties": true,
455
+ "title": "Custom Validation Messages"
456
+ }
457
+ },
458
+ "additionalProperties": true,
459
+ "title": "Options"
460
+ },
461
+ "schema": {
462
+ "type": "object",
463
+ "description": "Validation rules for the component",
464
+ "default": {},
465
+ "properties": {
466
+ "min": {
467
+ "type": "number",
468
+ "description": "Minimum value or length for validation",
469
+ "title": "Min"
470
+ },
471
+ "max": {
472
+ "type": "number",
473
+ "description": "Maximum value or length for validation",
474
+ "title": "Max"
475
+ },
476
+ "length": {
477
+ "type": "number",
478
+ "description": "Exact length required for validation",
479
+ "title": "Length"
480
+ }
481
+ },
482
+ "additionalProperties": true,
483
+ "title": "Schema"
484
+ },
485
+ "id": {
486
+ "type": "string",
487
+ "description": "Unique identifier for the component",
488
+ "format": "uuid",
489
+ "title": "Id"
490
+ },
491
+ "list": {
492
+ "description": "List id reference to a predefined list of options for select components",
493
+ "const": {
494
+ "ref": {
495
+ "path": [
496
+ "lists"
497
+ ],
498
+ "ancestor": "root",
499
+ "in": true
500
+ }
501
+ },
502
+ "title": "List"
503
+ },
504
+ "type": {
505
+ "type": "string",
506
+ "description": "Content only component type (Details, Html, Markdown, etc.)",
507
+ "enum": [
508
+ "Details",
509
+ "Html",
510
+ "Markdown",
511
+ "InsetText",
512
+ "List"
513
+ ],
514
+ "title": "Type"
515
+ },
516
+ "name": {
517
+ "type": [
518
+ "array",
519
+ "boolean",
520
+ "number",
521
+ "object",
522
+ "string",
523
+ "null"
524
+ ],
525
+ "oneOf": [
526
+ {
527
+ "type": "string",
528
+ "description": "Name format for display-only components like HTML, Markdown, etc.",
529
+ "pattern": "^[a-zA-Z]+$",
530
+ "title": "Display Component Name"
531
+ },
532
+ {
533
+ "type": "string",
534
+ "description": "Name format for input components that collect user data.",
535
+ "pattern": "^[a-zA-Z]+$",
536
+ "title": "Input Component Name"
537
+ }
538
+ ],
539
+ "title": "Name",
540
+ "description": "The name value.",
541
+ "oneOfTitles": [
542
+ "Display Component Name",
543
+ "Input Component Name"
544
+ ]
545
+ },
546
+ "title": {
547
+ "type": [
548
+ "array",
549
+ "boolean",
550
+ "number",
551
+ "object",
552
+ "string",
553
+ "null"
554
+ ],
555
+ "oneOf": [
556
+ {
557
+ "type": "string",
558
+ "description": "Title format for display-only components.",
559
+ "title": "Display Component Title"
560
+ },
561
+ {
562
+ "type": "string",
563
+ "description": "Title displayed above input components.",
564
+ "title": "Input Component Title"
565
+ }
566
+ ],
567
+ "title": "Title",
568
+ "description": "The title value.",
569
+ "oneOfTitles": [
570
+ "Display Component Title",
571
+ "Input Component Title"
572
+ ]
573
+ }
574
+ },
575
+ "required": [
576
+ "type"
577
+ ],
578
+ "additionalProperties": true,
579
+ "title": "Components (array) Item (object)"
287
580
  }
288
581
  ],
289
- "title": "Title",
290
- "description": "The title value.",
291
- "oneOfTitles": [
292
- "Display Component Title",
293
- "Input Component Title"
582
+ "title": "Components (array) Item",
583
+ "anyOfTitles": [
584
+ "Components (array) Item (object)",
585
+ "Components (array) Item (object)"
294
586
  ]
295
587
  },
296
- "hint": {
297
- "type": "string",
298
- "description": "Additional guidance text displayed below the component title",
299
- "title": "Hint"
300
- },
301
- "options": {
588
+ "title": "Components (array)"
589
+ },
590
+ {
591
+ "type": "array",
592
+ "description": "Components schema for V2 forms",
593
+ "uniqueItems": true,
594
+ "items": {
302
595
  "type": "object",
303
- "description": "Component-specific configuration options",
304
- "default": {},
596
+ "description": "Component schema for V2 forms",
305
597
  "properties": {
306
- "rows": {
307
- "type": "number",
308
- "description": "Number of rows for textarea components",
309
- "title": "Rows"
598
+ "type": {
599
+ "type": "string",
600
+ "description": "Component type (TextField, RadioButtons, DateField, etc.)",
601
+ "title": "Type"
310
602
  },
311
- "maxWords": {
312
- "type": "number",
313
- "description": "Maximum number of words allowed in text inputs",
314
- "title": "Max Words"
603
+ "shortDescription": {
604
+ "type": "string",
605
+ "description": "Brief description of the component purpose",
606
+ "title": "Short Description"
315
607
  },
316
- "maxDaysInPast": {
317
- "type": "number",
318
- "description": "Maximum days in the past allowed for date inputs",
319
- "title": "Max Days In Past"
608
+ "name": {
609
+ "type": [
610
+ "array",
611
+ "boolean",
612
+ "number",
613
+ "object",
614
+ "string",
615
+ "null"
616
+ ],
617
+ "oneOf": [
618
+ {
619
+ "type": "string",
620
+ "description": "Name format for display-only components like HTML, Markdown, etc.",
621
+ "pattern": "^[a-zA-Z]+$",
622
+ "title": "Display Component Name"
623
+ },
624
+ {
625
+ "type": "string",
626
+ "description": "Name format for input components that collect user data.",
627
+ "pattern": "^[a-zA-Z]+$",
628
+ "title": "Input Component Name"
629
+ }
630
+ ],
631
+ "title": "Name",
632
+ "description": "The name value.",
633
+ "oneOfTitles": [
634
+ "Display Component Name",
635
+ "Input Component Name"
636
+ ]
320
637
  },
321
- "maxDaysInFuture": {
322
- "type": "number",
323
- "description": "Maximum days in the future allowed for date inputs",
324
- "title": "Max Days In Future"
638
+ "title": {
639
+ "type": [
640
+ "array",
641
+ "boolean",
642
+ "number",
643
+ "object",
644
+ "string",
645
+ "null"
646
+ ],
647
+ "oneOf": [
648
+ {
649
+ "type": "string",
650
+ "description": "Title format for display-only components.",
651
+ "title": "Display Component Title"
652
+ },
653
+ {
654
+ "type": "string",
655
+ "description": "Title displayed above input components.",
656
+ "title": "Input Component Title"
657
+ }
658
+ ],
659
+ "title": "Title",
660
+ "description": "The title value.",
661
+ "oneOfTitles": [
662
+ "Display Component Title",
663
+ "Input Component Title"
664
+ ]
325
665
  },
326
- "customValidationMessage": {
666
+ "hint": {
327
667
  "type": "string",
328
- "description": "Custom error message for validation failures",
329
- "title": "Custom Validation Message"
668
+ "description": "Additional guidance text displayed below the component title",
669
+ "title": "Hint"
330
670
  },
331
- "customValidationMessages": {
671
+ "options": {
332
672
  "type": "object",
333
- "description": "Custom error messages keyed by validation rule name",
334
- "properties": {},
673
+ "description": "Component-specific configuration options",
674
+ "default": {},
675
+ "properties": {
676
+ "rows": {
677
+ "type": "number",
678
+ "description": "Number of rows for textarea components",
679
+ "title": "Rows"
680
+ },
681
+ "maxWords": {
682
+ "type": "number",
683
+ "description": "Maximum number of words allowed in text inputs",
684
+ "title": "Max Words"
685
+ },
686
+ "maxDaysInPast": {
687
+ "type": "number",
688
+ "description": "Maximum days in the past allowed for date inputs",
689
+ "title": "Max Days In Past"
690
+ },
691
+ "maxDaysInFuture": {
692
+ "type": "number",
693
+ "description": "Maximum days in the future allowed for date inputs",
694
+ "title": "Max Days In Future"
695
+ },
696
+ "customValidationMessage": {
697
+ "type": "string",
698
+ "description": "Custom error message for validation failures",
699
+ "title": "Custom Validation Message"
700
+ },
701
+ "customValidationMessages": {
702
+ "type": "object",
703
+ "description": "Custom error messages keyed by validation rule name",
704
+ "properties": {},
705
+ "additionalProperties": true,
706
+ "title": "Custom Validation Messages"
707
+ }
708
+ },
335
709
  "additionalProperties": true,
336
- "title": "Custom Validation Messages"
337
- }
338
- },
339
- "additionalProperties": true,
340
- "title": "Options"
341
- },
342
- "schema": {
343
- "type": "object",
344
- "description": "Validation rules for the component",
345
- "default": {},
346
- "properties": {
347
- "min": {
348
- "type": "number",
349
- "description": "Minimum value or length for validation",
350
- "title": "Min"
710
+ "title": "Options"
711
+ },
712
+ "schema": {
713
+ "type": "object",
714
+ "description": "Validation rules for the component",
715
+ "default": {},
716
+ "properties": {
717
+ "min": {
718
+ "type": "number",
719
+ "description": "Minimum value or length for validation",
720
+ "title": "Min"
721
+ },
722
+ "max": {
723
+ "type": "number",
724
+ "description": "Maximum value or length for validation",
725
+ "title": "Max"
726
+ },
727
+ "length": {
728
+ "type": "number",
729
+ "description": "Exact length required for validation",
730
+ "title": "Length"
731
+ }
732
+ },
733
+ "additionalProperties": true,
734
+ "title": "Schema"
351
735
  },
352
- "max": {
353
- "type": "number",
354
- "description": "Maximum value or length for validation",
355
- "title": "Max"
736
+ "id": {
737
+ "type": "string",
738
+ "description": "Unique identifier for the component",
739
+ "format": "uuid",
740
+ "title": "Id"
356
741
  },
357
- "length": {
358
- "type": "number",
359
- "description": "Exact length required for validation",
360
- "title": "Length"
742
+ "list": {
743
+ "description": "List id reference to a predefined list of options for select components",
744
+ "const": {
745
+ "ref": {
746
+ "path": [
747
+ "lists"
748
+ ],
749
+ "ancestor": "root",
750
+ "in": true
751
+ }
752
+ },
753
+ "title": "List"
361
754
  }
362
755
  },
756
+ "required": [
757
+ "type"
758
+ ],
363
759
  "additionalProperties": true,
364
- "title": "Schema"
760
+ "title": "Components (array) Item"
365
761
  },
366
- "id": {
367
- "type": "string",
368
- "description": "Unique identifier for the component",
369
- "format": "uuid",
370
- "title": "Id"
371
- },
372
- "list": {
373
- "description": "List id reference to a predefined list of options for select components",
374
- "const": {
375
- "ref": {
376
- "path": [
377
- "lists"
378
- ],
379
- "ancestor": "root",
380
- "in": true
381
- }
382
- },
383
- "title": "List"
384
- }
385
- },
386
- "required": [
387
- "type"
388
- ],
389
- "additionalProperties": true,
390
- "title": "Components Item"
391
- },
392
- "title": "Components"
762
+ "title": "Components (array)"
763
+ }
764
+ ],
765
+ "title": "Components",
766
+ "description": "The components value.",
767
+ "anyOfTitles": [
768
+ "Components (array)",
769
+ "Components (array)"
770
+ ]
393
771
  },
394
772
  "condition": {
395
773
  "description": "Optional condition that determines if this page is shown",