@defra/forms-model 3.0.686 → 3.0.688

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/module/__stubs__/examples.js +185 -0
  2. package/dist/module/__stubs__/examples.js.map +1 -0
  3. package/dist/module/components/helpers.js +4 -0
  4. package/dist/module/components/helpers.js.map +1 -1
  5. package/dist/module/components/types.js.map +1 -1
  6. package/dist/module/form/form-definition/index.js +6 -0
  7. package/dist/module/form/form-definition/index.js.map +1 -1
  8. package/dist/module/form/form-editor/index.js +2 -0
  9. package/dist/module/form/form-editor/index.js.map +1 -1
  10. package/dist/module/form/form-editor/translations/translations-config.js +168 -0
  11. package/dist/module/form/form-editor/translations/translations-config.js.map +1 -0
  12. package/dist/module/form/form-editor/translations/translations-overview.js +93 -0
  13. package/dist/module/form/form-editor/translations/translations-overview.js.map +1 -0
  14. package/dist/module/form/form-editor/translations/translations.js +214 -0
  15. package/dist/module/form/form-editor/translations/translations.js.map +1 -0
  16. package/dist/module/form/form-editor/types.js.map +1 -1
  17. package/dist/module/form/utils/list.js +23 -0
  18. package/dist/module/form/utils/list.js.map +1 -1
  19. package/dist/module/form/utils/numbering.js +43 -0
  20. package/dist/module/form/utils/numbering.js.map +1 -0
  21. package/dist/module/index.js +2 -0
  22. package/dist/module/index.js.map +1 -1
  23. package/dist/types/__stubs__/examples.d.ts +9 -0
  24. package/dist/types/__stubs__/examples.d.ts.map +1 -0
  25. package/dist/types/components/helpers.d.ts +2 -1
  26. package/dist/types/components/helpers.d.ts.map +1 -1
  27. package/dist/types/components/types.d.ts +8 -0
  28. package/dist/types/components/types.d.ts.map +1 -1
  29. package/dist/types/form/form-definition/index.d.ts.map +1 -1
  30. package/dist/types/form/form-editor/index.d.ts +2 -0
  31. package/dist/types/form/form-editor/index.d.ts.map +1 -1
  32. package/dist/types/form/form-editor/translations/translations-config.d.ts +95 -0
  33. package/dist/types/form/form-editor/translations/translations-config.d.ts.map +1 -0
  34. package/dist/types/form/form-editor/translations/translations-overview.d.ts +14 -0
  35. package/dist/types/form/form-editor/translations/translations-overview.d.ts.map +1 -0
  36. package/dist/types/form/form-editor/translations/translations.d.ts +16 -0
  37. package/dist/types/form/form-editor/translations/translations.d.ts.map +1 -0
  38. package/dist/types/form/form-editor/types.d.ts +5 -1
  39. package/dist/types/form/form-editor/types.d.ts.map +1 -1
  40. package/dist/types/form/utils/list.d.ts +8 -1
  41. package/dist/types/form/utils/list.d.ts.map +1 -1
  42. package/dist/types/form/utils/numbering.d.ts +18 -0
  43. package/dist/types/form/utils/numbering.d.ts.map +1 -0
  44. package/dist/types/index.d.ts +2 -0
  45. package/dist/types/index.d.ts.map +1 -1
  46. package/package.json +1 -1
  47. package/schemas/component-schema-v2.json +13 -0
  48. package/schemas/component-schema.json +13 -0
  49. package/schemas/form-definition-schema.json +39 -0
  50. package/schemas/form-definition-v2-schema.json +65 -0
  51. package/schemas/list-schema-v2.json +26 -0
  52. package/schemas/list-schema.json +26 -0
  53. package/schemas/page-schema-v2.json +39 -0
  54. package/schemas/page-schema.json +13 -0
  55. package/src/__stubs__/examples.js +231 -0
  56. package/src/components/helpers.ts +14 -0
  57. package/src/components/types.ts +15 -0
  58. package/src/form/form-definition/index.ts +19 -0
  59. package/src/form/form-editor/index.ts +6 -0
  60. package/src/form/form-editor/translations/translations-config.js +186 -0
  61. package/src/form/form-editor/translations/translations-overview.js +137 -0
  62. package/src/form/form-editor/translations/translations.js +297 -0
  63. package/src/form/form-editor/types.ts +6 -0
  64. package/src/form/utils/list.ts +34 -1
  65. package/src/form/utils/numbering.js +47 -0
  66. package/src/index.ts +2 -0
@@ -0,0 +1,214 @@
1
+ import { ComponentType } from "../../../components/enums.js";
2
+ import { isListType, isTypeWithInstructions } from "../../../components/helpers.js";
3
+ import { IGNORE_FIELDS, TranslationRowTypes, drillDown, keyConfig, lookupTranslation } from "./translations-config.js";
4
+ import { buildOverviewSection } from "./translations-overview.js";
5
+ import { getListFromComponent } from "../../utils/list.js";
6
+ import { getPageNum, getQuestionNum } from "../../utils/numbering.js";
7
+ import { ControllerType } from "../../../pages/enums.js";
8
+ import { hasComponents } from "../../../pages/helpers.js";
9
+
10
+ /**
11
+ * Create a translation row for a single entity field.
12
+ * @param {ComponentDef | Page | Item} entity - The source entity that contains the English content.
13
+ * @param {string} keyType - The translation row type to build.
14
+ * @param {{ pageNum: number, questionNum?: number, itemNum?: number, translations: Record<string, string>, validation?: ValidationFailure<any> }} options - The row context including numbering and translation values.
15
+ * @returns {TranslationRow} The populated translation row for the entity field.
16
+ */
17
+ function createRow(entity, keyType, {
18
+ pageNum,
19
+ questionNum,
20
+ itemNum,
21
+ translations,
22
+ validation
23
+ }) {
24
+ const keyProperties = keyConfig[keyType];
25
+ const innerEnglishContent = drillDown(keyType, entity, keyProperties.jsonSuffix);
26
+ const keyName = `${keyProperties.jsonPrefix}.${entity.id}.${keyProperties.jsonSuffix}`;
27
+ return {
28
+ name: keyName,
29
+ type: keyType,
30
+ pageNum,
31
+ questionNum,
32
+ itemNum,
33
+ englishContent: innerEnglishContent,
34
+ welshContent: validation?.formValues[keyName] ?? lookupTranslation(keyName, translations),
35
+ label: keyProperties.getLabel(pageNum, questionNum, itemNum)
36
+ };
37
+ }
38
+ const allowedControllerTypesSet = new Set([ControllerType.Page, ControllerType.Repeat, ControllerType.Start, ControllerType.FileUpload, ControllerType.Terminal]);
39
+
40
+ /**
41
+ * Build the translation rows for a single page.
42
+ * @param {Page} page - The page definition to inspect for translatable content.
43
+ * @param {number} pageNum - The page number used in the generated labels.
44
+ * @param {Record<string, string>} translations - Existing Welsh translations keyed by translation name.
45
+ * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.
46
+ * @returns {TranslationRow[]} The translation rows generated for the page.
47
+ */
48
+ function buildPage(page, pageNum, translations, validation) {
49
+ if (page.controller && !allowedControllerTypesSet.has(page.controller)) {
50
+ return [];
51
+ }
52
+ const translationRows = [];
53
+ if (page.title) {
54
+ const keyProperties = keyConfig[TranslationRowTypes.PageHeading];
55
+ const keyName = `${keyProperties.jsonPrefix}.${page.id}.${keyProperties.jsonSuffix}`;
56
+ translationRows.push({
57
+ name: keyName,
58
+ type: TranslationRowTypes.PageHeading,
59
+ pageNum,
60
+ englishContent: page.title,
61
+ welshContent: validation?.formValues[keyName] ?? lookupTranslation(keyName, translations),
62
+ label: keyProperties.getLabel(pageNum)
63
+ });
64
+ }
65
+ const guidance = hasComponents(page) && page.components[0].type === ComponentType.Markdown ? page.components[0] : undefined;
66
+ if (guidance) {
67
+ const keyProperties = keyConfig[TranslationRowTypes.PageGuidance];
68
+ const keyName = `${keyProperties.jsonPrefix}.${guidance.id}.${keyProperties.jsonSuffix}`;
69
+ translationRows.push({
70
+ name: keyName,
71
+ type: TranslationRowTypes.PageGuidance,
72
+ pageNum,
73
+ englishContent: guidance.content,
74
+ welshContent: validation?.formValues[keyName] ?? lookupTranslation(keyName, translations),
75
+ label: keyProperties.getLabel(pageNum)
76
+ });
77
+ }
78
+ if (page.controller === ControllerType.Repeat) {
79
+ const keyProperties = keyConfig[TranslationRowTypes.RepeatTitle];
80
+ const keyName = `${keyProperties.jsonPrefix}.${page.id}.${keyProperties.jsonSuffix}`;
81
+ translationRows.push({
82
+ name: keyName,
83
+ type: TranslationRowTypes.RepeatTitle,
84
+ pageNum,
85
+ englishContent: page.repeat.options.title,
86
+ welshContent: validation?.formValues[keyName] ?? lookupTranslation(keyName, translations),
87
+ label: keyProperties.getLabel(pageNum)
88
+ });
89
+ }
90
+ return translationRows;
91
+ }
92
+
93
+ /**
94
+ * Build the translation rows for a single component.
95
+ * @param {FormDefinition} definition - The overall form definition used to resolve list-based content.
96
+ * @param {ComponentDef} component - The component to inspect for translatable fields.
97
+ * @param {number} pageNum - The page number used in the generated labels.
98
+ * @param {number} questionNum - The question number used in the generated labels.
99
+ * @param {Record<string, string>} translations - Existing Welsh translations keyed by translation name.
100
+ * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.
101
+ * @returns {TranslationRow[]} The translation rows generated for the component.
102
+ */
103
+ function buildComponent(definition, component, pageNum, questionNum, translations, validation) {
104
+ if (IGNORE_FIELDS.includes(component.type)) {
105
+ return [];
106
+ }
107
+ const rows = [];
108
+ const options = {
109
+ pageNum,
110
+ questionNum,
111
+ translations,
112
+ validation
113
+ };
114
+ const typed = /** @type {InputFieldsComponentsDef} */component;
115
+ if (typed.title && component.type !== ComponentType.PaymentField) {
116
+ rows.push(createRow(component, TranslationRowTypes.QuestionText, options));
117
+ }
118
+ if (typed.hint) {
119
+ rows.push(createRow(component, TranslationRowTypes.QuestionHint, options));
120
+ }
121
+ if (component.type !== ComponentType.PaymentField) {
122
+ rows.push(createRow(component, TranslationRowTypes.ShortDescription, options));
123
+ } else {
124
+ rows.push(createRow(component, TranslationRowTypes.PaymentDescription, options));
125
+ }
126
+ if (component.type === ComponentType.DeclarationField) {
127
+ rows.push(createRow(component, TranslationRowTypes.DeclarationBody, options));
128
+ }
129
+ if (component.type === ComponentType.PaymentField) {
130
+ rows.push(createRow(component, TranslationRowTypes.PaymentDescription, options));
131
+ }
132
+ if (typed.options.instructionText && isTypeWithInstructions(component.type)) {
133
+ rows.push(createRow(component, TranslationRowTypes.InstructionText, options));
134
+ }
135
+ if (isListType(component.type)) {
136
+ addSelectionOptions(rows, component, definition, options);
137
+ }
138
+ return rows;
139
+ }
140
+
141
+ /**
142
+ * Add translation rows for the select item options of a list-based component.
143
+ * @param {any[]} rows - The accumulator for translation rows.
144
+ * @param {ComponentDef} component - The list-based component to inspect.
145
+ * @param {FormDefinition} definition - The form definition that contains the option list data.
146
+ * @param {{ pageNum: number, questionNum?: number, translations: Record<string, string>, validation?: ValidationFailure<any> }} options - The row context including numbering and translation values.
147
+ */
148
+ function addSelectionOptions(rows, component, definition, options) {
149
+ // Temporary workaround - ignore for Yes/No and use defaults in the plugin,
150
+ // until we create a solution that allows users to override the Yes/No options
151
+ if (component.type === ComponentType.YesNoField) {
152
+ return;
153
+ }
154
+ const list = getListFromComponent(component, definition);
155
+ if (list?.items.length) {
156
+ let itemNum = 0;
157
+ for (const item of list.items) {
158
+ itemNum++;
159
+ const listOptions = {
160
+ ...options,
161
+ itemNum
162
+ };
163
+ if (item.hint) {
164
+ rows.push(createRow(item, TranslationRowTypes.ListItemText, listOptions), createRow(item, TranslationRowTypes.ListItemHint, listOptions));
165
+ } else {
166
+ rows.push(createRow(item, TranslationRowTypes.ListItemText, listOptions));
167
+ }
168
+ }
169
+ }
170
+ }
171
+
172
+ /**
173
+ * Build the overview and form translation rows for a form definition.
174
+ * @param {FormMetadata} metadata - The form metadata used to build the overview section.
175
+ * @param {FormDefinition} definition - The form definition containing pages and components.
176
+ * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.
177
+ * @returns {{ overviewRows: TranslationRow[], formRows: TranslationRow[] }} The generated overview and form translation rows.
178
+ */
179
+ export function buildTranslationDataRows(metadata, definition, validation) {
180
+ const translationsJSON = /** @type {Record<string, string>} */
181
+ // @ts-expect-error - dynamic language definition
182
+ definition.metadata?.translations?.cy;
183
+ const overviewRows = buildOverviewSection(metadata, definition, translationsJSON, validation);
184
+ const formRows = [];
185
+ for (const page of definition.pages) {
186
+ const pageId = /** @type {string} */page.id;
187
+ const pageNum = getPageNum(definition, pageId);
188
+ const components = hasComponents(page) ? page.components : [];
189
+ if (components.length === 0) {
190
+ continue;
191
+ }
192
+ formRows.push(...buildPage(page, pageNum, translationsJSON, validation));
193
+ for (const component of components) {
194
+ if (component.type === ComponentType.Markdown) {
195
+ continue;
196
+ }
197
+ const questionId = /** @type {string} */component.id;
198
+ const questionNum = getQuestionNum(definition, pageId, questionId);
199
+ formRows.push(...buildComponent(definition, component, pageNum, questionNum, translationsJSON, validation));
200
+ }
201
+ }
202
+ return {
203
+ overviewRows,
204
+ formRows
205
+ };
206
+ }
207
+
208
+ /**
209
+ * @import { ComponentDef, InputFieldsComponentsDef } from '~/src/components/types.js'
210
+ * @import { FormMetadata } from '~/src/form/form-metadata/types.js'
211
+ * @import { FormDefinition, Item, Page } from '~/src/form/form-definition/types.js'
212
+ * @import { TranslationRow, ValidationFailure } from '~/src/form/form-editor/translations/translations-config.js'
213
+ */
214
+ //# sourceMappingURL=translations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.js","names":["ComponentType","isListType","isTypeWithInstructions","IGNORE_FIELDS","TranslationRowTypes","drillDown","keyConfig","lookupTranslation","buildOverviewSection","getListFromComponent","getPageNum","getQuestionNum","ControllerType","hasComponents","createRow","entity","keyType","pageNum","questionNum","itemNum","translations","validation","keyProperties","innerEnglishContent","jsonSuffix","keyName","jsonPrefix","id","name","type","englishContent","welshContent","formValues","label","getLabel","allowedControllerTypesSet","Set","Page","Repeat","Start","FileUpload","Terminal","buildPage","page","controller","has","translationRows","title","PageHeading","push","guidance","components","Markdown","undefined","PageGuidance","content","RepeatTitle","repeat","options","buildComponent","definition","component","includes","rows","typed","PaymentField","QuestionText","hint","QuestionHint","ShortDescription","PaymentDescription","DeclarationField","DeclarationBody","instructionText","InstructionText","addSelectionOptions","YesNoField","list","items","length","item","listOptions","ListItemText","ListItemHint","buildTranslationDataRows","metadata","translationsJSON","cy","overviewRows","formRows","pages","pageId","questionId"],"sources":["../../../../../src/form/form-editor/translations/translations.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { isListType, isTypeWithInstructions } from '~/src/components/helpers.js'\nimport {\n IGNORE_FIELDS,\n TranslationRowTypes,\n drillDown,\n keyConfig,\n lookupTranslation\n} from '~/src/form/form-editor/translations/translations-config.js'\nimport { buildOverviewSection } from '~/src/form/form-editor/translations/translations-overview.js'\nimport { getListFromComponent } from '~/src/form/utils/list.js'\nimport { getPageNum, getQuestionNum } from '~/src/form/utils/numbering.js'\nimport { ControllerType } from '~/src/pages/enums.js'\nimport { hasComponents } from '~/src/pages/helpers.js'\n\n/**\n * Create a translation row for a single entity field.\n * @param {ComponentDef | Page | Item} entity - The source entity that contains the English content.\n * @param {string} keyType - The translation row type to build.\n * @param {{ pageNum: number, questionNum?: number, itemNum?: number, translations: Record<string, string>, validation?: ValidationFailure<any> }} options - The row context including numbering and translation values.\n * @returns {TranslationRow} The populated translation row for the entity field.\n */\nfunction createRow(\n entity,\n keyType,\n { pageNum, questionNum, itemNum, translations, validation }\n) {\n const keyProperties = keyConfig[keyType]\n\n const innerEnglishContent = drillDown(\n keyType,\n entity,\n keyProperties.jsonSuffix\n )\n\n const keyName = `${keyProperties.jsonPrefix}.${entity.id}.${keyProperties.jsonSuffix}`\n\n return {\n name: keyName,\n type: keyType,\n pageNum,\n questionNum,\n itemNum,\n englishContent: innerEnglishContent,\n welshContent:\n validation?.formValues[keyName] ??\n lookupTranslation(keyName, translations),\n label: keyProperties.getLabel(pageNum, questionNum, itemNum)\n }\n}\n\nconst allowedControllerTypesSet = new Set([\n ControllerType.Page,\n ControllerType.Repeat,\n ControllerType.Start,\n ControllerType.FileUpload,\n ControllerType.Terminal\n])\n\n/**\n * Build the translation rows for a single page.\n * @param {Page} page - The page definition to inspect for translatable content.\n * @param {number} pageNum - The page number used in the generated labels.\n * @param {Record<string, string>} translations - Existing Welsh translations keyed by translation name.\n * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.\n * @returns {TranslationRow[]} The translation rows generated for the page.\n */\nfunction buildPage(page, pageNum, translations, validation) {\n if (page.controller && !allowedControllerTypesSet.has(page.controller)) {\n return []\n }\n\n const translationRows = []\n if (page.title) {\n const keyProperties = keyConfig[TranslationRowTypes.PageHeading]\n\n const keyName = `${keyProperties.jsonPrefix}.${page.id}.${keyProperties.jsonSuffix}`\n\n translationRows.push({\n name: keyName,\n type: TranslationRowTypes.PageHeading,\n pageNum,\n englishContent: page.title,\n welshContent:\n validation?.formValues[keyName] ??\n lookupTranslation(keyName, translations),\n label: keyProperties.getLabel(pageNum)\n })\n }\n\n const guidance =\n hasComponents(page) && page.components[0].type === ComponentType.Markdown\n ? page.components[0]\n : undefined\n if (guidance) {\n const keyProperties = keyConfig[TranslationRowTypes.PageGuidance]\n const keyName = `${keyProperties.jsonPrefix}.${guidance.id}.${keyProperties.jsonSuffix}`\n\n translationRows.push({\n name: keyName,\n type: TranslationRowTypes.PageGuidance,\n pageNum,\n englishContent: guidance.content,\n welshContent:\n validation?.formValues[keyName] ??\n lookupTranslation(keyName, translations),\n label: keyProperties.getLabel(pageNum)\n })\n }\n\n if (page.controller === ControllerType.Repeat) {\n const keyProperties = keyConfig[TranslationRowTypes.RepeatTitle]\n const keyName = `${keyProperties.jsonPrefix}.${page.id}.${keyProperties.jsonSuffix}`\n\n translationRows.push({\n name: keyName,\n type: TranslationRowTypes.RepeatTitle,\n pageNum,\n englishContent: page.repeat.options.title,\n welshContent:\n validation?.formValues[keyName] ??\n lookupTranslation(keyName, translations),\n label: keyProperties.getLabel(pageNum)\n })\n }\n\n return translationRows\n}\n\n/**\n * Build the translation rows for a single component.\n * @param {FormDefinition} definition - The overall form definition used to resolve list-based content.\n * @param {ComponentDef} component - The component to inspect for translatable fields.\n * @param {number} pageNum - The page number used in the generated labels.\n * @param {number} questionNum - The question number used in the generated labels.\n * @param {Record<string, string>} translations - Existing Welsh translations keyed by translation name.\n * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.\n * @returns {TranslationRow[]} The translation rows generated for the component.\n */\nfunction buildComponent(\n definition,\n component,\n pageNum,\n questionNum,\n translations,\n validation\n) {\n if (IGNORE_FIELDS.includes(component.type)) {\n return []\n }\n\n const rows = []\n\n const options = { pageNum, questionNum, translations, validation }\n\n const typed = /** @type {InputFieldsComponentsDef} */ (component)\n if (typed.title && component.type !== ComponentType.PaymentField) {\n rows.push(createRow(component, TranslationRowTypes.QuestionText, options))\n }\n if (typed.hint) {\n rows.push(createRow(component, TranslationRowTypes.QuestionHint, options))\n }\n\n if (component.type !== ComponentType.PaymentField) {\n rows.push(\n createRow(component, TranslationRowTypes.ShortDescription, options)\n )\n } else {\n rows.push(\n createRow(component, TranslationRowTypes.PaymentDescription, options)\n )\n }\n\n if (component.type === ComponentType.DeclarationField) {\n rows.push(\n createRow(component, TranslationRowTypes.DeclarationBody, options)\n )\n }\n\n if (component.type === ComponentType.PaymentField) {\n rows.push(\n createRow(component, TranslationRowTypes.PaymentDescription, options)\n )\n }\n\n if (typed.options.instructionText && isTypeWithInstructions(component.type)) {\n rows.push(\n createRow(component, TranslationRowTypes.InstructionText, options)\n )\n }\n\n if (isListType(component.type)) {\n addSelectionOptions(rows, component, definition, options)\n }\n return rows\n}\n\n/**\n * Add translation rows for the select item options of a list-based component.\n * @param {any[]} rows - The accumulator for translation rows.\n * @param {ComponentDef} component - The list-based component to inspect.\n * @param {FormDefinition} definition - The form definition that contains the option list data.\n * @param {{ pageNum: number, questionNum?: number, translations: Record<string, string>, validation?: ValidationFailure<any> }} options - The row context including numbering and translation values.\n */\nfunction addSelectionOptions(rows, component, definition, options) {\n // Temporary workaround - ignore for Yes/No and use defaults in the plugin,\n // until we create a solution that allows users to override the Yes/No options\n if (component.type === ComponentType.YesNoField) {\n return\n }\n\n const list = getListFromComponent(component, definition)\n if (list?.items.length) {\n let itemNum = 0\n for (const item of list.items) {\n itemNum++\n const listOptions = {\n ...options,\n itemNum\n }\n if (item.hint) {\n rows.push(\n createRow(item, TranslationRowTypes.ListItemText, listOptions),\n createRow(item, TranslationRowTypes.ListItemHint, listOptions)\n )\n } else {\n rows.push(\n createRow(item, TranslationRowTypes.ListItemText, listOptions)\n )\n }\n }\n }\n}\n\n/**\n * Build the overview and form translation rows for a form definition.\n * @param {FormMetadata} metadata - The form metadata used to build the overview section.\n * @param {FormDefinition} definition - The form definition containing pages and components.\n * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.\n * @returns {{ overviewRows: TranslationRow[], formRows: TranslationRow[] }} The generated overview and form translation rows.\n */\nexport function buildTranslationDataRows(metadata, definition, validation) {\n const translationsJSON = /** @type {Record<string, string>} */ (\n // @ts-expect-error - dynamic language definition\n definition.metadata?.translations?.cy\n )\n\n const overviewRows = buildOverviewSection(\n metadata,\n definition,\n translationsJSON,\n validation\n )\n\n const formRows = []\n for (const page of definition.pages) {\n const pageId = /** @type {string} */ (page.id)\n const pageNum = getPageNum(definition, pageId)\n const components = hasComponents(page) ? page.components : []\n if (components.length === 0) {\n continue\n }\n\n formRows.push(...buildPage(page, pageNum, translationsJSON, validation))\n\n for (const component of components) {\n if (component.type === ComponentType.Markdown) {\n continue\n }\n const questionId = /** @type {string} */ (component.id)\n const questionNum = getQuestionNum(definition, pageId, questionId)\n\n formRows.push(\n ...buildComponent(\n definition,\n component,\n pageNum,\n questionNum,\n translationsJSON,\n validation\n )\n )\n }\n }\n\n return {\n overviewRows,\n formRows\n }\n}\n\n/**\n * @import { ComponentDef, InputFieldsComponentsDef } from '~/src/components/types.js'\n * @import { FormMetadata } from '~/src/form/form-metadata/types.js'\n * @import { FormDefinition, Item, Page } from '~/src/form/form-definition/types.js'\n * @import { TranslationRow, ValidationFailure } from '~/src/form/form-editor/translations/translations-config.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,UAAU,EAAEC,sBAAsB;AAC3C,SACEC,aAAa,EACbC,mBAAmB,EACnBC,SAAS,EACTC,SAAS,EACTC,iBAAiB;AAEnB,SAASC,oBAAoB;AAC7B,SAASC,oBAAoB;AAC7B,SAASC,UAAU,EAAEC,cAAc;AACnC,SAASC,cAAc;AACvB,SAASC,aAAa;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,SAASA,CAChBC,MAAM,EACNC,OAAO,EACP;EAAEC,OAAO;EAAEC,WAAW;EAAEC,OAAO;EAAEC,YAAY;EAAEC;AAAW,CAAC,EAC3D;EACA,MAAMC,aAAa,GAAGhB,SAAS,CAACU,OAAO,CAAC;EAExC,MAAMO,mBAAmB,GAAGlB,SAAS,CACnCW,OAAO,EACPD,MAAM,EACNO,aAAa,CAACE,UAChB,CAAC;EAED,MAAMC,OAAO,GAAG,GAAGH,aAAa,CAACI,UAAU,IAAIX,MAAM,CAACY,EAAE,IAAIL,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AAQ,CAACxC,IAAI,CAAC,GAAGP,SAAS,CAACC,IAAI,EAAE1B,OAAO,EAAEqE,gBAAgB,EAAEjE,UAAU,CAAC,CAAC;IAExE,KAAK,MAAMwC,SAAS,IAAIV,UAAU,EAAE;MAClC,IAAIU,SAAS,CAAChC,IAAI,KAAK7B,aAAa,CAACoD,QAAQ,EAAE;QAC7C;MACF;MACA,MAAMwC,UAAU,GAAG,qBAAuB/B,SAAS,CAAClC,EAAG;MACvD,MAAMT,WAAW,GAAGP,cAAc,CAACiD,UAAU,EAAE+B,MAAM,EAAEC,UAAU,CAAC;MAElEH,QAAQ,CAACxC,IAAI,CACX,GAAGU,cAAc,CACfC,UAAU,EACVC,SAAS,EACT5C,OAAO,EACPC,WAAW,EACXoE,gBAAgB,EAChBjE,UACF,CACF,CAAC;IACH;EACF;EAEA,OAAO;IACLmE,YAAY;IACZC;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import {\n type ComponentType,\n type GeospatialFieldGeometryTypesEnum\n} from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type GeospatialFieldOptionsCountry,\n type TelephoneNumberFieldOptionsFormat\n} from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n type ConditionWrapperV2,\n type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n /**\n * The type of the page\n */\n pageType: string\n\n /**\n * The type of the question\n */\n questionType: string | undefined\n\n /**\n * The sub-type of written answer\n */\n writtenAnswerSub: string\n\n /**\n * The sub-type of date\n */\n dateSub: string\n\n /**\n * The sub-type of location\n */\n locationSub: string\n\n /**\n * The sub-type of lists\n */\n listSub: string\n\n /**\n * The name of the question (unique id)\n */\n name: string\n\n /**\n * The text of the question\n */\n question: string\n\n /**\n * The hint text of the question\n */\n hintText: string\n\n /**\n * Denotes if the question is optional\n */\n questionOptional: string\n\n /**\n * The short description of the question\n */\n shortDescription: string\n\n /**\n * The error description of the question\n */\n errorDescription: string\n\n /**\n * The value of checkbox to reveal instruction text field\n */\n giveInstructions: string\n\n /**\n * The instruction text for location components (optional)\n */\n instructionText: string\n\n /**\n * The value of checkbox to reveal heading and guidance section\n */\n pageHeadingAndGuidance: string\n\n /**\n * The page heading\n */\n pageHeading: string\n\n /**\n * The page guidance text\n */\n guidanceText: string\n\n /**\n * The value of checkbox to reveal repeater section\n */\n repeater: string\n\n /**\n * The maximum number of repeater items\n */\n minItems: number\n\n /**\n * The minimum number of repeater items\n */\n maxItems: number\n\n /**\n * The repeater question set name\n */\n questionSetName: string\n\n /**\n * The value of radio to reveal declaration text field\n */\n needDeclaration: string\n\n /**\n * The check answers declaration text\n */\n declarationText: string\n\n /**\n * Whether confirmation e-mails should be disabled\n */\n disableConfirmationEmail: boolean\n\n /**\n * Whether reference numbers should be enabled\n */\n enableReferenceNumber: boolean\n\n /**\n * Whether user feedback should be disabled\n */\n disableUserFeedback: boolean\n\n /**\n * The min length a field can have\n */\n minLength: string\n\n /**\n * The max length a field can have\n */\n maxLength: string\n\n /**\n * The regex value of a field\n */\n regex: string\n\n /**\n * The number of rows of a textarea\n */\n rows: string\n\n /**\n * The classes to be applied to a field\n */\n classes: string\n\n /**\n * The prefix to be applied to a field\n */\n prefix: string\n\n /**\n * The suffix to be applied to a field\n */\n suffix: string\n\n /**\n * The decimal precision of a number field\n */\n precision: string\n\n /**\n * The lowest number allowed in a field\n */\n min: string\n\n /**\n * The highest number allowed in a field\n */\n max: string\n\n /**\n * The maximum days in the future to allow for a date\n */\n maxFuture: string\n\n /**\n * The maximum days in the past to allow for a date\n */\n maxPast: string\n\n /**\n * The earliest date in a date range that users can enter (YYYY-MM-DD)\n */\n earliestDate: string\n\n /**\n * The latest date in a date range that users can enter (YYYY-MM-DD)\n */\n latestDate: string\n\n /**\n * The earliest month and year in a date range that users can enter (YYYY-MM)\n */\n earliestMonthYear: string\n\n /**\n * The latest month and year in a date range that users can enter (YYYY-MM)\n */\n latestMonthYear: string\n\n /**\n * The exact number of files to upload\n */\n exactFiles: string\n\n /**\n * The minimum number of files to upload\n */\n minFiles: string\n\n /**\n * The maximum number of files to upload\n */\n maxFiles: string\n\n /**\n * The type of files for upload\n */\n fileTypes: string[]\n\n /**\n * The types of document files for upload\n */\n documentTypes: string[]\n\n /**\n * The types of image files for upload\n */\n imageTypes: string[]\n\n /**\n * The types of tabular data files for upload\n */\n tabularDataTypes: string[]\n\n /**\n * The action required from within a sub-section\n */\n enhancedAction: string\n\n /**\n * Placeholder for inserted section to handle adding/editing radios or checkboxes\n */\n radiosOrCheckboxes: string\n\n /**\n * The unique id of the radio item\n */\n radioId: string\n\n /**\n * The display text of the radio item\n */\n radioText?: string\n\n /**\n * The hint of the radio item\n */\n radioHint?: string\n\n /**\n * The value of the radio item\n */\n radioValue?: string\n\n /**\n * The list name to be applied to a field (if applicable)\n */\n list: string\n\n /**\n * List items in JSON format, such as for radios ro checkboxes\n */\n listItemsData: string\n\n /**\n * The exact number of items to select\n */\n exactChecks: string\n\n /**\n * The minimum number of items to select\n */\n minChecks: string\n\n /**\n * The maximum number of items to select\n */\n maxChecks: string\n\n /**\n * An array of options for autocomplete\n */\n autoCompleteOptions: Item[]\n\n /**\n * Set to 'true' is Javascript is enabled\n */\n jsEnabled: string\n\n /**\n * List item id for conditions\n */\n itemId: string\n\n /**\n * Relative date period for conditions\n */\n period: string\n\n /**\n * Relative date unit for conditions\n */\n unit: DateUnits\n\n /**\n * Relative date direction for conditions\n */\n direction: DateDirections\n\n /**\n * Denotes if page is an Exit Page\n */\n exitPage: boolean\n\n /**\n * Denotes if the UK address question supports postcode lookup\n */\n usePostcodeLookup: string\n\n /**\n * Amount of payment in pounds\n */\n paymentAmount: string\n\n /**\n * Virtual marker for the conditional payment amounts editor section.\n * Carries no own value; rendered via a custom template.\n */\n paymentConditionalAmounts: string\n\n /**\n * Description of the payment (will appear in the payment provider's pages)\n */\n paymentDescription: string\n\n /**\n * Test API key used for test payments\n */\n paymentTestApiKey: string\n\n /**\n * Live API key used for live payments\n */\n paymentLiveApiKey: string\n\n /**\n * Inline conditional-amount editor: amount input value\n */\n conditionalAmount: string\n\n /**\n * Inline conditional-amount editor: selected condition id\n */\n conditionalAmountCondition: string\n\n /**\n * Title that user supplies a section\n */\n sectionTitle: string\n\n /**\n * The country restriction for geospatial questions\n */\n countries?: (GeospatialFieldOptionsCountry | 'any')[]\n\n /**\n * The exact number of features to define for geospatial questions\n */\n exactFeatures: string\n\n /**\n * The minimum number of features to define for geospatial questions\n */\n minFeatures: string\n\n /**\n * The maximum number of features to define for geospatial questions\n */\n maxFeatures: string\n\n /**\n * The geometry types restriction for geospatial questions\n */\n geometryTypes?: GeospatialFieldGeometryTypesEnum[]\n\n /**\n * The format restriction for telephone number questions\n */\n telephoneNumberFormat?: TelephoneNumberFieldOptionsFormat | 'any'\n}\n\nexport type FormEditorInputPage = Pick<\n FormEditor,\n | 'pageType'\n | 'questionType'\n | 'writtenAnswerSub'\n | 'dateSub'\n | 'locationSub'\n | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n FormEditor,\n 'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputConfirmationEmailSettings = Pick<\n FormEditor,\n 'disableConfirmationEmail'\n>\n\nexport type FormEditorInputReferenceNumberSettings = Pick<\n FormEditor,\n 'enableReferenceNumber'\n>\n\nexport type FormEditorInputUserFeedbackSettings = Pick<\n FormEditor,\n 'disableUserFeedback'\n>\n\nexport type FormEditorInputQuestion = Pick<\n FormEditor,\n | 'questionType'\n | 'name'\n | 'question'\n | 'shortDescription'\n | 'errorDescription'\n | 'hintText'\n | 'declarationText'\n | 'questionOptional'\n | 'minLength'\n | 'maxLength'\n | 'regex'\n | 'rows'\n | 'classes'\n | 'prefix'\n | 'suffix'\n | 'precision'\n | 'min'\n | 'max'\n | 'maxFuture'\n | 'maxPast'\n | 'earliestDate'\n | 'latestDate'\n | 'earliestMonthYear'\n | 'latestMonthYear'\n | 'exactFiles'\n | 'minFiles'\n | 'maxFiles'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'list'\n | 'listItemsData'\n | 'exactChecks'\n | 'minChecks'\n | 'maxChecks'\n | 'jsEnabled'\n | 'usePostcodeLookup'\n | 'giveInstructions'\n | 'instructionText'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n | 'geometryTypes'\n | 'countries'\n | 'exactFeatures'\n | 'minFeatures'\n | 'maxFeatures'\n | 'telephoneNumberFormat'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n FormEditorInputQuestion,\n | 'question'\n | 'hintText'\n | 'shortDescription'\n | 'errorDescription'\n | 'questionOptional'\n | 'questionType'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'listItemsData'\n | 'jsEnabled'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n id?: string\n text?: string\n hint?: {\n text: string\n }\n value?: ListValue\n}\n\nexport interface ListLabel {\n text: string\n classes: string\n}\n\nexport interface ListElement extends ListItem {\n readonly id: string\n text: string\n value: ListValue\n label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n readonly text: string\n readonly hint?: ReadonlyHint\n readonly value: ListValue\n readonly label?: ListLabel\n}\n\nexport interface DateItem {\n name: string\n classes: string\n}\n\nexport interface ListConflict {\n conflictItem: {\n id: string\n text: string\n }\n originalItem?: {\n id: string\n text: string\n }\n conditionNames: string[]\n linkableItems: {\n id?: string\n text: string\n value: string | number | boolean\n }[]\n closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n questionType?: ComponentType\n questionDetails?: Partial<ComponentDef>\n editRow?: {\n radioId?: string\n radioText?: string\n radioHint?: string\n radioValue?: ListValue\n expanded?: boolean\n }\n listItems?: ListItem[]\n isReordering?: boolean\n lastMovedId?: string\n lastMoveDirection?: string\n listConflicts?: ListConflict[]\n conditionalAmounts?: ConditionalAmountState[]\n conditionalAmountEditRow?: ConditionalAmountEditRow\n}\n\nexport interface ConditionalAmountState {\n id: string\n amount: number\n condition: string\n}\n\nexport interface ConditionalAmountEditRow {\n expanded: boolean\n id?: string\n amount?: number | string\n condition?: string\n}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n pageCondition: string | undefined\n pageConditionDetails: ConditionWrapperV2 | undefined\n pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\n hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n key?: {\n text?: string\n classes?: string\n }\n value?: {\n text?: string\n html?: string\n classes?: string\n }\n}\n\nexport interface GovukField {\n id?: string\n name?: string\n idPrefix?: string\n fieldset?: {\n legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n }\n value?: string | boolean | number | string[] | Item[]\n classes?: string\n label?: {\n text?: string\n html?: string\n classes?: string\n isPageHeading?: boolean\n }\n hint?: { text?: string; html?: string; classes?: string }\n items?: GovukFieldItem[]\n rows?: number\n type?: string\n customTemplate?: string\n formGroup?: {\n classes?: string\n }\n prefix?: {\n text?: string\n }\n preContent?: {\n path?: string\n }\n postContent?: {\n path?: string\n }\n disabled?: boolean\n customMeta?: object\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n name: 'questionOptional'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n name: 'usePostcodeLookup'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: GovukField\n instructionText?: GovukField\n questionOptional?: GovukField\n shortDescription?: GovukField\n errorDescription?: GovukField\n fileTypes?: GovukField\n documentTypes?: GovukField\n imageTypes?: GovukField\n tabularDataTypes?: GovukField\n radiosOrCheckboxes?: GovukField\n autoCompleteOptions?: GovukField\n usePostcodeLookup?: GovukField\n declarationText?: GovukField\n paymentAmount?: GovukField\n paymentConditionalAmounts?: GovukField\n paymentDescription?: GovukField\n paymentTestApiKey?: GovukField\n paymentLiveApiKey?: GovukField\n errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n FormEditorGovukField,\n 'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n text?: string\n hint?: {\n text?: string\n }\n value?: string\n divider?: {\n text?: string\n hint?: string\n value?: string\n }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n ComponentType,\n Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n min?: { fieldName: string; placeholder: string }\n max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import {\n type ComponentType,\n type GeospatialFieldGeometryTypesEnum\n} from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type GeospatialFieldOptionsCountry,\n type TelephoneNumberFieldOptionsFormat\n} from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n type ConditionWrapperV2,\n type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n /**\n * The type of the page\n */\n pageType: string\n\n /**\n * The type of the question\n */\n questionType: string | undefined\n\n /**\n * The sub-type of written answer\n */\n writtenAnswerSub: string\n\n /**\n * The sub-type of date\n */\n dateSub: string\n\n /**\n * The sub-type of location\n */\n locationSub: string\n\n /**\n * The sub-type of lists\n */\n listSub: string\n\n /**\n * The name of the question (unique id)\n */\n name: string\n\n /**\n * The text of the question\n */\n question: string\n\n /**\n * The hint text of the question\n */\n hintText: string\n\n /**\n * Denotes if the question is optional\n */\n questionOptional: string\n\n /**\n * The short description of the question\n */\n shortDescription: string\n\n /**\n * The error description of the question\n */\n errorDescription: string\n\n /**\n * The value of checkbox to reveal instruction text field\n */\n giveInstructions: string\n\n /**\n * The instruction text for location components (optional)\n */\n instructionText: string\n\n /**\n * The value of checkbox to reveal heading and guidance section\n */\n pageHeadingAndGuidance: string\n\n /**\n * The page heading\n */\n pageHeading: string\n\n /**\n * The page guidance text\n */\n guidanceText: string\n\n /**\n * The value of checkbox to reveal repeater section\n */\n repeater: string\n\n /**\n * The maximum number of repeater items\n */\n minItems: number\n\n /**\n * The minimum number of repeater items\n */\n maxItems: number\n\n /**\n * The repeater question set name\n */\n questionSetName: string\n\n /**\n * The value of radio to reveal declaration text field\n */\n needDeclaration: string\n\n /**\n * The check answers declaration text\n */\n declarationText: string\n\n /**\n * Whether confirmation e-mails should be disabled\n */\n disableConfirmationEmail: boolean\n\n /**\n * Whether reference numbers should be enabled\n */\n enableReferenceNumber: boolean\n\n /**\n * Whether user feedback should be disabled\n */\n disableUserFeedback: boolean\n\n /**\n * The min length a field can have\n */\n minLength: string\n\n /**\n * The max length a field can have\n */\n maxLength: string\n\n /**\n * The regex value of a field\n */\n regex: string\n\n /**\n * The number of rows of a textarea\n */\n rows: string\n\n /**\n * The classes to be applied to a field\n */\n classes: string\n\n /**\n * The prefix to be applied to a field\n */\n prefix: string\n\n /**\n * The suffix to be applied to a field\n */\n suffix: string\n\n /**\n * The decimal precision of a number field\n */\n precision: string\n\n /**\n * The lowest number allowed in a field\n */\n min: string\n\n /**\n * The highest number allowed in a field\n */\n max: string\n\n /**\n * The maximum days in the future to allow for a date\n */\n maxFuture: string\n\n /**\n * The maximum days in the past to allow for a date\n */\n maxPast: string\n\n /**\n * The earliest date in a date range that users can enter (YYYY-MM-DD)\n */\n earliestDate: string\n\n /**\n * The latest date in a date range that users can enter (YYYY-MM-DD)\n */\n latestDate: string\n\n /**\n * The earliest month and year in a date range that users can enter (YYYY-MM)\n */\n earliestMonthYear: string\n\n /**\n * The latest month and year in a date range that users can enter (YYYY-MM)\n */\n latestMonthYear: string\n\n /**\n * The exact number of files to upload\n */\n exactFiles: string\n\n /**\n * The minimum number of files to upload\n */\n minFiles: string\n\n /**\n * The maximum number of files to upload\n */\n maxFiles: string\n\n /**\n * The type of files for upload\n */\n fileTypes: string[]\n\n /**\n * The types of document files for upload\n */\n documentTypes: string[]\n\n /**\n * The types of image files for upload\n */\n imageTypes: string[]\n\n /**\n * The types of tabular data files for upload\n */\n tabularDataTypes: string[]\n\n /**\n * The action required from within a sub-section\n */\n enhancedAction: string\n\n /**\n * Placeholder for inserted section to handle adding/editing radios or checkboxes\n */\n radiosOrCheckboxes: string\n\n /**\n * The unique id of the radio item\n */\n radioId: string\n\n /**\n * The display text of the radio item\n */\n radioText?: string\n\n /**\n * The hint of the radio item\n */\n radioHint?: string\n\n /**\n * The value of the radio item\n */\n radioValue?: string\n\n /**\n * The list name to be applied to a field (if applicable)\n */\n list: string\n\n /**\n * List items in JSON format, such as for radios ro checkboxes\n */\n listItemsData: string\n\n /**\n * The exact number of items to select\n */\n exactChecks: string\n\n /**\n * The minimum number of items to select\n */\n minChecks: string\n\n /**\n * The maximum number of items to select\n */\n maxChecks: string\n\n /**\n * An array of options for autocomplete\n */\n autoCompleteOptions: Item[]\n\n /**\n * Set to 'true' is Javascript is enabled\n */\n jsEnabled: string\n\n /**\n * List item id for conditions\n */\n itemId: string\n\n /**\n * Relative date period for conditions\n */\n period: string\n\n /**\n * Relative date unit for conditions\n */\n unit: DateUnits\n\n /**\n * Relative date direction for conditions\n */\n direction: DateDirections\n\n /**\n * Denotes if page is an Exit Page\n */\n exitPage: boolean\n\n /**\n * Denotes if the UK address question supports postcode lookup\n */\n usePostcodeLookup: string\n\n /**\n * Amount of payment in pounds\n */\n paymentAmount: string\n\n /**\n * Virtual marker for the conditional payment amounts editor section.\n * Carries no own value; rendered via a custom template.\n */\n paymentConditionalAmounts: string\n\n /**\n * Description of the payment (will appear in the payment provider's pages)\n */\n paymentDescription: string\n\n /**\n * Test API key used for test payments\n */\n paymentTestApiKey: string\n\n /**\n * Live API key used for live payments\n */\n paymentLiveApiKey: string\n\n /**\n * Inline conditional-amount editor: amount input value\n */\n conditionalAmount: string\n\n /**\n * Inline conditional-amount editor: selected condition id\n */\n conditionalAmountCondition: string\n\n /**\n * Title that user supplies a section\n */\n sectionTitle: string\n\n /**\n * The country restriction for geospatial questions\n */\n countries?: (GeospatialFieldOptionsCountry | 'any')[]\n\n /**\n * The exact number of features to define for geospatial questions\n */\n exactFeatures: string\n\n /**\n * The minimum number of features to define for geospatial questions\n */\n minFeatures: string\n\n /**\n * The maximum number of features to define for geospatial questions\n */\n maxFeatures: string\n\n /**\n * The geometry types restriction for geospatial questions\n */\n geometryTypes?: GeospatialFieldGeometryTypesEnum[]\n\n /**\n * The layers to include for map-based geospatial questions\n */\n mapLayers?: string[]\n\n /**\n * The format restriction for telephone number questions\n */\n telephoneNumberFormat?: TelephoneNumberFieldOptionsFormat | 'any'\n}\n\nexport type FormEditorInputPage = Pick<\n FormEditor,\n | 'pageType'\n | 'questionType'\n | 'writtenAnswerSub'\n | 'dateSub'\n | 'locationSub'\n | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n FormEditor,\n 'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputConfirmationEmailSettings = Pick<\n FormEditor,\n 'disableConfirmationEmail'\n>\n\nexport type FormEditorInputReferenceNumberSettings = Pick<\n FormEditor,\n 'enableReferenceNumber'\n>\n\nexport type FormEditorInputUserFeedbackSettings = Pick<\n FormEditor,\n 'disableUserFeedback'\n>\n\nexport type FormEditorInputQuestion = Pick<\n FormEditor,\n | 'questionType'\n | 'name'\n | 'question'\n | 'shortDescription'\n | 'errorDescription'\n | 'hintText'\n | 'declarationText'\n | 'questionOptional'\n | 'minLength'\n | 'maxLength'\n | 'regex'\n | 'rows'\n | 'classes'\n | 'prefix'\n | 'suffix'\n | 'precision'\n | 'min'\n | 'max'\n | 'maxFuture'\n | 'maxPast'\n | 'earliestDate'\n | 'latestDate'\n | 'earliestMonthYear'\n | 'latestMonthYear'\n | 'exactFiles'\n | 'minFiles'\n | 'maxFiles'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'list'\n | 'listItemsData'\n | 'exactChecks'\n | 'minChecks'\n | 'maxChecks'\n | 'jsEnabled'\n | 'usePostcodeLookup'\n | 'giveInstructions'\n | 'instructionText'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n | 'geometryTypes'\n | 'countries'\n | 'exactFeatures'\n | 'minFeatures'\n | 'maxFeatures'\n | 'telephoneNumberFormat'\n | 'mapLayers'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n FormEditorInputQuestion,\n | 'question'\n | 'hintText'\n | 'shortDescription'\n | 'errorDescription'\n | 'questionOptional'\n | 'questionType'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'listItemsData'\n | 'jsEnabled'\n | 'paymentAmount'\n | 'paymentDescription'\n | 'paymentTestApiKey'\n | 'paymentLiveApiKey'\n | 'conditionalAmount'\n | 'conditionalAmountCondition'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n id?: string\n text?: string\n hint?: {\n text: string\n }\n value?: ListValue\n}\n\nexport interface ListLabel {\n text: string\n classes: string\n}\n\nexport interface ListElement extends ListItem {\n readonly id: string\n text: string\n value: ListValue\n label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n readonly text: string\n readonly hint?: ReadonlyHint\n readonly value: ListValue\n readonly label?: ListLabel\n}\n\nexport interface DateItem {\n name: string\n classes: string\n}\n\nexport interface ListConflict {\n conflictItem: {\n id: string\n text: string\n }\n originalItem?: {\n id: string\n text: string\n }\n conditionNames: string[]\n linkableItems: {\n id?: string\n text: string\n value: string | number | boolean\n }[]\n closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n questionType?: ComponentType\n questionDetails?: Partial<ComponentDef>\n editRow?: {\n radioId?: string\n radioText?: string\n radioHint?: string\n radioValue?: ListValue\n expanded?: boolean\n }\n listItems?: ListItem[]\n isReordering?: boolean\n lastMovedId?: string\n lastMoveDirection?: string\n listConflicts?: ListConflict[]\n conditionalAmounts?: ConditionalAmountState[]\n conditionalAmountEditRow?: ConditionalAmountEditRow\n}\n\nexport interface ConditionalAmountState {\n id: string\n amount: number\n condition: string\n}\n\nexport interface ConditionalAmountEditRow {\n expanded: boolean\n id?: string\n amount?: number | string\n condition?: string\n}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n pageCondition: string | undefined\n pageConditionDetails: ConditionWrapperV2 | undefined\n pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\n hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n key?: {\n text?: string\n classes?: string\n }\n value?: {\n text?: string\n html?: string\n classes?: string\n }\n}\n\nexport interface GovukField {\n id?: string\n name?: string\n idPrefix?: string\n fieldset?: {\n legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n }\n value?: string | boolean | number | string[] | Item[]\n classes?: string\n label?: {\n text?: string\n html?: string\n classes?: string\n isPageHeading?: boolean\n }\n hint?: { text?: string; html?: string; classes?: string }\n items?: GovukFieldItem[]\n rows?: number\n type?: string\n customTemplate?: string\n formGroup?: {\n classes?: string\n }\n prefix?: {\n text?: string\n }\n preContent?: {\n path?: string\n }\n postContent?: {\n path?: string\n }\n disabled?: boolean\n customMeta?: object\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n name: 'questionOptional'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n name: 'usePostcodeLookup'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: GovukField\n instructionText?: GovukField\n questionOptional?: GovukField\n shortDescription?: GovukField\n errorDescription?: GovukField\n fileTypes?: GovukField\n documentTypes?: GovukField\n imageTypes?: GovukField\n tabularDataTypes?: GovukField\n radiosOrCheckboxes?: GovukField\n autoCompleteOptions?: GovukField\n usePostcodeLookup?: GovukField\n declarationText?: GovukField\n paymentAmount?: GovukField\n paymentConditionalAmounts?: GovukField\n paymentDescription?: GovukField\n paymentTestApiKey?: GovukField\n paymentLiveApiKey?: GovukField\n errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n FormEditorGovukField,\n 'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n text?: string\n hint?: {\n text?: string\n }\n value?: string\n divider?: {\n text?: string\n hint?: string\n value?: string\n }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n ComponentType,\n Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n min?: { fieldName: string; placeholder: string }\n max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,6 @@
1
+ import { ComponentType } from "../../components/enums.js";
2
+ import { hasListField } from "../../components/helpers.js";
3
+ import { getYesNoList } from "../../components/yes-no-helper.js";
1
4
  /**
2
5
  * Given a SelectionComponent finds the associated list
3
6
  * @param {ListComponentsDef} selectionComponent
@@ -12,4 +15,24 @@ export function findDefinitionListFromComponent(selectionComponent, definition)
12
15
  }
13
16
  return list;
14
17
  }
18
+
19
+ /**
20
+ * Finds the list in the component, if it exists. Handles a Yes/No list which doesn't link to the list in the normal way
21
+ * @param { ComponentDef | undefined } component
22
+ * @param {FormDefinition} definition
23
+ * @returns { List | undefined }
24
+ */
25
+ export function getListFromComponent(component, definition) {
26
+ if (!component) {
27
+ return undefined;
28
+ }
29
+ if (component.type === ComponentType.YesNoField) {
30
+ return getYesNoList();
31
+ }
32
+ const listId = hasListField(component) ? component.list : undefined;
33
+ if (listId) {
34
+ return definition.lists.find(list => list.id === listId);
35
+ }
36
+ return undefined;
37
+ }
15
38
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","names":["findDefinitionListFromComponent","selectionComponent","definition","listId","list","lists","find","id","undefined","Error"],"sources":["../../../../src/form/utils/list.ts"],"sourcesContent":["import { type ListComponentsDef } from '~/src/components/types.js'\nimport {\n type FormDefinition,\n type List\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Given a SelectionComponent finds the associated list\n * @param {ListComponentsDef} selectionComponent\n * @param {FormDefinition} definition\n * @returns {List}\n */\nexport function findDefinitionListFromComponent(\n selectionComponent: ListComponentsDef,\n definition: FormDefinition\n): List {\n const listId = selectionComponent.list\n const list = definition.lists.find((list) => list.id === listId)\n\n if (list === undefined) {\n throw new Error('List not found')\n }\n\n return list\n}\n"],"mappings":"AAMA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,+BAA+BA,CAC7CC,kBAAqC,EACrCC,UAA0B,EACpB;EACN,MAAMC,MAAM,GAAGF,kBAAkB,CAACG,IAAI;EACtC,MAAMA,IAAI,GAAGF,UAAU,CAACG,KAAK,CAACC,IAAI,CAAEF,IAAI,IAAKA,IAAI,CAACG,EAAE,KAAKJ,MAAM,CAAC;EAEhE,IAAIC,IAAI,KAAKI,SAAS,EAAE;IACtB,MAAM,IAAIC,KAAK,CAAC,gBAAgB,CAAC;EACnC;EAEA,OAAOL,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"file":"list.js","names":["ComponentType","hasListField","getYesNoList","findDefinitionListFromComponent","selectionComponent","definition","listId","list","lists","find","id","undefined","Error","getListFromComponent","component","type","YesNoField"],"sources":["../../../../src/form/utils/list.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { hasListField } from '~/src/components/helpers.js'\nimport {\n type ComponentDef,\n type ListComponentsDef\n} from '~/src/components/types.js'\nimport { getYesNoList } from '~/src/components/yes-no-helper.js'\nimport {\n type FormDefinition,\n type List\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Given a SelectionComponent finds the associated list\n * @param {ListComponentsDef} selectionComponent\n * @param {FormDefinition} definition\n * @returns {List}\n */\nexport function findDefinitionListFromComponent(\n selectionComponent: ListComponentsDef,\n definition: FormDefinition\n): List {\n const listId = selectionComponent.list\n const list = definition.lists.find((list) => list.id === listId)\n\n if (list === undefined) {\n throw new Error('List not found')\n }\n\n return list\n}\n\n/**\n * Finds the list in the component, if it exists. Handles a Yes/No list which doesn't link to the list in the normal way\n * @param { ComponentDef | undefined } component\n * @param {FormDefinition} definition\n * @returns { List | undefined }\n */\nexport function getListFromComponent(\n component: ComponentDef | undefined,\n definition: FormDefinition\n) {\n if (!component) {\n return undefined\n }\n\n if (component.type === ComponentType.YesNoField) {\n return getYesNoList()\n }\n\n const listId = hasListField(component) ? component.list : undefined\n\n if (listId) {\n return definition.lists.find((list) => list.id === listId)\n }\n\n return undefined\n}\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,YAAY;AAKrB,SAASC,YAAY;AAMrB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAC7CC,kBAAqC,EACrCC,UAA0B,EACpB;EACN,MAAMC,MAAM,GAAGF,kBAAkB,CAACG,IAAI;EACtC,MAAMA,IAAI,GAAGF,UAAU,CAACG,KAAK,CAACC,IAAI,CAAEF,IAAI,IAAKA,IAAI,CAACG,EAAE,KAAKJ,MAAM,CAAC;EAEhE,IAAIC,IAAI,KAAKI,SAAS,EAAE;IACtB,MAAM,IAAIC,KAAK,CAAC,gBAAgB,CAAC;EACnC;EAEA,OAAOL,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,oBAAoBA,CAClCC,SAAmC,EACnCT,UAA0B,EAC1B;EACA,IAAI,CAACS,SAAS,EAAE;IACd,OAAOH,SAAS;EAClB;EAEA,IAAIG,SAAS,CAACC,IAAI,KAAKf,aAAa,CAACgB,UAAU,EAAE;IAC/C,OAAOd,YAAY,CAAC,CAAC;EACvB;EAEA,MAAMI,MAAM,GAAGL,YAAY,CAACa,SAAS,CAAC,GAAGA,SAAS,CAACP,IAAI,GAAGI,SAAS;EAEnE,IAAIL,MAAM,EAAE;IACV,OAAOD,UAAU,CAACG,KAAK,CAACC,IAAI,CAAEF,IAAI,IAAKA,IAAI,CAACG,EAAE,KAAKJ,MAAM,CAAC;EAC5D;EAEA,OAAOK,SAAS;AAClB","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ import { isFormType } from "../../components/helpers.js";
2
+ import { getPageFromDefinition, hasComponents, isSummaryPage } from "../../pages/helpers.js";
3
+
4
+ /**
5
+ * @param {FormDefinition} definition
6
+ * @param {string} pageId
7
+ */
8
+ export function getPageNum(definition, pageId) {
9
+ if (pageId === 'new') {
10
+ return definition.pages.filter(x => !isSummaryPage(x)).length + 1;
11
+ }
12
+ const pageIdx = definition.pages.findIndex(x => x.id === pageId);
13
+ return pageIdx + 1;
14
+ }
15
+
16
+ /**
17
+ * @param {FormDefinition} definition
18
+ * @param {string} pageId
19
+ */
20
+ export function getQuestionsOnPage(definition, pageId) {
21
+ const page = getPageFromDefinition(definition, pageId);
22
+ return hasComponents(page) ? page.components : [];
23
+ }
24
+
25
+ /**
26
+ * @param {FormDefinition} definition
27
+ * @param {string} pageId
28
+ * @param {string} questionId
29
+ */
30
+ export function getQuestionNum(definition, pageId, questionId) {
31
+ const questions = getQuestionsOnPage(definition, pageId).filter(q => isFormType(q.type) // Exclude non-form components such as Markdown
32
+ );
33
+ if (questionId === 'new') {
34
+ return questions.length + 1;
35
+ }
36
+ const questionIdx = questions.findIndex(x => x.id === questionId);
37
+ return questionIdx === -1 ? questions.length + 1 : questionIdx + 1;
38
+ }
39
+
40
+ /**
41
+ * @import { FormDefinition } from '~/src/form/form-definition/types.js'
42
+ */
43
+ //# sourceMappingURL=numbering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numbering.js","names":["isFormType","getPageFromDefinition","hasComponents","isSummaryPage","getPageNum","definition","pageId","pages","filter","x","length","pageIdx","findIndex","id","getQuestionsOnPage","page","components","getQuestionNum","questionId","questions","q","type","questionIdx"],"sources":["../../../../src/form/utils/numbering.js"],"sourcesContent":["import { isFormType } from '~/src/components/helpers.js'\nimport {\n getPageFromDefinition,\n hasComponents,\n isSummaryPage\n} from '~/src/pages/helpers.js'\n\n/**\n * @param {FormDefinition} definition\n * @param {string} pageId\n */\nexport function getPageNum(definition, pageId) {\n if (pageId === 'new') {\n return definition.pages.filter((x) => !isSummaryPage(x)).length + 1\n }\n const pageIdx = definition.pages.findIndex((x) => x.id === pageId)\n return pageIdx + 1\n}\n\n/**\n * @param {FormDefinition} definition\n * @param {string} pageId\n */\nexport function getQuestionsOnPage(definition, pageId) {\n const page = getPageFromDefinition(definition, pageId)\n return hasComponents(page) ? page.components : []\n}\n\n/**\n * @param {FormDefinition} definition\n * @param {string} pageId\n * @param {string} questionId\n */\nexport function getQuestionNum(definition, pageId, questionId) {\n const questions = getQuestionsOnPage(definition, pageId).filter(\n (q) => isFormType(q.type) // Exclude non-form components such as Markdown\n )\n if (questionId === 'new') {\n return questions.length + 1\n }\n const questionIdx = questions.findIndex((x) => x.id === questionId)\n return questionIdx === -1 ? questions.length + 1 : questionIdx + 1\n}\n\n/**\n * @import { FormDefinition } from '~/src/form/form-definition/types.js'\n */\n"],"mappings":"AAAA,SAASA,UAAU;AACnB,SACEC,qBAAqB,EACrBC,aAAa,EACbC,aAAa;;AAGf;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACC,UAAU,EAAEC,MAAM,EAAE;EAC7C,IAAIA,MAAM,KAAK,KAAK,EAAE;IACpB,OAAOD,UAAU,CAACE,KAAK,CAACC,MAAM,CAAEC,CAAC,IAAK,CAACN,aAAa,CAACM,CAAC,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC;EACrE;EACA,MAAMC,OAAO,GAAGN,UAAU,CAACE,KAAK,CAACK,SAAS,CAAEH,CAAC,IAAKA,CAAC,CAACI,EAAE,KAAKP,MAAM,CAAC;EAClE,OAAOK,OAAO,GAAG,CAAC;AACpB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASG,kBAAkBA,CAACT,UAAU,EAAEC,MAAM,EAAE;EACrD,MAAMS,IAAI,GAAGd,qBAAqB,CAACI,UAAU,EAAEC,MAAM,CAAC;EACtD,OAAOJ,aAAa,CAACa,IAAI,CAAC,GAAGA,IAAI,CAACC,UAAU,GAAG,EAAE;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACZ,UAAU,EAAEC,MAAM,EAAEY,UAAU,EAAE;EAC7D,MAAMC,SAAS,GAAGL,kBAAkB,CAACT,UAAU,EAAEC,MAAM,CAAC,CAACE,MAAM,CAC5DY,CAAC,IAAKpB,UAAU,CAACoB,CAAC,CAACC,IAAI,CAAC,CAAC;EAC5B,CAAC;EACD,IAAIH,UAAU,KAAK,KAAK,EAAE;IACxB,OAAOC,SAAS,CAACT,MAAM,GAAG,CAAC;EAC7B;EACA,MAAMY,WAAW,GAAGH,SAAS,CAACP,SAAS,CAAEH,CAAC,IAAKA,CAAC,CAACI,EAAE,KAAKK,UAAU,CAAC;EACnE,OAAOI,WAAW,KAAK,CAAC,CAAC,GAAGH,SAAS,CAACT,MAAM,GAAG,CAAC,GAAGY,WAAW,GAAG,CAAC;AACpE;;AAEA;AACA;AACA","ignoreList":[]}
@@ -19,6 +19,8 @@ export * from "./form/utils/index.js";
19
19
  export * from "./form/form-editor/enums.js";
20
20
  export * from "./form/form-editor/index.js";
21
21
  export * from "./form/form-editor/preview/index.js";
22
+ export * from "./form/form-editor/translations/translations-config.js";
23
+ export * from "./form/form-editor/translations/translations.js";
22
24
  export * from "./form/form-manager/types.js";
23
25
  export * from "./form/form-manager/errors.js";
24
26
  export * from "./manage/dead-letter-queues.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/random-id.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-definition/helpers.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-metrics/enums.js'\nexport * from '~/src/form/form-metrics/types.js'\nexport * from '~/src/form/form-metrics/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/form-submission/enums.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/enums.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-editor/preview/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/form/form-manager/errors.js'\nexport * from '~/src/manage/dead-letter-queues.js'\nexport * from '~/src/manage/roles.js'\nexport * from '~/src/manage/users.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport * from '~/src/form/form-audit/index.js'\nexport * from '~/src/form/form-audit/enums.js'\nexport * from '~/src/form/form-audit/consolidation.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/preview/types.js'\nexport type * from '~/src/form/form-editor/types.js'\nexport type * from '~/src/form/form-editor/macros/types.js'\nexport type * from '~/src/form/form-audit/types.js'\nexport type * from '~/src/manage/types.js'\n\n// test\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiBA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/random-id.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-definition/helpers.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-metrics/enums.js'\nexport * from '~/src/form/form-metrics/types.js'\nexport * from '~/src/form/form-metrics/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/form-submission/enums.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/enums.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-editor/preview/index.js'\nexport * from '~/src/form/form-editor/translations/translations-config.js'\nexport * from '~/src/form/form-editor/translations/translations.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/form/form-manager/errors.js'\nexport * from '~/src/manage/dead-letter-queues.js'\nexport * from '~/src/manage/roles.js'\nexport * from '~/src/manage/users.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport * from '~/src/form/form-audit/index.js'\nexport * from '~/src/form/form-audit/enums.js'\nexport * from '~/src/form/form-audit/consolidation.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/preview/types.js'\nexport type * from '~/src/form/form-editor/types.js'\nexport type * from '~/src/form/form-editor/macros/types.js'\nexport type * from '~/src/form/form-audit/types.js'\nexport type * from '~/src/manage/types.js'\n\n// test\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiBA","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ export const formDefinitionWithSinglePage: import("../index.js").FormDefinition;
2
+ export const formDefinitionWithoutSummary: import("../index.js").FormDefinition;
3
+ export const formDefinitionWithTwoQuestions: import("../index.js").FormDefinition;
4
+ export const formDefinitionWithTwoQuestionsAndGuidance: import("../index.js").FormDefinition;
5
+ export const formDefinitionWithLocationAndDeclaration: import("../index.js").FormDefinition;
6
+ export const formDefinitionWithRepeater: import("../index.js").FormDefinition;
7
+ export const formDefinitionWithNoQuestions: import("../index.js").FormDefinition;
8
+ export const formDefinitionWithRadioQuestion: import("../index.js").FormDefinition;
9
+ //# sourceMappingURL=examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/examples.js"],"names":[],"mappings":"AAcA,gFAmBE;AAEF,gFAgBE;AAEF,kFAyBE;AAEF,6FA0BE;AAEF,4FA8BE;AAEF,8EAoBE;AAEF,iFAYE;AAEF,mFAsDE"}
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from '../components/enums.js';
2
- import { type ComponentDef, type ConditionalComponentType, type ConditionalComponentsDef, type ContentComponentsDef, type FormComponentsDef, type HtmlComponent, type InputFieldsComponentsDef, type InsetTextComponent, type ListComponent, type ListComponentsDef, type MarkdownComponent, type SelectionComponentsDef } from '../components/types.js';
2
+ import { type ComponentDef, type ComponentsDefWithInstructions, type ConditionalComponentType, type ConditionalComponentsDef, type ContentComponentsDef, type FormComponentsDef, type HtmlComponent, type InputFieldsComponentsDef, type InsetTextComponent, type ListComponent, type ListComponentsDef, type MarkdownComponent, type SelectionComponentsDef } from '../components/types.js';
3
3
  /**
4
4
  * Return component defaults by type
5
5
  */
@@ -36,6 +36,7 @@ export declare function isFormType(type?: ComponentType): type is FormComponents
36
36
  */
37
37
  export declare function hasListField(component?: Partial<ComponentDef>): component is ListComponentsDef;
38
38
  export declare function isListType(type?: ComponentType): type is ListComponentsDef['type'];
39
+ export declare function isTypeWithInstructions(type?: ComponentType): type is ComponentsDefWithInstructions['type'];
39
40
  /**
40
41
  * Filter known form components with input fields
41
42
  * (excludes content and selection fields)
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,2BAA2B,CAAA;AAElC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,YAAY,EACjE,SAAS,CAAC,EAAE,IAAI,C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S,IAAI,OAAO,CACrB,YAAY,EACZ,kBAAkB,GAAG,aAAa,GAAG,iBAAiB,CACvD,CAOA;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,iBAAiB,GAAG,aAAa,CAEhD"}
@@ -149,11 +149,15 @@ export interface UkAddressFieldComponent extends FormFieldBase {
149
149
  usePostcodeLookup?: boolean;
150
150
  };
151
151
  }
152
+ export interface MapLayerOptions {
153
+ sssi?: boolean;
154
+ }
152
155
  export interface EastingNorthingFieldComponent extends FormFieldBase {
153
156
  type: ComponentType.EastingNorthingField;
154
157
  options: FormFieldBase['options'] & {
155
158
  condition?: string;
156
159
  customValidationMessage?: string;
160
+ mapLayers?: MapLayerOptions;
157
161
  };
158
162
  schema?: {
159
163
  easting?: {
@@ -171,6 +175,7 @@ export interface OsGridRefFieldComponent extends FormFieldBase {
171
175
  options: FormFieldBase['options'] & {
172
176
  condition?: string;
173
177
  customValidationMessage?: string;
178
+ mapLayers?: MapLayerOptions;
174
179
  };
175
180
  }
176
181
  export interface NationalGridFieldNumberFieldComponent extends FormFieldBase {
@@ -185,6 +190,7 @@ export interface LatLongFieldComponent extends FormFieldBase {
185
190
  options: FormFieldBase['options'] & {
186
191
  condition?: string;
187
192
  customValidationMessage?: string;
193
+ mapLayers?: MapLayerOptions;
188
194
  };
189
195
  schema?: {
190
196
  latitude?: {
@@ -236,6 +242,7 @@ export interface GeospatialFieldComponent extends FormFieldBase {
236
242
  condition?: string;
237
243
  countries?: GeospatialFieldOptionsCountry[];
238
244
  geometryTypes?: GeospatialFieldGeometryTypesEnum[];
245
+ mapLayers?: MapLayerOptions;
239
246
  };
240
247
  schema?: {
241
248
  max?: number;
@@ -326,6 +333,7 @@ export type InputFieldsComponentsDef = TextFieldComponent | EmailAddressFieldCom
326
333
  export type ContentComponentsDef = DetailsComponent | HtmlComponent | MarkdownComponent | InsetTextComponent | ListComponent | NotificationBannerComponent;
327
334
  export type ListComponentsDef = Exclude<SelectionComponentsDef, YesNoFieldComponent> | ListComponent;
328
335
  export type SelectionComponentsDef = AutocompleteFieldComponent | CheckboxesFieldComponent | RadiosFieldComponent | SelectFieldComponent | YesNoFieldComponent;
336
+ export type ComponentsDefWithInstructions = EastingNorthingFieldComponent | OsGridRefFieldComponent | NationalGridFieldNumberFieldComponent | LatLongFieldComponent;
329
337
  export type ConditionalComponentsDef = Exclude<ComponentDef, InsetTextComponent | ListComponent | MonthYearFieldComponent | UkAddressFieldComponent | FileUploadFieldComponent | PaymentFieldComponent>;
330
338
  export type PreviewType = keyof typeof PreviewTypeEnum;
331
339
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAA;AAE5C,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,wBAAwB,CAAC,MAAM,CAAC,EAChC,oBAAoB,CACrB,CAAA;AAED;;GAEG;AAEH,UAAU,aAAa;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,OAAO,CAAC,EAAE,MAAM,C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,CAAA;CACF;AAED,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,oBAAoB,CAAA;AAGnE,MAAM,MAAM,iBAAiB,GACzB,wBAAwB,GACxB,sBAAsB,CAAA;AAG1B,MAAM,MAAM,wBAAwB,GAChC,kBAAkB,GAClB,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,6BAA6B,GAC7B,uBAAuB,GACvB,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,yBAAyB,GACzB,6BAA6B,GAC7B,uBAAuB,GACvB,qCAAqC,GACrC,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,CAAA;AAG5B,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,aAAa,GACb,2BAA2B,CAAA;AAG/B,MAAM,MAAM,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,GACpD,aAAa,CAAA;AAGjB,MAAM,MAAM,sBAAsB,GAC9B,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,CAAA;AAGvB,MAAM,MAAM,6BAA6B,GACrC,6BAA6B,GAC7B,uBAAuB,GACvB,qCAAqC,GACrC,qBAAqB,CAAA;AAGzB,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,YAAY,EACV,kBAAkB,GAClB,aAAa,GACb,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,eAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,EAAE,EAAE,KAAK,aAAa,EAAyB,MAAM,KAAK,CAAA;AAWxE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB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