@defra/forms-model 3.0.713 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/module/form/form-definition/constants.js +1 -0
  2. package/dist/module/form/form-definition/constants.js.map +1 -1
  3. package/dist/module/form/form-definition/helpers.js +30 -0
  4. package/dist/module/form/form-definition/helpers.js.map +1 -1
  5. package/dist/module/form/form-definition/index.js +2 -2
  6. package/dist/module/form/form-definition/index.js.map +1 -1
  7. package/dist/module/form/form-editor/index.js +1 -1
  8. package/dist/module/form/form-editor/index.js.map +1 -1
  9. package/dist/module/form/form-submission/index.js +2 -1
  10. package/dist/module/form/form-submission/index.js.map +1 -1
  11. package/dist/module/form/form-submission/types.js.map +1 -1
  12. package/dist/types/common/search/index.d.ts +4 -4
  13. package/dist/types/form/form-definition/constants.d.ts +1 -0
  14. package/dist/types/form/form-definition/constants.d.ts.map +1 -1
  15. package/dist/types/form/form-definition/helpers.d.ts +23 -0
  16. package/dist/types/form/form-definition/helpers.d.ts.map +1 -1
  17. package/dist/types/form/form-definition/index.d.ts +3 -3
  18. package/dist/types/form/form-definition/index.d.ts.map +1 -1
  19. package/dist/types/form/form-editor/index.d.ts +16 -22
  20. package/dist/types/form/form-editor/index.d.ts.map +1 -1
  21. package/dist/types/form/form-submission/index.d.ts.map +1 -1
  22. package/dist/types/form/form-submission/types.d.ts +2 -0
  23. package/dist/types/form/form-submission/types.d.ts.map +1 -1
  24. package/package.json +5 -5
  25. package/src/form/form-definition/constants.ts +2 -0
  26. package/src/form/form-definition/helpers.ts +49 -0
  27. package/src/form/form-definition/index.ts +2 -1
  28. package/src/form/form-editor/index.ts +1 -1
  29. package/src/form/form-submission/index.ts +2 -1
  30. package/src/form/form-submission/types.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["JoiDate","JoiBase","rtrimOnly","ComponentType","GeospatialFieldGeometryTypesEnum","GeospatialFieldOptionsCountryEnum","TelephoneNumberFieldOptionsFormatEnum","MAX_NUMBER_OF_REPEAT_ITEMS","MIN_NUMBER_OF_REPEAT_ITEMS","preventUnicodeInEmail","Joi","extend","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","errorDescriptionSchema","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","mapLayersSchema","exactFeaturesSchema","minFeaturesSchema","maxFeaturesSchema","geometryTypesSchema","telephoneNumberFormatSchema","customValidator","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","formEditorInputCheckAnswersSettingsKeys","declarationText","formEditorInputCheckAnswersSettingSchema","formEditorInputQuestionKeys","question","shortDescription","errorDescription","hintText","questionOptional","formEditorInputQuestionSchema","formEditorInputPageSettingsKeys","pageHeadingAndGuidance","pageHeading","guidanceText","formEditorInputPageSettingsSchema","govukFieldValueIsString","govukField","includes","govukFieldIsChecked","checkedValue","checked","allowedErrorTemplateFunctions"],"sources":["../../../../src/form/form-editor/index.ts"],"sourcesContent":["import JoiDate from '@joi/date'\nimport JoiBase, { type ArraySchema, type GetRuleOptions } from 'joi'\n\nimport { rtrimOnly } from '~/src/common/rtrim-only.js'\nimport {\n ComponentType,\n GeospatialFieldGeometryTypesEnum,\n GeospatialFieldOptionsCountryEnum,\n TelephoneNumberFieldOptionsFormatEnum\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\nconst Joi = JoiBase.extend(JoiDate) as JoiBase.Root\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 errorDescriptionSchema = Joi.string()\n .custom(rtrimOnly)\n .allow('')\n .optional()\n .description('Description that will be displayed in error messages')\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 mapLayersSchema = Joi.array()\n .items(Joi.string().valid('sssi'))\n .single()\n .description('The map layers to be displayed')\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\nexport const telephoneNumberFormatSchema = Joi.string()\n .valid(...Object.values(TelephoneNumberFieldOptionsFormatEnum), 'any')\n .description('The format for the telephone number field')\n\ntype GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {\n args: Record<K, T>\n}\n\ninterface DSLSchema<\n 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 JoiBase.Root {\n dsv<TSchema>(): DSLSchema<TSchema>\n}\n\nexport const customValidator = Joi.extend((joi: JoiBase.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 errorDescriptionSchema,\n suffixSchema,\n tabularDataTypesSchema,\n usePostcodeLookupSchema,\n minChecksSchema,\n maxChecksSchema,\n exactChecksSchema,\n countriesSchema,\n mapLayersSchema,\n minFeaturesSchema,\n maxFeaturesSchema,\n exactFeaturesSchema,\n geometryTypesSchema,\n telephoneNumberFormatSchema\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 formEditorInputCheckAnswersSettingsKeys = {\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(formEditorInputCheckAnswersSettingsKeys)\n .required()\n .description('Configuration for the check-answers page')\n\nexport const formEditorInputQuestionKeys = {\n question: questionSchema,\n shortDescription: shortDescriptionSchema,\n errorDescription: errorDescriptionSchema,\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 'errorDescription',\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,OAAO,MAAM,WAAW;AAC/B,OAAOC,OAAO,MAAiD,KAAK;AAEpE,SAASC,SAAS;AAClB,SACEC,aAAa,EACbC,gCAAgC,EAChCC,iCAAiC,EACjCC,qCAAqC;AAEvC,SACEC,0BAA0B,EAC1BC,0BAA0B;AAY5B,SAASC,qBAAqB;AAE9B,MAAMC,GAAG,GAAGT,OAAO,CAACU,MAAM,CAACX,OAAO,CAAiB;AAEnD,OAAO,MAAMY,2BAA2B,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,C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C2K,MAAM,CAA8B,CAAC,CACtC1B,IAAI,CAAC+C,+BAA+B,CAAC,CACrCjL,QAAQ,CAAC,CAAC,CACVJ,WAAW,CAAC,0DAA0D,CAAC;AAE5E,OAAO,SAAS0L,uBAAuBA,CACrCC,UAAsB,EACU;EAChC,OAAO,CACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,oBAAoB,CACrB,CAACC,QAAQ,CAAC,GAAGD,UAAU,CAACtC,IAAI,EAAE,CAAC;AAClC;AAEA,OAAO,SAASwC,mBAAmBA,CACjCF,UAAsB,EACkD;EACxE,IACEA,UAAU,CAACtC,IAAI,KAAK,kBAAkB,IACtCsC,UAAU,CAACtC,IAAI,KAAK,mBAAmB,EACvC;IACA,OAAO,KAAK;EACd;EACA,MAAMyC,YAAY,GAAGH,UAAU,CAACnI,KAAK,GAAG,CAAC,CAAC,CAACuI,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":["JoiDate","JoiBase","rtrimOnly","ComponentType","GeospatialFieldGeometryTypesEnum","GeospatialFieldOptionsCountryEnum","TelephoneNumberFieldOptionsFormatEnum","MAX_NUMBER_OF_REPEAT_ITEMS","MIN_NUMBER_OF_REPEAT_ITEMS","preventUnicodeInEmail","Joi","extend","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","errorDescriptionSchema","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","mapLayersSchema","exactFeaturesSchema","minFeaturesSchema","maxFeaturesSchema","geometryTypesSchema","telephoneNumberFormatSchema","customValidator","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","formEditorInputCheckAnswersSettingsKeys","declarationText","formEditorInputCheckAnswersSettingSchema","formEditorInputQuestionKeys","question","shortDescription","errorDescription","hintText","questionOptional","formEditorInputQuestionSchema","formEditorInputPageSettingsKeys","pageHeadingAndGuidance","pageHeading","guidanceText","formEditorInputPageSettingsSchema","govukFieldValueIsString","govukField","includes","govukFieldIsChecked","checkedValue","checked","allowedErrorTemplateFunctions"],"sources":["../../../../src/form/form-editor/index.ts"],"sourcesContent":["import { JoiDate } from '@joi/date'\nimport JoiBase, { type ArraySchema, type GetRuleOptions } from 'joi'\n\nimport { rtrimOnly } from '~/src/common/rtrim-only.js'\nimport {\n ComponentType,\n GeospatialFieldGeometryTypesEnum,\n GeospatialFieldOptionsCountryEnum,\n TelephoneNumberFieldOptionsFormatEnum\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\nconst Joi = JoiBase.extend(JoiDate) as JoiBase.Root\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 errorDescriptionSchema = Joi.string()\n .custom(rtrimOnly)\n .allow('')\n .optional()\n .description('Description that will be displayed in error messages')\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 mapLayersSchema = Joi.array()\n .items(Joi.string().valid('sssi'))\n .single()\n .description('The map layers to be displayed')\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\nexport const telephoneNumberFormatSchema = Joi.string()\n .valid(...Object.values(TelephoneNumberFieldOptionsFormatEnum), 'any')\n .description('The format for the telephone number field')\n\ntype GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {\n args: Record<K, T>\n}\n\ninterface DSLSchema<\n 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 JoiBase.Root {\n dsv<TSchema>(): DSLSchema<TSchema>\n}\n\nexport const customValidator = Joi.extend((joi: JoiBase.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 errorDescriptionSchema,\n suffixSchema,\n tabularDataTypesSchema,\n usePostcodeLookupSchema,\n minChecksSchema,\n maxChecksSchema,\n exactChecksSchema,\n countriesSchema,\n mapLayersSchema,\n minFeaturesSchema,\n maxFeaturesSchema,\n exactFeaturesSchema,\n geometryTypesSchema,\n telephoneNumberFormatSchema\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 formEditorInputCheckAnswersSettingsKeys = {\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(formEditorInputCheckAnswersSettingsKeys)\n .required()\n .description('Configuration for the check-answers page')\n\nexport const formEditorInputQuestionKeys = {\n question: questionSchema,\n shortDescription: shortDescriptionSchema,\n errorDescription: errorDescriptionSchema,\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 'errorDescription',\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,SAASA,OAAO,QAAQ,WAAW;AACnC,OAAOC,OAAO,MAAiD,KAAK;AAEpE,SAASC,SAAS;AAClB,SACEC,aAAa,EACbC,gCAAgC,EAChCC,iCAAiC,EACjCC,qCAAqC;AAEvC,SACEC,0BAA0B,EAC1BC,0BAA0B;AAY5B,SAASC,qBAAqB;AAE9B,MAAMC,GAAG,GAAGT,OAAO,CAACU,MAAM,CAACX,OAAO,CAAiB;AAEnD,OAAO,MAAMY,2BAA2B,GAAGF,GAAG,CAACG,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,KAAKX,qBAAqB,CAACU,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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AAO,SAASwC,mBAAmBA,CACjCF,UAAsB,EACkD;EACxE,IACEA,UAAU,CAACtC,IAAI,KAAK,kBAAkB,IACtCsC,UAAU,CAACtC,IAAI,KAAK,mBAAmB,EACvC;IACA,OAAO,KAAK;EACd;EACA,MAAMyC,YAAY,GAAGH,UAAU,CAACnI,KAAK,GAAG,CAAC,CAAC,CAACuI,OAAO;EAClD,OAAO,OAAOD,YAAY,KAAK,SAAS;AAC1C;;AAEA;AACA,OAAO,MAAME,6BAA6B,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC","ignoreList":[]}
@@ -79,7 +79,8 @@ export const saveAndExitV2MessageData = Joi.object().keys({
79
79
  title: Joi.string().required(),
80
80
  status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),
81
81
  isPreview: Joi.boolean().required(),
82
- baseUrl: Joi.string().required()
82
+ baseUrl: Joi.string().required(),
83
+ language: Joi.string().optional()
83
84
  }).label('SaveAndExitForm'),
84
85
  email: Joi.string().required(),
85
86
  auth: Joi.object({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Joi","FormStatus","ConditionEvaluationOutcome","SecurityQuestionsEnum","SubmissionEventMessageCategory","SubmissionEventMessageSchemaVersion","SubmissionEventMessageSource","SubmissionEventMessageType","formSubmitRecordSchema","object","name","string","required","description","title","value","allow","label","formSubmitRecordsetSchema","array","items","formSubmitConditionReferenceSchema","componentId","componentName","answered","boolean","formSubmitConditionEvaluationSchema","conditionId","outcome","valid","Object","values","references","formSubmitPayloadSchema","keys","retrievalKey","sessionId","referenceNumber","optional","language","main","repeaters","saveAndExitMessageData","form","id","status","Draft","Live","isPreview","baseUrl","email","security","question","answer","state","magicLinkGroupId","saveAndExitV2MessageData","auth","sub","issuer","submissionMessageSchema","schemaVersion","category","source","type","createdAt","date","messageCreatedAt","data","when","is","RUNNER_SAVE_AND_EXIT","then","otherwise","notifyEmailMessageSchema","reason","formId","templateId","emailAddress","personalisation","subject","body","notifyReplyToId"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { FormStatus } from '~/src/common/enums.js'\nimport {\n ConditionEvaluationOutcome,\n SecurityQuestionsEnum,\n SubmissionEventMessageCategory,\n SubmissionEventMessageSchemaVersion,\n SubmissionEventMessageSource,\n SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n type SaveAndExitMessage,\n type SaveAndExitMessageData,\n type SaveAndExitV2MessageData,\n type SubmitConditionEvaluation,\n type SubmitConditionReference,\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string()\n .required()\n .description('Field identifier matching the component name'),\n title: Joi.string()\n .required()\n .description('Human-readable label for the field'),\n value: Joi.string()\n .required()\n .allow('')\n .description('User-submitted value for the field, may be empty')\n})\n .label('FormSubmitRecord')\n .description('Individual field value in a form submission')\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string()\n .required()\n .description('Identifier for the repeatable section'),\n title: Joi.string()\n .required()\n .description('Human-readable title for the repeatable section'),\n value: Joi.array<SubmitRecord[]>()\n .items(\n Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .label('FormSubmitRecordGroup')\n )\n .required()\n .description(\n 'Array of record arrays, each representing a repeated instance'\n )\n})\n .label('FormSubmitRecordset')\n .description('Collection of repeated field values from a repeatable section')\n\n/**\n * Joi schema for `SubmitConditionReference` interface\n * @see {@link SubmitConditionReference}\n */\nexport const formSubmitConditionReferenceSchema =\n Joi.object<SubmitConditionReference>({\n componentId: Joi.string()\n .required()\n .description('Identifier of the component the condition depends on'),\n componentName: Joi.string()\n .required()\n .description(\n 'Name of the component the condition depends on, matching the submitted record name'\n ),\n answered: Joi.boolean()\n .required()\n .description(\n 'Whether the component held an answer when the condition was evaluated'\n )\n })\n .label('FormSubmitConditionReference')\n .description('A component a condition depends on, and its answered state')\n\n/**\n * Joi schema for `SubmitConditionEvaluation` interface\n * @see {@link SubmitConditionEvaluation}\n */\nexport const formSubmitConditionEvaluationSchema =\n Joi.object<SubmitConditionEvaluation>({\n conditionId: Joi.string()\n .required()\n .description('Identifier of the condition in the V2 form definition'),\n outcome: Joi.string()\n .valid(...Object.values(ConditionEvaluationOutcome))\n .required()\n .description('Result of evaluating the condition'),\n references: Joi.array<SubmitConditionReference>()\n .items(formSubmitConditionReferenceSchema)\n .required()\n .description(\n 'Components the condition depends on, including those reached through nested condition references'\n )\n })\n .label('FormSubmitConditionEvaluation')\n .description('Recorded outcome of a single condition at submission')\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string()\n .required()\n .description('Unique key to retrieve this submission later'),\n sessionId: Joi.string()\n .required()\n .description('User session identifier for tracking and security'),\n referenceNumber: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description('Reference number for the form submission'),\n language: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description(\n 'The currently-selected language at point of form submission'\n ),\n main: Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .description('Main (non-repeating) field values from the form'),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n .description('Repeatable section values from the form')\n })\n .required()\n .label('FormSubmitPayload')\n .description('Complete form submission payload structure with all form data')\n\nexport const saveAndExitMessageData = Joi.object<SaveAndExitMessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n security: Joi.object({\n question: Joi.string()\n .valid(...Object.values(SecurityQuestionsEnum))\n .required(),\n answer: Joi.string().required()\n }).label('SaveAndExitSecurity'),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitMessageData')\n\nexport const saveAndExitV2MessageData = Joi.object<SaveAndExitV2MessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n auth: Joi.object({\n sub: Joi.string().required(),\n issuer: Joi.string().required()\n }),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitV2MessageData')\n\nexport const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the SubmissionMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(SubmissionEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(SubmissionEventMessageType))\n .description('Event type'),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published'),\n data: Joi.when('type', {\n is: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT,\n then: saveAndExitMessageData,\n otherwise: saveAndExitV2MessageData\n })\n})\n\nexport const notifyEmailMessageSchema = Joi.object()\n .keys({\n source: Joi.string().required(),\n reason: Joi.string().required(),\n formId: Joi.string().allow(''),\n referenceNumber: Joi.string().allow(''),\n templateId: Joi.string().required(),\n emailAddress: Joi.string().email().required(),\n personalisation: Joi.object({\n subject: Joi.string().required(),\n body: Joi.string().required()\n }),\n notifyReplyToId: Joi.string().optional()\n })\n .label('NotifyEmailData')\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAErB,SAASC,UAAU;AACnB,SACEC,0BAA0B,EAC1BC,qBAAqB,EACrBC,8BAA8B,EAC9BC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B;AAa5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGR,GAAG,CAACS,MAAM,CAAe;EAC7DC,IAAI,EAAEV,GAAG,CAACW,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DC,KAAK,EAAEd,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,oCAAoC,CAAC;EACpDE,KAAK,EAAEf,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVI,KAAK,CAAC,EAAE,CAAC,CACTH,WAAW,CAAC,kDAAkD;AACnE,CAAC,CAAC,CACCI,KAAK,CAAC,kBAAkB,CAAC,CACzBJ,WAAW,CAAC,6CAA6C,CAAC;;AAE7D;AACA;AACA;AACA;AACA,OAAO,MAAMK,yBAAyB,GAAGlB,GAAG,CAACS,MAAM,CAAkB;EACnEC,IAAI,EAAEV,GAAG,CAACW,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,uCAAuC,CAAC;EACvDC,KAAK,EAAEd,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,iDAAiD,CAAC;EACjEE,KAAK,EAAEf,GAAG,CAACmB,KAAK,CAAiB,CAAC,CAC/BC,KAAK,CACJpB,GAAG,CAACmB,KAAK,CAAe,CAAC,CACtBC,KA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C/B+D,MAAM,EAAE3E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/BgE,MAAM,EAAE5E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACK,KAAK,CAAC,EAAE,CAAC;EAC9BqB,eAAe,EAAErC,GAAG,CAACW,MAAM,CAAC,CAAC,CAACK,KAAK,CAAC,EAAE,CAAC;EACvC6D,UAAU,EAAE7E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACnCkE,YAAY,EAAE9E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACuC,KAAK,CAAC,CAAC,CAACtC,QAAQ,CAAC,CAAC;EAC7CmE,eAAe,EAAE/E,GAAG,CAACS,MAAM,CAAC;IAC1BuE,OAAO,EAAEhF,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;IAChCqE,IAAI,EAAEjF,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;EAC9B,CAAC,CAAC;EACFsE,eAAe,EAAElF,GAAG,CAACW,MAAM,CAAC,CAAC,CAAC2B,QAAQ,CAAC;AACzC,CAAC,CAAC,CACDrB,KAAK,CAAC,iBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["Joi","FormStatus","ConditionEvaluationOutcome","SecurityQuestionsEnum","SubmissionEventMessageCategory","SubmissionEventMessageSchemaVersion","SubmissionEventMessageSource","SubmissionEventMessageType","formSubmitRecordSchema","object","name","string","required","description","title","value","allow","label","formSubmitRecordsetSchema","array","items","formSubmitConditionReferenceSchema","componentId","componentName","answered","boolean","formSubmitConditionEvaluationSchema","conditionId","outcome","valid","Object","values","references","formSubmitPayloadSchema","keys","retrievalKey","sessionId","referenceNumber","optional","language","main","repeaters","saveAndExitMessageData","form","id","status","Draft","Live","isPreview","baseUrl","email","security","question","answer","state","magicLinkGroupId","saveAndExitV2MessageData","auth","sub","issuer","submissionMessageSchema","schemaVersion","category","source","type","createdAt","date","messageCreatedAt","data","when","is","RUNNER_SAVE_AND_EXIT","then","otherwise","notifyEmailMessageSchema","reason","formId","templateId","emailAddress","personalisation","subject","body","notifyReplyToId"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { FormStatus } from '~/src/common/enums.js'\nimport {\n ConditionEvaluationOutcome,\n SecurityQuestionsEnum,\n SubmissionEventMessageCategory,\n SubmissionEventMessageSchemaVersion,\n SubmissionEventMessageSource,\n SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n type SaveAndExitMessage,\n type SaveAndExitMessageData,\n type SaveAndExitV2MessageData,\n type SubmitConditionEvaluation,\n type SubmitConditionReference,\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string()\n .required()\n .description('Field identifier matching the component name'),\n title: Joi.string()\n .required()\n .description('Human-readable label for the field'),\n value: Joi.string()\n .required()\n .allow('')\n .description('User-submitted value for the field, may be empty')\n})\n .label('FormSubmitRecord')\n .description('Individual field value in a form submission')\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string()\n .required()\n .description('Identifier for the repeatable section'),\n title: Joi.string()\n .required()\n .description('Human-readable title for the repeatable section'),\n value: Joi.array<SubmitRecord[]>()\n .items(\n Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .label('FormSubmitRecordGroup')\n )\n .required()\n .description(\n 'Array of record arrays, each representing a repeated instance'\n )\n})\n .label('FormSubmitRecordset')\n .description('Collection of repeated field values from a repeatable section')\n\n/**\n * Joi schema for `SubmitConditionReference` interface\n * @see {@link SubmitConditionReference}\n */\nexport const formSubmitConditionReferenceSchema =\n Joi.object<SubmitConditionReference>({\n componentId: Joi.string()\n .required()\n .description('Identifier of the component the condition depends on'),\n componentName: Joi.string()\n .required()\n .description(\n 'Name of the component the condition depends on, matching the submitted record name'\n ),\n answered: Joi.boolean()\n .required()\n .description(\n 'Whether the component held an answer when the condition was evaluated'\n )\n })\n .label('FormSubmitConditionReference')\n .description('A component a condition depends on, and its answered state')\n\n/**\n * Joi schema for `SubmitConditionEvaluation` interface\n * @see {@link SubmitConditionEvaluation}\n */\nexport const formSubmitConditionEvaluationSchema =\n Joi.object<SubmitConditionEvaluation>({\n conditionId: Joi.string()\n .required()\n .description('Identifier of the condition in the V2 form definition'),\n outcome: Joi.string()\n .valid(...Object.values(ConditionEvaluationOutcome))\n .required()\n .description('Result of evaluating the condition'),\n references: Joi.array<SubmitConditionReference>()\n .items(formSubmitConditionReferenceSchema)\n .required()\n .description(\n 'Components the condition depends on, including those reached through nested condition references'\n )\n })\n .label('FormSubmitConditionEvaluation')\n .description('Recorded outcome of a single condition at submission')\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string()\n .required()\n .description('Unique key to retrieve this submission later'),\n sessionId: Joi.string()\n .required()\n .description('User session identifier for tracking and security'),\n referenceNumber: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description('Reference number for the form submission'),\n language: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description(\n 'The currently-selected language at point of form submission'\n ),\n main: Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .description('Main (non-repeating) field values from the form'),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n .description('Repeatable section values from the form')\n })\n .required()\n .label('FormSubmitPayload')\n .description('Complete form submission payload structure with all form data')\n\nexport const saveAndExitMessageData = Joi.object<SaveAndExitMessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n security: Joi.object({\n question: Joi.string()\n .valid(...Object.values(SecurityQuestionsEnum))\n .required(),\n answer: Joi.string().required()\n }).label('SaveAndExitSecurity'),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitMessageData')\n\nexport const saveAndExitV2MessageData = Joi.object<SaveAndExitV2MessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required(),\n language: Joi.string().optional()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n auth: Joi.object({\n sub: Joi.string().required(),\n issuer: Joi.string().required()\n }),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitV2MessageData')\n\nexport const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the SubmissionMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(SubmissionEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(SubmissionEventMessageType))\n .description('Event type'),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published'),\n data: Joi.when('type', {\n is: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT,\n then: saveAndExitMessageData,\n otherwise: saveAndExitV2MessageData\n })\n})\n\nexport const notifyEmailMessageSchema = Joi.object()\n .keys({\n source: Joi.string().required(),\n reason: Joi.string().required(),\n formId: Joi.string().allow(''),\n referenceNumber: Joi.string().allow(''),\n templateId: Joi.string().required(),\n emailAddress: Joi.string().email().required(),\n personalisation: Joi.object({\n subject: Joi.string().required(),\n body: Joi.string().required()\n }),\n notifyReplyToId: Joi.string().optional()\n })\n .label('NotifyEmailData')\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAErB,SAASC,UAAU;AACnB,SACEC,0BAA0B,EAC1BC,qBAAqB,EACrBC,8BAA8B,EAC9BC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B;AAa5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGR,GAAG,CAACS,MAAM,CAAe;EAC7DC,IAAI,EAAEV,GAAG,CAACW,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DC,KAAK,EAAEd,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,oCAAoC,CAAC;EACpDE,KAAK,EAAEf,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVI,KAAK,CAAC,EAAE,CAAC,CACTH,WAAW,CAAC,kDAAkD;AACnE,CAAC,CAAC,CACCI,KAAK,CAAC,kBAAkB,CAAC,CACzBJ,WAAW,CAAC,6CAA6C,CAAC;;AAE7D;AACA;AACA;AACA;AACA,OAAO,MAAMK,yBAAyB,GAAGlB,GAAG,CAACS,MAAM,CAAkB;EACnEC,IAAI,EAAEV,GAAG,CAACW,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,uCAAuC,CAAC;EACvDC,KAAK,EAAEd,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,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EAAE9B,sBAAsB;IAC5B+B,SAAS,EAAEjB;EACb,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,MAAMkB,wBAAwB,GAAG1E,GAAG,CAACS,MAAM,CAAC,CAAC,CACjDyB,IAAI,CAAC;EACJ6B,MAAM,EAAE/D,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/B+D,MAAM,EAAE3E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/BgE,MAAM,EAAE5E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACK,KAAK,CAAC,EAAE,CAAC;EAC9BqB,eAAe,EAAErC,GAAG,CAACW,MAAM,CAAC,CAAC,CAACK,KAAK,CAAC,EAAE,CAAC;EACvC6D,UAAU,EAAE7E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACnCkE,YAAY,EAAE9E,GAAG,CAACW,MAAM,CAAC,CAAC,CAACuC,KAAK,CAAC,CAAC,CAACtC,QAAQ,CAAC,CAAC;EAC7CmE,eAAe,EAAE/E,GAAG,CAACS,MAAM,CAAC;IAC1BuE,OAAO,EAAEhF,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;IAChCqE,IAAI,EAAEjF,GAAG,CAACW,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;EAC9B,CAAC,CAAC;EACFsE,eAAe,EAAElF,GAAG,CAACW,MAAM,CAAC,CAAC,CAAC2B,QAAQ,CAAC;AACzC,CAAC,CAAC,CACDrB,KAAK,CAAC,iBAAiB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type ConditionEvaluationOutcome,\n type SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n formSubmitConditionEvaluationSchema,\n formSubmitConditionReferenceSchema,\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * A component referenced by a condition, and whether the user had answered it\n * when the condition was evaluated.\n *\n * An unanswered question is not absent from the runner's evaluation context -\n * it is present as `null` - so conditions still return a boolean for questions\n * that were skipped or never reached. Negative operators (\"is not\", \"is shorter\n * than\") return `true` in that case. Without knowing which referenced questions\n * were answered, a consumer cannot tell a real match from a vacuous one.\n * @see {@link formSubmitConditionReferenceSchema}\n */\nexport interface SubmitConditionReference {\n /**\n * The id of the referenced component\n */\n componentId: string\n\n /**\n * The name of the referenced component, as used in the submitted records\n */\n componentName: string\n\n /**\n * Whether the referenced component held an answer at the point of evaluation\n */\n answered: boolean\n}\n\n/**\n * The recorded outcome of a single condition at the point of submission.\n * V2 forms only - V1 conditions are not captured.\n * @see {@link formSubmitConditionEvaluationSchema}\n */\nexport interface SubmitConditionEvaluation {\n /**\n * The id of the condition, as authored in the V2 form definition\n */\n conditionId: string\n\n /**\n * The result of evaluating the condition\n */\n outcome: ConditionEvaluationOutcome\n\n /**\n * Every component the condition depends on, including those reached through\n * nested condition references, and whether each was answered\n */\n references: SubmitConditionReference[]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The reference number of the user session\n */\n referenceNumber?: string\n\n /**\n * The currently-selected language at the point of submission\n */\n language?: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n\nexport interface SaveAndExitMessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n}\n\nexport interface SavedState {\n $$__referenceNumber: string\n [key: string]: any\n}\n\nexport interface SaveAndExitV2MessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state: SavedState\n}\n\nexport interface SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type:\n | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2\n data: SaveAndExitMessageData\n}\n\nexport interface SaveAndExitV2Message {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2\n data: SaveAndExitV2MessageData\n}\n\nexport interface SaveAndExitRecord {\n magicLinkId: string\n magicLinkGroupId?: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n invalidPasswordAttempts: number\n createdAt: Date\n}\n\nexport interface SaveAndExitV2Record {\n magicLinkId: string\n magicLinkGroupId?: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state: SavedState\n createdAt: Date\n}\n\nexport type RunnerMessage = SaveAndExitMessage\n\nexport interface RunnerRecordBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface RunnerRecordInputMeta extends RunnerRecordBase {\n id: string\n}\n\nexport type RunnerRecordInput = RunnerMessage & RunnerRecordBase\n\nexport type RunnerRecord = RunnerMessage & RunnerRecordInputMeta\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type ConditionEvaluationOutcome,\n type SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n formSubmitConditionEvaluationSchema,\n formSubmitConditionReferenceSchema,\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * A component referenced by a condition, and whether the user had answered it\n * when the condition was evaluated.\n *\n * An unanswered question is not absent from the runner's evaluation context -\n * it is present as `null` - so conditions still return a boolean for questions\n * that were skipped or never reached. Negative operators (\"is not\", \"is shorter\n * than\") return `true` in that case. Without knowing which referenced questions\n * were answered, a consumer cannot tell a real match from a vacuous one.\n * @see {@link formSubmitConditionReferenceSchema}\n */\nexport interface SubmitConditionReference {\n /**\n * The id of the referenced component\n */\n componentId: string\n\n /**\n * The name of the referenced component, as used in the submitted records\n */\n componentName: string\n\n /**\n * Whether the referenced component held an answer at the point of evaluation\n */\n answered: boolean\n}\n\n/**\n * The recorded outcome of a single condition at the point of submission.\n * V2 forms only - V1 conditions are not captured.\n * @see {@link formSubmitConditionEvaluationSchema}\n */\nexport interface SubmitConditionEvaluation {\n /**\n * The id of the condition, as authored in the V2 form definition\n */\n conditionId: string\n\n /**\n * The result of evaluating the condition\n */\n outcome: ConditionEvaluationOutcome\n\n /**\n * Every component the condition depends on, including those reached through\n * nested condition references, and whether each was answered\n */\n references: SubmitConditionReference[]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The reference number of the user session\n */\n referenceNumber?: string\n\n /**\n * The currently-selected language at the point of submission\n */\n language?: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n\nexport interface SaveAndExitMessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n}\n\nexport interface SavedState {\n $$__referenceNumber: string\n [key: string]: any\n}\n\nexport interface SaveAndExitV2MessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n language?: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state: SavedState\n}\n\nexport interface SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type:\n | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2\n data: SaveAndExitMessageData\n}\n\nexport interface SaveAndExitV2Message {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2\n data: SaveAndExitV2MessageData\n}\n\nexport interface SaveAndExitRecord {\n magicLinkId: string\n magicLinkGroupId?: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n invalidPasswordAttempts: number\n createdAt: Date\n}\n\nexport interface SaveAndExitV2Record {\n magicLinkId: string\n magicLinkGroupId?: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n language?: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state: SavedState\n createdAt: Date\n}\n\nexport type RunnerMessage = SaveAndExitMessage\n\nexport interface RunnerRecordBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface RunnerRecordInputMeta extends RunnerRecordBase {\n id: string\n}\n\nexport type RunnerRecordInput = RunnerMessage & RunnerRecordBase\n\nexport type RunnerRecord = RunnerMessage & RunnerRecordInputMeta\n"],"mappings":"","ignoreList":[]}
@@ -1,17 +1,17 @@
1
1
  import Joi from 'joi';
2
2
  import { type SearchOptions } from '../../common/search/types.js';
3
3
  export declare const searchOptionFieldsUI: {
4
- status: Joi.ArraySchema<any[]>;
4
+ status: Joi.ArraySchema<string[]>;
5
5
  title: Joi.StringSchema<string>;
6
6
  author: Joi.StringSchema<string>;
7
- organisations: Joi.ArraySchema<any[]>;
7
+ organisations: Joi.ArraySchema<string[]>;
8
8
  offline: Joi.BooleanSchema<boolean>;
9
9
  };
10
10
  export declare const searchOptionFieldsManager: {
11
- status: Joi.ArraySchema<any[]>;
11
+ status: Joi.ArraySchema<string[]>;
12
12
  title: Joi.StringSchema<string>;
13
13
  author: Joi.StringSchema<string>;
14
- organisations: Joi.ArraySchema<any[]>;
14
+ organisations: Joi.ArraySchema<string[]>;
15
15
  offline: Joi.BooleanSchema<boolean>;
16
16
  };
17
17
  /**
@@ -1,3 +1,4 @@
1
1
  export declare const MIN_NUMBER_OF_REPEAT_ITEMS = 1;
2
2
  export declare const MAX_NUMBER_OF_REPEAT_ITEMS = 200;
3
+ export declare const FORM_ACTION_COPY = "copy";
3
4
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAC3C,eAAO,MAAM,0BAA0B,MAAM,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAC3C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAE7C,eAAO,MAAM,gBAAgB,SAAS,CAAA"}
@@ -45,4 +45,27 @@ export declare function isDuplicateOutput(output: Partial<Output>, otherOutput:
45
45
  * @returns {boolean}
46
46
  */
47
47
  export declare function isFeedbackForm(definition: FormDefinition | undefined): boolean;
48
+ /**
49
+ * Checks whether the form allows answers to be reused from a previous
50
+ * submission, as set by the metadata.options.allowCopy flag. forms-model does
51
+ * not define metadata.options, so its type is checked here
52
+ * @param {FormDefinition} formDefinition
53
+ * @returns {boolean}
54
+ */
55
+ export declare function isAllowCopyEnabled(formDefinition: FormDefinition): boolean;
56
+ /**
57
+ * Retrieves the action details of the form submission, if any.
58
+ * @param {{ custom?: { actionName?: string, actionReferenceNumber?: string } }} messageMeta
59
+ * @param {FormDefinition} formDefinition
60
+ * @returns
61
+ */
62
+ export declare function getFormAction(messageMeta: {
63
+ custom?: {
64
+ actionName?: string;
65
+ actionReferenceNumber?: string;
66
+ };
67
+ } | undefined, formDefinition: FormDefinition): {
68
+ name: string;
69
+ referenceNumber: string;
70
+ } | undefined;
48
71
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,MAAM,EACZ,MAAM,qCAAqC,CAAA;AAI5C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,OAAO,GAClB,UAAU,IAAI,cAAc,CAW9B;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,kBAAkB,EAAE,OAAO,GAC1B,kBAAkB,IAAI,+BAA+B,CAUvD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,+BAA+B,GAAG,SAAS,GACjD,MAAM,EAAE,CAMV;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,kBAczD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAO5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,GAC3B,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,WAKpE"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,MAAM,EACZ,MAAM,qCAAqC,CAAA;AAI5C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,OAAO,GAClB,UAAU,IAAI,cAAc,CAW9B;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,kBAAkB,EAAE,OAAO,GAC1B,kBAAkB,IAAI,+BAA+B,CAUvD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,+BAA+B,GAAG,SAAS,GACjD,MAAM,EAAE,CAMV;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,kBAczD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAO5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,GAC3B,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,WAKpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EACP;IACE,MAAM,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACjE,GACD,SAAS,EACb,cAAc,EAAE,cAAc;;;cAgB/B"}
@@ -1,5 +1,5 @@
1
1
  import JoiBase, { type CustomHelpers } from 'joi';
2
- import { type ComponentDef, type ContentComponentsDef, type FileUploadFieldComponent } from '../../components/types.js';
2
+ import { type ComponentDef } from '../../components/types.js';
3
3
  import { type ConditionDataV2, type ConditionListItemRefValueDataV2 } from '../../conditions/types.js';
4
4
  import { type ConditionWrapperV2, type FormDefinition, type List, type Page, type Repeat, type Section } from '../../form/form-definition/types.js';
5
5
  export declare const listItemIdValidator: (value: string, helpers: CustomHelpers<ConditionListItemRefValueDataV2>) => string | JoiBase.ErrorReport;
@@ -12,7 +12,7 @@ export declare const componentPayloadSchemaV2: JoiBase.ObjectSchema<ComponentDef
12
12
  export declare const fileUploadComponentSchema: JoiBase.ObjectSchema<ComponentDef>;
13
13
  export declare const contentComponentSchema: JoiBase.ObjectSchema<ComponentDef>;
14
14
  export declare const pageRepeatSchema: JoiBase.ObjectSchema<Repeat>;
15
- export declare const pageUploadComponentsSchema: JoiBase.ArraySchema<FileUploadFieldComponent | ContentComponentsDef>;
15
+ export declare const pageUploadComponentsSchema: JoiBase.ArraySchema<ComponentDef[]>;
16
16
  /**
17
17
  * `/status` is a special route for providing a user's application status.
18
18
  * It should not be configured via the designer.
@@ -38,6 +38,6 @@ export declare const sectionsSchemaV2: JoiBase.ObjectSchema<Section>;
38
38
  */
39
39
  export declare const formDefinitionSchema: JoiBase.ObjectSchema<FormDefinition>;
40
40
  export declare const formDefinitionV2Schema: JoiBase.ObjectSchema<FormDefinition>;
41
- export { MAX_NUMBER_OF_REPEAT_ITEMS, MIN_NUMBER_OF_REPEAT_ITEMS } from '../../form/form-definition/constants.js';
41
+ export { FORM_ACTION_COPY, MAX_NUMBER_OF_REPEAT_ITEMS, MIN_NUMBER_OF_REPEAT_ITEMS } from '../../form/form-definition/constants.js';
42
42
  export declare const Schema: JoiBase.ObjectSchema<FormDefinition>;
43
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,EAAE,EAAE,KAAK,aAAa,EAAyB,MAAM,KAAK,CAAA;AAWxE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAEL,KAAK,eAAe,EAIpB,KAAK,+BAA+B,EAOrC,MAAM,2BAA2B,CAAA;AAUlC,OAAO,EAGL,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EAGnB,KAAK,IAAI,EAET,KAAK,IAAI,EAET,KAAK,MAAM,EAGX,KAAK,OAAO,EACb,MAAM,qCAAqC,CAAA;AA2C5C,eAAO,MAAM,mBAAmB,GAC9B,OAAO,MAAM,EACb,SAAS,aAAa,CAAC,+BAA+B,CAAC,iCA0CxD,CAAA;AAmOD,eAAO,MAAM,qBAAqB,uCAyD9B,CAAA;AAoDJ,eAAO,MAAM,wBAAwB,0CAwBU,CAAA;AAE/C,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,SAAS,aAAa,CAAC,MAAM,CAAC,iCAW/B,CAAA;AAED,eAAO,MAAM,eAAe,oCAgOZ,CAAA;AAEhB,eAAO,MAAM,iBAAiB,oCAciB,CAAA;AAE/C,eAAO,MAAM,wBAAwB,oCASsB,CAAA;AAE3D,eAAO,MAAM,yBAAyB,oCAMpC,CAAA;AAEF,eAAO,MAAM,sBAAsB,oCAWjC,CAAA;AAuDF,eAAO,MAAM,gBAAgB,8BASzB,CAAA;AAyCJ,eAAO,MAAM,0BAA0B,sEAWmB,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,UAAU,4BAmDnB,CAAA;AAEJ;;GAEG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AAA;AAE/C,eAAO,MAAM,wBAAwB,oCASsB,CAAA;AAE3D,eAAO,MAAM,yBAAyB,oCAMpC,CAAA;AAEF,eAAO,MAAM,sBAAsB,oCAWjC,CAAA;AAuDF,eAAO,MAAM,gBAAgB,8BASzB,CAAA;AAyCJ,eAAO,MAAM,0BAA0B,qCAWmB,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,UAAU,4BAmDnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAuCiB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,4BAgBkB,CAAA;AAwDlD,eAAO,MAAM,UAAU,4BA8CnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAIiB,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,gBAAgB,+BAIgB,CAAA;AA2G7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,sCA4E7B,CAAA;AAEJ,eAAO,MAAM,sBAAsB,sCA2DY,CAAA;AAE/C,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,yCAAyC,CAAA;AAIhD,eAAO,MAAM,MAAM,sCAAuB,CAAA"}
@@ -26,10 +26,10 @@ export declare const listItemsDataSchema: JoiBase.StringSchema<string>;
26
26
  export declare const exactFilesSchema: JoiBase.NumberSchema<number>;
27
27
  export declare const minFilesSchema: JoiBase.NumberSchema<number>;
28
28
  export declare const maxFilesSchema: JoiBase.NumberSchema<number>;
29
- export declare const fileTypesSchema: JoiBase.ArraySchema<any[]>;
30
- export declare const documentTypesSchema: JoiBase.ArraySchema<any[]>;
31
- export declare const imageTypesSchema: JoiBase.ArraySchema<any[]>;
32
- export declare const tabularDataTypesSchema: JoiBase.ArraySchema<any[]>;
29
+ export declare const fileTypesSchema: JoiBase.ArraySchema<string[]>;
30
+ export declare const documentTypesSchema: JoiBase.ArraySchema<string[]>;
31
+ export declare const imageTypesSchema: JoiBase.ArraySchema<string[]>;
32
+ export declare const tabularDataTypesSchema: JoiBase.ArraySchema<string[]>;
33
33
  export declare const enhancedActionSchema: JoiBase.StringSchema<string>;
34
34
  export declare const radioIdSchema: JoiBase.StringSchema<string>;
35
35
  export declare const radioTextSchema: JoiBase.StringSchema<string>;
@@ -70,12 +70,12 @@ export declare const paymentApiKeySchema: JoiBase.StringSchema<string>;
70
70
  export declare const exactChecksSchema: JoiBase.NumberSchema<number>;
71
71
  export declare const minChecksSchema: JoiBase.NumberSchema<number>;
72
72
  export declare const maxChecksSchema: JoiBase.NumberSchema<number>;
73
- export declare const countriesSchema: JoiBase.ArraySchema<any[]>;
74
- export declare const mapLayersSchema: JoiBase.ArraySchema<any[]>;
73
+ export declare const countriesSchema: JoiBase.ArraySchema<string[]>;
74
+ export declare const mapLayersSchema: JoiBase.ArraySchema<string[]>;
75
75
  export declare const exactFeaturesSchema: JoiBase.NumberSchema<number>;
76
76
  export declare const minFeaturesSchema: JoiBase.NumberSchema<number>;
77
77
  export declare const maxFeaturesSchema: JoiBase.NumberSchema<number>;
78
- export declare const geometryTypesSchema: JoiBase.ArraySchema<any[]>;
78
+ export declare const geometryTypesSchema: JoiBase.ArraySchema<string[]>;
79
79
  export declare const telephoneNumberFormatSchema: JoiBase.StringSchema<string>;
80
80
  interface DSLSchema<TSchema = Record<string, unknown>[]> extends ArraySchema<TSchema> {
81
81
  rowSeparator: (rowSep: string | RegExp) => DSLSchema<TSchema>;
@@ -88,23 +88,17 @@ interface CustomValidator extends JoiBase.Root {
88
88
  dsv<TSchema>(): DSLSchema<TSchema>;
89
89
  }
90
90
  export declare const customValidator: CustomValidator;
91
- export declare const autoCompleteOptionsSchema: DSLSchema<{
92
- text: string;
93
- value: string;
94
- }[]>;
91
+ export declare const autoCompleteOptionsSchema: JoiBase.ArraySchema<any[]>;
95
92
  export declare const questionDetailsFullSchema: {
96
- autoCompleteOptionsSchema: DSLSchema<{
97
- text: string;
98
- value: string;
99
- }[]>;
93
+ autoCompleteOptionsSchema: JoiBase.ArraySchema<any[]>;
100
94
  classesSchema: JoiBase.StringSchema<string>;
101
95
  declarationTextSchema: JoiBase.StringSchema<string>;
102
- documentTypesSchema: JoiBase.ArraySchema<any[]>;
96
+ documentTypesSchema: JoiBase.ArraySchema<string[]>;
103
97
  enhancedActionSchema: JoiBase.StringSchema<string>;
104
98
  exactFilesSchema: JoiBase.NumberSchema<number>;
105
- fileTypesSchema: JoiBase.ArraySchema<any[]>;
99
+ fileTypesSchema: JoiBase.ArraySchema<string[]>;
106
100
  hintTextSchema: JoiBase.StringSchema<string>;
107
- imageTypesSchema: JoiBase.ArraySchema<any[]>;
101
+ imageTypesSchema: JoiBase.ArraySchema<string[]>;
108
102
  instructionTextSchema: JoiBase.StringSchema<string>;
109
103
  jsEnabledSchema: JoiBase.StringSchema<string>;
110
104
  listForQuestionSchema: JoiBase.StringSchema<string>;
@@ -136,17 +130,17 @@ export declare const questionDetailsFullSchema: {
136
130
  shortDescriptionSchema: JoiBase.StringSchema<string>;
137
131
  errorDescriptionSchema: JoiBase.StringSchema<string>;
138
132
  suffixSchema: JoiBase.StringSchema<string>;
139
- tabularDataTypesSchema: JoiBase.ArraySchema<any[]>;
133
+ tabularDataTypesSchema: JoiBase.ArraySchema<string[]>;
140
134
  usePostcodeLookupSchema: JoiBase.StringSchema<string>;
141
135
  minChecksSchema: JoiBase.NumberSchema<number>;
142
136
  maxChecksSchema: JoiBase.NumberSchema<number>;
143
137
  exactChecksSchema: JoiBase.NumberSchema<number>;
144
- countriesSchema: JoiBase.ArraySchema<any[]>;
145
- mapLayersSchema: JoiBase.ArraySchema<any[]>;
138
+ countriesSchema: JoiBase.ArraySchema<string[]>;
139
+ mapLayersSchema: JoiBase.ArraySchema<string[]>;
146
140
  minFeaturesSchema: JoiBase.NumberSchema<number>;
147
141
  maxFeaturesSchema: JoiBase.NumberSchema<number>;
148
142
  exactFeaturesSchema: JoiBase.NumberSchema<number>;
149
- geometryTypesSchema: JoiBase.ArraySchema<any[]>;
143
+ geometryTypesSchema: JoiBase.ArraySchema<string[]>;
150
144
  telephoneNumberFormatSchema: JoiBase.StringSchema<string>;
151
145
  };
152
146
  export declare const formEditorInputPageKeys: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,EAAE,EAAE,KAAK,WAAW,EAAuB,MAAM,KAAK,CAAA;AAapE,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAA;AAKxC,eAAO,MAAM,2BAA2B,8BAIqB,CAAA;AAE7D,eAAO,MAAM,2BAA2B,wFAC+C,CAAA;AAEvF,oBAAY,oBAAoB;IAC9B,qBAAqB,qBAAqB;IAC1C,YAAY,YAAY;IACxB,YAAY,YAAY;IACxB,gBAAgB,gBAAgB;CACjC;AAED,eAAO,MAAM,cAAc,8BAG6C,CAAA;AAExE,eAAO,MAAM,kBAAkB,8BAmB2C,CAAA;AAE1E,eAAO,MAAM,sBAAsB,8BAyBmC,CAAA;AAEtE,eAAO,MAAM,sBAAsB,8BAOmB,CAAA;AAEtD,eAAO,MAAM,aAAa,8BAG0B,CAAA;AAEpD,eAAO,MAAM,aAAa,8BAS0B,CAAA;AAEpD,eAAO,MAAM,iBAAiB,8BAU0B,CAAA;AAExD,eAAO,MAAM,UAAU,8BAG0B,CAAA;AAEjD,eAAO,MAAM,cAAc,8BAG8B,CAAA;AAEzD,eAAO,MAAM,cAAc,8BAI0C,CAAA;AAErE,eAAO,MAAM,qBAAqB,8BAM/B,CAAA;AAEH,eAAO,MAAM,sBAAsB,8BAMhC,CAAA;AAEH,eAAO,MAAM,qBAAqB,8BAIgC,CAAA;AAElE,eAAO,MAAM,mBAAmB,8BAEoC,CAAA;AAEpE,eAAO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H,eAAO,MAAM,uBAAuB,iCA+B2C,CAAA;AAE/E,eAAO,MAAM,sBAAsB,0CAmBD,CAAA;AAElC,eAAO,MAAM,wBAAwB,4CAkBD,CAAA;AAEpC,eAAO,MAAM,uBAAuB,sCA+BlC,CAAA;AAEF,eAAO,MAAM,wBAAwB,uBAcV,CAAA"}
@@ -151,6 +151,7 @@ export interface SaveAndExitV2MessageData {
151
151
  status: FormStatus;
152
152
  isPreview: boolean;
153
153
  baseUrl: string;
154
+ language?: string;
154
155
  };
155
156
  email: string;
156
157
  auth: {
@@ -203,6 +204,7 @@ export interface SaveAndExitV2Record {
203
204
  status: FormStatus;
204
205
  isPreview: boolean;
205
206
  baseUrl: string;
207
+ language?: string;
206
208
  };
207
209
  email: string;
208
210
  auth: {