@defra/forms-model 3.0.649 → 3.0.651

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.
@@ -28,6 +28,13 @@ export let ComponentType = /*#__PURE__*/function (ComponentType) {
28
28
  ComponentType["GeospatialField"] = "GeospatialField";
29
29
  return ComponentType;
30
30
  }({});
31
+ export let GeospatialFieldOptionsCountryEnum = /*#__PURE__*/function (GeospatialFieldOptionsCountryEnum) {
32
+ GeospatialFieldOptionsCountryEnum["England"] = "england";
33
+ GeospatialFieldOptionsCountryEnum["NorthernIreland"] = "northern-ireland";
34
+ GeospatialFieldOptionsCountryEnum["Scotland"] = "scotland";
35
+ GeospatialFieldOptionsCountryEnum["Wales"] = "wales";
36
+ return GeospatialFieldOptionsCountryEnum;
37
+ }({});
31
38
  export const PreviewTypeEnum = {
32
39
  ...ComponentType,
33
40
  Question: 'Question',
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","names":["ComponentType","PreviewTypeEnum","Question","ListSortable"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\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 Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List',\n Markdown = 'Markdown',\n FileUploadField = 'FileUploadField',\n DeclarationField = 'DeclarationField',\n EastingNorthingField = 'EastingNorthingField',\n OsGridRefField = 'OsGridRefField',\n NationalGridFieldNumberField = 'NationalGridFieldNumberField',\n LatLongField = 'LatLongField',\n HiddenField = 'HiddenField',\n PaymentField = 'PaymentField',\n GeospatialField = 'GeospatialField'\n}\n\nexport const PreviewTypeEnum = {\n ...ComponentType,\n Question: 'Question',\n ListSortable: 'ListSortable'\n} as Record<string, string>\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AA8BzB,OAAO,MAAMC,eAAe,GAAG;EAC7B,GAAGD,aAAa;EAChBE,QAAQ,EAAE,UAAU;EACpBC,YAAY,EAAE;AAChB,CAA2B","ignoreList":[]}
1
+ {"version":3,"file":"enums.js","names":["ComponentType","GeospatialFieldOptionsCountryEnum","PreviewTypeEnum","Question","ListSortable"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\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 Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List',\n Markdown = 'Markdown',\n FileUploadField = 'FileUploadField',\n DeclarationField = 'DeclarationField',\n EastingNorthingField = 'EastingNorthingField',\n OsGridRefField = 'OsGridRefField',\n NationalGridFieldNumberField = 'NationalGridFieldNumberField',\n LatLongField = 'LatLongField',\n HiddenField = 'HiddenField',\n PaymentField = 'PaymentField',\n GeospatialField = 'GeospatialField'\n}\n\nexport enum GeospatialFieldOptionsCountryEnum {\n England = 'england',\n NorthernIreland = 'northern-ireland',\n Scotland = 'scotland',\n Wales = 'wales'\n}\n\nexport const PreviewTypeEnum = {\n ...ComponentType,\n Question: 'Question',\n ListSortable: 'ListSortable'\n} as Record<string, string>\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AA8BzB,WAAYC,iCAAiC,0BAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAA,OAAjCA,iCAAiC;AAAA;AAO7C,OAAO,MAAMC,eAAe,GAAG;EAC7B,GAAGF,aAAa;EAChBG,QAAQ,EAAE,UAAU;EACpBC,YAAY,EAAE;AAChB,CAA2B","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  export { ComponentTypes } from "./component-types.js";
2
- export { ComponentType, PreviewTypeEnum } from "./enums.js";
2
+ export { ComponentType, GeospatialFieldOptionsCountryEnum, PreviewTypeEnum } from "./enums.js";
3
3
  export { allDocumentTypes, allImageTypes, allTabularDataTypes } from "./file-types.js";
4
4
  export { getComponentDefaults, hasConditionSupport, hasContent, hasContentField, hasFormField, hasHint, hasInputField, hasListField, hasSelectionFields, hasTitle, isConditionalRevealType, isConditionalType, isContentType, isFormType, isListType } from "./helpers.js";
5
5
  export { getYesNoList, yesNoListId, yesNoListName, yesNoListNoItemId, yesNoListYesItemId } from "./yes-no-helper.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentTypes","ComponentType","PreviewTypeEnum","allDocumentTypes","allImageTypes","allTabularDataTypes","getComponentDefaults","hasConditionSupport","hasContent","hasContentField","hasFormField","hasHint","hasInputField","hasListField","hasSelectionFields","hasTitle","isConditionalRevealType","isConditionalType","isContentType","isFormType","isListType","getYesNoList","yesNoListId","yesNoListName","yesNoListNoItemId","yesNoListYesItemId"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport { ComponentType, PreviewTypeEnum } from '~/src/components/enums.js'\nexport {\n allDocumentTypes,\n allImageTypes,\n allTabularDataTypes\n} from '~/src/components/file-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContent,\n hasContentField,\n hasFormField,\n hasHint,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle,\n isConditionalRevealType,\n isConditionalType,\n isContentType,\n isFormType,\n isListType\n} from '~/src/components/helpers.js'\nexport {\n getYesNoList,\n yesNoListId,\n yesNoListName,\n yesNoListNoItemId,\n yesNoListYesItemId\n} from '~/src/components/yes-no-helper.js'\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SAASC,aAAa,EAAEC,eAAe;AACvC,SACEC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB;AAErB,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ,EACRC,uBAAuB,EACvBC,iBAAiB,EACjBC,aAAa,EACbC,UAAU,EACVC,UAAU;AAEZ,SACEC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ComponentTypes","ComponentType","GeospatialFieldOptionsCountryEnum","PreviewTypeEnum","allDocumentTypes","allImageTypes","allTabularDataTypes","getComponentDefaults","hasConditionSupport","hasContent","hasContentField","hasFormField","hasHint","hasInputField","hasListField","hasSelectionFields","hasTitle","isConditionalRevealType","isConditionalType","isContentType","isFormType","isListType","getYesNoList","yesNoListId","yesNoListName","yesNoListNoItemId","yesNoListYesItemId"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport {\n ComponentType,\n GeospatialFieldOptionsCountryEnum,\n PreviewTypeEnum\n} from '~/src/components/enums.js'\nexport {\n allDocumentTypes,\n allImageTypes,\n allTabularDataTypes\n} from '~/src/components/file-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContent,\n hasContentField,\n hasFormField,\n hasHint,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle,\n isConditionalRevealType,\n isConditionalType,\n isContentType,\n isFormType,\n isListType\n} from '~/src/components/helpers.js'\nexport {\n getYesNoList,\n yesNoListId,\n yesNoListName,\n yesNoListNoItemId,\n yesNoListYesItemId\n} from '~/src/components/yes-no-helper.js'\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SACEC,aAAa,EACbC,iCAAiC,EACjCC,eAAe;AAEjB,SACEC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB;AAErB,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ,EACRC,uBAAuB,EACvBC,iBAAiB,EACjBC,aAAa,EACbC,UAAU,EACVC,UAAU;AAEZ,SACEC,YAAY,EACZC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type LanguageMessages } from 'joi'\n\nimport {\n type ComponentType,\n type PreviewTypeEnum\n} from '~/src/components/enums.js'\nimport {\n type ListTypeContent,\n type ListTypeOption\n} from '~/src/form/form-definition/types.js'\n\nexport type ConditionalComponentType = Exclude<\n ConditionalComponentsDef['type'],\n ContentComponentsDef\n>\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\n\ninterface FormFieldBase {\n id?: string\n type: FormComponentsDef['type']\n shortDescription?: string\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n customValidationMessages?: LanguageMessages\n instructionText?: string\n }\n}\n\ninterface ListFieldBase extends FormFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.RadiosField\n | ComponentType.SelectField\n list: string\n options: FormFieldBase['options'] & {\n type?: ListTypeContent\n }\n}\n\ninterface ContentFieldBase {\n id?: string\n type:\n | ComponentType.Details\n | ComponentType.Html\n | ComponentType.Markdown\n | ComponentType.InsetText\n | ComponentType.List\n name: string\n title: string\n options?: {\n required?: undefined\n optionalText?: undefined\n }\n}\n\ninterface DateFieldBase extends FormFieldBase {\n type: ComponentType.DatePartsField | ComponentType.MonthYearField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n }\n}\n\n// Text Fields\nexport interface TextFieldComponent extends FormFieldBase {\n type: ComponentType.TextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends FormFieldBase {\n type: ComponentType.EmailAddressField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends FormFieldBase {\n type: ComponentType.NumberField\n options: FormFieldBase['options'] & {\n prefix?: string\n suffix?: string\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n precision?: number\n minPrecision?: number\n minLength?: number\n maxLength?: number\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface FileUploadFieldComponent extends FormFieldBase {\n type: ComponentType.FileUploadField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n accept?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface YesNoFieldComponent extends FormFieldBase {\n type: ComponentType.YesNoField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface DeclarationFieldComponent extends FormFieldBase {\n type: ComponentType.DeclarationField\n content: string\n options: FormFieldBase['options'] & {\n condition?: string\n declarationConfirmationLabel?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends FormFieldBase {\n type: ComponentType.MultilineTextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface UkAddressFieldComponent extends FormFieldBase {\n type: ComponentType.UkAddressField\n options: FormFieldBase['options'] & {\n hideTitle?: boolean\n usePostcodeLookup?: boolean\n }\n}\n\n// Precise Location Fields\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n easting?: {\n min?: number\n max?: number\n }\n northing?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface OsGridRefFieldComponent extends FormFieldBase {\n type: ComponentType.OsGridRefField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NationalGridFieldNumberFieldComponent extends FormFieldBase {\n type: ComponentType.NationalGridFieldNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface LatLongFieldComponent extends FormFieldBase {\n type: ComponentType.LatLongField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n latitude?: {\n min?: number\n max?: number\n }\n longitude?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface HiddenFieldComponent extends FormFieldBase {\n type: ComponentType.HiddenField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface PaymentFieldComponent extends FormFieldBase {\n type: ComponentType.PaymentField\n options: FormFieldBase['options'] & {\n amount: number\n description: string\n conditionalAmounts?: {\n condition: string\n amount: number\n }[]\n emailField?: string\n }\n}\n\nexport interface GeospatialFieldComponent extends FormFieldBase {\n type: ComponentType.GeospatialField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MarkdownComponent extends ContentFieldBase {\n type: ComponentType.Markdown\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n content: string\n}\n\nexport interface ListComponent extends ContentFieldBase {\n type: ComponentType.List\n hint?: string\n list: string\n options: ContentFieldBase['options'] & {\n type?: ListTypeOption\n classes?: string\n hideTitle?: boolean\n bold?: boolean\n }\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n schema?: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n }\n}\n\nexport type ComponentDef = FormComponentsDef | ContentComponentsDef\n\n// Components that render form fields\nexport type FormComponentsDef =\n | InputFieldsComponentsDef\n | SelectionComponentsDef\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | MonthYearFieldComponent\n | DatePartsFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | DeclarationFieldComponent\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\n | HiddenFieldComponent\n | PaymentFieldComponent\n | GeospatialFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | MarkdownComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | Exclude<SelectionComponentsDef, YesNoFieldComponent>\n | ListComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have condition support\nexport type ConditionalComponentsDef = Exclude<\n ComponentDef,\n | InsetTextComponent\n | ListComponent\n | MonthYearFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | PaymentFieldComponent\n>\n\nexport type PreviewType = keyof typeof PreviewTypeEnum\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type LanguageMessages } from 'joi'\n\nimport {\n type ComponentType,\n type PreviewTypeEnum\n} from '~/src/components/enums.js'\nimport {\n type ListTypeContent,\n type ListTypeOption\n} from '~/src/form/form-definition/types.js'\n\nexport type ConditionalComponentType = Exclude<\n ConditionalComponentsDef['type'],\n ContentComponentsDef\n>\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\n\ninterface FormFieldBase {\n id?: string\n type: FormComponentsDef['type']\n shortDescription?: string\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n customValidationMessages?: LanguageMessages\n instructionText?: string\n }\n}\n\ninterface ListFieldBase extends FormFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.RadiosField\n | ComponentType.SelectField\n list: string\n options: FormFieldBase['options'] & {\n type?: ListTypeContent\n }\n}\n\ninterface ContentFieldBase {\n id?: string\n type:\n | ComponentType.Details\n | ComponentType.Html\n | ComponentType.Markdown\n | ComponentType.InsetText\n | ComponentType.List\n name: string\n title: string\n options?: {\n required?: undefined\n optionalText?: undefined\n }\n}\n\ninterface DateFieldBase extends FormFieldBase {\n type: ComponentType.DatePartsField | ComponentType.MonthYearField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n }\n}\n\n// Text Fields\nexport interface TextFieldComponent extends FormFieldBase {\n type: ComponentType.TextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends FormFieldBase {\n type: ComponentType.EmailAddressField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends FormFieldBase {\n type: ComponentType.NumberField\n options: FormFieldBase['options'] & {\n prefix?: string\n suffix?: string\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n precision?: number\n minPrecision?: number\n minLength?: number\n maxLength?: number\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface FileUploadFieldComponent extends FormFieldBase {\n type: ComponentType.FileUploadField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n accept?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface YesNoFieldComponent extends FormFieldBase {\n type: ComponentType.YesNoField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface DeclarationFieldComponent extends FormFieldBase {\n type: ComponentType.DeclarationField\n content: string\n options: FormFieldBase['options'] & {\n condition?: string\n declarationConfirmationLabel?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends FormFieldBase {\n type: ComponentType.MultilineTextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface UkAddressFieldComponent extends FormFieldBase {\n type: ComponentType.UkAddressField\n options: FormFieldBase['options'] & {\n hideTitle?: boolean\n usePostcodeLookup?: boolean\n }\n}\n\n// Precise Location Fields\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n easting?: {\n min?: number\n max?: number\n }\n northing?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface OsGridRefFieldComponent extends FormFieldBase {\n type: ComponentType.OsGridRefField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NationalGridFieldNumberFieldComponent extends FormFieldBase {\n type: ComponentType.NationalGridFieldNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface LatLongFieldComponent extends FormFieldBase {\n type: ComponentType.LatLongField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n latitude?: {\n min?: number\n max?: number\n }\n longitude?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface HiddenFieldComponent extends FormFieldBase {\n type: ComponentType.HiddenField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface PaymentFieldComponent extends FormFieldBase {\n type: ComponentType.PaymentField\n options: FormFieldBase['options'] & {\n amount: number\n description: string\n conditionalAmounts?: {\n condition: string\n amount: number\n }[]\n emailField?: string\n }\n}\n\nexport type GeospatialFieldOptionsCountry =\n | 'england'\n | 'wales'\n | 'northern-ireland'\n | 'scotland'\n\nexport interface GeospatialFieldComponent extends FormFieldBase {\n type: ComponentType.GeospatialField\n options: FormFieldBase['options'] & {\n condition?: string\n country?: GeospatialFieldOptionsCountry\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MarkdownComponent extends ContentFieldBase {\n type: ComponentType.Markdown\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n content: string\n}\n\nexport interface ListComponent extends ContentFieldBase {\n type: ComponentType.List\n hint?: string\n list: string\n options: ContentFieldBase['options'] & {\n type?: ListTypeOption\n classes?: string\n hideTitle?: boolean\n bold?: boolean\n }\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n schema?: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n }\n}\n\nexport type ComponentDef = FormComponentsDef | ContentComponentsDef\n\n// Components that render form fields\nexport type FormComponentsDef =\n | InputFieldsComponentsDef\n | SelectionComponentsDef\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | MonthYearFieldComponent\n | DatePartsFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | DeclarationFieldComponent\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\n | HiddenFieldComponent\n | PaymentFieldComponent\n | GeospatialFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | MarkdownComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | Exclude<SelectionComponentsDef, YesNoFieldComponent>\n | ListComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have condition support\nexport type ConditionalComponentsDef = Exclude<\n ComponentDef,\n | InsetTextComponent\n | ListComponent\n | MonthYearFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | PaymentFieldComponent\n>\n\nexport type PreviewType = keyof typeof PreviewTypeEnum\n"],"mappings":"","ignoreList":[]}
@@ -1,7 +1,13 @@
1
1
  export let FormMetricType = /*#__PURE__*/function (FormMetricType) {
2
- FormMetricType["HeadlineMetric"] = "headline-metric";
2
+ FormMetricType["TotalsMetric"] = "totals-metric";
3
3
  FormMetricType["OverviewMetric"] = "overview-metric";
4
4
  FormMetricType["TimelineMetric"] = "timeline-metric";
5
5
  return FormMetricType;
6
6
  }({});
7
+ export let FormMetricName = /*#__PURE__*/function (FormMetricName) {
8
+ FormMetricName["NewFormsCreated"] = "NewFormsCreated";
9
+ FormMetricName["FormsPublished"] = "FormsPublished";
10
+ FormMetricName["Submissions"] = "Submissions";
11
+ return FormMetricName;
12
+ }({});
7
13
  //# sourceMappingURL=enums.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","names":["FormMetricType"],"sources":["../../../../src/form/form-metrics/enums.ts"],"sourcesContent":["export enum FormMetricType {\n HeadlineMetric = 'headline-metric',\n OverviewMetric = 'overview-metric',\n TimelineMetric = 'timeline-metric'\n}\n"],"mappings":"AAAA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"enums.js","names":["FormMetricType","FormMetricName"],"sources":["../../../../src/form/form-metrics/enums.ts"],"sourcesContent":["export enum FormMetricType {\n TotalsMetric = 'totals-metric',\n OverviewMetric = 'overview-metric',\n TimelineMetric = 'timeline-metric'\n}\n\nexport enum FormMetricName {\n NewFormsCreated = 'NewFormsCreated',\n FormsPublished = 'FormsPublished',\n Submissions = 'Submissions'\n}\n"],"mappings":"AAAA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAM1B,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-metrics/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport { type FormMetricType } from '~/src/form/form-metrics/enums.js'\n\nexport interface FormHeadlineDetail {\n count: number\n countSevenDaysAgo: number\n countThirtyDaysAgo: number\n countOneYearAgo: number\n}\n\nexport interface FormHeadlineMetric {\n type: FormMetricType.HeadlineMetric\n headlineCounts: Record<string, FormHeadlineDetail>\n updatedAt: Date\n}\n\nexport interface FormOverviewMetric {\n type: FormMetricType.OverviewMetric\n formId: string\n formStatus: FormStatus\n summaryMetrics: Record<string, number | string | string[]>\n featureCounts: Record<string, number>\n submissionsCount: number\n updatedAt: Date\n}\n\nexport interface FormTimelineMetric {\n type: FormMetricType.TimelineMetric\n formId: string\n formStatus: FormStatus\n metricName: string\n metricValue: number\n createdAt: Date\n}\n\nexport type FormMetric =\n | FormHeadlineMetric\n | FormOverviewMetric\n | FormTimelineMetric\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-metrics/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type FormMetricName,\n type FormMetricType\n} from '~/src/form/form-metrics/enums.js'\n\nexport interface FormTotalMetric {\n count?: number\n}\n\nexport interface FormTotalsMetric {\n type: FormMetricType.TotalsMetric\n last7Days?: Record<FormMetricName, FormTotalMetric>\n prev7Days?: Record<FormMetricName, FormTotalMetric>\n last30Days?: Record<FormMetricName, FormTotalMetric>\n prev30Days?: Record<FormMetricName, FormTotalMetric>\n lastYear?: Record<FormMetricName, FormTotalMetric>\n prevYear?: Record<FormMetricName, FormTotalMetric>\n allTime?: Record<FormMetricName, FormTotalMetric>\n submissions?: Record<string, number>\n updatedAt: Date\n}\n\nexport interface FormOverviewMetric {\n type: FormMetricType.OverviewMetric\n formId: string\n formStatus: FormStatus\n summaryMetrics: Record<string, number | string | string[]>\n featureMetrics: Record<string, Map<string, number>>\n submissionsCount: number\n updatedAt: Date\n}\n\nexport interface FormTimelineMetric {\n type: FormMetricType.TimelineMetric\n formId: string\n formStatus: FormStatus\n metricName: string\n metricValue: number\n createdAt: Date\n}\n\nexport type FormMetric =\n | FormTotalsMetric\n | FormOverviewMetric\n | FormTimelineMetric\n"],"mappings":"","ignoreList":[]}
@@ -19,11 +19,12 @@ export let Scopes = /*#__PURE__*/function (Scopes) {
19
19
  Scopes["ResetSaveAndExit"] = "reset-save-and-exit";
20
20
  Scopes["DeadLetterQueues"] = "dead-letter-queues";
21
21
  Scopes["FormsInspect"] = "forms-inspect";
22
+ Scopes["FormsReport"] = "forms-report";
22
23
  return Scopes;
23
24
  }({});
24
25
  export const RoleScopes = {
25
26
  [Roles.Superadmin]: Object.values(Scopes),
26
- [Roles.Admin]: [Scopes.FormDelete, Scopes.FormEdit, Scopes.FormRead, Scopes.FormPublish, Scopes.UserCreate, Scopes.UserDelete, Scopes.UserEdit, Scopes.FormsFeedback, Scopes.FormsFeedbackAllForms],
27
+ [Roles.Admin]: [Scopes.FormDelete, Scopes.FormEdit, Scopes.FormRead, Scopes.FormPublish, Scopes.UserCreate, Scopes.UserDelete, Scopes.UserEdit, Scopes.FormsFeedback, Scopes.FormsFeedbackAllForms, Scopes.FormsReport],
27
28
  [Roles.FormPublisher]: [Scopes.FormDelete, Scopes.FormEdit, Scopes.FormRead, Scopes.FormPublish, Scopes.FormsFeedback],
28
29
  [Roles.FormCreator]: [Scopes.FormRead, Scopes.FormEdit, Scopes.FormDelete, Scopes.FormsFeedback]
29
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"roles.js","names":["Roles","Scopes","RoleScopes","Superadmin","Object","values","Admin","FormDelete","FormEdit","FormRead","FormPublish","UserCreate","UserDelete","UserEdit","FormsFeedback","FormsFeedbackAllForms","FormPublisher","FormCreator","RoleNames","mapScopesToRoles","roles","scopeSet","Set","forEach","role","scopes","scope","add","Array","from"],"sources":["../../../src/manage/roles.ts"],"sourcesContent":["export enum Roles {\n Superadmin = 'superadmin',\n Admin = 'admin',\n FormPublisher = 'form-publisher',\n FormCreator = 'form-creator'\n}\n\nexport enum Scopes {\n FormDelete = 'form-delete',\n FormEdit = 'form-edit',\n FormRead = 'form-read',\n FormPublish = 'form-publish',\n UserCreate = 'user-create',\n UserDelete = 'user-delete',\n UserEdit = 'user-edit',\n FormsFeedback = 'forms-feedback',\n FormsFeedbackAllForms = 'forms-feedback-all-forms',\n FormsBackup = 'forms-backup',\n ResetSaveAndExit = 'reset-save-and-exit',\n DeadLetterQueues = 'dead-letter-queues',\n FormsInspect = 'forms-inspect'\n}\n\nexport const RoleScopes = {\n [Roles.Superadmin]: Object.values(Scopes),\n [Roles.Admin]: [\n Scopes.FormDelete,\n Scopes.FormEdit,\n Scopes.FormRead,\n Scopes.FormPublish,\n Scopes.UserCreate,\n Scopes.UserDelete,\n Scopes.UserEdit,\n Scopes.FormsFeedback,\n Scopes.FormsFeedbackAllForms\n ],\n [Roles.FormPublisher]: [\n Scopes.FormDelete,\n Scopes.FormEdit,\n Scopes.FormRead,\n Scopes.FormPublish,\n Scopes.FormsFeedback\n ],\n [Roles.FormCreator]: [\n Scopes.FormRead,\n Scopes.FormEdit,\n Scopes.FormDelete,\n Scopes.FormsFeedback\n ]\n}\n\nexport const RoleNames = {\n [Roles.Superadmin]: 'Superadmin',\n [Roles.Admin]: 'Admin',\n [Roles.FormPublisher]: 'Form publisher',\n [Roles.FormCreator]: 'Form creator'\n}\n\n/**\n * Return a unique list of scopes based on the array of roles passed in\n */\nexport function mapScopesToRoles(roles: Roles[]) {\n const scopeSet = new Set<Scopes>()\n roles.forEach((role) => {\n const scopes = RoleScopes[role]\n scopes.forEach((scope) => {\n scopeSet.add(scope)\n })\n })\n return Array.from(scopeSet)\n}\n"],"mappings":"AAAA,WAAYA,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAOjB,WAAYC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAgBlB,OAAO,MAAMC,UAAU,GAAG;EACxB,CAACF,KAAK,CAACG,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACJ,MAAM,CAAC;EACzC,CAACD,KAAK,CAACM,KAAK,GAAG,CACbL,MAAM,CAACM,UAAU,EACjBN,MAAM,CAACO,QAAQ,EACfP,MAAM,CAACQ,QAAQ,EACfR,MAAM,CAACS,WAAW,EAClBT,MAAM,CAACU,UAAU,EACjBV,MAAM,CAACW,UAAU,EACjBX,MAAM,CAACY,QAAQ,EACfZ,MAAM,CAACa,aAAa,EACpBb,MAAM,CAACc,qBAAqB,CAC7B;EACD,CAACf,KAAK,CAACgB,aAAa,GAAG,CACrBf,MAAM,CAACM,UAAU,EACjBN,MAAM,CAACO,QAAQ,EACfP,MAAM,CAACQ,QAAQ,EACfR,MAAM,CAACS,WAAW,EAClBT,MAAM,CAACa,aAAa,CACrB;EACD,CAACd,KAAK,CAACiB,WAAW,GAAG,CACnBhB,MAAM,CAACQ,QAAQ,EACfR,MAAM,CAACO,QAAQ,EACfP,MAAM,CAACM,UAAU,EACjBN,MAAM,CAACa,aAAa;AAExB,CAAC;AAED,OAAO,MAAMI,SAAS,GAAG;EACvB,CAAClB,KAAK,CAACG,UAAU,GAAG,YAAY;EAChC,CAACH,KAAK,CAACM,KAAK,GAAG,OAAO;EACtB,CAACN,KAAK,CAACgB,aAAa,GAAG,gBAAgB;EACvC,CAAChB,KAAK,CAACiB,WAAW,GAAG;AACvB,CAAC;;AAED;AACA;AACA;AACA,OAAO,SAASE,gBAAgBA,CAACC,KAAc,EAAE;EAC/C,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAAS,CAAC;EAClCF,KAAK,CAACG,OAAO,CAAEC,IAAI,IAAK;IACtB,MAAMC,MAAM,GAAGvB,UAAU,CAACsB,IAAI,CAAC;IAC/BC,MAAM,CAACF,OAAO,CAAEG,KAAK,IAAK;MACxBL,QAAQ,CAACM,GAAG,CAACD,KAAK,CAAC;IACrB,CAAC,CAAC;EACJ,CAAC,CAAC;EACF,OAAOE,KAAK,CAACC,IAAI,CAACR,QAAQ,CAAC;AAC7B","ignoreList":[]}
1
+ {"version":3,"file":"roles.js","names":["Roles","Scopes","RoleScopes","Superadmin","Object","values","Admin","FormDelete","FormEdit","FormRead","FormPublish","UserCreate","UserDelete","UserEdit","FormsFeedback","FormsFeedbackAllForms","FormsReport","FormPublisher","FormCreator","RoleNames","mapScopesToRoles","roles","scopeSet","Set","forEach","role","scopes","scope","add","Array","from"],"sources":["../../../src/manage/roles.ts"],"sourcesContent":["export enum Roles {\n Superadmin = 'superadmin',\n Admin = 'admin',\n FormPublisher = 'form-publisher',\n FormCreator = 'form-creator'\n}\n\nexport enum Scopes {\n FormDelete = 'form-delete',\n FormEdit = 'form-edit',\n FormRead = 'form-read',\n FormPublish = 'form-publish',\n UserCreate = 'user-create',\n UserDelete = 'user-delete',\n UserEdit = 'user-edit',\n FormsFeedback = 'forms-feedback',\n FormsFeedbackAllForms = 'forms-feedback-all-forms',\n FormsBackup = 'forms-backup',\n ResetSaveAndExit = 'reset-save-and-exit',\n DeadLetterQueues = 'dead-letter-queues',\n FormsInspect = 'forms-inspect',\n FormsReport = 'forms-report'\n}\n\nexport const RoleScopes = {\n [Roles.Superadmin]: Object.values(Scopes),\n [Roles.Admin]: [\n Scopes.FormDelete,\n Scopes.FormEdit,\n Scopes.FormRead,\n Scopes.FormPublish,\n Scopes.UserCreate,\n Scopes.UserDelete,\n Scopes.UserEdit,\n Scopes.FormsFeedback,\n Scopes.FormsFeedbackAllForms,\n Scopes.FormsReport\n ],\n [Roles.FormPublisher]: [\n Scopes.FormDelete,\n Scopes.FormEdit,\n Scopes.FormRead,\n Scopes.FormPublish,\n Scopes.FormsFeedback\n ],\n [Roles.FormCreator]: [\n Scopes.FormRead,\n Scopes.FormEdit,\n Scopes.FormDelete,\n Scopes.FormsFeedback\n ]\n}\n\nexport const RoleNames = {\n [Roles.Superadmin]: 'Superadmin',\n [Roles.Admin]: 'Admin',\n [Roles.FormPublisher]: 'Form publisher',\n [Roles.FormCreator]: 'Form creator'\n}\n\n/**\n * Return a unique list of scopes based on the array of roles passed in\n */\nexport function mapScopesToRoles(roles: Roles[]) {\n const scopeSet = new Set<Scopes>()\n roles.forEach((role) => {\n const scopes = RoleScopes[role]\n scopes.forEach((scope) => {\n scopeSet.add(scope)\n })\n })\n return Array.from(scopeSet)\n}\n"],"mappings":"AAAA,WAAYA,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAOjB,WAAYC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAiBlB,OAAO,MAAMC,UAAU,GAAG;EACxB,CAACF,KAAK,CAACG,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACJ,MAAM,CAAC;EACzC,CAACD,KAAK,CAACM,KAAK,GAAG,CACbL,MAAM,CAACM,UAAU,EACjBN,MAAM,CAACO,QAAQ,EACfP,MAAM,CAACQ,QAAQ,EACfR,MAAM,CAACS,WAAW,EAClBT,MAAM,CAACU,UAAU,EACjBV,MAAM,CAACW,UAAU,EACjBX,MAAM,CAACY,QAAQ,EACfZ,MAAM,CAACa,aAAa,EACpBb,MAAM,CAACc,qBAAqB,EAC5Bd,MAAM,CAACe,WAAW,CACnB;EACD,CAAChB,KAAK,CAACiB,aAAa,GAAG,CACrBhB,MAAM,CAACM,UAAU,EACjBN,MAAM,CAACO,QAAQ,EACfP,MAAM,CAACQ,QAAQ,EACfR,MAAM,CAACS,WAAW,EAClBT,MAAM,CAACa,aAAa,CACrB;EACD,CAACd,KAAK,CAACkB,WAAW,GAAG,CACnBjB,MAAM,CAACQ,QAAQ,EACfR,MAAM,CAACO,QAAQ,EACfP,MAAM,CAACM,UAAU,EACjBN,MAAM,CAACa,aAAa;AAExB,CAAC;AAED,OAAO,MAAMK,SAAS,GAAG;EACvB,CAACnB,KAAK,CAACG,UAAU,GAAG,YAAY;EAChC,CAACH,KAAK,CAACM,KAAK,GAAG,OAAO;EACtB,CAACN,KAAK,CAACiB,aAAa,GAAG,gBAAgB;EACvC,CAACjB,KAAK,CAACkB,WAAW,GAAG;AACvB,CAAC;;AAED;AACA;AACA;AACA,OAAO,SAASE,gBAAgBA,CAACC,KAAc,EAAE;EAC/C,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAAS,CAAC;EAClCF,KAAK,CAACG,OAAO,CAAEC,IAAI,IAAK;IACtB,MAAMC,MAAM,GAAGxB,UAAU,CAACuB,IAAI,CAAC;IAC/BC,MAAM,CAACF,OAAO,CAAEG,KAAK,IAAK;MACxBL,QAAQ,CAACM,GAAG,CAACD,KAAK,CAAC;IACrB,CAAC,CAAC;EACJ,CAAC,CAAC;EACF,OAAOE,KAAK,CAACC,IAAI,CAACR,QAAQ,CAAC;AAC7B","ignoreList":[]}
@@ -27,5 +27,11 @@ export declare enum ComponentType {
27
27
  PaymentField = "PaymentField",
28
28
  GeospatialField = "GeospatialField"
29
29
  }
30
+ export declare enum GeospatialFieldOptionsCountryEnum {
31
+ England = "england",
32
+ NorthernIreland = "northern-ireland",
33
+ Scotland = "scotland",
34
+ Wales = "wales"
35
+ }
30
36
  export declare const PreviewTypeEnum: Record<string, string>;
31
37
  //# sourceMappingURL=enums.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,eAAe,EAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAED,oBAAY,iCAAiC;IAC3C,OAAO,YAAY;IACnB,eAAe,qBAAqB;IACpC,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,eAAe,EAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  export { ComponentTypes } from '../components/component-types.js';
2
- export { ComponentType, PreviewTypeEnum } from '../components/enums.js';
2
+ export { ComponentType, GeospatialFieldOptionsCountryEnum, PreviewTypeEnum } from '../components/enums.js';
3
3
  export { allDocumentTypes, allImageTypes, allTabularDataTypes } from '../components/file-types.js';
4
4
  export { getComponentDefaults, hasConditionSupport, hasContent, hasContentField, hasFormField, hasHint, hasInputField, hasListField, hasSelectionFields, hasTitle, isConditionalRevealType, isConditionalType, isContentType, isFormType, isListType } from '../components/helpers.js';
5
5
  export { getYesNoList, yesNoListId, yesNoListName, yesNoListNoItemId, yesNoListYesItemId } from '../components/yes-no-helper.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,mCAAmC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,mCAAmC,CAAA"}
@@ -222,10 +222,12 @@ export interface PaymentFieldComponent extends FormFieldBase {
222
222
  emailField?: string;
223
223
  };
224
224
  }
225
+ export type GeospatialFieldOptionsCountry = 'england' | 'wales' | 'northern-ireland' | 'scotland';
225
226
  export interface GeospatialFieldComponent extends FormFieldBase {
226
227
  type: ComponentType.GeospatialField;
227
228
  options: FormFieldBase['options'] & {
228
229
  condition?: string;
230
+ country?: GeospatialFieldOptionsCountry;
229
231
  };
230
232
  }
231
233
  export interface DetailsComponent extends ContentFieldBase {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAA;AAE5C,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,wBAAwB,CAAC,MAAM,CAAC,EAChC,oBAAoB,CACrB,CAAA;AAED;;GAEG;AAEH,UAAU,aAAa;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,wBAAwB,CAAC,EAAE,gBAAgB,CAAA;QAC3C,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB,CAAA;CACF;AAED,UAAU,aAAc,SAAQ,aAAa;IAC3C,IAAI,EACA,aAAa,CAAC,iBAAiB,GAC/B,aAAa,CAAC,eAAe,GAC7B,aAAa,CAAC,WAAW,GACzB,aAAa,CAAC,WAAW,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG;QAClC,IAAI,CAAC,EAAE,eAAe,CAAA;KACvB,CAAA;CACF;AAED,UAAU,gBAAgB;IACxB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAA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aAAa,CAAC,WAAW,CAAA;IAC/B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG;QAClC,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,oBAAoB,CAAA;AAGnE,MAAM,MAAM,iBAAiB,GACzB,wBAAwB,GACxB,sBAAsB,CAAA;AAG1B,MAAM,MAAM,wBAAwB,GAChC,kBAAkB,GAClB,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,6BAA6B,GAC7B,uBAAuB,GACvB,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,yBAAyB,GACzB,6BAA6B,GAC7B,uBAAuB,GACvB,qCAAqC,GACrC,qBAAqB,GACrB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,CAAA;AAG5B,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,aAAa,CAAA;AAGjB,MAAM,MAAM,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,GACpD,aAAa,CAAA;AAGjB,MAAM,MAAM,sBAAsB,GAC9B,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,CAAA;AAGvB,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,YAAY,EACV,kBAAkB,GAClB,aAAa,GACb,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,eAAe,CAAA"}
@@ -1,6 +1,11 @@
1
1
  export declare enum FormMetricType {
2
- HeadlineMetric = "headline-metric",
2
+ TotalsMetric = "totals-metric",
3
3
  OverviewMetric = "overview-metric",
4
4
  TimelineMetric = "timeline-metric"
5
5
  }
6
+ export declare enum FormMetricName {
7
+ NewFormsCreated = "NewFormsCreated",
8
+ FormsPublished = "FormsPublished",
9
+ Submissions = "Submissions"
10
+ }
6
11
  //# sourceMappingURL=enums.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;CACnC"}
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;CACnC;AAED,oBAAY,cAAc;IACxB,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;CAC5B"}
@@ -1,14 +1,18 @@
1
1
  import { type FormStatus } from '../../common/enums.js';
2
- import { type FormMetricType } from '../../form/form-metrics/enums.js';
3
- export interface FormHeadlineDetail {
4
- count: number;
5
- countSevenDaysAgo: number;
6
- countThirtyDaysAgo: number;
7
- countOneYearAgo: number;
2
+ import { type FormMetricName, type FormMetricType } from '../../form/form-metrics/enums.js';
3
+ export interface FormTotalMetric {
4
+ count?: number;
8
5
  }
9
- export interface FormHeadlineMetric {
10
- type: FormMetricType.HeadlineMetric;
11
- headlineCounts: Record<string, FormHeadlineDetail>;
6
+ export interface FormTotalsMetric {
7
+ type: FormMetricType.TotalsMetric;
8
+ last7Days?: Record<FormMetricName, FormTotalMetric>;
9
+ prev7Days?: Record<FormMetricName, FormTotalMetric>;
10
+ last30Days?: Record<FormMetricName, FormTotalMetric>;
11
+ prev30Days?: Record<FormMetricName, FormTotalMetric>;
12
+ lastYear?: Record<FormMetricName, FormTotalMetric>;
13
+ prevYear?: Record<FormMetricName, FormTotalMetric>;
14
+ allTime?: Record<FormMetricName, FormTotalMetric>;
15
+ submissions?: Record<string, number>;
12
16
  updatedAt: Date;
13
17
  }
14
18
  export interface FormOverviewMetric {
@@ -16,7 +20,7 @@ export interface FormOverviewMetric {
16
20
  formId: string;
17
21
  formStatus: FormStatus;
18
22
  summaryMetrics: Record<string, number | string | string[]>;
19
- featureCounts: Record<string, number>;
23
+ featureMetrics: Record<string, Map<string, number>>;
20
24
  submissionsCount: number;
21
25
  updatedAt: Date;
22
26
  }
@@ -28,5 +32,5 @@ export interface FormTimelineMetric {
28
32
  metricValue: number;
29
33
  createdAt: Date;
30
34
  }
31
- export type FormMetric = FormHeadlineMetric | FormOverviewMetric | FormTimelineMetric;
35
+ export type FormMetric = FormTotalsMetric | FormOverviewMetric | FormTimelineMetric;
32
36
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAEtE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC,cAAc,CAAA;IACnC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;IAClD,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC,cAAc,CAAA;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAA;IAC1D,aAAa,EA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,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC,cAAc,CAAA;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAA;IAC1D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACnD,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC,cAAc,CAAA;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,CAAA"}
@@ -17,7 +17,8 @@ export declare enum Scopes {
17
17
  FormsBackup = "forms-backup",
18
18
  ResetSaveAndExit = "reset-save-and-exit",
19
19
  DeadLetterQueues = "dead-letter-queues",
20
- FormsInspect = "forms-inspect"
20
+ FormsInspect = "forms-inspect",
21
+ FormsReport = "forms-report"
21
22
  }
22
23
  export declare const RoleScopes: {
23
24
  superadmin: Scopes[];
@@ -1 +1 @@
1
- {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../../src/manage/roles.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;CAC7B;AAED,oBAAY,MAAM;IAChB,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,QAAQ,cAAc;IACtB,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,aAAa,mBAAmB;IAChC,qBAAqB,6BAA6B;IAClD,WAAW,iBAAiB;IAC5B,gBAAgB,wBAAwB;IACxC,gBAAgB,uBAAuB;IACvC,YAAY,kBAAkB;CAC/B;AAED,eAAO,MAAM,UAAU;;;;;CA0BtB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;CAKrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,YAS9C"}
1
+ {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../../src/manage/roles.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;CAC7B;AAED,oBAAY,MAAM;IAChB,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,QAAQ,cAAc;IACtB,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,aAAa,mBAAmB;IAChC,qBAAqB,6BAA6B;IAClD,WAAW,iBAAiB;IAC5B,gBAAgB,wBAAwB;IACxC,gBAAgB,uBAAuB;IACvC,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;CAC7B;AAED,eAAO,MAAM,UAAU;;;;;CA2BtB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;CAKrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,YAS9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/forms-model",
3
- "version": "3.0.649",
3
+ "version": "3.0.651",
4
4
  "description": "A hapi plugin providing the model for Defra forms",
5
5
  "homepage": "https://github.com/DEFRA/forms-designer/tree/main/model#readme",
6
6
  "types": "dist/types/index.d.ts",
@@ -28,6 +28,13 @@ export enum ComponentType {
28
28
  GeospatialField = 'GeospatialField'
29
29
  }
30
30
 
31
+ export enum GeospatialFieldOptionsCountryEnum {
32
+ England = 'england',
33
+ NorthernIreland = 'northern-ireland',
34
+ Scotland = 'scotland',
35
+ Wales = 'wales'
36
+ }
37
+
31
38
  export const PreviewTypeEnum = {
32
39
  ...ComponentType,
33
40
  Question: 'Question',
@@ -1,5 +1,9 @@
1
1
  export { ComponentTypes } from '~/src/components/component-types.js'
2
- export { ComponentType, PreviewTypeEnum } from '~/src/components/enums.js'
2
+ export {
3
+ ComponentType,
4
+ GeospatialFieldOptionsCountryEnum,
5
+ PreviewTypeEnum
6
+ } from '~/src/components/enums.js'
3
7
  export {
4
8
  allDocumentTypes,
5
9
  allImageTypes,
@@ -268,10 +268,17 @@ export interface PaymentFieldComponent extends FormFieldBase {
268
268
  }
269
269
  }
270
270
 
271
+ export type GeospatialFieldOptionsCountry =
272
+ | 'england'
273
+ | 'wales'
274
+ | 'northern-ireland'
275
+ | 'scotland'
276
+
271
277
  export interface GeospatialFieldComponent extends FormFieldBase {
272
278
  type: ComponentType.GeospatialField
273
279
  options: FormFieldBase['options'] & {
274
280
  condition?: string
281
+ country?: GeospatialFieldOptionsCountry
275
282
  }
276
283
  }
277
284
 
@@ -1,5 +1,11 @@
1
1
  export enum FormMetricType {
2
- HeadlineMetric = 'headline-metric',
2
+ TotalsMetric = 'totals-metric',
3
3
  OverviewMetric = 'overview-metric',
4
4
  TimelineMetric = 'timeline-metric'
5
5
  }
6
+
7
+ export enum FormMetricName {
8
+ NewFormsCreated = 'NewFormsCreated',
9
+ FormsPublished = 'FormsPublished',
10
+ Submissions = 'Submissions'
11
+ }
@@ -1,16 +1,23 @@
1
1
  import { type FormStatus } from '~/src/common/enums.js'
2
- import { type FormMetricType } from '~/src/form/form-metrics/enums.js'
2
+ import {
3
+ type FormMetricName,
4
+ type FormMetricType
5
+ } from '~/src/form/form-metrics/enums.js'
3
6
 
4
- export interface FormHeadlineDetail {
5
- count: number
6
- countSevenDaysAgo: number
7
- countThirtyDaysAgo: number
8
- countOneYearAgo: number
7
+ export interface FormTotalMetric {
8
+ count?: number
9
9
  }
10
10
 
11
- export interface FormHeadlineMetric {
12
- type: FormMetricType.HeadlineMetric
13
- headlineCounts: Record<string, FormHeadlineDetail>
11
+ export interface FormTotalsMetric {
12
+ type: FormMetricType.TotalsMetric
13
+ last7Days?: Record<FormMetricName, FormTotalMetric>
14
+ prev7Days?: Record<FormMetricName, FormTotalMetric>
15
+ last30Days?: Record<FormMetricName, FormTotalMetric>
16
+ prev30Days?: Record<FormMetricName, FormTotalMetric>
17
+ lastYear?: Record<FormMetricName, FormTotalMetric>
18
+ prevYear?: Record<FormMetricName, FormTotalMetric>
19
+ allTime?: Record<FormMetricName, FormTotalMetric>
20
+ submissions?: Record<string, number>
14
21
  updatedAt: Date
15
22
  }
16
23
 
@@ -19,7 +26,7 @@ export interface FormOverviewMetric {
19
26
  formId: string
20
27
  formStatus: FormStatus
21
28
  summaryMetrics: Record<string, number | string | string[]>
22
- featureCounts: Record<string, number>
29
+ featureMetrics: Record<string, Map<string, number>>
23
30
  submissionsCount: number
24
31
  updatedAt: Date
25
32
  }
@@ -34,6 +41,6 @@ export interface FormTimelineMetric {
34
41
  }
35
42
 
36
43
  export type FormMetric =
37
- | FormHeadlineMetric
44
+ | FormTotalsMetric
38
45
  | FormOverviewMetric
39
46
  | FormTimelineMetric
@@ -18,7 +18,8 @@ export enum Scopes {
18
18
  FormsBackup = 'forms-backup',
19
19
  ResetSaveAndExit = 'reset-save-and-exit',
20
20
  DeadLetterQueues = 'dead-letter-queues',
21
- FormsInspect = 'forms-inspect'
21
+ FormsInspect = 'forms-inspect',
22
+ FormsReport = 'forms-report'
22
23
  }
23
24
 
24
25
  export const RoleScopes = {
@@ -32,7 +33,8 @@ export const RoleScopes = {
32
33
  Scopes.UserDelete,
33
34
  Scopes.UserEdit,
34
35
  Scopes.FormsFeedback,
35
- Scopes.FormsFeedbackAllForms
36
+ Scopes.FormsFeedbackAllForms,
37
+ Scopes.FormsReport
36
38
  ],
37
39
  [Roles.FormPublisher]: [
38
40
  Scopes.FormDelete,