@defra/forms-model 3.0.12 → 3.0.13
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/components/types.js.map +1 -1
- package/dist/module/conditions/condition-group.js.map +1 -1
- package/dist/module/conditions/condition-model.js +2 -2
- package/dist/module/conditions/condition-model.js.map +1 -1
- package/dist/module/conditions/condition-operators.js.map +1 -1
- package/dist/module/conditions/condition-ref.js.map +1 -1
- package/dist/module/conditions/condition.js +1 -1
- package/dist/module/conditions/condition.js.map +1 -1
- package/dist/module/conditions/types.js.map +1 -1
- package/dist/module/data-model/types.js.map +1 -1
- package/dist/module/migration/migration.1-2.js +2 -2
- package/dist/module/migration/migration.1-2.js.map +1 -1
- package/dist/module/migration/whichMigrations.js +0 -1
- package/dist/module/migration/whichMigrations.js.map +1 -1
- package/dist/module/schema/schema.js +1 -1
- package/dist/module/schema/schema.js.map +1 -1
- package/dist/module/utils/helpers.js.map +1 -1
- package/dist/types/components/types.d.ts +4 -4
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/conditions/condition-group-def.d.ts +1 -1
- package/dist/types/conditions/condition-group.d.ts +1 -1
- package/dist/types/conditions/condition-group.d.ts.map +1 -1
- package/dist/types/conditions/condition-model.d.ts +3 -3
- package/dist/types/conditions/condition-model.d.ts.map +1 -1
- package/dist/types/conditions/condition-operators.d.ts +1 -1
- package/dist/types/conditions/condition-operators.d.ts.map +1 -1
- package/dist/types/conditions/condition-ref.d.ts +1 -1
- package/dist/types/conditions/condition-ref.d.ts.map +1 -1
- package/dist/types/conditions/condition.d.ts +3 -3
- package/dist/types/conditions/condition.d.ts.map +1 -1
- package/dist/types/conditions/types.d.ts +6 -6
- package/dist/types/conditions/types.d.ts.map +1 -1
- package/dist/types/data-model/types.d.ts +28 -30
- package/dist/types/data-model/types.d.ts.map +1 -1
- package/dist/types/migration/migration.1-2.d.ts.map +1 -1
- package/dist/types/migration/whichMigrations.d.ts +0 -1
- package/dist/types/migration/whichMigrations.d.ts.map +1 -1
- package/dist/types/schema/schema.d.ts +1 -1
- package/dist/types/schema/schema.d.ts.map +1 -1
- package/dist/types/utils/helpers.d.ts +1 -3
- package/dist/types/utils/helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/types.ts +2 -2
- package/src/conditions/condition-group.ts +1 -1
- package/src/conditions/condition-model.ts +21 -22
- package/src/conditions/condition-operators.ts +1 -1
- package/src/conditions/condition-ref.ts +1 -1
- package/src/conditions/condition.ts +5 -5
- package/src/conditions/types.ts +4 -4
- package/src/data-model/types.ts +15 -17
- package/src/migration/migration.1-2.ts +6 -6
- package/src/migration/whichMigrations.ts +0 -1
- package/src/schema/schema.ts +1 -1
- package/src/utils/helpers.ts +1 -1
@@ -1,12 +1,12 @@
|
|
1
|
-
import { nanoid } from '~/src/utils/helpers.js'
|
2
1
|
import { type MigrationScript } from '~/src/migration/types.js'
|
2
|
+
import { nanoid } from '~/src/utils/helpers.js'
|
3
3
|
|
4
4
|
/**
|
5
|
-
* @private
|
6
5
|
* StaticItem is a deprecated Type.
|
7
6
|
* It should only be used for aiding migration scripts.
|
7
|
+
* @private
|
8
8
|
*/
|
9
|
-
|
9
|
+
interface StaticItem {
|
10
10
|
label: string
|
11
11
|
value: string | number | boolean
|
12
12
|
hint?: string
|
@@ -14,18 +14,18 @@ type StaticItem = {
|
|
14
14
|
}
|
15
15
|
|
16
16
|
/**
|
17
|
-
* @private
|
18
17
|
* StaticComponentValues is a deprecated Type.
|
19
18
|
* It should only be used for aiding migration scripts.
|
19
|
+
* @private
|
20
20
|
*/
|
21
|
-
|
21
|
+
interface StaticComponentValues {
|
22
22
|
list: any
|
23
23
|
type: 'static' | 'listRef'
|
24
24
|
valueType: string | number
|
25
25
|
items: StaticItem[]
|
26
26
|
}
|
27
27
|
|
28
|
-
|
28
|
+
interface Item {
|
29
29
|
title: string
|
30
30
|
value: any
|
31
31
|
conditions?: any
|
@@ -4,7 +4,6 @@ import { type MigrationScript } from '~/src/migration/types.js'
|
|
4
4
|
|
5
5
|
/**
|
6
6
|
* Returns which migrations that should be run against your Object with the given version
|
7
|
-
* @param version
|
8
7
|
*/
|
9
8
|
export function whichMigrations(version: number) {
|
10
9
|
const migrations = new Set<MigrationScript>()
|
package/src/schema/schema.ts
CHANGED
@@ -297,4 +297,4 @@ export const Schema = joi
|
|
297
297
|
* 2 - 2023-05-04 `feeOptions` has been introduced. paymentReferenceFormat and payApiKey can be configured in top level or feeOptions. feeOptions will take precedent.
|
298
298
|
* if feeOptions are empty, it will pull values from the top level keys.
|
299
299
|
* WARN: Fee/GOV.UK pay configurations (apart from fees) should no longer be stored in the top level, always within feeOptions.
|
300
|
-
|
300
|
+
*/
|
package/src/utils/helpers.ts
CHANGED
@@ -19,7 +19,7 @@ export const clone = <T>(obj: T & { clone?: () => T }): T => {
|
|
19
19
|
return obj
|
20
20
|
}
|
21
21
|
|
22
|
-
export function filter<T extends
|
22
|
+
export function filter<T extends Record<string, unknown>>(
|
23
23
|
obj: T,
|
24
24
|
predicate: (value: any) => boolean
|
25
25
|
): Partial<T> {
|