@defra/forms-model 3.0.687 → 3.0.689

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 (54) 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/form-submission/index.js +3 -0
  13. package/dist/module/form/form-submission/index.js.map +1 -1
  14. package/dist/module/form/form-submission/types.js.map +1 -1
  15. package/dist/module/form/utils/list.js +23 -0
  16. package/dist/module/form/utils/list.js.map +1 -1
  17. package/dist/module/form/utils/numbering.js +43 -0
  18. package/dist/module/form/utils/numbering.js.map +1 -0
  19. package/dist/module/index.js +2 -0
  20. package/dist/module/index.js.map +1 -1
  21. package/dist/types/__stubs__/examples.d.ts +9 -0
  22. package/dist/types/__stubs__/examples.d.ts.map +1 -0
  23. package/dist/types/components/helpers.d.ts +2 -1
  24. package/dist/types/components/helpers.d.ts.map +1 -1
  25. package/dist/types/components/types.d.ts +1 -0
  26. package/dist/types/components/types.d.ts.map +1 -1
  27. package/dist/types/form/form-editor/translations/translations-config.d.ts +95 -0
  28. package/dist/types/form/form-editor/translations/translations-config.d.ts.map +1 -0
  29. package/dist/types/form/form-editor/translations/translations-overview.d.ts +14 -0
  30. package/dist/types/form/form-editor/translations/translations-overview.d.ts.map +1 -0
  31. package/dist/types/form/form-editor/translations/translations.d.ts +16 -0
  32. package/dist/types/form/form-editor/translations/translations.d.ts.map +1 -0
  33. package/dist/types/form/form-submission/index.d.ts.map +1 -1
  34. package/dist/types/form/form-submission/types.d.ts +4 -0
  35. package/dist/types/form/form-submission/types.d.ts.map +1 -1
  36. package/dist/types/form/utils/list.d.ts +8 -1
  37. package/dist/types/form/utils/list.d.ts.map +1 -1
  38. package/dist/types/form/utils/numbering.d.ts +18 -0
  39. package/dist/types/form/utils/numbering.d.ts.map +1 -0
  40. package/dist/types/index.d.ts +2 -0
  41. package/dist/types/index.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/schemas/form-submit-payload-schema.json +5 -0
  44. package/src/__stubs__/examples.js +231 -0
  45. package/src/components/helpers.ts +14 -0
  46. package/src/components/types.ts +7 -0
  47. package/src/form/form-editor/translations/translations-config.js +186 -0
  48. package/src/form/form-editor/translations/translations-overview.js +137 -0
  49. package/src/form/form-editor/translations/translations.js +297 -0
  50. package/src/form/form-submission/index.ts +7 -0
  51. package/src/form/form-submission/types.ts +5 -0
  52. package/src/form/utils/list.ts +34 -1
  53. package/src/form/utils/numbering.js +47 -0
  54. 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,aAAa,CAACE,UAAU,EAAE;EAEtF,OAAO;IACLI,IAAI,EAAEH,OAAO;IACbI,IAAI,EAAEb,OAAO;IACbC,OAAO;IACPC,WAAW;IACXC,OAAO;IACPW,cAAc,EAAEP,mBAAmB;IACnCQ,YAAY,EACVV,UAAU,EAAEW,UAAU,CAACP,OAAO,CAAC,IAC/BlB,iBAAiB,CAACkB,OAAO,EAAEL,YAAY,CAAC;IAC1Ca,KAAK,EAAEX,aAAa,CAACY,QAAQ,CAACjB,OAAO,EAAEC,WAAW,EAAEC,OAAO;EAC7D,CAAC;AAC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AAU,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":[]}
@@ -31,6 +31,9 @@ export const formSubmitPayloadSchema = Joi.object().keys({
31
31
  referenceNumber: Joi.string()
32
32
  // TODO - make this required in later releases - optional for now to avoid release glitches
33
33
  .optional().allow('').description('Reference number for the form submission'),
34
+ language: Joi.string()
35
+ // TODO - make this required in later releases - optional for now to avoid release glitches
36
+ .optional().allow('').description('The currently-selected language at point of form submission'),
34
37
  main: Joi.array().items(formSubmitRecordSchema).required().description('Main (non-repeating) field values from the form'),
35
38
  repeaters: Joi.array().items(formSubmitRecordsetSchema).required().description('Repeatable section values from the form')
36
39
  }).required().label('FormSubmitPayload').description('Complete form submission payload structure with all form data');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Joi","FormStatus","SecurityQuestionsEnum","SubmissionEventMessageCategory","SubmissionEventMessageSchemaVersion","SubmissionEventMessageSource","SubmissionEventMessageType","formSubmitRecordSchema","object","name","string","required","description","title","value","allow","label","formSubmitRecordsetSchema","array","items","formSubmitPayloadSchema","keys","retrievalKey","sessionId","referenceNumber","optional","main","repeaters","saveAndExitMessageData","form","id","status","valid","Draft","Live","isPreview","boolean","baseUrl","email","security","question","Object","values","answer","state","magicLinkGroupId","submissionMessageSchema","schemaVersion","category","source","type","createdAt","date","messageCreatedAt","data"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { FormStatus } from '~/src/common/enums.js'\nimport {\n SecurityQuestionsEnum,\n SubmissionEventMessageCategory,\n SubmissionEventMessageSchemaVersion,\n SubmissionEventMessageSource,\n SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n type SaveAndExitMessage,\n type SaveAndExitMessageData,\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string()\n .required()\n .description('Field identifier matching the component name'),\n title: Joi.string()\n .required()\n .description('Human-readable label for the field'),\n value: Joi.string()\n .required()\n .allow('')\n .description('User-submitted value for the field, may be empty')\n})\n .label('FormSubmitRecord')\n .description('Individual field value in a form submission')\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string()\n .required()\n .description('Identifier for the repeatable section'),\n title: Joi.string()\n .required()\n .description('Human-readable title for the repeatable section'),\n value: Joi.array<SubmitRecord[]>()\n .items(\n Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .label('FormSubmitRecordGroup')\n )\n .required()\n .description(\n 'Array of record arrays, each representing a repeated instance'\n )\n})\n .label('FormSubmitRecordset')\n .description('Collection of repeated field values from a repeatable section')\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string()\n .required()\n .description('Unique key to retrieve this submission later'),\n sessionId: Joi.string()\n .required()\n .description('User session identifier for tracking and security'),\n referenceNumber: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description('Reference number for the form submission'),\n main: Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .description('Main (non-repeating) field values from the form'),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n .description('Repeatable section values from the form')\n })\n .required()\n .label('FormSubmitPayload')\n .description('Complete form submission payload structure with all form data')\n\nexport const saveAndExitMessageData = Joi.object<SaveAndExitMessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n security: Joi.object({\n question: Joi.string()\n .valid(...Object.values(SecurityQuestionsEnum))\n .required(),\n answer: Joi.string().required()\n }).label('SaveAndExitSecurity'),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitMessageData')\n\nexport const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the SubmissionMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(SubmissionEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(SubmissionEventMessageType))\n .description('Event type'),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published'),\n data: saveAndExitMessageData\n})\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAErB,SAASC,UAAU;AACnB,SACEC,qBAAqB,EACrBC,8BAA8B,EAC9BC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B;AAU5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGP,GAAG,CAACQ,MAAM,CAAe;EAC7DC,IAAI,EAAET,GAAG,CAACU,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DC,KAAK,EAAEb,GAAG,CAACU,MAAM,CAAC,CAAC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C,wCAAwC,CAAC;EACxDsC,IAAI,EAAElD,GAAG,CAACU,MAAM,CAAC,CAAC,CACfsB,KAAK,CAAC,GAAGS,MAAM,CAACC,MAAM,CAACpC,0BAA0B,CAAC,CAAC,CACnDM,WAAW,CAAC,YAAY,CAAC;EAC5BuC,SAAS,EAAEnD,GAAG,CAACoD,IAAI,CAAC,CAAC,CAClBzC,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,8FACF,CAAC;EACHyC,gBAAgB,EAAErD,GAAG,CAACoD,IAAI,CAAC,CAAC,CACzBzC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9D0C,IAAI,EAAE1B;AACR,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["Joi","FormStatus","SecurityQuestionsEnum","SubmissionEventMessageCategory","SubmissionEventMessageSchemaVersion","SubmissionEventMessageSource","SubmissionEventMessageType","formSubmitRecordSchema","object","name","string","required","description","title","value","allow","label","formSubmitRecordsetSchema","array","items","formSubmitPayloadSchema","keys","retrievalKey","sessionId","referenceNumber","optional","language","main","repeaters","saveAndExitMessageData","form","id","status","valid","Draft","Live","isPreview","boolean","baseUrl","email","security","question","Object","values","answer","state","magicLinkGroupId","submissionMessageSchema","schemaVersion","category","source","type","createdAt","date","messageCreatedAt","data"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { FormStatus } from '~/src/common/enums.js'\nimport {\n SecurityQuestionsEnum,\n SubmissionEventMessageCategory,\n SubmissionEventMessageSchemaVersion,\n SubmissionEventMessageSource,\n SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n type SaveAndExitMessage,\n type SaveAndExitMessageData,\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string()\n .required()\n .description('Field identifier matching the component name'),\n title: Joi.string()\n .required()\n .description('Human-readable label for the field'),\n value: Joi.string()\n .required()\n .allow('')\n .description('User-submitted value for the field, may be empty')\n})\n .label('FormSubmitRecord')\n .description('Individual field value in a form submission')\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string()\n .required()\n .description('Identifier for the repeatable section'),\n title: Joi.string()\n .required()\n .description('Human-readable title for the repeatable section'),\n value: Joi.array<SubmitRecord[]>()\n .items(\n Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .label('FormSubmitRecordGroup')\n )\n .required()\n .description(\n 'Array of record arrays, each representing a repeated instance'\n )\n})\n .label('FormSubmitRecordset')\n .description('Collection of repeated field values from a repeatable section')\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string()\n .required()\n .description('Unique key to retrieve this submission later'),\n sessionId: Joi.string()\n .required()\n .description('User session identifier for tracking and security'),\n referenceNumber: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description('Reference number for the form submission'),\n language: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description(\n 'The currently-selected language at point of form submission'\n ),\n main: Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .description('Main (non-repeating) field values from the form'),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n .description('Repeatable section values from the form')\n })\n .required()\n .label('FormSubmitPayload')\n .description('Complete form submission payload structure with all form data')\n\nexport const saveAndExitMessageData = Joi.object<SaveAndExitMessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n security: Joi.object({\n question: Joi.string()\n .valid(...Object.values(SecurityQuestionsEnum))\n .required(),\n answer: Joi.string().required()\n }).label('SaveAndExitSecurity'),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitMessageData')\n\nexport const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the SubmissionMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(SubmissionEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(SubmissionEventMessageType))\n .description('Event type'),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published'),\n data: saveAndExitMessageData\n})\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAErB,SAASC,UAAU;AACnB,SACEC,qBAAqB,EACrBC,8BAA8B,EAC9BC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B;AAU5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGP,GAAG,CAACQ,MAAM,CAAe;EAC7DC,IAAI,EAAET,GAAG,CAACU,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DC,KAAK,EAAEb,GAAG,CAACU,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,oCAAoC,CAAC;EACpDE,KAAK,EAAEd,GAAG,CAACU,MAAM,CAAC,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M,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,wCAAwC,CAAC;EACxDuC,IAAI,EAAEnD,GAAG,CAACU,MAAM,CAAC,CAAC,CACfuB,KAAK,CAAC,GAAGS,MAAM,CAACC,MAAM,CAACrC,0BAA0B,CAAC,CAAC,CACnDM,WAAW,CAAC,YAAY,CAAC;EAC5BwC,SAAS,EAAEpD,GAAG,CAACqD,IAAI,CAAC,CAAC,CAClB1C,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,8FACF,CAAC;EACH0C,gBAAgB,EAAEtD,GAAG,CAACqD,IAAI,CAAC,CAAC,CACzB1C,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9D2C,IAAI,EAAE1B;AACR,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The reference number of the user session\n */\n referenceNumber?: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n\nexport interface SaveAndExitMessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n}\n\nexport interface SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n data: SaveAndExitMessageData\n}\n\nexport interface SaveAndExitRecord {\n magicLinkId: string\n magicLinkGroupId: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n invalidPasswordAttempts: number\n createdAt: Date\n}\n\nexport type RunnerMessage = SaveAndExitMessage\n\nexport interface RunnerRecordBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface RunnerRecordInputMeta extends RunnerRecordBase {\n id: string\n}\n\nexport type RunnerRecordInput = RunnerMessage & RunnerRecordBase\n\nexport type RunnerRecord = RunnerMessage & RunnerRecordInputMeta\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The reference number of the user session\n */\n referenceNumber?: string\n\n /**\n * The currently-selected language at the point of submission\n */\n language?: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n\nexport interface SaveAndExitMessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n}\n\nexport interface SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n data: SaveAndExitMessageData\n}\n\nexport interface SaveAndExitRecord {\n magicLinkId: string\n magicLinkGroupId: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n invalidPasswordAttempts: number\n createdAt: Date\n}\n\nexport type RunnerMessage = SaveAndExitMessage\n\nexport interface RunnerRecordBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface RunnerRecordInputMeta extends RunnerRecordBase {\n id: string\n}\n\nexport type RunnerRecordInput = RunnerMessage & RunnerRecordBase\n\nexport type RunnerRecord = RunnerMessage & RunnerRecordInputMeta\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,CAAC,SAAS,EAAE,MAAM,CAAC,GAUC,SAAS,CAC9C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,wBAAwB,CAEvC;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,CAAC,EAAE,aAAa,GACnB,IAAI,IAAI,wBAAwB,CAiBlC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,aAAa,iKAE1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,oBAAoB,CAEnC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAA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B,IAAI,CAAC,EAAE,aAAa,GACnB,IAAI,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAEnC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,iBAAiB,CAEhC;AAED,wBAAgB,UAAU,CACxB,IAAI,CAAC,EAAE,aAAa,GACnB,IAAI,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAUnC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,CAAC,EAAE,aAAa,GACnB,IAAI,IAAI,6BAA6B,CAAC,MAAM,CAAC,CAS/C;AAED;;;GAGG;AACH,wBAAgB,aAAa,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,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,CAAA;QAChB,wBAAwB,CAAC,EAAE,gBAAgB,CAAA;QAC3C,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB,CAAA;CACF;AAED,UAAU,aAAc,SAAQ,aAAa;IAC3C,IAAI,EACA,aAAa,CAAC,iBAAi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B,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,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
+ {"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,MAA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