@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.
@@ -387,178 +387,556 @@
387
387
  "title": "Title"
388
388
  },
389
389
  "components": {
390
- "type": "array",
391
- "description": "Components schema for V2 forms",
392
- "uniqueItems": true,
393
- "items": {
394
- "type": "object",
395
- "description": "Component schema for V2 forms",
396
- "properties": {
397
- "type": {
398
- "type": "string",
399
- "description": "Component type (TextField, RadioButtons, DateField, etc.)",
400
- "title": "Type"
401
- },
402
- "shortDescription": {
403
- "type": "string",
404
- "description": "Brief description of the component purpose",
405
- "title": "Short Description"
406
- },
407
- "name": {
408
- "type": [
409
- "array",
410
- "boolean",
411
- "number",
412
- "object",
413
- "string",
414
- "null"
415
- ],
416
- "oneOf": [
417
- {
418
- "type": "string",
419
- "description": "Name format for display-only components like HTML, Markdown, etc.",
420
- "pattern": "^[a-zA-Z]+$",
421
- "title": "Display Component Name"
422
- },
423
- {
424
- "type": "string",
425
- "description": "Name format for input components that collect user data.",
426
- "pattern": "^[a-zA-Z]+$",
427
- "title": "Input Component Name"
428
- }
429
- ],
430
- "title": "Name",
431
- "description": "The name value.",
432
- "oneOfTitles": [
433
- "Display Component Name",
434
- "Input Component Name"
435
- ]
436
- },
437
- "title": {
438
- "type": [
439
- "array",
440
- "boolean",
441
- "number",
442
- "object",
443
- "string",
444
- "null"
445
- ],
446
- "oneOf": [
390
+ "type": [
391
+ "array",
392
+ "boolean",
393
+ "number",
394
+ "object",
395
+ "string",
396
+ "null"
397
+ ],
398
+ "anyOf": [
399
+ {
400
+ "type": "array",
401
+ "description": "Components allowed on Page Upload schema",
402
+ "uniqueItems": true,
403
+ "minItems": 1,
404
+ "maxItems": 2,
405
+ "items": {
406
+ "anyOf": [
447
407
  {
448
- "type": "string",
449
- "description": "Title format for display-only components.",
450
- "title": "Display Component Title"
408
+ "type": "object",
409
+ "description": "Component schema for V2 forms",
410
+ "properties": {
411
+ "shortDescription": {
412
+ "type": "string",
413
+ "description": "Brief description of the component purpose",
414
+ "title": "Short Description"
415
+ },
416
+ "hint": {
417
+ "type": "string",
418
+ "description": "Additional guidance text displayed below the component title",
419
+ "title": "Hint"
420
+ },
421
+ "options": {
422
+ "type": "object",
423
+ "description": "Component-specific configuration options",
424
+ "default": {},
425
+ "properties": {
426
+ "rows": {
427
+ "type": "number",
428
+ "description": "Number of rows for textarea components",
429
+ "title": "Rows"
430
+ },
431
+ "maxWords": {
432
+ "type": "number",
433
+ "description": "Maximum number of words allowed in text inputs",
434
+ "title": "Max Words"
435
+ },
436
+ "maxDaysInPast": {
437
+ "type": "number",
438
+ "description": "Maximum days in the past allowed for date inputs",
439
+ "title": "Max Days In Past"
440
+ },
441
+ "maxDaysInFuture": {
442
+ "type": "number",
443
+ "description": "Maximum days in the future allowed for date inputs",
444
+ "title": "Max Days In Future"
445
+ },
446
+ "customValidationMessage": {
447
+ "type": "string",
448
+ "description": "Custom error message for validation failures",
449
+ "title": "Custom Validation Message"
450
+ },
451
+ "customValidationMessages": {
452
+ "type": "object",
453
+ "description": "Custom error messages keyed by validation rule name",
454
+ "properties": {},
455
+ "additionalProperties": true,
456
+ "title": "Custom Validation Messages"
457
+ }
458
+ },
459
+ "additionalProperties": true,
460
+ "title": "Options"
461
+ },
462
+ "schema": {
463
+ "type": "object",
464
+ "description": "Validation rules for the component",
465
+ "default": {},
466
+ "properties": {
467
+ "min": {
468
+ "type": "number",
469
+ "description": "Minimum value or length for validation",
470
+ "title": "Min"
471
+ },
472
+ "max": {
473
+ "type": "number",
474
+ "description": "Maximum value or length for validation",
475
+ "title": "Max"
476
+ },
477
+ "length": {
478
+ "type": "number",
479
+ "description": "Exact length required for validation",
480
+ "title": "Length"
481
+ }
482
+ },
483
+ "additionalProperties": true,
484
+ "title": "Schema"
485
+ },
486
+ "id": {
487
+ "type": "string",
488
+ "description": "Unique identifier for the component",
489
+ "format": "uuid",
490
+ "title": "Id"
491
+ },
492
+ "list": {
493
+ "description": "List id reference to a predefined list of options for select components",
494
+ "const": {
495
+ "ref": {
496
+ "path": [
497
+ "lists"
498
+ ],
499
+ "ancestor": "root",
500
+ "in": true
501
+ }
502
+ },
503
+ "title": "List"
504
+ },
505
+ "type": {
506
+ "description": "Component that can only be a FileUploadField",
507
+ "const": "FileUploadField",
508
+ "title": "Type"
509
+ },
510
+ "name": {
511
+ "type": [
512
+ "array",
513
+ "boolean",
514
+ "number",
515
+ "object",
516
+ "string",
517
+ "null"
518
+ ],
519
+ "oneOf": [
520
+ {
521
+ "type": "string",
522
+ "description": "Name format for display-only components like HTML, Markdown, etc.",
523
+ "pattern": "^[a-zA-Z]+$",
524
+ "title": "Display Component Name"
525
+ },
526
+ {
527
+ "type": "string",
528
+ "description": "Name format for input components that collect user data.",
529
+ "pattern": "^[a-zA-Z]+$",
530
+ "title": "Input Component Name"
531
+ }
532
+ ],
533
+ "title": "Name",
534
+ "description": "The name value.",
535
+ "oneOfTitles": [
536
+ "Display Component Name",
537
+ "Input Component Name"
538
+ ]
539
+ },
540
+ "title": {
541
+ "type": [
542
+ "array",
543
+ "boolean",
544
+ "number",
545
+ "object",
546
+ "string",
547
+ "null"
548
+ ],
549
+ "oneOf": [
550
+ {
551
+ "type": "string",
552
+ "description": "Title format for display-only components.",
553
+ "title": "Display Component Title"
554
+ },
555
+ {
556
+ "type": "string",
557
+ "description": "Title displayed above input components.",
558
+ "title": "Input Component Title"
559
+ }
560
+ ],
561
+ "title": "Title",
562
+ "description": "The title value.",
563
+ "oneOfTitles": [
564
+ "Display Component Title",
565
+ "Input Component Title"
566
+ ]
567
+ }
568
+ },
569
+ "required": [
570
+ "type"
571
+ ],
572
+ "additionalProperties": true,
573
+ "title": "Components (array) Item (object)"
451
574
  },
452
575
  {
453
- "type": "string",
454
- "description": "Title displayed above input components.",
455
- "title": "Input Component Title"
576
+ "type": "object",
577
+ "description": "Component schema for V2 forms",
578
+ "properties": {
579
+ "shortDescription": {
580
+ "type": "string",
581
+ "description": "Brief description of the component purpose",
582
+ "title": "Short Description"
583
+ },
584
+ "hint": {
585
+ "type": "string",
586
+ "description": "Additional guidance text displayed below the component title",
587
+ "title": "Hint"
588
+ },
589
+ "options": {
590
+ "type": "object",
591
+ "description": "Component-specific configuration options",
592
+ "default": {},
593
+ "properties": {
594
+ "rows": {
595
+ "type": "number",
596
+ "description": "Number of rows for textarea components",
597
+ "title": "Rows"
598
+ },
599
+ "maxWords": {
600
+ "type": "number",
601
+ "description": "Maximum number of words allowed in text inputs",
602
+ "title": "Max Words"
603
+ },
604
+ "maxDaysInPast": {
605
+ "type": "number",
606
+ "description": "Maximum days in the past allowed for date inputs",
607
+ "title": "Max Days In Past"
608
+ },
609
+ "maxDaysInFuture": {
610
+ "type": "number",
611
+ "description": "Maximum days in the future allowed for date inputs",
612
+ "title": "Max Days In Future"
613
+ },
614
+ "customValidationMessage": {
615
+ "type": "string",
616
+ "description": "Custom error message for validation failures",
617
+ "title": "Custom Validation Message"
618
+ },
619
+ "customValidationMessages": {
620
+ "type": "object",
621
+ "description": "Custom error messages keyed by validation rule name",
622
+ "properties": {},
623
+ "additionalProperties": true,
624
+ "title": "Custom Validation Messages"
625
+ }
626
+ },
627
+ "additionalProperties": true,
628
+ "title": "Options"
629
+ },
630
+ "schema": {
631
+ "type": "object",
632
+ "description": "Validation rules for the component",
633
+ "default": {},
634
+ "properties": {
635
+ "min": {
636
+ "type": "number",
637
+ "description": "Minimum value or length for validation",
638
+ "title": "Min"
639
+ },
640
+ "max": {
641
+ "type": "number",
642
+ "description": "Maximum value or length for validation",
643
+ "title": "Max"
644
+ },
645
+ "length": {
646
+ "type": "number",
647
+ "description": "Exact length required for validation",
648
+ "title": "Length"
649
+ }
650
+ },
651
+ "additionalProperties": true,
652
+ "title": "Schema"
653
+ },
654
+ "id": {
655
+ "type": "string",
656
+ "description": "Unique identifier for the component",
657
+ "format": "uuid",
658
+ "title": "Id"
659
+ },
660
+ "list": {
661
+ "description": "List id reference to a predefined list of options for select components",
662
+ "const": {
663
+ "ref": {
664
+ "path": [
665
+ "lists"
666
+ ],
667
+ "ancestor": "root",
668
+ "in": true
669
+ }
670
+ },
671
+ "title": "List"
672
+ },
673
+ "type": {
674
+ "type": "string",
675
+ "description": "Content only component type (Details, Html, Markdown, etc.)",
676
+ "enum": [
677
+ "Details",
678
+ "Html",
679
+ "Markdown",
680
+ "InsetText",
681
+ "List"
682
+ ],
683
+ "title": "Type"
684
+ },
685
+ "name": {
686
+ "type": [
687
+ "array",
688
+ "boolean",
689
+ "number",
690
+ "object",
691
+ "string",
692
+ "null"
693
+ ],
694
+ "oneOf": [
695
+ {
696
+ "type": "string",
697
+ "description": "Name format for display-only components like HTML, Markdown, etc.",
698
+ "pattern": "^[a-zA-Z]+$",
699
+ "title": "Display Component Name"
700
+ },
701
+ {
702
+ "type": "string",
703
+ "description": "Name format for input components that collect user data.",
704
+ "pattern": "^[a-zA-Z]+$",
705
+ "title": "Input Component Name"
706
+ }
707
+ ],
708
+ "title": "Name",
709
+ "description": "The name value.",
710
+ "oneOfTitles": [
711
+ "Display Component Name",
712
+ "Input Component Name"
713
+ ]
714
+ },
715
+ "title": {
716
+ "type": [
717
+ "array",
718
+ "boolean",
719
+ "number",
720
+ "object",
721
+ "string",
722
+ "null"
723
+ ],
724
+ "oneOf": [
725
+ {
726
+ "type": "string",
727
+ "description": "Title format for display-only components.",
728
+ "title": "Display Component Title"
729
+ },
730
+ {
731
+ "type": "string",
732
+ "description": "Title displayed above input components.",
733
+ "title": "Input Component Title"
734
+ }
735
+ ],
736
+ "title": "Title",
737
+ "description": "The title value.",
738
+ "oneOfTitles": [
739
+ "Display Component Title",
740
+ "Input Component Title"
741
+ ]
742
+ }
743
+ },
744
+ "required": [
745
+ "type"
746
+ ],
747
+ "additionalProperties": true,
748
+ "title": "Components (array) Item (object)"
456
749
  }
457
750
  ],
458
- "title": "Title",
459
- "description": "The title value.",
460
- "oneOfTitles": [
461
- "Display Component Title",
462
- "Input Component Title"
751
+ "title": "Components (array) Item",
752
+ "anyOfTitles": [
753
+ "Components (array) Item (object)",
754
+ "Components (array) Item (object)"
463
755
  ]
464
756
  },
465
- "hint": {
466
- "type": "string",
467
- "description": "Additional guidance text displayed below the component title",
468
- "title": "Hint"
469
- },
470
- "options": {
757
+ "title": "Components (array)"
758
+ },
759
+ {
760
+ "type": "array",
761
+ "description": "Components schema for V2 forms",
762
+ "uniqueItems": true,
763
+ "items": {
471
764
  "type": "object",
472
- "description": "Component-specific configuration options",
473
- "default": {},
765
+ "description": "Component schema for V2 forms",
474
766
  "properties": {
475
- "rows": {
476
- "type": "number",
477
- "description": "Number of rows for textarea components",
478
- "title": "Rows"
767
+ "type": {
768
+ "type": "string",
769
+ "description": "Component type (TextField, RadioButtons, DateField, etc.)",
770
+ "title": "Type"
479
771
  },
480
- "maxWords": {
481
- "type": "number",
482
- "description": "Maximum number of words allowed in text inputs",
483
- "title": "Max Words"
772
+ "shortDescription": {
773
+ "type": "string",
774
+ "description": "Brief description of the component purpose",
775
+ "title": "Short Description"
484
776
  },
485
- "maxDaysInPast": {
486
- "type": "number",
487
- "description": "Maximum days in the past allowed for date inputs",
488
- "title": "Max Days In Past"
777
+ "name": {
778
+ "type": [
779
+ "array",
780
+ "boolean",
781
+ "number",
782
+ "object",
783
+ "string",
784
+ "null"
785
+ ],
786
+ "oneOf": [
787
+ {
788
+ "type": "string",
789
+ "description": "Name format for display-only components like HTML, Markdown, etc.",
790
+ "pattern": "^[a-zA-Z]+$",
791
+ "title": "Display Component Name"
792
+ },
793
+ {
794
+ "type": "string",
795
+ "description": "Name format for input components that collect user data.",
796
+ "pattern": "^[a-zA-Z]+$",
797
+ "title": "Input Component Name"
798
+ }
799
+ ],
800
+ "title": "Name",
801
+ "description": "The name value.",
802
+ "oneOfTitles": [
803
+ "Display Component Name",
804
+ "Input Component Name"
805
+ ]
489
806
  },
490
- "maxDaysInFuture": {
491
- "type": "number",
492
- "description": "Maximum days in the future allowed for date inputs",
493
- "title": "Max Days In Future"
807
+ "title": {
808
+ "type": [
809
+ "array",
810
+ "boolean",
811
+ "number",
812
+ "object",
813
+ "string",
814
+ "null"
815
+ ],
816
+ "oneOf": [
817
+ {
818
+ "type": "string",
819
+ "description": "Title format for display-only components.",
820
+ "title": "Display Component Title"
821
+ },
822
+ {
823
+ "type": "string",
824
+ "description": "Title displayed above input components.",
825
+ "title": "Input Component Title"
826
+ }
827
+ ],
828
+ "title": "Title",
829
+ "description": "The title value.",
830
+ "oneOfTitles": [
831
+ "Display Component Title",
832
+ "Input Component Title"
833
+ ]
494
834
  },
495
- "customValidationMessage": {
835
+ "hint": {
496
836
  "type": "string",
497
- "description": "Custom error message for validation failures",
498
- "title": "Custom Validation Message"
837
+ "description": "Additional guidance text displayed below the component title",
838
+ "title": "Hint"
839
+ },
840
+ "options": {
841
+ "type": "object",
842
+ "description": "Component-specific configuration options",
843
+ "default": {},
844
+ "properties": {
845
+ "rows": {
846
+ "type": "number",
847
+ "description": "Number of rows for textarea components",
848
+ "title": "Rows"
849
+ },
850
+ "maxWords": {
851
+ "type": "number",
852
+ "description": "Maximum number of words allowed in text inputs",
853
+ "title": "Max Words"
854
+ },
855
+ "maxDaysInPast": {
856
+ "type": "number",
857
+ "description": "Maximum days in the past allowed for date inputs",
858
+ "title": "Max Days In Past"
859
+ },
860
+ "maxDaysInFuture": {
861
+ "type": "number",
862
+ "description": "Maximum days in the future allowed for date inputs",
863
+ "title": "Max Days In Future"
864
+ },
865
+ "customValidationMessage": {
866
+ "type": "string",
867
+ "description": "Custom error message for validation failures",
868
+ "title": "Custom Validation Message"
869
+ },
870
+ "customValidationMessages": {
871
+ "type": "object",
872
+ "description": "Custom error messages keyed by validation rule name",
873
+ "properties": {},
874
+ "additionalProperties": true,
875
+ "title": "Custom Validation Messages"
876
+ }
877
+ },
878
+ "additionalProperties": true,
879
+ "title": "Options"
499
880
  },
500
- "customValidationMessages": {
881
+ "schema": {
501
882
  "type": "object",
502
- "description": "Custom error messages keyed by validation rule name",
503
- "properties": {},
883
+ "description": "Validation rules for the component",
884
+ "default": {},
885
+ "properties": {
886
+ "min": {
887
+ "type": "number",
888
+ "description": "Minimum value or length for validation",
889
+ "title": "Min"
890
+ },
891
+ "max": {
892
+ "type": "number",
893
+ "description": "Maximum value or length for validation",
894
+ "title": "Max"
895
+ },
896
+ "length": {
897
+ "type": "number",
898
+ "description": "Exact length required for validation",
899
+ "title": "Length"
900
+ }
901
+ },
504
902
  "additionalProperties": true,
505
- "title": "Custom Validation Messages"
506
- }
507
- },
508
- "additionalProperties": true,
509
- "title": "Options"
510
- },
511
- "schema": {
512
- "type": "object",
513
- "description": "Validation rules for the component",
514
- "default": {},
515
- "properties": {
516
- "min": {
517
- "type": "number",
518
- "description": "Minimum value or length for validation",
519
- "title": "Min"
903
+ "title": "Schema"
520
904
  },
521
- "max": {
522
- "type": "number",
523
- "description": "Maximum value or length for validation",
524
- "title": "Max"
905
+ "id": {
906
+ "type": "string",
907
+ "description": "Unique identifier for the component",
908
+ "format": "uuid",
909
+ "title": "Id"
525
910
  },
526
- "length": {
527
- "type": "number",
528
- "description": "Exact length required for validation",
529
- "title": "Length"
911
+ "list": {
912
+ "description": "List id reference to a predefined list of options for select components",
913
+ "const": {
914
+ "ref": {
915
+ "path": [
916
+ "lists"
917
+ ],
918
+ "ancestor": "root",
919
+ "in": true
920
+ }
921
+ },
922
+ "title": "List"
530
923
  }
531
924
  },
925
+ "required": [
926
+ "type"
927
+ ],
532
928
  "additionalProperties": true,
533
- "title": "Schema"
534
- },
535
- "id": {
536
- "type": "string",
537
- "description": "Unique identifier for the component",
538
- "format": "uuid",
539
- "title": "Id"
929
+ "title": "Components (array) Item"
540
930
  },
541
- "list": {
542
- "description": "List id reference to a predefined list of options for select components",
543
- "const": {
544
- "ref": {
545
- "path": [
546
- "lists"
547
- ],
548
- "ancestor": "root",
549
- "in": true
550
- }
551
- },
552
- "title": "List"
553
- }
554
- },
555
- "required": [
556
- "type"
557
- ],
558
- "additionalProperties": true,
559
- "title": "Components Item"
560
- },
561
- "title": "Components"
931
+ "title": "Components (array)"
932
+ }
933
+ ],
934
+ "title": "Components",
935
+ "description": "The components value.",
936
+ "anyOfTitles": [
937
+ "Components (array)",
938
+ "Components (array)"
939
+ ]
562
940
  },
563
941
  "condition": {
564
942
  "description": "Optional condition that determines if this page is shown",