@defra/forms-model 3.0.611 → 3.0.613
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/form/form-editor/__stubs__/preview.js +30 -1
- package/dist/module/form/form-editor/__stubs__/preview.js.map +1 -1
- package/dist/module/form/form-editor/index.js +1 -1
- package/dist/module/form/form-editor/index.js.map +1 -1
- package/dist/module/form/form-editor/macros/types.js.map +1 -1
- package/dist/module/form/form-editor/preview/controller/page-controller.js +5 -1
- package/dist/module/form/form-editor/preview/controller/page-controller.js.map +1 -1
- package/dist/module/form/form-editor/preview/controller/summary-page-controller.js +14 -1
- package/dist/module/form/form-editor/preview/controller/summary-page-controller.js.map +1 -1
- package/dist/module/form/form-editor/preview/helpers.js +8 -2
- package/dist/module/form/form-editor/preview/helpers.js.map +1 -1
- package/dist/module/form/form-editor/preview/index.js +1 -0
- package/dist/module/form/form-editor/preview/index.js.map +1 -1
- package/dist/module/form/form-editor/preview/payment.js +132 -0
- package/dist/module/form/form-editor/preview/payment.js.map +1 -0
- package/dist/module/form/form-editor/preview/types.js.map +1 -1
- package/dist/types/form/form-editor/__stubs__/preview.d.ts +20 -0
- package/dist/types/form/form-editor/__stubs__/preview.d.ts.map +1 -1
- package/dist/types/form/form-editor/index.d.ts.map +1 -1
- package/dist/types/form/form-editor/macros/types.d.ts +5 -0
- package/dist/types/form/form-editor/macros/types.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/controller/page-controller.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/controller/summary-page-controller.d.ts +10 -0
- package/dist/types/form/form-editor/preview/controller/summary-page-controller.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/helpers.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/index.d.ts +1 -0
- package/dist/types/form/form-editor/preview/payment.d.ts +63 -0
- package/dist/types/form/form-editor/preview/payment.d.ts.map +1 -0
- package/dist/types/form/form-editor/preview/types.d.ts +14 -0
- package/dist/types/form/form-editor/preview/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/form/form-editor/__stubs__/preview.js +26 -1
- package/src/form/form-editor/index.ts +3 -1
- package/src/form/form-editor/macros/types.ts +6 -0
- package/src/form/form-editor/preview/controller/page-controller.js +7 -1
- package/src/form/form-editor/preview/controller/summary-page-controller.js +14 -1
- package/src/form/form-editor/preview/helpers.js +11 -2
- package/src/form/form-editor/preview/index.js +1 -0
- package/src/form/form-editor/preview/payment.js +142 -0
- package/src/form/form-editor/preview/types.ts +17 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","names":["ComponentType","hasContentField","hasInputField","hasListField","hasSelectionFields","AutocompleteListQuestion","CheckboxQuestion","ComponentElements","ContentElements","DateInputQuestion","DeclarationComponentPreviewElements","DeclarationQuestion","EastingNorthingComponentPreviewElements","EastingNorthingQuestion","EmailAddressQuestion","HiddenQuestion","LatLongComponentPreviewElements","LatLongQuestion","ListComponentElements","ListQuestion","SelectComponentElements","LongAnswerQuestion","MultilineTextFieldComponentPreviewElements","Markdown","MonthYearQuestion","NationalGridComponentPreviewElements","NationalGridQuestion","NumberComponentPreviewElements","NumberOnlyQuestion","OsGridRefComponentPreviewElements","OsGridRefQuestion","PhoneNumberQuestion","QuestionComponentElements","RadioQuestion","SelectQuestion","ShortAnswerQuestion","SupportingEvidenceQuestion","UkAddressComponentPreviewElements","UkAddressQuestion","UnsupportedQuestion","YesNoQuestion","findDefinitionListFromComponent","InvalidFieldComponent","InputFieldComponentDictionary","TextField","Details","InsetText","Html","List","EmailAddressField","NumberField","MultilineTextField","TelephoneNumberField","MonthYearField","DatePartsField","UkAddressField","AutocompleteField","RadiosField","CheckboxesField","SelectField","YesNoField","DeclarationField","FileUploadField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","HiddenField","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 {\n EastingNorthingComponentPreviewElements,\n EastingNorthingQuestion\n} from '~/src/form/form-editor/preview/easting-northing.js'\nimport { EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport { HiddenQuestion } from '~/src/form/form-editor/preview/hidden.js'\nimport {\n LatLongComponentPreviewElements,\n LatLongQuestion\n} from '~/src/form/form-editor/preview/lat-long.js'\nimport {\n ListComponentElements,\n ListQuestion,\n SelectComponentElements\n} from '~/src/form/form-editor/preview/list.js'\nimport {\n LongAnswerQuestion,\n MultilineTextFieldComponentPreviewElements\n} 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 NationalGridComponentPreviewElements,\n NationalGridQuestion\n} from '~/src/form/form-editor/preview/national-grid.js'\nimport {\n NumberComponentPreviewElements,\n NumberOnlyQuestion\n} from '~/src/form/form-editor/preview/number-only.js'\nimport {\n OsGridRefComponentPreviewElements,\n OsGridRefQuestion\n} from '~/src/form/form-editor/preview/os-grid-ref.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 { UnsupportedQuestion } from '~/src/form/form-editor/preview/unsupported-question.js'\nimport { YesNoQuestion } from '~/src/form/form-editor/preview/yes-no.js'\nimport { findDefinitionListFromComponent } from '~/src/form/utils/list.js'\n/**\n * @type {typeof PreviewComponent}\n */\nconst InvalidFieldComponent = UnsupportedQuestion\n\n/**\n * @type {Partial<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]: EastingNorthingQuestion,\n [ComponentType.OsGridRefField]: OsGridRefQuestion,\n [ComponentType.NationalGridFieldNumberField]: NationalGridQuestion,\n [ComponentType.LatLongField]: LatLongQuestion,\n [ComponentType.HiddenField]: HiddenQuestion\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.MultilineTextField]: (component, _definition) => {\n const componentCoerced = /** @type {MultilineTextFieldComponent} */ (\n component\n )\n return new MultilineTextFieldComponentPreviewElements(componentCoerced)\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 [ComponentType.EastingNorthingField]: (component, _definition) => {\n const componentCoerced = /** @type {EastingNorthingFieldComponent} */ (\n component\n )\n return new EastingNorthingComponentPreviewElements(componentCoerced)\n },\n [ComponentType.OsGridRefField]: (component, _definition) => {\n const componentCoerced = /** @type {OsGridRefFieldComponent} */ (component)\n return new OsGridRefComponentPreviewElements(componentCoerced)\n },\n [ComponentType.NationalGridFieldNumberField]: (component, _definition) => {\n const componentCoerced =\n /** @type {NationalGridFieldNumberFieldComponent} */ (component)\n return new NationalGridComponentPreviewElements(componentCoerced)\n },\n [ComponentType.LatLongField]: (component, _definition) => {\n const componentCoerced = /** @type {LatLongFieldComponent} */ (component)\n return new LatLongComponentPreviewElements(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 =\n InputFieldComponentDictionary[component.type] ?? InvalidFieldComponent\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, EastingNorthingFieldComponent, LatLongFieldComponent, MultilineTextFieldComponent, NationalGridFieldNumberFieldComponent, NumberFieldComponent, OsGridRefFieldComponent, SelectFieldComponent, UkAddressFieldComponent, YesNoFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SACEC,eAAe,E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CAAC;IAC7D,CAAC,MAAM,IAAIpE,eAAe,CAACoE,SAAS,CAAC,EAAE;MACrCO,gBAAgB,GAAG,IAAIpE,eAAe,CAAC6D,SAAS,CAAC;IACnD,CAAC,MAAM;MACLO,gBAAgB,GAAG,IAAIrE,iBAAiB,CAAC8D,SAAS,CAAC;IACrD;IAEA,MAAMU,mBAAmB,GACvBpC,6BAA6B,CAAC0B,SAAS,CAACS,IAAI,CAAC,IAAIpC,qBAAqB;IACxE,MAAMsC,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":[]}
|
|
1
|
+
{"version":3,"file":"helpers.js","names":["ComponentType","hasContentField","hasInputField","hasListField","hasSelectionFields","AutocompleteListQuestion","CheckboxQuestion","ComponentElements","ContentElements","DateInputQuestion","DeclarationComponentPreviewElements","DeclarationQuestion","EastingNorthingComponentPreviewElements","EastingNorthingQuestion","EmailAddressQuestion","HiddenQuestion","LatLongComponentPreviewElements","LatLongQuestion","ListComponentElements","ListQuestion","SelectComponentElements","LongAnswerQuestion","MultilineTextFieldComponentPreviewElements","Markdown","MonthYearQuestion","NationalGridComponentPreviewElements","NationalGridQuestion","NumberComponentPreviewElements","NumberOnlyQuestion","OsGridRefComponentPreviewElements","OsGridRefQuestion","PaymentComponentPreviewElements","PaymentQuestion","PhoneNumberQuestion","QuestionComponentElements","RadioQuestion","SelectQuestion","ShortAnswerQuestion","SupportingEvidenceQuestion","UkAddressComponentPreviewElements","UkAddressQuestion","UnsupportedQuestion","YesNoQuestion","findDefinitionListFromComponent","InvalidFieldComponent","InputFieldComponentDictionary","TextField","Details","InsetText","Html","List","EmailAddressField","NumberField","MultilineTextField","TelephoneNumberField","MonthYearField","DatePartsField","UkAddressField","AutocompleteField","RadiosField","CheckboxesField","SelectField","YesNoField","DeclarationField","FileUploadField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","HiddenField","PaymentField","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 {\n EastingNorthingComponentPreviewElements,\n EastingNorthingQuestion\n} from '~/src/form/form-editor/preview/easting-northing.js'\nimport { EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport { HiddenQuestion } from '~/src/form/form-editor/preview/hidden.js'\nimport {\n LatLongComponentPreviewElements,\n LatLongQuestion\n} from '~/src/form/form-editor/preview/lat-long.js'\nimport {\n ListComponentElements,\n ListQuestion,\n SelectComponentElements\n} from '~/src/form/form-editor/preview/list.js'\nimport {\n LongAnswerQuestion,\n MultilineTextFieldComponentPreviewElements\n} 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 NationalGridComponentPreviewElements,\n NationalGridQuestion\n} from '~/src/form/form-editor/preview/national-grid.js'\nimport {\n NumberComponentPreviewElements,\n NumberOnlyQuestion\n} from '~/src/form/form-editor/preview/number-only.js'\nimport {\n OsGridRefComponentPreviewElements,\n OsGridRefQuestion\n} from '~/src/form/form-editor/preview/os-grid-ref.js'\nimport {\n PaymentComponentPreviewElements,\n PaymentQuestion\n} from '~/src/form/form-editor/preview/payment.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 { UnsupportedQuestion } from '~/src/form/form-editor/preview/unsupported-question.js'\nimport { YesNoQuestion } from '~/src/form/form-editor/preview/yes-no.js'\nimport { findDefinitionListFromComponent } from '~/src/form/utils/list.js'\n/**\n * @type {typeof PreviewComponent}\n */\nconst InvalidFieldComponent = UnsupportedQuestion\n\n/**\n * @type {Partial<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]: EastingNorthingQuestion,\n [ComponentType.OsGridRefField]: OsGridRefQuestion,\n [ComponentType.NationalGridFieldNumberField]: NationalGridQuestion,\n [ComponentType.LatLongField]: LatLongQuestion,\n [ComponentType.HiddenField]: HiddenQuestion,\n [ComponentType.PaymentField]: PaymentQuestion\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.MultilineTextField]: (component, _definition) => {\n const componentCoerced = /** @type {MultilineTextFieldComponent} */ (\n component\n )\n return new MultilineTextFieldComponentPreviewElements(componentCoerced)\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 [ComponentType.EastingNorthingField]: (component, _definition) => {\n const componentCoerced = /** @type {EastingNorthingFieldComponent} */ (\n component\n )\n return new EastingNorthingComponentPreviewElements(componentCoerced)\n },\n [ComponentType.OsGridRefField]: (component, _definition) => {\n const componentCoerced = /** @type {OsGridRefFieldComponent} */ (component)\n return new OsGridRefComponentPreviewElements(componentCoerced)\n },\n [ComponentType.NationalGridFieldNumberField]: (component, _definition) => {\n const componentCoerced =\n /** @type {NationalGridFieldNumberFieldComponent} */ (component)\n return new NationalGridComponentPreviewElements(componentCoerced)\n },\n [ComponentType.LatLongField]: (component, _definition) => {\n const componentCoerced = /** @type {LatLongFieldComponent} */ (component)\n return new LatLongComponentPreviewElements(componentCoerced)\n },\n [ComponentType.PaymentField]: (component, _definition) => {\n const componentCoerced = /** @type {PaymentFieldComponent} */ (component)\n return new PaymentComponentPreviewElements(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 =\n InputFieldComponentDictionary[component.type] ?? InvalidFieldComponent\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, EastingNorthingFieldComponent, LatLongFieldComponent, MultilineTextFieldComponent, NationalGridFieldNumberFieldComponent, NumberFieldComponent, OsGridRefFieldComponent, PaymentFieldComponent, SelectFieldComponent, UkAddressFieldComponent, YesNoFieldComponent } 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,SACEC,mCAAmC,EACnCC,mBAAmB;AAErB,SACEC,uCAAuC,EACvCC,uBAAuB;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,cAAc;AACvB,SACEC,+BAA+B,EAC/BC,eAAe;AAEjB,SACEC,qBAAqB,EACrBC,YAAY,EACZC,uBAAuB;AAEzB,SACEC,kBAAkB,EAClBC,0CAA0C;AAE5C,SAASC,QAAQ;AACjB,SAASC,iBAAiB;AAC1B,SACEC,oCAAoC,EACpCC,oBAAoB;AAEtB,SACEC,8BAA8B,EAC9BC,kBAAkB;AAEpB,SACEC,iCAAiC,EACjCC,iBAAiB;AAEnB,SACEC,+BAA+B,EAC/BC,eAAe;AAEjB,SAASC,mBAAmB;AAC5B,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,mBAAmB;AAC5B,SAASC,0BAA0B;AACnC,SACEC,iCAAiC,EACjCC,iBAAiB;AAEnB,SAASC,mBAAmB;AAC5B,SAASC,aAAa;AACtB,SAASC,+BAA+B;AACxC;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG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27
|
export * from "./unsupported-question.js";
|
|
28
28
|
export * from "./yes-no.js";
|
|
29
29
|
export * from "./hidden.js";
|
|
30
|
+
export * from "./payment.js";
|
|
30
31
|
export * from "./controller/page-controller-base.js";
|
|
31
32
|
export * from "./controller/page-controller.js";
|
|
32
33
|
export * from "./controller/guidance-page-controller.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/declaration.js'\nexport * from '~/src/form/form-editor/preview/easting-northing.js'\nexport * from '~/src/form/form-editor/preview/email-address.js'\nexport * from '~/src/form/form-editor/preview/lat-long.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/national-grid.js'\nexport * from '~/src/form/form-editor/preview/number-only.js'\nexport * from '~/src/form/form-editor/preview/os-grid-ref.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/unsupported-question.js'\nexport * from '~/src/form/form-editor/preview/yes-no.js'\nexport * from '~/src/form/form-editor/preview/hidden.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;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/easting-northing.js'\nexport * from '~/src/form/form-editor/preview/email-address.js'\nexport * from '~/src/form/form-editor/preview/lat-long.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/national-grid.js'\nexport * from '~/src/form/form-editor/preview/number-only.js'\nexport * from '~/src/form/form-editor/preview/os-grid-ref.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/unsupported-question.js'\nexport * from '~/src/form/form-editor/preview/yes-no.js'\nexport * from '~/src/form/form-editor/preview/hidden.js'\nexport * from '~/src/form/form-editor/preview/payment.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { ComponentType } from "../../../components/enums.js";
|
|
2
|
+
import { PreviewComponent } from "./preview.js";
|
|
3
|
+
import { Question, QuestionComponentElements } from "./question.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Formats a currency amount with thousand separators and two decimal places
|
|
7
|
+
* @param {number} value
|
|
8
|
+
* @param {'en-GB'} [locale] - locale for formatting
|
|
9
|
+
* @param {'GBP'} [currency] - currency code
|
|
10
|
+
* @returns {string} Formatted amount (e.g., "£1,234.56")
|
|
11
|
+
*/
|
|
12
|
+
function formatCurrency(value, locale = 'en-GB', currency = 'GBP') {
|
|
13
|
+
const formatter = new Intl.NumberFormat(locale, {
|
|
14
|
+
style: 'currency',
|
|
15
|
+
currency
|
|
16
|
+
});
|
|
17
|
+
return formatter.format(value);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @implements {PaymentElements}
|
|
22
|
+
*/
|
|
23
|
+
export class PaymentComponentPreviewElements extends QuestionComponentElements {
|
|
24
|
+
/**
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @protected
|
|
27
|
+
*/
|
|
28
|
+
_paymentAmount = 0;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @protected
|
|
33
|
+
*/
|
|
34
|
+
_paymentDescription = '';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param {PaymentFieldComponent} component
|
|
38
|
+
*/
|
|
39
|
+
constructor(component) {
|
|
40
|
+
super(component);
|
|
41
|
+
this._paymentAmount = component.options.amount;
|
|
42
|
+
this._paymentDescription = component.options.description;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @returns {PaymentSettings}
|
|
47
|
+
*/
|
|
48
|
+
get values() {
|
|
49
|
+
return {
|
|
50
|
+
...super.values,
|
|
51
|
+
paymentAmount: this._paymentAmount,
|
|
52
|
+
paymentDescription: this._paymentDescription
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export class PaymentQuestion extends Question {
|
|
57
|
+
/**
|
|
58
|
+
* @type {ComponentType}
|
|
59
|
+
*/
|
|
60
|
+
componentType = ComponentType.PaymentField;
|
|
61
|
+
/**
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @protected
|
|
64
|
+
*/
|
|
65
|
+
_questionTemplate = PreviewComponent.PATH + 'paymentfield.njk';
|
|
66
|
+
_fieldName = 'PaymentField';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @protected
|
|
71
|
+
*/
|
|
72
|
+
_paymentAmount = 0;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @protected
|
|
77
|
+
*/
|
|
78
|
+
_paymentDescription = '';
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @param {PaymentElements} htmlElements
|
|
82
|
+
* @param {QuestionRenderer} questionRenderer
|
|
83
|
+
*/
|
|
84
|
+
constructor(htmlElements, questionRenderer) {
|
|
85
|
+
super(htmlElements, questionRenderer);
|
|
86
|
+
this._paymentAmount = htmlElements.values.paymentAmount;
|
|
87
|
+
this._paymentDescription = htmlElements.values.paymentDescription;
|
|
88
|
+
}
|
|
89
|
+
get paymentAmount() {
|
|
90
|
+
return this._paymentAmount;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @param {number} val
|
|
95
|
+
*/
|
|
96
|
+
set paymentAmount(val) {
|
|
97
|
+
this._paymentAmount = val;
|
|
98
|
+
this.render();
|
|
99
|
+
}
|
|
100
|
+
get paymentDescription() {
|
|
101
|
+
return this._paymentDescription;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @param {string} val
|
|
106
|
+
*/
|
|
107
|
+
set paymentDescription(val) {
|
|
108
|
+
this._paymentDescription = val;
|
|
109
|
+
this.render();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @protected
|
|
114
|
+
* @returns {PaymentModel}
|
|
115
|
+
*/
|
|
116
|
+
_renderInput() {
|
|
117
|
+
const amount = typeof this._paymentAmount === 'number' ? formatCurrency(this._paymentAmount) : '£0.00';
|
|
118
|
+
return {
|
|
119
|
+
...super._renderInput(),
|
|
120
|
+
amount,
|
|
121
|
+
description: this._paymentDescription || 'Payment description',
|
|
122
|
+
headingClasses: 'govuk-heading-m'
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @import { PaymentSettings, PaymentElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'
|
|
129
|
+
* @import { PaymentModel } from '~/src/form/form-editor/macros/types.js'
|
|
130
|
+
* @import { PaymentFieldComponent } from '~/src/components/types.js'
|
|
131
|
+
*/
|
|
132
|
+
//# sourceMappingURL=payment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.js","names":["ComponentType","PreviewComponent","Question","QuestionComponentElements","formatCurrency","value","locale","currency","formatter","Intl","NumberFormat","style","format","PaymentComponentPreviewElements","_paymentAmount","_paymentDescription","constructor","component","options","amount","description","values","paymentAmount","paymentDescription","PaymentQuestion","componentType","PaymentField","_questionTemplate","PATH","_fieldName","htmlElements","questionRenderer","val","render","_renderInput","headingClasses"],"sources":["../../../../../src/form/form-editor/preview/payment.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\nimport {\n Question,\n QuestionComponentElements\n} from '~/src/form/form-editor/preview/question.js'\n\n/**\n * Formats a currency amount with thousand separators and two decimal places\n * @param {number} value\n * @param {'en-GB'} [locale] - locale for formatting\n * @param {'GBP'} [currency] - currency code\n * @returns {string} Formatted amount (e.g., \"£1,234.56\")\n */\nfunction formatCurrency(value, locale = 'en-GB', currency = 'GBP') {\n const formatter = new Intl.NumberFormat(locale, {\n style: 'currency',\n currency\n })\n\n return formatter.format(value)\n}\n\n/**\n * @implements {PaymentElements}\n */\nexport class PaymentComponentPreviewElements extends QuestionComponentElements {\n /**\n * @type {number}\n * @protected\n */\n _paymentAmount = 0\n\n /**\n * @type {string}\n * @protected\n */\n _paymentDescription = ''\n\n /**\n * @param {PaymentFieldComponent} component\n */\n constructor(component) {\n super(component)\n this._paymentAmount = component.options.amount\n this._paymentDescription = component.options.description\n }\n\n /**\n * @returns {PaymentSettings}\n */\n get values() {\n return {\n ...super.values,\n paymentAmount: this._paymentAmount,\n paymentDescription: this._paymentDescription\n }\n }\n}\n\nexport class PaymentQuestion extends Question {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.PaymentField\n /**\n * @type {string}\n * @protected\n */\n _questionTemplate = PreviewComponent.PATH + 'paymentfield.njk'\n _fieldName = 'PaymentField'\n\n /**\n * @type {number}\n * @protected\n */\n _paymentAmount = 0\n\n /**\n * @type {string}\n * @protected\n */\n _paymentDescription = ''\n\n /**\n * @param {PaymentElements} htmlElements\n * @param {QuestionRenderer} questionRenderer\n */\n constructor(htmlElements, questionRenderer) {\n super(htmlElements, questionRenderer)\n this._paymentAmount = htmlElements.values.paymentAmount\n this._paymentDescription = htmlElements.values.paymentDescription\n }\n\n get paymentAmount() {\n return this._paymentAmount\n }\n\n /**\n * @param {number} val\n */\n set paymentAmount(val) {\n this._paymentAmount = val\n this.render()\n }\n\n get paymentDescription() {\n return this._paymentDescription\n }\n\n /**\n * @param {string} val\n */\n set paymentDescription(val) {\n this._paymentDescription = val\n this.render()\n }\n\n /**\n * @protected\n * @returns {PaymentModel}\n */\n _renderInput() {\n const amount =\n typeof this._paymentAmount === 'number'\n ? formatCurrency(this._paymentAmount)\n : '£0.00'\n\n return {\n ...super._renderInput(),\n amount,\n description: this._paymentDescription || 'Payment description',\n headingClasses: 'govuk-heading-m'\n }\n }\n}\n\n/**\n * @import { PaymentSettings, PaymentElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { PaymentModel } from '~/src/form/form-editor/macros/types.js'\n * @import { PaymentFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,gBAAgB;AACzB,SACEC,QAAQ,EACRC,yBAAyB;;AAG3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAACC,KAAK,EAAEC,MAAM,GAAG,OAAO,EAAEC,QAAQ,GAAG,KAAK,EAAE;EACjE,MAAMC,SAAS,GAAG,IAAIC,IAAI,CAACC,YAAY,CAACJ,MAAM,EAAE;IAC9CK,KAAK,EAAE,UAAU;IACjBJ;EACF,CAAC,CAAC;EAEF,OAAOC,SAA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ACA;EACE,IAAIQ,aAAaA,CAACU,GAAG,EAAE;IACrB,IAAI,CAAClB,cAAc,GAAGkB,GAAG;IACzB,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;EAEA,IAAIV,kBAAkBA,CAAA,EAAG;IACvB,OAAO,IAAI,CAACR,mBAAmB;EACjC;;EAEA;AACF;AACA;EACE,IAAIQ,kBAAkBA,CAACS,GAAG,EAAE;IAC1B,IAAI,CAACjB,mBAAmB,GAAGiB,GAAG;IAC9B,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;;EAEA;AACF;AACA;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,MAAMf,MAAM,GACV,OAAO,IAAI,CAACL,cAAc,KAAK,QAAQ,GACnCV,cAAc,CAAC,IAAI,CAACU,cAAc,CAAC,GACnC,OAAO;IAEb,OAAO;MACL,GAAG,KAAK,CAACoB,YAAY,CAAC,CAAC;MACvBf,MAAM;MACNC,WAAW,EAAE,IAAI,CAACL,mBAAmB,IAAI,qBAAqB;MAC9DoB,cAAc,EAAE;IAClB,CAAC;EACH;AACF;;AAEA;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}\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 | HTMLTextAreaElement | null,\n (target: HTMLInputElement | HTMLTextAreaElement, 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 MultilineTextFieldSettings extends BaseSettings {\n maxLength: number\n rows: number\n}\n\nexport interface MultilineTextFieldElements extends DomElementsBase {\n readonly values: MultilineTextFieldSettings\n}\n\nexport interface LocationSettings extends BaseSettings {\n instructionText: string\n}\n\nexport interface LocationElements extends DomElementsBase {\n readonly values: LocationSettings\n}\n\nexport interface LocationFieldModel extends QuestionBaseModel {\n userClasses: string\n fieldset: {\n legend: {\n text: string\n classes: string\n }\n }\n instructionText: string\n details: {\n classes: string\n }\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 PageSectionInfo {\n title: string\n hideTitle: boolean\n}\n\nexport interface PageOverviewElements extends PagePreviewBaseElements {\n addHeading: boolean\n repeatQuestion: string | undefined\n hasRepeater: boolean\n section?: PageSectionInfo\n}\n\nexport interface SectionForPreview {\n name: string\n title: string\n pages: { title: string }[]\n}\n\nexport interface SummaryPageElements extends PagePreviewBaseElements {\n declaration: boolean\n showConfirmationEmail: boolean\n isConfirmationEmailSettingsPanel: boolean\n sections?: SectionForPreview[]\n unassignedPages?: { title: string }[]\n}\n\nexport interface SummaryPageInitialState {\n showConfirmationEmail: boolean\n declarationText: string\n needDeclaration: boolean\n isConfirmationEmailSettingsPanel: boolean\n sections?: SectionForPreview[]\n unassignedPages?: { title: string }[]\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 | HTMLTextAreaElement | null,\n (target: HTMLInputElement | HTMLTextAreaElement, 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 MultilineTextFieldSettings extends BaseSettings {\n maxLength: number\n rows: number\n}\n\nexport interface MultilineTextFieldElements extends DomElementsBase {\n readonly values: MultilineTextFieldSettings\n}\n\nexport interface LocationSettings extends BaseSettings {\n instructionText: string\n}\n\nexport interface LocationElements extends DomElementsBase {\n readonly values: LocationSettings\n}\n\nexport interface PaymentSettings extends BaseSettings {\n paymentAmount: number\n paymentDescription: string\n}\n\nexport interface PaymentElements extends DomElementsBase {\n readonly values: PaymentSettings\n}\n\nexport interface LocationFieldModel extends QuestionBaseModel {\n userClasses: string\n fieldset: {\n legend: {\n text: string\n classes: string\n }\n }\n instructionText: string\n details: {\n classes: string\n }\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 PageSectionInfo {\n title: string\n hideTitle: boolean\n}\n\nexport interface PageOverviewElements extends PagePreviewBaseElements {\n addHeading: boolean\n repeatQuestion: string | undefined\n hasRepeater: boolean\n section?: PageSectionInfo\n}\n\nexport interface SectionForPreview {\n name: string\n title: string\n pages: { title: string }[]\n}\n\nexport interface PaymentPreviewInfo {\n hasPayment: boolean\n description: string\n amount: string\n}\n\nexport interface SummaryPageElements extends PagePreviewBaseElements {\n declaration: boolean\n showConfirmationEmail: boolean\n isConfirmationEmailSettingsPanel: boolean\n sections?: SectionForPreview[]\n unassignedPages?: { title: string }[]\n payment?: PaymentPreviewInfo\n}\n\nexport interface SummaryPageInitialState {\n showConfirmationEmail: boolean\n declarationText: string\n needDeclaration: boolean\n isConfirmationEmailSettingsPanel: boolean\n sections?: SectionForPreview[]\n unassignedPages?: { title: string }[]\n payment?: PaymentPreviewInfo\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":[]}
|
|
@@ -163,6 +163,24 @@ export class LocationPreviewElements extends QuestionPreviewElements implements
|
|
|
163
163
|
*/
|
|
164
164
|
get values(): LocationSettings;
|
|
165
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* @implements {PaymentElements}
|
|
168
|
+
*/
|
|
169
|
+
export class PaymentPreviewElements extends QuestionPreviewElements implements PaymentElements {
|
|
170
|
+
/**
|
|
171
|
+
* @param {BaseSettings & {paymentAmount: number, paymentDescription: string}} elements
|
|
172
|
+
*/
|
|
173
|
+
constructor({ paymentAmount, paymentDescription, ...elements }: BaseSettings & {
|
|
174
|
+
paymentAmount: number;
|
|
175
|
+
paymentDescription: string;
|
|
176
|
+
});
|
|
177
|
+
_paymentAmount: number;
|
|
178
|
+
_paymentDescription: string;
|
|
179
|
+
/**
|
|
180
|
+
* @returns {PaymentSettings}
|
|
181
|
+
*/
|
|
182
|
+
get values(): PaymentSettings;
|
|
183
|
+
}
|
|
166
184
|
/**
|
|
167
185
|
* @implements {PageOverviewElements}
|
|
168
186
|
*/
|
|
@@ -263,6 +281,8 @@ import type { DeclarationElements } from '../../../form/form-editor/preview/type
|
|
|
263
281
|
import type { DeclarationSettings } from '../../../form/form-editor/preview/types.js';
|
|
264
282
|
import type { LocationElements } from '../../../form/form-editor/preview/types.js';
|
|
265
283
|
import type { LocationSettings } from '../../../form/form-editor/preview/types.js';
|
|
284
|
+
import type { PaymentElements } from '../../../form/form-editor/preview/types.js';
|
|
285
|
+
import type { PaymentSettings } from '../../../form/form-editor/preview/types.js';
|
|
266
286
|
import type { PageOverviewElements } from '../../../form/form-editor/preview/types.js';
|
|
267
287
|
import type { NumberSettings } from '../../../form/form-editor/preview/types.js';
|
|
268
288
|
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":"
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/__stubs__/preview.js"],"names":[],"mappings":"AA0WA;;;;GAIG;AACH,6DAJW,OAAO,CAAC,YAAY,CAAC,cACrB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,GAC1C,QAAQ,CAUpB;AArXD;;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,EAA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B,UAAU,IAAI,0BAA0B,GAAG,2BAA2B,CASxE;AAGD,eAAO,MAAM,6BAA6B,UAA+B,CAAA"}
|
|
@@ -112,6 +112,11 @@ export interface LatLongModel extends QuestionBaseModel {
|
|
|
112
112
|
classes?: string;
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
+
export interface PaymentModel extends QuestionBaseModel {
|
|
116
|
+
amount?: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
headingClasses?: string;
|
|
119
|
+
}
|
|
115
120
|
export interface AppPreviewPanelMacro extends AppPreviewPanelTabsMacro {
|
|
116
121
|
model: QuestionBaseModel;
|
|
117
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/macros/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAA;AAExC,MAAM,WAAW,sCAAsC;IACrD,sBAAsB,EAAE,EAAE,CAAA;IAC1B,UAAU,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAClD;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,sCAAsC,CAAA;IACtD,YAAY,EAAE;QACZ,WAAW,EAAE,UAAU,EAAE,CAAA;QACzB,cAAc,EAAE,UAAU,EAAE,CAAA;KAC7B,CAAA;IACD,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,cAAc,EAA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AAA;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"names":[],"mappings":"AAiBA;
|
|
1
|
+
{"version":3,"file":"page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"names":[],"mappings":"AAiBA;IAsLE;;;;;OAKG;IACH,4CAKC;IAzLD;;;;;OAKG;IACH,wBALW,YAAY,EAAE,YACd,oBAAoB,cACpB,cAAc,YACd,YAAY,EAmBtB;IAmCD;;OAEG;IACH,sBAFa,OAAO,CAgBnB;IAED;;;OAGG;IACH,qCAHW,gBAAgB,GACd,iBAAiB,CAsC7B;IAED;;OAEG;IACH,8BAFa,OAAO,CASnB;IAwBD,uCAQC;;CAyBF;0CAnNyC,mEAAmE;sCAwNxE,2CAA2C;uCAFY,yCAAyC;kCAIpG,2BAA2B;0CAJgC,yCAAyC;oCAGlG,qCAAqC;kCAHoB,yCAAyC"}
|
|
@@ -35,6 +35,11 @@ export class SummaryPageController extends PreviewPageControllerBase {
|
|
|
35
35
|
* @private
|
|
36
36
|
*/
|
|
37
37
|
private _unassignedPages;
|
|
38
|
+
/**
|
|
39
|
+
* @type {PaymentPreviewInfo | undefined}
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
private _payment;
|
|
38
43
|
/**
|
|
39
44
|
* @returns {{ rows: SummaryRow[] }}
|
|
40
45
|
*/
|
|
@@ -67,6 +72,10 @@ export class SummaryPageController extends PreviewPageControllerBase {
|
|
|
67
72
|
get unassignedPages(): Array<{
|
|
68
73
|
title: string;
|
|
69
74
|
}>;
|
|
75
|
+
/**
|
|
76
|
+
* @returns {PaymentPreviewInfo | undefined}
|
|
77
|
+
*/
|
|
78
|
+
get payment(): PaymentPreviewInfo | undefined;
|
|
70
79
|
get buttonText(): "Accept and send" | "Send";
|
|
71
80
|
setShowConfirmationEmail(): void;
|
|
72
81
|
unsetShowConfirmationEmail(): void;
|
|
@@ -74,6 +83,7 @@ export class SummaryPageController extends PreviewPageControllerBase {
|
|
|
74
83
|
import { PreviewPageControllerBase } from '../../../../form/form-editor/preview/controller/page-controller-base.js';
|
|
75
84
|
import type { SummaryRow } from '../../../../form/form-editor/macros/types.js';
|
|
76
85
|
import type { SectionForPreview } from '../../../../form/form-editor/preview/types.js';
|
|
86
|
+
import type { PaymentPreviewInfo } from '../../../../form/form-editor/preview/types.js';
|
|
77
87
|
import type { SummaryPageElements } from '../../../../form/form-editor/preview/types.js';
|
|
78
88
|
import type { FormDefinition } from '../../../../form/form-definition/types.js';
|
|
79
89
|
import type { PageRenderer } from '../../../../form/form-editor/preview/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/summary-page-controller.js"],"names":[],"mappings":"AAOA;
|
|
1
|
+
{"version":3,"file":"summary-page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/summary-page-controller.js"],"names":[],"mappings":"AAOA;IA+CE;;;;OAIG;IACH,sBAJW,mBAAmB,kBACnB,cAAc,YACd,YAAY,EAkBtB;IAzDD;;;OAGG;IACH,uBAAmB;IACnB;;;OAGG;IACH,yBAAwB;IACxB;;;OAGG;IACH,+BAA8B;IAC9B;;;OAGG;IACH,0CAAyC;IACzC;;;OAGG;IACH,kBAAc;IACd;;;OAGG;IACH,yBAAqB;IACrB;;;OAGG;IACH,iBAAQ;IAyBR;;OAEG;IACH,qBAFa;QAAE,IAAI,EAAE,UAAU,EAAE,CAAA;KAAE,CAkBlC;IAgCD;;OAEG;IACH,qCAFW,MAAM,EAIhB;IAED,uBANW,MAAM,CAQhB;IAED;;;MAEC;IAED,gDAEC;IAED,2BAGC;IAED,6BAGC;IAED,+BAEC;IAED,6BAEC;IAED,+BAEC;IAED,qCAEC;IAED;;OAEG;IACH,gBAFa,iBAAiB,EAAE,CAI/B;IAED;;OAEG;IACH,uBAFa,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAIpC;IAED;;OAEG;IACH,eAFa,kBAAkB,GAAG,SAAS,CAI1C;IAaD,6CAEC;IAED,iCAGC;IAED,mCAGC;CACF;0CAxNyC,mEAAmE;gCA8NxD,wCAAwC;uCADyB,yCAAyC;wCAAzC,yCAAyC;yCAAzC,yCAAyC;oCAD5H,qCAAqC;kCAC8C,yCAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/helpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/helpers.js"],"names":[],"mappings":"AAwKA;;;;GAIG;AACH,gEAJW,gBAAgB,cAChB,cAAc,GACZ,CAAC,SAAS,EAAE,YAAY,KAAK,QAAQ,CAmCjD;sCAGsD,yCAAyC;oCAG7D,qCAAqC;kCACoR,2BAA2B;8BAH1V,4CAA4C"}
|
|
@@ -27,6 +27,7 @@ export * from "../../../form/form-editor/preview/uk-address.js";
|
|
|
27
27
|
export * from "../../../form/form-editor/preview/unsupported-question.js";
|
|
28
28
|
export * from "../../../form/form-editor/preview/yes-no.js";
|
|
29
29
|
export * from "../../../form/form-editor/preview/hidden.js";
|
|
30
|
+
export * from "../../../form/form-editor/preview/payment.js";
|
|
30
31
|
export * from "../../../form/form-editor/preview/controller/page-controller-base.js";
|
|
31
32
|
export * from "../../../form/form-editor/preview/controller/page-controller.js";
|
|
32
33
|
export * from "../../../form/form-editor/preview/controller/guidance-page-controller.js";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @implements {PaymentElements}
|
|
3
|
+
*/
|
|
4
|
+
export class PaymentComponentPreviewElements extends QuestionComponentElements implements PaymentElements {
|
|
5
|
+
/**
|
|
6
|
+
* @param {PaymentFieldComponent} component
|
|
7
|
+
*/
|
|
8
|
+
constructor(component: PaymentFieldComponent);
|
|
9
|
+
/**
|
|
10
|
+
* @type {number}
|
|
11
|
+
* @protected
|
|
12
|
+
*/
|
|
13
|
+
protected _paymentAmount: number;
|
|
14
|
+
/**
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
protected _paymentDescription: string;
|
|
19
|
+
/**
|
|
20
|
+
* @returns {PaymentSettings}
|
|
21
|
+
*/
|
|
22
|
+
get values(): PaymentSettings;
|
|
23
|
+
}
|
|
24
|
+
export class PaymentQuestion extends Question {
|
|
25
|
+
/**
|
|
26
|
+
* @param {PaymentElements} htmlElements
|
|
27
|
+
* @param {QuestionRenderer} questionRenderer
|
|
28
|
+
*/
|
|
29
|
+
constructor(htmlElements: PaymentElements, questionRenderer: QuestionRenderer);
|
|
30
|
+
/**
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @protected
|
|
33
|
+
*/
|
|
34
|
+
protected _paymentAmount: number;
|
|
35
|
+
/**
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @protected
|
|
38
|
+
*/
|
|
39
|
+
protected _paymentDescription: string;
|
|
40
|
+
/**
|
|
41
|
+
* @param {number} val
|
|
42
|
+
*/
|
|
43
|
+
set paymentAmount(val: number);
|
|
44
|
+
get paymentAmount(): number;
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} val
|
|
47
|
+
*/
|
|
48
|
+
set paymentDescription(val: string);
|
|
49
|
+
get paymentDescription(): string;
|
|
50
|
+
/**
|
|
51
|
+
* @protected
|
|
52
|
+
* @returns {PaymentModel}
|
|
53
|
+
*/
|
|
54
|
+
protected _renderInput(): PaymentModel;
|
|
55
|
+
}
|
|
56
|
+
import type { PaymentElements } from '../../../form/form-editor/preview/types.js';
|
|
57
|
+
import { QuestionComponentElements } from '../../../form/form-editor/preview/question.js';
|
|
58
|
+
import type { PaymentSettings } from '../../../form/form-editor/preview/types.js';
|
|
59
|
+
import type { PaymentFieldComponent } from '../../../components/types.js';
|
|
60
|
+
import { Question } from '../../../form/form-editor/preview/question.js';
|
|
61
|
+
import type { PaymentModel } from '../../../form/form-editor/macros/types.js';
|
|
62
|
+
import type { QuestionRenderer } from '../../../form/form-editor/preview/types.js';
|
|
63
|
+
//# sourceMappingURL=payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/payment.js"],"names":[],"mappings":"AAuBA;;GAEG;AACH;IAaE;;OAEG;IACH,uBAFW,qBAAqB,EAM/B;IAnBD;;;OAGG;IACH,0BAHU,MAAM,CAGE;IAElB;;;OAGG;IACH,+BAHU,MAAM,CAGQ;IAWxB;;OAEG;IACH,cAFa,eAAe,CAQ3B;CACF;AAED;IAwBE;;;OAGG;IACH,0BAHW,eAAe,oBACf,gBAAgB,EAM1B;IApBD;;;OAGG;IACH,0BAHU,MAAM,CAGE;IAElB;;;OAGG;IACH,+BAHU,MAAM,CAGQ;IAgBxB;;OAEG;IACH,uBAFW,MAAM,EAKhB;IAVD,qBAKW,MAAM,CAHhB;IAcD;;OAEG;IACH,4BAFW,MAAM,EAKhB;IAVD,0BAKW,MAAM,CAHhB;IAUD;;;OAGG;IACH,0BAFa,YAAY,CAcxB;CACF;qCAGsE,yCAAyC;0CArIzG,4CAA4C;qCAqIoB,yCAAyC;2CAEtE,2BAA2B;yBAvI9D,4CAA4C;kCAsIlB,wCAAwC;sCADF,yCAAyC"}
|
|
@@ -80,6 +80,13 @@ export interface LocationSettings extends BaseSettings {
|
|
|
80
80
|
export interface LocationElements extends DomElementsBase {
|
|
81
81
|
readonly values: LocationSettings;
|
|
82
82
|
}
|
|
83
|
+
export interface PaymentSettings extends BaseSettings {
|
|
84
|
+
paymentAmount: number;
|
|
85
|
+
paymentDescription: string;
|
|
86
|
+
}
|
|
87
|
+
export interface PaymentElements extends DomElementsBase {
|
|
88
|
+
readonly values: PaymentSettings;
|
|
89
|
+
}
|
|
83
90
|
export interface LocationFieldModel extends QuestionBaseModel {
|
|
84
91
|
userClasses: string;
|
|
85
92
|
fieldset: {
|
|
@@ -137,6 +144,11 @@ export interface SectionForPreview {
|
|
|
137
144
|
title: string;
|
|
138
145
|
}[];
|
|
139
146
|
}
|
|
147
|
+
export interface PaymentPreviewInfo {
|
|
148
|
+
hasPayment: boolean;
|
|
149
|
+
description: string;
|
|
150
|
+
amount: string;
|
|
151
|
+
}
|
|
140
152
|
export interface SummaryPageElements extends PagePreviewBaseElements {
|
|
141
153
|
declaration: boolean;
|
|
142
154
|
showConfirmationEmail: boolean;
|
|
@@ -145,6 +157,7 @@ export interface SummaryPageElements extends PagePreviewBaseElements {
|
|
|
145
157
|
unassignedPages?: {
|
|
146
158
|
title: string;
|
|
147
159
|
}[];
|
|
160
|
+
payment?: PaymentPreviewInfo;
|
|
148
161
|
}
|
|
149
162
|
export interface SummaryPageInitialState {
|
|
150
163
|
showConfirmationEmail: boolean;
|
|
@@ -155,6 +168,7 @@ export interface SummaryPageInitialState {
|
|
|
155
168
|
unassignedPages?: {
|
|
156
169
|
title: string;
|
|
157
170
|
}[];
|
|
171
|
+
payment?: PaymentPreviewInfo;
|
|
158
172
|
}
|
|
159
173
|
export type PreviewQuestion = DateInputQuestion | EmailAddressQuestion | ListSortableQuestion | LongAnswerQuestion | PhoneNumberQuestion | Question | RadioSortableQuestion | SelectSortableQuestion | ShortAnswerQuestion | UkAddressQuestion | AutocompleteQuestion;
|
|
160
174
|
//# sourceM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