@wise/dynamic-flow-client 0.4.0-beta-75e4da.4 → 0.4.0-beta-ed6b0e.6

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 (465) hide show
  1. package/build/types/index.d.ts +10 -15
  2. package/build/types/{index.js → types/index.d.ts} +2 -0
  3. package/package.json +3 -4
  4. package/build/common/constants/DateMode.js +0 -4
  5. package/build/common/constants/FormControlType.js +0 -17
  6. package/build/common/constants/MonthFormat.js +0 -4
  7. package/build/common/constants/SchemaType.js +0 -11
  8. package/build/common/constants/Size.js +0 -7
  9. package/build/common/constants/index.js +0 -5
  10. package/build/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +0 -36
  11. package/build/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +0 -13
  12. package/build/common/contexts/eventsContext/EventsContext.js +0 -33
  13. package/build/common/contexts/fetcherContexts/FetcherContexts.js +0 -35
  14. package/build/common/contexts/index.js +0 -4
  15. package/build/common/contexts/logContext/LogContext.js +0 -39
  16. package/build/common/hooks/index.js +0 -7
  17. package/build/common/hooks/useDebouncedFunction/useDebouncedFunction.js +0 -9
  18. package/build/common/hooks/useExternal/useExternal.js +0 -15
  19. package/build/common/hooks/useExternalStepPolling/useExternalStepPolling.js +0 -69
  20. package/build/common/hooks/usePersistAsync/usePersistAsync.js +0 -170
  21. package/build/common/hooks/usePolling/usePolling.js +0 -48
  22. package/build/common/hooks/usePrevious/usePrevious.js +0 -8
  23. package/build/common/hooks/useStepPolling/useStepPolling.js +0 -44
  24. package/build/common/makeFetcher/index.js +0 -1
  25. package/build/common/makeFetcher/makeFetcher.js +0 -33
  26. package/build/common/messages.js +0 -8
  27. package/build/common/utils/api-utils.js +0 -13
  28. package/build/common/utils/date-utils.js +0 -22
  29. package/build/common/utils/debounce.js +0 -38
  30. package/build/common/utils/file-utils.js +0 -45
  31. package/build/common/utils/id-utils.js +0 -5
  32. package/build/common/utils/index.js +0 -8
  33. package/build/common/utils/is-equal.js +0 -21
  34. package/build/common/utils/schema-utils.js +0 -48
  35. package/build/common/utils/step-utils.js +0 -42
  36. package/build/common/validators/index.js +0 -5
  37. package/build/common/validators/models/model-validators.js +0 -63
  38. package/build/common/validators/models/models.utils.js +0 -118
  39. package/build/common/validators/schemas/schema-validators.js +0 -98
  40. package/build/common/validators/types/type-validators.js +0 -14
  41. package/build/common/validators/validationFailures/validation-failures.js +0 -140
  42. package/build/common/validators/validationFailures/validation-failures.utils.js +0 -40
  43. package/build/common/validators/values/value-validators.js +0 -6
  44. package/build/dynamicFlow/DynamicFlow.js +0 -370
  45. package/build/dynamicFlow/DynamicFlowStep.js +0 -32
  46. package/build/dynamicFlow/DynamicFlowTypes.js +0 -4
  47. package/build/dynamicFlow/index.js +0 -1
  48. package/build/dynamicFlow/stories/DynamicFlow.story.js +0 -30
  49. package/build/dynamicFlow/stories/EditableDynamicFlow.js +0 -62
  50. package/build/dynamicFlow/stories/fixtureFetcher.js +0 -114
  51. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.js +0 -45
  52. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundary.messages.js +0 -13
  53. package/build/dynamicFlow/utils/errorBoundary/ErrorBoundaryAlert.js +0 -12
  54. package/build/dynamicFlow/utils/index.js +0 -5
  55. package/build/dynamicFlow/utils/responseParsers/response-parsers.js +0 -125
  56. package/build/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +0 -23
  57. package/build/dynamicFlow/utils/useDynamicFlowState.js +0 -110
  58. package/build/dynamicFlow/utils/useLoader.js +0 -22
  59. package/build/fixtures/components/alert.js +0 -31
  60. package/build/fixtures/components/box.js +0 -20
  61. package/build/fixtures/components/button.js +0 -65
  62. package/build/fixtures/components/columns.js +0 -36
  63. package/build/fixtures/components/copyable.js +0 -22
  64. package/build/fixtures/components/decision.js +0 -54
  65. package/build/fixtures/components/heading.js +0 -14
  66. package/build/fixtures/components/image.js +0 -23
  67. package/build/fixtures/components/index.js +0 -13
  68. package/build/fixtures/components/info.js +0 -17
  69. package/build/fixtures/components/list.js +0 -34
  70. package/build/fixtures/components/loading-indicator.js +0 -16
  71. package/build/fixtures/components/paragraph.js +0 -28
  72. package/build/fixtures/components/review.js +0 -60
  73. package/build/fixtures/examples/camera-capture.js +0 -121
  74. package/build/fixtures/examples/index.js +0 -5
  75. package/build/fixtures/examples/recipient-update.js +0 -250
  76. package/build/fixtures/examples/recipient.js +0 -313
  77. package/build/fixtures/examples/single-file-upload.js +0 -98
  78. package/build/fixtures/examples/step-validation-errors.js +0 -75
  79. package/build/fixtures/features/action-response.js +0 -29
  80. package/build/fixtures/features/external.js +0 -31
  81. package/build/fixtures/features/index.js +0 -5
  82. package/build/fixtures/features/persist-async.js +0 -44
  83. package/build/fixtures/features/polling.js +0 -33
  84. package/build/fixtures/features/validation-async.js +0 -38
  85. package/build/fixtures/index.js +0 -23
  86. package/build/fixtures/jsonSchemaForm/allOf.js +0 -119
  87. package/build/fixtures/jsonSchemaForm/audRecipient.js +0 -1104
  88. package/build/fixtures/jsonSchemaForm/currency.js +0 -48
  89. package/build/fixtures/jsonSchemaForm/multipleFileUploadBase64.js +0 -37
  90. package/build/fixtures/jsonSchemaForm/multipleFileUploadBlob.js +0 -36
  91. package/build/fixtures/jsonSchemaForm/oneOf.js +0 -119
  92. package/build/fixtures/jsonSchemaForm/oneOfTabs.js +0 -53
  93. package/build/fixtures/jsonSchemaForm/promotedOneOf.js +0 -56
  94. package/build/fixtures/jsonSchemaForm/promotedOneOfCheckbox.js +0 -102
  95. package/build/fixtures/jsonSchemaForm/simple.js +0 -48
  96. package/build/fixtures/jsonSchemaForm/uploadPersistAsync.js +0 -71
  97. package/build/fixtures/jsonSchemaForm/validationAsync.js +0 -23
  98. package/build/fixtures/layouts/all.js +0 -176
  99. package/build/fixtures/layouts/final-step-layout.js +0 -39
  100. package/build/fixtures/layouts/index.js +0 -6
  101. package/build/fixtures/layouts/list.js +0 -33
  102. package/build/fixtures/layouts/pay-in.js +0 -97
  103. package/build/fixtures/layouts/review.js +0 -160
  104. package/build/fixtures/layouts/success.js +0 -66
  105. package/build/fixtures/responses/action-response-final.js +0 -24
  106. package/build/fixtures/responses/action.js +0 -2
  107. package/build/fixtures/responses/exit.js +0 -2
  108. package/build/fixtures/responses/index.js +0 -4
  109. package/build/fixtures/responses/recipient-update-final.js +0 -24
  110. package/build/fixtures/schemas/basic-form.js +0 -39
  111. package/build/fixtures/schemas/index.js +0 -4
  112. package/build/fixtures/schemas/number-and-integer.js +0 -41
  113. package/build/fixtures/schemas/one-of.js +0 -223
  114. package/build/fixtures/schemas/string-formats.js +0 -62
  115. package/build/fixtures/utils/image-util.js +0 -18
  116. package/build/formControl/FormControl.js +0 -241
  117. package/build/formControl/index.js +0 -1
  118. package/build/formControl/utils/index.js +0 -1
  119. package/build/formControl/utils/value-utils.js +0 -108
  120. package/build/i18n/index.js +0 -31
  121. package/build/index.d.ts +0 -10
  122. package/build/index.js +0 -8
  123. package/build/jsonSchemaForm/JsonSchemaForm.js +0 -29
  124. package/build/jsonSchemaForm/allOfSchema/AllOfSchema.js +0 -54
  125. package/build/jsonSchemaForm/allOfSchema/index.js +0 -1
  126. package/build/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +0 -25
  127. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +0 -26
  128. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +0 -1
  129. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +0 -140
  130. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.js +0 -18
  131. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +0 -1
  132. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +0 -2
  133. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +0 -84
  134. package/build/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +0 -14
  135. package/build/jsonSchemaForm/arrayTypeSchema/index.js +0 -1
  136. package/build/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +0 -103
  137. package/build/jsonSchemaForm/basicTypeSchema/index.js +0 -1
  138. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.js +0 -79
  139. package/build/jsonSchemaForm/controlFeedback/ControlFeedback.messages.js +0 -53
  140. package/build/jsonSchemaForm/controlFeedback/index.js +0 -1
  141. package/build/jsonSchemaForm/genericSchema/GenericSchema.js +0 -122
  142. package/build/jsonSchemaForm/genericSchema/index.js +0 -1
  143. package/build/jsonSchemaForm/help/Help.js +0 -9
  144. package/build/jsonSchemaForm/help/Help.messages.js +0 -8
  145. package/build/jsonSchemaForm/help/index.js +0 -1
  146. package/build/jsonSchemaForm/index.js +0 -1
  147. package/build/jsonSchemaForm/objectSchema/ObjectSchema.js +0 -78
  148. package/build/jsonSchemaForm/objectSchema/index.js +0 -1
  149. package/build/jsonSchemaForm/oneOfSchema/OneOfSchema.js +0 -150
  150. package/build/jsonSchemaForm/oneOfSchema/index.js +0 -1
  151. package/build/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.js +0 -8
  152. package/build/jsonSchemaForm/oneOfSchema/utils/index.js +0 -2
  153. package/build/jsonSchemaForm/oneOfSchema/utils/one-of-utils.js +0 -64
  154. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +0 -26
  155. package/build/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages.js +0 -8
  156. package/build/jsonSchemaForm/persistAsyncSchema/index.js +0 -1
  157. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +0 -165
  158. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +0 -1
  159. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +0 -126
  160. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +0 -32
  161. package/build/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +0 -1
  162. package/build/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +0 -72
  163. package/build/jsonSchemaForm/promotedOneOfSchema/index.js +0 -1
  164. package/build/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +0 -8
  165. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +0 -27
  166. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +0 -31
  167. package/build/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +0 -32
  168. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +0 -55
  169. package/build/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +0 -13
  170. package/build/jsonSchemaForm/readOnlySchema/index.js +0 -1
  171. package/build/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +0 -104
  172. package/build/jsonSchemaForm/schemaFormControl/index.js +0 -1
  173. package/build/jsonSchemaForm/schemaFormControl/utils/currency-utils.js +0 -73
  174. package/build/jsonSchemaForm/schemaFormControl/utils/index.js +0 -1
  175. package/build/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +0 -95
  176. package/build/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +0 -146
  177. package/build/jsonSchemaForm/validationAsyncSchema/index.js +0 -1
  178. package/build/layout/DynamicLayout.js +0 -61
  179. package/build/layout/alert/DynamicAlert.js +0 -29
  180. package/build/layout/box/DynamicBox.js +0 -41
  181. package/build/layout/button/DynamicButton.js +0 -58
  182. package/build/layout/columns/DynamicColumns.js +0 -38
  183. package/build/layout/decision/DynamicDecision.js +0 -38
  184. package/build/layout/divider/DynamicDivider.js +0 -9
  185. package/build/layout/external/DynamicExternal.js +0 -32
  186. package/build/layout/external/DynamicExternal.messages.js +0 -8
  187. package/build/layout/form/DynamicForm.js +0 -22
  188. package/build/layout/heading/DynamicHeading.js +0 -31
  189. package/build/layout/icon/DynamicIcon.js +0 -23
  190. package/build/layout/image/DynamicImage.js +0 -110
  191. package/build/layout/index.js +0 -17
  192. package/build/layout/info/DynamicInfo.js +0 -19
  193. package/build/layout/list/DynamicList.js +0 -31
  194. package/build/layout/loadingIndicator/DynamicLoadingIndicator.js +0 -11
  195. package/build/layout/paragraph/DynamicParagraph.js +0 -43
  196. package/build/layout/paragraph/DynamicParagraph.messages.js +0 -13
  197. package/build/layout/paragraph/useSnackBarIfAvailable.js +0 -9
  198. package/build/layout/review/DynamicReview.js +0 -33
  199. package/build/layout/utils.js +0 -31
  200. package/build/step/cameraStep/CameraStep.js +0 -125
  201. package/build/step/cameraStep/cameraCapture/CameraCapture.js +0 -122
  202. package/build/step/cameraStep/cameraCapture/CameraCapture.messages.js +0 -18
  203. package/build/step/cameraStep/cameraCapture/components/index.js +0 -28
  204. package/build/step/cameraStep/cameraCapture/hooks/index.js +0 -80
  205. package/build/step/cameraStep/cameraCapture/index.js +0 -1
  206. package/build/step/cameraStep/cameraCapture/overlay/Overlay.js +0 -78
  207. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.js +0 -19
  208. package/build/step/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.js +0 -13
  209. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.js +0 -21
  210. package/build/step/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.js +0 -18
  211. package/build/step/cameraStep/cameraCapture/screens/index.js +0 -2
  212. package/build/step/cameraStep/cameraCapture/tracking/index.js +0 -98
  213. package/build/step/cameraStep/cameraCapture/utils/index.js +0 -103
  214. package/build/step/cameraStep/index.js +0 -1
  215. package/build/step/externalConfirmationStep/ExternalConfirmationStep.js +0 -64
  216. package/build/step/externalConfirmationStep/ExternalConfirmationStep.messages.js +0 -23
  217. package/build/step/externalConfirmationStep/index.js +0 -1
  218. package/build/step/index.js +0 -3
  219. package/build/step/layoutStep/LayoutStep.js +0 -33
  220. package/build/step/layoutStep/index.js +0 -1
  221. package/build/step/layoutStep/utils/index.js +0 -2
  222. package/build/step/layoutStep/utils/inline-reference-utils.js +0 -91
  223. package/build/step/layoutStep/utils/layout-utils.js +0 -217
  224. package/build/types/common/FormControl.js +0 -1
  225. package/build/types/specification/Action.js +0 -1
  226. package/build/types/specification/FileUploadSchema.js +0 -4
  227. package/build/types/specification/LayoutComponent.js +0 -1
  228. package/build/types/specification/Model.js +0 -29
  229. package/build/types/specification/PersistAsync.js +0 -1
  230. package/build/types/specification/Polling.js +0 -1
  231. package/build/types/specification/Promotion.js +0 -1
  232. package/build/types/specification/Schema.js +0 -50
  233. package/build/types/specification/Step.js +0 -4
  234. package/build/types/specification/ValidationAsync.js +0 -1
  235. package/build/types/specification/core.js +0 -1
  236. /package/build/{common → types/common}/constants/DateMode.d.ts +0 -0
  237. /package/build/{common → types/common}/constants/FormControlType.d.ts +0 -0
  238. /package/build/{common → types/common}/constants/MonthFormat.d.ts +0 -0
  239. /package/build/{common → types/common}/constants/SchemaType.d.ts +0 -0
  240. /package/build/{common → types/common}/constants/Size.d.ts +0 -0
  241. /package/build/{common → types/common}/constants/index.d.ts +0 -0
  242. /package/build/{common → types/common}/contexts/dynamicFlowContexts/DynamicFlowContexts.d.ts +0 -0
  243. /package/build/{common → types/common}/contexts/dynamicFlowContexts/usePendingPromiseCounter.d.ts +0 -0
  244. /package/build/{common → types/common}/contexts/eventsContext/EventsContext.d.ts +0 -0
  245. /package/build/{common → types/common}/contexts/fetcherContexts/FetcherContexts.d.ts +0 -0
  246. /package/build/{common → types/common}/contexts/index.d.ts +0 -0
  247. /package/build/{common → types/common}/contexts/logContext/LogContext.d.ts +0 -0
  248. /package/build/{common → types/common}/hooks/index.d.ts +0 -0
  249. /package/build/{common → types/common}/hooks/useDebouncedFunction/useDebouncedFunction.d.ts +0 -0
  250. /package/build/{common → types/common}/hooks/useExternal/useExternal.d.ts +0 -0
  251. /package/build/{common → types/common}/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +0 -0
  252. /package/build/{common → types/common}/hooks/usePersistAsync/usePersistAsync.d.ts +0 -0
  253. /package/build/{common → types/common}/hooks/usePolling/usePolling.d.ts +0 -0
  254. /package/build/{common → types/common}/hooks/usePrevious/usePrevious.d.ts +0 -0
  255. /package/build/{common → types/common}/hooks/useStepPolling/useStepPolling.d.ts +0 -0
  256. /package/build/{common → types/common}/makeFetcher/index.d.ts +0 -0
  257. /package/build/{common → types/common}/makeFetcher/makeFetcher.d.ts +0 -0
  258. /package/build/{common → types/common}/messages.d.ts +0 -0
  259. /package/build/{common → types/common}/utils/api-utils.d.ts +0 -0
  260. /package/build/{common → types/common}/utils/date-utils.d.ts +0 -0
  261. /package/build/{common → types/common}/utils/debounce.d.ts +0 -0
  262. /package/build/{common → types/common}/utils/file-utils.d.ts +0 -0
  263. /package/build/{common → types/common}/utils/id-utils.d.ts +0 -0
  264. /package/build/{common → types/common}/utils/index.d.ts +0 -0
  265. /package/build/{common → types/common}/utils/is-equal.d.ts +0 -0
  266. /package/build/{common → types/common}/utils/schema-utils.d.ts +0 -0
  267. /package/build/{common → types/common}/utils/step-utils.d.ts +0 -0
  268. /package/build/{common → types/common}/validators/index.d.ts +0 -0
  269. /package/build/{common → types/common}/validators/models/model-validators.d.ts +0 -0
  270. /package/build/{common → types/common}/validators/models/models.utils.d.ts +0 -0
  271. /package/build/{common → types/common}/validators/schemas/schema-validators.d.ts +0 -0
  272. /package/build/{common → types/common}/validators/types/type-validators.d.ts +0 -0
  273. /package/build/{common → types/common}/validators/validationFailures/validation-failures.d.ts +0 -0
  274. /package/build/{common → types/common}/validators/validationFailures/validation-failures.utils.d.ts +0 -0
  275. /package/build/{common → types/common}/validators/values/value-validators.d.ts +0 -0
  276. /package/build/{dynamicFlow → types/dynamicFlow}/DynamicFlow.d.ts +0 -0
  277. /package/build/{dynamicFlow → types/dynamicFlow}/DynamicFlowStep.d.ts +0 -0
  278. /package/build/{dynamicFlow → types/dynamicFlow}/DynamicFlowTypes.d.ts +0 -0
  279. /package/build/{dynamicFlow → types/dynamicFlow}/index.d.ts +0 -0
  280. /package/build/{dynamicFlow → types/dynamicFlow}/stories/DynamicFlow.story.d.ts +0 -0
  281. /package/build/{dynamicFlow → types/dynamicFlow}/stories/EditableDynamicFlow.d.ts +0 -0
  282. /package/build/{dynamicFlow → types/dynamicFlow}/stories/fixtureFetcher.d.ts +0 -0
  283. /package/build/{dynamicFlow → types/dynamicFlow}/utils/errorBoundary/ErrorBoundary.d.ts +0 -0
  284. /package/build/{dynamicFlow → types/dynamicFlow}/utils/errorBoundary/ErrorBoundary.messages.d.ts +0 -0
  285. /package/build/{dynamicFlow → types/dynamicFlow}/utils/errorBoundary/ErrorBoundaryAlert.d.ts +0 -0
  286. /package/build/{dynamicFlow → types/dynamicFlow}/utils/index.d.ts +0 -0
  287. /package/build/{dynamicFlow → types/dynamicFlow}/utils/responseParsers/response-parsers.d.ts +0 -0
  288. /package/build/{dynamicFlow → types/dynamicFlow}/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +0 -0
  289. /package/build/{dynamicFlow → types/dynamicFlow}/utils/useDynamicFlowState.d.ts +0 -0
  290. /package/build/{dynamicFlow → types/dynamicFlow}/utils/useLoader.d.ts +0 -0
  291. /package/build/{fixtures → types/fixtures}/components/alert.d.ts +0 -0
  292. /package/build/{fixtures → types/fixtures}/components/box.d.ts +0 -0
  293. /package/build/{fixtures → types/fixtures}/components/button.d.ts +0 -0
  294. /package/build/{fixtures → types/fixtures}/components/columns.d.ts +0 -0
  295. /package/build/{fixtures → types/fixtures}/components/copyable.d.ts +0 -0
  296. /package/build/{fixtures → types/fixtures}/components/decision.d.ts +0 -0
  297. /package/build/{fixtures → types/fixtures}/components/heading.d.ts +0 -0
  298. /package/build/{fixtures → types/fixtures}/components/image.d.ts +0 -0
  299. /package/build/{fixtures → types/fixtures}/components/index.d.ts +0 -0
  300. /package/build/{fixtures → types/fixtures}/components/info.d.ts +0 -0
  301. /package/build/{fixtures → types/fixtures}/components/list.d.ts +0 -0
  302. /package/build/{fixtures → types/fixtures}/components/loading-indicator.d.ts +0 -0
  303. /package/build/{fixtures → types/fixtures}/components/paragraph.d.ts +0 -0
  304. /package/build/{fixtures → types/fixtures}/components/review.d.ts +0 -0
  305. /package/build/{fixtures → types/fixtures}/examples/camera-capture.d.ts +0 -0
  306. /package/build/{fixtures → types/fixtures}/examples/index.d.ts +0 -0
  307. /package/build/{fixtures → types/fixtures}/examples/recipient-update.d.ts +0 -0
  308. /package/build/{fixtures → types/fixtures}/examples/recipient.d.ts +0 -0
  309. /package/build/{fixtures → types/fixtures}/examples/single-file-upload.d.ts +0 -0
  310. /package/build/{fixtures → types/fixtures}/examples/step-validation-errors.d.ts +0 -0
  311. /package/build/{fixtures → types/fixtures}/features/action-response.d.ts +0 -0
  312. /package/build/{fixtures → types/fixtures}/features/external.d.ts +0 -0
  313. /package/build/{fixtures → types/fixtures}/features/index.d.ts +0 -0
  314. /package/build/{fixtures → types/fixtures}/features/persist-async.d.ts +0 -0
  315. /package/build/{fixtures → types/fixtures}/features/polling.d.ts +0 -0
  316. /package/build/{fixtures → types/fixtures}/features/validation-async.d.ts +0 -0
  317. /package/build/{fixtures → types/fixtures}/index.d.ts +0 -0
  318. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/allOf.d.ts +0 -0
  319. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/audRecipient.d.ts +0 -0
  320. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/currency.d.ts +0 -0
  321. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/multipleFileUploadBase64.d.ts +0 -0
  322. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/multipleFileUploadBlob.d.ts +0 -0
  323. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/oneOf.d.ts +0 -0
  324. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/oneOfTabs.d.ts +0 -0
  325. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/promotedOneOf.d.ts +0 -0
  326. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/promotedOneOfCheckbox.d.ts +0 -0
  327. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/simple.d.ts +0 -0
  328. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/uploadPersistAsync.d.ts +0 -0
  329. /package/build/{fixtures → types/fixtures}/jsonSchemaForm/validationAsync.d.ts +0 -0
  330. /package/build/{fixtures → types/fixtures}/layouts/all.d.ts +0 -0
  331. /package/build/{fixtures → types/fixtures}/layouts/final-step-layout.d.ts +0 -0
  332. /package/build/{fixtures → types/fixtures}/layouts/index.d.ts +0 -0
  333. /package/build/{fixtures → types/fixtures}/layouts/list.d.ts +0 -0
  334. /package/build/{fixtures → types/fixtures}/layouts/pay-in.d.ts +0 -0
  335. /package/build/{fixtures → types/fixtures}/layouts/review.d.ts +0 -0
  336. /package/build/{fixtures → types/fixtures}/layouts/success.d.ts +0 -0
  337. /package/build/{fixtures → types/fixtures}/responses/action-response-final.d.ts +0 -0
  338. /package/build/{fixtures → types/fixtures}/responses/action.d.ts +0 -0
  339. /package/build/{fixtures → types/fixtures}/responses/exit.d.ts +0 -0
  340. /package/build/{fixtures → types/fixtures}/responses/index.d.ts +0 -0
  341. /package/build/{fixtures → types/fixtures}/responses/recipient-update-final.d.ts +0 -0
  342. /package/build/{fixtures → types/fixtures}/schemas/basic-form.d.ts +0 -0
  343. /package/build/{fixtures → types/fixtures}/schemas/index.d.ts +0 -0
  344. /package/build/{fixtures → types/fixtures}/schemas/number-and-integer.d.ts +0 -0
  345. /package/build/{fixtures → types/fixtures}/schemas/one-of.d.ts +0 -0
  346. /package/build/{fixtures → types/fixtures}/schemas/string-formats.d.ts +0 -0
  347. /package/build/{fixtures → types/fixtures}/utils/image-util.d.ts +0 -0
  348. /package/build/{formControl → types/formControl}/FormControl.d.ts +0 -0
  349. /package/build/{formControl → types/formControl}/index.d.ts +0 -0
  350. /package/build/{formControl → types/formControl}/utils/index.d.ts +0 -0
  351. /package/build/{formControl → types/formControl}/utils/value-utils.d.ts +0 -0
  352. /package/build/{i18n → types/i18n}/index.d.ts +0 -0
  353. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/JsonSchemaForm.d.ts +0 -0
  354. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/allOfSchema/AllOfSchema.d.ts +0 -0
  355. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/allOfSchema/index.d.ts +0 -0
  356. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/ArraySchema.d.ts +0 -0
  357. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +0 -0
  358. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/index.d.ts +0 -0
  359. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +0 -0
  360. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.messages.d.ts +0 -0
  361. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.d.ts +0 -0
  362. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.d.ts +0 -0
  363. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.d.ts +0 -0
  364. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.d.ts +0 -0
  365. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/arrayTypeSchema/index.d.ts +0 -0
  366. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/basicTypeSchema/BasicTypeSchema.d.ts +0 -0
  367. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/basicTypeSchema/index.d.ts +0 -0
  368. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/controlFeedback/ControlFeedback.d.ts +0 -0
  369. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/controlFeedback/ControlFeedback.messages.d.ts +0 -0
  370. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/controlFeedback/index.d.ts +0 -0
  371. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/genericSchema/GenericSchema.d.ts +0 -0
  372. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/genericSchema/index.d.ts +0 -0
  373. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/help/Help.d.ts +0 -0
  374. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/help/Help.messages.d.ts +0 -0
  375. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/help/index.d.ts +0 -0
  376. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/index.d.ts +0 -0
  377. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/objectSchema/ObjectSchema.d.ts +0 -0
  378. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/objectSchema/index.d.ts +0 -0
  379. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/OneOfSchema.d.ts +0 -0
  380. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/index.d.ts +0 -0
  381. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/utils/const-schema-utils.d.ts +0 -0
  382. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/utils/index.d.ts +0 -0
  383. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/oneOfSchema/utils/one-of-utils.d.ts +0 -0
  384. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.d.ts +0 -0
  385. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/PersistAsyncSchema.messages.d.ts +0 -0
  386. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/index.d.ts +0 -0
  387. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +0 -0
  388. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBasicSchema/index.d.ts +0 -0
  389. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +0 -0
  390. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +0 -0
  391. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/persistAsyncSchema/persistAsyncBlobSchema/index.d.ts +0 -0
  392. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/PromotedOneOfSchema.d.ts +0 -0
  393. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/index.d.ts +0 -0
  394. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promoted-one-of-utils.d.ts +0 -0
  395. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.d.ts +0 -0
  396. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +0 -0
  397. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.d.ts +0 -0
  398. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/readOnlySchema/ReadOnlySchema.d.ts +0 -0
  399. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/readOnlySchema/ReadOnlySchema.messages.d.ts +0 -0
  400. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/readOnlySchema/index.d.ts +0 -0
  401. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/SchemaFormControl.d.ts +0 -0
  402. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/index.d.ts +0 -0
  403. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/utils/currency-utils.d.ts +0 -0
  404. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/utils/index.d.ts +0 -0
  405. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/schemaFormControl/utils/mapping-utils.d.ts +0 -0
  406. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/validationAsyncSchema/ValidationAsyncSchema.d.ts +0 -0
  407. /package/build/{jsonSchemaForm → types/jsonSchemaForm}/validationAsyncSchema/index.d.ts +0 -0
  408. /package/build/{layout → types/layout}/DynamicLayout.d.ts +0 -0
  409. /package/build/{layout → types/layout}/alert/DynamicAlert.d.ts +0 -0
  410. /package/build/{layout → types/layout}/box/DynamicBox.d.ts +0 -0
  411. /package/build/{layout → types/layout}/button/DynamicButton.d.ts +0 -0
  412. /package/build/{layout → types/layout}/columns/DynamicColumns.d.ts +0 -0
  413. /package/build/{layout → types/layout}/decision/DynamicDecision.d.ts +0 -0
  414. /package/build/{layout → types/layout}/divider/DynamicDivider.d.ts +0 -0
  415. /package/build/{layout → types/layout}/external/DynamicExternal.d.ts +0 -0
  416. /package/build/{layout → types/layout}/external/DynamicExternal.messages.d.ts +0 -0
  417. /package/build/{layout → types/layout}/form/DynamicForm.d.ts +0 -0
  418. /package/build/{layout → types/layout}/heading/DynamicHeading.d.ts +0 -0
  419. /package/build/{layout → types/layout}/icon/DynamicIcon.d.ts +0 -0
  420. /package/build/{layout → types/layout}/image/DynamicImage.d.ts +0 -0
  421. /package/build/{layout → types/layout}/index.d.ts +0 -0
  422. /package/build/{layout → types/layout}/info/DynamicInfo.d.ts +0 -0
  423. /package/build/{layout → types/layout}/list/DynamicList.d.ts +0 -0
  424. /package/build/{layout → types/layout}/loadingIndicator/DynamicLoadingIndicator.d.ts +0 -0
  425. /package/build/{layout → types/layout}/paragraph/DynamicParagraph.d.ts +0 -0
  426. /package/build/{layout → types/layout}/paragraph/DynamicParagraph.messages.d.ts +0 -0
  427. /package/build/{layout → types/layout}/paragraph/useSnackBarIfAvailable.d.ts +0 -0
  428. /package/build/{layout → types/layout}/review/DynamicReview.d.ts +0 -0
  429. /package/build/{layout → types/layout}/utils.d.ts +0 -0
  430. /package/build/{step → types/step}/cameraStep/CameraStep.d.ts +0 -0
  431. /package/build/{step → types/step}/cameraStep/cameraCapture/CameraCapture.d.ts +0 -0
  432. /package/build/{step → types/step}/cameraStep/cameraCapture/CameraCapture.messages.d.ts +0 -0
  433. /package/build/{step → types/step}/cameraStep/cameraCapture/components/index.d.ts +0 -0
  434. /package/build/{step → types/step}/cameraStep/cameraCapture/hooks/index.d.ts +0 -0
  435. /package/build/{step → types/step}/cameraStep/cameraCapture/index.d.ts +0 -0
  436. /package/build/{step → types/step}/cameraStep/cameraCapture/overlay/Overlay.d.ts +0 -0
  437. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.d.ts +0 -0
  438. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/CameraNotSupported/CameraNotSupported.messages.d.ts +0 -0
  439. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.d.ts +0 -0
  440. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/NoCameraAccess/NoCameraAccess.messages.d.ts +0 -0
  441. /package/build/{step → types/step}/cameraStep/cameraCapture/screens/index.d.ts +0 -0
  442. /package/build/{step → types/step}/cameraStep/cameraCapture/tracking/index.d.ts +0 -0
  443. /package/build/{step → types/step}/cameraStep/cameraCapture/utils/index.d.ts +0 -0
  444. /package/build/{step → types/step}/cameraStep/index.d.ts +0 -0
  445. /package/build/{step → types/step}/externalConfirmationStep/ExternalConfirmationStep.d.ts +0 -0
  446. /package/build/{step → types/step}/externalConfirmationStep/ExternalConfirmationStep.messages.d.ts +0 -0
  447. /package/build/{step → types/step}/externalConfirmationStep/index.d.ts +0 -0
  448. /package/build/{step → types/step}/index.d.ts +0 -0
  449. /package/build/{step → types/step}/layoutStep/LayoutStep.d.ts +0 -0
  450. /package/build/{step → types/step}/layoutStep/index.d.ts +0 -0
  451. /package/build/{step → types/step}/layoutStep/utils/index.d.ts +0 -0
  452. /package/build/{step → types/step}/layoutStep/utils/inline-reference-utils.d.ts +0 -0
  453. /package/build/{step → types/step}/layoutStep/utils/layout-utils.d.ts +0 -0
  454. /package/build/types/{common → types/common}/FormControl.d.ts +0 -0
  455. /package/build/types/{specification → types/specification}/Action.d.ts +0 -0
  456. /package/build/types/{specification → types/specification}/FileUploadSchema.d.ts +0 -0
  457. /package/build/types/{specification → types/specification}/LayoutComponent.d.ts +0 -0
  458. /package/build/types/{specification → types/specification}/Model.d.ts +0 -0
  459. /package/build/types/{specification → types/specification}/PersistAsync.d.ts +0 -0
  460. /package/build/types/{specification → types/specification}/Polling.d.ts +0 -0
  461. /package/build/types/{specification → types/specification}/Promotion.d.ts +0 -0
  462. /package/build/types/{specification → types/specification}/Schema.d.ts +0 -0
  463. /package/build/types/{specification → types/specification}/Step.d.ts +0 -0
  464. /package/build/types/{specification → types/specification}/ValidationAsync.d.ts +0 -0
  465. /package/build/types/{specification → types/specification}/core.d.ts +0 -0
@@ -1,15 +1,10 @@
1
- export * from './specification/core';
2
- export * from './specification/Action';
3
- export * from './specification/LayoutComponent';
4
- export * from './specification/Model';
5
- export * from './specification/Polling';
6
- export * from './specification/Step';
7
- export * from './specification/PersistAsync';
8
- export * from './specification/ValidationAsync';
9
- export * from './specification/Promotion';
10
- export type { Schema, AllOfSchema, ArraySchema, BasicSchema, BlobSchema, BooleanSchema, ConstSchema, IntegerSchema, MultipleFileUploadSchema, NumberSchema, ObjectSchema, OneOfObjectSchema, OneOfSchema, PersistAsyncSchema, StringSchema, ListArraySchema, TupleArraySchema, ValidationAsyncSchema, } from './specification/Schema';
11
- export { isObjectSchema, isOneOfSchema, isAllOfSchema, isBlobSchema, isArraySchema, isTupleArraySchema, isListArraySchema, isValidationAsyncSchema, isPersistAsyncSchema, isBasicSchema, } from './specification/Schema';
12
- export type { FileUploadSchema, CameraDirection } from './specification/FileUploadSchema';
13
- export { isFileUploadSchema } from './specification/FileUploadSchema';
14
- export { isBasicError } from './specification/Step';
15
- export * from './common/FormControl';
1
+ export { convertStepToLayout, inlineReferences } from './step/layoutStep/utils';
2
+ export { default as DynamicFlow } from './dynamicFlow';
3
+ export { makeFetcher } from './common/makeFetcher';
4
+ export { default as JsonSchemaForm } from './jsonSchemaForm';
5
+ export { DynamicLayout as Layout } from './layout';
6
+ export { isValidSchema } from './common/validators';
7
+ export { default as translations } from './i18n';
8
+ export * from './dynamicFlow/DynamicFlow';
9
+ export type { DynamicFlowProps } from './dynamicFlow/DynamicFlowTypes';
10
+ export type { Step } from './types';
@@ -7,7 +7,9 @@ export * from './specification/Step';
7
7
  export * from './specification/PersistAsync';
8
8
  export * from './specification/ValidationAsync';
9
9
  export * from './specification/Promotion';
10
+ export type { Schema, AllOfSchema, ArraySchema, BasicSchema, BlobSchema, BooleanSchema, ConstSchema, IntegerSchema, MultipleFileUploadSchema, NumberSchema, ObjectSchema, OneOfObjectSchema, OneOfSchema, PersistAsyncSchema, StringSchema, ListArraySchema, TupleArraySchema, ValidationAsyncSchema, } from './specification/Schema';
10
11
  export { isObjectSchema, isOneOfSchema, isAllOfSchema, isBlobSchema, isArraySchema, isTupleArraySchema, isListArraySchema, isValidationAsyncSchema, isPersistAsyncSchema, isBasicSchema, } from './specification/Schema';
12
+ export type { FileUploadSchema, CameraDirection } from './specification/FileUploadSchema';
11
13
  export { isFileUploadSchema } from './specification/FileUploadSchema';
12
14
  export { isBasicError } from './specification/Step';
13
15
  export * from './common/FormControl';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "0.4.0-beta-75e4da.4",
3
+ "version": "0.4.0-beta-ed6b0e.6",
4
4
  "description": "Dynamic Flow web client",
5
5
  "main": "./build/main.min.js",
6
6
  "types": "./build/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "scripts": {
20
20
  "dev": "storybook dev -p 3003",
21
21
  "build": "npm-run-all build:*",
22
- "build:esm": "tsc --build ./tsconfig.build.json",
22
+ "build:types": "tsc --build ./tsconfig.build.json",
23
23
  "build:js": "node ./scripts/build-min.mjs",
24
24
  "build:css": "postcss src/main.css -o build/main.css",
25
25
  "build:messages-source": "formatjs extract 'src/**/*.messages.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
@@ -29,10 +29,9 @@
29
29
  "test:coverage": "jest --config jest.config.js --env=jsdom --coverage",
30
30
  "test:tz": "TZ=US/Pacific jest ./src/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js ./src/formControl/FormControl.spec.js",
31
31
  "test:watch": "pnpm test:once --watch",
32
- "lint": "npm-run-all lint:ts lint:css",
32
+ "lint": "npm-run-all lint:*",
33
33
  "lint:ts": "eslint 'src/**/*.{js,jsx,ts,tsx}' --quiet",
34
34
  "lint:css": "stylelint './src/**/*.css'",
35
- "types": "tsc --noEmit",
36
35
  "build-storybook": "storybook build -c .storybook"
37
36
  },
38
37
  "devDependencies": {
@@ -1,4 +0,0 @@
1
- export var DateMode = {
2
- DAY_MONTH_YEAR: 'day-month-year',
3
- MONTH_YEAR: 'month-year'
4
- };
@@ -1,17 +0,0 @@
1
- export var FormControlType = {
2
- RADIO: 'radio',
3
- CHECKBOX: 'checkbox',
4
- SELECT: 'select',
5
- FILE: 'file',
6
- DATE: 'date',
7
- DATETIME: 'date-time',
8
- DATELOOKUP: 'date-lookup',
9
- TEL: 'tel',
10
- NUMBER: 'number',
11
- HIDDEN: 'hidden',
12
- PASSWORD: 'password',
13
- TEXT: 'text',
14
- TEXTAREA: 'textarea',
15
- UPLOAD: 'upload',
16
- TAB: 'tab'
17
- };
@@ -1,4 +0,0 @@
1
- export var MonthFormat = {
2
- SHORT: 'short',
3
- LONG: 'long'
4
- };
@@ -1,11 +0,0 @@
1
- export var SchemaType = {
2
- READ_ONLY: 'readOnly',
3
- PERSIST_ASYNC: 'persistAsync',
4
- VALIDATION_ASYNC: 'validationAsync',
5
- OBJECT: 'object',
6
- PROMOTED_ONE_OF: 'promotedOneOf',
7
- ONE_OF: 'oneOf',
8
- ALL_OF: 'allOf',
9
- BASIC: 'basic',
10
- ARRAY: 'array'
11
- };
@@ -1,7 +0,0 @@
1
- export var Size = {
2
- EXTRA_SMALL: 'xs',
3
- SMALL: 'sm',
4
- MEDIUM: 'md',
5
- LARGE: 'lg',
6
- EXTRA_LARGE: 'xl'
7
- };
@@ -1,5 +0,0 @@
1
- export * from './DateMode';
2
- export * from './FormControlType';
3
- export * from './MonthFormat';
4
- export * from './SchemaType';
5
- export * from './Size';
@@ -1,36 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { createContext, useContext, useMemo } from 'react';
14
- import { usePendingPromiseCounter } from './usePendingPromiseCounter';
15
- var defaultContextValue = {
16
- loading: false,
17
- registerPersistAsyncPromise: function (promise) {
18
- //
19
- }
20
- };
21
- var DFContext = createContext(defaultContextValue);
22
- export var DynamicFlowProvider = function (_a) {
23
- var loading = _a.loading, children = _a.children;
24
- var _b = usePendingPromiseCounter(), pendingPromises = _b.pendingPromises, addPendingPromise = _b.addPendingPromise;
25
- var providerValue = useMemo(function () {
26
- return {
27
- loading: loading || pendingPromises > 0,
28
- registerPersistAsyncPromise: addPendingPromise
29
- };
30
- }, [loading, pendingPromises, addPendingPromise]);
31
- return _jsx(DFContext.Provider, __assign({ value: providerValue }, { children: children }));
32
- };
33
- export var useDynamicFlow = function () {
34
- var context = useContext(DFContext);
35
- return context || defaultContextValue;
36
- };
@@ -1,13 +0,0 @@
1
- import { useCallback, useState } from 'react';
2
- export function usePendingPromiseCounter() {
3
- var _a = useState(0), count = _a[0], setCount = _a[1];
4
- var addPendingPromise = useCallback(function (promise) {
5
- setCount(function (c) { return c + 1; });
6
- promise["catch"](noop)["finally"](function () { return delayUntilNextCycle(function () { return setCount(function (c) { return Math.max(0, c - 1); }); }); });
7
- }, [setCount]);
8
- return { addPendingPromise: addPendingPromise, pendingPromises: count };
9
- }
10
- var delayUntilNextCycle = function (fn) { return setTimeout(function () { return fn(); }, 0); };
11
- var noop = function () {
12
- // no-op
13
- };
@@ -1,33 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { createContext, useContext, useMemo } from 'react';
14
- var EventsContext = createContext({
15
- triggerEvent: function () {
16
- // noop
17
- }
18
- });
19
- export var EventsContextProvider = function (_a) {
20
- var metadata = _a.metadata, children = _a.children, onEvent = _a.onEvent;
21
- var value = useMemo(function () { return ({ triggerEvent: getEventDispatcher(onEvent, metadata) }); }, [onEvent, metadata]);
22
- return _jsx(EventsContext.Provider, __assign({ value: value }, { children: children }));
23
- };
24
- export function useEventDispatcher() {
25
- var triggerEvent = useContext(EventsContext).triggerEvent;
26
- return triggerEvent;
27
- }
28
- export var getEventDispatcher = function (onEvent, metadata) {
29
- return function (eventName, properties) {
30
- if (properties === void 0) { properties = {}; }
31
- return onEvent(eventName, __assign(__assign({}, metadata), properties));
32
- };
33
- };
@@ -1,35 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { createContext, useContext, useMemo } from 'react';
14
- import { makeFetcher } from '../../makeFetcher';
15
- var FetcherContext = createContext(undefined);
16
- export var FetcherProvider = function (_a) {
17
- var fetcher = _a.fetcher, children = _a.children;
18
- return _jsx(FetcherContext.Provider, __assign({ value: fetcher }, { children: children }));
19
- };
20
- export var FetcherProviderFromBaseUrl = function (_a) {
21
- var baseUrl = _a.baseUrl, children = _a.children;
22
- var fetcher = useMemo(function () { return makeFetcher(baseUrl); }, [baseUrl]);
23
- return _jsx(FetcherContext.Provider, __assign({ value: fetcher }, { children: children }));
24
- };
25
- /**
26
- * Provides the fetch(er) function for dynamic flows asynchronous operations.
27
- */
28
- export var useFetcher = function () {
29
- var contextFetch = useContext(FetcherContext);
30
- return contextFetch || fetch;
31
- };
32
- export var useHasFetcherProvider = function () {
33
- var context = useContext(FetcherContext);
34
- return !!context;
35
- };
@@ -1,4 +0,0 @@
1
- export * from './dynamicFlowContexts/DynamicFlowContexts';
2
- export * from './eventsContext/EventsContext';
3
- export * from './fetcherContexts/FetcherContexts';
4
- export * from './logContext/LogContext';
@@ -1,39 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { createContext, useContext, useMemo } from 'react';
14
- export var getLogger = function (level, onLog, flowId, stepId) {
15
- if (flowId === void 0) { flowId = 'UNKNOWN-FLOW-ID'; }
16
- if (stepId === void 0) { stepId = 'UNKNOWN-FLOW-ID'; }
17
- return function (title, description, extra) {
18
- return onLog(level, "Dynamic Flow ".concat(level, " - ").concat(title, " - ").concat(description), __assign({ flowId: flowId, stepId: stepId }, extra));
19
- };
20
- };
21
- var LogContext = createContext(null);
22
- export var LogProvider = function (_a) {
23
- var flowId = _a.flowId, stepId = _a.stepId, children = _a.children, onLog = _a.onLog;
24
- var value = useMemo(function () { return ({
25
- debug: getLogger('debug', onLog, flowId, stepId),
26
- info: getLogger('info', onLog, flowId, stepId),
27
- warning: getLogger('warning', onLog, flowId, stepId),
28
- error: getLogger('error', onLog, flowId, stepId),
29
- critical: getLogger('critical', onLog, flowId, stepId)
30
- }); }, [onLog, flowId, stepId]);
31
- return _jsx(LogContext.Provider, __assign({ value: value }, { children: children }));
32
- };
33
- export var useLogger = function () {
34
- var logging = useContext(LogContext);
35
- if (logging == null) {
36
- throw new Error('Logging context not found. Did you forget to wrap your component in a <LogProvider />?');
37
- }
38
- return logging;
39
- };
@@ -1,7 +0,0 @@
1
- export * from './useDebouncedFunction/useDebouncedFunction';
2
- export * from './useExternal/useExternal';
3
- export * from './useExternalStepPolling/useExternalStepPolling';
4
- export * from './usePersistAsync/usePersistAsync';
5
- export * from './usePolling/usePolling';
6
- export * from './usePrevious/usePrevious';
7
- export * from './useStepPolling/useStepPolling';
@@ -1,9 +0,0 @@
1
- /* References:
2
- - https://github.com/gnbaron/use-lodash-debounce
3
- - https://dmitripavlutin.com/react-throttle-debounce/
4
- */
5
- import { useCallback } from 'react';
6
- import { debounce } from '../../utils';
7
- export function useDebouncedFunction(callback, waitMs) {
8
- return useCallback(debounce(callback, waitMs), [callback, waitMs]);
9
- }
@@ -1,15 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- export function useExternal(url) {
3
- // If we fail to open the window, the user will need to open this on their own
4
- var _a = useState(null), externalWindow = _a[0], setExternalWindow = _a[1];
5
- var _b = useState(false), hasManuallyTriggered = _b[0], setHasManuallyTriggered = _b[1];
6
- var dismissConfirmation = function () { return setHasManuallyTriggered(true); };
7
- useEffect(function () {
8
- if (url) {
9
- setHasManuallyTriggered(false);
10
- setExternalWindow(window.open(url, '_blank'));
11
- }
12
- }, [url]);
13
- var requiresManualTrigger = Boolean(url && !externalWindow && !hasManuallyTriggered);
14
- return { requiresManualTrigger: requiresManualTrigger, dismissConfirmation: dismissConfirmation };
15
- }
@@ -1,69 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { useCallback, useMemo } from 'react';
13
- import { usePolling } from '..';
14
- import { useFetcher } from '../../contexts';
15
- /** @deprecated External step is no longer supported */
16
- export function useExternalStepPolling(polling, onAction) {
17
- var fetcher = useFetcher();
18
- var asyncFn = useMemo(function () {
19
- if (polling) {
20
- return function () {
21
- return fetcher(polling.url).then(function (response) {
22
- if (response.ok) {
23
- try {
24
- return response.json();
25
- }
26
- catch (_a) {
27
- throw new Error('failed');
28
- }
29
- }
30
- else {
31
- throw new Error('failed');
32
- }
33
- });
34
- };
35
- }
36
- else {
37
- return undefined;
38
- }
39
- }, [polling, fetcher]);
40
- var onPollingResponse = useCallback(function (pollingResponse) {
41
- var responseHandlers = (polling === null || polling === void 0 ? void 0 : polling.responseHandlers) || [];
42
- var responseHandler = responseHandlers.find(function (handler) { return handler.result === pollingResponse.result; });
43
- if (responseHandler === null || responseHandler === void 0 ? void 0 : responseHandler.action) {
44
- var action = responseHandler.action;
45
- if (action.exit) {
46
- var mergedResult = __assign(__assign({}, (action.result || {})), (pollingResponse.data || {}));
47
- onAction(__assign(__assign({}, action), { result: mergedResult }));
48
- }
49
- else {
50
- var mergedData = __assign(__assign({}, (action.data || {})), (pollingResponse.data || {}));
51
- onAction(__assign(__assign({}, action), { data: mergedData }));
52
- }
53
- return false; // stop polling
54
- }
55
- return true; // continue polling
56
- }, [polling === null || polling === void 0 ? void 0 : polling.responseHandlers, onAction]);
57
- usePolling({
58
- asyncFn: asyncFn,
59
- interval: (polling === null || polling === void 0 ? void 0 : polling.interval) || 0,
60
- maxAttempts: (polling === null || polling === void 0 ? void 0 : polling.maxAttempts) || 0,
61
- maxConsecutiveFails: (polling === null || polling === void 0 ? void 0 : polling.maxConsecutiveFails) || 0,
62
- onPollingResponse: onPollingResponse,
63
- onFailure: useCallback(function () {
64
- if (polling) {
65
- onAction(polling.onError.action);
66
- }
67
- }, [onAction, polling])
68
- });
69
- }
@@ -1,170 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- import { useState } from 'react';
49
- import { useIntl } from 'react-intl';
50
- import { isNull, isObject, isNumber, isString } from '../../../common/validators';
51
- import messages from '../../../jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.messages';
52
- import { getErrorFromResponse } from '../../../jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema'; // FIXME: extract these functions form that schema component to either here or their own module
53
- import { isBlobSchema } from '../../../types';
54
- import { useFetcher } from '../../contexts';
55
- import { isValidSchema } from '../../validators';
56
- export var usePersistAsync = function (persistAsync) {
57
- var _a = useState(null), abortController = _a[0], setAbortController = _a[1];
58
- var fetcher = useFetcher();
59
- var intl = useIntl();
60
- var schema = persistAsync.schema;
61
- function handlePersistAsync(model) {
62
- return __awaiter(this, void 0, void 0, function () {
63
- var isInvalidSchema;
64
- return __generator(this, function (_a) {
65
- switch (_a.label) {
66
- case 0:
67
- isInvalidSchema = model instanceof Blob ? !isBlobSchema(schema) : !isValidSchema(model, schema);
68
- if (isNull(model) || isInvalidSchema) {
69
- handleError();
70
- }
71
- return [4 /*yield*/, performPersistAsync(model)];
72
- case 1: return [2 /*return*/, _a.sent()];
73
- }
74
- });
75
- });
76
- }
77
- var abortCurrentRequestAndGetNewAbortSignal = function () {
78
- if (abortController) {
79
- abortController.abort();
80
- }
81
- var newAbortController = new AbortController();
82
- setAbortController(newAbortController);
83
- return newAbortController.signal;
84
- };
85
- function constructFetchInit(model) {
86
- var _a;
87
- var isBlob = isBlobSchema(schema);
88
- var signal = abortCurrentRequestAndGetNewAbortSignal();
89
- var requestKey = persistAsync.param;
90
- var requestBody = isBlob
91
- ? wrapInFormData(requestKey, model)
92
- : JSON.stringify((_a = {}, _a[requestKey] = model, _a));
93
- return {
94
- method: persistAsync.method,
95
- headers: __assign({}, (!isBlob && { 'Content-Type': 'application/json' })),
96
- body: requestBody,
97
- signal: signal
98
- };
99
- }
100
- function performPersistAsync(payload) {
101
- return __awaiter(this, void 0, void 0, function () {
102
- var response, jsonResponse, id, error_1;
103
- return __generator(this, function (_a) {
104
- switch (_a.label) {
105
- case 0:
106
- _a.trys.push([0, 3, , 4]);
107
- return [4 /*yield*/, fetcher(persistAsync.url, constructFetchInit(payload))];
108
- case 1:
109
- response = _a.sent();
110
- if (!response.ok) {
111
- return [2 /*return*/, handleHTTPError(response)];
112
- }
113
- return [4 /*yield*/, response.json()];
114
- case 2:
115
- jsonResponse = _a.sent();
116
- if (isObject(jsonResponse)) {
117
- id = jsonResponse[persistAsync.idProperty];
118
- if (isString(id) || isNumber(id)) {
119
- return [2 /*return*/, { data: id }];
120
- }
121
- }
122
- return [2 /*return*/, handleError()];
123
- case 3:
124
- error_1 = _a.sent();
125
- return [2 /*return*/, handleError(error_1)];
126
- case 4: return [2 /*return*/];
127
- }
128
- });
129
- });
130
- }
131
- function handleHTTPError(response) {
132
- return __awaiter(this, void 0, void 0, function () {
133
- var jsonResponse, error;
134
- return __generator(this, function (_a) {
135
- switch (_a.label) {
136
- case 0:
137
- if (!(response.status === 422)) return [3 /*break*/, 2];
138
- return [4 /*yield*/, response.json()];
139
- case 1:
140
- jsonResponse = _a.sent();
141
- if (isObject(jsonResponse)) {
142
- error = getErrorFromResponse(persistAsync.param, jsonResponse);
143
- if (isString(error)) {
144
- throw new Error(error);
145
- }
146
- }
147
- _a.label = 2;
148
- case 2: throw new Error(intl.formatMessage(messages.genericError));
149
- }
150
- });
151
- });
152
- }
153
- var handleError = function (error) {
154
- var message = hasStringMessage(error)
155
- ? error.message
156
- : intl.formatMessage(messages.genericError);
157
- throw new Error(message);
158
- };
159
- return handlePersistAsync;
160
- };
161
- function wrapInFormData(key, value) {
162
- var formData = new FormData();
163
- if (value !== null) {
164
- formData.append(key, value);
165
- }
166
- return formData;
167
- }
168
- function hasStringMessage(value) {
169
- return isObject(value) && 'message' in value && typeof value.message === 'string';
170
- }
@@ -1,48 +0,0 @@
1
- /* eslint-disable fp/no-mutation */
2
- import { useEffect, useMemo, useRef } from 'react';
3
- export function usePolling(_a) {
4
- var asyncFn = _a.asyncFn, interval = _a.interval, maxAttempts = _a.maxAttempts, maxConsecutiveFails = _a.maxConsecutiveFails, onPollingResponse = _a.onPollingResponse, onFailure = _a.onFailure;
5
- var onPollingResponseReference = useRef(onPollingResponse);
6
- var onFailureReference = useRef(onFailure);
7
- var poll = useMemo(function () {
8
- return createPollingClosure(asyncFn, maxAttempts, maxConsecutiveFails, function (pollingResponse) { return onPollingResponseReference.current(pollingResponse); }, function () { return onFailureReference.current(); });
9
- }, [asyncFn, maxAttempts, maxConsecutiveFails]);
10
- useEffect(function () {
11
- if (interval > 0) {
12
- var intervalReference_1 = setInterval(function () {
13
- poll();
14
- }, interval);
15
- return function () { return clearInterval(intervalReference_1); };
16
- }
17
- }, [poll, interval]);
18
- useEffect(function () {
19
- onPollingResponseReference.current = onPollingResponse;
20
- onFailureReference.current = onFailure;
21
- }, [onPollingResponse, onFailure]);
22
- }
23
- export function createPollingClosure(asyncFn, maxAttempts, maxConsecutiveFails, onPollingResponse, onFailure) {
24
- var isPolling = true;
25
- var consecutiveFailures = 0;
26
- var attemptCount = 0;
27
- return asyncFn
28
- ? function () {
29
- if (isPolling) {
30
- attemptCount++;
31
- asyncFn()
32
- .then(function (pollingResponse) {
33
- consecutiveFailures = 0;
34
- isPolling = onPollingResponse(pollingResponse);
35
- })["catch"](function () {
36
- consecutiveFailures++;
37
- })["finally"](function () {
38
- if (consecutiveFailures >= maxConsecutiveFails || attemptCount >= maxAttempts) {
39
- onFailure();
40
- isPolling = false;
41
- }
42
- });
43
- }
44
- }
45
- : function () {
46
- //
47
- };
48
- }
@@ -1,8 +0,0 @@
1
- import { useEffect, useRef } from 'react';
2
- export var usePrevious = function (value) {
3
- var reference = useRef();
4
- useEffect(function () {
5
- reference.current = value;
6
- }, [value]);
7
- return reference.current;
8
- };