@defra/forms-model 3.0.10 → 3.0.12

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 (239) hide show
  1. package/dist/module/components/component-types.js +1 -5
  2. package/dist/module/components/component-types.js.map +1 -1
  3. package/dist/module/components/conditional-component-types.js +1 -5
  4. package/dist/module/components/conditional-component-types.js.map +1 -1
  5. package/dist/module/components/enums.js +1 -5
  6. package/dist/module/components/enums.js.map +1 -1
  7. package/dist/module/components/index.js +3 -24
  8. package/dist/module/components/index.js.map +1 -1
  9. package/dist/module/components/types.js +1 -1
  10. package/dist/module/conditions/condition-abstract.js +3 -8
  11. package/dist/module/conditions/condition-abstract.js.map +1 -1
  12. package/dist/module/conditions/condition-field.js +3 -8
  13. package/dist/module/conditions/condition-field.js.map +1 -1
  14. package/dist/module/conditions/condition-group-def.js +1 -6
  15. package/dist/module/conditions/condition-group-def.js.map +1 -1
  16. package/dist/module/conditions/condition-group.js +4 -9
  17. package/dist/module/conditions/condition-group.js.map +1 -1
  18. package/dist/module/conditions/condition-model.js +20 -25
  19. package/dist/module/conditions/condition-model.js.map +1 -1
  20. package/dist/module/conditions/condition-operators.js +15 -23
  21. package/dist/module/conditions/condition-operators.js.map +1 -1
  22. package/dist/module/conditions/condition-ref.js +2 -7
  23. package/dist/module/conditions/condition-ref.js.map +1 -1
  24. package/dist/module/conditions/condition-value-abstract.js +3 -8
  25. package/dist/module/conditions/condition-value-abstract.js.map +1 -1
  26. package/dist/module/conditions/condition-value-registration.js +1 -6
  27. package/dist/module/conditions/condition-value-registration.js.map +1 -1
  28. package/dist/module/conditions/condition-values.js +12 -20
  29. package/dist/module/conditions/condition-values.js.map +1 -1
  30. package/dist/module/conditions/condition.js +9 -14
  31. package/dist/module/conditions/condition.js.map +1 -1
  32. package/dist/module/conditions/enums.js +1 -5
  33. package/dist/module/conditions/enums.js.map +1 -1
  34. package/dist/module/conditions/helpers.js +2 -7
  35. package/dist/module/conditions/helpers.js.map +1 -1
  36. package/dist/module/conditions/index.js +10 -139
  37. package/dist/module/conditions/index.js.map +1 -1
  38. package/dist/module/conditions/inline-condition-model.js +15 -26
  39. package/dist/module/conditions/inline-condition-model.js.map +1 -1
  40. package/dist/module/conditions/inline-condition-operators.js +15 -23
  41. package/dist/module/conditions/inline-condition-operators.js.map +1 -1
  42. package/dist/module/conditions/inline-condition-values.js +9 -17
  43. package/dist/module/conditions/inline-condition-values.js.map +1 -1
  44. package/dist/module/conditions/types.js +1 -1
  45. package/dist/module/conditions/types.js.map +1 -1
  46. package/dist/module/data-model/conditions-wrapper.js +3 -8
  47. package/dist/module/data-model/conditions-wrapper.js.map +1 -1
  48. package/dist/module/data-model/enums.js +1 -5
  49. package/dist/module/data-model/enums.js.map +1 -1
  50. package/dist/module/data-model/index.js +3 -24
  51. package/dist/module/data-model/index.js.map +1 -1
  52. package/dist/module/data-model/input-wrapper.js +3 -8
  53. package/dist/module/data-model/input-wrapper.js.map +1 -1
  54. package/dist/module/data-model/types.js +1 -5
  55. package/dist/module/data-model/types.js.map +1 -1
  56. package/dist/module/form/form-configuration.js +1 -6
  57. package/dist/module/form/form-configuration.js.map +1 -1
  58. package/dist/module/form/index.js +1 -10
  59. package/dist/module/form/index.js.map +1 -1
  60. package/dist/module/index.js +8 -91
  61. package/dist/module/index.js.map +1 -1
  62. package/dist/module/migration/index.js +1 -10
  63. package/dist/module/migration/index.js.map +1 -1
  64. package/dist/module/migration/migration.0-2.js +1 -5
  65. package/dist/module/migration/migration.0-2.js.map +1 -1
  66. package/dist/module/migration/migration.1-2.js +3 -6
  67. package/dist/module/migration/migration.1-2.js.map +1 -1
  68. package/dist/module/migration/types.js +1 -1
  69. package/dist/module/migration/whichMigrations.js +5 -9
  70. package/dist/module/migration/whichMigrations.js.map +1 -1
  71. package/dist/module/schema/index.js +1 -16
  72. package/dist/module/schema/index.js.map +1 -1
  73. package/dist/module/schema/schema.js +163 -167
  74. package/dist/module/schema/schema.js.map +1 -1
  75. package/dist/module/utils/helpers.js +5 -13
  76. package/dist/module/utils/helpers.js.map +1 -1
  77. package/dist/module/utils/logger.js +1 -6
  78. package/dist/module/utils/logger.js.map +1 -1
  79. package/dist/types/components/component-types.d.ts +1 -1
  80. package/dist/types/components/component-types.d.ts.map +1 -1
  81. package/dist/types/components/conditional-component-types.d.ts +1 -1
  82. package/dist/types/components/conditional-component-types.d.ts.map +1 -1
  83. package/dist/types/components/index.d.ts +3 -3
  84. package/dist/types/components/index.d.ts.map +1 -1
  85. package/dist/types/conditions/condition-abstract.d.ts +1 -1
  86. package/dist/types/conditions/condition-abstract.d.ts.map +1 -1
  87. package/dist/types/conditions/condition-field.d.ts +1 -1
  88. package/dist/types/conditions/condition-field.d.ts.map +1 -1
  89. package/dist/types/conditions/condition-group-def.d.ts +2 -2
  90. package/dist/types/conditions/condition-group-def.d.ts.map +1 -1
  91. package/dist/types/conditions/condition-group.d.ts +2 -2
  92. package/dist/types/conditions/condition-group.d.ts.map +1 -1
  93. package/dist/types/conditions/condition-model.d.ts +5 -5
  94. package/dist/types/conditions/condition-model.d.ts.map +1 -1
  95. package/dist/types/conditions/condition-operators.d.ts +2 -2
  96. package/dist/types/conditions/condition-operators.d.ts.map +1 -1
  97. package/dist/types/conditions/condition-ref.d.ts +2 -2
  98. package/dist/types/conditions/condition-ref.d.ts.map +1 -1
  99. package/dist/types/conditions/condition-value-abstract.d.ts +1 -1
  100. package/dist/types/conditions/condition-value-abstract.d.ts.map +1 -1
  101. package/dist/types/conditions/condition-values.d.ts +3 -3
  102. package/dist/types/conditions/condition-values.d.ts.map +1 -1
  103. package/dist/types/conditions/condition.d.ts +4 -4
  104. package/dist/types/conditions/condition.d.ts.map +1 -1
  105. package/dist/types/conditions/index.d.ts +10 -10
  106. package/dist/types/conditions/index.d.ts.map +1 -1
  107. package/dist/types/conditions/types.d.ts +3 -3
  108. package/dist/types/conditions/types.d.ts.map +1 -1
  109. package/dist/types/data-model/conditions-wrapper.d.ts +1 -1
  110. package/dist/types/data-model/conditions-wrapper.d.ts.map +1 -1
  111. package/dist/types/data-model/index.d.ts +3 -3
  112. package/dist/types/data-model/index.d.ts.map +1 -1
  113. package/dist/types/data-model/input-wrapper.d.ts +2 -2
  114. package/dist/types/data-model/input-wrapper.d.ts.map +1 -1
  115. package/dist/types/data-model/types.d.ts +3 -3
  116. package/dist/types/data-model/types.d.ts.map +1 -1
  117. package/dist/types/form/index.d.ts +1 -1
  118. package/dist/types/form/index.d.ts.map +1 -1
  119. package/dist/types/index.d.ts +11 -11
  120. package/dist/types/index.d.ts.map +1 -1
  121. package/dist/types/migration/index.d.ts +1 -1
  122. package/dist/types/migration/index.d.ts.map +1 -1
  123. package/dist/types/migration/migration.0-2.d.ts +1 -1
  124. package/dist/types/migration/migration.0-2.d.ts.map +1 -1
  125. package/dist/types/migration/migration.1-2.d.ts +1 -1
  126. package/dist/types/migration/migration.1-2.d.ts.map +1 -1
  127. package/dist/types/migration/whichMigrations.d.ts +1 -1
  128. package/dist/types/migration/whichMigrations.d.ts.map +1 -1
  129. package/dist/types/schema/index.d.ts +1 -1
  130. package/dist/types/schema/index.d.ts.map +1 -1
  131. package/package.json +3 -4
  132. package/src/components/component-types.ts +1 -1
  133. package/src/components/conditional-component-types.ts +1 -1
  134. package/src/components/index.ts +3 -3
  135. package/src/conditions/condition-abstract.ts +1 -1
  136. package/src/conditions/condition-field.ts +2 -2
  137. package/src/conditions/condition-group-def.ts +1 -1
  138. package/src/conditions/condition-group.ts +3 -3
  139. package/src/conditions/condition-model.ts +9 -9
  140. package/src/conditions/condition-operators.ts +6 -3
  141. package/src/conditions/condition-ref.ts +2 -2
  142. package/src/conditions/condition-value-abstract.ts +1 -1
  143. package/src/conditions/condition-values.ts +3 -3
  144. package/src/conditions/condition.ts +6 -6
  145. package/src/conditions/index.ts +10 -10
  146. package/src/conditions/inline-condition-model.ts +3 -3
  147. package/src/conditions/inline-condition-operators.ts +1 -1
  148. package/src/conditions/types.ts +3 -3
  149. package/src/data-model/conditions-wrapper.ts +2 -2
  150. package/src/data-model/index.ts +3 -3
  151. package/src/data-model/input-wrapper.ts +3 -3
  152. package/src/data-model/types.ts +3 -3
  153. package/src/form/index.ts +1 -1
  154. package/src/index.ts +11 -11
  155. package/src/migration/index.ts +1 -1
  156. package/src/migration/migration.0-2.ts +1 -1
  157. package/src/migration/migration.1-2.ts +2 -2
  158. package/src/migration/whichMigrations.ts +3 -3
  159. package/src/schema/index.ts +1 -1
  160. package/dist/browser/components/component-types.js +0 -220
  161. package/dist/browser/components/component-types.js.map +0 -1
  162. package/dist/browser/components/conditional-component-types.js +0 -28
  163. package/dist/browser/components/conditional-component-types.js.map +0 -1
  164. package/dist/browser/components/enums.js +0 -46
  165. package/dist/browser/components/enums.js.map +0 -1
  166. package/dist/browser/components/index.js +0 -36
  167. package/dist/browser/components/index.js.map +0 -1
  168. package/dist/browser/components/types.js +0 -16
  169. package/dist/browser/components/types.js.map +0 -1
  170. package/dist/browser/conditions/condition-abstract.js +0 -62
  171. package/dist/browser/conditions/condition-abstract.js.map +0 -1
  172. package/dist/browser/conditions/condition-field.js +0 -45
  173. package/dist/browser/conditions/condition-field.js.map +0 -1
  174. package/dist/browser/conditions/condition-group-def.js +0 -45
  175. package/dist/browser/conditions/condition-group-def.js.map +0 -1
  176. package/dist/browser/conditions/condition-group.js +0 -64
  177. package/dist/browser/conditions/condition-group.js.map +0 -1
  178. package/dist/browser/conditions/condition-model.js +0 -214
  179. package/dist/browser/conditions/condition-model.js.map +0 -1
  180. package/dist/browser/conditions/condition-operators.js +0 -132
  181. package/dist/browser/conditions/condition-operators.js.map +0 -1
  182. package/dist/browser/conditions/condition-ref.js +0 -51
  183. package/dist/browser/conditions/condition-ref.js.map +0 -1
  184. package/dist/browser/conditions/condition-value-abstract.js +0 -41
  185. package/dist/browser/conditions/condition-value-abstract.js.map +0 -1
  186. package/dist/browser/conditions/condition-value-registration.js +0 -37
  187. package/dist/browser/conditions/condition-value-registration.js.map +0 -1
  188. package/dist/browser/conditions/condition-values.js +0 -127
  189. package/dist/browser/conditions/condition-values.js.map +0 -1
  190. package/dist/browser/conditions/condition.js +0 -56
  191. package/dist/browser/conditions/condition.js.map +0 -1
  192. package/dist/browser/conditions/enums.js +0 -24
  193. package/dist/browser/conditions/enums.js.map +0 -1
  194. package/dist/browser/conditions/helpers.js +0 -26
  195. package/dist/browser/conditions/helpers.js.map +0 -1
  196. package/dist/browser/conditions/index.js +0 -144
  197. package/dist/browser/conditions/index.js.map +0 -1
  198. package/dist/browser/conditions/inline-condition-model.js +0 -418
  199. package/dist/browser/conditions/inline-condition-model.js.map +0 -1
  200. package/dist/browser/conditions/inline-condition-operators.js +0 -132
  201. package/dist/browser/conditions/inline-condition-operators.js.map +0 -1
  202. package/dist/browser/conditions/inline-condition-values.js +0 -159
  203. package/dist/browser/conditions/inline-condition-values.js.map +0 -1
  204. package/dist/browser/conditions/types.js +0 -16
  205. package/dist/browser/conditions/types.js.map +0 -1
  206. package/dist/browser/data-model/conditions-wrapper.js +0 -49
  207. package/dist/browser/data-model/conditions-wrapper.js.map +0 -1
  208. package/dist/browser/data-model/enums.js +0 -25
  209. package/dist/browser/data-model/enums.js.map +0 -1
  210. package/dist/browser/data-model/index.js +0 -36
  211. package/dist/browser/data-model/index.js.map +0 -1
  212. package/dist/browser/data-model/input-wrapper.js +0 -49
  213. package/dist/browser/data-model/input-wrapper.js.map +0 -1
  214. package/dist/browser/data-model/types.js +0 -27
  215. package/dist/browser/data-model/types.js.map +0 -1
  216. package/dist/browser/form/form-configuration.js +0 -38
  217. package/dist/browser/form/form-configuration.js.map +0 -1
  218. package/dist/browser/form/index.js +0 -24
  219. package/dist/browser/form/index.js.map +0 -1
  220. package/dist/browser/index.js +0 -98
  221. package/dist/browser/index.js.map +0 -1
  222. package/dist/browser/migration/index.js +0 -24
  223. package/dist/browser/migration/index.js.map +0 -1
  224. package/dist/browser/migration/migration.0-2.js +0 -65
  225. package/dist/browser/migration/migration.0-2.js.map +0 -1
  226. package/dist/browser/migration/migration.1-2.js +0 -108
  227. package/dist/browser/migration/migration.1-2.js.map +0 -1
  228. package/dist/browser/migration/types.js +0 -16
  229. package/dist/browser/migration/types.js.map +0 -1
  230. package/dist/browser/migration/whichMigrations.js +0 -38
  231. package/dist/browser/migration/whichMigrations.js.map +0 -1
  232. package/dist/browser/schema/index.js +0 -30
  233. package/dist/browser/schema/index.js.map +0 -1
  234. package/dist/browser/schema/schema.js +0 -255
  235. package/dist/browser/schema/schema.js.map +0 -1
  236. package/dist/browser/utils/helpers.js +0 -48
  237. package/dist/browser/utils/helpers.js.map +0 -1
  238. package/dist/browser/utils/logger.js +0 -46
  239. package/dist/browser/utils/logger.js.map +0 -1
@@ -4,7 +4,7 @@ export {
4
4
  getOperatorNames,
5
5
  absoluteDateOrTimeOperatorNames,
6
6
  relativeDateOrTimeOperatorNames
7
- } from '~/src/conditions/condition-operators'
7
+ } from '~/src/conditions/condition-operators.js'
8
8
 
9
9
  export {
10
10
  timeUnits,
@@ -14,14 +14,14 @@ export {
14
14
  DateDirections,
15
15
  RelativeTimeValue,
16
16
  conditionValueFrom
17
- } from '~/src/conditions/condition-values'
17
+ } from '~/src/conditions/condition-values.js'
18
18
 
19
- export { ConditionField } from '~/src/conditions/condition-field'
20
- export { Condition } from '~/src/conditions/condition'
21
- export { ConditionRef } from '~/src/conditions/condition-ref'
22
- export { ConditionGroup } from '~/src/conditions/condition-group'
23
- export { ConditionsModel } from '~/src/conditions/condition-model'
24
- export { ConditionGroupDef } from '~/src/conditions/condition-group-def'
25
- export { toExpression, toPresentationString } from '~/src/conditions/helpers'
19
+ export { ConditionField } from '~/src/conditions/condition-field.js'
20
+ export { Condition } from '~/src/conditions/condition.js'
21
+ export { ConditionRef } from '~/src/conditions/condition-ref.js'
22
+ export { ConditionGroup } from '~/src/conditions/condition-group.js'
23
+ export { ConditionsModel } from '~/src/conditions/condition-model.js'
24
+ export { ConditionGroupDef } from '~/src/conditions/condition-group-def.js'
25
+ export { toExpression, toPresentationString } from '~/src/conditions/helpers.js'
26
26
 
27
- export { Coordinator } from '~/src/conditions/enums'
27
+ export { Coordinator } from '~/src/conditions/enums.js'
@@ -1,9 +1,9 @@
1
- import { ComponentTypes } from '~/src/components/component-types'
2
- import { getExpression } from '~/src/conditions/inline-condition-operators'
1
+ import { ComponentTypes } from '~/src/components/component-types.js'
2
+ import { getExpression } from '~/src/conditions/inline-condition-operators.js'
3
3
  import {
4
4
  AbstractConditionValue,
5
5
  valueFrom
6
- } from '~/src/conditions/inline-condition-values'
6
+ } from '~/src/conditions/inline-condition-values.js'
7
7
 
8
8
  export const coordinators = {
9
9
  AND: 'and',
@@ -5,7 +5,7 @@ import {
5
5
  dateUnits,
6
6
  RelativeTimeValue,
7
7
  timeUnits
8
- } from '~/src/conditions/inline-condition-values'
8
+ } from '~/src/conditions/inline-condition-values.js'
9
9
 
10
10
  const defaultOperators = {
11
11
  is: inline('=='),
@@ -1,6 +1,6 @@
1
- import { type Condition } from '~/src/conditions/condition'
2
- import { type ConditionRef } from '~/src/conditions/condition-ref'
3
- import { type ConditionGroup } from '~/src/conditions/condition-group'
1
+ import { type Condition } from '~/src/conditions/condition.js'
2
+ import { type ConditionRef } from '~/src/conditions/condition-ref.js'
3
+ import { type ConditionGroup } from '~/src/conditions/condition-group.js'
4
4
 
5
5
  export type ConditionsArray = (Condition | ConditionGroup | ConditionRef)[]
6
6
 
@@ -1,8 +1,8 @@
1
- import { ConditionsModel } from '~/src/conditions/condition-model'
1
+ import { ConditionsModel } from '~/src/conditions/condition-model.js'
2
2
  import {
3
3
  type ConditionRawData,
4
4
  type ConditionWrapperValue
5
- } from '~/src/data-model/types'
5
+ } from '~/src/data-model/types.js'
6
6
 
7
7
  export class ConditionsWrapper {
8
8
  name: string
@@ -1,3 +1,3 @@
1
- export { InputWrapper } from '~/src/data-model/input-wrapper'
2
- export { ConditionsWrapper } from '~/src/data-model/conditions-wrapper'
3
- export { OutputType } from '~/src/data-model/enums'
1
+ export { InputWrapper } from '~/src/data-model/input-wrapper.js'
2
+ export { ConditionsWrapper } from '~/src/data-model/conditions-wrapper.js'
3
+ export { OutputType } from '~/src/data-model/enums.js'
@@ -1,6 +1,6 @@
1
- import { type ComponentDef } from '~/src/components/types'
2
- import { type Page } from '~/src/data-model/types'
3
- import { clone } from '~/src/utils/helpers'
1
+ import { type ComponentDef } from '~/src/components/types.js'
2
+ import { type Page } from '~/src/data-model/types.js'
3
+ import { clone } from '~/src/utils/helpers.js'
4
4
 
5
5
  export class InputWrapper {
6
6
  name: string | undefined = undefined
@@ -1,6 +1,6 @@
1
- import { type ComponentDef } from '~/src/components/types'
2
- import { type Condition } from '~/src/conditions/condition'
3
- import { type OutputType } from '~/src/data-model/enums'
1
+ import { type ComponentDef } from '~/src/components/types.js'
2
+ import { type Condition } from '~/src/conditions/condition.js'
3
+ import { type OutputType } from '~/src/data-model/enums.js'
4
4
 
5
5
  type Toggleable<T> = boolean | T
6
6
 
package/src/form/index.ts CHANGED
@@ -1 +1 @@
1
- export { FormConfiguration } from '~/src/form/form-configuration'
1
+ export { FormConfiguration } from '~/src/form/form-configuration.js'
package/src/index.ts CHANGED
@@ -1,11 +1,11 @@
1
- export * from '~/src/schema'
2
- export * from '~/src/data-model'
3
- export * from '~/src/utils/logger'
4
- export * from '~/src/form'
5
- export * from '~/src/components'
6
- export * from '~/src/conditions'
7
- export * from '~/src/utils/helpers'
8
- export * from '~/src/migration'
9
- export type * from '~/src/components/types'
10
- export type * from '~/src/conditions/types'
11
- export type * from '~/src/data-model/types'
1
+ export * from '~/src/schema/index.js'
2
+ export * from '~/src/data-model/index.js'
3
+ export * from '~/src/utils/logger.js'
4
+ export * from '~/src/form/index.js'
5
+ export * from '~/src/components/index.js'
6
+ export * from '~/src/conditions/index.js'
7
+ export * from '~/src/utils/helpers.js'
8
+ export * from '~/src/migration/index.js'
9
+ export type * from '~/src/components/types.js'
10
+ export type * from '~/src/conditions/types.js'
11
+ export type * from '~/src/data-model/types.js'
@@ -1 +1 @@
1
- export { whichMigrations } from '~/src/migration/whichMigrations'
1
+ export { whichMigrations } from '~/src/migration/whichMigrations.js'
@@ -1,4 +1,4 @@
1
- import { type MigrationScript } from '~/src/migration/types'
1
+ import { type MigrationScript } from '~/src/migration/types.js'
2
2
 
3
3
  function needsUpgrade(data) {
4
4
  return !!(data.pages ?? [])
@@ -1,5 +1,5 @@
1
- import { nanoid } from '~/src/utils/helpers'
2
- import { type MigrationScript } from '~/src/migration/types'
1
+ import { nanoid } from '~/src/utils/helpers.js'
2
+ import { type MigrationScript } from '~/src/migration/types.js'
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,6 +1,6 @@
1
- import { migrate as V0_TO_V2 } from '~/src/migration/migration.0-2'
2
- import { migrate as V1_TO_V2 } from '~/src/migration/migration.1-2'
3
- import { type MigrationScript } from '~/src/migration/types'
1
+ import { migrate as V0_TO_V2 } from '~/src/migration/migration.0-2.js'
2
+ import { migrate as V1_TO_V2 } from '~/src/migration/migration.1-2.js'
3
+ 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
@@ -1 +1 @@
1
- export { Schema, componentSchema } from '~/src/schema/schema'
1
+ export { Schema, componentSchema } from '~/src/schema/schema.js'
@@ -1,220 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define(["exports"], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory(exports);
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory(mod.exports);
11
- global.componentTypes = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
14
- "use strict";
15
-
16
- _exports.__esModule = true;
17
- _exports.ComponentTypes = void 0;
18
- const ComponentTypes = _exports.ComponentTypes = [{
19
- name: 'TextField',
20
- type: 'TextField',
21
- title: 'Text field',
22
- subType: 'field',
23
- hint: '',
24
- options: {},
25
- schema: {}
26
- }, {
27
- name: 'MultilineTextField',
28
- type: 'MultilineTextField',
29
- title: 'Multiline text field',
30
- subType: 'field',
31
- hint: '',
32
- options: {},
33
- schema: {}
34
- }, {
35
- name: 'YesNoField',
36
- type: 'YesNoField',
37
- title: 'Yes/No field',
38
- subType: 'field',
39
- hint: '',
40
- options: {},
41
- schema: {}
42
- }, {
43
- name: 'DateField',
44
- type: 'DateField',
45
- title: 'Date field',
46
- subType: 'field',
47
- hint: '',
48
- options: {},
49
- schema: {}
50
- }, {
51
- name: 'TimeField',
52
- type: 'TimeField',
53
- title: 'Time field',
54
- subType: 'field',
55
- hint: '',
56
- options: {},
57
- schema: {}
58
- }, {
59
- name: 'DateTimeField',
60
- type: 'DateTimeField',
61
- title: 'Date time field',
62
- subType: 'field',
63
- hint: '',
64
- options: {},
65
- schema: {}
66
- }, {
67
- name: 'DatePartsField',
68
- type: 'DatePartsField',
69
- title: 'Date parts field',
70
- subType: 'field',
71
- hint: '',
72
- options: {},
73
- schema: {}
74
- }, {
75
- name: 'DateTimePartsField',
76
- type: 'DateTimePartsField',
77
- title: 'Date time parts field',
78
- subType: 'field',
79
- hint: '',
80
- options: {},
81
- schema: {}
82
- }, {
83
- name: 'MonthYearField',
84
- type: 'MonthYearField',
85
- title: 'Month year field',
86
- subType: 'field',
87
- hint: '',
88
- options: {},
89
- schema: {}
90
- }, {
91
- name: 'SelectField',
92
- type: 'SelectField',
93
- title: 'Select field',
94
- subType: 'listField',
95
- options: {},
96
- schema: {},
97
- list: ''
98
- }, {
99
- name: 'AutocompleteField',
100
- type: 'AutocompleteField',
101
- title: 'Autocomplete field',
102
- subType: 'listField',
103
- options: {},
104
- schema: {},
105
- list: ''
106
- }, {
107
- name: 'RadiosField',
108
- type: 'RadiosField',
109
- title: 'Radios field',
110
- subType: 'listField',
111
- options: {},
112
- schema: {},
113
- list: ''
114
- }, {
115
- name: 'CheckboxesField',
116
- type: 'CheckboxesField',
117
- title: 'Checkboxes field',
118
- subType: 'listField',
119
- options: {},
120
- schema: {},
121
- list: ''
122
- }, {
123
- name: 'NumberField',
124
- type: 'NumberField',
125
- title: 'Number field',
126
- subType: 'field',
127
- hint: '',
128
- options: {},
129
- schema: {}
130
- }, {
131
- name: 'UkAddressField',
132
- type: 'UkAddressField',
133
- title: 'UK address field',
134
- subType: 'field',
135
- hint: '',
136
- options: {},
137
- schema: {}
138
- }, {
139
- name: 'TelephoneNumberField',
140
- type: 'TelephoneNumberField',
141
- title: 'Telephone number field',
142
- subType: 'field',
143
- hint: '',
144
- options: {},
145
- schema: {}
146
- }, {
147
- name: 'EmailAddressField',
148
- type: 'EmailAddressField',
149
- title: 'Email address field',
150
- subType: 'field',
151
- hint: '',
152
- options: {},
153
- schema: {}
154
- }, {
155
- name: 'FileUploadField',
156
- type: 'FileUploadField',
157
- title: 'File upload field',
158
- subType: 'field',
159
- hint: '',
160
- options: {},
161
- schema: {}
162
- }, {
163
- name: 'Para',
164
- type: 'Para',
165
- title: 'Paragraph',
166
- subType: 'content',
167
- content: '',
168
- options: {},
169
- schema: {}
170
- }, {
171
- name: 'Html',
172
- type: 'Html',
173
- title: 'Html',
174
- subType: 'content',
175
- content: '',
176
- options: {},
177
- schema: {}
178
- }, {
179
- name: 'InsetText',
180
- type: 'InsetText',
181
- title: 'Inset text',
182
- subType: 'content',
183
- content: '',
184
- options: {},
185
- schema: {}
186
- }, {
187
- name: 'Details',
188
- type: 'Details',
189
- title: 'Details',
190
- subType: 'content',
191
- content: '',
192
- options: {},
193
- schema: {}
194
- }, {
195
- name: 'FlashCard',
196
- type: 'FlashCard',
197
- title: 'Flash card',
198
- subType: 'content',
199
- options: {},
200
- schema: {},
201
- list: ''
202
- }, {
203
- name: 'List',
204
- type: 'List',
205
- title: 'List',
206
- subType: 'content',
207
- options: {},
208
- schema: {},
209
- list: ''
210
- }, {
211
- name: 'WebsiteField',
212
- type: 'WebsiteField',
213
- title: 'Website field',
214
- subType: 'field',
215
- hint: '',
216
- options: {},
217
- schema: {}
218
- }];
219
- });
220
- //# sourceMappingURL=component-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-types.js","names":["ComponentTypes","_exports","name","type","title","subType","hint","options","schema","list","content"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types'\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: 'FlashCard',\n type: 'FlashCard',\n title: 'Flash card',\n subType: 'content',\n options: {},\n schema: {},\n list: ''\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":";;;;;;;;;;;;;;;;;EAEO,MAAMA,cAA8B,GAAAC,QAAA,CAAAD,cAAA,GAAG,CAC5C;IACEE,IAAI,EAAE,WAAW;IACjBC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE,YAAY;IACnBC,OAAO,EA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ACD;IACEN,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE,MAAM;IACZC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAE,SAAS;IAClBK,OAAO,EAAE,EAAE;IACXH,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC;EACX,CAAC,EACD;IACEN,IAAI,EAAE,WAAW;IACjBC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE,YAAY;IACnBC,OAAO,EAAE,SAAS;IAClBK,OAAO,EAAE,EAAE;IACXH,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC;EACX,CAAC,EACD;IACEN,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE,SAAS;IAClBK,OAAO,EAAE,EAAE;IACXH,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC;EACX,CAAC,EACD;IACEN,IAAI,EAAE,WAAW;IACjBC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE,YAAY;IACnBC,OAAO,EAAE,SAAS;IAClBE,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACVC,IAAI,EAAE;EACR,CAAC,EACD;IACEP,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE,MAAM;IACZC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAE,SAAS;IAClBE,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACVC,IAAI,EAAE;EACR,CAAC,EACD;IACEP,IAAI,EAAE,cAAc;IACpBC,IAAI,EAAE,cAAc;IACpBC,KAAK,EAAE,eAAe;IACtBC,OAAO,EAAE,OAAO;IAChBC,IAAI,EAAE,EAAE;IACRC,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC;EACX,CAAC,CACF;AAAA"}
@@ -1,28 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define(["exports"], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory(exports);
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory(mod.exports);
11
- global.conditionalComponentTypes = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
14
- "use strict";
15
-
16
- _exports.__esModule = true;
17
- _exports.ConditionalComponentTypes = void 0;
18
- const ConditionalComponentTypes = _exports.ConditionalComponentTypes = [{
19
- name: 'TextField',
20
- title: 'Text field',
21
- subType: 'field'
22
- }, {
23
- name: 'NumberField',
24
- title: 'Number field',
25
- subType: 'field'
26
- }];
27
- });
28
- //# sourceMappingURL=conditional-component-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditional-component-types.js","names":["ConditionalComponentTypes","_exports","name","title","subType"],"sources":["../../../src/components/conditional-component-types.ts"],"sourcesContent":["import { type ConditionalComponent } from '~/src/components/types'\n\nexport const ConditionalComponentTypes: ConditionalComponent[] = [\n {\n name: 'TextField',\n title: 'Text field',\n subType: 'field'\n },\n {\n name: 'NumberField',\n title: 'Number field',\n subType: 'field'\n }\n]\n"],"mappings":";;;;;;;;;;;;;;;;;EAEO,MAAMA,yBAAiD,GAAAC,QAAA,CAAAD,yBAAA,GAAG,CAC/D;IACEE,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE,YAAY;IACnBC,OAAO,EAAE;EACX,CAAC,EACD;IACEF,IAAI,EAAE,aAAa;IACnBC,KAAK,EAAE,cAAc;IACrBC,OAAO,EAAE;EACX,CAAC,CACF;AAAA"}
@@ -1,46 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define(["exports"], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory(exports);
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory(mod.exports);
11
- global.enums = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
14
- "use strict";
15
-
16
- _exports.__esModule = true;
17
- _exports.ComponentTypeEnum = void 0;
18
- let ComponentTypeEnum = _exports.ComponentTypeEnum = /*#__PURE__*/function (ComponentTypeEnum) {
19
- ComponentTypeEnum["TextField"] = "TextField";
20
- ComponentTypeEnum["MultilineTextField"] = "MultilineTextField";
21
- ComponentTypeEnum["YesNoField"] = "YesNoField";
22
- ComponentTypeEnum["DateField"] = "DateField";
23
- ComponentTypeEnum["TimeField"] = "TimeField";
24
- ComponentTypeEnum["DateTimeField"] = "DateTimeField";
25
- ComponentTypeEnum["DatePartsField"] = "DatePartsField";
26
- ComponentTypeEnum["MonthYearField"] = "MonthYearField";
27
- ComponentTypeEnum["DateTimePartsField"] = "DateTimePartsField";
28
- ComponentTypeEnum["SelectField"] = "SelectField";
29
- ComponentTypeEnum["AutocompleteField"] = "AutocompleteField";
30
- ComponentTypeEnum["RadiosField"] = "RadiosField";
31
- ComponentTypeEnum["CheckboxesField"] = "CheckboxesField";
32
- ComponentTypeEnum["NumberField"] = "NumberField";
33
- ComponentTypeEnum["UkAddressField"] = "UkAddressField";
34
- ComponentTypeEnum["TelephoneNumberField"] = "TelephoneNumberField";
35
- ComponentTypeEnum["EmailAddressField"] = "EmailAddressField";
36
- ComponentTypeEnum["FileUploadField"] = "FileUploadField";
37
- ComponentTypeEnum["Para"] = "Para";
38
- ComponentTypeEnum["Html"] = "Html";
39
- ComponentTypeEnum["InsetText"] = "InsetText";
40
- ComponentTypeEnum["Details"] = "Details";
41
- ComponentTypeEnum["FlashCard"] = "FlashCard";
42
- ComponentTypeEnum["List"] = "List";
43
- return ComponentTypeEnum;
44
- }({});
45
- });
46
- //# sourceMappingURL=enums.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enums.js","names":["ComponentTypeEnum","_exports"],"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 FlashCard = 'FlashCard',\n List = 'List'\n}\n"],"mappings":";;;;;;;;;;;;;;;;;MAAYA,iBAAiB,GAAAC,QAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAjBA,iBAAiB;IAAA,OAAjBA,iBAAiB;EAAA;AAAA"}
@@ -1,36 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define(["exports", "./component-types", "./conditional-component-types", "./enums"], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory(exports, require("./component-types"), require("./conditional-component-types"), require("./enums"));
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory(mod.exports, global.componentTypes, global.conditionalComponentTypes, global.enums);
11
- global.index = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _componentTypes, _conditionalComponentTypes, _enums) {
14
- "use strict";
15
-
16
- _exports.__esModule = true;
17
- Object.defineProperty(_exports, "ComponentTypeEnum", {
18
- enumerable: true,
19
- get: function () {
20
- return _enums.ComponentTypeEnum;
21
- }
22
- });
23
- Object.defineProperty(_exports, "ComponentTypes", {
24
- enumerable: true,
25
- get: function () {
26
- return _componentTypes.ComponentTypes;
27
- }
28
- });
29
- Object.defineProperty(_exports, "ConditionalComponentTypes", {
30
- enumerable: true,
31
- get: function () {
32
- return _conditionalComponentTypes.ConditionalComponentTypes;
33
- }
34
- });
35
- });
36
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types'\nexport { ConditionalComponentTypes } from '~/src/components/conditional-component-types'\nexport { ComponentTypeEnum } from '~/src/components/enums'\n"],"mappings":""}
@@ -1,16 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define([], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory();
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory();
11
- global.types = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function () {
14
- "use strict";
15
- });
16
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
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 | 'FlashCard'\n | 'List'\n | 'WebsiteField'\n\nexport type ComponentSubType = 'field' | 'content'\n\nexport type ConditionalComponent = {\n name: 'TextField' | 'NumberField'\n title: string\n subType: 'field'\n}\n\nexport type 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 FlashCardComponent extends ListFieldBase {\n type: 'FlashCard'\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 | FlashCardComponent\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 | FlashCardComponent\n\n// Components that render Lists\nexport type ListComponentsDef =\n | ListComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | FlashCardComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n"],"mappings":""}
@@ -1,62 +0,0 @@
1
- (function (global, factory) {
2
- if (typeof define === "function" && define.amd) {
3
- define(["exports", "./enums"], factory);
4
- } else if (typeof exports !== "undefined") {
5
- factory(exports, require("./enums"));
6
- } else {
7
- var mod = {
8
- exports: {}
9
- };
10
- factory(mod.exports, global.enums);
11
- global.conditionAbstract = mod.exports;
12
- }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _enums) {
14
- "use strict";
15
-
16
- _exports.__esModule = true;
17
- _exports.ConditionAbstract = void 0;
18
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
20
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
- class ConditionAbstract {
22
- constructor(coordinator) {
23
- _defineProperty(this, "coordinator", void 0);
24
- if (coordinator && !Object.values(_enums.Coordinator).includes(coordinator)) {
25
- throw Error(`coordinator ${coordinator} is not a valid coordinator`);
26
- }
27
- this.coordinator = coordinator;
28
- }
29
- coordinatorString() {
30
- return this.coordinator ? `${this.coordinator} ` : '';
31
- }
32
- getCoordinator() {
33
- return this.coordinator;
34
- }
35
- setCoordinator(coordinator) {
36
- this.coordinator = coordinator;
37
- }
38
- isGroup() {
39
- return false;
40
- }
41
- getGroupedConditions() {
42
- return [this];
43
- }
44
- _asFirstCondition() {
45
- delete this.coordinator;
46
- }
47
- asFirstCondition() {
48
- throw Error('Unsupported Operation. Method asFirstCondition have not been implemented');
49
- }
50
- clone() {
51
- throw Error('Unsupported Operation. Method clone have not been implemented');
52
- }
53
- conditionString() {
54
- throw Error('Unsupported Operation. Method conditionString have not been implemented');
55
- }
56
- conditionExpression() {
57
- throw Error('Unsupported Operation. Method conditionExpression have not been implemented');
58
- }
59
- }
60
- _exports.ConditionAbstract = ConditionAbstract;
61
- });
62
- //# sourceMappingURL=condition-abstract.js.map