@defra/forms-model 3.0.458 → 3.0.459
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/conditions/enums.js +2 -0
- package/dist/module/conditions/enums.js.map +1 -1
- package/dist/module/conditions/types.js.map +1 -1
- package/dist/module/form/form-definition/index.js +61 -14
- package/dist/module/form/form-definition/index.js.map +1 -1
- package/dist/module/form/form-definition/types.js +0 -1
- package/dist/module/form/form-definition/types.js.map +1 -1
- package/dist/types/conditions/enums.d.ts +3 -1
- package/dist/types/conditions/enums.d.ts.map +1 -1
- package/dist/types/conditions/types.d.ts +20 -0
- package/dist/types/conditions/types.d.ts.map +1 -1
- package/dist/types/form/form-definition/index.d.ts +2 -1
- package/dist/types/form/form-definition/index.d.ts.map +1 -1
- package/dist/types/form/form-definition/types.d.ts +9 -3
- package/dist/types/form/form-definition/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/schemas/component-schema-v2.json +13 -5
- package/schemas/form-definition-schema.json +10 -10
- package/schemas/form-definition-v2-schema.json +147 -403
- package/schemas/list-schema-v2.json +4 -4
- package/schemas/list-schema.json +4 -4
- package/schemas/page-schema-v2.json +26 -10
- package/src/conditions/enums.ts +3 -1
- package/src/conditions/types.ts +28 -0
- package/src/form/form-definition/index.ts +170 -44
- package/src/form/form-definition/types.ts +13 -4
@@ -1,6 +1,8 @@
|
|
1
1
|
export let ConditionType = /*#__PURE__*/function (ConditionType) {
|
2
2
|
ConditionType["Value"] = "Value";
|
3
3
|
ConditionType["RelativeDate"] = "RelativeDate";
|
4
|
+
ConditionType["StringValue"] = "StringValue";
|
5
|
+
ConditionType["ListItemRef"] = "ListItemRef";
|
4
6
|
return ConditionType;
|
5
7
|
}({});
|
6
8
|
export let Coordinator = /*#__PURE__*/function (Coordinator) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.js","names":["ConditionType","Coordinator","Operator","OperatorName","DateDirections","DateUnits"],"sources":["../../../src/conditions/enums.ts"],"sourcesContent":["export enum ConditionType {\n Value = 'Value',\n RelativeDate = 'RelativeDate'\n}\n\nexport enum Coordinator {\n AND = 'and',\n OR = 'or'\n}\n\nexport enum Operator {\n Is = '==',\n IsNot = '!=',\n Contains = 'in',\n IsAtLeast = '>=',\n IsAtMost = '<=',\n IsLessThan = '<',\n IsMoreThan = '>'\n}\n\nexport enum OperatorName {\n Is = 'is',\n IsNot = 'is not',\n IsLongerThan = 'is longer than',\n IsShorterThan = 'is shorter than',\n HasLength = 'has length',\n Contains = 'contains',\n DoesNotContain = 'does not contain',\n IsAtLeast = 'is at least',\n IsAtMost = 'is at most',\n IsLessThan = 'is less than',\n IsMoreThan = 'is more than',\n IsBefore = 'is before',\n IsAfter = 'is after'\n}\n\nexport enum DateDirections {\n FUTURE = 'in the future',\n PAST = 'in the past'\n}\n\nexport enum DateUnits {\n YEARS = 'years',\n MONTHS = 'months',\n DAYS = 'days'\n}\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;
|
1
|
+
{"version":3,"file":"enums.js","names":["ConditionType","Coordinator","Operator","OperatorName","DateDirections","DateUnits"],"sources":["../../../src/conditions/enums.ts"],"sourcesContent":["export enum ConditionType {\n Value = 'Value',\n RelativeDate = 'RelativeDate',\n StringValue = 'StringValue',\n ListItemRef = 'ListItemRef'\n}\n\nexport enum Coordinator {\n AND = 'and',\n OR = 'or'\n}\n\nexport enum Operator {\n Is = '==',\n IsNot = '!=',\n Contains = 'in',\n IsAtLeast = '>=',\n IsAtMost = '<=',\n IsLessThan = '<',\n IsMoreThan = '>'\n}\n\nexport enum OperatorName {\n Is = 'is',\n IsNot = 'is not',\n IsLongerThan = 'is longer than',\n IsShorterThan = 'is shorter than',\n HasLength = 'has length',\n Contains = 'contains',\n DoesNotContain = 'does not contain',\n IsAtLeast = 'is at least',\n IsAtMost = 'is at most',\n IsLessThan = 'is less than',\n IsMoreThan = 'is more than',\n IsBefore = 'is before',\n IsAfter = 'is after'\n}\n\nexport enum DateDirections {\n FUTURE = 'in the future',\n PAST = 'in the past'\n}\n\nexport enum DateUnits {\n YEARS = 'years',\n MONTHS = 'months',\n DAYS = 'days'\n}\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAOzB,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAKvB,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAUpB,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAgBxB,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAK1B,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA","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 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 ConditionRefData {\n conditionName: string\n conditionDisplayName: string\n coordinator?: Coordinator\n}\n\nexport interface ConditionGroupData {\n conditions: (ConditionData | ConditionRefData | ConditionGroupData)[]\n}\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 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,6 +1,25 @@
|
|
1
1
|
import Joi from 'joi';
|
2
2
|
import { v4 as uuidV4 } from 'uuid';
|
3
3
|
import { ComponentType } from "../../components/enums.js";
|
4
|
+
import { hasComponents } from "../../pages/helpers.js";
|
5
|
+
const idSchemaOptional = Joi.string().uuid();
|
6
|
+
const idSchema = idSchemaOptional.default(() => uuidV4());
|
7
|
+
const conditionIdRef = Joi.ref('/conditions', {
|
8
|
+
in: true,
|
9
|
+
adjust: conditions => conditions.map(condition => condition.name)
|
10
|
+
});
|
11
|
+
const componentIdRefSchema = Joi.ref('/pages', {
|
12
|
+
in: true,
|
13
|
+
adjust: pages => pages.flatMap(page => hasComponents(page) ? page.components.filter(component => component.id).map(component => component.id) : [])
|
14
|
+
});
|
15
|
+
const listIdRef = Joi.ref('/lists', {
|
16
|
+
in: true,
|
17
|
+
adjust: lists => lists.filter(list => list.id).map(list => list.id)
|
18
|
+
});
|
19
|
+
const listItemIdRef = Joi.ref('/lists', {
|
20
|
+
in: true,
|
21
|
+
adjust: lists => lists.flatMap(list => list.items.filter(item => item.id).map(item => item.id))
|
22
|
+
});
|
4
23
|
const sectionsSchema = Joi.object().description('A form section grouping related pages together').keys({
|
5
24
|
name: Joi.string().trim().required().description('Unique identifier for the section, used in code and page references'),
|
6
25
|
title: Joi.string().trim().required().description('Human-readable section title displayed to users'),
|
@@ -16,10 +35,19 @@ const conditionValueSchema = Joi.object().description('Value specification for a
|
|
16
35
|
value: Joi.string().trim().required().description('The actual value to compare against'),
|
17
36
|
display: Joi.string().trim().required().description('Human-readable version of the value for display purposes')
|
18
37
|
});
|
19
|
-
const
|
20
|
-
type: Joi.string().trim().required().description('
|
38
|
+
const condition2StringValueDataSchema = Joi.object().description('String value specification for a condition').keys({
|
39
|
+
type: Joi.string().trim().valid('StringValue').required().description('Type of the condition value, should be "StringValue"'),
|
40
|
+
value: Joi.string().trim().required().description('The actual value to compare against')
|
41
|
+
});
|
42
|
+
const condition2ListItemRefDataSchema = Joi.object().description('List item ref specification for a condition').keys({
|
43
|
+
type: Joi.string().trim().valid('ListItemRef').required().description('Type of the condition value, should be "ListItemRef"'),
|
44
|
+
listId: Joi.string().valid(listIdRef).trim().required().description('The id of the list'),
|
45
|
+
itemId: Joi.string().trim().valid(listItemIdRef).required().description('The id of the list item')
|
46
|
+
});
|
47
|
+
const relativeDateValueDataSchema = Joi.object().description('Relative date specification for date-based conditions').keys({
|
48
|
+
type: Joi.string().trim().valid('RelativeDate').required().description('Type of the condition value, should be "RelativeDate"'),
|
21
49
|
period: Joi.string().trim().required().description('Numeric amount of the time period, as a string'),
|
22
|
-
unit: Joi.string().trim().required().description('Time unit (e.g
|
50
|
+
unit: Joi.string().trim().required().description('Time unit (e.g. days, weeks, months, years)'),
|
23
51
|
direction: Joi.string().trim().required().description('Temporal direction, either "past" or "future"')
|
24
52
|
});
|
25
53
|
const conditionRefSchema = Joi.object().description('Reference to a named condition defined elsewhere').keys({
|
@@ -27,12 +55,22 @@ const conditionRefSchema = Joi.object().description('Reference to a named condit
|
|
27
55
|
conditionDisplayName: Joi.string().trim().required().description('Human-readable name of the condition for display purposes'),
|
28
56
|
coordinator: Joi.string().trim().optional().description('Logical operator connecting this condition with others (AND, OR)')
|
29
57
|
});
|
58
|
+
const condition2RefDataSchema = Joi.object().description('Reference to a named condition defined elsewhere').keys({
|
59
|
+
id: idSchema.description('Unique identifier for the referenced condition'),
|
60
|
+
conditionId: Joi.string().trim().required().valid(conditionIdRef).description('Name of the referenced condition')
|
61
|
+
});
|
30
62
|
const conditionSchema = Joi.object().description('Condition definition specifying a logical comparison').keys({
|
31
63
|
field: conditionFieldSchema.description('The form field being evaluated in this condition'),
|
32
64
|
operator: Joi.string().trim().required().description('Comparison operator (equals, greaterThan, contains, etc.)'),
|
33
|
-
value: Joi.alternatives().try(conditionValueSchema,
|
65
|
+
value: Joi.alternatives().try(conditionValueSchema, relativeDateValueDataSchema).description('Value to compare the field against, either fixed or relative date'),
|
34
66
|
coordinator: Joi.string().trim().optional().description('Logical operator connecting this condition with others (AND, OR)')
|
35
67
|
});
|
68
|
+
const condition2DataSchema = Joi.object().description('Condition definition').keys({
|
69
|
+
id: idSchema.description('Unique identifier used to reference this condition'),
|
70
|
+
componentId: Joi.string().trim().valid(componentIdRefSchema).required().description('Reference to the component id being evaluated in this condition'),
|
71
|
+
operator: Joi.string().trim().required().description('Comparison operator (equals, greaterThan, contains, etc.)'),
|
72
|
+
value: Joi.alternatives().try(condition2StringValueDataSchema, condition2ListItemRefDataSchema, relativeDateValueDataSchema).description('Value to compare the field against, either fixed or relative date')
|
73
|
+
});
|
36
74
|
const conditionGroupSchema = Joi.object().description('Group of conditions combined with logical operators').keys({
|
37
75
|
conditions: Joi.array().items(Joi.alternatives().try(conditionSchema, conditionRefSchema, Joi.link('#conditionGroupSchema'))).description('Array of conditions or condition references in this group')
|
38
76
|
}).id('conditionGroupSchema');
|
@@ -45,8 +83,14 @@ const conditionWrapperSchema = Joi.object().description('Container for a named c
|
|
45
83
|
displayName: Joi.string().trim().description('Human-readable name for display in the UI'),
|
46
84
|
value: conditionsModelSchema.required().description('The complete condition definition')
|
47
85
|
});
|
86
|
+
export const conditionWrapperSchemaV2 = Joi.object().description('Container for a named condition with its definition').keys({
|
87
|
+
name: Joi.string().trim().description('Unique identifier for the condition'),
|
88
|
+
displayName: Joi.string().trim().description('Human-readable name for display in the UI'),
|
89
|
+
coordinator: Joi.string().optional().description('Logical operator connecting this condition with others (AND, OR)'),
|
90
|
+
conditions: Joi.array().items(Joi.alternatives().try(condition2DataSchema, condition2RefDataSchema)).description('Array of conditions or condition references')
|
91
|
+
}).description('Condition schema for V2 forms');
|
48
92
|
export const componentSchema = Joi.object().description('Form component definition specifying UI element behavior').keys({
|
49
|
-
id:
|
93
|
+
id: idSchemaOptional.description('Unique identifier for the component'),
|
50
94
|
type: Joi.string().trim().required().description('Component type (TextField, RadioButtons, DateField, etc.)'),
|
51
95
|
shortDescription: Joi.string().trim().optional().description('Brief description of the component purpose'),
|
52
96
|
name: Joi.when('type', {
|
@@ -76,7 +120,8 @@ export const componentSchema = Joi.object().description('Form component definiti
|
|
76
120
|
list: Joi.string().trim().optional().description('Reference to a predefined list of options for select components')
|
77
121
|
}).unknown(true);
|
78
122
|
export const componentSchemaV2 = componentSchema.keys({
|
79
|
-
id:
|
123
|
+
id: idSchema.description('Unique identifier for the component'),
|
124
|
+
list: Joi.string().valid(listIdRef).optional().description('List id reference to a predefined list of options for select components')
|
80
125
|
}).description('Component schema for V2 forms');
|
81
126
|
const nextSchema = Joi.object().description('Navigation link defining where to go after completing a page').keys({
|
82
127
|
path: Joi.string().trim().required().description('The target page path to navigate to'),
|
@@ -114,7 +159,7 @@ const eventsSchema = Joi.object().description('Collection of event handlers for
|
|
114
159
|
* It should not be configured via the designer.
|
115
160
|
*/
|
116
161
|
export const pageSchema = Joi.object().description('Form page definition specifying content and behavior').keys({
|
117
|
-
id:
|
162
|
+
id: idSchemaOptional.description('Unique identifier for the page'),
|
118
163
|
path: Joi.string().trim().required().disallow('/status').description('URL path for this page, must not be the reserved "/status" path'),
|
119
164
|
title: Joi.string().trim().required().description('Page title displayed at the top of the page'),
|
120
165
|
section: Joi.string().trim().description('Section this page belongs to'),
|
@@ -135,12 +180,13 @@ export const pageSchema = Joi.object().description('Form page definition specify
|
|
135
180
|
* V2 engine schema - used with new editor
|
136
181
|
*/
|
137
182
|
export const pageSchemaV2 = pageSchema.append({
|
138
|
-
id:
|
183
|
+
id: idSchema.description('Unique identifier for the page'),
|
139
184
|
title: Joi.string().trim().allow('').required().description('Page title displayed at the top of the page (with support for empty titles in V2)'),
|
140
|
-
components: Joi.array().items(componentSchemaV2).unique('name').unique('id').description('Components schema for V2 forms')
|
185
|
+
components: Joi.array().items(componentSchemaV2).unique('name').unique('id').description('Components schema for V2 forms'),
|
186
|
+
condition: Joi.string().trim().valid(conditionIdRef).optional().description('Optional condition that determines if this page is shown')
|
141
187
|
}).description('Page schema for V2 forms');
|
142
188
|
const baseListItemSchema = Joi.object().description('Base schema for list items with common properties').keys({
|
143
|
-
id:
|
189
|
+
id: idSchema.description('Unique identifier for the list item'),
|
144
190
|
text: Joi.string().trim().allow('').description('Display text shown to the user'),
|
145
191
|
description: Joi.string().trim().allow('').optional().description('Optional additional descriptive text for the item'),
|
146
192
|
conditional: Joi.object().description('Optional components to show when this item is selected').keys({
|
@@ -148,7 +194,7 @@ const baseListItemSchema = Joi.object().description('Base schema for list items
|
|
148
194
|
}).optional(),
|
149
195
|
condition: Joi.string().trim().allow('').optional().description('Condition that determines if this item is shown'),
|
150
196
|
hint: Joi.object().optional().keys({
|
151
|
-
id:
|
197
|
+
id: idSchema,
|
152
198
|
text: Joi.string().trim()
|
153
199
|
}).description('Optional hint text to be shown on list item')
|
154
200
|
});
|
@@ -159,7 +205,7 @@ const numberListItemSchema = baseListItemSchema.append({
|
|
159
205
|
value: Joi.number().required().description('Numeric value stored when this item is selected')
|
160
206
|
}).description('List item with numeric value');
|
161
207
|
export const listSchema = Joi.object().description('Reusable list of options for select components').keys({
|
162
|
-
id:
|
208
|
+
id: idSchemaOptional.description('Unique identifier for the list'),
|
163
209
|
name: Joi.string().trim().required().description('Name used to reference this list from components'),
|
164
210
|
title: Joi.string().trim().required().description('Human-readable title for the list'),
|
165
211
|
type: Joi.string().trim().required().valid('string', 'number').description('Data type for list values (string or number)'),
|
@@ -176,7 +222,7 @@ export const listSchema = Joi.object().description('Reusable list of options for
|
|
176
222
|
* V2 Joi schema for Lists
|
177
223
|
*/
|
178
224
|
export const listSchemaV2 = listSchema.keys({
|
179
|
-
id:
|
225
|
+
id: idSchema.description('Unique identifier for the list')
|
180
226
|
}).description('List schema for V2 forms');
|
181
227
|
const feedbackSchema = Joi.object().description('Feedback configuration for the form').keys({
|
182
228
|
feedbackForm: Joi.boolean().default(false).description('Whether to show the built-in feedback form'),
|
@@ -226,7 +272,8 @@ export const formDefinitionSchema = Joi.object().description('Complete form defi
|
|
226
272
|
});
|
227
273
|
export const formDefinitionV2Schema = formDefinitionSchema.keys({
|
228
274
|
pages: Joi.array().items(pageSchemaV2).required().unique('path').unique('id').description('Pages schema for V2 forms'),
|
229
|
-
lists: Joi.array().items(listSchemaV2).unique('name').unique('title').unique('id').description('Lists schema for V2 forms')
|
275
|
+
lists: Joi.array().items(listSchemaV2).unique('name').unique('title').unique('id').description('Lists schema for V2 forms'),
|
276
|
+
conditions: Joi.array().items(conditionWrapperSchemaV2).unique('name').unique('displayName').description('Named conditions used for form logic')
|
230
277
|
}).description('Form definition schema for V2');
|
231
278
|
|
232
279
|
// Maintain compatibility with legacy named export
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","v4","uuidV4","ComponentType","sectionsSchema","object","description","keys","name","string","trim","required","title","hideTitle","boolean","optional","default","conditionFieldSchema","type","display","conditionValueSchema","value","relativeDateValueSchema","period","unit","direction","conditionRefSchema","conditionName","conditionDisplayName","coordinator","conditionSchema","field","operator","alternatives","try","conditionGroupSchema","conditions","array","items","link","id","conditionsModelSchema","conditionWrapperSchema","displayName","componentSchema","uuid","shortDescription","when","is","valid","Details","Html","InsetText","Markdown","then","pattern","otherwise","allow","hint","options","rows","number","empty","maxWords","maxDaysInPast","maxDaysInFuture","customValidationMessage","customValidationMessages","unknown","schema","min","max","length","list","componentSchemaV2","nextSchema","path","condition","redirect","repeatOptions","repeatSchema","pageRepeatSchema","eventSchema","method","url","uri","scheme","eventsSchema","onLoad","onSave","pageSchema","disallow","section","controller","components","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","pages","sections","lists","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 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 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'\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 relativeDateValueSchema = Joi.object<RelativeDateValueData>()\n .description('Relative date specification for date-based conditions')\n .keys({\n type: Joi.string()\n .trim()\n .required()\n .description('Data type identifier, 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 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, relativeDateValueSchema)\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 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 componentSchema = Joi.object<ComponentDef>()\n .description('Form component definition specifying UI element behavior')\n .keys({\n id: Joi.string()\n .trim()\n .uuid()\n .optional()\n .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: Joi.string()\n .trim()\n .uuid()\n .default(() => uuidV4())\n .description('Unique identifier for the component')\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: Joi.string()\n .trim()\n .uuid()\n .optional()\n .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: Joi.string()\n .trim()\n .uuid()\n .default(() => uuidV4())\n .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 })\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: Joi.string()\n .trim()\n .uuid()\n .default(() => uuidV4()),\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: Joi.string()\n .trim()\n .uuid()\n .default(() => uuidV4()),\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: Joi.string()\n .trim()\n .uuid()\n .optional()\n .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: Joi.string()\n .trim()\n .uuid()\n .default(() => uuidV4())\n .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 })\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;AA4BtB,MAAMC,cAAc,GAAGJ,GAAG,CAACK,MAAM,CAAU,CAAC,CACzCC,WAAW,CAAC,gDAAgD,CAAC,CAC7DC,IAAI,CAAC;EACJC,IAAI,EAAER,GAAG,CAACS,MAAM,CAAC,CAAC,CACfC,IAAI,CAAC,CAAC,CACNC,QAAQ,CAAC,CAAC,CACVL,WAAW,CACV,qEACF,CAAC;EACHM,KAAK,EAAEZ,GAAG,CAACS,MAAM,CAAC,CAAC,CAChBC,IAAI,CAAC,CAAC,CACNC,QAAQ,CAAC,CAAC,CACVL,WAAW,CAAC,iDAAiD,CAAC;EACjEO,SAAS,EAAEb,GAAG,CAACc,OAAO,CAAC,CAAC,CACrBC,QAAQ,CAAC,CAAC,CACVC,OAAO,CAAC,KAAK,CAAC,CACdV,WAAW,CACV,8DACF;AACJ,CAAC,CAAC;AAEJ,MAAMW,oBAAoB,GAAGjB,GAAG,CAACK,MAAM,CAAqB,CAAC,CAC1DC,WAAW,CAAC,qCAAqC,CAAC,CAClDC,IAAI,CAAC;EACJC,IAAI,EAAER,GAAG,CAACS,MAAM,CAAC,CAAC,CACfC,IAAI,CAAC,CAAC,CACNC,QAAQ,CAAC,CAAC,CACVL,WAAW,CAAC,6CAA6C,CAAC;EAC7DY,IAAI,EAAElB,GAAG,CAACS,MAAM,CAAC,CAAC,CACfC,IAAI,CAAC,CAAC,CACNC,QAAQ,CAAC,CAAC,CACVL,WAAW,CAAC,qDAAqD,CAAC;EACrEa,OAAO,EAAEnB,GAAG,CAACS,MA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EAC5D8H,WAAW,EAAEpI,GAAG,CAACiG,GAAG,CAAC,CAAC,CACnBC,KAAK,CAAC,CAAC,CACP5F,WAAW,CAAC,iCAAiC,CAAC;EACjD+H,WAAW,EAAEhB,iBAAiB,CAC3BtG,QAAQ,CAAC,CAAC,CACVT,WAAW,CAAC,4BAA4B,CAAC;EAC5CgI,WAAW,EAAEtI,GAAG,CAACS,MAAM,CAAC,CAAC,CACtBC,IAAI,CAAC,CAAC,CACNyG,KAAK,CAAC;IAAEC,IAAI,EAAE;MAAE3D,KAAK,EAAE,CAAC,IAAI;IAAE;EAAE,CAAC,CAAC,CAClC1C,QAAQ,CAAC,CAAC,CACVT,WAAW,CAAC,+CAA+C,CAAC;EAC/DiI,MAAM,EAAEhB,YAAY,CACjBxG,QAAQ,CAAC,CAAC,CACVT,WAAW,CAAC,4CAA4C;AAC7D,CAAC,CAAC;AAEJ,OAAO,MAAMkI,sBAAsB,GAAGd,oBAAoB,CACvDnH,IAAI,CAAC;EACJuH,KAAK,EAAE9H,GAAG,CAACqC,KAAK,CAAO,CAAC,CACrBC,KAAK,CAACgE,YAAY,CAAC,CACnB3F,QAAQ,CAAC,CAAC,CACVoF,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,IAAI,CAAC,CACZzF,WAAW,CAAC,2BAA2B,CAAC;EAC3C0H,KAAK,EAAEhI,GAAG,CAACqC,KAAK,CAAO,CAAC,CACrBC,KAAK,CAACyE,YAAY,CAAC,CACnBhB,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,OAAO,CAAC,CACfA,MAAM,CAAC,IAAI,CAAC,CACZzF,WAAW,CAAC,2BAA2B;AAC5C,CAAC,CAAC,CACDA,WAAW,CAAC,+BAA+B,CAAC;;AAE/C;AACA;AACA,OAAO,MAAMmI,MAAM,GAAGf,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 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;EAC7CC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGM,KAAa,IACpBA,KAAK,CAACC,OAAO,CAAEC,IAAI,IACjBjB,aAAa,CAACiB,IAAI,CAAC,GACfA,IAAI,CAACC,UAAU,CACZC,MAAM,CAAEC,SAAS,IAAKA,SAAS,CAACC,EAAE,CAAC,CACnCV,GAAG,CAAES,SAAS,IAAKA,SAAS,CAACC,EAAE,CAAC,GACnC,EACN;AACJ,CAAC,CAAC;AAEF,MAAMC,SAAS,GAAG1B,GAAG,CAACW,GAAG,CAAC,QAAQ,EAAE;EAClCC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGc,KAAa,IACpBA,KAAK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xC,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
|
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 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/conditions/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,YAAY,iBAAiB;
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/conditions/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;CAC5B;AAED,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,EAAE,OAAO;CACV;AAED,oBAAY,QAAQ;IAClB,EAAE,OAAO;IACT,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,UAAU,MAAM;IAChB,UAAU,MAAM;CACjB;AAED,oBAAY,YAAY;IACtB,EAAE,OAAO;IACT,KAAK,WAAW;IAChB,YAAY,mBAAmB;IAC/B,aAAa,oBAAoB;IACjC,SAAS,eAAe;IACxB,QAAQ,aAAa;IACrB,cAAc,qBAAqB;IACnC,SAAS,gBAAgB;IACzB,QAAQ,eAAe;IACvB,UAAU,iBAAiB;IAC3B,UAAU,iBAAiB;IAC3B,QAAQ,cAAc;IACtB,OAAO,aAAa;CACrB;AAED,oBAAY,cAAc;IACxB,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;CACrB;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
|
@@ -6,6 +6,15 @@ export interface ConditionValueData {
|
|
6
6
|
value: string;
|
7
7
|
display: string;
|
8
8
|
}
|
9
|
+
export interface Condition2StringValueData {
|
10
|
+
type: ConditionType.StringValue;
|
11
|
+
value: string;
|
12
|
+
}
|
13
|
+
export interface Condition2ListItemRefValueData {
|
14
|
+
type: ConditionType.ListItemRef;
|
15
|
+
listId: string;
|
16
|
+
itemId: string;
|
17
|
+
}
|
9
18
|
export interface RelativeDateValueData {
|
10
19
|
type: ConditionType.RelativeDate;
|
11
20
|
period: string;
|
@@ -23,14 +32,25 @@ export interface ConditionData {
|
|
23
32
|
value: ConditionValueData | RelativeDateValueData;
|
24
33
|
coordinator?: Coordinator;
|
25
34
|
}
|
35
|
+
export interface Condition2Data {
|
36
|
+
id: string;
|
37
|
+
componentId: string;
|
38
|
+
operator: OperatorName;
|
39
|
+
value: Condition2ListItemRefValueData | Condition2StringValueData | RelativeDateValueData;
|
40
|
+
}
|
26
41
|
export interface ConditionRefData {
|
27
42
|
conditionName: string;
|
28
43
|
conditionDisplayName: string;
|
29
44
|
coordinator?: Coordinator;
|
30
45
|
}
|
46
|
+
export interface Condition2RefData {
|
47
|
+
id: string;
|
48
|
+
conditionId: string;
|
49
|
+
}
|
31
50
|
export interface ConditionGroupData {
|
32
51
|
conditions: (ConditionData | ConditionRefData | ConditionGroupData)[];
|
33
52
|
}
|
53
|
+
export type Condition2GroupData = (Condition2Data | Condition2RefData)[];
|
34
54
|
export interface ConditionsModelData extends ConditionGroupData {
|
35
55
|
name: string;
|
36
56
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conditions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAA;AAElC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,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CAAA;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,CAAC,aAAa,GAAG,gBAAgB,GAAG,kBAAkB,CAAC,EAAE,CAAA;CACtE;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,cAAc,GAAG,iBAAiB,CAAC,EAAE,CAAA;AAExE,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,CACV,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,EAC9C,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC,KAC/B,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAA"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Joi from 'joi';
|
2
2
|
import { type ComponentDef } from '../../components/types.js';
|
3
|
-
import { type FormDefinition, type List, type Page, type Repeat } from '../../form/form-definition/types.js';
|
3
|
+
import { type Condition2Wrapper, type FormDefinition, type List, type Page, type Repeat } from '../../form/form-definition/types.js';
|
4
|
+
export declare const conditionWrapperSchemaV2: Joi.ObjectSchema<Condition2Wrapper>;
|
4
5
|
export declare const componentSchema: Joi.ObjectSchema<ComponentDef>;
|
5
6
|
export declare const componentSchemaV2: Joi.ObjectSchema<ComponentDef>;
|
6
7
|
export declare const pageRepeatSchema: Joi.ObjectSchema<Repeat>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAA8B,MAAM,KAAK,CAAA;AAIhD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAA8B,MAAM,KAAK,CAAA;AAIhD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAe7D,OAAO,EACL,KAAK,iBAAiB,EAKtB,KAAK,cAAc,EAGnB,KAAK,IAAI,EACT,KAAK,IAAI,EAET,KAAK,MAAM,EAIZ,MAAM,qCAAqC,CAAA;AA0R5C,eAAO,MAAM,wBAAwB,qCAoBU,CAAA;AAE/C,eAAO,MAAM,eAAe,gCAkGZ,CAAA;AAEhB,eAAO,MAAM,iBAAiB,gCAUiB,CAAA;AAoD/C,eAAO,MAAM,gBAAgB,0BASzB,CAAA;AAyCJ;;;GAGG;AACH,eAAO,MAAM,UAAU,wBAmDnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,wBAqBiB,CAAA;AAwD1C,eAAO,MAAM,UAAU,wBAkCnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,wBAIiB,CAAA;AAsD1C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,kCAiE7B,CAAA;AAEJ,eAAO,MAAM,sBAAsB,kCAoBY,CAAA;AAI/C,eAAO,MAAM,MAAM,kCAAuB,CAAA"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type ComponentDef } from '../../components/types.js';
|
2
|
-
import { type
|
2
|
+
import { type Coordinator } from '../../conditions/enums.js';
|
3
|
+
import { type Condition2GroupData, type ConditionsModelData } from '../../conditions/types.js';
|
3
4
|
import { type ControllerPath, type ControllerType } from '../../pages/enums.js';
|
4
5
|
export declare enum Engine {
|
5
6
|
V1 = "V1",
|
@@ -128,14 +129,19 @@ export interface ConditionWrapper {
|
|
128
129
|
displayName: string;
|
129
130
|
value: ConditionsModelData;
|
130
131
|
}
|
132
|
+
export interface Condition2Wrapper {
|
133
|
+
name: string;
|
134
|
+
displayName: string;
|
135
|
+
coordinator?: Coordinator;
|
136
|
+
conditions: Condition2GroupData;
|
137
|
+
}
|
131
138
|
/**
|
132
139
|
* Interface for `formDefinitionSchema` Joi schema
|
133
|
-
* @see {@link formDefinitionSchema}
|
134
140
|
*/
|
135
141
|
export interface FormDefinition {
|
136
142
|
engine?: Engine;
|
137
143
|
pages: Page[];
|
138
|
-
conditions: ConditionWrapper[];
|
144
|
+
conditions: (ConditionWrapper | Condition2Wrapper)[];
|
139
145
|
lists: List[];
|
140
146
|
sections: Section[];
|
141
147
|
startPage?: string;
|