@defra/forms-model 3.0.692 → 3.0.694
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/types.js.map +1 -1
- package/dist/module/form/form-manager/errors.js +32 -0
- package/dist/module/form/form-manager/errors.js.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-manager/errors.d.ts +6 -0
- package/dist/types/form/form-manager/errors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/types.ts +7 -6
- package/src/form/form-manager/errors.ts +56 -0
|
@@ -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 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 errorDescription?: 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 | ComponentType.NotificationBanner\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\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n earliestDate?: string\n latestDate?: string\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 type TelephoneNumberFieldOptionsFormat = 'international' | 'uk'\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n format?: TelephoneNumberFieldOptionsFormat\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 customValidationMessage?: 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\nexport interface MapLayerOptions {\n sssi?: boolean\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 mapLayers?: MapLayerOptions\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 mapLayers?: MapLayerOptions\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 mapLayers?: MapLayerOptions\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 FormFieldBase {\n type: ComponentType.MonthYearField\n options: FormFieldBase['options'] & {\n customValidationMessage?: string\n earliestMonthYear?: string\n latestMonthYear?: 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 mapLayers?: MapLayerOptions\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 NotificationBannerComponent extends ContentFieldBase {\n type: ComponentType.NotificationBanner\n content: string\n options: ContentFieldBase['options'] & {\n type?: 'success'\n heading?: string\n condition?: string\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 | NotificationBannerComponent\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 instruction fields\nexport type ComponentsDefWithInstructions =\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\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 errorDescription?: 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 | ComponentType.NotificationBanner\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\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n earliestDate?: string\n latestDate?: string\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 type TelephoneNumberFieldOptionsFormat = 'international' | 'uk'\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n format?: TelephoneNumberFieldOptionsFormat\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 customValidationMessage?: 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\nexport interface MapLayerOptions {\n sssi?: boolean\n}\n\n// Precise Location Fields\nexport type GeospatialFieldOptionsCountry =\n | 'england'\n | 'wales'\n | 'northern-ireland'\n | 'scotland'\n\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n mapLayers?: MapLayerOptions\n countries?: GeospatialFieldOptionsCountry[]\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 mapLayers?: MapLayerOptions\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 mapLayers?: MapLayerOptions\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 FormFieldBase {\n type: ComponentType.MonthYearField\n options: FormFieldBase['options'] & {\n customValidationMessage?: string\n earliestMonthYear?: string\n latestMonthYear?: 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 interface GeospatialFieldComponent extends FormFieldBase {\n type: ComponentType.GeospatialField\n options: FormFieldBase['options'] & {\n condition?: string\n countries?: GeospatialFieldOptionsCountry[]\n geometryTypes?: GeospatialFieldGeometryTypesEnum[]\n mapLayers?: MapLayerOptions\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 NotificationBannerComponent extends ContentFieldBase {\n type: ComponentType.NotificationBanner\n content: string\n options: ContentFieldBase['options'] & {\n type?: 'success'\n heading?: string\n condition?: string\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 | NotificationBannerComponent\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 instruction fields\nexport type ComponentsDefWithInstructions =\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\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":[]}
|
|
@@ -93,4 +93,36 @@ export function getErrors(validationError) {
|
|
|
93
93
|
};
|
|
94
94
|
}) ?? [];
|
|
95
95
|
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Human-readable messages for each {@link FormDefinitionError} code, shared
|
|
99
|
+
* by services that surface definition-validation failures (designer editor
|
|
100
|
+
* flows, runner preview error pages).
|
|
101
|
+
*/
|
|
102
|
+
export const formErrorsToMessages = {
|
|
103
|
+
[FormDefinitionError.UniquePageId]: 'Each page must have a unique ID. Change the page ID to one that is not already used.',
|
|
104
|
+
[FormDefinitionError.UniquePagePath]: 'Each page must have a unique path. Change the page path to one that is not already used.',
|
|
105
|
+
[FormDefinitionError.UniquePageComponentId]: 'Each question on a page must have a unique ID. Change the question ID to one that is not already used.',
|
|
106
|
+
[FormDefinitionError.UniquePageComponentName]: 'Each question on a page must have a unique name. Change the question name to one that is not already used.',
|
|
107
|
+
[FormDefinitionError.UniqueSectionId]: 'Each section must have a unique ID. Change the section ID to one that is not already used.',
|
|
108
|
+
[FormDefinitionError.UniqueSectionName]: 'Each section must have a unique name. Change the section name to one that is not already used.',
|
|
109
|
+
[FormDefinitionError.UniqueSectionTitle]: 'Each section must have a unique title. Change the section title to one that is not already used.',
|
|
110
|
+
[FormDefinitionError.UniqueListId]: 'Each list must have a unique ID. Change the list ID to one that is not already used.',
|
|
111
|
+
[FormDefinitionError.UniqueListTitle]: 'Each list must have a unique title. Change the list title to one that is not already used.',
|
|
112
|
+
[FormDefinitionError.UniqueListName]: 'Each list must have a unique name. Change the list name to one that is not already used.',
|
|
113
|
+
[FormDefinitionError.UniqueConditionId]: 'Each condition must have a unique ID. Change the condition ID to one that is not already used.',
|
|
114
|
+
[FormDefinitionError.UniqueConditionDisplayName]: 'Each condition must have a unique display name. Change the display name to one that is not already used.',
|
|
115
|
+
[FormDefinitionError.UniqueListItemId]: 'Each item in a list must have a unique ID. Change the item ID to one that is not already used.',
|
|
116
|
+
[FormDefinitionError.UniqueListItemText]: 'Each item in a list must have unique text. Change the item text to one that is not already used.',
|
|
117
|
+
[FormDefinitionError.UniqueListItemValue]: 'Each item in a list must have a unique value. Change the item value to one that is not already used.',
|
|
118
|
+
[FormDefinitionError.RefPageCondition]: 'This page is referenced by a condition. Remove the condition before making changes to this page.',
|
|
119
|
+
[FormDefinitionError.RefConditionComponentId]: 'Remove the condition before deleting this page',
|
|
120
|
+
[FormDefinitionError.RefConditionListId]: 'A condition is using a list in this form. Remove the condition before making changes to the list.',
|
|
121
|
+
[FormDefinitionError.RefConditionItemId]: 'A condition is using an item in this list. Remove the condition before making changes to the item.',
|
|
122
|
+
[FormDefinitionError.RefConditionConditionId]: 'A condition is using another condition. Remove the reference before making changes.',
|
|
123
|
+
[FormDefinitionError.RefPageComponentList]: 'A question on this page is using a list. Remove the reference before making changes to the list.',
|
|
124
|
+
[FormDefinitionError.IncompatibleConditionComponentType]: 'You cannot change to this question type because this question is used in a condition. Remove the condition or select a different question type.',
|
|
125
|
+
[FormDefinitionError.IncompatibleQuestionRegex]: 'The regex expression is invalid',
|
|
126
|
+
[FormDefinitionError.Other]: 'There is a problem with the form definition. Check your changes and try again.'
|
|
127
|
+
};
|
|
96
128
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":["FormDefinitionError","FormDefinitionErrorType","formDefinitionErrors","checkErrors","formErrors","possibleErrors","Array","isArray","errors","forEach","err","local","errorType","formError","errorDetails","keyMatch","key","path","type","Unique","code","errorCode","Ref","Incompatible","Type","getErrors","validationError","details","map","detail","context","id","message","pos","dupePos","valueKey","value","label","incompatibleObject","reason","Other"],"sources":["../../../../src/form/form-manager/errors.ts"],"sourcesContent":["import type Joi from 'joi'\nimport { type ValidationError } from 'joi'\n\nimport {\n FormDefinitionError,\n FormDefinitionErrorType,\n formDefinitionErrors,\n type FormDefinitionErrorCause\n} from '~/src/form/form-manager/types.js'\n\n/**\n * Checks and applies an `errorType` and also an `errorCode` for known errors\n */\nexport const checkErrors = (\n formErrors: FormDefinitionError | FormDefinitionError[]\n) => {\n const possibleErrors = Array.isArray(formErrors) ? formErrors : [formErrors]\n\n return function (errors: Joi.ErrorReport[]) {\n errors.forEach((err) => {\n if (err.local.errorType) {\n return\n }\n\n for (const formError of possibleErrors) {\n const errorDetails = formDefinitionErrors[formError]\n\n // Joi's `context.key` will be the index for arrays\n // in which case use the path, otherwise use the key\n const keyMatch =\n typeof err.local.key === 'number' ? err.local.path : err.local.key\n\n if (\n errorDetails.type === FormDefinitionErrorType.Unique &&\n err.code === 'array.unique' &&\n keyMatch === errorDetails.key\n ) {\n err.local.errorCode = formError\n err.local.errorType = FormDefinitionErrorType.Unique\n return\n }\n\n if (\n errorDetails.type === FormDefinitionErrorType.Ref &&\n err.code === 'any.only' &&\n keyMatch === errorDetails.key\n ) {\n err.local.errorCode = formError\n err.local.errorType = FormDefinitionErrorType.Ref\n return\n }\n\n if (\n errorDetails.type === FormDefinitionErrorType.Incompatible &&\n err.code === 'custom.incompatible'\n // Match any key\n ) {\n err.local.errorCode = formError\n err.local.errorType = FormDefinitionErrorType.Incompatible\n return\n }\n\n err.local.errorType = FormDefinitionErrorType.Type\n }\n })\n return errors\n }\n}\n\n/**\n * Get the custom errors from a form definition joi validation error\n */\nexport function getErrors(\n validationError: ValidationError | undefined\n): FormDefinitionErrorCause[] {\n return (\n validationError?.details.map((detail) => {\n if (\n detail.context?.errorType === FormDefinitionErrorType.Unique &&\n detail.context.errorCode\n ) {\n return {\n id: /** @type {FormDefinitionError} */ detail.context.errorCode,\n type: FormDefinitionErrorType.Unique,\n message: detail.message,\n detail: {\n path: detail.path,\n pos: detail.context.pos,\n dupePos: detail.context.dupePos\n }\n }\n }\n\n if (\n detail.context?.errorType === FormDefinitionErrorType.Ref &&\n detail.context.errorCode\n ) {\n return {\n id: /** @type {FormDefinitionError} */ detail.context.errorCode,\n type: FormDefinitionErrorType.Ref,\n message: detail.message,\n detail: {\n path: detail.path\n }\n }\n }\n\n if (\n detail.context?.errorType === FormDefinitionErrorType.Incompatible &&\n detail.context.errorCode\n ) {\n return {\n id: /** @type {FormDefinitionError} */ detail.context.errorCode,\n type: FormDefinitionErrorType.Incompatible,\n message: detail.message,\n detail: {\n path: detail.path,\n key: detail.context.key,\n valueKey: detail.context.valueKey,\n value: detail.context.value,\n label: detail.context.label,\n incompatibleObject: detail.context.incompatibleObject,\n reason: detail.context.reason\n }\n }\n }\n\n // Catch all others\n return {\n id: FormDefinitionError.Other,\n type: FormDefinitionErrorType.Type,\n message: detail.message,\n detail: detail.context\n }\n }) ?? []\n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Y,MAAM,CAACC,OAAO,EAAElB,SAAS,KAAKX,uBAAuB,CAACsB,YAAY,IAClEM,MAAM,CAACC,OAAO,CAACT,SAAS,EACxB;MACA,OAAO;QACLU,EAAE,EAAE,kCAAmCF,MAAM,CAACC,OAAO,CAACT,SAAS;QAC/DH,IAAI,EAAEjB,uBAAuB,CAACsB,YAAY;QAC1CS,OAAO,EAAEH,MAAM,CAACG,OAAO;QACvBH,MAAM,EAAE;UACNZ,IAAI,EAAEY,MAAM,CAACZ,IAAI;UACjBD,GAAG,EAAEa,MAAM,CAACC,OAAO,CAACd,GAAG;UACvBmB,QAAQ,EAAEN,MAAM,CAACC,OAAO,CAACK,QAAQ;UACjCC,KAAK,EAAEP,MAAM,CAACC,OAAO,CAACM,KAAK;UAC3BC,KAAK,EAAER,MAAM,CAACC,OAAO,CAACO,KAAK;UAC3BC,kBAAkB,EAAET,MAAM,CAACC,OAAO,CAACQ,kBAAkB;UACrDC,MAAM,EAAEV,MAAM,CAACC,OAAO,CAACS;QACzB;MACF,CAAC;IACH;;IAEA;IACA,OAAO;MACLR,EAAE,EAAE/B,mBAAmB,CAACwC,KAAK;MAC7BtB,IAAI,EAAEjB,uBAAuB,CAACuB,IAAI;MAClCQ,OAAO,EAAEH,MAAM,CAACG,OAAO;MACvBH,MAAM,EAAEA,MAAM,CAACC;IACjB,CAAC;EACH,CAAC,CAAC,IAAI,EAAE;AAEZ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"errors.js","names":["FormDefinitionError","FormDefinitionErrorType","formDefinitionErrors","checkErrors","formErrors","possibleErrors","Array","isArray","errors","forEach","err","local","errorType","formError","errorDetails","keyMatch","key","path","type","Unique","code","errorCode","Ref","Incompatible","Type","getErrors","validationError","details","map","detail","context","id","message","pos","dupePos","valueKey","value","label","incompatibleObject","reason","Other","formErrorsToMessages","UniquePageId","UniquePagePath","UniquePageComponentId","UniquePageComponentName","UniqueSectionId","UniqueSectionName","UniqueSectionTitle","UniqueListId","UniqueListTitle","UniqueListName","UniqueConditionId","UniqueConditionDisplayName","UniqueListItemId","UniqueListItemText","UniqueListItemValue","RefPageCondition","RefConditionComponentId","RefConditionListId","RefConditionItemId","RefConditionConditionId","RefPageComponentList","IncompatibleConditionComponentType","IncompatibleQuestionRegex"],"sources":["../../../../src/form/form-manager/errors.ts"],"sourcesContent":["import type Joi from 'joi'\nimport { type ValidationError } from 'joi'\n\nimport {\n FormDefinitionError,\n FormDefinitionErrorType,\n formDefinitionErrors,\n type FormDefinitionErrorCause\n} from '~/src/form/form-manager/types.js'\n\n/**\n * Checks and applies an `errorType` and also an `errorCode` for known errors\n */\nexport const checkErrors = (\n formErrors: FormDefinitionError | FormDefinitionError[]\n) => {\n const possibleErrors = Array.isArray(formErrors) ? formErrors : [formErrors]\n\n return function (errors: Joi.ErrorReport[]) {\n errors.forEach((err) => {\n if (err.local.errorType) {\n return\n }\n\n for (const formError of possibleErrors) {\n const errorDetails = formDefinitionErrors[formError]\n\n // Joi's `context.key` will be the index for arrays\n // in which case use the path, otherwise use the key\n const keyMatch =\n typeof err.local.key === 'number' ? err.local.path : err.local.key\n\n if (\n errorDetails.type === FormDefinitionErrorType.Unique &&\n err.code === 'array.unique' &&\n keyMatch === errorDetails.key\n ) {\n err.local.errorCode = formError\n err.local.errorType = FormDefinitionErrorType.Unique\n return\n }\n\n if (\n errorDetails.type === FormDefinitionErrorType.Ref &&\n err.code === 'any.only' &&\n keyMatch === errorDetails.key\n ) {\n err.local.errorCode = formError\n err.local.errorType = FormDefinitionErrorType.Ref\n return\n }\n\n if (\n errorDetails.type === FormDefinitionErrorType.Incompatible &&\n err.code === 'custom.incompatible'\n // Match any key\n ) {\n err.local.errorCode = formError\n err.local.errorType = FormDefinitionErrorType.Incompatible\n return\n }\n\n err.local.errorType = FormDefinitionErrorType.Type\n }\n })\n return errors\n }\n}\n\n/**\n * Get the custom errors from a form definition joi validation error\n */\nexport function getErrors(\n validationError: ValidationError | undefined\n): FormDefinitionErrorCause[] {\n return (\n validationError?.details.map((detail) => {\n if (\n detail.context?.errorType === FormDefinitionErrorType.Unique &&\n detail.context.errorCode\n ) {\n return {\n id: /** @type {FormDefinitionError} */ detail.context.errorCode,\n type: FormDefinitionErrorType.Unique,\n message: detail.message,\n detail: {\n path: detail.path,\n pos: detail.context.pos,\n dupePos: detail.context.dupePos\n }\n }\n }\n\n if (\n detail.context?.errorType === FormDefinitionErrorType.Ref &&\n detail.context.errorCode\n ) {\n return {\n id: /** @type {FormDefinitionError} */ detail.context.errorCode,\n type: FormDefinitionErrorType.Ref,\n message: detail.message,\n detail: {\n path: detail.path\n }\n }\n }\n\n if (\n detail.context?.errorType === FormDefinitionErrorType.Incompatible &&\n detail.context.errorCode\n ) {\n return {\n id: /** @type {FormDefinitionError} */ detail.context.errorCode,\n type: FormDefinitionErrorType.Incompatible,\n message: detail.message,\n detail: {\n path: detail.path,\n key: detail.context.key,\n valueKey: detail.context.valueKey,\n value: detail.context.value,\n label: detail.context.label,\n incompatibleObject: detail.context.incompatibleObject,\n reason: detail.context.reason\n }\n }\n }\n\n // Catch all others\n return {\n id: FormDefinitionError.Other,\n type: FormDefinitionErrorType.Type,\n message: detail.message,\n detail: detail.context\n }\n }) ?? []\n )\n}\n\n/**\n * Human-readable messages for each {@link FormDefinitionError} code, shared\n * by services that surface definition-validation failures (designer editor\n * flows, runner preview error pages).\n */\nexport const formErrorsToMessages: Record<FormDefinitionError, string> = {\n [FormDefinitionError.UniquePageId]:\n 'Each page must have a unique ID. Change the page ID to one that is not already used.',\n [FormDefinitionError.UniquePagePath]:\n 'Each page must have a unique path. Change the page path to one that is not already used.',\n [FormDefinitionError.UniquePageComponentId]:\n 'Each question on a page must have a unique ID. Change the question ID to one that is not already used.',\n [FormDefinitionError.UniquePageComponentName]:\n 'Each question on a page must have a unique name. Change the question name to one that is not already used.',\n [FormDefinitionError.UniqueSectionId]:\n 'Each section must have a unique ID. Change the section ID to one that is not already used.',\n [FormDefinitionError.UniqueSectionName]:\n 'Each section must have a unique name. Change the section name to one that is not already used.',\n [FormDefinitionError.UniqueSectionTitle]:\n 'Each section must have a unique title. Change the section title to one that is not already used.',\n [FormDefinitionError.UniqueListId]:\n 'Each list must have a unique ID. Change the list ID to one that is not already used.',\n [FormDefinitionError.UniqueListTitle]:\n 'Each list must have a unique title. Change the list title to one that is not already used.',\n [FormDefinitionError.UniqueListName]:\n 'Each list must have a unique name. Change the list name to one that is not already used.',\n [FormDefinitionError.UniqueConditionId]:\n 'Each condition must have a unique ID. Change the condition ID to one that is not already used.',\n [FormDefinitionError.UniqueConditionDisplayName]:\n 'Each condition must have a unique display name. Change the display name to one that is not already used.',\n [FormDefinitionError.UniqueListItemId]:\n 'Each item in a list must have a unique ID. Change the item ID to one that is not already used.',\n [FormDefinitionError.UniqueListItemText]:\n 'Each item in a list must have unique text. Change the item text to one that is not already used.',\n [FormDefinitionError.UniqueListItemValue]:\n 'Each item in a list must have a unique value. Change the item value to one that is not already used.',\n [FormDefinitionError.RefPageCondition]:\n 'This page is referenced by a condition. Remove the condition before making changes to this page.',\n [FormDefinitionError.RefConditionComponentId]:\n 'Remove the condition before deleting this page',\n [FormDefinitionError.RefConditionListId]:\n 'A condition is using a list in this form. Remove the condition before making changes to the list.',\n [FormDefinitionError.RefConditionItemId]:\n 'A condition is using an item in this list. Remove the condition before making changes to the item.',\n [FormDefinitionError.RefConditionConditionId]:\n 'A condition is using another condition. Remove the reference before making changes.',\n [FormDefinitionError.RefPageComponentList]:\n 'A question on this page is using a list. Remove the reference before making changes to the list.',\n [FormDefinitionError.IncompatibleConditionComponentType]:\n 'You cannot change to this question type because this question is used in a condition. Remove the condition or select a different question type.',\n [FormDefinitionError.IncompatibleQuestionRegex]:\n 'The regex expression is invalid',\n [FormDefinitionError.Other]:\n 'There is a problem with the form definition. Check your changes and try again.'\n}\n"],"mappings":"AAGA,SACEA,mBAAmB,EACnBC,uBAAuB,EACvBC,oBAAoB;;AAItB;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GACtBC,UAAuD,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F;EACxF,CAACjD,mBAAmB,CAACkD,eAAe,GAClC,4FAA4F;EAC9F,CAAClD,mBAAmB,CAACmD,cAAc,GACjC,0FAA0F;EAC5F,CAACnD,mBAAmB,CAACoD,iBAAiB,GACpC,gGAAgG;EAClG,CAACpD,mBAAmB,CAACqD,0BAA0B,GAC7C,0GAA0G;EAC5G,CAACrD,mBAAmB,CAACsD,gBAAgB,GACnC,gGAAgG;EAClG,CAACtD,mBAAmB,CAACuD,kBAAkB,GACrC,kGAAkG;EACpG,CAACvD,mBAAmB,CAACwD,mBAAmB,GACtC,sGAAsG;EACxG,CAACxD,mBAAmB,CAACyD,gBAAgB,GACnC,kGAAkG;EACpG,CAACzD,mBAAmB,CAAC0D,uBAAuB,GAC1C,gDAAgD;EAClD,CAAC1D,mBAAmB,CAAC2D,kBAAkB,GACrC,mGAAmG;EACrG,CAAC3D,mBAAmB,CAAC4D,kBAAkB,GACrC,oGAAoG;EACtG,CAAC5D,mBAAmB,CAAC6D,uBAAuB,GAC1C,qFAAqF;EACvF,CAAC7D,mBAAmB,CAAC8D,oBAAoB,GACvC,kGAAkG;EACpG,CAAC9D,mBAAmB,CAAC+D,kCAAkC,GACrD,iJAAiJ;EACnJ,CAAC/D,mBAAmB,CAACgE,yBAAyB,GAC5C,iCAAiC;EACnC,CAAChE,mBAAmB,CAACwC,KAAK,GACxB;AACJ,CAAC","ignoreList":[]}
|
|
@@ -153,12 +153,14 @@ export interface UkAddressFieldComponent extends FormFieldBase {
|
|
|
153
153
|
export interface MapLayerOptions {
|
|
154
154
|
sssi?: boolean;
|
|
155
155
|
}
|
|
156
|
+
export type GeospatialFieldOptionsCountry = 'england' | 'wales' | 'northern-ireland' | 'scotland';
|
|
156
157
|
export interface EastingNorthingFieldComponent extends FormFieldBase {
|
|
157
158
|
type: ComponentType.EastingNorthingField;
|
|
158
159
|
options: FormFieldBase['options'] & {
|
|
159
160
|
condition?: string;
|
|
160
161
|
customValidationMessage?: string;
|
|
161
162
|
mapLayers?: MapLayerOptions;
|
|
163
|
+
countries?: GeospatialFieldOptionsCountry[];
|
|
162
164
|
};
|
|
163
165
|
schema?: {
|
|
164
166
|
easting?: {
|
|
@@ -236,7 +238,6 @@ export interface PaymentFieldComponent extends FormFieldBase {
|
|
|
236
238
|
emailField?: string;
|
|
237
239
|
};
|
|
238
240
|
}
|
|
239
|
-
export type GeospatialFieldOptionsCountry = 'england' | 'wales' | 'northern-ireland' | 'scotland';
|
|
240
241
|
export interface GeospatialFieldComponent extends FormFieldBase {
|
|
241
242
|
type: ComponentType.GeospatialField;
|
|
242
243
|
options: FormFieldBase['options'] & {
|
|
@@ -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,gCAAgC,EACrC,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,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,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CAAA;AAG1B,MAAM,MAAM,wBAAwB,GAChC,kBAAkB,GAClB,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,6BAA6B,GAC7B,uBAAuB,GACvB,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,yBAAyB,GACzB,6BAA6B,GAC7B,uBAAuB,GACvB,qCAAqC,GACrC,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,CAAA;AAG5B,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,aAAa,GACb,2BAA2B,CAAA;AAG/B,MAAM,MAAM,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,GACpD,aAAa,CAAA;AAGjB,MAAM,MAAM,sBAAsB,GAC9B,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,CAAA;AAGvB,MAAM,MAAM,6BAA6B,GACrC,6BAA6B,GAC7B,uBAAuB,GACvB,qCAAqC,GACrC,qBAAqB,CAAA;AAGzB,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,YAAY,EACV,kBAAkB,GAClB,aAAa,GACb,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,eAAe,CAAA"}
|
|
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,gCAAgC,EACrC,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAA;AAE5C,MAAM,MAAM,wBAAwB,GA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qB,CAAA;AAGzB,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,YAAY,EACV,kBAAkB,GAClB,aAAa,GACb,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,eAAe,CAAA"}
|
|
@@ -9,4 +9,10 @@ export declare const checkErrors: (formErrors: FormDefinitionError | FormDefinit
|
|
|
9
9
|
* Get the custom errors from a form definition joi validation error
|
|
10
10
|
*/
|
|
11
11
|
export declare function getErrors(validationError: ValidationError | undefined): FormDefinitionErrorCause[];
|
|
12
|
+
/**
|
|
13
|
+
* Human-readable messages for each {@link FormDefinitionError} code, shared
|
|
14
|
+
* by services that surface definition-validation failures (designer editor
|
|
15
|
+
* flows, runner preview error pages).
|
|
16
|
+
*/
|
|
17
|
+
export declare const formErrorsToMessages: Record<FormDefinitionError, string>;
|
|
12
18
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/form/form-manager/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EACL,mBAAmB,EAGnB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,mBAAmB,GAAG,mBAAmB,EAAE,MAItC,QAAQ,GAAG,CAAC,WAAW,EAAE,sBAiD3C,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,eAAe,EAAE,eAAe,GAAG,SAAS,GAC3C,wBAAwB,EAAE,CA8D5B"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/form/form-manager/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EACL,mBAAmB,EAGnB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,mBAAmB,GAAG,mBAAmB,EAAE,MAItC,QAAQ,GAAG,CAAC,WAAW,EAAE,sBAiD3C,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,eAAe,EAAE,eAAe,GAAG,SAAS,GAC3C,wBAAwB,EAAE,CA8D5B;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAiDpE,CAAA"}
|
package/package.json
CHANGED
package/src/components/types.ts
CHANGED
|
@@ -194,12 +194,19 @@ export interface MapLayerOptions {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
// Precise Location Fields
|
|
197
|
+
export type GeospatialFieldOptionsCountry =
|
|
198
|
+
| 'england'
|
|
199
|
+
| 'wales'
|
|
200
|
+
| 'northern-ireland'
|
|
201
|
+
| 'scotland'
|
|
202
|
+
|
|
197
203
|
export interface EastingNorthingFieldComponent extends FormFieldBase {
|
|
198
204
|
type: ComponentType.EastingNorthingField
|
|
199
205
|
options: FormFieldBase['options'] & {
|
|
200
206
|
condition?: string
|
|
201
207
|
customValidationMessage?: string
|
|
202
208
|
mapLayers?: MapLayerOptions
|
|
209
|
+
countries?: GeospatialFieldOptionsCountry[]
|
|
203
210
|
}
|
|
204
211
|
schema?: {
|
|
205
212
|
easting?: {
|
|
@@ -286,12 +293,6 @@ export interface PaymentFieldComponent extends FormFieldBase {
|
|
|
286
293
|
}
|
|
287
294
|
}
|
|
288
295
|
|
|
289
|
-
export type GeospatialFieldOptionsCountry =
|
|
290
|
-
| 'england'
|
|
291
|
-
| 'wales'
|
|
292
|
-
| 'northern-ireland'
|
|
293
|
-
| 'scotland'
|
|
294
|
-
|
|
295
296
|
export interface GeospatialFieldComponent extends FormFieldBase {
|
|
296
297
|
type: ComponentType.GeospatialField
|
|
297
298
|
options: FormFieldBase['options'] & {
|
|
@@ -135,3 +135,59 @@ export function getErrors(
|
|
|
135
135
|
}) ?? []
|
|
136
136
|
)
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Human-readable messages for each {@link FormDefinitionError} code, shared
|
|
141
|
+
* by services that surface definition-validation failures (designer editor
|
|
142
|
+
* flows, runner preview error pages).
|
|
143
|
+
*/
|
|
144
|
+
export const formErrorsToMessages: Record<FormDefinitionError, string> = {
|
|
145
|
+
[FormDefinitionError.UniquePageId]:
|
|
146
|
+
'Each page must have a unique ID. Change the page ID to one that is not already used.',
|
|
147
|
+
[FormDefinitionError.UniquePagePath]:
|
|
148
|
+
'Each page must have a unique path. Change the page path to one that is not already used.',
|
|
149
|
+
[FormDefinitionError.UniquePageComponentId]:
|
|
150
|
+
'Each question on a page must have a unique ID. Change the question ID to one that is not already used.',
|
|
151
|
+
[FormDefinitionError.UniquePageComponentName]:
|
|
152
|
+
'Each question on a page must have a unique name. Change the question name to one that is not already used.',
|
|
153
|
+
[FormDefinitionError.UniqueSectionId]:
|
|
154
|
+
'Each section must have a unique ID. Change the section ID to one that is not already used.',
|
|
155
|
+
[FormDefinitionError.UniqueSectionName]:
|
|
156
|
+
'Each section must have a unique name. Change the section name to one that is not already used.',
|
|
157
|
+
[FormDefinitionError.UniqueSectionTitle]:
|
|
158
|
+
'Each section must have a unique title. Change the section title to one that is not already used.',
|
|
159
|
+
[FormDefinitionError.UniqueListId]:
|
|
160
|
+
'Each list must have a unique ID. Change the list ID to one that is not already used.',
|
|
161
|
+
[FormDefinitionError.UniqueListTitle]:
|
|
162
|
+
'Each list must have a unique title. Change the list title to one that is not already used.',
|
|
163
|
+
[FormDefinitionError.UniqueListName]:
|
|
164
|
+
'Each list must have a unique name. Change the list name to one that is not already used.',
|
|
165
|
+
[FormDefinitionError.UniqueConditionId]:
|
|
166
|
+
'Each condition must have a unique ID. Change the condition ID to one that is not already used.',
|
|
167
|
+
[FormDefinitionError.UniqueConditionDisplayName]:
|
|
168
|
+
'Each condition must have a unique display name. Change the display name to one that is not already used.',
|
|
169
|
+
[FormDefinitionError.UniqueListItemId]:
|
|
170
|
+
'Each item in a list must have a unique ID. Change the item ID to one that is not already used.',
|
|
171
|
+
[FormDefinitionError.UniqueListItemText]:
|
|
172
|
+
'Each item in a list must have unique text. Change the item text to one that is not already used.',
|
|
173
|
+
[FormDefinitionError.UniqueListItemValue]:
|
|
174
|
+
'Each item in a list must have a unique value. Change the item value to one that is not already used.',
|
|
175
|
+
[FormDefinitionError.RefPageCondition]:
|
|
176
|
+
'This page is referenced by a condition. Remove the condition before making changes to this page.',
|
|
177
|
+
[FormDefinitionError.RefConditionComponentId]:
|
|
178
|
+
'Remove the condition before deleting this page',
|
|
179
|
+
[FormDefinitionError.RefConditionListId]:
|
|
180
|
+
'A condition is using a list in this form. Remove the condition before making changes to the list.',
|
|
181
|
+
[FormDefinitionError.RefConditionItemId]:
|
|
182
|
+
'A condition is using an item in this list. Remove the condition before making changes to the item.',
|
|
183
|
+
[FormDefinitionError.RefConditionConditionId]:
|
|
184
|
+
'A condition is using another condition. Remove the reference before making changes.',
|
|
185
|
+
[FormDefinitionError.RefPageComponentList]:
|
|
186
|
+
'A question on this page is using a list. Remove the reference before making changes to the list.',
|
|
187
|
+
[FormDefinitionError.IncompatibleConditionComponentType]:
|
|
188
|
+
'You cannot change to this question type because this question is used in a condition. Remove the condition or select a different question type.',
|
|
189
|
+
[FormDefinitionError.IncompatibleQuestionRegex]:
|
|
190
|
+
'The regex expression is invalid',
|
|
191
|
+
[FormDefinitionError.Other]:
|
|
192
|
+
'There is a problem with the form definition. Check your changes and try again.'
|
|
193
|
+
}
|