@wise/dynamic-flow-client 0.4.2 → 0.4.3

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 (468) hide show
  1. package/build/main.js +9606 -0
  2. package/build/main.min.js +31 -0
  3. package/build/types/index.d.ts +11 -15
  4. package/build/types/types/index.d.ts +15 -0
  5. package/package.json +6 -5
  6. package/build/common/constants/DateMode.js +0 -7
  7. package/build/common/constants/FormControlType.js +0 -20
  8. package/build/common/constants/MonthFormat.js +0 -7
  9. package/build/common/constants/SchemaType.js +0 -14
  10. package/build/common/constants/Size.js +0 -10
  11. package/build/common/constants/index.js +0 -21
  12. package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +0 -29
  13. package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +0 -19
  14. package/build/common/contexts/eventsContext/EventsContext.js +0 -22
  15. package/build/common/contexts/fetcherContexts/FetcherContexts.js +0 -29
  16. package/build/common/contexts/index.js +0 -20
  17. package/build/common/contexts/logContext/LogContext.js +0 -27
  18. package/build/common/hooks/index.js +0 -23
  19. package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +0 -13
  20. package/build/common/hooks/useExternal/useExternal.js +0 -19
  21. package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +0 -62
  22. package/build/common/hooks/usePersistAsync/usePersistAsync.js +0 -98
  23. package/build/common/hooks/usePolling/usePolling.js +0 -52
  24. package/build/common/hooks/usePrevious/usePrevious.js +0 -12
  25. package/build/common/hooks/useStepPolling/useStepPolling.js +0 -49
  26. package/build/common/makeFetcher/index.js +0 -17
  27. package/build/common/makeFetcher/makeFetcher.js +0 -23
  28. package/build/common/messages.js +0 -10
  29. package/build/common/utils/api-utils.js +0 -19
  30. package/build/common/utils/date-utils.js +0 -27
  31. package/build/common/utils/debounce.js +0 -38
  32. package/build/common/utils/file-utils.js +0 -38
  33. package/build/common/utils/id-utils.js +0 -8
  34. package/build/common/utils/index.js +0 -24
  35. package/build/common/utils/is-equal.js +0 -25
  36. package/build/common/utils/schema-utils.js +0 -55
  37. package/build/common/utils/step-utils.js +0 -47
  38. package/build/common/validators/index.js +0 -28
  39. package/build/common/validators/models/model-validators.js +0 -69
  40. package/build/common/validators/models/models.utils.js +0 -117
  41. package/build/common/validators/schemas/schema-validators.js +0 -99
  42. package/build/common/validators/types/type-validators.js +0 -21
  43. package/build/common/validators/validationFailures/validation-failures.js +0 -151
  44. package/build/common/validators/validationFailures/validation-failures.utils.js +0 -49
  45. package/build/common/validators/values/value-validators.js +0 -7
  46. package/build/dynamicFlow/DynamicFlow.js +0 -250
  47. package/build/dynamicFlow/DynamicFlowStep.js +0 -25
  48. package/build/dynamicFlow/DynamicFlowTypes.js +0 -8
  49. package/build/dynamicFlow/index.js +0 -8
  50. package/build/dynamicFlow/stories/DynamicFlow.story.js +0 -36
  51. package/build/dynamicFlow/stories/EditableDynamicFlow.js +0 -54
  52. package/build/dynamicFlow/stories/fixtureFetcher.js +0 -60
  53. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +0 -29
  54. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +0 -15
  55. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +0 -18
  56. package/build/dynamicFlow/utils/index.js +0 -26
  57. package/build/dynamicFlow/utils/responseParsers/response-parsers.js +0 -66
  58. package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +0 -27
  59. package/build/dynamicFlow/utils/useDynamicFlowState.js +0 -91
  60. package/build/dynamicFlow/utils/useLoader.js +0 -15
  61. package/build/fixtures/components/alert.js +0 -33
  62. package/build/fixtures/components/box.js +0 -22
  63. package/build/fixtures/components/button.js +0 -56
  64. package/build/fixtures/components/columns.js +0 -38
  65. package/build/fixtures/components/copyable.js +0 -24
  66. package/build/fixtures/components/decision.js +0 -56
  67. package/build/fixtures/components/heading.js +0 -16
  68. package/build/fixtures/components/image.js +0 -25
  69. package/build/fixtures/components/index.js +0 -32
  70. package/build/fixtures/components/info.js +0 -35
  71. package/build/fixtures/components/list.js +0 -36
  72. package/build/fixtures/components/loading-indicator.js +0 -18
  73. package/build/fixtures/components/paragraph.js +0 -30
  74. package/build/fixtures/components/review.js +0 -62
  75. package/build/fixtures/examples/camera-capture.js +0 -123
  76. package/build/fixtures/examples/index.js +0 -16
  77. package/build/fixtures/examples/recipient-update.js +0 -252
  78. package/build/fixtures/examples/recipient.js +0 -315
  79. package/build/fixtures/examples/single-file-upload.js +0 -100
  80. package/build/fixtures/examples/step-validation-errors.js +0 -77
  81. package/build/fixtures/features/action-response.js +0 -31
  82. package/build/fixtures/features/external.js +0 -33
  83. package/build/fixtures/features/index.js +0 -16
  84. package/build/fixtures/features/persist-async.js +0 -46
  85. package/build/fixtures/features/polling.js +0 -35
  86. package/build/fixtures/features/validation-async.js +0 -40
  87. package/build/fixtures/index.js +0 -38
  88. package/build/fixtures/jsonSchemaForm/allOf.js +0 -121
  89. package/build/fixtures/jsonSchemaForm/audRecipient.d.ts +0 -3
  90. package/build/fixtures/jsonSchemaForm/audRecipient.js +0 -1106
  91. package/build/fixtures/jsonSchemaForm/currency.d.ts +0 -3
  92. package/build/fixtures/jsonSchemaForm/currency.js +0 -50
  93. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.d.ts +0 -3
  94. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +0 -39
  95. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.d.ts +0 -3
  96. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +0 -38
  97. package/build/fixtures/jsonSchemaForm/oneOf.d.ts +0 -3
  98. package/build/fixtures/jsonSchemaForm/oneOf.js +0 -121
  99. package/build/fixtures/jsonSchemaForm/oneOfTabs.d.ts +0 -3
  100. package/build/fixtures/jsonSchemaForm/oneOfTabs.js +0 -55
  101. package/build/fixtures/jsonSchemaForm/promotedOneOf.d.ts +0 -3
  102. package/build/fixtures/jsonSchemaForm/promotedOneOf.js +0 -58
  103. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.d.ts +0 -3
  104. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +0 -104
  105. package/build/fixtures/jsonSchemaForm/simple.d.ts +0 -3
  106. package/build/fixtures/jsonSchemaForm/simple.js +0 -50
  107. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.d.ts +0 -3
  108. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +0 -73
  109. package/build/fixtures/jsonSchemaForm/validationAsync.d.ts +0 -3
  110. package/build/fixtures/jsonSchemaForm/validationAsync.js +0 -25
  111. package/build/fixtures/layouts/all.js +0 -178
  112. package/build/fixtures/layouts/final-step-layout.js +0 -41
  113. package/build/fixtures/layouts/index.js +0 -18
  114. package/build/fixtures/layouts/list.js +0 -35
  115. package/build/fixtures/layouts/pay-in.js +0 -99
  116. package/build/fixtures/layouts/review.js +0 -162
  117. package/build/fixtures/layouts/success.js +0 -68
  118. package/build/fixtures/responses/action-response-final.js +0 -26
  119. package/build/fixtures/responses/action.js +0 -4
  120. package/build/fixtures/responses/exit.js +0 -4
  121. package/build/fixtures/responses/index.js +0 -14
  122. package/build/fixtures/responses/recipient-update-final.js +0 -26
  123. package/build/fixtures/schemas/basic-form.js +0 -41
  124. package/build/fixtures/schemas/index.js +0 -14
  125. package/build/fixtures/schemas/number-and-integer.js +0 -43
  126. package/build/fixtures/schemas/one-of.js +0 -222
  127. package/build/fixtures/schemas/string-formats.js +0 -64
  128. package/build/fixtures/utils/image-util.js +0 -22
  129. package/build/formControl/FormControl.js +0 -213
  130. package/build/formControl/index.js +0 -8
  131. package/build/formControl/utils/index.js +0 -17
  132. package/build/formControl/utils/value-utils.js +0 -111
  133. package/build/i18n/index.js +0 -36
  134. package/build/index.d.ts +0 -11
  135. package/build/index.js +0 -38
  136. package/build/jsonSchemaForm/JsonSchemaForm.js +0 -22
  137. package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +0 -46
  138. package/build/jsonSchemaForm/allOfSchema/index.js +0 -8
  139. package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +0 -19
  140. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +0 -20
  141. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +0 -8
  142. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +0 -86
  143. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +0 -20
  144. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +0 -8
  145. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +0 -18
  146. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +0 -38
  147. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +0 -20
  148. package/build/jsonSchemaForm/arrayTypeSchema/index.js +0 -8
  149. package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +0 -91
  150. package/build/jsonSchemaForm/basicTypeSchema/index.js +0 -8
  151. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +0 -73
  152. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +0 -55
  153. package/build/jsonSchemaForm/controlFeedback/index.js +0 -8
  154. package/build/jsonSchemaForm/genericSchema/GenericSchema.js +0 -118
  155. package/build/jsonSchemaForm/genericSchema/index.js +0 -8
  156. package/build/jsonSchemaForm/help/Help.js +0 -14
  157. package/build/jsonSchemaForm/help/Help.messages.js +0 -10
  158. package/build/jsonSchemaForm/help/index.js +0 -8
  159. package/build/jsonSchemaForm/index.js +0 -8
  160. package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +0 -62
  161. package/build/jsonSchemaForm/objectSchema/index.js +0 -8
  162. package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +0 -135
  163. package/build/jsonSchemaForm/oneOfSchema/index.js +0 -8
  164. package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +0 -13
  165. package/build/jsonSchemaForm/oneOfSchema/utils/index.js +0 -18
  166. package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +0 -69
  167. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +0 -20
  168. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +0 -10
  169. package/build/jsonSchemaForm/persistAsyncSchema/index.js +0 -8
  170. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +0 -119
  171. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +0 -8
  172. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +0 -66
  173. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +0 -36
  174. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +0 -8
  175. package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +0 -58
  176. package/build/jsonSchemaForm/promotedOneOfSchema/index.js +0 -8
  177. package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +0 -12
  178. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +0 -18
  179. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +0 -25
  180. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +0 -23
  181. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +0 -58
  182. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +0 -15
  183. package/build/jsonSchemaForm/readOnlySchema/index.js +0 -8
  184. package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +0 -98
  185. package/build/jsonSchemaForm/schemaFormControl/index.js +0 -8
  186. package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +0 -77
  187. package/build/jsonSchemaForm/schemaFormControl/utils/index.js +0 -17
  188. package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +0 -110
  189. package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +0 -89
  190. package/build/jsonSchemaForm/validationAsyncSchema/index.js +0 -8
  191. package/build/layout/DynamicLayout.js +0 -52
  192. package/build/layout/alert/DynamicAlert.js +0 -31
  193. package/build/layout/box/DynamicBox.js +0 -32
  194. package/build/layout/button/DynamicButton.js +0 -49
  195. package/build/layout/columns/DynamicColumns.js +0 -29
  196. package/build/layout/decision/DynamicDecision.js +0 -29
  197. package/build/layout/divider/DynamicDivider.js +0 -10
  198. package/build/layout/external/DynamicExternal.js +0 -25
  199. package/build/layout/external/DynamicExternal.messages.js +0 -10
  200. package/build/layout/form/DynamicForm.js +0 -16
  201. package/build/layout/heading/DynamicHeading.js +0 -22
  202. package/build/layout/icon/DynamicIcon.js +0 -49
  203. package/build/layout/image/DynamicImage.js +0 -62
  204. package/build/layout/index.js +0 -40
  205. package/build/layout/info/DynamicInfo.js +0 -9
  206. package/build/layout/list/DynamicList.js +0 -21
  207. package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +0 -12
  208. package/build/layout/paragraph/DynamicParagraph.js +0 -30
  209. package/build/layout/paragraph/DynamicParagraph.messages.js +0 -15
  210. package/build/layout/paragraph/useSnackBarIfAvailable.js +0 -13
  211. package/build/layout/review/DynamicReview.js +0 -23
  212. package/build/layout/utils.js +0 -33
  213. package/build/step/cameraStep/CameraStep.js +0 -84
  214. package/build/step/cameraStep/cameraCapture/CameraCapture.js +0 -70
  215. package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +0 -20
  216. package/build/step/cameraStep/cameraCapture/components/index.js +0 -18
  217. package/build/step/cameraStep/cameraCapture/hooks/index.js +0 -29
  218. package/build/step/cameraStep/cameraCapture/index.js +0 -8
  219. package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +0 -68
  220. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +0 -13
  221. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +0 -15
  222. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +0 -14
  223. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +0 -20
  224. package/build/step/cameraStep/cameraCapture/screens/index.js +0 -10
  225. package/build/step/cameraStep/cameraCapture/tracking/index.js +0 -22
  226. package/build/step/cameraStep/cameraCapture/utils/index.js +0 -51
  227. package/build/step/cameraStep/index.js +0 -8
  228. package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +0 -68
  229. package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +0 -25
  230. package/build/step/externalConfirmationStep/index.js +0 -8
  231. package/build/step/index.js +0 -12
  232. package/build/step/layoutStep/LayoutStep.js +0 -35
  233. package/build/step/layoutStep/index.js +0 -8
  234. package/build/step/layoutStep/utils/index.js +0 -7
  235. package/build/step/layoutStep/utils/inline-reference-utils.js +0 -78
  236. package/build/step/layoutStep/utils/layout-utils.js +0 -203
  237. package/build/types/common/FormControl.js +0 -2
  238. package/build/types/index.js +0 -42
  239. package/build/types/specification/Action.js +0 -2
  240. package/build/types/specification/FileUploadSchema.js +0 -8
  241. package/build/types/specification/LayoutComponent.js +0 -2
  242. package/build/types/specification/Model.js +0 -30
  243. package/build/types/specification/PersistAsync.js +0 -2
  244. package/build/types/specification/Polling.js +0 -2
  245. package/build/types/specification/Promotion.js +0 -2
  246. package/build/types/specification/Schema.js +0 -67
  247. package/build/types/specification/Step.js +0 -6
  248. package/build/types/specification/ValidationAsync.js +0 -2
  249. package/build/types/specification/core.js +0 -2
  250. /package/build/{common → types/common}/constants/DateMode.d.ts +0 -0
  251. /package/build/{common → types/common}/constants/FormControlType.d.ts +0 -0
  252. /package/build/{common → types/common}/constants/MonthFormat.d.ts +0 -0
  253. /package/build/{common → types/common}/constants/SchemaType.d.ts +0 -0
  254. /package/build/{common → types/common}/constants/Size.d.ts +0 -0
  255. /package/build/{common → types/common}/constants/index.d.ts +0 -0
  256. /package/build/{common → types/common}/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -0
  257. /package/build/{common → types/common}/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +0 -0
  258. /package/build/{common → types/common}/contexts/eventsContext/EventsContext.d.ts +0 -0
  259. /package/build/{common → types/common}/contexts/fetcherContexts/FetcherContexts.d.ts +0 -0
  260. /package/build/{common → types/common}/contexts/index.d.ts +0 -0
  261. /package/build/{common → types/common}/contexts/logContext/LogContext.d.ts +0 -0
  262. /package/build/{common → types/common}/hooks/index.d.ts +0 -0
  263. /package/build/{common → types/common}/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +0 -0
  264. /package/build/{common → types/common}/hooks/useExternal/useExternal.d.ts +0 -0
  265. /package/build/{common → types/common}/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +0 -0
  266. /package/build/{common → types/common}/hooks/usePersistAsync/usePersistAsync.d.ts +0 -0
  267. /package/build/{common → types/common}/hooks/usePolling/usePolling.d.ts +0 -0
  268. /package/build/{common → types/common}/hooks/usePrevious/usePrevious.d.ts +0 -0
  269. /package/build/{common → types/common}/hooks/useStepPolling/useStepPolling.d.ts +0 -0
  270. /package/build/{common → types/common}/makeFetcher/index.d.ts +0 -0
  271. /package/build/{common → types/common}/makeFetcher/makeFetcher.d.ts +0 -0
  272. /package/build/{common → types/common}/messages.d.ts +0 -0
  273. /package/build/{common → types/common}/utils/api-utils.d.ts +0 -0
  274. /package/build/{common → types/common}/utils/date-utils.d.ts +0 -0
  275. /package/build/{common → types/common}/utils/debounce.d.ts +0 -0
  276. /package/build/{common → types/common}/utils/file-utils.d.ts +0 -0
  277. /package/build/{common → types/common}/utils/id-utils.d.ts +0 -0
  278. /package/build/{common → types/common}/utils/index.d.ts +0 -0
  279. /package/build/{common → types/common}/utils/is-equal.d.ts +0 -0
  280. /package/build/{common → types/common}/utils/schema-utils.d.ts +0 -0
  281. /package/build/{common → types/common}/utils/step-utils.d.ts +0 -0
  282. /package/build/{common → types/common}/validators/index.d.ts +0 -0
  283. /package/build/{common → types/common}/validators/models/model-validators.d.ts +0 -0
  284. /package/build/{common → types/common}/validators/models/models.utils.d.ts +0 -0
  285. /package/build/{common → types/common}/validators/schemas/schema-validators.d.ts +0 -0
  286. /package/build/{common → types/common}/validators/types/type-validators.d.ts +0 -0
  287. /package/build/{common → types/common}/validators/validationFailures/validation-failures.d.ts +0 -0
  288. /package/build/{common → types/common}/validators/validationFailures/validation-failures.utils.d.ts +0 -0
  289. /package/build/{common → types/common}/validators/values/value-validators.d.ts +0 -0
  290. /package/build/{dynamicFlow → types/dynamicFlow}/DynamicFlow.d.ts +0 -0
  291. /package/build/{dynamicFlow → types/dynamicFlow}/DynamicFlowStep.d.ts +0 -0
  292. /package/build/{dynamicFlow → types/dynamicFlow}/DynamicFlowTypes.d.ts +0 -0
  293. /package/build/{dynamicFlow → types/dynamicFlow}/index.d.ts +0 -0
  294. /package/build/{dynamicFlow → types/dynamicFlow}/stories/DynamicFlow.story.d.ts +0 -0
  295. /package/build/{dynamicFlow → types/dynamicFlow}/stories/EditableDynamicFlow.d.ts +0 -0
  296. /package/build/{dynamicFlow → types/dynamicFlow}/stories/fixtureFetcher.d.ts +0 -0
  297. /package/build/{dynamicFlow → types/dynamicFlow}/utils/errorBoundary/ErrorBoundary.d.ts +0 -0
  298. /package/build/{dynamicFlow → types/dynamicFlow}/utils/errorBoundary/ErrorBoundary.messages.d.ts +0 -0
  299. /package/build/{dynamicFlow → types/dynamicFlow}/utils/errorBoundary/ErrorBoundaryAlert.d.ts +0 -0
  300. /package/build/{dynamicFlow → types/dynamicFlow}/utils/index.d.ts +0 -0
  301. /package/build/{dynamicFlow → types/dynamicFlow}/utils/responseParsers/response-parsers.d.ts +0 -0
  302. /package/build/{dynamicFlow → types/dynamicFlow}/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +0 -0
  303. /package/build/{dynamicFlow → types/dynamicFlow}/utils/useDynamicFlowState.d.ts +0 -0
  304. /package/build/{dynamicFlow → types/dynamicFlow}/utils/useLoader.d.ts +0 -0
  305. /package/build/{fixtures → types/fixtures}/components/alert.d.ts +0 -0
  306. /package/build/{fixtures → types/fixtures}/components/box.d.ts +0 -0
  307. /package/build/{fixtures → types/fixtures}/components/button.d.ts +0 -0
  308. /package/build/{fixtures → types/fixtures}/components/columns.d.ts +0 -0
  309. /package/build/{fixtures → types/fixtures}/components/copyable.d.ts +0 -0
  310. /package/build/{fixtures → types/fixtures}/components/decision.d.ts +0 -0
  311. /package/build/{fixtures → types/fixtures}/components/heading.d.ts +0 -0
  312. /package/build/{fixtures → types/fixtures}/components/image.d.ts +0 -0
  313. /package/build/{fixtures → types/fixtures}/components/index.d.ts +0 -0
  314. /package/build/{fixtures → types/fixtures}/components/info.d.ts +0 -0
  315. /package/build/{fixtures → types/fixtures}/components/list.d.ts +0 -0
  316. /package/build/{fixtures → types/fixtures}/components/loading-indicator.d.ts +0 -0
  317. /package/build/{fixtures → types/fixtures}/components/paragraph.d.ts +0 -0
  318. /package/build/{fixtures → types/fixtures}/components/review.d.ts +0 -0
  319. /package/build/{fixtures → types/fixtures}/examples/camera-capture.d.ts +0 -0
  320. /package/build/{fixtures → types/fixtures}/examples/index.d.ts +0 -0
  321. /package/build/{fixtures → types/fixtures}/examples/recipient-update.d.ts +0 -0
  322. /package/build/{fixtures → types/fixtures}/examples/recipient.d.ts +0 -0
  323. /package/build/{fixtures → types/fixtures}/examples/single-file-upload.d.ts +0 -0
  324. /package/build/{fixtures → types/fixtures}/examples/step-validation-errors.d.ts +0 -0
  325. /package/build/{fixtures → types/fixtures}/features/action-response.d.ts +0 -0
  326. /package/build/{fixtures → types/fixtures}/features/external.d.ts +0 -0
  327. /package/build/{fixtures → types/fixtures}/features/index.d.ts +0 -0
  328. /package/build/{fixtures → types/fixtures}/features/persist-async.d.ts +0 -0
  329. /package/build/{fixtures → types/fixtures}/features/polling.d.ts +0 -0
  330. /package/build/{fixtures → types/fixtures}/features/validation-async.d.ts +0 -0
  331. /package/build/{fixtures → types/fixtures}/index.d.ts +0 -0
  332. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/allOf.d.ts +0 -0
  333. /package/build/{fixtures → types/fixtures}/layouts/all.d.ts +0 -0
  334. /package/build/{fixtures → types/fixtures}/layouts/final-step-layout.d.ts +0 -0
  335. /package/build/{fixtures → types/fixtures}/layouts/index.d.ts +0 -0
  336. /package/build/{fixtures → types/fixtures}/layouts/list.d.ts +0 -0
  337. /package/build/{fixtures → types/fixtures}/layouts/pay-in.d.ts +0 -0
  338. /package/build/{fixtures → types/fixtures}/layouts/review.d.ts +0 -0
  339. /package/build/{fixtures → types/fixtures}/layouts/success.d.ts +0 -0
  340. /package/build/{fixtures → types/fixtures}/responses/action-response-final.d.ts +0 -0
  341. /package/build/{fixtures → types/fixtures}/responses/action.d.ts +0 -0
  342. /package/build/{fixtures → types/fixtures}/responses/exit.d.ts +0 -0
  343. /package/build/{fixtures → types/fixtures}/responses/index.d.ts +0 -0
  344. /package/build/{fixtures → types/fixtures}/responses/recipient-update-final.d.ts +0 -0
  345. /package/build/{fixtures → types/fixtures}/schemas/basic-form.d.ts +0 -0
  346. /package/build/{fixtures → types/fixtures}/schemas/index.d.ts +0 -0
  347. /package/build/{fixtures → types/fixtures}/schemas/number-and-integer.d.ts +0 -0
  348. /package/build/{fixtures → types/fixtures}/schemas/one-of.d.ts +0 -0
  349. /package/build/{fixtures → types/fixtures}/schemas/string-formats.d.ts +0 -0
  350. /package/build/{fixtures → types/fixtures}/utils/image-util.d.ts +0 -0
  351. /package/build/{formControl → types/formControl}/FormControl.d.ts +0 -0
  352. /package/build/{formControl → types/formControl}/index.d.ts +0 -0
  353. /package/build/{formControl → types/formControl}/utils/index.d.ts +0 -0
  354. /package/build/{formControl → types/formControl}/utils/value-utils.d.ts +0 -0
  355. /package/build/{i18n → types/i18n}/index.d.ts +0 -0
  356. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/JsonSchemaForm.d.ts +0 -0
  357. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/allOfSchema/AllOfSchema.d.ts +0 -0
  358. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/allOfSchema/index.d.ts +0 -0
  359. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/ArraySchema.d.ts +0 -0
  360. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +0 -0
  361. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/index.d.ts +0 -0
  362. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +0 -0
  363. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +0 -0
  364. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +0 -0
  365. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +0 -0
  366. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +0 -0
  367. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +0 -0
  368. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/index.d.ts +0 -0
  369. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/basicTypeSchema/BasicTypeSchema.d.ts +0 -0
  370. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/basicTypeSchema/index.d.ts +0 -0
  371. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/controlFeedback/ControlFeedback.d.ts +0 -0
  372. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/controlFeedback/ControlFeedback.messages.d.ts +0 -0
  373. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/controlFeedback/index.d.ts +0 -0
  374. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/genericSchema/GenericSchema.d.ts +0 -0
  375. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/genericSchema/index.d.ts +0 -0
  376. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/help/Help.d.ts +0 -0
  377. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/help/Help.messages.d.ts +0 -0
  378. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/help/index.d.ts +0 -0
  379. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/index.d.ts +0 -0
  380. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/objectSchema/ObjectSchema.d.ts +0 -0
  381. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/objectSchema/index.d.ts +0 -0
  382. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/OneOfSchema.d.ts +0 -0
  383. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/index.d.ts +0 -0
  384. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/utils/const-schema-utils.d.ts +0 -0
  385. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/utils/index.d.ts +0 -0
  386. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/utils/one-of-utils.d.ts +0 -0
  387. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.d.ts +0 -0
  388. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +0 -0
  389. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/index.d.ts +0 -0
  390. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +0 -0
  391. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +0 -0
  392. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +0 -0
  393. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +0 -0
  394. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +0 -0
  395. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/PromotedOneOfSchema.d.ts +0 -0
  396. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/index.d.ts +0 -0
  397. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promoted-one-of-utils.d.ts +0 -0
  398. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +0 -0
  399. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +0 -0
  400. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +0 -0
  401. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/readOnlySchema/ReadOnlySchema.d.ts +0 -0
  402. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/readOnlySchema/ReadOnlySchema.messages.d.ts +0 -0
  403. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/readOnlySchema/index.d.ts +0 -0
  404. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/SchemaFormControl.d.ts +0 -0
  405. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/index.d.ts +0 -0
  406. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/utils/currency-utils.d.ts +0 -0
  407. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/utils/index.d.ts +0 -0
  408. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +0 -0
  409. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -0
  410. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/validationAsyncSchema/index.d.ts +0 -0
  411. /package/build/{layout → types/layout}/DynamicLayout.d.ts +0 -0
  412. /package/build/{layout → types/layout}/alert/DynamicAlert.d.ts +0 -0
  413. /package/build/{layout → types/layout}/box/DynamicBox.d.ts +0 -0
  414. /package/build/{layout → types/layout}/button/DynamicButton.d.ts +0 -0
  415. /package/build/{layout → types/layout}/columns/DynamicColumns.d.ts +0 -0
  416. /package/build/{layout → types/layout}/decision/DynamicDecision.d.ts +0 -0
  417. /package/build/{layout → types/layout}/divider/DynamicDivider.d.ts +0 -0
  418. /package/build/{layout → types/layout}/external/DynamicExternal.d.ts +0 -0
  419. /package/build/{layout → types/layout}/external/DynamicExternal.messages.d.ts +0 -0
  420. /package/build/{layout → types/layout}/form/DynamicForm.d.ts +0 -0
  421. /package/build/{layout → types/layout}/heading/DynamicHeading.d.ts +0 -0
  422. /package/build/{layout → types/layout}/icon/DynamicIcon.d.ts +0 -0
  423. /package/build/{layout → types/layout}/image/DynamicImage.d.ts +0 -0
  424. /package/build/{layout → types/layout}/index.d.ts +0 -0
  425. /package/build/{layout → types/layout}/info/DynamicInfo.d.ts +0 -0
  426. /package/build/{layout → types/layout}/list/DynamicList.d.ts +0 -0
  427. /package/build/{layout → types/layout}/loadingIndicator/DynamicLoadingIndicator.d.ts +0 -0
  428. /package/build/{layout → types/layout}/paragraph/DynamicParagraph.d.ts +0 -0
  429. /package/build/{layout → types/layout}/paragraph/DynamicParagraph.messages.d.ts +0 -0
  430. /package/build/{layout → types/layout}/paragraph/useSnackBarIfAvailable.d.ts +0 -0
  431. /package/build/{layout → types/layout}/review/DynamicReview.d.ts +0 -0
  432. /package/build/{layout → types/layout}/utils.d.ts +0 -0
  433. /package/build/{step → types/step}/cameraStep/CameraStep.d.ts +0 -0
  434. /package/build/{step → types/step}/cameraStep/cameraCapture/CameraCapture.d.ts +0 -0
  435. /package/build/{step → types/step}/cameraStep/cameraCapture/CameraCapture.messages.d.ts +0 -0
  436. /package/build/{step → types/step}/cameraStep/cameraCapture/components/index.d.ts +0 -0
  437. /package/build/{step → types/step}/cameraStep/cameraCapture/hooks/index.d.ts +0 -0
  438. /package/build/{step → types/step}/cameraStep/cameraCapture/index.d.ts +0 -0
  439. /package/build/{step → types/step}/cameraStep/cameraCapture/overlay/Overlay.d.ts +0 -0
  440. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -0
  441. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +0 -0
  442. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -0
  443. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +0 -0
  444. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/index.d.ts +0 -0
  445. /package/build/{step → types/step}/cameraStep/cameraCapture/tracking/index.d.ts +0 -0
  446. /package/build/{step → types/step}/cameraStep/cameraCapture/utils/index.d.ts +0 -0
  447. /package/build/{step → types/step}/cameraStep/index.d.ts +0 -0
  448. /package/build/{step → types/step}/externalConfirmationStep/ExternalConfirmationStep.d.ts +0 -0
  449. /package/build/{step → types/step}/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +0 -0
  450. /package/build/{step → types/step}/externalConfirmationStep/index.d.ts +0 -0
  451. /package/build/{step → types/step}/index.d.ts +0 -0
  452. /package/build/{step → types/step}/layoutStep/LayoutStep.d.ts +0 -0
  453. /package/build/{step → types/step}/layoutStep/index.d.ts +0 -0
  454. /package/build/{step → types/step}/layoutStep/utils/index.d.ts +0 -0
  455. /package/build/{step → types/step}/layoutStep/utils/inline-reference-utils.d.ts +0 -0
  456. /package/build/{step → types/step}/layoutStep/utils/layout-utils.d.ts +0 -0
  457. /package/build/types/{common → types/common}/FormControl.d.ts +0 -0
  458. /package/build/types/{specification → types/specification}/Action.d.ts +0 -0
  459. /package/build/types/{specification → types/specification}/FileUploadSchema.d.ts +0 -0
  460. /package/build/types/{specification → types/specification}/LayoutComponent.d.ts +0 -0
  461. /package/build/types/{specification → types/specification}/Model.d.ts +0 -0
  462. /package/build/types/{specification → types/specification}/PersistAsync.d.ts +0 -0
  463. /package/build/types/{specification → types/specification}/Polling.d.ts +0 -0
  464. /package/build/types/{specification → types/specification}/Promotion.d.ts +0 -0
  465. /package/build/types/{specification → types/specification}/Schema.d.ts +0 -0
  466. /package/build/types/{specification → types/specification}/Step.d.ts +0 -0
  467. /package/build/types/{specification → types/specification}/ValidationAsync.d.ts +0 -0
  468. /package/build/types/{specification → types/specification}/core.d.ts +0 -0
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const step = {
4
- key: 'Schemas/Basic Form',
5
- title: 'Simple Form',
6
- description: 'A simple form with text fields and a checkbox.',
7
- type: 'form',
8
- actions: [],
9
- schemas: [
10
- {
11
- $id: '#the-schema',
12
- type: 'object',
13
- displayOrder: ['name', 'pineapple'],
14
- properties: {
15
- name: {
16
- title: 'Name (string schema)',
17
- type: 'string',
18
- },
19
- pineapple: {
20
- title: 'Pineapple on pizza (boolean schema)',
21
- type: 'boolean',
22
- },
23
- },
24
- },
25
- ],
26
- layout: [
27
- {
28
- type: 'form',
29
- schema: { $ref: '#the-schema' },
30
- },
31
- {
32
- type: 'button',
33
- action: {
34
- url: '/submit',
35
- title: 'Submit',
36
- type: 'primary',
37
- },
38
- },
39
- ],
40
- };
41
- exports.default = step;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.stringFormats = exports.oneOf = exports.numberAndInteger = exports.simpleForm = void 0;
7
- var basic_form_1 = require("./basic-form");
8
- Object.defineProperty(exports, "simpleForm", { enumerable: true, get: function () { return __importDefault(basic_form_1).default; } });
9
- var number_and_integer_1 = require("./number-and-integer");
10
- Object.defineProperty(exports, "numberAndInteger", { enumerable: true, get: function () { return __importDefault(number_and_integer_1).default; } });
11
- var one_of_1 = require("./one-of");
12
- Object.defineProperty(exports, "oneOf", { enumerable: true, get: function () { return __importDefault(one_of_1).default; } });
13
- var string_formats_1 = require("./string-formats");
14
- Object.defineProperty(exports, "stringFormats", { enumerable: true, get: function () { return __importDefault(string_formats_1).default; } });
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const step = {
4
- key: 'Schemas/Number And Integer',
5
- title: 'Number and Integer Schemas',
6
- description: 'Number and Integer Schemas.',
7
- type: 'form',
8
- actions: [],
9
- schemas: [
10
- {
11
- $id: '#the-schema',
12
- type: 'object',
13
- displayOrder: ['some-number', 'some-integer'],
14
- properties: {
15
- 'some-number': {
16
- title: 'Number (number schema)',
17
- type: 'number',
18
- validationMessages: { type: 'This is not an number' },
19
- },
20
- 'some-integer': {
21
- title: 'Integer (integer schema, does not support decimals)',
22
- type: 'integer',
23
- validationMessages: { type: 'This is not an integer' },
24
- },
25
- },
26
- },
27
- ],
28
- layout: [
29
- {
30
- type: 'form',
31
- schema: { $ref: '#the-schema' },
32
- },
33
- {
34
- type: 'button',
35
- action: {
36
- url: '/submit',
37
- title: 'Submit',
38
- type: 'primary',
39
- },
40
- },
41
- ],
42
- };
43
- exports.default = step;
@@ -1,222 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const currencies = [
4
- ['EUR', 'Euro'],
5
- ['GBP', 'British pound'],
6
- ['INR', 'Indian rupee'],
7
- ['USD', 'United States dollar'],
8
- ['AED', 'United Arab Emirates dirham'],
9
- ['ARS', 'Argentine peso'],
10
- ['AUD', 'Australian dollar'],
11
- ['BDT', 'Bangladeshi taka'],
12
- ['BGN', 'Bulgarian lev'],
13
- ['BRL', 'Brazilian real'],
14
- ['BWP', 'Botswana pula'],
15
- ['CAD', 'Canadian dollar'],
16
- ['CHF', 'Swiss franc'],
17
- ['CLP', 'Chilean peso'],
18
- ['CNY', 'Chinese yuan'],
19
- ['COP', 'Colombian peso'],
20
- ['CRC', 'Costa Rican colón'],
21
- ['CZK', 'Czech koruna'],
22
- ['DKK', 'Danish krone'],
23
- ['EGP', 'Egyptian pound'],
24
- ['FJD', 'Fijian dollar'],
25
- ['GEL', 'Georgian lari'],
26
- ['GHS', 'Ghanaian cedi'],
27
- ['GTQ', 'Guatemalan quetzal'],
28
- ['HKD', 'Hong Kong dollar'],
29
- ['HRK', 'Croatian kuna'],
30
- ['HUF', 'Hungarian forint'],
31
- ['IDR', 'Indonesian rupiah'],
32
- ['ILS', 'Israeli shekel'],
33
- ['JPY', 'Japanese yen'],
34
- ['KES', 'Kenyan shilling'],
35
- ['KRW', 'South Korean won'],
36
- ['LKR', 'Sri Lankan rupee'],
37
- ['MAD', 'Moroccan dirham'],
38
- ['MXN', 'Mexican peso'],
39
- ['MYR', 'Malaysian ringgit'],
40
- ['MZN', 'Mozambican metical'],
41
- ['NAD', 'Namibian dollar'],
42
- ['NGN', 'Nigerian naira'],
43
- ['NOK', 'Norwegian krone'],
44
- ['NPR', 'Nepalese rupee'],
45
- ['NZD', 'New Zealand dollar'],
46
- ['PEN', 'Peruvian nuevo sol'],
47
- ['PHP', 'Philippine peso'],
48
- ['PKR', 'Pakistani rupee'],
49
- ['PLN', 'Polish złoty'],
50
- ['RON', 'Romanian leu'],
51
- ['RUB', 'Russian rouble'],
52
- ['SEK', 'Swedish krona'],
53
- ['SGD', 'Singapore dollar'],
54
- ['THB', 'Thai baht'],
55
- ['TRY', 'Turkish lira'],
56
- ['TZS', 'Tanzanian shilling'],
57
- ['UAH', 'Ukrainian hryvnia'],
58
- ['UGX', 'Ugandan shilling'],
59
- ['UYU', 'Uruguayan peso'],
60
- ['VND', 'Vietnamese dong'],
61
- ['XOF', 'West African CFA franc'],
62
- ['ZAR', 'South African rand'],
63
- ['ZMW', 'Zambian kwacha'],
64
- ];
65
- const step = {
66
- key: 'Schemas/OneOf',
67
- title: 'OneOf Schemas',
68
- description: 'OneOf Schema using select, radio buttons and tabs.',
69
- type: 'form',
70
- analytics: { custom: 'this is the oneOf fixture' },
71
- actions: [],
72
- schemas: [
73
- {
74
- $id: '#the-schema',
75
- type: 'object',
76
- displayOrder: ['account-type-radio', 'colour-select', 'currency', 'bank-details-tabs'],
77
- required: ['bank-details-tabs'],
78
- properties: {
79
- 'account-type-radio': {
80
- title: 'Personal or Business Account? (oneOf schema with two options default to control: "radio")',
81
- analyticsId: 'account-type-radio',
82
- oneOf: [
83
- {
84
- title: 'Personal',
85
- analyticsId: 'account-type-radio-personal',
86
- icon: {
87
- name: 'person',
88
- },
89
- const: 'PERSONAL',
90
- },
91
- {
92
- title: 'Business',
93
- analyticsId: 'account-type-radio-business',
94
- icon: {
95
- name: 'briefcase',
96
- },
97
- const: 'BUSINESS',
98
- },
99
- ],
100
- },
101
- 'colour-select': {
102
- title: 'What is your favourite colour? (oneOf schema with more than two options default to control: "select")',
103
- placeholder: 'Please select a colour',
104
- analyticsId: 'colour-select',
105
- oneOf: [
106
- {
107
- title: 'Blue',
108
- analyticsId: 'colour-select-blue',
109
- image: {
110
- url: 'https://placeholder.pics/svg/64/0099ff/FFFFFF',
111
- },
112
- const: 1,
113
- },
114
- {
115
- title: 'Yellow',
116
- analyticsId: 'colour-select-yellow',
117
- image: {
118
- url: 'https://placeholder.pics/svg/64/ffcc00/FFFFFF',
119
- },
120
- const: 2,
121
- },
122
- {
123
- title: 'Red',
124
- analyticsId: 'colour-select-red',
125
- image: {
126
- url: 'https://placeholder.pics/svg/64/ff6600/FFFFFF',
127
- },
128
- const: 3,
129
- },
130
- ],
131
- },
132
- currency: {
133
- title: 'Currency (oneof schema of const schemas with default value)',
134
- type: 'string',
135
- analyticsId: 'currency',
136
- oneOf: currencies.map(([code, name]) => ({
137
- title: code,
138
- analyticsId: code,
139
- icon: { name: `flag-${code.toLowerCase()}` },
140
- description: name,
141
- const: code,
142
- })),
143
- validationMessages: { required: 'Please enter currency.' },
144
- default: 'EUR',
145
- },
146
- 'bank-details-tabs': {
147
- title: 'Bank Details (oneOf schema of object schemas and control: "tab")',
148
- control: 'tab',
149
- analyticsId: 'bank-details-tabs',
150
- oneOf: [
151
- {
152
- type: 'object',
153
- title: 'UK Sortcode and Account Number',
154
- analyticsId: 'bank-details-tabs-uk',
155
- displayOrder: ['account-number', 'sort-code'],
156
- required: ['account-number', 'sort-code'],
157
- properties: {
158
- 'account-number': {
159
- title: 'Account Number',
160
- type: 'string',
161
- },
162
- 'sort-code': {
163
- title: 'Sort Code',
164
- type: 'string',
165
- },
166
- },
167
- },
168
- {
169
- type: 'object',
170
- title: 'IBAN and BIC',
171
- analyticsId: 'bank-details-tabs-iban',
172
- displayOrder: ['iban', 'bic'],
173
- required: ['iban', 'bic'],
174
- properties: {
175
- iban: {
176
- title: 'IBAN',
177
- type: 'string',
178
- },
179
- bic: {
180
- title: 'BIC',
181
- type: 'string',
182
- },
183
- },
184
- },
185
- {
186
- type: 'object',
187
- title: 'US Routing Number and Account Number',
188
- analyticsId: 'bank-details-tabs-us',
189
- displayOrder: ['account-number', 'routing-number'],
190
- required: ['account-number', 'routing-number'],
191
- properties: {
192
- 'account-number': {
193
- title: 'Account Number',
194
- type: 'string',
195
- },
196
- 'routing-number': {
197
- title: 'Routing Number',
198
- type: 'string',
199
- },
200
- },
201
- },
202
- ],
203
- },
204
- },
205
- },
206
- ],
207
- layout: [
208
- {
209
- type: 'form',
210
- schema: { $ref: '#the-schema' },
211
- },
212
- {
213
- type: 'button',
214
- action: {
215
- url: '/submit',
216
- title: 'Submit',
217
- type: 'primary',
218
- },
219
- },
220
- ],
221
- };
222
- exports.default = step;
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const step = {
4
- key: 'Schemas/String Formats',
5
- title: 'String Schema Formats',
6
- description: 'String schemas with different formats (password, date, telephone).',
7
- type: 'form',
8
- actions: [],
9
- schemas: [
10
- {
11
- $id: '#the-schema',
12
- type: 'object',
13
- displayOrder: ['name', 'password', 'dob', 'date-lookup', 'telephone'],
14
- properties: {
15
- name: {
16
- title: 'Name (string schema no format)',
17
- type: 'string',
18
- },
19
- password: {
20
- title: 'Password (string schema with format: "password")',
21
- type: 'string',
22
- format: 'password',
23
- },
24
- dob: {
25
- title: 'Date of birth (string schema with format: "date")',
26
- type: 'string',
27
- format: 'date',
28
- },
29
- 'date-lookup': {
30
- title: 'Date Lookup (string schema with format: "date" and control: "date-lookup")',
31
- type: 'string',
32
- format: 'date',
33
- control: 'date-lookup',
34
- minimum: '2023-01-01',
35
- maximum: '2023-12-31',
36
- placeholder: 'Select a date',
37
- },
38
- telephone: {
39
- title: 'Phone number (string schema with format: "phone-number")',
40
- type: 'string',
41
- format: 'phone-number',
42
- },
43
- },
44
- },
45
- ],
46
- layout: [
47
- {
48
- type: 'form',
49
- schema: { $ref: '#the-schema' },
50
- },
51
- {
52
- type: 'button',
53
- action: {
54
- url: '/submit',
55
- title: 'Submit',
56
- type: 'primary',
57
- },
58
- },
59
- ],
60
- model: {
61
- 'date-lookup': '2023-01-01',
62
- },
63
- };
64
- exports.default = step;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getImageStep = void 0;
4
- const getImageStep = (size) => {
5
- return {
6
- type: 'form',
7
- key: `Components/Image-${size}`,
8
- title: `Image Component - ${size}`,
9
- description: `This is an image with size: "${size}"`,
10
- actions: [],
11
- schemas: [],
12
- layout: [
13
- {
14
- type: 'image',
15
- url: 'http://placekitten.com/g/400/400',
16
- text: `This is an image with size: "${size}"`,
17
- size,
18
- },
19
- ],
20
- };
21
- };
22
- exports.getImageStep = getImageStep;
@@ -1,213 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const components_1 = require("@transferwise/components");
5
- const react_1 = require("react");
6
- const constants_1 = require("../common/constants");
7
- const utils_1 = require("../common/utils");
8
- const validators_1 = require("../common/validators");
9
- const utils_2 = require("./utils");
10
- class FormControl extends react_1.PureComponent {
11
- constructor(props) {
12
- super(props);
13
- /**
14
- * autocomplete hides our form help so we need to disable it when help text
15
- * is present. Chrome ignores autocomplete=off, the only way to disable it is
16
- * to provide an 'invalid' value, for which 'disabled' serves.
17
- */
18
- this.getAutocompleteStatus = () => (this.props.autoComplete ? 'on' : 'disabled');
19
- this.handleOnChange = (value) => {
20
- this.props.onChange(value);
21
- };
22
- this.handleInputOnChange = (event) => {
23
- this.props.onChange(event.target.value);
24
- };
25
- this.handleOnFocus = () => {
26
- var _a, _b;
27
- (_b = (_a = this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a);
28
- };
29
- this.handleOnBlur = () => {
30
- var _a, _b;
31
- (_b = (_a = this.props).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a);
32
- };
33
- this.getSelectedOption = (options) => {
34
- if (this.state.selectedOption !== null && typeof this.state.selectedOption !== 'undefined') {
35
- return options.find((option) => { var _a; return ((_a = this.state.selectedOption) === null || _a === void 0 ? void 0 : _a.value) === option.value; });
36
- }
37
- if (this.props.value !== null && typeof this.props.value !== 'undefined') {
38
- return options.find((option) => this.props.value === option.value);
39
- }
40
- return undefined;
41
- };
42
- this.mapOption = (option) => {
43
- return Object.assign(Object.assign({}, option), { value: (0, validators_1.isNumber)(option.value) || (0, validators_1.isString)(option.value) ? option.value : undefined, disabled: option.disabled || this.props.disabled, readOnly: this.props.readOnly });
44
- };
45
- this.state = {
46
- selectedOption: props.selectedOption,
47
- touched: false,
48
- prevValue: props.value,
49
- };
50
- }
51
- static getDerivedStateFromProps(nextProps, previousState) {
52
- if (previousState.prevValue !== nextProps.value) {
53
- return { prevValue: nextProps.value, value: nextProps.value };
54
- }
55
- return null;
56
- }
57
- render() {
58
- var _a;
59
- const { name, placeholder, step, countryCode, type, options, disabled, readOnly, required, minLength, maxLength, min, max, searchPlaceholder, searchValue, onSearchChange, size, uploadProps, label, monthFormat,
60
- // FIXME pass id to all components that accept it
61
- id, minDate, maxDate, value, mode, } = this.props;
62
- switch (type) {
63
- case constants_1.FormControlType.RADIO:
64
- return ((0, jsx_runtime_1.jsx)(components_1.RadioGroup, { radios: options.map(this.mapOption), name: name, selectedValue: (0, utils_2.getSafeStringOrNumberValue)(value, { coerceValue: true }), onChange: this.handleOnChange }));
65
- case constants_1.FormControlType.CHECKBOX:
66
- return ((0, jsx_runtime_1.jsx)(components_1.Checkbox, { checked: (0, utils_2.getSafeBooleanValue)(value, { coerceValue: true }), disabled: disabled, label: label, required: required, readOnly: readOnly, onChange: this.handleOnChange, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus }));
67
- case constants_1.FormControlType.SELECT: {
68
- const search = options.length >= 20;
69
- return ((0, jsx_runtime_1.jsx)(components_1.Select, { id: id, selected: this.getSelectedOption(options), options: options, search: search, required: required, disabled: disabled, placeholder: placeholder, searchPlaceholder: searchPlaceholder, searchValue: searchValue, onChange: (option) => {
70
- var _a;
71
- this.setState({ selectedOption: option !== null && option !== void 0 ? option : undefined });
72
- this.props.onChange((_a = option === null || option === void 0 ? void 0 : option.value) !== null && _a !== void 0 ? _a : null);
73
- }, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, onSearchChange: search ? onSearchChange : undefined }));
74
- }
75
- case constants_1.FormControlType.TAB:
76
- return ((0, jsx_runtime_1.jsx)(components_1.Tabs, { selected: (((_a = this.getSelectedOption(options)) === null || _a === void 0 ? void 0 : _a.value) || 0), tabs: options.map((option) => ({
77
- title: option.label,
78
- content: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}),
79
- disabled: option.disabled || false,
80
- })), name: id, onTabSelect: (index) => {
81
- const hasSelectedOption = !!this.state.selectedOption;
82
- this.setState({
83
- selectedOption: options.find((option) => option.value === index),
84
- });
85
- this.props.onChange(index, hasSelectedOption ? 'user' : 'init');
86
- } }));
87
- case constants_1.FormControlType.NUMBER:
88
- return ((0, jsx_runtime_1.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: disabled, id: id, max: max, min: min, placeholder: placeholder, readOnly: readOnly, required: required, step: step, type: "number", value: (0, utils_2.getSafeStringOrNumberValue)(value, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: (event) => {
89
- // Input type number target value is a string and needs to be a number
90
- this.props.onChange(parseFloat(event.target.value));
91
- // FIXME: maybe this parsing should be done outside of this component in SchemaFormControl,
92
- // where we know what schema we're working with?
93
- }, onFocus: this.handleOnFocus, onWheel: (event) => {
94
- if (event.target instanceof HTMLElement) {
95
- // To prevent values being changed when input is focussed and user scrolls
96
- event.target.blur();
97
- }
98
- } }));
99
- case constants_1.FormControlType.HIDDEN:
100
- return ((0, jsx_runtime_1.jsx)("input", { type: "hidden", name: name, value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }), id: id }));
101
- case constants_1.FormControlType.PASSWORD:
102
- return ((0, jsx_runtime_1.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: disabled, id: id, placeholder: placeholder, readOnly: readOnly, required: required, type: "password", value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: this.handleInputOnChange, onFocus: this.handleOnFocus }));
103
- case constants_1.FormControlType.DATE:
104
- case constants_1.FormControlType.DATETIME:
105
- return ((0, jsx_runtime_1.jsx)(components_1.DateInput, { disabled: disabled, size: size, value: (0, utils_2.getSafeDateOrStringValue)(value), mode: mode, monthFormat: monthFormat, onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus }));
106
- case constants_1.FormControlType.DATELOOKUP: {
107
- return ((0, jsx_runtime_1.jsx)(components_1.DateLookup
108
- // DateLookup handles null values perfectly well, it's just typed incorrectly
109
- , {
110
- // DateLookup handles null values perfectly well, it's just typed incorrectly
111
- value: (0, utils_2.getSafeDateStringValue)(value), min: minDate, max: maxDate, placeholder: placeholder, monthFormat: monthFormat, disabled: disabled, onChange: (date) => {
112
- // FIXME We need types for DateLookup
113
- this.handleOnChange((0, utils_1.dateToDateString)(date));
114
- }, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus }));
115
- }
116
- case constants_1.FormControlType.TEL:
117
- return ((0, jsx_runtime_1.jsx)(components_1.PhoneNumberInput, { disabled: disabled, countryCode: countryCode, placeholder: placeholder, required: required, searchPlaceholder: searchPlaceholder, size: size, initialValue: (0, utils_2.getSafeStringValue)(value), onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus }));
118
- case constants_1.FormControlType.TEXTAREA: {
119
- const textareaProps = {
120
- className: 'form-control tw-form-control',
121
- id,
122
- name,
123
- placeholder,
124
- value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }),
125
- readOnly,
126
- required,
127
- minLength,
128
- maxLength,
129
- onFocus: this.handleOnFocus,
130
- onBlur: this.handleOnBlur,
131
- disabled,
132
- autoComplete: this.getAutocompleteStatus(),
133
- };
134
- if (this.props.displayPattern) {
135
- return ((0, jsx_runtime_1.jsx)(components_1.TextareaWithDisplayFormat, Object.assign({ displayPattern: this.props.displayPattern }, textareaProps, { onChange: this.handleOnChange })));
136
- }
137
- return (0, jsx_runtime_1.jsx)("textarea", Object.assign({}, textareaProps, { onChange: this.handleInputOnChange }));
138
- }
139
- case constants_1.FormControlType.FILE:
140
- case constants_1.FormControlType.UPLOAD: {
141
- return (
142
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
143
- // @ts-expect-error - TODO: Remove this once Upload is migrated to TypeScript
144
- (0, jsx_runtime_1.jsx)(components_1.Upload, Object.assign({}, uploadProps, { usAccept: uploadProps.usAccept || '*', usDisabled: uploadProps.usDisabled || disabled, onSuccess: (base64url) => {
145
- this.handleOnChange(base64url);
146
- }, onFailure: () => {
147
- this.handleOnChange(null);
148
- }, onCancel: () => {
149
- this.handleOnChange(null);
150
- } })));
151
- }
152
- case constants_1.FormControlType.TEXT:
153
- default: {
154
- const inputProps = {
155
- type: 'text',
156
- className: 'form-control',
157
- id,
158
- name,
159
- placeholder,
160
- value: (0, utils_2.getSafeStringValue)(value, { coerceValue: true }),
161
- readOnly,
162
- required,
163
- minLength,
164
- maxLength,
165
- onFocus: this.handleOnFocus,
166
- onBlur: this.handleOnBlur,
167
- disabled,
168
- autoComplete: this.getAutocompleteStatus(),
169
- };
170
- if (this.props.displayPattern) {
171
- return ((0, jsx_runtime_1.jsx)(components_1.InputWithDisplayFormat, Object.assign({ displayPattern: this.props.displayPattern }, inputProps, { onChange: this.handleOnChange })));
172
- }
173
- return (0, jsx_runtime_1.jsx)("input", Object.assign({}, inputProps, { onChange: this.handleInputOnChange }));
174
- }
175
- }
176
- }
177
- }
178
- exports.default = FormControl;
179
- FormControl.Type = constants_1.FormControlType;
180
- FormControl.Size = constants_1.Size;
181
- FormControl.MonthFormat = constants_1.MonthFormat;
182
- FormControl.DateMode = constants_1.DateMode;
183
- FormControl.defaultProps = {
184
- autoComplete: true,
185
- countryCode: null,
186
- disabled: false,
187
- displayPattern: null,
188
- id: null,
189
- label: '',
190
- max: null,
191
- maxDate: null,
192
- maxLength: null,
193
- min: null,
194
- minDate: null,
195
- minLength: null,
196
- mode: FormControl.DateMode.DAY_MONTH_YEAR,
197
- monthFormat: FormControl.MonthFormat.LONG,
198
- onBlur: null,
199
- onFocus: null,
200
- onSearchChange: null,
201
- options: [],
202
- placeholder: null,
203
- readOnly: false,
204
- required: false,
205
- searchPlaceholder: null,
206
- searchValue: '',
207
- selectedOption: null,
208
- size: FormControl.Size.MEDIUM,
209
- step: 1,
210
- type: FormControl.Type.TEXT,
211
- uploadProps: {},
212
- value: null,
213
- };
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var FormControl_1 = require("./FormControl");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(FormControl_1).default; } });
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./value-utils"), exports);