@defra/forms-model 3.0.687 → 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 (45) 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-editor/translations/translations-config.js +168 -0
  7. package/dist/module/form/form-editor/translations/translations-config.js.map +1 -0
  8. package/dist/module/form/form-editor/translations/translations-overview.js +93 -0
  9. package/dist/module/form/form-editor/translations/translations-overview.js.map +1 -0
  10. package/dist/module/form/form-editor/translations/translations.js +214 -0
  11. package/dist/module/form/form-editor/translations/translations.js.map +1 -0
  12. package/dist/module/form/utils/list.js +23 -0
  13. package/dist/module/form/utils/list.js.map +1 -1
  14. package/dist/module/form/utils/numbering.js +43 -0
  15. package/dist/module/form/utils/numbering.js.map +1 -0
  16. package/dist/module/index.js +2 -0
  17. package/dist/module/index.js.map +1 -1
  18. package/dist/types/__stubs__/examples.d.ts +9 -0
  19. package/dist/types/__stubs__/examples.d.ts.map +1 -0
  20. package/dist/types/components/helpers.d.ts +2 -1
  21. package/dist/types/components/helpers.d.ts.map +1 -1
  22. package/dist/types/components/types.d.ts +1 -0
  23. package/dist/types/components/types.d.ts.map +1 -1
  24. package/dist/types/form/form-editor/translations/translations-config.d.ts +95 -0
  25. package/dist/types/form/form-editor/translations/translations-config.d.ts.map +1 -0
  26. package/dist/types/form/form-editor/translations/translations-overview.d.ts +14 -0
  27. package/dist/types/form/form-editor/translations/translations-overview.d.ts.map +1 -0
  28. package/dist/types/form/form-editor/translations/translations.d.ts +16 -0
  29. package/dist/types/form/form-editor/translations/translations.d.ts.map +1 -0
  30. package/dist/types/form/utils/list.d.ts +8 -1
  31. package/dist/types/form/utils/list.d.ts.map +1 -1
  32. package/dist/types/form/utils/numbering.d.ts +18 -0
  33. package/dist/types/form/utils/numbering.d.ts.map +1 -0
  34. package/dist/types/index.d.ts +2 -0
  35. package/dist/types/index.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/__stubs__/examples.js +231 -0
  38. package/src/components/helpers.ts +14 -0
  39. package/src/components/types.ts +7 -0
  40. package/src/form/form-editor/translations/translations-config.js +186 -0
  41. package/src/form/form-editor/translations/translations-overview.js +137 -0
  42. package/src/form/form-editor/translations/translations.js +297 -0
  43. package/src/form/utils/list.ts +34 -1
  44. package/src/form/utils/numbering.js +47 -0
  45. 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,sBAA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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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Aa,CAC3B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,wBAAwB,CAEvC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,sBAAsB,CAWrC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,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"}
@@ -333,6 +333,7 @@ export type InputFieldsComponentsDef = TextFieldComponent | EmailAddressFieldCom
333
333
  export type ContentComponentsDef = DetailsComponent | HtmlComponent | MarkdownComponent | InsetTextComponent | ListComponent | NotificationBannerComponent;
334
334
  export type ListComponentsDef = Exclude<SelectionComponentsDef, YesNoFieldComponent> | ListComponent;
335
335
  export type SelectionComponentsDef = AutocompleteFieldComponent | CheckboxesFieldComponent | RadiosFieldComponent | SelectFieldComponent | YesNoFieldComponent;
336
+ export type ComponentsDefWithInstructions = EastingNorthingFieldComponent | OsGridRefFieldComponent | NationalGridFieldNumberFieldComponent | LatLongFieldComponent;
336
337
  export type ConditionalComponentsDef = Exclude<ComponentDef, InsetTextComponent | ListComponent | MonthYearFieldComponent | UkAddressFieldComponent | FileUploadFieldComponent | PaymentFieldComponent>;
337
338
  export type PreviewType = keyof typeof PreviewTypeEnum;
338
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,K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oB,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"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Lookup a translation from a list of translation records.
3
+ * @param {string} key - The translation key to look up.
4
+ * @param {Record<string, string> | undefined} translations - The translation values to search.
5
+ */
6
+ export function lookupTranslation(key: string, translations: Record<string, string> | undefined): string;
7
+ /**
8
+ * Resolve the underlying content for a translation row from an entity.
9
+ * Involves using the appropriate child properties if necessary.
10
+ * @param {string} keyType - The translation row type being resolved.
11
+ * @param {ComponentDef | Page | Item} entity - The entity that may contain the content to translate.
12
+ * @param {string} jsonSuffix - The property name to read from the entity.
13
+ */
14
+ export function drillDown(keyType: string, entity: ComponentDef | Page | Item, jsonSuffix: string): string;
15
+ export namespace TranslationRowTypes {
16
+ let PageHeading: string;
17
+ let PageGuidance: string;
18
+ let RepeatTitle: string;
19
+ let QuestionText: string;
20
+ let QuestionHint: string;
21
+ let ShortDescription: string;
22
+ let ErrorDescription: string;
23
+ let ListItemText: string;
24
+ let ListItemHint: string;
25
+ let InstructionText: string;
26
+ let DeclarationBody: string;
27
+ let PaymentDescription: string;
28
+ }
29
+ export const TEXTAREA_3_ROWS: "textarea3";
30
+ export const TEXTAREA_5_ROWS: "textarea5";
31
+ export const TEXTAREA_12_ROWS_WITH_MARKDOWN: "textarea12markdown";
32
+ export const LIST_ITEM_HINT: "listitemhint";
33
+ export const LIST_ITEM_WITH_HINT_FOLLOWING: "listoptionwithhintfollowing";
34
+ /** @type {Record<string, { jsonPrefix: string, jsonSuffix: string, displayName: string, getLabel: (pageNum: number, questionNum?: number, itemNum?: number) => string }>} */
35
+ export const keyConfig: Record<string, {
36
+ jsonPrefix: string;
37
+ jsonSuffix: string;
38
+ displayName: string;
39
+ getLabel: (pageNum: number, questionNum?: number, itemNum?: number) => string;
40
+ }>;
41
+ export const IGNORE_FIELDS: ComponentType[];
42
+ export type TranslationRow = {
43
+ /**
44
+ * - the key name
45
+ */
46
+ name: string;
47
+ /**
48
+ * - type of text
49
+ */
50
+ type?: string | undefined;
51
+ /**
52
+ * - English text
53
+ */
54
+ englishContent: string | undefined;
55
+ /**
56
+ * - Welsh text
57
+ */
58
+ welshContent: string | undefined;
59
+ /**
60
+ * - page number
61
+ */
62
+ pageNum?: number | undefined;
63
+ /**
64
+ * - question number
65
+ */
66
+ questionNum?: number | undefined;
67
+ /**
68
+ * - list item number
69
+ */
70
+ itemNum?: number | undefined;
71
+ /**
72
+ * - label for field
73
+ */
74
+ label?: string | undefined;
75
+ };
76
+ export type ErrorDetailsItem = {
77
+ text: string;
78
+ href?: string;
79
+ };
80
+ export type ErrorDetails = Record<string, ErrorDetailsItem>;
81
+ export type ValidationFailure<Schema extends unknown = any> = {
82
+ /**
83
+ * - Formatted errors for error summary
84
+ */
85
+ formErrors: ErrorDetails;
86
+ /**
87
+ * - Form POST payload from Hapi request
88
+ */
89
+ formValues: Schema;
90
+ };
91
+ import type { ComponentDef } from '../../../components/types.js';
92
+ import type { Page } from '../../../form/form-definition/types.js';
93
+ import type { Item } from '../../../form/form-definition/types.js';
94
+ import { ComponentType } from '../../../components/enums.js';
95
+ //# sourceMappingURL=translations-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations-config.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/translations/translations-config.js"],"names":[],"mappings":"AAoIA;;;;GAIG;AACH,uCAHW,MAAM,gBACN,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,UAO5C;AAED;;;;;;GAMG;AACH,mCAJW,MAAM,UACN,YAAY,GAAG,IAAI,GAAG,IAAI,cAC1B,MAAM,UA+BhB;;;;;;;;;;;;;;;AA3ID,8BAA+B,WAAW,CAAA;AAC1C,8BAA+B,WAAW,CAAA;AAC1C,6CAA8C,oBAAoB,CAAA;AAClE,6BAA8B,cAAc,CAAA;AAC5C,4CAA6C,6BAA6B,CAAA;AAE1E,6KAA6K;AAC7K,wBADW,MAAM,CAAC,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;CAAE,CAAC,CA4ExK;AAED,4CAKC;;;;;UA9Ha,MAAM;;;;;;;;oBAEN,MAAM,GAAG,SAAS;;;;kBAClB,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;+BAQnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE;2BAC/B,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;8BAItB,MAAM;;;;gBAEf,YAAY;;;;gBACZ,MAAM;;kCAgKa,2BAA2B;0BAC7B,qCAAqC;0BAArC,qCAAqC;8BAxLtC,2BAA2B"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Build all translation rows in the form overview section (metatdata values).
3
+ * @param {FormMetadata} metadata
4
+ * @param {FormDefinition} definition
5
+ * @param {Record<string, string>} translations
6
+ * @param {ValidationFailure<any>} [validation]
7
+ * @returns {TranslationRow[]}
8
+ */
9
+ export function buildOverviewSection(metadata: FormMetadata, definition: FormDefinition, translations: Record<string, string>, validation?: ValidationFailure<any>): TranslationRow[];
10
+ import type { FormMetadata } from '../../../form/form-metadata/types.js';
11
+ import type { FormDefinition } from '../../../form/form-definition/types.js';
12
+ import type { ValidationFailure } from '../../../form/form-editor/translations/translations-config.js';
13
+ import type { TranslationRow } from '../../../form/form-editor/translations/translations-config.js';
14
+ //# sourceMappingURL=translations-overview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations-overview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/translations/translations-overview.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AACH,+CANW,YAAY,cACZ,cAAc,gBACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,eACtB,kBAAkB,GAAG,CAAC,GACpB,cAAc,EAAE,CAqG5B;kCAGgC,mCAAmC;oCACjC,qCAAqC;uCACnB,4DAA4D;oCAA5D,4DAA4D"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Build the overview and form translation rows for a form definition.
3
+ * @param {FormMetadata} metadata - The form metadata used to build the overview section.
4
+ * @param {FormDefinition} definition - The form definition containing pages and components.
5
+ * @param {ValidationFailure<any>} [validation] - Optional validation context for posted form values.
6
+ * @returns {{ overviewRows: TranslationRow[], formRows: TranslationRow[] }} The generated overview and form translation rows.
7
+ */
8
+ export function buildTranslationDataRows(metadata: FormMetadata, definition: FormDefinition, validation?: ValidationFailure<any>): {
9
+ overviewRows: TranslationRow[];
10
+ formRows: TranslationRow[];
11
+ };
12
+ import type { FormMetadata } from '../../../form/form-metadata/types.js';
13
+ import type { FormDefinition } from '../../../form/form-definition/types.js';
14
+ import type { ValidationFailure } from '../../../form/form-editor/translations/translations-config.js';
15
+ import type { TranslationRow } from '../../../form/form-editor/translations/translations-config.js';
16
+ //# sourceMappingURL=translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/translations/translations.js"],"names":[],"mappings":"AA0OA;;;;;;GAMG;AACH,mDALW,YAAY,cACZ,cAAc,eACd,kBAAkB,GAAG,CAAC,GACpB;IAAE,YAAY,EAAE,cAAc,EAAE,CAAC;IAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAkD1E;kCAIgC,mCAAmC;oCACrB,qCAAqC;uCAC9B,4DAA4D;oCAA5D,4DAA4D"}