@defra/forms-model 3.0.575 → 3.0.577

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 (59) hide show
  1. package/dist/module/__stubs__/pages.js +13 -0
  2. package/dist/module/__stubs__/pages.js.map +1 -1
  3. package/dist/module/form/form-definition/helpers.js +15 -3
  4. package/dist/module/form/form-definition/helpers.js.map +1 -1
  5. package/dist/module/form/form-definition/index.js +60 -37
  6. package/dist/module/form/form-definition/index.js.map +1 -1
  7. package/dist/module/form/form-editor/__stubs__/preview.js +53 -17
  8. package/dist/module/form/form-editor/__stubs__/preview.js.map +1 -1
  9. package/dist/module/form/form-editor/index.js +3 -2
  10. package/dist/module/form/form-editor/index.js.map +1 -1
  11. package/dist/module/form/form-editor/macros/types.js.map +1 -1
  12. package/dist/module/form/form-editor/preview/declaration.js +82 -0
  13. package/dist/module/form/form-editor/preview/declaration.js.map +1 -0
  14. package/dist/module/form/form-editor/preview/helpers.js +43 -10
  15. package/dist/module/form/form-editor/preview/helpers.js.map +1 -1
  16. package/dist/module/form/form-editor/preview/index.js +1 -0
  17. package/dist/module/form/form-editor/preview/index.js.map +1 -1
  18. package/dist/module/form/form-editor/preview/types.js.map +1 -1
  19. package/dist/module/form/form-editor/preview/uk-address.js +3 -3
  20. package/dist/module/form/form-editor/preview/uk-address.js.map +1 -1
  21. package/dist/module/form/form-editor/types.js.map +1 -1
  22. package/dist/types/__stubs__/pages.d.ts +2 -1
  23. package/dist/types/__stubs__/pages.d.ts.map +1 -1
  24. package/dist/types/form/form-definition/helpers.d.ts +10 -3
  25. package/dist/types/form/form-definition/helpers.d.ts.map +1 -1
  26. package/dist/types/form/form-definition/index.d.ts +2 -1
  27. package/dist/types/form/form-definition/index.d.ts.map +1 -1
  28. package/dist/types/form/form-editor/__stubs__/preview.d.ts +38 -12
  29. package/dist/types/form/form-editor/__stubs__/preview.d.ts.map +1 -1
  30. package/dist/types/form/form-editor/index.d.ts +1 -0
  31. package/dist/types/form/form-editor/index.d.ts.map +1 -1
  32. package/dist/types/form/form-editor/macros/types.d.ts +6 -0
  33. package/dist/types/form/form-editor/macros/types.d.ts.map +1 -1
  34. package/dist/types/form/form-editor/preview/declaration.d.ts +42 -0
  35. package/dist/types/form/form-editor/preview/declaration.d.ts.map +1 -0
  36. package/dist/types/form/form-editor/preview/helpers.d.ts.map +1 -1
  37. package/dist/types/form/form-editor/preview/index.d.ts +1 -0
  38. package/dist/types/form/form-editor/preview/types.d.ts +12 -1
  39. package/dist/types/form/form-editor/preview/types.d.ts.map +1 -1
  40. package/dist/types/form/form-editor/preview/uk-address.d.ts +13 -0
  41. package/dist/types/form/form-editor/preview/uk-address.d.ts.map +1 -1
  42. package/dist/types/form/form-editor/types.d.ts +8 -1
  43. package/dist/types/form/form-editor/types.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/schemas/form-editor-input-page-schema.json +1 -0
  46. package/schemas/question-type-full-schema.json +1 -0
  47. package/schemas/question-type-schema.json +1 -0
  48. package/src/__stubs__/pages.ts +18 -1
  49. package/src/form/form-definition/helpers.ts +28 -4
  50. package/src/form/form-definition/index.ts +91 -53
  51. package/src/form/form-editor/__stubs__/preview.js +47 -17
  52. package/src/form/form-editor/index.ts +3 -0
  53. package/src/form/form-editor/macros/types.ts +7 -0
  54. package/src/form/form-editor/preview/declaration.js +88 -0
  55. package/src/form/form-editor/preview/helpers.js +47 -16
  56. package/src/form/form-editor/preview/index.js +1 -0
  57. package/src/form/form-editor/preview/types.ts +16 -1
  58. package/src/form/form-editor/preview/uk-address.js +3 -3
  59. package/src/form/form-editor/types.ts +8 -0
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","names":["ComponentType","hasContentField","hasInputField","hasListField","hasSelectionFields","AutocompleteListQuestion","CheckboxQuestion","ComponentElements","ContentElements","DateInputQuestion","EmailAddressQuestion","ListComponentElements","ListQuestion","SelectComponentElements","LongAnswerQuestion","Markdown","MonthYearQuestion","NumberComponentPreviewElements","NumberOnlyQuestion","PhoneNumberQuestion","QuestionComponentElements","RadioQuestion","SelectQuestion","ShortAnswerQuestion","SupportingEvidenceQuestion","UkAddressComponentPreviewElements","UkAddressQuestion","YesNoQuestion","findDefinitionListFromComponent","InputFieldComponentDictionary","TextField","Details","InsetText","Html","List","EmailAddressField","NumberField","MultilineTextField","TelephoneNumberField","MonthYearField","DatePartsField","UkAddressField","AutocompleteField","RadiosField","CheckboxesField","SelectField","YesNoField","DeclarationField","FileUploadField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","mapComponentToPreviewQuestion","questionRenderer","definition","component","questionElements","type","list","QuestionConstructor","previewComponent","id"],"sources":["../../../../../src/form/form-editor/preview/helpers.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n hasContentField,\n hasInputField,\n hasListField,\n hasSelectionFields\n} from '~/src/components/helpers.js'\nimport { AutocompleteListQuestion } from '~/src/form/form-editor/preview/autocomplete.js'\nimport { CheckboxQuestion } from '~/src/form/form-editor/preview/checkbox.js'\nimport { ComponentElements } from '~/src/form/form-editor/preview/component-elements.js'\nimport { ContentElements } from '~/src/form/form-editor/preview/content.js'\nimport { DateInputQuestion } from '~/src/form/form-editor/preview/date-input.js'\nimport { EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport {\n ListComponentElements,\n ListQuestion,\n SelectComponentElements\n} from '~/src/form/form-editor/preview/list.js'\nimport { LongAnswerQuestion } from '~/src/form/form-editor/preview/long-answer.js'\nimport { Markdown } from '~/src/form/form-editor/preview/markdown.js'\nimport { MonthYearQuestion } from '~/src/form/form-editor/preview/month-year.js'\nimport {\n NumberComponentPreviewElements,\n NumberOnlyQuestion\n} from '~/src/form/form-editor/preview/number-only.js'\nimport { PhoneNumberQuestion } from '~/src/form/form-editor/preview/phone-number.js'\nimport { QuestionComponentElements } from '~/src/form/form-editor/preview/question.js'\nimport { RadioQuestion } from '~/src/form/form-editor/preview/radio.js'\nimport { SelectQuestion } from '~/src/form/form-editor/preview/select.js'\nimport { ShortAnswerQuestion } from '~/src/form/form-editor/preview/short-answer.js'\nimport { SupportingEvidenceQuestion } from '~/src/form/form-editor/preview/supporting-evidence.js'\nimport {\n UkAddressComponentPreviewElements,\n UkAddressQuestion\n} from '~/src/form/form-editor/preview/uk-address.js'\nimport { YesNoQuestion } from '~/src/form/form-editor/preview/yes-no.js'\nimport { findDefinitionListFromComponent } from '~/src/form/utils/list.js'\n/**\n * @type {Record<ComponentType, typeof PreviewComponent>}\n */\nconst InputFieldComponentDictionary = {\n [ComponentType.TextField]: ShortAnswerQuestion,\n [ComponentType.Details]: ShortAnswerQuestion,\n [ComponentType.InsetText]: ShortAnswerQuestion,\n [ComponentType.Html]: ShortAnswerQuestion,\n [ComponentType.Markdown]: Markdown,\n [ComponentType.List]: ListQuestion,\n [ComponentType.EmailAddressField]: EmailAddressQuestion,\n [ComponentType.NumberField]: NumberOnlyQuestion,\n [ComponentType.MultilineTextField]: LongAnswerQuestion,\n [ComponentType.TelephoneNumberField]: PhoneNumberQuestion,\n [ComponentType.MonthYearField]: MonthYearQuestion,\n [ComponentType.DatePartsField]: DateInputQuestion,\n [ComponentType.UkAddressField]: UkAddressQuestion,\n [ComponentType.AutocompleteField]: AutocompleteListQuestion,\n [ComponentType.RadiosField]: RadioQuestion,\n [ComponentType.CheckboxesField]: CheckboxQuestion,\n [ComponentType.SelectField]: SelectQuestion,\n [ComponentType.YesNoField]: YesNoQuestion,\n [ComponentType.DeclarationField]: YesNoQuestion,\n [ComponentType.FileUploadField]: SupportingEvidenceQuestion,\n [ComponentType.EastingNorthingField]: ShortAnswerQuestion,\n [ComponentType.OsGridRefField]: ShortAnswerQuestion,\n [ComponentType.NationalGridFieldNumberField]: ShortAnswerQuestion,\n [ComponentType.LatLongField]: ShortAnswerQuestion\n}\n\n/**\n * @param {QuestionRenderer} questionRenderer\n * @param {FormDefinition} definition\n * @returns {(component: ComponentDef) => Question}\n */\nexport function mapComponentToPreviewQuestion(questionRenderer, definition) {\n return /** @type {(component: ComponentDef) => Question} */ (\n (component) => {\n /**\n * @type {QuestionElements}\n */\n let questionElements\n\n if (\n component.type === ComponentType.AutocompleteField ||\n component.type === ComponentType.SelectField\n ) {\n const list = findDefinitionListFromComponent(component, definition)\n questionElements = new SelectComponentElements(component, list)\n } else if (component.type === ComponentType.UkAddressField) {\n questionElements = new UkAddressComponentPreviewElements(component)\n } else if (component.type === ComponentType.NumberField) {\n questionElements = new NumberComponentPreviewElements(component)\n } else if (hasSelectionFields(component) && hasListField(component)) {\n const list = findDefinitionListFromComponent(component, definition)\n questionElements = new ListComponentElements(component, list)\n } else if (\n hasInputField(component) ||\n component.type === ComponentType.YesNoField\n ) {\n questionElements = new QuestionComponentElements(component)\n } else if (hasContentField(component)) {\n questionElements = new ContentElements(component)\n } else {\n questionElements = new ComponentElements(component)\n }\n\n const QuestionConstructor = InputFieldComponentDictionary[component.type]\n\n const previewComponent = new QuestionConstructor(\n questionElements,\n questionRenderer\n )\n previewComponent.id = component.id\n return previewComponent\n }\n )\n}\n\n/**\n * @import { QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { Question } from '~/src/form/form-editor/preview/question.js'\n * @import { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n * @import { FormDefinition } from '~/src/form/form-definition/types.js'\n * @import { ComponentDef } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SACEC,eAAe,EACfC,aAAa,EACbC,YAAY,EACZC,kBAAkB;AAEpB,SAASC,wBAAwB;AACjC,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,oBAAoB;AAC7B,SACEC,qBAAqB,EACrBC,YAAY,EACZC,uBAAuB;AAEzB,SAASC,kBAAkB;AAC3B,SAASC,QAAQ;AACjB,SAASC,iBAAiB;AAC1B,SACEC,8BAA8B,EAC9BC,kBAAkB;AAEpB,SAASC,mBAAmB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W,gBAAgB,GAAG,IAAIrC,yBAAyB,CAACoC,SAAS,CAAC;IAC7D,CAAC,MAAM,IAAIvD,eAAe,CAACuD,SAAS,CAAC,EAAE;MACrCC,gBAAgB,GAAG,IAAIjD,eAAe,CAACgD,SAAS,CAAC;IACnD,CAAC,MAAM;MACLC,gBAAgB,GAAG,IAAIlD,iBAAiB,CAACiD,SAAS,CAAC;IACrD;IAEA,MAAMI,mBAAmB,GAAG/B,6BAA6B,CAAC2B,SAAS,CAACE,IAAI,CAAC;IAEzE,MAAMG,gBAAgB,GAAG,IAAID,mBAAmB,CAC9CH,gBAAgB,EAChBH,gBACF,CAAC;IACDO,gBAAgB,CAACC,EAAE,GAAGN,SAAS,CAACM,EAAE;IAClC,OAAOD,gBAAgB;EACzB,CAAC;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"helpers.js","names":["ComponentType","hasContentField","hasInputField","hasListField","hasSelectionFields","AutocompleteListQuestion","CheckboxQuestion","ComponentElements","ContentElements","DateInputQuestion","DeclarationComponentPreviewElements","DeclarationQuestion","EmailAddressQuestion","ListComponentElements","ListQuestion","SelectComponentElements","LongAnswerQuestion","Markdown","MonthYearQuestion","NumberComponentPreviewElements","NumberOnlyQuestion","PhoneNumberQuestion","QuestionComponentElements","RadioQuestion","SelectQuestion","ShortAnswerQuestion","SupportingEvidenceQuestion","UkAddressComponentPreviewElements","UkAddressQuestion","YesNoQuestion","findDefinitionListFromComponent","InputFieldComponentDictionary","TextField","Details","InsetText","Html","List","EmailAddressField","NumberField","MultilineTextField","TelephoneNumberField","MonthYearField","DatePartsField","UkAddressField","AutocompleteField","RadiosField","CheckboxesField","SelectField","YesNoField","DeclarationField","FileUploadField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","ComponentToPreviewQuestion","component","definition","componentCoerced","list","_definition","mapComponentToPreviewQuestion","questionRenderer","questionElements","getQuestionElementsFunc","type","QuestionConstructor","previewComponent","id"],"sources":["../../../../../src/form/form-editor/preview/helpers.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n hasContentField,\n hasInputField,\n hasListField,\n hasSelectionFields\n} from '~/src/components/helpers.js'\nimport { AutocompleteListQuestion } from '~/src/form/form-editor/preview/autocomplete.js'\nimport { CheckboxQuestion } from '~/src/form/form-editor/preview/checkbox.js'\nimport { ComponentElements } from '~/src/form/form-editor/preview/component-elements.js'\nimport { ContentElements } from '~/src/form/form-editor/preview/content.js'\nimport { DateInputQuestion } from '~/src/form/form-editor/preview/date-input.js'\nimport {\n DeclarationComponentPreviewElements,\n DeclarationQuestion\n} from '~/src/form/form-editor/preview/declaration.js'\nimport { EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport {\n ListComponentElements,\n ListQuestion,\n SelectComponentElements\n} from '~/src/form/form-editor/preview/list.js'\nimport { LongAnswerQuestion } from '~/src/form/form-editor/preview/long-answer.js'\nimport { Markdown } from '~/src/form/form-editor/preview/markdown.js'\nimport { MonthYearQuestion } from '~/src/form/form-editor/preview/month-year.js'\nimport {\n NumberComponentPreviewElements,\n NumberOnlyQuestion\n} from '~/src/form/form-editor/preview/number-only.js'\nimport { PhoneNumberQuestion } from '~/src/form/form-editor/preview/phone-number.js'\nimport { QuestionComponentElements } from '~/src/form/form-editor/preview/question.js'\nimport { RadioQuestion } from '~/src/form/form-editor/preview/radio.js'\nimport { SelectQuestion } from '~/src/form/form-editor/preview/select.js'\nimport { ShortAnswerQuestion } from '~/src/form/form-editor/preview/short-answer.js'\nimport { SupportingEvidenceQuestion } from '~/src/form/form-editor/preview/supporting-evidence.js'\nimport {\n UkAddressComponentPreviewElements,\n UkAddressQuestion\n} from '~/src/form/form-editor/preview/uk-address.js'\nimport { YesNoQuestion } from '~/src/form/form-editor/preview/yes-no.js'\nimport { findDefinitionListFromComponent } from '~/src/form/utils/list.js'\n/**\n * @type {Record<ComponentType, typeof PreviewComponent>}\n */\nconst InputFieldComponentDictionary = {\n [ComponentType.TextField]: ShortAnswerQuestion,\n [ComponentType.Details]: ShortAnswerQuestion,\n [ComponentType.InsetText]: ShortAnswerQuestion,\n [ComponentType.Html]: ShortAnswerQuestion,\n [ComponentType.Markdown]: Markdown,\n [ComponentType.List]: ListQuestion,\n [ComponentType.EmailAddressField]: EmailAddressQuestion,\n [ComponentType.NumberField]: NumberOnlyQuestion,\n [ComponentType.MultilineTextField]: LongAnswerQuestion,\n [ComponentType.TelephoneNumberField]: PhoneNumberQuestion,\n [ComponentType.MonthYearField]: MonthYearQuestion,\n [ComponentType.DatePartsField]: DateInputQuestion,\n [ComponentType.UkAddressField]: UkAddressQuestion,\n [ComponentType.AutocompleteField]: AutocompleteListQuestion,\n [ComponentType.RadiosField]: RadioQuestion,\n [ComponentType.CheckboxesField]: CheckboxQuestion,\n [ComponentType.SelectField]: SelectQuestion,\n [ComponentType.YesNoField]: YesNoQuestion,\n [ComponentType.DeclarationField]: DeclarationQuestion,\n [ComponentType.FileUploadField]: SupportingEvidenceQuestion,\n [ComponentType.EastingNorthingField]: ShortAnswerQuestion,\n [ComponentType.OsGridRefField]: ShortAnswerQuestion,\n [ComponentType.NationalGridFieldNumberField]: ShortAnswerQuestion,\n [ComponentType.LatLongField]: ShortAnswerQuestion\n}\n\n/**\n * @type {Partial<Record<ComponentType, (component: ComponentDef, definition: FormDefinition ) => QuestionElements>>}\n */\nconst ComponentToPreviewQuestion = {\n [ComponentType.AutocompleteField]: (component, definition) => {\n const componentCoerced = /** @type {AutocompleteFieldComponent} */ (\n component\n )\n const list = findDefinitionListFromComponent(componentCoerced, definition)\n return new SelectComponentElements(componentCoerced, list)\n },\n [ComponentType.SelectField]: (component, definition) => {\n const componentCoerced = /** @type {SelectFieldComponent} */ (component)\n const list = findDefinitionListFromComponent(componentCoerced, definition)\n return new SelectComponentElements(componentCoerced, list)\n },\n [ComponentType.UkAddressField]: (component, _definition) => {\n const componentCoerced = /** @type {UkAddressFieldComponent} */ (component)\n return new UkAddressComponentPreviewElements(componentCoerced)\n },\n [ComponentType.NumberField]: (component, _definition) => {\n const componentCoerced = /** @type {NumberFieldComponent} */ (component)\n return new NumberComponentPreviewElements(componentCoerced)\n },\n [ComponentType.DeclarationField]: (component, _definition) => {\n const componentCoerced = /** @type {DeclarationFieldComponent} */ (\n component\n )\n return new DeclarationComponentPreviewElements(componentCoerced)\n },\n [ComponentType.YesNoField]: (component, _definition) => {\n const componentCoerced = /** @type {YesNoFieldComponent} */ (component)\n return new QuestionComponentElements(componentCoerced)\n }\n}\n\n/**\n * @param {QuestionRenderer} questionRenderer\n * @param {FormDefinition} definition\n * @returns {(component: ComponentDef) => Question}\n */\nexport function mapComponentToPreviewQuestion(questionRenderer, definition) {\n return /** @type {(component: ComponentDef) => Question} */ (\n (component) => {\n /**\n * @type {QuestionElements}\n */\n let questionElements\n\n // Look for one-to-one mapping first, then fallback if not found\n const getQuestionElementsFunc = ComponentToPreviewQuestion[component.type]\n if (getQuestionElementsFunc) {\n questionElements = getQuestionElementsFunc(component, definition)\n } else if (hasSelectionFields(component) && hasListField(component)) {\n const list = findDefinitionListFromComponent(component, definition)\n questionElements = new ListComponentElements(component, list)\n } else if (hasInputField(component)) {\n questionElements = new QuestionComponentElements(component)\n } else if (hasContentField(component)) {\n questionElements = new ContentElements(component)\n } else {\n questionElements = new ComponentElements(component)\n }\n\n const QuestionConstructor = InputFieldComponentDictionary[component.type]\n\n const previewComponent = new QuestionConstructor(\n questionElements,\n questionRenderer\n )\n previewComponent.id = component.id\n return previewComponent\n }\n )\n}\n\n/**\n * @import { QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { Question } from '~/src/form/form-editor/preview/question.js'\n * @import { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n * @import { FormDefinition } from '~/src/form/form-definition/types.js'\n * @import { AutocompleteFieldComponent, ComponentDef, DeclarationFieldComponent, NumberFieldComponent, SelectFieldComponent, UkAddressFieldComponent, YesNoFieldComponent } from '~/src/components/types.js'\n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AAM,IAAIzD,aAAa,CAACsD,SAAS,CAAC,EAAE;MACnCO,gBAAgB,GAAG,IAAIzC,yBAAyB,CAACkC,SAAS,CAAC;IAC7D,CAAC,MAAM,IAAIvD,eAAe,CAACuD,SAAS,CAAC,EAAE;MACrCO,gBAAgB,GAAG,IAAIvD,eAAe,CAACgD,SAAS,CAAC;IACnD,CAAC,MAAM;MACLO,gBAAgB,GAAG,IAAIxD,iBAAiB,CAACiD,SAAS,CAAC;IACrD;IAEA,MAAMU,mBAAmB,GAAGnC,6BAA6B,CAACyB,SAAS,CAACS,IAAI,CAAC;IAEzE,MAAME,gBAAgB,GAAG,IAAID,mBAAmB,CAC9CH,gBAAgB,EAChBD,gBACF,CAAC;IACDK,gBAAgB,CAACC,EAAE,GAAGZ,SAAS,CAACY,EAAE;IAClC,OAAOD,gBAAgB;EACzB,CAAC;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -2,6 +2,7 @@ export * from "./autocomplete.js";
2
2
  export * from "./checkbox.js";
3
3
  export * from "./checkbox-sortable.js";
4
4
  export * from "./date-input.js";
5
+ export * from "./declaration.js";
5
6
  export * from "./email-address.js";
6
7
  export * from "./list.js";
7
8
  export * from "./list-sortable.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/form/form-editor/preview/index.js"],"sourcesContent":["export * from '~/src/form/form-editor/preview/autocomplete.js'\nexport * from '~/src/form/form-editor/preview/checkbox.js'\nexport * from '~/src/form/form-editor/preview/checkbox-sortable.js'\nexport * from '~/src/form/form-editor/preview/date-input.js'\nexport * from '~/src/form/form-editor/preview/email-address.js'\nexport * from '~/src/form/form-editor/preview/list.js'\nexport * from '~/src/form/form-editor/preview/list-sortable.js'\nexport * from '~/src/form/form-editor/preview/markdown.js'\nexport * from '~/src/form/form-editor/preview/month-year.js'\nexport * from '~/src/form/form-editor/preview/number-only.js'\nexport * from '~/src/form/form-editor/preview/phone-number.js'\nexport * from '~/src/form/form-editor/preview/question.js'\nexport * from '~/src/form/form-editor/preview/radio.js'\nexport * from '~/src/form/form-editor/preview/radio-sortable.js'\nexport * from '~/src/form/form-editor/preview/select-sortable.js'\nexport * from '~/src/form/form-editor/preview/short-answer.js'\nexport * from '~/src/form/form-editor/preview/select.js'\nexport * from '~/src/form/form-editor/preview/select-sortable.js'\nexport * from '~/src/form/form-editor/preview/supporting-evidence.js'\nexport * from '~/src/form/form-editor/preview/long-answer.js'\nexport * from '~/src/form/form-editor/preview/uk-address.js'\nexport * from '~/src/form/form-editor/preview/yes-no.js'\nexport * from '~/src/form/form-editor/preview/controller/page-controller-base.js'\nexport * from '~/src/form/form-editor/preview/controller/page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/guidance-page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/summary-page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/reorder-questions-page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/page-controller-base.js'\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","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/form/form-editor/preview/index.js"],"sourcesContent":["export * from '~/src/form/form-editor/preview/autocomplete.js'\nexport * from '~/src/form/form-editor/preview/checkbox.js'\nexport * from '~/src/form/form-editor/preview/checkbox-sortable.js'\nexport * from '~/src/form/form-editor/preview/date-input.js'\nexport * from '~/src/form/form-editor/preview/declaration.js'\nexport * from '~/src/form/form-editor/preview/email-address.js'\nexport * from '~/src/form/form-editor/preview/list.js'\nexport * from '~/src/form/form-editor/preview/list-sortable.js'\nexport * from '~/src/form/form-editor/preview/markdown.js'\nexport * from '~/src/form/form-editor/preview/month-year.js'\nexport * from '~/src/form/form-editor/preview/number-only.js'\nexport * from '~/src/form/form-editor/preview/phone-number.js'\nexport * from '~/src/form/form-editor/preview/question.js'\nexport * from '~/src/form/form-editor/preview/radio.js'\nexport * from '~/src/form/form-editor/preview/radio-sortable.js'\nexport * from '~/src/form/form-editor/preview/select-sortable.js'\nexport * from '~/src/form/form-editor/preview/short-answer.js'\nexport * from '~/src/form/form-editor/preview/select.js'\nexport * from '~/src/form/form-editor/preview/select-sortable.js'\nexport * from '~/src/form/form-editor/preview/supporting-evidence.js'\nexport * from '~/src/form/form-editor/preview/long-answer.js'\nexport * from '~/src/form/form-editor/preview/uk-address.js'\nexport * from '~/src/form/form-editor/preview/yes-no.js'\nexport * from '~/src/form/form-editor/preview/controller/page-controller-base.js'\nexport * from '~/src/form/form-editor/preview/controller/page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/guidance-page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/summary-page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/reorder-questions-page-controller.js'\nexport * from '~/src/form/form-editor/preview/controller/page-controller-base.js'\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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/form/form-editor/preview/types.ts"],"sourcesContent":["import {\n type PagePreviewPanelMacro,\n type QuestionBaseModel\n} from '~/src/form/form-editor/macros/types.js'\nimport { type AutocompleteQuestion } from '~/src/form/form-editor/preview/autocomplete.js'\nimport { type DateInputQuestion } from '~/src/form/form-editor/preview/date-input.js'\nimport { type EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport { type ListSortableQuestion } from '~/src/form/form-editor/preview/list-sortable.js'\nimport { type LongAnswerQuestion } from '~/src/form/form-editor/preview/long-answer.js'\nimport { type PhoneNumberQuestion } from '~/src/form/form-editor/preview/phone-number.js'\nimport { type Question } from '~/src/form/form-editor/preview/question.js'\nimport { type RadioSortableQuestion } from '~/src/form/form-editor/preview/radio-sortable.js'\nimport { type SelectSortableQuestion } from '~/src/form/form-editor/preview/select-sortable.js'\nimport { type ShortAnswerQuestion } from '~/src/form/form-editor/preview/short-answer.js'\nimport { type UkAddressQuestion } from '~/src/form/form-editor/preview/uk-address.js'\nimport { type ListElement } from '~/src/form/form-editor/types.js'\nexport { type QuestionBaseModel } from '~/src/form/form-editor/macros/types.js'\nexport interface BaseSettings {\n question: string\n hintText: string\n optional: boolean\n shortDesc: string\n userClasses: string\n items: ListElement[]\n content: string\n attributes?: Record<string, string>\n usePostcodeLookup?: boolean\n}\n\nexport interface DefaultComponent {\n id?: string\n text: string\n classes: string\n isPageHeading?: boolean\n}\n\nexport interface GovukFieldset {\n legend: DefaultComponent\n}\n\nexport type ListenerRow = [\n HTMLInputElement | null,\n (target: HTMLInputElement, e: Event) => void,\n keyof HTMLElementEventMap\n]\n\nexport interface DomElementsBase {\n readonly values?: BaseSettings\n autocompleteOptions?: string\n setPreviewHTML(value: string): void\n setPreviewDOM(element: HTMLElement): void\n}\n\nexport interface QuestionElements extends DomElementsBase {\n readonly values: BaseSettings\n}\n\nexport interface AutocompleteElements extends QuestionElements {\n autocompleteOptions: string\n}\n\nexport interface NumberSettings extends BaseSettings {\n prefix: string\n suffix: string\n}\n\nexport interface NumberElements extends DomElementsBase {\n readonly values: NumberSettings\n}\n\nexport interface RenderBase {\n render(questionTemplate: string, renderContext: RenderContext): void\n}\n\nexport interface QuestionRenderContext {\n model: QuestionBaseModel\n}\n\nexport interface PageRenderContext {\n params: PagePreviewPanelMacro\n}\n\nexport type RenderContext = QuestionRenderContext | PageRenderContext\n\nexport interface HTMLBuilder {\n buildHTML(questionTemplate: string, renderContext: RenderContext): string\n}\n\nexport interface QuestionRenderer {\n render(questionTemplate: string, questionBaseModel: QuestionBaseModel): void\n}\n\nexport interface PageRenderer {\n render(pageTemplate: string, pagePreview: PagePreviewPanelMacro): void\n}\n\nexport type Renderer = QuestionRenderer | PageRenderer\n\nexport interface ListElements extends QuestionElements {\n afterInputsHTML: string\n}\n\nexport interface PagePreviewBaseElements {\n heading: string\n guidance: string\n}\n\nexport interface PageOverviewElements extends PagePreviewBaseElements {\n addHeading: boolean\n repeatQuestion: string | undefined\n hasRepeater: boolean\n}\n\nexport interface SummaryPageElements extends PagePreviewBaseElements {\n declaration: boolean\n}\n\nexport type PreviewQuestion =\n | DateInputQuestion\n | EmailAddressQuestion\n | ListSortableQuestion\n | LongAnswerQuestion\n | PhoneNumberQuestion\n | Question\n | RadioSortableQuestion\n | SelectSortableQuestion\n | ShortAnswerQuestion\n | UkAddressQuestion\n | AutocompleteQuestion\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/form/form-editor/preview/types.ts"],"sourcesContent":["import {\n type PagePreviewPanelMacro,\n type QuestionBaseModel\n} from '~/src/form/form-editor/macros/types.js'\nimport { type AutocompleteQuestion } from '~/src/form/form-editor/preview/autocomplete.js'\nimport { type DateInputQuestion } from '~/src/form/form-editor/preview/date-input.js'\nimport { type EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport { type ListSortableQuestion } from '~/src/form/form-editor/preview/list-sortable.js'\nimport { type LongAnswerQuestion } from '~/src/form/form-editor/preview/long-answer.js'\nimport { type PhoneNumberQuestion } from '~/src/form/form-editor/preview/phone-number.js'\nimport { type Question } from '~/src/form/form-editor/preview/question.js'\nimport { type RadioSortableQuestion } from '~/src/form/form-editor/preview/radio-sortable.js'\nimport { type SelectSortableQuestion } from '~/src/form/form-editor/preview/select-sortable.js'\nimport { type ShortAnswerQuestion } from '~/src/form/form-editor/preview/short-answer.js'\nimport { type UkAddressQuestion } from '~/src/form/form-editor/preview/uk-address.js'\nimport { type ListElement } from '~/src/form/form-editor/types.js'\nexport { type QuestionBaseModel } from '~/src/form/form-editor/macros/types.js'\nexport interface BaseSettings {\n question: string\n hintText: string\n optional: boolean\n shortDesc: string\n userClasses: string\n items: ListElement[]\n content: string\n attributes?: Record<string, string>\n}\n\nexport interface DefaultComponent {\n id?: string\n text: string\n classes: string\n isPageHeading?: boolean\n}\n\nexport interface GovukFieldset {\n legend: DefaultComponent\n}\n\nexport type ListenerRow = [\n HTMLInputElement | null,\n (target: HTMLInputElement, e: Event) => void,\n keyof HTMLElementEventMap\n]\n\nexport interface DomElementsBase {\n readonly values?: BaseSettings\n autocompleteOptions?: string\n setPreviewHTML(value: string): void\n setPreviewDOM(element: HTMLElement): void\n}\n\nexport interface QuestionElements extends DomElementsBase {\n readonly values: BaseSettings\n}\n\nexport interface AutocompleteElements extends QuestionElements {\n autocompleteOptions: string\n}\n\nexport interface NumberSettings extends BaseSettings {\n prefix: string\n suffix: string\n}\n\nexport interface DeclarationSettings extends BaseSettings {\n declarationText: string\n}\n\nexport interface DeclarationElements extends DomElementsBase {\n readonly values: DeclarationSettings\n}\n\nexport interface UkAddressSettings extends BaseSettings {\n usePostcodeLookup?: boolean\n}\n\nexport interface UkAddressElements extends DomElementsBase {\n readonly values: UkAddressSettings\n}\n\nexport interface NumberElements extends DomElementsBase {\n readonly values: NumberSettings\n}\n\nexport interface RenderBase {\n render(questionTemplate: string, renderContext: RenderContext): void\n}\n\nexport interface QuestionRenderContext {\n model: QuestionBaseModel\n}\n\nexport interface PageRenderContext {\n params: PagePreviewPanelMacro\n}\n\nexport type RenderContext = QuestionRenderContext | PageRenderContext\n\nexport interface HTMLBuilder {\n buildHTML(questionTemplate: string, renderContext: RenderContext): string\n}\n\nexport interface QuestionRenderer {\n render(questionTemplate: string, questionBaseModel: QuestionBaseModel): void\n}\n\nexport interface PageRenderer {\n render(pageTemplate: string, pagePreview: PagePreviewPanelMacro): void\n}\n\nexport type Renderer = QuestionRenderer | PageRenderer\n\nexport interface ListElements extends QuestionElements {\n afterInputsHTML: string\n}\n\nexport interface PagePreviewBaseElements {\n heading: string\n guidance: string\n}\n\nexport interface PageOverviewElements extends PagePreviewBaseElements {\n addHeading: boolean\n repeatQuestion: string | undefined\n hasRepeater: boolean\n}\n\nexport interface SummaryPageElements extends PagePreviewBaseElements {\n declaration: boolean\n}\n\nexport type PreviewQuestion =\n | DateInputQuestion\n | EmailAddressQuestion\n | ListSortableQuestion\n | LongAnswerQuestion\n | PhoneNumberQuestion\n | Question\n | RadioSortableQuestion\n | SelectSortableQuestion\n | ShortAnswerQuestion\n | UkAddressQuestion\n | AutocompleteQuestion\n"],"mappings":"","ignoreList":[]}
@@ -17,7 +17,7 @@ export class UkAddressComponentPreviewElements extends QuestionComponentElements
17
17
 
18
18
  /**
19
19
  * @protected
20
- * @returns {BaseSettings}
20
+ * @returns {UkAddressSettings}
21
21
  */
22
22
  _getValues() {
23
23
  return {
@@ -36,7 +36,7 @@ export class UkAddressQuestion extends FieldsetQuestion {
36
36
  _usePostcodeLookup = false;
37
37
 
38
38
  /**
39
- * @param {QuestionElements} htmlElements
39
+ * @param {UkAddressElements} htmlElements
40
40
  * @param {QuestionRenderer} questionRenderer
41
41
  */
42
42
  constructor(htmlElements, questionRenderer) {
@@ -67,7 +67,7 @@ export class UkAddressQuestion extends FieldsetQuestion {
67
67
  }
68
68
 
69
69
  /**
70
- * @import { BaseSettings, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'
70
+ * @import { QuestionElements, QuestionRenderer, UkAddressElements, UkAddressSettings } from '~/src/form/form-editor/preview/types.js'
71
71
  * @import { UkAddressFieldComponent } from '~/src/components/types.js'
72
72
  */
73
73
  //# sourceMappingURL=uk-address.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uk-address.js","names":["ComponentType","FieldsetQuestion","PreviewComponent","QuestionComponentElements","UkAddressComponentPreviewElements","constructor","component","_usePostcodeLookup","options","usePostcodeLookup","_getValues","UkAddressQuestion","componentType","UkAddressField","_questionTemplate","PATH","_fieldName","htmlElements","questionRenderer","values","val","render","_renderInput"],"sources":["../../../../../src/form/form-editor/preview/uk-address.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { FieldsetQuestion } from '~/src/form/form-editor/preview/fieldset-question.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\nimport { QuestionComponentElements } from '~/src/form/form-editor/preview/question.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class UkAddressComponentPreviewElements extends QuestionComponentElements {\n /**\n * @param {UkAddressFieldComponent} component\n */\n constructor(component) {\n super(component)\n this._usePostcodeLookup = component.options.usePostcodeLookup\n }\n\n /**\n * @protected\n * @returns {BaseSettings}\n */\n _getValues() {\n return {\n ...super._getValues(),\n usePostcodeLookup: this._usePostcodeLookup\n }\n }\n}\n\nexport class UkAddressQuestion extends FieldsetQuestion {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.UkAddressField\n _questionTemplate = PreviewComponent.PATH + 'ukaddressfield.njk'\n _fieldName = 'addressField'\n _usePostcodeLookup = false\n\n /**\n * @param {QuestionElements} htmlElements\n * @param {QuestionRenderer} questionRenderer\n */\n constructor(htmlElements, questionRenderer) {\n super(htmlElements, questionRenderer)\n this._usePostcodeLookup = htmlElements.values.usePostcodeLookup ?? false\n }\n\n get usePostcodeLookup() {\n return this._usePostcodeLookup\n }\n\n /**\n * @param {boolean} val\n */\n set usePostcodeLookup(val) {\n this._usePostcodeLookup = val\n this.render()\n }\n\n /**\n * @protected\n */\n _renderInput() {\n return {\n ...super._renderInput(),\n usePostcodeLookup: this.usePostcodeLookup\n }\n }\n}\n\n/**\n * @import { BaseSettings, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { UkAddressFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,gBAAgB;AACzB,SAASC,gBAAgB;AACzB,SAASC,yBAAyB;;AAElC;AACA;AACA;AACA,OAAO,MAAMC,iCAAiC,SAASD,yBAAyB,CAAC;EAC/E;AACF;AACA;EACEE,WAAWA,CAACC,SAAS,EAAE;IACrB,KAAK,CAACA,SAAS,CAAC;IAChB,IAAI,CAACC,kBAAkB,GAAGD,SAAS,CAACE,OAAO,CAACC,iBAAiB;EAC/D;;EAEA;AACF;AACA;AACA;EACEC,UAAUA,CAAA,EAAG;IACX,OAAO;MACL,GAAG,KAAK,CAACA,UAAU,CAAC,CAAC;MACrBD,iBAAiB,EAAE,IAAI,CAACF;IAC1B,CAAC;EACH;AACF;AAEA,OAAO,MAAMI,iBAAiB,SAASV,gBAAgB,CAAC;EACtD;AACF;AACA;EACEW,aAAa,GAAGZ,aAAa,CAACa,cAAc;EAC5CC,iBAAiB,GAAGZ,gBAAgB,CAACa,IAAI,GAAG,oBAAoB;EAChEC,UAAU,GAAG,cAAc;EAC3BT,kBAAkB,GAAG,KAAK;;EAE1B;AACF;AACA;AACA;EACEF,WAAWA,CAACY,YAAY,EAAEC,gBAAgB,EAAE;IAC1C,KAAK,CAACD,YAAY,EAAEC,gBAAgB,CAAC;IACrC,IAAI,CAACX,kBAAkB,GAAGU,YAAY,CAACE,MAAM,CAACV,iBAAiB,IAAI,KAAK;EAC1E;EAEA,IAAIA,iBAAiBA,CAAA,EAAG;IACtB,OAAO,IAAI,CAACF,kBAAkB;EAChC;;EAEA;AACF;AACA;EACE,IAAIE,iBAAiBA,CAACW,GAAG,EAAE;IACzB,IAAI,CAACb,kBAAkB,GAAGa,GAAG;IAC7B,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;;EAEA;AACF;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,OAAO;MACL,GAAG,KAAK,CAACA,YAAY,CAAC,CAAC;MACvBb,iBAAiB,EAAE,IAAI,CAACA;IAC1B,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"uk-address.js","names":["ComponentType","FieldsetQuestion","PreviewComponent","QuestionComponentElements","UkAddressComponentPreviewElements","constructor","component","_usePostcodeLookup","options","usePostcodeLookup","_getValues","UkAddressQuestion","componentType","UkAddressField","_questionTemplate","PATH","_fieldName","htmlElements","questionRenderer","values","val","render","_renderInput"],"sources":["../../../../../src/form/form-editor/preview/uk-address.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { FieldsetQuestion } from '~/src/form/form-editor/preview/fieldset-question.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\nimport { QuestionComponentElements } from '~/src/form/form-editor/preview/question.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class UkAddressComponentPreviewElements extends QuestionComponentElements {\n /**\n * @param {UkAddressFieldComponent} component\n */\n constructor(component) {\n super(component)\n this._usePostcodeLookup = component.options.usePostcodeLookup\n }\n\n /**\n * @protected\n * @returns {UkAddressSettings}\n */\n _getValues() {\n return {\n ...super._getValues(),\n usePostcodeLookup: this._usePostcodeLookup\n }\n }\n}\n\nexport class UkAddressQuestion extends FieldsetQuestion {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.UkAddressField\n _questionTemplate = PreviewComponent.PATH + 'ukaddressfield.njk'\n _fieldName = 'addressField'\n _usePostcodeLookup = false\n\n /**\n * @param {UkAddressElements} htmlElements\n * @param {QuestionRenderer} questionRenderer\n */\n constructor(htmlElements, questionRenderer) {\n super(htmlElements, questionRenderer)\n this._usePostcodeLookup = htmlElements.values.usePostcodeLookup ?? false\n }\n\n get usePostcodeLookup() {\n return this._usePostcodeLookup\n }\n\n /**\n * @param {boolean} val\n */\n set usePostcodeLookup(val) {\n this._usePostcodeLookup = val\n this.render()\n }\n\n /**\n * @protected\n */\n _renderInput() {\n return {\n ...super._renderInput(),\n usePostcodeLookup: this.usePostcodeLookup\n }\n }\n}\n\n/**\n * @import { QuestionElements, QuestionRenderer, UkAddressElements, UkAddressSettings } from '~/src/form/form-editor/preview/types.js'\n * @import { UkAddressFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,gBAAgB;AACzB,SAASC,gBAAgB;AACzB,SAASC,yBAAyB;;AAElC;AACA;AACA;AACA,OAAO,MAAMC,iCAAiC,SAASD,yBAAyB,CAAC;EAC/E;AACF;AACA;EACEE,WAAWA,CAACC,SAAS,EAAE;IACrB,KAAK,CAACA,SAAS,CAAC;IAChB,IAAI,CAACC,kBAAkB,GAAGD,SAAS,CAACE,OAAO,CAACC,iBAAiB;EAC/D;;EAEA;AACF;AACA;AACA;EACEC,UAAUA,CAAA,EAAG;IACX,OAAO;MACL,GAAG,KAAK,CAACA,UAAU,CAAC,CAAC;MACrBD,iBAAiB,EAAE,IAAI,CAACF;IAC1B,CAAC;EACH;AACF;AAEA,OAAO,MAAMI,iBAAiB,SAASV,gBAAgB,CAAC;EACtD;AACF;AACA;EACEW,aAAa,GAAGZ,aAAa,CAACa,cAAc;EAC5CC,iBAAiB,GAAGZ,gBAAgB,CAACa,IAAI,GAAG,oBAAoB;EAChEC,UAAU,GAAG,cAAc;EAC3BT,kBAAkB,GAAG,KAAK;;EAE1B;AACF;AACA;AACA;EACEF,WAAWA,CAACY,YAAY,EAAEC,gBAAgB,EAAE;IAC1C,KAAK,CAACD,YAAY,EAAEC,gBAAgB,CAAC;IACrC,IAAI,CAACX,kBAAkB,GAAGU,YAAY,CAACE,MAAM,CAACV,iBAAiB,IAAI,KAAK;EAC1E;EAEA,IAAIA,iBAAiBA,CAAA,EAAG;IACtB,OAAO,IAAI,CAACF,kBAAkB;EAChC;;EAEA;AACF;AACA;EACE,IAAIE,iBAAiBA,CAACW,GAAG,EAAE;IACzB,IAAI,CAACb,kBAAkB,GAAGa,GAAG;IAC7B,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;;EAEA;AACF;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,OAAO;MACL,GAAG,KAAK,CAACA,YAAY,CAAC,CAAC;MACvBb,iBAAiB,EAAE,IAAI,CAACA;IAC1B,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n type ConditionWrapperV2,\n type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n /**\n * The type of the page\n */\n pageType: string\n\n /**\n * The type of the question\n */\n questionType: string | undefined\n\n /**\n * The sub-type of written answer\n */\n writtenAnswerSub: string\n\n /**\n * The sub-type of date\n */\n dateSub: string\n\n /**\n * The sub-type of location\n */\n locationSub: string\n\n /**\n * The sub-type of lists\n */\n listSub: string\n\n /**\n * The name of the question (unique id)\n */\n name: string\n\n /**\n * The text of the question\n */\n question: string\n\n /**\n * The hint text of the question\n */\n hintText: string\n\n /**\n * Denotes if the question is optional\n */\n questionOptional: string\n\n /**\n * The short description of the question\n */\n shortDescription: string\n\n /**\n * The value of checkbox to reveal instruction text field\n */\n giveInstructions: string\n\n /**\n * The instruction text for location components (optional)\n */\n instructionText: string\n\n /**\n * The value of checkbox to reveal heading and guidance section\n */\n pageHeadingAndGuidance: string\n\n /**\n * The page heading\n */\n pageHeading: string\n\n /**\n * The page guidance text\n */\n guidanceText: string\n\n /**\n * The value of checkbox to reveal repeater section\n */\n repeater: string\n\n /**\n * The maximum number of repeater items\n */\n minItems: number\n\n /**\n * The minimum number of repeater items\n */\n maxItems: number\n\n /**\n * The repeater question set name\n */\n questionSetName: string\n\n /**\n * The value of radio to reveal declaration text field\n */\n needDeclaration: string\n\n /**\n * The check answers declaration text\n */\n declarationText: string\n\n /**\n * The min length a field can have\n */\n minLength: string\n\n /**\n * The max length a field can have\n */\n maxLength: string\n\n /**\n * The regex value of a field\n */\n regex: string\n\n /**\n * The number of rows of a textarea\n */\n rows: string\n\n /**\n * The classes to be applied to a field\n */\n classes: string\n\n /**\n * The prefix to be applied to a field\n */\n prefix: string\n\n /**\n * The suffix to be applied to a field\n */\n suffix: string\n\n /**\n * The decimal precision of a number field\n */\n precision: string\n\n /**\n * The lowest number allowed in a field\n */\n min: string\n\n /**\n * The highest number allowed in a field\n */\n max: string\n\n /**\n * The maximum days in the future to allow for a date\n */\n maxFuture: string\n\n /**\n * The maximum days in the past to allow for a date\n */\n maxPast: string\n\n /**\n * The exact number of files to upload\n */\n exactFiles: string\n\n /**\n * The minimum number of files to upload\n */\n minFiles: string\n\n /**\n * The maximum number of files to upload\n */\n maxFiles: string\n\n /**\n * The type of files for upload\n */\n fileTypes: string[]\n\n /**\n * The types of document files for upload\n */\n documentTypes: string[]\n\n /**\n * The types of image files for upload\n */\n imageTypes: string[]\n\n /**\n * The types of tabular data files for upload\n */\n tabularDataTypes: string[]\n\n /**\n * The action required from within a sub-section\n */\n enhancedAction: string\n\n /**\n * Placeholder for inserted section to handle adding/editing radios or checkboxes\n */\n radiosOrCheckboxes: string\n\n /**\n * The unique id of the radio item\n */\n radioId: string\n\n /**\n * The display text of the radio item\n */\n radioText?: string\n\n /**\n * The hint of the radio item\n */\n radioHint?: string\n\n /**\n * The value of the radio item\n */\n radioValue?: string\n\n /**\n * The list name to be applied to a field (if applicable)\n */\n list: string\n\n /**\n * List items in JSON format, such as for radios ro checkboxes\n */\n listItemsData: string\n\n /**\n * An array of options for autocomplete\n */\n autoCompleteOptions: Item[]\n\n /**\n * Set to 'true' is Javascript is enabled\n */\n jsEnabled: string\n\n /**\n * List item id for conditions\n */\n itemId: string\n\n /**\n * Relative date period for conditions\n */\n period: string\n\n /**\n * Relative date unit for conditions\n */\n unit: DateUnits\n\n /**\n * Relative date direction for conditions\n */\n direction: DateDirections\n\n /**\n * Denotes if page is an Exit Page\n */\n exitPage: boolean\n\n /**\n * Denotes if the UK address question supports postcode lookup\n */\n usePostcodeLookup: string\n}\n\nexport type FormEditorInputPage = Pick<\n FormEditor,\n | 'pageType'\n | 'questionType'\n | 'writtenAnswerSub'\n | 'dateSub'\n | 'locationSub'\n | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n FormEditor,\n 'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputQuestion = Pick<\n FormEditor,\n | 'questionType'\n | 'name'\n | 'question'\n | 'shortDescription'\n | 'hintText'\n | 'questionOptional'\n | 'minLength'\n | 'maxLength'\n | 'regex'\n | 'rows'\n | 'classes'\n | 'prefix'\n | 'suffix'\n | 'precision'\n | 'min'\n | 'max'\n | 'maxFuture'\n | 'maxPast'\n | 'exactFiles'\n | 'minFiles'\n | 'maxFiles'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'list'\n | 'listItemsData'\n | 'jsEnabled'\n | 'usePostcodeLookup'\n | 'giveInstructions'\n | 'instructionText'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n FormEditorInputQuestion,\n | 'question'\n | 'hintText'\n | 'shortDescription'\n | 'questionOptional'\n | 'questionType'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'listItemsData'\n | 'jsEnabled'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n id?: string\n text?: string\n hint?: {\n text: string\n }\n value?: ListValue\n}\n\nexport interface ListLabel {\n text: string\n classes: string\n}\n\nexport interface ListElement extends ListItem {\n readonly id: string\n text: string\n value: ListValue\n label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n readonly text: string\n readonly hint?: ReadonlyHint\n readonly value: ListValue\n readonly label?: ListLabel\n}\n\nexport interface DateItem {\n name: string\n classes: string\n}\n\nexport interface ListConflict {\n conflictItem: {\n id: string\n text: string\n }\n originalItem?: {\n id: string\n text: string\n }\n conditionNames: string[]\n linkableItems: {\n id?: string\n text: string\n value: string | number | boolean\n }[]\n closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n questionType?: ComponentType\n questionDetails?: Partial<ComponentDef>\n editRow?: {\n radioId?: string\n radioText?: string\n radioHint?: string\n radioValue?: ListValue\n expanded?: boolean\n }\n listItems?: ListItem[]\n isReordering?: boolean\n lastMovedId?: string\n lastMoveDirection?: string\n listConflicts?: ListConflict[]\n}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n pageCondition: string | undefined\n pageConditionDetails: ConditionWrapperV2 | undefined\n pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\n hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n key?: {\n text?: string\n classes?: string\n }\n value?: {\n text?: string\n html?: string\n classes?: string\n }\n}\n\nexport interface GovukField {\n id?: string\n name?: string\n idPrefix?: string\n fieldset?: {\n legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n }\n value?: string | boolean | number | string[] | Item[]\n classes?: string\n label?: {\n text?: string\n html?: string\n classes?: string\n isPageHeading?: boolean\n }\n hint?: { text?: string; html?: string; classes?: string }\n items?: GovukFieldItem[]\n rows?: number\n type?: string\n customTemplate?: string\n formGroup?: {\n classes?: string\n }\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n name: 'questionOptional'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n name: 'usePostcodeLookup'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: GovukField\n instructionText?: GovukField\n questionOptional?: GovukField\n shortDescription?: GovukField\n fileTypes?: GovukField\n documentTypes?: GovukField\n imageTypes?: GovukField\n tabularDataTypes?: GovukField\n radiosOrCheckboxes?: GovukField\n autoCompleteOptions?: GovukField\n usePostcodeLookup?: GovukField\n errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n FormEditorGovukField,\n 'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n text?: string\n hint?: {\n text?: string\n }\n value?: string\n divider?: {\n text?: string\n hint?: string\n value?: string\n }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n ComponentType,\n Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n min?: { fieldName: string; placeholder: string }\n max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n type ConditionWrapperV2,\n type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n /**\n * The type of the page\n */\n pageType: string\n\n /**\n * The type of the question\n */\n questionType: string | undefined\n\n /**\n * The sub-type of written answer\n */\n writtenAnswerSub: string\n\n /**\n * The sub-type of date\n */\n dateSub: string\n\n /**\n * The sub-type of location\n */\n locationSub: string\n\n /**\n * The sub-type of lists\n */\n listSub: string\n\n /**\n * The name of the question (unique id)\n */\n name: string\n\n /**\n * The text of the question\n */\n question: string\n\n /**\n * The hint text of the question\n */\n hintText: string\n\n /**\n * Denotes if the question is optional\n */\n questionOptional: string\n\n /**\n * The short description of the question\n */\n shortDescription: string\n\n /**\n * The value of checkbox to reveal instruction text field\n */\n giveInstructions: string\n\n /**\n * The instruction text for location components (optional)\n */\n instructionText: string\n\n /**\n * The value of checkbox to reveal heading and guidance section\n */\n pageHeadingAndGuidance: string\n\n /**\n * The page heading\n */\n pageHeading: string\n\n /**\n * The page guidance text\n */\n guidanceText: string\n\n /**\n * The value of checkbox to reveal repeater section\n */\n repeater: string\n\n /**\n * The maximum number of repeater items\n */\n minItems: number\n\n /**\n * The minimum number of repeater items\n */\n maxItems: number\n\n /**\n * The repeater question set name\n */\n questionSetName: string\n\n /**\n * The value of radio to reveal declaration text field\n */\n needDeclaration: string\n\n /**\n * The check answers declaration text\n */\n declarationText: string\n\n /**\n * The min length a field can have\n */\n minLength: string\n\n /**\n * The max length a field can have\n */\n maxLength: string\n\n /**\n * The regex value of a field\n */\n regex: string\n\n /**\n * The number of rows of a textarea\n */\n rows: string\n\n /**\n * The classes to be applied to a field\n */\n classes: string\n\n /**\n * The prefix to be applied to a field\n */\n prefix: string\n\n /**\n * The suffix to be applied to a field\n */\n suffix: string\n\n /**\n * The decimal precision of a number field\n */\n precision: string\n\n /**\n * The lowest number allowed in a field\n */\n min: string\n\n /**\n * The highest number allowed in a field\n */\n max: string\n\n /**\n * The maximum days in the future to allow for a date\n */\n maxFuture: string\n\n /**\n * The maximum days in the past to allow for a date\n */\n maxPast: string\n\n /**\n * The exact number of files to upload\n */\n exactFiles: string\n\n /**\n * The minimum number of files to upload\n */\n minFiles: string\n\n /**\n * The maximum number of files to upload\n */\n maxFiles: string\n\n /**\n * The type of files for upload\n */\n fileTypes: string[]\n\n /**\n * The types of document files for upload\n */\n documentTypes: string[]\n\n /**\n * The types of image files for upload\n */\n imageTypes: string[]\n\n /**\n * The types of tabular data files for upload\n */\n tabularDataTypes: string[]\n\n /**\n * The action required from within a sub-section\n */\n enhancedAction: string\n\n /**\n * Placeholder for inserted section to handle adding/editing radios or checkboxes\n */\n radiosOrCheckboxes: string\n\n /**\n * The unique id of the radio item\n */\n radioId: string\n\n /**\n * The display text of the radio item\n */\n radioText?: string\n\n /**\n * The hint of the radio item\n */\n radioHint?: string\n\n /**\n * The value of the radio item\n */\n radioValue?: string\n\n /**\n * The list name to be applied to a field (if applicable)\n */\n list: string\n\n /**\n * List items in JSON format, such as for radios ro checkboxes\n */\n listItemsData: string\n\n /**\n * An array of options for autocomplete\n */\n autoCompleteOptions: Item[]\n\n /**\n * Set to 'true' is Javascript is enabled\n */\n jsEnabled: string\n\n /**\n * List item id for conditions\n */\n itemId: string\n\n /**\n * Relative date period for conditions\n */\n period: string\n\n /**\n * Relative date unit for conditions\n */\n unit: DateUnits\n\n /**\n * Relative date direction for conditions\n */\n direction: DateDirections\n\n /**\n * Denotes if page is an Exit Page\n */\n exitPage: boolean\n\n /**\n * Denotes if the UK address question supports postcode lookup\n */\n usePostcodeLookup: string\n}\n\nexport type FormEditorInputPage = Pick<\n FormEditor,\n | 'pageType'\n | 'questionType'\n | 'writtenAnswerSub'\n | 'dateSub'\n | 'locationSub'\n | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n FormEditor,\n 'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputQuestion = Pick<\n FormEditor,\n | 'questionType'\n | 'name'\n | 'question'\n | 'shortDescription'\n | 'hintText'\n | 'declarationText'\n | 'questionOptional'\n | 'minLength'\n | 'maxLength'\n | 'regex'\n | 'rows'\n | 'classes'\n | 'prefix'\n | 'suffix'\n | 'precision'\n | 'min'\n | 'max'\n | 'maxFuture'\n | 'maxPast'\n | 'exactFiles'\n | 'minFiles'\n | 'maxFiles'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'list'\n | 'listItemsData'\n | 'jsEnabled'\n | 'usePostcodeLookup'\n | 'giveInstructions'\n | 'instructionText'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n FormEditorInputQuestion,\n | 'question'\n | 'hintText'\n | 'shortDescription'\n | 'questionOptional'\n | 'questionType'\n | 'fileTypes'\n | 'documentTypes'\n | 'imageTypes'\n | 'tabularDataTypes'\n | 'autoCompleteOptions'\n | 'enhancedAction'\n | 'radioId'\n | 'radioText'\n | 'radioHint'\n | 'radioValue'\n | 'listItemsData'\n | 'jsEnabled'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n id?: string\n text?: string\n hint?: {\n text: string\n }\n value?: ListValue\n}\n\nexport interface ListLabel {\n text: string\n classes: string\n}\n\nexport interface ListElement extends ListItem {\n readonly id: string\n text: string\n value: ListValue\n label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n readonly text: string\n readonly hint?: ReadonlyHint\n readonly value: ListValue\n readonly label?: ListLabel\n}\n\nexport interface DateItem {\n name: string\n classes: string\n}\n\nexport interface ListConflict {\n conflictItem: {\n id: string\n text: string\n }\n originalItem?: {\n id: string\n text: string\n }\n conditionNames: string[]\n linkableItems: {\n id?: string\n text: string\n value: string | number | boolean\n }[]\n closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n questionType?: ComponentType\n questionDetails?: Partial<ComponentDef>\n editRow?: {\n radioId?: string\n radioText?: string\n radioHint?: string\n radioValue?: ListValue\n expanded?: boolean\n }\n listItems?: ListItem[]\n isReordering?: boolean\n lastMovedId?: string\n lastMoveDirection?: string\n listConflicts?: ListConflict[]\n}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n pageCondition: string | undefined\n pageConditionDetails: ConditionWrapperV2 | undefined\n pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\n hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n key?: {\n text?: string\n classes?: string\n }\n value?: {\n text?: string\n html?: string\n classes?: string\n }\n}\n\nexport interface GovukField {\n id?: string\n name?: string\n idPrefix?: string\n fieldset?: {\n legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n }\n value?: string | boolean | number | string[] | Item[]\n classes?: string\n label?: {\n text?: string\n html?: string\n classes?: string\n isPageHeading?: boolean\n }\n hint?: { text?: string; html?: string; classes?: string }\n items?: GovukFieldItem[]\n rows?: number\n type?: string\n customTemplate?: string\n formGroup?: {\n classes?: string\n }\n preContent?: {\n path?: string\n }\n postContent?: {\n path?: string\n }\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n name: 'questionOptional'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n name: 'usePostcodeLookup'\n items: [\n {\n text?: string\n value?: string\n checked: boolean\n }\n ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: GovukField\n instructionText?: GovukField\n questionOptional?: GovukField\n shortDescription?: GovukField\n fileTypes?: GovukField\n documentTypes?: GovukField\n imageTypes?: GovukField\n tabularDataTypes?: GovukField\n radiosOrCheckboxes?: GovukField\n autoCompleteOptions?: GovukField\n usePostcodeLookup?: GovukField\n declarationText?: GovukField\n errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n FormEditorGovukField,\n 'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n text?: string\n hint?: {\n text?: string\n }\n value?: string\n divider?: {\n text?: string\n hint?: string\n value?: string\n }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n ComponentType,\n Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n min?: { fieldName: string; placeholder: string }\n max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { type PageFileUpload, type PageQuestion, type PageRepeat, type PageSummary } from '../form/form-definition/types.js';
1
+ import { type PageFileUpload, type PageQuestion, type PageRepeat, type PageSummary, type PageTerminal } from '../form/form-definition/types.js';
2
2
  import { ControllerType } from '../pages/enums.js';
3
3
  /**
4
4
  * Stub builder for a question page
@@ -36,4 +36,5 @@ export declare function buildFileUploadPage(partialFileUploadPage?: Partial<Page
36
36
  * @returns {PageRepeat}
37
37
  */
38
38
  export declare function buildRepeaterPage(partialRepeaterPage?: Partial<PageRepeat>): PageRepeat;
39
+ export declare function buildTerminalPage(partialTerminalPage: Partial<PageTerminal>): PageTerminal;
39
40
  //# sourceMappingURL=pages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/pages.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAkB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,OAAO,CA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B,GAAE,OAAO,CAAC,UAAU,CAAM,GAC5C,UAAU,CAyBZ;AAED,wBAAgB,iBAAiB,CAC/B,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAAC,GACzC,YAAY,CAYd"}
@@ -1,8 +1,15 @@
1
+ import { type ConditionListItemRefValueDataV2 } from '../../conditions/types.js';
1
2
  import { type FormDefinition } from '../../form/form-definition/types.js';
2
3
  /**
3
- * TypeGuard to check if component is a ListComponentsDef
4
- * @param { FormDefinition | undefined } definition
4
+ * TypeGuard to check if something is a FormDefinition
5
+ * @param { unknown } definition
5
6
  * @returns { definition is FormDefinition }
6
7
  */
7
- export declare function isFormDefinition(definition: FormDefinition | undefined): definition is FormDefinition;
8
+ export declare function isFormDefinition(definition: unknown): definition is FormDefinition;
9
+ /**
10
+ * TypeGuard to check if something is a ConditionListItemRefValueDataV2
11
+ * @param { unknown } conditionValueData
12
+ * @returns { definition is ConditionListItemRefValueDataV2 }
13
+ */
14
+ export declare function isConditionListItemRefValueData(conditionValueData: unknown): conditionValueData is ConditionListItemRefValueDataV2;
8
15
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAEzE;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,cAAc,GAAG,SAAS,GACrC,UAAU,IAAI,cAAc,CAO9B"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAEzE;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,OAAO,GAClB,UAAU,IAAI,cAAc,CAW9B;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,kBAAkB,EAAE,OAAO,GAC1B,kBAAkB,IAAI,+BAA+B,CAUvD"}
@@ -1,7 +1,8 @@
1
1
  import JoiBase, { type CustomHelpers } from 'joi';
2
2
  import { type ComponentDef, type ContentComponentsDef, type FileUploadFieldComponent } from '../../components/types.js';
3
- import { type ConditionDataV2 } from '../../conditions/types.js';
3
+ import { type ConditionDataV2, type ConditionListItemRefValueDataV2 } from '../../conditions/types.js';
4
4
  import { type ConditionWrapperV2, type FormDefinition, type List, type Page, type Repeat } from '../../form/form-definition/types.js';
5
+ export declare const listItemIdValidator: (value: string, helpers: CustomHelpers<ConditionListItemRefValueDataV2>) => string | JoiBase.ErrorReport;
5
6
  export declare const MIN_NUMBER_OF_REPEAT_ITEMS = 1;
6
7
  export declare const MAX_NUMBER_OF_REPEAT_ITEMS = 200;
7
8
  export declare const conditionDataSchemaV2: JoiBase.ObjectSchema<ConditionDataV2>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,EAAE,EAAE,KAAK,aAAa,EAAyB,MAAM,KAAK,CAAA;AAKxE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAEL,KAAK,eAAe,EAWrB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAGL,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EAGnB,KAAK,IAAI,EACT,KAAK,IAAI,EAET,KAAK,MAAM,EAIZ,MAAM,qCAAqC,CAAA;AAkO5C,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAC3C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAE7C,eAAO,MAAM,qBAAqB,uCA8F9B,CAAA;AAoDJ,eAAO,MAAM,wBAAwB,0CAyBU,CAAA;A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eAAO,MAAM,mBAAmB,GAC9B,OAAO,MAAM,EACb,SAAS,aAAa,CAAC,+BAA+B,CAAC,iCAqCxD,CAAA;AAyND,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAC3C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAE7C,eAAO,MAAM,qBAAqB,uCAyD9B,CAAA;AAoDJ,eAAO,MAAM,wBAAwB,0CAyBU,CAAA;AAE/C,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,SAAS,aAAa,CAAC,MAAM,CAAC,iCAW/B,CAAA;AAED,eAAO,MAAM,eAAe,oCA+GZ,CAAA;AAEhB,eAAO,MAAM,iBAAiB,oCAciB,CAAA;AAE/C,eAAO,MAAM,wBAAwB,oCASsB,CAAA;AAE3D,eAAO,MAAM,yBAAyB,oCAMpC,CAAA;AAEF,eAAO,MAAM,sBAAsB,oCAUjC,CAAA;AAuDF,eAAO,MAAM,gBAAgB,8BASzB,CAAA;AAyCJ,eAAO,MAAM,0BAA0B,sEAWmB,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,UAAU,4BAmDnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAuCiB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,4BAgBkB,CAAA;AAwDlD,eAAO,MAAM,UAAU,4BA8CnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAIiB,CAAA;AAsD1C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,sCAgG7B,CAAA;AAEJ,eAAO,MAAM,sBAAsB,sCA2CY,CAAA;AAI/C,eAAO,MAAM,MAAM,sCAAuB,CAAA"}
@@ -59,7 +59,7 @@ export class QuestionPreviewElements implements ListElements {
59
59
  /**
60
60
  * @param {BaseSettings} baseSettings
61
61
  */
62
- constructor({ question, hintText, optional, shortDesc, userClasses, usePostcodeLookup, items, content }: BaseSettings);
62
+ constructor({ question, hintText, optional, shortDesc, userClasses, items, content }: BaseSettings);
63
63
  /**
64
64
  * @protected
65
65
  */
@@ -89,11 +89,6 @@ export class QuestionPreviewElements implements ListElements {
89
89
  * @private
90
90
  */
91
91
  private _items;
92
- /**
93
- * @protected
94
- * @type {boolean}
95
- */
96
- protected _usePostcodeLookup: boolean;
97
92
  afterInputsHTML: string;
98
93
  /**
99
94
  * @returns {BaseSettings}
@@ -120,6 +115,38 @@ export class AutocompletePreviewElements extends QuestionPreviewElements impleme
120
115
  });
121
116
  autocompleteOptions: string;
122
117
  }
118
+ /**
119
+ * @implements {UkAddressElements}
120
+ */
121
+ export class UkAddressPreviewElements extends QuestionPreviewElements implements UkAddressElements {
122
+ /**
123
+ * @param {BaseSettings & {usePostcodeLookup?: boolean}} elements
124
+ */
125
+ constructor({ usePostcodeLookup, ...elements }: BaseSettings & {
126
+ usePostcodeLookup?: boolean;
127
+ });
128
+ _usePostcodeLookup: boolean;
129
+ /**
130
+ * @returns {UkAddressSettings}
131
+ */
132
+ get values(): UkAddressSettings;
133
+ }
134
+ /**
135
+ * @implements {DeclarationElements}
136
+ */
137
+ export class DeclarationPreviewElements extends QuestionPreviewElements implements DeclarationElements {
138
+ /**
139
+ * @param {BaseSettings & {declarationText: string}} elements
140
+ */
141
+ constructor({ declarationText, ...elements }: BaseSettings & {
142
+ declarationText: string;
143
+ });
144
+ _declarationText: string;
145
+ /**
146
+ * @returns {DeclarationSettings}
147
+ */
148
+ get values(): DeclarationSettings;
149
+ }
123
150
  /**
124
151
  * @implements {PageOverviewElements}
125
152
  */
@@ -151,7 +178,7 @@ export class NumberPreviewElements {
151
178
  /**
152
179
  * @param {NumberSettings} baseSettings
153
180
  */
154
- constructor({ question, hintText, optional, shortDesc, userClasses, prefix, suffix, usePostcodeLookup, items, content }: NumberSettings);
181
+ constructor({ question, hintText, optional, shortDesc, userClasses, prefix, suffix, items, content }: NumberSettings);
155
182
  /**
156
183
  * @protected
157
184
  */
@@ -191,11 +218,6 @@ export class NumberPreviewElements {
191
218
  * @private
192
219
  */
193
220
  private _items;
194
- /**
195
- * @protected
196
- * @type {boolean}
197
- */
198
- protected _usePostcodeLookup: boolean;
199
221
  afterInputsHTML: string;
200
222
  /**
201
223
  * @returns {NumberSettings}
@@ -219,6 +241,10 @@ import type { PageRenderer } from '../../../form/form-editor/preview/types.js';
219
241
  import type { PagePreviewPanelMacro } from '../../../form/form-editor/macros/types.js';
220
242
  import type { ListElements } from '../../../form/form-editor/preview/types.js';
221
243
  import type { AutocompleteElements } from '../../../form/form-editor/preview/types.js';
244
+ import type { UkAddressElements } from '../../../form/form-editor/preview/types.js';
245
+ import type { UkAddressSettings } from '../../../form/form-editor/preview/types.js';
246
+ import type { DeclarationElements } from '../../../form/form-editor/preview/types.js';
247
+ import type { DeclarationSettings } from '../../../form/form-editor/preview/types.js';
222
248
  import type { PageOverviewElements } from '../../../form/form-editor/preview/types.js';
223
249
  import type { NumberSettings } from '../../../form/form-editor/preview/types.js';
224
250
  declare const list1Id: "414d82a3-4cab-416a-bd54-6b86fbd51120";
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/__stubs__/preview.js"],"names":[],"mappings":"AAoRA;;;;GAIG;AACH,6DAJW,OAAO,CAAC,YAAY,CAAC,cACrB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,GAC1C,QAAQ,CAUpB;AA/RD;;GAEG;AACH;IAqBE;;;;OAIG;IACH,oCAHW,MAAM,kBACN,aAAa,GAFX,MAAM,CAMlB;IAtBD;;OAEG;IACH,wBAFW,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,EAItD;IAVD;;OAEG;IACH,YAFU,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAE5C;IASV;;;OAGG;IACH,yBAHW,MAAM,qBACN,iBAAiB,QAI3B;CAUF;AAED;;G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,iBAAiB;IACjB,4BAAc;IACd,iBAAiB;IACjB,6BAAiB;IACjB;;;OAGG;IACH,sBAHU,MAAM,CAGD;IACf;;;OAGG;IACH,wBAHU,MAAM,CAGC;IACjB;;;OAGG;IACH,mBAHU,MAAM,CAGJ;IACZ;;;OAGG;IACH,mBAHU,MAAM,CAGJ;IACZ;;;OAGG;IACH,oBAHU,MAAM,CAGH;IACb;;;;OAIG;IACH,eAAW;IACX;;;OAGG;IACH,8BAFU,OAAO,CAES;IAC1B,wBAA2E;IA6B3E;;OAEG;IACH,cAFa,cAAc,CAe1B;IAED;;OAEG;IACH,uBAFW,MAAM,QAIhB;IAED;;OAEG;IACH,sBAFW,WAAW,QAIrB;CACF;kCAK6K,yCAAyC;uCAAzC,yCAAyC;yBAjZ9L,4CAA4C;sCAiZyG,yCAAyC;mCAAzC,yCAAyC;kCAAzC,yCAAyC;2CAD7K,wCAAwC;kCAC4F,yCAAyC;0CAAzC,yCAAyC;0CAAzC,yCAAyC;oCAAzC,yCAAyC;AAxKvN,uBAAgB,sCAAsC,CAAA;AACtD,uBAAgB,sCAAsC,CAAA;AACtD,uBAAgB,sCAAsC,CAAA;AACtD,uBAAgB,sCAAsC,CAAA;AAEtD,gCAAoC,YAAY,CA4B9C"}
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/__stubs__/preview.js"],"names":[],"mappings":"AA0TA;;;;GAIG;AACH,6DAJW,OAAO,CAAC,YAAY,CAAC,cACrB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,GAC1C,QAAQ,CAUpB;AArUD;;GAEG;AACH;IAqBE;;;;OAIG;IACH,oCAHW,MAAM,kBACN,aAAa,GAFX,MAAM,CAMlB;IAtBD;;OAEG;IACH,wBAFW,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,EAItD;IAVD;;OAEG;IACH,Y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A4B9C"}
@@ -79,6 +79,7 @@ export declare const questionDetailsFullSchema: {
79
79
  value: string;
80
80
  }[]>;
81
81
  classesSchema: Joi.StringSchema<string>;
82
+ declarationTextSchema: Joi.StringSchema<string>;
82
83
  documentTypesSchema: Joi.ArraySchema<any[]>;
83
84
  enhancedActionSchema: Joi.StringSchema<string>;
84
85
  exactFilesSchema: Joi.NumberSchema<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAuB,MAAM,KAAK,CAAA;AAOhE,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAA;AAExC,oBAAY,oBAAoB;IAC9B,qBAAqB,qBAAqB;IAC1C,YAAY,YAAY;IACxB,YAAY,YAAY;IACxB,gBAAgB,gBAAgB;CACjC;AAED,eAAO,MAAM,cAAc,0BAG6C,CAAA;AAExE,eAAO,MAAM,kBAAkB,0BAgB2C,CAAA;AAE1E,eAAO,MAAM,sBAAsB,0BAsBmC,CAAA;AAEtE,eAAO,MAAM,sBAAsB,0BAOmB,CAAA;AAEtD,eAAO,MAAM,aAAa,0BAG0B,CAAA;AAEpD,eAAO,MAAM,aAAa,0BAS0B,CAAA;AAEpD,eAAO,MAAM,iBAAiB,0BAQ0B,CAAA;AAExD,eAAO,MAAM,UAAU,0BAG0B,CAAA;AAEjD,eAAO,MAAM,cAAc,0BAG8B,CAAA;AAEzD,eAAO,MAAM,cAAc,0BAI0C,CAAA;AAErE,eAAO,MAAM,qBAAqB,0BAM/B,CAAA;AAEH,eAAO,MAAM,sBAAsB,0BAMhC,CAAA;AAEH,eAAO,MAAM,qBAAqB,0B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,CAAC,OAAO,CAAC,CAAA;CAC7C;AAED,UAAU,eAAgB,SAAQ,GAAG,CAAC,IAAI;IACxC,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,CAAC,CAAA;CACnC;AAED,eAAO,MAAM,eAAe,EA4GtB,eAAe,CAAA;AAErB,eAAO,MAAM,yBAAyB;UACvB,MAAM;WAAS,MAAM;IAiBvB,CAAA;AAEb,eAAO,MAAM,yBAAyB;;cAnBvB,MAAM;eAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DnC,CAAA;AAED,eAAO,MAAM,uBAAuB;;;CAGnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,uCAGmC,CAAA;AAEzE,eAAO,MAAM,sCAAsC;;CAElD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wCAAwC,uDAIO,CAAA;AAE5D,eAAO,MAAM,2BAA2B;;;;;CAKvC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,2CAMrC,CAAA;AAEL,eAAO,MAAM,+BAA+B;;;;CAI3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,+CAI8B,CAAA;AAE5E,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,gBAAgB,CAUhC;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,0BAA0B,GAAG,2BAA2B,CASxE;AAGD,eAAO,MAAM,6BAA6B,UAA+B,CAAA"}
@@ -56,6 +56,12 @@ export interface QuestionBaseModel {
56
56
  text: string;
57
57
  };
58
58
  }
59
+ export interface DeclarationModel extends QuestionBaseModel {
60
+ declaration?: {
61
+ text?: string;
62
+ classes?: string;
63
+ };
64
+ }
59
65
  export interface AppPreviewPanelMacro extends AppPreviewPanelTabsMacro {
60
66
  model: QuestionBaseModel;
61
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","source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AAK,EAAE,iBAAiB,CAAA;IACxB,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE;QACjB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,EAAE,CAAA;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,OAAO,EAAE;QACP,KAAK,EAAE,oBAAoB,EAAE,CAAA;KAC9B,CAAA;CACF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @implements {QuestionElements}
3
+ */
4
+ export class DeclarationComponentPreviewElements extends QuestionComponentElements implements QuestionElements {
5
+ /**
6
+ * @param {DeclarationFieldComponent} component
7
+ */
8
+ constructor(component: DeclarationFieldComponent);
9
+ _declarationText: string;
10
+ /**
11
+ * @protected
12
+ * @returns {DeclarationSettings}
13
+ */
14
+ protected _getValues(): DeclarationSettings;
15
+ }
16
+ export class DeclarationQuestion extends Question {
17
+ /**
18
+ * @param {DeclarationElements} htmlElements
19
+ * @param {QuestionRenderer} questionRenderer
20
+ */
21
+ constructor(htmlElements: DeclarationElements, questionRenderer: QuestionRenderer);
22
+ _declarationText: string;
23
+ /**
24
+ * @param {string} val
25
+ */
26
+ set declarationText(val: string);
27
+ get declarationText(): string;
28
+ /**
29
+ * @protected
30
+ * @returns {DeclarationModel}
31
+ */
32
+ protected _renderInput(): DeclarationModel;
33
+ }
34
+ import type { QuestionElements } from '../../../form/form-editor/preview/types.js';
35
+ import { QuestionComponentElements } from '../../../form/form-editor/preview/question.js';
36
+ import type { DeclarationSettings } from '../../../form/form-editor/preview/types.js';
37
+ import type { DeclarationFieldComponent } from '../../../components/types.js';
38
+ import { Question } from '../../../form/form-editor/preview/question.js';
39
+ import type { DeclarationModel } from '../../../form/form-editor/macros/types.js';
40
+ import type { DeclarationElements } from '../../../form/form-editor/preview/types.js';
41
+ import type { QuestionRenderer } from '../../../form/form-editor/preview/types.js';
42
+ //# sourceMappingURL=declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/declaration.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;IACE;;OAEG;IACH,uBAFW,yBAAyB,EAKnC;IADC,yBAAyC;IAG3C;;;OAGG;IACH,wBAFa,mBAAmB,CAO/B;CACF;AAED;IAaE;;;OAGG;IACH,0BAHW,mBAAmB,oBACnB,gBAAgB,EAK1B;IATD,yBAAqB;IAerB;;OAEG;IACH,yBAFW,MAAM,EAKhB;IAVD,uBAKW,MAAM,CAHhB;IAUD;;;OAGG;IACH,0BAFa,gBAAgB,CAY5B;CACF;sCAGgG,yCAAyC;0CA9EnI,4CAA4C;yCA8E8C,yCAAyC;+CAE5F,2BAA2B;yBAhFlE,4CAA4C;sCA+Ed,wCAAwC;yCADoB,yCAAyC;sCAAzC,yCAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/helpers.js"],"names":[],"mappings":"AAmEA;;;;GAIG;AACH,gEAJW,gBAAgB,cAChB,cAAc,GACZ,CAAC,SAAS,EAAE,YAAY,KAAK,QAAQ,CA4CjD;sCAGsD,yCAAyC;oCAG7D,qCAAqC;kCACvC,2BAA2B;8BAH/B,4CAA4C"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/helpers.js"],"names":[],"mappings":"AA2GA;;;;GAIG;AACH,gEAJW,gBAAgB,cAChB,cAAc,GACZ,CAAC,SAAS,EAAE,YAAY,KAAK,QAAQ,CAmCjD;sCAGsD,yCAAyC;oCAG7D,qCAAqC;kCAC0G,2BAA2B;8BAHhL,4CAA4C"}
@@ -2,6 +2,7 @@ export * from "../../../form/form-editor/preview/autocomplete.js";
2
2
  export * from "../../../form/form-editor/preview/checkbox.js";
3
3
  export * from "../../../form/form-editor/preview/checkbox-sortable.js";
4
4
  export * from "../../../form/form-editor/preview/date-input.js";
5
+ export * from "../../../form/form-editor/preview/declaration.js";
5
6
  export * from "../../../form/form-editor/preview/email-address.js";
6
7
  export * from "../../../form/form-editor/preview/list.js";
7
8
  export * from "../../../form/form-editor/preview/list-sortable.js";
@@ -21,7 +21,6 @@ export interface BaseSettings {
21
21
  items: ListElement[];
22
22
  content: string;
23
23
  attributes?: Record<string, string>;
24
- usePostcodeLookup?: boolean;
25
24
  }
26
25
  export interface DefaultComponent {
27
26
  id?: string;
@@ -53,6 +52,18 @@ export interface NumberSettings extends BaseSettings {
53
52
  prefix: string;
54
53
  suffix: string;
55
54
  }
55
+ export interface DeclarationSettings extends BaseSettings {
56
+ declarationText: string;
57
+ }
58
+ export interface DeclarationElements extends DomElementsBase {
59
+ readonly values: DeclarationSettings;
60
+ }
61
+ export interface UkAddressSettings extends BaseSettings {
62
+ usePostcodeLookup?: boolean;
63
+ }
64
+ export interface UkAddressElements extends DomElementsBase {
65
+ readonly values: UkAddressSettings;
66
+ }
56
67
  export interface NumberElements extends DomElementsBase {
57
68
  readonly values: NumberSettings;
58
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../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8
8
  constructor(component: UkAddressFieldComponent);
9
9
  _usePostcodeLookup: boolean | undefined;
10
+ /**
11
+ * @protected
12
+ * @returns {UkAddressSettings}
13
+ */
14
+ protected _getValues(): UkAddressSettings;
10
15
  }
11
16
  export class UkAddressQuestion extends FieldsetQuestion {
17
+ /**
18
+ * @param {UkAddressElements} htmlElements
19
+ * @param {QuestionRenderer} questionRenderer
20
+ */
21
+ constructor(htmlElements: UkAddressElements, questionRenderer: QuestionRenderer);
12
22
  _usePostcodeLookup: boolean;
13
23
  /**
14
24
  * @param {boolean} val
@@ -43,6 +53,9 @@ export class UkAddressQuestion extends FieldsetQuestion {
43
53
  }
44
54
  import type { QuestionElements } from '../../../form/form-editor/preview/types.js';
45
55
  import { QuestionComponentElements } from '../../../form/form-editor/preview/question.js';
56
+ import type { UkAddressSettings } from '../../../form/form-editor/preview/types.js';
46
57
  import type { UkAddressFieldComponent } from '../../../components/types.js';
47
58
  import { FieldsetQuestion } from '../../../form/form-editor/preview/fieldset-question.js';
59
+ import type { UkAddressElements } from '../../../form/form-editor/preview/types.js';
60
+ import type { QuestionRenderer } from '../../../form/form-editor/preview/types.js';
48
61
  //# sourceMappingURL=uk-address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uk-address.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/uk-address.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IACE;;OAEG;IACH,uBAFW,uBAAuB,EAKjC;IADC,wCAA6D;CAahE;AAED;IAOE,4BAA0B;IAe1B;;OAEG;IACH,2BAFW,OAAO,EAKjB;IAVD,yBAKW,OAAO,CAHjB;IAUD;;OAEG;IACH;;;;;;;;;;;;;;;;;;;;;MAKC;CACF;sCAGoE,yCAAyC;0CApEpE,4CAA4C;6CAqE1C,2BAA2B;iCAvEtC,qDAAqD"}
1
+ {"version":3,"file":"uk-address.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/uk-address.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IACE;;OAEG;IACH,uBAFW,uBAAuB,EAKjC;IADC,wCAA6D;IAG/D;;;OAGG;IACH,wBAFa,iBAAiB,CAO7B;CACF;AAED;IASE;;;OAGG;IACH,0BAHW,iBAAiB,oBACjB,gBAAgB,EAK1B;IATD,4BAA0B;IAe1B;;OAEG;IACH,2BAFW,OAAO,EAKjB;IAVD,yBAKW,OAAO,CAHjB;IAUD;;OAEG;IACH;;;;;;;;;;;;;;;;;;;;;MAKC;CACF;sCAG4F,yCAAyC;0CApE5F,4CAA4C;uCAoEO,yCAAyC;6CAC1F,2BAA2B;iCAvEtC,qDAAqD;uCAsEO,yCAAyC;sCAAzC,yCAAyC"}