@defra/forms-model 3.0.580 → 3.0.581

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 (64) hide show
  1. package/dist/module/__stubs__/components.js +46 -0
  2. package/dist/module/__stubs__/components.js.map +1 -1
  3. package/dist/module/components/component-types.js +1 -1
  4. package/dist/module/components/component-types.js.map +1 -1
  5. package/dist/module/form/form-editor/__stubs__/preview.js +27 -1
  6. package/dist/module/form/form-editor/__stubs__/preview.js.map +1 -1
  7. package/dist/module/form/form-editor/index.js +1 -1
  8. package/dist/module/form/form-editor/index.js.map +1 -1
  9. package/dist/module/form/form-editor/macros/types.js.map +1 -1
  10. package/dist/module/form/form-editor/preview/easting-northing.js +42 -0
  11. package/dist/module/form/form-editor/preview/easting-northing.js.map +1 -0
  12. package/dist/module/form/form-editor/preview/helpers.js +26 -5
  13. package/dist/module/form/form-editor/preview/helpers.js.map +1 -1
  14. package/dist/module/form/form-editor/preview/index.js +4 -0
  15. package/dist/module/form/form-editor/preview/index.js.map +1 -1
  16. package/dist/module/form/form-editor/preview/lat-long.js +42 -0
  17. package/dist/module/form/form-editor/preview/lat-long.js.map +1 -0
  18. package/dist/module/form/form-editor/preview/location-helpers.js +44 -0
  19. package/dist/module/form/form-editor/preview/location-helpers.js.map +1 -0
  20. package/dist/module/form/form-editor/preview/location-question-base.js +62 -0
  21. package/dist/module/form/form-editor/preview/location-question-base.js.map +1 -0
  22. package/dist/module/form/form-editor/preview/national-grid.js +46 -0
  23. package/dist/module/form/form-editor/preview/national-grid.js.map +1 -0
  24. package/dist/module/form/form-editor/preview/os-grid-ref.js +46 -0
  25. package/dist/module/form/form-editor/preview/os-grid-ref.js.map +1 -0
  26. package/dist/module/form/form-editor/preview/types.js.map +1 -1
  27. package/dist/types/__stubs__/components.d.ts +5 -1
  28. package/dist/types/__stubs__/components.d.ts.map +1 -1
  29. package/dist/types/form/form-editor/__stubs__/preview.d.ts +18 -0
  30. package/dist/types/form/form-editor/__stubs__/preview.d.ts.map +1 -1
  31. package/dist/types/form/form-editor/index.d.ts.map +1 -1
  32. package/dist/types/form/form-editor/macros/types.d.ts +50 -0
  33. package/dist/types/form/form-editor/macros/types.d.ts.map +1 -1
  34. package/dist/types/form/form-editor/preview/easting-northing.d.ts +17 -0
  35. package/dist/types/form/form-editor/preview/easting-northing.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 +4 -0
  38. package/dist/types/form/form-editor/preview/lat-long.d.ts +17 -0
  39. package/dist/types/form/form-editor/preview/lat-long.d.ts.map +1 -0
  40. package/dist/types/form/form-editor/preview/location-helpers.d.ts +23 -0
  41. package/dist/types/form/form-editor/preview/location-helpers.d.ts.map +1 -0
  42. package/dist/types/form/form-editor/preview/location-question-base.d.ts +43 -0
  43. package/dist/types/form/form-editor/preview/location-question-base.d.ts.map +1 -0
  44. package/dist/types/form/form-editor/preview/national-grid.d.ts +17 -0
  45. package/dist/types/form/form-editor/preview/national-grid.d.ts.map +1 -0
  46. package/dist/types/form/form-editor/preview/os-grid-ref.d.ts +17 -0
  47. package/dist/types/form/form-editor/preview/os-grid-ref.d.ts.map +1 -0
  48. package/dist/types/form/form-editor/preview/types.d.ts +21 -2
  49. package/dist/types/form/form-editor/preview/types.d.ts.map +1 -1
  50. package/package.json +1 -1
  51. package/src/__stubs__/components.ts +62 -0
  52. package/src/components/component-types.ts +1 -1
  53. package/src/form/form-editor/__stubs__/preview.js +24 -1
  54. package/src/form/form-editor/index.ts +1 -0
  55. package/src/form/form-editor/macros/types.ts +54 -0
  56. package/src/form/form-editor/preview/easting-northing.js +55 -0
  57. package/src/form/form-editor/preview/helpers.js +40 -5
  58. package/src/form/form-editor/preview/index.js +4 -0
  59. package/src/form/form-editor/preview/lat-long.js +55 -0
  60. package/src/form/form-editor/preview/location-helpers.js +49 -0
  61. package/src/form/form-editor/preview/location-question-base.js +65 -0
  62. package/src/form/form-editor/preview/national-grid.js +56 -0
  63. package/src/form/form-editor/preview/os-grid-ref.js +56 -0
  64. package/src/form/form-editor/preview/types.ts +24 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"easting-northing.js","names":["ComponentType","createFieldClasses","createLocationFieldModel","LocationQuestion","LocationQuestionComponentPreviewElements","PreviewComponent","EastingNorthingComponentPreviewElements","EastingNorthingQuestion","componentType","EastingNorthingField","_questionTemplate","PATH","_fieldName","_renderInput","baseModel","locationModel","_htmlElements","_highlight","_instructionText","titleText","easting","northing"],"sources":["../../../../../src/form/form-editor/preview/easting-northing.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n createFieldClasses,\n createLocationFieldModel\n} from '~/src/form/form-editor/preview/location-helpers.js'\nimport {\n LocationQuestion,\n LocationQuestionComponentPreviewElements\n} from '~/src/form/form-editor/preview/location-question-base.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class EastingNorthingComponentPreviewElements extends LocationQuestionComponentPreviewElements {}\n\nexport class EastingNorthingQuestion extends LocationQuestion {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.EastingNorthingField\n /**\n * @type {string}\n * @protected\n */\n _questionTemplate = PreviewComponent.PATH + 'eastingnorthingfield.njk'\n _fieldName = 'EastingNorthingField'\n\n /**\n * @protected\n * @returns {EastingNorthingModel}\n */\n _renderInput() {\n const baseModel = super._renderInput()\n const locationModel = createLocationFieldModel(\n baseModel,\n /** @type {LocationElements} */ (this._htmlElements),\n this._highlight,\n this._instructionText,\n this.titleText\n )\n\n return {\n ...locationModel,\n easting: createFieldClasses('easting', this._highlight),\n northing: createFieldClasses('northing', this._highlight)\n }\n }\n}\n\n/**\n * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { EastingNorthingModel } from '~/src/form/form-editor/macros/types.js'\n * @import { EastingNorthingFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SACEC,kBAAkB,EAClBC,wBAAwB;AAE1B,SACEC,gBAAgB,EAChBC,wCAAwC;AAE1C,SAASC,gBAAgB;;AAEzB;AACA;AACA;AACA,OAAO,MAAMC,uCAAuC,SAASF,wCAAwC,CAAC;AAEtG,OAAO,MAAMG,uBAAuB,SAASJ,gBAAgB,CAAC;EAC5D;AACF;AACA;EACEK,aAAa,GAAGR,aAAa,CAACS,oBAAoB;EAClD;AACF;AACA;AACA;EACEC,iBAAiB,GAAGL,gBAAgB,CAACM,IAAI,GAAG,0BAA0B;EACtEC,UAAU,GAAG,sBAAsB;;EAEnC;AACF;AACA;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,MAAMC,SAAS,GAAG,KAAK,CAACD,YAAY,CAAC,CAAC;IACtC,MAAME,aAAa,GAAGb,wBAAwB,CAC5CY,SAAS,EACT,+BAAiC,IAAI,CAACE,aAAa,EACnD,IAAI,CAACC,UAAU,EACf,IAAI,CAACC,gBAAgB,EACrB,IAAI,CAACC,SACP,CAAC;IAED,OAAO;MACL,GAAGJ,aAAa;MAChBK,OAAO,EAAEnB,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAACgB,UAAU,CAAC;MACvDI,QAAQ,EAAEpB,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAACgB,UAAU;IAC1D,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -6,12 +6,16 @@ import { ComponentElements } from "./component-elements.js";
6
6
  import { ContentElements } from "./content.js";
7
7
  import { DateInputQuestion } from "./date-input.js";
8
8
  import { DeclarationComponentPreviewElements, DeclarationQuestion } from "./declaration.js";
9
+ import { EastingNorthingComponentPreviewElements, EastingNorthingQuestion } from "./easting-northing.js";
9
10
  import { EmailAddressQuestion } from "./email-address.js";
11
+ import { LatLongComponentPreviewElements, LatLongQuestion } from "./lat-long.js";
10
12
  import { ListComponentElements, ListQuestion, SelectComponentElements } from "./list.js";
11
13
  import { LongAnswerQuestion } from "./long-answer.js";
12
14
  import { Markdown } from "./markdown.js";
13
15
  import { MonthYearQuestion } from "./month-year.js";
16
+ import { NationalGridComponentPreviewElements, NationalGridQuestion } from "./national-grid.js";
14
17
  import { NumberComponentPreviewElements, NumberOnlyQuestion } from "./number-only.js";
18
+ import { OsGridRefComponentPreviewElements, OsGridRefQuestion } from "./os-grid-ref.js";
15
19
  import { PhoneNumberQuestion } from "./phone-number.js";
16
20
  import { QuestionComponentElements } from "./question.js";
17
21
  import { RadioQuestion } from "./radio.js";
@@ -45,10 +49,10 @@ const InputFieldComponentDictionary = {
45
49
  [ComponentType.YesNoField]: YesNoQuestion,
46
50
  [ComponentType.DeclarationField]: DeclarationQuestion,
47
51
  [ComponentType.FileUploadField]: SupportingEvidenceQuestion,
48
- [ComponentType.EastingNorthingField]: ShortAnswerQuestion,
49
- [ComponentType.OsGridRefField]: ShortAnswerQuestion,
50
- [ComponentType.NationalGridFieldNumberField]: ShortAnswerQuestion,
51
- [ComponentType.LatLongField]: ShortAnswerQuestion
52
+ [ComponentType.EastingNorthingField]: EastingNorthingQuestion,
53
+ [ComponentType.OsGridRefField]: OsGridRefQuestion,
54
+ [ComponentType.NationalGridFieldNumberField]: NationalGridQuestion,
55
+ [ComponentType.LatLongField]: LatLongQuestion
52
56
  };
53
57
 
54
58
  /**
@@ -82,6 +86,23 @@ const ComponentToPreviewQuestion = {
82
86
  [ComponentType.YesNoField]: (component, _definition) => {
83
87
  const componentCoerced = /** @type {YesNoFieldComponent} */component;
84
88
  return new QuestionComponentElements(componentCoerced);
89
+ },
90
+ [ComponentType.EastingNorthingField]: (component, _definition) => {
91
+ const componentCoerced = /** @type {EastingNorthingFieldComponent} */
92
+ component;
93
+ return new EastingNorthingComponentPreviewElements(componentCoerced);
94
+ },
95
+ [ComponentType.OsGridRefField]: (component, _definition) => {
96
+ const componentCoerced = /** @type {OsGridRefFieldComponent} */component;
97
+ return new OsGridRefComponentPreviewElements(componentCoerced);
98
+ },
99
+ [ComponentType.NationalGridFieldNumberField]: (component, _definition) => {
100
+ const componentCoerced = /** @type {NationalGridFieldNumberFieldComponent} */component;
101
+ return new NationalGridComponentPreviewElements(componentCoerced);
102
+ },
103
+ [ComponentType.LatLongField]: (component, _definition) => {
104
+ const componentCoerced = /** @type {LatLongFieldComponent} */component;
105
+ return new LatLongComponentPreviewElements(componentCoerced);
85
106
  }
86
107
  };
87
108
 
@@ -123,6 +144,6 @@ export function mapComponentToPreviewQuestion(questionRenderer, definition) {
123
144
  * @import { Question } from '~/src/form/form-editor/preview/question.js'
124
145
  * @import { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'
125
146
  * @import { FormDefinition } from '~/src/form/form-definition/types.js'
126
- * @import { AutocompleteFieldComponent, ComponentDef, DeclarationFieldComponent, NumberFieldComponent, SelectFieldComponent, UkAddressFieldComponent, YesNoFieldComponent } from '~/src/components/types.js'
147
+ * @import { AutocompleteFieldComponent, ComponentDef, DeclarationFieldComponent, EastingNorthingFieldComponent, LatLongFieldComponent, NationalGridFieldNumberFieldComponent, NumberFieldComponent, OsGridRefFieldComponent, SelectFieldComponent, UkAddressFieldComponent, YesNoFieldComponent } from '~/src/components/types.js'
127
148
  */
128
149
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
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 */\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,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;AAC5B,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,mBAAmB;AAC5B,SAASC,0BAA0B;AACnC,SACEC,iCAAiC,EACjCC,iBAAiB;AAEnB,SAASC,aAAa;AACtB,SAASC,+BAA+B;AACxC;AACA;AACA;AACA,MAAMC,6BAA6B,GAAG;EACpC,CAAC/B,aAAa,CAACgC,SAAS,GAAGP,mBAAmB;EAC9C,CAACzB,aAAa,CAACiC,OAAO,GAAGR,mBAAmB;EAC5C,CAACzB,aAAa,CAACkC,SAAS,GAAGT,mBAAmB;EAC9C,CAACzB,aAAa,CAACmC,IAAI,GAAGV,mBAAmB;EACzC,CAACzB,aAAa,CAACiB,QAAQ,GAAGA,QAAQ;EAClC,CAACjB,aAAa,CAACoC,IAAI,GAAGtB,YAAY;EAClC,CAACd,aAAa,CAACqC,iBAAiB,GAAGz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UAAU,CAAC;IACnE,CAAC,MAAM,IAAIrD,kBAAkB,CAACoD,SAAS,CAAC,IAAIrD,YAAY,CAACqD,SAAS,CAAC,EAAE;MACnE,MAAMG,IAAI,GAAG7B,+BAA+B,CAAC0B,SAAS,EAAEC,UAAU,CAAC;MACnEM,gBAAgB,GAAG,IAAIlD,qBAAqB,CAAC2C,SAAS,EAAEG,IAAI,CAAC;IAC/D,CAAC,MAAM,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":[]}
1
+ {"version":3,"file":"helpers.js","names":["ComponentType","hasContentField","hasInputField","hasListField","hasSelectionFields","AutocompleteListQuestion","CheckboxQuestion","ComponentElements","ContentElements","DateInputQuestion","DeclarationComponentPreviewElements","DeclarationQuestion","EastingNorthingComponentPreviewElements","EastingNorthingQuestion","EmailAddressQuestion","LatLongComponentPreviewElements","LatLongQuestion","ListComponentElements","ListQuestion","SelectComponentElements","LongAnswerQuestion","Markdown","MonthYearQuestion","NationalGridComponentPreviewElements","NationalGridQuestion","NumberComponentPreviewElements","NumberOnlyQuestion","OsGridRefComponentPreviewElements","OsGridRefQuestion","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 {\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 {\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 { 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 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 { 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]: EastingNorthingQuestion,\n [ComponentType.OsGridRefField]: OsGridRefQuestion,\n [ComponentType.NationalGridFieldNumberField]: NationalGridQuestion,\n [ComponentType.LatLongField]: LatLongQuestion\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 [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 = 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, EastingNorthingFieldComponent, LatLongFieldComponent, NationalGridFieldNumberFieldComponent, NumberFieldComponent, OsGridRefFieldComponent, SelectFieldComponent, UkAddressFieldComponent, YesNoFieldComponent } from '~/src/components/types.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zE,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":[]}
@@ -3,12 +3,16 @@ export * from "./checkbox.js";
3
3
  export * from "./checkbox-sortable.js";
4
4
  export * from "./date-input.js";
5
5
  export * from "./declaration.js";
6
+ export * from "./easting-northing.js";
6
7
  export * from "./email-address.js";
8
+ export * from "./lat-long.js";
7
9
  export * from "./list.js";
8
10
  export * from "./list-sortable.js";
9
11
  export * from "./markdown.js";
10
12
  export * from "./month-year.js";
13
+ export * from "./national-grid.js";
11
14
  export * from "./number-only.js";
15
+ export * from "./os-grid-ref.js";
12
16
  export * from "./phone-number.js";
13
17
  export * from "./question.js";
14
18
  export * from "./radio.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/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
+ {"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/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;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ import { ComponentType } from "../../../components/enums.js";
2
+ import { createFieldClasses, createLocationFieldModel } from "./location-helpers.js";
3
+ import { LocationQuestion, LocationQuestionComponentPreviewElements } from "./location-question-base.js";
4
+ import { PreviewComponent } from "./preview.js";
5
+
6
+ /**
7
+ * @implements {QuestionElements}
8
+ */
9
+ export class LatLongComponentPreviewElements extends LocationQuestionComponentPreviewElements {}
10
+ export class LatLongQuestion extends LocationQuestion {
11
+ /**
12
+ * @type {ComponentType}
13
+ */
14
+ componentType = ComponentType.LatLongField;
15
+ /**
16
+ * @type {string}
17
+ * @protected
18
+ */
19
+ _questionTemplate = PreviewComponent.PATH + 'latlongfield.njk';
20
+ _fieldName = 'LatLongField';
21
+
22
+ /**
23
+ * @protected
24
+ * @returns {LatLongModel}
25
+ */
26
+ _renderInput() {
27
+ const baseModel = super._renderInput();
28
+ const locationModel = createLocationFieldModel(baseModel, /** @type {LocationElements} */this._htmlElements, this._highlight, this._instructionText, this.titleText);
29
+ return {
30
+ ...locationModel,
31
+ latitude: createFieldClasses('latitude', this._highlight),
32
+ longitude: createFieldClasses('longitude', this._highlight)
33
+ };
34
+ }
35
+ }
36
+
37
+ /**
38
+ * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'
39
+ * @import { LatLongModel } from '~/src/form/form-editor/macros/types.js'
40
+ * @import { LatLongFieldComponent } from '~/src/components/types.js'
41
+ */
42
+ //# sourceMappingURL=lat-long.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lat-long.js","names":["ComponentType","createFieldClasses","createLocationFieldModel","LocationQuestion","LocationQuestionComponentPreviewElements","PreviewComponent","LatLongComponentPreviewElements","LatLongQuestion","componentType","LatLongField","_questionTemplate","PATH","_fieldName","_renderInput","baseModel","locationModel","_htmlElements","_highlight","_instructionText","titleText","latitude","longitude"],"sources":["../../../../../src/form/form-editor/preview/lat-long.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n createFieldClasses,\n createLocationFieldModel\n} from '~/src/form/form-editor/preview/location-helpers.js'\nimport {\n LocationQuestion,\n LocationQuestionComponentPreviewElements\n} from '~/src/form/form-editor/preview/location-question-base.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class LatLongComponentPreviewElements extends LocationQuestionComponentPreviewElements {}\n\nexport class LatLongQuestion extends LocationQuestion {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.LatLongField\n /**\n * @type {string}\n * @protected\n */\n _questionTemplate = PreviewComponent.PATH + 'latlongfield.njk'\n _fieldName = 'LatLongField'\n\n /**\n * @protected\n * @returns {LatLongModel}\n */\n _renderInput() {\n const baseModel = super._renderInput()\n const locationModel = createLocationFieldModel(\n baseModel,\n /** @type {LocationElements} */ (this._htmlElements),\n this._highlight,\n this._instructionText,\n this.titleText\n )\n\n return {\n ...locationModel,\n latitude: createFieldClasses('latitude', this._highlight),\n longitude: createFieldClasses('longitude', this._highlight)\n }\n }\n}\n\n/**\n * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { LatLongModel } from '~/src/form/form-editor/macros/types.js'\n * @import { LatLongFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SACEC,kBAAkB,EAClBC,wBAAwB;AAE1B,SACEC,gBAAgB,EAChBC,wCAAwC;AAE1C,SAASC,gBAAgB;;AAEzB;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,SAASF,wCAAwC,CAAC;AAE9F,OAAO,MAAMG,eAAe,SAASJ,gBAAgB,CAAC;EACpD;AACF;AACA;EACEK,aAAa,GAAGR,aAAa,CAACS,YAAY;EAC1C;AACF;AACA;AACA;EACEC,iBAAiB,GAAGL,gBAAgB,CAACM,IAAI,GAAG,kBAAkB;EAC9DC,UAAU,GAAG,cAAc;;EAE3B;AACF;AACA;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,MAAMC,SAAS,GAAG,KAAK,CAACD,YAAY,CAAC,CAAC;IACtC,MAAME,aAAa,GAAGb,wBAAwB,CAC5CY,SAAS,EACT,+BAAiC,IAAI,CAACE,aAAa,EACnD,IAAI,CAACC,UAAU,EACf,IAAI,CAACC,gBAAgB,EACrB,IAAI,CAACC,SACP,CAAC;IAED,OAAO;MACL,GAAGJ,aAAa;MAChBK,QAAQ,EAAEnB,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAACgB,UAAU,CAAC;MACzDI,SAAS,EAAEpB,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAACgB,UAAU;IAC5D,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ import { HIGHLIGHT_CLASS } from "./constants.js";
2
+
3
+ /**
4
+ * Creates the standard location field model with common properties
5
+ * @param {QuestionBaseModel} baseModel - The base model from super._renderInput()
6
+ * @param {LocationElements} htmlElements - The HTML elements containing values
7
+ * @param {string | null} highlight - The currently highlighted element
8
+ * @param {string} instructionText - The instruction text to display
9
+ * @param {string} titleText - The title text including optional suffix
10
+ * @returns {LocationFieldModel}
11
+ */
12
+ export function createLocationFieldModel(baseModel, htmlElements, highlight, instructionText, titleText) {
13
+ return {
14
+ ...baseModel,
15
+ userClasses: htmlElements.values.userClasses,
16
+ fieldset: {
17
+ legend: {
18
+ text: titleText,
19
+ classes: highlight === 'question' ? HIGHLIGHT_CLASS : ''
20
+ }
21
+ },
22
+ instructionText,
23
+ details: {
24
+ classes: highlight === 'instructionText' ? HIGHLIGHT_CLASS : ''
25
+ }
26
+ };
27
+ }
28
+
29
+ /**
30
+ * Creates field classes with highlight if needed
31
+ * @param {string} fieldName - The name of the field
32
+ * @param {string | null} highlight - The currently highlighted element
33
+ * @returns {{classes: string}}
34
+ */
35
+ export function createFieldClasses(fieldName, highlight) {
36
+ return {
37
+ classes: highlight === fieldName ? HIGHLIGHT_CLASS : ''
38
+ };
39
+ }
40
+
41
+ /**
42
+ * @import { LocationElements, QuestionBaseModel, LocationFieldModel } from '~/src/form/form-editor/preview/types.js'
43
+ */
44
+ //# sourceMappingURL=location-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location-helpers.js","names":["HIGHLIGHT_CLASS","createLocationFieldModel","baseModel","htmlElements","highlight","instructionText","titleText","userClasses","values","fieldset","legend","text","classes","details","createFieldClasses","fieldName"],"sources":["../../../../../src/form/form-editor/preview/location-helpers.js"],"sourcesContent":["import { HIGHLIGHT_CLASS } from '~/src/form/form-editor/preview/constants.js'\n\n/**\n * Creates the standard location field model with common properties\n * @param {QuestionBaseModel} baseModel - The base model from super._renderInput()\n * @param {LocationElements} htmlElements - The HTML elements containing values\n * @param {string | null} highlight - The currently highlighted element\n * @param {string} instructionText - The instruction text to display\n * @param {string} titleText - The title text including optional suffix\n * @returns {LocationFieldModel}\n */\nexport function createLocationFieldModel(\n baseModel,\n htmlElements,\n highlight,\n instructionText,\n titleText\n) {\n return {\n ...baseModel,\n userClasses: htmlElements.values.userClasses,\n fieldset: {\n legend: {\n text: titleText,\n classes: highlight === 'question' ? HIGHLIGHT_CLASS : ''\n }\n },\n instructionText,\n details: {\n classes: highlight === 'instructionText' ? HIGHLIGHT_CLASS : ''\n }\n }\n}\n\n/**\n * Creates field classes with highlight if needed\n * @param {string} fieldName - The name of the field\n * @param {string | null} highlight - The currently highlighted element\n * @returns {{classes: string}}\n */\nexport function createFieldClasses(fieldName, highlight) {\n return {\n classes: highlight === fieldName ? HIGHLIGHT_CLASS : ''\n }\n}\n\n/**\n * @import { LocationElements, QuestionBaseModel, LocationFieldModel } from '~/src/form/form-editor/preview/types.js'\n */\n"],"mappings":"AAAA,SAASA,eAAe;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CACtCC,SAAS,EACTC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,SAAS,EACT;EACA,OAAO;IACL,GAAGJ,SAAS;IACZK,WAAW,EAAEJ,YAAY,CAACK,MAAM,CAACD,WAAW;IAC5CE,QAAQ,EAAE;MACRC,MAAM,EAAE;QACNC,IAAI,EAAEL,SAAS;QACfM,OAAO,EAAER,SAAS,KAAK,UAAU,GAAGJ,eAAe,GAAG;MACxD;IACF,CAAC;IACDK,eAAe;IACfQ,OAAO,EAAE;MACPD,OAAO,EAAER,SAAS,KAAK,iBAAiB,GAAGJ,eAAe,GAAG;IAC/D;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASc,kBAAkBA,CAACC,SAAS,EAAEX,SAAS,EAAE;EACvD,OAAO;IACLQ,OAAO,EAAER,SAAS,KAAKW,SAAS,GAAGf,eAAe,GAAG;EACvD,CAAC;AACH;;AAEA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ import { Question, QuestionComponentElements } from "./question.js";
2
+
3
+ /**
4
+ * Base class for location question component preview elements with instruction text support
5
+ * @implements {QuestionElements}
6
+ */
7
+ export class LocationQuestionComponentPreviewElements extends QuestionComponentElements {
8
+ /**
9
+ * @param {any} component - Component with options.instructionText
10
+ */
11
+ constructor(component) {
12
+ super(component);
13
+ this._instructionText = component.options.instructionText ?? '';
14
+ }
15
+
16
+ /**
17
+ * @protected
18
+ * @returns {LocationSettings}
19
+ */
20
+ _getValues() {
21
+ return {
22
+ ...super._getValues(),
23
+ instructionText: this._instructionText
24
+ };
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Base class for location questions with instruction text support
30
+ */
31
+ export class LocationQuestion extends Question {
32
+ /**
33
+ * @type {string}
34
+ * @protected
35
+ */
36
+ _instructionText = '';
37
+
38
+ /**
39
+ * @param {LocationElements} htmlElements
40
+ * @param {QuestionRenderer} questionRenderer
41
+ */
42
+ constructor(htmlElements, questionRenderer) {
43
+ super(htmlElements, questionRenderer);
44
+ this._instructionText = htmlElements.values.instructionText;
45
+ }
46
+ get instructionText() {
47
+ return this._instructionText;
48
+ }
49
+
50
+ /**
51
+ * @param {string} val
52
+ */
53
+ set instructionText(val) {
54
+ this._instructionText = val;
55
+ this.render();
56
+ }
57
+ }
58
+
59
+ /**
60
+ * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'
61
+ */
62
+ //# sourceMappingURL=location-question-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location-question-base.js","names":["Question","QuestionComponentElements","LocationQuestionComponentPreviewElements","constructor","component","_instructionText","options","instructionText","_getValues","LocationQuestion","htmlElements","questionRenderer","values","val","render"],"sources":["../../../../../src/form/form-editor/preview/location-question-base.js"],"sourcesContent":["import {\n Question,\n QuestionComponentElements\n} from '~/src/form/form-editor/preview/question.js'\n\n/**\n * Base class for location question component preview elements with instruction text support\n * @implements {QuestionElements}\n */\nexport class LocationQuestionComponentPreviewElements extends QuestionComponentElements {\n /**\n * @param {any} component - Component with options.instructionText\n */\n constructor(component) {\n super(component)\n this._instructionText = component.options.instructionText ?? ''\n }\n\n /**\n * @protected\n * @returns {LocationSettings}\n */\n _getValues() {\n return {\n ...super._getValues(),\n instructionText: this._instructionText\n }\n }\n}\n\n/**\n * Base class for location questions with instruction text support\n */\nexport class LocationQuestion extends Question {\n /**\n * @type {string}\n * @protected\n */\n _instructionText = ''\n\n /**\n * @param {LocationElements} htmlElements\n * @param {QuestionRenderer} questionRenderer\n */\n constructor(htmlElements, questionRenderer) {\n super(htmlElements, questionRenderer)\n this._instructionText = htmlElements.values.instructionText\n }\n\n get instructionText() {\n return this._instructionText\n }\n\n /**\n * @param {string} val\n */\n set instructionText(val) {\n this._instructionText = val\n this.render()\n }\n}\n\n/**\n * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n */\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,yBAAyB;;AAG3B;AACA;AACA;AACA;AACA,OAAO,MAAMC,wCAAwC,SAASD,yBAAyB,CAAC;EACtF;AACF;AACA;EACEE,WAAWA,CAACC,SAAS,EAAE;IACrB,KAAK,CAACA,SAAS,CAAC;IAChB,IAAI,CAACC,gBAAgB,GAAGD,SAAS,CAACE,OAAO,CAACC,eAAe,IAAI,EAAE;EACjE;;EAEA;AACF;AACA;AACA;EACEC,UAAUA,CAAA,EAAG;IACX,OAAO;MACL,GAAG,KAAK,CAACA,UAAU,CAAC,CAAC;MACrBD,eAAe,EAAE,IAAI,CAACF;IACxB,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMI,gBAAgB,SAAST,QAAQ,CAAC;EAC7C;AACF;AACA;AACA;EACEK,gBAAgB,GAAG,EAAE;;EAErB;AACF;AACA;AACA;EACEF,WAAWA,CAACO,YAAY,EAAEC,gBAAgB,EAAE;IAC1C,KAAK,CAACD,YAAY,EAAEC,gBAAgB,CAAC;IACrC,IAAI,CAACN,gBAAgB,GAAGK,YAAY,CAACE,MAAM,CAACL,eAAe;EAC7D;EAEA,IAAIA,eAAeA,CAAA,EAAG;IACpB,OAAO,IAAI,CAACF,gBAAgB;EAC9B;;EAEA;AACF;AACA;EACE,IAAIE,eAAeA,CAACM,GAAG,EAAE;IACvB,IAAI,CAACR,gBAAgB,GAAGQ,GAAG;IAC3B,IAAI,CAACC,MAAM,CAAC,CAAC;EACf;AACF;;AAEA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ import { ComponentType } from "../../../components/enums.js";
2
+ import { HIGHLIGHT_CLASS } from "./constants.js";
3
+ import { createLocationFieldModel } from "./location-helpers.js";
4
+ import { LocationQuestion, LocationQuestionComponentPreviewElements } from "./location-question-base.js";
5
+ import { PreviewComponent } from "./preview.js";
6
+
7
+ /**
8
+ * @implements {QuestionElements}
9
+ */
10
+ export class NationalGridComponentPreviewElements extends LocationQuestionComponentPreviewElements {}
11
+ export class NationalGridQuestion extends LocationQuestion {
12
+ /**
13
+ * @type {ComponentType}
14
+ */
15
+ componentType = ComponentType.NationalGridFieldNumberField;
16
+ /**
17
+ * @type {string}
18
+ * @protected
19
+ */
20
+ _questionTemplate = PreviewComponent.PATH + 'nationalgridfieldnumberfield.njk';
21
+ _fieldName = 'NationalGridFieldNumberField';
22
+
23
+ /**
24
+ * @protected
25
+ * @returns {NationalGridModel}
26
+ */
27
+ _renderInput() {
28
+ const baseModel = super._renderInput();
29
+ const locationModel = createLocationFieldModel(baseModel, /** @type {LocationElements} */this._htmlElements, this._highlight, this._instructionText, this.titleText);
30
+ return {
31
+ ...locationModel,
32
+ label: {
33
+ text: this.titleText,
34
+ classes: this._highlight === 'question' ? HIGHLIGHT_CLASS : ''
35
+ },
36
+ inputClasses: this._highlight === 'input' ? HIGHLIGHT_CLASS : ''
37
+ };
38
+ }
39
+ }
40
+
41
+ /**
42
+ * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'
43
+ * @import { NationalGridModel } from '~/src/form/form-editor/macros/types.js'
44
+ * @import { NationalGridFieldNumberFieldComponent } from '~/src/components/types.js'
45
+ */
46
+ //# sourceMappingURL=national-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"national-grid.js","names":["ComponentType","HIGHLIGHT_CLASS","createLocationFieldModel","LocationQuestion","LocationQuestionComponentPreviewElements","PreviewComponent","NationalGridComponentPreviewElements","NationalGridQuestion","componentType","NationalGridFieldNumberField","_questionTemplate","PATH","_fieldName","_renderInput","baseModel","locationModel","_htmlElements","_highlight","_instructionText","titleText","label","text","classes","inputClasses"],"sources":["../../../../../src/form/form-editor/preview/national-grid.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { HIGHLIGHT_CLASS } from '~/src/form/form-editor/preview/constants.js'\nimport { createLocationFieldModel } from '~/src/form/form-editor/preview/location-helpers.js'\nimport {\n LocationQuestion,\n LocationQuestionComponentPreviewElements\n} from '~/src/form/form-editor/preview/location-question-base.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class NationalGridComponentPreviewElements extends LocationQuestionComponentPreviewElements {}\n\nexport class NationalGridQuestion extends LocationQuestion {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.NationalGridFieldNumberField\n /**\n * @type {string}\n * @protected\n */\n _questionTemplate = PreviewComponent.PATH + 'nationalgridfieldnumberfield.njk'\n _fieldName = 'NationalGridFieldNumberField'\n\n /**\n * @protected\n * @returns {NationalGridModel}\n */\n _renderInput() {\n const baseModel = super._renderInput()\n const locationModel = createLocationFieldModel(\n baseModel,\n /** @type {LocationElements} */ (this._htmlElements),\n this._highlight,\n this._instructionText,\n this.titleText\n )\n\n return {\n ...locationModel,\n label: {\n text: this.titleText,\n classes: this._highlight === 'question' ? HIGHLIGHT_CLASS : ''\n },\n inputClasses: this._highlight === 'input' ? HIGHLIGHT_CLASS : ''\n }\n }\n}\n\n/**\n * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { NationalGridModel } from '~/src/form/form-editor/macros/types.js'\n * @import { NationalGridFieldNumberFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,eAAe;AACxB,SAASC,wBAAwB;AACjC,SACEC,gBAAgB,EAChBC,wCAAwC;AAE1C,SAASC,gBAAgB;;AAEzB;AACA;AACA;AACA,OAAO,MAAMC,oCAAoC,SAASF,wCAAwC,CAAC;AAEnG,OAAO,MAAMG,oBAAoB,SAASJ,gBAAgB,CAAC;EACzD;AACF;AACA;EACEK,aAAa,GAAGR,aAAa,CAACS,4BAA4B;EAC1D;AACF;AACA;AACA;EACEC,iBAAiB,GAAGL,gBAAgB,CAACM,IAAI,GAAG,kCAAkC;EAC9EC,UAAU,GAAG,8BAA8B;;EAE3C;AACF;AACA;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,MAAMC,SAAS,GAAG,KAAK,CAACD,YAAY,CAAC,CAAC;IACtC,MAAME,aAAa,GAAGb,wBAAwB,CAC5CY,SAAS,EACT,+BAAiC,IAAI,CAACE,aAAa,EACnD,IAAI,CAACC,UAAU,EACf,IAAI,CAACC,gBAAgB,EACrB,IAAI,CAACC,SACP,CAAC;IAED,OAAO;MACL,GAAGJ,aAAa;MAChBK,KAAK,EAAE;QACLC,IAAI,EAAE,IAAI,CAACF,SAAS;QACpBG,OAAO,EAAE,IAAI,CAACL,UAAU,KAAK,UAAU,GAAGhB,eAAe,GAAG;MAC9D,CAAC;MACDsB,YAAY,EAAE,IAAI,CAACN,UAAU,KAAK,OAAO,GAAGhB,eAAe,GAAG;IAChE,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ import { ComponentType } from "../../../components/enums.js";
2
+ import { HIGHLIGHT_CLASS } from "./constants.js";
3
+ import { createLocationFieldModel } from "./location-helpers.js";
4
+ import { LocationQuestion, LocationQuestionComponentPreviewElements } from "./location-question-base.js";
5
+ import { PreviewComponent } from "./preview.js";
6
+
7
+ /**
8
+ * @implements {QuestionElements}
9
+ */
10
+ export class OsGridRefComponentPreviewElements extends LocationQuestionComponentPreviewElements {}
11
+ export class OsGridRefQuestion extends LocationQuestion {
12
+ /**
13
+ * @type {ComponentType}
14
+ */
15
+ componentType = ComponentType.OsGridRefField;
16
+ /**
17
+ * @type {string}
18
+ * @protected
19
+ */
20
+ _questionTemplate = PreviewComponent.PATH + 'osgridreffield.njk';
21
+ _fieldName = 'OsGridRefField';
22
+
23
+ /**
24
+ * @protected
25
+ * @returns {OsGridRefModel}
26
+ */
27
+ _renderInput() {
28
+ const baseModel = super._renderInput();
29
+ const locationModel = createLocationFieldModel(baseModel, /** @type {LocationElements} */this._htmlElements, this._highlight, this._instructionText, this.titleText);
30
+ return {
31
+ ...locationModel,
32
+ label: {
33
+ text: this.titleText,
34
+ classes: this._highlight === 'question' ? HIGHLIGHT_CLASS : ''
35
+ },
36
+ inputClasses: this._highlight === 'input' ? HIGHLIGHT_CLASS : ''
37
+ };
38
+ }
39
+ }
40
+
41
+ /**
42
+ * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'
43
+ * @import { OsGridRefModel } from '~/src/form/form-editor/macros/types.js'
44
+ * @import { OsGridRefFieldComponent } from '~/src/components/types.js'
45
+ */
46
+ //# sourceMappingURL=os-grid-ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"os-grid-ref.js","names":["ComponentType","HIGHLIGHT_CLASS","createLocationFieldModel","LocationQuestion","LocationQuestionComponentPreviewElements","PreviewComponent","OsGridRefComponentPreviewElements","OsGridRefQuestion","componentType","OsGridRefField","_questionTemplate","PATH","_fieldName","_renderInput","baseModel","locationModel","_htmlElements","_highlight","_instructionText","titleText","label","text","classes","inputClasses"],"sources":["../../../../../src/form/form-editor/preview/os-grid-ref.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { HIGHLIGHT_CLASS } from '~/src/form/form-editor/preview/constants.js'\nimport { createLocationFieldModel } from '~/src/form/form-editor/preview/location-helpers.js'\nimport {\n LocationQuestion,\n LocationQuestionComponentPreviewElements\n} from '~/src/form/form-editor/preview/location-question-base.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class OsGridRefComponentPreviewElements extends LocationQuestionComponentPreviewElements {}\n\nexport class OsGridRefQuestion extends LocationQuestion {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.OsGridRefField\n /**\n * @type {string}\n * @protected\n */\n _questionTemplate = PreviewComponent.PATH + 'osgridreffield.njk'\n _fieldName = 'OsGridRefField'\n\n /**\n * @protected\n * @returns {OsGridRefModel}\n */\n _renderInput() {\n const baseModel = super._renderInput()\n const locationModel = createLocationFieldModel(\n baseModel,\n /** @type {LocationElements} */ (this._htmlElements),\n this._highlight,\n this._instructionText,\n this.titleText\n )\n\n return {\n ...locationModel,\n label: {\n text: this.titleText,\n classes: this._highlight === 'question' ? HIGHLIGHT_CLASS : ''\n },\n inputClasses: this._highlight === 'input' ? HIGHLIGHT_CLASS : ''\n }\n }\n}\n\n/**\n * @import { LocationSettings, LocationElements, QuestionElements, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { OsGridRefModel } from '~/src/form/form-editor/macros/types.js'\n * @import { OsGridRefFieldComponent } from '~/src/components/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,eAAe;AACxB,SAASC,wBAAwB;AACjC,SACEC,gBAAgB,EAChBC,wCAAwC;AAE1C,SAASC,gBAAgB;;AAEzB;AACA;AACA;AACA,OAAO,MAAMC,iCAAiC,SAASF,wCAAwC,CAAC;AAEhG,OAAO,MAAMG,iBAAiB,SAASJ,gBAAgB,CAAC;EACtD;AACF;AACA;EACEK,aAAa,GAAGR,aAAa,CAACS,cAAc;EAC5C;AACF;AACA;AACA;EACEC,iBAAiB,GAAGL,gBAAgB,CAACM,IAAI,GAAG,oBAAoB;EAChEC,UAAU,GAAG,gBAAgB;;EAE7B;AACF;AACA;AACA;EACEC,YAAYA,CAAA,EAAG;IACb,MAAMC,SAAS,GAAG,KAAK,CAACD,YAAY,CAAC,CAAC;IACtC,MAAME,aAAa,GAAGb,wBAAwB,CAC5CY,SAAS,EACT,+BAAiC,IAAI,CAACE,aAAa,EACnD,IAAI,CAACC,UAAU,EACf,IAAI,CAACC,gBAAgB,EACrB,IAAI,CAACC,SACP,CAAC;IAED,OAAO;MACL,GAAGJ,aAAa;MAChBK,KAAK,EAAE;QACLC,IAAI,EAAE,IAAI,CAACF,SAAS;QACpBG,OAAO,EAAE,IAAI,CAACL,UAAU,KAAK,UAAU,GAAGhB,eAAe,GAAG;MAC9D,CAAC;MACDsB,YAAY,EAAE,IAAI,CAACN,UAAU,KAAK,OAAO,GAAGhB,eAAe,GAAG;IAChE,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 | 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":[]}
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 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 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,4 +1,4 @@
1
- import { type AutocompleteFieldComponent, type CheckboxesFieldComponent, type DatePartsFieldComponent, type DeclarationFieldComponent, type DetailsComponent, type EmailAddressFieldComponent, type FileUploadFieldComponent, type HtmlComponent, type InsetTextComponent, type ListComponent, type MarkdownComponent, type MonthYearFieldComponent, type MultilineTextFieldComponent, type NumberFieldComponent, type RadiosFieldComponent, type SelectFieldComponent, type TelephoneNumberFieldComponent, type TextFieldComponent, type UkAddressFieldComponent, type YesNoFieldComponent } from '../components/types.js';
1
+ import { type AutocompleteFieldComponent, type CheckboxesFieldComponent, type DatePartsFieldComponent, type DeclarationFieldComponent, type DetailsComponent, type EastingNorthingFieldComponent, type EmailAddressFieldComponent, type FileUploadFieldComponent, type HtmlComponent, type InsetTextComponent, type LatLongFieldComponent, type ListComponent, type MarkdownComponent, type MonthYearFieldComponent, type MultilineTextFieldComponent, type NationalGridFieldNumberFieldComponent, type NumberFieldComponent, type OsGridRefFieldComponent, type RadiosFieldComponent, type SelectFieldComponent, type TelephoneNumberFieldComponent, type TextFieldComponent, type UkAddressFieldComponent, type YesNoFieldComponent } from '../components/types.js';
2
2
  import { type Item, type List } from '../form/form-definition/types.js';
3
3
  /**
4
4
  * @param {Partial<TextFieldComponent>} partialTextField
@@ -53,4 +53,8 @@ export declare function buildList(partialList?: Partial<List>): List;
53
53
  export declare function buildNumberFieldComponent(partialComponent?: Partial<NumberFieldComponent>): NumberFieldComponent;
54
54
  export declare function buildDateComponent(partialComponent?: Partial<DatePartsFieldComponent>): DatePartsFieldComponent;
55
55
  export declare function buildRadiosComponent(partialComponent?: Partial<RadiosFieldComponent>): RadiosFieldComponent;
56
+ export declare function buildEastingNorthingFieldComponent(partialComponent?: Partial<EastingNorthingFieldComponent>): EastingNorthingFieldComponent;
57
+ export declare function buildLatLongFieldComponent(partialComponent?: Partial<LatLongFieldComponent>): LatLongFieldComponent;
58
+ export declare function buildNationalGridFieldNumberFieldComponent(partialComponent?: Partial<NationalGridFieldNumberFieldComponent>): NationalGridFieldNumberFieldComponent;
59
+ export declare function buildOsGridRefFieldComponent(partialComponent?: Partial<OsGridRefFieldComponent>): OsGridRefFieldComponent;
56
60
  //# sourceMappingURL=components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/components.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,K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AAc,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAC7C,gBAAgB,CAUlB;AACD,wBAAgB,kBAAkB,CAChC,WAAW,GAAE,OAAO,CAAC,aAAa,CAAM,GACvC,aAAa,CAUf;AACD,wBAAgB,sBAAsB,CACpC,eAAe,GAAE,OAAO,CAAC,iBAAiB,CAAM,GAC/C,iBAAiB,CAUnB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,sBAAsB,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAC7D,wBAAwB,CAS1B;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,wBAAwB,GAAE,OAAO,CAAC,0BAA0B,CAAM,GACjE,0BAA0B,CAS5B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,oBAAoB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACvD,oBAAoB,CAUtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,oBAAoB,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAC3D,wBAAwB,CAS1B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,eAAe,GAAE,OAAO,CAAC,IAAI,CAAM,GAAG,IAAI,CAMvE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,WAAW,GAAE,OAAO,CAAC,IAAI,CAAM,GAAG,IAAI,CAiC/D;AAED,wBAAgB,yBAAyB,CACvC,gBAAgB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACnD,oBAAoB,CAStB;AAED,wBAAgB,kBAAkB,CAChC,gBAAgB,GAAE,OAAO,CAAC,uBAAuB,CAAM,GACtD,uBAAuB,CAQzB;AAED,wBAAgB,oBAAoB,CAClC,gBAAgB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACnD,oBAAoB,CAStB"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/components.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,wBAA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BAAgB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACnD,oBAAoB,CAStB;AAED,wBAAgB,kBAAkB,CAChC,gBAAgB,GAAE,OAAO,CAAC,uBAAuB,CAAM,GACtD,uBAAuB,CAQzB;AAED,wBAAgB,oBAAoB,CAClC,gBAAgB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACnD,oBAAoB,CAStB;AAED,wBAAgB,kCAAkC,CAChD,gBAAgB,GAAE,OAAO,CAAC,6BAA6B,CAAM,GAC5D,6BAA6B,CAW/B;AAED,wBAAgB,0BAA0B,CACxC,gBAAgB,GAAE,OAAO,CAAC,qBAAqB,CAAM,GACpD,qBAAqB,CAWvB;AAED,wBAAgB,0CAA0C,CACxD,gBAAgB,GAAE,OAAO,CAAC,qCAAqC,CAAM,GACpE,qCAAqC,CAUvC;AAED,wBAAgB,4BAA4B,CAC1C,gBAAgB,GAAE,OAAO,CAAC,uBAAuB,CAAM,GACtD,uBAAuB,CAUzB"}
@@ -147,6 +147,22 @@ export class DeclarationPreviewElements extends QuestionPreviewElements implemen
147
147
  */
148
148
  get values(): DeclarationSettings;
149
149
  }
150
+ /**
151
+ * @implements {LocationElements}
152
+ */
153
+ export class LocationPreviewElements extends QuestionPreviewElements implements LocationElements {
154
+ /**
155
+ * @param {BaseSettings & {instructionText?: string}} elements
156
+ */
157
+ constructor({ instructionText, ...elements }: BaseSettings & {
158
+ instructionText?: string;
159
+ });
160
+ _instructionText: string;
161
+ /**
162
+ * @returns {LocationSettings}
163
+ */
164
+ get values(): LocationSettings;
165
+ }
150
166
  /**
151
167
  * @implements {PageOverviewElements}
152
168
  */
@@ -245,6 +261,8 @@ import type { UkAddressElements } from '../../../form/form-editor/preview/types.
245
261
  import type { UkAddressSettings } from '../../../form/form-editor/preview/types.js';
246
262
  import type { DeclarationElements } from '../../../form/form-editor/preview/types.js';
247
263
  import type { DeclarationSettings } from '../../../form/form-editor/preview/types.js';
264
+ import type { LocationElements } from '../../../form/form-editor/preview/types.js';
265
+ import type { LocationSettings } from '../../../form/form-editor/preview/types.js';
248
266
  import type { PageOverviewElements } from '../../../form/form-editor/preview/types.js';
249
267
  import type { NumberSettings } from '../../../form/form-editor/preview/types.js';
250
268
  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":"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,YAFU,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAE5C;IASV;;;OAGG;IACH,yBAHW,MAAM,qBACN,iBAAiB,QAI3B;CAUF;AAED;;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,qBAAqB,CAAC,CAAC,EAI1D;IAVD;;OAEG;IACH,YAFU,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAEhD;IASV;;;OAGG;IACH,qBAHW,MAAM,yBACN,qBAAqB,QAI/B;CAUF;AAED;;GAEG;AACH;IAgCE;;OAEG;IACH,sFAFW,YAAY,EAkBtB;IAlDD;;OAEG;IACH,4BAAc;IACd,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