@wise/dynamic-flow-client 3.11.6 → 3.12.0-experimental-kyc-camera-59faf76

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 (621) 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/orientationLockOverlay/OrientationLockOverlay.js +8 -0
  7. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
  8. package/build/common/cameraCapture/hooks/useFullScreenOrientationLock.js +62 -0
  9. package/build/common/cameraCapture/hooks/useVideoConstraints.js +80 -0
  10. package/build/common/cameraCapture/overlay/Overlay.js +78 -0
  11. package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -0
  12. package/build/common/cameraCapture/tracking/index.js +109 -0
  13. package/build/common/cameraCapture/types/index.js +7 -0
  14. package/build/common/cameraCapture/utils/index.js +107 -0
  15. package/build/common/cameraCapture/utils/mobile-utils.js +23 -0
  16. package/build/common/cameraCapture/utils/mobile-utils.spec.js +71 -0
  17. package/build/common/errorBoundary/ErrorBoundary.js +44 -0
  18. package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
  19. package/build/common/httpClientContext/HttpClientContext.js +24 -0
  20. package/build/common/httpClientContext/index.js +1 -0
  21. package/build/common/makeHttpClient/index.js +1 -0
  22. package/build/common/makeHttpClient/makeHttpClient.js +30 -0
  23. package/build/common/makeHttpClient/makeHttpClient.spec.js +140 -0
  24. package/build/common/messages/external-confirmation.messages.js +23 -0
  25. package/build/common/messages/generic-error.messages.js +18 -0
  26. package/build/common/messages/help.messages.js +8 -0
  27. package/build/common/messages/multi-file-upload.messages.js +18 -0
  28. package/build/common/messages/multi-select.messages.js +8 -0
  29. package/build/common/messages/paragraph.messages.js +13 -0
  30. package/build/common/messages/repeatable.messages.js +23 -0
  31. package/build/common/messages/validation.array.messages.js +13 -0
  32. package/build/common/messages/validation.messages.js +53 -0
  33. package/build/common/utils/api-utils.js +4 -0
  34. package/build/common/utils/debounce.js +44 -0
  35. package/build/common/utils/debounce.spec.js +72 -0
  36. package/build/i18n/index.js +36 -0
  37. package/build/index.js +11 -0
  38. package/build/legacy/common/constants/DateMode.js +4 -0
  39. package/build/legacy/common/constants/FeatureName.js +4 -0
  40. package/build/legacy/common/constants/FormControlType.js +21 -0
  41. package/build/legacy/common/constants/MonthFormat.js +4 -0
  42. package/build/legacy/common/constants/Size.js +7 -0
  43. package/build/legacy/common/constants/index.js +4 -0
  44. package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +25 -0
  45. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +15 -0
  46. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.spec.js +113 -0
  47. package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
  48. package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +47 -0
  49. package/build/legacy/common/contexts/featureContext/FeatureContext.js +11 -0
  50. package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +30 -0
  51. package/build/legacy/common/contexts/index.js +3 -0
  52. package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
  53. package/build/legacy/common/contexts/logContext/LogContext.spec.js +43 -0
  54. package/build/legacy/common/hooks/index.js +7 -0
  55. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
  56. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
  57. package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
  58. package/build/legacy/common/hooks/useExternal/useExternal.spec.js +236 -0
  59. package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +71 -0
  60. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
  61. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.spec.js +221 -0
  62. package/build/legacy/common/hooks/usePolling/usePolling.js +53 -0
  63. package/build/legacy/common/hooks/usePolling/usePolling.spec.js +243 -0
  64. package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
  65. package/build/legacy/common/hooks/usePrevious/usePrevious.spec.js +66 -0
  66. package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +45 -0
  67. package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
  68. package/build/legacy/common/messages.js +8 -0
  69. package/build/legacy/common/utils/api-utils.js +6 -0
  70. package/build/legacy/common/utils/date-utils.js +22 -0
  71. package/build/legacy/common/utils/file-utils.js +45 -0
  72. package/build/legacy/common/utils/file-utils.spec.js +69 -0
  73. package/build/legacy/common/utils/id-utils.js +5 -0
  74. package/build/legacy/common/utils/id-utils.spec.js +12 -0
  75. package/build/legacy/common/utils/index.js +11 -0
  76. package/build/legacy/common/utils/is-equal.js +21 -0
  77. package/build/legacy/common/utils/is-equal.spec.js +88 -0
  78. package/build/legacy/common/utils/misc-utils.js +4 -0
  79. package/build/legacy/common/utils/model-utils.js +33 -0
  80. package/build/legacy/common/utils/schema-utils.js +113 -0
  81. package/build/legacy/common/utils/step-utils.js +32 -0
  82. package/build/legacy/common/validators/index.js +5 -0
  83. package/build/legacy/common/validators/models/model-utils.js +119 -0
  84. package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
  85. package/build/legacy/common/validators/models/model-validators.js +62 -0
  86. package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
  87. package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
  88. package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
  89. package/build/legacy/common/validators/types/type-validators.js +14 -0
  90. package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
  91. package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
  92. package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
  93. package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
  94. package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
  95. package/build/legacy/common/validators/values/value-validators.js +6 -0
  96. package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
  97. package/build/legacy/dynamic-flow-types.js +1 -0
  98. package/build/legacy/dynamicFlow/BackButton.js +22 -0
  99. package/build/legacy/dynamicFlow/DynamicFlow.js +363 -0
  100. package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
  101. package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
  102. package/build/legacy/dynamicFlow/index.js +1 -0
  103. package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
  104. package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
  105. package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +25 -0
  106. package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +33 -0
  107. package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
  108. package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
  109. package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +253 -0
  110. package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
  111. package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
  112. package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
  113. package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
  114. package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
  115. package/build/legacy/dynamicFlow/stories/visual-tests/VisualTests.story.js +43 -0
  116. package/build/legacy/dynamicFlow/tests/Actions.spec.js +232 -0
  117. package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
  118. package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
  119. package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
  120. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialAction.spec.js +471 -0
  121. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +749 -0
  122. package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +267 -0
  123. package/build/legacy/dynamicFlow/tests/DynamicFlow.legacy.spec.js +1202 -0
  124. package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
  125. package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
  126. package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
  127. package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
  128. package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
  129. package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
  130. package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +327 -0
  131. package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
  132. package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
  133. package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
  134. package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
  135. package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
  136. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +391 -0
  137. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +588 -0
  138. package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
  139. package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
  140. package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
  141. package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
  142. package/build/legacy/dynamicFlow/utils/index.js +5 -0
  143. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
  144. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
  145. package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +35 -0
  146. package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
  147. package/build/legacy/dynamicFlow/utils/useErrorResponse.js +62 -0
  148. package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
  149. package/build/legacy/formControl/FormControl.js +267 -0
  150. package/build/legacy/formControl/FormControl.spec.js +445 -0
  151. package/build/legacy/formControl/Select.spec.js +104 -0
  152. package/build/legacy/formControl/index.js +1 -0
  153. package/build/legacy/formControl/utils/getAutocompleteString.js +80 -0
  154. package/build/legacy/formControl/utils/getAutocompleteString.spec.js +30 -0
  155. package/build/legacy/formControl/utils/index.js +2 -0
  156. package/build/legacy/formControl/utils/value-utils.js +108 -0
  157. package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
  158. package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +534 -0
  159. package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
  160. package/build/legacy/jsonSchemaForm/JsonSchemaForm.spec.js +77 -0
  161. package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
  162. package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
  163. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
  164. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArrayTypeSchema.spec.js +50 -0
  165. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +34 -0
  166. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
  167. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +86 -0
  168. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
  169. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
  170. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
  171. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
  172. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
  173. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
  174. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
  175. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
  176. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
  177. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
  178. package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
  179. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js +233 -0
  180. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +100 -0
  181. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.spec.js +291 -0
  182. package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
  183. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +89 -0
  184. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.spec.js +182 -0
  185. package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
  186. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
  187. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
  188. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.spec.js +334 -0
  189. package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
  190. package/build/legacy/jsonSchemaForm/help/Help.js +9 -0
  191. package/build/legacy/jsonSchemaForm/help/Help.spec.js +61 -0
  192. package/build/legacy/jsonSchemaForm/help/index.js +1 -0
  193. package/build/legacy/jsonSchemaForm/index.js +1 -0
  194. package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
  195. package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
  196. package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
  197. package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
  198. package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
  199. package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
  200. package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
  201. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
  202. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
  203. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
  204. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
  205. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.spec.js +243 -0
  206. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
  207. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
  208. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.spec.js +420 -0
  209. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
  210. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
  211. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +16 -0
  212. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.spec.js +125 -0
  213. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
  214. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.spec.js +82 -0
  215. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
  216. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.spec.js +130 -0
  217. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
  218. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
  219. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.spec.js +117 -0
  220. package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
  221. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +138 -0
  222. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
  223. package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
  224. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
  225. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
  226. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +220 -0
  227. package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
  228. package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
  229. package/build/legacy/layout/DynamicLayout.end-to-end.spec.js +71 -0
  230. package/build/legacy/layout/DynamicLayout.js +68 -0
  231. package/build/legacy/layout/DynamicLayout.spec.js +243 -0
  232. package/build/legacy/layout/alert/DynamicAlert.js +29 -0
  233. package/build/legacy/layout/alert/DynamicAlert.spec.js +42 -0
  234. package/build/legacy/layout/box/DynamicBox.js +30 -0
  235. package/build/legacy/layout/box/DynamicBox.spec.js +56 -0
  236. package/build/legacy/layout/button/DynamicButton.js +16 -0
  237. package/build/legacy/layout/button/DynamicButton.spec.js +141 -0
  238. package/build/legacy/layout/button/utils.js +45 -0
  239. package/build/legacy/layout/button/utils.spec.js +50 -0
  240. package/build/legacy/layout/columns/DynamicColumns.js +27 -0
  241. package/build/legacy/layout/columns/DynamicColumns.spec.js +83 -0
  242. package/build/legacy/layout/decision/DynamicDecision.js +10 -0
  243. package/build/legacy/layout/decision/DynamicDecision.spec.js +146 -0
  244. package/build/legacy/layout/divider/DynamicDivider.js +9 -0
  245. package/build/legacy/layout/divider/DynamicDivider.spec.js +17 -0
  246. package/build/legacy/layout/external/DynamicExternal.js +32 -0
  247. package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
  248. package/build/legacy/layout/external/DynamicExternal.spec.js +264 -0
  249. package/build/legacy/layout/form/DynamicForm.js +22 -0
  250. package/build/legacy/layout/form/DynamicForm.spec.js +74 -0
  251. package/build/legacy/layout/heading/DynamicHeading.js +40 -0
  252. package/build/legacy/layout/heading/DynamicHeading.spec.js +14 -0
  253. package/build/legacy/layout/icon/DynamicIcon.js +17 -0
  254. package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
  255. package/build/legacy/layout/icon/FlagIcon.js +11 -0
  256. package/build/legacy/layout/icon/NamedIcon.js +19 -0
  257. package/build/legacy/layout/image/DynamicImage.js +112 -0
  258. package/build/legacy/layout/index.js +20 -0
  259. package/build/legacy/layout/instructions/DynamicInstructions.js +19 -0
  260. package/build/legacy/layout/list/DynamicStatusList.js +37 -0
  261. package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
  262. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
  263. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
  264. package/build/legacy/layout/markdown/DynamicMarkdown.js +12 -0
  265. package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
  266. package/build/legacy/layout/modal/DynamicModal.js +26 -0
  267. package/build/legacy/layout/paragraph/DynamicParagraph.js +35 -0
  268. package/build/legacy/layout/paragraph/DynamicParagraph.spec.js +109 -0
  269. package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
  270. package/build/legacy/layout/review/DynamicReview.js +59 -0
  271. package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
  272. package/build/legacy/layout/search/DynamicSearch.js +83 -0
  273. package/build/legacy/layout/search/SearchInput.js +6 -0
  274. package/build/legacy/layout/search/SearchResults.js +20 -0
  275. package/build/legacy/layout/search/useSearch.js +150 -0
  276. package/build/legacy/layout/utils/getNavigationOptionMedia.js +17 -0
  277. package/build/legacy/layout/utils/index.js +32 -0
  278. package/build/legacy/step/cameraStep/CameraStep.js +124 -0
  279. package/build/legacy/step/cameraStep/index.js +1 -0
  280. package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
  281. package/build/legacy/step/externalConfirmationStep/index.js +1 -0
  282. package/build/legacy/step/index.js +3 -0
  283. package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
  284. package/build/legacy/step/layoutStep/LayoutStep.spec.js +189 -0
  285. package/build/legacy/step/layoutStep/index.js +1 -0
  286. package/build/legacy/step/layoutStep/utils/index.js +2 -0
  287. package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
  288. package/build/legacy/step/layoutStep/utils/inline-reference-utils.spec.js +296 -0
  289. package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
  290. package/build/legacy/step/layoutStep/utils/layout-utils.spec.js +558 -0
  291. package/build/legacy/test-utils/DynamicFlowProviders.js +8 -0
  292. package/build/legacy/test-utils/index.js +4 -0
  293. package/build/legacy/test-utils/legacy-utils.js +69 -0
  294. package/build/legacy/test-utils/log-utils.js +9 -0
  295. package/build/main.js +763 -749
  296. package/build/main.min.js +1 -1
  297. package/build/main.mjs +759 -745
  298. package/build/revamp/DynamicFlowCore.js +25 -0
  299. package/build/revamp/DynamicFlowWise.js +32 -0
  300. package/build/revamp/DynamicFlowWise.spec.js +105 -0
  301. package/build/revamp/DynamicFragmentWise.js +83 -0
  302. package/build/revamp/domain/components/AlertComponent.js +50 -0
  303. package/build/revamp/domain/components/AllOfComponent.js +72 -0
  304. package/build/revamp/domain/components/BooleanInputComponent.js +109 -0
  305. package/build/revamp/domain/components/BoxComponent.js +65 -0
  306. package/build/revamp/domain/components/ButtonComponent.js +50 -0
  307. package/build/revamp/domain/components/ColumnsComponent.js +74 -0
  308. package/build/revamp/domain/components/ConstComponent.js +50 -0
  309. package/build/revamp/domain/components/ContainerComponent.js +65 -0
  310. package/build/revamp/domain/components/DateInputComponent.js +128 -0
  311. package/build/revamp/domain/components/DecisionComponent.js +50 -0
  312. package/build/revamp/domain/components/DividerComponent.js +50 -0
  313. package/build/revamp/domain/components/FormComponent.js +65 -0
  314. package/build/revamp/domain/components/HeadingComponent.js +50 -0
  315. package/build/revamp/domain/components/ImageComponent.js +50 -0
  316. package/build/revamp/domain/components/InstructionsComponent.js +50 -0
  317. package/build/revamp/domain/components/IntegerInputComponent.js +129 -0
  318. package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
  319. package/build/revamp/domain/components/MarkdownComponent.js +50 -0
  320. package/build/revamp/domain/components/ModalComponent.js +65 -0
  321. package/build/revamp/domain/components/MultiSelectInputComponent.js +148 -0
  322. package/build/revamp/domain/components/MultiUploadInputComponent.js +192 -0
  323. package/build/revamp/domain/components/NumberInputComponent.js +129 -0
  324. package/build/revamp/domain/components/ObjectComponent.js +104 -0
  325. package/build/revamp/domain/components/ParagraphComponent.js +50 -0
  326. package/build/revamp/domain/components/ReviewComponent.js +50 -0
  327. package/build/revamp/domain/components/SelectInputComponent.js +140 -0
  328. package/build/revamp/domain/components/StatusListComponent.js +50 -0
  329. package/build/revamp/domain/components/StepDomainComponent.js +87 -0
  330. package/build/revamp/domain/components/TextInputComponent.js +129 -0
  331. package/build/revamp/domain/components/UploadInputComponent.js +154 -0
  332. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +150 -0
  333. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +146 -0
  334. package/build/revamp/domain/components/searchComponent/SearchComponent.js +111 -0
  335. package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
  336. package/build/revamp/domain/components/utils/component-utils.js +18 -0
  337. package/build/revamp/domain/components/utils/debounce.js +38 -0
  338. package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
  339. package/build/revamp/domain/components/utils/file-utils.js +65 -0
  340. package/build/revamp/domain/components/utils/file-utils.spec.js +81 -0
  341. package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +31 -0
  342. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +46 -0
  343. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +125 -0
  344. package/build/revamp/domain/components/utils/local-value.js +14 -0
  345. package/build/revamp/domain/features/events.js +1 -0
  346. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +134 -0
  347. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +200 -0
  348. package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
  349. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
  350. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
  351. package/build/revamp/domain/features/polling/getStepPolling.js +82 -0
  352. package/build/revamp/domain/features/polling/getStepPolling.spec.js +170 -0
  353. package/build/revamp/domain/features/refresh/getPerformRefresh.js +16 -0
  354. package/build/revamp/domain/features/search/getPerformSearchFunction.js +102 -0
  355. package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
  356. package/build/revamp/domain/features/summary/summary-utils.js +39 -0
  357. package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
  358. package/build/revamp/domain/features/utils/http-utils.js +34 -0
  359. package/build/revamp/domain/features/utils/response-utils.js +9 -0
  360. package/build/revamp/domain/features/validation/spec-utils.js +16 -0
  361. package/build/revamp/domain/features/validation/validation-functions.js +12 -0
  362. package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
  363. package/build/revamp/domain/features/validation/value-checks.js +111 -0
  364. package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
  365. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +95 -0
  366. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +178 -0
  367. package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
  368. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
  369. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
  370. package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
  371. package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
  372. package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +45 -0
  373. package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
  374. package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +40 -0
  375. package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
  376. package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +27 -0
  377. package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
  378. package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
  379. package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
  380. package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
  381. package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
  382. package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
  383. package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
  384. package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
  385. package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
  386. package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
  387. package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
  388. package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
  389. package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
  390. package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
  391. package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
  392. package/build/revamp/domain/mappers/mapStepToComponent.js +133 -0
  393. package/build/revamp/domain/mappers/mapStepToComponent.spec.js +162 -0
  394. package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
  395. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +42 -0
  396. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +54 -0
  397. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +64 -0
  398. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +66 -0
  399. package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
  400. package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
  401. package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
  402. package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
  403. package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
  404. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +60 -0
  405. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
  406. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
  407. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
  408. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
  409. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
  410. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
  411. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
  412. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +37 -0
  413. package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
  414. package/build/revamp/domain/mappers/schema/types.js +1 -0
  415. package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
  416. package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
  417. package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
  418. package/build/revamp/domain/mappers/types.js +1 -0
  419. package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
  420. package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
  421. package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
  422. package/build/revamp/domain/mappers/utils/inlineAction.js +23 -0
  423. package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
  424. package/build/revamp/domain/types.js +1 -0
  425. package/build/revamp/flow/executeRefresh.js +97 -0
  426. package/build/revamp/flow/executeSubmission.js +160 -0
  427. package/build/revamp/flow/getResponseType.js +76 -0
  428. package/build/revamp/flow/response-utils.js +92 -0
  429. package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
  430. package/build/revamp/renderers/getRenderFunction.js +55 -0
  431. package/build/revamp/renderers/getSchemaErrorMessageFunction.js +90 -0
  432. package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
  433. package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
  434. package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
  435. package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
  436. package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
  437. package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
  438. package/build/revamp/renderers/mappers/componentToRendererProps.js +108 -0
  439. package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
  440. package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
  441. package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
  442. package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
  443. package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
  444. package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
  445. package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
  446. package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
  447. package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
  448. package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
  449. package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
  450. package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
  451. package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
  452. package/build/revamp/renderers/mappers/multiSelectComponentToProps.js +28 -0
  453. package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
  454. package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
  455. package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
  456. package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
  457. package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
  458. package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
  459. package/build/revamp/renderers/mappers/searchComponentToProps.js +53 -0
  460. package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
  461. package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
  462. package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
  463. package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
  464. package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
  465. package/build/revamp/renderers/stepComponentToProps.js +16 -0
  466. package/build/revamp/renderers/types.js +1 -0
  467. package/build/revamp/stories/dev-tools/ActionResponse.story.js +101 -0
  468. package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +314 -0
  469. package/build/revamp/stories/dev-tools/EditableStep.story.js +73 -0
  470. package/build/revamp/stories/dev-tools/ErrorHandling.story.js +149 -0
  471. package/build/revamp/stories/dev-tools/External.story.js +83 -0
  472. package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +123 -0
  473. package/build/revamp/stories/dev-tools/PersistAsync.story.js +168 -0
  474. package/build/revamp/stories/dev-tools/Polling.story.js +79 -0
  475. package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +309 -0
  476. package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +1004 -0
  477. package/build/revamp/stories/dev-tools/SearchFeature.story.js +260 -0
  478. package/build/revamp/stories/dev-tools/ServerTest.story.js +86 -0
  479. package/build/revamp/stories/dev-tools/Upload.story.js +221 -0
  480. package/build/revamp/stories/dev-tools/ValidationAsync.story.js +161 -0
  481. package/build/revamp/stories/examples/KYCCameraStep.story.js +84 -0
  482. package/build/revamp/stories/examples/ObjectConst.story.js +153 -0
  483. package/build/revamp/stories/examples/OneOfInitialisation.story.js +102 -0
  484. package/build/revamp/stories/utils/fixtureHttpClient.js +130 -0
  485. package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
  486. package/build/revamp/stories/visual-tests/VisualTests.story.js +114 -0
  487. package/build/revamp/test-utils/component-utils.js +19 -0
  488. package/build/revamp/test-utils/step-utils.js +6 -0
  489. package/build/revamp/tests/ImageRenderer.spec.js +108 -0
  490. package/build/revamp/tests/InitialAction.spec.js +299 -0
  491. package/build/revamp/tests/InitialStep.spec.js +226 -0
  492. package/build/revamp/tests/Logging.spec.js +112 -0
  493. package/build/revamp/tests/OneOfInitialisation.spec.js +889 -0
  494. package/build/revamp/tests/Polling.spec.js +611 -0
  495. package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +322 -0
  496. package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +447 -0
  497. package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +447 -0
  498. package/build/revamp/tests/RefreshOnChangePreserve.spec.js +341 -0
  499. package/build/revamp/tests/Rerendering.spec.js +156 -0
  500. package/build/revamp/tests/SegmentedControl.spec.js +48 -0
  501. package/build/revamp/tests/Submission.ResponseHandling.spec.js +697 -0
  502. package/build/revamp/tests/Submission.spec.js +399 -0
  503. package/build/revamp/tests/legacy/Actions.spec.js +242 -0
  504. package/build/revamp/tests/legacy/BackButton.spec.js +189 -0
  505. package/build/revamp/tests/legacy/HiddenSchemas.spec.js +312 -0
  506. package/build/revamp/tests/legacy/MultiSelect.spec.js +753 -0
  507. package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +447 -0
  508. package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +339 -0
  509. package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +385 -0
  510. package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +352 -0
  511. package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +638 -0
  512. package/build/revamp/tests/legacy/Search.spec.js +501 -0
  513. package/build/revamp/tests/legacy/ValidationAsync.spec.js +452 -0
  514. package/build/revamp/tests/legacy/useExternal.spec.js +235 -0
  515. package/build/revamp/types.js +1 -0
  516. package/build/revamp/useDynamicFlowCore.js +298 -0
  517. package/build/revamp/utils/component-utils.js +86 -0
  518. package/build/revamp/utils/component-utils.spec.js +385 -0
  519. package/build/revamp/utils/findComponent.js +29 -0
  520. package/build/revamp/utils/findComponent.spec.js +92 -0
  521. package/build/revamp/utils/type-utils.js +59 -0
  522. package/build/revamp/utils/type-validators.js +16 -0
  523. package/build/revamp/utils/type-validators.spec.js +163 -0
  524. package/build/revamp/utils/useStableCallback.js +21 -0
  525. package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
  526. package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
  527. package/build/revamp/wise/renderers/BoxRenderer.js +19 -0
  528. package/build/revamp/wise/renderers/ButtonRenderer.js +53 -0
  529. package/build/revamp/wise/renderers/ColumnsRenderer.js +14 -0
  530. package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
  531. package/build/revamp/wise/renderers/DecisionRenderer.js +18 -0
  532. package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
  533. package/build/revamp/wise/renderers/FormRenderer.js +10 -0
  534. package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
  535. package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
  536. package/build/revamp/wise/renderers/ImageRenderer.js +112 -0
  537. package/build/revamp/wise/renderers/InstructionsRenderer.js +23 -0
  538. package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
  539. package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
  540. package/build/revamp/wise/renderers/MarkdownRenderer.js +11 -0
  541. package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
  542. package/build/revamp/wise/renderers/MultiSelectInputRenderer.js +84 -0
  543. package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +63 -0
  544. package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
  545. package/build/revamp/wise/renderers/ParagraphRenderer.js +45 -0
  546. package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
  547. package/build/revamp/wise/renderers/ReviewRenderer.js +50 -0
  548. package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +59 -0
  549. package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +11 -0
  550. package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +63 -0
  551. package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +21 -0
  552. package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +16 -0
  553. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +14 -0
  554. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.spec.js +76 -0
  555. package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +21 -0
  556. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +33 -0
  557. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
  558. package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +16 -0
  559. package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +22 -0
  560. package/build/revamp/wise/renderers/StatusListRenderer.js +21 -0
  561. package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
  562. package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
  563. package/build/revamp/wise/renderers/components/FieldInput.js +9 -0
  564. package/build/revamp/wise/renderers/components/Help.js +10 -0
  565. package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
  566. package/build/revamp/wise/renderers/components/UploadFieldInput.js +14 -0
  567. package/build/revamp/wise/renderers/components/VariableDateInput.js +36 -0
  568. package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
  569. package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
  570. package/build/revamp/wise/renderers/components/icon/FlagIcon.js +11 -0
  571. package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
  572. package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +20 -0
  573. package/build/revamp/wise/renderers/getWiseRenderers.js +61 -0
  574. package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
  575. package/build/revamp/wise/renderers/step/BackButton.js +11 -0
  576. package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +20 -0
  577. package/build/revamp/wise/renderers/step/KYCCameraStepRenderer.js +144 -0
  578. package/build/revamp/wise/renderers/step/StepRenderer.js +31 -0
  579. package/build/revamp/wise/renderers/step/StepRendererContext.js +11 -0
  580. package/build/revamp/wise/renderers/step/useExternal.js +15 -0
  581. package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
  582. package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
  583. package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
  584. package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
  585. package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
  586. package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
  587. package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
  588. package/build/test-utils/NeptuneProviders.js +23 -0
  589. package/build/test-utils/fetch-utils.js +104 -0
  590. package/build/test-utils/index.js +2 -0
  591. package/build/test-utils/rtl-utils.js +20 -0
  592. package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.d.ts +4 -4
  593. package/build/types/common/cameraCapture/CameraEventHandler.d.ts +2 -0
  594. package/build/types/common/cameraCapture/components/index.d.ts +3 -0
  595. package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +2 -2
  596. package/build/types/common/cameraCapture/index.d.ts +2 -0
  597. package/build/types/common/cameraCapture/screens/index.d.ts +1 -0
  598. package/build/types/common/cameraCapture/tracking/index.d.ts +8 -0
  599. package/build/types/index.d.ts +1 -0
  600. package/build/types/legacy/common/utils/index.d.ts +5 -5
  601. package/build/types/legacy/dynamic-flow-types.d.ts +2 -1
  602. package/build/types/revamp/domain/components/StepDomainComponent.d.ts +6 -4
  603. package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
  604. package/build/types/revamp/renderers/types.d.ts +5 -1
  605. package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +2 -0
  606. package/package.json +2 -2
  607. package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +0 -8
  608. /package/build/{types/legacy/step/cameraStep/cameraCapture/components/index.d.ts → common/cameraCapture/components/index.js} +0 -0
  609. /package/build/{types/legacy/step/cameraStep/cameraCapture/index.d.ts → common/cameraCapture/index.js} +0 -0
  610. /package/build/{types/legacy/step/cameraStep/cameraCapture/screens/index.d.ts → common/cameraCapture/screens/index.js} +0 -0
  611. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.messages.d.ts +0 -0
  612. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/bottomBar/BottomBar.d.ts +0 -0
  613. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +0 -0
  614. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +0 -0
  615. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useVideoConstraints.d.ts +0 -0
  616. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/overlay/Overlay.d.ts +0 -0
  617. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.d.ts +0 -0
  618. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/types/index.d.ts +0 -0
  619. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/utils/index.d.ts +0 -0
  620. /package/build/types/{legacy/common → common/cameraCapture}/utils/mobile-utils.d.ts +0 -0
  621. /package/build/types/{legacy/common → common}/utils/debounce.d.ts +0 -0
package/build/main.js CHANGED
@@ -1291,16 +1291,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
1291
1291
  var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
1292
1292
 
1293
1293
  // src/revamp/renderers/stepComponentToProps.ts
1294
- var stepComponentToProps = ({ back, description, error, external, loadingState, title, trackEvent }, children) => ({
1294
+ var stepComponentToProps = ({
1295
+ back,
1296
+ description,
1297
+ error,
1298
+ external,
1299
+ loadingState,
1300
+ step,
1301
+ title,
1302
+ trackEvent,
1303
+ onAction
1304
+ }, children) => ({
1295
1305
  type: "step",
1296
1306
  back,
1297
1307
  description,
1298
1308
  error,
1299
1309
  external,
1300
1310
  loadingState,
1311
+ step,
1301
1312
  title,
1313
+ children,
1302
1314
  trackEvent,
1303
- children
1315
+ onAction
1304
1316
  });
1305
1317
 
1306
1318
  // src/revamp/renderers/mappers/alertComponentToProps.ts
@@ -5687,38 +5699,24 @@ var imageSchema = z.object({
5687
5699
  url: z.string(),
5688
5700
  accessibilityDescription: z.string().optional()
5689
5701
  });
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")
5696
- ]);
5697
- var iconNamedSchema = z.object({
5698
- name: z.string()
5702
+ var summaryProviderSchema = z.object({
5703
+ providesTitle: z.boolean().optional(),
5704
+ providesDescription: z.boolean().optional(),
5705
+ providesIcon: z.boolean().optional(),
5706
+ providesImage: z.boolean().optional()
5699
5707
  });
5700
- var contextSchema = z.union([
5701
- z.literal("positive"),
5702
- z.literal("neutral"),
5703
- z.literal("warning"),
5704
- z.literal("negative"),
5705
- z.literal("success"),
5706
- z.literal("failure"),
5707
- z.literal("info"),
5708
- z.literal("primary")
5709
- ]);
5710
- var iconTextSchema = z.object({
5711
- text: z.string()
5708
+ var jsonElementSchema = z.lazy(
5709
+ () => z.union([
5710
+ z.string(),
5711
+ z.number(),
5712
+ z.boolean(),
5713
+ z.record(jsonElementSchema),
5714
+ z.array(jsonElementSchema)
5715
+ ]).nullable()
5716
+ );
5717
+ var helpSchema = z.object({
5718
+ markdown: z.string()
5712
5719
  });
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")
5719
- ]);
5720
- var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5721
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5722
5720
  var autocompleteTokenSchema = z.union([
5723
5721
  z.literal("on"),
5724
5722
  z.literal("name"),
@@ -5784,59 +5782,84 @@ var autocompleteTokenSchema = z.union([
5784
5782
  z.literal("fax"),
5785
5783
  z.literal("pager")
5786
5784
  ]);
5787
- var loadingIndicatorLayoutSchema = z.object({
5788
- type: z.literal("loading-indicator"),
5789
- size: sizeSchema.optional(),
5790
- control: z.string().optional(),
5791
- margin: sizeSchema.optional()
5792
- });
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()
5799
- });
5800
- var paragraphLayoutSchema = z.object({
5801
- type: z.literal("paragraph"),
5802
- text: z.string(),
5803
- align: alignSchema.optional(),
5804
- control: z.string().optional(),
5805
- margin: sizeSchema.optional()
5785
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5786
+ var stringSchemaFormatSchema = z.union([
5787
+ z.literal("date"),
5788
+ z.literal("email"),
5789
+ z.literal("numeric"),
5790
+ z.literal("password"),
5791
+ z.literal("phone-number"),
5792
+ z.literal("base64url")
5793
+ ]);
5794
+ var externalSchema = z.object({
5795
+ url: z.string()
5806
5796
  });
5807
- var dividerLayoutSchema = z.object({
5808
- type: z.literal("divider"),
5809
- control: z.string().optional(),
5810
- margin: sizeSchema.optional()
5797
+ var stepErrorSchema = z.object({
5798
+ error: z.string().optional(),
5799
+ validation: jsonElementSchema.optional()
5811
5800
  });
5801
+ var httpMethodSchema = z.union([
5802
+ z.literal("GET"),
5803
+ z.literal("POST"),
5804
+ z.literal("PUT"),
5805
+ z.literal("PATCH"),
5806
+ z.literal("DELETE")
5807
+ ]);
5808
+ var actionTypeSchema = z.union([
5809
+ z.literal("primary"),
5810
+ z.literal("secondary"),
5811
+ z.literal("link"),
5812
+ z.literal("positive"),
5813
+ z.literal("negative")
5814
+ ]);
5815
+ var navigationStackBehaviorSchema = z.union([
5816
+ z.literal("default"),
5817
+ z.literal("remove-previous"),
5818
+ z.literal("remove-all"),
5819
+ z.literal("replace-current")
5820
+ ]);
5821
+ var sizeSchema = z.union([
5822
+ z.literal("xs"),
5823
+ z.literal("sm"),
5824
+ z.literal("md"),
5825
+ z.literal("lg"),
5826
+ z.literal("xl")
5827
+ ]);
5812
5828
  var listLayoutStatusSchema = z.union([
5813
5829
  z.literal("warning"),
5814
5830
  z.literal("neutral"),
5815
5831
  z.literal("positive")
5816
5832
  ]);
5833
+ var contextSchema = z.union([
5834
+ z.literal("positive"),
5835
+ z.literal("neutral"),
5836
+ z.literal("warning"),
5837
+ z.literal("negative"),
5838
+ z.literal("success"),
5839
+ z.literal("failure"),
5840
+ z.literal("info"),
5841
+ z.literal("primary")
5842
+ ]);
5843
+ var modalLayoutTriggerSchema = z.object({
5844
+ title: z.string()
5845
+ });
5817
5846
  var formLayoutSchemaReferenceSchema = z.object({
5818
5847
  $ref: z.string()
5819
5848
  });
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(),
5849
+ var dividerLayoutSchema = z.object({
5850
+ type: z.literal("divider"),
5826
5851
  control: z.string().optional(),
5827
5852
  margin: sizeSchema.optional()
5828
5853
  });
5829
- var statusListLayoutStatusSchema = z.union([
5830
- z.literal("not-done"),
5831
- z.literal("pending"),
5832
- z.literal("done")
5833
- ]);
5834
5854
  var instructionsLayoutItemSchema = z.object({
5835
5855
  text: z.string(),
5836
5856
  context: contextSchema
5837
5857
  });
5838
- var modalLayoutTriggerSchema = z.object({
5839
- title: z.string()
5858
+ var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5859
+ var reviewLayoutFieldSchema = z.object({
5860
+ label: z.string(),
5861
+ value: z.string(),
5862
+ help: helpSchema.optional()
5840
5863
  });
5841
5864
  var searchLayoutSchema = z.object({
5842
5865
  type: z.literal("search"),
@@ -5848,17 +5871,21 @@ var searchLayoutSchema = z.object({
5848
5871
  control: z.string().optional(),
5849
5872
  margin: sizeSchema.optional()
5850
5873
  });
5851
- var infoLayoutSchema = z.object({
5852
- type: z.literal("info"),
5853
- markdown: z.string(),
5874
+ var paragraphLayoutSchema = z.object({
5875
+ type: z.literal("paragraph"),
5876
+ text: z.string(),
5854
5877
  align: alignSchema.optional(),
5855
5878
  control: z.string().optional(),
5856
5879
  margin: sizeSchema.optional()
5857
5880
  });
5858
- var formLayoutSchema = z.object({
5859
- type: z.literal("form"),
5860
- schema: formLayoutSchemaReferenceSchema.optional(),
5861
- schemaId: z.string(),
5881
+ var columnsLayoutBiasSchema = z.union([
5882
+ z.literal("none"),
5883
+ z.literal("left"),
5884
+ z.literal("right")
5885
+ ]);
5886
+ var loadingIndicatorLayoutSchema = z.object({
5887
+ type: z.literal("loading-indicator"),
5888
+ size: sizeSchema.optional(),
5862
5889
  control: z.string().optional(),
5863
5890
  margin: sizeSchema.optional()
5864
5891
  });
@@ -5870,6 +5897,11 @@ var headingLayoutSchema = z.object({
5870
5897
  control: z.string().optional(),
5871
5898
  margin: sizeSchema.optional()
5872
5899
  });
5900
+ var statusListLayoutStatusSchema = z.union([
5901
+ z.literal("not-done"),
5902
+ z.literal("pending"),
5903
+ z.literal("done")
5904
+ ]);
5873
5905
  var markdownLayoutSchema = z.object({
5874
5906
  type: z.literal("markdown"),
5875
5907
  content: z.string(),
@@ -5877,13 +5909,11 @@ var markdownLayoutSchema = z.object({
5877
5909
  control: z.string().optional(),
5878
5910
  margin: sizeSchema.optional()
5879
5911
  });
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()
5912
+ var iconTextSchema = z.object({
5913
+ text: z.string()
5914
+ });
5915
+ var iconNamedSchema = z.object({
5916
+ name: z.string()
5887
5917
  });
5888
5918
  var searchSearchRequestSchema = z.object({
5889
5919
  url: z.string(),
@@ -5891,69 +5921,67 @@ var searchSearchRequestSchema = z.object({
5891
5921
  param: z.string(),
5892
5922
  query: z.string()
5893
5923
  });
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({
5924
+ var errorResponseBodySchema = z.object({
5925
+ refreshFormUrl: z.string().optional(),
5926
+ analytics: z.record(z.string()).optional(),
5907
5927
  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()
5928
+ validation: jsonElementSchema.optional(),
5929
+ refreshUrl: z.string().optional()
5927
5930
  });
5931
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5928
5932
  var validateAsyncSchema = z.object({
5929
5933
  param: z.string(),
5930
5934
  method: httpMethodSchema,
5931
5935
  url: z.string()
5932
5936
  });
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()
5937
+ var alertLayoutSchema = z.object({
5938
+ type: z.literal("alert"),
5939
+ markdown: z.string(),
5940
+ context: contextSchema.optional(),
5941
+ control: z.string().optional(),
5942
+ margin: sizeSchema.optional()
5938
5943
  });
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(),
5944
+ var blobSchemaSchema = z.object({
5945
+ type: z.literal("blob"),
5946
+ promoted: z.boolean().optional(),
5947
+ $id: z.string().optional(),
5948
+ title: z.string().optional(),
5949
+ description: z.string().optional(),
5950
+ control: z.string().optional(),
5951
+ hidden: z.boolean().optional(),
5952
+ icon: iconSchema.optional(),
5953
+ image: imageSchema.optional(),
5954
+ keywords: z.array(z.string()).optional(),
5955
+ summary: summaryProviderSchema.optional(),
5956
+ analyticsId: z.string().optional(),
5957
+ validationAsync: validateAsyncSchema.optional(),
5958
+ validationMessages: z.record(z.string()).optional(),
5959
+ alert: alertLayoutSchema.optional(),
5960
+ cameraConfig: jsonElementSchema.optional(),
5961
+ accepts: z.array(z.string()).optional(),
5962
+ maxSize: z.number().optional(),
5963
+ source: uploadSourceSchema.optional(),
5964
+ disabled: z.boolean().optional()
5965
+ });
5966
+ var constSchemaSchema = z.object({
5967
+ hidden: z.boolean().optional(),
5968
+ alert: alertLayoutSchema.optional(),
5969
+ control: z.string().optional(),
5970
+ promoted: z.boolean().optional(),
5971
+ $id: z.string().optional(),
5972
+ const: jsonElementSchema,
5973
+ title: z.string().optional(),
5974
+ description: z.string().optional(),
5975
+ icon: iconSchema.optional(),
5976
+ image: imageSchema.optional(),
5977
+ keywords: z.array(z.string()).optional(),
5978
+ summary: summaryProviderSchema.optional(),
5979
+ analyticsId: z.string().optional(),
5980
+ disabled: z.boolean().optional()
5981
+ });
5982
+ var actionSchema = z.object({
5983
+ title: z.string().optional(),
5984
+ type: actionTypeSchema.optional(),
5957
5985
  disabled: z.boolean().optional(),
5958
5986
  $id: z.string().optional(),
5959
5987
  $ref: z.string().optional(),
@@ -5966,11 +5994,25 @@ var actionSchema = z.object({
5966
5994
  timeout: z.number().optional(),
5967
5995
  skipValidation: z.boolean().optional()
5968
5996
  });
5969
- var listLayoutItemSchema = z.object({
5970
- title: z.string(),
5971
- description: z.string().optional(),
5972
- icon: iconSchema,
5973
- status: listLayoutStatusSchema.optional()
5997
+ var linkHandlerSchema = z.object({
5998
+ regexPattern: z.string(),
5999
+ action: actionSchema
6000
+ });
6001
+ var navigationBackBehaviourSchema = z.object({
6002
+ title: z.string().optional(),
6003
+ action: actionSchema
6004
+ });
6005
+ var pollingOnErrorSchema = z.object({
6006
+ action: actionSchema
6007
+ });
6008
+ var imageLayoutSchema = z.object({
6009
+ type: z.literal("image"),
6010
+ text: z.string().optional(),
6011
+ url: z.string(),
6012
+ size: sizeSchema.optional(),
6013
+ accessibilityDescription: z.string().optional(),
6014
+ control: z.string().optional(),
6015
+ margin: sizeSchema.optional()
5974
6016
  });
5975
6017
  var decisionLayoutOptionSchema = z.object({
5976
6018
  action: actionSchema,
@@ -5980,12 +6022,25 @@ var decisionLayoutOptionSchema = z.object({
5980
6022
  icon: iconSchema.optional(),
5981
6023
  image: imageLayoutSchema.optional()
5982
6024
  });
6025
+ var listLayoutItemSchema = z.object({
6026
+ title: z.string(),
6027
+ description: z.string().optional(),
6028
+ icon: iconSchema,
6029
+ status: listLayoutStatusSchema.optional()
6030
+ });
5983
6031
  var statusListLayoutItemSchema = z.object({
5984
6032
  title: z.string(),
5985
6033
  description: z.string().optional(),
5986
6034
  icon: iconSchema,
5987
6035
  status: statusListLayoutStatusSchema.optional()
5988
6036
  });
6037
+ var formLayoutSchema = z.object({
6038
+ type: z.literal("form"),
6039
+ schema: formLayoutSchemaReferenceSchema.optional(),
6040
+ schemaId: z.string(),
6041
+ control: z.string().optional(),
6042
+ margin: sizeSchema.optional()
6043
+ });
5989
6044
  var instructionsLayoutSchema = z.object({
5990
6045
  type: z.literal("instructions"),
5991
6046
  title: z.string().optional(),
@@ -5993,6 +6048,13 @@ var instructionsLayoutSchema = z.object({
5993
6048
  control: z.string().optional(),
5994
6049
  margin: sizeSchema.optional()
5995
6050
  });
6051
+ var infoLayoutSchema = z.object({
6052
+ type: z.literal("info"),
6053
+ markdown: z.string(),
6054
+ align: alignSchema.optional(),
6055
+ control: z.string().optional(),
6056
+ margin: sizeSchema.optional()
6057
+ });
5996
6058
  var buttonLayoutSchema = z.object({
5997
6059
  type: z.literal("button"),
5998
6060
  size: sizeSchema.optional(),
@@ -6004,89 +6066,66 @@ var buttonLayoutSchema = z.object({
6004
6066
  control: z.string().optional(),
6005
6067
  margin: sizeSchema.optional()
6006
6068
  });
6007
- var reviewLayoutFieldSchema = z.object({
6008
- label: z.string(),
6009
- value: z.string(),
6010
- help: helpSchema.optional()
6069
+ var reviewLayoutCallToActionSchema = z.object({
6070
+ title: z.string(),
6071
+ action: actionSchema
6011
6072
  });
6012
- var searchResultSearchSchema = z.object({
6013
- type: z.literal("search"),
6073
+ var reviewLayoutSchema = z.object({
6074
+ type: z.literal("review"),
6075
+ orientation: z.string().optional(),
6076
+ action: actionSchema.optional(),
6077
+ fields: z.array(reviewLayoutFieldSchema),
6078
+ title: z.string().optional(),
6079
+ callToAction: reviewLayoutCallToActionSchema.optional(),
6080
+ control: z.string().optional(),
6081
+ margin: sizeSchema.optional()
6082
+ });
6083
+ var searchResultActionSchema = z.object({
6084
+ type: z.literal("action"),
6014
6085
  title: z.string(),
6015
6086
  description: z.string().optional(),
6016
6087
  icon: iconSchema.optional(),
6017
6088
  image: imageLayoutSchema.optional(),
6018
- value: searchSearchRequestSchema
6089
+ value: actionSchema
6019
6090
  });
6020
- var searchResultActionSchema = z.object({
6021
- type: z.literal("action"),
6091
+ var searchResultSearchSchema = z.object({
6092
+ type: z.literal("search"),
6022
6093
  title: z.string(),
6023
6094
  description: z.string().optional(),
6024
6095
  icon: iconSchema.optional(),
6025
6096
  image: imageLayoutSchema.optional(),
6026
- value: actionSchema
6097
+ value: searchSearchRequestSchema
6027
6098
  });
6028
6099
  var actionResponseBodySchema = z.object({
6029
6100
  action: actionSchema
6030
6101
  });
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()
6102
+ var summarySummariserSchema = z.object({
6103
+ defaultTitle: z.string().optional(),
6104
+ defaultDescription: z.string().optional(),
6105
+ defaultIcon: iconSchema.optional(),
6106
+ defaultImage: imageLayoutSchema.optional(),
6107
+ providesTitle: z.boolean().optional(),
6108
+ providesDescription: z.boolean().optional(),
6109
+ providesIcon: z.boolean().optional(),
6110
+ providesImage: z.boolean().optional()
6037
6111
  });
6038
- var linkHandlerSchema = z.object({
6039
- regexPattern: z.string(),
6040
- action: actionSchema
6112
+ var pollingSchema = z.object({
6113
+ url: z.string(),
6114
+ interval: z.number(),
6115
+ maxAttempts: z.number(),
6116
+ onError: pollingOnErrorSchema
6041
6117
  });
6042
- var blobSchemaSchema = z.object({
6043
- type: z.literal("blob"),
6044
- promoted: z.boolean().optional(),
6045
- $id: z.string().optional(),
6046
- title: z.string().optional(),
6047
- description: z.string().optional(),
6048
- control: z.string().optional(),
6049
- hidden: z.boolean().optional(),
6050
- icon: iconSchema.optional(),
6051
- image: imageSchema.optional(),
6052
- keywords: z.array(z.string()).optional(),
6053
- summary: summaryProviderSchema.optional(),
6054
- analyticsId: z.string().optional(),
6055
- validationAsync: validateAsyncSchema.optional(),
6056
- validationMessages: z.record(z.string()).optional(),
6057
- alert: alertLayoutSchema.optional(),
6058
- cameraConfig: jsonElementSchema.optional(),
6059
- accepts: z.array(z.string()).optional(),
6060
- maxSize: z.number().optional(),
6061
- source: uploadSourceSchema.optional(),
6062
- disabled: z.boolean().optional()
6118
+ var navigationSchema = z.object({
6119
+ backButton: navigationBackBehaviourSchema.optional(),
6120
+ back: navigationBackBehaviourSchema.optional(),
6121
+ stackBehavior: navigationStackBehaviorSchema.optional()
6063
6122
  });
6064
- var constSchemaSchema = z.object({
6065
- hidden: z.boolean().optional(),
6066
- alert: alertLayoutSchema.optional(),
6123
+ var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
6124
+ var decisionLayoutSchema = z.object({
6125
+ type: z.literal("decision"),
6126
+ options: z.array(decisionLayoutOptionSchema),
6067
6127
  control: z.string().optional(),
6068
- promoted: z.boolean().optional(),
6069
- $id: z.string().optional(),
6070
- const: jsonElementSchema,
6071
- title: z.string().optional(),
6072
- description: z.string().optional(),
6073
- icon: iconSchema.optional(),
6074
- image: imageSchema.optional(),
6075
- keywords: z.array(z.string()).optional(),
6076
- summary: summaryProviderSchema.optional(),
6077
- analyticsId: z.string().optional(),
6078
- disabled: z.boolean().optional()
6079
- });
6080
- var pollingOnErrorSchema = z.object({
6081
- action: actionSchema
6082
- });
6083
- var navigationBackBehaviourSchema = z.object({
6084
- title: z.string().optional(),
6085
- action: actionSchema
6086
- });
6087
- var reviewLayoutCallToActionSchema = z.object({
6088
- title: z.string(),
6089
- action: actionSchema
6128
+ margin: sizeSchema.optional()
6090
6129
  });
6091
6130
  var listLayoutSchema = z.object({
6092
6131
  type: z.literal("list"),
@@ -6095,12 +6134,6 @@ var listLayoutSchema = z.object({
6095
6134
  control: z.string().optional(),
6096
6135
  margin: sizeSchema.optional()
6097
6136
  });
6098
- var decisionLayoutSchema = z.object({
6099
- type: z.literal("decision"),
6100
- options: z.array(decisionLayoutOptionSchema),
6101
- control: z.string().optional(),
6102
- margin: sizeSchema.optional()
6103
- });
6104
6137
  var statusListLayoutSchema = z.object({
6105
6138
  type: z.literal("status-list"),
6106
6139
  items: z.array(statusListLayoutItemSchema),
@@ -6108,107 +6141,28 @@ var statusListLayoutSchema = z.object({
6108
6141
  control: z.string().optional(),
6109
6142
  margin: sizeSchema.optional()
6110
6143
  });
6111
- var reviewLayoutSchema = z.object({
6112
- type: z.literal("review"),
6113
- orientation: z.string().optional(),
6114
- action: actionSchema.optional(),
6115
- fields: z.array(reviewLayoutFieldSchema),
6116
- title: z.string().optional(),
6117
- callToAction: reviewLayoutCallToActionSchema.optional(),
6118
- control: z.string().optional(),
6119
- margin: sizeSchema.optional()
6120
- });
6121
6144
  var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
6122
- var pollingSchema = z.object({
6123
- url: z.string(),
6124
- interval: z.number(),
6125
- maxAttempts: z.number(),
6126
- onError: pollingOnErrorSchema
6127
- });
6128
- var navigationSchema = z.object({
6129
- backButton: navigationBackBehaviourSchema.optional(),
6130
- back: navigationBackBehaviourSchema.optional(),
6131
- stackBehavior: navigationStackBehaviorSchema.optional()
6132
- });
6133
6145
  var searchResponseBodySchema = z.object({
6134
6146
  results: z.array(searchResultSchema)
6135
6147
  });
6136
- var layoutSchema = z.lazy(
6137
- () => z.union([
6138
- alertLayoutSchema,
6139
- boxLayoutSchema,
6140
- buttonLayoutSchema,
6141
- columnsLayoutSchema,
6142
- decisionLayoutSchema,
6143
- dividerLayoutSchema,
6144
- formLayoutSchema,
6145
- headingLayoutSchema,
6146
- imageLayoutSchema,
6147
- infoLayoutSchema,
6148
- instructionsLayoutSchema,
6149
- listLayoutSchema,
6150
- loadingIndicatorLayoutSchema,
6151
- markdownLayoutSchema,
6152
- modalLayoutSchema,
6153
- paragraphLayoutSchema,
6154
- reviewLayoutSchema,
6155
- searchLayoutSchema,
6156
- statusListLayoutSchema
6157
- ])
6158
- );
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
- var modalLayoutSchema = z.lazy(
6180
- () => z.object({
6181
- type: z.literal("modal"),
6182
- control: z.string().optional(),
6183
- margin: sizeSchema.optional(),
6184
- trigger: modalLayoutTriggerSchema,
6185
- content: modalLayoutContentSchema
6186
- })
6187
- );
6188
- var modalLayoutContentSchema = z.lazy(
6189
- () => z.object({
6190
- components: z.array(layoutSchema)
6191
- })
6192
- );
6193
- var stepSchema = z.lazy(
6148
+ var arraySchemaTupleSchema = z.lazy(
6194
6149
  () => z.object({
6195
- key: z.string().optional(),
6196
- type: z.string().optional(),
6150
+ type: z.literal("array"),
6151
+ promoted: z.boolean().optional(),
6152
+ $id: z.string().optional(),
6153
+ items: z.array(schemaSchema),
6154
+ title: z.string().optional(),
6197
6155
  description: z.string().optional(),
6198
- actions: z.array(actionSchema).optional(),
6199
- refreshFormUrl: z.string().optional(),
6200
- id: z.string(),
6201
- title: z.string(),
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()
6156
+ control: z.string().optional(),
6157
+ hidden: z.boolean().optional(),
6158
+ icon: iconSchema.optional(),
6159
+ image: imageSchema.optional(),
6160
+ keywords: z.array(z.string()).optional(),
6161
+ summary: summaryProviderSchema.optional(),
6162
+ analyticsId: z.string().optional(),
6163
+ persistAsync: persistAsyncSchema.optional(),
6164
+ validationAsync: validateAsyncSchema.optional(),
6165
+ alert: alertLayoutSchema.optional()
6212
6166
  })
6213
6167
  );
6214
6168
  var schemaSchema = z.lazy(
@@ -6225,6 +6179,94 @@ var schemaSchema = z.lazy(
6225
6179
  stringSchemaSchema
6226
6180
  ])
6227
6181
  );
6182
+ var persistAsyncSchema = z.lazy(
6183
+ () => z.object({
6184
+ param: z.string(),
6185
+ idProperty: z.string(),
6186
+ schema: schemaSchema,
6187
+ url: z.string(),
6188
+ method: httpMethodSchema
6189
+ })
6190
+ );
6191
+ var oneOfSchemaSchema = z.lazy(
6192
+ () => z.object({
6193
+ autofillProvider: z.string().optional(),
6194
+ promoted: z.boolean().optional(),
6195
+ refreshFormOnChange: z.boolean().optional(),
6196
+ refreshUrl: z.string().optional(),
6197
+ refreshFormUrl: z.string().optional(),
6198
+ promotion: jsonElementSchema.optional(),
6199
+ oneOf: z.array(schemaSchema),
6200
+ placeholder: z.string().optional(),
6201
+ $id: z.string().optional(),
6202
+ title: z.string().optional(),
6203
+ description: z.string().optional(),
6204
+ control: z.string().optional(),
6205
+ default: jsonElementSchema.optional(),
6206
+ hidden: z.boolean().optional(),
6207
+ icon: iconSchema.optional(),
6208
+ image: imageSchema.optional(),
6209
+ keywords: z.array(z.string()).optional(),
6210
+ summary: summaryProviderSchema.optional(),
6211
+ analyticsId: z.string().optional(),
6212
+ refreshStepOnChange: z.boolean().optional(),
6213
+ alert: alertLayoutSchema.optional(),
6214
+ help: helpSchema.optional(),
6215
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6216
+ autofillKey: z.string().optional(),
6217
+ validationMessages: z.record(z.string()).optional(),
6218
+ disabled: z.boolean().optional()
6219
+ })
6220
+ );
6221
+ var objectSchemaSchema = z.lazy(
6222
+ () => z.object({
6223
+ type: z.literal("object"),
6224
+ disabled: z.boolean().optional(),
6225
+ promoted: z.boolean().optional(),
6226
+ help: helpSchema.optional(),
6227
+ properties: z.record(schemaSchema),
6228
+ displayOrder: z.array(z.string()),
6229
+ required: z.array(z.string()).optional(),
6230
+ $id: z.string().optional(),
6231
+ title: z.string().optional(),
6232
+ description: z.string().optional(),
6233
+ control: z.string().optional(),
6234
+ hidden: z.boolean().optional(),
6235
+ icon: iconSchema.optional(),
6236
+ image: imageSchema.optional(),
6237
+ keywords: z.array(z.string()).optional(),
6238
+ summary: summaryProviderSchema.optional(),
6239
+ analyticsId: z.string().optional(),
6240
+ alert: alertLayoutSchema.optional()
6241
+ })
6242
+ );
6243
+ var arraySchemaListSchema = z.lazy(
6244
+ () => z.object({
6245
+ type: z.literal("array"),
6246
+ promoted: z.boolean().optional(),
6247
+ $id: z.string().optional(),
6248
+ items: schemaSchema,
6249
+ addItemTitle: z.string(),
6250
+ editItemTitle: z.string(),
6251
+ minItems: z.number().optional(),
6252
+ maxItems: z.number().optional(),
6253
+ placeholder: z.string().optional(),
6254
+ title: z.string().optional(),
6255
+ description: z.string().optional(),
6256
+ control: z.string().optional(),
6257
+ hidden: z.boolean().optional(),
6258
+ icon: iconSchema.optional(),
6259
+ image: imageSchema.optional(),
6260
+ keywords: z.array(z.string()).optional(),
6261
+ summary: summarySummariserSchema.optional(),
6262
+ analyticsId: z.string().optional(),
6263
+ persistAsync: persistAsyncSchema.optional(),
6264
+ validationAsync: validateAsyncSchema.optional(),
6265
+ alert: alertLayoutSchema.optional(),
6266
+ validationMessages: z.record(z.string()).optional(),
6267
+ disabled: z.boolean().optional()
6268
+ })
6269
+ );
6228
6270
  var allOfSchemaSchema = z.lazy(
6229
6271
  () => z.object({
6230
6272
  disabled: z.boolean().optional(),
@@ -6340,58 +6382,6 @@ var numberSchemaSchema = z.lazy(
6340
6382
  help: helpSchema.optional()
6341
6383
  })
6342
6384
  );
6343
- var objectSchemaSchema = z.lazy(
6344
- () => z.object({
6345
- type: z.literal("object"),
6346
- disabled: z.boolean().optional(),
6347
- promoted: z.boolean().optional(),
6348
- help: helpSchema.optional(),
6349
- properties: z.record(schemaSchema),
6350
- displayOrder: z.array(z.string()),
6351
- required: z.array(z.string()).optional(),
6352
- $id: z.string().optional(),
6353
- title: z.string().optional(),
6354
- description: z.string().optional(),
6355
- control: z.string().optional(),
6356
- hidden: z.boolean().optional(),
6357
- icon: iconSchema.optional(),
6358
- image: imageSchema.optional(),
6359
- keywords: z.array(z.string()).optional(),
6360
- summary: summaryProviderSchema.optional(),
6361
- analyticsId: z.string().optional(),
6362
- alert: alertLayoutSchema.optional()
6363
- })
6364
- );
6365
- var oneOfSchemaSchema = z.lazy(
6366
- () => z.object({
6367
- autofillProvider: z.string().optional(),
6368
- promoted: z.boolean().optional(),
6369
- refreshFormOnChange: z.boolean().optional(),
6370
- refreshUrl: z.string().optional(),
6371
- refreshFormUrl: z.string().optional(),
6372
- promotion: jsonElementSchema.optional(),
6373
- oneOf: z.array(schemaSchema),
6374
- placeholder: z.string().optional(),
6375
- $id: z.string().optional(),
6376
- title: z.string().optional(),
6377
- description: z.string().optional(),
6378
- control: z.string().optional(),
6379
- default: jsonElementSchema.optional(),
6380
- hidden: z.boolean().optional(),
6381
- icon: iconSchema.optional(),
6382
- image: imageSchema.optional(),
6383
- keywords: z.array(z.string()).optional(),
6384
- summary: summaryProviderSchema.optional(),
6385
- analyticsId: z.string().optional(),
6386
- refreshStepOnChange: z.boolean().optional(),
6387
- alert: alertLayoutSchema.optional(),
6388
- help: helpSchema.optional(),
6389
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6390
- autofillKey: z.string().optional(),
6391
- validationMessages: z.record(z.string()).optional(),
6392
- disabled: z.boolean().optional()
6393
- })
6394
- );
6395
6385
  var stringSchemaSchema = z.lazy(
6396
6386
  () => z.object({
6397
6387
  type: z.literal("string"),
@@ -6434,60 +6424,82 @@ var stringSchemaSchema = z.lazy(
6434
6424
  help: helpSchema.optional()
6435
6425
  })
6436
6426
  );
6437
- var arraySchemaListSchema = z.lazy(
6427
+ var stepSchema = z.lazy(
6428
+ () => z.object({
6429
+ key: z.string().optional(),
6430
+ type: z.string().optional(),
6431
+ actions: z.array(actionSchema).optional(),
6432
+ refreshFormUrl: z.string().optional(),
6433
+ id: z.string(),
6434
+ title: z.string(),
6435
+ description: z.string().optional(),
6436
+ schemas: z.array(schemaSchema),
6437
+ layout: z.array(layoutSchema),
6438
+ model: jsonElementSchema.optional(),
6439
+ external: externalSchema.optional(),
6440
+ polling: pollingSchema.optional(),
6441
+ linkHandlers: z.array(linkHandlerSchema).optional(),
6442
+ analytics: z.record(z.string()).optional(),
6443
+ errors: stepErrorSchema.optional(),
6444
+ navigation: navigationSchema.optional(),
6445
+ refreshUrl: z.string().optional()
6446
+ })
6447
+ );
6448
+ var layoutSchema = z.lazy(
6449
+ () => z.union([
6450
+ alertLayoutSchema,
6451
+ boxLayoutSchema,
6452
+ buttonLayoutSchema,
6453
+ columnsLayoutSchema,
6454
+ decisionLayoutSchema,
6455
+ dividerLayoutSchema,
6456
+ formLayoutSchema,
6457
+ headingLayoutSchema,
6458
+ imageLayoutSchema,
6459
+ infoLayoutSchema,
6460
+ instructionsLayoutSchema,
6461
+ listLayoutSchema,
6462
+ loadingIndicatorLayoutSchema,
6463
+ markdownLayoutSchema,
6464
+ modalLayoutSchema,
6465
+ paragraphLayoutSchema,
6466
+ reviewLayoutSchema,
6467
+ searchLayoutSchema,
6468
+ statusListLayoutSchema
6469
+ ])
6470
+ );
6471
+ var boxLayoutSchema = z.lazy(
6472
+ () => z.object({
6473
+ type: z.literal("box"),
6474
+ components: z.array(layoutSchema),
6475
+ width: sizeSchema.optional(),
6476
+ border: z.boolean().optional(),
6477
+ control: z.string().optional(),
6478
+ margin: sizeSchema.optional()
6479
+ })
6480
+ );
6481
+ var modalLayoutSchema = z.lazy(
6438
6482
  () => z.object({
6439
- type: z.literal("array"),
6440
- promoted: z.boolean().optional(),
6441
- $id: z.string().optional(),
6442
- items: schemaSchema,
6443
- addItemTitle: z.string(),
6444
- editItemTitle: z.string(),
6445
- minItems: z.number().optional(),
6446
- maxItems: z.number().optional(),
6447
- placeholder: z.string().optional(),
6448
- title: z.string().optional(),
6449
- description: z.string().optional(),
6483
+ type: z.literal("modal"),
6450
6484
  control: z.string().optional(),
6451
- hidden: z.boolean().optional(),
6452
- icon: iconSchema.optional(),
6453
- image: imageSchema.optional(),
6454
- keywords: z.array(z.string()).optional(),
6455
- summary: summarySummariserSchema.optional(),
6456
- analyticsId: z.string().optional(),
6457
- persistAsync: persistAsyncSchema.optional(),
6458
- validationAsync: validateAsyncSchema.optional(),
6459
- alert: alertLayoutSchema.optional(),
6460
- validationMessages: z.record(z.string()).optional(),
6461
- disabled: z.boolean().optional()
6485
+ margin: sizeSchema.optional(),
6486
+ trigger: modalLayoutTriggerSchema,
6487
+ content: modalLayoutContentSchema
6462
6488
  })
6463
6489
  );
6464
- var persistAsyncSchema = z.lazy(
6490
+ var modalLayoutContentSchema = z.lazy(
6465
6491
  () => z.object({
6466
- param: z.string(),
6467
- idProperty: z.string(),
6468
- schema: schemaSchema,
6469
- url: z.string(),
6470
- method: httpMethodSchema
6492
+ components: z.array(layoutSchema)
6471
6493
  })
6472
6494
  );
6473
- var arraySchemaTupleSchema = z.lazy(
6495
+ var columnsLayoutSchema = z.lazy(
6474
6496
  () => 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(),
6480
- description: z.string().optional(),
6497
+ type: z.literal("columns"),
6498
+ left: z.array(layoutSchema),
6499
+ right: z.array(layoutSchema),
6500
+ bias: columnsLayoutBiasSchema.optional(),
6481
6501
  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()
6502
+ margin: sizeSchema.optional()
6491
6503
  })
6492
6504
  );
6493
6505
  var validateStep = (step) => validate(step, stepSchema);
@@ -9983,7 +9995,9 @@ var mapStepToComponent = (_a) => {
9983
9995
  stepPolling,
9984
9996
  updateComponent,
9985
9997
  title: displayStepTitle ? title : void 0,
9986
- trackEvent
9998
+ trackEvent,
9999
+ step,
10000
+ onAction
9987
10001
  });
9988
10002
  return stepComponent;
9989
10003
  };
@@ -10624,7 +10638,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10624
10638
  return deterministicId || (id ? `radix-${id}` : "");
10625
10639
  }
10626
10640
 
10627
- // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.36.0_@types+react@18.3.3_react@18.3.1/node_modules/@wise/forms/dist/index.mjs
10641
+ // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.37.0_@types+react@18.3.3_react@18.3.1/node_modules/@wise/forms/dist/index.mjs
10628
10642
  var import_components3 = require("@transferwise/components");
10629
10643
  var import_classnames = __toESM(require_classnames(), 1);
10630
10644
  var import_react7 = require("react");
@@ -11897,18 +11911,79 @@ function ItemSummaryOption({
11897
11911
  }
11898
11912
  var RepeatableRenderer_default = RepeatableRenderer;
11899
11913
 
11900
- // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11914
+ // src/revamp/wise/renderers/ReviewRenderer.tsx
11901
11915
  var import_components26 = require("@transferwise/components");
11916
+ var import_jsx_runtime41 = require("react/jsx-runtime");
11917
+ var ReviewRenderer = {
11918
+ canRenderType: "review",
11919
+ render: ({ callToAction, control, fields, margin, title }) => {
11920
+ const orientation = mapControlToDefinitionListLayout(control);
11921
+ const action = callToAction ? {
11922
+ text: callToAction.title,
11923
+ onClick: (event) => {
11924
+ event.preventDefault();
11925
+ callToAction.onClick();
11926
+ }
11927
+ } : void 0;
11928
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
11929
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title: title != null ? title : "", action }),
11930
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11931
+ import_components26.DefinitionList,
11932
+ {
11933
+ layout: orientation,
11934
+ definitions: fields.map(({ label, value, help }, index) => ({
11935
+ key: String(index),
11936
+ title: label,
11937
+ value: getFieldValue(value, help, orientation)
11938
+ }))
11939
+ }
11940
+ ) })
11941
+ ] });
11942
+ }
11943
+ };
11944
+ var ReviewRenderer_default = ReviewRenderer;
11945
+ var mapControlToDefinitionListLayout = (control) => {
11946
+ switch (control) {
11947
+ case "horizontal":
11948
+ case "horizontal-end-aligned":
11949
+ return "HORIZONTAL_RIGHT_ALIGNED";
11950
+ case "horizontal-start-aligned":
11951
+ return "HORIZONTAL_LEFT_ALIGNED";
11952
+ case "vertical-two-column":
11953
+ return "VERTICAL_TWO_COLUMN";
11954
+ case "vertical":
11955
+ case "vertical-one-column":
11956
+ default:
11957
+ return "VERTICAL_ONE_COLUMN";
11958
+ }
11959
+ };
11960
+ var getFieldValue = (value, help, orientation) => {
11961
+ if (help) {
11962
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
11963
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help }),
11964
+ " ",
11965
+ value
11966
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
11967
+ value,
11968
+ " ",
11969
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help })
11970
+ ] });
11971
+ }
11972
+ return value;
11973
+ };
11974
+
11975
+ // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11976
+ var import_components27 = require("@transferwise/components");
11902
11977
 
11903
11978
  // src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
11904
11979
  var import_react_intl15 = require("react-intl");
11905
- var import_jsx_runtime41 = require("react/jsx-runtime");
11980
+ var import_jsx_runtime42 = require("react/jsx-runtime");
11906
11981
  function ErrorResult({ state }) {
11907
11982
  const intl = (0, import_react_intl15.useIntl)();
11908
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "m-t-2", children: [
11983
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
11909
11984
  intl.formatMessage(generic_error_messages_default.genericError),
11910
11985
  "\xA0",
11911
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11986
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11912
11987
  "a",
11913
11988
  {
11914
11989
  href: "/",
@@ -11924,7 +11999,7 @@ function ErrorResult({ state }) {
11924
11999
 
11925
12000
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11926
12001
  var import_react15 = require("react");
11927
- var import_jsx_runtime42 = require("react/jsx-runtime");
12002
+ var import_jsx_runtime43 = require("react/jsx-runtime");
11928
12003
  function BlockSearchRendererComponent({
11929
12004
  id,
11930
12005
  isLoading,
@@ -11936,9 +12011,9 @@ function BlockSearchRendererComponent({
11936
12011
  }) {
11937
12012
  const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
11938
12013
  const trackEvent = useTrackEvent();
11939
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
11940
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11941
- import_components26.Input,
12014
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
12015
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12016
+ import_components27.Input,
11942
12017
  {
11943
12018
  id,
11944
12019
  name: id,
@@ -11954,7 +12029,7 @@ function BlockSearchRendererComponent({
11954
12029
  }
11955
12030
  }
11956
12031
  ) }),
11957
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
12032
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
11958
12033
  ] });
11959
12034
  }
11960
12035
  function SearchResultContent({
@@ -11963,29 +12038,29 @@ function SearchResultContent({
11963
12038
  }) {
11964
12039
  switch (state.type) {
11965
12040
  case "error":
11966
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state });
12041
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
11967
12042
  case "results":
11968
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResults, { state, onChange });
12043
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
11969
12044
  case "noResults":
11970
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EmptySearchResult, { state });
12045
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
11971
12046
  case "pending":
11972
12047
  default:
11973
12048
  return null;
11974
12049
  }
11975
12050
  }
11976
12051
  function EmptySearchResult({ state }) {
11977
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12052
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11978
12053
  }
11979
12054
  function SearchResults({
11980
12055
  state
11981
12056
  }) {
11982
12057
  const trackEvent = useTrackEvent();
11983
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11984
- import_components26.NavigationOption,
12058
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12059
+ import_components27.NavigationOption,
11985
12060
  {
11986
12061
  title: result.title,
11987
12062
  content: result.description,
11988
- media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
12063
+ media: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
11989
12064
  showMediaCircle: false,
11990
12065
  showMediaAtAllSizes: true,
11991
12066
  onClick: () => {
@@ -12001,10 +12076,10 @@ function SearchResults({
12001
12076
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
12002
12077
 
12003
12078
  // src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
12004
- var import_components27 = require("@transferwise/components");
12079
+ var import_components28 = require("@transferwise/components");
12005
12080
  var import_icons2 = require("@transferwise/icons");
12006
12081
  var import_react16 = require("react");
12007
- var import_jsx_runtime43 = require("react/jsx-runtime");
12082
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12008
12083
  function InlineSearchRenderer({
12009
12084
  id,
12010
12085
  isLoading,
@@ -12015,19 +12090,19 @@ function InlineSearchRenderer({
12015
12090
  }) {
12016
12091
  const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
12017
12092
  const trackEvent = useTrackEvent();
12018
- 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: [
12093
+ 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: [
12019
12094
  id,
12020
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12021
- import_components27.Typeahead,
12095
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12096
+ import_components28.Typeahead,
12022
12097
  {
12023
12098
  id: "typeahead-input-id",
12024
12099
  name: "typeahead-input-name",
12025
12100
  size: "md",
12026
12101
  maxHeight: 100,
12027
- footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TypeaheadFooter, { state, isLoading }),
12102
+ footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
12028
12103
  multiple: false,
12029
12104
  clearable: false,
12030
- addon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons2.Search, { size: 24 }),
12105
+ addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
12031
12106
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12032
12107
  minQueryLength: 1,
12033
12108
  onChange: (values) => {
@@ -12064,29 +12139,29 @@ function mapResultToTypeaheadOption(result) {
12064
12139
  }
12065
12140
  function TypeaheadFooter({ state, isLoading }) {
12066
12141
  if (state.type === "noResults") {
12067
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12142
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12068
12143
  }
12069
12144
  if (state.type === "error") {
12070
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
12145
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
12071
12146
  }
12072
12147
  if (state.type === "pending" || isLoading) {
12073
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
12148
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
12074
12149
  }
12075
12150
  return null;
12076
12151
  }
12077
12152
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12078
12153
 
12079
12154
  // src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
12080
- var import_jsx_runtime44 = require("react/jsx-runtime");
12155
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12081
12156
  var SearchRenderer = {
12082
12157
  canRenderType: "search",
12083
- 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))
12158
+ 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))
12084
12159
  };
12085
12160
  var SearchRenderer_default = SearchRenderer;
12086
12161
 
12087
12162
  // src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
12088
- var import_components28 = require("@transferwise/components");
12089
- var import_jsx_runtime45 = require("react/jsx-runtime");
12163
+ var import_components29 = require("@transferwise/components");
12164
+ var import_jsx_runtime46 = require("react/jsx-runtime");
12090
12165
  function RadioInputRendererComponent(props) {
12091
12166
  const {
12092
12167
  id,
@@ -12100,9 +12175,9 @@ function RadioInputRendererComponent(props) {
12100
12175
  selectedIndex,
12101
12176
  onSelect
12102
12177
  } = props;
12103
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
12104
- /* @__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)(
12105
- import_components28.RadioGroup,
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)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12180
+ import_components29.RadioGroup,
12106
12181
  {
12107
12182
  name: id,
12108
12183
  radios: options.map((option, index) => ({
@@ -12110,7 +12185,7 @@ function RadioInputRendererComponent(props) {
12110
12185
  value: index,
12111
12186
  secondary: option.description,
12112
12187
  disabled: option.disabled || disabled,
12113
- avatar: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12188
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12114
12189
  })),
12115
12190
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12116
12191
  onChange: onSelect
@@ -12122,9 +12197,9 @@ function RadioInputRendererComponent(props) {
12122
12197
  }
12123
12198
 
12124
12199
  // src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
12125
- var import_components29 = require("@transferwise/components");
12200
+ var import_components30 = require("@transferwise/components");
12126
12201
  var import_react17 = require("react");
12127
- var import_jsx_runtime46 = require("react/jsx-runtime");
12202
+ var import_jsx_runtime47 = require("react/jsx-runtime");
12128
12203
  function TabInputRendererComponent(props) {
12129
12204
  const {
12130
12205
  id,
@@ -12143,9 +12218,9 @@ function TabInputRendererComponent(props) {
12143
12218
  onSelect(0);
12144
12219
  }
12145
12220
  }, [selectedIndex, onSelect, options.length]);
12146
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
12147
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12148
- import_components29.Tabs,
12221
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
12222
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12223
+ import_components30.Tabs,
12149
12224
  {
12150
12225
  name: id,
12151
12226
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -12153,7 +12228,7 @@ function TabInputRendererComponent(props) {
12153
12228
  title: option.title,
12154
12229
  // if we pass null, we get some props-types console errors
12155
12230
  // eslint-disable-next-line react/jsx-no-useless-fragment
12156
- content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
12231
+ content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
12157
12232
  disabled: option.disabled || disabled
12158
12233
  })),
12159
12234
  onTabSelect: onSelect
@@ -12165,26 +12240,26 @@ function TabInputRendererComponent(props) {
12165
12240
  var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
12166
12241
 
12167
12242
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
12168
- var import_components31 = require("@transferwise/components");
12243
+ var import_components32 = require("@transferwise/components");
12169
12244
 
12170
12245
  // src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
12171
- var import_components30 = require("@transferwise/components");
12172
- var import_jsx_runtime47 = require("react/jsx-runtime");
12246
+ var import_components31 = require("@transferwise/components");
12247
+ var import_jsx_runtime48 = require("react/jsx-runtime");
12173
12248
  function SelectTriggerMedia({ icon, image }) {
12174
12249
  if (image == null ? void 0 : image.url) {
12175
12250
  return null;
12176
12251
  }
12177
12252
  if (icon && "name" in icon) {
12178
- 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 }) });
12253
+ 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 }) });
12179
12254
  }
12180
12255
  if (icon && "text" in icon) {
12181
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
12256
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
12182
12257
  }
12183
12258
  return null;
12184
12259
  }
12185
12260
 
12186
12261
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
12187
- var import_jsx_runtime48 = require("react/jsx-runtime");
12262
+ var import_jsx_runtime49 = require("react/jsx-runtime");
12188
12263
  function SelectInputRendererComponent(props) {
12189
12264
  const {
12190
12265
  id,
@@ -12219,17 +12294,17 @@ function SelectInputRendererComponent(props) {
12219
12294
  const contentProps = withinTrigger ? {
12220
12295
  title: option.title,
12221
12296
  note: option.description,
12222
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12297
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12223
12298
  } : {
12224
12299
  title: option.title,
12225
12300
  description: option.description,
12226
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12301
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12227
12302
  };
12228
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
12303
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components32.SelectInputOptionContent, __spreadValues({}, contentProps));
12229
12304
  };
12230
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
12231
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12232
- import_components31.SelectInput,
12305
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12306
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12307
+ import_components32.SelectInput,
12233
12308
  {
12234
12309
  name: id,
12235
12310
  placeholder,
@@ -12248,8 +12323,8 @@ function SelectInputRendererComponent(props) {
12248
12323
 
12249
12324
  // src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
12250
12325
  var import_react18 = require("react");
12251
- var import_components32 = require("@transferwise/components");
12252
- var import_jsx_runtime49 = require("react/jsx-runtime");
12326
+ var import_components33 = require("@transferwise/components");
12327
+ var import_jsx_runtime50 = require("react/jsx-runtime");
12253
12328
  function SegmentedInputRendererComponent(props) {
12254
12329
  const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
12255
12330
  (0, import_react18.useEffect)(() => {
@@ -12257,9 +12332,9 @@ function SegmentedInputRendererComponent(props) {
12257
12332
  onSelect(0);
12258
12333
  }
12259
12334
  }, [selectedIndex, onSelect, options.length]);
12260
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12261
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12262
- import_components32.SegmentedControl,
12335
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
12336
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12337
+ import_components33.SegmentedControl,
12263
12338
  {
12264
12339
  name: `${id}-segmented-control`,
12265
12340
  value: String(selectedIndex),
@@ -12273,44 +12348,44 @@ function SegmentedInputRendererComponent(props) {
12273
12348
  onChange: (value) => onSelect(Number(value))
12274
12349
  }
12275
12350
  ) }),
12276
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: `${id}-children`, children })
12351
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { id: `${id}-children`, children })
12277
12352
  ] });
12278
12353
  }
12279
12354
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
12280
12355
 
12281
12356
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
12282
- var import_jsx_runtime50 = require("react/jsx-runtime");
12357
+ var import_jsx_runtime51 = require("react/jsx-runtime");
12283
12358
  var SelectInputRenderer = {
12284
12359
  canRenderType: "input-select",
12285
12360
  render: (props) => {
12286
12361
  switch (props.control) {
12287
12362
  case "radio":
12288
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12363
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12289
12364
  case "tab":
12290
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12365
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12291
12366
  case "segmented":
12292
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12367
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12293
12368
  case "select":
12294
12369
  default:
12295
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12370
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12296
12371
  }
12297
12372
  }
12298
12373
  };
12299
12374
  var SelectInputRenderer_default = SelectInputRenderer;
12300
12375
 
12301
12376
  // src/revamp/wise/renderers/StatusListRenderer.tsx
12302
- var import_components33 = require("@transferwise/components");
12303
- var import_jsx_runtime51 = require("react/jsx-runtime");
12377
+ var import_components34 = require("@transferwise/components");
12378
+ var import_jsx_runtime52 = require("react/jsx-runtime");
12304
12379
  var StatusListRenderer = {
12305
12380
  canRenderType: "status-list",
12306
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
12307
- title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components33.Header, { title }) : null,
12308
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12309
- import_components33.Summary,
12381
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
12382
+ title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Header, { title }) : null,
12383
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12384
+ import_components34.Summary,
12310
12385
  {
12311
12386
  title: itemTitle,
12312
12387
  description,
12313
- icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12388
+ icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12314
12389
  status: mapStatus(status)
12315
12390
  },
12316
12391
  `${title}/${description || ""}`
@@ -12326,63 +12401,63 @@ var mapStatus = (status) => {
12326
12401
  };
12327
12402
 
12328
12403
  // src/revamp/wise/renderers/components/VariableTextInput.tsx
12329
- var import_components34 = require("@transferwise/components");
12330
- var import_jsx_runtime52 = require("react/jsx-runtime");
12404
+ var import_components35 = require("@transferwise/components");
12405
+ var import_jsx_runtime53 = require("react/jsx-runtime");
12331
12406
  function VariableTextInput({
12332
12407
  control,
12333
12408
  inputProps
12334
12409
  }) {
12335
12410
  switch (control) {
12336
12411
  case "password":
12337
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12412
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12338
12413
  case "email":
12339
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12414
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12340
12415
  case "textarea":
12341
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12416
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12342
12417
  case "numeric":
12343
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12418
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12344
12419
  case "phone-number":
12345
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12420
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12346
12421
  default:
12347
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12422
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12348
12423
  }
12349
12424
  }
12350
12425
  function TextInput(_a) {
12351
12426
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12352
12427
  if (typeof displayFormat === "string") {
12353
12428
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
12354
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12355
- import_components34.InputWithDisplayFormat,
12429
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12430
+ import_components35.InputWithDisplayFormat,
12356
12431
  __spreadValues({
12357
12432
  displayPattern: displayFormat,
12358
12433
  onChange: (newValue) => onChange(newValue)
12359
12434
  }, inputProps)
12360
12435
  );
12361
12436
  }
12362
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12437
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12363
12438
  }
12364
12439
  function TextAreaInput(_a) {
12365
12440
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12366
12441
  const textAreaProps = __spreadValues({ id, name: id }, rest);
12367
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12368
- import_components34.TextareaWithDisplayFormat,
12442
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12443
+ import_components35.TextareaWithDisplayFormat,
12369
12444
  __spreadValues({
12370
12445
  displayPattern: displayFormat,
12371
12446
  onChange: (newValue) => onChange(newValue)
12372
12447
  }, textAreaProps)
12373
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12448
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12374
12449
  }
12375
12450
  function NumericInput(_a) {
12376
12451
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12377
12452
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
12378
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12379
- import_components34.InputWithDisplayFormat,
12453
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12454
+ import_components35.InputWithDisplayFormat,
12380
12455
  __spreadValues({
12381
12456
  displayPattern: displayFormat,
12382
12457
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
12383
12458
  }, numericProps)
12384
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12385
- import_components34.Input,
12459
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12460
+ import_components35.Input,
12386
12461
  __spreadValues({
12387
12462
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
12388
12463
  }, numericProps)
@@ -12390,12 +12465,12 @@ function NumericInput(_a) {
12390
12465
  }
12391
12466
  function PhoneNumberInput(_a) {
12392
12467
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
12393
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12468
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12394
12469
  }
12395
12470
  var VariableTextInput_default = VariableTextInput;
12396
12471
 
12397
12472
  // src/revamp/wise/renderers/TextInputRenderer.tsx
12398
- var import_jsx_runtime53 = require("react/jsx-runtime");
12473
+ var import_jsx_runtime54 = require("react/jsx-runtime");
12399
12474
  var TextInputRenderer = {
12400
12475
  canRenderType: "input-text",
12401
12476
  render: (props) => {
@@ -12420,14 +12495,14 @@ var TextInputRenderer = {
12420
12495
  ]);
12421
12496
  const value = initialValue != null ? initialValue : "";
12422
12497
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
12423
- 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 }) });
12498
+ 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 }) });
12424
12499
  }
12425
12500
  };
12426
12501
  var TextInputRenderer_default = TextInputRenderer;
12427
12502
 
12428
12503
  // src/revamp/wise/renderers/UploadInputRenderer.tsx
12429
- var import_components35 = require("@transferwise/components");
12430
- var import_jsx_runtime54 = require("react/jsx-runtime");
12504
+ var import_components36 = require("@transferwise/components");
12505
+ var import_jsx_runtime55 = require("react/jsx-runtime");
12431
12506
  var UploadInputRenderer = {
12432
12507
  canRenderType: "input-upload",
12433
12508
  render: (props) => {
@@ -12443,8 +12518,8 @@ var UploadInputRenderer = {
12443
12518
  };
12444
12519
  return (
12445
12520
  // We don't pass help here as there is no sensible place to display it
12446
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12447
- import_components35.UploadInput,
12521
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12522
+ import_components36.UploadInput,
12448
12523
  {
12449
12524
  id,
12450
12525
  description,
@@ -12479,97 +12554,36 @@ var LargeUploadRenderer = {
12479
12554
  "id",
12480
12555
  "accepts",
12481
12556
  "control",
12482
- "label",
12483
- "description",
12484
- "disabled",
12485
- "error",
12486
- "help",
12487
- "maxSize",
12488
- "type",
12489
- "onUpload"
12490
- ]);
12491
- const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
12492
- const onUploadFile = async (file, fileName) => {
12493
- try {
12494
- const convertedFile = file ? await toFile(file, fileName) : null;
12495
- await onUpload(convertedFile);
12496
- } catch (e) {
12497
- await onUpload(null);
12498
- throw e;
12499
- }
12500
- };
12501
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12502
- import_components35.Upload,
12503
- __spreadProps(__spreadValues({}, uploadProps), {
12504
- usAccept: getAcceptsString(accepts),
12505
- usDisabled: disabled,
12506
- onSuccess: onUploadFile,
12507
- onFailure: async () => onUpload(null),
12508
- onCancel: async () => onUpload(null)
12509
- })
12510
- ) });
12511
- }
12512
- };
12513
-
12514
- // src/revamp/wise/renderers/ReviewRenderer.tsx
12515
- var import_components36 = require("@transferwise/components");
12516
- var import_jsx_runtime55 = require("react/jsx-runtime");
12517
- var ReviewRenderer = {
12518
- canRenderType: "review",
12519
- render: ({ callToAction, control, fields, margin, title }) => {
12520
- const orientation = mapControlToDefinitionListLayout(control);
12521
- const action = callToAction ? {
12522
- text: callToAction.title,
12523
- onClick: (event) => {
12524
- event.preventDefault();
12525
- callToAction.onClick();
12526
- }
12527
- } : void 0;
12528
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
12529
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
12530
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12531
- import_components36.DefinitionList,
12532
- {
12533
- layout: orientation,
12534
- definitions: fields.map(({ label, value, help }, index) => ({
12535
- key: String(index),
12536
- title: label,
12537
- value: getFieldValue(value, help, orientation)
12538
- }))
12539
- }
12540
- ) })
12541
- ] });
12542
- }
12543
- };
12544
- var ReviewRenderer_default = ReviewRenderer;
12545
- var mapControlToDefinitionListLayout = (control) => {
12546
- switch (control) {
12547
- case "horizontal":
12548
- case "horizontal-end-aligned":
12549
- return "HORIZONTAL_RIGHT_ALIGNED";
12550
- case "horizontal-start-aligned":
12551
- return "HORIZONTAL_LEFT_ALIGNED";
12552
- case "vertical-two-column":
12553
- return "VERTICAL_TWO_COLUMN";
12554
- case "vertical":
12555
- case "vertical-one-column":
12556
- default:
12557
- return "VERTICAL_ONE_COLUMN";
12558
- }
12559
- };
12560
- var getFieldValue = (value, help, orientation) => {
12561
- if (help) {
12562
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12563
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
12564
- " ",
12565
- value
12566
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12567
- value,
12568
- " ",
12569
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
12570
- ] });
12557
+ "label",
12558
+ "description",
12559
+ "disabled",
12560
+ "error",
12561
+ "help",
12562
+ "maxSize",
12563
+ "type",
12564
+ "onUpload"
12565
+ ]);
12566
+ const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
12567
+ const onUploadFile = async (file, fileName) => {
12568
+ try {
12569
+ const convertedFile = file ? await toFile(file, fileName) : null;
12570
+ await onUpload(convertedFile);
12571
+ } catch (e) {
12572
+ await onUpload(null);
12573
+ throw e;
12574
+ }
12575
+ };
12576
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12577
+ import_components36.Upload,
12578
+ __spreadProps(__spreadValues({}, uploadProps), {
12579
+ usAccept: getAcceptsString(accepts),
12580
+ usDisabled: disabled,
12581
+ onSuccess: onUploadFile,
12582
+ onFailure: async () => onUpload(null),
12583
+ onCancel: async () => onUpload(null)
12584
+ })
12585
+ ) });
12571
12586
  }
12572
- return value;
12573
12587
  };
12574
12588
 
12575
12589
  // src/revamp/wise/renderers/step/StepRenderer.tsx
@@ -13208,6 +13222,61 @@ function FeatureContextProvider({ features, children }) {
13208
13222
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FeatureContext.Provider, { value: features, children });
13209
13223
  }
13210
13224
 
13225
+ // src/common/cameraCapture/utils/mobile-utils.ts
13226
+ var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
13227
+ var isMobileUA = (userAgent = window.navigator.userAgent) => (
13228
+ // eslint-disable-next-line regexp/no-unused-capturing-group
13229
+ /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
13230
+ );
13231
+ var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
13232
+ var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
13233
+ if ("maxTouchPoints" in navigator2) {
13234
+ return navigator2.maxTouchPoints > 0;
13235
+ }
13236
+ const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
13237
+ if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
13238
+ return Boolean(mQ.matches);
13239
+ }
13240
+ return false;
13241
+ };
13242
+
13243
+ // src/common/utils/debounce.ts
13244
+ var debounce2 = (callback, waitMs) => {
13245
+ let timeoutId;
13246
+ let lastArgs;
13247
+ const clearTimer = () => {
13248
+ if (timeoutId) {
13249
+ clearTimeout(timeoutId);
13250
+ timeoutId = null;
13251
+ }
13252
+ lastArgs = null;
13253
+ };
13254
+ const debouncedFn = (...args) => {
13255
+ lastArgs = args;
13256
+ if (timeoutId !== null) {
13257
+ clearTimeout(timeoutId);
13258
+ }
13259
+ timeoutId = setTimeout(() => {
13260
+ callback(...lastArgs);
13261
+ timeoutId = null;
13262
+ lastArgs = null;
13263
+ }, waitMs);
13264
+ };
13265
+ debouncedFn.cancel = () => {
13266
+ if (timeoutId !== null) {
13267
+ clearTimer();
13268
+ }
13269
+ };
13270
+ debouncedFn.flush = () => {
13271
+ if (timeoutId !== null) {
13272
+ callback(...lastArgs);
13273
+ clearTimer();
13274
+ }
13275
+ };
13276
+ debouncedFn.isPending = () => timeoutId !== null;
13277
+ return debouncedFn;
13278
+ };
13279
+
13211
13280
  // src/legacy/common/utils/api-utils.ts
13212
13281
  function isStatus2xx(status) {
13213
13282
  return status >= 200 && status < 300;
@@ -13670,63 +13739,6 @@ var dateStringToDate = (dateString) => {
13670
13739
  };
13671
13740
  var dateToDateString2 = (date) => formatDate2(date);
13672
13741
 
13673
- // src/legacy/common/utils/debounce.ts
13674
- var debounce2 = (callback, waitMs) => {
13675
- let timeoutId;
13676
- let lastArgs;
13677
- const clearTimer = () => {
13678
- if (timeoutId) {
13679
- clearTimeout(timeoutId);
13680
- timeoutId = null;
13681
- }
13682
- lastArgs = null;
13683
- };
13684
- const debouncedFn = (...args) => {
13685
- lastArgs = args;
13686
- if (timeoutId !== null) {
13687
- clearTimeout(timeoutId);
13688
- }
13689
- timeoutId = setTimeout(() => {
13690
- callback(...lastArgs);
13691
- timeoutId = null;
13692
- lastArgs = null;
13693
- }, waitMs);
13694
- };
13695
- debouncedFn.cancel = () => {
13696
- if (timeoutId !== null) {
13697
- clearTimer();
13698
- }
13699
- };
13700
- debouncedFn.flush = () => {
13701
- if (timeoutId !== null) {
13702
- callback(...lastArgs);
13703
- clearTimer();
13704
- }
13705
- };
13706
- debouncedFn.isPending = () => timeoutId !== null;
13707
- return debouncedFn;
13708
- };
13709
-
13710
- // src/legacy/common/utils/is-equal.ts
13711
- var isEqual = (a, b) => {
13712
- if (a === b) {
13713
- return true;
13714
- }
13715
- if (Array.isArray(a) && Array.isArray(b)) {
13716
- return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
13717
- }
13718
- if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
13719
- return true;
13720
- }
13721
- return false;
13722
- };
13723
- var isObjectEquals = (a, b) => {
13724
- const keysA = Object.keys(a);
13725
- const keysB = Object.keys(b);
13726
- return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
13727
- };
13728
- var isNonNullObject = (a) => typeof a === "object" && a !== null;
13729
-
13730
13742
  // src/legacy/common/utils/file-utils.ts
13731
13743
  function toKilobytes2(sizeInBytes) {
13732
13744
  const ONE_KB_IN_BYTES = 1024;
@@ -13762,6 +13774,52 @@ var generateRandomId = (prefix = "") => {
13762
13774
  return `${prefixString}${Math.floor(1e8 * Math.random())}`;
13763
13775
  };
13764
13776
 
13777
+ // src/legacy/common/utils/is-equal.ts
13778
+ var isEqual = (a, b) => {
13779
+ if (a === b) {
13780
+ return true;
13781
+ }
13782
+ if (Array.isArray(a) && Array.isArray(b)) {
13783
+ return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
13784
+ }
13785
+ if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
13786
+ return true;
13787
+ }
13788
+ return false;
13789
+ };
13790
+ var isObjectEquals = (a, b) => {
13791
+ const keysA = Object.keys(a);
13792
+ const keysB = Object.keys(b);
13793
+ return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
13794
+ };
13795
+ var isNonNullObject = (a) => typeof a === "object" && a !== null;
13796
+
13797
+ // src/legacy/common/utils/misc-utils.ts
13798
+ var isBasicError = (error) => isString2(error) || isNull3(error);
13799
+
13800
+ // src/legacy/common/utils/model-utils.ts
13801
+ var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
13802
+ var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
13803
+ var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
13804
+ var isNullableStringModel = (model) => isString2(model) || isNull3(model);
13805
+ var isArrayModel2 = (model) => {
13806
+ if (isArray2(model)) {
13807
+ if (model.length === 0) {
13808
+ return true;
13809
+ }
13810
+ return model.every(
13811
+ (item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
13812
+ );
13813
+ }
13814
+ return false;
13815
+ };
13816
+ var isNullableArrayModel = (model) => {
13817
+ if (isNull3(model)) {
13818
+ return true;
13819
+ }
13820
+ return isArrayModel2(model);
13821
+ };
13822
+
13765
13823
  // src/legacy/common/utils/schema-utils.ts
13766
13824
  function isConstSchema2(schema) {
13767
13825
  return !isUndefined3(schema == null ? void 0 : schema.const);
@@ -13890,50 +13948,6 @@ var filterHiddenSchemas = (schemas) => schemas.filter((schema) => {
13890
13948
  return (schema == null ? void 0 : schema.hidden) !== true;
13891
13949
  });
13892
13950
 
13893
- // src/legacy/common/utils/model-utils.ts
13894
- var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
13895
- var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
13896
- var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
13897
- var isNullableStringModel = (model) => isString2(model) || isNull3(model);
13898
- var isArrayModel2 = (model) => {
13899
- if (isArray2(model)) {
13900
- if (model.length === 0) {
13901
- return true;
13902
- }
13903
- return model.every(
13904
- (item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
13905
- );
13906
- }
13907
- return false;
13908
- };
13909
- var isNullableArrayModel = (model) => {
13910
- if (isNull3(model)) {
13911
- return true;
13912
- }
13913
- return isArrayModel2(model);
13914
- };
13915
-
13916
- // src/legacy/common/utils/misc-utils.ts
13917
- var isBasicError = (error) => isString2(error) || isNull3(error);
13918
-
13919
- // src/legacy/common/utils/mobile-utils.ts
13920
- var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
13921
- var isMobileUA = (userAgent = window.navigator.userAgent) => (
13922
- // eslint-disable-next-line regexp/no-unused-capturing-group
13923
- /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
13924
- );
13925
- var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
13926
- var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
13927
- if ("maxTouchPoints" in navigator2) {
13928
- return navigator2.maxTouchPoints > 0;
13929
- }
13930
- const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
13931
- if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
13932
- return Boolean(mQ.matches);
13933
- }
13934
- return false;
13935
- };
13936
-
13937
13951
  // src/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.tsx
13938
13952
  var import_react28 = require("react");
13939
13953
  function useDebouncedFunction(callback, waitMs) {
@@ -18147,12 +18161,12 @@ var LayoutStep_default = LayoutStep;
18147
18161
  // src/legacy/step/cameraStep/CameraStep.tsx
18148
18162
  var import_react62 = require("react");
18149
18163
 
18150
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
18164
+ // src/common/cameraCapture/CameraCapture.tsx
18151
18165
  var import_react61 = require("react");
18152
18166
  var import_react_intl37 = require("react-intl");
18153
18167
  var import_react_webcam = __toESM(require("react-webcam"));
18154
18168
 
18155
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.ts
18169
+ // src/common/cameraCapture/CameraCapture.messages.ts
18156
18170
  var import_react_intl33 = require("react-intl");
18157
18171
  var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
18158
18172
  reviewSubmit: {
@@ -18212,7 +18226,7 @@ var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
18212
18226
  }
18213
18227
  });
18214
18228
 
18215
- // src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
18229
+ // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
18216
18230
  var import_components73 = require("@transferwise/components");
18217
18231
  var import_react_intl34 = require("react-intl");
18218
18232
  var import_jsx_runtime118 = require("react/jsx-runtime");
@@ -18259,10 +18273,10 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime118.j
18259
18273
  }
18260
18274
  );
18261
18275
 
18262
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18276
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18263
18277
  var import_react_intl36 = require("react-intl");
18264
18278
 
18265
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18279
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18266
18280
  var import_react_intl35 = require("react-intl");
18267
18281
  var OrientationLockOverlay_messages_default = (0, import_react_intl35.defineMessages)({
18268
18282
  text: {
@@ -18272,7 +18286,7 @@ var OrientationLockOverlay_messages_default = (0, import_react_intl35.defineMess
18272
18286
  }
18273
18287
  });
18274
18288
 
18275
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18289
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18276
18290
  var import_jsx_runtime119 = require("react/jsx-runtime");
18277
18291
  function OrientationLockOverlay() {
18278
18292
  const intl = (0, import_react_intl36.useIntl)();
@@ -18292,23 +18306,11 @@ function OrientationLockOverlay() {
18292
18306
  }
18293
18307
  var OrientationLockOverlay_default = OrientationLockOverlay;
18294
18308
 
18295
- // src/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18296
- var import_components74 = require("@transferwise/components");
18297
- var import_jsx_runtime120 = require("react/jsx-runtime");
18298
- function CameraErrorScreen({ title, description, actionButton, onAction }) {
18299
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
18300
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
18301
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
18302
- onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
18303
- ] }) }) });
18304
- }
18305
- var CameraErrorScreen_default = CameraErrorScreen;
18306
-
18307
- // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
18309
+ // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18308
18310
  var import_react58 = require("react");
18309
18311
  var import_screenfull = __toESM(require_screenfull());
18310
18312
 
18311
- // src/legacy/step/cameraStep/cameraCapture/utils/index.ts
18313
+ // src/common/cameraCapture/utils/index.ts
18312
18314
  var isSelfieCamera = (stream) => {
18313
18315
  var _a;
18314
18316
  const { facingMode } = ((_a = getVideoTrack(stream)) == null ? void 0 : _a.getSettings()) || {};
@@ -18354,7 +18356,7 @@ var getVideoCapabilities = (videoStream) => {
18354
18356
  return (_b = (_a = getVideoTrack(videoStream)) == null ? void 0 : _a.getCapabilities) == null ? void 0 : _b.call(_a);
18355
18357
  };
18356
18358
 
18357
- // src/legacy/step/cameraStep/cameraCapture/tracking/index.ts
18359
+ // src/common/cameraCapture/tracking/index.ts
18358
18360
  var trackCameraError = (message, onEvent, error) => onEvent == null ? void 0 : onEvent(message, { Error: getSerializedError(error) });
18359
18361
  var getSerializedError = (error) => error instanceof DOMException ? JSON.stringify({
18360
18362
  name: error == null ? void 0 : error.name,
@@ -18376,13 +18378,13 @@ var getCameraStartedProperties = async (props, videoStream) => {
18376
18378
  });
18377
18379
  };
18378
18380
  var trackCameraOrientationLandscape = (onEvent) => {
18379
- onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {});
18381
+ void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {}));
18380
18382
  };
18381
18383
  var trackCameraOrientationLocked = (onEvent) => {
18382
- onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {});
18384
+ void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {}));
18383
18385
  };
18384
18386
 
18385
- // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
18387
+ // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18386
18388
  var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18387
18389
  const lockOrientation = (0, import_react58.useCallback)(() => {
18388
18390
  if (window.screen.orientation && "lock" in window.screen.orientation && typeof window.screen.orientation.lock === "function") {
@@ -18444,37 +18446,37 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18444
18446
  var noop5 = () => {
18445
18447
  };
18446
18448
 
18447
- // src/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.ts
18449
+ // src/common/cameraCapture/hooks/useVideoConstraints.ts
18448
18450
  var import_react59 = require("react");
18449
18451
  var useVideoConstraints = (direction) => {
18450
18452
  const [videoConstraints, setVideoConstraints] = (0, import_react59.useState)();
18453
+ (0, import_react59.useEffect)(() => {
18454
+ void getVideoConstraints(direction).then(setVideoConstraints);
18455
+ }, [direction]);
18456
+ return { videoConstraints };
18457
+ };
18458
+ var getVideoConstraints = async (dir) => {
18451
18459
  const defaultVideoConstraints = {
18452
- facingMode: direction === "front" ? "user" : "environment",
18460
+ facingMode: dir === "front" ? "user" : "environment",
18453
18461
  height: { min: 480, max: 1080, ideal: 720 },
18454
18462
  width: { min: 640, max: 1920, ideal: 1280 },
18455
18463
  frameRate: 30,
18456
18464
  aspectRatio: 16 / 9
18457
18465
  };
18458
- (0, import_react59.useEffect)(() => {
18459
- void getVideoConstraints(direction).then(setVideoConstraints);
18460
- }, [direction]);
18461
- const getVideoConstraints = async (direction2) => {
18462
- if (direction2 === "back") {
18463
- const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
18464
- if (mainCamera == null ? void 0 : mainCamera.deviceId) {
18465
- return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
18466
- deviceId: { exact: mainCamera.deviceId }
18467
- });
18468
- }
18466
+ if (dir === "back") {
18467
+ const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
18468
+ if (mainCamera == null ? void 0 : mainCamera.deviceId) {
18469
+ return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
18470
+ deviceId: { exact: mainCamera.deviceId }
18471
+ });
18469
18472
  }
18470
- return defaultVideoConstraints;
18471
- };
18472
- return { videoConstraints };
18473
+ }
18474
+ return defaultVideoConstraints;
18473
18475
  };
18474
18476
 
18475
- // src/legacy/step/cameraStep/cameraCapture/overlay/Overlay.tsx
18477
+ // src/common/cameraCapture/overlay/Overlay.tsx
18476
18478
  var import_react60 = require("react");
18477
- var import_jsx_runtime121 = require("react/jsx-runtime");
18479
+ var import_jsx_runtime120 = require("react/jsx-runtime");
18478
18480
  var captureButtonHeight = 92;
18479
18481
  var reviewButtonsHeight = 120;
18480
18482
  var imageHeight = 40;
@@ -18496,18 +18498,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18496
18498
  return () => window.removeEventListener("resize", listener);
18497
18499
  });
18498
18500
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
18499
- let helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
18500
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18501
- title && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h4", { className: "camera-capture-title", children: title }),
18502
- instructions && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("small", { className: "camera-capture-instructions", children: instructions })
18501
+ let helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
18502
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18503
+ title && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h4", { className: "camera-capture-title", children: title }),
18504
+ instructions && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("small", { className: "camera-capture-instructions", children: instructions })
18503
18505
  ] });
18504
18506
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
18505
18507
  if (reviewInstructions) {
18506
18508
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
18507
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
18509
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
18508
18510
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
18509
18511
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
18510
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_jsx_runtime121.Fragment, {});
18512
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, {});
18511
18513
  }
18512
18514
  }
18513
18515
  const framePosition = {
@@ -18525,19 +18527,31 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18525
18527
  width: "90%"
18526
18528
  }
18527
18529
  };
18528
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18529
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("mask", { id: "mask", children: [
18530
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
18531
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("image", __spreadValues({ href: overlay }, framePosition))
18530
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18531
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("mask", { id: "mask", children: [
18532
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
18533
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("image", __spreadValues({ href: overlay }, framePosition))
18532
18534
  ] }) }),
18533
- overlay && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18534
- outline && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("image", __spreadValues({ href: outline }, framePosition)),
18535
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18535
+ overlay && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18536
+ outline && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("image", __spreadValues({ href: outline }, framePosition)),
18537
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18536
18538
  ] });
18537
18539
  }
18538
18540
  var Overlay_default = Overlay;
18539
18541
 
18540
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
18542
+ // src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18543
+ var import_components74 = require("@transferwise/components");
18544
+ var import_jsx_runtime121 = require("react/jsx-runtime");
18545
+ function CameraErrorScreen({ title, description, actionButton, onAction }) {
18546
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
18547
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
18548
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
18549
+ onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
18550
+ ] }) }) });
18551
+ }
18552
+ var CameraErrorScreen_default = CameraErrorScreen;
18553
+
18554
+ // src/common/cameraCapture/CameraCapture.tsx
18541
18555
  var import_jsx_runtime122 = require("react/jsx-runtime");
18542
18556
  function CameraCapture({
18543
18557
  direction = "back",