@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.
Files changed (54) hide show
  1. package/dist/module/components/types.js.map +1 -1
  2. package/dist/module/conditions/condition-group.js.map +1 -1
  3. package/dist/module/conditions/condition-model.js +2 -2
  4. package/dist/module/conditions/condition-model.js.map +1 -1
  5. package/dist/module/conditions/condition-operators.js.map +1 -1
  6. package/dist/module/conditions/condition-ref.js.map +1 -1
  7. package/dist/module/conditions/condition.js +1 -1
  8. package/dist/module/conditions/condition.js.map +1 -1
  9. package/dist/module/conditions/types.js.map +1 -1
  10. package/dist/module/data-model/types.js.map +1 -1
  11. package/dist/module/migration/migration.1-2.js +2 -2
  12. package/dist/module/migration/migration.1-2.js.map +1 -1
  13. package/dist/module/migration/whichMigrations.js +0 -1
  14. package/dist/module/migration/whichMigrations.js.map +1 -1
  15. package/dist/module/schema/schema.js +1 -1
  16. package/dist/module/schema/schema.js.map +1 -1
  17. package/dist/module/utils/helpers.js.map +1 -1
  18. package/dist/types/components/types.d.ts +4 -4
  19. package/dist/types/components/types.d.ts.map +1 -1
  20. package/dist/types/conditions/condition-group-def.d.ts +1 -1
  21. package/dist/types/conditions/condition-group.d.ts +1 -1
  22. package/dist/types/conditions/condition-group.d.ts.map +1 -1
  23. package/dist/types/conditions/condition-model.d.ts +3 -3
  24. package/dist/types/conditions/condition-model.d.ts.map +1 -1
  25. package/dist/types/conditions/condition-operators.d.ts +1 -1
  26. package/dist/types/conditions/condition-operators.d.ts.map +1 -1
  27. package/dist/types/conditions/condition-ref.d.ts +1 -1
  28. package/dist/types/conditions/condition-ref.d.ts.map +1 -1
  29. package/dist/types/conditions/condition.d.ts +3 -3
  30. package/dist/types/conditions/condition.d.ts.map +1 -1
  31. package/dist/types/conditions/types.d.ts +6 -6
  32. package/dist/types/conditions/types.d.ts.map +1 -1
  33. package/dist/types/data-model/types.d.ts +28 -30
  34. package/dist/types/data-model/types.d.ts.map +1 -1
  35. package/dist/types/migration/migration.1-2.d.ts.map +1 -1
  36. package/dist/types/migration/whichMigrations.d.ts +0 -1
  37. package/dist/types/migration/whichMigrations.d.ts.map +1 -1
  38. package/dist/types/schema/schema.d.ts +1 -1
  39. package/dist/types/schema/schema.d.ts.map +1 -1
  40. package/dist/types/utils/helpers.d.ts +1 -3
  41. package/dist/types/utils/helpers.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/src/components/types.ts +2 -2
  44. package/src/conditions/condition-group.ts +1 -1
  45. package/src/conditions/condition-model.ts +21 -22
  46. package/src/conditions/condition-operators.ts +1 -1
  47. package/src/conditions/condition-ref.ts +1 -1
  48. package/src/conditions/condition.ts +5 -5
  49. package/src/conditions/types.ts +4 -4
  50. package/src/data-model/types.ts +15 -17
  51. package/src/migration/migration.1-2.ts +6 -6
  52. package/src/migration/whichMigrations.ts +0 -1
  53. package/src/schema/schema.ts +1 -1
  54. 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
- type StaticItem = {
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
- type StaticComponentValues = {
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
- type Item = {
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>()
@@ -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
+ */
@@ -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 { [key: string]: unknown }>(
22
+ export function filter<T extends Record<string, unknown>>(
23
23
  obj: T,
24
24
  predicate: (value: any) => boolean
25
25
  ): Partial<T> {