@defra/forms-model 3.0.487 → 3.0.488
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/form/form-definition/index.js +16 -4
- package/dist/module/form/form-definition/index.js.map +1 -1
- package/dist/types/form/form-definition/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/schemas/form-definition-schema.json +12 -0
- package/schemas/form-definition-v2-schema.json +19 -19
- package/schemas/list-schema-v2.json +19 -19
- package/src/form/form-definition/index.ts +34 -4
@@ -56,6 +56,7 @@ const relativeDateValueDataSchemaV2 = Joi.object().description('Relative date sp
|
|
56
56
|
direction: Joi.string().trim().required().description('Temporal direction, either "past" or "future"')
|
57
57
|
});
|
58
58
|
const relativeDateValueDataSchema = Joi.object().description('Relative date specification for date-based conditions').keys({
|
59
|
+
type: Joi.string().trim().valid('RelativeDate').required().description('Type of the condition value, should be "RelativeDate"'),
|
59
60
|
period: Joi.string().trim().required().description('Numeric amount of the time period, as a string'),
|
60
61
|
unit: Joi.string().trim().required().description('Time unit (e.g. days, weeks, months, years)'),
|
61
62
|
direction: Joi.string().trim().required().description('Temporal direction, either "past" or "future"')
|
@@ -262,7 +263,7 @@ export const pagePayloadSchemaV2 = pageSchemaV2.append({
|
|
262
263
|
})
|
263
264
|
}).description('Payload Page schema for V2 forms');
|
264
265
|
const baseListItemSchema = Joi.object().description('Base schema for list items with common properties').keys({
|
265
|
-
id:
|
266
|
+
id: idSchemaOptional.description('Unique identifier for the list item'),
|
266
267
|
text: Joi.string().trim().allow('').description('Display text shown to the user'),
|
267
268
|
description: Joi.string().trim().allow('').optional().description('Optional additional descriptive text for the item'),
|
268
269
|
conditional: Joi.object().description('Optional components to show when this item is selected').keys({
|
@@ -280,6 +281,12 @@ const stringListItemSchema = baseListItemSchema.append({
|
|
280
281
|
const numberListItemSchema = baseListItemSchema.append({
|
281
282
|
value: Joi.number().required().description('Numeric value stored when this item is selected')
|
282
283
|
}).description('List item with numeric value');
|
284
|
+
const stringListItemSchemaV2 = stringListItemSchema.append({
|
285
|
+
id: idSchema.description('Unique identifier for the list item')
|
286
|
+
}).description('List item with string value');
|
287
|
+
const numberListItemSchemaV2 = numberListItemSchema.append({
|
288
|
+
id: idSchema.description('Unique identifier for the list item')
|
289
|
+
}).description('List item with string value');
|
283
290
|
export const listSchema = Joi.object().description('Reusable list of options for select components').keys({
|
284
291
|
id: idSchemaOptional.description('Unique identifier for the list'),
|
285
292
|
name: Joi.string().trim().required().description('Name used to reference this list from components'),
|
@@ -287,10 +294,10 @@ export const listSchema = Joi.object().description('Reusable list of options for
|
|
287
294
|
type: Joi.string().trim().required().valid('string', 'number').description('Data type for list values (string or number)'),
|
288
295
|
items: Joi.when('type', {
|
289
296
|
is: 'string',
|
290
|
-
then: Joi.array().items(stringListItemSchema).unique('
|
297
|
+
then: Joi.array().items(stringListItemSchema).unique('text').unique('value').messages({
|
291
298
|
'array.unique': 'Each item must have a unique identifier - enter a different identifier for this item.'
|
292
299
|
}).description('Array of items with string values'),
|
293
|
-
otherwise: Joi.array().items(numberListItemSchema).unique('
|
300
|
+
otherwise: Joi.array().items(numberListItemSchema).unique('text').unique('value').description('Array of items with numeric values')
|
294
301
|
})
|
295
302
|
});
|
296
303
|
|
@@ -298,7 +305,12 @@ export const listSchema = Joi.object().description('Reusable list of options for
|
|
298
305
|
* V2 Joi schema for Lists
|
299
306
|
*/
|
300
307
|
export const listSchemaV2 = listSchema.keys({
|
301
|
-
id: idSchema.description('Unique identifier for the list')
|
308
|
+
id: idSchema.description('Unique identifier for the list'),
|
309
|
+
items: Joi.when('type', {
|
310
|
+
is: 'string',
|
311
|
+
then: Joi.array().items(stringListItemSchemaV2).unique('id').unique('text').unique('value').description('Array of items with string values'),
|
312
|
+
otherwise: Joi.array().items(numberListItemSchemaV2).unique('id').unique('text').unique('value').description('Array of items with numeric values')
|
313
|
+
})
|
302
314
|
}).description('List schema for V2 forms');
|
303
315
|
const feedbackSchema = Joi.object().description('Feedback configuration for the form').keys({
|
304
316
|
feedbackForm: Joi.boolean().default(false).description('Whether to show the built-in feedback form'),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["JoiDate","JoiBase","v4","uuidV4","ComponentType","ConditionType","OperatorName","SchemaVersion","ControllerType","hasComponents","Joi","extend","idSchemaOptional","string","uuid","idSchema","default","conditionIdRef","ref","in","adjust","conditions","map","condition","id","componentIdRefSchema","pages","flatMap","page","components","filter","component","listIdRef","lists","list","listItemIdRef","items","item","sectionsSchema","object","description","keys","name","trim","required","title","hideTitle","boolean","optional","conditionFieldSchema","type","display","conditionValueSchema","value","conditionListItemRefDataSchemaV2","listId","when","is","exist","then","valid","itemId","relativeDateValueDataSchemaV2","period","number","integer","positive","unit","direction","relativeDateValueDataSchema","conditionRefSchema","conditionName","conditionDisplayName","coordinator","conditionRefDataSchemaV2","conditionId","conditionSchema","field","operator","alternatives","try","conditionDataSchemaV2","componentId","Object","values","any","switch","BooleanValue","StringValue","NumberValue","DateValue","date","format","raw","ListItemRef","RelativeDate","conditionGroupSchema","array","link","conditionsModelSchema","conditionWrapperSchema","displayName","conditionWrapperSchemaV2","min","conditional","otherwise","max","componentSchema","shortDescription","Details","Html","InsetText","Markdown","pattern","allow","hint","options","rows","empty","maxWords","maxDaysInPast","maxDaysInFuture","customValidationMessage","customValidationMessages","unknown","schema","length","componentSchemaV2","componentPayloadSchemaV2","fileUploadComponentSchema","FileUploadField","contentComponentSchema","List","nextSchema","path","redirect","repeatOptions","repeatSchema","pageRepeatSchema","eventSchema","method","url","uri","scheme","eventsSchema","onLoad","onSave","pageUploadComponentsSchema","unique","pageSchema","disallow","section","controller","repeat","strip","next","events","view","pageSchemaV2","append","FileUpload","pagePayloadSchemaV2","baseListItemSchema","text","stringListItemSchema","numberListItemSchema","listSchema","messages","listSchemaV2","feedbackSchema","feedbackForm","emailAddress","email","tlds","phaseBannerSchema","phase","outputSchema","audience","version","formDefinitionSchema","engine","V1","feedback","startPage","sections","metadata","a","declaration","skipSummary","phaseBanner","outputEmail","output","formDefinitionV2Schema","V2","Schema"],"sources":["../../../../src/form/form-definition/index.ts"],"sourcesContent":["import JoiDate from '@joi/date'\nimport JoiBase, { type LanguageMessages } from 'joi'\nimport { v4 as uuidV4 } from 'uuid'\n\nimport { ComponentType } from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type ContentComponentsDef,\n type FileUploadFieldComponent\n} from '~/src/components/types.js'\nimport { ConditionType, OperatorName } from '~/src/conditions/enums.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 ConditionValueData,\n type ConditionsModelData,\n type RelativeDateValueData,\n type RelativeDateValueDataV2\n} from '~/src/conditions/types.js'\nimport {\n SchemaVersion,\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 { ControllerType } from '~/src/pages/enums.js'\nimport { hasComponents } from '~/src/pages/helpers.js'\n\nconst Joi = JoiBase.extend(JoiDate) as JoiBase.Root\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.id)\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 conditionListItemRefDataSchemaV2 =\n Joi.object<ConditionListItemRefValueDataV2>()\n .description('List item ref specification for a condition')\n .keys({\n listId: Joi.string()\n .trim()\n .required()\n .when('/lists', {\n is: Joi.exist(),\n then: Joi.valid(listIdRef)\n })\n .description('The id of the list'),\n itemId: Joi.string()\n .trim()\n .when('/lists', {\n is: Joi.exist(),\n then: Joi.valid(listItemIdRef)\n })\n .required()\n .description('The id of the list item')\n })\n\nconst relativeDateValueDataSchemaV2 = Joi.object<RelativeDateValueDataV2>()\n .description('Relative date specification for date-based conditions')\n .keys({\n period: Joi.number()\n .integer()\n .positive()\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 relativeDateValueDataSchema = Joi.object<RelativeDateValueData>()\n .description('Relative date specification for date-based conditions')\n .keys({\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 conditionRefDataSchemaV2 = 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 .when('/conditions', {\n is: Joi.exist(),\n then: Joi.valid(conditionIdRef)\n })\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\nexport const conditionDataSchemaV2 = 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 .required()\n .when('/pages', {\n is: Joi.exist(),\n then: Joi.valid(componentIdRefSchema)\n })\n .description(\n 'Reference to the component id being evaluated in this condition'\n ),\n operator: Joi.string()\n .trim()\n .valid(...Object.values(OperatorName))\n .required()\n .description('Comparison operator (equals, greaterThan, contains, etc.)'),\n type: Joi.string()\n .trim()\n .valid(...Object.values(ConditionType))\n .required()\n .description('Type of the condition value'),\n value: Joi.any()\n .required()\n .description('The actual value to compare against')\n .when('type', {\n switch: [\n { is: ConditionType.BooleanValue, then: Joi.boolean() },\n { is: ConditionType.StringValue, then: Joi.string() },\n { is: ConditionType.NumberValue, then: Joi.number() },\n {\n is: ConditionType.DateValue,\n then: Joi.date().format('YYYY-MM-DD').raw()\n },\n {\n is: ConditionType.ListItemRef,\n then: conditionListItemRefDataSchemaV2\n },\n {\n is: ConditionType.RelativeDate,\n then: relativeDateValueDataSchemaV2\n }\n ]\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 id: idSchema.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 .when('items', { is: Joi.array().min(2), then: Joi.required() })\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n ),\n items: Joi.array<ConditionGroupDataV2>()\n .items(\n Joi.alternatives().conditional('.componentId', {\n is: Joi.exist(),\n then: conditionDataSchemaV2,\n otherwise: conditionRefDataSchemaV2\n })\n )\n .min(1)\n .max(15)\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 .when('/lists', {\n is: Joi.exist(),\n then: Joi.valid(listIdRef)\n })\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\nexport const componentPayloadSchemaV2 = componentSchema\n .keys({\n id: idSchema.description('Unique identifier for the component'),\n list: Joi.string()\n .optional()\n .description(\n 'List id reference to a predefined list of options for select components'\n )\n })\n .description('Payload schema for component for V2 forms')\n\nexport const fileUploadComponentSchema = componentSchemaV2.keys({\n type: Joi.string<ComponentType.FileUploadField>()\n .trim()\n .valid(ComponentType.FileUploadField)\n .required()\n .description('Component that can only be a FileUploadField')\n})\n\nexport const contentComponentSchema = componentSchemaV2.keys({\n type: Joi.string<ComponentType>()\n .trim()\n .valid(ComponentType.Details)\n .valid(ComponentType.Html)\n .valid(ComponentType.Markdown)\n .valid(ComponentType.InsetText)\n .valid(ComponentType.List)\n .required()\n .description('Content only component type (Details, Html, Markdown, etc.)')\n})\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\nexport const pageUploadComponentsSchema = Joi.array<\n FileUploadFieldComponent | ContentComponentsDef\n>()\n .items(\n fileUploadComponentSchema.required(),\n contentComponentSchema.optional()\n )\n .unique('name')\n .unique('id')\n .min(1)\n .max(2)\n .description('Components allowed on Page Upload schema')\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.when('controller', {\n switch: [\n {\n is: Joi.string().trim().valid(ControllerType.FileUpload).required(),\n then: pageUploadComponentsSchema\n }\n ],\n otherwise: Joi.array<ComponentDef>()\n .items(componentSchemaV2)\n .unique('name')\n .unique('id')\n .description('Components schema for V2 forms')\n }),\n condition: Joi.string()\n .trim()\n .when('/conditions', {\n is: Joi.exist(),\n then: Joi.valid(conditionIdRef)\n })\n .optional()\n .description('Optional condition that determines if this page is shown')\n })\n .description('Page schema for V2 forms')\n\nexport const pagePayloadSchemaV2 = pageSchemaV2\n .append({\n components: Joi.when('controller', {\n switch: [\n {\n is: Joi.string().trim().valid(ControllerType.FileUpload).required(),\n then: pageUploadComponentsSchema\n }\n ],\n otherwise: Joi.array<ComponentDef>()\n .items(componentPayloadSchemaV2)\n .unique('name')\n .unique('id')\n .description('Components schema for V2 forms')\n })\n })\n .description('Payload 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('id')\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('id')\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 schema: Joi.number()\n .integer()\n .valid(SchemaVersion.V1)\n .default(SchemaVersion.V1)\n .description('Form schema version to use (1 or 2)'),\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 schema: Joi.number()\n .integer()\n .valid(SchemaVersion.V2)\n .description('Form schema version to use (2)'),\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('id')\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,OAAO,MAAM,WAAW;AAC/B,OAAOC,OAAO,MAAiC,KAAK;AACpD,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAEnC,SAASC,aAAa;AAMtB,SAASC,aAAa,EAAEC,YAAY;AAepC,SACEC,aAAa;AAiBf,SAASC,cAAc;AACvB,SAASC,aAAa;AAEtB,MAAMC,GAAG,GAAGT,OAAO,CAACU,MAAM,CAACX,OAAO,CAAiB;AAEnD,MAAMY,gBAAgB,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC;AAE5C,MAAMC,QAAQ,GAAGH,gBAAgB,CAACI,OAAO,CAAC,MAAMb,MAAM,CAAC,CAAC,CAAC;AAEzD,MAAMc,cAAc,GAAGP,GAAG,CAACQ,GAAG,CAAC,aAAa,EAAE;EAC5CC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGC,UAAgC,IACvCA,UAAU,CAACC,GAAG,CAAEC,SAAS,IAAKA,SAAS,CAACC,EAAE;AAC9C,CAAC,CAAC;AAEF,MAAMC,oBAAoB,GAAGf,GAAG,CAACQ,GAAG,CAAC,QAAQ,EAAE;EAC7CC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGM,KAAa,IACpBA,KAAK,CAACC,OAAO,CAAEC,IAAI,IACjBnB,aAAa,CAACmB,IAAI,CAAC,GACfA,IAAI,CAACC,UAAU,CACZC,MAAM,CAAEC,SAAS,IAAKA,SAAS,CAACP,EAAE,CAAC,CACnCF,GAAG,CAAES,SAAS,IAAKA,SAAS,CAACP,EAAE,CAAC,GACnC,EACN;AACJ,CAAC,CAAC;AAEF,MAAMQ,SAAS,GAAGtB,GAAG,CAACQ,GAAG,CAAC,QAAQ,EAAE;EAClCC,EAAE,EAAE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AAI;IAAE;EAAE,CAAC,CAAC,CAClClE,QAAQ,CAAC,CAAC,CACVR,WAAW,CAAC,+CAA+C,CAAC;EAC/DuJ,MAAM,EAAEf,YAAY,CACjBhI,QAAQ,CAAC,CAAC,CACVR,WAAW,CAAC,4CAA4C;AAC7D,CAAC,CAAC;AAEJ,OAAO,MAAMwJ,sBAAsB,GAAGb,oBAAoB,CACvD1I,IAAI,CAAC;EACJoF,MAAM,EAAEnH,GAAG,CAACsD,MAAM,CAAC,CAAC,CACjBC,OAAO,CAAC,CAAC,CACTL,KAAK,CAACrD,aAAa,CAAC0L,EAAE,CAAC,CACvBzJ,WAAW,CAAC,gCAAgC,CAAC;EAChDd,KAAK,EAAEhB,GAAG,CAACuF,KAAK,CAAO,CAAC,CACrB7D,KAAK,CAAC0H,YAAY,CAAC,CACnBlH,QAAQ,CAAC,CAAC,CACVwG,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,IAAI,CAAC,CACZ5G,WAAW,CAAC,2BAA2B,CAAC;EAC3CP,KAAK,EAAEvB,GAAG,CAACuF,KAAK,CAAO,CAAC,CACrB7D,KAAK,CAACoI,YAAY,CAAC,CACnBpB,MAAM,CAAC,MAAM,CAAC,CACdA,MAAM,CAAC,OAAO,CAAC,CACfA,MAAM,CAAC,IAAI,CAAC,CACZ5G,WAAW,CAAC,2BAA2B,CAAC;EAC3CnB,UAAU,EAAEX,GAAG,CAACuF,KAAK,CAAqB,CAAC,CACxC7D,KAAK,CAACkE,wBAAwB,CAAC,CAC/B8C,MAAM,CAAC,IAAI,CAAC,CACZA,MAAM,CAAC,aAAa,CAAC,CACrB5G,WAAW,CAAC,sCAAsC;AACvD,CAAC,CAAC,CACDA,WAAW,CAAC,+BAA+B,CAAC;;AAE/C;AACA;AACA,OAAO,MAAM0J,MAAM,GAAGf,oBAAoB","ignoreList":[]}
|
1
|
+
{"version":3,"file":"index.js","names":["JoiDate","JoiBase","v4","uuidV4","ComponentType","ConditionType","OperatorName","SchemaVersion","ControllerType","hasComponents","Joi","extend","idSchemaOptional","string","uuid","idSchema","default","conditionIdRef","ref","in","adjust","conditions","map","condition","id","componentIdRefSchema","pages","flatMap","page","components","filter","component","listIdRef","lists","list","listItemIdRef","items","item","sectionsSchema","object","description","keys","name","trim","required","title","hideTitle","boolean","optional","conditionFieldSchema","type","display","conditionValueSchema","value","conditionListItemRefDataSchemaV2","listId","when","is","exist","then","valid","itemId","relativeDateValueDataSchemaV2","period","number","integer","positive","unit","direction","relativeDateValueDataSchema","conditionRefSchema","conditionName","conditionDisplayName","coordinator","conditionRefDataSchemaV2","conditionId","conditionSchema","field","operator","alternatives","try","conditionDataSchemaV2","componentId","Object","values","any","switch","BooleanValue","StringValue","NumberValue","DateValue","date","format","raw","ListItemRef","RelativeDate","conditionGroupSchema","array","link","conditionsModelSchema","conditionWrapperSchema","displayName","conditionWrapperSchemaV2","min","conditional","otherwise","max","componentSchema","shortDescription","Details","Html","InsetText","Markdown","pattern","allow","hint","options","rows","empty","maxWords","maxDaysInPast","maxDaysInFuture","customValidationMessage","customValidationMessages","unknown","schema","length","componentSchemaV2","componentPayloadSchemaV2","fileUploadComponentSchema","FileUploadField","contentComponentSchema","List","nextSchema","path","redirect","repeatOptions","repeatSchema","pageRepeatSchema","eventSchema","method","url","uri","scheme","eventsSchema","onLoad","onSave","pageUploadComponentsSchema","unique","pageSchema","disallow","section","controller","repeat","strip","next","events","view","pageSchemaV2","append","FileUpload","pagePayloadSchemaV2","baseListItemSchema","text","stringListItemSchema","numberListItemSchema","stringListItemSchemaV2","numberListItemSchemaV2","listSchema","messages","listSchemaV2","feedbackSchema","feedbackForm","emailAddress","email","tlds","phaseBannerSchema","phase","outputSchema","audience","version","formDefinitionSchema","engine","V1","feedback","startPage","sections","metadata","a","declaration","skipSummary","phaseBanner","outputEmail","output","formDefinitionV2Schema","V2","Schema"],"sources":["../../../../src/form/form-definition/index.ts"],"sourcesContent":["import JoiDate from '@joi/date'\nimport JoiBase, { type LanguageMessages } from 'joi'\nimport { v4 as uuidV4 } from 'uuid'\n\nimport { ComponentType } from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type ContentComponentsDef,\n type FileUploadFieldComponent\n} from '~/src/components/types.js'\nimport { ConditionType, OperatorName } from '~/src/conditions/enums.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 ConditionValueData,\n type ConditionsModelData,\n type RelativeDateValueData,\n type RelativeDateValueDataV2\n} from '~/src/conditions/types.js'\nimport {\n SchemaVersion,\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 { ControllerType } from '~/src/pages/enums.js'\nimport { hasComponents } from '~/src/pages/helpers.js'\n\nconst Joi = JoiBase.extend(JoiDate) as JoiBase.Root\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.id)\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 conditionListItemRefDataSchemaV2 =\n Joi.object<ConditionListItemRefValueDataV2>()\n .description('List item ref specification for a condition')\n .keys({\n listId: Joi.string()\n .trim()\n .required()\n .when('/lists', {\n is: Joi.exist(),\n then: Joi.valid(listIdRef)\n })\n .description('The id of the list'),\n itemId: Joi.string()\n .trim()\n .when('/lists', {\n is: Joi.exist(),\n then: Joi.valid(listItemIdRef)\n })\n .required()\n .description('The id of the list item')\n })\n\nconst relativeDateValueDataSchemaV2 = Joi.object<RelativeDateValueDataV2>()\n .description('Relative date specification for date-based conditions')\n .keys({\n period: Joi.number()\n .integer()\n .positive()\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 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 conditionRefDataSchemaV2 = 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 .when('/conditions', {\n is: Joi.exist(),\n then: Joi.valid(conditionIdRef)\n })\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\nexport const conditionDataSchemaV2 = 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 .required()\n .when('/pages', {\n is: Joi.exist(),\n then: Joi.valid(componentIdRefSchema)\n })\n .description(\n 'Reference to the component id being evaluated in this condition'\n ),\n operator: Joi.string()\n .trim()\n .valid(...Object.values(OperatorName))\n .required()\n .description('Comparison operator (equals, greaterThan, contains, etc.)'),\n type: Joi.string()\n .trim()\n .valid(...Object.values(ConditionType))\n .required()\n .description('Type of the condition value'),\n value: Joi.any()\n .required()\n .description('The actual value to compare against')\n .when('type', {\n switch: [\n { is: ConditionType.BooleanValue, then: Joi.boolean() },\n { is: ConditionType.StringValue, then: Joi.string() },\n { is: ConditionType.NumberValue, then: Joi.number() },\n {\n is: ConditionType.DateValue,\n then: Joi.date().format('YYYY-MM-DD').raw()\n },\n {\n is: ConditionType.ListItemRef,\n then: conditionListItemRefDataSchemaV2\n },\n {\n is: ConditionType.RelativeDate,\n then: relativeDateValueDataSchemaV2\n }\n ]\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 id: idSchema.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 .when('items', { is: Joi.array().min(2), then: Joi.required() })\n .description(\n 'Logical operator connecting this condition with others (AND, OR)'\n ),\n items: Joi.array<ConditionGroupDataV2>()\n .items(\n Joi.alternatives().conditional('.componentId', {\n is: Joi.exist(),\n then: conditionDataSchemaV2,\n otherwise: conditionRefDataSchemaV2\n })\n )\n .min(1)\n .max(15)\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 .when('/lists', {\n is: Joi.exist(),\n then: Joi.valid(listIdRef)\n })\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\nexport const componentPayloadSchemaV2 = componentSchema\n .keys({\n id: idSchema.description('Unique identifier for the component'),\n list: Joi.string()\n .optional()\n .description(\n 'List id reference to a predefined list of options for select components'\n )\n })\n .description('Payload schema for component for V2 forms')\n\nexport const fileUploadComponentSchema = componentSchemaV2.keys({\n type: Joi.string<ComponentType.FileUploadField>()\n .trim()\n .valid(ComponentType.FileUploadField)\n .required()\n .description('Component that can only be a FileUploadField')\n})\n\nexport const contentComponentSchema = componentSchemaV2.keys({\n type: Joi.string<ComponentType>()\n .trim()\n .valid(ComponentType.Details)\n .valid(ComponentType.Html)\n .valid(ComponentType.Markdown)\n .valid(ComponentType.InsetText)\n .valid(ComponentType.List)\n .required()\n .description('Content only component type (Details, Html, Markdown, etc.)')\n})\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\nexport const pageUploadComponentsSchema = Joi.array<\n FileUploadFieldComponent | ContentComponentsDef\n>()\n .items(\n fileUploadComponentSchema.required(),\n contentComponentSchema.optional()\n )\n .unique('name')\n .unique('id')\n .min(1)\n .max(2)\n .description('Components allowed on Page Upload schema')\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.when('controller', {\n switch: [\n {\n is: Joi.string().trim().valid(ControllerType.FileUpload).required(),\n then: pageUploadComponentsSchema\n }\n ],\n otherwise: Joi.array<ComponentDef>()\n .items(componentSchemaV2)\n .unique('name')\n .unique('id')\n .description('Components schema for V2 forms')\n }),\n condition: Joi.string()\n .trim()\n .when('/conditions', {\n is: Joi.exist(),\n then: Joi.valid(conditionIdRef)\n })\n .optional()\n .description('Optional condition that determines if this page is shown')\n })\n .description('Page schema for V2 forms')\n\nexport const pagePayloadSchemaV2 = pageSchemaV2\n .append({\n components: Joi.when('controller', {\n switch: [\n {\n is: Joi.string().trim().valid(ControllerType.FileUpload).required(),\n then: pageUploadComponentsSchema\n }\n ],\n otherwise: Joi.array<ComponentDef>()\n .items(componentPayloadSchemaV2)\n .unique('name')\n .unique('id')\n .description('Components schema for V2 forms')\n })\n })\n .description('Payload 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: idSchemaOptional.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\nconst stringListItemSchemaV2 = stringListItemSchema\n .append({\n id: idSchema.description('Unique identifier for the list item')\n })\n .description('List item with string value')\n\nconst numberListItemSchemaV2 = numberListItemSchema\n .append({\n id: idSchema.description('Unique identifier for the list item')\n })\n .description('List item with string 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 items: Joi.when('type', {\n is: 'string',\n then: Joi.array()\n .items(stringListItemSchemaV2)\n .unique('id')\n .unique('text')\n .unique('value')\n .description('Array of items with string values'),\n otherwise: Joi.array()\n .items(numberListItemSchemaV2)\n .unique('id')\n .unique('text')\n .unique('value')\n .description('Array of items with numeric values')\n })\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 schema: Joi.number()\n .integer()\n .valid(SchemaVersion.V1)\n .default(SchemaVersion.V1)\n .description('Form schema version to use (1 or 2)'),\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 schema: Joi.number()\n .integer()\n .valid(SchemaVersion.V2)\n .description('Form schema version to use (2)'),\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('id')\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,OAAO,MAAM,WAAW;AAC/B,OAAOC,OAAO,MAAiC,KAAK;AACpD,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAEnC,SAASC,aAAa;AAMtB,SAASC,aAAa,EAAEC,YAAY;AAepC,SACEC,aAAa;AAiBf,SAASC,cAAc;AACvB,SAASC,aAAa;AAEtB,MAAMC,GAAG,GAAGT,OAAO,CAACU,MAAM,CAACX,OAAO,CAAiB;AAEnD,MAAMY,gBAAgB,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC;AAE5C,MAAMC,QAAQ,GAAGH,gBAAgB,CAACI,OAAO,CAAC,MAAMb,MAAM,CAAC,CAAC,CAAC;AAEzD,MAAMc,cAAc,GAAGP,GAAG,CAACQ,GAAG,CAAC,aAAa,EAAE;EAC5CC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGC,UAAgC,IACvCA,UAAU,CAACC,GAAG,CAAEC,SAAS,IAAKA,SAAS,CAACC,EAAE;AAC9C,CAAC,CAAC;AAEF,MAAMC,oBAAoB,GAAGf,GAAG,CAACQ,GAAG,CAAC,QAAQ,EAAE;EAC7CC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAGM,KAAa,IACpBA,KAAK,CAACC,OAAO,CAAEC,IAAI,IACjBnB,aA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/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAkC,MAAM,KAAK,CAAA;AAIpD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAEL,KAAK,eAAe,EAWrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EAGnB,KAAK,IAAI,EACT,KAAK,IAAI,EAET,KAAK,MAAM,EAIZ,MAAM,qCAAqC,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAkC,MAAM,KAAK,CAAA;AAIpD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAEL,KAAK,eAAe,EAWrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EAGnB,KAAK,IAAI,EACT,KAAK,IAAI,EAET,KAAK,MAAM,EAIZ,MAAM,qCAAqC,CAAA;AAuN5C,eAAO,MAAM,qBAAqB,uCAmD9B,CAAA;AAoDJ,eAAO,MAAM,wBAAwB,0CAyBU,CAAA;AAE/C,eAAO,MAAM,eAAe,oCAkGZ,CAAA;AAEhB,eAAO,MAAM,iBAAiB,oCAaiB,CAAA;AAE/C,eAAO,MAAM,wBAAwB,oCASsB,CAAA;AAE3D,eAAO,MAAM,yBAAyB,oCAMpC,CAAA;AAEF,eAAO,MAAM,sBAAsB,oCAUjC,CAAA;AAoDF,eAAO,MAAM,gBAAgB,8BASzB,CAAA;AAyCJ,eAAO,MAAM,0BAA0B,sEAWmB,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,UAAU,4BAmDnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAgCiB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,4BAgBkB,CAAA;AAoElD,eAAO,MAAM,UAAU,4BAkCnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAmBiB,CAAA;AAsD1C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,sCAsE7B,CAAA;AAEJ,eAAO,MAAM,sBAAsB,sCAwBY,CAAA;AAI/C,eAAO,MAAM,MAAM,sCAAuB,CAAA"}
|
package/package.json
CHANGED
@@ -591,6 +591,11 @@
|
|
591
591
|
"type": "object",
|
592
592
|
"description": "Relative date specification for date-based conditions",
|
593
593
|
"properties": {
|
594
|
+
"type": {
|
595
|
+
"description": "Type of the condition value, should be \"RelativeDate\"",
|
596
|
+
"const": "RelativeDate",
|
597
|
+
"title": "Type"
|
598
|
+
},
|
594
599
|
"period": {
|
595
600
|
"type": "string",
|
596
601
|
"description": "Numeric amount of the time period, as a string",
|
@@ -608,6 +613,7 @@
|
|
608
613
|
}
|
609
614
|
},
|
610
615
|
"required": [
|
616
|
+
"type",
|
611
617
|
"period",
|
612
618
|
"unit",
|
613
619
|
"direction"
|
@@ -1407,6 +1413,11 @@
|
|
1407
1413
|
"type": "object",
|
1408
1414
|
"description": "Relative date specification for date-based conditions",
|
1409
1415
|
"properties": {
|
1416
|
+
"type": {
|
1417
|
+
"description": "Type of the condition value, should be \"RelativeDate\"",
|
1418
|
+
"const": "RelativeDate",
|
1419
|
+
"title": "Type"
|
1420
|
+
},
|
1410
1421
|
"period": {
|
1411
1422
|
"type": "string",
|
1412
1423
|
"description": "Numeric amount of the time period, as a string",
|
@@ -1424,6 +1435,7 @@
|
|
1424
1435
|
}
|
1425
1436
|
},
|
1426
1437
|
"required": [
|
1438
|
+
"type",
|
1427
1439
|
"period",
|
1428
1440
|
"unit",
|
1429
1441
|
"direction"
|
@@ -997,6 +997,12 @@
|
|
997
997
|
],
|
998
998
|
"title": "Type"
|
999
999
|
},
|
1000
|
+
"id": {
|
1001
|
+
"type": "string",
|
1002
|
+
"description": "Unique identifier for the list",
|
1003
|
+
"format": "uuid",
|
1004
|
+
"title": "Id"
|
1005
|
+
},
|
1000
1006
|
"items": {
|
1001
1007
|
"type": [
|
1002
1008
|
"array",
|
@@ -1015,12 +1021,6 @@
|
|
1015
1021
|
"type": "object",
|
1016
1022
|
"description": "List item with string value",
|
1017
1023
|
"properties": {
|
1018
|
-
"id": {
|
1019
|
-
"type": "string",
|
1020
|
-
"description": "Unique identifier for the list item",
|
1021
|
-
"format": "uuid",
|
1022
|
-
"title": "Id"
|
1023
|
-
},
|
1024
1024
|
"text": {
|
1025
1025
|
"type": "string",
|
1026
1026
|
"description": "Display text shown to the user",
|
@@ -1236,6 +1236,12 @@
|
|
1236
1236
|
"type": "string",
|
1237
1237
|
"description": "String value stored when this item is selected",
|
1238
1238
|
"title": "Value"
|
1239
|
+
},
|
1240
|
+
"id": {
|
1241
|
+
"type": "string",
|
1242
|
+
"description": "Unique identifier for the list item",
|
1243
|
+
"format": "uuid",
|
1244
|
+
"title": "Id"
|
1239
1245
|
}
|
1240
1246
|
},
|
1241
1247
|
"required": [
|
@@ -1252,14 +1258,8 @@
|
|
1252
1258
|
"uniqueItems": true,
|
1253
1259
|
"items": {
|
1254
1260
|
"type": "object",
|
1255
|
-
"description": "List item with
|
1261
|
+
"description": "List item with string value",
|
1256
1262
|
"properties": {
|
1257
|
-
"id": {
|
1258
|
-
"type": "string",
|
1259
|
-
"description": "Unique identifier for the list item",
|
1260
|
-
"format": "uuid",
|
1261
|
-
"title": "Id"
|
1262
|
-
},
|
1263
1263
|
"text": {
|
1264
1264
|
"type": "string",
|
1265
1265
|
"description": "Display text shown to the user",
|
@@ -1475,6 +1475,12 @@
|
|
1475
1475
|
"type": "number",
|
1476
1476
|
"description": "Numeric value stored when this item is selected",
|
1477
1477
|
"title": "Value"
|
1478
|
+
},
|
1479
|
+
"id": {
|
1480
|
+
"type": "string",
|
1481
|
+
"description": "Unique identifier for the list item",
|
1482
|
+
"format": "uuid",
|
1483
|
+
"title": "Id"
|
1478
1484
|
}
|
1479
1485
|
},
|
1480
1486
|
"required": [
|
@@ -1492,12 +1498,6 @@
|
|
1492
1498
|
"Items (array)",
|
1493
1499
|
"Items (array)"
|
1494
1500
|
]
|
1495
|
-
},
|
1496
|
-
"id": {
|
1497
|
-
"type": "string",
|
1498
|
-
"description": "Unique identifier for the list",
|
1499
|
-
"format": "uuid",
|
1500
|
-
"title": "Id"
|
1501
1501
|
}
|
1502
1502
|
},
|
1503
1503
|
"required": [
|
@@ -21,6 +21,12 @@
|
|
21
21
|
],
|
22
22
|
"title": "Type"
|
23
23
|
},
|
24
|
+
"id": {
|
25
|
+
"type": "string",
|
26
|
+
"description": "Unique identifier for the list",
|
27
|
+
"format": "uuid",
|
28
|
+
"title": "Id"
|
29
|
+
},
|
24
30
|
"items": {
|
25
31
|
"type": [
|
26
32
|
"array",
|
@@ -39,12 +45,6 @@
|
|
39
45
|
"type": "object",
|
40
46
|
"description": "List item with string value",
|
41
47
|
"properties": {
|
42
|
-
"id": {
|
43
|
-
"type": "string",
|
44
|
-
"description": "Unique identifier for the list item",
|
45
|
-
"format": "uuid",
|
46
|
-
"title": "Id"
|
47
|
-
},
|
48
48
|
"text": {
|
49
49
|
"type": "string",
|
50
50
|
"description": "Display text shown to the user",
|
@@ -260,6 +260,12 @@
|
|
260
260
|
"type": "string",
|
261
261
|
"description": "String value stored when this item is selected",
|
262
262
|
"title": "Value"
|
263
|
+
},
|
264
|
+
"id": {
|
265
|
+
"type": "string",
|
266
|
+
"description": "Unique identifier for the list item",
|
267
|
+
"format": "uuid",
|
268
|
+
"title": "Id"
|
263
269
|
}
|
264
270
|
},
|
265
271
|
"required": [
|
@@ -276,14 +282,8 @@
|
|
276
282
|
"uniqueItems": true,
|
277
283
|
"items": {
|
278
284
|
"type": "object",
|
279
|
-
"description": "List item with
|
285
|
+
"description": "List item with string value",
|
280
286
|
"properties": {
|
281
|
-
"id": {
|
282
|
-
"type": "string",
|
283
|
-
"description": "Unique identifier for the list item",
|
284
|
-
"format": "uuid",
|
285
|
-
"title": "Id"
|
286
|
-
},
|
287
287
|
"text": {
|
288
288
|
"type": "string",
|
289
289
|
"description": "Display text shown to the user",
|
@@ -499,6 +499,12 @@
|
|
499
499
|
"type": "number",
|
500
500
|
"description": "Numeric value stored when this item is selected",
|
501
501
|
"title": "Value"
|
502
|
+
},
|
503
|
+
"id": {
|
504
|
+
"type": "string",
|
505
|
+
"description": "Unique identifier for the list item",
|
506
|
+
"format": "uuid",
|
507
|
+
"title": "Id"
|
502
508
|
}
|
503
509
|
},
|
504
510
|
"required": [
|
@@ -516,12 +522,6 @@
|
|
516
522
|
"Items (array)",
|
517
523
|
"Items (array)"
|
518
524
|
]
|
519
|
-
},
|
520
|
-
"id": {
|
521
|
-
"type": "string",
|
522
|
-
"description": "Unique identifier for the list",
|
523
|
-
"format": "uuid",
|
524
|
-
"title": "Id"
|
525
525
|
}
|
526
526
|
},
|
527
527
|
"required": [
|
@@ -180,6 +180,11 @@ const relativeDateValueDataSchemaV2 = Joi.object<RelativeDateValueDataV2>()
|
|
180
180
|
const relativeDateValueDataSchema = Joi.object<RelativeDateValueData>()
|
181
181
|
.description('Relative date specification for date-based conditions')
|
182
182
|
.keys({
|
183
|
+
type: Joi.string()
|
184
|
+
.trim()
|
185
|
+
.valid('RelativeDate')
|
186
|
+
.required()
|
187
|
+
.description('Type of the condition value, should be "RelativeDate"'),
|
183
188
|
period: Joi.string()
|
184
189
|
.trim()
|
185
190
|
.required()
|
@@ -754,7 +759,7 @@ export const pagePayloadSchemaV2 = pageSchemaV2
|
|
754
759
|
const baseListItemSchema = Joi.object<Item>()
|
755
760
|
.description('Base schema for list items with common properties')
|
756
761
|
.keys({
|
757
|
-
id:
|
762
|
+
id: idSchemaOptional.description('Unique identifier for the list item'),
|
758
763
|
text: Joi.string()
|
759
764
|
.trim()
|
760
765
|
.allow('')
|
@@ -805,6 +810,18 @@ const numberListItemSchema = baseListItemSchema
|
|
805
810
|
})
|
806
811
|
.description('List item with numeric value')
|
807
812
|
|
813
|
+
const stringListItemSchemaV2 = stringListItemSchema
|
814
|
+
.append({
|
815
|
+
id: idSchema.description('Unique identifier for the list item')
|
816
|
+
})
|
817
|
+
.description('List item with string value')
|
818
|
+
|
819
|
+
const numberListItemSchemaV2 = numberListItemSchema
|
820
|
+
.append({
|
821
|
+
id: idSchema.description('Unique identifier for the list item')
|
822
|
+
})
|
823
|
+
.description('List item with string value')
|
824
|
+
|
808
825
|
export const listSchema = Joi.object<List>()
|
809
826
|
.description('Reusable list of options for select components')
|
810
827
|
.keys({
|
@@ -826,7 +843,6 @@ export const listSchema = Joi.object<List>()
|
|
826
843
|
is: 'string',
|
827
844
|
then: Joi.array()
|
828
845
|
.items(stringListItemSchema)
|
829
|
-
.unique('id')
|
830
846
|
.unique('text')
|
831
847
|
.unique('value')
|
832
848
|
.messages({
|
@@ -836,7 +852,6 @@ export const listSchema = Joi.object<List>()
|
|
836
852
|
.description('Array of items with string values'),
|
837
853
|
otherwise: Joi.array()
|
838
854
|
.items(numberListItemSchema)
|
839
|
-
.unique('id')
|
840
855
|
.unique('text')
|
841
856
|
.unique('value')
|
842
857
|
.description('Array of items with numeric values')
|
@@ -848,7 +863,22 @@ export const listSchema = Joi.object<List>()
|
|
848
863
|
*/
|
849
864
|
export const listSchemaV2 = listSchema
|
850
865
|
.keys({
|
851
|
-
id: idSchema.description('Unique identifier for the list')
|
866
|
+
id: idSchema.description('Unique identifier for the list'),
|
867
|
+
items: Joi.when('type', {
|
868
|
+
is: 'string',
|
869
|
+
then: Joi.array()
|
870
|
+
.items(stringListItemSchemaV2)
|
871
|
+
.unique('id')
|
872
|
+
.unique('text')
|
873
|
+
.unique('value')
|
874
|
+
.description('Array of items with string values'),
|
875
|
+
otherwise: Joi.array()
|
876
|
+
.items(numberListItemSchemaV2)
|
877
|
+
.unique('id')
|
878
|
+
.unique('text')
|
879
|
+
.unique('value')
|
880
|
+
.description('Array of items with numeric values')
|
881
|
+
})
|
852
882
|
})
|
853
883
|
.description('List schema for V2 forms')
|
854
884
|
|