@defra/forms-model 3.0.162 → 3.0.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/module/components/component-types.js +0 -8
  2. package/dist/module/components/component-types.js.map +1 -1
  3. package/dist/module/components/enums.js +0 -1
  4. package/dist/module/components/enums.js.map +1 -1
  5. package/dist/module/components/types.js.map +1 -1
  6. package/dist/types/components/component-types.d.ts.map +1 -1
  7. package/dist/types/components/enums.d.ts +0 -1
  8. package/dist/types/components/enums.d.ts.map +1 -1
  9. package/dist/types/components/types.d.ts +3 -6
  10. package/dist/types/components/types.d.ts.map +1 -1
  11. package/package.json +1 -1
  12. package/src/components/component-types.ts +0 -9
  13. package/src/components/enums.ts +0 -1
  14. package/src/components/types.ts +0 -7
  15. package/dist/module/conditions/inline-condition-model.js +0 -385
  16. package/dist/module/conditions/inline-condition-model.js.map +0 -1
  17. package/dist/module/conditions/inline-condition-operators.js +0 -111
  18. package/dist/module/conditions/inline-condition-operators.js.map +0 -1
  19. package/dist/module/conditions/inline-condition-values.js +0 -134
  20. package/dist/module/conditions/inline-condition-values.js.map +0 -1
  21. package/dist/types/conditions/inline-condition-model.d.ts +0 -86
  22. package/dist/types/conditions/inline-condition-model.d.ts.map +0 -1
  23. package/dist/types/conditions/inline-condition-operators.d.ts +0 -175
  24. package/dist/types/conditions/inline-condition-operators.d.ts.map +0 -1
  25. package/dist/types/conditions/inline-condition-values.d.ts +0 -93
  26. package/dist/types/conditions/inline-condition-values.d.ts.map +0 -1
@@ -142,14 +142,6 @@ export const ComponentTypes = [{
142
142
  hint: '',
143
143
  options: {},
144
144
  schema: {}
145
- }, {
146
- name: 'Para',
147
- type: 'Para',
148
- title: 'Paragraph',
149
- subType: 'content',
150
- content: '',
151
- options: {},
152
- schema: {}
153
145
  }, {
154
146
  name: 'Html',
155
147
  type: 'Html',
@@ -1 +1 @@
1
- {"version":3,"file":"component-types.js","names":["ComponentTypes","name","type","title","subType","hint","options","schema","list","content"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\n\nexport const ComponentTypes: ComponentDef[] = [\n {\n name: 'TextField',\n type: 'TextField',\n title: 'Text field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n type: 'MultilineTextField',\n title: 'Multiline text field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n type: 'YesNoField',\n title: 'Yes/No field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DateField',\n type: 'DateField',\n title: 'Date field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'TimeField',\n type: 'TimeField',\n title: 'Time field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DateTimeField',\n type: 'DateTimeField',\n title: 'Date time field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DatePartsField',\n type: 'DatePartsField',\n title: 'Date parts field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DateTimePartsField',\n type: 'DateTimePartsField',\n title: 'Date time parts field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MonthYearField',\n type: 'MonthYearField',\n title: 'Month year field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'SelectField',\n type: 'SelectField',\n title: 'Select field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'AutocompleteField',\n type: 'AutocompleteField',\n title: 'Autocomplete field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'RadiosField',\n type: 'RadiosField',\n title: 'Radios field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'CheckboxesField',\n type: 'CheckboxesField',\n title: 'Checkboxes field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'NumberField',\n type: 'NumberField',\n title: 'Number field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n type: 'UkAddressField',\n title: 'UK address field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'TelephoneNumberField',\n type: 'TelephoneNumberField',\n title: 'Telephone number field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'EmailAddressField',\n type: 'EmailAddressField',\n title: 'Email address field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'FileUploadField',\n type: 'FileUploadField',\n title: 'File upload field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'Para',\n type: 'Para',\n title: 'Paragraph',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n type: 'Html',\n title: 'Html',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'InsetText',\n type: 'InsetText',\n title: 'Inset text',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'Details',\n type: 'Details',\n title: 'Details',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'List',\n type: 'List',\n title: 'List',\n subType: 'content',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'WebsiteField',\n type: 'WebsiteField',\n title: 'Website field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n }\n]\n"],"mappings":"AAEA,OAAO,MAAMA,cAA8B,GAAG,CAC5C;EACEC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,oBAAoB;EAC1BC,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,sB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,CAAC,EACD;EACEN,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,OAAO,EAAE,SAAS;EAClBK,OAAO,EAAE,EAAE;EACXH,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,SAAS;EACfC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBK,OAAO,EAAE,EAAE;EACXH,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,MAAM;EACbC,OAAO,EAAE,SAAS;EAClBE,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC,CAAC;EACVC,IAAI,EAAE;AACR,CAAC,EACD;EACEP,IAAI,EAAE,cAAc;EACpBC,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE,eAAe;EACtBC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,CACF","ignoreList":[]}
1
+ {"version":3,"file":"component-types.js","names":["ComponentTypes","name","type","title","subType","hint","options","schema","list","content"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\n\nexport const ComponentTypes: ComponentDef[] = [\n {\n name: 'TextField',\n type: 'TextField',\n title: 'Text field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n type: 'MultilineTextField',\n title: 'Multiline text field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n type: 'YesNoField',\n title: 'Yes/No field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DateField',\n type: 'DateField',\n title: 'Date field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'TimeField',\n type: 'TimeField',\n title: 'Time field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DateTimeField',\n type: 'DateTimeField',\n title: 'Date time field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DatePartsField',\n type: 'DatePartsField',\n title: 'Date parts field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DateTimePartsField',\n type: 'DateTimePartsField',\n title: 'Date time parts field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MonthYearField',\n type: 'MonthYearField',\n title: 'Month year field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'SelectField',\n type: 'SelectField',\n title: 'Select field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'AutocompleteField',\n type: 'AutocompleteField',\n title: 'Autocomplete field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'RadiosField',\n type: 'RadiosField',\n title: 'Radios field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'CheckboxesField',\n type: 'CheckboxesField',\n title: 'Checkboxes field',\n subType: 'listField',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'NumberField',\n type: 'NumberField',\n title: 'Number field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n type: 'UkAddressField',\n title: 'UK address field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'TelephoneNumberField',\n type: 'TelephoneNumberField',\n title: 'Telephone number field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'EmailAddressField',\n type: 'EmailAddressField',\n title: 'Email address field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'FileUploadField',\n type: 'FileUploadField',\n title: 'File upload field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n type: 'Html',\n title: 'Html',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'InsetText',\n type: 'InsetText',\n title: 'Inset text',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'Details',\n type: 'Details',\n title: 'Details',\n subType: 'content',\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'List',\n type: 'List',\n title: 'List',\n subType: 'content',\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'WebsiteField',\n type: 'WebsiteField',\n title: 'Website field',\n subType: 'field',\n hint: '',\n options: {},\n schema: {}\n }\n]\n"],"mappings":"AAEA,OAAO,MAAMA,cAA8B,GAAG,CAC5C;EACEC,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,oBAAoB;EAC1BC,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,sBAAsB;EAC7BC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,cAAc;EACrBC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,C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EACtBC,OAAO,EAAE,OAAO;EAChBC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,CACF","ignoreList":[]}
@@ -17,7 +17,6 @@ export let ComponentTypeEnum = /*#__PURE__*/function (ComponentTypeEnum) {
17
17
  ComponentTypeEnum["TelephoneNumberField"] = "TelephoneNumberField";
18
18
  ComponentTypeEnum["EmailAddressField"] = "EmailAddressField";
19
19
  ComponentTypeEnum["FileUploadField"] = "FileUploadField";
20
- ComponentTypeEnum["Para"] = "Para";
21
20
  ComponentTypeEnum["Html"] = "Html";
22
21
  ComponentTypeEnum["InsetText"] = "InsetText";
23
22
  ComponentTypeEnum["Details"] = "Details";
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","names":["ComponentTypeEnum"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentTypeEnum {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DateField = 'DateField',\n TimeField = 'TimeField',\n DateTimeField = 'DateTimeField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n DateTimePartsField = 'DateTimePartsField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n FileUploadField = 'FileUploadField',\n Para = 'Para',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List'\n}\n"],"mappings":"AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"enums.js","names":["ComponentTypeEnum"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentTypeEnum {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DateField = 'DateField',\n TimeField = 'TimeField',\n DateTimeField = 'DateTimeField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n DateTimePartsField = 'DateTimePartsField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n FileUploadField = 'FileUploadField',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List'\n}\n"],"mappings":"AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["export type ComponentType =\n | 'TextField'\n | 'MultilineTextField'\n | 'YesNoField'\n | 'DateField'\n | 'TimeField'\n | 'DateTimeField'\n | 'MonthYearField'\n | 'DatePartsField'\n | 'DateTimePartsField'\n | 'SelectField'\n | 'AutocompleteField'\n | 'RadiosField'\n | 'CheckboxesField'\n | 'NumberField'\n | 'UkAddressField'\n | 'TelephoneNumberField'\n | 'EmailAddressField'\n | 'FileUploadField'\n | 'Para'\n | 'Html'\n | 'InsetText'\n | 'Details'\n | 'List'\n | 'WebsiteField'\n\nexport type ComponentSubType = 'field' | 'content'\n\nexport interface ConditionalComponent {\n name: 'TextField' | 'NumberField'\n title: string\n subType: 'field'\n}\n\nexport interface ContentOptions {\n condition?: string\n}\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\ninterface TextFieldBase {\n subType?: 'field'\n type: string\n name: string\n title: string\n hint?: string\n options: {\n hideTitle?: boolean\n required?: boolean\n optionalText?: boolean\n classes?: string\n allow?: string\n autocomplete?: string\n exposeToContext?: boolean\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n error?: any // TODO: in same cases this is a function e.g. addressLine1 in ukaddress\n }\n}\n\ninterface NumberFieldBase {\n subType?: 'field'\n type: string\n name: string\n title: string\n hint: string\n options: {\n prefix?: string\n suffix?: string\n exposeToContext?: boolean\n }\n schema: {\n min?: number\n max?: number\n precision?: number\n }\n}\n\ninterface ListFieldBase {\n subType?: 'listField' | 'content'\n type: string\n name: string\n title: string\n options: {\n type?: string\n hideTitle?: boolean\n required?: boolean\n optionalText?: boolean\n classes?: string\n bold?: boolean\n exposeToContext?: boolean\n allowPrePopulation?: boolean\n }\n list: string\n schema: {}\n}\n\ninterface ContentFieldBase {\n subType?: 'content'\n type: string\n name: string\n title: string\n content: string\n options: ContentOptions\n schema: {}\n}\n\ninterface DateFieldBase {\n subType?: 'field'\n type: string\n name: string\n title: string\n hint: string\n options: {\n hideTitle?: boolean\n required?: boolean\n optionalText?: boolean\n maxDaysInFuture?: number\n maxDaysInPast?: number\n exposeToContext?: boolean\n }\n schema: {}\n}\n\n// Text Fields\nexport interface TextFieldComponent extends TextFieldBase {\n type: 'TextField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends TextFieldBase {\n type: 'EmailAddressField'\n}\n\nexport interface NumberFieldComponent extends NumberFieldBase {\n type: 'NumberField'\n}\n\nexport interface WebsiteFieldComponent extends TextFieldBase {\n type: 'WebsiteField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends TextFieldBase {\n type: 'TelephoneNumberField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface YesNoFieldComponent extends TextFieldBase {\n type: 'YesNoField'\n}\n\nexport interface MultilineTextFieldComponent extends TextFieldBase {\n type: 'MultilineTextField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n }\n}\n\nexport interface FileUploadFieldComponent {\n subType?: 'field'\n type: 'FileUploadField'\n name: string\n title: string\n hint: string\n options: {\n required?: boolean\n hideTitle?: boolean\n multiple?: boolean\n classes?: string\n exposeToContext?: boolean\n imageQualityPlayback?: boolean\n }\n schema: {}\n}\n\nexport interface UkAddressFieldComponent extends TextFieldBase {\n type: 'UkAddressField'\n}\n\n// Date Fields\nexport interface DateFieldComponent extends DateFieldBase {\n type: 'DateField'\n}\n\nexport interface DateTimeFieldComponent extends DateFieldBase {\n type: 'DateTimeField'\n}\n\nexport interface DatePartsFieldFieldComponent extends DateFieldBase {\n type: 'DatePartsField'\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: 'MonthYearField'\n}\n\nexport interface DateTimePartsFieldComponent extends DateFieldBase {\n type: 'DateTimePartsField'\n}\n\nexport interface TimeFieldComponent extends DateFieldBase {\n type: 'TimeField'\n}\n\n// Content Fields\nexport interface ParaComponent extends ContentFieldBase {\n type: 'Para'\n}\n\nexport interface DetailsComponent extends ContentFieldBase {\n type: 'Details'\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: 'Html'\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: 'InsetText'\n}\n\n// List Fields\nexport interface ListComponent extends ListFieldBase {\n type: 'List'\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: 'AutocompleteField'\n subType?: 'listField'\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: 'CheckboxesField'\n subType?: 'listField'\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: 'RadiosField'\n subType?: 'listField'\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: 'SelectField'\n options: ListFieldBase['options'] & { autocomplete?: string }\n subType?: 'listField'\n}\n\nexport type ComponentDef =\n | InsetTextComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | DateFieldComponent\n | DatePartsFieldFieldComponent\n | MonthYearFieldComponent\n | DateTimeFieldComponent\n | DateTimePartsFieldComponent\n | DetailsComponent\n | EmailAddressFieldComponent\n | FileUploadFieldComponent\n | HtmlComponent\n | ListComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | ParaComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | TelephoneNumberFieldComponent\n | TextFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n | YesNoFieldComponent\n | WebsiteFieldComponent\n\n// Components that render inputs.\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | YesNoFieldComponent\n | FileUploadFieldComponent\n | DateFieldComponent\n | DateTimeFieldComponent\n | DateTimePartsFieldComponent\n | MonthYearFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n | WebsiteFieldComponent\n\n// Components that render content.\nexport type ContentComponentsDef =\n | ParaComponent\n | DetailsComponent\n | HtmlComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render Lists\nexport type ListComponentsDef =\n | ListComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["export type ComponentType =\n | 'TextField'\n | 'MultilineTextField'\n | 'YesNoField'\n | 'DateField'\n | 'TimeField'\n | 'DateTimeField'\n | 'MonthYearField'\n | 'DatePartsField'\n | 'DateTimePartsField'\n | 'SelectField'\n | 'AutocompleteField'\n | 'RadiosField'\n | 'CheckboxesField'\n | 'NumberField'\n | 'UkAddressField'\n | 'TelephoneNumberField'\n | 'EmailAddressField'\n | 'FileUploadField'\n | 'Html'\n | 'InsetText'\n | 'Details'\n | 'List'\n | 'WebsiteField'\n\nexport type ComponentSubType = 'field' | 'content'\n\nexport interface ConditionalComponent {\n name: 'TextField' | 'NumberField'\n title: string\n subType: 'field'\n}\n\nexport interface ContentOptions {\n condition?: string\n}\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\ninterface TextFieldBase {\n subType?: 'field'\n type: string\n name: string\n title: string\n hint?: string\n options: {\n hideTitle?: boolean\n required?: boolean\n optionalText?: boolean\n classes?: string\n allow?: string\n autocomplete?: string\n exposeToContext?: boolean\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n error?: any // TODO: in same cases this is a function e.g. addressLine1 in ukaddress\n }\n}\n\ninterface NumberFieldBase {\n subType?: 'field'\n type: string\n name: string\n title: string\n hint: string\n options: {\n prefix?: string\n suffix?: string\n exposeToContext?: boolean\n }\n schema: {\n min?: number\n max?: number\n precision?: number\n }\n}\n\ninterface ListFieldBase {\n subType?: 'listField' | 'content'\n type: string\n name: string\n title: string\n options: {\n type?: string\n hideTitle?: boolean\n required?: boolean\n optionalText?: boolean\n classes?: string\n bold?: boolean\n exposeToContext?: boolean\n allowPrePopulation?: boolean\n }\n list: string\n schema: {}\n}\n\ninterface ContentFieldBase {\n subType?: 'content'\n type: string\n name: string\n title: string\n content: string\n options: ContentOptions\n schema: {}\n}\n\ninterface DateFieldBase {\n subType?: 'field'\n type: string\n name: string\n title: string\n hint: string\n options: {\n hideTitle?: boolean\n required?: boolean\n optionalText?: boolean\n maxDaysInFuture?: number\n maxDaysInPast?: number\n exposeToContext?: boolean\n }\n schema: {}\n}\n\n// Text Fields\nexport interface TextFieldComponent extends TextFieldBase {\n type: 'TextField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends TextFieldBase {\n type: 'EmailAddressField'\n}\n\nexport interface NumberFieldComponent extends NumberFieldBase {\n type: 'NumberField'\n}\n\nexport interface WebsiteFieldComponent extends TextFieldBase {\n type: 'WebsiteField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends TextFieldBase {\n type: 'TelephoneNumberField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface YesNoFieldComponent extends TextFieldBase {\n type: 'YesNoField'\n}\n\nexport interface MultilineTextFieldComponent extends TextFieldBase {\n type: 'MultilineTextField'\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n }\n}\n\nexport interface FileUploadFieldComponent {\n subType?: 'field'\n type: 'FileUploadField'\n name: string\n title: string\n hint: string\n options: {\n required?: boolean\n hideTitle?: boolean\n multiple?: boolean\n classes?: string\n exposeToContext?: boolean\n imageQualityPlayback?: boolean\n }\n schema: {}\n}\n\nexport interface UkAddressFieldComponent extends TextFieldBase {\n type: 'UkAddressField'\n}\n\n// Date Fields\nexport interface DateFieldComponent extends DateFieldBase {\n type: 'DateField'\n}\n\nexport interface DateTimeFieldComponent extends DateFieldBase {\n type: 'DateTimeField'\n}\n\nexport interface DatePartsFieldFieldComponent extends DateFieldBase {\n type: 'DatePartsField'\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: 'MonthYearField'\n}\n\nexport interface DateTimePartsFieldComponent extends DateFieldBase {\n type: 'DateTimePartsField'\n}\n\nexport interface TimeFieldComponent extends DateFieldBase {\n type: 'TimeField'\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: 'Details'\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: 'Html'\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: 'InsetText'\n}\n\n// List Fields\nexport interface ListComponent extends ListFieldBase {\n type: 'List'\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: 'AutocompleteField'\n subType?: 'listField'\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: 'CheckboxesField'\n subType?: 'listField'\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: 'RadiosField'\n subType?: 'listField'\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: 'SelectField'\n options: ListFieldBase['options'] & { autocomplete?: string }\n subType?: 'listField'\n}\n\nexport type ComponentDef =\n | InsetTextComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | DateFieldComponent\n | DatePartsFieldFieldComponent\n | MonthYearFieldComponent\n | DateTimeFieldComponent\n | DateTimePartsFieldComponent\n | DetailsComponent\n | EmailAddressFieldComponent\n | FileUploadFieldComponent\n | HtmlComponent\n | ListComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | TelephoneNumberFieldComponent\n | TextFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n | YesNoFieldComponent\n | WebsiteFieldComponent\n\n// Components that render inputs.\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | YesNoFieldComponent\n | FileUploadFieldComponent\n | DateFieldComponent\n | DateTimeFieldComponent\n | DateTimePartsFieldComponent\n | MonthYearFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n | WebsiteFieldComponent\n\n// Components that render content.\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render Lists\nexport type ListComponentsDef =\n | ListComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../src/components/component-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,eAAO,MAAM,cAAc,EAAE,YAAY,EAyNxC,CAAA"}
1
+ {"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../src/components/component-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,eAAO,MAAM,cAAc,EAAE,YAAY,EAgNxC,CAAA"}
@@ -17,7 +17,6 @@ export declare enum ComponentTypeEnum {
17
17
  TelephoneNumberField = "TelephoneNumberField",
18
18
  EmailAddressField = "EmailAddressField",
19
19
  FileUploadField = "FileUploadField",
20
- Para = "Para",
21
20
  Html = "Html",
22
21
  InsetText = "InsetText",
23
22
  Details = "Details",
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd"}
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd"}
@@ -1,4 +1,4 @@
1
- export type ComponentType = 'TextField' | 'MultilineTextField' | 'YesNoField' | 'DateField' | 'TimeField' | 'DateTimeField' | 'MonthYearField' | 'DatePartsField' | 'DateTimePartsField' | 'SelectField' | 'AutocompleteField' | 'RadiosField' | 'CheckboxesField' | 'NumberField' | 'UkAddressField' | 'TelephoneNumberField' | 'EmailAddressField' | 'FileUploadField' | 'Para' | 'Html' | 'InsetText' | 'Details' | 'List' | 'WebsiteField';
1
+ export type ComponentType = 'TextField' | 'MultilineTextField' | 'YesNoField' | 'DateField' | 'TimeField' | 'DateTimeField' | 'MonthYearField' | 'DatePartsField' | 'DateTimePartsField' | 'SelectField' | 'AutocompleteField' | 'RadiosField' | 'CheckboxesField' | 'NumberField' | 'UkAddressField' | 'TelephoneNumberField' | 'EmailAddressField' | 'FileUploadField' | 'Html' | 'InsetText' | 'Details' | 'List' | 'WebsiteField';
2
2
  export type ComponentSubType = 'field' | 'content';
3
3
  export interface ConditionalComponent {
4
4
  name: 'TextField' | 'NumberField';
@@ -170,9 +170,6 @@ export interface DateTimePartsFieldComponent extends DateFieldBase {
170
170
  export interface TimeFieldComponent extends DateFieldBase {
171
171
  type: 'TimeField';
172
172
  }
173
- export interface ParaComponent extends ContentFieldBase {
174
- type: 'Para';
175
- }
176
173
  export interface DetailsComponent extends ContentFieldBase {
177
174
  type: 'Details';
178
175
  }
@@ -204,9 +201,9 @@ export interface SelectFieldComponent extends ListFieldBase {
204
201
  };
205
202
  subType?: 'listField';
206
203
  }
207
- export type ComponentDef = InsetTextComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | DateFieldComponent | DatePartsFieldFieldComponent | MonthYearFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | DetailsComponent | EmailAddressFieldComponent | FileUploadFieldComponent | HtmlComponent | ListComponent | MultilineTextFieldComponent | NumberFieldComponent | ParaComponent | RadiosFieldComponent | SelectFieldComponent | TelephoneNumberFieldComponent | TextFieldComponent | TimeFieldComponent | UkAddressFieldComponent | YesNoFieldComponent | WebsiteFieldComponent;
204
+ export type ComponentDef = InsetTextComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | DateFieldComponent | DatePartsFieldFieldComponent | MonthYearFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | DetailsComponent | EmailAddressFieldComponent | FileUploadFieldComponent | HtmlComponent | ListComponent | MultilineTextFieldComponent | NumberFieldComponent | RadiosFieldComponent | SelectFieldComponent | TelephoneNumberFieldComponent | TextFieldComponent | TimeFieldComponent | UkAddressFieldComponent | YesNoFieldComponent | WebsiteFieldComponent;
208
205
  export type InputFieldsComponentsDef = TextFieldComponent | EmailAddressFieldComponent | NumberFieldComponent | MultilineTextFieldComponent | TelephoneNumberFieldComponent | YesNoFieldComponent | FileUploadFieldComponent | DateFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | MonthYearFieldComponent | TimeFieldComponent | UkAddressFieldComponent | WebsiteFieldComponent;
209
- export type ContentComponentsDef = ParaComponent | DetailsComponent | HtmlComponent | InsetTextComponent | ListComponent;
206
+ export type ContentComponentsDef = DetailsComponent | HtmlComponent | InsetTextComponent | ListComponent;
210
207
  export type ListComponentsDef = ListComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | RadiosFieldComponent | SelectFieldComponent;
211
208
  export {};
212
209
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,oBAAoB,GACpB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,aAAa,GACb,mBAAmB,GACnB,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,sBAAsB,GACtB,mBAAmB,GACnB,iBAAiB,GACjB,MAAM,GACN,MAAM,GACN,WAAW,GACX,SAAS,GACT,MAAM,GACN,cAAc,CAAA;AAElB,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,CAAA;AAElD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,GAAG,aAAa,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ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oBAAoB,GACpB,6BAA6B,GAC7B,kBAAkB,GAClB,kBAAkB,GAClB,uBAAuB,GACvB,mBAAmB,GACnB,qBAAqB,CAAA;AAGzB,MAAM,MAAM,wBAAwB,GAChC,kBAAkB,GAClB,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,6BAA6B,GAC7B,mBAAmB,GACnB,wBAAwB,GACxB,kBAAkB,GAClB,sBAAsB,GACtB,2BAA2B,GAC3B,uBAAuB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,CAAA;AAGzB,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,GAChB,aAAa,GACb,kBAAkB,GAClB,aAAa,CAAA;AAGjB,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/forms-model",
3
- "version": "3.0.162",
3
+ "version": "3.0.164",
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
  "repository": {
@@ -163,15 +163,6 @@ export const ComponentTypes: ComponentDef[] = [
163
163
  options: {},
164
164
  schema: {}
165
165
  },
166
- {
167
- name: 'Para',
168
- type: 'Para',
169
- title: 'Paragraph',
170
- subType: 'content',
171
- content: '',
172
- options: {},
173
- schema: {}
174
- },
175
166
  {
176
167
  name: 'Html',
177
168
  type: 'Html',
@@ -17,7 +17,6 @@ export enum ComponentTypeEnum {
17
17
  TelephoneNumberField = 'TelephoneNumberField',
18
18
  EmailAddressField = 'EmailAddressField',
19
19
  FileUploadField = 'FileUploadField',
20
- Para = 'Para',
21
20
  Html = 'Html',
22
21
  InsetText = 'InsetText',
23
22
  Details = 'Details',
@@ -17,7 +17,6 @@ export type ComponentType =
17
17
  | 'TelephoneNumberField'
18
18
  | 'EmailAddressField'
19
19
  | 'FileUploadField'
20
- | 'Para'
21
20
  | 'Html'
22
21
  | 'InsetText'
23
22
  | 'Details'
@@ -221,10 +220,6 @@ export interface TimeFieldComponent extends DateFieldBase {
221
220
  }
222
221
 
223
222
  // Content Fields
224
- export interface ParaComponent extends ContentFieldBase {
225
- type: 'Para'
226
- }
227
-
228
223
  export interface DetailsComponent extends ContentFieldBase {
229
224
  type: 'Details'
230
225
  }
@@ -279,7 +274,6 @@ export type ComponentDef =
279
274
  | ListComponent
280
275
  | MultilineTextFieldComponent
281
276
  | NumberFieldComponent
282
- | ParaComponent
283
277
  | RadiosFieldComponent
284
278
  | SelectFieldComponent
285
279
  | TelephoneNumberFieldComponent
@@ -308,7 +302,6 @@ export type InputFieldsComponentsDef =
308
302
 
309
303
  // Components that render content.
310
304
  export type ContentComponentsDef =
311
- | ParaComponent
312
305
  | DetailsComponent
313
306
  | HtmlComponent
314
307
  | InsetTextComponent
@@ -1,385 +0,0 @@
1
- import { ComponentTypes } from "../components/component-types.js";
2
- import { getExpression } from "./inline-condition-operators.js";
3
- import { AbstractConditionValue, valueFrom } from "./inline-condition-values.js";
4
- export const coordinators = {
5
- AND: 'and',
6
- OR: 'or'
7
- };
8
- export class ConditionsModel {
9
- #groupedConditions;
10
- #userGroupedConditions;
11
- #conditionName;
12
- constructor() {
13
- this.#groupedConditions = [];
14
- this.#userGroupedConditions = [];
15
- }
16
- clone() {
17
- const toReturn = new ConditionsModel();
18
- toReturn.#groupedConditions = this.#groupedConditions.map(it => it.clone());
19
- toReturn.#userGroupedConditions = this.#userGroupedConditions.map(it => it.clone());
20
- toReturn.#conditionName = this.#conditionName;
21
- return toReturn;
22
- }
23
- clear() {
24
- this.#userGroupedConditions = [];
25
- this.#groupedConditions = [];
26
- this.#conditionName = undefined;
27
- return this;
28
- }
29
- set name(name) {
30
- this.#conditionName = name;
31
- }
32
- get name() {
33
- return this.#conditionName;
34
- }
35
- add(condition) {
36
- const coordinatorExpected = this.#userGroupedConditions.length !== 0;
37
- if (condition.getCoordinator() && !coordinatorExpected) {
38
- throw Error('No coordinator allowed on the first condition');
39
- } else if (!condition.getCoordinator() && coordinatorExpected) {
40
- throw Error('Coordinator must be present on subsequent conditions');
41
- }
42
- this.#userGroupedConditions.push(condition);
43
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
44
- return this;
45
- }
46
- replace(index, condition) {
47
- const coordinatorExpected = index !== 0;
48
- if (condition.getCoordinator() && !coordinatorExpected) {
49
- throw Error('No coordinator allowed on the first condition');
50
- } else if (!condition.getCoordinator() && coordinatorExpected) {
51
- throw Error('Coordinator must be present on subsequent conditions');
52
- } else if (index >= this.#userGroupedConditions.length) {
53
- throw Error(`Cannot replace condition ${index} as no such condition exists`);
54
- }
55
- this.#userGroupedConditions.splice(index, 1, condition);
56
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
57
- return this;
58
- }
59
- remove(indexes) {
60
- this.#userGroupedConditions = this.#userGroupedConditions.filter((_condition, index) => !indexes.includes(index)).map((condition, index) => index === 0 ? condition.asFirstCondition() : condition);
61
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
62
- return this;
63
- }
64
- addGroups(groupDefs) {
65
- this.#userGroupedConditions = this._group(this.#userGroupedConditions, groupDefs);
66
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
67
- return this;
68
- }
69
- splitGroup(index) {
70
- this.#userGroupedConditions = this._ungroup(this.#userGroupedConditions, index);
71
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
72
- return this;
73
- }
74
- moveEarlier(index) {
75
- if (index > 0 && index < this.#userGroupedConditions.length) {
76
- this.#userGroupedConditions.splice(index - 1, 0, this.#userGroupedConditions.splice(index, 1)[0]);
77
- if (index === 1) {
78
- this.switchCoordinators();
79
- }
80
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
81
- }
82
- return this;
83
- }
84
- moveLater(index) {
85
- if (index >= 0 && index < this.#userGroupedConditions.length - 1) {
86
- this.#userGroupedConditions.splice(index + 1, 0, this.#userGroupedConditions.splice(index, 1)[0]);
87
- if (index === 0) {
88
- this.switchCoordinators();
89
- }
90
- this.#groupedConditions = this._applyGroups(this.#userGroupedConditions);
91
- }
92
- return this;
93
- }
94
- switchCoordinators() {
95
- this.#userGroupedConditions[1].setCoordinator(this.#userGroupedConditions[0].getCoordinator());
96
- this.#userGroupedConditions[0].setCoordinator(undefined);
97
- }
98
- get asPerUserGroupings() {
99
- return [...this.#userGroupedConditions];
100
- }
101
- get hasConditions() {
102
- return this.#userGroupedConditions.length > 0;
103
- }
104
- get lastIndex() {
105
- return this.#userGroupedConditions.length - 1;
106
- }
107
- toPresentationString() {
108
- return this.#groupedConditions.map(condition => toPresentationString(condition)).join(' ');
109
- }
110
- toExpression() {
111
- return this.#groupedConditions.map(condition => toExpression(condition)).join(' ');
112
- }
113
- _applyGroups(userGroupedConditions) {
114
- const correctedUserGroups = userGroupedConditions.map(condition => condition instanceof ConditionGroup && condition.conditions.length > 2 ? new ConditionGroup(this._group(condition.conditions, this._autoGroupDefs(condition.conditions))) : condition);
115
- return this._group(correctedUserGroups, this._autoGroupDefs(correctedUserGroups));
116
- }
117
- _group(conditions, groupDefs) {
118
- return conditions.reduce((groups, condition, index, conditions) => {
119
- const groupDef = groupDefs.find(groupDef => groupDef.contains(index));
120
- if (groupDef) {
121
- if (groupDef.startsWith(index)) {
122
- const groupConditions = groupDef.applyTo(conditions);
123
- groups.push(new ConditionGroup(groupConditions));
124
- }
125
- } else {
126
- groups.push(condition);
127
- }
128
- return groups;
129
- }, []);
130
- }
131
- _ungroup(conditions, splitIndex) {
132
- if (conditions[splitIndex].isGroup()) {
133
- const copy = [...conditions];
134
- copy.splice(splitIndex, 1, ...conditions[splitIndex].getGroupedConditions());
135
- return copy;
136
- }
137
- return conditions;
138
- }
139
- _autoGroupDefs(conditions) {
140
- const orPositions = [];
141
- conditions.forEach((condition, index) => {
142
- if (condition.getCoordinator() === coordinators.OR) {
143
- orPositions.push(index);
144
- }
145
- });
146
- const hasAnd = !!conditions.find(condition => condition.getCoordinator() === coordinators.AND);
147
- const hasOr = orPositions.length > 0;
148
- if (hasAnd && hasOr) {
149
- let start = 0;
150
- const groupDefs = [];
151
- orPositions.forEach((position, index) => {
152
- if (start < position - 1) {
153
- groupDefs.push(new GroupDef(start, position - 1));
154
- }
155
- const thisIsTheLastOr = orPositions.length === index + 1;
156
- const thereAreMoreConditions = conditions.length - 1 > position;
157
- if (thisIsTheLastOr && thereAreMoreConditions) {
158
- groupDefs.push(new GroupDef(position, conditions.length - 1));
159
- }
160
- start = position;
161
- });
162
- return groupDefs;
163
- }
164
- return [];
165
- }
166
- toJSON() {
167
- const name = this.#conditionName;
168
- const conditions = this.#userGroupedConditions;
169
- return {
170
- name,
171
- conditions: conditions.map(it => it.clone())
172
- };
173
- }
174
- static from(obj) {
175
- if (obj instanceof ConditionsModel) {
176
- return obj;
177
- }
178
- const toReturn = new ConditionsModel();
179
- toReturn.#conditionName = obj.name;
180
- toReturn.#userGroupedConditions = obj.conditions.map(it => conditionFrom(it));
181
- toReturn.#groupedConditions = toReturn._applyGroups(toReturn.#userGroupedConditions);
182
- return toReturn;
183
- }
184
- }
185
- function conditionFrom(it) {
186
- if (it.conditions) {
187
- return new ConditionGroup(it.conditions.map(condition => conditionFrom(condition)));
188
- }
189
- if (it.conditionName) {
190
- return new ConditionRef(it.conditionName, it.conditionDisplayName, it.coordinator);
191
- }
192
- return new Condition(Field.from(it.field), it.operator, valueFrom(it.value), it.coordinator);
193
- }
194
- export class GroupDef {
195
- first;
196
- last;
197
- constructor(first, last) {
198
- if (typeof first !== 'number' || typeof last !== 'number') {
199
- throw Error(`Cannot construct a group from ${first} and ${last}`);
200
- } else if (first >= last) {
201
- throw Error(`Last (${last}) must be greater than first (${first})`);
202
- }
203
- this.first = first;
204
- this.last = last;
205
- }
206
- contains(index) {
207
- return this.first <= index && this.last >= index;
208
- }
209
- startsWith(index) {
210
- return this.first === index;
211
- }
212
- applyTo(conditions) {
213
- return [...conditions].splice(this.first, this.last - this.first + 1);
214
- }
215
- }
216
- class ConditionGroup {
217
- conditions;
218
- constructor(conditions) {
219
- if (!Array.isArray(conditions) || conditions.length < 2) {
220
- throw Error('Cannot construct a condition group from a single condition');
221
- }
222
- this.conditions = conditions;
223
- }
224
- coordinatorString() {
225
- return this.conditions[0].coordinatorString();
226
- }
227
- conditionString() {
228
- const copy = [...this.conditions];
229
- copy.splice(0, 1);
230
- return `(${this.conditions[0].conditionString()} ${copy.map(condition => toPresentationString(condition)).join(' ')})`;
231
- }
232
- conditionExpression() {
233
- const copy = [...this.conditions];
234
- copy.splice(0, 1);
235
- return `(${this.conditions[0].conditionExpression()} ${copy.map(condition => toExpression(condition)).join(' ')})`;
236
- }
237
- asFirstCondition() {
238
- this.conditions[0].asFirstCondition();
239
- return this;
240
- }
241
- getCoordinator() {
242
- return this.conditions[0].getCoordinator();
243
- }
244
- setCoordinator(coordinator) {
245
- this.conditions[0].setCoordinator(coordinator);
246
- }
247
- isGroup() {
248
- return true;
249
- }
250
- getGroupedConditions() {
251
- return this.conditions.map(condition => condition.clone());
252
- }
253
- clone() {
254
- return new ConditionGroup(this.conditions.map(condition => condition.clone()));
255
- }
256
- }
257
- export function toPresentationString(condition) {
258
- return `${condition.coordinatorString()}${condition.conditionString()}`;
259
- }
260
- export function toExpression(condition) {
261
- return `${condition.coordinatorString()}${condition.conditionExpression()}`;
262
- }
263
- export class Field {
264
- name;
265
- type;
266
- display;
267
- constructor(name, type, display) {
268
- if (!name || typeof name !== 'string') {
269
- throw Error(`name ${name} is not valid`);
270
- }
271
- if (!ComponentTypes.find(componentType => componentType.name === type)) {
272
- throw Error(`type ${type} is not valid`);
273
- }
274
- if (!display || typeof display !== 'string') {
275
- throw Error(`display ${display} is not valid`);
276
- }
277
- this.name = name;
278
- this.type = type;
279
- this.display = display;
280
- }
281
- static from(obj) {
282
- return new Field(obj.name, obj.type, obj.display);
283
- }
284
- }
285
- class AbstractCondition {
286
- coordinator;
287
- constructor(coordinator) {
288
- if (coordinator && !Object.values(coordinators).includes(coordinator)) {
289
- throw Error(`coordinator ${coordinator} is not a valid coordinator`);
290
- }
291
- this.coordinator = coordinator;
292
- }
293
- coordinatorString() {
294
- return this.coordinator ? `${this.coordinator} ` : '';
295
- }
296
- getCoordinator() {
297
- return this.coordinator;
298
- }
299
- setCoordinator(coordinator) {
300
- this.coordinator = coordinator;
301
- }
302
- isGroup() {
303
- return false;
304
- }
305
- getGroupedConditions() {
306
- return [this];
307
- }
308
- _asFirstCondition() {
309
- delete this.coordinator;
310
- }
311
- asFirstCondition() {
312
- throw Error('Implement on the subclass (Why do we have to have this method here at all?!)');
313
- }
314
- clone() {
315
- throw Error('Implement on the subclass (Why do we have to have this method here at all?!)');
316
- }
317
- conditionString() {
318
- throw Error('Implement on the subclass (Why do we have to have this method here at all?!)');
319
- }
320
- conditionExpression() {
321
- throw Error('Implement on the subclass (Why do we have to have this method here at all?!)');
322
- }
323
- }
324
- export class Condition extends AbstractCondition {
325
- field;
326
- operator;
327
- value;
328
- constructor(field, operator, value, coordinator) {
329
- super(coordinator);
330
- if (!(field instanceof Field)) {
331
- throw Error(`field ${field} is not a valid Field object`);
332
- }
333
- if (typeof operator !== 'string') {
334
- throw Error(`operator ${operator} is not a valid operator`);
335
- }
336
- if (!(value instanceof AbstractConditionValue)) {
337
- throw Error(`value ${value} is not a valid value type`);
338
- }
339
- this.field = field;
340
- this.operator = operator;
341
- this.value = value;
342
- }
343
- asFirstCondition() {
344
- this._asFirstCondition();
345
- return this;
346
- }
347
- conditionString() {
348
- return `'${this.field.display}' ${this.operator} '${this.value.toPresentationString()}'`;
349
- }
350
- conditionExpression() {
351
- return getExpression(this.field.type, this.field.name, this.operator, this.value);
352
- }
353
- clone() {
354
- return new Condition(Field.from(this.field), this.operator, this.value.clone(), this.coordinator);
355
- }
356
- }
357
- export class ConditionRef extends AbstractCondition {
358
- conditionName;
359
- conditionDisplayName;
360
- constructor(conditionName, conditionDisplayName, coordinator) {
361
- super(coordinator);
362
- if (typeof conditionName !== 'string') {
363
- throw Error(`condition name ${conditionName} is not valid`);
364
- }
365
- if (typeof conditionDisplayName !== 'string') {
366
- throw Error(`condition display name ${conditionDisplayName} is not valid`);
367
- }
368
- this.conditionName = conditionName;
369
- this.conditionDisplayName = conditionDisplayName;
370
- }
371
- asFirstCondition() {
372
- this._asFirstCondition();
373
- return this;
374
- }
375
- conditionString() {
376
- return `'${this.conditionDisplayName}'`;
377
- }
378
- conditionExpression() {
379
- return this.conditionName;
380
- }
381
- clone() {
382
- return new ConditionRef(this.conditionName, this.conditionDisplayName, this.coordinator);
383
- }
384
- }
385
- //# sourceMappingURL=inline-condition-model.js.map