@wise/dynamic-flow-client 3.11.5 → 3.12.0-experimental-kyc-camera-fae600d

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 (619) 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 +447 -0
  4. package/build/common/cameraCapture/components/bottomBar/BottomBar.js +17 -0
  5. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +8 -0
  6. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
  7. package/build/common/cameraCapture/hooks/useFullScreenOrientationLock.js +62 -0
  8. package/build/common/cameraCapture/hooks/useVideoConstraints.js +80 -0
  9. package/build/common/cameraCapture/overlay/Overlay.js +78 -0
  10. package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -0
  11. package/build/common/cameraCapture/tracking/index.js +109 -0
  12. package/build/common/cameraCapture/types/index.js +7 -0
  13. package/build/common/cameraCapture/utils/index.js +107 -0
  14. package/build/common/cameraCapture/utils/mobile-utils.js +23 -0
  15. package/build/common/cameraCapture/utils/mobile-utils.spec.js +71 -0
  16. package/build/common/errorBoundary/ErrorBoundary.js +44 -0
  17. package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
  18. package/build/common/httpClientContext/HttpClientContext.js +24 -0
  19. package/build/common/httpClientContext/index.js +1 -0
  20. package/build/common/makeHttpClient/index.js +1 -0
  21. package/build/common/makeHttpClient/makeHttpClient.js +30 -0
  22. package/build/common/makeHttpClient/makeHttpClient.spec.js +140 -0
  23. package/build/common/messages/external-confirmation.messages.js +23 -0
  24. package/build/common/messages/generic-error.messages.js +18 -0
  25. package/build/common/messages/help.messages.js +8 -0
  26. package/build/common/messages/multi-file-upload.messages.js +18 -0
  27. package/build/common/messages/multi-select.messages.js +8 -0
  28. package/build/common/messages/paragraph.messages.js +13 -0
  29. package/build/common/messages/repeatable.messages.js +23 -0
  30. package/build/common/messages/validation.array.messages.js +13 -0
  31. package/build/common/messages/validation.messages.js +53 -0
  32. package/build/common/utils/api-utils.js +4 -0
  33. package/build/common/utils/debounce.js +44 -0
  34. package/build/common/utils/debounce.spec.js +72 -0
  35. package/build/i18n/index.js +36 -0
  36. package/build/index.js +11 -0
  37. package/build/legacy/common/constants/DateMode.js +4 -0
  38. package/build/legacy/common/constants/FeatureName.js +4 -0
  39. package/build/legacy/common/constants/FormControlType.js +21 -0
  40. package/build/legacy/common/constants/MonthFormat.js +4 -0
  41. package/build/legacy/common/constants/Size.js +7 -0
  42. package/build/legacy/common/constants/index.js +4 -0
  43. package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +25 -0
  44. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +15 -0
  45. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.spec.js +113 -0
  46. package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
  47. package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +47 -0
  48. package/build/legacy/common/contexts/featureContext/FeatureContext.js +11 -0
  49. package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +30 -0
  50. package/build/legacy/common/contexts/index.js +3 -0
  51. package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
  52. package/build/legacy/common/contexts/logContext/LogContext.spec.js +43 -0
  53. package/build/legacy/common/hooks/index.js +7 -0
  54. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
  55. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
  56. package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
  57. package/build/legacy/common/hooks/useExternal/useExternal.spec.js +236 -0
  58. package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +71 -0
  59. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
  60. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.spec.js +221 -0
  61. package/build/legacy/common/hooks/usePolling/usePolling.js +53 -0
  62. package/build/legacy/common/hooks/usePolling/usePolling.spec.js +243 -0
  63. package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
  64. package/build/legacy/common/hooks/usePrevious/usePrevious.spec.js +66 -0
  65. package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +45 -0
  66. package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
  67. package/build/legacy/common/messages.js +8 -0
  68. package/build/legacy/common/utils/api-utils.js +6 -0
  69. package/build/legacy/common/utils/date-utils.js +22 -0
  70. package/build/legacy/common/utils/file-utils.js +45 -0
  71. package/build/legacy/common/utils/file-utils.spec.js +69 -0
  72. package/build/legacy/common/utils/id-utils.js +5 -0
  73. package/build/legacy/common/utils/id-utils.spec.js +12 -0
  74. package/build/legacy/common/utils/index.js +11 -0
  75. package/build/legacy/common/utils/is-equal.js +21 -0
  76. package/build/legacy/common/utils/is-equal.spec.js +88 -0
  77. package/build/legacy/common/utils/misc-utils.js +4 -0
  78. package/build/legacy/common/utils/model-utils.js +33 -0
  79. package/build/legacy/common/utils/schema-utils.js +113 -0
  80. package/build/legacy/common/utils/step-utils.js +32 -0
  81. package/build/legacy/common/validators/index.js +5 -0
  82. package/build/legacy/common/validators/models/model-utils.js +119 -0
  83. package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
  84. package/build/legacy/common/validators/models/model-validators.js +62 -0
  85. package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
  86. package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
  87. package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
  88. package/build/legacy/common/validators/types/type-validators.js +14 -0
  89. package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
  90. package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
  91. package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
  92. package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
  93. package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
  94. package/build/legacy/common/validators/values/value-validators.js +6 -0
  95. package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
  96. package/build/legacy/dynamic-flow-types.js +1 -0
  97. package/build/legacy/dynamicFlow/BackButton.js +22 -0
  98. package/build/legacy/dynamicFlow/DynamicFlow.js +347 -0
  99. package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
  100. package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
  101. package/build/legacy/dynamicFlow/index.js +1 -0
  102. package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
  103. package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
  104. package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +25 -0
  105. package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +33 -0
  106. package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
  107. package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
  108. package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +253 -0
  109. package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
  110. package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
  111. package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
  112. package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
  113. package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
  114. package/build/legacy/dynamicFlow/stories/visual-tests/VisualTests.story.js +43 -0
  115. package/build/legacy/dynamicFlow/tests/Actions.spec.js +232 -0
  116. package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
  117. package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
  118. package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
  119. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialAction.spec.js +458 -0
  120. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +734 -0
  121. package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +254 -0
  122. package/build/legacy/dynamicFlow/tests/DynamicFlow.legacy.spec.js +1202 -0
  123. package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
  124. package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
  125. package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
  126. package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
  127. package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
  128. package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
  129. package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +327 -0
  130. package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
  131. package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
  132. package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
  133. package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
  134. package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
  135. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +391 -0
  136. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +588 -0
  137. package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
  138. package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
  139. package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
  140. package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
  141. package/build/legacy/dynamicFlow/utils/index.js +5 -0
  142. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
  143. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
  144. package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +35 -0
  145. package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
  146. package/build/legacy/dynamicFlow/utils/useErrorResponse.js +62 -0
  147. package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
  148. package/build/legacy/formControl/FormControl.js +267 -0
  149. package/build/legacy/formControl/FormControl.spec.js +445 -0
  150. package/build/legacy/formControl/Select.spec.js +104 -0
  151. package/build/legacy/formControl/index.js +1 -0
  152. package/build/legacy/formControl/utils/getAutocompleteString.js +80 -0
  153. package/build/legacy/formControl/utils/getAutocompleteString.spec.js +30 -0
  154. package/build/legacy/formControl/utils/index.js +2 -0
  155. package/build/legacy/formControl/utils/value-utils.js +108 -0
  156. package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
  157. package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +534 -0
  158. package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
  159. package/build/legacy/jsonSchemaForm/JsonSchemaForm.spec.js +77 -0
  160. package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
  161. package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
  162. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
  163. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArrayTypeSchema.spec.js +50 -0
  164. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +34 -0
  165. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
  166. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +86 -0
  167. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
  168. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
  169. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
  170. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
  171. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
  172. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
  173. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
  174. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
  175. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
  176. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
  177. package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
  178. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js +233 -0
  179. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +100 -0
  180. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.spec.js +291 -0
  181. package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
  182. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +89 -0
  183. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.spec.js +182 -0
  184. package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
  185. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
  186. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
  187. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.spec.js +334 -0
  188. package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
  189. package/build/legacy/jsonSchemaForm/help/Help.js +9 -0
  190. package/build/legacy/jsonSchemaForm/help/Help.spec.js +61 -0
  191. package/build/legacy/jsonSchemaForm/help/index.js +1 -0
  192. package/build/legacy/jsonSchemaForm/index.js +1 -0
  193. package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
  194. package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
  195. package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
  196. package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
  197. package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
  198. package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
  199. package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
  200. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
  201. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
  202. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
  203. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
  204. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.spec.js +243 -0
  205. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
  206. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
  207. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.spec.js +420 -0
  208. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
  209. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
  210. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +16 -0
  211. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.spec.js +125 -0
  212. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
  213. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.spec.js +82 -0
  214. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
  215. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.spec.js +130 -0
  216. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
  217. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
  218. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.spec.js +117 -0
  219. package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
  220. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +138 -0
  221. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
  222. package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
  223. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
  224. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
  225. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +220 -0
  226. package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
  227. package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
  228. package/build/legacy/layout/DynamicLayout.end-to-end.spec.js +71 -0
  229. package/build/legacy/layout/DynamicLayout.js +68 -0
  230. package/build/legacy/layout/DynamicLayout.spec.js +243 -0
  231. package/build/legacy/layout/alert/DynamicAlert.js +29 -0
  232. package/build/legacy/layout/alert/DynamicAlert.spec.js +42 -0
  233. package/build/legacy/layout/box/DynamicBox.js +30 -0
  234. package/build/legacy/layout/box/DynamicBox.spec.js +56 -0
  235. package/build/legacy/layout/button/DynamicButton.js +16 -0
  236. package/build/legacy/layout/button/DynamicButton.spec.js +141 -0
  237. package/build/legacy/layout/button/utils.js +45 -0
  238. package/build/legacy/layout/button/utils.spec.js +50 -0
  239. package/build/legacy/layout/columns/DynamicColumns.js +27 -0
  240. package/build/legacy/layout/columns/DynamicColumns.spec.js +83 -0
  241. package/build/legacy/layout/decision/DynamicDecision.js +10 -0
  242. package/build/legacy/layout/decision/DynamicDecision.spec.js +146 -0
  243. package/build/legacy/layout/divider/DynamicDivider.js +9 -0
  244. package/build/legacy/layout/divider/DynamicDivider.spec.js +17 -0
  245. package/build/legacy/layout/external/DynamicExternal.js +32 -0
  246. package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
  247. package/build/legacy/layout/external/DynamicExternal.spec.js +264 -0
  248. package/build/legacy/layout/form/DynamicForm.js +22 -0
  249. package/build/legacy/layout/form/DynamicForm.spec.js +74 -0
  250. package/build/legacy/layout/heading/DynamicHeading.js +40 -0
  251. package/build/legacy/layout/heading/DynamicHeading.spec.js +14 -0
  252. package/build/legacy/layout/icon/DynamicIcon.js +17 -0
  253. package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
  254. package/build/legacy/layout/icon/FlagIcon.js +11 -0
  255. package/build/legacy/layout/icon/NamedIcon.js +19 -0
  256. package/build/legacy/layout/image/DynamicImage.js +112 -0
  257. package/build/legacy/layout/index.js +20 -0
  258. package/build/legacy/layout/instructions/DynamicInstructions.js +19 -0
  259. package/build/legacy/layout/list/DynamicStatusList.js +37 -0
  260. package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
  261. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
  262. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
  263. package/build/legacy/layout/markdown/DynamicMarkdown.js +12 -0
  264. package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
  265. package/build/legacy/layout/modal/DynamicModal.js +26 -0
  266. package/build/legacy/layout/paragraph/DynamicParagraph.js +35 -0
  267. package/build/legacy/layout/paragraph/DynamicParagraph.spec.js +109 -0
  268. package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
  269. package/build/legacy/layout/review/DynamicReview.js +59 -0
  270. package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
  271. package/build/legacy/layout/search/DynamicSearch.js +83 -0
  272. package/build/legacy/layout/search/SearchInput.js +6 -0
  273. package/build/legacy/layout/search/SearchResults.js +20 -0
  274. package/build/legacy/layout/search/useSearch.js +137 -0
  275. package/build/legacy/layout/utils/getNavigationOptionMedia.js +17 -0
  276. package/build/legacy/layout/utils/index.js +32 -0
  277. package/build/legacy/step/cameraStep/CameraStep.js +124 -0
  278. package/build/legacy/step/cameraStep/index.js +1 -0
  279. package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
  280. package/build/legacy/step/externalConfirmationStep/index.js +1 -0
  281. package/build/legacy/step/index.js +3 -0
  282. package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
  283. package/build/legacy/step/layoutStep/LayoutStep.spec.js +189 -0
  284. package/build/legacy/step/layoutStep/index.js +1 -0
  285. package/build/legacy/step/layoutStep/utils/index.js +2 -0
  286. package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
  287. package/build/legacy/step/layoutStep/utils/inline-reference-utils.spec.js +296 -0
  288. package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
  289. package/build/legacy/step/layoutStep/utils/layout-utils.spec.js +558 -0
  290. package/build/legacy/test-utils/DynamicFlowProviders.js +8 -0
  291. package/build/legacy/test-utils/index.js +4 -0
  292. package/build/legacy/test-utils/legacy-utils.js +69 -0
  293. package/build/legacy/test-utils/log-utils.js +9 -0
  294. package/build/main.js +786 -819
  295. package/build/main.min.js +1 -1
  296. package/build/main.mjs +765 -798
  297. package/build/revamp/DynamicFlowCore.js +25 -0
  298. package/build/revamp/DynamicFlowWise.js +32 -0
  299. package/build/revamp/DynamicFlowWise.spec.js +105 -0
  300. package/build/revamp/DynamicFragmentWise.js +83 -0
  301. package/build/revamp/domain/components/AlertComponent.js +50 -0
  302. package/build/revamp/domain/components/AllOfComponent.js +72 -0
  303. package/build/revamp/domain/components/BooleanInputComponent.js +109 -0
  304. package/build/revamp/domain/components/BoxComponent.js +65 -0
  305. package/build/revamp/domain/components/ButtonComponent.js +50 -0
  306. package/build/revamp/domain/components/ColumnsComponent.js +74 -0
  307. package/build/revamp/domain/components/ConstComponent.js +50 -0
  308. package/build/revamp/domain/components/ContainerComponent.js +65 -0
  309. package/build/revamp/domain/components/DateInputComponent.js +128 -0
  310. package/build/revamp/domain/components/DecisionComponent.js +50 -0
  311. package/build/revamp/domain/components/DividerComponent.js +50 -0
  312. package/build/revamp/domain/components/FormComponent.js +65 -0
  313. package/build/revamp/domain/components/HeadingComponent.js +50 -0
  314. package/build/revamp/domain/components/ImageComponent.js +50 -0
  315. package/build/revamp/domain/components/InstructionsComponent.js +50 -0
  316. package/build/revamp/domain/components/IntegerInputComponent.js +129 -0
  317. package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
  318. package/build/revamp/domain/components/MarkdownComponent.js +50 -0
  319. package/build/revamp/domain/components/ModalComponent.js +65 -0
  320. package/build/revamp/domain/components/MultiSelectInputComponent.js +148 -0
  321. package/build/revamp/domain/components/MultiUploadInputComponent.js +192 -0
  322. package/build/revamp/domain/components/NumberInputComponent.js +129 -0
  323. package/build/revamp/domain/components/ObjectComponent.js +104 -0
  324. package/build/revamp/domain/components/ParagraphComponent.js +50 -0
  325. package/build/revamp/domain/components/ReviewComponent.js +50 -0
  326. package/build/revamp/domain/components/SelectInputComponent.js +140 -0
  327. package/build/revamp/domain/components/StatusListComponent.js +50 -0
  328. package/build/revamp/domain/components/StepDomainComponent.js +87 -0
  329. package/build/revamp/domain/components/TextInputComponent.js +129 -0
  330. package/build/revamp/domain/components/UploadInputComponent.js +154 -0
  331. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +150 -0
  332. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +146 -0
  333. package/build/revamp/domain/components/searchComponent/SearchComponent.js +111 -0
  334. package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
  335. package/build/revamp/domain/components/utils/component-utils.js +18 -0
  336. package/build/revamp/domain/components/utils/debounce.js +38 -0
  337. package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
  338. package/build/revamp/domain/components/utils/file-utils.js +65 -0
  339. package/build/revamp/domain/components/utils/file-utils.spec.js +81 -0
  340. package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +31 -0
  341. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +41 -0
  342. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +119 -0
  343. package/build/revamp/domain/components/utils/local-value.js +11 -0
  344. package/build/revamp/domain/features/events.js +1 -0
  345. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +134 -0
  346. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +200 -0
  347. package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
  348. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
  349. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
  350. package/build/revamp/domain/features/polling/getStepPolling.js +82 -0
  351. package/build/revamp/domain/features/polling/getStepPolling.spec.js +170 -0
  352. package/build/revamp/domain/features/refresh/getPerformRefresh.js +16 -0
  353. package/build/revamp/domain/features/search/getPerformSearchFunction.js +104 -0
  354. package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
  355. package/build/revamp/domain/features/summary/summary-utils.js +39 -0
  356. package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
  357. package/build/revamp/domain/features/utils/http-utils.js +34 -0
  358. package/build/revamp/domain/features/utils/response-utils.js +9 -0
  359. package/build/revamp/domain/features/validation/spec-utils.js +16 -0
  360. package/build/revamp/domain/features/validation/validation-functions.js +12 -0
  361. package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
  362. package/build/revamp/domain/features/validation/value-checks.js +111 -0
  363. package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
  364. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +95 -0
  365. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +178 -0
  366. package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
  367. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
  368. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
  369. package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
  370. package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
  371. package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +45 -0
  372. package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
  373. package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +40 -0
  374. package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
  375. package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +27 -0
  376. package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
  377. package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
  378. package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
  379. package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
  380. package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
  381. package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
  382. package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
  383. package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
  384. package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
  385. package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
  386. package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
  387. package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
  388. package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
  389. package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
  390. package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
  391. package/build/revamp/domain/mappers/mapStepToComponent.js +133 -0
  392. package/build/revamp/domain/mappers/mapStepToComponent.spec.js +162 -0
  393. package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
  394. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +42 -0
  395. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +54 -0
  396. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +64 -0
  397. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +66 -0
  398. package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
  399. package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
  400. package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
  401. package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
  402. package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
  403. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +41 -0
  404. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
  405. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
  406. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
  407. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
  408. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
  409. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
  410. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
  411. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +37 -0
  412. package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
  413. package/build/revamp/domain/mappers/schema/types.js +1 -0
  414. package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
  415. package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
  416. package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
  417. package/build/revamp/domain/mappers/types.js +1 -0
  418. package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
  419. package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
  420. package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
  421. package/build/revamp/domain/mappers/utils/inlineAction.js +23 -0
  422. package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
  423. package/build/revamp/domain/types.js +1 -0
  424. package/build/revamp/flow/executeRefresh.js +97 -0
  425. package/build/revamp/flow/executeSubmission.js +160 -0
  426. package/build/revamp/flow/getResponseType.js +76 -0
  427. package/build/revamp/flow/response-utils.js +92 -0
  428. package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
  429. package/build/revamp/renderers/getRenderFunction.js +55 -0
  430. package/build/revamp/renderers/getSchemaErrorMessageFunction.js +90 -0
  431. package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
  432. package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
  433. package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
  434. package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
  435. package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
  436. package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
  437. package/build/revamp/renderers/mappers/componentToRendererProps.js +108 -0
  438. package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
  439. package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
  440. package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
  441. package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
  442. package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
  443. package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
  444. package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
  445. package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
  446. package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
  447. package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
  448. package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
  449. package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
  450. package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
  451. package/build/revamp/renderers/mappers/multiSelectComponentToProps.js +28 -0
  452. package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
  453. package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
  454. package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
  455. package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
  456. package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
  457. package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
  458. package/build/revamp/renderers/mappers/searchComponentToProps.js +53 -0
  459. package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
  460. package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
  461. package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
  462. package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
  463. package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
  464. package/build/revamp/renderers/stepComponentToProps.js +16 -0
  465. package/build/revamp/renderers/types.js +1 -0
  466. package/build/revamp/stories/dev-tools/ActionResponse.story.js +101 -0
  467. package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +314 -0
  468. package/build/revamp/stories/dev-tools/EditableStep.story.js +71 -0
  469. package/build/revamp/stories/dev-tools/ErrorHandling.story.js +149 -0
  470. package/build/revamp/stories/dev-tools/External.story.js +83 -0
  471. package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +123 -0
  472. package/build/revamp/stories/dev-tools/PersistAsync.story.js +168 -0
  473. package/build/revamp/stories/dev-tools/Polling.story.js +79 -0
  474. package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +309 -0
  475. package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +1004 -0
  476. package/build/revamp/stories/dev-tools/SearchFeature.story.js +260 -0
  477. package/build/revamp/stories/dev-tools/ServerTest.story.js +86 -0
  478. package/build/revamp/stories/dev-tools/Upload.story.js +221 -0
  479. package/build/revamp/stories/dev-tools/ValidationAsync.story.js +161 -0
  480. package/build/revamp/stories/examples/KYCCameraStep.story.js +83 -0
  481. package/build/revamp/stories/examples/ObjectConst.story.js +153 -0
  482. package/build/revamp/stories/examples/OneOfInitialisation.story.js +102 -0
  483. package/build/revamp/stories/utils/fixtureHttpClient.js +130 -0
  484. package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
  485. package/build/revamp/stories/visual-tests/VisualTests.story.js +114 -0
  486. package/build/revamp/test-utils/component-utils.js +19 -0
  487. package/build/revamp/test-utils/step-utils.js +6 -0
  488. package/build/revamp/tests/ImageRenderer.spec.js +108 -0
  489. package/build/revamp/tests/InitialAction.spec.js +299 -0
  490. package/build/revamp/tests/InitialStep.spec.js +104 -0
  491. package/build/revamp/tests/Logging.spec.js +112 -0
  492. package/build/revamp/tests/OneOfInitialisation.spec.js +876 -0
  493. package/build/revamp/tests/Polling.spec.js +611 -0
  494. package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +322 -0
  495. package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +447 -0
  496. package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +447 -0
  497. package/build/revamp/tests/RefreshOnChangePreserve.spec.js +341 -0
  498. package/build/revamp/tests/Rerendering.spec.js +156 -0
  499. package/build/revamp/tests/SegmentedControl.spec.js +48 -0
  500. package/build/revamp/tests/Submission.ResponseHandling.spec.js +697 -0
  501. package/build/revamp/tests/Submission.spec.js +399 -0
  502. package/build/revamp/tests/legacy/Actions.spec.js +242 -0
  503. package/build/revamp/tests/legacy/BackButton.spec.js +189 -0
  504. package/build/revamp/tests/legacy/HiddenSchemas.spec.js +312 -0
  505. package/build/revamp/tests/legacy/MultiSelect.spec.js +753 -0
  506. package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +447 -0
  507. package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +339 -0
  508. package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +385 -0
  509. package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +352 -0
  510. package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +623 -0
  511. package/build/revamp/tests/legacy/Search.spec.js +501 -0
  512. package/build/revamp/tests/legacy/ValidationAsync.spec.js +452 -0
  513. package/build/revamp/tests/legacy/useExternal.spec.js +235 -0
  514. package/build/revamp/types.js +1 -0
  515. package/build/revamp/useDynamicFlowCore.js +285 -0
  516. package/build/revamp/utils/component-utils.js +86 -0
  517. package/build/revamp/utils/component-utils.spec.js +385 -0
  518. package/build/revamp/utils/findComponent.js +29 -0
  519. package/build/revamp/utils/findComponent.spec.js +92 -0
  520. package/build/revamp/utils/type-utils.js +59 -0
  521. package/build/revamp/utils/type-validators.js +16 -0
  522. package/build/revamp/utils/type-validators.spec.js +163 -0
  523. package/build/revamp/utils/useStableCallback.js +21 -0
  524. package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
  525. package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
  526. package/build/revamp/wise/renderers/BoxRenderer.js +19 -0
  527. package/build/revamp/wise/renderers/ButtonRenderer.js +53 -0
  528. package/build/revamp/wise/renderers/ColumnsRenderer.js +14 -0
  529. package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
  530. package/build/revamp/wise/renderers/DecisionRenderer.js +18 -0
  531. package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
  532. package/build/revamp/wise/renderers/FormRenderer.js +10 -0
  533. package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
  534. package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
  535. package/build/revamp/wise/renderers/ImageRenderer.js +112 -0
  536. package/build/revamp/wise/renderers/InstructionsRenderer.js +23 -0
  537. package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
  538. package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
  539. package/build/revamp/wise/renderers/MarkdownRenderer.js +11 -0
  540. package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
  541. package/build/revamp/wise/renderers/MultiSelectInputRenderer.js +84 -0
  542. package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +63 -0
  543. package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
  544. package/build/revamp/wise/renderers/ParagraphRenderer.js +45 -0
  545. package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
  546. package/build/revamp/wise/renderers/ReviewRenderer.js +50 -0
  547. package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +59 -0
  548. package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +11 -0
  549. package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +63 -0
  550. package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +21 -0
  551. package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +16 -0
  552. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +14 -0
  553. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.spec.js +76 -0
  554. package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +21 -0
  555. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +33 -0
  556. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
  557. package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +16 -0
  558. package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +22 -0
  559. package/build/revamp/wise/renderers/StatusListRenderer.js +21 -0
  560. package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
  561. package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
  562. package/build/revamp/wise/renderers/components/FieldInput.js +9 -0
  563. package/build/revamp/wise/renderers/components/Help.js +10 -0
  564. package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
  565. package/build/revamp/wise/renderers/components/UploadFieldInput.js +14 -0
  566. package/build/revamp/wise/renderers/components/VariableDateInput.js +30 -0
  567. package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
  568. package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
  569. package/build/revamp/wise/renderers/components/icon/FlagIcon.js +11 -0
  570. package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
  571. package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +20 -0
  572. package/build/revamp/wise/renderers/getWiseRenderers.js +61 -0
  573. package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
  574. package/build/revamp/wise/renderers/step/BackButton.js +11 -0
  575. package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +20 -0
  576. package/build/revamp/wise/renderers/step/KYCCameraStepRenderer.js +144 -0
  577. package/build/revamp/wise/renderers/step/StepRenderer.js +31 -0
  578. package/build/revamp/wise/renderers/step/StepRendererContext.js +11 -0
  579. package/build/revamp/wise/renderers/step/useExternal.js +15 -0
  580. package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
  581. package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
  582. package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
  583. package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
  584. package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
  585. package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
  586. package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
  587. package/build/test-utils/NeptuneProviders.js +23 -0
  588. package/build/test-utils/fetch-utils.js +104 -0
  589. package/build/test-utils/index.js +2 -0
  590. package/build/test-utils/rtl-utils.js +20 -0
  591. package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.d.ts +3 -2
  592. package/build/types/common/cameraCapture/components/index.d.ts +3 -0
  593. package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +2 -2
  594. package/build/types/common/cameraCapture/index.d.ts +1 -0
  595. package/build/types/common/cameraCapture/screens/index.d.ts +1 -0
  596. package/build/types/common/cameraCapture/tracking/index.d.ts +8 -0
  597. package/build/types/legacy/common/utils/index.d.ts +5 -5
  598. package/build/types/legacy/dynamic-flow-types.d.ts +2 -1
  599. package/build/types/revamp/domain/components/StepDomainComponent.d.ts +6 -4
  600. package/build/types/revamp/domain/components/utils/isPartialLocalValueMatch.d.ts +1 -1
  601. package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
  602. package/build/types/revamp/renderers/types.d.ts +5 -1
  603. package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +2 -0
  604. package/package.json +5 -4
  605. package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +0 -8
  606. /package/build/{types/legacy/step/cameraStep/cameraCapture/components/index.d.ts → common/cameraCapture/components/index.js} +0 -0
  607. /package/build/{types/legacy/step/cameraStep/cameraCapture/index.d.ts → common/cameraCapture/index.js} +0 -0
  608. /package/build/{types/legacy/step/cameraStep/cameraCapture/screens/index.d.ts → common/cameraCapture/screens/index.js} +0 -0
  609. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.messages.d.ts +0 -0
  610. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/bottomBar/BottomBar.d.ts +0 -0
  611. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +0 -0
  612. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +0 -0
  613. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useVideoConstraints.d.ts +0 -0
  614. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/overlay/Overlay.d.ts +0 -0
  615. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.d.ts +0 -0
  616. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/types/index.d.ts +0 -0
  617. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/utils/index.d.ts +0 -0
  618. /package/build/types/{legacy/common → common/cameraCapture}/utils/mobile-utils.d.ts +0 -0
  619. /package/build/types/{legacy/common → common}/utils/debounce.d.ts +0 -0
package/build/main.mjs CHANGED
@@ -1269,16 +1269,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
1269
1269
  var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
1270
1270
 
1271
1271
  // src/revamp/renderers/stepComponentToProps.ts
1272
- var stepComponentToProps = ({ back, description, error, external, loadingState, title, trackEvent }, children) => ({
1272
+ var stepComponentToProps = ({
1273
+ back,
1274
+ description,
1275
+ error,
1276
+ external,
1277
+ loadingState,
1278
+ step,
1279
+ title,
1280
+ trackEvent,
1281
+ onAction
1282
+ }, children) => ({
1273
1283
  type: "step",
1274
1284
  back,
1275
1285
  description,
1276
1286
  error,
1277
1287
  external,
1278
1288
  loadingState,
1289
+ step,
1279
1290
  title,
1291
+ children,
1280
1292
  trackEvent,
1281
- children
1293
+ onAction
1282
1294
  });
1283
1295
 
1284
1296
  // src/revamp/renderers/mappers/alertComponentToProps.ts
@@ -5486,38 +5498,24 @@ var imageSchema = z.object({
5486
5498
  url: z.string(),
5487
5499
  accessibilityDescription: z.string().optional()
5488
5500
  });
5489
- var httpMethodSchema = z.union([
5490
- z.literal("GET"),
5491
- z.literal("POST"),
5492
- z.literal("PUT"),
5493
- z.literal("PATCH"),
5494
- z.literal("DELETE")
5495
- ]);
5496
- var iconNamedSchema = z.object({
5497
- name: z.string()
5501
+ var summaryProviderSchema = z.object({
5502
+ providesTitle: z.boolean().optional(),
5503
+ providesDescription: z.boolean().optional(),
5504
+ providesIcon: z.boolean().optional(),
5505
+ providesImage: z.boolean().optional()
5498
5506
  });
5499
- var contextSchema = z.union([
5500
- z.literal("positive"),
5501
- z.literal("neutral"),
5502
- z.literal("warning"),
5503
- z.literal("negative"),
5504
- z.literal("success"),
5505
- z.literal("failure"),
5506
- z.literal("info"),
5507
- z.literal("primary")
5508
- ]);
5509
- var iconTextSchema = z.object({
5510
- text: z.string()
5507
+ var jsonElementSchema = z.lazy(
5508
+ () => z.union([
5509
+ z.string(),
5510
+ z.number(),
5511
+ z.boolean(),
5512
+ z.record(jsonElementSchema),
5513
+ z.array(jsonElementSchema)
5514
+ ]).nullable()
5515
+ );
5516
+ var helpSchema = z.object({
5517
+ markdown: z.string()
5511
5518
  });
5512
- var sizeSchema = z.union([
5513
- z.literal("xs"),
5514
- z.literal("sm"),
5515
- z.literal("md"),
5516
- z.literal("lg"),
5517
- z.literal("xl")
5518
- ]);
5519
- var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5520
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5521
5519
  var autocompleteTokenSchema = z.union([
5522
5520
  z.literal("on"),
5523
5521
  z.literal("name"),
@@ -5583,59 +5581,84 @@ var autocompleteTokenSchema = z.union([
5583
5581
  z.literal("fax"),
5584
5582
  z.literal("pager")
5585
5583
  ]);
5586
- var loadingIndicatorLayoutSchema = z.object({
5587
- type: z.literal("loading-indicator"),
5588
- size: sizeSchema.optional(),
5589
- control: z.string().optional(),
5590
- margin: sizeSchema.optional()
5591
- });
5592
- var alertLayoutSchema = z.object({
5593
- type: z.literal("alert"),
5594
- markdown: z.string(),
5595
- context: contextSchema.optional(),
5596
- control: z.string().optional(),
5597
- margin: sizeSchema.optional()
5598
- });
5599
- var paragraphLayoutSchema = z.object({
5600
- type: z.literal("paragraph"),
5601
- text: z.string(),
5602
- align: alignSchema.optional(),
5603
- control: z.string().optional(),
5604
- margin: sizeSchema.optional()
5584
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5585
+ var stringSchemaFormatSchema = z.union([
5586
+ z.literal("date"),
5587
+ z.literal("email"),
5588
+ z.literal("numeric"),
5589
+ z.literal("password"),
5590
+ z.literal("phone-number"),
5591
+ z.literal("base64url")
5592
+ ]);
5593
+ var externalSchema = z.object({
5594
+ url: z.string()
5605
5595
  });
5606
- var dividerLayoutSchema = z.object({
5607
- type: z.literal("divider"),
5608
- control: z.string().optional(),
5609
- margin: sizeSchema.optional()
5596
+ var stepErrorSchema = z.object({
5597
+ error: z.string().optional(),
5598
+ validation: jsonElementSchema.optional()
5610
5599
  });
5600
+ var httpMethodSchema = z.union([
5601
+ z.literal("GET"),
5602
+ z.literal("POST"),
5603
+ z.literal("PUT"),
5604
+ z.literal("PATCH"),
5605
+ z.literal("DELETE")
5606
+ ]);
5607
+ var actionTypeSchema = z.union([
5608
+ z.literal("primary"),
5609
+ z.literal("secondary"),
5610
+ z.literal("link"),
5611
+ z.literal("positive"),
5612
+ z.literal("negative")
5613
+ ]);
5614
+ var navigationStackBehaviorSchema = z.union([
5615
+ z.literal("default"),
5616
+ z.literal("remove-previous"),
5617
+ z.literal("remove-all"),
5618
+ z.literal("replace-current")
5619
+ ]);
5620
+ var sizeSchema = z.union([
5621
+ z.literal("xs"),
5622
+ z.literal("sm"),
5623
+ z.literal("md"),
5624
+ z.literal("lg"),
5625
+ z.literal("xl")
5626
+ ]);
5611
5627
  var listLayoutStatusSchema = z.union([
5612
5628
  z.literal("warning"),
5613
5629
  z.literal("neutral"),
5614
5630
  z.literal("positive")
5615
5631
  ]);
5632
+ var contextSchema = z.union([
5633
+ z.literal("positive"),
5634
+ z.literal("neutral"),
5635
+ z.literal("warning"),
5636
+ z.literal("negative"),
5637
+ z.literal("success"),
5638
+ z.literal("failure"),
5639
+ z.literal("info"),
5640
+ z.literal("primary")
5641
+ ]);
5642
+ var modalLayoutTriggerSchema = z.object({
5643
+ title: z.string()
5644
+ });
5616
5645
  var formLayoutSchemaReferenceSchema = z.object({
5617
5646
  $ref: z.string()
5618
5647
  });
5619
- var imageLayoutSchema = z.object({
5620
- type: z.literal("image"),
5621
- text: z.string().optional(),
5622
- url: z.string(),
5623
- size: sizeSchema.optional(),
5624
- accessibilityDescription: z.string().optional(),
5648
+ var dividerLayoutSchema = z.object({
5649
+ type: z.literal("divider"),
5625
5650
  control: z.string().optional(),
5626
5651
  margin: sizeSchema.optional()
5627
5652
  });
5628
- var statusListLayoutStatusSchema = z.union([
5629
- z.literal("not-done"),
5630
- z.literal("pending"),
5631
- z.literal("done")
5632
- ]);
5633
5653
  var instructionsLayoutItemSchema = z.object({
5634
5654
  text: z.string(),
5635
5655
  context: contextSchema
5636
5656
  });
5637
- var modalLayoutTriggerSchema = z.object({
5638
- title: z.string()
5657
+ var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5658
+ var reviewLayoutFieldSchema = z.object({
5659
+ label: z.string(),
5660
+ value: z.string(),
5661
+ help: helpSchema.optional()
5639
5662
  });
5640
5663
  var searchLayoutSchema = z.object({
5641
5664
  type: z.literal("search"),
@@ -5647,17 +5670,21 @@ var searchLayoutSchema = z.object({
5647
5670
  control: z.string().optional(),
5648
5671
  margin: sizeSchema.optional()
5649
5672
  });
5650
- var infoLayoutSchema = z.object({
5651
- type: z.literal("info"),
5652
- markdown: z.string(),
5673
+ var paragraphLayoutSchema = z.object({
5674
+ type: z.literal("paragraph"),
5675
+ text: z.string(),
5653
5676
  align: alignSchema.optional(),
5654
5677
  control: z.string().optional(),
5655
5678
  margin: sizeSchema.optional()
5656
5679
  });
5657
- var formLayoutSchema = z.object({
5658
- type: z.literal("form"),
5659
- schema: formLayoutSchemaReferenceSchema.optional(),
5660
- schemaId: z.string(),
5680
+ var columnsLayoutBiasSchema = z.union([
5681
+ z.literal("none"),
5682
+ z.literal("left"),
5683
+ z.literal("right")
5684
+ ]);
5685
+ var loadingIndicatorLayoutSchema = z.object({
5686
+ type: z.literal("loading-indicator"),
5687
+ size: sizeSchema.optional(),
5661
5688
  control: z.string().optional(),
5662
5689
  margin: sizeSchema.optional()
5663
5690
  });
@@ -5669,6 +5696,11 @@ var headingLayoutSchema = z.object({
5669
5696
  control: z.string().optional(),
5670
5697
  margin: sizeSchema.optional()
5671
5698
  });
5699
+ var statusListLayoutStatusSchema = z.union([
5700
+ z.literal("not-done"),
5701
+ z.literal("pending"),
5702
+ z.literal("done")
5703
+ ]);
5672
5704
  var markdownLayoutSchema = z.object({
5673
5705
  type: z.literal("markdown"),
5674
5706
  content: z.string(),
@@ -5676,13 +5708,11 @@ var markdownLayoutSchema = z.object({
5676
5708
  control: z.string().optional(),
5677
5709
  margin: sizeSchema.optional()
5678
5710
  });
5679
- var columnsLayoutBiasSchema = z.union([
5680
- z.literal("none"),
5681
- z.literal("left"),
5682
- z.literal("right")
5683
- ]);
5684
- var helpSchema = z.object({
5685
- markdown: z.string()
5711
+ var iconTextSchema = z.object({
5712
+ text: z.string()
5713
+ });
5714
+ var iconNamedSchema = z.object({
5715
+ name: z.string()
5686
5716
  });
5687
5717
  var searchSearchRequestSchema = z.object({
5688
5718
  url: z.string(),
@@ -5690,69 +5720,67 @@ var searchSearchRequestSchema = z.object({
5690
5720
  param: z.string(),
5691
5721
  query: z.string()
5692
5722
  });
5693
- var jsonElementSchema = z.lazy(
5694
- () => z.union([
5695
- z.string(),
5696
- z.number(),
5697
- z.boolean(),
5698
- z.record(jsonElementSchema),
5699
- z.array(jsonElementSchema)
5700
- ]).nullable()
5701
- );
5702
- var externalSchema = z.object({
5703
- url: z.string()
5704
- });
5705
- var stepErrorSchema = z.object({
5723
+ var errorResponseBodySchema = z.object({
5724
+ refreshFormUrl: z.string().optional(),
5725
+ analytics: z.record(z.string()).optional(),
5706
5726
  error: z.string().optional(),
5707
- validation: jsonElementSchema.optional()
5708
- });
5709
- var stringSchemaFormatSchema = z.union([
5710
- z.literal("date"),
5711
- z.literal("email"),
5712
- z.literal("numeric"),
5713
- z.literal("password"),
5714
- z.literal("phone-number"),
5715
- z.literal("base64url")
5716
- ]);
5717
- var summarySummariserSchema = z.object({
5718
- defaultTitle: z.string().optional(),
5719
- defaultDescription: z.string().optional(),
5720
- defaultIcon: iconSchema.optional(),
5721
- defaultImage: imageLayoutSchema.optional(),
5722
- providesTitle: z.boolean().optional(),
5723
- providesDescription: z.boolean().optional(),
5724
- providesIcon: z.boolean().optional(),
5725
- providesImage: z.boolean().optional()
5727
+ validation: jsonElementSchema.optional(),
5728
+ refreshUrl: z.string().optional()
5726
5729
  });
5730
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5727
5731
  var validateAsyncSchema = z.object({
5728
5732
  param: z.string(),
5729
5733
  method: httpMethodSchema,
5730
5734
  url: z.string()
5731
5735
  });
5732
- var summaryProviderSchema = z.object({
5733
- providesTitle: z.boolean().optional(),
5734
- providesDescription: z.boolean().optional(),
5735
- providesIcon: z.boolean().optional(),
5736
- providesImage: z.boolean().optional()
5736
+ var alertLayoutSchema = z.object({
5737
+ type: z.literal("alert"),
5738
+ markdown: z.string(),
5739
+ context: contextSchema.optional(),
5740
+ control: z.string().optional(),
5741
+ margin: sizeSchema.optional()
5737
5742
  });
5738
- var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5739
- var navigationStackBehaviorSchema = z.union([
5740
- z.literal("default"),
5741
- z.literal("remove-previous"),
5742
- z.literal("remove-all"),
5743
- z.literal("replace-current")
5744
- ]);
5745
- var actionTypeSchema = z.union([
5746
- z.literal("primary"),
5747
- z.literal("secondary"),
5748
- z.literal("link"),
5749
- z.literal("positive"),
5750
- z.literal("negative")
5751
- ]);
5752
- var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5753
- var actionSchema = z.object({
5754
- title: z.string().optional(),
5755
- type: actionTypeSchema.optional(),
5743
+ var blobSchemaSchema = z.object({
5744
+ type: z.literal("blob"),
5745
+ promoted: z.boolean().optional(),
5746
+ $id: z.string().optional(),
5747
+ title: z.string().optional(),
5748
+ description: z.string().optional(),
5749
+ control: z.string().optional(),
5750
+ hidden: z.boolean().optional(),
5751
+ icon: iconSchema.optional(),
5752
+ image: imageSchema.optional(),
5753
+ keywords: z.array(z.string()).optional(),
5754
+ summary: summaryProviderSchema.optional(),
5755
+ analyticsId: z.string().optional(),
5756
+ validationAsync: validateAsyncSchema.optional(),
5757
+ validationMessages: z.record(z.string()).optional(),
5758
+ alert: alertLayoutSchema.optional(),
5759
+ cameraConfig: jsonElementSchema.optional(),
5760
+ accepts: z.array(z.string()).optional(),
5761
+ maxSize: z.number().optional(),
5762
+ source: uploadSourceSchema.optional(),
5763
+ disabled: z.boolean().optional()
5764
+ });
5765
+ var constSchemaSchema = z.object({
5766
+ hidden: z.boolean().optional(),
5767
+ alert: alertLayoutSchema.optional(),
5768
+ control: z.string().optional(),
5769
+ promoted: z.boolean().optional(),
5770
+ $id: z.string().optional(),
5771
+ const: jsonElementSchema,
5772
+ title: z.string().optional(),
5773
+ description: z.string().optional(),
5774
+ icon: iconSchema.optional(),
5775
+ image: imageSchema.optional(),
5776
+ keywords: z.array(z.string()).optional(),
5777
+ summary: summaryProviderSchema.optional(),
5778
+ analyticsId: z.string().optional(),
5779
+ disabled: z.boolean().optional()
5780
+ });
5781
+ var actionSchema = z.object({
5782
+ title: z.string().optional(),
5783
+ type: actionTypeSchema.optional(),
5756
5784
  disabled: z.boolean().optional(),
5757
5785
  $id: z.string().optional(),
5758
5786
  $ref: z.string().optional(),
@@ -5765,11 +5793,25 @@ var actionSchema = z.object({
5765
5793
  timeout: z.number().optional(),
5766
5794
  skipValidation: z.boolean().optional()
5767
5795
  });
5768
- var listLayoutItemSchema = z.object({
5769
- title: z.string(),
5770
- description: z.string().optional(),
5771
- icon: iconSchema,
5772
- status: listLayoutStatusSchema.optional()
5796
+ var linkHandlerSchema = z.object({
5797
+ regexPattern: z.string(),
5798
+ action: actionSchema
5799
+ });
5800
+ var navigationBackBehaviourSchema = z.object({
5801
+ title: z.string().optional(),
5802
+ action: actionSchema
5803
+ });
5804
+ var pollingOnErrorSchema = z.object({
5805
+ action: actionSchema
5806
+ });
5807
+ var imageLayoutSchema = z.object({
5808
+ type: z.literal("image"),
5809
+ text: z.string().optional(),
5810
+ url: z.string(),
5811
+ size: sizeSchema.optional(),
5812
+ accessibilityDescription: z.string().optional(),
5813
+ control: z.string().optional(),
5814
+ margin: sizeSchema.optional()
5773
5815
  });
5774
5816
  var decisionLayoutOptionSchema = z.object({
5775
5817
  action: actionSchema,
@@ -5779,12 +5821,25 @@ var decisionLayoutOptionSchema = z.object({
5779
5821
  icon: iconSchema.optional(),
5780
5822
  image: imageLayoutSchema.optional()
5781
5823
  });
5824
+ var listLayoutItemSchema = z.object({
5825
+ title: z.string(),
5826
+ description: z.string().optional(),
5827
+ icon: iconSchema,
5828
+ status: listLayoutStatusSchema.optional()
5829
+ });
5782
5830
  var statusListLayoutItemSchema = z.object({
5783
5831
  title: z.string(),
5784
5832
  description: z.string().optional(),
5785
5833
  icon: iconSchema,
5786
5834
  status: statusListLayoutStatusSchema.optional()
5787
5835
  });
5836
+ var formLayoutSchema = z.object({
5837
+ type: z.literal("form"),
5838
+ schema: formLayoutSchemaReferenceSchema.optional(),
5839
+ schemaId: z.string(),
5840
+ control: z.string().optional(),
5841
+ margin: sizeSchema.optional()
5842
+ });
5788
5843
  var instructionsLayoutSchema = z.object({
5789
5844
  type: z.literal("instructions"),
5790
5845
  title: z.string().optional(),
@@ -5792,6 +5847,13 @@ var instructionsLayoutSchema = z.object({
5792
5847
  control: z.string().optional(),
5793
5848
  margin: sizeSchema.optional()
5794
5849
  });
5850
+ var infoLayoutSchema = z.object({
5851
+ type: z.literal("info"),
5852
+ markdown: z.string(),
5853
+ align: alignSchema.optional(),
5854
+ control: z.string().optional(),
5855
+ margin: sizeSchema.optional()
5856
+ });
5795
5857
  var buttonLayoutSchema = z.object({
5796
5858
  type: z.literal("button"),
5797
5859
  size: sizeSchema.optional(),
@@ -5803,89 +5865,66 @@ var buttonLayoutSchema = z.object({
5803
5865
  control: z.string().optional(),
5804
5866
  margin: sizeSchema.optional()
5805
5867
  });
5806
- var reviewLayoutFieldSchema = z.object({
5807
- label: z.string(),
5808
- value: z.string(),
5809
- help: helpSchema.optional()
5868
+ var reviewLayoutCallToActionSchema = z.object({
5869
+ title: z.string(),
5870
+ action: actionSchema
5810
5871
  });
5811
- var searchResultSearchSchema = z.object({
5812
- type: z.literal("search"),
5872
+ var reviewLayoutSchema = z.object({
5873
+ type: z.literal("review"),
5874
+ orientation: z.string().optional(),
5875
+ action: actionSchema.optional(),
5876
+ fields: z.array(reviewLayoutFieldSchema),
5877
+ title: z.string().optional(),
5878
+ callToAction: reviewLayoutCallToActionSchema.optional(),
5879
+ control: z.string().optional(),
5880
+ margin: sizeSchema.optional()
5881
+ });
5882
+ var searchResultActionSchema = z.object({
5883
+ type: z.literal("action"),
5813
5884
  title: z.string(),
5814
5885
  description: z.string().optional(),
5815
5886
  icon: iconSchema.optional(),
5816
5887
  image: imageLayoutSchema.optional(),
5817
- value: searchSearchRequestSchema
5888
+ value: actionSchema
5818
5889
  });
5819
- var searchResultActionSchema = z.object({
5820
- type: z.literal("action"),
5890
+ var searchResultSearchSchema = z.object({
5891
+ type: z.literal("search"),
5821
5892
  title: z.string(),
5822
5893
  description: z.string().optional(),
5823
5894
  icon: iconSchema.optional(),
5824
5895
  image: imageLayoutSchema.optional(),
5825
- value: actionSchema
5896
+ value: searchSearchRequestSchema
5826
5897
  });
5827
5898
  var actionResponseBodySchema = z.object({
5828
5899
  action: actionSchema
5829
5900
  });
5830
- var errorResponseBodySchema = z.object({
5831
- refreshFormUrl: z.string().optional(),
5832
- analytics: z.record(z.string()).optional(),
5833
- error: z.string().optional(),
5834
- validation: jsonElementSchema.optional(),
5835
- refreshUrl: z.string().optional()
5901
+ var summarySummariserSchema = z.object({
5902
+ defaultTitle: z.string().optional(),
5903
+ defaultDescription: z.string().optional(),
5904
+ defaultIcon: iconSchema.optional(),
5905
+ defaultImage: imageLayoutSchema.optional(),
5906
+ providesTitle: z.boolean().optional(),
5907
+ providesDescription: z.boolean().optional(),
5908
+ providesIcon: z.boolean().optional(),
5909
+ providesImage: z.boolean().optional()
5836
5910
  });
5837
- var linkHandlerSchema = z.object({
5838
- regexPattern: z.string(),
5839
- action: actionSchema
5911
+ var pollingSchema = z.object({
5912
+ url: z.string(),
5913
+ interval: z.number(),
5914
+ maxAttempts: z.number(),
5915
+ onError: pollingOnErrorSchema
5840
5916
  });
5841
- var blobSchemaSchema = z.object({
5842
- type: z.literal("blob"),
5843
- promoted: z.boolean().optional(),
5844
- $id: z.string().optional(),
5845
- title: z.string().optional(),
5846
- description: z.string().optional(),
5847
- control: z.string().optional(),
5848
- hidden: z.boolean().optional(),
5849
- icon: iconSchema.optional(),
5850
- image: imageSchema.optional(),
5851
- keywords: z.array(z.string()).optional(),
5852
- summary: summaryProviderSchema.optional(),
5853
- analyticsId: z.string().optional(),
5854
- validationAsync: validateAsyncSchema.optional(),
5855
- validationMessages: z.record(z.string()).optional(),
5856
- alert: alertLayoutSchema.optional(),
5857
- cameraConfig: jsonElementSchema.optional(),
5858
- accepts: z.array(z.string()).optional(),
5859
- maxSize: z.number().optional(),
5860
- source: uploadSourceSchema.optional(),
5861
- disabled: z.boolean().optional()
5917
+ var navigationSchema = z.object({
5918
+ backButton: navigationBackBehaviourSchema.optional(),
5919
+ back: navigationBackBehaviourSchema.optional(),
5920
+ stackBehavior: navigationStackBehaviorSchema.optional()
5862
5921
  });
5863
- var constSchemaSchema = z.object({
5864
- hidden: z.boolean().optional(),
5865
- alert: alertLayoutSchema.optional(),
5922
+ var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5923
+ var decisionLayoutSchema = z.object({
5924
+ type: z.literal("decision"),
5925
+ options: z.array(decisionLayoutOptionSchema),
5866
5926
  control: z.string().optional(),
5867
- promoted: z.boolean().optional(),
5868
- $id: z.string().optional(),
5869
- const: jsonElementSchema,
5870
- title: z.string().optional(),
5871
- description: z.string().optional(),
5872
- icon: iconSchema.optional(),
5873
- image: imageSchema.optional(),
5874
- keywords: z.array(z.string()).optional(),
5875
- summary: summaryProviderSchema.optional(),
5876
- analyticsId: z.string().optional(),
5877
- disabled: z.boolean().optional()
5878
- });
5879
- var pollingOnErrorSchema = z.object({
5880
- action: actionSchema
5881
- });
5882
- var navigationBackBehaviourSchema = z.object({
5883
- title: z.string().optional(),
5884
- action: actionSchema
5885
- });
5886
- var reviewLayoutCallToActionSchema = z.object({
5887
- title: z.string(),
5888
- action: actionSchema
5927
+ margin: sizeSchema.optional()
5889
5928
  });
5890
5929
  var listLayoutSchema = z.object({
5891
5930
  type: z.literal("list"),
@@ -5894,12 +5933,6 @@ var listLayoutSchema = z.object({
5894
5933
  control: z.string().optional(),
5895
5934
  margin: sizeSchema.optional()
5896
5935
  });
5897
- var decisionLayoutSchema = z.object({
5898
- type: z.literal("decision"),
5899
- options: z.array(decisionLayoutOptionSchema),
5900
- control: z.string().optional(),
5901
- margin: sizeSchema.optional()
5902
- });
5903
5936
  var statusListLayoutSchema = z.object({
5904
5937
  type: z.literal("status-list"),
5905
5938
  items: z.array(statusListLayoutItemSchema),
@@ -5907,107 +5940,28 @@ var statusListLayoutSchema = z.object({
5907
5940
  control: z.string().optional(),
5908
5941
  margin: sizeSchema.optional()
5909
5942
  });
5910
- var reviewLayoutSchema = z.object({
5911
- type: z.literal("review"),
5912
- orientation: z.string().optional(),
5913
- action: actionSchema.optional(),
5914
- fields: z.array(reviewLayoutFieldSchema),
5915
- title: z.string().optional(),
5916
- callToAction: reviewLayoutCallToActionSchema.optional(),
5917
- control: z.string().optional(),
5918
- margin: sizeSchema.optional()
5919
- });
5920
5943
  var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
5921
- var pollingSchema = z.object({
5922
- url: z.string(),
5923
- interval: z.number(),
5924
- maxAttempts: z.number(),
5925
- onError: pollingOnErrorSchema
5926
- });
5927
- var navigationSchema = z.object({
5928
- backButton: navigationBackBehaviourSchema.optional(),
5929
- back: navigationBackBehaviourSchema.optional(),
5930
- stackBehavior: navigationStackBehaviorSchema.optional()
5931
- });
5932
5944
  var searchResponseBodySchema = z.object({
5933
5945
  results: z.array(searchResultSchema)
5934
5946
  });
5935
- var layoutSchema = z.lazy(
5936
- () => z.union([
5937
- alertLayoutSchema,
5938
- boxLayoutSchema,
5939
- buttonLayoutSchema,
5940
- columnsLayoutSchema,
5941
- decisionLayoutSchema,
5942
- dividerLayoutSchema,
5943
- formLayoutSchema,
5944
- headingLayoutSchema,
5945
- imageLayoutSchema,
5946
- infoLayoutSchema,
5947
- instructionsLayoutSchema,
5948
- listLayoutSchema,
5949
- loadingIndicatorLayoutSchema,
5950
- markdownLayoutSchema,
5951
- modalLayoutSchema,
5952
- paragraphLayoutSchema,
5953
- reviewLayoutSchema,
5954
- searchLayoutSchema,
5955
- statusListLayoutSchema
5956
- ])
5957
- );
5958
- var boxLayoutSchema = z.lazy(
5959
- () => z.object({
5960
- type: z.literal("box"),
5961
- components: z.array(layoutSchema),
5962
- width: sizeSchema.optional(),
5963
- border: z.boolean().optional(),
5964
- control: z.string().optional(),
5965
- margin: sizeSchema.optional()
5966
- })
5967
- );
5968
- var columnsLayoutSchema = z.lazy(
5969
- () => z.object({
5970
- type: z.literal("columns"),
5971
- left: z.array(layoutSchema),
5972
- right: z.array(layoutSchema),
5973
- bias: columnsLayoutBiasSchema.optional(),
5974
- control: z.string().optional(),
5975
- margin: sizeSchema.optional()
5976
- })
5977
- );
5978
- var modalLayoutSchema = z.lazy(
5979
- () => z.object({
5980
- type: z.literal("modal"),
5981
- control: z.string().optional(),
5982
- margin: sizeSchema.optional(),
5983
- trigger: modalLayoutTriggerSchema,
5984
- content: modalLayoutContentSchema
5985
- })
5986
- );
5987
- var modalLayoutContentSchema = z.lazy(
5988
- () => z.object({
5989
- components: z.array(layoutSchema)
5990
- })
5991
- );
5992
- var stepSchema = z.lazy(
5947
+ var arraySchemaTupleSchema = z.lazy(
5993
5948
  () => z.object({
5994
- key: z.string().optional(),
5995
- type: z.string().optional(),
5949
+ type: z.literal("array"),
5950
+ promoted: z.boolean().optional(),
5951
+ $id: z.string().optional(),
5952
+ items: z.array(schemaSchema),
5953
+ title: z.string().optional(),
5996
5954
  description: z.string().optional(),
5997
- actions: z.array(actionSchema).optional(),
5998
- refreshFormUrl: z.string().optional(),
5999
- id: z.string(),
6000
- title: z.string(),
6001
- schemas: z.array(schemaSchema),
6002
- layout: z.array(layoutSchema),
6003
- model: jsonElementSchema.optional(),
6004
- external: externalSchema.optional(),
6005
- polling: pollingSchema.optional(),
6006
- linkHandlers: z.array(linkHandlerSchema).optional(),
6007
- analytics: z.record(z.string()).optional(),
6008
- errors: stepErrorSchema.optional(),
6009
- navigation: navigationSchema.optional(),
6010
- refreshUrl: z.string().optional()
5955
+ control: z.string().optional(),
5956
+ hidden: z.boolean().optional(),
5957
+ icon: iconSchema.optional(),
5958
+ image: imageSchema.optional(),
5959
+ keywords: z.array(z.string()).optional(),
5960
+ summary: summaryProviderSchema.optional(),
5961
+ analyticsId: z.string().optional(),
5962
+ persistAsync: persistAsyncSchema.optional(),
5963
+ validationAsync: validateAsyncSchema.optional(),
5964
+ alert: alertLayoutSchema.optional()
6011
5965
  })
6012
5966
  );
6013
5967
  var schemaSchema = z.lazy(
@@ -6024,6 +5978,94 @@ var schemaSchema = z.lazy(
6024
5978
  stringSchemaSchema
6025
5979
  ])
6026
5980
  );
5981
+ var persistAsyncSchema = z.lazy(
5982
+ () => z.object({
5983
+ param: z.string(),
5984
+ idProperty: z.string(),
5985
+ schema: schemaSchema,
5986
+ url: z.string(),
5987
+ method: httpMethodSchema
5988
+ })
5989
+ );
5990
+ var oneOfSchemaSchema = z.lazy(
5991
+ () => z.object({
5992
+ autofillProvider: z.string().optional(),
5993
+ promoted: z.boolean().optional(),
5994
+ refreshFormOnChange: z.boolean().optional(),
5995
+ refreshUrl: z.string().optional(),
5996
+ refreshFormUrl: z.string().optional(),
5997
+ promotion: jsonElementSchema.optional(),
5998
+ oneOf: z.array(schemaSchema),
5999
+ placeholder: z.string().optional(),
6000
+ $id: z.string().optional(),
6001
+ title: z.string().optional(),
6002
+ description: z.string().optional(),
6003
+ control: z.string().optional(),
6004
+ default: jsonElementSchema.optional(),
6005
+ hidden: z.boolean().optional(),
6006
+ icon: iconSchema.optional(),
6007
+ image: imageSchema.optional(),
6008
+ keywords: z.array(z.string()).optional(),
6009
+ summary: summaryProviderSchema.optional(),
6010
+ analyticsId: z.string().optional(),
6011
+ refreshStepOnChange: z.boolean().optional(),
6012
+ alert: alertLayoutSchema.optional(),
6013
+ help: helpSchema.optional(),
6014
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6015
+ autofillKey: z.string().optional(),
6016
+ validationMessages: z.record(z.string()).optional(),
6017
+ disabled: z.boolean().optional()
6018
+ })
6019
+ );
6020
+ var objectSchemaSchema = z.lazy(
6021
+ () => z.object({
6022
+ type: z.literal("object"),
6023
+ disabled: z.boolean().optional(),
6024
+ promoted: z.boolean().optional(),
6025
+ help: helpSchema.optional(),
6026
+ properties: z.record(schemaSchema),
6027
+ displayOrder: z.array(z.string()),
6028
+ required: z.array(z.string()).optional(),
6029
+ $id: z.string().optional(),
6030
+ title: z.string().optional(),
6031
+ description: z.string().optional(),
6032
+ control: z.string().optional(),
6033
+ hidden: z.boolean().optional(),
6034
+ icon: iconSchema.optional(),
6035
+ image: imageSchema.optional(),
6036
+ keywords: z.array(z.string()).optional(),
6037
+ summary: summaryProviderSchema.optional(),
6038
+ analyticsId: z.string().optional(),
6039
+ alert: alertLayoutSchema.optional()
6040
+ })
6041
+ );
6042
+ var arraySchemaListSchema = z.lazy(
6043
+ () => z.object({
6044
+ type: z.literal("array"),
6045
+ promoted: z.boolean().optional(),
6046
+ $id: z.string().optional(),
6047
+ items: schemaSchema,
6048
+ addItemTitle: z.string(),
6049
+ editItemTitle: z.string(),
6050
+ minItems: z.number().optional(),
6051
+ maxItems: z.number().optional(),
6052
+ placeholder: z.string().optional(),
6053
+ title: z.string().optional(),
6054
+ description: z.string().optional(),
6055
+ control: z.string().optional(),
6056
+ hidden: z.boolean().optional(),
6057
+ icon: iconSchema.optional(),
6058
+ image: imageSchema.optional(),
6059
+ keywords: z.array(z.string()).optional(),
6060
+ summary: summarySummariserSchema.optional(),
6061
+ analyticsId: z.string().optional(),
6062
+ persistAsync: persistAsyncSchema.optional(),
6063
+ validationAsync: validateAsyncSchema.optional(),
6064
+ alert: alertLayoutSchema.optional(),
6065
+ validationMessages: z.record(z.string()).optional(),
6066
+ disabled: z.boolean().optional()
6067
+ })
6068
+ );
6027
6069
  var allOfSchemaSchema = z.lazy(
6028
6070
  () => z.object({
6029
6071
  disabled: z.boolean().optional(),
@@ -6139,58 +6181,6 @@ var numberSchemaSchema = z.lazy(
6139
6181
  help: helpSchema.optional()
6140
6182
  })
6141
6183
  );
6142
- var objectSchemaSchema = z.lazy(
6143
- () => z.object({
6144
- type: z.literal("object"),
6145
- disabled: z.boolean().optional(),
6146
- promoted: z.boolean().optional(),
6147
- help: helpSchema.optional(),
6148
- properties: z.record(schemaSchema),
6149
- displayOrder: z.array(z.string()),
6150
- required: z.array(z.string()).optional(),
6151
- $id: z.string().optional(),
6152
- title: z.string().optional(),
6153
- description: z.string().optional(),
6154
- control: z.string().optional(),
6155
- hidden: z.boolean().optional(),
6156
- icon: iconSchema.optional(),
6157
- image: imageSchema.optional(),
6158
- keywords: z.array(z.string()).optional(),
6159
- summary: summaryProviderSchema.optional(),
6160
- analyticsId: z.string().optional(),
6161
- alert: alertLayoutSchema.optional()
6162
- })
6163
- );
6164
- var oneOfSchemaSchema = z.lazy(
6165
- () => z.object({
6166
- autofillProvider: z.string().optional(),
6167
- promoted: z.boolean().optional(),
6168
- refreshFormOnChange: z.boolean().optional(),
6169
- refreshUrl: z.string().optional(),
6170
- refreshFormUrl: z.string().optional(),
6171
- promotion: jsonElementSchema.optional(),
6172
- oneOf: z.array(schemaSchema),
6173
- placeholder: z.string().optional(),
6174
- $id: z.string().optional(),
6175
- title: z.string().optional(),
6176
- description: z.string().optional(),
6177
- control: z.string().optional(),
6178
- default: jsonElementSchema.optional(),
6179
- hidden: z.boolean().optional(),
6180
- icon: iconSchema.optional(),
6181
- image: imageSchema.optional(),
6182
- keywords: z.array(z.string()).optional(),
6183
- summary: summaryProviderSchema.optional(),
6184
- analyticsId: z.string().optional(),
6185
- refreshStepOnChange: z.boolean().optional(),
6186
- alert: alertLayoutSchema.optional(),
6187
- help: helpSchema.optional(),
6188
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6189
- autofillKey: z.string().optional(),
6190
- validationMessages: z.record(z.string()).optional(),
6191
- disabled: z.boolean().optional()
6192
- })
6193
- );
6194
6184
  var stringSchemaSchema = z.lazy(
6195
6185
  () => z.object({
6196
6186
  type: z.literal("string"),
@@ -6233,60 +6223,82 @@ var stringSchemaSchema = z.lazy(
6233
6223
  help: helpSchema.optional()
6234
6224
  })
6235
6225
  );
6236
- var arraySchemaListSchema = z.lazy(
6226
+ var stepSchema = z.lazy(
6227
+ () => z.object({
6228
+ key: z.string().optional(),
6229
+ type: z.string().optional(),
6230
+ actions: z.array(actionSchema).optional(),
6231
+ refreshFormUrl: z.string().optional(),
6232
+ id: z.string(),
6233
+ title: z.string(),
6234
+ description: z.string().optional(),
6235
+ schemas: z.array(schemaSchema),
6236
+ layout: z.array(layoutSchema),
6237
+ model: jsonElementSchema.optional(),
6238
+ external: externalSchema.optional(),
6239
+ polling: pollingSchema.optional(),
6240
+ linkHandlers: z.array(linkHandlerSchema).optional(),
6241
+ analytics: z.record(z.string()).optional(),
6242
+ errors: stepErrorSchema.optional(),
6243
+ navigation: navigationSchema.optional(),
6244
+ refreshUrl: z.string().optional()
6245
+ })
6246
+ );
6247
+ var layoutSchema = z.lazy(
6248
+ () => z.union([
6249
+ alertLayoutSchema,
6250
+ boxLayoutSchema,
6251
+ buttonLayoutSchema,
6252
+ columnsLayoutSchema,
6253
+ decisionLayoutSchema,
6254
+ dividerLayoutSchema,
6255
+ formLayoutSchema,
6256
+ headingLayoutSchema,
6257
+ imageLayoutSchema,
6258
+ infoLayoutSchema,
6259
+ instructionsLayoutSchema,
6260
+ listLayoutSchema,
6261
+ loadingIndicatorLayoutSchema,
6262
+ markdownLayoutSchema,
6263
+ modalLayoutSchema,
6264
+ paragraphLayoutSchema,
6265
+ reviewLayoutSchema,
6266
+ searchLayoutSchema,
6267
+ statusListLayoutSchema
6268
+ ])
6269
+ );
6270
+ var boxLayoutSchema = z.lazy(
6271
+ () => z.object({
6272
+ type: z.literal("box"),
6273
+ components: z.array(layoutSchema),
6274
+ width: sizeSchema.optional(),
6275
+ border: z.boolean().optional(),
6276
+ control: z.string().optional(),
6277
+ margin: sizeSchema.optional()
6278
+ })
6279
+ );
6280
+ var modalLayoutSchema = z.lazy(
6237
6281
  () => z.object({
6238
- type: z.literal("array"),
6239
- promoted: z.boolean().optional(),
6240
- $id: z.string().optional(),
6241
- items: schemaSchema,
6242
- addItemTitle: z.string(),
6243
- editItemTitle: z.string(),
6244
- minItems: z.number().optional(),
6245
- maxItems: z.number().optional(),
6246
- placeholder: z.string().optional(),
6247
- title: z.string().optional(),
6248
- description: z.string().optional(),
6282
+ type: z.literal("modal"),
6249
6283
  control: z.string().optional(),
6250
- hidden: z.boolean().optional(),
6251
- icon: iconSchema.optional(),
6252
- image: imageSchema.optional(),
6253
- keywords: z.array(z.string()).optional(),
6254
- summary: summarySummariserSchema.optional(),
6255
- analyticsId: z.string().optional(),
6256
- persistAsync: persistAsyncSchema.optional(),
6257
- validationAsync: validateAsyncSchema.optional(),
6258
- alert: alertLayoutSchema.optional(),
6259
- validationMessages: z.record(z.string()).optional(),
6260
- disabled: z.boolean().optional()
6284
+ margin: sizeSchema.optional(),
6285
+ trigger: modalLayoutTriggerSchema,
6286
+ content: modalLayoutContentSchema
6261
6287
  })
6262
6288
  );
6263
- var persistAsyncSchema = z.lazy(
6289
+ var modalLayoutContentSchema = z.lazy(
6264
6290
  () => z.object({
6265
- param: z.string(),
6266
- idProperty: z.string(),
6267
- schema: schemaSchema,
6268
- url: z.string(),
6269
- method: httpMethodSchema
6291
+ components: z.array(layoutSchema)
6270
6292
  })
6271
6293
  );
6272
- var arraySchemaTupleSchema = z.lazy(
6294
+ var columnsLayoutSchema = z.lazy(
6273
6295
  () => z.object({
6274
- type: z.literal("array"),
6275
- promoted: z.boolean().optional(),
6276
- $id: z.string().optional(),
6277
- items: z.array(schemaSchema),
6278
- title: z.string().optional(),
6279
- description: z.string().optional(),
6296
+ type: z.literal("columns"),
6297
+ left: z.array(layoutSchema),
6298
+ right: z.array(layoutSchema),
6299
+ bias: columnsLayoutBiasSchema.optional(),
6280
6300
  control: z.string().optional(),
6281
- hidden: z.boolean().optional(),
6282
- icon: iconSchema.optional(),
6283
- image: imageSchema.optional(),
6284
- keywords: z.array(z.string()).optional(),
6285
- summary: summaryProviderSchema.optional(),
6286
- analyticsId: z.string().optional(),
6287
- persistAsync: persistAsyncSchema.optional(),
6288
- validationAsync: validateAsyncSchema.optional(),
6289
- alert: alertLayoutSchema.optional()
6301
+ margin: sizeSchema.optional()
6290
6302
  })
6291
6303
  );
6292
6304
  var validateStep = (step) => validate(step, stepSchema);
@@ -6703,9 +6715,7 @@ var compareLocalValue = (valueA, valueB) => {
6703
6715
  return valueA.length === valueB.length && valueA.every((value, index) => compareLocalValue(value, valueB[index]));
6704
6716
  }
6705
6717
  if (isObjectLocalValue(valueA) && isObjectLocalValue(valueB)) {
6706
- const keysA = Object.keys(valueA);
6707
- const keysB = Object.keys(valueB);
6708
- return keysA.length === keysB.length && keysA.every((key) => compareLocalValue(valueA[key], valueB[key]));
6718
+ return Object.keys(valueA).every((key) => compareLocalValue(valueA[key], valueB[key]));
6709
6719
  }
6710
6720
  return valueA === valueB;
6711
6721
  };
@@ -7475,7 +7485,12 @@ var mergeChildrenValues = (displayOrder, getComponentValue) => displayOrder.redu
7475
7485
  var objectSchemaToComponent = (schemaMapperProps, mapperProps) => {
7476
7486
  const { uid, localValue, schema, model, validationErrors } = schemaMapperProps;
7477
7487
  const { $id, displayOrder, properties, required } = schema;
7478
- validateDisplayOrder($id, displayOrder, properties, mapperProps.logEvent);
7488
+ const propertyNames = Object.keys(properties);
7489
+ if (displayOrder.length !== propertyNames.length) {
7490
+ throw new Error(
7491
+ `Object schema ${$id} has ${propertyNames.length} properties but only ${displayOrder.length} are listed in displayOrder`
7492
+ );
7493
+ }
7479
7494
  const componentMap = displayOrder.reduce((acc, propName) => {
7480
7495
  var _a;
7481
7496
  const propSchema = properties[propName];
@@ -7501,28 +7516,6 @@ var objectSchemaToComponent = (schemaMapperProps, mapperProps) => {
7501
7516
  displayOrder
7502
7517
  }));
7503
7518
  };
7504
- var validateDisplayOrder = ($id, displayOrder, properties, logEvent) => {
7505
- if (!displayOrder) {
7506
- const message = `Object schema ${$id} has no displayOrder property.`;
7507
- logEvent("error", message);
7508
- throw new Error(message);
7509
- }
7510
- const propertyNames = Object.keys(properties);
7511
- displayOrder.forEach((propName) => {
7512
- if (!properties[propName]) {
7513
- const message = `Object schema ${$id} has no property named "${propName}", but it is listed in the displayOrder array.`;
7514
- logEvent("error", message);
7515
- throw new Error(message);
7516
- }
7517
- });
7518
- propertyNames.forEach((propName) => {
7519
- if (!displayOrder.includes(propName)) {
7520
- const message = `Object schema ${$id} has a "${propName}" property which is missing in the displayOrder array.`;
7521
- logEvent("error", message);
7522
- throw new Error(message);
7523
- }
7524
- });
7525
- };
7526
7519
 
7527
7520
  // src/revamp/domain/components/AllOfComponent.ts
7528
7521
  var createAllOfComponent = (allOfProps) => {
@@ -7772,20 +7765,17 @@ var isPartialLocalValueMatch = (partialValue, component) => {
7772
7765
  if (isObjectLocalValue(partialValue) && isObjectLocalValue(componentValue)) {
7773
7766
  return isPartialObjectMatch(partialValue, componentValue, component);
7774
7767
  }
7775
- return null;
7768
+ return true;
7776
7769
  };
7777
7770
  var isPartialObjectMatch = (partialValue, componentValue, component) => {
7778
- const results = getMatchingKeys(partialValue, componentValue).map((key) => {
7771
+ const resultByKey = getMatchingKeys(partialValue, componentValue).map((key) => {
7779
7772
  const componentForKey = getComponentForLocalValueKey(key, component);
7780
- return componentForKey && componentForKey.type === "const" ? isPartialLocalValueMatch(partialValue[key], componentForKey) : null;
7773
+ if (componentForKey && componentForKey.type === "const") {
7774
+ return isPartialLocalValueMatch(partialValue[key], componentForKey);
7775
+ }
7776
+ return null;
7781
7777
  });
7782
- if (results.includes(false)) {
7783
- return false;
7784
- }
7785
- if (results.includes(true)) {
7786
- return true;
7787
- }
7788
- return null;
7778
+ return resultByKey.includes(true) && !resultByKey.includes(false);
7789
7779
  };
7790
7780
  var getMatchingKeys = (a, b) => {
7791
7781
  const allKeys = Array.from(/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]));
@@ -7900,7 +7890,7 @@ var createSelectInputComponent = (selectProps, updateComponent) => {
7900
7890
  }
7901
7891
  });
7902
7892
  };
7903
- var isTrue = (value) => value === true;
7893
+ var isTrue = (value) => value;
7904
7894
 
7905
7895
  // src/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.ts
7906
7896
  var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
@@ -9782,7 +9772,9 @@ var mapStepToComponent = (_a) => {
9782
9772
  stepPolling,
9783
9773
  updateComponent,
9784
9774
  title: displayStepTitle ? title : void 0,
9785
- trackEvent
9775
+ trackEvent,
9776
+ step,
9777
+ onAction
9786
9778
  });
9787
9779
  return stepComponent;
9788
9780
  };
@@ -10423,7 +10415,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10423
10415
  return deterministicId || (id ? `radix-${id}` : "");
10424
10416
  }
10425
10417
 
10426
- // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.36.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10418
+ // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.35.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10427
10419
  var import_classnames = __toESM(require_classnames(), 1);
10428
10420
  import { InlineAlert, Sentiment as Sentiment2, Input, TextArea } from "@transferwise/components";
10429
10421
  import { createContext as createContext2, useContext as useContext2, forwardRef } from "react";
@@ -10717,16 +10709,7 @@ function VariableDateInput({
10717
10709
  control,
10718
10710
  inputProps
10719
10711
  }) {
10720
- const {
10721
- autoComplete,
10722
- minimumDate,
10723
- maximumDate,
10724
- placeholder,
10725
- disabled,
10726
- onBlur,
10727
- onChange,
10728
- onFocus
10729
- } = inputProps;
10712
+ const { minimumDate, maximumDate, placeholder, disabled, onBlur, onChange, onFocus } = inputProps;
10730
10713
  if (control === "date-lookup") {
10731
10714
  return /* @__PURE__ */ jsx16(
10732
10715
  DateLookup,
@@ -10744,20 +10727,8 @@ function VariableDateInput({
10744
10727
  }
10745
10728
  );
10746
10729
  }
10747
- return /* @__PURE__ */ jsx16(
10748
- DateInput,
10749
- __spreadProps(__spreadValues({}, inputProps), {
10750
- dayAutoComplete: getAutocompleteString2(autoComplete, "day"),
10751
- yearAutoComplete: getAutocompleteString2(autoComplete, "year")
10752
- })
10753
- );
10730
+ return /* @__PURE__ */ jsx16(DateInput, __spreadValues({}, inputProps));
10754
10731
  }
10755
- var getAutocompleteString2 = (value, suffix) => {
10756
- if (value === "bday") {
10757
- return `${value}-${suffix}`;
10758
- }
10759
- return void 0;
10760
- };
10761
10732
  var VariableDateInput_default = VariableDateInput;
10762
10733
 
10763
10734
  // src/revamp/wise/renderers/DateInputRenderer.tsx
@@ -11696,18 +11667,79 @@ function ItemSummaryOption({
11696
11667
  }
11697
11668
  var RepeatableRenderer_default = RepeatableRenderer;
11698
11669
 
11670
+ // src/revamp/wise/renderers/ReviewRenderer.tsx
11671
+ import { DefinitionList, Header as Header4 } from "@transferwise/components";
11672
+ import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
11673
+ var ReviewRenderer = {
11674
+ canRenderType: "review",
11675
+ render: ({ callToAction, control, fields, margin, title }) => {
11676
+ const orientation = mapControlToDefinitionListLayout(control);
11677
+ const action = callToAction ? {
11678
+ text: callToAction.title,
11679
+ onClick: (event) => {
11680
+ event.preventDefault();
11681
+ callToAction.onClick();
11682
+ }
11683
+ } : void 0;
11684
+ return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
11685
+ (title || callToAction) && /* @__PURE__ */ jsx41(Header4, { title: title != null ? title : "", action }),
11686
+ /* @__PURE__ */ jsx41("div", { className: margin, children: /* @__PURE__ */ jsx41(
11687
+ DefinitionList,
11688
+ {
11689
+ layout: orientation,
11690
+ definitions: fields.map(({ label, value, help }, index) => ({
11691
+ key: String(index),
11692
+ title: label,
11693
+ value: getFieldValue(value, help, orientation)
11694
+ }))
11695
+ }
11696
+ ) })
11697
+ ] });
11698
+ }
11699
+ };
11700
+ var ReviewRenderer_default = ReviewRenderer;
11701
+ var mapControlToDefinitionListLayout = (control) => {
11702
+ switch (control) {
11703
+ case "horizontal":
11704
+ case "horizontal-end-aligned":
11705
+ return "HORIZONTAL_RIGHT_ALIGNED";
11706
+ case "horizontal-start-aligned":
11707
+ return "HORIZONTAL_LEFT_ALIGNED";
11708
+ case "vertical-two-column":
11709
+ return "VERTICAL_TWO_COLUMN";
11710
+ case "vertical":
11711
+ case "vertical-one-column":
11712
+ default:
11713
+ return "VERTICAL_ONE_COLUMN";
11714
+ }
11715
+ };
11716
+ var getFieldValue = (value, help, orientation) => {
11717
+ if (help) {
11718
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs12(Fragment5, { children: [
11719
+ /* @__PURE__ */ jsx41(Help_default, { help }),
11720
+ " ",
11721
+ value
11722
+ ] }) : /* @__PURE__ */ jsxs12(Fragment5, { children: [
11723
+ value,
11724
+ " ",
11725
+ /* @__PURE__ */ jsx41(Help_default, { help })
11726
+ ] });
11727
+ }
11728
+ return value;
11729
+ };
11730
+
11699
11731
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11700
11732
  import { Input as Input5, Markdown as Markdown3, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
11701
11733
 
11702
11734
  // src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
11703
11735
  import { useIntl as useIntl7 } from "react-intl";
11704
- import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
11736
+ import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
11705
11737
  function ErrorResult({ state }) {
11706
11738
  const intl = useIntl7();
11707
- return /* @__PURE__ */ jsxs12("p", { className: "m-t-2", children: [
11739
+ return /* @__PURE__ */ jsxs13("p", { className: "m-t-2", children: [
11708
11740
  intl.formatMessage(generic_error_messages_default.genericError),
11709
11741
  "\xA0",
11710
- /* @__PURE__ */ jsx41(
11742
+ /* @__PURE__ */ jsx42(
11711
11743
  "a",
11712
11744
  {
11713
11745
  href: "/",
@@ -11723,7 +11755,7 @@ function ErrorResult({ state }) {
11723
11755
 
11724
11756
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11725
11757
  import { useState as useState8 } from "react";
11726
- import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
11758
+ import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs14 } from "react/jsx-runtime";
11727
11759
  function BlockSearchRendererComponent({
11728
11760
  id,
11729
11761
  isLoading,
@@ -11735,8 +11767,8 @@ function BlockSearchRendererComponent({
11735
11767
  }) {
11736
11768
  const [hasSearched, setHasSearched] = useState8(false);
11737
11769
  const trackEvent = useTrackEvent();
11738
- return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
11739
- /* @__PURE__ */ jsx42(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx42(
11770
+ return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
11771
+ /* @__PURE__ */ jsx43(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx43(
11740
11772
  Input5,
11741
11773
  {
11742
11774
  id,
@@ -11753,7 +11785,7 @@ function BlockSearchRendererComponent({
11753
11785
  }
11754
11786
  }
11755
11787
  ) }),
11756
- isLoading ? /* @__PURE__ */ jsx42(Fragment5, { children: "Loading..." }) : /* @__PURE__ */ jsx42(SearchResultContent, { state, onChange })
11788
+ isLoading ? /* @__PURE__ */ jsx43(Fragment6, { children: "Loading..." }) : /* @__PURE__ */ jsx43(SearchResultContent, { state, onChange })
11757
11789
  ] });
11758
11790
  }
11759
11791
  function SearchResultContent({
@@ -11762,29 +11794,29 @@ function SearchResultContent({
11762
11794
  }) {
11763
11795
  switch (state.type) {
11764
11796
  case "error":
11765
- return /* @__PURE__ */ jsx42(ErrorResult, { state });
11797
+ return /* @__PURE__ */ jsx43(ErrorResult, { state });
11766
11798
  case "results":
11767
- return /* @__PURE__ */ jsx42(SearchResults, { state, onChange });
11799
+ return /* @__PURE__ */ jsx43(SearchResults, { state, onChange });
11768
11800
  case "noResults":
11769
- return /* @__PURE__ */ jsx42(EmptySearchResult, { state });
11801
+ return /* @__PURE__ */ jsx43(EmptySearchResult, { state });
11770
11802
  case "pending":
11771
11803
  default:
11772
11804
  return null;
11773
11805
  }
11774
11806
  }
11775
11807
  function EmptySearchResult({ state }) {
11776
- return /* @__PURE__ */ jsx42(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11808
+ return /* @__PURE__ */ jsx43(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11777
11809
  }
11778
11810
  function SearchResults({
11779
11811
  state
11780
11812
  }) {
11781
11813
  const trackEvent = useTrackEvent();
11782
- return /* @__PURE__ */ jsx42(NavigationOptionsList2, { children: state.results.map((result) => /* @__PURE__ */ jsx42(
11814
+ return /* @__PURE__ */ jsx43(NavigationOptionsList2, { children: state.results.map((result) => /* @__PURE__ */ jsx43(
11783
11815
  NavigationOption3,
11784
11816
  {
11785
11817
  title: result.title,
11786
11818
  content: result.description,
11787
- media: /* @__PURE__ */ jsx42(NavigationOptionMedia, __spreadValues({}, result)),
11819
+ media: /* @__PURE__ */ jsx43(NavigationOptionMedia, __spreadValues({}, result)),
11788
11820
  showMediaCircle: false,
11789
11821
  showMediaAtAllSizes: true,
11790
11822
  onClick: () => {
@@ -11803,7 +11835,7 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
11803
11835
  import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
11804
11836
  import { Search } from "@transferwise/icons";
11805
11837
  import { useState as useState9 } from "react";
11806
- import { jsx as jsx43, jsxs as jsxs14 } from "react/jsx-runtime";
11838
+ import { jsx as jsx44, jsxs as jsxs15 } from "react/jsx-runtime";
11807
11839
  function InlineSearchRenderer({
11808
11840
  id,
11809
11841
  isLoading,
@@ -11814,19 +11846,19 @@ function InlineSearchRenderer({
11814
11846
  }) {
11815
11847
  const [hasSearched, setHasSearched] = useState9(false);
11816
11848
  const trackEvent = useTrackEvent();
11817
- return /* @__PURE__ */ jsx43("div", { className: getMargin(margin), children: /* @__PURE__ */ jsxs14(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
11849
+ return /* @__PURE__ */ jsx44("div", { className: getMargin(margin), children: /* @__PURE__ */ jsxs15(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
11818
11850
  id,
11819
- /* @__PURE__ */ jsx43(
11851
+ /* @__PURE__ */ jsx44(
11820
11852
  Typeahead,
11821
11853
  {
11822
11854
  id: "typeahead-input-id",
11823
11855
  name: "typeahead-input-name",
11824
11856
  size: "md",
11825
11857
  maxHeight: 100,
11826
- footer: /* @__PURE__ */ jsx43(TypeaheadFooter, { state, isLoading }),
11858
+ footer: /* @__PURE__ */ jsx44(TypeaheadFooter, { state, isLoading }),
11827
11859
  multiple: false,
11828
11860
  clearable: false,
11829
- addon: /* @__PURE__ */ jsx43(Search, { size: 24 }),
11861
+ addon: /* @__PURE__ */ jsx44(Search, { size: 24 }),
11830
11862
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
11831
11863
  minQueryLength: 1,
11832
11864
  onChange: (values) => {
@@ -11863,29 +11895,29 @@ function mapResultToTypeaheadOption(result) {
11863
11895
  }
11864
11896
  function TypeaheadFooter({ state, isLoading }) {
11865
11897
  if (state.type === "noResults") {
11866
- return /* @__PURE__ */ jsx43(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
11898
+ return /* @__PURE__ */ jsx44(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
11867
11899
  }
11868
11900
  if (state.type === "error") {
11869
- return /* @__PURE__ */ jsx43("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx43(ErrorResult, { state }) });
11901
+ return /* @__PURE__ */ jsx44("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx44(ErrorResult, { state }) });
11870
11902
  }
11871
11903
  if (state.type === "pending" || isLoading) {
11872
- return /* @__PURE__ */ jsx43("p", { className: "m-t-2 m-x-2", children: "Loading..." });
11904
+ return /* @__PURE__ */ jsx44("p", { className: "m-t-2 m-x-2", children: "Loading..." });
11873
11905
  }
11874
11906
  return null;
11875
11907
  }
11876
11908
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
11877
11909
 
11878
11910
  // src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
11879
- import { jsx as jsx44 } from "react/jsx-runtime";
11911
+ import { jsx as jsx45 } from "react/jsx-runtime";
11880
11912
  var SearchRenderer = {
11881
11913
  canRenderType: "search",
11882
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx44(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx44(BlockSearchRendererComponent_default, __spreadValues({}, props))
11914
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx45(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx45(BlockSearchRendererComponent_default, __spreadValues({}, props))
11883
11915
  };
11884
11916
  var SearchRenderer_default = SearchRenderer;
11885
11917
 
11886
11918
  // src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
11887
11919
  import { RadioGroup } from "@transferwise/components";
11888
- import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
11920
+ import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
11889
11921
  function RadioInputRendererComponent(props) {
11890
11922
  const {
11891
11923
  id,
@@ -11899,8 +11931,8 @@ function RadioInputRendererComponent(props) {
11899
11931
  selectedIndex,
11900
11932
  onSelect
11901
11933
  } = props;
11902
- return /* @__PURE__ */ jsxs15(Fragment6, { children: [
11903
- /* @__PURE__ */ jsx45(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx45("span", { children: /* @__PURE__ */ jsx45(
11934
+ return /* @__PURE__ */ jsxs16(Fragment7, { children: [
11935
+ /* @__PURE__ */ jsx46(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx46("span", { children: /* @__PURE__ */ jsx46(
11904
11936
  RadioGroup,
11905
11937
  {
11906
11938
  name: id,
@@ -11909,7 +11941,7 @@ function RadioInputRendererComponent(props) {
11909
11941
  value: index,
11910
11942
  secondary: option.description,
11911
11943
  disabled: option.disabled || disabled,
11912
- avatar: /* @__PURE__ */ jsx45(OptionMedia, { icon: option.icon, image: option.image })
11944
+ avatar: /* @__PURE__ */ jsx46(OptionMedia, { icon: option.icon, image: option.image })
11913
11945
  })),
11914
11946
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
11915
11947
  onChange: onSelect
@@ -11923,7 +11955,7 @@ function RadioInputRendererComponent(props) {
11923
11955
  // src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
11924
11956
  import { Tabs } from "@transferwise/components";
11925
11957
  import { useEffect as useEffect4 } from "react";
11926
- import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
11958
+ import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
11927
11959
  function TabInputRendererComponent(props) {
11928
11960
  const {
11929
11961
  id,
@@ -11942,8 +11974,8 @@ function TabInputRendererComponent(props) {
11942
11974
  onSelect(0);
11943
11975
  }
11944
11976
  }, [selectedIndex, onSelect, options.length]);
11945
- return /* @__PURE__ */ jsxs16(Fragment7, { children: [
11946
- /* @__PURE__ */ jsx46(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx46(
11977
+ return /* @__PURE__ */ jsxs17(Fragment8, { children: [
11978
+ /* @__PURE__ */ jsx47(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx47(
11947
11979
  Tabs,
11948
11980
  {
11949
11981
  name: id,
@@ -11952,7 +11984,7 @@ function TabInputRendererComponent(props) {
11952
11984
  title: option.title,
11953
11985
  // if we pass null, we get some props-types console errors
11954
11986
  // eslint-disable-next-line react/jsx-no-useless-fragment
11955
- content: /* @__PURE__ */ jsx46(Fragment7, {}),
11987
+ content: /* @__PURE__ */ jsx47(Fragment8, {}),
11956
11988
  disabled: option.disabled || disabled
11957
11989
  })),
11958
11990
  onTabSelect: onSelect
@@ -11968,22 +12000,22 @@ import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOpt
11968
12000
 
11969
12001
  // src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
11970
12002
  import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
11971
- import { jsx as jsx47 } from "react/jsx-runtime";
12003
+ import { jsx as jsx48 } from "react/jsx-runtime";
11972
12004
  function SelectTriggerMedia({ icon, image }) {
11973
12005
  if (image == null ? void 0 : image.url) {
11974
12006
  return null;
11975
12007
  }
11976
12008
  if (icon && "name" in icon) {
11977
- return /* @__PURE__ */ jsx47(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx47(DynamicIcon_default, { name: icon.name }) });
12009
+ return /* @__PURE__ */ jsx48(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx48(DynamicIcon_default, { name: icon.name }) });
11978
12010
  }
11979
12011
  if (icon && "text" in icon) {
11980
- return /* @__PURE__ */ jsx47(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
12012
+ return /* @__PURE__ */ jsx48(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
11981
12013
  }
11982
12014
  return null;
11983
12015
  }
11984
12016
 
11985
12017
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
11986
- import { Fragment as Fragment8, jsx as jsx48, jsxs as jsxs17 } from "react/jsx-runtime";
12018
+ import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
11987
12019
  function SelectInputRendererComponent(props) {
11988
12020
  const {
11989
12021
  id,
@@ -12018,16 +12050,16 @@ function SelectInputRendererComponent(props) {
12018
12050
  const contentProps = withinTrigger ? {
12019
12051
  title: option.title,
12020
12052
  note: option.description,
12021
- icon: /* @__PURE__ */ jsx48(SelectTriggerMedia, { icon: option.icon, image: option.image })
12053
+ icon: /* @__PURE__ */ jsx49(SelectTriggerMedia, { icon: option.icon, image: option.image })
12022
12054
  } : {
12023
12055
  title: option.title,
12024
12056
  description: option.description,
12025
- icon: /* @__PURE__ */ jsx48(OptionMedia, { icon: option.icon, image: option.image })
12057
+ icon: /* @__PURE__ */ jsx49(OptionMedia, { icon: option.icon, image: option.image })
12026
12058
  };
12027
- return /* @__PURE__ */ jsx48(SelectInputOptionContent2, __spreadValues({}, contentProps));
12059
+ return /* @__PURE__ */ jsx49(SelectInputOptionContent2, __spreadValues({}, contentProps));
12028
12060
  };
12029
- return /* @__PURE__ */ jsxs17(Fragment8, { children: [
12030
- /* @__PURE__ */ jsx48(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx48(
12061
+ return /* @__PURE__ */ jsxs18(Fragment9, { children: [
12062
+ /* @__PURE__ */ jsx49(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx49(
12031
12063
  SelectInput2,
12032
12064
  {
12033
12065
  name: id,
@@ -12048,7 +12080,7 @@ function SelectInputRendererComponent(props) {
12048
12080
  // src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
12049
12081
  import { useEffect as useEffect5 } from "react";
12050
12082
  import { SegmentedControl } from "@transferwise/components";
12051
- import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
12083
+ import { Fragment as Fragment10, jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
12052
12084
  function SegmentedInputRendererComponent(props) {
12053
12085
  const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
12054
12086
  useEffect5(() => {
@@ -12056,8 +12088,8 @@ function SegmentedInputRendererComponent(props) {
12056
12088
  onSelect(0);
12057
12089
  }
12058
12090
  }, [selectedIndex, onSelect, options.length]);
12059
- return /* @__PURE__ */ jsxs18(Fragment9, { children: [
12060
- /* @__PURE__ */ jsx49(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx49(
12091
+ return /* @__PURE__ */ jsxs19(Fragment10, { children: [
12092
+ /* @__PURE__ */ jsx50(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx50(
12061
12093
  SegmentedControl,
12062
12094
  {
12063
12095
  name: `${id}-segmented-control`,
@@ -12072,44 +12104,44 @@ function SegmentedInputRendererComponent(props) {
12072
12104
  onChange: (value) => onSelect(Number(value))
12073
12105
  }
12074
12106
  ) }),
12075
- /* @__PURE__ */ jsx49("div", { id: `${id}-children`, children })
12107
+ /* @__PURE__ */ jsx50("div", { id: `${id}-children`, children })
12076
12108
  ] });
12077
12109
  }
12078
12110
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
12079
12111
 
12080
12112
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
12081
- import { jsx as jsx50 } from "react/jsx-runtime";
12113
+ import { jsx as jsx51 } from "react/jsx-runtime";
12082
12114
  var SelectInputRenderer = {
12083
12115
  canRenderType: "input-select",
12084
12116
  render: (props) => {
12085
12117
  switch (props.control) {
12086
12118
  case "radio":
12087
- return /* @__PURE__ */ jsx50(RadioInputRendererComponent, __spreadValues({}, props));
12119
+ return /* @__PURE__ */ jsx51(RadioInputRendererComponent, __spreadValues({}, props));
12088
12120
  case "tab":
12089
- return props.options.length > 3 ? /* @__PURE__ */ jsx50(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx50(TabInputRendererComponent, __spreadValues({}, props));
12121
+ return props.options.length > 3 ? /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(TabInputRendererComponent, __spreadValues({}, props));
12090
12122
  case "segmented":
12091
- return props.options.length > 3 ? /* @__PURE__ */ jsx50(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx50(SegmentedInputRendererComponent, __spreadValues({}, props));
12123
+ return props.options.length > 3 ? /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(SegmentedInputRendererComponent, __spreadValues({}, props));
12092
12124
  case "select":
12093
12125
  default:
12094
- return /* @__PURE__ */ jsx50(SelectInputRendererComponent, __spreadValues({}, props));
12126
+ return /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props));
12095
12127
  }
12096
12128
  }
12097
12129
  };
12098
12130
  var SelectInputRenderer_default = SelectInputRenderer;
12099
12131
 
12100
12132
  // src/revamp/wise/renderers/StatusListRenderer.tsx
12101
- import { Header as Header4, Summary } from "@transferwise/components";
12102
- import { jsx as jsx51, jsxs as jsxs19 } from "react/jsx-runtime";
12133
+ import { Header as Header5, Summary } from "@transferwise/components";
12134
+ import { jsx as jsx52, jsxs as jsxs20 } from "react/jsx-runtime";
12103
12135
  var StatusListRenderer = {
12104
12136
  canRenderType: "status-list",
12105
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
12106
- title ? /* @__PURE__ */ jsx51(Header4, { title }) : null,
12107
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx51(
12137
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
12138
+ title ? /* @__PURE__ */ jsx52(Header5, { title }) : null,
12139
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx52(
12108
12140
  Summary,
12109
12141
  {
12110
12142
  title: itemTitle,
12111
12143
  description,
12112
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx51(DynamicIcon_default, { name: icon.name }) : null,
12144
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx52(DynamicIcon_default, { name: icon.name }) : null,
12113
12145
  status: mapStatus(status)
12114
12146
  },
12115
12147
  `${title}/${description || ""}`
@@ -12132,31 +12164,31 @@ import {
12132
12164
  TextArea as TextArea2,
12133
12165
  TextareaWithDisplayFormat
12134
12166
  } from "@transferwise/components";
12135
- import { jsx as jsx52 } from "react/jsx-runtime";
12167
+ import { jsx as jsx53 } from "react/jsx-runtime";
12136
12168
  function VariableTextInput({
12137
12169
  control,
12138
12170
  inputProps
12139
12171
  }) {
12140
12172
  switch (control) {
12141
12173
  case "password":
12142
- return /* @__PURE__ */ jsx52(TextInput, __spreadValues({ type: "password" }, inputProps));
12174
+ return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "password" }, inputProps));
12143
12175
  case "email":
12144
- return /* @__PURE__ */ jsx52(TextInput, __spreadValues({ type: "email" }, inputProps));
12176
+ return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "email" }, inputProps));
12145
12177
  case "textarea":
12146
- return /* @__PURE__ */ jsx52(TextAreaInput, __spreadValues({}, inputProps));
12178
+ return /* @__PURE__ */ jsx53(TextAreaInput, __spreadValues({}, inputProps));
12147
12179
  case "numeric":
12148
- return /* @__PURE__ */ jsx52(NumericInput, __spreadValues({ type: "number" }, inputProps));
12180
+ return /* @__PURE__ */ jsx53(NumericInput, __spreadValues({ type: "number" }, inputProps));
12149
12181
  case "phone-number":
12150
- return /* @__PURE__ */ jsx52(PhoneNumberInput, __spreadValues({}, inputProps));
12182
+ return /* @__PURE__ */ jsx53(PhoneNumberInput, __spreadValues({}, inputProps));
12151
12183
  default:
12152
- return /* @__PURE__ */ jsx52(TextInput, __spreadValues({ type: "text" }, inputProps));
12184
+ return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "text" }, inputProps));
12153
12185
  }
12154
12186
  }
12155
12187
  function TextInput(_a) {
12156
12188
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12157
12189
  if (typeof displayFormat === "string") {
12158
12190
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
12159
- return /* @__PURE__ */ jsx52(
12191
+ return /* @__PURE__ */ jsx53(
12160
12192
  InputWithDisplayFormat,
12161
12193
  __spreadValues({
12162
12194
  displayPattern: displayFormat,
@@ -12164,29 +12196,29 @@ function TextInput(_a) {
12164
12196
  }, inputProps)
12165
12197
  );
12166
12198
  }
12167
- return /* @__PURE__ */ jsx52(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12199
+ return /* @__PURE__ */ jsx53(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12168
12200
  }
12169
12201
  function TextAreaInput(_a) {
12170
12202
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12171
12203
  const textAreaProps = __spreadValues({ id, name: id }, rest);
12172
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx52(
12204
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx53(
12173
12205
  TextareaWithDisplayFormat,
12174
12206
  __spreadValues({
12175
12207
  displayPattern: displayFormat,
12176
12208
  onChange: (newValue) => onChange(newValue)
12177
12209
  }, textAreaProps)
12178
- ) : /* @__PURE__ */ jsx52(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12210
+ ) : /* @__PURE__ */ jsx53(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12179
12211
  }
12180
12212
  function NumericInput(_a) {
12181
12213
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12182
12214
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
12183
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx52(
12215
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx53(
12184
12216
  InputWithDisplayFormat,
12185
12217
  __spreadValues({
12186
12218
  displayPattern: displayFormat,
12187
12219
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
12188
12220
  }, numericProps)
12189
- ) : /* @__PURE__ */ jsx52(
12221
+ ) : /* @__PURE__ */ jsx53(
12190
12222
  Input6,
12191
12223
  __spreadValues({
12192
12224
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
@@ -12195,12 +12227,12 @@ function NumericInput(_a) {
12195
12227
  }
12196
12228
  function PhoneNumberInput(_a) {
12197
12229
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
12198
- return /* @__PURE__ */ jsx52(PhoneNumber, __spreadValues({ initialValue: value }, rest));
12230
+ return /* @__PURE__ */ jsx53(PhoneNumber, __spreadValues({ initialValue: value }, rest));
12199
12231
  }
12200
12232
  var VariableTextInput_default = VariableTextInput;
12201
12233
 
12202
12234
  // src/revamp/wise/renderers/TextInputRenderer.tsx
12203
- import { jsx as jsx53 } from "react/jsx-runtime";
12235
+ import { jsx as jsx54 } from "react/jsx-runtime";
12204
12236
  var TextInputRenderer = {
12205
12237
  canRenderType: "input-text",
12206
12238
  render: (props) => {
@@ -12225,14 +12257,14 @@ var TextInputRenderer = {
12225
12257
  ]);
12226
12258
  const value = initialValue != null ? initialValue : "";
12227
12259
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
12228
- return /* @__PURE__ */ jsx53(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx53(VariableTextInput_default, { control, inputProps }) });
12260
+ return /* @__PURE__ */ jsx54(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx54(VariableTextInput_default, { control, inputProps }) });
12229
12261
  }
12230
12262
  };
12231
12263
  var TextInputRenderer_default = TextInputRenderer;
12232
12264
 
12233
12265
  // src/revamp/wise/renderers/UploadInputRenderer.tsx
12234
12266
  import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
12235
- import { jsx as jsx54 } from "react/jsx-runtime";
12267
+ import { jsx as jsx55 } from "react/jsx-runtime";
12236
12268
  var UploadInputRenderer = {
12237
12269
  canRenderType: "input-upload",
12238
12270
  render: (props) => {
@@ -12248,7 +12280,7 @@ var UploadInputRenderer = {
12248
12280
  };
12249
12281
  return (
12250
12282
  // We don't pass help here as there is no sensible place to display it
12251
- /* @__PURE__ */ jsx54(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx54(
12283
+ /* @__PURE__ */ jsx55(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx55(
12252
12284
  UploadInput2,
12253
12285
  {
12254
12286
  id,
@@ -12281,100 +12313,39 @@ var LargeUploadRenderer = {
12281
12313
  type,
12282
12314
  onUpload
12283
12315
  } = _a, rest = __objRest(_a, [
12284
- "id",
12285
- "accepts",
12286
- "control",
12287
- "label",
12288
- "description",
12289
- "disabled",
12290
- "error",
12291
- "help",
12292
- "maxSize",
12293
- "type",
12294
- "onUpload"
12295
- ]);
12296
- const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
12297
- const onUploadFile = async (file, fileName) => {
12298
- try {
12299
- const convertedFile = file ? await toFile(file, fileName) : null;
12300
- await onUpload(convertedFile);
12301
- } catch (e) {
12302
- await onUpload(null);
12303
- throw e;
12304
- }
12305
- };
12306
- return /* @__PURE__ */ jsx54(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx54(
12307
- Upload,
12308
- __spreadProps(__spreadValues({}, uploadProps), {
12309
- usAccept: getAcceptsString(accepts),
12310
- usDisabled: disabled,
12311
- onSuccess: onUploadFile,
12312
- onFailure: async () => onUpload(null),
12313
- onCancel: async () => onUpload(null)
12314
- })
12315
- ) });
12316
- }
12317
- };
12318
-
12319
- // src/revamp/wise/renderers/ReviewRenderer.tsx
12320
- import { DefinitionList, Header as Header5 } from "@transferwise/components";
12321
- import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs20 } from "react/jsx-runtime";
12322
- var ReviewRenderer = {
12323
- canRenderType: "review",
12324
- render: ({ callToAction, control, fields, margin, title }) => {
12325
- const orientation = mapControlToDefinitionListLayout(control);
12326
- const action = callToAction ? {
12327
- text: callToAction.title,
12328
- onClick: (event) => {
12329
- event.preventDefault();
12330
- callToAction.onClick();
12331
- }
12332
- } : void 0;
12333
- return /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
12334
- (title || callToAction) && /* @__PURE__ */ jsx55(Header5, { title: title != null ? title : "", action }),
12335
- /* @__PURE__ */ jsx55("div", { className: margin, children: /* @__PURE__ */ jsx55(
12336
- DefinitionList,
12337
- {
12338
- layout: orientation,
12339
- definitions: fields.map(({ label, value, help }, index) => ({
12340
- key: String(index),
12341
- title: label,
12342
- value: getFieldValue(value, help, orientation)
12343
- }))
12344
- }
12345
- ) })
12346
- ] });
12347
- }
12348
- };
12349
- var ReviewRenderer_default = ReviewRenderer;
12350
- var mapControlToDefinitionListLayout = (control) => {
12351
- switch (control) {
12352
- case "horizontal":
12353
- case "horizontal-end-aligned":
12354
- return "HORIZONTAL_RIGHT_ALIGNED";
12355
- case "horizontal-start-aligned":
12356
- return "HORIZONTAL_LEFT_ALIGNED";
12357
- case "vertical-two-column":
12358
- return "VERTICAL_TWO_COLUMN";
12359
- case "vertical":
12360
- case "vertical-one-column":
12361
- default:
12362
- return "VERTICAL_ONE_COLUMN";
12363
- }
12364
- };
12365
- var getFieldValue = (value, help, orientation) => {
12366
- if (help) {
12367
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs20(Fragment10, { children: [
12368
- /* @__PURE__ */ jsx55(Help_default, { help }),
12369
- " ",
12370
- value
12371
- ] }) : /* @__PURE__ */ jsxs20(Fragment10, { children: [
12372
- value,
12373
- " ",
12374
- /* @__PURE__ */ jsx55(Help_default, { help })
12375
- ] });
12316
+ "id",
12317
+ "accepts",
12318
+ "control",
12319
+ "label",
12320
+ "description",
12321
+ "disabled",
12322
+ "error",
12323
+ "help",
12324
+ "maxSize",
12325
+ "type",
12326
+ "onUpload"
12327
+ ]);
12328
+ const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
12329
+ const onUploadFile = async (file, fileName) => {
12330
+ try {
12331
+ const convertedFile = file ? await toFile(file, fileName) : null;
12332
+ await onUpload(convertedFile);
12333
+ } catch (e) {
12334
+ await onUpload(null);
12335
+ throw e;
12336
+ }
12337
+ };
12338
+ return /* @__PURE__ */ jsx55(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx55(
12339
+ Upload,
12340
+ __spreadProps(__spreadValues({}, uploadProps), {
12341
+ usAccept: getAcceptsString(accepts),
12342
+ usDisabled: disabled,
12343
+ onSuccess: onUploadFile,
12344
+ onFailure: async () => onUpload(null),
12345
+ onCancel: async () => onUpload(null)
12346
+ })
12347
+ ) });
12376
12348
  }
12377
- return value;
12378
12349
  };
12379
12350
 
12380
12351
  // src/revamp/wise/renderers/step/StepRenderer.tsx
@@ -12899,7 +12870,6 @@ function isReference(block) {
12899
12870
 
12900
12871
  // src/legacy/dynamicFlow/DynamicFlow.tsx
12901
12872
  import { useCallback as useCallback11, useEffect as useEffect26, useMemo as useMemo22, useState as useState35 } from "react";
12902
- import { useIntl as useIntl26 } from "react-intl";
12903
12873
 
12904
12874
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
12905
12875
  import { createContext as createContext4, useContext as useContext5, useMemo as useMemo7 } from "react";
@@ -13013,6 +12983,61 @@ function FeatureContextProvider({ features, children }) {
13013
12983
  return /* @__PURE__ */ jsx64(FeatureContext.Provider, { value: features, children });
13014
12984
  }
13015
12985
 
12986
+ // src/common/cameraCapture/utils/mobile-utils.ts
12987
+ var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
12988
+ var isMobileUA = (userAgent = window.navigator.userAgent) => (
12989
+ // eslint-disable-next-line regexp/no-unused-capturing-group
12990
+ /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
12991
+ );
12992
+ var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
12993
+ var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
12994
+ if ("maxTouchPoints" in navigator2) {
12995
+ return navigator2.maxTouchPoints > 0;
12996
+ }
12997
+ const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
12998
+ if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
12999
+ return Boolean(mQ.matches);
13000
+ }
13001
+ return false;
13002
+ };
13003
+
13004
+ // src/common/utils/debounce.ts
13005
+ var debounce2 = (callback, waitMs) => {
13006
+ let timeoutId;
13007
+ let lastArgs;
13008
+ const clearTimer = () => {
13009
+ if (timeoutId) {
13010
+ clearTimeout(timeoutId);
13011
+ timeoutId = null;
13012
+ }
13013
+ lastArgs = null;
13014
+ };
13015
+ const debouncedFn = (...args) => {
13016
+ lastArgs = args;
13017
+ if (timeoutId !== null) {
13018
+ clearTimeout(timeoutId);
13019
+ }
13020
+ timeoutId = setTimeout(() => {
13021
+ callback(...lastArgs);
13022
+ timeoutId = null;
13023
+ lastArgs = null;
13024
+ }, waitMs);
13025
+ };
13026
+ debouncedFn.cancel = () => {
13027
+ if (timeoutId !== null) {
13028
+ clearTimer();
13029
+ }
13030
+ };
13031
+ debouncedFn.flush = () => {
13032
+ if (timeoutId !== null) {
13033
+ callback(...lastArgs);
13034
+ clearTimer();
13035
+ }
13036
+ };
13037
+ debouncedFn.isPending = () => timeoutId !== null;
13038
+ return debouncedFn;
13039
+ };
13040
+
13016
13041
  // src/legacy/common/utils/api-utils.ts
13017
13042
  function isStatus2xx(status) {
13018
13043
  return status >= 200 && status < 300;
@@ -13475,63 +13500,6 @@ var dateStringToDate = (dateString) => {
13475
13500
  };
13476
13501
  var dateToDateString2 = (date) => formatDate2(date);
13477
13502
 
13478
- // src/legacy/common/utils/debounce.ts
13479
- var debounce2 = (callback, waitMs) => {
13480
- let timeoutId;
13481
- let lastArgs;
13482
- const clearTimer = () => {
13483
- if (timeoutId) {
13484
- clearTimeout(timeoutId);
13485
- timeoutId = null;
13486
- }
13487
- lastArgs = null;
13488
- };
13489
- const debouncedFn = (...args) => {
13490
- lastArgs = args;
13491
- if (timeoutId !== null) {
13492
- clearTimeout(timeoutId);
13493
- }
13494
- timeoutId = setTimeout(() => {
13495
- callback(...lastArgs);
13496
- timeoutId = null;
13497
- lastArgs = null;
13498
- }, waitMs);
13499
- };
13500
- debouncedFn.cancel = () => {
13501
- if (timeoutId !== null) {
13502
- clearTimer();
13503
- }
13504
- };
13505
- debouncedFn.flush = () => {
13506
- if (timeoutId !== null) {
13507
- callback(...lastArgs);
13508
- clearTimer();
13509
- }
13510
- };
13511
- debouncedFn.isPending = () => timeoutId !== null;
13512
- return debouncedFn;
13513
- };
13514
-
13515
- // src/legacy/common/utils/is-equal.ts
13516
- var isEqual = (a, b) => {
13517
- if (a === b) {
13518
- return true;
13519
- }
13520
- if (Array.isArray(a) && Array.isArray(b)) {
13521
- return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
13522
- }
13523
- if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
13524
- return true;
13525
- }
13526
- return false;
13527
- };
13528
- var isObjectEquals = (a, b) => {
13529
- const keysA = Object.keys(a);
13530
- const keysB = Object.keys(b);
13531
- return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
13532
- };
13533
- var isNonNullObject = (a) => typeof a === "object" && a !== null;
13534
-
13535
13503
  // src/legacy/common/utils/file-utils.ts
13536
13504
  function toKilobytes2(sizeInBytes) {
13537
13505
  const ONE_KB_IN_BYTES = 1024;
@@ -13567,6 +13535,52 @@ var generateRandomId = (prefix = "") => {
13567
13535
  return `${prefixString}${Math.floor(1e8 * Math.random())}`;
13568
13536
  };
13569
13537
 
13538
+ // src/legacy/common/utils/is-equal.ts
13539
+ var isEqual = (a, b) => {
13540
+ if (a === b) {
13541
+ return true;
13542
+ }
13543
+ if (Array.isArray(a) && Array.isArray(b)) {
13544
+ return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
13545
+ }
13546
+ if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
13547
+ return true;
13548
+ }
13549
+ return false;
13550
+ };
13551
+ var isObjectEquals = (a, b) => {
13552
+ const keysA = Object.keys(a);
13553
+ const keysB = Object.keys(b);
13554
+ return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
13555
+ };
13556
+ var isNonNullObject = (a) => typeof a === "object" && a !== null;
13557
+
13558
+ // src/legacy/common/utils/misc-utils.ts
13559
+ var isBasicError = (error) => isString2(error) || isNull3(error);
13560
+
13561
+ // src/legacy/common/utils/model-utils.ts
13562
+ var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
13563
+ var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
13564
+ var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
13565
+ var isNullableStringModel = (model) => isString2(model) || isNull3(model);
13566
+ var isArrayModel2 = (model) => {
13567
+ if (isArray2(model)) {
13568
+ if (model.length === 0) {
13569
+ return true;
13570
+ }
13571
+ return model.every(
13572
+ (item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
13573
+ );
13574
+ }
13575
+ return false;
13576
+ };
13577
+ var isNullableArrayModel = (model) => {
13578
+ if (isNull3(model)) {
13579
+ return true;
13580
+ }
13581
+ return isArrayModel2(model);
13582
+ };
13583
+
13570
13584
  // src/legacy/common/utils/schema-utils.ts
13571
13585
  function isConstSchema2(schema) {
13572
13586
  return !isUndefined3(schema == null ? void 0 : schema.const);
@@ -13695,50 +13709,6 @@ var filterHiddenSchemas = (schemas) => schemas.filter((schema) => {
13695
13709
  return (schema == null ? void 0 : schema.hidden) !== true;
13696
13710
  });
13697
13711
 
13698
- // src/legacy/common/utils/model-utils.ts
13699
- var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
13700
- var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
13701
- var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
13702
- var isNullableStringModel = (model) => isString2(model) || isNull3(model);
13703
- var isArrayModel2 = (model) => {
13704
- if (isArray2(model)) {
13705
- if (model.length === 0) {
13706
- return true;
13707
- }
13708
- return model.every(
13709
- (item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
13710
- );
13711
- }
13712
- return false;
13713
- };
13714
- var isNullableArrayModel = (model) => {
13715
- if (isNull3(model)) {
13716
- return true;
13717
- }
13718
- return isArrayModel2(model);
13719
- };
13720
-
13721
- // src/legacy/common/utils/misc-utils.ts
13722
- var isBasicError = (error) => isString2(error) || isNull3(error);
13723
-
13724
- // src/legacy/common/utils/mobile-utils.ts
13725
- var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
13726
- var isMobileUA = (userAgent = window.navigator.userAgent) => (
13727
- // eslint-disable-next-line regexp/no-unused-capturing-group
13728
- /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
13729
- );
13730
- var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
13731
- var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
13732
- if ("maxTouchPoints" in navigator2) {
13733
- return navigator2.maxTouchPoints > 0;
13734
- }
13735
- const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
13736
- if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
13737
- return Boolean(mQ.matches);
13738
- }
13739
- return false;
13740
- };
13741
-
13742
13712
  // src/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.tsx
13743
13713
  import { useCallback as useCallback4 } from "react";
13744
13714
  function useDebouncedFunction(callback, waitMs) {
@@ -15473,7 +15443,7 @@ var logInvalidTypeFallbackWarning = ({
15473
15443
  };
15474
15444
 
15475
15445
  // src/legacy/formControl/utils/getAutocompleteString.ts
15476
- var getAutocompleteString3 = (hints, { prefix = "", suffix = "" } = {}) => {
15446
+ var getAutocompleteString2 = (hints, { prefix = "", suffix = "" } = {}) => {
15477
15447
  const autoCompleteString = hints.map((hint) => {
15478
15448
  const builtHint = `${prefix}${hint}${suffix}`;
15479
15449
  return isAutocompleteToken(builtHint) ? autocompleteTokenMap2[builtHint] : void 0;
@@ -15556,7 +15526,7 @@ var _FormControl = class _FormControl extends PureComponent {
15556
15526
  this.getAutocompleteValue = ({ prefix = "", suffix = "" } = {}) => {
15557
15527
  const { autoComplete, autocompleteHint } = this.props;
15558
15528
  if (isArray2(autocompleteHint)) {
15559
- return getAutocompleteString3(autocompleteHint, { prefix, suffix });
15529
+ return getAutocompleteString2(autocompleteHint, { prefix, suffix });
15560
15530
  }
15561
15531
  return autoComplete ? "on" : "off";
15562
15532
  };
@@ -17967,12 +17937,12 @@ var LayoutStep_default = LayoutStep;
17967
17937
  // src/legacy/step/cameraStep/CameraStep.tsx
17968
17938
  import { useEffect as useEffect25, useState as useState32 } from "react";
17969
17939
 
17970
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
17940
+ // src/common/cameraCapture/CameraCapture.tsx
17971
17941
  import { useCallback as useCallback10, useEffect as useEffect24, useMemo as useMemo20, useRef as useRef8, useState as useState31 } from "react";
17972
17942
  import { useIntl as useIntl23 } from "react-intl";
17973
17943
  import Webcam from "react-webcam";
17974
17944
 
17975
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.ts
17945
+ // src/common/cameraCapture/CameraCapture.messages.ts
17976
17946
  import { defineMessages as defineMessages13 } from "react-intl";
17977
17947
  var CameraCapture_messages_default = defineMessages13({
17978
17948
  reviewSubmit: {
@@ -18032,7 +18002,7 @@ var CameraCapture_messages_default = defineMessages13({
18032
18002
  }
18033
18003
  });
18034
18004
 
18035
- // src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
18005
+ // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
18036
18006
  import { Button as Button10, ControlType, Priority, Size as Size3 } from "@transferwise/components";
18037
18007
  import { useIntl as useIntl21 } from "react-intl";
18038
18008
  import { jsx as jsx118, jsxs as jsxs46 } from "react/jsx-runtime";
@@ -18079,10 +18049,10 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx118(
18079
18049
  }
18080
18050
  );
18081
18051
 
18082
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18052
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18083
18053
  import { useIntl as useIntl22 } from "react-intl";
18084
18054
 
18085
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18055
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18086
18056
  import { defineMessages as defineMessages14 } from "react-intl";
18087
18057
  var OrientationLockOverlay_messages_default = defineMessages14({
18088
18058
  text: {
@@ -18092,7 +18062,7 @@ var OrientationLockOverlay_messages_default = defineMessages14({
18092
18062
  }
18093
18063
  });
18094
18064
 
18095
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18065
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18096
18066
  import { jsx as jsx119, jsxs as jsxs47 } from "react/jsx-runtime";
18097
18067
  function OrientationLockOverlay() {
18098
18068
  const intl = useIntl22();
@@ -18112,23 +18082,11 @@ function OrientationLockOverlay() {
18112
18082
  }
18113
18083
  var OrientationLockOverlay_default = OrientationLockOverlay;
18114
18084
 
18115
- // src/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18116
- import { Button as Button11 } from "@transferwise/components";
18117
- import { jsx as jsx120, jsxs as jsxs48 } from "react/jsx-runtime";
18118
- function CameraErrorScreen({ title, description, actionButton, onAction }) {
18119
- return /* @__PURE__ */ jsx120("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx120("div", { className: "row", children: /* @__PURE__ */ jsxs48("div", { className: "col-md-6 col-md-offset-3", children: [
18120
- /* @__PURE__ */ jsx120("h2", { className: "text-xs-center m-b-3", children: title }),
18121
- /* @__PURE__ */ jsx120("p", { className: "text-xs-center m-b-5", children: description }),
18122
- onAction && actionButton && /* @__PURE__ */ jsx120(Button11, { block: true, onClick: onAction, children: actionButton })
18123
- ] }) }) });
18124
- }
18125
- var CameraErrorScreen_default = CameraErrorScreen;
18126
-
18127
- // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
18085
+ // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18128
18086
  var import_screenfull = __toESM(require_screenfull());
18129
18087
  import { useCallback as useCallback9, useEffect as useEffect21 } from "react";
18130
18088
 
18131
- // src/legacy/step/cameraStep/cameraCapture/utils/index.ts
18089
+ // src/common/cameraCapture/utils/index.ts
18132
18090
  var isSelfieCamera = (stream) => {
18133
18091
  var _a;
18134
18092
  const { facingMode } = ((_a = getVideoTrack(stream)) == null ? void 0 : _a.getSettings()) || {};
@@ -18174,7 +18132,7 @@ var getVideoCapabilities = (videoStream) => {
18174
18132
  return (_b = (_a = getVideoTrack(videoStream)) == null ? void 0 : _a.getCapabilities) == null ? void 0 : _b.call(_a);
18175
18133
  };
18176
18134
 
18177
- // src/legacy/step/cameraStep/cameraCapture/tracking/index.ts
18135
+ // src/common/cameraCapture/tracking/index.ts
18178
18136
  var trackCameraError = (message, onEvent, error) => onEvent == null ? void 0 : onEvent(message, { Error: getSerializedError(error) });
18179
18137
  var getSerializedError = (error) => error instanceof DOMException ? JSON.stringify({
18180
18138
  name: error == null ? void 0 : error.name,
@@ -18196,13 +18154,13 @@ var getCameraStartedProperties = async (props, videoStream) => {
18196
18154
  });
18197
18155
  };
18198
18156
  var trackCameraOrientationLandscape = (onEvent) => {
18199
- onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {});
18157
+ void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {}));
18200
18158
  };
18201
18159
  var trackCameraOrientationLocked = (onEvent) => {
18202
- onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {});
18160
+ void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {}));
18203
18161
  };
18204
18162
 
18205
- // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
18163
+ // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18206
18164
  var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18207
18165
  const lockOrientation = useCallback9(() => {
18208
18166
  if (window.screen.orientation && "lock" in window.screen.orientation && typeof window.screen.orientation.lock === "function") {
@@ -18264,37 +18222,37 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18264
18222
  var noop5 = () => {
18265
18223
  };
18266
18224
 
18267
- // src/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.ts
18225
+ // src/common/cameraCapture/hooks/useVideoConstraints.ts
18268
18226
  import { useEffect as useEffect22, useState as useState30 } from "react";
18269
18227
  var useVideoConstraints = (direction) => {
18270
18228
  const [videoConstraints, setVideoConstraints] = useState30();
18229
+ useEffect22(() => {
18230
+ void getVideoConstraints(direction).then(setVideoConstraints);
18231
+ }, [direction]);
18232
+ return { videoConstraints };
18233
+ };
18234
+ var getVideoConstraints = async (dir) => {
18271
18235
  const defaultVideoConstraints = {
18272
- facingMode: direction === "front" ? "user" : "environment",
18236
+ facingMode: dir === "front" ? "user" : "environment",
18273
18237
  height: { min: 480, max: 1080, ideal: 720 },
18274
18238
  width: { min: 640, max: 1920, ideal: 1280 },
18275
18239
  frameRate: 30,
18276
18240
  aspectRatio: 16 / 9
18277
18241
  };
18278
- useEffect22(() => {
18279
- void getVideoConstraints(direction).then(setVideoConstraints);
18280
- }, [direction]);
18281
- const getVideoConstraints = async (direction2) => {
18282
- if (direction2 === "back") {
18283
- const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
18284
- if (mainCamera == null ? void 0 : mainCamera.deviceId) {
18285
- return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
18286
- deviceId: { exact: mainCamera.deviceId }
18287
- });
18288
- }
18242
+ if (dir === "back") {
18243
+ const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
18244
+ if (mainCamera == null ? void 0 : mainCamera.deviceId) {
18245
+ return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
18246
+ deviceId: { exact: mainCamera.deviceId }
18247
+ });
18289
18248
  }
18290
- return defaultVideoConstraints;
18291
- };
18292
- return { videoConstraints };
18249
+ }
18250
+ return defaultVideoConstraints;
18293
18251
  };
18294
18252
 
18295
- // src/legacy/step/cameraStep/cameraCapture/overlay/Overlay.tsx
18253
+ // src/common/cameraCapture/overlay/Overlay.tsx
18296
18254
  import { useEffect as useEffect23, useRef as useRef7 } from "react";
18297
- import { Fragment as Fragment23, jsx as jsx121, jsxs as jsxs49 } from "react/jsx-runtime";
18255
+ import { Fragment as Fragment23, jsx as jsx120, jsxs as jsxs48 } from "react/jsx-runtime";
18298
18256
  var captureButtonHeight = 92;
18299
18257
  var reviewButtonsHeight = 120;
18300
18258
  var imageHeight = 40;
@@ -18316,18 +18274,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18316
18274
  return () => window.removeEventListener("resize", listener);
18317
18275
  });
18318
18276
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
18319
- let helperBox = /* @__PURE__ */ jsxs49(Fragment23, { children: [
18320
- imageUrl && /* @__PURE__ */ jsx121("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18321
- title && /* @__PURE__ */ jsx121("h4", { className: "camera-capture-title", children: title }),
18322
- instructions && /* @__PURE__ */ jsx121("small", { className: "camera-capture-instructions", children: instructions })
18277
+ let helperBox = /* @__PURE__ */ jsxs48(Fragment23, { children: [
18278
+ imageUrl && /* @__PURE__ */ jsx120("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18279
+ title && /* @__PURE__ */ jsx120("h4", { className: "camera-capture-title", children: title }),
18280
+ instructions && /* @__PURE__ */ jsx120("small", { className: "camera-capture-instructions", children: instructions })
18323
18281
  ] });
18324
18282
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
18325
18283
  if (reviewInstructions) {
18326
18284
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
18327
- helperBox = /* @__PURE__ */ jsx121("small", { className: "camera-capture-instructions", children: reviewInstructions });
18285
+ helperBox = /* @__PURE__ */ jsx120("small", { className: "camera-capture-instructions", children: reviewInstructions });
18328
18286
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
18329
18287
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
18330
- helperBox = /* @__PURE__ */ jsx121(Fragment23, {});
18288
+ helperBox = /* @__PURE__ */ jsx120(Fragment23, {});
18331
18289
  }
18332
18290
  }
18333
18291
  const framePosition = {
@@ -18345,19 +18303,31 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18345
18303
  width: "90%"
18346
18304
  }
18347
18305
  };
18348
- return /* @__PURE__ */ jsxs49("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18349
- /* @__PURE__ */ jsx121("defs", { children: /* @__PURE__ */ jsxs49("mask", { id: "mask", children: [
18350
- /* @__PURE__ */ jsx121("rect", { width: "100%", height: "100%", fill: "#fff" }),
18351
- /* @__PURE__ */ jsx121("image", __spreadValues({ href: overlay }, framePosition))
18306
+ return /* @__PURE__ */ jsxs48("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18307
+ /* @__PURE__ */ jsx120("defs", { children: /* @__PURE__ */ jsxs48("mask", { id: "mask", children: [
18308
+ /* @__PURE__ */ jsx120("rect", { width: "100%", height: "100%", fill: "#fff" }),
18309
+ /* @__PURE__ */ jsx120("image", __spreadValues({ href: overlay }, framePosition))
18352
18310
  ] }) }),
18353
- overlay && /* @__PURE__ */ jsx121("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18354
- outline && /* @__PURE__ */ jsx121("image", __spreadValues({ href: outline }, framePosition)),
18355
- /* @__PURE__ */ jsx121("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ jsx121("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18311
+ overlay && /* @__PURE__ */ jsx120("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18312
+ outline && /* @__PURE__ */ jsx120("image", __spreadValues({ href: outline }, framePosition)),
18313
+ /* @__PURE__ */ jsx120("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ jsx120("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18356
18314
  ] });
18357
18315
  }
18358
18316
  var Overlay_default = Overlay;
18359
18317
 
18360
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
18318
+ // src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18319
+ import { Button as Button11 } from "@transferwise/components";
18320
+ import { jsx as jsx121, jsxs as jsxs49 } from "react/jsx-runtime";
18321
+ function CameraErrorScreen({ title, description, actionButton, onAction }) {
18322
+ return /* @__PURE__ */ jsx121("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx121("div", { className: "row", children: /* @__PURE__ */ jsxs49("div", { className: "col-md-6 col-md-offset-3", children: [
18323
+ /* @__PURE__ */ jsx121("h2", { className: "text-xs-center m-b-3", children: title }),
18324
+ /* @__PURE__ */ jsx121("p", { className: "text-xs-center m-b-5", children: description }),
18325
+ onAction && actionButton && /* @__PURE__ */ jsx121(Button11, { block: true, onClick: onAction, children: actionButton })
18326
+ ] }) }) });
18327
+ }
18328
+ var CameraErrorScreen_default = CameraErrorScreen;
18329
+
18330
+ // src/common/cameraCapture/CameraCapture.tsx
18361
18331
  import { jsx as jsx122, jsxs as jsxs50 } from "react/jsx-runtime";
18362
18332
  function CameraCapture({
18363
18333
  direction = "back",
@@ -19032,7 +19002,6 @@ var DynamicFlowComponent = ({
19032
19002
  setSchemaModel
19033
19003
  } = useDynamicFlowState(initialStep);
19034
19004
  const [submitted, setSubmitted] = useState35(false);
19035
- const { locale } = useIntl26();
19036
19005
  const { isLoading, loader, setLoadingState } = useLoader(
19037
19006
  loaderConfig,
19038
19007
  initialStep ? "idle" : "initial"
@@ -19070,15 +19039,13 @@ var DynamicFlowComponent = ({
19070
19039
  const { url, method = "POST" } = action;
19071
19040
  return httpClient(url != null ? url : "", {
19072
19041
  method,
19073
- credentials: "include",
19074
19042
  headers: __spreadValues({
19075
- "Content-Type": "application/json",
19076
- "accept-language": locale
19043
+ "Content-Type": "application/json"
19077
19044
  }, etag2 ? { "If-None-Match": etag2 } : {}),
19078
19045
  body: method === "GET" ? void 0 : JSON.stringify(data)
19079
19046
  });
19080
19047
  },
19081
- [httpClient, locale]
19048
+ [httpClient]
19082
19049
  );
19083
19050
  const performAction = async (action, data = {}) => {
19084
19051
  cancelPendingRefreshes();