@defra/forms-model 3.0.585 → 3.0.586

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.
@@ -329,7 +329,7 @@ export function buildOsGridRefFieldComponent(partialComponent = {}) {
329
329
  id: '4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s',
330
330
  name: 'OsGridRefField',
331
331
  title: 'Ordnance Survey (OS) grid reference',
332
- hint: 'An OS grid reference number is made up of 2 letters followed by 6 numbers, for example, TQ123456',
332
+ hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',
333
333
  options: {},
334
334
  ...partialComponent,
335
335
  type: ComponentType.OsGridRefField
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","names":["ComponentType","buildTextFieldComponent","partialTextField","id","name","title","hint","options","schema","type","TextField","buildMultilineTextFieldComponent","partialMultilineTextField","MultilineTextField","buildYesNoFieldComponent","partialYesNoField","YesNoField","buildDeclarationFieldComponent","partialDeclarationField","content","DeclarationField","buildMonthYearFieldComponent","partialMonthYearField","MonthYearField","buildSelectFieldComponent","partialSelectField","list","SelectField","buildUkAddressFieldComponent","partialUkAddressField","UkAddressField","buildTelephoneNumberFieldComponent","partialTelephoneNumberField","TelephoneNumberField","buildEmailAddressFieldComponent","partialEmailAddressField","EmailAddressField","buildHtmlComponent","partialHtml","Html","buildInsetTextComponent","partialInsetText","InsetText","buildDetailsComponent","partialDetails","Details","buildListComponent","partialList","List","buildMarkdownComponent","partialMarkdown","Markdown","buildFileUploadComponent","partialFileUploadField","FileUploadField","buildAutoCompleteComponent","partialAutoCompleteField","AutocompleteField","buildRadioComponent","partialListComponent","RadiosField","buildCheckboxComponent","CheckboxesField","buildListItem","partialListItem","text","value","buildList","items","buildNumberFieldComponent","partialComponent","NumberField","buildDateComponent","DatePartsField","buildRadiosComponent","buildEastingNorthingFieldComponent","EastingNorthingField","buildLatLongFieldComponent","LatLongField","buildNationalGridFieldNumberFieldComponent","NationalGridFieldNumberField","buildOsGridRefFieldComponent","OsGridRefField"],"sources":["../../../src/__stubs__/components.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n type AutocompleteFieldComponent,\n type CheckboxesFieldComponent,\n type DatePartsFieldComponent,\n type DeclarationFieldComponent,\n type DetailsComponent,\n type EastingNorthingFieldComponent,\n type EmailAddressFieldComponent,\n type FileUploadFieldComponent,\n type HtmlComponent,\n type InsetTextComponent,\n type LatLongFieldComponent,\n type ListComponent,\n type MarkdownComponent,\n type MonthYearFieldComponent,\n type MultilineTextFieldComponent,\n type NationalGridFieldNumberFieldComponent,\n type NumberFieldComponent,\n type OsGridRefFieldComponent,\n type RadiosFieldComponent,\n type SelectFieldComponent,\n type TelephoneNumberFieldComponent,\n type TextFieldComponent,\n type UkAddressFieldComponent,\n type YesNoFieldComponent\n} from '~/src/components/types.js'\nimport { type Item, type List } from '~/src/form/form-definition/types.js'\n\n/**\n * @param {Partial<TextFieldComponent>} partialTextField\n * @returns {TextFieldComponent}\n */\nexport function buildTextFieldComponent(\n partialTextField: Partial<TextFieldComponent> = {}\n): TextFieldComponent {\n return {\n id: '407dd0d7-cce9-4f43-8e1f-7d89cb698875',\n name: 'TextField',\n title: 'Text field',\n hint: '',\n options: {},\n schema: {},\n ...partialTextField,\n type: ComponentType.TextField\n }\n}\n\nexport function buildMultilineTextFieldComponent(\n partialMultilineTextField: Partial<MultilineTextFieldComponent> = {}\n): MultilineTextFieldComponent {\n return {\n id: '72671f23-552e-4504-a06a-693e240880d5',\n name: 'MuTeCo',\n options: {},\n schema: {},\n title: 'Multiline TextField Component',\n ...partialMultilineTextField,\n type: ComponentType.MultilineTextField\n }\n}\n\nexport function buildYesNoFieldComponent(\n partialYesNoField: Partial<YesNoFieldComponent> = {}\n): YesNoFieldComponent {\n return {\n title: 'YesNo Field Component',\n id: 'be7f849c-47d8-4f1f-ba15-ab939dc70914',\n name: 'YesNoFieldComponent',\n options: {},\n ...partialYesNoField,\n type: ComponentType.YesNoField\n }\n}\n\nexport function buildDeclarationFieldComponent(\n partialDeclarationField: Partial<DeclarationFieldComponent> = {}\n): DeclarationFieldComponent {\n return {\n title: 'Declaration',\n id: 'f2a8c9e1-3d4f-4b5a-8c6d-1e2f3a4b5c6d',\n name: 'DeclarationFieldComponent',\n content: '',\n options: {},\n ...partialDeclarationField,\n type: ComponentType.DeclarationField\n }\n}\nexport function buildMonthYearFieldComponent(\n partialMonthYearField: Partial<MonthYearFieldComponent> = {}\n): MonthYearFieldComponent {\n return {\n id: 'd4e99aca-6d13-4c1a-a623-9e9e5b27d46d',\n title: 'MonthYearFieldComponent',\n name: 'MonthYearFieldComponent',\n options: {},\n ...partialMonthYearField,\n type: ComponentType.MonthYearField\n }\n}\nexport function buildSelectFieldComponent(\n partialSelectField: Partial<SelectFieldComponent> = {}\n): SelectFieldComponent {\n return {\n id: '7f219cf6-3e16-4549-b8df-789506682147',\n list: '',\n name: '',\n options: {},\n title: '',\n ...partialSelectField,\n type: ComponentType.SelectField\n }\n}\nexport function buildUkAddressFieldComponent(\n partialUkAddressField: Partial<UkAddressFieldComponent> = {}\n): UkAddressFieldComponent {\n return {\n id: 'a7cb7440-9095-44cd-9136-2914232722c8',\n title: 'UkAddressFieldComponent',\n name: 'UkAddressFieldComponent',\n options: {},\n ...partialUkAddressField,\n type: ComponentType.UkAddressField\n }\n}\nexport function buildTelephoneNumberFieldComponent(\n partialTelephoneNumberField: Partial<TelephoneNumberFieldComponent> = {}\n): TelephoneNumberFieldComponent {\n return {\n id: '69907916-beac-4faa-b469-656dad5edced',\n title: 'TelephoneNumberFieldComponent',\n name: 'TelephoneNumberFieldComponent',\n options: {},\n ...partialTelephoneNumberField,\n type: ComponentType.TelephoneNumberField\n }\n}\nexport function buildEmailAddressFieldComponent(\n partialEmailAddressField: Partial<EmailAddressFieldComponent> = {}\n): EmailAddressFieldComponent {\n return {\n id: '9dcf0781-bf34-48c8-b13b-d13050dc34d9',\n title: 'EmailAddressFieldComponent',\n name: 'EmailAddressFieldComponent',\n options: {},\n ...partialEmailAddressField,\n type: ComponentType.EmailAddressField\n }\n}\n\nexport function buildHtmlComponent(\n partialHtml: Partial<HtmlComponent> = {}\n): HtmlComponent {\n return {\n id: 'bac683ce-149e-4740-95aa-8289b35bc327',\n title: 'HtmlComponent',\n name: 'HtmlComponent',\n options: {},\n content: '',\n ...partialHtml,\n type: ComponentType.Html\n }\n}\nexport function buildInsetTextComponent(\n partialInsetText: Partial<InsetTextComponent> = {}\n): InsetTextComponent {\n return {\n id: '6b717151-1e86-42b2-97a9-2201b0676e47',\n title: 'InsetText Component',\n name: 'InsetTextComponent',\n content: '',\n options: {},\n ...partialInsetText,\n type: ComponentType.InsetText\n }\n}\nexport function buildDetailsComponent(\n partialDetails: Partial<DetailsComponent> = {}\n): DetailsComponent {\n return {\n id: '245d54df-bb1e-488e-82f6-8f1e42c197e6',\n title: 'Details Component',\n name: 'DetailsComponent',\n content: '',\n options: {},\n ...partialDetails,\n type: ComponentType.Details\n }\n}\nexport function buildListComponent(\n partialList: Partial<ListComponent> = {}\n): ListComponent {\n return {\n id: '62f17168-c2ef-4978-bd42-bdaa5704e25f',\n title: 'List Component',\n name: 'ListComponent',\n list: '',\n options: {},\n ...partialList,\n type: ComponentType.List\n }\n}\nexport function buildMarkdownComponent(\n partialMarkdown: Partial<MarkdownComponent> = {}\n): MarkdownComponent {\n return {\n id: '4a2dc88c-be1a-4277-aff8-04220de2e778',\n title: 'Markdown Component',\n name: 'MarkdownComponent',\n options: {},\n content: '',\n ...partialMarkdown,\n type: ComponentType.Markdown\n }\n}\n\n/**\n * @param {Partial<FileUploadFieldComponent>} partialFileUploadField\n * @returns {FileUploadFieldComponent}\n */\nexport function buildFileUploadComponent(\n partialFileUploadField: Partial<FileUploadFieldComponent> = {}\n): FileUploadFieldComponent {\n return {\n name: 'FileUploadField',\n title: 'File Upload Field',\n options: {},\n schema: {},\n ...partialFileUploadField,\n type: ComponentType.FileUploadField\n }\n}\n\n/**\n *\n * @param {Partial<AutocompleteFieldComponent>} partialAutoCompleteField\n * @returns {AutocompleteFieldComponent}\n */\nexport function buildAutoCompleteComponent(\n partialAutoCompleteField: Partial<AutocompleteFieldComponent> = {}\n): AutocompleteFieldComponent {\n return {\n name: 'AutoCompleteField',\n title: 'What languages do you speak?',\n list: 'AutoCompleteList',\n options: {},\n ...partialAutoCompleteField,\n type: ComponentType.AutocompleteField\n }\n}\n\n/**\n * @param {Partial<RadiosFieldComponent>} partialListComponent\n * @returns {RadiosFieldComponent}\n */\nexport function buildRadioComponent(\n partialListComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n id: '34455d57-df37-4b69-a64f-6c3af0317ebe',\n name: 'RadioField',\n title: 'Which country do you live in?',\n list: 'RadioList',\n options: {},\n ...partialListComponent,\n type: ComponentType.RadiosField\n }\n}\n\n/**\n * @param {Partial<CheckboxesFieldComponent>} partialListComponent\n * @returns {CheckboxesFieldComponent}\n */\nexport function buildCheckboxComponent(\n partialListComponent: Partial<CheckboxesFieldComponent> = {}\n): CheckboxesFieldComponent {\n return {\n name: 'FellowshipOfTheRing',\n title: 'Which are your favourite characters from the fellowship?',\n list: 'CheckboxList',\n options: {},\n ...partialListComponent,\n type: ComponentType.CheckboxesField\n }\n}\n\n/**\n * Builder to create a stub List item\n * @param {Partial<Item>} partialListItem\n * @returns {Item}\n */\nexport function buildListItem(partialListItem: Partial<Item> = {}): Item {\n return {\n text: 'Javascript',\n value: 'javascript',\n ...partialListItem\n }\n}\n\n/**\n * @param {Partial<List>} partialList\n * @returns {List}\n */\nexport function buildList(partialList: Partial<List> = {}): List {\n return {\n title: 'Development language2',\n name: 'YhmNDD',\n type: 'string',\n items: [\n buildListItem({\n text: 'Javascript',\n value: 'javascript'\n }),\n buildListItem({\n text: 'TypeScript',\n value: 'typescript'\n }),\n buildListItem({\n text: 'Python',\n value: 'python'\n }),\n buildListItem({\n text: 'Haskell',\n value: 'haskell'\n }),\n buildListItem({\n text: 'Erlang',\n value: 'erlang'\n }),\n buildListItem({\n text: 'Java',\n value: 'java'\n })\n ],\n ...partialList\n }\n}\n\nexport function buildNumberFieldComponent(\n partialComponent: Partial<NumberFieldComponent> = {}\n): NumberFieldComponent {\n return {\n name: 'year',\n title: 'Year',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.NumberField\n }\n}\n\nexport function buildDateComponent(\n partialComponent: Partial<DatePartsFieldComponent> = {}\n): DatePartsFieldComponent {\n return {\n name: 'bcdefg',\n title: 'Default title',\n options: {},\n ...partialComponent,\n type: ComponentType.DatePartsField\n }\n}\n\nexport function buildRadiosComponent(\n partialComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n name: 'cdefgh',\n title: 'Default title',\n options: {},\n list: 'Default list Id ref',\n ...partialComponent,\n type: ComponentType.RadiosField\n }\n}\n\nexport function buildEastingNorthingFieldComponent(\n partialComponent: Partial<EastingNorthingFieldComponent> = {}\n): EastingNorthingFieldComponent {\n return {\n id: '1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p',\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.EastingNorthingField\n }\n}\n\nexport function buildLatLongFieldComponent(\n partialComponent: Partial<LatLongFieldComponent> = {}\n): LatLongFieldComponent {\n return {\n id: '2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q',\n name: 'LatLongField',\n title: 'Latitude and longitude',\n hint: 'For example, Latitude: 51.5074, Longitude: -0.1278',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.LatLongField\n }\n}\n\nexport function buildNationalGridFieldNumberFieldComponent(\n partialComponent: Partial<NationalGridFieldNumberFieldComponent> = {}\n): NationalGridFieldNumberFieldComponent {\n return {\n id: '3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r',\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, SO04188589',\n options: {},\n ...partialComponent,\n type: ComponentType.NationalGridFieldNumberField\n }\n}\n\nexport function buildOsGridRefFieldComponent(\n partialComponent: Partial<OsGridRefFieldComponent> = {}\n): OsGridRefFieldComponent {\n return {\n id: '4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s',\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n hint: 'An OS grid reference number is made up of 2 letters followed by 6 numbers, for example, TQ123456',\n options: {},\n ...partialComponent,\n type: ComponentType.OsGridRefField\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa;AA6BtB;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,gBAA6C,GAAG,CAAC,CAAC,EAC9B;EACpB,OAAO;IACLC,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE,YAAY;IACnBC,IAAI,EAAE,EAAE;IACRC,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACV,GAAGN,gBAAgB;IACnBO,IAAI,EAAET,aAAa,CAACU;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,gCAAgCA,CAC9CC,yBAA+D,GAAG,CAAC,CAAC,EACvC;EAC7B,OAAO;IACLT,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,QAAQ;IACdG,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACVH,KAAK,EAAE,+BAA+B;IACtC,GAAGO,yBAAyB;IAC5BH,IAAI,EAAET,aAAa,CAACa;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,wBAAwBA,CACtCC,iBAA+C,GAAG,CAAC,CAAC,EAC/B;EACrB,OAAO;IACLV,KAAK,EAAE,uBAAuB;IAC9BF,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,qBAAqB;IAC3BG,OAAO,EAAE,CAAC,C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AAsB;IAC7BC,IAAI,EAAE,+CAA+C;IACrDC,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACV,GAAG8D,gBAAgB;IACnB7D,IAAI,EAAET,aAAa,CAAC4E;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,0BAA0BA,CACxCP,gBAAgD,GAAG,CAAC,CAAC,EAC9B;EACvB,OAAO;IACLnE,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,cAAc;IACpBC,KAAK,EAAE,wBAAwB;IAC/BC,IAAI,EAAE,oDAAoD;IAC1DC,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACV,GAAG8D,gBAAgB;IACnB7D,IAAI,EAAET,aAAa,CAAC8E;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,0CAA0CA,CACxDT,gBAAgE,GAAG,CAAC,CAAC,EAC9B;EACvC,OAAO;IACLnE,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,8BAA8B;IACpCC,KAAK,EAAE,4BAA4B;IACnCC,IAAI,EAAE,6FAA6F;IACnGC,OAAO,EAAE,CAAC,CAAC;IACX,GAAG+D,gBAAgB;IACnB7D,IAAI,EAAET,aAAa,CAACgF;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,4BAA4BA,CAC1CX,gBAAkD,GAAG,CAAC,CAAC,EAC9B;EACzB,OAAO;IACLnE,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,qCAAqC;IAC5CC,IAAI,EAAE,kGAAkG;IACxGC,OAAO,EAAE,CAAC,CAAC;IACX,GAAG+D,gBAAgB;IACnB7D,IAAI,EAAET,aAAa,CAACkF;EACtB,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"components.js","names":["ComponentType","buildTextFieldComponent","partialTextField","id","name","title","hint","options","schema","type","TextField","buildMultilineTextFieldComponent","partialMultilineTextField","MultilineTextField","buildYesNoFieldComponent","partialYesNoField","YesNoField","buildDeclarationFieldComponent","partialDeclarationField","content","DeclarationField","buildMonthYearFieldComponent","partialMonthYearField","MonthYearField","buildSelectFieldComponent","partialSelectField","list","SelectField","buildUkAddressFieldComponent","partialUkAddressField","UkAddressField","buildTelephoneNumberFieldComponent","partialTelephoneNumberField","TelephoneNumberField","buildEmailAddressFieldComponent","partialEmailAddressField","EmailAddressField","buildHtmlComponent","partialHtml","Html","buildInsetTextComponent","partialInsetText","InsetText","buildDetailsComponent","partialDetails","Details","buildListComponent","partialList","List","buildMarkdownComponent","partialMarkdown","Markdown","buildFileUploadComponent","partialFileUploadField","FileUploadField","buildAutoCompleteComponent","partialAutoCompleteField","AutocompleteField","buildRadioComponent","partialListComponent","RadiosField","buildCheckboxComponent","CheckboxesField","buildListItem","partialListItem","text","value","buildList","items","buildNumberFieldComponent","partialComponent","NumberField","buildDateComponent","DatePartsField","buildRadiosComponent","buildEastingNorthingFieldComponent","EastingNorthingField","buildLatLongFieldComponent","LatLongField","buildNationalGridFieldNumberFieldComponent","NationalGridFieldNumberField","buildOsGridRefFieldComponent","OsGridRefField"],"sources":["../../../src/__stubs__/components.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n type AutocompleteFieldComponent,\n type CheckboxesFieldComponent,\n type DatePartsFieldComponent,\n type DeclarationFieldComponent,\n type DetailsComponent,\n type EastingNorthingFieldComponent,\n type EmailAddressFieldComponent,\n type FileUploadFieldComponent,\n type HtmlComponent,\n type InsetTextComponent,\n type LatLongFieldComponent,\n type ListComponent,\n type MarkdownComponent,\n type MonthYearFieldComponent,\n type MultilineTextFieldComponent,\n type NationalGridFieldNumberFieldComponent,\n type NumberFieldComponent,\n type OsGridRefFieldComponent,\n type RadiosFieldComponent,\n type SelectFieldComponent,\n type TelephoneNumberFieldComponent,\n type TextFieldComponent,\n type UkAddressFieldComponent,\n type YesNoFieldComponent\n} from '~/src/components/types.js'\nimport { type Item, type List } from '~/src/form/form-definition/types.js'\n\n/**\n * @param {Partial<TextFieldComponent>} partialTextField\n * @returns {TextFieldComponent}\n */\nexport function buildTextFieldComponent(\n partialTextField: Partial<TextFieldComponent> = {}\n): TextFieldComponent {\n return {\n id: '407dd0d7-cce9-4f43-8e1f-7d89cb698875',\n name: 'TextField',\n title: 'Text field',\n hint: '',\n options: {},\n schema: {},\n ...partialTextField,\n type: ComponentType.TextField\n }\n}\n\nexport function buildMultilineTextFieldComponent(\n partialMultilineTextField: Partial<MultilineTextFieldComponent> = {}\n): MultilineTextFieldComponent {\n return {\n id: '72671f23-552e-4504-a06a-693e240880d5',\n name: 'MuTeCo',\n options: {},\n schema: {},\n title: 'Multiline TextField Component',\n ...partialMultilineTextField,\n type: ComponentType.MultilineTextField\n }\n}\n\nexport function buildYesNoFieldComponent(\n partialYesNoField: Partial<YesNoFieldComponent> = {}\n): YesNoFieldComponent {\n return {\n title: 'YesNo Field Component',\n id: 'be7f849c-47d8-4f1f-ba15-ab939dc70914',\n name: 'YesNoFieldComponent',\n options: {},\n ...partialYesNoField,\n type: ComponentType.YesNoField\n }\n}\n\nexport function buildDeclarationFieldComponent(\n partialDeclarationField: Partial<DeclarationFieldComponent> = {}\n): DeclarationFieldComponent {\n return {\n title: 'Declaration',\n id: 'f2a8c9e1-3d4f-4b5a-8c6d-1e2f3a4b5c6d',\n name: 'DeclarationFieldComponent',\n content: '',\n options: {},\n ...partialDeclarationField,\n type: ComponentType.DeclarationField\n }\n}\nexport function buildMonthYearFieldComponent(\n partialMonthYearField: Partial<MonthYearFieldComponent> = {}\n): MonthYearFieldComponent {\n return {\n id: 'd4e99aca-6d13-4c1a-a623-9e9e5b27d46d',\n title: 'MonthYearFieldComponent',\n name: 'MonthYearFieldComponent',\n options: {},\n ...partialMonthYearField,\n type: ComponentType.MonthYearField\n }\n}\nexport function buildSelectFieldComponent(\n partialSelectField: Partial<SelectFieldComponent> = {}\n): SelectFieldComponent {\n return {\n id: '7f219cf6-3e16-4549-b8df-789506682147',\n list: '',\n name: '',\n options: {},\n title: '',\n ...partialSelectField,\n type: ComponentType.SelectField\n }\n}\nexport function buildUkAddressFieldComponent(\n partialUkAddressField: Partial<UkAddressFieldComponent> = {}\n): UkAddressFieldComponent {\n return {\n id: 'a7cb7440-9095-44cd-9136-2914232722c8',\n title: 'UkAddressFieldComponent',\n name: 'UkAddressFieldComponent',\n options: {},\n ...partialUkAddressField,\n type: ComponentType.UkAddressField\n }\n}\nexport function buildTelephoneNumberFieldComponent(\n partialTelephoneNumberField: Partial<TelephoneNumberFieldComponent> = {}\n): TelephoneNumberFieldComponent {\n return {\n id: '69907916-beac-4faa-b469-656dad5edced',\n title: 'TelephoneNumberFieldComponent',\n name: 'TelephoneNumberFieldComponent',\n options: {},\n ...partialTelephoneNumberField,\n type: ComponentType.TelephoneNumberField\n }\n}\nexport function buildEmailAddressFieldComponent(\n partialEmailAddressField: Partial<EmailAddressFieldComponent> = {}\n): EmailAddressFieldComponent {\n return {\n id: '9dcf0781-bf34-48c8-b13b-d13050dc34d9',\n title: 'EmailAddressFieldComponent',\n name: 'EmailAddressFieldComponent',\n options: {},\n ...partialEmailAddressField,\n type: ComponentType.EmailAddressField\n }\n}\n\nexport function buildHtmlComponent(\n partialHtml: Partial<HtmlComponent> = {}\n): HtmlComponent {\n return {\n id: 'bac683ce-149e-4740-95aa-8289b35bc327',\n title: 'HtmlComponent',\n name: 'HtmlComponent',\n options: {},\n content: '',\n ...partialHtml,\n type: ComponentType.Html\n }\n}\nexport function buildInsetTextComponent(\n partialInsetText: Partial<InsetTextComponent> = {}\n): InsetTextComponent {\n return {\n id: '6b717151-1e86-42b2-97a9-2201b0676e47',\n title: 'InsetText Component',\n name: 'InsetTextComponent',\n content: '',\n options: {},\n ...partialInsetText,\n type: ComponentType.InsetText\n }\n}\nexport function buildDetailsComponent(\n partialDetails: Partial<DetailsComponent> = {}\n): DetailsComponent {\n return {\n id: '245d54df-bb1e-488e-82f6-8f1e42c197e6',\n title: 'Details Component',\n name: 'DetailsComponent',\n content: '',\n options: {},\n ...partialDetails,\n type: ComponentType.Details\n }\n}\nexport function buildListComponent(\n partialList: Partial<ListComponent> = {}\n): ListComponent {\n return {\n id: '62f17168-c2ef-4978-bd42-bdaa5704e25f',\n title: 'List Component',\n name: 'ListComponent',\n list: '',\n options: {},\n ...partialList,\n type: ComponentType.List\n }\n}\nexport function buildMarkdownComponent(\n partialMarkdown: Partial<MarkdownComponent> = {}\n): MarkdownComponent {\n return {\n id: '4a2dc88c-be1a-4277-aff8-04220de2e778',\n title: 'Markdown Component',\n name: 'MarkdownComponent',\n options: {},\n content: '',\n ...partialMarkdown,\n type: ComponentType.Markdown\n }\n}\n\n/**\n * @param {Partial<FileUploadFieldComponent>} partialFileUploadField\n * @returns {FileUploadFieldComponent}\n */\nexport function buildFileUploadComponent(\n partialFileUploadField: Partial<FileUploadFieldComponent> = {}\n): FileUploadFieldComponent {\n return {\n name: 'FileUploadField',\n title: 'File Upload Field',\n options: {},\n schema: {},\n ...partialFileUploadField,\n type: ComponentType.FileUploadField\n }\n}\n\n/**\n *\n * @param {Partial<AutocompleteFieldComponent>} partialAutoCompleteField\n * @returns {AutocompleteFieldComponent}\n */\nexport function buildAutoCompleteComponent(\n partialAutoCompleteField: Partial<AutocompleteFieldComponent> = {}\n): AutocompleteFieldComponent {\n return {\n name: 'AutoCompleteField',\n title: 'What languages do you speak?',\n list: 'AutoCompleteList',\n options: {},\n ...partialAutoCompleteField,\n type: ComponentType.AutocompleteField\n }\n}\n\n/**\n * @param {Partial<RadiosFieldComponent>} partialListComponent\n * @returns {RadiosFieldComponent}\n */\nexport function buildRadioComponent(\n partialListComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n id: '34455d57-df37-4b69-a64f-6c3af0317ebe',\n name: 'RadioField',\n title: 'Which country do you live in?',\n list: 'RadioList',\n options: {},\n ...partialListComponent,\n type: ComponentType.RadiosField\n }\n}\n\n/**\n * @param {Partial<CheckboxesFieldComponent>} partialListComponent\n * @returns {CheckboxesFieldComponent}\n */\nexport function buildCheckboxComponent(\n partialListComponent: Partial<CheckboxesFieldComponent> = {}\n): CheckboxesFieldComponent {\n return {\n name: 'FellowshipOfTheRing',\n title: 'Which are your favourite characters from the fellowship?',\n list: 'CheckboxList',\n options: {},\n ...partialListComponent,\n type: ComponentType.CheckboxesField\n }\n}\n\n/**\n * Builder to create a stub List item\n * @param {Partial<Item>} partialListItem\n * @returns {Item}\n */\nexport function buildListItem(partialListItem: Partial<Item> = {}): Item {\n return {\n text: 'Javascript',\n value: 'javascript',\n ...partialListItem\n }\n}\n\n/**\n * @param {Partial<List>} partialList\n * @returns {List}\n */\nexport function buildList(partialList: Partial<List> = {}): List {\n return {\n title: 'Development language2',\n name: 'YhmNDD',\n type: 'string',\n items: [\n buildListItem({\n text: 'Javascript',\n value: 'javascript'\n }),\n buildListItem({\n text: 'TypeScript',\n value: 'typescript'\n }),\n buildListItem({\n text: 'Python',\n value: 'python'\n }),\n buildListItem({\n text: 'Haskell',\n value: 'haskell'\n }),\n buildListItem({\n text: 'Erlang',\n value: 'erlang'\n }),\n buildListItem({\n text: 'Java',\n value: 'java'\n })\n ],\n ...partialList\n }\n}\n\nexport function buildNumberFieldComponent(\n partialComponent: Partial<NumberFieldComponent> = {}\n): NumberFieldComponent {\n return {\n name: 'year',\n title: 'Year',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.NumberField\n }\n}\n\nexport function buildDateComponent(\n partialComponent: Partial<DatePartsFieldComponent> = {}\n): DatePartsFieldComponent {\n return {\n name: 'bcdefg',\n title: 'Default title',\n options: {},\n ...partialComponent,\n type: ComponentType.DatePartsField\n }\n}\n\nexport function buildRadiosComponent(\n partialComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n name: 'cdefgh',\n title: 'Default title',\n options: {},\n list: 'Default list Id ref',\n ...partialComponent,\n type: ComponentType.RadiosField\n }\n}\n\nexport function buildEastingNorthingFieldComponent(\n partialComponent: Partial<EastingNorthingFieldComponent> = {}\n): EastingNorthingFieldComponent {\n return {\n id: '1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p',\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.EastingNorthingField\n }\n}\n\nexport function buildLatLongFieldComponent(\n partialComponent: Partial<LatLongFieldComponent> = {}\n): LatLongFieldComponent {\n return {\n id: '2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q',\n name: 'LatLongField',\n title: 'Latitude and longitude',\n hint: 'For example, Latitude: 51.5074, Longitude: -0.1278',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.LatLongField\n }\n}\n\nexport function buildNationalGridFieldNumberFieldComponent(\n partialComponent: Partial<NationalGridFieldNumberFieldComponent> = {}\n): NationalGridFieldNumberFieldComponent {\n return {\n id: '3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r',\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, SO04188589',\n options: {},\n ...partialComponent,\n type: ComponentType.NationalGridFieldNumberField\n }\n}\n\nexport function buildOsGridRefFieldComponent(\n partialComponent: Partial<OsGridRefFieldComponent> = {}\n): OsGridRefFieldComponent {\n return {\n id: '4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s',\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',\n options: {},\n ...partialComponent,\n type: ComponentType.OsGridRefField\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa;AA6BtB;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,gBAA6C,GAAG,CAAC,CAAC,EAC9B;EACpB,OAAO;IACLC,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,WAAW;IACjBC,KAAK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ACLnE,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,8BAA8B;IACpCC,KAAK,EAAE,4BAA4B;IACnCC,IAAI,EAAE,6FAA6F;IACnGC,OAAO,EAAE,CAAC,CAAC;IACX,GAAG+D,gBAAgB;IACnB7D,IAAI,EAAET,aAAa,CAACgF;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,4BAA4BA,CAC1CX,gBAAkD,GAAG,CAAC,CAAC,EAC9B;EACzB,OAAO;IACLnE,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,qCAAqC;IAC5CC,IAAI,EAAE,kHAAkH;IACxHC,OAAO,EAAE,CAAC,CAAC;IACX,GAAG+D,gBAAgB;IACnB7D,IAAI,EAAET,aAAa,CAACkF;EACtB,CAAC;AACH","ignoreList":[]}
@@ -139,7 +139,7 @@ export const ComponentTypes = Object.freeze([{
139
139
  name: 'OsGridRefField',
140
140
  title: 'Ordnance Survey (OS) grid reference',
141
141
  type: ComponentType.OsGridRefField,
142
- hint: 'An OS grid reference number is made up of 2 letters followed by 6 numbers, for example, TQ123456',
142
+ hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',
143
143
  options: {}
144
144
  }, {
145
145
  name: 'NationalGridFieldNumberField',
@@ -1 +1 @@
1
- {"version":3,"file":"component-types.js","names":["ComponentType","ComponentTypes","Object","freeze","name","title","type","TextField","hint","options","schema","MultilineTextField","YesNoField","DatePartsField","MonthYearField","SelectField","list","AutocompleteField","RadiosField","CheckboxesField","NumberField","UkAddressField","TelephoneNumberField","EmailAddressField","FileUploadField","Html","content","InsetText","Markdown","Details","List","DeclarationField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","HiddenField"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\n\n/**\n * Defaults for creating new components\n */\nexport const ComponentTypes: readonly ComponentDef[] = Object.freeze([\n {\n name: 'TextField',\n title: 'Text field',\n type: ComponentType.TextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n title: 'Multiline text field',\n type: ComponentType.MultilineTextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n title: 'Yes/No field',\n type: ComponentType.YesNoField,\n hint: '',\n options: {}\n },\n {\n name: 'DatePartsField',\n title: 'Date field',\n type: ComponentType.DatePartsField,\n hint: '',\n options: {}\n },\n {\n name: 'MonthYearField',\n title: 'Month & year field',\n type: ComponentType.MonthYearField,\n hint: '',\n options: {}\n },\n {\n name: 'SelectField',\n title: 'Select field',\n type: ComponentType.SelectField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'AutocompleteField',\n title: 'Autocomplete field',\n type: ComponentType.AutocompleteField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'RadiosField',\n title: 'Radios field',\n type: ComponentType.RadiosField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'CheckboxesField',\n title: 'Checkboxes field',\n type: ComponentType.CheckboxesField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'NumberField',\n title: 'Number field',\n type: ComponentType.NumberField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n title: 'UK address field',\n type: ComponentType.UkAddressField,\n hint: '',\n options: {}\n },\n {\n name: 'TelephoneNumberField',\n title: 'Telephone number field',\n type: ComponentType.TelephoneNumberField,\n hint: '',\n options: {}\n },\n {\n name: 'EmailAddressField',\n title: 'Email address field',\n type: ComponentType.EmailAddressField,\n hint: 'For example, ‘name@example.com’',\n options: {}\n },\n {\n name: 'FileUploadField',\n title: 'File upload field',\n type: ComponentType.FileUploadField,\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n title: 'Html',\n type: ComponentType.Html,\n content: '',\n options: {}\n },\n {\n name: 'InsetText',\n title: 'Inset text',\n type: ComponentType.InsetText,\n content: ''\n },\n {\n name: 'Markdown',\n title: 'Markdown',\n type: ComponentType.Markdown,\n content: '',\n options: {}\n },\n {\n name: 'Details',\n title: 'Details',\n type: ComponentType.Details,\n content: '',\n options: {}\n },\n {\n name: 'List',\n title: 'List',\n type: ComponentType.List,\n list: '',\n options: {}\n },\n {\n name: 'DeclarationField',\n title: 'Declaration',\n type: ComponentType.DeclarationField,\n hint: '',\n content: '',\n options: {}\n },\n {\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n type: ComponentType.EastingNorthingField,\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {}\n },\n {\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n type: ComponentType.OsGridRefField,\n hint: 'An OS grid reference number is made up of 2 letters followed by 6 numbers, for example, TQ123456',\n options: {}\n },\n {\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n type: ComponentType.NationalGridFieldNumberField,\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, SO04188589',\n options: {}\n },\n {\n name: 'LatLongField',\n title: 'Latitude and longitude',\n type: ComponentType.LatLongField,\n hint: 'For Great Britain, the latitude will be a number between 49.850 and 60.859. The longitude will be a number between -13.687 and 1.767',\n options: {}\n },\n {\n name: 'HiddenField',\n title: 'Hidden field',\n type: ComponentType.HiddenField,\n hint: '',\n options: {},\n schema: {}\n }\n])\n"],"mappings":"AAAA,SAASA,aAAa;AAGtB;AACA;AACA;AACA,OAAO,MAAMC,cAAuC,GAAGC,MAAM,CAACC,MAAM,CAAC,CACnE;EACEC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACO,SAAS;EAC7BC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,sBAAsB;EAC7BC,IAAI,EAAEN,aAAa,CAACW,kBAAkB;EACtCH,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AE,sIAAsI;EAC5IC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAEN,aAAa,CAACoC,WAAW;EAC/B5B,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"component-types.js","names":["ComponentType","ComponentTypes","Object","freeze","name","title","type","TextField","hint","options","schema","MultilineTextField","YesNoField","DatePartsField","MonthYearField","SelectField","list","AutocompleteField","RadiosField","CheckboxesField","NumberField","UkAddressField","TelephoneNumberField","EmailAddressField","FileUploadField","Html","content","InsetText","Markdown","Details","List","DeclarationField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","HiddenField"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\n\n/**\n * Defaults for creating new components\n */\nexport const ComponentTypes: readonly ComponentDef[] = Object.freeze([\n {\n name: 'TextField',\n title: 'Text field',\n type: ComponentType.TextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n title: 'Multiline text field',\n type: ComponentType.MultilineTextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n title: 'Yes/No field',\n type: ComponentType.YesNoField,\n hint: '',\n options: {}\n },\n {\n name: 'DatePartsField',\n title: 'Date field',\n type: ComponentType.DatePartsField,\n hint: '',\n options: {}\n },\n {\n name: 'MonthYearField',\n title: 'Month & year field',\n type: ComponentType.MonthYearField,\n hint: '',\n options: {}\n },\n {\n name: 'SelectField',\n title: 'Select field',\n type: ComponentType.SelectField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'AutocompleteField',\n title: 'Autocomplete field',\n type: ComponentType.AutocompleteField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'RadiosField',\n title: 'Radios field',\n type: ComponentType.RadiosField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'CheckboxesField',\n title: 'Checkboxes field',\n type: ComponentType.CheckboxesField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'NumberField',\n title: 'Number field',\n type: ComponentType.NumberField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n title: 'UK address field',\n type: ComponentType.UkAddressField,\n hint: '',\n options: {}\n },\n {\n name: 'TelephoneNumberField',\n title: 'Telephone number field',\n type: ComponentType.TelephoneNumberField,\n hint: '',\n options: {}\n },\n {\n name: 'EmailAddressField',\n title: 'Email address field',\n type: ComponentType.EmailAddressField,\n hint: 'For example, ‘name@example.com’',\n options: {}\n },\n {\n name: 'FileUploadField',\n title: 'File upload field',\n type: ComponentType.FileUploadField,\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n title: 'Html',\n type: ComponentType.Html,\n content: '',\n options: {}\n },\n {\n name: 'InsetText',\n title: 'Inset text',\n type: ComponentType.InsetText,\n content: ''\n },\n {\n name: 'Markdown',\n title: 'Markdown',\n type: ComponentType.Markdown,\n content: '',\n options: {}\n },\n {\n name: 'Details',\n title: 'Details',\n type: ComponentType.Details,\n content: '',\n options: {}\n },\n {\n name: 'List',\n title: 'List',\n type: ComponentType.List,\n list: '',\n options: {}\n },\n {\n name: 'DeclarationField',\n title: 'Declaration',\n type: ComponentType.DeclarationField,\n hint: '',\n content: '',\n options: {}\n },\n {\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n type: ComponentType.EastingNorthingField,\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {}\n },\n {\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n type: ComponentType.OsGridRefField,\n hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',\n options: {}\n },\n {\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n type: ComponentType.NationalGridFieldNumberField,\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, SO04188589',\n options: {}\n },\n {\n name: 'LatLongField',\n title: 'Latitude and longitude',\n type: ComponentType.LatLongField,\n hint: 'For Great Britain, the latitude will be a number between 49.850 and 60.859. The longitude will be a number between -13.687 and 1.767',\n options: {}\n },\n {\n name: 'HiddenField',\n title: 'Hidden field',\n type: ComponentType.HiddenField,\n hint: '',\n options: {},\n schema: {}\n }\n])\n"],"mappings":"AAAA,SAASA,aAAa;AAGtB;AACA;AACA;AACA,OAAO,MAAMC,cAAuC,GAAGC,MAAM,CAACC,MAAM,CAAC,CACnE;EACEC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACO,SAAS;EAC7BC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,sBAAsB;EAC7BC,IAAI,EAAEN,aAAa,CAACW,kBAAkB;EACtCH,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAEN,aAAa,CAACY,UAAU;EAC9BJ,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACa,cAAc;EAClCL,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,oBAAoB;EAC3BC,IAAI,EAAEN,aAAa,CAACc,cAAc;EAClCN,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;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AAO,EAAE,EAAE;EACXjB,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,sBAAsB;EAC5BC,KAAK,EAAE,sBAAsB;EAC7BC,IAAI,EAAEN,aAAa,CAACgC,oBAAoB;EACxCxB,IAAI,EAAE,+CAA+C;EACrDC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,qCAAqC;EAC5CC,IAAI,EAAEN,aAAa,CAACiC,cAAc;EAClCzB,IAAI,EAAE,kHAAkH;EACxHC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,8BAA8B;EACpCC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAEN,aAAa,CAACkC,4BAA4B;EAChD1B,IAAI,EAAE,6FAA6F;EACnGC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE,wBAAwB;EAC/BC,IAAI,EAAEN,aAAa,CAACmC,YAAY;EAChC3B,IAAI,EAAE,sIAAsI;EAC5IC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAEN,aAAa,CAACoC,WAAW;EAC/B5B,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,CACF,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/forms-model",
3
- "version": "3.0.585",
3
+ "version": "3.0.586",
4
4
  "description": "A hapi plugin providing the model for Defra forms",
5
5
  "homepage": "https://github.com/DEFRA/forms-designer/tree/main/model#readme",
6
6
  "types": "dist/types/index.d.ts",
@@ -425,7 +425,7 @@ export function buildOsGridRefFieldComponent(
425
425
  id: '4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s',
426
426
  name: 'OsGridRefField',
427
427
  title: 'Ordnance Survey (OS) grid reference',
428
- hint: 'An OS grid reference number is made up of 2 letters followed by 6 numbers, for example, TQ123456',
428
+ hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',
429
429
  options: {},
430
430
  ...partialComponent,
431
431
  type: ComponentType.OsGridRefField
@@ -163,7 +163,7 @@ export const ComponentTypes: readonly ComponentDef[] = Object.freeze([
163
163
  name: 'OsGridRefField',
164
164
  title: 'Ordnance Survey (OS) grid reference',
165
165
  type: ComponentType.OsGridRefField,
166
- hint: 'An OS grid reference number is made up of 2 letters followed by 6 numbers, for example, TQ123456',
166
+ hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',
167
167
  options: {}
168
168
  },
169
169
  {