@defra/forms-model 3.0.459 → 3.0.461

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.
@@ -0,0 +1,97 @@
1
+ import { ConditionType } from "./enums.js";
2
+ function isConditionListItemRefValueDataV2(value) {
3
+ return value.type === ConditionType.ListItemRef;
4
+ }
5
+ function isConditionStringValueDataV2(value) {
6
+ return value.type === ConditionType.StringValue;
7
+ }
8
+ function getListItem(model, listId, itemId) {
9
+ const foundList = model.getListById(listId);
10
+ if (!foundList) {
11
+ throw Error('List not found');
12
+ }
13
+ const item = foundList.items.find(item => item.id === itemId);
14
+ if (!item) {
15
+ throw Error('List item not found');
16
+ }
17
+ return item;
18
+ }
19
+ function createConditionValueDataFromListItemRefV2(value, model) {
20
+ const refValue = getListItem(model, value.listId, value.itemId);
21
+ return {
22
+ display: refValue.text,
23
+ type: ConditionType.Value,
24
+ value: refValue.value.toString()
25
+ };
26
+ }
27
+ function createConditionValueDataFromStringValueDataV2(value) {
28
+ return {
29
+ type: ConditionType.Value,
30
+ value: value.value,
31
+ display: `Condition value: ${value.value}`
32
+ };
33
+ }
34
+ function isConditionDataV2(condition) {
35
+ return 'componentId' in condition;
36
+ }
37
+ function convertConditionDataV2(model, condition, coordinator) {
38
+ const component = model.getComponentById(condition.componentId);
39
+ if (!component) {
40
+ throw Error('Component not found');
41
+ }
42
+ let newValue;
43
+ if (isConditionListItemRefValueDataV2(condition.value)) {
44
+ newValue = createConditionValueDataFromListItemRefV2(condition.value, model);
45
+ } else if (isConditionStringValueDataV2(condition.value)) {
46
+ newValue = createConditionValueDataFromStringValueDataV2(condition.value);
47
+ } else {
48
+ newValue = condition.value;
49
+ }
50
+ return {
51
+ field: {
52
+ name: component.name,
53
+ type: component.type /** @todo fix this */,
54
+ display: component.title
55
+ },
56
+ operator: condition.operator,
57
+ value: newValue,
58
+ coordinator
59
+ };
60
+ }
61
+ function convertConditionRefDataFromV2(model, condition, coordinator) {
62
+ const component = model.getComponentById(condition.conditionId);
63
+ if (!component) {
64
+ throw Error('Component not found');
65
+ }
66
+ return {
67
+ conditionName: component.name,
68
+ conditionDisplayName: component.title,
69
+ coordinator
70
+ };
71
+ }
72
+ export function convertConditionWrapperFromV2(conditionWrapper, model) {
73
+ let coordinator;
74
+ if (conditionWrapper.conditions.length > 1 && !conditionWrapper.coordinator) {
75
+ throw new Error('Coordinator is required for multiple conditions');
76
+ } else {
77
+ coordinator = conditionWrapper.coordinator;
78
+ }
79
+ const newConditionWrapper = {
80
+ name: conditionWrapper.name,
81
+ displayName: conditionWrapper.displayName,
82
+ value: {
83
+ name: conditionWrapper.name,
84
+ conditions: conditionWrapper.conditions.map(condition => {
85
+ let newCondition;
86
+ if (isConditionDataV2(condition)) {
87
+ newCondition = convertConditionDataV2(model, condition, coordinator);
88
+ } else {
89
+ newCondition = convertConditionRefDataFromV2(model, condition, coordinator);
90
+ }
91
+ return newCondition;
92
+ })
93
+ }
94
+ };
95
+ return newConditionWrapper;
96
+ }
97
+ //# sourceMappingURL=migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.js","names":["ConditionType","isConditionListItemRefValueDataV2","value","type","ListItemRef","isConditionStringValueDataV2","StringValue","getListItem","model","listId","itemId","foundList","getListById","Error","item","items","find","id","createConditionValueDataFromListItemRefV2","refValue","display","text","Value","toString","createConditionValueDataFromStringValueDataV2","isConditionDataV2","condition","convertConditionDataV2","coordinator","component","getComponentById","componentId","newValue","field","name","title","operator","convertConditionRefDataFromV2","conditionId","conditionName","conditionDisplayName","convertConditionWrapperFromV2","conditionWrapper","conditions","length","newConditionWrapper","displayName","map","newCondition"],"sources":["../../../src/conditions/migration.ts"],"sourcesContent":["import {\n type ComponentDef,\n type ConditionalComponentType\n} from '~/src/components/types.js'\nimport { ConditionType, type Coordinator } from '~/src/conditions/enums.js'\nimport {\n type ConditionData,\n type ConditionDataV2,\n type ConditionListItemRefValueDataV2,\n type ConditionRefData,\n type ConditionRefDataV2,\n type ConditionStringValueDataV2,\n type ConditionValueData,\n type RelativeDateValueData\n} from '~/src/conditions/types.js'\nimport {\n type ConditionWrapper,\n type ConditionWrapperV2,\n type List\n} from '~/src/form/form-definition/types.js'\n\nfunction isConditionListItemRefValueDataV2(\n value:\n | ConditionListItemRefValueDataV2\n | ConditionStringValueDataV2\n | RelativeDateValueData\n): value is ConditionListItemRefValueDataV2 {\n return value.type === ConditionType.ListItemRef\n}\n\nfunction isConditionStringValueDataV2(\n value:\n | ConditionListItemRefValueDataV2\n | ConditionStringValueDataV2\n | RelativeDateValueData\n): value is ConditionStringValueDataV2 {\n return value.type === ConditionType.StringValue\n}\n\nfunction getListItem(model: RuntimeFormModel, listId: string, itemId: string) {\n const foundList = model.getListById(listId)\n\n if (!foundList) {\n throw Error('List not found')\n }\n\n const item = foundList.items.find((item) => item.id === itemId)\n\n if (!item) {\n throw Error('List item not found')\n }\n\n return item\n}\n\nfunction createConditionValueDataFromListItemRefV2(\n value: ConditionListItemRefValueDataV2,\n model: RuntimeFormModel\n): ConditionValueData {\n const refValue = getListItem(model, value.listId, value.itemId)\n\n return {\n display: refValue.text,\n type: ConditionType.Value,\n value: refValue.value.toString()\n }\n}\n\nfunction createConditionValueDataFromStringValueDataV2(\n value: ConditionStringValueDataV2\n): ConditionValueData {\n return {\n type: ConditionType.Value,\n value: value.value,\n display: `Condition value: ${value.value}`\n }\n}\n\nfunction isConditionDataV2(\n condition: ConditionDataV2 | ConditionRefDataV2\n): condition is ConditionDataV2 {\n return 'componentId' in condition\n}\n\nfunction convertConditionDataV2(\n model: RuntimeFormModel,\n condition: ConditionDataV2,\n coordinator: Coordinator | undefined\n): ConditionData {\n const component = model.getComponentById(condition.componentId)\n\n if (!component) {\n throw Error('Component not found')\n }\n\n let newValue\n if (isConditionListItemRefValueDataV2(condition.value)) {\n newValue = createConditionValueDataFromListItemRefV2(condition.value, model)\n } else if (isConditionStringValueDataV2(condition.value)) {\n newValue = createConditionValueDataFromStringValueDataV2(condition.value)\n } else {\n newValue = condition.value\n }\n\n return {\n field: {\n name: component.name,\n type: component.type as ConditionalComponentType /** @todo fix this */,\n display: component.title\n },\n operator: condition.operator,\n value: newValue,\n coordinator\n }\n}\n\nfunction convertConditionRefDataFromV2(\n model: RuntimeFormModel,\n condition: ConditionRefDataV2,\n coordinator: Coordinator | undefined\n): ConditionRefData {\n const component = model.getComponentById(condition.conditionId)\n\n if (!component) {\n throw Error('Component not found')\n }\n\n return {\n conditionName: component.name,\n conditionDisplayName: component.title,\n coordinator\n }\n}\n\nexport function convertConditionWrapperFromV2(\n conditionWrapper: ConditionWrapperV2,\n model: RuntimeFormModel\n): ConditionWrapper {\n let coordinator\n\n if (conditionWrapper.conditions.length > 1 && !conditionWrapper.coordinator) {\n throw new Error('Coordinator is required for multiple conditions')\n } else {\n coordinator = conditionWrapper.coordinator\n }\n\n const newConditionWrapper: ConditionWrapper = {\n name: conditionWrapper.name,\n displayName: conditionWrapper.displayName,\n value: {\n name: conditionWrapper.name,\n conditions: conditionWrapper.conditions.map((condition) => {\n let newCondition: ConditionData | ConditionRefData\n\n if (isConditionDataV2(condition)) {\n newCondition = convertConditionDataV2(model, condition, coordinator)\n } else {\n newCondition = convertConditionRefDataFromV2(\n model,\n condition,\n coordinator\n )\n }\n\n return newCondition\n })\n }\n }\n\n return newConditionWrapper\n}\n\nexport interface RuntimeFormModel {\n getListById: (listId: string) => List | undefined\n getComponentById: (componentId: string) => ComponentDef | undefined\n}\n"],"mappings":"AAIA,SAASA,aAAa;AAiBtB,SAASC,iCAAiCA,CACxCC,KAGyB,EACiB;EAC1C,OAAOA,KAAK,CAACC,IAAI,KAAKH,aAAa,CAACI,WAAW;AACjD;AAEA,SAASC,4BAA4BA,CACnCH,KAGyB,EACY;EACrC,OAAOA,KAAK,CAACC,IAAI,KAAKH,aAAa,CAACM,WAAW;AACjD;AAEA,SAASC,WAAWA,CAACC,KAAuB,EAAEC,MAAc,EAAEC,MAAc,EAAE;EAC5E,MAAMC,SAAS,GAAG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IAC5CX,IAAI,EAAEQ,gBAAgB,CAACR,IAAI;IAC3BY,WAAW,EAAEJ,gBAAgB,CAACI,WAAW;IACzC5C,KAAK,EAAE;MACLgC,IAAI,EAAEQ,gBAAgB,CAACR,IAAI;MAC3BS,UAAU,EAAED,gBAAgB,CAACC,UAAU,CAACI,GAAG,CAAErB,SAAS,IAAK;QACzD,IAAIsB,YAA8C;QAElD,IAAIvB,iBAAiB,CAACC,SAAS,CAAC,EAAE;UAChCsB,YAAY,GAAGrB,sBAAsB,CAACnB,KAAK,EAAEkB,SAAS,EAAEE,WAAW,CAAC;QACtE,CAAC,MAAM;UACLoB,YAAY,GAAGX,6BAA6B,CAC1C7B,KAAK,EACLkB,SAAS,EACTE,WACF,CAAC;QACH;QAEA,OAAOoB,YAAY;MACrB,CAAC;IACH;EACF,CAAC;EAED,OAAOH,mBAAmB;AAC5B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/conditions/types.ts"],"sourcesContent":["import {\n type ComponentDef,\n type ConditionalComponentType\n} from '~/src/components/types.js'\nimport { type Condition } from '~/src/conditions/condition.js'\nimport {\n type ConditionType,\n type Coordinator,\n type DateDirections,\n type DateUnits,\n type OperatorName\n} from '~/src/conditions/enums.js'\n\nexport interface ConditionValueData {\n type: ConditionType.Value\n value: string\n display: string\n}\n\nexport interface Condition2StringValueData {\n type: ConditionType.StringValue\n value: string\n}\n\nexport interface Condition2ListItemRefValueData {\n type: ConditionType.ListItemRef\n listId: string\n itemId: string\n}\n\nexport interface RelativeDateValueData {\n type: ConditionType.RelativeDate\n period: string\n unit: DateUnits\n direction: DateDirections\n}\n\nexport interface ConditionFieldData {\n name: string\n type: ConditionalComponentType\n display: string\n}\n\nexport interface ConditionData {\n field: ConditionFieldData\n operator: OperatorName\n value: ConditionValueData | RelativeDateValueData\n coordinator?: Coordinator\n}\n\nexport interface Condition2Data {\n id: string\n componentId: string\n operator: OperatorName\n value:\n | Condition2ListItemRefValueData\n | Condition2StringValueData\n | RelativeDateValueData\n}\n\nexport interface ConditionRefData {\n conditionName: string\n conditionDisplayName: string\n coordinator?: Coordinator\n}\n\nexport interface Condition2RefData {\n id: string\n conditionId: string\n}\n\nexport interface ConditionGroupData {\n conditions: (ConditionData | ConditionRefData | ConditionGroupData)[]\n}\n\nexport type Condition2GroupData = (Condition2Data | Condition2RefData)[]\n\nexport interface ConditionsModelData extends ConditionGroupData {\n name: string\n}\n\nexport interface OperatorDefinition {\n expression: (\n component: Pick<ComponentDef, 'type' | 'name'>,\n conditionValue: Condition['value']\n ) => string\n}\n\nexport type Conditionals = Record<OperatorName, OperatorDefinition>\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/conditions/types.ts"],"sourcesContent":["import {\n type ComponentDef,\n type ConditionalComponentType\n} from '~/src/components/types.js'\nimport { type Condition } from '~/src/conditions/condition.js'\nimport {\n type ConditionType,\n type Coordinator,\n type DateDirections,\n type DateUnits,\n type OperatorName\n} from '~/src/conditions/enums.js'\n\nexport interface ConditionValueData {\n type: ConditionType.Value\n value: string\n display: string\n}\n\nexport interface ConditionStringValueDataV2 {\n type: ConditionType.StringValue\n value: string\n}\n\nexport interface ConditionListItemRefValueDataV2 {\n type: ConditionType.ListItemRef\n listId: string\n itemId: string\n}\n\nexport interface RelativeDateValueData {\n type: ConditionType.RelativeDate\n period: string\n unit: DateUnits\n direction: DateDirections\n}\n\nexport interface ConditionFieldData {\n name: string\n type: ConditionalComponentType\n display: string\n}\n\nexport interface ConditionData {\n field: ConditionFieldData\n operator: OperatorName\n value: ConditionValueData | RelativeDateValueData\n coordinator?: Coordinator\n}\n\nexport interface ConditionDataV2 {\n id: string\n componentId: string\n operator: OperatorName\n value:\n | ConditionListItemRefValueDataV2\n | ConditionStringValueDataV2\n | RelativeDateValueData\n}\n\nexport interface ConditionRefData {\n conditionName: string\n conditionDisplayName: string\n coordinator?: Coordinator\n}\n\nexport interface ConditionRefDataV2 {\n id: string\n conditionId: string\n}\n\nexport interface ConditionGroupData {\n conditions: (ConditionData | ConditionRefData | ConditionGroupData)[]\n}\n\nexport type ConditionGroupDataV2 = (ConditionDataV2 | ConditionRefDataV2)[]\n\nexport interface ConditionsModelData extends ConditionGroupData {\n name: string\n}\n\nexport interface OperatorDefinition {\n expression: (\n component: Pick<ComponentDef, 'type' | 'name'>,\n conditionValue: Condition['value']\n ) => string\n}\n\nexport type Conditionals = Record<OperatorName, OperatorDefinition>\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Joi","v4","uuidV4","ComponentType","hasComponents","idSchemaOptional","string","uuid","idSchema","default","conditionIdRef","ref","in","adjust","conditions","map","condition","name","componentIdRefSchema","pages","flatMap","page","components","filter","component","id","listIdRef","lists","list","listItemIdRef","items","item","sectionsSchema","object","description","keys","trim","required","title","hideTitle","boolean","optional","conditionFieldSchema","type","display","conditionValueSchema","value","condition2StringValueDataSchema","valid","condition2ListItemRefDataSchema","listId","itemId","relativeDateValueDataSchema","period","unit","direction","conditionRefSchema","conditionName","conditionDisplayName","coordinator","condition2RefDataSchema","conditionId","conditionSchema","field","operator","alternatives","try","condition2DataSchema","componentId","conditionGroupSchema","array","link","conditionsModelSchema","conditionWrapperSchema","displayName","conditionWrapperSchemaV2","componentSchema","shortDescription","when","is","Details","Html","InsetText","Markdown","then","pattern","otherwise","allow","hint","options","rows","number","empty","maxWords","maxDaysInPast","maxDaysInFuture","customValidationMessage","customValidationMessages","unknown","schema","min","max","length","componentSchemaV2","nextSchema","path","redirect","repeatOptions","repeatSchema","pageRepeatSchema","eventSchema","method","url","uri","scheme","eventsSchema","onLoad","onSave","pageSchema","disallow","section","controller","unique","repeat","any","strip","next","events","view","pageSchemaV2","append","baseListItemSchema","text","conditional","stringListItemSchema","numberListItemSchema","listSchema","messages","listSchemaV2","feedbackSchema","feedbackForm","emailAddress","email","tlds","phaseBannerSchema","phase","outputSchema","audience","version","formDefinitionSchema","engine","feedback","startPage","sections","metadata","a","declaration","skipSummary","phaseBanner","outputEmail","output","formDefinitionV2Schema","Schema"],"sources":["../../../../src/form/form-definition/index.ts"],"sourcesContent":["import Joi, { type LanguageMessages } from 'joi'\nimport { v4 as uuidV4 } from 'uuid'\n\nimport { ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\nimport {\n type Condition2Data,\n type Condition2GroupData,\n type Condition2ListItemRefValueData,\n type Condition2RefData,\n type Condition2StringValueData,\n type ConditionData,\n type ConditionFieldData,\n type ConditionGroupData,\n type ConditionRefData,\n type ConditionValueData,\n type ConditionsModelData,\n type RelativeDateValueData\n} from '~/src/conditions/types.js'\nimport {\n type Condition2Wrapper,\n type ConditionWrapper,\n type Event,\n type EventOptions,\n type Events,\n type FormDefinition,\n type Item,\n type Link,\n type List,\n type Page,\n type PhaseBanner,\n type Repeat,\n type RepeatOptions,\n type RepeatSchema,\n type Section\n} from '~/src/form/form-definition/types.js'\nimport { hasComponents } from '~/src/pages/helpers.js'\n\nconst idSchemaOptional = Joi.string().uuid()\n\nconst idSchema = idSchemaOptional.default(() => uuidV4())\n\nconst conditionIdRef = Joi.ref('/conditions', {\n in: true,\n adjust: (conditions: Condition2Wrapper[]) =>\n conditions.map((condition) => condition.name)\n})\n\nconst componentIdRefSchema = Joi.ref('/pages', {\n in: true,\n adjust: (pages: Page[]) =>\n pages.flatMap((page) =>\n hasComponents(page)\n ? page.components\n .filter((component) => component.id)\n .map((component) => component.id)\n : []\n )\n})\n\nconst listIdRef = Joi.ref('/lists', {\n in: true,\n adjust: (lists: List[]) =>\n lists.filter((list) => list.id).map((list) => list.id)\n})\n\nconst listItemIdRef = Joi.ref('/lists', {\n in: true,\n adjust: (lists: List[]) =>\n lists.flatMap((list) =>\n list.items.filter((item) => item.id).map((item) => item.id)\n )\n})\n\nconst sectionsSchema = Joi.object<Section>()\n .description('A form section grouping related pages together')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description(\n 'Unique identifier for the section, used in code and page references'\n ),\n title: Joi.string()\n .trim()\n .required()\n .description('Human-readable section title displayed to users'),\n hideTitle: Joi.boolean()\n .optional()\n .default(false)\n .description(\n 'When true, the section title will not be displayed in the UI'\n )\n })\n\nconst conditionFieldSchema = Joi.object<ConditionFieldData>()\n .description('Field reference used in a condition')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description('Component name referenced by this condition'),\n type: Joi.string()\n .trim()\n .required()\n .description('Data type of the field (e.g., string, number, date)'),\n display: Joi.string()\n .trim()\n .required()\n .description('Human-readable name of the field for display purposes')\n })\n\nconst conditionValueSchema = Joi.object<ConditionValueData>()\n .description('Value specification for a condition')\n .keys({\n type: Joi.string()\n .trim()\n .required()\n .description('Data type of the value (e.g., string, number, date)'),\n value: Joi.string()\n .trim()\n .required()\n .description('The actual value to compare against'),\n display: Joi.string()\n .trim()\n .required()\n .description('Human-readable version of the value for display purposes')\n })\n\nconst condition2StringValueDataSchema = Joi.object<Condition2StringValueData>()\n .description('String value specification for a condition')\n .keys({\n type: Joi.string()\n .trim()\n .valid('StringValue')\n .required()\n .description('Type of the condition value, should be \"StringValue\"'),\n value: Joi.string()\n .trim()\n .required()\n .description('The actual value to compare against')\n })\n\nconst condition2ListItemRefDataSchema =\n Joi.object<Condition2ListItemRefValueData>()\n .description('List item ref specification for a condition')\n .keys({\n type: Joi.string()\n .trim()\n .valid('ListItemRef')\n .required()\n .description('Type of the condition value, should be \"ListItemRef\"'),\n listId: Joi.string()\n .valid(listIdRef)\n .trim()\n .required()\n .description('The id of the list'),\n itemId: Joi.string()\n .trim()\n .valid(listItemIdRef)\n .required()\n .description('The id of the list item')\n })\n\nconst relativeDateValueDataSchema = Joi.object<RelativeDateValueData>()\n .description('Relative date specification for date-based conditions')\n .keys({\n type: Joi.string()\n .trim()\n .valid('RelativeDate')\n .required()\n .description('Type of the condition value, should be \"RelativeDate\"'),\n period: Joi.string()\n .trim()\n .required()\n .description('Numeric amount of the time period, as a string'),\n unit: Joi.string()\n .trim()\n .required()\n .description('Time unit (e.g. days, weeks, months, years)'),\n direction: Joi.string()\n .trim()\n .required()\n .description('Temporal direction, either \"past\" or \"future\"')\n })\n\nconst conditionRefSchema = Joi.object<ConditionRefData>()\n .description('Reference to a named condition defined elsewhere')\n .keys({\n conditionName: Joi.string()\n .trim()\n .required()\n .description('Name of the referenced condition'),\n conditionDisplayName: Joi.string()\n .trim()\n .required()\n .description('Human-readable name of the condition for display purposes'),\n coordinator: Joi.string()\n .trim()\n .optional()\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n )\n })\n\nconst condition2RefDataSchema = Joi.object<Condition2RefData>()\n .description('Reference to a named condition defined elsewhere')\n .keys({\n id: idSchema.description('Unique identifier for the referenced condition'),\n conditionId: Joi.string()\n .trim()\n .required()\n .valid(conditionIdRef)\n .description('Name of the referenced condition')\n })\n\nconst conditionSchema = Joi.object<ConditionData>()\n .description('Condition definition specifying a logical comparison')\n .keys({\n field: conditionFieldSchema.description(\n 'The form field being evaluated in this condition'\n ),\n operator: Joi.string()\n .trim()\n .required()\n .description('Comparison operator (equals, greaterThan, contains, etc.)'),\n value: Joi.alternatives()\n .try(conditionValueSchema, relativeDateValueDataSchema)\n .description(\n 'Value to compare the field against, either fixed or relative date'\n ),\n coordinator: Joi.string()\n .trim()\n .optional()\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n )\n })\n\nconst condition2DataSchema = Joi.object<Condition2Data>()\n .description('Condition definition')\n .keys({\n id: idSchema.description(\n 'Unique identifier used to reference this condition'\n ),\n componentId: Joi.string()\n .trim()\n .valid(componentIdRefSchema)\n .required()\n .description(\n 'Reference to the component id being evaluated in this condition'\n ),\n operator: Joi.string()\n .trim()\n .required()\n .description('Comparison operator (equals, greaterThan, contains, etc.)'),\n value: Joi.alternatives()\n .try(\n condition2StringValueDataSchema,\n condition2ListItemRefDataSchema,\n relativeDateValueDataSchema\n )\n .description(\n 'Value to compare the field against, either fixed or relative date'\n )\n })\n\nconst conditionGroupSchema = Joi.object<ConditionGroupData>()\n .description('Group of conditions combined with logical operators')\n .keys({\n conditions: Joi.array()\n .items(\n Joi.alternatives().try(\n conditionSchema,\n conditionRefSchema,\n Joi.link('#conditionGroupSchema')\n )\n )\n .description('Array of conditions or condition references in this group')\n })\n .id('conditionGroupSchema')\n\nconst conditionsModelSchema = Joi.object<ConditionsModelData>()\n .description('Complete condition model with name and condition set')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description('Unique identifier for the condition set'),\n conditions: Joi.array()\n .items(\n Joi.alternatives().try(\n conditionSchema,\n conditionRefSchema,\n conditionGroupSchema\n )\n )\n .description(\n 'Array of conditions, condition references, or condition groups'\n )\n })\n\nconst conditionWrapperSchema = Joi.object<ConditionWrapper>()\n .description('Container for a named condition with its definition')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description('Unique identifier used to reference this condition'),\n displayName: Joi.string()\n .trim()\n .description('Human-readable name for display in the UI'),\n value: conditionsModelSchema\n .required()\n .description('The complete condition definition')\n })\n\nexport const conditionWrapperSchemaV2 = Joi.object<Condition2Wrapper>()\n .description('Container for a named condition with its definition')\n .keys({\n name: Joi.string()\n .trim()\n .description('Unique identifier for the condition'),\n displayName: Joi.string()\n .trim()\n .description('Human-readable name for display in the UI'),\n coordinator: Joi.string()\n .optional()\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n ),\n conditions: Joi.array<Condition2GroupData>()\n .items(\n Joi.alternatives().try(condition2DataSchema, condition2RefDataSchema)\n )\n .description('Array of conditions or condition references')\n })\n .description('Condition schema for V2 forms')\n\nexport const componentSchema = Joi.object<ComponentDef>()\n .description('Form component definition specifying UI element behavior')\n .keys({\n id: idSchemaOptional.description('Unique identifier for the component'),\n type: Joi.string<ComponentType>()\n .trim()\n .required()\n .description('Component type (TextField, RadioButtons, DateField, etc.)'),\n shortDescription: Joi.string()\n .trim()\n .optional()\n .description('Brief description of the component purpose'),\n name: Joi.when('type', {\n is: Joi.string().valid(\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText,\n ComponentType.Markdown\n ),\n then: Joi.string()\n .trim()\n .pattern(/^[a-zA-Z]+$/)\n .optional()\n .description('Optional identifier for display-only components'),\n otherwise: Joi.string()\n .trim()\n .pattern(/^[a-zA-Z]+$/)\n .description('Unique identifier for the component, used in form data')\n }),\n title: Joi.when('type', {\n is: Joi.string().valid(\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText,\n ComponentType.Markdown\n ),\n then: Joi.string()\n .trim()\n .optional()\n .description('Optional title for display-only components'),\n otherwise: Joi.string()\n .trim()\n .allow('')\n .description('Label displayed above the component')\n }),\n hint: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description(\n 'Additional guidance text displayed below the component title'\n ),\n options: Joi.object({\n rows: Joi.number()\n .empty('')\n .description('Number of rows for textarea components'),\n maxWords: Joi.number()\n .empty('')\n .description('Maximum number of words allowed in text inputs'),\n maxDaysInPast: Joi.number()\n .empty('')\n .description('Maximum days in the past allowed for date inputs'),\n maxDaysInFuture: Joi.number()\n .empty('')\n .description('Maximum days in the future allowed for date inputs'),\n customValidationMessage: Joi.string()\n .trim()\n .allow('')\n .description('Custom error message for validation failures'),\n customValidationMessages: Joi.object<LanguageMessages>()\n .unknown(true)\n .optional()\n .description('Custom error messages keyed by validation rule name')\n })\n .default({})\n .unknown(true)\n .description('Component-specific configuration options'),\n schema: Joi.object({\n min: Joi.number()\n .empty('')\n .description('Minimum value or length for validation'),\n max: Joi.number()\n .empty('')\n .description('Maximum value or length for validation'),\n length: Joi.number()\n .empty('')\n .description('Exact length required for validation')\n })\n .unknown(true)\n .default({})\n .description('Validation rules for the component'),\n list: Joi.string()\n .trim()\n .optional()\n .description(\n 'Reference to a predefined list of options for select components'\n )\n })\n .unknown(true)\n\nexport const componentSchemaV2 = componentSchema\n .keys({\n id: idSchema.description('Unique identifier for the component'),\n list: Joi.string()\n .valid(listIdRef)\n .optional()\n .description(\n 'List id reference to a predefined list of options for select components'\n )\n })\n .description('Component schema for V2 forms')\n\nconst nextSchema = Joi.object<Link>()\n .description('Navigation link defining where to go after completing a page')\n .keys({\n path: Joi.string()\n .trim()\n .required()\n .description('The target page path to navigate to'),\n condition: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description(\n 'Optional condition that determines if this path should be taken'\n ),\n redirect: Joi.string()\n .trim()\n .optional()\n .description(\n 'Optional external URL to redirect to instead of an internal page'\n )\n })\n\nconst repeatOptions = Joi.object<RepeatOptions>()\n .description('Configuration options for a repeatable page section')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description(\n 'Identifier for the repeatable section, used in data structure'\n ),\n title: Joi.string()\n .trim()\n .required()\n .description('Title displayed for each repeatable item')\n })\n\nconst repeatSchema = Joi.object<RepeatSchema>()\n .description('Validation rules for a repeatable section')\n .keys({\n min: Joi.number()\n .empty('')\n .required()\n .description('Minimum number of repetitions required'),\n max: Joi.number()\n .empty('')\n .required()\n .description('Maximum number of repetitions allowed')\n })\n\nexport const pageRepeatSchema = Joi.object<Repeat>()\n .description('Complete configuration for a repeatable page')\n .keys({\n options: repeatOptions\n .required()\n .description('Display and identification options for the repetition'),\n schema: repeatSchema\n .required()\n .description('Validation constraints for the number of repetitions')\n })\n\nconst eventSchema = Joi.object<Event>()\n .description('Event handler configuration for page lifecycle events')\n .keys({\n type: Joi.string()\n .trim()\n .allow('http')\n .required()\n .description(\n 'Type of the event handler (currently only \"http\" supported)'\n ),\n options: Joi.object<EventOptions>()\n .description('Options specific to the event handler type')\n .keys({\n method: Joi.string()\n .trim()\n .allow('POST')\n .required()\n .description('HTTP method to use for the request'),\n url: Joi.string()\n .trim()\n .uri({ scheme: ['http', 'https'] })\n .required()\n .description('URL endpoint to call when the event fires')\n })\n })\n\nconst eventsSchema = Joi.object<Events>()\n .description(\n 'Collection of event handlers for different page lifecycle events'\n )\n .keys({\n onLoad: eventSchema\n .optional()\n .description('Event handler triggered when the page is loaded'),\n onSave: eventSchema\n .optional()\n .description('Event handler triggered when the page data is saved')\n })\n\n/**\n * `/status` is a special route for providing a user's application status.\n * It should not be configured via the designer.\n */\nexport const pageSchema = Joi.object<Page>()\n .description('Form page definition specifying content and behavior')\n .keys({\n id: idSchemaOptional.description('Unique identifier for the page'),\n path: Joi.string()\n .trim()\n .required()\n .disallow('/status')\n .description(\n 'URL path for this page, must not be the reserved \"/status\" path'\n ),\n title: Joi.string()\n .trim()\n .required()\n .description('Page title displayed at the top of the page'),\n section: Joi.string().trim().description('Section this page belongs to'),\n controller: Joi.string()\n .trim()\n .optional()\n .description('Custom controller class name for special page behavior'),\n components: Joi.array<ComponentDef>()\n .items(componentSchema)\n .unique('name')\n .description('UI components displayed on this page'),\n repeat: Joi.when('controller', {\n is: Joi.string().trim().valid('RepeatPageController').required(),\n then: pageRepeatSchema\n .required()\n .description(\n 'Configuration for repeatable pages, required when using RepeatPageController'\n ),\n otherwise: Joi.any().strip()\n }),\n condition: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Optional condition that determines if this page is shown'),\n next: Joi.array<Link>()\n .items(nextSchema)\n .default([])\n .description('Possible navigation paths after this page'),\n events: eventsSchema\n .optional()\n .description('Event handlers for page lifecycle events'),\n view: Joi.string()\n .trim()\n .optional()\n .description(\n 'Optional custom view template to use for rendering this page'\n )\n })\n\n/**\n * V2 engine schema - used with new editor\n */\nexport const pageSchemaV2 = pageSchema\n .append({\n id: idSchema.description('Unique identifier for the page'),\n title: Joi.string()\n .trim()\n .allow('')\n .required()\n .description(\n 'Page title displayed at the top of the page (with support for empty titles in V2)'\n ),\n components: Joi.array<ComponentDef>()\n .items(componentSchemaV2)\n .unique('name')\n .unique('id')\n .description('Components schema for V2 forms'),\n condition: Joi.string()\n .trim()\n .valid(conditionIdRef)\n .optional()\n .description('Optional condition that determines if this page is shown')\n })\n .description('Page schema for V2 forms')\n\nconst baseListItemSchema = Joi.object<Item>()\n .description('Base schema for list items with common properties')\n .keys({\n id: idSchema.description('Unique identifier for the list item'),\n text: Joi.string()\n .trim()\n .allow('')\n .description('Display text shown to the user'),\n description: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Optional additional descriptive text for the item'),\n conditional: Joi.object<Item['conditional']>()\n .description('Optional components to show when this item is selected')\n .keys({\n components: Joi.array<ComponentDef>()\n .required()\n .items(componentSchema.unknown(true))\n .unique('name')\n .description('Components to display conditionally')\n })\n .optional(),\n condition: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Condition that determines if this item is shown'),\n hint: Joi.object<Item['hint']>()\n .optional()\n .keys({\n id: idSchema,\n text: Joi.string().trim()\n })\n .description('Optional hint text to be shown on list item')\n })\n\nconst stringListItemSchema = baseListItemSchema\n .append({\n value: Joi.string()\n .trim()\n .required()\n .description('String value stored when this item is selected')\n })\n .description('List item with string value')\n\nconst numberListItemSchema = baseListItemSchema\n .append({\n value: Joi.number()\n .required()\n .description('Numeric value stored when this item is selected')\n })\n .description('List item with numeric value')\n\nexport const listSchema = Joi.object<List>()\n .description('Reusable list of options for select components')\n .keys({\n id: idSchemaOptional.description('Unique identifier for the list'),\n name: Joi.string()\n .trim()\n .required()\n .description('Name used to reference this list from components'),\n title: Joi.string()\n .trim()\n .required()\n .description('Human-readable title for the list'),\n type: Joi.string()\n .trim()\n .required()\n .valid('string', 'number')\n .description('Data type for list values (string or number)'),\n items: Joi.when('type', {\n is: 'string',\n then: Joi.array()\n .items(stringListItemSchema)\n .unique('text')\n .unique('value')\n .messages({\n 'array.unique':\n 'Each item must have a unique identifier - enter a different identifier for this item.'\n })\n .description('Array of items with string values'),\n otherwise: Joi.array()\n .items(numberListItemSchema)\n .unique('text')\n .unique('value')\n .description('Array of items with numeric values')\n })\n })\n\n/**\n * V2 Joi schema for Lists\n */\nexport const listSchemaV2 = listSchema\n .keys({\n id: idSchema.description('Unique identifier for the list')\n })\n .description('List schema for V2 forms')\n\nconst feedbackSchema = Joi.object<FormDefinition['feedback']>()\n .description('Feedback configuration for the form')\n .keys({\n feedbackForm: Joi.boolean()\n .default(false)\n .description('Whether to show the built-in feedback form'),\n url: Joi.when('feedbackForm', {\n is: Joi.boolean().valid(false),\n then: Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'URL to an external feedback form when not using built-in feedback'\n )\n }),\n emailAddress: Joi.string()\n .trim()\n .email({\n tlds: {\n allow: false\n }\n })\n .optional()\n .description('Email address where feedback is sent')\n })\n\nconst phaseBannerSchema = Joi.object<PhaseBanner>()\n .description('Phase banner configuration showing development status')\n .keys({\n phase: Joi.string()\n .trim()\n .valid('alpha', 'beta')\n .description('Development phase of the service (alpha or beta)')\n })\n\nconst outputSchema = Joi.object<FormDefinition['output']>()\n .description('Configuration for form submission output')\n .keys({\n audience: Joi.string()\n .trim()\n .valid('human', 'machine')\n .required()\n .description(\n 'Target audience for the output (human readable or machine processable)'\n ),\n version: Joi.string()\n .trim()\n .required()\n .description('Version identifier for the output format')\n })\n\n/**\n * Joi schema for `FormDefinition` interface\n * @see {@link FormDefinition}\n */\nexport const formDefinitionSchema = Joi.object<FormDefinition>()\n .description('Complete form definition describing all aspects of a form')\n .required()\n .keys({\n engine: Joi.string()\n .trim()\n .allow('V1', 'V2')\n .default('V1')\n .description('Form engine version to use (V1 or V2)'),\n name: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Unique name identifying the form'),\n feedback: feedbackSchema\n .optional()\n .description('Feedback mechanism configuration'),\n startPage: Joi.string()\n .trim()\n .optional()\n .description('Path of the first page to show when starting the form'),\n pages: Joi.array<Page>()\n .required()\n .items(pageSchema)\n .description('Pages schema for V1 forms')\n .unique('path'),\n sections: Joi.array<Section>()\n .items(sectionsSchema)\n .unique('name')\n .unique('title')\n .required()\n .description('Sections grouping related pages together'),\n conditions: Joi.array<ConditionWrapper>()\n .items(conditionWrapperSchema)\n .unique('name')\n .unique('displayName')\n .description('Named conditions used for form logic'),\n lists: Joi.array<List>()\n .items(listSchema)\n .unique('name')\n .unique('title')\n .description('Reusable lists of options for select components'),\n metadata: Joi.object({ a: Joi.any() })\n .unknown()\n .optional()\n .description('Custom metadata for the form'),\n declaration: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Declaration text shown on the summary page'),\n skipSummary: Joi.any()\n .strip()\n .description('option to skip the summary page'),\n phaseBanner: phaseBannerSchema\n .optional()\n .description('Phase banner configuration'),\n outputEmail: Joi.string()\n .trim()\n .email({ tlds: { allow: ['uk'] } })\n .optional()\n .description('Email address where form submissions are sent'),\n output: outputSchema\n .optional()\n .description('Configuration for submission output format')\n })\n\nexport const formDefinitionV2Schema = formDefinitionSchema\n .keys({\n pages: Joi.array<Page>()\n .items(pageSchemaV2)\n .required()\n .unique('path')\n .unique('id')\n .description('Pages schema for V2 forms'),\n lists: Joi.array<List>()\n .items(listSchemaV2)\n .unique('name')\n .unique('title')\n .unique('id')\n .description('Lists schema for V2 forms'),\n conditions: Joi.array<Condition2Wrapper>()\n .items(conditionWrapperSchemaV2)\n .unique('name')\n .unique('displayName')\n .description('Named conditions used for form logic')\n })\n .description('Form definition schema for V2')\n\n// Maintain compatibility with legacy named export\n// E.g. `import { Schema } from '@defra/forms-model'`\nexport const Schema = formDefinitionSchema\n"],"mappings":"AAAA,OAAOA,GAAG,MAAiC,KAAK;AAChD,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAEnC,SAASC,aAAa;AAiCtB,SAASC,aAAa;AAEtB,MAAMC,gBAAgB,GAAGL,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC;AAE5C,MAAMC,QAAQ,GAAGH,gBAAgB,CAACI,OAAO,CAAC,MAAMP,MAAM,CAAC,CAAC,CAAC;AAEzD,MAAMQ,cAAc,GAAGV,GAAG,CAACW,GAAG,CAAC,aAAa,EAAE;EAC5CC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGC,UAA+B,IACtCA,UAAU,CAACC,GAAG,CAAEC,SAAS,IAAKA,SAAS,CAACC,IAAI;AAChD,CAAC,CAAC;AAEF,MAAMC,oBAAoB,GAAGlB,GAAG,CAACW,GAAG,CAAC,QAAQ,EAAE;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CAACmG,YAAY,CAAC,CACnB5F,QAAQ,CAAC,CAAC,CACVqF,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,IAAI,CAAC,CACZxF,WAAW,CAAC,2BAA2B,CAAC;EAC3CP,KAAK,EAAE3B,GAAG,CAACsE,KAAK,CAAO,CAAC,CACrBxC,KAAK,CAAC4G,YAAY,CAAC,CACnBhB,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,OAAO,CAAC,CACfA,MAAM,CAAC,IAAI,CAAC,CACZxF,WAAW,CAAC,2BAA2B,CAAC;EAC3CpB,UAAU,EAAEd,GAAG,CAACsE,KAAK,CAAoB,CAAC,CACvCxC,KAAK,CAAC6C,wBAAwB,CAAC,CAC/B+C,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,aAAa,CAAC,CACrBxF,WAAW,CAAC,sCAAsC;AACvD,CAAC,CAAC,CACDA,WAAW,CAAC,+BAA+B,CAAC;;AAE/C;AACA;AACA,OAAO,MAAMgI,MAAM,GAAGb,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["Joi","v4","uuidV4","ComponentType","hasComponents","idSchemaOptional","string","uuid","idSchema","default","conditionIdRef","ref","in","adjust","conditions","map","condition","name","componentIdRefSchema","pages","flatMap","page","components","filter","component","id","listIdRef","lists","list","listItemIdRef","items","item","sectionsSchema","object","description","keys","trim","required","title","hideTitle","boolean","optional","conditionFieldSchema","type","display","conditionValueSchema","value","condition2StringValueDataSchema","valid","condition2ListItemRefDataSchema","listId","itemId","relativeDateValueDataSchema","period","unit","direction","conditionRefSchema","conditionName","conditionDisplayName","coordinator","condition2RefDataSchema","conditionId","conditionSchema","field","operator","alternatives","try","condition2DataSchema","componentId","conditionGroupSchema","array","link","conditionsModelSchema","conditionWrapperSchema","displayName","conditionWrapperSchemaV2","componentSchema","shortDescription","when","is","Details","Html","InsetText","Markdown","then","pattern","otherwise","allow","hint","options","rows","number","empty","maxWords","maxDaysInPast","maxDaysInFuture","customValidationMessage","customValidationMessages","unknown","schema","min","max","length","componentSchemaV2","nextSchema","path","redirect","repeatOptions","repeatSchema","pageRepeatSchema","eventSchema","method","url","uri","scheme","eventsSchema","onLoad","onSave","pageSchema","disallow","section","controller","unique","repeat","any","strip","next","events","view","pageSchemaV2","append","baseListItemSchema","text","conditional","stringListItemSchema","numberListItemSchema","listSchema","messages","listSchemaV2","feedbackSchema","feedbackForm","emailAddress","email","tlds","phaseBannerSchema","phase","outputSchema","audience","version","formDefinitionSchema","engine","feedback","startPage","sections","metadata","a","declaration","skipSummary","phaseBanner","outputEmail","output","formDefinitionV2Schema","Schema"],"sources":["../../../../src/form/form-definition/index.ts"],"sourcesContent":["import Joi, { type LanguageMessages } from 'joi'\nimport { v4 as uuidV4 } from 'uuid'\n\nimport { ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\nimport {\n type ConditionData,\n type ConditionDataV2,\n type ConditionFieldData,\n type ConditionGroupData,\n type ConditionGroupDataV2,\n type ConditionListItemRefValueDataV2,\n type ConditionRefData,\n type ConditionRefDataV2,\n type ConditionStringValueDataV2,\n type ConditionValueData,\n type ConditionsModelData,\n type RelativeDateValueData\n} from '~/src/conditions/types.js'\nimport {\n type ConditionWrapper,\n type ConditionWrapperV2,\n type Event,\n type EventOptions,\n type Events,\n type FormDefinition,\n type Item,\n type Link,\n type List,\n type Page,\n type PhaseBanner,\n type Repeat,\n type RepeatOptions,\n type RepeatSchema,\n type Section\n} from '~/src/form/form-definition/types.js'\nimport { hasComponents } from '~/src/pages/helpers.js'\n\nconst idSchemaOptional = Joi.string().uuid()\n\nconst idSchema = idSchemaOptional.default(() => uuidV4())\n\nconst conditionIdRef = Joi.ref('/conditions', {\n in: true,\n adjust: (conditions: ConditionWrapperV2[]) =>\n conditions.map((condition) => condition.name)\n})\n\nconst componentIdRefSchema = Joi.ref('/pages', {\n in: true,\n adjust: (pages: Page[]) =>\n pages.flatMap((page) =>\n hasComponents(page)\n ? page.components\n .filter((component) => component.id)\n .map((component) => component.id)\n : []\n )\n})\n\nconst listIdRef = Joi.ref('/lists', {\n in: true,\n adjust: (lists: List[]) =>\n lists.filter((list) => list.id).map((list) => list.id)\n})\n\nconst listItemIdRef = Joi.ref('/lists', {\n in: true,\n adjust: (lists: List[]) =>\n lists.flatMap((list) =>\n list.items.filter((item) => item.id).map((item) => item.id)\n )\n})\n\nconst sectionsSchema = Joi.object<Section>()\n .description('A form section grouping related pages together')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description(\n 'Unique identifier for the section, used in code and page references'\n ),\n title: Joi.string()\n .trim()\n .required()\n .description('Human-readable section title displayed to users'),\n hideTitle: Joi.boolean()\n .optional()\n .default(false)\n .description(\n 'When true, the section title will not be displayed in the UI'\n )\n })\n\nconst conditionFieldSchema = Joi.object<ConditionFieldData>()\n .description('Field reference used in a condition')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description('Component name referenced by this condition'),\n type: Joi.string()\n .trim()\n .required()\n .description('Data type of the field (e.g., string, number, date)'),\n display: Joi.string()\n .trim()\n .required()\n .description('Human-readable name of the field for display purposes')\n })\n\nconst conditionValueSchema = Joi.object<ConditionValueData>()\n .description('Value specification for a condition')\n .keys({\n type: Joi.string()\n .trim()\n .required()\n .description('Data type of the value (e.g., string, number, date)'),\n value: Joi.string()\n .trim()\n .required()\n .description('The actual value to compare against'),\n display: Joi.string()\n .trim()\n .required()\n .description('Human-readable version of the value for display purposes')\n })\n\nconst condition2StringValueDataSchema = Joi.object<ConditionStringValueDataV2>()\n .description('String value specification for a condition')\n .keys({\n type: Joi.string()\n .trim()\n .valid('StringValue')\n .required()\n .description('Type of the condition value, should be \"StringValue\"'),\n value: Joi.string()\n .trim()\n .required()\n .description('The actual value to compare against')\n })\n\nconst condition2ListItemRefDataSchema =\n Joi.object<ConditionListItemRefValueDataV2>()\n .description('List item ref specification for a condition')\n .keys({\n type: Joi.string()\n .trim()\n .valid('ListItemRef')\n .required()\n .description('Type of the condition value, should be \"ListItemRef\"'),\n listId: Joi.string()\n .valid(listIdRef)\n .trim()\n .required()\n .description('The id of the list'),\n itemId: Joi.string()\n .trim()\n .valid(listItemIdRef)\n .required()\n .description('The id of the list item')\n })\n\nconst relativeDateValueDataSchema = Joi.object<RelativeDateValueData>()\n .description('Relative date specification for date-based conditions')\n .keys({\n type: Joi.string()\n .trim()\n .valid('RelativeDate')\n .required()\n .description('Type of the condition value, should be \"RelativeDate\"'),\n period: Joi.string()\n .trim()\n .required()\n .description('Numeric amount of the time period, as a string'),\n unit: Joi.string()\n .trim()\n .required()\n .description('Time unit (e.g. days, weeks, months, years)'),\n direction: Joi.string()\n .trim()\n .required()\n .description('Temporal direction, either \"past\" or \"future\"')\n })\n\nconst conditionRefSchema = Joi.object<ConditionRefData>()\n .description('Reference to a named condition defined elsewhere')\n .keys({\n conditionName: Joi.string()\n .trim()\n .required()\n .description('Name of the referenced condition'),\n conditionDisplayName: Joi.string()\n .trim()\n .required()\n .description('Human-readable name of the condition for display purposes'),\n coordinator: Joi.string()\n .trim()\n .optional()\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n )\n })\n\nconst condition2RefDataSchema = Joi.object<ConditionRefDataV2>()\n .description('Reference to a named condition defined elsewhere')\n .keys({\n id: idSchema.description('Unique identifier for the referenced condition'),\n conditionId: Joi.string()\n .trim()\n .required()\n .valid(conditionIdRef)\n .description('Name of the referenced condition')\n })\n\nconst conditionSchema = Joi.object<ConditionData>()\n .description('Condition definition specifying a logical comparison')\n .keys({\n field: conditionFieldSchema.description(\n 'The form field being evaluated in this condition'\n ),\n operator: Joi.string()\n .trim()\n .required()\n .description('Comparison operator (equals, greaterThan, contains, etc.)'),\n value: Joi.alternatives()\n .try(conditionValueSchema, relativeDateValueDataSchema)\n .description(\n 'Value to compare the field against, either fixed or relative date'\n ),\n coordinator: Joi.string()\n .trim()\n .optional()\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n )\n })\n\nconst condition2DataSchema = Joi.object<ConditionDataV2>()\n .description('Condition definition')\n .keys({\n id: idSchema.description(\n 'Unique identifier used to reference this condition'\n ),\n componentId: Joi.string()\n .trim()\n .valid(componentIdRefSchema)\n .required()\n .description(\n 'Reference to the component id being evaluated in this condition'\n ),\n operator: Joi.string()\n .trim()\n .required()\n .description('Comparison operator (equals, greaterThan, contains, etc.)'),\n value: Joi.alternatives()\n .try(\n condition2StringValueDataSchema,\n condition2ListItemRefDataSchema,\n relativeDateValueDataSchema\n )\n .description(\n 'Value to compare the field against, either fixed or relative date'\n )\n })\n\nconst conditionGroupSchema = Joi.object<ConditionGroupData>()\n .description('Group of conditions combined with logical operators')\n .keys({\n conditions: Joi.array()\n .items(\n Joi.alternatives().try(\n conditionSchema,\n conditionRefSchema,\n Joi.link('#conditionGroupSchema')\n )\n )\n .description('Array of conditions or condition references in this group')\n })\n .id('conditionGroupSchema')\n\nconst conditionsModelSchema = Joi.object<ConditionsModelData>()\n .description('Complete condition model with name and condition set')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description('Unique identifier for the condition set'),\n conditions: Joi.array()\n .items(\n Joi.alternatives().try(\n conditionSchema,\n conditionRefSchema,\n conditionGroupSchema\n )\n )\n .description(\n 'Array of conditions, condition references, or condition groups'\n )\n })\n\nconst conditionWrapperSchema = Joi.object<ConditionWrapper>()\n .description('Container for a named condition with its definition')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description('Unique identifier used to reference this condition'),\n displayName: Joi.string()\n .trim()\n .description('Human-readable name for display in the UI'),\n value: conditionsModelSchema\n .required()\n .description('The complete condition definition')\n })\n\nexport const conditionWrapperSchemaV2 = Joi.object<ConditionWrapperV2>()\n .description('Container for a named condition with its definition')\n .keys({\n name: Joi.string()\n .trim()\n .description('Unique identifier for the condition'),\n displayName: Joi.string()\n .trim()\n .description('Human-readable name for display in the UI'),\n coordinator: Joi.string()\n .optional()\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n ),\n conditions: Joi.array<ConditionGroupDataV2>()\n .items(\n Joi.alternatives().try(condition2DataSchema, condition2RefDataSchema)\n )\n .description('Array of conditions or condition references')\n })\n .description('Condition schema for V2 forms')\n\nexport const componentSchema = Joi.object<ComponentDef>()\n .description('Form component definition specifying UI element behavior')\n .keys({\n id: idSchemaOptional.description('Unique identifier for the component'),\n type: Joi.string<ComponentType>()\n .trim()\n .required()\n .description('Component type (TextField, RadioButtons, DateField, etc.)'),\n shortDescription: Joi.string()\n .trim()\n .optional()\n .description('Brief description of the component purpose'),\n name: Joi.when('type', {\n is: Joi.string().valid(\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText,\n ComponentType.Markdown\n ),\n then: Joi.string()\n .trim()\n .pattern(/^[a-zA-Z]+$/)\n .optional()\n .description('Optional identifier for display-only components'),\n otherwise: Joi.string()\n .trim()\n .pattern(/^[a-zA-Z]+$/)\n .description('Unique identifier for the component, used in form data')\n }),\n title: Joi.when('type', {\n is: Joi.string().valid(\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText,\n ComponentType.Markdown\n ),\n then: Joi.string()\n .trim()\n .optional()\n .description('Optional title for display-only components'),\n otherwise: Joi.string()\n .trim()\n .allow('')\n .description('Label displayed above the component')\n }),\n hint: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description(\n 'Additional guidance text displayed below the component title'\n ),\n options: Joi.object({\n rows: Joi.number()\n .empty('')\n .description('Number of rows for textarea components'),\n maxWords: Joi.number()\n .empty('')\n .description('Maximum number of words allowed in text inputs'),\n maxDaysInPast: Joi.number()\n .empty('')\n .description('Maximum days in the past allowed for date inputs'),\n maxDaysInFuture: Joi.number()\n .empty('')\n .description('Maximum days in the future allowed for date inputs'),\n customValidationMessage: Joi.string()\n .trim()\n .allow('')\n .description('Custom error message for validation failures'),\n customValidationMessages: Joi.object<LanguageMessages>()\n .unknown(true)\n .optional()\n .description('Custom error messages keyed by validation rule name')\n })\n .default({})\n .unknown(true)\n .description('Component-specific configuration options'),\n schema: Joi.object({\n min: Joi.number()\n .empty('')\n .description('Minimum value or length for validation'),\n max: Joi.number()\n .empty('')\n .description('Maximum value or length for validation'),\n length: Joi.number()\n .empty('')\n .description('Exact length required for validation')\n })\n .unknown(true)\n .default({})\n .description('Validation rules for the component'),\n list: Joi.string()\n .trim()\n .optional()\n .description(\n 'Reference to a predefined list of options for select components'\n )\n })\n .unknown(true)\n\nexport const componentSchemaV2 = componentSchema\n .keys({\n id: idSchema.description('Unique identifier for the component'),\n list: Joi.string()\n .valid(listIdRef)\n .optional()\n .description(\n 'List id reference to a predefined list of options for select components'\n )\n })\n .description('Component schema for V2 forms')\n\nconst nextSchema = Joi.object<Link>()\n .description('Navigation link defining where to go after completing a page')\n .keys({\n path: Joi.string()\n .trim()\n .required()\n .description('The target page path to navigate to'),\n condition: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description(\n 'Optional condition that determines if this path should be taken'\n ),\n redirect: Joi.string()\n .trim()\n .optional()\n .description(\n 'Optional external URL to redirect to instead of an internal page'\n )\n })\n\nconst repeatOptions = Joi.object<RepeatOptions>()\n .description('Configuration options for a repeatable page section')\n .keys({\n name: Joi.string()\n .trim()\n .required()\n .description(\n 'Identifier for the repeatable section, used in data structure'\n ),\n title: Joi.string()\n .trim()\n .required()\n .description('Title displayed for each repeatable item')\n })\n\nconst repeatSchema = Joi.object<RepeatSchema>()\n .description('Validation rules for a repeatable section')\n .keys({\n min: Joi.number()\n .empty('')\n .required()\n .description('Minimum number of repetitions required'),\n max: Joi.number()\n .empty('')\n .required()\n .description('Maximum number of repetitions allowed')\n })\n\nexport const pageRepeatSchema = Joi.object<Repeat>()\n .description('Complete configuration for a repeatable page')\n .keys({\n options: repeatOptions\n .required()\n .description('Display and identification options for the repetition'),\n schema: repeatSchema\n .required()\n .description('Validation constraints for the number of repetitions')\n })\n\nconst eventSchema = Joi.object<Event>()\n .description('Event handler configuration for page lifecycle events')\n .keys({\n type: Joi.string()\n .trim()\n .allow('http')\n .required()\n .description(\n 'Type of the event handler (currently only \"http\" supported)'\n ),\n options: Joi.object<EventOptions>()\n .description('Options specific to the event handler type')\n .keys({\n method: Joi.string()\n .trim()\n .allow('POST')\n .required()\n .description('HTTP method to use for the request'),\n url: Joi.string()\n .trim()\n .uri({ scheme: ['http', 'https'] })\n .required()\n .description('URL endpoint to call when the event fires')\n })\n })\n\nconst eventsSchema = Joi.object<Events>()\n .description(\n 'Collection of event handlers for different page lifecycle events'\n )\n .keys({\n onLoad: eventSchema\n .optional()\n .description('Event handler triggered when the page is loaded'),\n onSave: eventSchema\n .optional()\n .description('Event handler triggered when the page data is saved')\n })\n\n/**\n * `/status` is a special route for providing a user's application status.\n * It should not be configured via the designer.\n */\nexport const pageSchema = Joi.object<Page>()\n .description('Form page definition specifying content and behavior')\n .keys({\n id: idSchemaOptional.description('Unique identifier for the page'),\n path: Joi.string()\n .trim()\n .required()\n .disallow('/status')\n .description(\n 'URL path for this page, must not be the reserved \"/status\" path'\n ),\n title: Joi.string()\n .trim()\n .required()\n .description('Page title displayed at the top of the page'),\n section: Joi.string().trim().description('Section this page belongs to'),\n controller: Joi.string()\n .trim()\n .optional()\n .description('Custom controller class name for special page behavior'),\n components: Joi.array<ComponentDef>()\n .items(componentSchema)\n .unique('name')\n .description('UI components displayed on this page'),\n repeat: Joi.when('controller', {\n is: Joi.string().trim().valid('RepeatPageController').required(),\n then: pageRepeatSchema\n .required()\n .description(\n 'Configuration for repeatable pages, required when using RepeatPageController'\n ),\n otherwise: Joi.any().strip()\n }),\n condition: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Optional condition that determines if this page is shown'),\n next: Joi.array<Link>()\n .items(nextSchema)\n .default([])\n .description('Possible navigation paths after this page'),\n events: eventsSchema\n .optional()\n .description('Event handlers for page lifecycle events'),\n view: Joi.string()\n .trim()\n .optional()\n .description(\n 'Optional custom view template to use for rendering this page'\n )\n })\n\n/**\n * V2 engine schema - used with new editor\n */\nexport const pageSchemaV2 = pageSchema\n .append({\n id: idSchema.description('Unique identifier for the page'),\n title: Joi.string()\n .trim()\n .allow('')\n .required()\n .description(\n 'Page title displayed at the top of the page (with support for empty titles in V2)'\n ),\n components: Joi.array<ComponentDef>()\n .items(componentSchemaV2)\n .unique('name')\n .unique('id')\n .description('Components schema for V2 forms'),\n condition: Joi.string()\n .trim()\n .valid(conditionIdRef)\n .optional()\n .description('Optional condition that determines if this page is shown')\n })\n .description('Page schema for V2 forms')\n\nconst baseListItemSchema = Joi.object<Item>()\n .description('Base schema for list items with common properties')\n .keys({\n id: idSchema.description('Unique identifier for the list item'),\n text: Joi.string()\n .trim()\n .allow('')\n .description('Display text shown to the user'),\n description: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Optional additional descriptive text for the item'),\n conditional: Joi.object<Item['conditional']>()\n .description('Optional components to show when this item is selected')\n .keys({\n components: Joi.array<ComponentDef>()\n .required()\n .items(componentSchema.unknown(true))\n .unique('name')\n .description('Components to display conditionally')\n })\n .optional(),\n condition: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Condition that determines if this item is shown'),\n hint: Joi.object<Item['hint']>()\n .optional()\n .keys({\n id: idSchema,\n text: Joi.string().trim()\n })\n .description('Optional hint text to be shown on list item')\n })\n\nconst stringListItemSchema = baseListItemSchema\n .append({\n value: Joi.string()\n .trim()\n .required()\n .description('String value stored when this item is selected')\n })\n .description('List item with string value')\n\nconst numberListItemSchema = baseListItemSchema\n .append({\n value: Joi.number()\n .required()\n .description('Numeric value stored when this item is selected')\n })\n .description('List item with numeric value')\n\nexport const listSchema = Joi.object<List>()\n .description('Reusable list of options for select components')\n .keys({\n id: idSchemaOptional.description('Unique identifier for the list'),\n name: Joi.string()\n .trim()\n .required()\n .description('Name used to reference this list from components'),\n title: Joi.string()\n .trim()\n .required()\n .description('Human-readable title for the list'),\n type: Joi.string()\n .trim()\n .required()\n .valid('string', 'number')\n .description('Data type for list values (string or number)'),\n items: Joi.when('type', {\n is: 'string',\n then: Joi.array()\n .items(stringListItemSchema)\n .unique('text')\n .unique('value')\n .messages({\n 'array.unique':\n 'Each item must have a unique identifier - enter a different identifier for this item.'\n })\n .description('Array of items with string values'),\n otherwise: Joi.array()\n .items(numberListItemSchema)\n .unique('text')\n .unique('value')\n .description('Array of items with numeric values')\n })\n })\n\n/**\n * V2 Joi schema for Lists\n */\nexport const listSchemaV2 = listSchema\n .keys({\n id: idSchema.description('Unique identifier for the list')\n })\n .description('List schema for V2 forms')\n\nconst feedbackSchema = Joi.object<FormDefinition['feedback']>()\n .description('Feedback configuration for the form')\n .keys({\n feedbackForm: Joi.boolean()\n .default(false)\n .description('Whether to show the built-in feedback form'),\n url: Joi.when('feedbackForm', {\n is: Joi.boolean().valid(false),\n then: Joi.string()\n .trim()\n .optional()\n .allow('')\n .description(\n 'URL to an external feedback form when not using built-in feedback'\n )\n }),\n emailAddress: Joi.string()\n .trim()\n .email({\n tlds: {\n allow: false\n }\n })\n .optional()\n .description('Email address where feedback is sent')\n })\n\nconst phaseBannerSchema = Joi.object<PhaseBanner>()\n .description('Phase banner configuration showing development status')\n .keys({\n phase: Joi.string()\n .trim()\n .valid('alpha', 'beta')\n .description('Development phase of the service (alpha or beta)')\n })\n\nconst outputSchema = Joi.object<FormDefinition['output']>()\n .description('Configuration for form submission output')\n .keys({\n audience: Joi.string()\n .trim()\n .valid('human', 'machine')\n .required()\n .description(\n 'Target audience for the output (human readable or machine processable)'\n ),\n version: Joi.string()\n .trim()\n .required()\n .description('Version identifier for the output format')\n })\n\n/**\n * Joi schema for `FormDefinition` interface\n * @see {@link FormDefinition}\n */\nexport const formDefinitionSchema = Joi.object<FormDefinition>()\n .description('Complete form definition describing all aspects of a form')\n .required()\n .keys({\n engine: Joi.string()\n .trim()\n .allow('V1', 'V2')\n .default('V1')\n .description('Form engine version to use (V1 or V2)'),\n name: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Unique name identifying the form'),\n feedback: feedbackSchema\n .optional()\n .description('Feedback mechanism configuration'),\n startPage: Joi.string()\n .trim()\n .optional()\n .description('Path of the first page to show when starting the form'),\n pages: Joi.array<Page>()\n .required()\n .items(pageSchema)\n .description('Pages schema for V1 forms')\n .unique('path'),\n sections: Joi.array<Section>()\n .items(sectionsSchema)\n .unique('name')\n .unique('title')\n .required()\n .description('Sections grouping related pages together'),\n conditions: Joi.array<ConditionWrapper>()\n .items(conditionWrapperSchema)\n .unique('name')\n .unique('displayName')\n .description('Named conditions used for form logic'),\n lists: Joi.array<List>()\n .items(listSchema)\n .unique('name')\n .unique('title')\n .description('Reusable lists of options for select components'),\n metadata: Joi.object({ a: Joi.any() })\n .unknown()\n .optional()\n .description('Custom metadata for the form'),\n declaration: Joi.string()\n .trim()\n .allow('')\n .optional()\n .description('Declaration text shown on the summary page'),\n skipSummary: Joi.any()\n .strip()\n .description('option to skip the summary page'),\n phaseBanner: phaseBannerSchema\n .optional()\n .description('Phase banner configuration'),\n outputEmail: Joi.string()\n .trim()\n .email({ tlds: { allow: ['uk'] } })\n .optional()\n .description('Email address where form submissions are sent'),\n output: outputSchema\n .optional()\n .description('Configuration for submission output format')\n })\n\nexport const formDefinitionV2Schema = formDefinitionSchema\n .keys({\n pages: Joi.array<Page>()\n .items(pageSchemaV2)\n .required()\n .unique('path')\n .unique('id')\n .description('Pages schema for V2 forms'),\n lists: Joi.array<List>()\n .items(listSchemaV2)\n .unique('name')\n .unique('title')\n .unique('id')\n .description('Lists schema for V2 forms'),\n conditions: Joi.array<ConditionWrapperV2>()\n .items(conditionWrapperSchemaV2)\n .unique('name')\n .unique('displayName')\n .description('Named conditions used for form logic')\n })\n .description('Form definition schema for V2')\n\n// Maintain compatibility with legacy named export\n// E.g. `import { Schema } from '@defra/forms-model'`\nexport const Schema = formDefinitionSchema\n"],"mappings":"AAAA,OAAOA,GAAG,MAAiC,KAAK;AAChD,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAEnC,SAASC,aAAa;AAiCtB,SAASC,aAAa;AAEtB,MAAMC,gBAAgB,GAAGL,GAAG,CAACM,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,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AI,EAAE;MAAExD,KAAK,EAAE,CAAC,IAAI;IAAE;EAAE,CAAC,CAAC,CAClC9C,QAAQ,CAAC,CAAC,CACVP,WAAW,CAAC,+CAA+C,CAAC;EAC/D8H,MAAM,EAAEd,YAAY,CACjBzG,QAAQ,CAAC,CAAC,CACVP,WAAW,CAAC,4CAA4C;AAC7D,CAAC,CAAC;AAEJ,OAAO,MAAM+H,sBAAsB,GAAGZ,oBAAoB,CACvDlH,IAAI,CAAC;EACJhB,KAAK,EAAEnB,GAAG,CAACsE,KAAK,CAAO,CAAC,CACrBxC,KAAK,CAACmG,YAAY,CAAC,CACnB5F,QAAQ,CAAC,CAAC,CACVqF,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,IAAI,CAAC,CACZxF,WAAW,CAAC,2BAA2B,CAAC;EAC3CP,KAAK,EAAE3B,GAAG,CAACsE,KAAK,CAAO,CAAC,CACrBxC,KAAK,CAAC4G,YAAY,CAAC,CACnBhB,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,OAAO,CAAC,CACfA,MAAM,CAAC,IAAI,CAAC,CACZxF,WAAW,CAAC,2BAA2B,CAAC;EAC3CpB,UAAU,EAAEd,GAAG,CAACsE,KAAK,CAAqB,CAAC,CACxCxC,KAAK,CAAC6C,wBAAwB,CAAC,CAC/B+C,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,aAAa,CAAC,CACrBxF,WAAW,CAAC,sCAAsC;AACvD,CAAC,CAAC,CACDA,WAAW,CAAC,+BAA+B,CAAC;;AAE/C;AACA;AACA,OAAO,MAAMgI,MAAM,GAAGb,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["Engine"],"sources":["../../../../src/form/form-definition/types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Coordinator } from '~/src/conditions/enums.js'\nimport {\n type Condition2GroupData,\n type ConditionsModelData\n} from '~/src/conditions/types.js'\nimport { type ControllerPath, type ControllerType } from '~/src/pages/enums.js'\n\nexport enum Engine {\n V1 = 'V1',\n V2 = 'V2'\n}\n\nexport interface Link {\n path: string\n condition?: string\n redirect?: string\n}\n\nexport interface EventOptions {\n method: string\n url: string\n}\n\nexport interface Event {\n type: string\n options: EventOptions\n}\n\nexport interface Events {\n onLoad?: Event\n onSave?: Event\n}\n\nexport interface PageBase {\n id?: string\n title: string\n path: string\n condition?: string\n events?: Events\n view?: string\n}\n\nexport interface RepeatOptions {\n name: string\n title: string\n}\n\nexport interface RepeatSchema {\n min: number\n max: number\n}\n\nexport interface Repeat {\n options: RepeatOptions\n schema: RepeatSchema\n}\n\nexport interface PageStart extends PageBase {\n path: ControllerPath.Start | string\n controller: ControllerType.Start\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageQuestion extends PageBase {\n controller?: ControllerType.Page\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageTerminal extends PageBase {\n controller?: ControllerType.Terminal\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageRepeat extends PageBase {\n controller: ControllerType.Repeat\n repeat: Repeat\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageFileUpload extends PageBase {\n controller: ControllerType.FileUpload\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageSummary extends PageBase {\n path: ControllerPath.Summary | string\n controller: ControllerType.Summary\n section?: undefined\n components?: ComponentDef[]\n}\n\nexport interface PageStatus extends PageBase {\n path: ControllerPath.Status | string\n controller: ControllerType.Status\n section?: undefined\n}\n\nexport type Page =\n | PageStart\n | PageQuestion\n | PageTerminal\n | PageFileUpload\n | PageRepeat\n | PageSummary\n | PageStatus\n\nexport interface Section {\n name: string\n title: string\n hideTitle?: boolean\n}\n\nexport interface Item {\n id?: string\n text: string\n value: string | number | boolean\n description?: string\n conditional?: { components: ComponentDef[] }\n condition?: string\n hint?: {\n id?: string\n text: string\n }\n}\n\nexport interface List {\n id?: string\n name: string\n title: string\n type: ListTypeContent\n items: Item[]\n}\n\nexport type ListTypeOption = 'bulleted' | 'numbered'\nexport type ListTypeContent = 'string' | 'number' | 'boolean'\n\nexport interface Feedback {\n feedbackForm?: boolean\n url?: string\n emailAddress?: string\n}\n\nexport interface PhaseBanner {\n phase?: 'alpha' | 'beta'\n feedbackUrl?: string\n}\n\nexport interface ConditionWrapper {\n name: string\n displayName: string\n value: ConditionsModelData\n}\n\nexport interface Condition2Wrapper {\n name: string\n displayName: string\n coordinator?: Coordinator\n conditions: Condition2GroupData\n}\n\n/**\n * Interface for `formDefinitionSchema` Joi schema\n */\nexport interface FormDefinition {\n engine?: Engine\n pages: Page[]\n conditions: (ConditionWrapper | Condition2Wrapper)[]\n lists: List[]\n sections: Section[]\n startPage?: string\n name?: string\n feedback?: Feedback\n phaseBanner?: PhaseBanner\n declaration?: string // Deprecated in v2\n skipSummary?: never\n metadata?: Record<string, unknown>\n outputEmail?: string\n output?: {\n audience: 'human' | 'machine'\n version: string\n }\n}\n"],"mappings":"AAQA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAmKlB;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["Engine"],"sources":["../../../../src/form/form-definition/types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Coordinator } from '~/src/conditions/enums.js'\nimport {\n type ConditionGroupDataV2,\n type ConditionsModelData\n} from '~/src/conditions/types.js'\nimport { type ControllerPath, type ControllerType } from '~/src/pages/enums.js'\n\nexport enum Engine {\n V1 = 'V1',\n V2 = 'V2'\n}\n\nexport interface Link {\n path: string\n condition?: string\n redirect?: string\n}\n\nexport interface EventOptions {\n method: string\n url: string\n}\n\nexport interface Event {\n type: string\n options: EventOptions\n}\n\nexport interface Events {\n onLoad?: Event\n onSave?: Event\n}\n\nexport interface PageBase {\n id?: string\n title: string\n path: string\n condition?: string\n events?: Events\n view?: string\n}\n\nexport interface RepeatOptions {\n name: string\n title: string\n}\n\nexport interface RepeatSchema {\n min: number\n max: number\n}\n\nexport interface Repeat {\n options: RepeatOptions\n schema: RepeatSchema\n}\n\nexport interface PageStart extends PageBase {\n path: ControllerPath.Start | string\n controller: ControllerType.Start\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageQuestion extends PageBase {\n controller?: ControllerType.Page\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageTerminal extends PageBase {\n controller?: ControllerType.Terminal\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageRepeat extends PageBase {\n controller: ControllerType.Repeat\n repeat: Repeat\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageFileUpload extends PageBase {\n controller: ControllerType.FileUpload\n section?: string | undefined\n next: Link[]\n components: ComponentDef[]\n}\n\nexport interface PageSummary extends PageBase {\n path: ControllerPath.Summary | string\n controller: ControllerType.Summary\n section?: undefined\n components?: ComponentDef[]\n}\n\nexport interface PageStatus extends PageBase {\n path: ControllerPath.Status | string\n controller: ControllerType.Status\n section?: undefined\n}\n\nexport type Page =\n | PageStart\n | PageQuestion\n | PageTerminal\n | PageFileUpload\n | PageRepeat\n | PageSummary\n | PageStatus\n\nexport interface Section {\n name: string\n title: string\n hideTitle?: boolean\n}\n\nexport interface Item {\n id?: string\n text: string\n value: string | number | boolean\n description?: string\n conditional?: { components: ComponentDef[] }\n condition?: string\n hint?: {\n id?: string\n text: string\n }\n}\n\nexport interface List {\n id?: string\n name: string\n title: string\n type: ListTypeContent\n items: Item[]\n}\n\nexport type ListTypeOption = 'bulleted' | 'numbered'\nexport type ListTypeContent = 'string' | 'number' | 'boolean'\n\nexport interface Feedback {\n feedbackForm?: boolean\n url?: string\n emailAddress?: string\n}\n\nexport interface PhaseBanner {\n phase?: 'alpha' | 'beta'\n feedbackUrl?: string\n}\n\nexport interface ConditionWrapper {\n name: string\n displayName: string\n value: ConditionsModelData\n}\n\nexport interface ConditionWrapperV2 {\n name: string\n displayName: string\n coordinator?: Coordinator\n conditions: ConditionGroupDataV2\n}\n\n/**\n * Interface for `formDefinitionSchema` Joi schema\n */\nexport interface FormDefinition {\n engine?: Engine\n pages: Page[]\n conditions: (ConditionWrapper | ConditionWrapperV2)[]\n lists: List[]\n sections: Section[]\n startPage?: string\n name?: string\n feedback?: Feedback\n phaseBanner?: PhaseBanner\n declaration?: string // Deprecated in v2\n skipSummary?: never\n metadata?: Record<string, unknown>\n outputEmail?: string\n output?: {\n audience: 'human' | 'machine'\n version: string\n }\n}\n"],"mappings":"AAQA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAmKlB;AACA;AACA","ignoreList":[]}
@@ -251,4 +251,7 @@ export function govukFieldIsQuestionOptional(govukField) {
251
251
  const checkedValue = govukField.items?.[0].checked;
252
252
  return typeof checkedValue === 'boolean';
253
253
  }
254
+
255
+ // A list of allowed template funtions for use within error message templates
256
+ export const allowedErrorTemplateFunctions = ['lowerFirst'];
254
257
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Joi","ComponentType","QuestionTypeSubGroup","pageTypeSchema","string","required","valid","description","questionTypeSchema","WrittenAnswerSubGroup","DateSubGroup","UkAddressField","TelephoneNumberField","FileUploadField","EmailAddressField","ListSubGroup","YesNoField","CheckboxesField","RadiosField","AutocompleteField","questionTypeFullSchema","TextField","MultilineTextField","NumberField","DatePartsField","MonthYearField","writtenAnswerSubSchema","dateSubSchema","listSubSchema","nameSchema","trim","questionSchema","hintTextSchema","optional","allow","questionOptionalSchema","listForQuestionSchema","listItemCountSchema","number","listItemsDataSchema","exactFilesSchema","empty","integer","min","max","minFilesSchema","maxFilesSchema","fileTypesSchema","array","items","single","default","documentTypesSchema","imageTypesSchema","tabularDataTypesSchema","enhancedActionSchema","radioIdSchema","radioTextSchema","radioHintSchema","radioValueSchema","shortDescriptionSchema","pageHeadingAndGuidanceSchema","pageHeadingSchema","guidanceTextSchema","repeaterSchema","minItemsSchema","maxItemsSchema","questionSetNameSchema","needDeclarationSchema","declarationTextSchema","minSchema","maxSchema","minLengthSchema","maxLengthSchema","maxFutureSchema","maxPastSchema","precisionSchema","prefixSchema","regexSchema","rowsSchema","suffixSchema","classesSchema","jsEnabledSchema","customValidator","extend","joi","type","base","messages","coerce","from","method","value","helpers","rowSeparatorRule","schema","$_getRule","colSeparatorRule","keysRule","rowSeparator","args","rows","split","map","v","filter","Boolean","colSeparator","keys","coercedValue","row","reduce","acc","col","idx","_err","console","error","errors","rules","convert","alias","$_addRule","name","ref","assert","RegExp","message","Array","isArray","every","k","autoCompleteOptionsSchema","dsv","object","text","disallow","parent","unique","ignoreUndefined","questionDetailsFullSchema","formEditorInputPageKeys","pageType","questionType","formEditorInputPageSchema","formEditorInputheckAnswersSettingsKeys","declarationText","formEditorInputCheckAnswersSettingSchema","formEditorInputQuestionKeys","question","shortDescription","hintText","questionOptional","formEditorInputQuestionSchema","formEditorInputPageSettingsKeys","pageHeadingAndGuidance","pageHeading","guidanceText","formEditorInputPageSettingsSchema","govukFieldValueIsString","govukField","includes","govukFieldIsQuestionOptional","checkedValue","checked"],"sources":["../../../../src/form/form-editor/index.ts"],"sourcesContent":["import Joi, { type ArraySchema, type GetRuleOptions } from 'joi'\n\nimport { ComponentType } from '~/src/components/enums.js'\nimport {\n type FormEditorInputCheckAnswersSettings,\n type FormEditorInputPage,\n type FormEditorInputPageSettings,\n type FormEditorInputQuestion,\n type GovukField,\n type GovukFieldQuestionOptional,\n type GovukStringField\n} from '~/src/form/form-editor/types.js'\n\nexport enum QuestionTypeSubGroup {\n WrittenAnswerSubGroup = 'writtenAnswerSub',\n DateSubGroup = 'dateSub',\n ListSubGroup = 'listSub'\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 ComponentType.UkAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.FileUploadField,\n ComponentType.EmailAddressField,\n QuestionTypeSubGroup.ListSubGroup,\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField\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.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField\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)\nexport const listSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField\n )\n .description('Subtype for date-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 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 .trim()\n .required()\n .description('Brief description of the question for internal use')\n\nexport const pageHeadingAndGuidanceSchema = Joi.string()\n .trim()\n .optional()\n .description('Combined heading and guidance for the page')\n\nexport const pageHeadingSchema = Joi.string()\n .trim()\n .required()\n .description('Main heading displayed at the top of the page')\n\nexport const guidanceTextSchema = Joi.string()\n .trim()\n .description('Guidance text to assist users in completing the page')\n\nexport const 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(1)\n .description('The minimum number of repeater items')\n\nexport const maxItemsSchema = Joi.number()\n .empty('')\n .max(25)\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 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\ntype GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {\n args: Record<K, T>\n}\n\ninterface DSLSchema<TSchema = Record<string, unknown>[]>\n extends ArraySchema<TSchema> {\n rowSeparator: (rowSep: string | RegExp) => DSLSchema<TSchema>\n row: (rowSep: string | RegExp) => DSLSchema<TSchema>\n colSeparator: (colSep: string | RegExp) => DSLSchema<TSchema>\n col: (colSep: string | RegExp) => DSLSchema<TSchema>\n keys: (keys: string[]) => DSLSchema<TSchema>\n}\n\ninterface CustomValidator extends Joi.Root {\n dsv<TSchema>(): DSLSchema<TSchema>\n}\n\nexport const customValidator = Joi.extend((joi: Joi.Root) => {\n return {\n type: 'dsv',\n base: joi.array(),\n messages: {\n 'dsv.invalid': 'Invalid parse string'\n },\n coerce: {\n from: 'string',\n method(value: string, helpers) {\n try {\n // Only called when prefs.convert is true\n // Rules\n const rowSeparatorRule = helpers.schema.$_getRule('rowSeparator') as\n | undefined\n | GenericRuleOptions<'rowSeparator', string | RegExp>\n const colSeparatorRule = helpers.schema.$_getRule('colSeparator') as\n | undefined\n | GenericRuleOptions<'colSeparator', string | RegExp>\n const keysRule = helpers.schema.$_getRule('keys') as\n | undefined\n | GenericRuleOptions<'keys', string[]>\n\n // Rows\n const rowSeparator = rowSeparatorRule?.args.rowSeparator ?? /\\r?\\n/\n const rows = value\n .split(rowSeparator)\n .map((v) => v.trim())\n .filter(Boolean)\n\n // Columns\n const colSeparator = colSeparatorRule?.args.colSeparator ?? ','\n const keys = keysRule?.args.keys ?? ['key', 'value']\n\n const coercedValue = rows.map((row) => {\n return row\n .split(colSeparator)\n .reduce<Record<string, string>>((acc, col, idx) => {\n return {\n ...acc,\n [keys[idx]]: col.trim()\n }\n }, {})\n })\n return { value: coercedValue }\n } catch (_err) {\n // eslint-disable-next-line no-console\n console.error(_err)\n return { value, errors: [helpers.error('dsv.invalid')] }\n }\n }\n },\n rules: {\n rowSeparator: {\n convert: true,\n alias: 'row',\n method(rowSeparator: string) {\n return this.$_addRule({\n name: 'rowSeparator',\n args: { rowSeparator }\n })\n },\n args: [\n {\n name: 'rowSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n colSeparator: {\n convert: true,\n alias: 'col',\n method(colSeparator: string) {\n return this.$_addRule({\n name: 'colSeparator',\n args: { colSeparator }\n })\n },\n args: [\n {\n name: 'colSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n keys: {\n convert: true,\n method(keys: string[]) {\n return this.$_addRule({ name: 'keys', args: { keys } })\n },\n args: [\n {\n name: 'keys',\n ref: true,\n assert: (value) =>\n Array.isArray(value) && value.every((k) => typeof k === 'string'),\n message: 'must be an array of strings'\n }\n ]\n }\n }\n }\n}) as CustomValidator\n\nexport const autoCompleteOptionsSchema = customValidator\n .dsv<{ text: string; value: string }[]>()\n .row(/\\r?\\n/)\n .col(':')\n .keys(['text', 'value'])\n .items(\n customValidator.object({\n text: customValidator.string().min(1).disallow('').required(),\n value: customValidator\n .string()\n .default((parent: { text: string; value?: string }) => parent.text)\n .min(1)\n .disallow('')\n })\n )\n .min(1)\n .unique('text')\n .unique('value', { ignoreUndefined: true })\n .required()\n\nexport const questionDetailsFullSchema = {\n autoCompleteOptionsSchema,\n classesSchema,\n documentTypesSchema,\n enhancedActionSchema,\n exactFilesSchema,\n fileTypesSchema,\n hintTextSchema,\n imageTypesSchema,\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 precisionSchema,\n prefixSchema,\n questionOptionalSchema,\n questionSchema,\n questionTypeFullSchema,\n radioHintSchema,\n radioIdSchema,\n radioTextSchema,\n radioValueSchema,\n regexSchema,\n rowsSchema,\n shortDescriptionSchema,\n suffixSchema,\n tabularDataTypesSchema\n}\n\nexport const formEditorInputPageKeys = {\n pageType: pageTypeSchema,\n questionType: questionTypeSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPage` interface\n * @see {@link FormEditorInputPage}\n */\nexport const formEditorInputPageSchema = Joi.object<FormEditorInputPage>()\n .keys(formEditorInputPageKeys)\n .required()\n .description('Input schema for creating a new page in the form editor')\n\nexport const formEditorInputheckAnswersSettingsKeys = {\n declarationText: shortDescriptionSchema\n}\n\n/**\n * Joi schema for `FormEditorInputCheckAnswersSettings` interface\n * @see {@link FormEditorInputCheckAnswersSettings}\n */\nexport const formEditorInputCheckAnswersSettingSchema =\n Joi.object<FormEditorInputCheckAnswersSettings>()\n .keys(formEditorInputheckAnswersSettingsKeys)\n .required()\n .description('Configuration for the check-answers page')\n\nexport const formEditorInputQuestionKeys = {\n question: questionSchema,\n shortDescription: shortDescriptionSchema,\n hintText: hintTextSchema,\n questionOptional: questionOptionalSchema\n}\n\n/**\n * Joi schema for `FormEditorInputQuestion` interface\n * @see {@link FormEditorInputQuestion}\n */\nexport const formEditorInputQuestionSchema =\n Joi.object<FormEditorInputQuestion>()\n .keys(formEditorInputQuestionKeys)\n .required()\n .description(\n 'Input schema for creating or updating a question in the form editor'\n )\n\nexport const formEditorInputPageSettingsKeys = {\n pageHeadingAndGuidance: pageHeadingAndGuidanceSchema,\n pageHeading: pageHeadingSchema,\n guidanceText: guidanceTextSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPageSettings` interface\n * @see {@link FormEditorInputPageSettings}\n */\nexport const formEditorInputPageSettingsSchema =\n Joi.object<FormEditorInputPageSettings>()\n .keys(formEditorInputPageSettingsKeys)\n .required()\n .description('Settings for page content and display in the form editor')\n\nexport function govukFieldValueIsString(\n govukField: GovukField\n): govukField is GovukStringField {\n return [\n 'question',\n 'hintText',\n 'shortDescription',\n 'autoCompleteOptions'\n ].includes(`${govukField.name}`)\n}\n\nexport function govukFieldIsQuestionOptional(\n govukField: GovukField\n): govukField is GovukFieldQuestionOptional {\n if (govukField.name !== 'questionOptional') {\n return false\n }\n const checkedValue = govukField.items?.[0].checked\n return typeof checkedValue === 'boolean'\n}\n"],"mappings":"AAAA,OAAOA,GAAG,MAAiD,KAAK;AAEhE,SAASC,aAAa;AAWtB,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAMhC,OAAO,MAAMC,cAAc,GAAGH,GAAG,CAACI,MAAM,CAAC,CAAC,CACvCC,QAAQ,CAAC,CAAC,CACVC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAC7BC,WAAW,CAAC,wDAAwD,CAAC;AAExE,OAAO,MAAMC,kBAAkB,GAAGR,GAAG,CAACI,MAAM,CAAC,CAAC,CAC3CC,QAAQ,CAAC,CAAC,CACVC,KAAK,CACJJ,oBAAoB,CAACO,qBAAqB,EAC1CP,oBAAoB,CAACQ,YAAY,EACjCT,aAAa,CAACU,cAAc,EAC5BV,aAAa,CAACW,oBAAoB,EAClCX,aAAa,CAACY,eAAe,EAC7BZ,aAAa,CAACa,iBAAiB,EAC/BZ,oBAAoB,CAACa,YAAY,EACjCd,aAAa,CAACe,UAAU,EACxBf,aAAa,CAACgB,eAAe,EAC7BhB,aAAa,CAACiB,WAAW,EACzBjB,aAAa,CAACkB,iBAChB,CAAC,CACAZ,WAAW,CAAC,0DAA0D,CAAC;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sI,MAAM,CAA0B,CAAC,CAClC1B,IAAI,CAACwC,2BAA2B,CAAC,CACjC/I,QAAQ,CAAC,CAAC,CACVE,WAAW,CACV,qEACF,CAAC;AAEL,OAAO,MAAMmJ,+BAA+B,GAAG;EAC7CC,sBAAsB,EAAE9F,4BAA4B;EACpD+F,WAAW,EAAE9F,iBAAiB;EAC9B+F,YAAY,EAAE9F;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAM+F,iCAAiC,GAC5C9J,GAAG,CAACsI,MAAM,CAA8B,CAAC,CACtC1B,IAAI,CAAC8C,+BAA+B,CAAC,CACrCrJ,QAAQ,CAAC,CAAC,CACVE,WAAW,CAAC,0DAA0D,CAAC;AAE5E,OAAO,SAASwJ,uBAAuBA,CACrCC,UAAsB,EACU;EAChC,OAAO,CACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,qBAAqB,CACtB,CAACC,QAAQ,CAAC,GAAGD,UAAU,CAACrC,IAAI,EAAE,CAAC;AAClC;AAEA,OAAO,SAASuC,4BAA4BA,CAC1CF,UAAsB,EACoB;EAC1C,IAAIA,UAAU,CAACrC,IAAI,KAAK,kBAAkB,EAAE;IAC1C,OAAO,KAAK;EACd;EACA,MAAMwC,YAAY,GAAGH,UAAU,CAAC/G,KAAK,GAAG,CAAC,CAAC,CAACmH,OAAO;EAClD,OAAO,OAAOD,YAAY,KAAK,SAAS;AAC1C","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["Joi","ComponentType","QuestionTypeSubGroup","pageTypeSchema","string","required","valid","description","questionTypeSchema","WrittenAnswerSubGroup","DateSubGroup","UkAddressField","TelephoneNumberField","FileUploadField","EmailAddressField","ListSubGroup","YesNoField","CheckboxesField","RadiosField","AutocompleteField","questionTypeFullSchema","TextField","MultilineTextField","NumberField","DatePartsField","MonthYearField","writtenAnswerSubSchema","dateSubSchema","listSubSchema","nameSchema","trim","questionSchema","hintTextSchema","optional","allow","questionOptionalSchema","listForQuestionSchema","listItemCountSchema","number","listItemsDataSchema","exactFilesSchema","empty","integer","min","max","minFilesSchema","maxFilesSchema","fileTypesSchema","array","items","single","default","documentTypesSchema","imageTypesSchema","tabularDataTypesSchema","enhancedActionSchema","radioIdSchema","radioTextSchema","radioHintSchema","radioValueSchema","shortDescriptionSchema","pageHeadingAndGuidanceSchema","pageHeadingSchema","guidanceTextSchema","repeaterSchema","minItemsSchema","maxItemsSchema","questionSetNameSchema","needDeclarationSchema","declarationTextSchema","minSchema","maxSchema","minLengthSchema","maxLengthSchema","maxFutureSchema","maxPastSchema","precisionSchema","prefixSchema","regexSchema","rowsSchema","suffixSchema","classesSchema","jsEnabledSchema","customValidator","extend","joi","type","base","messages","coerce","from","method","value","helpers","rowSeparatorRule","schema","$_getRule","colSeparatorRule","keysRule","rowSeparator","args","rows","split","map","v","filter","Boolean","colSeparator","keys","coercedValue","row","reduce","acc","col","idx","_err","console","error","errors","rules","convert","alias","$_addRule","name","ref","assert","RegExp","message","Array","isArray","every","k","autoCompleteOptionsSchema","dsv","object","text","disallow","parent","unique","ignoreUndefined","questionDetailsFullSchema","formEditorInputPageKeys","pageType","questionType","formEditorInputPageSchema","formEditorInputheckAnswersSettingsKeys","declarationText","formEditorInputCheckAnswersSettingSchema","formEditorInputQuestionKeys","question","shortDescription","hintText","questionOptional","formEditorInputQuestionSchema","formEditorInputPageSettingsKeys","pageHeadingAndGuidance","pageHeading","guidanceText","formEditorInputPageSettingsSchema","govukFieldValueIsString","govukField","includes","govukFieldIsQuestionOptional","checkedValue","checked","allowedErrorTemplateFunctions"],"sources":["../../../../src/form/form-editor/index.ts"],"sourcesContent":["import Joi, { type ArraySchema, type GetRuleOptions } from 'joi'\n\nimport { ComponentType } from '~/src/components/enums.js'\nimport {\n type FormEditorInputCheckAnswersSettings,\n type FormEditorInputPage,\n type FormEditorInputPageSettings,\n type FormEditorInputQuestion,\n type GovukField,\n type GovukFieldQuestionOptional,\n type GovukStringField\n} from '~/src/form/form-editor/types.js'\n\nexport enum QuestionTypeSubGroup {\n WrittenAnswerSubGroup = 'writtenAnswerSub',\n DateSubGroup = 'dateSub',\n ListSubGroup = 'listSub'\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 ComponentType.UkAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.FileUploadField,\n ComponentType.EmailAddressField,\n QuestionTypeSubGroup.ListSubGroup,\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField\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.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField\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)\nexport const listSubSchema = Joi.string()\n .required()\n .valid(\n ComponentType.YesNoField,\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.AutocompleteField\n )\n .description('Subtype for date-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 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 .trim()\n .required()\n .description('Brief description of the question for internal use')\n\nexport const pageHeadingAndGuidanceSchema = Joi.string()\n .trim()\n .optional()\n .description('Combined heading and guidance for the page')\n\nexport const pageHeadingSchema = Joi.string()\n .trim()\n .required()\n .description('Main heading displayed at the top of the page')\n\nexport const guidanceTextSchema = Joi.string()\n .trim()\n .description('Guidance text to assist users in completing the page')\n\nexport const 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(1)\n .description('The minimum number of repeater items')\n\nexport const maxItemsSchema = Joi.number()\n .empty('')\n .max(25)\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 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\ntype GenericRuleOptions<K extends string, T> = Omit<GetRuleOptions, 'args'> & {\n args: Record<K, T>\n}\n\ninterface DSLSchema<TSchema = Record<string, unknown>[]>\n extends ArraySchema<TSchema> {\n rowSeparator: (rowSep: string | RegExp) => DSLSchema<TSchema>\n row: (rowSep: string | RegExp) => DSLSchema<TSchema>\n colSeparator: (colSep: string | RegExp) => DSLSchema<TSchema>\n col: (colSep: string | RegExp) => DSLSchema<TSchema>\n keys: (keys: string[]) => DSLSchema<TSchema>\n}\n\ninterface CustomValidator extends Joi.Root {\n dsv<TSchema>(): DSLSchema<TSchema>\n}\n\nexport const customValidator = Joi.extend((joi: Joi.Root) => {\n return {\n type: 'dsv',\n base: joi.array(),\n messages: {\n 'dsv.invalid': 'Invalid parse string'\n },\n coerce: {\n from: 'string',\n method(value: string, helpers) {\n try {\n // Only called when prefs.convert is true\n // Rules\n const rowSeparatorRule = helpers.schema.$_getRule('rowSeparator') as\n | undefined\n | GenericRuleOptions<'rowSeparator', string | RegExp>\n const colSeparatorRule = helpers.schema.$_getRule('colSeparator') as\n | undefined\n | GenericRuleOptions<'colSeparator', string | RegExp>\n const keysRule = helpers.schema.$_getRule('keys') as\n | undefined\n | GenericRuleOptions<'keys', string[]>\n\n // Rows\n const rowSeparator = rowSeparatorRule?.args.rowSeparator ?? /\\r?\\n/\n const rows = value\n .split(rowSeparator)\n .map((v) => v.trim())\n .filter(Boolean)\n\n // Columns\n const colSeparator = colSeparatorRule?.args.colSeparator ?? ','\n const keys = keysRule?.args.keys ?? ['key', 'value']\n\n const coercedValue = rows.map((row) => {\n return row\n .split(colSeparator)\n .reduce<Record<string, string>>((acc, col, idx) => {\n return {\n ...acc,\n [keys[idx]]: col.trim()\n }\n }, {})\n })\n return { value: coercedValue }\n } catch (_err) {\n // eslint-disable-next-line no-console\n console.error(_err)\n return { value, errors: [helpers.error('dsv.invalid')] }\n }\n }\n },\n rules: {\n rowSeparator: {\n convert: true,\n alias: 'row',\n method(rowSeparator: string) {\n return this.$_addRule({\n name: 'rowSeparator',\n args: { rowSeparator }\n })\n },\n args: [\n {\n name: 'rowSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n colSeparator: {\n convert: true,\n alias: 'col',\n method(colSeparator: string) {\n return this.$_addRule({\n name: 'colSeparator',\n args: { colSeparator }\n })\n },\n args: [\n {\n name: 'colSeparator',\n ref: true,\n assert: (value) =>\n typeof value === 'string' || value instanceof RegExp,\n message: 'must be a string or regex'\n }\n ]\n },\n keys: {\n convert: true,\n method(keys: string[]) {\n return this.$_addRule({ name: 'keys', args: { keys } })\n },\n args: [\n {\n name: 'keys',\n ref: true,\n assert: (value) =>\n Array.isArray(value) && value.every((k) => typeof k === 'string'),\n message: 'must be an array of strings'\n }\n ]\n }\n }\n }\n}) as CustomValidator\n\nexport const autoCompleteOptionsSchema = customValidator\n .dsv<{ text: string; value: string }[]>()\n .row(/\\r?\\n/)\n .col(':')\n .keys(['text', 'value'])\n .items(\n customValidator.object({\n text: customValidator.string().min(1).disallow('').required(),\n value: customValidator\n .string()\n .default((parent: { text: string; value?: string }) => parent.text)\n .min(1)\n .disallow('')\n })\n )\n .min(1)\n .unique('text')\n .unique('value', { ignoreUndefined: true })\n .required()\n\nexport const questionDetailsFullSchema = {\n autoCompleteOptionsSchema,\n classesSchema,\n documentTypesSchema,\n enhancedActionSchema,\n exactFilesSchema,\n fileTypesSchema,\n hintTextSchema,\n imageTypesSchema,\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 precisionSchema,\n prefixSchema,\n questionOptionalSchema,\n questionSchema,\n questionTypeFullSchema,\n radioHintSchema,\n radioIdSchema,\n radioTextSchema,\n radioValueSchema,\n regexSchema,\n rowsSchema,\n shortDescriptionSchema,\n suffixSchema,\n tabularDataTypesSchema\n}\n\nexport const formEditorInputPageKeys = {\n pageType: pageTypeSchema,\n questionType: questionTypeSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPage` interface\n * @see {@link FormEditorInputPage}\n */\nexport const formEditorInputPageSchema = Joi.object<FormEditorInputPage>()\n .keys(formEditorInputPageKeys)\n .required()\n .description('Input schema for creating a new page in the form editor')\n\nexport const formEditorInputheckAnswersSettingsKeys = {\n declarationText: shortDescriptionSchema\n}\n\n/**\n * Joi schema for `FormEditorInputCheckAnswersSettings` interface\n * @see {@link FormEditorInputCheckAnswersSettings}\n */\nexport const formEditorInputCheckAnswersSettingSchema =\n Joi.object<FormEditorInputCheckAnswersSettings>()\n .keys(formEditorInputheckAnswersSettingsKeys)\n .required()\n .description('Configuration for the check-answers page')\n\nexport const formEditorInputQuestionKeys = {\n question: questionSchema,\n shortDescription: shortDescriptionSchema,\n hintText: hintTextSchema,\n questionOptional: questionOptionalSchema\n}\n\n/**\n * Joi schema for `FormEditorInputQuestion` interface\n * @see {@link FormEditorInputQuestion}\n */\nexport const formEditorInputQuestionSchema =\n Joi.object<FormEditorInputQuestion>()\n .keys(formEditorInputQuestionKeys)\n .required()\n .description(\n 'Input schema for creating or updating a question in the form editor'\n )\n\nexport const formEditorInputPageSettingsKeys = {\n pageHeadingAndGuidance: pageHeadingAndGuidanceSchema,\n pageHeading: pageHeadingSchema,\n guidanceText: guidanceTextSchema\n}\n\n/**\n * Joi schema for `FormEditorInputPageSettings` interface\n * @see {@link FormEditorInputPageSettings}\n */\nexport const formEditorInputPageSettingsSchema =\n Joi.object<FormEditorInputPageSettings>()\n .keys(formEditorInputPageSettingsKeys)\n .required()\n .description('Settings for page content and display in the form editor')\n\nexport function govukFieldValueIsString(\n govukField: GovukField\n): govukField is GovukStringField {\n return [\n 'question',\n 'hintText',\n 'shortDescription',\n 'autoCompleteOptions'\n ].includes(`${govukField.name}`)\n}\n\nexport function govukFieldIsQuestionOptional(\n govukField: GovukField\n): govukField is GovukFieldQuestionOptional {\n if (govukField.name !== 'questionOptional') {\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']\n"],"mappings":"AAAA,OAAOA,GAAG,MAAiD,KAAK;AAEhE,SAASC,aAAa;AAWtB,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAMhC,OAAO,MAAMC,cAAc,GAAGH,GAAG,CAACI,MAAM,CAAC,CAAC,CACvCC,QAAQ,CAAC,CAAC,CACVC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAC7BC,WAAW,CAAC,wDAAwD,CAAC;AAExE,OAAO,MAAMC,kBAAkB,GAAGR,GAAG,CAACI,MAAM,CAAC,CAAC,CAC3CC,QAAQ,CAAC,CAAC,CACVC,KAAK,CACJJ,oBAAoB,CAACO,qBAAqB,EAC1CP,oBAAoB,CAACQ,YAAY,EACjCT,aAAa,CAACU,cAAc,EAC5BV,aAAa,CAACW,oBAAoB,EAClCX,aAAa,CAACY,e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