@wise/dynamic-flow-client 3.12.1 → 3.13.0-experimental-kyc-camera-be63581

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 (613) hide show
  1. package/build/common/cameraCapture/CameraCapture.js +161 -0
  2. package/build/common/cameraCapture/CameraCapture.messages.js +58 -0
  3. package/build/common/cameraCapture/CameraCapture.spec.js +460 -0
  4. package/build/common/cameraCapture/CameraEventHandler.js +1 -0
  5. package/build/common/cameraCapture/components/bottomBar/BottomBar.js +17 -0
  6. package/build/common/cameraCapture/components/index.js +3 -0
  7. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +8 -0
  8. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
  9. package/build/common/cameraCapture/hooks/useFullScreenOrientationLock.js +62 -0
  10. package/build/common/cameraCapture/hooks/useVideoConstraints.js +80 -0
  11. package/build/common/cameraCapture/index.js +1 -0
  12. package/build/common/cameraCapture/overlay/Overlay.js +78 -0
  13. package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -0
  14. package/build/common/cameraCapture/screens/index.js +1 -0
  15. package/build/common/cameraCapture/tracking/index.js +109 -0
  16. package/build/common/cameraCapture/types/index.js +7 -0
  17. package/build/common/cameraCapture/utils/index.js +107 -0
  18. package/build/common/cameraCapture/utils/mobile-utils.js +23 -0
  19. package/build/common/cameraCapture/utils/mobile-utils.spec.js +71 -0
  20. package/build/common/errorBoundary/ErrorBoundary.js +44 -0
  21. package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
  22. package/build/common/httpClientContext/HttpClientContext.js +24 -0
  23. package/build/common/httpClientContext/index.js +1 -0
  24. package/build/common/makeHttpClient/index.js +1 -0
  25. package/build/common/makeHttpClient/makeHttpClient.js +30 -0
  26. package/build/common/makeHttpClient/makeHttpClient.spec.js +140 -0
  27. package/build/common/messages/external-confirmation.messages.js +23 -0
  28. package/build/common/messages/generic-error.messages.js +18 -0
  29. package/build/common/messages/help.messages.js +8 -0
  30. package/build/common/messages/multi-file-upload.messages.js +18 -0
  31. package/build/common/messages/multi-select.messages.js +8 -0
  32. package/build/common/messages/paragraph.messages.js +13 -0
  33. package/build/common/messages/repeatable.messages.js +23 -0
  34. package/build/common/messages/validation.array.messages.js +13 -0
  35. package/build/common/messages/validation.messages.js +53 -0
  36. package/build/common/utils/api-utils.js +4 -0
  37. package/build/common/utils/debounce.js +44 -0
  38. package/build/common/utils/debounce.spec.js +72 -0
  39. package/build/i18n/index.js +36 -0
  40. package/build/index.js +12 -0
  41. package/build/legacy/common/constants/DateMode.js +4 -0
  42. package/build/legacy/common/constants/FeatureName.js +4 -0
  43. package/build/legacy/common/constants/FormControlType.js +21 -0
  44. package/build/legacy/common/constants/MonthFormat.js +4 -0
  45. package/build/legacy/common/constants/Size.js +7 -0
  46. package/build/legacy/common/constants/index.js +4 -0
  47. package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +25 -0
  48. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +15 -0
  49. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.spec.js +113 -0
  50. package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
  51. package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +47 -0
  52. package/build/legacy/common/contexts/featureContext/FeatureContext.js +11 -0
  53. package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +30 -0
  54. package/build/legacy/common/contexts/index.js +3 -0
  55. package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
  56. package/build/legacy/common/contexts/logContext/LogContext.spec.js +43 -0
  57. package/build/legacy/common/hooks/index.js +7 -0
  58. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
  59. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
  60. package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
  61. package/build/legacy/common/hooks/useExternal/useExternal.spec.js +236 -0
  62. package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +71 -0
  63. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
  64. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.spec.js +221 -0
  65. package/build/legacy/common/hooks/usePolling/usePolling.js +53 -0
  66. package/build/legacy/common/hooks/usePolling/usePolling.spec.js +243 -0
  67. package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
  68. package/build/legacy/common/hooks/usePrevious/usePrevious.spec.js +66 -0
  69. package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +45 -0
  70. package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
  71. package/build/legacy/common/messages.js +8 -0
  72. package/build/legacy/common/utils/api-utils.js +6 -0
  73. package/build/legacy/common/utils/date-utils.js +22 -0
  74. package/build/legacy/common/utils/file-utils.js +45 -0
  75. package/build/legacy/common/utils/file-utils.spec.js +69 -0
  76. package/build/legacy/common/utils/id-utils.js +5 -0
  77. package/build/legacy/common/utils/id-utils.spec.js +12 -0
  78. package/build/legacy/common/utils/index.js +11 -0
  79. package/build/legacy/common/utils/is-equal.js +21 -0
  80. package/build/legacy/common/utils/is-equal.spec.js +88 -0
  81. package/build/legacy/common/utils/misc-utils.js +4 -0
  82. package/build/legacy/common/utils/model-utils.js +33 -0
  83. package/build/legacy/common/utils/schema-utils.js +113 -0
  84. package/build/legacy/common/utils/step-utils.js +32 -0
  85. package/build/legacy/common/validators/index.js +5 -0
  86. package/build/legacy/common/validators/models/model-utils.js +119 -0
  87. package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
  88. package/build/legacy/common/validators/models/model-validators.js +62 -0
  89. package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
  90. package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
  91. package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
  92. package/build/legacy/common/validators/types/type-validators.js +14 -0
  93. package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
  94. package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
  95. package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
  96. package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
  97. package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
  98. package/build/legacy/common/validators/values/value-validators.js +6 -0
  99. package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
  100. package/build/legacy/dynamic-flow-types.js +1 -0
  101. package/build/legacy/dynamicFlow/BackButton.js +22 -0
  102. package/build/legacy/dynamicFlow/DynamicFlow.js +364 -0
  103. package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
  104. package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
  105. package/build/legacy/dynamicFlow/index.js +1 -0
  106. package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
  107. package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
  108. package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +57 -0
  109. package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +58 -0
  110. package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
  111. package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
  112. package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +263 -0
  113. package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
  114. package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
  115. package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
  116. package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
  117. package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
  118. package/build/legacy/dynamicFlow/tests/Actions.spec.js +232 -0
  119. package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
  120. package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
  121. package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
  122. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialAction.spec.js +472 -0
  123. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +749 -0
  124. package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +267 -0
  125. package/build/legacy/dynamicFlow/tests/DynamicFlow.legacy.spec.js +1202 -0
  126. package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
  127. package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
  128. package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
  129. package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
  130. package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
  131. package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
  132. package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +327 -0
  133. package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
  134. package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
  135. package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
  136. package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
  137. package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
  138. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +391 -0
  139. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +588 -0
  140. package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
  141. package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
  142. package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
  143. package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
  144. package/build/legacy/dynamicFlow/utils/index.js +5 -0
  145. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
  146. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
  147. package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +35 -0
  148. package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
  149. package/build/legacy/dynamicFlow/utils/useErrorResponse.js +62 -0
  150. package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
  151. package/build/legacy/formControl/FormControl.js +267 -0
  152. package/build/legacy/formControl/FormControl.spec.js +445 -0
  153. package/build/legacy/formControl/Select.spec.js +104 -0
  154. package/build/legacy/formControl/index.js +1 -0
  155. package/build/legacy/formControl/utils/getAutocompleteString.js +80 -0
  156. package/build/legacy/formControl/utils/getAutocompleteString.spec.js +30 -0
  157. package/build/legacy/formControl/utils/index.js +2 -0
  158. package/build/legacy/formControl/utils/value-utils.js +108 -0
  159. package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
  160. package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +534 -0
  161. package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
  162. package/build/legacy/jsonSchemaForm/JsonSchemaForm.spec.js +77 -0
  163. package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
  164. package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
  165. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
  166. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArrayTypeSchema.spec.js +50 -0
  167. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +34 -0
  168. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
  169. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +86 -0
  170. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
  171. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
  172. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
  173. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
  174. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
  175. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
  176. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
  177. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
  178. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
  179. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
  180. package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
  181. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js +233 -0
  182. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +100 -0
  183. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.spec.js +291 -0
  184. package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
  185. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +89 -0
  186. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.spec.js +182 -0
  187. package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
  188. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
  189. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
  190. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.spec.js +334 -0
  191. package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
  192. package/build/legacy/jsonSchemaForm/help/Help.js +9 -0
  193. package/build/legacy/jsonSchemaForm/help/Help.spec.js +61 -0
  194. package/build/legacy/jsonSchemaForm/help/index.js +1 -0
  195. package/build/legacy/jsonSchemaForm/index.js +1 -0
  196. package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
  197. package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
  198. package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
  199. package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
  200. package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
  201. package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
  202. package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
  203. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
  204. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
  205. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
  206. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
  207. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.spec.js +243 -0
  208. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
  209. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
  210. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.spec.js +420 -0
  211. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
  212. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
  213. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +16 -0
  214. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.spec.js +125 -0
  215. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
  216. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.spec.js +82 -0
  217. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
  218. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.spec.js +130 -0
  219. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
  220. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
  221. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.spec.js +117 -0
  222. package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
  223. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +138 -0
  224. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
  225. package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
  226. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
  227. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
  228. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +220 -0
  229. package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
  230. package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
  231. package/build/legacy/layout/DynamicLayout.end-to-end.spec.js +71 -0
  232. package/build/legacy/layout/DynamicLayout.js +68 -0
  233. package/build/legacy/layout/DynamicLayout.spec.js +243 -0
  234. package/build/legacy/layout/alert/DynamicAlert.js +29 -0
  235. package/build/legacy/layout/alert/DynamicAlert.spec.js +42 -0
  236. package/build/legacy/layout/box/DynamicBox.js +30 -0
  237. package/build/legacy/layout/box/DynamicBox.spec.js +56 -0
  238. package/build/legacy/layout/button/DynamicButton.js +16 -0
  239. package/build/legacy/layout/button/DynamicButton.spec.js +141 -0
  240. package/build/legacy/layout/button/utils.js +45 -0
  241. package/build/legacy/layout/button/utils.spec.js +50 -0
  242. package/build/legacy/layout/columns/DynamicColumns.js +27 -0
  243. package/build/legacy/layout/columns/DynamicColumns.spec.js +83 -0
  244. package/build/legacy/layout/decision/DynamicDecision.js +10 -0
  245. package/build/legacy/layout/decision/DynamicDecision.spec.js +146 -0
  246. package/build/legacy/layout/divider/DynamicDivider.js +9 -0
  247. package/build/legacy/layout/divider/DynamicDivider.spec.js +17 -0
  248. package/build/legacy/layout/external/DynamicExternal.js +32 -0
  249. package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
  250. package/build/legacy/layout/external/DynamicExternal.spec.js +264 -0
  251. package/build/legacy/layout/form/DynamicForm.js +22 -0
  252. package/build/legacy/layout/form/DynamicForm.spec.js +74 -0
  253. package/build/legacy/layout/heading/DynamicHeading.js +40 -0
  254. package/build/legacy/layout/heading/DynamicHeading.spec.js +14 -0
  255. package/build/legacy/layout/icon/DynamicIcon.js +17 -0
  256. package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
  257. package/build/legacy/layout/icon/FlagIcon.js +11 -0
  258. package/build/legacy/layout/icon/NamedIcon.js +19 -0
  259. package/build/legacy/layout/image/DynamicImage.js +112 -0
  260. package/build/legacy/layout/index.js +20 -0
  261. package/build/legacy/layout/instructions/DynamicInstructions.js +19 -0
  262. package/build/legacy/layout/list/DynamicStatusList.js +37 -0
  263. package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
  264. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
  265. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
  266. package/build/legacy/layout/markdown/DynamicMarkdown.js +12 -0
  267. package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
  268. package/build/legacy/layout/modal/DynamicModal.js +26 -0
  269. package/build/legacy/layout/paragraph/DynamicParagraph.js +35 -0
  270. package/build/legacy/layout/paragraph/DynamicParagraph.spec.js +109 -0
  271. package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
  272. package/build/legacy/layout/review/DynamicReview.js +59 -0
  273. package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
  274. package/build/legacy/layout/search/DynamicSearch.js +83 -0
  275. package/build/legacy/layout/search/SearchInput.js +6 -0
  276. package/build/legacy/layout/search/SearchResults.js +20 -0
  277. package/build/legacy/layout/search/useSearch.js +150 -0
  278. package/build/legacy/layout/utils/getNavigationOptionMedia.js +17 -0
  279. package/build/legacy/layout/utils/index.js +32 -0
  280. package/build/legacy/step/cameraStep/CameraStep.js +124 -0
  281. package/build/legacy/step/cameraStep/index.js +1 -0
  282. package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
  283. package/build/legacy/step/externalConfirmationStep/index.js +1 -0
  284. package/build/legacy/step/index.js +3 -0
  285. package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
  286. package/build/legacy/step/layoutStep/LayoutStep.spec.js +189 -0
  287. package/build/legacy/step/layoutStep/index.js +1 -0
  288. package/build/legacy/step/layoutStep/utils/index.js +2 -0
  289. package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
  290. package/build/legacy/step/layoutStep/utils/inline-reference-utils.spec.js +296 -0
  291. package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
  292. package/build/legacy/step/layoutStep/utils/layout-utils.spec.js +558 -0
  293. package/build/legacy/test-utils/DynamicFlowProviders.js +8 -0
  294. package/build/legacy/test-utils/index.js +4 -0
  295. package/build/legacy/test-utils/legacy-utils.js +69 -0
  296. package/build/legacy/test-utils/log-utils.js +9 -0
  297. package/build/legacy/visual-tests/generated.story.js +234 -0
  298. package/build/legacy/visual-tests/layouts.story.js +132 -0
  299. package/build/legacy/visual-tests/schemas.story.js +108 -0
  300. package/build/legacy/visual-tests/step.story.js +54 -0
  301. package/build/main.js +604 -514
  302. package/build/main.min.js +1 -1
  303. package/build/main.mjs +580 -490
  304. package/build/revamp/DynamicFlowCore.js +25 -0
  305. package/build/revamp/DynamicFlowWise.js +32 -0
  306. package/build/revamp/DynamicFlowWise.spec.js +105 -0
  307. package/build/revamp/DynamicFragmentWise.js +83 -0
  308. package/build/revamp/domain/components/AlertComponent.js +50 -0
  309. package/build/revamp/domain/components/AllOfComponent.js +72 -0
  310. package/build/revamp/domain/components/BooleanInputComponent.js +109 -0
  311. package/build/revamp/domain/components/BoxComponent.js +65 -0
  312. package/build/revamp/domain/components/ButtonComponent.js +50 -0
  313. package/build/revamp/domain/components/ColumnsComponent.js +74 -0
  314. package/build/revamp/domain/components/ConstComponent.js +50 -0
  315. package/build/revamp/domain/components/ContainerComponent.js +65 -0
  316. package/build/revamp/domain/components/DateInputComponent.js +128 -0
  317. package/build/revamp/domain/components/DecisionComponent.js +50 -0
  318. package/build/revamp/domain/components/DividerComponent.js +50 -0
  319. package/build/revamp/domain/components/FormComponent.js +65 -0
  320. package/build/revamp/domain/components/HeadingComponent.js +50 -0
  321. package/build/revamp/domain/components/ImageComponent.js +50 -0
  322. package/build/revamp/domain/components/InstructionsComponent.js +50 -0
  323. package/build/revamp/domain/components/IntegerInputComponent.js +129 -0
  324. package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
  325. package/build/revamp/domain/components/MarkdownComponent.js +50 -0
  326. package/build/revamp/domain/components/ModalComponent.js +65 -0
  327. package/build/revamp/domain/components/MultiSelectInputComponent.js +148 -0
  328. package/build/revamp/domain/components/MultiUploadInputComponent.js +192 -0
  329. package/build/revamp/domain/components/NumberInputComponent.js +129 -0
  330. package/build/revamp/domain/components/ObjectComponent.js +104 -0
  331. package/build/revamp/domain/components/ParagraphComponent.js +50 -0
  332. package/build/revamp/domain/components/ReviewComponent.js +50 -0
  333. package/build/revamp/domain/components/SelectInputComponent.js +140 -0
  334. package/build/revamp/domain/components/StatusListComponent.js +50 -0
  335. package/build/revamp/domain/components/StepDomainComponent.js +87 -0
  336. package/build/revamp/domain/components/TextInputComponent.js +129 -0
  337. package/build/revamp/domain/components/UploadInputComponent.js +154 -0
  338. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +150 -0
  339. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +146 -0
  340. package/build/revamp/domain/components/searchComponent/SearchComponent.js +111 -0
  341. package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
  342. package/build/revamp/domain/components/utils/component-utils.js +18 -0
  343. package/build/revamp/domain/components/utils/debounce.js +38 -0
  344. package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
  345. package/build/revamp/domain/components/utils/file-utils.js +65 -0
  346. package/build/revamp/domain/components/utils/file-utils.spec.js +81 -0
  347. package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +31 -0
  348. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +46 -0
  349. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +125 -0
  350. package/build/revamp/domain/components/utils/local-value.js +14 -0
  351. package/build/revamp/domain/features/events.js +1 -0
  352. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +134 -0
  353. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +200 -0
  354. package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
  355. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
  356. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
  357. package/build/revamp/domain/features/polling/getStepPolling.js +82 -0
  358. package/build/revamp/domain/features/polling/getStepPolling.spec.js +170 -0
  359. package/build/revamp/domain/features/refresh/getPerformRefresh.js +16 -0
  360. package/build/revamp/domain/features/search/getPerformSearchFunction.js +102 -0
  361. package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
  362. package/build/revamp/domain/features/summary/summary-utils.js +39 -0
  363. package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
  364. package/build/revamp/domain/features/utils/http-utils.js +34 -0
  365. package/build/revamp/domain/features/utils/response-utils.js +9 -0
  366. package/build/revamp/domain/features/validation/spec-utils.js +16 -0
  367. package/build/revamp/domain/features/validation/validation-functions.js +12 -0
  368. package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
  369. package/build/revamp/domain/features/validation/value-checks.js +111 -0
  370. package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
  371. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +95 -0
  372. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +178 -0
  373. package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
  374. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
  375. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
  376. package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
  377. package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
  378. package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +45 -0
  379. package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
  380. package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +40 -0
  381. package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
  382. package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +27 -0
  383. package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
  384. package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
  385. package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
  386. package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
  387. package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
  388. package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
  389. package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
  390. package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
  391. package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
  392. package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
  393. package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
  394. package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
  395. package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
  396. package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
  397. package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
  398. package/build/revamp/domain/mappers/mapStepToComponent.js +146 -0
  399. package/build/revamp/domain/mappers/mapStepToComponent.spec.js +162 -0
  400. package/build/revamp/domain/mappers/mapUnreferencedSchemas.js +44 -0
  401. package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
  402. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +42 -0
  403. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +54 -0
  404. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +64 -0
  405. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +66 -0
  406. package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
  407. package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
  408. package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
  409. package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
  410. package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
  411. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +60 -0
  412. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
  413. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
  414. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
  415. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
  416. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
  417. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
  418. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
  419. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +37 -0
  420. package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
  421. package/build/revamp/domain/mappers/schema/types.js +1 -0
  422. package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
  423. package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
  424. package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
  425. package/build/revamp/domain/mappers/types.js +1 -0
  426. package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
  427. package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
  428. package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
  429. package/build/revamp/domain/mappers/utils/inlineAction.js +23 -0
  430. package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
  431. package/build/revamp/domain/types.js +1 -0
  432. package/build/revamp/flow/executeRefresh.js +97 -0
  433. package/build/revamp/flow/executeSubmission.js +160 -0
  434. package/build/revamp/flow/getResponseType.js +76 -0
  435. package/build/revamp/flow/response-utils.js +92 -0
  436. package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
  437. package/build/revamp/renderers/getRenderFunction.js +62 -0
  438. package/build/revamp/renderers/getSchemaErrorMessageFunction.js +90 -0
  439. package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
  440. package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
  441. package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
  442. package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
  443. package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
  444. package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
  445. package/build/revamp/renderers/mappers/componentToRendererProps.js +108 -0
  446. package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
  447. package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
  448. package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
  449. package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
  450. package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
  451. package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
  452. package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
  453. package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
  454. package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
  455. package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
  456. package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
  457. package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
  458. package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
  459. package/build/revamp/renderers/mappers/multiSelectComponentToProps.js +28 -0
  460. package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
  461. package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
  462. package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
  463. package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
  464. package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
  465. package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
  466. package/build/revamp/renderers/mappers/searchComponentToProps.js +53 -0
  467. package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
  468. package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
  469. package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
  470. package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
  471. package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
  472. package/build/revamp/renderers/stepComponentToProps.js +16 -0
  473. package/build/revamp/renderers/types.js +1 -0
  474. package/build/revamp/stories/dev-tools/ActionResponse.story.js +101 -0
  475. package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +314 -0
  476. package/build/revamp/stories/dev-tools/EditableStep.story.js +73 -0
  477. package/build/revamp/stories/dev-tools/ErrorHandling.story.js +149 -0
  478. package/build/revamp/stories/dev-tools/External.story.js +83 -0
  479. package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +123 -0
  480. package/build/revamp/stories/dev-tools/PersistAsync.story.js +168 -0
  481. package/build/revamp/stories/dev-tools/Polling.story.js +79 -0
  482. package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +309 -0
  483. package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +1004 -0
  484. package/build/revamp/stories/dev-tools/SearchFeature.story.js +263 -0
  485. package/build/revamp/stories/dev-tools/ServerTest.story.js +86 -0
  486. package/build/revamp/stories/dev-tools/Upload.story.js +221 -0
  487. package/build/revamp/stories/dev-tools/ValidationAsync.story.js +161 -0
  488. package/build/revamp/stories/examples/KYCCameraStep.story.js +84 -0
  489. package/build/revamp/stories/examples/ObjectConst.story.js +153 -0
  490. package/build/revamp/stories/examples/OneOfInitialisation.story.js +102 -0
  491. package/build/revamp/stories/utils/fixtureHttpClient.js +130 -0
  492. package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
  493. package/build/revamp/test-utils/component-utils.js +19 -0
  494. package/build/revamp/test-utils/step-utils.js +6 -0
  495. package/build/revamp/tests/ImageRenderer.spec.js +108 -0
  496. package/build/revamp/tests/InitialAction.spec.js +299 -0
  497. package/build/revamp/tests/InitialStep.spec.js +226 -0
  498. package/build/revamp/tests/Logging.spec.js +112 -0
  499. package/build/revamp/tests/OneOfInitialisation.spec.js +889 -0
  500. package/build/revamp/tests/Polling.spec.js +611 -0
  501. package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +322 -0
  502. package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +447 -0
  503. package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +447 -0
  504. package/build/revamp/tests/RefreshOnChangePreserve.spec.js +341 -0
  505. package/build/revamp/tests/Rerendering.spec.js +156 -0
  506. package/build/revamp/tests/SegmentedControl.spec.js +48 -0
  507. package/build/revamp/tests/Submission.ResponseHandling.spec.js +697 -0
  508. package/build/revamp/tests/Submission.spec.js +590 -0
  509. package/build/revamp/tests/legacy/Actions.spec.js +242 -0
  510. package/build/revamp/tests/legacy/BackButton.spec.js +189 -0
  511. package/build/revamp/tests/legacy/HiddenSchemas.spec.js +312 -0
  512. package/build/revamp/tests/legacy/MultiSelect.spec.js +753 -0
  513. package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +447 -0
  514. package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +339 -0
  515. package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +385 -0
  516. package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +352 -0
  517. package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +638 -0
  518. package/build/revamp/tests/legacy/Search.spec.js +501 -0
  519. package/build/revamp/tests/legacy/ValidationAsync.spec.js +452 -0
  520. package/build/revamp/tests/legacy/useExternal.spec.js +235 -0
  521. package/build/revamp/types.js +1 -0
  522. package/build/revamp/useDynamicFlowCore.js +298 -0
  523. package/build/revamp/utils/component-utils.js +86 -0
  524. package/build/revamp/utils/component-utils.spec.js +385 -0
  525. package/build/revamp/utils/findComponent.js +29 -0
  526. package/build/revamp/utils/findComponent.spec.js +92 -0
  527. package/build/revamp/utils/type-utils.js +59 -0
  528. package/build/revamp/utils/type-validators.js +16 -0
  529. package/build/revamp/utils/type-validators.spec.js +163 -0
  530. package/build/revamp/utils/useStableCallback.js +21 -0
  531. package/build/revamp/visual-tests/generated.story.js +234 -0
  532. package/build/revamp/visual-tests/layouts.story.js +132 -0
  533. package/build/revamp/visual-tests/schemas.story.js +108 -0
  534. package/build/revamp/visual-tests/step.story.js +54 -0
  535. package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
  536. package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
  537. package/build/revamp/wise/renderers/BoxRenderer.js +19 -0
  538. package/build/revamp/wise/renderers/ButtonRenderer.js +53 -0
  539. package/build/revamp/wise/renderers/ColumnsRenderer.js +14 -0
  540. package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
  541. package/build/revamp/wise/renderers/DecisionRenderer.js +18 -0
  542. package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
  543. package/build/revamp/wise/renderers/FormRenderer.js +10 -0
  544. package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
  545. package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
  546. package/build/revamp/wise/renderers/ImageRenderer.js +112 -0
  547. package/build/revamp/wise/renderers/InstructionsRenderer.js +23 -0
  548. package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
  549. package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
  550. package/build/revamp/wise/renderers/MarkdownRenderer.js +11 -0
  551. package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
  552. package/build/revamp/wise/renderers/MultiSelectInputRenderer.js +84 -0
  553. package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +63 -0
  554. package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
  555. package/build/revamp/wise/renderers/ParagraphRenderer.js +45 -0
  556. package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
  557. package/build/revamp/wise/renderers/ReviewRenderer.js +50 -0
  558. package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +59 -0
  559. package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +11 -0
  560. package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +63 -0
  561. package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +21 -0
  562. package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +16 -0
  563. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +14 -0
  564. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.spec.js +76 -0
  565. package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +21 -0
  566. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +33 -0
  567. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
  568. package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +16 -0
  569. package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +22 -0
  570. package/build/revamp/wise/renderers/StatusListRenderer.js +21 -0
  571. package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
  572. package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
  573. package/build/revamp/wise/renderers/components/FieldInput.js +9 -0
  574. package/build/revamp/wise/renderers/components/Help.js +10 -0
  575. package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
  576. package/build/revamp/wise/renderers/components/UploadFieldInput.js +14 -0
  577. package/build/revamp/wise/renderers/components/VariableDateInput.js +36 -0
  578. package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
  579. package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
  580. package/build/revamp/wise/renderers/components/icon/FlagIcon.js +11 -0
  581. package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
  582. package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +20 -0
  583. package/build/revamp/wise/renderers/getWiseRenderers.js +61 -0
  584. package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
  585. package/build/revamp/wise/renderers/step/BackButton.js +11 -0
  586. package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +20 -0
  587. package/build/revamp/wise/renderers/step/KYCCameraStepRenderer.js +144 -0
  588. package/build/revamp/wise/renderers/step/StepRenderer.js +31 -0
  589. package/build/revamp/wise/renderers/step/StepRendererContext.js +11 -0
  590. package/build/revamp/wise/renderers/step/useExternal.js +15 -0
  591. package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
  592. package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
  593. package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
  594. package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
  595. package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
  596. package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
  597. package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
  598. package/build/test-utils/NeptuneProviders.js +23 -0
  599. package/build/test-utils/fetch-utils.js +104 -0
  600. package/build/test-utils/index.js +2 -0
  601. package/build/test-utils/rtl-utils.js +20 -0
  602. package/build/types/common/cameraCapture/CameraCapture.d.ts +3 -4
  603. package/build/types/common/cameraCapture/CameraEventHandler.d.ts +2 -0
  604. package/build/types/common/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +1 -1
  605. package/build/types/common/cameraCapture/index.d.ts +1 -0
  606. package/build/types/common/cameraCapture/tracking/index.d.ts +1 -1
  607. package/build/types/index.d.ts +2 -0
  608. package/build/types/legacy/dynamic-flow-types.d.ts +1 -1
  609. package/build/types/revamp/domain/components/StepDomainComponent.d.ts +6 -4
  610. package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
  611. package/build/types/revamp/renderers/types.d.ts +5 -1
  612. package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +2 -0
  613. package/package.json +1 -1
package/build/main.js CHANGED
@@ -291,6 +291,7 @@ __export(src_exports, {
291
291
  DynamicFlowRevamp: () => DynamicFlowWise_default,
292
292
  DynamicFragmentWise: () => DynamicFragmentWise_default,
293
293
  JsonSchemaForm: () => JsonSchemaForm_default,
294
+ KYCCameraStepRenderer: () => KYCCameraStepRenderer,
294
295
  Layout: () => DynamicLayout_default,
295
296
  convertStepToLayout: () => convertStepToLayout,
296
297
  inlineReferences: () => inlineReferences,
@@ -1291,16 +1292,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
1291
1292
  var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
1292
1293
 
1293
1294
  // src/revamp/renderers/stepComponentToProps.ts
1294
- var stepComponentToProps = ({ back, description, error, external, loadingState, title, trackEvent }, children) => ({
1295
+ var stepComponentToProps = ({
1296
+ back,
1297
+ description,
1298
+ error,
1299
+ external,
1300
+ loadingState,
1301
+ step,
1302
+ title,
1303
+ trackEvent,
1304
+ onAction
1305
+ }, children) => ({
1295
1306
  type: "step",
1296
1307
  back,
1297
1308
  description,
1298
1309
  error,
1299
1310
  external,
1300
1311
  loadingState,
1312
+ step,
1301
1313
  title,
1314
+ children,
1302
1315
  trackEvent,
1303
- children
1316
+ onAction
1304
1317
  });
1305
1318
 
1306
1319
  // src/revamp/renderers/mappers/alertComponentToProps.ts
@@ -1815,12 +1828,14 @@ var getRenderFunction = (renderers) => {
1815
1828
  if (type === "hidden") {
1816
1829
  return null;
1817
1830
  }
1818
- const renderer = renderers.find(
1819
- ({ canRenderType, canRender = () => true }) => (
1820
- // once the type is matched, we know the props are of the correct type
1821
- canRenderType === type && canRender(props)
1822
- )
1823
- );
1831
+ const renderer = renderers.find(({ canRenderType, canRender = () => true }) => {
1832
+ try {
1833
+ return canRenderType === type && canRender(props);
1834
+ } catch (e) {
1835
+ console.error(`Error in canRender function for ${type}`, e);
1836
+ return false;
1837
+ }
1838
+ });
1824
1839
  if (!renderer) {
1825
1840
  throw new Error(`Could not find a renderer for ${type}`);
1826
1841
  }
@@ -5682,21 +5697,13 @@ var z = /* @__PURE__ */ Object.freeze({
5682
5697
  quotelessJson,
5683
5698
  ZodError
5684
5699
  });
5685
- var imageSchema = z.object({
5686
- text: z.string().optional(),
5687
- url: z.string(),
5688
- accessibilityDescription: z.string().optional()
5689
- });
5690
- var httpMethodSchema = z.union([
5691
- z.literal("GET"),
5692
- z.literal("POST"),
5693
- z.literal("PUT"),
5694
- z.literal("PATCH"),
5695
- z.literal("DELETE")
5700
+ var sizeSchema = z.union([
5701
+ z.literal("xs"),
5702
+ z.literal("sm"),
5703
+ z.literal("md"),
5704
+ z.literal("lg"),
5705
+ z.literal("xl")
5696
5706
  ]);
5697
- var iconNamedSchema = z.object({
5698
- name: z.string()
5699
- });
5700
5707
  var contextSchema = z.union([
5701
5708
  z.literal("positive"),
5702
5709
  z.literal("neutral"),
@@ -5707,18 +5714,114 @@ var contextSchema = z.union([
5707
5714
  z.literal("info"),
5708
5715
  z.literal("primary")
5709
5716
  ]);
5710
- var iconTextSchema = z.object({
5711
- text: z.string()
5712
- });
5713
- var sizeSchema = z.union([
5714
- z.literal("xs"),
5715
- z.literal("sm"),
5716
- z.literal("md"),
5717
- z.literal("lg"),
5718
- z.literal("xl")
5717
+ var columnsLayoutBiasSchema = z.union([
5718
+ z.literal("none"),
5719
+ z.literal("left"),
5720
+ z.literal("right")
5721
+ ]);
5722
+ var statusListLayoutStatusSchema = z.union([
5723
+ z.literal("not-done"),
5724
+ z.literal("pending"),
5725
+ z.literal("done")
5719
5726
  ]);
5720
5727
  var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5721
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5728
+ var formLayoutSchemaReferenceSchema = z.object({
5729
+ $ref: z.string()
5730
+ });
5731
+ var modalLayoutTriggerSchema = z.object({
5732
+ title: z.string()
5733
+ });
5734
+ var httpMethodSchema = z.union([
5735
+ z.literal("GET"),
5736
+ z.literal("POST"),
5737
+ z.literal("PUT"),
5738
+ z.literal("PATCH"),
5739
+ z.literal("DELETE")
5740
+ ]);
5741
+ var dividerLayoutSchema = z.object({
5742
+ type: z.literal("divider"),
5743
+ control: z.string().optional(),
5744
+ margin: sizeSchema.optional()
5745
+ });
5746
+ var listLayoutStatusSchema = z.union([
5747
+ z.literal("warning"),
5748
+ z.literal("neutral"),
5749
+ z.literal("positive")
5750
+ ]);
5751
+ var headingLayoutSchema = z.object({
5752
+ type: z.literal("heading"),
5753
+ text: z.string(),
5754
+ size: sizeSchema.optional(),
5755
+ align: alignSchema.optional(),
5756
+ control: z.string().optional(),
5757
+ margin: sizeSchema.optional()
5758
+ });
5759
+ var alertLayoutSchema = z.object({
5760
+ type: z.literal("alert"),
5761
+ markdown: z.string(),
5762
+ context: contextSchema.optional(),
5763
+ control: z.string().optional(),
5764
+ margin: sizeSchema.optional()
5765
+ });
5766
+ var formLayoutSchema = z.object({
5767
+ type: z.literal("form"),
5768
+ schema: formLayoutSchemaReferenceSchema.optional(),
5769
+ schemaId: z.string(),
5770
+ control: z.string().optional(),
5771
+ margin: sizeSchema.optional()
5772
+ });
5773
+ var imageLayoutSchema = z.object({
5774
+ type: z.literal("image"),
5775
+ text: z.string().optional(),
5776
+ url: z.string(),
5777
+ size: sizeSchema.optional(),
5778
+ accessibilityDescription: z.string().optional(),
5779
+ control: z.string().optional(),
5780
+ margin: sizeSchema.optional()
5781
+ });
5782
+ var infoLayoutSchema = z.object({
5783
+ type: z.literal("info"),
5784
+ markdown: z.string(),
5785
+ align: alignSchema.optional(),
5786
+ control: z.string().optional(),
5787
+ margin: sizeSchema.optional()
5788
+ });
5789
+ var loadingIndicatorLayoutSchema = z.object({
5790
+ type: z.literal("loading-indicator"),
5791
+ size: sizeSchema.optional(),
5792
+ control: z.string().optional(),
5793
+ margin: sizeSchema.optional()
5794
+ });
5795
+ var paragraphLayoutSchema = z.object({
5796
+ type: z.literal("paragraph"),
5797
+ text: z.string(),
5798
+ align: alignSchema.optional(),
5799
+ control: z.string().optional(),
5800
+ margin: sizeSchema.optional()
5801
+ });
5802
+ var instructionsLayoutItemSchema = z.object({
5803
+ text: z.string(),
5804
+ context: contextSchema
5805
+ });
5806
+ var helpSchema = z.object({
5807
+ markdown: z.string()
5808
+ });
5809
+ var imageSchema = z.object({
5810
+ text: z.string().optional(),
5811
+ url: z.string(),
5812
+ accessibilityDescription: z.string().optional()
5813
+ });
5814
+ var summaryProviderSchema = z.object({
5815
+ providesTitle: z.boolean().optional(),
5816
+ providesDescription: z.boolean().optional(),
5817
+ providesIcon: z.boolean().optional(),
5818
+ providesImage: z.boolean().optional()
5819
+ });
5820
+ var validateAsyncSchema = z.object({
5821
+ param: z.string(),
5822
+ method: httpMethodSchema,
5823
+ url: z.string()
5824
+ });
5722
5825
  var autocompleteTokenSchema = z.union([
5723
5826
  z.literal("on"),
5724
5827
  z.literal("name"),
@@ -5784,207 +5887,98 @@ var autocompleteTokenSchema = z.union([
5784
5887
  z.literal("fax"),
5785
5888
  z.literal("pager")
5786
5889
  ]);
5787
- var loadingIndicatorLayoutSchema = z.object({
5788
- type: z.literal("loading-indicator"),
5789
- size: sizeSchema.optional(),
5790
- control: z.string().optional(),
5791
- margin: sizeSchema.optional()
5890
+ var stringSchemaFormatSchema = z.union([
5891
+ z.literal("date"),
5892
+ z.literal("email"),
5893
+ z.literal("numeric"),
5894
+ z.literal("password"),
5895
+ z.literal("phone-number"),
5896
+ z.literal("base64url")
5897
+ ]);
5898
+ var jsonElementSchema = z.lazy(
5899
+ () => z.union([
5900
+ z.string(),
5901
+ z.number(),
5902
+ z.boolean(),
5903
+ z.record(jsonElementSchema),
5904
+ z.array(jsonElementSchema)
5905
+ ]).nullable()
5906
+ );
5907
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5908
+ var externalSchema = z.object({
5909
+ url: z.string()
5792
5910
  });
5793
- var alertLayoutSchema = z.object({
5794
- type: z.literal("alert"),
5795
- markdown: z.string(),
5796
- context: contextSchema.optional(),
5797
- control: z.string().optional(),
5798
- margin: sizeSchema.optional()
5911
+ var stepErrorSchema = z.object({
5912
+ error: z.string().optional(),
5913
+ validation: jsonElementSchema.optional()
5799
5914
  });
5800
- var paragraphLayoutSchema = z.object({
5801
- type: z.literal("paragraph"),
5802
- text: z.string(),
5915
+ var errorResponseBodySchema = z.object({
5916
+ refreshFormUrl: z.string().optional(),
5917
+ analytics: z.record(z.string()).optional(),
5918
+ error: z.string().optional(),
5919
+ validation: jsonElementSchema.optional(),
5920
+ refreshUrl: z.string().optional()
5921
+ });
5922
+ var searchSearchRequestSchema = z.object({
5923
+ url: z.string(),
5924
+ method: httpMethodSchema,
5925
+ param: z.string(),
5926
+ query: z.string()
5927
+ });
5928
+ var navigationStackBehaviorSchema = z.union([
5929
+ z.literal("default"),
5930
+ z.literal("remove-previous"),
5931
+ z.literal("remove-all"),
5932
+ z.literal("replace-current")
5933
+ ]);
5934
+ var actionTypeSchema = z.union([
5935
+ z.literal("primary"),
5936
+ z.literal("secondary"),
5937
+ z.literal("link"),
5938
+ z.literal("positive"),
5939
+ z.literal("negative")
5940
+ ]);
5941
+ var iconNamedSchema = z.object({
5942
+ name: z.string()
5943
+ });
5944
+ var iconTextSchema = z.object({
5945
+ text: z.string()
5946
+ });
5947
+ var actionSchema = z.object({
5948
+ title: z.string().optional(),
5949
+ type: actionTypeSchema.optional(),
5950
+ disabled: z.boolean().optional(),
5951
+ $id: z.string().optional(),
5952
+ $ref: z.string().optional(),
5953
+ id: z.string().optional(),
5954
+ url: z.string().optional(),
5955
+ method: httpMethodSchema.optional(),
5956
+ exit: z.boolean().optional(),
5957
+ result: jsonElementSchema.optional(),
5958
+ data: jsonElementSchema.optional(),
5959
+ timeout: z.number().optional(),
5960
+ skipValidation: z.boolean().optional()
5961
+ });
5962
+ var markdownLayoutSchema = z.object({
5963
+ type: z.literal("markdown"),
5964
+ content: z.string(),
5803
5965
  align: alignSchema.optional(),
5804
5966
  control: z.string().optional(),
5805
5967
  margin: sizeSchema.optional()
5806
5968
  });
5807
- var dividerLayoutSchema = z.object({
5808
- type: z.literal("divider"),
5969
+ var searchLayoutSchema = z.object({
5970
+ type: z.literal("search"),
5971
+ title: z.string(),
5972
+ method: httpMethodSchema,
5973
+ url: z.string(),
5974
+ param: z.string(),
5975
+ emptyMessage: z.string().optional(),
5809
5976
  control: z.string().optional(),
5810
5977
  margin: sizeSchema.optional()
5811
5978
  });
5812
- var listLayoutStatusSchema = z.union([
5813
- z.literal("warning"),
5814
- z.literal("neutral"),
5815
- z.literal("positive")
5816
- ]);
5817
- var formLayoutSchemaReferenceSchema = z.object({
5818
- $ref: z.string()
5819
- });
5820
- var imageLayoutSchema = z.object({
5821
- type: z.literal("image"),
5822
- text: z.string().optional(),
5823
- url: z.string(),
5824
- size: sizeSchema.optional(),
5825
- accessibilityDescription: z.string().optional(),
5826
- control: z.string().optional(),
5827
- margin: sizeSchema.optional()
5828
- });
5829
- var statusListLayoutStatusSchema = z.union([
5830
- z.literal("not-done"),
5831
- z.literal("pending"),
5832
- z.literal("done")
5833
- ]);
5834
- var instructionsLayoutItemSchema = z.object({
5835
- text: z.string(),
5836
- context: contextSchema
5837
- });
5838
- var modalLayoutTriggerSchema = z.object({
5839
- title: z.string()
5840
- });
5841
- var searchLayoutSchema = z.object({
5842
- type: z.literal("search"),
5843
- title: z.string(),
5844
- method: httpMethodSchema,
5845
- url: z.string(),
5846
- param: z.string(),
5847
- emptyMessage: z.string().optional(),
5848
- control: z.string().optional(),
5849
- margin: sizeSchema.optional()
5850
- });
5851
- var infoLayoutSchema = z.object({
5852
- type: z.literal("info"),
5853
- markdown: z.string(),
5854
- align: alignSchema.optional(),
5855
- control: z.string().optional(),
5856
- margin: sizeSchema.optional()
5857
- });
5858
- var formLayoutSchema = z.object({
5859
- type: z.literal("form"),
5860
- schema: formLayoutSchemaReferenceSchema.optional(),
5861
- schemaId: z.string(),
5862
- control: z.string().optional(),
5863
- margin: sizeSchema.optional()
5864
- });
5865
- var headingLayoutSchema = z.object({
5866
- type: z.literal("heading"),
5867
- text: z.string(),
5868
- size: sizeSchema.optional(),
5869
- align: alignSchema.optional(),
5870
- control: z.string().optional(),
5871
- margin: sizeSchema.optional()
5872
- });
5873
- var markdownLayoutSchema = z.object({
5874
- type: z.literal("markdown"),
5875
- content: z.string(),
5876
- align: alignSchema.optional(),
5877
- control: z.string().optional(),
5878
- margin: sizeSchema.optional()
5879
- });
5880
- var columnsLayoutBiasSchema = z.union([
5881
- z.literal("none"),
5882
- z.literal("left"),
5883
- z.literal("right")
5884
- ]);
5885
- var helpSchema = z.object({
5886
- markdown: z.string()
5887
- });
5888
- var searchSearchRequestSchema = z.object({
5889
- url: z.string(),
5890
- method: httpMethodSchema,
5891
- param: z.string(),
5892
- query: z.string()
5893
- });
5894
- var jsonElementSchema = z.lazy(
5895
- () => z.union([
5896
- z.string(),
5897
- z.number(),
5898
- z.boolean(),
5899
- z.record(jsonElementSchema),
5900
- z.array(jsonElementSchema)
5901
- ]).nullable()
5902
- );
5903
- var externalSchema = z.object({
5904
- url: z.string()
5905
- });
5906
- var stepErrorSchema = z.object({
5907
- error: z.string().optional(),
5908
- validation: jsonElementSchema.optional()
5909
- });
5910
- var stringSchemaFormatSchema = z.union([
5911
- z.literal("date"),
5912
- z.literal("email"),
5913
- z.literal("numeric"),
5914
- z.literal("password"),
5915
- z.literal("phone-number"),
5916
- z.literal("base64url")
5917
- ]);
5918
- var summarySummariserSchema = z.object({
5919
- defaultTitle: z.string().optional(),
5920
- defaultDescription: z.string().optional(),
5921
- defaultIcon: iconSchema.optional(),
5922
- defaultImage: imageLayoutSchema.optional(),
5923
- providesTitle: z.boolean().optional(),
5924
- providesDescription: z.boolean().optional(),
5925
- providesIcon: z.boolean().optional(),
5926
- providesImage: z.boolean().optional()
5927
- });
5928
- var validateAsyncSchema = z.object({
5929
- param: z.string(),
5930
- method: httpMethodSchema,
5931
- url: z.string()
5932
- });
5933
- var summaryProviderSchema = z.object({
5934
- providesTitle: z.boolean().optional(),
5935
- providesDescription: z.boolean().optional(),
5936
- providesIcon: z.boolean().optional(),
5937
- providesImage: z.boolean().optional()
5938
- });
5939
- var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5940
- var navigationStackBehaviorSchema = z.union([
5941
- z.literal("default"),
5942
- z.literal("remove-previous"),
5943
- z.literal("remove-all"),
5944
- z.literal("replace-current")
5945
- ]);
5946
- var actionTypeSchema = z.union([
5947
- z.literal("primary"),
5948
- z.literal("secondary"),
5949
- z.literal("link"),
5950
- z.literal("positive"),
5951
- z.literal("negative")
5952
- ]);
5953
- var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5954
- var actionSchema = z.object({
5955
- title: z.string().optional(),
5956
- type: actionTypeSchema.optional(),
5957
- disabled: z.boolean().optional(),
5958
- $id: z.string().optional(),
5959
- $ref: z.string().optional(),
5960
- id: z.string().optional(),
5961
- url: z.string().optional(),
5962
- method: httpMethodSchema.optional(),
5963
- exit: z.boolean().optional(),
5964
- result: jsonElementSchema.optional(),
5965
- data: jsonElementSchema.optional(),
5966
- timeout: z.number().optional(),
5967
- skipValidation: z.boolean().optional()
5968
- });
5969
- var listLayoutItemSchema = z.object({
5970
- title: z.string(),
5971
- description: z.string().optional(),
5972
- icon: iconSchema,
5973
- status: listLayoutStatusSchema.optional()
5974
- });
5975
- var decisionLayoutOptionSchema = z.object({
5976
- action: actionSchema,
5977
- title: z.string(),
5978
- description: z.string().optional(),
5979
- disabled: z.boolean().optional(),
5980
- icon: iconSchema.optional(),
5981
- image: imageLayoutSchema.optional()
5982
- });
5983
- var statusListLayoutItemSchema = z.object({
5979
+ var reviewLayoutCallToActionSchema = z.object({
5984
5980
  title: z.string(),
5985
- description: z.string().optional(),
5986
- icon: iconSchema,
5987
- status: statusListLayoutStatusSchema.optional()
5981
+ action: actionSchema
5988
5982
  });
5989
5983
  var instructionsLayoutSchema = z.object({
5990
5984
  type: z.literal("instructions"),
@@ -5993,51 +5987,17 @@ var instructionsLayoutSchema = z.object({
5993
5987
  control: z.string().optional(),
5994
5988
  margin: sizeSchema.optional()
5995
5989
  });
5996
- var buttonLayoutSchema = z.object({
5997
- type: z.literal("button"),
5998
- size: sizeSchema.optional(),
5999
- title: z.string().optional(),
6000
- action: actionSchema,
6001
- context: contextSchema.optional(),
6002
- disabled: z.boolean().optional(),
6003
- pinOrder: z.number().optional(),
6004
- control: z.string().optional(),
6005
- margin: sizeSchema.optional()
6006
- });
5990
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
6007
5991
  var reviewLayoutFieldSchema = z.object({
6008
5992
  label: z.string(),
6009
5993
  value: z.string(),
6010
5994
  help: helpSchema.optional()
6011
5995
  });
6012
- var searchResultSearchSchema = z.object({
6013
- type: z.literal("search"),
6014
- title: z.string(),
6015
- description: z.string().optional(),
6016
- icon: iconSchema.optional(),
6017
- image: imageLayoutSchema.optional(),
6018
- value: searchSearchRequestSchema
6019
- });
6020
- var searchResultActionSchema = z.object({
6021
- type: z.literal("action"),
5996
+ var statusListLayoutItemSchema = z.object({
6022
5997
  title: z.string(),
6023
5998
  description: z.string().optional(),
6024
- icon: iconSchema.optional(),
6025
- image: imageLayoutSchema.optional(),
6026
- value: actionSchema
6027
- });
6028
- var actionResponseBodySchema = z.object({
6029
- action: actionSchema
6030
- });
6031
- var errorResponseBodySchema = z.object({
6032
- refreshFormUrl: z.string().optional(),
6033
- analytics: z.record(z.string()).optional(),
6034
- error: z.string().optional(),
6035
- validation: jsonElementSchema.optional(),
6036
- refreshUrl: z.string().optional()
6037
- });
6038
- var linkHandlerSchema = z.object({
6039
- regexPattern: z.string(),
6040
- action: actionSchema
5999
+ icon: iconSchema,
6000
+ status: statusListLayoutStatusSchema.optional()
6041
6001
  });
6042
6002
  var blobSchemaSchema = z.object({
6043
6003
  type: z.literal("blob"),
@@ -6077,37 +6037,66 @@ var constSchemaSchema = z.object({
6077
6037
  analyticsId: z.string().optional(),
6078
6038
  disabled: z.boolean().optional()
6079
6039
  });
6080
- var pollingOnErrorSchema = z.object({
6040
+ var summarySummariserSchema = z.object({
6041
+ defaultTitle: z.string().optional(),
6042
+ defaultDescription: z.string().optional(),
6043
+ defaultIcon: iconSchema.optional(),
6044
+ defaultImage: imageLayoutSchema.optional(),
6045
+ providesTitle: z.boolean().optional(),
6046
+ providesDescription: z.boolean().optional(),
6047
+ providesIcon: z.boolean().optional(),
6048
+ providesImage: z.boolean().optional()
6049
+ });
6050
+ var linkHandlerSchema = z.object({
6051
+ regexPattern: z.string(),
6081
6052
  action: actionSchema
6082
6053
  });
6083
- var navigationBackBehaviourSchema = z.object({
6084
- title: z.string().optional(),
6054
+ var actionResponseBodySchema = z.object({
6085
6055
  action: actionSchema
6086
6056
  });
6087
- var reviewLayoutCallToActionSchema = z.object({
6057
+ var searchResultSearchSchema = z.object({
6058
+ type: z.literal("search"),
6088
6059
  title: z.string(),
6060
+ description: z.string().optional(),
6061
+ icon: iconSchema.optional(),
6062
+ image: imageLayoutSchema.optional(),
6063
+ value: searchSearchRequestSchema
6064
+ });
6065
+ var searchResultActionSchema = z.object({
6066
+ type: z.literal("action"),
6067
+ title: z.string(),
6068
+ description: z.string().optional(),
6069
+ icon: iconSchema.optional(),
6070
+ image: imageLayoutSchema.optional(),
6071
+ value: actionSchema
6072
+ });
6073
+ var pollingOnErrorSchema = z.object({
6089
6074
  action: actionSchema
6090
6075
  });
6091
- var listLayoutSchema = z.object({
6092
- type: z.literal("list"),
6093
- items: z.array(listLayoutItemSchema),
6076
+ var navigationBackBehaviourSchema = z.object({
6094
6077
  title: z.string().optional(),
6095
- control: z.string().optional(),
6096
- margin: sizeSchema.optional()
6097
- });
6098
- var decisionLayoutSchema = z.object({
6099
- type: z.literal("decision"),
6100
- options: z.array(decisionLayoutOptionSchema),
6101
- control: z.string().optional(),
6102
- margin: sizeSchema.optional()
6078
+ action: actionSchema
6103
6079
  });
6104
- var statusListLayoutSchema = z.object({
6105
- type: z.literal("status-list"),
6106
- items: z.array(statusListLayoutItemSchema),
6080
+ var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
6081
+ var buttonLayoutSchema = z.object({
6082
+ type: z.literal("button"),
6083
+ size: sizeSchema.optional(),
6107
6084
  title: z.string().optional(),
6085
+ action: actionSchema,
6086
+ context: contextSchema.optional(),
6087
+ disabled: z.boolean().optional(),
6088
+ pinOrder: z.number().optional(),
6108
6089
  control: z.string().optional(),
6109
6090
  margin: sizeSchema.optional()
6110
6091
  });
6092
+ var decisionLayoutOptionSchema = z.object({
6093
+ action: actionSchema,
6094
+ title: z.string(),
6095
+ description: z.string().optional(),
6096
+ disabled: z.boolean().optional(),
6097
+ icon: iconSchema.optional(),
6098
+ image: imageLayoutSchema.optional()
6099
+ });
6111
6100
  var reviewLayoutSchema = z.object({
6112
6101
  type: z.literal("review"),
6113
6102
  orientation: z.string().optional(),
@@ -6118,7 +6107,19 @@ var reviewLayoutSchema = z.object({
6118
6107
  control: z.string().optional(),
6119
6108
  margin: sizeSchema.optional()
6120
6109
  });
6121
- var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
6110
+ var statusListLayoutSchema = z.object({
6111
+ type: z.literal("status-list"),
6112
+ items: z.array(statusListLayoutItemSchema),
6113
+ title: z.string().optional(),
6114
+ control: z.string().optional(),
6115
+ margin: sizeSchema.optional()
6116
+ });
6117
+ var listLayoutItemSchema = z.object({
6118
+ title: z.string(),
6119
+ description: z.string().optional(),
6120
+ icon: iconSchema,
6121
+ status: listLayoutStatusSchema.optional()
6122
+ });
6122
6123
  var pollingSchema = z.object({
6123
6124
  url: z.string(),
6124
6125
  interval: z.number(),
@@ -6130,9 +6131,33 @@ var navigationSchema = z.object({
6130
6131
  back: navigationBackBehaviourSchema.optional(),
6131
6132
  stackBehavior: navigationStackBehaviorSchema.optional()
6132
6133
  });
6134
+ var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
6135
+ var decisionLayoutSchema = z.object({
6136
+ type: z.literal("decision"),
6137
+ options: z.array(decisionLayoutOptionSchema),
6138
+ control: z.string().optional(),
6139
+ margin: sizeSchema.optional()
6140
+ });
6141
+ var listLayoutSchema = z.object({
6142
+ type: z.literal("list"),
6143
+ items: z.array(listLayoutItemSchema),
6144
+ title: z.string().optional(),
6145
+ control: z.string().optional(),
6146
+ margin: sizeSchema.optional()
6147
+ });
6133
6148
  var searchResponseBodySchema = z.object({
6134
6149
  results: z.array(searchResultSchema)
6135
6150
  });
6151
+ var columnsLayoutSchema = z.lazy(
6152
+ () => z.object({
6153
+ type: z.literal("columns"),
6154
+ left: z.array(layoutSchema),
6155
+ right: z.array(layoutSchema),
6156
+ bias: columnsLayoutBiasSchema.optional(),
6157
+ control: z.string().optional(),
6158
+ margin: sizeSchema.optional()
6159
+ })
6160
+ );
6136
6161
  var layoutSchema = z.lazy(
6137
6162
  () => z.union([
6138
6163
  alertLayoutSchema,
@@ -6156,26 +6181,6 @@ var layoutSchema = z.lazy(
6156
6181
  statusListLayoutSchema
6157
6182
  ])
6158
6183
  );
6159
- var boxLayoutSchema = z.lazy(
6160
- () => z.object({
6161
- type: z.literal("box"),
6162
- components: z.array(layoutSchema),
6163
- width: sizeSchema.optional(),
6164
- border: z.boolean().optional(),
6165
- control: z.string().optional(),
6166
- margin: sizeSchema.optional()
6167
- })
6168
- );
6169
- var columnsLayoutSchema = z.lazy(
6170
- () => z.object({
6171
- type: z.literal("columns"),
6172
- left: z.array(layoutSchema),
6173
- right: z.array(layoutSchema),
6174
- bias: columnsLayoutBiasSchema.optional(),
6175
- control: z.string().optional(),
6176
- margin: sizeSchema.optional()
6177
- })
6178
- );
6179
6184
  var modalLayoutSchema = z.lazy(
6180
6185
  () => z.object({
6181
6186
  type: z.literal("modal"),
@@ -6190,25 +6195,14 @@ var modalLayoutContentSchema = z.lazy(
6190
6195
  components: z.array(layoutSchema)
6191
6196
  })
6192
6197
  );
6193
- var stepSchema = z.lazy(
6198
+ var boxLayoutSchema = z.lazy(
6194
6199
  () => z.object({
6195
- key: z.string().optional(),
6196
- type: z.string().optional(),
6197
- actions: z.array(actionSchema).optional(),
6198
- refreshFormUrl: z.string().optional(),
6199
- id: z.string(),
6200
- title: z.string(),
6201
- description: z.string().optional(),
6202
- schemas: z.array(schemaSchema),
6203
- layout: z.array(layoutSchema),
6204
- model: jsonElementSchema.optional(),
6205
- external: externalSchema.optional(),
6206
- polling: pollingSchema.optional(),
6207
- linkHandlers: z.array(linkHandlerSchema).optional(),
6208
- analytics: z.record(z.string()).optional(),
6209
- errors: stepErrorSchema.optional(),
6210
- navigation: navigationSchema.optional(),
6211
- refreshUrl: z.string().optional()
6200
+ type: z.literal("box"),
6201
+ components: z.array(layoutSchema),
6202
+ width: sizeSchema.optional(),
6203
+ border: z.boolean().optional(),
6204
+ control: z.string().optional(),
6205
+ margin: sizeSchema.optional()
6212
6206
  })
6213
6207
  );
6214
6208
  var schemaSchema = z.lazy(
@@ -6412,26 +6406,55 @@ var stringSchemaSchema = z.lazy(
6412
6406
  title: z.string().optional(),
6413
6407
  description: z.string().optional(),
6414
6408
  control: z.string().optional(),
6415
- default: z.string().optional(),
6409
+ default: z.string().optional(),
6410
+ hidden: z.boolean().optional(),
6411
+ disabled: z.boolean().optional(),
6412
+ icon: iconSchema.optional(),
6413
+ image: imageSchema.optional(),
6414
+ keywords: z.array(z.string()).optional(),
6415
+ summary: summaryProviderSchema.optional(),
6416
+ analyticsId: z.string().optional(),
6417
+ persistAsync: persistAsyncSchema.optional(),
6418
+ refreshStepOnChange: z.boolean().optional(),
6419
+ validationAsync: validateAsyncSchema.optional(),
6420
+ validationMessages: z.record(z.string()).optional(),
6421
+ alert: alertLayoutSchema.optional(),
6422
+ cameraConfig: jsonElementSchema.optional(),
6423
+ accepts: z.array(z.string()).optional(),
6424
+ maxSize: z.number().optional(),
6425
+ source: uploadSourceSchema.optional(),
6426
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6427
+ autofillKey: z.string().optional(),
6428
+ help: helpSchema.optional()
6429
+ })
6430
+ );
6431
+ var persistAsyncSchema = z.lazy(
6432
+ () => z.object({
6433
+ param: z.string(),
6434
+ idProperty: z.string(),
6435
+ schema: schemaSchema,
6436
+ url: z.string(),
6437
+ method: httpMethodSchema
6438
+ })
6439
+ );
6440
+ var arraySchemaTupleSchema = z.lazy(
6441
+ () => z.object({
6442
+ type: z.literal("array"),
6443
+ promoted: z.boolean().optional(),
6444
+ $id: z.string().optional(),
6445
+ items: z.array(schemaSchema),
6446
+ title: z.string().optional(),
6447
+ description: z.string().optional(),
6448
+ control: z.string().optional(),
6416
6449
  hidden: z.boolean().optional(),
6417
- disabled: z.boolean().optional(),
6418
6450
  icon: iconSchema.optional(),
6419
6451
  image: imageSchema.optional(),
6420
6452
  keywords: z.array(z.string()).optional(),
6421
6453
  summary: summaryProviderSchema.optional(),
6422
6454
  analyticsId: z.string().optional(),
6423
6455
  persistAsync: persistAsyncSchema.optional(),
6424
- refreshStepOnChange: z.boolean().optional(),
6425
6456
  validationAsync: validateAsyncSchema.optional(),
6426
- validationMessages: z.record(z.string()).optional(),
6427
- alert: alertLayoutSchema.optional(),
6428
- cameraConfig: jsonElementSchema.optional(),
6429
- accepts: z.array(z.string()).optional(),
6430
- maxSize: z.number().optional(),
6431
- source: uploadSourceSchema.optional(),
6432
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6433
- autofillKey: z.string().optional(),
6434
- help: helpSchema.optional()
6457
+ alert: alertLayoutSchema.optional()
6435
6458
  })
6436
6459
  );
6437
6460
  var arraySchemaListSchema = z.lazy(
@@ -6461,33 +6484,25 @@ var arraySchemaListSchema = z.lazy(
6461
6484
  disabled: z.boolean().optional()
6462
6485
  })
6463
6486
  );
6464
- var persistAsyncSchema = z.lazy(
6465
- () => z.object({
6466
- param: z.string(),
6467
- idProperty: z.string(),
6468
- schema: schemaSchema,
6469
- url: z.string(),
6470
- method: httpMethodSchema
6471
- })
6472
- );
6473
- var arraySchemaTupleSchema = z.lazy(
6487
+ var stepSchema = z.lazy(
6474
6488
  () => z.object({
6475
- type: z.literal("array"),
6476
- promoted: z.boolean().optional(),
6477
- $id: z.string().optional(),
6478
- items: z.array(schemaSchema),
6479
- title: z.string().optional(),
6489
+ key: z.string().optional(),
6490
+ type: z.string().optional(),
6491
+ actions: z.array(actionSchema).optional(),
6492
+ refreshFormUrl: z.string().optional(),
6493
+ id: z.string(),
6494
+ title: z.string(),
6480
6495
  description: z.string().optional(),
6481
- control: z.string().optional(),
6482
- hidden: z.boolean().optional(),
6483
- icon: iconSchema.optional(),
6484
- image: imageSchema.optional(),
6485
- keywords: z.array(z.string()).optional(),
6486
- summary: summaryProviderSchema.optional(),
6487
- analyticsId: z.string().optional(),
6488
- persistAsync: persistAsyncSchema.optional(),
6489
- validationAsync: validateAsyncSchema.optional(),
6490
- alert: alertLayoutSchema.optional()
6496
+ schemas: z.array(schemaSchema),
6497
+ layout: z.array(layoutSchema),
6498
+ model: jsonElementSchema.optional(),
6499
+ external: externalSchema.optional(),
6500
+ polling: pollingSchema.optional(),
6501
+ linkHandlers: z.array(linkHandlerSchema).optional(),
6502
+ analytics: z.record(z.string()).optional(),
6503
+ errors: stepErrorSchema.optional(),
6504
+ navigation: navigationSchema.optional(),
6505
+ refreshUrl: z.string().optional()
6491
6506
  })
6492
6507
  );
6493
6508
  var validateStep = (step) => validate(step, stepSchema);
@@ -10015,7 +10030,9 @@ var mapStepToComponent = (_a) => {
10015
10030
  stepPolling,
10016
10031
  updateComponent,
10017
10032
  title: displayStepTitle ? title : void 0,
10018
- trackEvent
10033
+ trackEvent,
10034
+ step,
10035
+ onAction
10019
10036
  });
10020
10037
  return stepComponent;
10021
10038
  };
@@ -11929,18 +11946,79 @@ function ItemSummaryOption({
11929
11946
  }
11930
11947
  var RepeatableRenderer_default = RepeatableRenderer;
11931
11948
 
11932
- // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11949
+ // src/revamp/wise/renderers/ReviewRenderer.tsx
11933
11950
  var import_components26 = require("@transferwise/components");
11951
+ var import_jsx_runtime41 = require("react/jsx-runtime");
11952
+ var ReviewRenderer = {
11953
+ canRenderType: "review",
11954
+ render: ({ callToAction, control, fields, margin, title }) => {
11955
+ const orientation = mapControlToDefinitionListLayout(control);
11956
+ const action = callToAction ? {
11957
+ text: callToAction.title,
11958
+ onClick: (event) => {
11959
+ event.preventDefault();
11960
+ callToAction.onClick();
11961
+ }
11962
+ } : void 0;
11963
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
11964
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title: title != null ? title : "", action }),
11965
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11966
+ import_components26.DefinitionList,
11967
+ {
11968
+ layout: orientation,
11969
+ definitions: fields.map(({ label, value, help }, index) => ({
11970
+ key: String(index),
11971
+ title: label,
11972
+ value: getFieldValue(value, help, orientation)
11973
+ }))
11974
+ }
11975
+ ) })
11976
+ ] });
11977
+ }
11978
+ };
11979
+ var ReviewRenderer_default = ReviewRenderer;
11980
+ var mapControlToDefinitionListLayout = (control) => {
11981
+ switch (control) {
11982
+ case "horizontal":
11983
+ case "horizontal-end-aligned":
11984
+ return "HORIZONTAL_RIGHT_ALIGNED";
11985
+ case "horizontal-start-aligned":
11986
+ return "HORIZONTAL_LEFT_ALIGNED";
11987
+ case "vertical-two-column":
11988
+ return "VERTICAL_TWO_COLUMN";
11989
+ case "vertical":
11990
+ case "vertical-one-column":
11991
+ default:
11992
+ return "VERTICAL_ONE_COLUMN";
11993
+ }
11994
+ };
11995
+ var getFieldValue = (value, help, orientation) => {
11996
+ if (help) {
11997
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
11998
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help }),
11999
+ " ",
12000
+ value
12001
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
12002
+ value,
12003
+ " ",
12004
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help })
12005
+ ] });
12006
+ }
12007
+ return value;
12008
+ };
12009
+
12010
+ // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
12011
+ var import_components27 = require("@transferwise/components");
11934
12012
 
11935
12013
  // src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
11936
12014
  var import_react_intl15 = require("react-intl");
11937
- var import_jsx_runtime41 = require("react/jsx-runtime");
12015
+ var import_jsx_runtime42 = require("react/jsx-runtime");
11938
12016
  function ErrorResult({ state }) {
11939
12017
  const intl = (0, import_react_intl15.useIntl)();
11940
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "m-t-2", children: [
12018
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
11941
12019
  intl.formatMessage(generic_error_messages_default.genericError),
11942
12020
  "\xA0",
11943
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12021
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11944
12022
  "a",
11945
12023
  {
11946
12024
  href: "/",
@@ -11956,7 +12034,7 @@ function ErrorResult({ state }) {
11956
12034
 
11957
12035
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11958
12036
  var import_react15 = require("react");
11959
- var import_jsx_runtime42 = require("react/jsx-runtime");
12037
+ var import_jsx_runtime43 = require("react/jsx-runtime");
11960
12038
  function BlockSearchRendererComponent({
11961
12039
  id,
11962
12040
  isLoading,
@@ -11968,9 +12046,9 @@ function BlockSearchRendererComponent({
11968
12046
  }) {
11969
12047
  const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
11970
12048
  const trackEvent = useTrackEvent();
11971
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
11972
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11973
- import_components26.Input,
12049
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
12050
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12051
+ import_components27.Input,
11974
12052
  {
11975
12053
  id,
11976
12054
  name: id,
@@ -11986,7 +12064,7 @@ function BlockSearchRendererComponent({
11986
12064
  }
11987
12065
  }
11988
12066
  ) }),
11989
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
12067
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
11990
12068
  ] });
11991
12069
  }
11992
12070
  function SearchResultContent({
@@ -11995,29 +12073,29 @@ function SearchResultContent({
11995
12073
  }) {
11996
12074
  switch (state.type) {
11997
12075
  case "error":
11998
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state });
12076
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
11999
12077
  case "results":
12000
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResults, { state, onChange });
12078
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
12001
12079
  case "noResults":
12002
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EmptySearchResult, { state });
12080
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
12003
12081
  case "pending":
12004
12082
  default:
12005
12083
  return null;
12006
12084
  }
12007
12085
  }
12008
12086
  function EmptySearchResult({ state }) {
12009
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12087
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12010
12088
  }
12011
12089
  function SearchResults({
12012
12090
  state
12013
12091
  }) {
12014
12092
  const trackEvent = useTrackEvent();
12015
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12016
- import_components26.NavigationOption,
12093
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12094
+ import_components27.NavigationOption,
12017
12095
  {
12018
12096
  title: result.title,
12019
12097
  content: result.description,
12020
- media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
12098
+ media: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
12021
12099
  showMediaCircle: false,
12022
12100
  showMediaAtAllSizes: true,
12023
12101
  onClick: () => {
@@ -12033,10 +12111,10 @@ function SearchResults({
12033
12111
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
12034
12112
 
12035
12113
  // src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
12036
- var import_components27 = require("@transferwise/components");
12114
+ var import_components28 = require("@transferwise/components");
12037
12115
  var import_icons2 = require("@transferwise/icons");
12038
12116
  var import_react16 = require("react");
12039
- var import_jsx_runtime43 = require("react/jsx-runtime");
12117
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12040
12118
  function InlineSearchRenderer({
12041
12119
  id,
12042
12120
  isLoading,
@@ -12047,19 +12125,19 @@ function InlineSearchRenderer({
12047
12125
  }) {
12048
12126
  const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
12049
12127
  const trackEvent = useTrackEvent();
12050
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
12128
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
12051
12129
  id,
12052
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12053
- import_components27.Typeahead,
12130
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12131
+ import_components28.Typeahead,
12054
12132
  {
12055
12133
  id: "typeahead-input-id",
12056
12134
  name: "typeahead-input-name",
12057
12135
  size: "md",
12058
12136
  maxHeight: 100,
12059
- footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TypeaheadFooter, { state, isLoading }),
12137
+ footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
12060
12138
  multiple: false,
12061
12139
  clearable: false,
12062
- addon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons2.Search, { size: 24 }),
12140
+ addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
12063
12141
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12064
12142
  minQueryLength: 1,
12065
12143
  onChange: (values) => {
@@ -12096,29 +12174,29 @@ function mapResultToTypeaheadOption(result) {
12096
12174
  }
12097
12175
  function TypeaheadFooter({ state, isLoading }) {
12098
12176
  if (state.type === "noResults") {
12099
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12177
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12100
12178
  }
12101
12179
  if (state.type === "error") {
12102
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
12180
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
12103
12181
  }
12104
12182
  if (state.type === "pending" || isLoading) {
12105
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
12183
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
12106
12184
  }
12107
12185
  return null;
12108
12186
  }
12109
12187
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12110
12188
 
12111
12189
  // src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
12112
- var import_jsx_runtime44 = require("react/jsx-runtime");
12190
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12113
12191
  var SearchRenderer = {
12114
12192
  canRenderType: "search",
12115
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
12193
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
12116
12194
  };
12117
12195
  var SearchRenderer_default = SearchRenderer;
12118
12196
 
12119
12197
  // src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
12120
- var import_components28 = require("@transferwise/components");
12121
- var import_jsx_runtime45 = require("react/jsx-runtime");
12198
+ var import_components29 = require("@transferwise/components");
12199
+ var import_jsx_runtime46 = require("react/jsx-runtime");
12122
12200
  function RadioInputRendererComponent(props) {
12123
12201
  const {
12124
12202
  id,
@@ -12132,9 +12210,9 @@ function RadioInputRendererComponent(props) {
12132
12210
  selectedIndex,
12133
12211
  onSelect
12134
12212
  } = props;
12135
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
12136
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12137
- import_components28.RadioGroup,
12213
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
12214
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12215
+ import_components29.RadioGroup,
12138
12216
  {
12139
12217
  name: id,
12140
12218
  radios: options.map((option, index) => ({
@@ -12142,7 +12220,7 @@ function RadioInputRendererComponent(props) {
12142
12220
  value: index,
12143
12221
  secondary: option.description,
12144
12222
  disabled: option.disabled || disabled,
12145
- avatar: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12223
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12146
12224
  })),
12147
12225
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12148
12226
  onChange: onSelect
@@ -12154,9 +12232,9 @@ function RadioInputRendererComponent(props) {
12154
12232
  }
12155
12233
 
12156
12234
  // src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
12157
- var import_components29 = require("@transferwise/components");
12235
+ var import_components30 = require("@transferwise/components");
12158
12236
  var import_react17 = require("react");
12159
- var import_jsx_runtime46 = require("react/jsx-runtime");
12237
+ var import_jsx_runtime47 = require("react/jsx-runtime");
12160
12238
  function TabInputRendererComponent(props) {
12161
12239
  const {
12162
12240
  id,
@@ -12175,9 +12253,9 @@ function TabInputRendererComponent(props) {
12175
12253
  onSelect(0);
12176
12254
  }
12177
12255
  }, [selectedIndex, onSelect, options.length]);
12178
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
12179
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12180
- import_components29.Tabs,
12256
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
12257
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12258
+ import_components30.Tabs,
12181
12259
  {
12182
12260
  name: id,
12183
12261
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -12185,7 +12263,7 @@ function TabInputRendererComponent(props) {
12185
12263
  title: option.title,
12186
12264
  // if we pass null, we get some props-types console errors
12187
12265
  // eslint-disable-next-line react/jsx-no-useless-fragment
12188
- content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
12266
+ content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
12189
12267
  disabled: option.disabled || disabled
12190
12268
  })),
12191
12269
  onTabSelect: onSelect
@@ -12197,26 +12275,26 @@ function TabInputRendererComponent(props) {
12197
12275
  var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
12198
12276
 
12199
12277
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
12200
- var import_components31 = require("@transferwise/components");
12278
+ var import_components32 = require("@transferwise/components");
12201
12279
 
12202
12280
  // src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
12203
- var import_components30 = require("@transferwise/components");
12204
- var import_jsx_runtime47 = require("react/jsx-runtime");
12281
+ var import_components31 = require("@transferwise/components");
12282
+ var import_jsx_runtime48 = require("react/jsx-runtime");
12205
12283
  function SelectTriggerMedia({ icon, image }) {
12206
12284
  if (image == null ? void 0 : image.url) {
12207
12285
  return null;
12208
12286
  }
12209
12287
  if (icon && "name" in icon) {
12210
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name }) });
12288
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DynamicIcon_default, { name: icon.name }) });
12211
12289
  }
12212
12290
  if (icon && "text" in icon) {
12213
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
12291
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
12214
12292
  }
12215
12293
  return null;
12216
12294
  }
12217
12295
 
12218
12296
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
12219
- var import_jsx_runtime48 = require("react/jsx-runtime");
12297
+ var import_jsx_runtime49 = require("react/jsx-runtime");
12220
12298
  function SelectInputRendererComponent(props) {
12221
12299
  const {
12222
12300
  id,
@@ -12251,17 +12329,17 @@ function SelectInputRendererComponent(props) {
12251
12329
  const contentProps = withinTrigger ? {
12252
12330
  title: option.title,
12253
12331
  note: option.description,
12254
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12332
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12255
12333
  } : {
12256
12334
  title: option.title,
12257
12335
  description: option.description,
12258
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12336
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12259
12337
  };
12260
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
12338
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components32.SelectInputOptionContent, __spreadValues({}, contentProps));
12261
12339
  };
12262
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
12263
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12264
- import_components31.SelectInput,
12340
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12341
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12342
+ import_components32.SelectInput,
12265
12343
  {
12266
12344
  name: id,
12267
12345
  placeholder,
@@ -12280,8 +12358,8 @@ function SelectInputRendererComponent(props) {
12280
12358
 
12281
12359
  // src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
12282
12360
  var import_react18 = require("react");
12283
- var import_components32 = require("@transferwise/components");
12284
- var import_jsx_runtime49 = require("react/jsx-runtime");
12361
+ var import_components33 = require("@transferwise/components");
12362
+ var import_jsx_runtime50 = require("react/jsx-runtime");
12285
12363
  function SegmentedInputRendererComponent(props) {
12286
12364
  const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
12287
12365
  (0, import_react18.useEffect)(() => {
@@ -12289,9 +12367,9 @@ function SegmentedInputRendererComponent(props) {
12289
12367
  onSelect(0);
12290
12368
  }
12291
12369
  }, [selectedIndex, onSelect, options.length]);
12292
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12293
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12294
- import_components32.SegmentedControl,
12370
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
12371
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12372
+ import_components33.SegmentedControl,
12295
12373
  {
12296
12374
  name: `${id}-segmented-control`,
12297
12375
  value: String(selectedIndex),
@@ -12305,44 +12383,44 @@ function SegmentedInputRendererComponent(props) {
12305
12383
  onChange: (value) => onSelect(Number(value))
12306
12384
  }
12307
12385
  ) }),
12308
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: `${id}-children`, children })
12386
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { id: `${id}-children`, children })
12309
12387
  ] });
12310
12388
  }
12311
12389
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
12312
12390
 
12313
12391
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
12314
- var import_jsx_runtime50 = require("react/jsx-runtime");
12392
+ var import_jsx_runtime51 = require("react/jsx-runtime");
12315
12393
  var SelectInputRenderer = {
12316
12394
  canRenderType: "input-select",
12317
12395
  render: (props) => {
12318
12396
  switch (props.control) {
12319
12397
  case "radio":
12320
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12398
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12321
12399
  case "tab":
12322
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12400
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12323
12401
  case "segmented":
12324
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12402
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12325
12403
  case "select":
12326
12404
  default:
12327
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12405
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12328
12406
  }
12329
12407
  }
12330
12408
  };
12331
12409
  var SelectInputRenderer_default = SelectInputRenderer;
12332
12410
 
12333
12411
  // src/revamp/wise/renderers/StatusListRenderer.tsx
12334
- var import_components33 = require("@transferwise/components");
12335
- var import_jsx_runtime51 = require("react/jsx-runtime");
12412
+ var import_components34 = require("@transferwise/components");
12413
+ var import_jsx_runtime52 = require("react/jsx-runtime");
12336
12414
  var StatusListRenderer = {
12337
12415
  canRenderType: "status-list",
12338
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
12339
- title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components33.Header, { title }) : null,
12340
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12341
- import_components33.Summary,
12416
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
12417
+ title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Header, { title }) : null,
12418
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12419
+ import_components34.Summary,
12342
12420
  {
12343
12421
  title: itemTitle,
12344
12422
  description,
12345
- icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12423
+ icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12346
12424
  status: mapStatus(status)
12347
12425
  },
12348
12426
  `${title}/${description || ""}`
@@ -12358,63 +12436,63 @@ var mapStatus = (status) => {
12358
12436
  };
12359
12437
 
12360
12438
  // src/revamp/wise/renderers/components/VariableTextInput.tsx
12361
- var import_components34 = require("@transferwise/components");
12362
- var import_jsx_runtime52 = require("react/jsx-runtime");
12439
+ var import_components35 = require("@transferwise/components");
12440
+ var import_jsx_runtime53 = require("react/jsx-runtime");
12363
12441
  function VariableTextInput({
12364
12442
  control,
12365
12443
  inputProps
12366
12444
  }) {
12367
12445
  switch (control) {
12368
12446
  case "password":
12369
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12447
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12370
12448
  case "email":
12371
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12449
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12372
12450
  case "textarea":
12373
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12451
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12374
12452
  case "numeric":
12375
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12453
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12376
12454
  case "phone-number":
12377
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12455
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12378
12456
  default:
12379
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12457
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12380
12458
  }
12381
12459
  }
12382
12460
  function TextInput(_a) {
12383
12461
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12384
12462
  if (typeof displayFormat === "string") {
12385
12463
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
12386
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12387
- import_components34.InputWithDisplayFormat,
12464
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12465
+ import_components35.InputWithDisplayFormat,
12388
12466
  __spreadValues({
12389
12467
  displayPattern: displayFormat,
12390
12468
  onChange: (newValue) => onChange(newValue)
12391
12469
  }, inputProps)
12392
12470
  );
12393
12471
  }
12394
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12472
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12395
12473
  }
12396
12474
  function TextAreaInput(_a) {
12397
12475
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12398
12476
  const textAreaProps = __spreadValues({ id, name: id }, rest);
12399
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12400
- import_components34.TextareaWithDisplayFormat,
12477
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12478
+ import_components35.TextareaWithDisplayFormat,
12401
12479
  __spreadValues({
12402
12480
  displayPattern: displayFormat,
12403
12481
  onChange: (newValue) => onChange(newValue)
12404
12482
  }, textAreaProps)
12405
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12483
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12406
12484
  }
12407
12485
  function NumericInput(_a) {
12408
12486
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12409
12487
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
12410
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12411
- import_components34.InputWithDisplayFormat,
12488
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12489
+ import_components35.InputWithDisplayFormat,
12412
12490
  __spreadValues({
12413
12491
  displayPattern: displayFormat,
12414
12492
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
12415
12493
  }, numericProps)
12416
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12417
- import_components34.Input,
12494
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12495
+ import_components35.Input,
12418
12496
  __spreadValues({
12419
12497
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
12420
12498
  }, numericProps)
@@ -12422,12 +12500,12 @@ function NumericInput(_a) {
12422
12500
  }
12423
12501
  function PhoneNumberInput(_a) {
12424
12502
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
12425
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12503
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12426
12504
  }
12427
12505
  var VariableTextInput_default = VariableTextInput;
12428
12506
 
12429
12507
  // src/revamp/wise/renderers/TextInputRenderer.tsx
12430
- var import_jsx_runtime53 = require("react/jsx-runtime");
12508
+ var import_jsx_runtime54 = require("react/jsx-runtime");
12431
12509
  var TextInputRenderer = {
12432
12510
  canRenderType: "input-text",
12433
12511
  render: (props) => {
@@ -12452,14 +12530,14 @@ var TextInputRenderer = {
12452
12530
  ]);
12453
12531
  const value = initialValue != null ? initialValue : "";
12454
12532
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
12455
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps }) });
12533
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VariableTextInput_default, { control, inputProps }) });
12456
12534
  }
12457
12535
  };
12458
12536
  var TextInputRenderer_default = TextInputRenderer;
12459
12537
 
12460
12538
  // src/revamp/wise/renderers/UploadInputRenderer.tsx
12461
- var import_components35 = require("@transferwise/components");
12462
- var import_jsx_runtime54 = require("react/jsx-runtime");
12539
+ var import_components36 = require("@transferwise/components");
12540
+ var import_jsx_runtime55 = require("react/jsx-runtime");
12463
12541
  var UploadInputRenderer = {
12464
12542
  canRenderType: "input-upload",
12465
12543
  render: (props) => {
@@ -12475,8 +12553,8 @@ var UploadInputRenderer = {
12475
12553
  };
12476
12554
  return (
12477
12555
  // We don't pass help here as there is no sensible place to display it
12478
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12479
- import_components35.UploadInput,
12556
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12557
+ import_components36.UploadInput,
12480
12558
  {
12481
12559
  id,
12482
12560
  description,
@@ -12530,8 +12608,8 @@ var LargeUploadRenderer = {
12530
12608
  throw e;
12531
12609
  }
12532
12610
  };
12533
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12534
- import_components35.Upload,
12611
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12612
+ import_components36.Upload,
12535
12613
  __spreadProps(__spreadValues({}, uploadProps), {
12536
12614
  usAccept: getAcceptsString(accepts),
12537
12615
  usDisabled: disabled,
@@ -12543,67 +12621,6 @@ var LargeUploadRenderer = {
12543
12621
  }
12544
12622
  };
12545
12623
 
12546
- // src/revamp/wise/renderers/ReviewRenderer.tsx
12547
- var import_components36 = require("@transferwise/components");
12548
- var import_jsx_runtime55 = require("react/jsx-runtime");
12549
- var ReviewRenderer = {
12550
- canRenderType: "review",
12551
- render: ({ callToAction, control, fields, margin, title }) => {
12552
- const orientation = mapControlToDefinitionListLayout(control);
12553
- const action = callToAction ? {
12554
- text: callToAction.title,
12555
- onClick: (event) => {
12556
- event.preventDefault();
12557
- callToAction.onClick();
12558
- }
12559
- } : void 0;
12560
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
12561
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
12562
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12563
- import_components36.DefinitionList,
12564
- {
12565
- layout: orientation,
12566
- definitions: fields.map(({ label, value, help }, index) => ({
12567
- key: String(index),
12568
- title: label,
12569
- value: getFieldValue(value, help, orientation)
12570
- }))
12571
- }
12572
- ) })
12573
- ] });
12574
- }
12575
- };
12576
- var ReviewRenderer_default = ReviewRenderer;
12577
- var mapControlToDefinitionListLayout = (control) => {
12578
- switch (control) {
12579
- case "horizontal":
12580
- case "horizontal-end-aligned":
12581
- return "HORIZONTAL_RIGHT_ALIGNED";
12582
- case "horizontal-start-aligned":
12583
- return "HORIZONTAL_LEFT_ALIGNED";
12584
- case "vertical-two-column":
12585
- return "VERTICAL_TWO_COLUMN";
12586
- case "vertical":
12587
- case "vertical-one-column":
12588
- default:
12589
- return "VERTICAL_ONE_COLUMN";
12590
- }
12591
- };
12592
- var getFieldValue = (value, help, orientation) => {
12593
- if (help) {
12594
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12595
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
12596
- " ",
12597
- value
12598
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12599
- value,
12600
- " ",
12601
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
12602
- ] });
12603
- }
12604
- return value;
12605
- };
12606
-
12607
12624
  // src/revamp/wise/renderers/step/StepRenderer.tsx
12608
12625
  var import_react20 = require("react");
12609
12626
 
@@ -19511,6 +19528,79 @@ function JsonSchemaForm(props) {
19511
19528
  var JsonSchemaForm_default = JsonSchemaForm;
19512
19529
  var noop8 = () => {
19513
19530
  };
19531
+
19532
+ // src/revamp/wise/renderers/step/KYCCameraStepRenderer.tsx
19533
+ var import_react67 = require("react");
19534
+ var import_jsx_runtime130 = require("react/jsx-runtime");
19535
+ var KYCCameraStepRenderer = {
19536
+ canRenderType: "step",
19537
+ canRender: (props) => getKYCCameraStepConfiguration(props.step) != null,
19538
+ render: KYCCameraStepRendererComponent
19539
+ };
19540
+ function KYCCameraStepRendererComponent(props) {
19541
+ const { error, trackEvent, step, onAction } = props;
19542
+ (0, import_react67.useEffect)(() => {
19543
+ if (error) {
19544
+ console.error("KYCCameraStepRendererComponent", error);
19545
+ }
19546
+ }, [error]);
19547
+ const config = getKYCCameraStepConfiguration(step);
19548
+ if (!config) {
19549
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
19550
+ }
19551
+ const handleCapture = async (blob) => {
19552
+ if (blob) {
19553
+ const newValue = { [propertyName]: await blobToBase642(blob) };
19554
+ const patchedAction = __spreadProps(__spreadValues({}, action), { skipValidation: true, data: newValue });
19555
+ void onAction(patchedAction);
19556
+ }
19557
+ };
19558
+ const { title, imageUrl, cameraConfig, action, propertyName } = config;
19559
+ const kycCameraConfig = cameraConfig;
19560
+ const { assets, instructions, direction } = kycCameraConfig;
19561
+ return config ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
19562
+ CameraCapture_default,
19563
+ {
19564
+ overlay: assets == null ? void 0 : assets.overlay,
19565
+ outline: assets == null ? void 0 : assets.outline,
19566
+ title: error != null ? error : title,
19567
+ imageUrl,
19568
+ instructions,
19569
+ direction,
19570
+ onEvent: trackEvent,
19571
+ onCapture: (blob) => {
19572
+ void handleCapture(blob);
19573
+ }
19574
+ },
19575
+ error
19576
+ ) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
19577
+ }
19578
+ var getKYCCameraStepConfiguration = (step) => {
19579
+ var _a, _b, _c;
19580
+ const action = (_a = step.actions) == null ? void 0 : _a[0];
19581
+ if (action === void 0) {
19582
+ return null;
19583
+ }
19584
+ const firstSchema = filterHiddenSchemas2((_b = step.schemas) != null ? _b : [])[0];
19585
+ if (!firstSchema || !isObjectSchema(firstSchema)) {
19586
+ return null;
19587
+ }
19588
+ const propertyName = Object.keys(firstSchema.properties)[0];
19589
+ const childSchema = propertyName ? firstSchema.properties[propertyName] : void 0;
19590
+ const cameraConfig = childSchema ? getCameraConfig(childSchema) : null;
19591
+ const title = childSchema == null ? void 0 : childSchema.title;
19592
+ const imageUrl = (_c = childSchema == null ? void 0 : childSchema.image) == null ? void 0 : _c.url;
19593
+ return action && propertyName && cameraConfig ? { title, imageUrl, propertyName, cameraConfig, action } : null;
19594
+ };
19595
+ var getCameraConfig = (childSchema) => childSchema != null && "type" in childSchema && childSchema.type === "string" && childSchema.format === "base64url" && childSchema.source === "camera" && childSchema.cameraConfig != null ? childSchema.cameraConfig : null;
19596
+ var filterHiddenSchemas2 = (schemas) => schemas.filter(
19597
+ (schema) => isObjectSchema(schema) ? Object.values((schema == null ? void 0 : schema.properties) || {}).find((s) => (s == null ? void 0 : s.hidden) !== true) : (schema == null ? void 0 : schema.hidden) !== true
19598
+ );
19599
+ var blobToBase642 = (blob) => new Promise((resolve, _) => {
19600
+ const reader = new FileReader();
19601
+ reader.onloadend = () => resolve(reader.result);
19602
+ reader.readAsDataURL(blob);
19603
+ });
19514
19604
  /*! Bundled license information:
19515
19605
 
19516
19606
  classnames/index.js: