@defra/forms-model 3.0.667 → 3.0.669
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/dist/module/components/enums.js +6 -0
- package/dist/module/components/enums.js.map +1 -1
- package/dist/module/components/index.js +1 -1
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/types.js.map +1 -1
- package/dist/module/form/form-editor/index.js +4 -2
- package/dist/module/form/form-editor/index.js.map +1 -1
- package/dist/module/form/form-editor/types.js.map +1 -1
- package/dist/types/components/enums.d.ts +5 -0
- package/dist/types/components/enums.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +2 -1
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/form/form-editor/index.d.ts +2 -0
- package/dist/types/form/form-editor/index.d.ts.map +1 -1
- package/dist/types/form/form-editor/types.d.ts +6 -2
- package/dist/types/form/form-editor/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/enums.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/components/types.ts +2 -0
- package/src/form/form-editor/index.ts +8 -1
- package/src/form/form-editor/types.ts +10 -1
|
@@ -35,6 +35,12 @@ export let GeospatialFieldOptionsCountryEnum = /*#__PURE__*/function (Geospatial
|
|
|
35
35
|
GeospatialFieldOptionsCountryEnum["Wales"] = "wales";
|
|
36
36
|
return GeospatialFieldOptionsCountryEnum;
|
|
37
37
|
}({});
|
|
38
|
+
export let GeospatialFieldGeometryTypesEnum = /*#__PURE__*/function (GeospatialFieldGeometryTypesEnum) {
|
|
39
|
+
GeospatialFieldGeometryTypesEnum["Point"] = "point";
|
|
40
|
+
GeospatialFieldGeometryTypesEnum["Line"] = "line";
|
|
41
|
+
GeospatialFieldGeometryTypesEnum["Shape"] = "shape";
|
|
42
|
+
return GeospatialFieldGeometryTypesEnum;
|
|
43
|
+
}({});
|
|
38
44
|
export const PreviewTypeEnum = {
|
|
39
45
|
...ComponentType,
|
|
40
46
|
Question: 'Question',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","names":["ComponentType","GeospatialFieldOptionsCountryEnum","PreviewTypeEnum","Question","ListSortable"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List',\n Markdown = 'Markdown',\n FileUploadField = 'FileUploadField',\n DeclarationField = 'DeclarationField',\n EastingNorthingField = 'EastingNorthingField',\n OsGridRefField = 'OsGridRefField',\n NationalGridFieldNumberField = 'NationalGridFieldNumberField',\n LatLongField = 'LatLongField',\n HiddenField = 'HiddenField',\n PaymentField = 'PaymentField',\n GeospatialField = 'GeospatialField'\n}\n\nexport enum GeospatialFieldOptionsCountryEnum {\n England = 'england',\n NorthernIreland = 'northern-ireland',\n Scotland = 'scotland',\n Wales = 'wales'\n}\n\nexport const PreviewTypeEnum = {\n ...ComponentType,\n Question: 'Question',\n ListSortable: 'ListSortable'\n} as Record<string, string>\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AA8BzB,WAAYC,iCAAiC,0BAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAA,OAAjCA,iCAAiC;AAAA;AAO7C,OAAO,MAAMC,eAAe,GAAG;EAC7B,
|
|
1
|
+
{"version":3,"file":"enums.js","names":["ComponentType","GeospatialFieldOptionsCountryEnum","GeospatialFieldGeometryTypesEnum","PreviewTypeEnum","Question","ListSortable"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List',\n Markdown = 'Markdown',\n FileUploadField = 'FileUploadField',\n DeclarationField = 'DeclarationField',\n EastingNorthingField = 'EastingNorthingField',\n OsGridRefField = 'OsGridRefField',\n NationalGridFieldNumberField = 'NationalGridFieldNumberField',\n LatLongField = 'LatLongField',\n HiddenField = 'HiddenField',\n PaymentField = 'PaymentField',\n GeospatialField = 'GeospatialField'\n}\n\nexport enum GeospatialFieldOptionsCountryEnum {\n England = 'england',\n NorthernIreland = 'northern-ireland',\n Scotland = 'scotland',\n Wales = 'wales'\n}\n\nexport enum GeospatialFieldGeometryTypesEnum {\n Point = 'point',\n Line = 'line',\n Shape = 'shape'\n}\n\nexport const PreviewTypeEnum = {\n ...ComponentType,\n Question: 'Question',\n ListSortable: 'ListSortable'\n} as Record<string, string>\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AA8BzB,WAAYC,iCAAiC,0BAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAA,OAAjCA,iCAAiC;AAAA;AAO7C,WAAYC,gCAAgC,0BAAhCA,gCAAgC;EAAhCA,gCAAgC;EAAhCA,gCAAgC;EAAhCA,gCAAgC;EAAA,OAAhCA,gCAAgC;AAAA;AAM5C,OAAO,MAAMC,eAAe,GAAG;EAC7B,GAAGH,aAAa;EAChBI,QAAQ,EAAE,UAAU;EACpBC,YAAY,EAAE;AAChB,CAA2B","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ComponentTypes } from "./component-types.js";
|
|
2
|
-
export { ComponentType, GeospatialFieldOptionsCountryEnum, PreviewTypeEnum } from "./enums.js";
|
|
2
|
+
export { ComponentType, GeospatialFieldGeometryTypesEnum, GeospatialFieldOptionsCountryEnum, PreviewTypeEnum } from "./enums.js";
|
|
3
3
|
export { allDocumentTypes, allImageTypes, allTabularDataTypes } from "./file-types.js";
|
|
4
4
|
export { getComponentDefaults, hasConditionSupport, hasContent, hasContentField, hasFormField, hasHint, hasInputField, hasListField, hasSelectionFields, hasTitle, isConditionalRevealType, isConditionalType, isContentType, isFormType, isListType } from "./helpers.js";
|
|
5
5
|
export { getYesNoList, yesNoListId, yesNoListName, yesNoListNoItemId, yesNoListYesItemId } from "./yes-no-helper.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ComponentTypes","ComponentType","GeospatialFieldOptionsCountryEnum","PreviewTypeEnum","allDocumentTypes","allImageTypes","allTabularDataTypes","getComponentDefaults","hasConditionSupport","hasContent","hasContentField","hasFormField","hasHint","hasInputField","hasListField","hasSelectionFields","hasTitle","isConditionalRevealType","isConditionalType","isContentType","isFormType","isListType","getYesNoList","yesNoListId","yesNoListName","yesNoListNoItemId","yesNoListYesItemId"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport {\n ComponentType,\n GeospatialFieldOptionsCountryEnum,\n PreviewTypeEnum\n} from '~/src/components/enums.js'\nexport {\n allDocumentTypes,\n allImageTypes,\n allTabularDataTypes\n} from '~/src/components/file-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContent,\n hasContentField,\n hasFormField,\n hasHint,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle,\n isConditionalRevealType,\n isConditionalType,\n isContentType,\n isFormType,\n isListType\n} from '~/src/components/helpers.js'\nexport {\n getYesNoList,\n yesNoListId,\n yesNoListName,\n yesNoListNoItemId,\n yesNoListYesItemId\n} from '~/src/components/yes-no-helper.js'\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SACEC,aAAa,EACbC,iCAAiC,EACjCC,eAAe;AAEjB,SACEC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB;AAErB,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ,EACRC,uBAAuB,EACvBC,iBAAiB,EACjBC,aAAa,EACbC,UAAU,EACVC,UAAU;AAEZ,SACEC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentTypes","ComponentType","GeospatialFieldGeometryTypesEnum","GeospatialFieldOptionsCountryEnum","PreviewTypeEnum","allDocumentTypes","allImageTypes","allTabularDataTypes","getComponentDefaults","hasConditionSupport","hasContent","hasContentField","hasFormField","hasHint","hasInputField","hasListField","hasSelectionFields","hasTitle","isConditionalRevealType","isConditionalType","isContentType","isFormType","isListType","getYesNoList","yesNoListId","yesNoListName","yesNoListNoItemId","yesNoListYesItemId"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport {\n ComponentType,\n GeospatialFieldGeometryTypesEnum,\n GeospatialFieldOptionsCountryEnum,\n PreviewTypeEnum\n} from '~/src/components/enums.js'\nexport {\n allDocumentTypes,\n allImageTypes,\n allTabularDataTypes\n} from '~/src/components/file-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContent,\n hasContentField,\n hasFormField,\n hasHint,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle,\n isConditionalRevealType,\n isConditionalType,\n isContentType,\n isFormType,\n isListType\n} from '~/src/components/helpers.js'\nexport {\n getYesNoList,\n yesNoListId,\n yesNoListName,\n yesNoListNoItemId,\n yesNoListYesItemId\n} from '~/src/components/yes-no-helper.js'\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SACEC,aAAa,EACbC,gCAAgC,EAChCC,iCAAiC,EACjCC,eAAe;AAEjB,SACEC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB;AAErB,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ,EACRC,uBAAuB,EACvBC,iBAAiB,EACjBC,aAAa,EACbC,UAAU,EACVC,UAAU;AAEZ,SACEC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type LanguageMessages } from 'joi'\n\nimport {\n type ComponentType,\n type PreviewTypeEnum\n} from '~/src/components/enums.js'\nimport {\n type ListTypeContent,\n type ListTypeOption\n} from '~/src/form/form-definition/types.js'\n\nexport type ConditionalComponentType = Exclude<\n ConditionalComponentsDef['type'],\n ContentComponentsDef\n>\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\n\ninterface FormFieldBase {\n id?: string\n type: FormComponentsDef['type']\n shortDescription?: string\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n customValidationMessages?: LanguageMessages\n instructionText?: string\n }\n}\n\ninterface ListFieldBase extends FormFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.RadiosField\n | ComponentType.SelectField\n list: string\n options: FormFieldBase['options'] & {\n type?: ListTypeContent\n }\n}\n\ninterface ContentFieldBase {\n id?: string\n type:\n | ComponentType.Details\n | ComponentType.Html\n | ComponentType.Markdown\n | ComponentType.InsetText\n | ComponentType.List\n name: string\n title: string\n options?: {\n required?: undefined\n optionalText?: undefined\n }\n}\n\ninterface DateFieldBase extends FormFieldBase {\n type: ComponentType.DatePartsField | ComponentType.MonthYearField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n }\n}\n\n// Text Fields\nexport interface TextFieldComponent extends FormFieldBase {\n type: ComponentType.TextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends FormFieldBase {\n type: ComponentType.EmailAddressField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends FormFieldBase {\n type: ComponentType.NumberField\n options: FormFieldBase['options'] & {\n prefix?: string\n suffix?: string\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n precision?: number\n minPrecision?: number\n minLength?: number\n maxLength?: number\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface FileUploadFieldComponent extends FormFieldBase {\n type: ComponentType.FileUploadField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n accept?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface YesNoFieldComponent extends FormFieldBase {\n type: ComponentType.YesNoField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface DeclarationFieldComponent extends FormFieldBase {\n type: ComponentType.DeclarationField\n content: string\n options: FormFieldBase['options'] & {\n condition?: string\n declarationConfirmationLabel?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends FormFieldBase {\n type: ComponentType.MultilineTextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface UkAddressFieldComponent extends FormFieldBase {\n type: ComponentType.UkAddressField\n options: FormFieldBase['options'] & {\n hideTitle?: boolean\n usePostcodeLookup?: boolean\n }\n}\n\n// Precise Location Fields\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n easting?: {\n min?: number\n max?: number\n }\n northing?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface OsGridRefFieldComponent extends FormFieldBase {\n type: ComponentType.OsGridRefField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NationalGridFieldNumberFieldComponent extends FormFieldBase {\n type: ComponentType.NationalGridFieldNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface LatLongFieldComponent extends FormFieldBase {\n type: ComponentType.LatLongField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n latitude?: {\n min?: number\n max?: number\n }\n longitude?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface HiddenFieldComponent extends FormFieldBase {\n type: ComponentType.HiddenField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface PaymentFieldComponent extends FormFieldBase {\n type: ComponentType.PaymentField\n options: FormFieldBase['options'] & {\n amount: number\n description: string\n conditionalAmounts?: {\n condition: string\n amount: number\n }[]\n emailField?: string\n }\n}\n\nexport type GeospatialFieldOptionsCountry =\n | 'england'\n | 'wales'\n | 'northern-ireland'\n | 'scotland'\n\nexport interface GeospatialFieldComponent extends FormFieldBase {\n type: ComponentType.GeospatialField\n options: FormFieldBase['options'] & {\n condition?: string\n countries?: GeospatialFieldOptionsCountry[]\n }\n schema?: {\n max?: number\n min?: number\n length?: number\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MarkdownComponent extends ContentFieldBase {\n type: ComponentType.Markdown\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n content: string\n}\n\nexport interface ListComponent extends ContentFieldBase {\n type: ComponentType.List\n hint?: string\n list: string\n options: ContentFieldBase['options'] & {\n type?: ListTypeOption\n classes?: string\n hideTitle?: boolean\n bold?: boolean\n }\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n schema?: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n }\n}\n\nexport type ComponentDef = FormComponentsDef | ContentComponentsDef\n\n// Components that render form fields\nexport type FormComponentsDef =\n | InputFieldsComponentsDef\n | SelectionComponentsDef\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | MonthYearFieldComponent\n | DatePartsFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | DeclarationFieldComponent\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\n | HiddenFieldComponent\n | PaymentFieldComponent\n | GeospatialFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | MarkdownComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | Exclude<SelectionComponentsDef, YesNoFieldComponent>\n | ListComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have condition support\nexport type ConditionalComponentsDef = Exclude<\n ComponentDef,\n | InsetTextComponent\n | ListComponent\n | MonthYearFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | PaymentFieldComponent\n>\n\nexport type PreviewType = keyof typeof PreviewTypeEnum\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type LanguageMessages } from 'joi'\n\nimport {\n type ComponentType,\n type GeospatialFieldGeometryTypesEnum,\n type PreviewTypeEnum\n} from '~/src/components/enums.js'\nimport {\n type ListTypeContent,\n type ListTypeOption\n} from '~/src/form/form-definition/types.js'\n\nexport type ConditionalComponentType = Exclude<\n ConditionalComponentsDef['type'],\n ContentComponentsDef\n>\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\n\ninterface FormFieldBase {\n id?: string\n type: FormComponentsDef['type']\n shortDescription?: string\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n customValidationMessages?: LanguageMessages\n instructionText?: string\n }\n}\n\ninterface ListFieldBase extends FormFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.RadiosField\n | ComponentType.SelectField\n list: string\n options: FormFieldBase['options'] & {\n type?: ListTypeContent\n }\n}\n\ninterface ContentFieldBase {\n id?: string\n type:\n | ComponentType.Details\n | ComponentType.Html\n | ComponentType.Markdown\n | ComponentType.InsetText\n | ComponentType.List\n name: string\n title: string\n options?: {\n required?: undefined\n optionalText?: undefined\n }\n}\n\ninterface DateFieldBase extends FormFieldBase {\n type: ComponentType.DatePartsField | ComponentType.MonthYearField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n }\n}\n\n// Text Fields\nexport interface TextFieldComponent extends FormFieldBase {\n type: ComponentType.TextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends FormFieldBase {\n type: ComponentType.EmailAddressField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends FormFieldBase {\n type: ComponentType.NumberField\n options: FormFieldBase['options'] & {\n prefix?: string\n suffix?: string\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n precision?: number\n minPrecision?: number\n minLength?: number\n maxLength?: number\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface FileUploadFieldComponent extends FormFieldBase {\n type: ComponentType.FileUploadField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n accept?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface YesNoFieldComponent extends FormFieldBase {\n type: ComponentType.YesNoField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface DeclarationFieldComponent extends FormFieldBase {\n type: ComponentType.DeclarationField\n content: string\n options: FormFieldBase['options'] & {\n condition?: string\n declarationConfirmationLabel?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends FormFieldBase {\n type: ComponentType.MultilineTextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface UkAddressFieldComponent extends FormFieldBase {\n type: ComponentType.UkAddressField\n options: FormFieldBase['options'] & {\n hideTitle?: boolean\n usePostcodeLookup?: boolean\n }\n}\n\n// Precise Location Fields\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n easting?: {\n min?: number\n max?: number\n }\n northing?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface OsGridRefFieldComponent extends FormFieldBase {\n type: ComponentType.OsGridRefField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NationalGridFieldNumberFieldComponent extends FormFieldBase {\n type: ComponentType.NationalGridFieldNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface LatLongFieldComponent extends FormFieldBase {\n type: ComponentType.LatLongField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n latitude?: {\n min?: number\n max?: number\n }\n longitude?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface HiddenFieldComponent extends FormFieldBase {\n type: ComponentType.HiddenField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface PaymentFieldComponent extends FormFieldBase {\n type: ComponentType.PaymentField\n options: FormFieldBase['options'] & {\n amount: number\n description: string\n conditionalAmounts?: {\n condition: string\n amount: number\n }[]\n emailField?: string\n }\n}\n\nexport type GeospatialFieldOptionsCountry =\n | 'england'\n | 'wales'\n | 'northern-ireland'\n | 'scotland'\n\nexport interface GeospatialFieldComponent extends FormFieldBase {\n type: ComponentType.GeospatialField\n options: FormFieldBase['options'] & {\n condition?: string\n countries?: GeospatialFieldOptionsCountry[]\n geometryTypes?: GeospatialFieldGeometryTypesEnum[]\n }\n schema?: {\n max?: number\n min?: number\n length?: number\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MarkdownComponent extends ContentFieldBase {\n type: ComponentType.Markdown\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n content: string\n}\n\nexport interface ListComponent extends ContentFieldBase {\n type: ComponentType.List\n hint?: string\n list: string\n options: ContentFieldBase['options'] & {\n type?: ListTypeOption\n classes?: string\n hideTitle?: boolean\n bold?: boolean\n }\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n schema?: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n }\n}\n\nexport type ComponentDef = FormComponentsDef | ContentComponentsDef\n\n// Components that render form fields\nexport type FormComponentsDef =\n | InputFieldsComponentsDef\n | SelectionComponentsDef\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | MonthYearFieldComponent\n | DatePartsFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | DeclarationFieldComponent\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\n | HiddenFieldComponent\n | PaymentFieldComponent\n | GeospatialFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | MarkdownComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | Exclude<SelectionComponentsDef, YesNoFieldComponent>\n | ListComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have condition support\nexport type ConditionalComponentsDef = Exclude<\n ComponentDef,\n | InsetTextComponent\n | ListComponent\n | MonthYearFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | PaymentFieldComponent\n>\n\nexport type PreviewType = keyof typeof PreviewTypeEnum\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { rtrimOnly } from "../../common/rtrim-only.js";
|
|
3
|
-
import { ComponentType, GeospatialFieldOptionsCountryEnum } from "../../components/enums.js";
|
|
3
|
+
import { ComponentType, GeospatialFieldGeometryTypesEnum, GeospatialFieldOptionsCountryEnum } from "../../components/enums.js";
|
|
4
4
|
import { MAX_NUMBER_OF_REPEAT_ITEMS, MIN_NUMBER_OF_REPEAT_ITEMS } from "../form-definition/constants.js";
|
|
5
5
|
import { preventUnicodeInEmail } from "../utils/prevent-unicode.js";
|
|
6
6
|
export const emailAddressNoUnicodeSchema = Joi.string().trim().email({
|
|
@@ -81,6 +81,7 @@ export const countriesSchema = Joi.array().items(Joi.string().valid(...Object.va
|
|
|
81
81
|
export const exactFeaturesSchema = Joi.number().empty('').integer().min(1).description('Specifies the exact number of features required to be defined.');
|
|
82
82
|
export const minFeaturesSchema = Joi.number().empty('').integer().min(1).description('Minimum number of features required to be defined.');
|
|
83
83
|
export const maxFeaturesSchema = Joi.number().empty('').integer().min(1).description('Maximum number of features allowed to be defined.');
|
|
84
|
+
export const geometryTypesSchema = Joi.array().items(Joi.string().valid(...Object.values(GeospatialFieldGeometryTypesEnum))).single().description('The geometry types allowed in a geospatial field');
|
|
84
85
|
export const customValidator = Joi.extend(joi => {
|
|
85
86
|
return {
|
|
86
87
|
type: 'dsv',
|
|
@@ -237,7 +238,8 @@ export const questionDetailsFullSchema = {
|
|
|
237
238
|
countriesSchema,
|
|
238
239
|
minFeaturesSchema,
|
|
239
240
|
maxFeaturesSchema,
|
|
240
|
-
exactFeaturesSchema
|
|
241
|
+
exactFeaturesSchema,
|
|
242
|
+
geometryTypesSchema
|
|
241
243
|
};
|
|
242
244
|
export const formEditorInputPageKeys = {
|
|
243
245
|
pageType: pageTypeSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","rtrimOnly","ComponentType","GeospatialFieldOptionsCountryEnum","MAX_NUMBER_OF_REPEAT_ITEMS","MIN_NUMBER_OF_REPEAT_ITEMS","preventUnicodeInEmail","emailAddressNoUnicodeSchema","string","trim","email","tlds","allow","custom","value","helpers","description","UNICODE_EMAIL_ERROR_MESSAGE","QuestionTypeSubGroup","pageTypeSchema","required","valid","questionTypeSchema","WrittenAnswerSubGroup","DateSubGroup","LocationSubGroup","UkAddressField","TelephoneNumberField","FileUploadField","EmailAddressField","DeclarationField","ListSubGroup","YesNoField","CheckboxesField","RadiosField","AutocompleteField","PaymentField","GeospatialField","questionTypeFullSchema","TextField","MultilineTextField","NumberField","DatePartsField","MonthYearField","SelectField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","writtenAnswerSubSchema","dateSubSchema","listSubSchema","locationSubSchema","nameSchema","questionSchema","hintTextSchema","optional","instructionTextSchema","questionOptionalSchema","listForQuestionSchema","listItemCountSchema","number","listItemsDataSchema","exactFilesSchema","empty","integer","min","max","minFilesSchema","maxFilesSchema","fileTypesSchema","array","items","single","default","documentTypesSchema","imageTypesSchema","tabularDataTypesSchema","enhancedActionSchema","radioIdSchema","radioTextSchema","radioHintSchema","radioValueSchema","shortDescriptionSchema","pageHeadingAndGuidanceSchema","pageHeadingSchema","guidanceTextSchema","exitPageSchema","boolean","repeaterSchema","minItemsSchema","maxItemsSchema","questionSetNameSchema","needDeclarationSchema","declarationTextSchema","disableConfirmationEmailSchema","enableReferenceNumberSchema","disableUserFeedbackSchema","minSchema","maxSchema","minLengthSchema","maxLengthSchema","maxFutureSchema","maxPastSchema","precisionSchema","prefixSchema","regexSchema","rowsSchema","suffixSchema","classesSchema","jsEnabledSchema","usePostcodeLookupSchema","paymentDescriptionSchema","paymentAmountSchema","paymentApiKeySchema","exactChecksSchema","minChecksSchema","maxChecksSchema","countriesSchema","Object","values","exactFeaturesSchema","minFeaturesSchema","maxFeaturesSchema","customValidator","extend","joi","type","base","messages","coerce","from","method","rowSeparatorRule","schema","$_getRule","colSeparatorRule","keysRule","rowSeparator","args","rows","split","map","v","filter","Boolean","colSeparator","keys","coercedValue","row","reduce","acc","col","idx","_err","console","error","errors","rules","convert","alias","$_addRule","name","ref","assert","RegExp","message","Array","isArray","every","k","autoCompleteOptionsSchema","dsv","object","text","disallow","parent","unique","ignoreUndefined","questionDetailsFullSchema","formEditorInputPageKeys","pageType","questionType","formEditorInputPageSchema","formEditorInputheckAnswersSettingsKeys","declarationText","formEditorInputCheckAnswersSettingSchema","formEditorInputQuestionKeys","question","shortDescription","hintText","questionOptional","formEditorInputQuestionSchema","formEditorInputPageSettingsKeys","pageHeadingAndGuidance","pageHeading","guidanceText","formEditorInputPageSettingsSchema","govukFieldValueIsString","govukField","includes","govukFieldIsChecked","checkedValue","checked","allowedErrorTemplateFunctions"],"sources":["../../../../src/form/form-editor/index.ts"],"sourcesContent":["import Joi, { type ArraySchema, type GetRuleOptions } from 'joi'\n\nimport { rtrimOnly } from '~/src/common/rtrim-only.js'\nimport {\n ComponentType,\n GeospatialFieldOptionsCountryEnum\n} from '~/src/components/enums.js'\nimport {\n MAX_NUMBER_OF_REPEAT_ITEMS,\n MIN_NUMBER_OF_REPEAT_ITEMS\n} from '~/src/form/form-definition/constants.js'\nimport {\n type FormEditorInputCheckAnswersSettings,\n type FormEditorInputPage,\n type FormEditorInputPageSettings,\n type FormEditorInputQuestion,\n type GovukField,\n type GovukFieldQuestionOptional,\n type GovukFieldUsePostcodeLookup,\n type GovukStringField\n} from '~/src/form/form-editor/types.js'\nimport { preventUnicodeInEmail } from '~/src/form/utils/prevent-unicode.js'\n\nexport const emailAddressNoUnicodeSchema = Joi.string()\n .trim()\n .email({ tlds: { allow: false } })\n .custom((value, helpers) => preventUnicodeInEmail(value, helpers))\n .description('Email address preventing unicode characters')\n\nexport const UNICODE_EMAIL_ERROR_MESSAGE =\n 'The email address you entered includes invalid characters, for example, long dashes'\n\nexport enum QuestionTypeSubGroup {\n WrittenAnswerSubGroup = 'writtenAnswerSub',\n DateSubGroup = 'dateSub',\n ListSubGroup = 'listSub',\n LocationSubGroup = 'locationSub'\n}\n\nexport const pageTypeSchema = Joi.string()\n .required()\n .valid('question', 'guidance')\n .description('Type of page - either a question page or guidance page')\n\nexport const questionTypeSchema = Joi.string()\n .required()\n .valid(\n QuestionTypeSubGroup.WrittenAnswerSubGroup,\n QuestionTypeSubGroup.DateSubGroup,\n QuestionTypeSubGroup.LocationSubGroup,\n ComponentType.UkAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.FileUploadField,\n ComponentType.EmailAddressField,\n ComponentType.DeclarationField,\n QuestionTypeSubGroup.ListSubGroup,\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField,\n ComponentType.PaymentField,\n ComponentType.GeospatialField\n )\n .description('The high-level type of question, including grouped types')\n\nexport const questionTypeFullSchema = Joi.string()\n .required()\n .valid(\n ComponentType.TextField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField,\n ComponentType.DatePartsField,\n ComponentType.MonthYearField,\n ComponentType.UkAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.FileUploadField,\n ComponentType.EmailAddressField,\n ComponentType.DeclarationField,\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField,\n ComponentType.SelectField,\n ComponentType.EastingNorthingField,\n ComponentType.OsGridRefField,\n ComponentType.NationalGridFieldNumberField,\n ComponentType.LatLongField,\n ComponentType.PaymentField,\n ComponentType.GeospatialField\n )\n .description('The specific component type to use for this question')\n\nexport const writtenAnswerSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.TextField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField\n )\n .description('Subtype for written answer questions')\n\nexport const dateSubSchema = Joi.string()\n .required()\n .valid(ComponentType.DatePartsField, ComponentType.MonthYearField)\n .description('Subtype for date-related questions')\n\nexport const listSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField,\n ComponentType.SelectField\n )\n .description('Subtype for list-related questions')\n\nexport const locationSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.UkAddressField,\n ComponentType.EastingNorthingField,\n ComponentType.OsGridRefField,\n ComponentType.NationalGridFieldNumberField,\n ComponentType.LatLongField,\n ComponentType.GeospatialField\n )\n .description('Subtype for location-related questions')\n\nexport const nameSchema = Joi.string()\n .trim()\n .required()\n .description('Unique identifier for the field')\n\nexport const questionSchema = Joi.string()\n .trim()\n .required()\n .description('The question text displayed to the user')\n\nexport const hintTextSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Optional guidance text displayed below the question')\n\nexport const instructionTextSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'Optional instruction text with markdown support to help users answer the question'\n )\n\nexport const questionOptionalSchema = Joi.string()\n .trim()\n .optional()\n .valid('', 'true')\n .description(\n 'Indicates whether a question is optional. Empty string or \"true\" values are accepted.'\n )\n\nexport const listForQuestionSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Unique identifier for the list used by the field')\n\nexport const listItemCountSchema = Joi.number()\n .optional()\n .description('Number of list items in the list used by the field')\n\nexport const listItemsDataSchema = Joi.string()\n .allow('')\n .description('List items in JSON format, such as for radios or checkboxes.')\n\nexport const exactFilesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .max(25)\n .description(\n 'Specifies the exact number of files required for upload. Must be between 1 and 25.'\n )\n\nexport const minFilesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .max(25)\n .description(\n 'Minimum number of files required for upload. Must be between 1 and 25.'\n )\n\nexport const maxFilesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .max(25)\n .description(\n 'Maximum number of files allowed for upload. Must be between 1 and 25.'\n )\n\nexport const fileTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n .description(\n 'Array of allowed file types. Can be provided as a single value or an array.'\n )\n\nexport const documentTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n .description(\n 'Array of allowed document types. Can be provided as a single value or an array.'\n )\n\nexport const imageTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n .description(\n 'Array of allowed image types. Can be provided as a single value or an array.'\n )\n\nexport const tabularDataTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n\nexport const enhancedActionSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Action field that can include enhanced functionality')\n\nexport const radioIdSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Unique identifier for radio options')\n\nexport const radioTextSchema = Joi.string()\n .trim()\n .required()\n .description('The visible text shown next to radio options')\n\nexport const radioHintSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'Optional hint text displayed with radio buttons to provide additional guidance'\n )\n\nexport const radioValueSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'Array of allowed tabular data types. Can be provided as a single value or an array.'\n )\n\nexport const shortDescriptionSchema = Joi.string()\n .custom(rtrimOnly)\n .required()\n .description('Brief description of the question for internal use')\n\nexport const pageHeadingAndGuidanceSchema = Joi.string()\n .trim()\n .optional()\n .description('Combined heading and guidance for the page')\n\nexport const pageHeadingSchema = Joi.string()\n .trim()\n .required()\n .description('Main heading displayed at the top of the page')\n\nexport const guidanceTextSchema = Joi.string()\n .trim()\n .description('Guidance text to assist users in completing the page')\n\nexport const exitPageSchema = Joi.boolean()\n .default(false)\n .optional()\n .description('Determines if page is set as an Exit Page')\n\nexport const repeaterSchema = Joi.string()\n .trim()\n .optional()\n .description(\n 'Combined min/max items and question set name for the repeater page'\n )\n\nexport const minItemsSchema = Joi.number()\n .empty('')\n .min(MIN_NUMBER_OF_REPEAT_ITEMS)\n .description('The minimum number of repeater items')\n\nexport const maxItemsSchema = Joi.number()\n .empty('')\n .max(MAX_NUMBER_OF_REPEAT_ITEMS)\n .description('The maximum number of repeater items')\n\nexport const questionSetNameSchema = Joi.string()\n .trim()\n .description('The repeater question set name')\n\nexport const needDeclarationSchema = Joi.string()\n .trim()\n .required()\n .description('Whether a declaration is needed')\n\nexport const declarationTextSchema = Joi.string()\n .trim()\n .required()\n .description('Text of the declaration that users must agree to')\n\nexport const disableConfirmationEmailSchema = Joi.boolean()\n .valid(true)\n .description('Whether confirmation emails should be disabled')\n\nexport const enableReferenceNumberSchema = Joi.boolean()\n .valid(true)\n .description('Whether reference number should be enabled')\n\nexport const disableUserFeedbackSchema = Joi.boolean()\n .valid(true)\n .description('Whether user feedback should be disabled')\n\nexport const minSchema = Joi.number()\n .empty('')\n .integer()\n .description('Minimum value for numeric inputs')\n\nexport const maxSchema = Joi.number()\n .empty('')\n .integer()\n .description('Maximum value for numeric inputs')\n\nexport const minLengthSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Minimum character length for text inputs')\n\nexport const maxLengthSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Maximum character length for text inputs')\n\nexport const maxFutureSchema = Joi.number()\n .empty('')\n .integer()\n .min(0)\n .description('Maximum days in the future allowed for date inputs')\n\nexport const maxPastSchema = Joi.number()\n .empty('')\n .integer()\n .min(0)\n .description('Maximum days in the past allowed for date inputs')\n\nexport const precisionSchema = Joi.number()\n .empty('')\n .integer()\n .min(0)\n .description('Decimal precision for numeric inputs')\n\nexport const prefixSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Text to display before the input (e.g., £)')\n\nexport const regexSchema = Joi.string()\n .optional()\n .allow('')\n .description('Regular expression pattern for validation')\n\nexport const rowsSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Number of rows for multiline text fields')\n\nexport const suffixSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Text to display after the input (e.g., kg)')\n\nexport const classesSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Custom CSS classes to apply to the component')\n\nexport const jsEnabledSchema = Joi.string()\n .trim()\n .optional()\n .allow('false', 'true')\n .description('Flag to show if Javascript is enabled or not')\n\nexport const usePostcodeLookupSchema = Joi.string()\n .trim()\n .optional()\n .valid('', 'true')\n .description(\n 'Indicates whether a UK address component supports postcode lookup. Empty string or \"true\" values are accepted.'\n )\n\nexport const paymentDescriptionSchema = Joi.string()\n .trim()\n .max(230)\n .required()\n .description('Description of payment - appears in payment providers pages')\n\nexport const paymentAmountSchema = Joi.number()\n .empty('')\n .min(0)\n .max(100000)\n .description('Amount of payment in pounds')\n\nexport const paymentApiKeySchema = Joi.string()\n .trim()\n .description('API key for payment configuration')\n\nexport const exactChecksSchema = Joi.number()\n .empty('')\n .integer()\n .min(2)\n .description('Specifies the exact number of items required to be selected.')\n\nexport const minChecksSchema = Joi.number()\n .empty('')\n .integer()\n .min(2)\n .description('Minimum number of items required to be selected.')\n\nexport const maxChecksSchema = Joi.number()\n .empty('')\n .integer()\n .min(2)\n .description('Maximum number of items allowed to be selected.')\n\nexport const countriesSchema = Joi.array()\n .items(\n Joi.string().valid(\n ...Object.values(GeospatialFieldOptionsCountryEnum),\n 'any'\n )\n )\n .single()\n .description('The country to be included in a geospatial field')\n\nexport const exactFeaturesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Specifies the exact number of features required to be defined.')\n\nexport const minFeaturesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Minimum number of features required to be defined.')\n\nexport const maxFeaturesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Maximum number of features allowed to be defined.')\n\ntype GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {\n args: Record<K, T>\n}\n\ninterface DSLSchema<TSchema = Record<string, unknown>[]>\n extends ArraySchema<TSchema> {\n rowSeparator: (rowSep: string | RegExp) => DSLSchema<TSchema>\n row: (rowSep: string | RegExp) => DSLSchema<TSchema>\n colSeparator: (colSep: string | RegExp) => DSLSchema<TSchema>\n col: (colSep: string | RegExp) => DSLSchema<TSchema>\n keys: (keys: string[]) => DSLSchema<TSchema>\n}\n\ninterface CustomValidator extends Joi.Root {\n dsv<TSchema>(): DSLSchema<TSchema>\n}\n\nexport const customValidator = Joi.extend((joi: Joi.Root) => {\n return {\n type: 'dsv',\n base: joi.array(),\n messages: {\n 'dsv.invalid': 'Invalid parse string'\n },\n coerce: {\n from: 'string',\n method(value: string, helpers) {\n try {\n // Only called when prefs.convert is true\n // Rules\n const rowSeparatorRule = helpers.schema.$_getRule('rowSeparator') as\n | undefined\n | GenericRuleOptions<'rowSeparator', string | RegExp>\n const colSeparatorRule = helpers.schema.$_getRule('colSeparator') as\n | undefined\n | GenericRuleOptions<'colSeparator', string | RegExp>\n const keysRule = helpers.schema.$_getRule('keys') as\n | undefined\n | GenericRuleOptions<'keys', string[]>\n\n // Rows\n const rowSeparator = rowSeparatorRule?.args.rowSeparator ?? /\\r?\\n/\n const rows = value\n .split(rowSeparator)\n .map((v) => v.trim())\n .filter(Boolean)\n\n // Columns\n const colSeparator = colSeparatorRule?.args.colSeparator ?? ','\n const keys = keysRule?.args.keys ?? ['key', 'value']\n\n const coercedValue = rows.map((row) => {\n return row\n .split(colSeparator)\n .reduce<Record<string, string>>((acc, col, idx) => {\n return {\n ...acc,\n [keys[idx]]: col.trim()\n }\n }, {})\n })\n return { value: coercedValue }\n } catch (_err) {\n // eslint-disable-next-line no-console\n console.error(_err)\n return { value, errors: [helpers.error('dsv.invalid')] }\n }\n }\n },\n rules: {\n rowSeparator: {\n convert: true,\n alias: 'row',\n method(rowSeparator: string) {\n return this.$_addRule({\n name: 'rowSeparator',\n args: { rowSeparator }\n })\n },\n args: [\n {\n name: 'rowSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n colSeparator: {\n convert: true,\n alias: 'col',\n method(colSeparator: string) {\n return this.$_addRule({\n name: 'colSeparator',\n args: { colSeparator }\n })\n },\n args: [\n {\n name: 'colSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n keys: {\n convert: true,\n method(keys: string[]) {\n return this.$_addRule({ name: 'keys', args: { keys } })\n },\n args: [\n {\n name: 'keys',\n ref: true,\n assert: (value) =>\n Array.isArray(value) && value.every((k) => typeof k === 'string'),\n message: 'must be an array of strings'\n }\n ]\n }\n }\n }\n}) as CustomValidator\n\nexport const autoCompleteOptionsSchema = customValidator\n .dsv<{ text: string; value: string }[]>()\n .row(/\\r?\\n/)\n .col(':')\n .keys(['text', 'value'])\n .items(\n customValidator.object({\n text: customValidator.string().min(1).disallow('').required(),\n value: customValidator\n .string()\n .default((parent: { text: string; value?: string }) => parent.text)\n .min(1)\n .disallow('')\n })\n )\n .min(1)\n .unique('text')\n .unique('value', { ignoreUndefined: true })\n .required()\n\nexport const questionDetailsFullSchema = {\n autoCompleteOptionsSchema,\n classesSchema,\n declarationTextSchema,\n documentTypesSchema,\n enhancedActionSchema,\n exactFilesSchema,\n fileTypesSchema,\n hintTextSchema,\n imageTypesSchema,\n instructionTextSchema,\n jsEnabledSchema,\n listForQuestionSchema,\n listItemCountSchema,\n listItemsDataSchema,\n maxFilesSchema,\n maxFutureSchema,\n maxLengthSchema,\n maxPastSchema,\n maxSchema,\n minFilesSchema,\n minLengthSchema,\n minSchema,\n nameSchema,\n paymentAmountSchema,\n paymentApiKeySchema,\n paymentDescriptionSchema,\n precisionSchema,\n prefixSchema,\n questionOptionalSchema,\n questionSchema,\n questionTypeFullSchema,\n radioHintSchema,\n radioIdSchema,\n radioTextSchema,\n radioValueSchema,\n regexSchema,\n rowsSchema,\n shortDescriptionSchema,\n suffixSchema,\n tabularDataTypesSchema,\n usePostcodeLookupSchema,\n minChecksSchema,\n maxChecksSchema,\n exactChecksSchema,\n countriesSchema,\n minFeaturesSchema,\n maxFeaturesSchema,\n exactFeaturesSchema\n}\n\nexport const formEditorInputPageKeys = {\n pageType: pageTypeSchema,\n questionType: questionTypeSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPage` interface\n * @see {@link FormEditorInputPage}\n */\nexport const formEditorInputPageSchema = Joi.object<FormEditorInputPage>()\n .keys(formEditorInputPageKeys)\n .required()\n .description('Input schema for creating a new page in the form editor')\n\nexport const formEditorInputheckAnswersSettingsKeys = {\n declarationText: shortDescriptionSchema\n}\n\n/**\n * Joi schema for `FormEditorInputCheckAnswersSettings` interface\n * @see {@link FormEditorInputCheckAnswersSettings}\n */\nexport const formEditorInputCheckAnswersSettingSchema =\n Joi.object<FormEditorInputCheckAnswersSettings>()\n .keys(formEditorInputheckAnswersSettingsKeys)\n .required()\n .description('Configuration for the check-answers page')\n\nexport const formEditorInputQuestionKeys = {\n question: questionSchema,\n shortDescription: shortDescriptionSchema,\n hintText: hintTextSchema,\n questionOptional: questionOptionalSchema\n}\n\n/**\n * Joi schema for `FormEditorInputQuestion` interface\n * @see {@link FormEditorInputQuestion}\n */\nexport const formEditorInputQuestionSchema =\n Joi.object<FormEditorInputQuestion>()\n .keys(formEditorInputQuestionKeys)\n .required()\n .description(\n 'Input schema for creating or updating a question in the form editor'\n )\n\nexport const formEditorInputPageSettingsKeys = {\n pageHeadingAndGuidance: pageHeadingAndGuidanceSchema,\n pageHeading: pageHeadingSchema,\n guidanceText: guidanceTextSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPageSettings` interface\n * @see {@link FormEditorInputPageSettings}\n */\nexport const formEditorInputPageSettingsSchema =\n Joi.object<FormEditorInputPageSettings>()\n .keys(formEditorInputPageSettingsKeys)\n .required()\n .description('Settings for page content and display in the form editor')\n\nexport function govukFieldValueIsString(\n govukField: GovukField\n): govukField is GovukStringField {\n return [\n 'question',\n 'hintText',\n 'shortDescription',\n 'autoCompleteOptions',\n 'classes',\n 'prefix',\n 'suffix',\n 'paymentAmount',\n 'paymentDescription'\n ].includes(`${govukField.name}`)\n}\n\nexport function govukFieldIsChecked(\n govukField: GovukField\n): govukField is GovukFieldQuestionOptional | GovukFieldUsePostcodeLookup {\n if (\n govukField.name !== 'questionOptional' &&\n govukField.name !== 'usePostcodeLookup'\n ) {\n return false\n }\n const checkedValue = govukField.items?.[0].checked\n return typeof checkedValue === 'boolean'\n}\n\n// A list of allowed template funtions for use within error message templates\nexport const allowedErrorTemplateFunctions = ['lowerFirst', 'capitalise']\n"],"mappings":"AAAA,OAAOA,GAAG,MAAiD,KAAK;AAEhE,SAASC,SAAS;AAClB,SACEC,aAAa,EACbC,iCAAiC;AAEnC,SACEC,0BAA0B,EAC1BC,0BAA0B;AAY5B,SAASC,qBAAqB;AAE9B,OAAO,MAAMC,2BAA2B,GAAGP,GAAG,CAACQ,MAAM,CAAC,CAAC,CACpDC,IAAI,CAAC,CAAC,CACNC,KAAK,CAAC;EAAEC,IAAI,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAC,CAAC,CACjCC,MAAM,CA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C,CACVJ,WAAW,CACV,qEACF,CAAC;AAEL,OAAO,MAAMiL,+BAA+B,GAAG;EAC7CC,sBAAsB,EAAE9G,4BAA4B;EACpD+G,WAAW,EAAE9G,iBAAiB;EAC9B+G,YAAY,EAAE9G;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAM+G,iCAAiC,GAC5CrM,GAAG,CAAC6K,MAAM,CAA8B,CAAC,CACtC1B,IAAI,CAAC8C,+BAA+B,CAAC,CACrC7K,QAAQ,CAAC,CAAC,CACVJ,WAAW,CAAC,0DAA0D,CAAC;AAE5E,OAAO,SAASsL,uBAAuBA,CACrCC,UAAsB,EACU;EAChC,OAAO,CACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,oBAAoB,CACrB,CAACC,QAAQ,CAAC,GAAGD,UAAU,CAACrC,IAAI,EAAE,CAAC;AAClC;AAEA,OAAO,SAASuC,mBAAmBA,CACjCF,UAAsB,EACkD;EACxE,IACEA,UAAU,CAACrC,IAAI,KAAK,kBAAkB,IACtCqC,UAAU,CAACrC,IAAI,KAAK,mBAAmB,EACvC;IACA,OAAO,KAAK;EACd;EACA,MAAMwC,YAAY,GAAGH,UAAU,CAAC/H,KAAK,GAAG,CAAC,CAAC,CAACmI,OAAO;EAClD,OAAO,OAAOD,YAAY,KAAK,SAAS;AAC1C;;AAEA;AACA,OAAO,MAAME,6BAA6B,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","rtrimOnly","ComponentType","GeospatialFieldGeometryTypesEnum","GeospatialFieldOptionsCountryEnum","MAX_NUMBER_OF_REPEAT_ITEMS","MIN_NUMBER_OF_REPEAT_ITEMS","preventUnicodeInEmail","emailAddressNoUnicodeSchema","string","trim","email","tlds","allow","custom","value","helpers","description","UNICODE_EMAIL_ERROR_MESSAGE","QuestionTypeSubGroup","pageTypeSchema","required","valid","questionTypeSchema","WrittenAnswerSubGroup","DateSubGroup","LocationSubGroup","UkAddressField","TelephoneNumberField","FileUploadField","EmailAddressField","DeclarationField","ListSubGroup","YesNoField","CheckboxesField","RadiosField","AutocompleteField","PaymentField","GeospatialField","questionTypeFullSchema","TextField","MultilineTextField","NumberField","DatePartsField","MonthYearField","SelectField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","writtenAnswerSubSchema","dateSubSchema","listSubSchema","locationSubSchema","nameSchema","questionSchema","hintTextSchema","optional","instructionTextSchema","questionOptionalSchema","listForQuestionSchema","listItemCountSchema","number","listItemsDataSchema","exactFilesSchema","empty","integer","min","max","minFilesSchema","maxFilesSchema","fileTypesSchema","array","items","single","default","documentTypesSchema","imageTypesSchema","tabularDataTypesSchema","enhancedActionSchema","radioIdSchema","radioTextSchema","radioHintSchema","radioValueSchema","shortDescriptionSchema","pageHeadingAndGuidanceSchema","pageHeadingSchema","guidanceTextSchema","exitPageSchema","boolean","repeaterSchema","minItemsSchema","maxItemsSchema","questionSetNameSchema","needDeclarationSchema","declarationTextSchema","disableConfirmationEmailSchema","enableReferenceNumberSchema","disableUserFeedbackSchema","minSchema","maxSchema","minLengthSchema","maxLengthSchema","maxFutureSchema","maxPastSchema","precisionSchema","prefixSchema","regexSchema","rowsSchema","suffixSchema","classesSchema","jsEnabledSchema","usePostcodeLookupSchema","paymentDescriptionSchema","paymentAmountSchema","paymentApiKeySchema","exactChecksSchema","minChecksSchema","maxChecksSchema","countriesSchema","Object","values","exactFeaturesSchema","minFeaturesSchema","maxFeaturesSchema","geometryTypesSchema","customValidator","extend","joi","type","base","messages","coerce","from","method","rowSeparatorRule","schema","$_getRule","colSeparatorRule","keysRule","rowSeparator","args","rows","split","map","v","filter","Boolean","colSeparator","keys","coercedValue","row","reduce","acc","col","idx","_err","console","error","errors","rules","convert","alias","$_addRule","name","ref","assert","RegExp","message","Array","isArray","every","k","autoCompleteOptionsSchema","dsv","object","text","disallow","parent","unique","ignoreUndefined","questionDetailsFullSchema","formEditorInputPageKeys","pageType","questionType","formEditorInputPageSchema","formEditorInputheckAnswersSettingsKeys","declarationText","formEditorInputCheckAnswersSettingSchema","formEditorInputQuestionKeys","question","shortDescription","hintText","questionOptional","formEditorInputQuestionSchema","formEditorInputPageSettingsKeys","pageHeadingAndGuidance","pageHeading","guidanceText","formEditorInputPageSettingsSchema","govukFieldValueIsString","govukField","includes","govukFieldIsChecked","checkedValue","checked","allowedErrorTemplateFunctions"],"sources":["../../../../src/form/form-editor/index.ts"],"sourcesContent":["import Joi, { type ArraySchema, type GetRuleOptions } from 'joi'\n\nimport { rtrimOnly } from '~/src/common/rtrim-only.js'\nimport {\n ComponentType,\n GeospatialFieldGeometryTypesEnum,\n GeospatialFieldOptionsCountryEnum\n} from '~/src/components/enums.js'\nimport {\n MAX_NUMBER_OF_REPEAT_ITEMS,\n MIN_NUMBER_OF_REPEAT_ITEMS\n} from '~/src/form/form-definition/constants.js'\nimport {\n type FormEditorInputCheckAnswersSettings,\n type FormEditorInputPage,\n type FormEditorInputPageSettings,\n type FormEditorInputQuestion,\n type GovukField,\n type GovukFieldQuestionOptional,\n type GovukFieldUsePostcodeLookup,\n type GovukStringField\n} from '~/src/form/form-editor/types.js'\nimport { preventUnicodeInEmail } from '~/src/form/utils/prevent-unicode.js'\n\nexport const emailAddressNoUnicodeSchema = Joi.string()\n .trim()\n .email({ tlds: { allow: false } })\n .custom((value, helpers) => preventUnicodeInEmail(value, helpers))\n .description('Email address preventing unicode characters')\n\nexport const UNICODE_EMAIL_ERROR_MESSAGE =\n 'The email address you entered includes invalid characters, for example, long dashes'\n\nexport enum QuestionTypeSubGroup {\n WrittenAnswerSubGroup = 'writtenAnswerSub',\n DateSubGroup = 'dateSub',\n ListSubGroup = 'listSub',\n LocationSubGroup = 'locationSub'\n}\n\nexport const pageTypeSchema = Joi.string()\n .required()\n .valid('question', 'guidance')\n .description('Type of page - either a question page or guidance page')\n\nexport const questionTypeSchema = Joi.string()\n .required()\n .valid(\n QuestionTypeSubGroup.WrittenAnswerSubGroup,\n QuestionTypeSubGroup.DateSubGroup,\n QuestionTypeSubGroup.LocationSubGroup,\n ComponentType.UkAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.FileUploadField,\n ComponentType.EmailAddressField,\n ComponentType.DeclarationField,\n QuestionTypeSubGroup.ListSubGroup,\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField,\n ComponentType.PaymentField,\n ComponentType.GeospatialField\n )\n .description('The high-level type of question, including grouped types')\n\nexport const questionTypeFullSchema = Joi.string()\n .required()\n .valid(\n ComponentType.TextField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField,\n ComponentType.DatePartsField,\n ComponentType.MonthYearField,\n ComponentType.UkAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.FileUploadField,\n ComponentType.EmailAddressField,\n ComponentType.DeclarationField,\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField,\n ComponentType.SelectField,\n ComponentType.EastingNorthingField,\n ComponentType.OsGridRefField,\n ComponentType.NationalGridFieldNumberField,\n ComponentType.LatLongField,\n ComponentType.PaymentField,\n ComponentType.GeospatialField\n )\n .description('The specific component type to use for this question')\n\nexport const writtenAnswerSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.TextField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField\n )\n .description('Subtype for written answer questions')\n\nexport const dateSubSchema = Joi.string()\n .required()\n .valid(ComponentType.DatePartsField, ComponentType.MonthYearField)\n .description('Subtype for date-related questions')\n\nexport const listSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField,\n ComponentType.SelectField\n )\n .description('Subtype for list-related questions')\n\nexport const locationSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.UkAddressField,\n ComponentType.EastingNorthingField,\n ComponentType.OsGridRefField,\n ComponentType.NationalGridFieldNumberField,\n ComponentType.LatLongField,\n ComponentType.GeospatialField\n )\n .description('Subtype for location-related questions')\n\nexport const nameSchema = Joi.string()\n .trim()\n .required()\n .description('Unique identifier for the field')\n\nexport const questionSchema = Joi.string()\n .trim()\n .required()\n .description('The question text displayed to the user')\n\nexport const hintTextSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Optional guidance text displayed below the question')\n\nexport const instructionTextSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'Optional instruction text with markdown support to help users answer the question'\n )\n\nexport const questionOptionalSchema = Joi.string()\n .trim()\n .optional()\n .valid('', 'true')\n .description(\n 'Indicates whether a question is optional. Empty string or \"true\" values are accepted.'\n )\n\nexport const listForQuestionSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Unique identifier for the list used by the field')\n\nexport const listItemCountSchema = Joi.number()\n .optional()\n .description('Number of list items in the list used by the field')\n\nexport const listItemsDataSchema = Joi.string()\n .allow('')\n .description('List items in JSON format, such as for radios or checkboxes.')\n\nexport const exactFilesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .max(25)\n .description(\n 'Specifies the exact number of files required for upload. Must be between 1 and 25.'\n )\n\nexport const minFilesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .max(25)\n .description(\n 'Minimum number of files required for upload. Must be between 1 and 25.'\n )\n\nexport const maxFilesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .max(25)\n .description(\n 'Maximum number of files allowed for upload. Must be between 1 and 25.'\n )\n\nexport const fileTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n .description(\n 'Array of allowed file types. Can be provided as a single value or an array.'\n )\n\nexport const documentTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n .description(\n 'Array of allowed document types. Can be provided as a single value or an array.'\n )\n\nexport const imageTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n .description(\n 'Array of allowed image types. Can be provided as a single value or an array.'\n )\n\nexport const tabularDataTypesSchema = Joi.array()\n .items(Joi.string())\n .single()\n .empty(null)\n .default([])\n\nexport const enhancedActionSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Action field that can include enhanced functionality')\n\nexport const radioIdSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Unique identifier for radio options')\n\nexport const radioTextSchema = Joi.string()\n .trim()\n .required()\n .description('The visible text shown next to radio options')\n\nexport const radioHintSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'Optional hint text displayed with radio buttons to provide additional guidance'\n )\n\nexport const radioValueSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'Array of allowed tabular data types. Can be provided as a single value or an array.'\n )\n\nexport const shortDescriptionSchema = Joi.string()\n .custom(rtrimOnly)\n .required()\n .description('Brief description of the question for internal use')\n\nexport const pageHeadingAndGuidanceSchema = Joi.string()\n .trim()\n .optional()\n .description('Combined heading and guidance for the page')\n\nexport const pageHeadingSchema = Joi.string()\n .trim()\n .required()\n .description('Main heading displayed at the top of the page')\n\nexport const guidanceTextSchema = Joi.string()\n .trim()\n .description('Guidance text to assist users in completing the page')\n\nexport const exitPageSchema = Joi.boolean()\n .default(false)\n .optional()\n .description('Determines if page is set as an Exit Page')\n\nexport const repeaterSchema = Joi.string()\n .trim()\n .optional()\n .description(\n 'Combined min/max items and question set name for the repeater page'\n )\n\nexport const minItemsSchema = Joi.number()\n .empty('')\n .min(MIN_NUMBER_OF_REPEAT_ITEMS)\n .description('The minimum number of repeater items')\n\nexport const maxItemsSchema = Joi.number()\n .empty('')\n .max(MAX_NUMBER_OF_REPEAT_ITEMS)\n .description('The maximum number of repeater items')\n\nexport const questionSetNameSchema = Joi.string()\n .trim()\n .description('The repeater question set name')\n\nexport const needDeclarationSchema = Joi.string()\n .trim()\n .required()\n .description('Whether a declaration is needed')\n\nexport const declarationTextSchema = Joi.string()\n .trim()\n .required()\n .description('Text of the declaration that users must agree to')\n\nexport const disableConfirmationEmailSchema = Joi.boolean()\n .valid(true)\n .description('Whether confirmation emails should be disabled')\n\nexport const enableReferenceNumberSchema = Joi.boolean()\n .valid(true)\n .description('Whether reference number should be enabled')\n\nexport const disableUserFeedbackSchema = Joi.boolean()\n .valid(true)\n .description('Whether user feedback should be disabled')\n\nexport const minSchema = Joi.number()\n .empty('')\n .integer()\n .description('Minimum value for numeric inputs')\n\nexport const maxSchema = Joi.number()\n .empty('')\n .integer()\n .description('Maximum value for numeric inputs')\n\nexport const minLengthSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Minimum character length for text inputs')\n\nexport const maxLengthSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Maximum character length for text inputs')\n\nexport const maxFutureSchema = Joi.number()\n .empty('')\n .integer()\n .min(0)\n .description('Maximum days in the future allowed for date inputs')\n\nexport const maxPastSchema = Joi.number()\n .empty('')\n .integer()\n .min(0)\n .description('Maximum days in the past allowed for date inputs')\n\nexport const precisionSchema = Joi.number()\n .empty('')\n .integer()\n .min(0)\n .description('Decimal precision for numeric inputs')\n\nexport const prefixSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Text to display before the input (e.g., £)')\n\nexport const regexSchema = Joi.string()\n .optional()\n .allow('')\n .description('Regular expression pattern for validation')\n\nexport const rowsSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Number of rows for multiline text fields')\n\nexport const suffixSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Text to display after the input (e.g., kg)')\n\nexport const classesSchema = Joi.string()\n .trim()\n .optional()\n .allow('')\n .description('Custom CSS classes to apply to the component')\n\nexport const jsEnabledSchema = Joi.string()\n .trim()\n .optional()\n .allow('false', 'true')\n .description('Flag to show if Javascript is enabled or not')\n\nexport const usePostcodeLookupSchema = Joi.string()\n .trim()\n .optional()\n .valid('', 'true')\n .description(\n 'Indicates whether a UK address component supports postcode lookup. Empty string or \"true\" values are accepted.'\n )\n\nexport const paymentDescriptionSchema = Joi.string()\n .trim()\n .max(230)\n .required()\n .description('Description of payment - appears in payment providers pages')\n\nexport const paymentAmountSchema = Joi.number()\n .empty('')\n .min(0)\n .max(100000)\n .description('Amount of payment in pounds')\n\nexport const paymentApiKeySchema = Joi.string()\n .trim()\n .description('API key for payment configuration')\n\nexport const exactChecksSchema = Joi.number()\n .empty('')\n .integer()\n .min(2)\n .description('Specifies the exact number of items required to be selected.')\n\nexport const minChecksSchema = Joi.number()\n .empty('')\n .integer()\n .min(2)\n .description('Minimum number of items required to be selected.')\n\nexport const maxChecksSchema = Joi.number()\n .empty('')\n .integer()\n .min(2)\n .description('Maximum number of items allowed to be selected.')\n\nexport const countriesSchema = Joi.array()\n .items(\n Joi.string().valid(\n ...Object.values(GeospatialFieldOptionsCountryEnum),\n 'any'\n )\n )\n .single()\n .description('The country to be included in a geospatial field')\n\nexport const exactFeaturesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Specifies the exact number of features required to be defined.')\n\nexport const minFeaturesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Minimum number of features required to be defined.')\n\nexport const maxFeaturesSchema = Joi.number()\n .empty('')\n .integer()\n .min(1)\n .description('Maximum number of features allowed to be defined.')\n\nexport const geometryTypesSchema = Joi.array()\n .items(Joi.string().valid(...Object.values(GeospatialFieldGeometryTypesEnum)))\n .single()\n .description('The geometry types allowed in a geospatial field')\n\ntype GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {\n args: Record<K, T>\n}\n\ninterface DSLSchema<TSchema = Record<string, unknown>[]>\n extends ArraySchema<TSchema> {\n rowSeparator: (rowSep: string | RegExp) => DSLSchema<TSchema>\n row: (rowSep: string | RegExp) => DSLSchema<TSchema>\n colSeparator: (colSep: string | RegExp) => DSLSchema<TSchema>\n col: (colSep: string | RegExp) => DSLSchema<TSchema>\n keys: (keys: string[]) => DSLSchema<TSchema>\n}\n\ninterface CustomValidator extends Joi.Root {\n dsv<TSchema>(): DSLSchema<TSchema>\n}\n\nexport const customValidator = Joi.extend((joi: Joi.Root) => {\n return {\n type: 'dsv',\n base: joi.array(),\n messages: {\n 'dsv.invalid': 'Invalid parse string'\n },\n coerce: {\n from: 'string',\n method(value: string, helpers) {\n try {\n // Only called when prefs.convert is true\n // Rules\n const rowSeparatorRule = helpers.schema.$_getRule('rowSeparator') as\n | undefined\n | GenericRuleOptions<'rowSeparator', string | RegExp>\n const colSeparatorRule = helpers.schema.$_getRule('colSeparator') as\n | undefined\n | GenericRuleOptions<'colSeparator', string | RegExp>\n const keysRule = helpers.schema.$_getRule('keys') as\n | undefined\n | GenericRuleOptions<'keys', string[]>\n\n // Rows\n const rowSeparator = rowSeparatorRule?.args.rowSeparator ?? /\\r?\\n/\n const rows = value\n .split(rowSeparator)\n .map((v) => v.trim())\n .filter(Boolean)\n\n // Columns\n const colSeparator = colSeparatorRule?.args.colSeparator ?? ','\n const keys = keysRule?.args.keys ?? ['key', 'value']\n\n const coercedValue = rows.map((row) => {\n return row\n .split(colSeparator)\n .reduce<Record<string, string>>((acc, col, idx) => {\n return {\n ...acc,\n [keys[idx]]: col.trim()\n }\n }, {})\n })\n return { value: coercedValue }\n } catch (_err) {\n // eslint-disable-next-line no-console\n console.error(_err)\n return { value, errors: [helpers.error('dsv.invalid')] }\n }\n }\n },\n rules: {\n rowSeparator: {\n convert: true,\n alias: 'row',\n method(rowSeparator: string) {\n return this.$_addRule({\n name: 'rowSeparator',\n args: { rowSeparator }\n })\n },\n args: [\n {\n name: 'rowSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n colSeparator: {\n convert: true,\n alias: 'col',\n method(colSeparator: string) {\n return this.$_addRule({\n name: 'colSeparator',\n args: { colSeparator }\n })\n },\n args: [\n {\n name: 'colSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n keys: {\n convert: true,\n method(keys: string[]) {\n return this.$_addRule({ name: 'keys', args: { keys } })\n },\n args: [\n {\n name: 'keys',\n ref: true,\n assert: (value) =>\n Array.isArray(value) && value.every((k) => typeof k === 'string'),\n message: 'must be an array of strings'\n }\n ]\n }\n }\n }\n}) as CustomValidator\n\nexport const autoCompleteOptionsSchema = customValidator\n .dsv<{ text: string; value: string }[]>()\n .row(/\\r?\\n/)\n .col(':')\n .keys(['text', 'value'])\n .items(\n customValidator.object({\n text: customValidator.string().min(1).disallow('').required(),\n value: customValidator\n .string()\n .default((parent: { text: string; value?: string }) => parent.text)\n .min(1)\n .disallow('')\n })\n )\n .min(1)\n .unique('text')\n .unique('value', { ignoreUndefined: true })\n .required()\n\nexport const questionDetailsFullSchema = {\n autoCompleteOptionsSchema,\n classesSchema,\n declarationTextSchema,\n documentTypesSchema,\n enhancedActionSchema,\n exactFilesSchema,\n fileTypesSchema,\n hintTextSchema,\n imageTypesSchema,\n instructionTextSchema,\n jsEnabledSchema,\n listForQuestionSchema,\n listItemCountSchema,\n listItemsDataSchema,\n maxFilesSchema,\n maxFutureSchema,\n maxLengthSchema,\n maxPastSchema,\n maxSchema,\n minFilesSchema,\n minLengthSchema,\n minSchema,\n nameSchema,\n paymentAmountSchema,\n paymentApiKeySchema,\n paymentDescriptionSchema,\n precisionSchema,\n prefixSchema,\n questionOptionalSchema,\n questionSchema,\n questionTypeFullSchema,\n radioHintSchema,\n radioIdSchema,\n radioTextSchema,\n radioValueSchema,\n regexSchema,\n rowsSchema,\n shortDescriptionSchema,\n suffixSchema,\n tabularDataTypesSchema,\n usePostcodeLookupSchema,\n minChecksSchema,\n maxChecksSchema,\n exactChecksSchema,\n countriesSchema,\n minFeaturesSchema,\n maxFeaturesSchema,\n exactFeaturesSchema,\n geometryTypesSchema\n}\n\nexport const formEditorInputPageKeys = {\n pageType: pageTypeSchema,\n questionType: questionTypeSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPage` interface\n * @see {@link FormEditorInputPage}\n */\nexport const formEditorInputPageSchema = Joi.object<FormEditorInputPage>()\n .keys(formEditorInputPageKeys)\n .required()\n .description('Input schema for creating a new page in the form editor')\n\nexport const formEditorInputheckAnswersSettingsKeys = {\n declarationText: shortDescriptionSchema\n}\n\n/**\n * Joi schema for `FormEditorInputCheckAnswersSettings` interface\n * @see {@link FormEditorInputCheckAnswersSettings}\n */\nexport const formEditorInputCheckAnswersSettingSchema =\n Joi.object<FormEditorInputCheckAnswersSettings>()\n .keys(formEditorInputheckAnswersSettingsKeys)\n .required()\n .description('Configuration for the check-answers page')\n\nexport const formEditorInputQuestionKeys = {\n question: questionSchema,\n shortDescription: shortDescriptionSchema,\n hintText: hintTextSchema,\n questionOptional: questionOptionalSchema\n}\n\n/**\n * Joi schema for `FormEditorInputQuestion` interface\n * @see {@link FormEditorInputQuestion}\n */\nexport const formEditorInputQuestionSchema =\n Joi.object<FormEditorInputQuestion>()\n .keys(formEditorInputQuestionKeys)\n .required()\n .description(\n 'Input schema for creating or updating a question in the form editor'\n )\n\nexport const formEditorInputPageSettingsKeys = {\n pageHeadingAndGuidance: pageHeadingAndGuidanceSchema,\n pageHeading: pageHeadingSchema,\n guidanceText: guidanceTextSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPageSettings` interface\n * @see {@link FormEditorInputPageSettings}\n */\nexport const formEditorInputPageSettingsSchema =\n Joi.object<FormEditorInputPageSettings>()\n .keys(formEditorInputPageSettingsKeys)\n .required()\n .description('Settings for page content and display in the form editor')\n\nexport function govukFieldValueIsString(\n govukField: GovukField\n): govukField is GovukStringField {\n return [\n 'question',\n 'hintText',\n 'shortDescription',\n 'autoCompleteOptions',\n 'classes',\n 'prefix',\n 'suffix',\n 'paymentAmount',\n 'paymentDescription'\n ].includes(`${govukField.name}`)\n}\n\nexport function govukFieldIsChecked(\n govukField: GovukField\n): govukField is GovukFieldQuestionOptional | GovukFieldUsePostcodeLookup {\n if (\n govukField.name !== 'questionOptional' &&\n govukField.name !== 'usePostcodeLookup'\n ) {\n return false\n }\n const checkedValue = govukField.items?.[0].checked\n return typeof checkedValue === 'boolean'\n}\n\n// A list of allowed template funtions for use within error message templates\nexport const allowedErrorTemplateFunctions = ['lowerFirst', 'capitalise']\n"],"mappings":"AAAA,OAAOA,GAAG,MAAiD,KAAK;AAEhE,SAASC,SAAS;AAClB,SACEC,aAAa,EACbC,gCAAgC,EAChCC,iCAAiC;AAEnC,SACEC,0BAA0B,EAC1BC,0BAA0B;AAY5B,SAASC,qBAAqB;AAE9B,OAAO,MAAMC,2BAA2B,GAAGR,GAAG,CAACS,MAAM,CAAC,CAAC,CACpDC,IAAI,CAAC,CAAC,CACNC,KAAK,CAAC;EAAEC,IAAI,EAAE;IAAEC,KAAK,EAAE;EAAM;AAAE,CAAC,CAAC,CACjCC,MAAM,CAAC,CAACC,KAAK,EAAEC,OAAO,KAAKT,qBAAqB,CAACQ,KAAK,EAAEC,OAAO,CAAC,CAAC,CACjEC,WAAW,CAAC,6CAA6C,CAAC;AAE7D,OAAO,MAAMC,2BAA2B,GACtC,qFAAqF;AAEvF,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAOhC,OAAO,MAAMC,cAAc,GAAGpB,GAAG,CAACS,MAAM,CAAC,CAAC,CACvCY,QAAQ,CAAC,CAAC,CACVC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAC7BL,WAAW,CAAC,wDAAwD,CAAC;AAExE,OAAO,MAAMM,kBAAkB,GAAGvB,GAAG,CAACS,MAAM,CAAC,CAAC,CAC3CY,QAAQ,CAAC,CAAC,CACVC,KAAK,CACJH,oBAAoB,CAACK,qBAAqB,EAC1CL,oBAAoB,CAACM,YAAY,EACjCN,oBAAoB,CAACO,gBAAgB,EACrCxB,aAAa,CAACyB,cAAc,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AAkB,EAClB,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,oBAAoB,CACrB,CAACC,QAAQ,CAAC,GAAGD,UAAU,CAACrC,IAAI,EAAE,CAAC;AAClC;AAEA,OAAO,SAASuC,mBAAmBA,CACjCF,UAAsB,EACkD;EACxE,IACEA,UAAU,CAACrC,IAAI,KAAK,kBAAkB,IACtCqC,UAAU,CAACrC,IAAI,KAAK,mBAAmB,EACvC;IACA,OAAO,KAAK;EACd;EACA,MAAMwC,YAAY,GAAGH,UAAU,CAAChI,KAAK,GAAG,CAAC,CAAC,CAACoI,OAAO;EAClD,OAAO,OAAOD,YAAY,KAAK,SAAS;AAC1C;;AAEA;AACA,OAAO,MAAME,6BAA6B,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type GeospatialFieldOptionsCountry\n} from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n type ConditionWrapperV2,\n type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n /**\n * The type of the page\n */\n pageType: string\n\n /**\n * The type of the question\n */\n questionType: string | undefined\n\n /**\n * The sub-type of written answer\n */\n writtenAnswerSub: string\n\n /**\n * The sub-type of date\n */\n dateSub: string\n\n /**\n * The sub-type of location\n */\n locationSub: string\n\n /**\n * The sub-type of lists\n */\n listSub: string\n\n /**\n * The name of the question (unique id)\n */\n name: string\n\n /**\n * The text of the question\n */\n question: string\n\n /**\n * The hint text of the question\n */\n hintText: string\n\n /**\n * Denotes if the question is optional\n */\n questionOptional: string\n\n /**\n * The short description of the question\n */\n shortDescription: string\n\n /**\n * The value of checkbox to reveal instruction text field\n */\n giveInstructions: string\n\n /**\n * The instruction text for location components (optional)\n */\n instructionText: string\n\n /**\n * The value of checkbox to reveal heading and guidance section\n */\n pageHeadingAndGuidance: string\n\n /**\n * The page heading\n */\n pageHeading: string\n\n /**\n * The page guidance text\n */\n guidanceText: string\n\n /**\n * The value of checkbox to reveal repeater section\n */\n repeater: string\n\n /**\n * The maximum number of repeater items\n */\n minItems: number\n\n /**\n * The minimum number of repeater items\n */\n maxItems: number\n\n /**\n * The repeater question set name\n */\n questionSetName: string\n\n /**\n * The value of radio to reveal declaration text field\n */\n needDeclaration: string\n\n /**\n * The check answers declaration text\n */\n declarationText: string\n\n /**\n * Whether confirmation e-mails should be disabled\n */\n disableConfirmationEmail: boolean\n\n /**\n * Whether reference numbers should be enabled\n */\n enableReferenceNumber: boolean\n\n /**\n * Whether user feedback should be disabled\n */\n disableUserFeedback: boolean\n\n /**\n * The min length a field can have\n */\n minLength: string\n\n /**\n * The max length a field can have\n */\n maxLength: string\n\n /**\n * The regex value of a field\n */\n regex: string\n\n /**\n * The number of rows of a textarea\n */\n rows: string\n\n /**\n * The classes to be applied to a field\n */\n classes: string\n\n /**\n * The prefix to be applied to a field\n */\n prefix: string\n\n /**\n * The suffix to be applied to a field\n */\n suffix: string\n\n /**\n * The decimal precision of a number field\n */\n precision: string\n\n /**\n * The lowest number allowed in a field\n */\n min: string\n\n /**\n * The highest number allowed in a field\n */\n max: string\n\n /**\n * The maximum days in the future to allow for a date\n */\n maxFuture: string\n\n /**\n * The maximum days in the past to allow for a date\n */\n maxPast: string\n\n /**\n * The exact number of files to upload\n */\n exactFiles: string\n\n /**\n * The minimum number of files to upload\n */\n minFiles: string\n\n /**\n * The maximum number of files to upload\n */\n maxFiles: string\n\n /**\n * The type of files for upload\n */\n fileTypes: string[]\n\n /**\n * The types of document files for upload\n */\n documentTypes: string[]\n\n /**\n * The types of image files for upload\n */\n imageTypes: string[]\n\n /**\n * The types of tabular data files for upload\n */\n tabularDataTypes: string[]\n\n /**\n * The action required from within a sub-section\n */\n enhancedAction: string\n\n /**\n * Placeholder for inserted section to handle adding/editing radios or checkboxes\n */\n radiosOrCheckboxes: string\n\n /**\n * The unique id of the radio item\n */\n radioId: string\n\n /**\n * The display text of the radio item\n */\n radioText?: string\n\n /**\n * The hint of the radio item\n */\n radioHint?: string\n\n /**\n * The value of the radio item\n */\n radioValue?: string\n\n /**\n * The list name to be applied to a field (if applicable)\n */\n list: string\n\n /**\n * List items in JSON format, such as for radios ro checkboxes\n */\n listItemsData: string\n\n /**\n * The exact number of items to select\n */\n exactChecks: string\n\n /**\n * The minimum number of items to select\n */\n minChecks: string\n\n /**\n * The maximum number of items to select\n */\n maxChecks: string\n\n /**\n * An array of options for autocomplete\n */\n autoCompleteOptions: Item[]\n\n /**\n * Set to 'true' is Javascript is enabled\n */\n jsEnabled: string\n\n /**\n * List item id for conditions\n */\n itemId: string\n\n /**\n * Relative date period for conditions\n */\n period: string\n\n /**\n * Relative date unit for conditions\n */\n unit: DateUnits\n\n /**\n * Relative date direction for conditions\n */\n direction: DateDirections\n\n /**\n * Denotes if page is an Exit Page\n */\n exitPage: boolean\n\n /**\n * Denotes if the UK address question supports postcode lookup\n */\n usePostcodeLookup: string\n\n /**\n * Amount of payment in pounds\n */\n paymentAmount: string\n\n /**\n * Virtual marker for the conditional payment amounts editor section.\n * Carries no own value; rendered via a custom template.\n */\n paymentConditionalAmounts: string\n\n /**\n * Description of the payment (will appear in the payment provider's pages)\n */\n paymentDescription: string\n\n /**\n * Test API key used for test payments\n */\n paymentTestApiKey: string\n\n /**\n * Live API key used for live payments\n */\n paymentLiveApiKey: string\n\n /**\n * Inline conditional-amount editor: amount input value\n */\n conditionalAmount: string\n\n /**\n * Inline conditional-amount editor: selected condition id\n */\n conditionalAmountCondition: string\n\n /**\n * Title that user supplies a section\n */\n sectionTitle: string\n\n /**\n * The country restriction for geospatial questions\n */\n countries?: (GeospatialFieldOptionsCountry | 'any')[]\n\n /**\n * The exact number of features to define for geospatial questions\n */\n exactFeatures: string\n\n /**\n * The minimum number of features to define for geospatial questions\n */\n minFeatures: string\n\n /**\n * The maximum number of features to define for geospatial questions\n */\n maxFeatures: string\n}\n\nexport type FormEditorInputPage = Pick<\n FormEditor,\n | 'pageType'\n | 'questionType'\n | 'writtenAnswerSub'\n | 'dateSub'\n | 'locationSub'\n | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n FormEditor,\n 'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputConfirmationEmailSettings = Pick<\n FormEditor,\n 'disableConfirmationEmail'\n>\n\nexport type FormEditorInputReferenceNumberSettings = Pick<\n FormEditor,\n 'enableReferenceNumber'\n>\n\nexport type FormEditorInputUserFeedbackSettings = Pick<\n FormEditor,\n 'disableUserFeedback'\n>\n\nexport type FormEditorInputQuestion = Pick<\n FormEditor,\n | 'questionType'\n | 'name'\n | 'question'\n | 'shortDescription'\n | 'hintText'\n | 'declarationText'\n | 'questionOptional'\n | 'minLength'\n | 'maxLength'\n | 'regex'\n | 'rows'\n | 'classes'\n | 'prefix'\n | 'suffix'\n | 'precision'\n | 'min'\n | 'max'\n | 'maxFuture'\n | 'maxPast'\n | 'exactFiles'\n | 'minFiles'\n | 'maxFiles'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'list'\n | 'listItemsData'\n | 'exactChecks'\n | 'minChecks'\n | 'maxChecks'\n | 'jsEnabled'\n | 'usePostcodeLookup'\n | 'giveInstructions'\n | 'instructionText'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n | 'countries'\n | 'exactFeatures'\n | 'minFeatures'\n | 'maxFeatures'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n FormEditorInputQuestion,\n | 'question'\n | 'hintText'\n | 'shortDescription'\n | 'questionOptional'\n | 'questionType'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'listItemsData'\n | 'jsEnabled'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n id?: string\n text?: string\n hint?: {\n text: string\n }\n value?: ListValue\n}\n\nexport interface ListLabel {\n text: string\n classes: string\n}\n\nexport interface ListElement extends ListItem {\n readonly id: string\n text: string\n value: ListValue\n label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n readonly text: string\n readonly hint?: ReadonlyHint\n readonly value: ListValue\n readonly label?: ListLabel\n}\n\nexport interface DateItem {\n name: string\n classes: string\n}\n\nexport interface ListConflict {\n conflictItem: {\n id: string\n text: string\n }\n originalItem?: {\n id: string\n text: string\n }\n conditionNames: string[]\n linkableItems: {\n id?: string\n text: string\n value: string | number | boolean\n }[]\n closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n questionType?: ComponentType\n questionDetails?: Partial<ComponentDef>\n editRow?: {\n radioId?: string\n radioText?: string\n radioHint?: string\n radioValue?: ListValue\n expanded?: boolean\n }\n listItems?: ListItem[]\n isReordering?: boolean\n lastMovedId?: string\n lastMoveDirection?: string\n listConflicts?: ListConflict[]\n conditionalAmounts?: ConditionalAmountState[]\n conditionalAmountEditRow?: ConditionalAmountEditRow\n}\n\nexport interface ConditionalAmountState {\n id: string\n amount: number\n condition: string\n}\n\nexport interface ConditionalAmountEditRow {\n expanded: boolean\n id?: string\n amount?: number | string\n condition?: string\n}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n pageCondition: string | undefined\n pageConditionDetails: ConditionWrapperV2 | undefined\n pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\n hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n key?: {\n text?: string\n classes?: string\n }\n value?: {\n text?: string\n html?: string\n classes?: string\n }\n}\n\nexport interface GovukField {\n id?: string\n name?: string\n idPrefix?: string\n fieldset?: {\n legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n }\n value?: string | boolean | number | string[] | Item[]\n classes?: string\n label?: {\n text?: string\n html?: string\n classes?: string\n isPageHeading?: boolean\n }\n hint?: { text?: string; html?: string; classes?: string }\n items?: GovukFieldItem[]\n rows?: number\n type?: string\n customTemplate?: string\n formGroup?: {\n classes?: string\n }\n prefix?: {\n text?: string\n }\n preContent?: {\n path?: string\n }\n postContent?: {\n path?: string\n }\n disabled?: boolean\n customMeta?: object\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n name: 'questionOptional'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n name: 'usePostcodeLookup'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: GovukField\n instructionText?: GovukField\n questionOptional?: GovukField\n shortDescription?: GovukField\n fileTypes?: GovukField\n documentTypes?: GovukField\n imageTypes?: GovukField\n tabularDataTypes?: GovukField\n radiosOrCheckboxes?: GovukField\n autoCompleteOptions?: GovukField\n usePostcodeLookup?: GovukField\n declarationText?: GovukField\n paymentAmount?: GovukField\n paymentConditionalAmounts?: GovukField\n paymentDescription?: GovukField\n paymentTestApiKey?: GovukField\n paymentLiveApiKey?: GovukField\n errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n FormEditorGovukField,\n 'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n text?: string\n hint?: {\n text?: string\n }\n value?: string\n divider?: {\n text?: string\n hint?: string\n value?: string\n }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n ComponentType,\n Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n min?: { fieldName: string; placeholder: string }\n max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import {\n type ComponentType,\n type GeospatialFieldGeometryTypesEnum\n} from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type GeospatialFieldOptionsCountry\n} from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n type ConditionWrapperV2,\n type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n /**\n * The type of the page\n */\n pageType: string\n\n /**\n * The type of the question\n */\n questionType: string | undefined\n\n /**\n * The sub-type of written answer\n */\n writtenAnswerSub: string\n\n /**\n * The sub-type of date\n */\n dateSub: string\n\n /**\n * The sub-type of location\n */\n locationSub: string\n\n /**\n * The sub-type of lists\n */\n listSub: string\n\n /**\n * The name of the question (unique id)\n */\n name: string\n\n /**\n * The text of the question\n */\n question: string\n\n /**\n * The hint text of the question\n */\n hintText: string\n\n /**\n * Denotes if the question is optional\n */\n questionOptional: string\n\n /**\n * The short description of the question\n */\n shortDescription: string\n\n /**\n * The value of checkbox to reveal instruction text field\n */\n giveInstructions: string\n\n /**\n * The instruction text for location components (optional)\n */\n instructionText: string\n\n /**\n * The value of checkbox to reveal heading and guidance section\n */\n pageHeadingAndGuidance: string\n\n /**\n * The page heading\n */\n pageHeading: string\n\n /**\n * The page guidance text\n */\n guidanceText: string\n\n /**\n * The value of checkbox to reveal repeater section\n */\n repeater: string\n\n /**\n * The maximum number of repeater items\n */\n minItems: number\n\n /**\n * The minimum number of repeater items\n */\n maxItems: number\n\n /**\n * The repeater question set name\n */\n questionSetName: string\n\n /**\n * The value of radio to reveal declaration text field\n */\n needDeclaration: string\n\n /**\n * The check answers declaration text\n */\n declarationText: string\n\n /**\n * Whether confirmation e-mails should be disabled\n */\n disableConfirmationEmail: boolean\n\n /**\n * Whether reference numbers should be enabled\n */\n enableReferenceNumber: boolean\n\n /**\n * Whether user feedback should be disabled\n */\n disableUserFeedback: boolean\n\n /**\n * The min length a field can have\n */\n minLength: string\n\n /**\n * The max length a field can have\n */\n maxLength: string\n\n /**\n * The regex value of a field\n */\n regex: string\n\n /**\n * The number of rows of a textarea\n */\n rows: string\n\n /**\n * The classes to be applied to a field\n */\n classes: string\n\n /**\n * The prefix to be applied to a field\n */\n prefix: string\n\n /**\n * The suffix to be applied to a field\n */\n suffix: string\n\n /**\n * The decimal precision of a number field\n */\n precision: string\n\n /**\n * The lowest number allowed in a field\n */\n min: string\n\n /**\n * The highest number allowed in a field\n */\n max: string\n\n /**\n * The maximum days in the future to allow for a date\n */\n maxFuture: string\n\n /**\n * The maximum days in the past to allow for a date\n */\n maxPast: string\n\n /**\n * The exact number of files to upload\n */\n exactFiles: string\n\n /**\n * The minimum number of files to upload\n */\n minFiles: string\n\n /**\n * The maximum number of files to upload\n */\n maxFiles: string\n\n /**\n * The type of files for upload\n */\n fileTypes: string[]\n\n /**\n * The types of document files for upload\n */\n documentTypes: string[]\n\n /**\n * The types of image files for upload\n */\n imageTypes: string[]\n\n /**\n * The types of tabular data files for upload\n */\n tabularDataTypes: string[]\n\n /**\n * The action required from within a sub-section\n */\n enhancedAction: string\n\n /**\n * Placeholder for inserted section to handle adding/editing radios or checkboxes\n */\n radiosOrCheckboxes: string\n\n /**\n * The unique id of the radio item\n */\n radioId: string\n\n /**\n * The display text of the radio item\n */\n radioText?: string\n\n /**\n * The hint of the radio item\n */\n radioHint?: string\n\n /**\n * The value of the radio item\n */\n radioValue?: string\n\n /**\n * The list name to be applied to a field (if applicable)\n */\n list: string\n\n /**\n * List items in JSON format, such as for radios ro checkboxes\n */\n listItemsData: string\n\n /**\n * The exact number of items to select\n */\n exactChecks: string\n\n /**\n * The minimum number of items to select\n */\n minChecks: string\n\n /**\n * The maximum number of items to select\n */\n maxChecks: string\n\n /**\n * An array of options for autocomplete\n */\n autoCompleteOptions: Item[]\n\n /**\n * Set to 'true' is Javascript is enabled\n */\n jsEnabled: string\n\n /**\n * List item id for conditions\n */\n itemId: string\n\n /**\n * Relative date period for conditions\n */\n period: string\n\n /**\n * Relative date unit for conditions\n */\n unit: DateUnits\n\n /**\n * Relative date direction for conditions\n */\n direction: DateDirections\n\n /**\n * Denotes if page is an Exit Page\n */\n exitPage: boolean\n\n /**\n * Denotes if the UK address question supports postcode lookup\n */\n usePostcodeLookup: string\n\n /**\n * Amount of payment in pounds\n */\n paymentAmount: string\n\n /**\n * Virtual marker for the conditional payment amounts editor section.\n * Carries no own value; rendered via a custom template.\n */\n paymentConditionalAmounts: string\n\n /**\n * Description of the payment (will appear in the payment provider's pages)\n */\n paymentDescription: string\n\n /**\n * Test API key used for test payments\n */\n paymentTestApiKey: string\n\n /**\n * Live API key used for live payments\n */\n paymentLiveApiKey: string\n\n /**\n * Inline conditional-amount editor: amount input value\n */\n conditionalAmount: string\n\n /**\n * Inline conditional-amount editor: selected condition id\n */\n conditionalAmountCondition: string\n\n /**\n * Title that user supplies a section\n */\n sectionTitle: string\n\n /**\n * The country restriction for geospatial questions\n */\n countries?: (GeospatialFieldOptionsCountry | 'any')[]\n\n /**\n * The exact number of features to define for geospatial questions\n */\n exactFeatures: string\n\n /**\n * The minimum number of features to define for geospatial questions\n */\n minFeatures: string\n\n /**\n * The maximum number of features to define for geospatial questions\n */\n maxFeatures: string\n\n /**\n * The geometry types restriction for geospatial questions\n */\n geometryTypes?: GeospatialFieldGeometryTypesEnum[]\n}\n\nexport type FormEditorInputPage = Pick<\n FormEditor,\n | 'pageType'\n | 'questionType'\n | 'writtenAnswerSub'\n | 'dateSub'\n | 'locationSub'\n | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n FormEditor,\n 'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputConfirmationEmailSettings = Pick<\n FormEditor,\n 'disableConfirmationEmail'\n>\n\nexport type FormEditorInputReferenceNumberSettings = Pick<\n FormEditor,\n 'enableReferenceNumber'\n>\n\nexport type FormEditorInputUserFeedbackSettings = Pick<\n FormEditor,\n 'disableUserFeedback'\n>\n\nexport type FormEditorInputQuestion = Pick<\n FormEditor,\n | 'questionType'\n | 'name'\n | 'question'\n | 'shortDescription'\n | 'hintText'\n | 'declarationText'\n | 'questionOptional'\n | 'minLength'\n | 'maxLength'\n | 'regex'\n | 'rows'\n | 'classes'\n | 'prefix'\n | 'suffix'\n | 'precision'\n | 'min'\n | 'max'\n | 'maxFuture'\n | 'maxPast'\n | 'exactFiles'\n | 'minFiles'\n | 'maxFiles'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'list'\n | 'listItemsData'\n | 'exactChecks'\n | 'minChecks'\n | 'maxChecks'\n | 'jsEnabled'\n | 'usePostcodeLookup'\n | 'giveInstructions'\n | 'instructionText'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n | 'geometryTypes'\n | 'countries'\n | 'exactFeatures'\n | 'minFeatures'\n | 'maxFeatures'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n FormEditorInputQuestion,\n | 'question'\n | 'hintText'\n | 'shortDescription'\n | 'questionOptional'\n | 'questionType'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'listItemsData'\n | 'jsEnabled'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n id?: string\n text?: string\n hint?: {\n text: string\n }\n value?: ListValue\n}\n\nexport interface ListLabel {\n text: string\n classes: string\n}\n\nexport interface ListElement extends ListItem {\n readonly id: string\n text: string\n value: ListValue\n label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n readonly text: string\n readonly hint?: ReadonlyHint\n readonly value: ListValue\n readonly label?: ListLabel\n}\n\nexport interface DateItem {\n name: string\n classes: string\n}\n\nexport interface ListConflict {\n conflictItem: {\n id: string\n text: string\n }\n originalItem?: {\n id: string\n text: string\n }\n conditionNames: string[]\n linkableItems: {\n id?: string\n text: string\n value: string | number | boolean\n }[]\n closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n questionType?: ComponentType\n questionDetails?: Partial<ComponentDef>\n editRow?: {\n radioId?: string\n radioText?: string\n radioHint?: string\n radioValue?: ListValue\n expanded?: boolean\n }\n listItems?: ListItem[]\n isReordering?: boolean\n lastMovedId?: string\n lastMoveDirection?: string\n listConflicts?: ListConflict[]\n conditionalAmounts?: ConditionalAmountState[]\n conditionalAmountEditRow?: ConditionalAmountEditRow\n}\n\nexport interface ConditionalAmountState {\n id: string\n amount: number\n condition: string\n}\n\nexport interface ConditionalAmountEditRow {\n expanded: boolean\n id?: string\n amount?: number | string\n condition?: string\n}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n pageCondition: string | undefined\n pageConditionDetails: ConditionWrapperV2 | undefined\n pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\n hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n key?: {\n text?: string\n classes?: string\n }\n value?: {\n text?: string\n html?: string\n classes?: string\n }\n}\n\nexport interface GovukField {\n id?: string\n name?: string\n idPrefix?: string\n fieldset?: {\n legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n }\n value?: string | boolean | number | string[] | Item[]\n classes?: string\n label?: {\n text?: string\n html?: string\n classes?: string\n isPageHeading?: boolean\n }\n hint?: { text?: string; html?: string; classes?: string }\n items?: GovukFieldItem[]\n rows?: number\n type?: string\n customTemplate?: string\n formGroup?: {\n classes?: string\n }\n prefix?: {\n text?: string\n }\n preContent?: {\n path?: string\n }\n postContent?: {\n path?: string\n }\n disabled?: boolean\n customMeta?: object\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n name: 'questionOptional'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n name: 'usePostcodeLookup'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: GovukField\n instructionText?: GovukField\n questionOptional?: GovukField\n shortDescription?: GovukField\n fileTypes?: GovukField\n documentTypes?: GovukField\n imageTypes?: GovukField\n tabularDataTypes?: GovukField\n radiosOrCheckboxes?: GovukField\n autoCompleteOptions?: GovukField\n usePostcodeLookup?: GovukField\n declarationText?: GovukField\n paymentAmount?: GovukField\n paymentConditionalAmounts?: GovukField\n paymentDescription?: GovukField\n paymentTestApiKey?: GovukField\n paymentLiveApiKey?: GovukField\n errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n FormEditorGovukField,\n 'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n text?: string\n hint?: {\n text?: string\n }\n value?: string\n divider?: {\n text?: string\n hint?: string\n value?: string\n }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n ComponentType,\n Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n min?: { fieldName: string; placeholder: string }\n max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -33,5 +33,10 @@ export declare enum GeospatialFieldOptionsCountryEnum {
|
|
|
33
33
|
Scotland = "scotland",
|
|
34
34
|
Wales = "wales"
|
|
35
35
|
}
|
|
36
|
+
export declare enum GeospatialFieldGeometryTypesEnum {
|
|
37
|
+
Point = "point",
|
|
38
|
+
Line = "line",
|
|
39
|
+
Shape = "shape"
|
|
40
|
+
}
|
|
36
41
|
export declare const PreviewTypeEnum: Record<string, string>;
|
|
37
42
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAED,oBAAY,iCAAiC;IAC3C,OAAO,YAAY;IACnB,eAAe,qBAAqB;IACpC,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,eAAe,EAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAED,oBAAY,iCAAiC;IAC3C,OAAO,YAAY;IACnB,eAAe,qBAAqB;IACpC,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,gCAAgC;IAC1C,KAAK,UAAU;IACf,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,eAAe,EAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ComponentTypes } from '../components/component-types.js';
|
|
2
|
-
export { ComponentType, GeospatialFieldOptionsCountryEnum, PreviewTypeEnum } from '../components/enums.js';
|
|
2
|
+
export { ComponentType, GeospatialFieldGeometryTypesEnum, GeospatialFieldOptionsCountryEnum, PreviewTypeEnum } from '../components/enums.js';
|
|
3
3
|
export { allDocumentTypes, allImageTypes, allTabularDataTypes } from '../components/file-types.js';
|
|
4
4
|
export { getComponentDefaults, hasConditionSupport, hasContent, hasContentField, hasFormField, hasHint, hasInputField, hasListField, hasSelectionFields, hasTitle, isConditionalRevealType, isConditionalType, isContentType, isFormType, isListType } from '../components/helpers.js';
|
|
5
5
|
export { getYesNoList, yesNoListId, yesNoListName, yesNoListNoItemId, yesNoListYesItemId } from '../components/yes-no-helper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,mCAAmC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,iCAAiC,EACjC,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,mCAAmC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LanguageMessages } from 'joi';
|
|
2
|
-
import { type ComponentType, type PreviewTypeEnum } from '../components/enums.js';
|
|
2
|
+
import { type ComponentType, type GeospatialFieldGeometryTypesEnum, type PreviewTypeEnum } from '../components/enums.js';
|
|
3
3
|
import { type ListTypeContent, type ListTypeOption } from '../form/form-definition/types.js';
|
|
4
4
|
export type ConditionalComponentType = Exclude<ConditionalComponentsDef['type'], ContentComponentsDef>;
|
|
5
5
|
/**
|
|
@@ -228,6 +228,7 @@ export interface GeospatialFieldComponent extends FormFieldBase {
|
|
|
228
228
|
options: FormFieldBase['options'] & {
|
|
229
229
|
condition?: string;
|
|
230
230
|
countries?: GeospatialFieldOptionsCountry[];
|
|
231
|
+
geometryTypes?: GeospatialFieldGeometryTypesEnum[];
|
|
231
232
|
};
|
|
232
233
|
schema?: {
|
|
233
234
|
max?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAA;AAE5C,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,wBAAwB,CAAC,MAAM,CAAC,EAChC,oBAAoB,CACrB,CAAA;AAED;;GAEG;AAEH,UAAU,aAAa;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,wBAAwB,CAAC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WAAW,GAAG,MAAM,OAAO,eAAe,CAAA"}
|
|
@@ -73,6 +73,7 @@ export declare const countriesSchema: Joi.ArraySchema<any[]>;
|
|
|
73
73
|
export declare const exactFeaturesSchema: Joi.NumberSchema<number>;
|
|
74
74
|
export declare const minFeaturesSchema: Joi.NumberSchema<number>;
|
|
75
75
|
export declare const maxFeaturesSchema: Joi.NumberSchema<number>;
|
|
76
|
+
export declare const geometryTypesSchema: Joi.ArraySchema<any[]>;
|
|
76
77
|
interface DSLSchema<TSchema = Record<string, unknown>[]> extends ArraySchema<TSchema> {
|
|
77
78
|
rowSeparator: (rowSep: string | RegExp) => DSLSchema<TSchema>;
|
|
78
79
|
row: (rowSep: string | RegExp) => DSLSchema<TSchema>;
|
|
@@ -140,6 +141,7 @@ export declare const questionDetailsFullSchema: {
|
|
|
140
141
|
minFeaturesSchema: Joi.NumberSchema<number>;
|
|
141
142
|
maxFeaturesSchema: Joi.NumberSchema<number>;
|
|
142
143
|
exactFeaturesSchema: Joi.NumberSchema<number>;
|
|
144
|
+
geometryTypesSchema: Joi.ArraySchema<any[]>;
|
|
143
145
|
};
|
|
144
146
|
export declare const formEditorInputPageKeys: {
|
|
145
147
|
pageType: Joi.StringSchema<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAuB,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAuB,MAAM,KAAK,CAAA;AAYhE,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,KAAK,2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iBvB,CAAA;AAEb,eAAO,MAAM,yBAAyB;;cAnBvB,MAAM;eAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEnC,CAAA;AAED,eAAO,MAAM,uBAAuB;;;CAGnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,uCAGmC,CAAA;AAEzE,eAAO,MAAM,sCAAsC;;CAElD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wCAAwC,uDAIO,CAAA;AAE5D,eAAO,MAAM,2BAA2B;;;;;CAKvC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,2CAMrC,CAAA;AAEL,eAAO,MAAM,+BAA+B;;;;CAI3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,+CAI8B,CAAA;AAE5E,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,gBAAgB,CAYhC;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,0BAA0B,GAAG,2BAA2B,CASxE;AAGD,eAAO,MAAM,6BAA6B,UAA+B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentType } from '../../components/enums.js';
|
|
1
|
+
import { type ComponentType, type GeospatialFieldGeometryTypesEnum } from '../../components/enums.js';
|
|
2
2
|
import { type ComponentDef, type GeospatialFieldOptionsCountry } from '../../components/types.js';
|
|
3
3
|
import { type DateDirections, type DateUnits } from '../../conditions/enums.js';
|
|
4
4
|
import { type ConditionWrapperV2, type Item } from '../../form/form-definition/types.js';
|
|
@@ -307,13 +307,17 @@ export interface FormEditor {
|
|
|
307
307
|
* The maximum number of features to define for geospatial questions
|
|
308
308
|
*/
|
|
309
309
|
maxFeatures: string;
|
|
310
|
+
/**
|
|
311
|
+
* The geometry types restriction for geospatial questions
|
|
312
|
+
*/
|
|
313
|
+
geometryTypes?: GeospatialFieldGeometryTypesEnum[];
|
|
310
314
|
}
|
|
311
315
|
export type FormEditorInputPage = Pick<FormEditor, 'pageType' | 'questionType' | 'writtenAnswerSub' | 'dateSub' | 'locationSub' | 'listSub'>;
|
|
312
316
|
export type FormEditorInputCheckAnswersSettings = Pick<FormEditor, 'needDeclaration' | 'declarationText'>;
|
|
313
317
|
export type FormEditorInputConfirmationEmailSettings = Pick<FormEditor, 'disableConfirmationEmail'>;
|
|
314
318
|
export type FormEditorInputReferenceNumberSettings = Pick<FormEditor, 'enableReferenceNumber'>;
|
|
315
319
|
export type FormEditorInputUserFeedbackSettings = Pick<FormEditor, 'disableUserFeedback'>;
|
|
316
|
-
export type FormEditorInputQuestion = Pick<FormEditor, 'questionType' | 'name' | 'question' | 'shortDescription' | 'hintText' | 'declarationText' | 'questionOptional' | 'minLength' | 'maxLength' | 'regex' | 'rows' | 'classes' | 'prefix' | 'suffix' | 'precision' | 'min' | 'max' | 'maxFuture' | 'maxPast' | 'exactFiles' | 'minFiles' | 'maxFiles' | 'fileTypes' | 'documentTypes' | 'imageTypes' | 'tabularDataTypes' | 'autoCompleteOptions' | 'enhancedAction' | 'radioId' | 'radioText' | 'radioHint' | 'radioValue' | 'list' | 'listItemsData' | 'exactChecks' | 'minChecks' | 'maxChecks' | 'jsEnabled' | 'usePostcodeLookup' | 'giveInstructions' | 'instructionText' | 'paymentAmount' | 'paymentDescription' | 'paymentTestApiKey' | 'paymentLiveApiKey' | 'conditionalAmount' | 'conditionalAmountCondition' | 'countries' | 'exactFeatures' | 'minFeatures' | 'maxFeatures'>;
|
|
320
|
+
export type FormEditorInputQuestion = Pick<FormEditor, 'questionType' | 'name' | 'question' | 'shortDescription' | 'hintText' | 'declarationText' | 'questionOptional' | 'minLength' | 'maxLength' | 'regex' | 'rows' | 'classes' | 'prefix' | 'suffix' | 'precision' | 'min' | 'max' | 'maxFuture' | 'maxPast' | 'exactFiles' | 'minFiles' | 'maxFiles' | 'fileTypes' | 'documentTypes' | 'imageTypes' | 'tabularDataTypes' | 'autoCompleteOptions' | 'enhancedAction' | 'radioId' | 'radioText' | 'radioHint' | 'radioValue' | 'list' | 'listItemsData' | 'exactChecks' | 'minChecks' | 'maxChecks' | 'jsEnabled' | 'usePostcodeLookup' | 'giveInstructions' | 'instructionText' | 'paymentAmount' | 'paymentDescription' | 'paymentTestApiKey' | 'paymentLiveApiKey' | 'conditionalAmount' | 'conditionalAmountCondition' | 'geometryTypes' | 'countries' | 'exactFeatures' | 'minFeatures' | 'maxFeatures'>;
|
|
317
321
|
export type FormEditorInputPageSettings = Pick<FormEditor, 'pageHeadingAndGuidance' | 'pageHeading' | 'guidanceText' | 'repeater' | 'minItems' | 'maxItems' | 'questionSetName' | 'exitPage'>;
|
|
318
322
|
export type FormEditorInputGuidancePage = Pick<FormEditor, 'pageHeading' | 'guidanceText' | 'exitPage'>;
|
|
319
323
|
export type FormEditorInputQuestionDetails = Pick<FormEditorInputQuestion, 'question' | 'hintText' | 'shortDescription' | 'questionOptional' | 'questionType' | 'fileTypes' | 'documentTypes' | 'imageTypes' | 'tabularDataTypes' | 'autoCompleteOptions' | 'enhancedAction' | 'radioId' | 'radioText' | 'radioHint' | 'radioValue' | 'listItemsData' | 'jsEnabled' | 'paymentAmount' | 'paymentDescription' | 'paymentTestApiKey' | 'paymentLiveApiKey' | 'conditionalAmount' | 'conditionalAmountCondition'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,6BAA6B,EACnC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACV,MAAM,qCAAqC,CAAA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M,wBAAwB,GAAG,IAAI,CACzC,oBAAoB,EACpB,cAAc,CACf,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,wBAAwB,CAAA;AAEzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAC5C,aAAa,EACb,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,IAAI,CAAA;AAElD,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,GAAG,IAAI,CAAA;AAE5D,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;IAChD,GAAG,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD"}
|
package/package.json
CHANGED
package/src/components/enums.ts
CHANGED
|
@@ -35,6 +35,12 @@ export enum GeospatialFieldOptionsCountryEnum {
|
|
|
35
35
|
Wales = 'wales'
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export enum GeospatialFieldGeometryTypesEnum {
|
|
39
|
+
Point = 'point',
|
|
40
|
+
Line = 'line',
|
|
41
|
+
Shape = 'shape'
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
export const PreviewTypeEnum = {
|
|
39
45
|
...ComponentType,
|
|
40
46
|
Question: 'Question',
|
package/src/components/index.ts
CHANGED
package/src/components/types.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type LanguageMessages } from 'joi'
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type ComponentType,
|
|
5
|
+
type GeospatialFieldGeometryTypesEnum,
|
|
5
6
|
type PreviewTypeEnum
|
|
6
7
|
} from '~/src/components/enums.js'
|
|
7
8
|
import {
|
|
@@ -279,6 +280,7 @@ export interface GeospatialFieldComponent extends FormFieldBase {
|
|
|
279
280
|
options: FormFieldBase['options'] & {
|
|
280
281
|
condition?: string
|
|
281
282
|
countries?: GeospatialFieldOptionsCountry[]
|
|
283
|
+
geometryTypes?: GeospatialFieldGeometryTypesEnum[]
|
|
282
284
|
}
|
|
283
285
|
schema?: {
|
|
284
286
|
max?: number
|
|
@@ -3,6 +3,7 @@ import Joi, { type ArraySchema, type GetRuleOptions } from 'joi'
|
|
|
3
3
|
import { rtrimOnly } from '~/src/common/rtrim-only.js'
|
|
4
4
|
import {
|
|
5
5
|
ComponentType,
|
|
6
|
+
GeospatialFieldGeometryTypesEnum,
|
|
6
7
|
GeospatialFieldOptionsCountryEnum
|
|
7
8
|
} from '~/src/components/enums.js'
|
|
8
9
|
import {
|
|
@@ -478,6 +479,11 @@ export const maxFeaturesSchema = Joi.number()
|
|
|
478
479
|
.min(1)
|
|
479
480
|
.description('Maximum number of features allowed to be defined.')
|
|
480
481
|
|
|
482
|
+
export const geometryTypesSchema = Joi.array()
|
|
483
|
+
.items(Joi.string().valid(...Object.values(GeospatialFieldGeometryTypesEnum)))
|
|
484
|
+
.single()
|
|
485
|
+
.description('The geometry types allowed in a geospatial field')
|
|
486
|
+
|
|
481
487
|
type GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {
|
|
482
488
|
args: Record<K, T>
|
|
483
489
|
}
|
|
@@ -673,7 +679,8 @@ export const questionDetailsFullSchema = {
|
|
|
673
679
|
countriesSchema,
|
|
674
680
|
minFeaturesSchema,
|
|
675
681
|
maxFeaturesSchema,
|
|
676
|
-
exactFeaturesSchema
|
|
682
|
+
exactFeaturesSchema,
|
|
683
|
+
geometryTypesSchema
|
|
677
684
|
}
|
|
678
685
|
|
|
679
686
|
export const formEditorInputPageKeys = {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type ComponentType,
|
|
3
|
+
type GeospatialFieldGeometryTypesEnum
|
|
4
|
+
} from '~/src/components/enums.js'
|
|
2
5
|
import {
|
|
3
6
|
type ComponentDef,
|
|
4
7
|
type GeospatialFieldOptionsCountry
|
|
@@ -388,6 +391,11 @@ export interface FormEditor {
|
|
|
388
391
|
* The maximum number of features to define for geospatial questions
|
|
389
392
|
*/
|
|
390
393
|
maxFeatures: string
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* The geometry types restriction for geospatial questions
|
|
397
|
+
*/
|
|
398
|
+
geometryTypes?: GeospatialFieldGeometryTypesEnum[]
|
|
391
399
|
}
|
|
392
400
|
|
|
393
401
|
export type FormEditorInputPage = Pick<
|
|
@@ -469,6 +477,7 @@ export type FormEditorInputQuestion = Pick<
|
|
|
469
477
|
| 'paymentLiveApiKey'
|
|
470
478
|
| 'conditionalAmount'
|
|
471
479
|
| 'conditionalAmountCondition'
|
|
480
|
+
| 'geometryTypes'
|
|
472
481
|
| 'countries'
|
|
473
482
|
| 'exactFeatures'
|
|
474
483
|
| 'minFeatures'
|