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

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