@defra/forms-model 3.0.415 → 3.0.416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/common/enums.js +6 -0
- package/dist/module/common/enums.js.map +1 -0
- package/dist/module/common/types.js.map +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/types/common/enums.d.ts +5 -0
- package/dist/types/common/enums.d.ts.map +1 -0
- package/dist/types/common/types.d.ts +1 -4
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/enums.ts +4 -0
- package/src/common/types.ts +1 -5
- package/src/index.ts +1 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.js","names":["FormStatus"],"sources":["../../../src/common/enums.ts"],"sourcesContent":["export enum FormStatus {\n Draft = 'draft',\n Live = 'live'\n}\n"],"mappings":"AAAA,WAAYA,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/common/types.ts"],"sourcesContent":["import {\n type PaginationOptions,\n type PaginationResult\n} from '~/src/common/pagination/types.js'\nimport { type SearchOptions } from '~/src/common/search/types.js'\nimport { type SortingOptions } from '~/src/common/sorting/types.js'\n\n/**\n * Options for querying results, including pagination, sorting, and searching\n */\nexport type QueryOptions = PaginationOptions & SortingOptions & SearchOptions\n\n/**\n * Available
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/common/types.ts"],"sourcesContent":["import {\n type PaginationOptions,\n type PaginationResult\n} from '~/src/common/pagination/types.js'\nimport { type SearchOptions } from '~/src/common/search/types.js'\nimport { type SortingOptions } from '~/src/common/sorting/types.js'\nimport { type FormStatus } from '~/src/index.js'\n\n/**\n * Options for querying results, including pagination, sorting, and searching\n */\nexport type QueryOptions = PaginationOptions & SortingOptions & SearchOptions\n\n/**\n * Available filter options for the current result set\n */\nexport interface FilterOptions {\n /**\n * List of unique authors in the response\n */\n authors: string[]\n\n /**\n * List of organizations that have forms\n */\n organisations: string[]\n\n /**\n * Status values present in the results\n */\n status?: FormStatus[]\n}\n\n/**\n * Metadata containing the optional pagination, sorting, and searching information\n */\nexport interface Meta {\n /**\n * The pagination details\n */\n pagination?: PaginationResult\n\n /**\n * The sorting details\n */\n sorting?: SortingOptions\n\n /**\n * The search details\n */\n search?: SearchOptions\n\n /**\n * Available filter options\n */\n filters?: FilterOptions\n}\n\n/**\n * Standard response wrapper for query results with metadata\n */\nexport interface QueryResult<Model> {\n /**\n * The array of data items\n */\n data: Model[]\n\n /**\n * The metadata about the result\n */\n meta: Meta\n}\n\n/**\n * Type for the list items within a Radio or Checkbox nunjucks definition\n */\nexport interface CheckboxOrRadioItem {\n /**\n * The text to be displayed\n */\n text?: string\n\n /**\n * If text is set, this is not required. HTML to use within each radio item label\n */\n html?: string\n\n /**\n * Specific ID attribute for the checkbox/radio item\n */\n id?: string\n\n /**\n * Name for the checkbox/radio item\n */\n name?: string\n\n /**\n * Required. Value for the radio input\n */\n value: string\n\n /**\n * Subset of options for the label\n */\n label?: string\n\n /**\n * Can be used to add a hint to each item\n */\n hint?: string\n\n /**\n * Divider text to separate checkbox/radio items, for example the text \"or\"\n */\n divider?: string\n\n /**\n * Whether the checkbox/radio should be checked when the page loads\n */\n checked?: boolean\n\n /**\n * Provide additional content to reveal when the checkbox/radio is checked\n */\n conditional?: {\n html?: string\n }\n\n /**\n * The behaviour - if set to \"exclusive\" implements a 'None of thse' type behaviour via Javascript when checkboxes are clicked\n */\n behaviour?: string\n\n /**\n * If true, checkbox/radio option will be disabled\n */\n disabled?: boolean\n\n /**\n * HTML attributes (for example data attributes) to add to the checkbox input tag\n */\n attributes?: object\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
package/dist/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-manager/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-manager/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/common/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,IAAI,SAAS;CACd"}
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import { type PaginationOptions, type PaginationResult } from '../common/pagination/types.js';
|
2
2
|
import { type SearchOptions } from '../common/search/types.js';
|
3
3
|
import { type SortingOptions } from '../common/sorting/types.js';
|
4
|
+
import { type FormStatus } from '../index.js';
|
4
5
|
/**
|
5
6
|
* Options for querying results, including pagination, sorting, and searching
|
6
7
|
*/
|
7
8
|
export type QueryOptions = PaginationOptions & SortingOptions & SearchOptions;
|
8
|
-
/**
|
9
|
-
* Available form status values
|
10
|
-
*/
|
11
|
-
export type FormStatus = 'draft' | 'live';
|
12
9
|
/**
|
13
10
|
* Available filter options for the current result set
|
14
11
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB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AmB,8BAA8B,CAAA;AACjD,mBAAmB,+BAA+B,CAAA;AAClD,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA;AACtD,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,iCAAiC,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AAEvC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,8BAA8B,CAAA;AACjD,mBAAmB,+BAA+B,CAAA;AAClD,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA;AACtD,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,iCAAiC,CAAA"}
|
package/package.json
CHANGED
package/src/common/types.ts
CHANGED
@@ -4,17 +4,13 @@ import {
|
|
4
4
|
} from '~/src/common/pagination/types.js'
|
5
5
|
import { type SearchOptions } from '~/src/common/search/types.js'
|
6
6
|
import { type SortingOptions } from '~/src/common/sorting/types.js'
|
7
|
+
import { type FormStatus } from '~/src/index.js'
|
7
8
|
|
8
9
|
/**
|
9
10
|
* Options for querying results, including pagination, sorting, and searching
|
10
11
|
*/
|
11
12
|
export type QueryOptions = PaginationOptions & SortingOptions & SearchOptions
|
12
13
|
|
13
|
-
/**
|
14
|
-
* Available form status values
|
15
|
-
*/
|
16
|
-
export type FormStatus = 'draft' | 'live'
|
17
|
-
|
18
14
|
/**
|
19
15
|
* Available filter options for the current result set
|
20
16
|
*/
|
package/src/index.ts
CHANGED