@defra/forms-model 3.0.603 → 3.0.605
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/__stubs__/components.js +1 -1
- package/dist/module/__stubs__/components.js.map +1 -1
- package/dist/module/components/component-types.js +1 -1
- package/dist/module/components/component-types.js.map +1 -1
- package/dist/module/form/form-audit/consolidation.js +3 -3
- package/dist/module/form/form-audit/consolidation.js.map +1 -1
- package/dist/types/form/form-audit/consolidation.d.ts +1 -1
- package/dist/types/form/form-audit/consolidation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__stubs__/components.ts +1 -1
- package/src/components/component-types.ts +1 -1
- package/src/form/form-audit/consolidation.ts +9 -3
|
@@ -318,7 +318,7 @@ export function buildNationalGridFieldNumberFieldComponent(partialComponent = {}
|
|
|
318
318
|
id: '3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r',
|
|
319
319
|
name: 'NationalGridFieldNumberField',
|
|
320
320
|
title: 'National Grid field number',
|
|
321
|
-
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example,
|
|
321
|
+
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',
|
|
322
322
|
options: {},
|
|
323
323
|
...partialComponent,
|
|
324
324
|
type: ComponentType.NationalGridFieldNumberField
|
|
@@ -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 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,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,O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C1CX,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":[]}
|
|
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, NG 1234 5678',\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,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,CAAC;IACX,GAAGQ,iBAAiB;IACpBN,IAAI,EAAET,aAAa,CAACgB;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,8BAA8BA,CAC5CC,uBAA2D,GAAG,CAAC,CAAC,EACrC;EAC3B,OAAO;I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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,+FAA+F;IACrGC,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":[]}
|
|
@@ -145,7 +145,7 @@ export const ComponentTypes = Object.freeze([{
|
|
|
145
145
|
name: 'NationalGridFieldNumberField',
|
|
146
146
|
title: 'National Grid field number',
|
|
147
147
|
type: ComponentType.NationalGridFieldNumberField,
|
|
148
|
-
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example,
|
|
148
|
+
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',
|
|
149
149
|
options: {}
|
|
150
150
|
}, {
|
|
151
151
|
name: 'LatLongField',
|
|
@@ -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 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,
|
|
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, NG 1234 5678',\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,WA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AI,EAAE,8BAA8B;EACpCC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAEN,aAAa,CAACkC,4BAA4B;EAChD1B,IAAI,EAAE,+FAA+F;EACrGC,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":[]}
|
|
@@ -53,7 +53,7 @@ export const fieldConfigs = {
|
|
|
53
53
|
* Support contact field configurations for change detection.
|
|
54
54
|
* Used when checking FORM_SUPPORT_CONTACT_UPDATED events.
|
|
55
55
|
*/
|
|
56
|
-
export const supportContactFields = [createSupportContactField('phone number', 'phone'), createSupportContactField('email address', 'email.address'), createSupportContactField('online contact link', 'online.url')];
|
|
56
|
+
export const supportContactFields = [createSupportContactField('phone number', 'phone'), createSupportContactField('email address', 'email.address'), createSupportContactField('email response time', 'email.responseTime'), createSupportContactField('online contact link', 'online.url'), createSupportContactField('online contact text', 'online.text')];
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Event types that are always considered valid (don't need change comparison).
|
|
@@ -64,9 +64,9 @@ export const alwaysValidEvents = new Set([AuditEventMessageType.FORM_CREATED, Au
|
|
|
64
64
|
/**
|
|
65
65
|
* Type guard to check if an audit record is consolidated.
|
|
66
66
|
* @param record - The audit record to check
|
|
67
|
-
* @returns True if the record has consolidation metadata
|
|
67
|
+
* @returns True if the record has consolidation metadata with count > 1
|
|
68
68
|
*/
|
|
69
69
|
export function isConsolidatedRecord(record) {
|
|
70
|
-
return 'consolidatedCount' in record && record.consolidatedCount > 1;
|
|
70
|
+
return 'consolidatedCount' in record && typeof record.consolidatedCount === 'number' && record.consolidatedCount > 1;
|
|
71
71
|
}
|
|
72
72
|
//# sourceMappingURL=consolidation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation.js","names":["AuditEventMessageType","createFieldConfig","label","verb","fieldName","prevPath","newPath","createSupportContactField","contactPath","fieldConfigs","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","supportContactFields","alwaysValidEvents","Set","FORM_CREATED","FORM_UPDATED","FORM_LIVE_CREATED_FROM_DRAFT","FORM_DRAFT_CREATED_FROM_LIVE","FORM_DRAFT_DELETED","FORM_MIGRATED","FORM_JSON_UPLOADED","FORM_JSON_DOWNLOADED","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","isConsolidatedRecord","record","consolidatedCount"],"sources":["../../../../src/form/form-audit/consolidation.ts"],"sourcesContent":["import { AuditEventMessageType } from '~/src/form/form-audit/enums.js'\nimport {\n type AuditRecord,\n type ConsolidatedAuditRecord\n} from '~/src/form/form-audit/types.js'\n\n/**\n * Field configuration for audit events with change tracking.\n * Used by change detection logic to compare previous and new values.\n */\nexport interface FieldConfig {\n label: string\n verb: 'Updated' | 'Changed'\n prevPath: string\n newPath: string\n}\n\n/**\n * Support contact field configuration for change detection.\n */\nexport interface SupportContactFieldConfig {\n label: string\n prevPath: string\n newPath: string\n}\n\n/**\n * Creates a field configuration for audit events.\n */\nfunction createFieldConfig(\n label: string,\n verb: 'Updated' | 'Changed',\n fieldName: string\n): FieldConfig {\n return {\n label,\n verb,\n prevPath: `changes.previous.${fieldName}`,\n newPath: `changes.new.${fieldName}`\n }\n}\n\n/**\n * Creates a support contact field configuration.\n */\nfunction createSupportContactField(\n label: string,\n contactPath: string\n): SupportContactFieldConfig {\n return {\n label,\n prevPath: `changes.previous.contact.${contactPath}`,\n newPath: `changes.new.contact.${contactPath}`\n }\n}\n\n/**\n * Field configurations for audit events with change tracking.\n * Maps event types to their data paths and display labels.\n */\nexport const fieldConfigs: Record<string, FieldConfig> = {\n [AuditEventMessageType.FORM_TITLE_UPDATED]: createFieldConfig(\n 'the form name',\n 'Updated',\n 'title'\n ),\n [AuditEventMessageType.FORM_ORGANISATION_UPDATED]: createFieldConfig(\n 'the lead organisation',\n 'Changed',\n 'organisation'\n ),\n [AuditEventMessageType.FORM_TEAM_NAME_UPDATED]: createFieldConfig(\n 'the team name',\n 'Changed',\n 'teamName'\n ),\n [AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED]: createFieldConfig(\n 'the shared team address',\n 'Updated',\n 'teamEmail'\n ),\n [AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED]: createFieldConfig(\n 'where submitted forms are sent',\n 'Updated',\n 'notificationEmail'\n ),\n [AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED]: createFieldConfig(\n 'the privacy notice link',\n 'Updated',\n 'privacyNoticeUrl'\n ),\n [AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED]: createFieldConfig(\n 'the next steps guidance',\n 'Updated',\n 'submissionGuidance'\n ),\n [AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED]: createFieldConfig(\n 'the support phone number',\n 'Updated',\n 'phone'\n ),\n [AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED]: createFieldConfig(\n 'the support email address',\n 'Updated',\n 'address'\n ),\n [AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED]: createFieldConfig(\n 'the support contact link',\n 'Updated',\n 'url'\n )\n}\n\n/**\n * Support contact field configurations for change detection.\n * Used when checking FORM_SUPPORT_CONTACT_UPDATED events.\n */\nexport const supportContactFields: SupportContactFieldConfig[] = [\n createSupportContactField('phone number', 'phone'),\n createSupportContactField('email address', 'email.address'),\n createSupportContactField('online contact link', 'online.url')\n]\n\n/**\n * Event types that are always considered valid (don't need change comparison).\n * These events represent actions rather than field updates.\n */\nexport const alwaysValidEvents = new Set<string>([\n AuditEventMessageType.FORM_CREATED,\n AuditEventMessageType.FORM_UPDATED,\n AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT,\n AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE,\n AuditEventMessageType.FORM_DRAFT_DELETED,\n AuditEventMessageType.FORM_MIGRATED,\n AuditEventMessageType.FORM_JSON_UPLOADED,\n AuditEventMessageType.FORM_JSON_DOWNLOADED,\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n])\n\n/**\n * Type guard to check if an audit record is consolidated.\n * @param record - The audit record to check\n * @returns True if the record has consolidation metadata\n */\nexport function isConsolidatedRecord(\n record: AuditRecord | ConsolidatedAuditRecord\n): record is ConsolidatedAuditRecord {\n return 'consolidatedCount' in record
|
|
1
|
+
{"version":3,"file":"consolidation.js","names":["AuditEventMessageType","createFieldConfig","label","verb","fieldName","prevPath","newPath","createSupportContactField","contactPath","fieldConfigs","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","supportContactFields","alwaysValidEvents","Set","FORM_CREATED","FORM_UPDATED","FORM_LIVE_CREATED_FROM_DRAFT","FORM_DRAFT_CREATED_FROM_LIVE","FORM_DRAFT_DELETED","FORM_MIGRATED","FORM_JSON_UPLOADED","FORM_JSON_DOWNLOADED","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","isConsolidatedRecord","record","consolidatedCount"],"sources":["../../../../src/form/form-audit/consolidation.ts"],"sourcesContent":["import { AuditEventMessageType } from '~/src/form/form-audit/enums.js'\nimport {\n type AuditRecord,\n type ConsolidatedAuditRecord\n} from '~/src/form/form-audit/types.js'\n\n/**\n * Field configuration for audit events with change tracking.\n * Used by change detection logic to compare previous and new values.\n */\nexport interface FieldConfig {\n label: string\n verb: 'Updated' | 'Changed'\n prevPath: string\n newPath: string\n}\n\n/**\n * Support contact field configuration for change detection.\n */\nexport interface SupportContactFieldConfig {\n label: string\n prevPath: string\n newPath: string\n}\n\n/**\n * Creates a field configuration for audit events.\n */\nfunction createFieldConfig(\n label: string,\n verb: 'Updated' | 'Changed',\n fieldName: string\n): FieldConfig {\n return {\n label,\n verb,\n prevPath: `changes.previous.${fieldName}`,\n newPath: `changes.new.${fieldName}`\n }\n}\n\n/**\n * Creates a support contact field configuration.\n */\nfunction createSupportContactField(\n label: string,\n contactPath: string\n): SupportContactFieldConfig {\n return {\n label,\n prevPath: `changes.previous.contact.${contactPath}`,\n newPath: `changes.new.contact.${contactPath}`\n }\n}\n\n/**\n * Field configurations for audit events with change tracking.\n * Maps event types to their data paths and display labels.\n */\nexport const fieldConfigs: Record<string, FieldConfig> = {\n [AuditEventMessageType.FORM_TITLE_UPDATED]: createFieldConfig(\n 'the form name',\n 'Updated',\n 'title'\n ),\n [AuditEventMessageType.FORM_ORGANISATION_UPDATED]: createFieldConfig(\n 'the lead organisation',\n 'Changed',\n 'organisation'\n ),\n [AuditEventMessageType.FORM_TEAM_NAME_UPDATED]: createFieldConfig(\n 'the team name',\n 'Changed',\n 'teamName'\n ),\n [AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED]: createFieldConfig(\n 'the shared team address',\n 'Updated',\n 'teamEmail'\n ),\n [AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED]: createFieldConfig(\n 'where submitted forms are sent',\n 'Updated',\n 'notificationEmail'\n ),\n [AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED]: createFieldConfig(\n 'the privacy notice link',\n 'Updated',\n 'privacyNoticeUrl'\n ),\n [AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED]: createFieldConfig(\n 'the next steps guidance',\n 'Updated',\n 'submissionGuidance'\n ),\n [AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED]: createFieldConfig(\n 'the support phone number',\n 'Updated',\n 'phone'\n ),\n [AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED]: createFieldConfig(\n 'the support email address',\n 'Updated',\n 'address'\n ),\n [AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED]: createFieldConfig(\n 'the support contact link',\n 'Updated',\n 'url'\n )\n}\n\n/**\n * Support contact field configurations for change detection.\n * Used when checking FORM_SUPPORT_CONTACT_UPDATED events.\n */\nexport const supportContactFields: SupportContactFieldConfig[] = [\n createSupportContactField('phone number', 'phone'),\n createSupportContactField('email address', 'email.address'),\n createSupportContactField('email response time', 'email.responseTime'),\n createSupportContactField('online contact link', 'online.url'),\n createSupportContactField('online contact text', 'online.text')\n]\n\n/**\n * Event types that are always considered valid (don't need change comparison).\n * These events represent actions rather than field updates.\n */\nexport const alwaysValidEvents = new Set<string>([\n AuditEventMessageType.FORM_CREATED,\n AuditEventMessageType.FORM_UPDATED,\n AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT,\n AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE,\n AuditEventMessageType.FORM_DRAFT_DELETED,\n AuditEventMessageType.FORM_MIGRATED,\n AuditEventMessageType.FORM_JSON_UPLOADED,\n AuditEventMessageType.FORM_JSON_DOWNLOADED,\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n])\n\n/**\n * Type guard to check if an audit record is consolidated.\n * @param record - The audit record to check\n * @returns True if the record has consolidation metadata with count > 1\n */\nexport function isConsolidatedRecord(\n record: AuditRecord | ConsolidatedAuditRecord\n): record is ConsolidatedAuditRecord {\n return (\n 'consolidatedCount' in record &&\n typeof record.consolidatedCount === 'number' &&\n record.consolidatedCount > 1\n )\n}\n"],"mappings":"AAAA,SAASA,qBAAqB;;AAM9B;AACA;AACA;AACA;;AAQA;AACA;AACA;;AAOA;AACA;AACA;AACA,SAASC,iBAAiBA,CACxBC,KAAa,EACbC,IAA2B,EAC3BC,SAAiB,EACJ;EACb,OAAO;IACLF,KAAK;IACLC,IAAI;IACJE,QAAQ,EAAE,oBAAoBD,SAAS,EAAE;IACzCE,OAAO,EAAE,eAAeF,SAAS;EACnC,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAASG,yBAAyBA,CAChCL,KAAa,EACbM,WAAmB,EACQ;EAC3B,OAAO;IACLN,KAAK;IACLG,QAAQ,EAAE,4BAA4BG,WAAW,EAAE;IACnDF,OAAO,EAAE,uBAAuBE,WAAW;EAC7C,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAyC,GAAG;EACvD,CAACT,qBAAqB,CAACU,kBAAkB,GAAGT,iBAAiB,CAC3D,eAAe,EACf,SAAS,EACT,OACF,CAAC;EACD,CAACD,qBAAqB,CAACW,yBAAyB,GAAGV,iBAAiB,CAClE,uBAAuB,EACvB,SAAS,EACT,cACF,CAAC;EACD,CAACD,qBAAqB,CAACY,sBAAsB,GAAGX,iBAAiB,CAC/D,eAAe,EACf,SAAS,EACT,UACF,CAAC;EACD,CAACD,qBAAqB,CAACa,uBAAuB,GAAGZ,iBAAiB,CAChE,yBAAyB,EACzB,SAAS,EACT,WACF,CAAC;EACD,CAACD,qBAAqB,CAACc,+BAA+B,GAAGb,iBAAiB,CACxE,gCAAgC,EAChC,SAAS,EACT,mBACF,CAAC;EACD,CA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BA,CAClCC,MAA6C,EACV;EACnC,OACE,mBAAmB,IAAIA,MAAM,IAC7B,OAAOA,MAAM,CAACC,iBAAiB,KAAK,QAAQ,IAC5CD,MAAM,CAACC,iBAAiB,GAAG,CAAC;AAEhC","ignoreList":[]}
|
|
@@ -35,7 +35,7 @@ export declare const alwaysValidEvents: Set<string>;
|
|
|
35
35
|
/**
|
|
36
36
|
* Type guard to check if an audit record is consolidated.
|
|
37
37
|
* @param record - The audit record to check
|
|
38
|
-
* @returns True if the record has consolidation metadata
|
|
38
|
+
* @returns True if the record has consolidation metadata with count > 1
|
|
39
39
|
*/
|
|
40
40
|
export declare function isConsolidatedRecord(record: AuditRecord | ConsolidatedAuditRecord): record is ConsolidatedAuditRecord;
|
|
41
41
|
//# sourceMappingURL=consolidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/consolidation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAA;AAEvC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAgCD;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAmDpD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"consolidation.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/consolidation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAA;AAEvC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAgCD;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAmDpD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,yBAAyB,EAM3D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAW5B,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,GAAG,uBAAuB,GAC5C,MAAM,IAAI,uBAAuB,CAMnC"}
|
package/package.json
CHANGED
|
@@ -411,7 +411,7 @@ export function buildNationalGridFieldNumberFieldComponent(
|
|
|
411
411
|
id: '3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r',
|
|
412
412
|
name: 'NationalGridFieldNumberField',
|
|
413
413
|
title: 'National Grid field number',
|
|
414
|
-
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example,
|
|
414
|
+
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',
|
|
415
415
|
options: {},
|
|
416
416
|
...partialComponent,
|
|
417
417
|
type: ComponentType.NationalGridFieldNumberField
|
|
@@ -170,7 +170,7 @@ export const ComponentTypes: readonly ComponentDef[] = Object.freeze([
|
|
|
170
170
|
name: 'NationalGridFieldNumberField',
|
|
171
171
|
title: 'National Grid field number',
|
|
172
172
|
type: ComponentType.NationalGridFieldNumberField,
|
|
173
|
-
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example,
|
|
173
|
+
hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',
|
|
174
174
|
options: {}
|
|
175
175
|
},
|
|
176
176
|
{
|
|
@@ -118,7 +118,9 @@ export const fieldConfigs: Record<string, FieldConfig> = {
|
|
|
118
118
|
export const supportContactFields: SupportContactFieldConfig[] = [
|
|
119
119
|
createSupportContactField('phone number', 'phone'),
|
|
120
120
|
createSupportContactField('email address', 'email.address'),
|
|
121
|
-
createSupportContactField('
|
|
121
|
+
createSupportContactField('email response time', 'email.responseTime'),
|
|
122
|
+
createSupportContactField('online contact link', 'online.url'),
|
|
123
|
+
createSupportContactField('online contact text', 'online.text')
|
|
122
124
|
]
|
|
123
125
|
|
|
124
126
|
/**
|
|
@@ -141,10 +143,14 @@ export const alwaysValidEvents = new Set<string>([
|
|
|
141
143
|
/**
|
|
142
144
|
* Type guard to check if an audit record is consolidated.
|
|
143
145
|
* @param record - The audit record to check
|
|
144
|
-
* @returns True if the record has consolidation metadata
|
|
146
|
+
* @returns True if the record has consolidation metadata with count > 1
|
|
145
147
|
*/
|
|
146
148
|
export function isConsolidatedRecord(
|
|
147
149
|
record: AuditRecord | ConsolidatedAuditRecord
|
|
148
150
|
): record is ConsolidatedAuditRecord {
|
|
149
|
-
return
|
|
151
|
+
return (
|
|
152
|
+
'consolidatedCount' in record &&
|
|
153
|
+
typeof record.consolidatedCount === 'number' &&
|
|
154
|
+
record.consolidatedCount > 1
|
|
155
|
+
)
|
|
150
156
|
}
|