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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/build/common/cameraCapture/CameraCapture.js +161 -0
  2. package/build/common/cameraCapture/CameraCapture.messages.js +58 -0
  3. package/build/common/cameraCapture/CameraCapture.spec.js +447 -0
  4. package/build/common/cameraCapture/components/bottomBar/BottomBar.js +17 -0
  5. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +8 -0
  6. package/build/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
  7. package/build/common/cameraCapture/hooks/useFullScreenOrientationLock.js +62 -0
  8. package/build/common/cameraCapture/hooks/useVideoConstraints.js +80 -0
  9. package/build/common/cameraCapture/overlay/Overlay.js +78 -0
  10. package/build/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -0
  11. package/build/common/cameraCapture/tracking/index.js +109 -0
  12. package/build/common/cameraCapture/types/index.js +7 -0
  13. package/build/common/cameraCapture/utils/index.js +107 -0
  14. package/build/common/cameraCapture/utils/mobile-utils.js +23 -0
  15. package/build/common/cameraCapture/utils/mobile-utils.spec.js +71 -0
  16. package/build/common/errorBoundary/ErrorBoundary.js +44 -0
  17. package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
  18. package/build/common/httpClientContext/HttpClientContext.js +24 -0
  19. package/build/common/httpClientContext/index.js +1 -0
  20. package/build/common/makeHttpClient/index.js +1 -0
  21. package/build/common/makeHttpClient/makeHttpClient.js +30 -0
  22. package/build/common/makeHttpClient/makeHttpClient.spec.js +140 -0
  23. package/build/common/messages/external-confirmation.messages.js +23 -0
  24. package/build/common/messages/generic-error.messages.js +18 -0
  25. package/build/common/messages/help.messages.js +8 -0
  26. package/build/common/messages/multi-file-upload.messages.js +18 -0
  27. package/build/common/messages/multi-select.messages.js +8 -0
  28. package/build/common/messages/paragraph.messages.js +13 -0
  29. package/build/common/messages/repeatable.messages.js +23 -0
  30. package/build/common/messages/validation.array.messages.js +13 -0
  31. package/build/common/messages/validation.messages.js +53 -0
  32. package/build/common/utils/api-utils.js +4 -0
  33. package/build/common/utils/debounce.js +44 -0
  34. package/build/common/utils/debounce.spec.js +72 -0
  35. package/build/i18n/index.js +36 -0
  36. package/build/index.js +11 -0
  37. package/build/legacy/common/constants/DateMode.js +4 -0
  38. package/build/legacy/common/constants/FeatureName.js +4 -0
  39. package/build/legacy/common/constants/FormControlType.js +21 -0
  40. package/build/legacy/common/constants/MonthFormat.js +4 -0
  41. package/build/legacy/common/constants/Size.js +7 -0
  42. package/build/legacy/common/constants/index.js +4 -0
  43. package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +25 -0
  44. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +15 -0
  45. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.spec.js +113 -0
  46. package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
  47. package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +47 -0
  48. package/build/legacy/common/contexts/featureContext/FeatureContext.js +11 -0
  49. package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +30 -0
  50. package/build/legacy/common/contexts/index.js +3 -0
  51. package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
  52. package/build/legacy/common/contexts/logContext/LogContext.spec.js +43 -0
  53. package/build/legacy/common/hooks/index.js +7 -0
  54. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
  55. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
  56. package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
  57. package/build/legacy/common/hooks/useExternal/useExternal.spec.js +236 -0
  58. package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +71 -0
  59. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
  60. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.spec.js +221 -0
  61. package/build/legacy/common/hooks/usePolling/usePolling.js +53 -0
  62. package/build/legacy/common/hooks/usePolling/usePolling.spec.js +243 -0
  63. package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
  64. package/build/legacy/common/hooks/usePrevious/usePrevious.spec.js +66 -0
  65. package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +45 -0
  66. package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
  67. package/build/legacy/common/messages.js +8 -0
  68. package/build/legacy/common/utils/api-utils.js +6 -0
  69. package/build/legacy/common/utils/date-utils.js +22 -0
  70. package/build/legacy/common/utils/file-utils.js +45 -0
  71. package/build/legacy/common/utils/file-utils.spec.js +69 -0
  72. package/build/legacy/common/utils/id-utils.js +5 -0
  73. package/build/legacy/common/utils/id-utils.spec.js +12 -0
  74. package/build/legacy/common/utils/index.js +11 -0
  75. package/build/legacy/common/utils/is-equal.js +21 -0
  76. package/build/legacy/common/utils/is-equal.spec.js +88 -0
  77. package/build/legacy/common/utils/misc-utils.js +4 -0
  78. package/build/legacy/common/utils/model-utils.js +33 -0
  79. package/build/legacy/common/utils/schema-utils.js +113 -0
  80. package/build/legacy/common/utils/step-utils.js +32 -0
  81. package/build/legacy/common/validators/index.js +5 -0
  82. package/build/legacy/common/validators/models/model-utils.js +119 -0
  83. package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
  84. package/build/legacy/common/validators/models/model-validators.js +62 -0
  85. package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
  86. package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
  87. package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
  88. package/build/legacy/common/validators/types/type-validators.js +14 -0
  89. package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
  90. package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
  91. package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
  92. package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
  93. package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
  94. package/build/legacy/common/validators/values/value-validators.js +6 -0
  95. package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
  96. package/build/legacy/dynamic-flow-types.js +1 -0
  97. package/build/legacy/dynamicFlow/BackButton.js +22 -0
  98. package/build/legacy/dynamicFlow/DynamicFlow.js +347 -0
  99. package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
  100. package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
  101. package/build/legacy/dynamicFlow/index.js +1 -0
  102. package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
  103. package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
  104. package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +25 -0
  105. package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +33 -0
  106. package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
  107. package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
  108. package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +253 -0
  109. package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
  110. package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
  111. package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
  112. package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
  113. package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
  114. package/build/legacy/dynamicFlow/stories/visual-tests/VisualTests.story.js +43 -0
  115. package/build/legacy/dynamicFlow/tests/Actions.spec.js +232 -0
  116. package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
  117. package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
  118. package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
  119. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialAction.spec.js +458 -0
  120. package/build/legacy/dynamicFlow/tests/DynamicFlow.InitialStep.spec.js +734 -0
  121. package/build/legacy/dynamicFlow/tests/DynamicFlow.LoaderConfig.spec.js +254 -0
  122. package/build/legacy/dynamicFlow/tests/DynamicFlow.legacy.spec.js +1202 -0
  123. package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
  124. package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
  125. package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
  126. package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
  127. package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
  128. package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
  129. package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +327 -0
  130. package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
  131. package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
  132. package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
  133. package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
  134. package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
  135. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +391 -0
  136. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +588 -0
  137. package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
  138. package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
  139. package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
  140. package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
  141. package/build/legacy/dynamicFlow/utils/index.js +5 -0
  142. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
  143. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
  144. package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +35 -0
  145. package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
  146. package/build/legacy/dynamicFlow/utils/useErrorResponse.js +62 -0
  147. package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
  148. package/build/legacy/formControl/FormControl.js +267 -0
  149. package/build/legacy/formControl/FormControl.spec.js +445 -0
  150. package/build/legacy/formControl/Select.spec.js +104 -0
  151. package/build/legacy/formControl/index.js +1 -0
  152. package/build/legacy/formControl/utils/getAutocompleteString.js +80 -0
  153. package/build/legacy/formControl/utils/getAutocompleteString.spec.js +30 -0
  154. package/build/legacy/formControl/utils/index.js +2 -0
  155. package/build/legacy/formControl/utils/value-utils.js +108 -0
  156. package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
  157. package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +534 -0
  158. package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
  159. package/build/legacy/jsonSchemaForm/JsonSchemaForm.spec.js +77 -0
  160. package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
  161. package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
  162. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
  163. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArrayTypeSchema.spec.js +50 -0
  164. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +34 -0
  165. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
  166. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +86 -0
  167. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
  168. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
  169. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
  170. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
  171. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
  172. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
  173. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
  174. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
  175. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
  176. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
  177. package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
  178. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js +233 -0
  179. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +100 -0
  180. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.spec.js +291 -0
  181. package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
  182. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +89 -0
  183. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.spec.js +182 -0
  184. package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
  185. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
  186. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
  187. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.spec.js +334 -0
  188. package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
  189. package/build/legacy/jsonSchemaForm/help/Help.js +9 -0
  190. package/build/legacy/jsonSchemaForm/help/Help.spec.js +61 -0
  191. package/build/legacy/jsonSchemaForm/help/index.js +1 -0
  192. package/build/legacy/jsonSchemaForm/index.js +1 -0
  193. package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
  194. package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
  195. package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
  196. package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
  197. package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
  198. package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
  199. package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
  200. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
  201. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
  202. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
  203. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
  204. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.spec.js +243 -0
  205. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
  206. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
  207. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.spec.js +420 -0
  208. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
  209. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
  210. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +16 -0
  211. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.spec.js +125 -0
  212. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
  213. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.spec.js +82 -0
  214. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
  215. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.spec.js +130 -0
  216. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
  217. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
  218. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.spec.js +117 -0
  219. package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
  220. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +138 -0
  221. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
  222. package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
  223. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
  224. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
  225. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +220 -0
  226. package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
  227. package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
  228. package/build/legacy/layout/DynamicLayout.end-to-end.spec.js +71 -0
  229. package/build/legacy/layout/DynamicLayout.js +68 -0
  230. package/build/legacy/layout/DynamicLayout.spec.js +243 -0
  231. package/build/legacy/layout/alert/DynamicAlert.js +29 -0
  232. package/build/legacy/layout/alert/DynamicAlert.spec.js +42 -0
  233. package/build/legacy/layout/box/DynamicBox.js +30 -0
  234. package/build/legacy/layout/box/DynamicBox.spec.js +56 -0
  235. package/build/legacy/layout/button/DynamicButton.js +16 -0
  236. package/build/legacy/layout/button/DynamicButton.spec.js +141 -0
  237. package/build/legacy/layout/button/utils.js +45 -0
  238. package/build/legacy/layout/button/utils.spec.js +50 -0
  239. package/build/legacy/layout/columns/DynamicColumns.js +27 -0
  240. package/build/legacy/layout/columns/DynamicColumns.spec.js +83 -0
  241. package/build/legacy/layout/decision/DynamicDecision.js +10 -0
  242. package/build/legacy/layout/decision/DynamicDecision.spec.js +146 -0
  243. package/build/legacy/layout/divider/DynamicDivider.js +9 -0
  244. package/build/legacy/layout/divider/DynamicDivider.spec.js +17 -0
  245. package/build/legacy/layout/external/DynamicExternal.js +32 -0
  246. package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
  247. package/build/legacy/layout/external/DynamicExternal.spec.js +264 -0
  248. package/build/legacy/layout/form/DynamicForm.js +22 -0
  249. package/build/legacy/layout/form/DynamicForm.spec.js +74 -0
  250. package/build/legacy/layout/heading/DynamicHeading.js +40 -0
  251. package/build/legacy/layout/heading/DynamicHeading.spec.js +14 -0
  252. package/build/legacy/layout/icon/DynamicIcon.js +17 -0
  253. package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
  254. package/build/legacy/layout/icon/FlagIcon.js +11 -0
  255. package/build/legacy/layout/icon/NamedIcon.js +19 -0
  256. package/build/legacy/layout/image/DynamicImage.js +112 -0
  257. package/build/legacy/layout/index.js +20 -0
  258. package/build/legacy/layout/instructions/DynamicInstructions.js +19 -0
  259. package/build/legacy/layout/list/DynamicStatusList.js +37 -0
  260. package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
  261. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
  262. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
  263. package/build/legacy/layout/markdown/DynamicMarkdown.js +12 -0
  264. package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
  265. package/build/legacy/layout/modal/DynamicModal.js +26 -0
  266. package/build/legacy/layout/paragraph/DynamicParagraph.js +35 -0
  267. package/build/legacy/layout/paragraph/DynamicParagraph.spec.js +109 -0
  268. package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
  269. package/build/legacy/layout/review/DynamicReview.js +59 -0
  270. package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
  271. package/build/legacy/layout/search/DynamicSearch.js +83 -0
  272. package/build/legacy/layout/search/SearchInput.js +6 -0
  273. package/build/legacy/layout/search/SearchResults.js +20 -0
  274. package/build/legacy/layout/search/useSearch.js +137 -0
  275. package/build/legacy/layout/utils/getNavigationOptionMedia.js +17 -0
  276. package/build/legacy/layout/utils/index.js +32 -0
  277. package/build/legacy/step/cameraStep/CameraStep.js +124 -0
  278. package/build/legacy/step/cameraStep/index.js +1 -0
  279. package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
  280. package/build/legacy/step/externalConfirmationStep/index.js +1 -0
  281. package/build/legacy/step/index.js +3 -0
  282. package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
  283. package/build/legacy/step/layoutStep/LayoutStep.spec.js +189 -0
  284. package/build/legacy/step/layoutStep/index.js +1 -0
  285. package/build/legacy/step/layoutStep/utils/index.js +2 -0
  286. package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
  287. package/build/legacy/step/layoutStep/utils/inline-reference-utils.spec.js +296 -0
  288. package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
  289. package/build/legacy/step/layoutStep/utils/layout-utils.spec.js +558 -0
  290. package/build/legacy/test-utils/DynamicFlowProviders.js +8 -0
  291. package/build/legacy/test-utils/index.js +4 -0
  292. package/build/legacy/test-utils/legacy-utils.js +69 -0
  293. package/build/legacy/test-utils/log-utils.js +9 -0
  294. package/build/main.js +786 -819
  295. package/build/main.min.js +1 -1
  296. package/build/main.mjs +765 -798
  297. package/build/revamp/DynamicFlowCore.js +25 -0
  298. package/build/revamp/DynamicFlowWise.js +32 -0
  299. package/build/revamp/DynamicFlowWise.spec.js +105 -0
  300. package/build/revamp/DynamicFragmentWise.js +83 -0
  301. package/build/revamp/domain/components/AlertComponent.js +50 -0
  302. package/build/revamp/domain/components/AllOfComponent.js +72 -0
  303. package/build/revamp/domain/components/BooleanInputComponent.js +109 -0
  304. package/build/revamp/domain/components/BoxComponent.js +65 -0
  305. package/build/revamp/domain/components/ButtonComponent.js +50 -0
  306. package/build/revamp/domain/components/ColumnsComponent.js +74 -0
  307. package/build/revamp/domain/components/ConstComponent.js +50 -0
  308. package/build/revamp/domain/components/ContainerComponent.js +65 -0
  309. package/build/revamp/domain/components/DateInputComponent.js +128 -0
  310. package/build/revamp/domain/components/DecisionComponent.js +50 -0
  311. package/build/revamp/domain/components/DividerComponent.js +50 -0
  312. package/build/revamp/domain/components/FormComponent.js +65 -0
  313. package/build/revamp/domain/components/HeadingComponent.js +50 -0
  314. package/build/revamp/domain/components/ImageComponent.js +50 -0
  315. package/build/revamp/domain/components/InstructionsComponent.js +50 -0
  316. package/build/revamp/domain/components/IntegerInputComponent.js +129 -0
  317. package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
  318. package/build/revamp/domain/components/MarkdownComponent.js +50 -0
  319. package/build/revamp/domain/components/ModalComponent.js +65 -0
  320. package/build/revamp/domain/components/MultiSelectInputComponent.js +148 -0
  321. package/build/revamp/domain/components/MultiUploadInputComponent.js +192 -0
  322. package/build/revamp/domain/components/NumberInputComponent.js +129 -0
  323. package/build/revamp/domain/components/ObjectComponent.js +104 -0
  324. package/build/revamp/domain/components/ParagraphComponent.js +50 -0
  325. package/build/revamp/domain/components/ReviewComponent.js +50 -0
  326. package/build/revamp/domain/components/SelectInputComponent.js +140 -0
  327. package/build/revamp/domain/components/StatusListComponent.js +50 -0
  328. package/build/revamp/domain/components/StepDomainComponent.js +87 -0
  329. package/build/revamp/domain/components/TextInputComponent.js +129 -0
  330. package/build/revamp/domain/components/UploadInputComponent.js +154 -0
  331. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +150 -0
  332. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +146 -0
  333. package/build/revamp/domain/components/searchComponent/SearchComponent.js +111 -0
  334. package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
  335. package/build/revamp/domain/components/utils/component-utils.js +18 -0
  336. package/build/revamp/domain/components/utils/debounce.js +38 -0
  337. package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
  338. package/build/revamp/domain/components/utils/file-utils.js +65 -0
  339. package/build/revamp/domain/components/utils/file-utils.spec.js +81 -0
  340. package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +31 -0
  341. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +41 -0
  342. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +119 -0
  343. package/build/revamp/domain/components/utils/local-value.js +11 -0
  344. package/build/revamp/domain/features/events.js +1 -0
  345. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +134 -0
  346. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +200 -0
  347. package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
  348. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
  349. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
  350. package/build/revamp/domain/features/polling/getStepPolling.js +82 -0
  351. package/build/revamp/domain/features/polling/getStepPolling.spec.js +170 -0
  352. package/build/revamp/domain/features/refresh/getPerformRefresh.js +16 -0
  353. package/build/revamp/domain/features/search/getPerformSearchFunction.js +104 -0
  354. package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
  355. package/build/revamp/domain/features/summary/summary-utils.js +39 -0
  356. package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
  357. package/build/revamp/domain/features/utils/http-utils.js +34 -0
  358. package/build/revamp/domain/features/utils/response-utils.js +9 -0
  359. package/build/revamp/domain/features/validation/spec-utils.js +16 -0
  360. package/build/revamp/domain/features/validation/validation-functions.js +12 -0
  361. package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
  362. package/build/revamp/domain/features/validation/value-checks.js +111 -0
  363. package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
  364. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +95 -0
  365. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +178 -0
  366. package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
  367. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
  368. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
  369. package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
  370. package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
  371. package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +45 -0
  372. package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
  373. package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +40 -0
  374. package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
  375. package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +27 -0
  376. package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
  377. package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
  378. package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
  379. package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
  380. package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
  381. package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
  382. package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
  383. package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
  384. package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
  385. package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
  386. package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
  387. package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
  388. package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
  389. package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
  390. package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
  391. package/build/revamp/domain/mappers/mapStepToComponent.js +133 -0
  392. package/build/revamp/domain/mappers/mapStepToComponent.spec.js +162 -0
  393. package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
  394. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +42 -0
  395. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiSelectComponent.js +54 -0
  396. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +64 -0
  397. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +66 -0
  398. package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
  399. package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
  400. package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
  401. package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
  402. package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
  403. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +41 -0
  404. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
  405. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
  406. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
  407. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
  408. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
  409. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
  410. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
  411. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +37 -0
  412. package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
  413. package/build/revamp/domain/mappers/schema/types.js +1 -0
  414. package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
  415. package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
  416. package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
  417. package/build/revamp/domain/mappers/types.js +1 -0
  418. package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
  419. package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
  420. package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
  421. package/build/revamp/domain/mappers/utils/inlineAction.js +23 -0
  422. package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
  423. package/build/revamp/domain/types.js +1 -0
  424. package/build/revamp/flow/executeRefresh.js +97 -0
  425. package/build/revamp/flow/executeSubmission.js +160 -0
  426. package/build/revamp/flow/getResponseType.js +76 -0
  427. package/build/revamp/flow/response-utils.js +92 -0
  428. package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
  429. package/build/revamp/renderers/getRenderFunction.js +55 -0
  430. package/build/revamp/renderers/getSchemaErrorMessageFunction.js +90 -0
  431. package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
  432. package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
  433. package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
  434. package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
  435. package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
  436. package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
  437. package/build/revamp/renderers/mappers/componentToRendererProps.js +108 -0
  438. package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
  439. package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
  440. package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
  441. package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
  442. package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
  443. package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
  444. package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
  445. package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
  446. package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
  447. package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
  448. package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
  449. package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
  450. package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
  451. package/build/revamp/renderers/mappers/multiSelectComponentToProps.js +28 -0
  452. package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
  453. package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
  454. package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
  455. package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
  456. package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
  457. package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
  458. package/build/revamp/renderers/mappers/searchComponentToProps.js +53 -0
  459. package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
  460. package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
  461. package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
  462. package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
  463. package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
  464. package/build/revamp/renderers/stepComponentToProps.js +16 -0
  465. package/build/revamp/renderers/types.js +1 -0
  466. package/build/revamp/stories/dev-tools/ActionResponse.story.js +101 -0
  467. package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +314 -0
  468. package/build/revamp/stories/dev-tools/EditableStep.story.js +71 -0
  469. package/build/revamp/stories/dev-tools/ErrorHandling.story.js +149 -0
  470. package/build/revamp/stories/dev-tools/External.story.js +83 -0
  471. package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +123 -0
  472. package/build/revamp/stories/dev-tools/PersistAsync.story.js +168 -0
  473. package/build/revamp/stories/dev-tools/Polling.story.js +79 -0
  474. package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +309 -0
  475. package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +1004 -0
  476. package/build/revamp/stories/dev-tools/SearchFeature.story.js +260 -0
  477. package/build/revamp/stories/dev-tools/ServerTest.story.js +86 -0
  478. package/build/revamp/stories/dev-tools/Upload.story.js +221 -0
  479. package/build/revamp/stories/dev-tools/ValidationAsync.story.js +161 -0
  480. package/build/revamp/stories/examples/KYCCameraStep.story.js +83 -0
  481. package/build/revamp/stories/examples/ObjectConst.story.js +153 -0
  482. package/build/revamp/stories/examples/OneOfInitialisation.story.js +102 -0
  483. package/build/revamp/stories/utils/fixtureHttpClient.js +130 -0
  484. package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
  485. package/build/revamp/stories/visual-tests/VisualTests.story.js +114 -0
  486. package/build/revamp/test-utils/component-utils.js +19 -0
  487. package/build/revamp/test-utils/step-utils.js +6 -0
  488. package/build/revamp/tests/ImageRenderer.spec.js +108 -0
  489. package/build/revamp/tests/InitialAction.spec.js +299 -0
  490. package/build/revamp/tests/InitialStep.spec.js +104 -0
  491. package/build/revamp/tests/Logging.spec.js +112 -0
  492. package/build/revamp/tests/OneOfInitialisation.spec.js +876 -0
  493. package/build/revamp/tests/Polling.spec.js +611 -0
  494. package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +322 -0
  495. package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +447 -0
  496. package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +447 -0
  497. package/build/revamp/tests/RefreshOnChangePreserve.spec.js +341 -0
  498. package/build/revamp/tests/Rerendering.spec.js +156 -0
  499. package/build/revamp/tests/SegmentedControl.spec.js +48 -0
  500. package/build/revamp/tests/Submission.ResponseHandling.spec.js +697 -0
  501. package/build/revamp/tests/Submission.spec.js +399 -0
  502. package/build/revamp/tests/legacy/Actions.spec.js +242 -0
  503. package/build/revamp/tests/legacy/BackButton.spec.js +189 -0
  504. package/build/revamp/tests/legacy/HiddenSchemas.spec.js +312 -0
  505. package/build/revamp/tests/legacy/MultiSelect.spec.js +753 -0
  506. package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +447 -0
  507. package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +339 -0
  508. package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +385 -0
  509. package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +352 -0
  510. package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +623 -0
  511. package/build/revamp/tests/legacy/Search.spec.js +501 -0
  512. package/build/revamp/tests/legacy/ValidationAsync.spec.js +452 -0
  513. package/build/revamp/tests/legacy/useExternal.spec.js +235 -0
  514. package/build/revamp/types.js +1 -0
  515. package/build/revamp/useDynamicFlowCore.js +285 -0
  516. package/build/revamp/utils/component-utils.js +86 -0
  517. package/build/revamp/utils/component-utils.spec.js +385 -0
  518. package/build/revamp/utils/findComponent.js +29 -0
  519. package/build/revamp/utils/findComponent.spec.js +92 -0
  520. package/build/revamp/utils/type-utils.js +59 -0
  521. package/build/revamp/utils/type-validators.js +16 -0
  522. package/build/revamp/utils/type-validators.spec.js +163 -0
  523. package/build/revamp/utils/useStableCallback.js +21 -0
  524. package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
  525. package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
  526. package/build/revamp/wise/renderers/BoxRenderer.js +19 -0
  527. package/build/revamp/wise/renderers/ButtonRenderer.js +53 -0
  528. package/build/revamp/wise/renderers/ColumnsRenderer.js +14 -0
  529. package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
  530. package/build/revamp/wise/renderers/DecisionRenderer.js +18 -0
  531. package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
  532. package/build/revamp/wise/renderers/FormRenderer.js +10 -0
  533. package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
  534. package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
  535. package/build/revamp/wise/renderers/ImageRenderer.js +112 -0
  536. package/build/revamp/wise/renderers/InstructionsRenderer.js +23 -0
  537. package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
  538. package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
  539. package/build/revamp/wise/renderers/MarkdownRenderer.js +11 -0
  540. package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
  541. package/build/revamp/wise/renderers/MultiSelectInputRenderer.js +84 -0
  542. package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +63 -0
  543. package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
  544. package/build/revamp/wise/renderers/ParagraphRenderer.js +45 -0
  545. package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
  546. package/build/revamp/wise/renderers/ReviewRenderer.js +50 -0
  547. package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +59 -0
  548. package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +11 -0
  549. package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +63 -0
  550. package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +21 -0
  551. package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +16 -0
  552. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +14 -0
  553. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.spec.js +76 -0
  554. package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +21 -0
  555. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +33 -0
  556. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
  557. package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +16 -0
  558. package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +22 -0
  559. package/build/revamp/wise/renderers/StatusListRenderer.js +21 -0
  560. package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
  561. package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
  562. package/build/revamp/wise/renderers/components/FieldInput.js +9 -0
  563. package/build/revamp/wise/renderers/components/Help.js +10 -0
  564. package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
  565. package/build/revamp/wise/renderers/components/UploadFieldInput.js +14 -0
  566. package/build/revamp/wise/renderers/components/VariableDateInput.js +30 -0
  567. package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
  568. package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
  569. package/build/revamp/wise/renderers/components/icon/FlagIcon.js +11 -0
  570. package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
  571. package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +20 -0
  572. package/build/revamp/wise/renderers/getWiseRenderers.js +61 -0
  573. package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
  574. package/build/revamp/wise/renderers/step/BackButton.js +11 -0
  575. package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +20 -0
  576. package/build/revamp/wise/renderers/step/KYCCameraStepRenderer.js +144 -0
  577. package/build/revamp/wise/renderers/step/StepRenderer.js +31 -0
  578. package/build/revamp/wise/renderers/step/StepRendererContext.js +11 -0
  579. package/build/revamp/wise/renderers/step/useExternal.js +15 -0
  580. package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
  581. package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
  582. package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
  583. package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
  584. package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
  585. package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
  586. package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
  587. package/build/test-utils/NeptuneProviders.js +23 -0
  588. package/build/test-utils/fetch-utils.js +104 -0
  589. package/build/test-utils/index.js +2 -0
  590. package/build/test-utils/rtl-utils.js +20 -0
  591. package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.d.ts +3 -2
  592. package/build/types/common/cameraCapture/components/index.d.ts +3 -0
  593. package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +2 -2
  594. package/build/types/common/cameraCapture/index.d.ts +1 -0
  595. package/build/types/common/cameraCapture/screens/index.d.ts +1 -0
  596. package/build/types/common/cameraCapture/tracking/index.d.ts +8 -0
  597. package/build/types/legacy/common/utils/index.d.ts +5 -5
  598. package/build/types/legacy/dynamic-flow-types.d.ts +2 -1
  599. package/build/types/revamp/domain/components/StepDomainComponent.d.ts +6 -4
  600. package/build/types/revamp/domain/components/utils/isPartialLocalValueMatch.d.ts +1 -1
  601. package/build/types/revamp/renderers/stepComponentToProps.d.ts +1 -1
  602. package/build/types/revamp/renderers/types.d.ts +5 -1
  603. package/build/types/revamp/wise/renderers/step/KYCCameraStepRenderer.d.ts +2 -0
  604. package/package.json +5 -4
  605. package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +0 -8
  606. /package/build/{types/legacy/step/cameraStep/cameraCapture/components/index.d.ts → common/cameraCapture/components/index.js} +0 -0
  607. /package/build/{types/legacy/step/cameraStep/cameraCapture/index.d.ts → common/cameraCapture/index.js} +0 -0
  608. /package/build/{types/legacy/step/cameraStep/cameraCapture/screens/index.d.ts → common/cameraCapture/screens/index.js} +0 -0
  609. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/CameraCapture.messages.d.ts +0 -0
  610. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/bottomBar/BottomBar.d.ts +0 -0
  611. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.d.ts +0 -0
  612. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.d.ts +0 -0
  613. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/hooks/useVideoConstraints.d.ts +0 -0
  614. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/overlay/Overlay.d.ts +0 -0
  615. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.d.ts +0 -0
  616. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/types/index.d.ts +0 -0
  617. /package/build/types/{legacy/step/cameraStep → common}/cameraCapture/utils/index.d.ts +0 -0
  618. /package/build/types/{legacy/common → common/cameraCapture}/utils/mobile-utils.d.ts +0 -0
  619. /package/build/types/{legacy/common → common}/utils/debounce.d.ts +0 -0
package/build/main.js CHANGED
@@ -1291,16 +1291,28 @@ var isStringSchemaWithUpload = (schema) => isStringSchema(schema) && schema.form
1291
1291
  var isSchemaWithPersistAsync = (schema) => "persistAsync" in schema && !isNullish(schema.persistAsync);
1292
1292
 
1293
1293
  // src/revamp/renderers/stepComponentToProps.ts
1294
- var stepComponentToProps = ({ back, description, error, external, loadingState, title, trackEvent }, children) => ({
1294
+ var stepComponentToProps = ({
1295
+ back,
1296
+ description,
1297
+ error,
1298
+ external,
1299
+ loadingState,
1300
+ step,
1301
+ title,
1302
+ trackEvent,
1303
+ onAction
1304
+ }, children) => ({
1295
1305
  type: "step",
1296
1306
  back,
1297
1307
  description,
1298
1308
  error,
1299
1309
  external,
1300
1310
  loadingState,
1311
+ step,
1301
1312
  title,
1313
+ children,
1302
1314
  trackEvent,
1303
- children
1315
+ onAction
1304
1316
  });
1305
1317
 
1306
1318
  // src/revamp/renderers/mappers/alertComponentToProps.ts
@@ -5508,38 +5520,24 @@ var imageSchema = z.object({
5508
5520
  url: z.string(),
5509
5521
  accessibilityDescription: z.string().optional()
5510
5522
  });
5511
- var httpMethodSchema = z.union([
5512
- z.literal("GET"),
5513
- z.literal("POST"),
5514
- z.literal("PUT"),
5515
- z.literal("PATCH"),
5516
- z.literal("DELETE")
5517
- ]);
5518
- var iconNamedSchema = z.object({
5519
- name: z.string()
5523
+ var summaryProviderSchema = z.object({
5524
+ providesTitle: z.boolean().optional(),
5525
+ providesDescription: z.boolean().optional(),
5526
+ providesIcon: z.boolean().optional(),
5527
+ providesImage: z.boolean().optional()
5520
5528
  });
5521
- var contextSchema = z.union([
5522
- z.literal("positive"),
5523
- z.literal("neutral"),
5524
- z.literal("warning"),
5525
- z.literal("negative"),
5526
- z.literal("success"),
5527
- z.literal("failure"),
5528
- z.literal("info"),
5529
- z.literal("primary")
5530
- ]);
5531
- var iconTextSchema = z.object({
5532
- text: z.string()
5529
+ var jsonElementSchema = z.lazy(
5530
+ () => z.union([
5531
+ z.string(),
5532
+ z.number(),
5533
+ z.boolean(),
5534
+ z.record(jsonElementSchema),
5535
+ z.array(jsonElementSchema)
5536
+ ]).nullable()
5537
+ );
5538
+ var helpSchema = z.object({
5539
+ markdown: z.string()
5533
5540
  });
5534
- var sizeSchema = z.union([
5535
- z.literal("xs"),
5536
- z.literal("sm"),
5537
- z.literal("md"),
5538
- z.literal("lg"),
5539
- z.literal("xl")
5540
- ]);
5541
- var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5542
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5543
5541
  var autocompleteTokenSchema = z.union([
5544
5542
  z.literal("on"),
5545
5543
  z.literal("name"),
@@ -5605,59 +5603,84 @@ var autocompleteTokenSchema = z.union([
5605
5603
  z.literal("fax"),
5606
5604
  z.literal("pager")
5607
5605
  ]);
5608
- var loadingIndicatorLayoutSchema = z.object({
5609
- type: z.literal("loading-indicator"),
5610
- size: sizeSchema.optional(),
5611
- control: z.string().optional(),
5612
- margin: sizeSchema.optional()
5613
- });
5614
- var alertLayoutSchema = z.object({
5615
- type: z.literal("alert"),
5616
- markdown: z.string(),
5617
- context: contextSchema.optional(),
5618
- control: z.string().optional(),
5619
- margin: sizeSchema.optional()
5620
- });
5621
- var paragraphLayoutSchema = z.object({
5622
- type: z.literal("paragraph"),
5623
- text: z.string(),
5624
- align: alignSchema.optional(),
5625
- control: z.string().optional(),
5626
- margin: sizeSchema.optional()
5606
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5607
+ var stringSchemaFormatSchema = z.union([
5608
+ z.literal("date"),
5609
+ z.literal("email"),
5610
+ z.literal("numeric"),
5611
+ z.literal("password"),
5612
+ z.literal("phone-number"),
5613
+ z.literal("base64url")
5614
+ ]);
5615
+ var externalSchema = z.object({
5616
+ url: z.string()
5627
5617
  });
5628
- var dividerLayoutSchema = z.object({
5629
- type: z.literal("divider"),
5630
- control: z.string().optional(),
5631
- margin: sizeSchema.optional()
5618
+ var stepErrorSchema = z.object({
5619
+ error: z.string().optional(),
5620
+ validation: jsonElementSchema.optional()
5632
5621
  });
5622
+ var httpMethodSchema = z.union([
5623
+ z.literal("GET"),
5624
+ z.literal("POST"),
5625
+ z.literal("PUT"),
5626
+ z.literal("PATCH"),
5627
+ z.literal("DELETE")
5628
+ ]);
5629
+ var actionTypeSchema = z.union([
5630
+ z.literal("primary"),
5631
+ z.literal("secondary"),
5632
+ z.literal("link"),
5633
+ z.literal("positive"),
5634
+ z.literal("negative")
5635
+ ]);
5636
+ var navigationStackBehaviorSchema = z.union([
5637
+ z.literal("default"),
5638
+ z.literal("remove-previous"),
5639
+ z.literal("remove-all"),
5640
+ z.literal("replace-current")
5641
+ ]);
5642
+ var sizeSchema = z.union([
5643
+ z.literal("xs"),
5644
+ z.literal("sm"),
5645
+ z.literal("md"),
5646
+ z.literal("lg"),
5647
+ z.literal("xl")
5648
+ ]);
5633
5649
  var listLayoutStatusSchema = z.union([
5634
5650
  z.literal("warning"),
5635
5651
  z.literal("neutral"),
5636
5652
  z.literal("positive")
5637
5653
  ]);
5654
+ var contextSchema = z.union([
5655
+ z.literal("positive"),
5656
+ z.literal("neutral"),
5657
+ z.literal("warning"),
5658
+ z.literal("negative"),
5659
+ z.literal("success"),
5660
+ z.literal("failure"),
5661
+ z.literal("info"),
5662
+ z.literal("primary")
5663
+ ]);
5664
+ var modalLayoutTriggerSchema = z.object({
5665
+ title: z.string()
5666
+ });
5638
5667
  var formLayoutSchemaReferenceSchema = z.object({
5639
5668
  $ref: z.string()
5640
5669
  });
5641
- var imageLayoutSchema = z.object({
5642
- type: z.literal("image"),
5643
- text: z.string().optional(),
5644
- url: z.string(),
5645
- size: sizeSchema.optional(),
5646
- accessibilityDescription: z.string().optional(),
5670
+ var dividerLayoutSchema = z.object({
5671
+ type: z.literal("divider"),
5647
5672
  control: z.string().optional(),
5648
5673
  margin: sizeSchema.optional()
5649
5674
  });
5650
- var statusListLayoutStatusSchema = z.union([
5651
- z.literal("not-done"),
5652
- z.literal("pending"),
5653
- z.literal("done")
5654
- ]);
5655
5675
  var instructionsLayoutItemSchema = z.object({
5656
5676
  text: z.string(),
5657
5677
  context: contextSchema
5658
5678
  });
5659
- var modalLayoutTriggerSchema = z.object({
5660
- title: z.string()
5679
+ var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
5680
+ var reviewLayoutFieldSchema = z.object({
5681
+ label: z.string(),
5682
+ value: z.string(),
5683
+ help: helpSchema.optional()
5661
5684
  });
5662
5685
  var searchLayoutSchema = z.object({
5663
5686
  type: z.literal("search"),
@@ -5669,17 +5692,21 @@ var searchLayoutSchema = z.object({
5669
5692
  control: z.string().optional(),
5670
5693
  margin: sizeSchema.optional()
5671
5694
  });
5672
- var infoLayoutSchema = z.object({
5673
- type: z.literal("info"),
5674
- markdown: z.string(),
5695
+ var paragraphLayoutSchema = z.object({
5696
+ type: z.literal("paragraph"),
5697
+ text: z.string(),
5675
5698
  align: alignSchema.optional(),
5676
5699
  control: z.string().optional(),
5677
5700
  margin: sizeSchema.optional()
5678
5701
  });
5679
- var formLayoutSchema = z.object({
5680
- type: z.literal("form"),
5681
- schema: formLayoutSchemaReferenceSchema.optional(),
5682
- schemaId: z.string(),
5702
+ var columnsLayoutBiasSchema = z.union([
5703
+ z.literal("none"),
5704
+ z.literal("left"),
5705
+ z.literal("right")
5706
+ ]);
5707
+ var loadingIndicatorLayoutSchema = z.object({
5708
+ type: z.literal("loading-indicator"),
5709
+ size: sizeSchema.optional(),
5683
5710
  control: z.string().optional(),
5684
5711
  margin: sizeSchema.optional()
5685
5712
  });
@@ -5691,6 +5718,11 @@ var headingLayoutSchema = z.object({
5691
5718
  control: z.string().optional(),
5692
5719
  margin: sizeSchema.optional()
5693
5720
  });
5721
+ var statusListLayoutStatusSchema = z.union([
5722
+ z.literal("not-done"),
5723
+ z.literal("pending"),
5724
+ z.literal("done")
5725
+ ]);
5694
5726
  var markdownLayoutSchema = z.object({
5695
5727
  type: z.literal("markdown"),
5696
5728
  content: z.string(),
@@ -5698,13 +5730,11 @@ var markdownLayoutSchema = z.object({
5698
5730
  control: z.string().optional(),
5699
5731
  margin: sizeSchema.optional()
5700
5732
  });
5701
- var columnsLayoutBiasSchema = z.union([
5702
- z.literal("none"),
5703
- z.literal("left"),
5704
- z.literal("right")
5705
- ]);
5706
- var helpSchema = z.object({
5707
- markdown: z.string()
5733
+ var iconTextSchema = z.object({
5734
+ text: z.string()
5735
+ });
5736
+ var iconNamedSchema = z.object({
5737
+ name: z.string()
5708
5738
  });
5709
5739
  var searchSearchRequestSchema = z.object({
5710
5740
  url: z.string(),
@@ -5712,153 +5742,25 @@ var searchSearchRequestSchema = z.object({
5712
5742
  param: z.string(),
5713
5743
  query: z.string()
5714
5744
  });
5715
- var jsonElementSchema = z.lazy(
5716
- () => z.union([
5717
- z.string(),
5718
- z.number(),
5719
- z.boolean(),
5720
- z.record(jsonElementSchema),
5721
- z.array(jsonElementSchema)
5722
- ]).nullable()
5723
- );
5724
- var externalSchema = z.object({
5725
- url: z.string()
5726
- });
5727
- var stepErrorSchema = z.object({
5745
+ var errorResponseBodySchema = z.object({
5746
+ refreshFormUrl: z.string().optional(),
5747
+ analytics: z.record(z.string()).optional(),
5728
5748
  error: z.string().optional(),
5729
- validation: jsonElementSchema.optional()
5730
- });
5731
- var stringSchemaFormatSchema = z.union([
5732
- z.literal("date"),
5733
- z.literal("email"),
5734
- z.literal("numeric"),
5735
- z.literal("password"),
5736
- z.literal("phone-number"),
5737
- z.literal("base64url")
5738
- ]);
5739
- var summarySummariserSchema = z.object({
5740
- defaultTitle: z.string().optional(),
5741
- defaultDescription: z.string().optional(),
5742
- defaultIcon: iconSchema.optional(),
5743
- defaultImage: imageLayoutSchema.optional(),
5744
- providesTitle: z.boolean().optional(),
5745
- providesDescription: z.boolean().optional(),
5746
- providesIcon: z.boolean().optional(),
5747
- providesImage: z.boolean().optional()
5749
+ validation: jsonElementSchema.optional(),
5750
+ refreshUrl: z.string().optional()
5748
5751
  });
5752
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
5749
5753
  var validateAsyncSchema = z.object({
5750
5754
  param: z.string(),
5751
5755
  method: httpMethodSchema,
5752
5756
  url: z.string()
5753
5757
  });
5754
- var summaryProviderSchema = z.object({
5755
- providesTitle: z.boolean().optional(),
5756
- providesDescription: z.boolean().optional(),
5757
- providesIcon: z.boolean().optional(),
5758
- providesImage: z.boolean().optional()
5759
- });
5760
- var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
5761
- var navigationStackBehaviorSchema = z.union([
5762
- z.literal("default"),
5763
- z.literal("remove-previous"),
5764
- z.literal("remove-all"),
5765
- z.literal("replace-current")
5766
- ]);
5767
- var actionTypeSchema = z.union([
5768
- z.literal("primary"),
5769
- z.literal("secondary"),
5770
- z.literal("link"),
5771
- z.literal("positive"),
5772
- z.literal("negative")
5773
- ]);
5774
- var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5775
- var actionSchema = z.object({
5776
- title: z.string().optional(),
5777
- type: actionTypeSchema.optional(),
5778
- disabled: z.boolean().optional(),
5779
- $id: z.string().optional(),
5780
- $ref: z.string().optional(),
5781
- id: z.string().optional(),
5782
- url: z.string().optional(),
5783
- method: httpMethodSchema.optional(),
5784
- exit: z.boolean().optional(),
5785
- result: jsonElementSchema.optional(),
5786
- data: jsonElementSchema.optional(),
5787
- timeout: z.number().optional(),
5788
- skipValidation: z.boolean().optional()
5789
- });
5790
- var listLayoutItemSchema = z.object({
5791
- title: z.string(),
5792
- description: z.string().optional(),
5793
- icon: iconSchema,
5794
- status: listLayoutStatusSchema.optional()
5795
- });
5796
- var decisionLayoutOptionSchema = z.object({
5797
- action: actionSchema,
5798
- title: z.string(),
5799
- description: z.string().optional(),
5800
- disabled: z.boolean().optional(),
5801
- icon: iconSchema.optional(),
5802
- image: imageLayoutSchema.optional()
5803
- });
5804
- var statusListLayoutItemSchema = z.object({
5805
- title: z.string(),
5806
- description: z.string().optional(),
5807
- icon: iconSchema,
5808
- status: statusListLayoutStatusSchema.optional()
5809
- });
5810
- var instructionsLayoutSchema = z.object({
5811
- type: z.literal("instructions"),
5812
- title: z.string().optional(),
5813
- items: z.array(instructionsLayoutItemSchema),
5814
- control: z.string().optional(),
5815
- margin: sizeSchema.optional()
5816
- });
5817
- var buttonLayoutSchema = z.object({
5818
- type: z.literal("button"),
5819
- size: sizeSchema.optional(),
5820
- title: z.string().optional(),
5821
- action: actionSchema,
5822
- context: contextSchema.optional(),
5823
- disabled: z.boolean().optional(),
5824
- pinOrder: z.number().optional(),
5825
- control: z.string().optional(),
5826
- margin: sizeSchema.optional()
5827
- });
5828
- var reviewLayoutFieldSchema = z.object({
5829
- label: z.string(),
5830
- value: z.string(),
5831
- help: helpSchema.optional()
5832
- });
5833
- var searchResultSearchSchema = z.object({
5834
- type: z.literal("search"),
5835
- title: z.string(),
5836
- description: z.string().optional(),
5837
- icon: iconSchema.optional(),
5838
- image: imageLayoutSchema.optional(),
5839
- value: searchSearchRequestSchema
5840
- });
5841
- var searchResultActionSchema = z.object({
5842
- type: z.literal("action"),
5843
- title: z.string(),
5844
- description: z.string().optional(),
5845
- icon: iconSchema.optional(),
5846
- image: imageLayoutSchema.optional(),
5847
- value: actionSchema
5848
- });
5849
- var actionResponseBodySchema = z.object({
5850
- action: actionSchema
5851
- });
5852
- var errorResponseBodySchema = z.object({
5853
- refreshFormUrl: z.string().optional(),
5854
- analytics: z.record(z.string()).optional(),
5855
- error: z.string().optional(),
5856
- validation: jsonElementSchema.optional(),
5857
- refreshUrl: z.string().optional()
5858
- });
5859
- var linkHandlerSchema = z.object({
5860
- regexPattern: z.string(),
5861
- action: actionSchema
5758
+ var alertLayoutSchema = z.object({
5759
+ type: z.literal("alert"),
5760
+ markdown: z.string(),
5761
+ context: contextSchema.optional(),
5762
+ control: z.string().optional(),
5763
+ margin: sizeSchema.optional()
5862
5764
  });
5863
5765
  var blobSchemaSchema = z.object({
5864
5766
  type: z.literal("blob"),
@@ -5898,37 +5800,97 @@ var constSchemaSchema = z.object({
5898
5800
  analyticsId: z.string().optional(),
5899
5801
  disabled: z.boolean().optional()
5900
5802
  });
5901
- var pollingOnErrorSchema = z.object({
5803
+ var actionSchema = z.object({
5804
+ title: z.string().optional(),
5805
+ type: actionTypeSchema.optional(),
5806
+ disabled: z.boolean().optional(),
5807
+ $id: z.string().optional(),
5808
+ $ref: z.string().optional(),
5809
+ id: z.string().optional(),
5810
+ url: z.string().optional(),
5811
+ method: httpMethodSchema.optional(),
5812
+ exit: z.boolean().optional(),
5813
+ result: jsonElementSchema.optional(),
5814
+ data: jsonElementSchema.optional(),
5815
+ timeout: z.number().optional(),
5816
+ skipValidation: z.boolean().optional()
5817
+ });
5818
+ var linkHandlerSchema = z.object({
5819
+ regexPattern: z.string(),
5902
5820
  action: actionSchema
5903
5821
  });
5904
5822
  var navigationBackBehaviourSchema = z.object({
5905
5823
  title: z.string().optional(),
5906
5824
  action: actionSchema
5907
5825
  });
5908
- var reviewLayoutCallToActionSchema = z.object({
5909
- title: z.string(),
5826
+ var pollingOnErrorSchema = z.object({
5910
5827
  action: actionSchema
5911
5828
  });
5912
- var listLayoutSchema = z.object({
5913
- type: z.literal("list"),
5914
- items: z.array(listLayoutItemSchema),
5829
+ var imageLayoutSchema = z.object({
5830
+ type: z.literal("image"),
5831
+ text: z.string().optional(),
5832
+ url: z.string(),
5833
+ size: sizeSchema.optional(),
5834
+ accessibilityDescription: z.string().optional(),
5835
+ control: z.string().optional(),
5836
+ margin: sizeSchema.optional()
5837
+ });
5838
+ var decisionLayoutOptionSchema = z.object({
5839
+ action: actionSchema,
5840
+ title: z.string(),
5841
+ description: z.string().optional(),
5842
+ disabled: z.boolean().optional(),
5843
+ icon: iconSchema.optional(),
5844
+ image: imageLayoutSchema.optional()
5845
+ });
5846
+ var listLayoutItemSchema = z.object({
5847
+ title: z.string(),
5848
+ description: z.string().optional(),
5849
+ icon: iconSchema,
5850
+ status: listLayoutStatusSchema.optional()
5851
+ });
5852
+ var statusListLayoutItemSchema = z.object({
5853
+ title: z.string(),
5854
+ description: z.string().optional(),
5855
+ icon: iconSchema,
5856
+ status: statusListLayoutStatusSchema.optional()
5857
+ });
5858
+ var formLayoutSchema = z.object({
5859
+ type: z.literal("form"),
5860
+ schema: formLayoutSchemaReferenceSchema.optional(),
5861
+ schemaId: z.string(),
5862
+ control: z.string().optional(),
5863
+ margin: sizeSchema.optional()
5864
+ });
5865
+ var instructionsLayoutSchema = z.object({
5866
+ type: z.literal("instructions"),
5915
5867
  title: z.string().optional(),
5868
+ items: z.array(instructionsLayoutItemSchema),
5916
5869
  control: z.string().optional(),
5917
5870
  margin: sizeSchema.optional()
5918
5871
  });
5919
- var decisionLayoutSchema = z.object({
5920
- type: z.literal("decision"),
5921
- options: z.array(decisionLayoutOptionSchema),
5872
+ var infoLayoutSchema = z.object({
5873
+ type: z.literal("info"),
5874
+ markdown: z.string(),
5875
+ align: alignSchema.optional(),
5922
5876
  control: z.string().optional(),
5923
5877
  margin: sizeSchema.optional()
5924
5878
  });
5925
- var statusListLayoutSchema = z.object({
5926
- type: z.literal("status-list"),
5927
- items: z.array(statusListLayoutItemSchema),
5879
+ var buttonLayoutSchema = z.object({
5880
+ type: z.literal("button"),
5881
+ size: sizeSchema.optional(),
5928
5882
  title: z.string().optional(),
5883
+ action: actionSchema,
5884
+ context: contextSchema.optional(),
5885
+ disabled: z.boolean().optional(),
5886
+ pinOrder: z.number().optional(),
5929
5887
  control: z.string().optional(),
5930
5888
  margin: sizeSchema.optional()
5931
5889
  });
5890
+ var reviewLayoutCallToActionSchema = z.object({
5891
+ title: z.string(),
5892
+ action: actionSchema
5893
+ });
5932
5894
  var reviewLayoutSchema = z.object({
5933
5895
  type: z.literal("review"),
5934
5896
  orientation: z.string().optional(),
@@ -5939,7 +5901,35 @@ var reviewLayoutSchema = z.object({
5939
5901
  control: z.string().optional(),
5940
5902
  margin: sizeSchema.optional()
5941
5903
  });
5942
- var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
5904
+ var searchResultActionSchema = z.object({
5905
+ type: z.literal("action"),
5906
+ title: z.string(),
5907
+ description: z.string().optional(),
5908
+ icon: iconSchema.optional(),
5909
+ image: imageLayoutSchema.optional(),
5910
+ value: actionSchema
5911
+ });
5912
+ var searchResultSearchSchema = z.object({
5913
+ type: z.literal("search"),
5914
+ title: z.string(),
5915
+ description: z.string().optional(),
5916
+ icon: iconSchema.optional(),
5917
+ image: imageLayoutSchema.optional(),
5918
+ value: searchSearchRequestSchema
5919
+ });
5920
+ var actionResponseBodySchema = z.object({
5921
+ action: actionSchema
5922
+ });
5923
+ var summarySummariserSchema = z.object({
5924
+ defaultTitle: z.string().optional(),
5925
+ defaultDescription: z.string().optional(),
5926
+ defaultIcon: iconSchema.optional(),
5927
+ defaultImage: imageLayoutSchema.optional(),
5928
+ providesTitle: z.boolean().optional(),
5929
+ providesDescription: z.boolean().optional(),
5930
+ providesIcon: z.boolean().optional(),
5931
+ providesImage: z.boolean().optional()
5932
+ });
5943
5933
  var pollingSchema = z.object({
5944
5934
  url: z.string(),
5945
5935
  interval: z.number(),
@@ -5951,85 +5941,49 @@ var navigationSchema = z.object({
5951
5941
  back: navigationBackBehaviourSchema.optional(),
5952
5942
  stackBehavior: navigationStackBehaviorSchema.optional()
5953
5943
  });
5954
- var searchResponseBodySchema = z.object({
5955
- results: z.array(searchResultSchema)
5944
+ var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
5945
+ var decisionLayoutSchema = z.object({
5946
+ type: z.literal("decision"),
5947
+ options: z.array(decisionLayoutOptionSchema),
5948
+ control: z.string().optional(),
5949
+ margin: sizeSchema.optional()
5956
5950
  });
5957
- var layoutSchema = z.lazy(
5958
- () => z.union([
5959
- alertLayoutSchema,
5960
- boxLayoutSchema,
5961
- buttonLayoutSchema,
5962
- columnsLayoutSchema,
5963
- decisionLayoutSchema,
5964
- dividerLayoutSchema,
5965
- formLayoutSchema,
5966
- headingLayoutSchema,
5967
- imageLayoutSchema,
5968
- infoLayoutSchema,
5969
- instructionsLayoutSchema,
5970
- listLayoutSchema,
5971
- loadingIndicatorLayoutSchema,
5972
- markdownLayoutSchema,
5973
- modalLayoutSchema,
5974
- paragraphLayoutSchema,
5975
- reviewLayoutSchema,
5976
- searchLayoutSchema,
5977
- statusListLayoutSchema
5978
- ])
5979
- );
5980
- var boxLayoutSchema = z.lazy(
5981
- () => z.object({
5982
- type: z.literal("box"),
5983
- components: z.array(layoutSchema),
5984
- width: sizeSchema.optional(),
5985
- border: z.boolean().optional(),
5986
- control: z.string().optional(),
5987
- margin: sizeSchema.optional()
5988
- })
5989
- );
5990
- var columnsLayoutSchema = z.lazy(
5991
- () => z.object({
5992
- type: z.literal("columns"),
5993
- left: z.array(layoutSchema),
5994
- right: z.array(layoutSchema),
5995
- bias: columnsLayoutBiasSchema.optional(),
5996
- control: z.string().optional(),
5997
- margin: sizeSchema.optional()
5998
- })
5999
- );
6000
- var modalLayoutSchema = z.lazy(
6001
- () => z.object({
6002
- type: z.literal("modal"),
6003
- control: z.string().optional(),
6004
- margin: sizeSchema.optional(),
6005
- trigger: modalLayoutTriggerSchema,
6006
- content: modalLayoutContentSchema
6007
- })
6008
- );
6009
- var modalLayoutContentSchema = z.lazy(
6010
- () => z.object({
6011
- components: z.array(layoutSchema)
6012
- })
6013
- );
6014
- var stepSchema = z.lazy(
5951
+ var listLayoutSchema = z.object({
5952
+ type: z.literal("list"),
5953
+ items: z.array(listLayoutItemSchema),
5954
+ title: z.string().optional(),
5955
+ control: z.string().optional(),
5956
+ margin: sizeSchema.optional()
5957
+ });
5958
+ var statusListLayoutSchema = z.object({
5959
+ type: z.literal("status-list"),
5960
+ items: z.array(statusListLayoutItemSchema),
5961
+ title: z.string().optional(),
5962
+ control: z.string().optional(),
5963
+ margin: sizeSchema.optional()
5964
+ });
5965
+ var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
5966
+ var searchResponseBodySchema = z.object({
5967
+ results: z.array(searchResultSchema)
5968
+ });
5969
+ var arraySchemaTupleSchema = z.lazy(
6015
5970
  () => z.object({
6016
- key: z.string().optional(),
6017
- type: z.string().optional(),
5971
+ type: z.literal("array"),
5972
+ promoted: z.boolean().optional(),
5973
+ $id: z.string().optional(),
5974
+ items: z.array(schemaSchema),
5975
+ title: z.string().optional(),
6018
5976
  description: z.string().optional(),
6019
- actions: z.array(actionSchema).optional(),
6020
- refreshFormUrl: z.string().optional(),
6021
- id: z.string(),
6022
- title: z.string(),
6023
- schemas: z.array(schemaSchema),
6024
- layout: z.array(layoutSchema),
6025
- model: jsonElementSchema.optional(),
6026
- external: externalSchema.optional(),
6027
- polling: pollingSchema.optional(),
6028
- linkHandlers: z.array(linkHandlerSchema).optional(),
6029
- analytics: z.record(z.string()).optional(),
6030
- errors: stepErrorSchema.optional(),
6031
- navigation: navigationSchema.optional(),
6032
- refreshUrl: z.string().optional()
5977
+ control: z.string().optional(),
5978
+ hidden: z.boolean().optional(),
5979
+ icon: iconSchema.optional(),
5980
+ image: imageSchema.optional(),
5981
+ keywords: z.array(z.string()).optional(),
5982
+ summary: summaryProviderSchema.optional(),
5983
+ analyticsId: z.string().optional(),
5984
+ persistAsync: persistAsyncSchema.optional(),
5985
+ validationAsync: validateAsyncSchema.optional(),
5986
+ alert: alertLayoutSchema.optional()
6033
5987
  })
6034
5988
  );
6035
5989
  var schemaSchema = z.lazy(
@@ -6046,6 +6000,94 @@ var schemaSchema = z.lazy(
6046
6000
  stringSchemaSchema
6047
6001
  ])
6048
6002
  );
6003
+ var persistAsyncSchema = z.lazy(
6004
+ () => z.object({
6005
+ param: z.string(),
6006
+ idProperty: z.string(),
6007
+ schema: schemaSchema,
6008
+ url: z.string(),
6009
+ method: httpMethodSchema
6010
+ })
6011
+ );
6012
+ var oneOfSchemaSchema = z.lazy(
6013
+ () => z.object({
6014
+ autofillProvider: z.string().optional(),
6015
+ promoted: z.boolean().optional(),
6016
+ refreshFormOnChange: z.boolean().optional(),
6017
+ refreshUrl: z.string().optional(),
6018
+ refreshFormUrl: z.string().optional(),
6019
+ promotion: jsonElementSchema.optional(),
6020
+ oneOf: z.array(schemaSchema),
6021
+ placeholder: z.string().optional(),
6022
+ $id: z.string().optional(),
6023
+ title: z.string().optional(),
6024
+ description: z.string().optional(),
6025
+ control: z.string().optional(),
6026
+ default: jsonElementSchema.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
+ refreshStepOnChange: z.boolean().optional(),
6034
+ alert: alertLayoutSchema.optional(),
6035
+ help: helpSchema.optional(),
6036
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6037
+ autofillKey: z.string().optional(),
6038
+ validationMessages: z.record(z.string()).optional(),
6039
+ disabled: z.boolean().optional()
6040
+ })
6041
+ );
6042
+ var objectSchemaSchema = z.lazy(
6043
+ () => z.object({
6044
+ type: z.literal("object"),
6045
+ disabled: z.boolean().optional(),
6046
+ promoted: z.boolean().optional(),
6047
+ help: helpSchema.optional(),
6048
+ properties: z.record(schemaSchema),
6049
+ displayOrder: z.array(z.string()),
6050
+ required: z.array(z.string()).optional(),
6051
+ $id: z.string().optional(),
6052
+ title: z.string().optional(),
6053
+ description: z.string().optional(),
6054
+ control: z.string().optional(),
6055
+ hidden: z.boolean().optional(),
6056
+ icon: iconSchema.optional(),
6057
+ image: imageSchema.optional(),
6058
+ keywords: z.array(z.string()).optional(),
6059
+ summary: summaryProviderSchema.optional(),
6060
+ analyticsId: z.string().optional(),
6061
+ alert: alertLayoutSchema.optional()
6062
+ })
6063
+ );
6064
+ var arraySchemaListSchema = z.lazy(
6065
+ () => z.object({
6066
+ type: z.literal("array"),
6067
+ promoted: z.boolean().optional(),
6068
+ $id: z.string().optional(),
6069
+ items: schemaSchema,
6070
+ addItemTitle: z.string(),
6071
+ editItemTitle: z.string(),
6072
+ minItems: z.number().optional(),
6073
+ maxItems: z.number().optional(),
6074
+ placeholder: z.string().optional(),
6075
+ title: z.string().optional(),
6076
+ description: z.string().optional(),
6077
+ control: z.string().optional(),
6078
+ hidden: z.boolean().optional(),
6079
+ icon: iconSchema.optional(),
6080
+ image: imageSchema.optional(),
6081
+ keywords: z.array(z.string()).optional(),
6082
+ summary: summarySummariserSchema.optional(),
6083
+ analyticsId: z.string().optional(),
6084
+ persistAsync: persistAsyncSchema.optional(),
6085
+ validationAsync: validateAsyncSchema.optional(),
6086
+ alert: alertLayoutSchema.optional(),
6087
+ validationMessages: z.record(z.string()).optional(),
6088
+ disabled: z.boolean().optional()
6089
+ })
6090
+ );
6049
6091
  var allOfSchemaSchema = z.lazy(
6050
6092
  () => z.object({
6051
6093
  disabled: z.boolean().optional(),
@@ -6161,58 +6203,6 @@ var numberSchemaSchema = z.lazy(
6161
6203
  help: helpSchema.optional()
6162
6204
  })
6163
6205
  );
6164
- var objectSchemaSchema = z.lazy(
6165
- () => z.object({
6166
- type: z.literal("object"),
6167
- disabled: z.boolean().optional(),
6168
- promoted: z.boolean().optional(),
6169
- help: helpSchema.optional(),
6170
- properties: z.record(schemaSchema),
6171
- displayOrder: z.array(z.string()),
6172
- required: z.array(z.string()).optional(),
6173
- $id: z.string().optional(),
6174
- title: z.string().optional(),
6175
- description: z.string().optional(),
6176
- control: z.string().optional(),
6177
- hidden: z.boolean().optional(),
6178
- icon: iconSchema.optional(),
6179
- image: imageSchema.optional(),
6180
- keywords: z.array(z.string()).optional(),
6181
- summary: summaryProviderSchema.optional(),
6182
- analyticsId: z.string().optional(),
6183
- alert: alertLayoutSchema.optional()
6184
- })
6185
- );
6186
- var oneOfSchemaSchema = z.lazy(
6187
- () => z.object({
6188
- autofillProvider: z.string().optional(),
6189
- promoted: z.boolean().optional(),
6190
- refreshFormOnChange: z.boolean().optional(),
6191
- refreshUrl: z.string().optional(),
6192
- refreshFormUrl: z.string().optional(),
6193
- promotion: jsonElementSchema.optional(),
6194
- oneOf: z.array(schemaSchema),
6195
- placeholder: z.string().optional(),
6196
- $id: z.string().optional(),
6197
- title: z.string().optional(),
6198
- description: z.string().optional(),
6199
- control: z.string().optional(),
6200
- default: jsonElementSchema.optional(),
6201
- hidden: z.boolean().optional(),
6202
- icon: iconSchema.optional(),
6203
- image: imageSchema.optional(),
6204
- keywords: z.array(z.string()).optional(),
6205
- summary: summaryProviderSchema.optional(),
6206
- analyticsId: z.string().optional(),
6207
- refreshStepOnChange: z.boolean().optional(),
6208
- alert: alertLayoutSchema.optional(),
6209
- help: helpSchema.optional(),
6210
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
6211
- autofillKey: z.string().optional(),
6212
- validationMessages: z.record(z.string()).optional(),
6213
- disabled: z.boolean().optional()
6214
- })
6215
- );
6216
6206
  var stringSchemaSchema = z.lazy(
6217
6207
  () => z.object({
6218
6208
  type: z.literal("string"),
@@ -6255,60 +6245,82 @@ var stringSchemaSchema = z.lazy(
6255
6245
  help: helpSchema.optional()
6256
6246
  })
6257
6247
  );
6258
- var arraySchemaListSchema = z.lazy(
6248
+ var stepSchema = z.lazy(
6259
6249
  () => z.object({
6260
- type: z.literal("array"),
6261
- promoted: z.boolean().optional(),
6262
- $id: z.string().optional(),
6263
- items: schemaSchema,
6264
- addItemTitle: z.string(),
6265
- editItemTitle: z.string(),
6266
- minItems: z.number().optional(),
6267
- maxItems: z.number().optional(),
6268
- placeholder: z.string().optional(),
6269
- title: z.string().optional(),
6250
+ key: z.string().optional(),
6251
+ type: z.string().optional(),
6252
+ actions: z.array(actionSchema).optional(),
6253
+ refreshFormUrl: z.string().optional(),
6254
+ id: z.string(),
6255
+ title: z.string(),
6270
6256
  description: z.string().optional(),
6257
+ schemas: z.array(schemaSchema),
6258
+ layout: z.array(layoutSchema),
6259
+ model: jsonElementSchema.optional(),
6260
+ external: externalSchema.optional(),
6261
+ polling: pollingSchema.optional(),
6262
+ linkHandlers: z.array(linkHandlerSchema).optional(),
6263
+ analytics: z.record(z.string()).optional(),
6264
+ errors: stepErrorSchema.optional(),
6265
+ navigation: navigationSchema.optional(),
6266
+ refreshUrl: z.string().optional()
6267
+ })
6268
+ );
6269
+ var layoutSchema = z.lazy(
6270
+ () => z.union([
6271
+ alertLayoutSchema,
6272
+ boxLayoutSchema,
6273
+ buttonLayoutSchema,
6274
+ columnsLayoutSchema,
6275
+ decisionLayoutSchema,
6276
+ dividerLayoutSchema,
6277
+ formLayoutSchema,
6278
+ headingLayoutSchema,
6279
+ imageLayoutSchema,
6280
+ infoLayoutSchema,
6281
+ instructionsLayoutSchema,
6282
+ listLayoutSchema,
6283
+ loadingIndicatorLayoutSchema,
6284
+ markdownLayoutSchema,
6285
+ modalLayoutSchema,
6286
+ paragraphLayoutSchema,
6287
+ reviewLayoutSchema,
6288
+ searchLayoutSchema,
6289
+ statusListLayoutSchema
6290
+ ])
6291
+ );
6292
+ var boxLayoutSchema = z.lazy(
6293
+ () => z.object({
6294
+ type: z.literal("box"),
6295
+ components: z.array(layoutSchema),
6296
+ width: sizeSchema.optional(),
6297
+ border: z.boolean().optional(),
6271
6298
  control: z.string().optional(),
6272
- hidden: z.boolean().optional(),
6273
- icon: iconSchema.optional(),
6274
- image: imageSchema.optional(),
6275
- keywords: z.array(z.string()).optional(),
6276
- summary: summarySummariserSchema.optional(),
6277
- analyticsId: z.string().optional(),
6278
- persistAsync: persistAsyncSchema.optional(),
6279
- validationAsync: validateAsyncSchema.optional(),
6280
- alert: alertLayoutSchema.optional(),
6281
- validationMessages: z.record(z.string()).optional(),
6282
- disabled: z.boolean().optional()
6299
+ margin: sizeSchema.optional()
6300
+ })
6301
+ );
6302
+ var modalLayoutSchema = z.lazy(
6303
+ () => z.object({
6304
+ type: z.literal("modal"),
6305
+ control: z.string().optional(),
6306
+ margin: sizeSchema.optional(),
6307
+ trigger: modalLayoutTriggerSchema,
6308
+ content: modalLayoutContentSchema
6283
6309
  })
6284
6310
  );
6285
- var persistAsyncSchema = z.lazy(
6311
+ var modalLayoutContentSchema = z.lazy(
6286
6312
  () => z.object({
6287
- param: z.string(),
6288
- idProperty: z.string(),
6289
- schema: schemaSchema,
6290
- url: z.string(),
6291
- method: httpMethodSchema
6313
+ components: z.array(layoutSchema)
6292
6314
  })
6293
6315
  );
6294
- var arraySchemaTupleSchema = z.lazy(
6316
+ var columnsLayoutSchema = z.lazy(
6295
6317
  () => z.object({
6296
- type: z.literal("array"),
6297
- promoted: z.boolean().optional(),
6298
- $id: z.string().optional(),
6299
- items: z.array(schemaSchema),
6300
- title: z.string().optional(),
6301
- description: z.string().optional(),
6318
+ type: z.literal("columns"),
6319
+ left: z.array(layoutSchema),
6320
+ right: z.array(layoutSchema),
6321
+ bias: columnsLayoutBiasSchema.optional(),
6302
6322
  control: z.string().optional(),
6303
- hidden: z.boolean().optional(),
6304
- icon: iconSchema.optional(),
6305
- image: imageSchema.optional(),
6306
- keywords: z.array(z.string()).optional(),
6307
- summary: summaryProviderSchema.optional(),
6308
- analyticsId: z.string().optional(),
6309
- persistAsync: persistAsyncSchema.optional(),
6310
- validationAsync: validateAsyncSchema.optional(),
6311
- alert: alertLayoutSchema.optional()
6323
+ margin: sizeSchema.optional()
6312
6324
  })
6313
6325
  );
6314
6326
  var validateStep = (step) => validate(step, stepSchema);
@@ -6725,9 +6737,7 @@ var compareLocalValue = (valueA, valueB) => {
6725
6737
  return valueA.length === valueB.length && valueA.every((value, index) => compareLocalValue(value, valueB[index]));
6726
6738
  }
6727
6739
  if (isObjectLocalValue(valueA) && isObjectLocalValue(valueB)) {
6728
- const keysA = Object.keys(valueA);
6729
- const keysB = Object.keys(valueB);
6730
- return keysA.length === keysB.length && keysA.every((key) => compareLocalValue(valueA[key], valueB[key]));
6740
+ return Object.keys(valueA).every((key) => compareLocalValue(valueA[key], valueB[key]));
6731
6741
  }
6732
6742
  return valueA === valueB;
6733
6743
  };
@@ -7497,7 +7507,12 @@ var mergeChildrenValues = (displayOrder, getComponentValue) => displayOrder.redu
7497
7507
  var objectSchemaToComponent = (schemaMapperProps, mapperProps) => {
7498
7508
  const { uid, localValue, schema, model, validationErrors } = schemaMapperProps;
7499
7509
  const { $id, displayOrder, properties, required } = schema;
7500
- validateDisplayOrder($id, displayOrder, properties, mapperProps.logEvent);
7510
+ const propertyNames = Object.keys(properties);
7511
+ if (displayOrder.length !== propertyNames.length) {
7512
+ throw new Error(
7513
+ `Object schema ${$id} has ${propertyNames.length} properties but only ${displayOrder.length} are listed in displayOrder`
7514
+ );
7515
+ }
7501
7516
  const componentMap = displayOrder.reduce((acc, propName) => {
7502
7517
  var _a;
7503
7518
  const propSchema = properties[propName];
@@ -7523,28 +7538,6 @@ var objectSchemaToComponent = (schemaMapperProps, mapperProps) => {
7523
7538
  displayOrder
7524
7539
  }));
7525
7540
  };
7526
- var validateDisplayOrder = ($id, displayOrder, properties, logEvent) => {
7527
- if (!displayOrder) {
7528
- const message = `Object schema ${$id} has no displayOrder property.`;
7529
- logEvent("error", message);
7530
- throw new Error(message);
7531
- }
7532
- const propertyNames = Object.keys(properties);
7533
- displayOrder.forEach((propName) => {
7534
- if (!properties[propName]) {
7535
- const message = `Object schema ${$id} has no property named "${propName}", but it is listed in the displayOrder array.`;
7536
- logEvent("error", message);
7537
- throw new Error(message);
7538
- }
7539
- });
7540
- propertyNames.forEach((propName) => {
7541
- if (!displayOrder.includes(propName)) {
7542
- const message = `Object schema ${$id} has a "${propName}" property which is missing in the displayOrder array.`;
7543
- logEvent("error", message);
7544
- throw new Error(message);
7545
- }
7546
- });
7547
- };
7548
7541
 
7549
7542
  // src/revamp/domain/components/AllOfComponent.ts
7550
7543
  var createAllOfComponent = (allOfProps) => {
@@ -7794,20 +7787,17 @@ var isPartialLocalValueMatch = (partialValue, component) => {
7794
7787
  if (isObjectLocalValue(partialValue) && isObjectLocalValue(componentValue)) {
7795
7788
  return isPartialObjectMatch(partialValue, componentValue, component);
7796
7789
  }
7797
- return null;
7790
+ return true;
7798
7791
  };
7799
7792
  var isPartialObjectMatch = (partialValue, componentValue, component) => {
7800
- const results = getMatchingKeys(partialValue, componentValue).map((key) => {
7793
+ const resultByKey = getMatchingKeys(partialValue, componentValue).map((key) => {
7801
7794
  const componentForKey = getComponentForLocalValueKey(key, component);
7802
- return componentForKey && componentForKey.type === "const" ? isPartialLocalValueMatch(partialValue[key], componentForKey) : null;
7795
+ if (componentForKey && componentForKey.type === "const") {
7796
+ return isPartialLocalValueMatch(partialValue[key], componentForKey);
7797
+ }
7798
+ return null;
7803
7799
  });
7804
- if (results.includes(false)) {
7805
- return false;
7806
- }
7807
- if (results.includes(true)) {
7808
- return true;
7809
- }
7810
- return null;
7800
+ return resultByKey.includes(true) && !resultByKey.includes(false);
7811
7801
  };
7812
7802
  var getMatchingKeys = (a, b) => {
7813
7803
  const allKeys = Array.from(/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]));
@@ -7922,7 +7912,7 @@ var createSelectInputComponent = (selectProps, updateComponent) => {
7922
7912
  }
7923
7913
  });
7924
7914
  };
7925
- var isTrue = (value) => value === true;
7915
+ var isTrue = (value) => value;
7926
7916
 
7927
7917
  // src/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.ts
7928
7918
  var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
@@ -9804,7 +9794,9 @@ var mapStepToComponent = (_a) => {
9804
9794
  stepPolling,
9805
9795
  updateComponent,
9806
9796
  title: displayStepTitle ? title : void 0,
9807
- trackEvent
9797
+ trackEvent,
9798
+ step,
9799
+ onAction
9808
9800
  });
9809
9801
  return stepComponent;
9810
9802
  };
@@ -10445,7 +10437,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10445
10437
  return deterministicId || (id ? `radix-${id}` : "");
10446
10438
  }
10447
10439
 
10448
- // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.36.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10440
+ // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.35.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10449
10441
  var import_components3 = require("@transferwise/components");
10450
10442
  var import_classnames = __toESM(require_classnames(), 1);
10451
10443
  var import_react7 = require("react");
@@ -10739,16 +10731,7 @@ function VariableDateInput({
10739
10731
  control,
10740
10732
  inputProps
10741
10733
  }) {
10742
- const {
10743
- autoComplete,
10744
- minimumDate,
10745
- maximumDate,
10746
- placeholder,
10747
- disabled,
10748
- onBlur,
10749
- onChange,
10750
- onFocus
10751
- } = inputProps;
10734
+ const { minimumDate, maximumDate, placeholder, disabled, onBlur, onChange, onFocus } = inputProps;
10752
10735
  if (control === "date-lookup") {
10753
10736
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
10754
10737
  import_components7.DateLookup,
@@ -10766,20 +10749,8 @@ function VariableDateInput({
10766
10749
  }
10767
10750
  );
10768
10751
  }
10769
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
10770
- import_components7.DateInput,
10771
- __spreadProps(__spreadValues({}, inputProps), {
10772
- dayAutoComplete: getAutocompleteString2(autoComplete, "day"),
10773
- yearAutoComplete: getAutocompleteString2(autoComplete, "year")
10774
- })
10775
- );
10752
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components7.DateInput, __spreadValues({}, inputProps));
10776
10753
  }
10777
- var getAutocompleteString2 = (value, suffix) => {
10778
- if (value === "bday") {
10779
- return `${value}-${suffix}`;
10780
- }
10781
- return void 0;
10782
- };
10783
10754
  var VariableDateInput_default = VariableDateInput;
10784
10755
 
10785
10756
  // src/revamp/wise/renderers/DateInputRenderer.tsx
@@ -11718,18 +11689,79 @@ function ItemSummaryOption({
11718
11689
  }
11719
11690
  var RepeatableRenderer_default = RepeatableRenderer;
11720
11691
 
11721
- // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11692
+ // src/revamp/wise/renderers/ReviewRenderer.tsx
11722
11693
  var import_components26 = require("@transferwise/components");
11694
+ var import_jsx_runtime41 = require("react/jsx-runtime");
11695
+ var ReviewRenderer = {
11696
+ canRenderType: "review",
11697
+ render: ({ callToAction, control, fields, margin, title }) => {
11698
+ const orientation = mapControlToDefinitionListLayout(control);
11699
+ const action = callToAction ? {
11700
+ text: callToAction.title,
11701
+ onClick: (event) => {
11702
+ event.preventDefault();
11703
+ callToAction.onClick();
11704
+ }
11705
+ } : void 0;
11706
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
11707
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Header, { title: title != null ? title : "", action }),
11708
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11709
+ import_components26.DefinitionList,
11710
+ {
11711
+ layout: orientation,
11712
+ definitions: fields.map(({ label, value, help }, index) => ({
11713
+ key: String(index),
11714
+ title: label,
11715
+ value: getFieldValue(value, help, orientation)
11716
+ }))
11717
+ }
11718
+ ) })
11719
+ ] });
11720
+ }
11721
+ };
11722
+ var ReviewRenderer_default = ReviewRenderer;
11723
+ var mapControlToDefinitionListLayout = (control) => {
11724
+ switch (control) {
11725
+ case "horizontal":
11726
+ case "horizontal-end-aligned":
11727
+ return "HORIZONTAL_RIGHT_ALIGNED";
11728
+ case "horizontal-start-aligned":
11729
+ return "HORIZONTAL_LEFT_ALIGNED";
11730
+ case "vertical-two-column":
11731
+ return "VERTICAL_TWO_COLUMN";
11732
+ case "vertical":
11733
+ case "vertical-one-column":
11734
+ default:
11735
+ return "VERTICAL_ONE_COLUMN";
11736
+ }
11737
+ };
11738
+ var getFieldValue = (value, help, orientation) => {
11739
+ if (help) {
11740
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
11741
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help }),
11742
+ " ",
11743
+ value
11744
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
11745
+ value,
11746
+ " ",
11747
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Help_default, { help })
11748
+ ] });
11749
+ }
11750
+ return value;
11751
+ };
11752
+
11753
+ // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11754
+ var import_components27 = require("@transferwise/components");
11723
11755
 
11724
11756
  // src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
11725
11757
  var import_react_intl15 = require("react-intl");
11726
- var import_jsx_runtime41 = require("react/jsx-runtime");
11758
+ var import_jsx_runtime42 = require("react/jsx-runtime");
11727
11759
  function ErrorResult({ state }) {
11728
11760
  const intl = (0, import_react_intl15.useIntl)();
11729
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "m-t-2", children: [
11761
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "m-t-2", children: [
11730
11762
  intl.formatMessage(generic_error_messages_default.genericError),
11731
11763
  "\xA0",
11732
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11764
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11733
11765
  "a",
11734
11766
  {
11735
11767
  href: "/",
@@ -11745,7 +11777,7 @@ function ErrorResult({ state }) {
11745
11777
 
11746
11778
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11747
11779
  var import_react15 = require("react");
11748
- var import_jsx_runtime42 = require("react/jsx-runtime");
11780
+ var import_jsx_runtime43 = require("react/jsx-runtime");
11749
11781
  function BlockSearchRendererComponent({
11750
11782
  id,
11751
11783
  isLoading,
@@ -11757,9 +11789,9 @@ function BlockSearchRendererComponent({
11757
11789
  }) {
11758
11790
  const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
11759
11791
  const trackEvent = useTrackEvent();
11760
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
11761
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11762
- import_components26.Input,
11792
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: getMargin(margin), children: [
11793
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11794
+ import_components27.Input,
11763
11795
  {
11764
11796
  id,
11765
11797
  name: id,
@@ -11775,7 +11807,7 @@ function BlockSearchRendererComponent({
11775
11807
  }
11776
11808
  }
11777
11809
  ) }),
11778
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
11810
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResultContent, { state, onChange })
11779
11811
  ] });
11780
11812
  }
11781
11813
  function SearchResultContent({
@@ -11784,29 +11816,29 @@ function SearchResultContent({
11784
11816
  }) {
11785
11817
  switch (state.type) {
11786
11818
  case "error":
11787
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state });
11819
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state });
11788
11820
  case "results":
11789
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResults, { state, onChange });
11821
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchResults, { state, onChange });
11790
11822
  case "noResults":
11791
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EmptySearchResult, { state });
11823
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptySearchResult, { state });
11792
11824
  case "pending":
11793
11825
  default:
11794
11826
  return null;
11795
11827
  }
11796
11828
  }
11797
11829
  function EmptySearchResult({ state }) {
11798
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11830
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11799
11831
  }
11800
11832
  function SearchResults({
11801
11833
  state
11802
11834
  }) {
11803
11835
  const trackEvent = useTrackEvent();
11804
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11805
- import_components26.NavigationOption,
11836
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11837
+ import_components27.NavigationOption,
11806
11838
  {
11807
11839
  title: result.title,
11808
11840
  content: result.description,
11809
- media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
11841
+ media: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
11810
11842
  showMediaCircle: false,
11811
11843
  showMediaAtAllSizes: true,
11812
11844
  onClick: () => {
@@ -11822,10 +11854,10 @@ function SearchResults({
11822
11854
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
11823
11855
 
11824
11856
  // src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
11825
- var import_components27 = require("@transferwise/components");
11857
+ var import_components28 = require("@transferwise/components");
11826
11858
  var import_icons2 = require("@transferwise/icons");
11827
11859
  var import_react16 = require("react");
11828
- var import_jsx_runtime43 = require("react/jsx-runtime");
11860
+ var import_jsx_runtime44 = require("react/jsx-runtime");
11829
11861
  function InlineSearchRenderer({
11830
11862
  id,
11831
11863
  isLoading,
@@ -11836,19 +11868,19 @@ function InlineSearchRenderer({
11836
11868
  }) {
11837
11869
  const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
11838
11870
  const trackEvent = useTrackEvent();
11839
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
11871
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
11840
11872
  id,
11841
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11842
- import_components27.Typeahead,
11873
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11874
+ import_components28.Typeahead,
11843
11875
  {
11844
11876
  id: "typeahead-input-id",
11845
11877
  name: "typeahead-input-name",
11846
11878
  size: "md",
11847
11879
  maxHeight: 100,
11848
- footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TypeaheadFooter, { state, isLoading }),
11880
+ footer: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TypeaheadFooter, { state, isLoading }),
11849
11881
  multiple: false,
11850
11882
  clearable: false,
11851
- addon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons2.Search, { size: 24 }),
11883
+ addon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons2.Search, { size: 24 }),
11852
11884
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
11853
11885
  minQueryLength: 1,
11854
11886
  onChange: (values) => {
@@ -11885,29 +11917,29 @@ function mapResultToTypeaheadOption(result) {
11885
11917
  }
11886
11918
  function TypeaheadFooter({ state, isLoading }) {
11887
11919
  if (state.type === "noResults") {
11888
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
11920
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components28.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
11889
11921
  }
11890
11922
  if (state.type === "error") {
11891
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
11923
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorResult, { state }) });
11892
11924
  }
11893
11925
  if (state.type === "pending" || isLoading) {
11894
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
11926
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
11895
11927
  }
11896
11928
  return null;
11897
11929
  }
11898
11930
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
11899
11931
 
11900
11932
  // src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
11901
- var import_jsx_runtime44 = require("react/jsx-runtime");
11933
+ var import_jsx_runtime45 = require("react/jsx-runtime");
11902
11934
  var SearchRenderer = {
11903
11935
  canRenderType: "search",
11904
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
11936
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
11905
11937
  };
11906
11938
  var SearchRenderer_default = SearchRenderer;
11907
11939
 
11908
11940
  // src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
11909
- var import_components28 = require("@transferwise/components");
11910
- var import_jsx_runtime45 = require("react/jsx-runtime");
11941
+ var import_components29 = require("@transferwise/components");
11942
+ var import_jsx_runtime46 = require("react/jsx-runtime");
11911
11943
  function RadioInputRendererComponent(props) {
11912
11944
  const {
11913
11945
  id,
@@ -11921,9 +11953,9 @@ function RadioInputRendererComponent(props) {
11921
11953
  selectedIndex,
11922
11954
  onSelect
11923
11955
  } = props;
11924
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
11925
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11926
- import_components28.RadioGroup,
11956
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
11957
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11958
+ import_components29.RadioGroup,
11927
11959
  {
11928
11960
  name: id,
11929
11961
  radios: options.map((option, index) => ({
@@ -11931,7 +11963,7 @@ function RadioInputRendererComponent(props) {
11931
11963
  value: index,
11932
11964
  secondary: option.description,
11933
11965
  disabled: option.disabled || disabled,
11934
- avatar: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { icon: option.icon, image: option.image })
11966
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(OptionMedia, { icon: option.icon, image: option.image })
11935
11967
  })),
11936
11968
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
11937
11969
  onChange: onSelect
@@ -11943,9 +11975,9 @@ function RadioInputRendererComponent(props) {
11943
11975
  }
11944
11976
 
11945
11977
  // src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
11946
- var import_components29 = require("@transferwise/components");
11978
+ var import_components30 = require("@transferwise/components");
11947
11979
  var import_react17 = require("react");
11948
- var import_jsx_runtime46 = require("react/jsx-runtime");
11980
+ var import_jsx_runtime47 = require("react/jsx-runtime");
11949
11981
  function TabInputRendererComponent(props) {
11950
11982
  const {
11951
11983
  id,
@@ -11964,9 +11996,9 @@ function TabInputRendererComponent(props) {
11964
11996
  onSelect(0);
11965
11997
  }
11966
11998
  }, [selectedIndex, onSelect, options.length]);
11967
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
11968
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11969
- import_components29.Tabs,
11999
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
12000
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12001
+ import_components30.Tabs,
11970
12002
  {
11971
12003
  name: id,
11972
12004
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -11974,7 +12006,7 @@ function TabInputRendererComponent(props) {
11974
12006
  title: option.title,
11975
12007
  // if we pass null, we get some props-types console errors
11976
12008
  // eslint-disable-next-line react/jsx-no-useless-fragment
11977
- content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
12009
+ content: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {}),
11978
12010
  disabled: option.disabled || disabled
11979
12011
  })),
11980
12012
  onTabSelect: onSelect
@@ -11986,26 +12018,26 @@ function TabInputRendererComponent(props) {
11986
12018
  var isValidIndex = (index, options) => index !== null && index >= 0 && index < options;
11987
12019
 
11988
12020
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
11989
- var import_components31 = require("@transferwise/components");
12021
+ var import_components32 = require("@transferwise/components");
11990
12022
 
11991
12023
  // src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
11992
- var import_components30 = require("@transferwise/components");
11993
- var import_jsx_runtime47 = require("react/jsx-runtime");
12024
+ var import_components31 = require("@transferwise/components");
12025
+ var import_jsx_runtime48 = require("react/jsx-runtime");
11994
12026
  function SelectTriggerMedia({ icon, image }) {
11995
12027
  if (image == null ? void 0 : image.url) {
11996
12028
  return null;
11997
12029
  }
11998
12030
  if (icon && "name" in icon) {
11999
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name }) });
12031
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DynamicIcon_default, { name: icon.name }) });
12000
12032
  }
12001
12033
  if (icon && "text" in icon) {
12002
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
12034
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.Avatar, { type: import_components31.AvatarType.ICON, size: 24, children: icon.text });
12003
12035
  }
12004
12036
  return null;
12005
12037
  }
12006
12038
 
12007
12039
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
12008
- var import_jsx_runtime48 = require("react/jsx-runtime");
12040
+ var import_jsx_runtime49 = require("react/jsx-runtime");
12009
12041
  function SelectInputRendererComponent(props) {
12010
12042
  const {
12011
12043
  id,
@@ -12040,17 +12072,17 @@ function SelectInputRendererComponent(props) {
12040
12072
  const contentProps = withinTrigger ? {
12041
12073
  title: option.title,
12042
12074
  note: option.description,
12043
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12075
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12044
12076
  } : {
12045
12077
  title: option.title,
12046
12078
  description: option.description,
12047
- icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12079
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12048
12080
  };
12049
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
12081
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components32.SelectInputOptionContent, __spreadValues({}, contentProps));
12050
12082
  };
12051
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
12052
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12053
- import_components31.SelectInput,
12083
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12084
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12085
+ import_components32.SelectInput,
12054
12086
  {
12055
12087
  name: id,
12056
12088
  placeholder,
@@ -12069,8 +12101,8 @@ function SelectInputRendererComponent(props) {
12069
12101
 
12070
12102
  // src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
12071
12103
  var import_react18 = require("react");
12072
- var import_components32 = require("@transferwise/components");
12073
- var import_jsx_runtime49 = require("react/jsx-runtime");
12104
+ var import_components33 = require("@transferwise/components");
12105
+ var import_jsx_runtime50 = require("react/jsx-runtime");
12074
12106
  function SegmentedInputRendererComponent(props) {
12075
12107
  const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
12076
12108
  (0, import_react18.useEffect)(() => {
@@ -12078,9 +12110,9 @@ function SegmentedInputRendererComponent(props) {
12078
12110
  onSelect(0);
12079
12111
  }
12080
12112
  }, [selectedIndex, onSelect, options.length]);
12081
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12082
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12083
- import_components32.SegmentedControl,
12113
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
12114
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12115
+ import_components33.SegmentedControl,
12084
12116
  {
12085
12117
  name: `${id}-segmented-control`,
12086
12118
  value: String(selectedIndex),
@@ -12094,44 +12126,44 @@ function SegmentedInputRendererComponent(props) {
12094
12126
  onChange: (value) => onSelect(Number(value))
12095
12127
  }
12096
12128
  ) }),
12097
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: `${id}-children`, children })
12129
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { id: `${id}-children`, children })
12098
12130
  ] });
12099
12131
  }
12100
12132
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
12101
12133
 
12102
12134
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
12103
- var import_jsx_runtime50 = require("react/jsx-runtime");
12135
+ var import_jsx_runtime51 = require("react/jsx-runtime");
12104
12136
  var SelectInputRenderer = {
12105
12137
  canRenderType: "input-select",
12106
12138
  render: (props) => {
12107
12139
  switch (props.control) {
12108
12140
  case "radio":
12109
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12141
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12110
12142
  case "tab":
12111
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12143
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12112
12144
  case "segmented":
12113
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12145
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12114
12146
  case "select":
12115
12147
  default:
12116
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12148
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12117
12149
  }
12118
12150
  }
12119
12151
  };
12120
12152
  var SelectInputRenderer_default = SelectInputRenderer;
12121
12153
 
12122
12154
  // src/revamp/wise/renderers/StatusListRenderer.tsx
12123
- var import_components33 = require("@transferwise/components");
12124
- var import_jsx_runtime51 = require("react/jsx-runtime");
12155
+ var import_components34 = require("@transferwise/components");
12156
+ var import_jsx_runtime52 = require("react/jsx-runtime");
12125
12157
  var StatusListRenderer = {
12126
12158
  canRenderType: "status-list",
12127
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
12128
- title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components33.Header, { title }) : null,
12129
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12130
- import_components33.Summary,
12159
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: getMargin(margin), children: [
12160
+ title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Header, { title }) : null,
12161
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12162
+ import_components34.Summary,
12131
12163
  {
12132
12164
  title: itemTitle,
12133
12165
  description,
12134
- icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12166
+ icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12135
12167
  status: mapStatus(status)
12136
12168
  },
12137
12169
  `${title}/${description || ""}`
@@ -12147,63 +12179,63 @@ var mapStatus = (status) => {
12147
12179
  };
12148
12180
 
12149
12181
  // src/revamp/wise/renderers/components/VariableTextInput.tsx
12150
- var import_components34 = require("@transferwise/components");
12151
- var import_jsx_runtime52 = require("react/jsx-runtime");
12182
+ var import_components35 = require("@transferwise/components");
12183
+ var import_jsx_runtime53 = require("react/jsx-runtime");
12152
12184
  function VariableTextInput({
12153
12185
  control,
12154
12186
  inputProps
12155
12187
  }) {
12156
12188
  switch (control) {
12157
12189
  case "password":
12158
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12190
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12159
12191
  case "email":
12160
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12192
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12161
12193
  case "textarea":
12162
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12194
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12163
12195
  case "numeric":
12164
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12196
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12165
12197
  case "phone-number":
12166
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12198
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12167
12199
  default:
12168
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12200
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12169
12201
  }
12170
12202
  }
12171
12203
  function TextInput(_a) {
12172
12204
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12173
12205
  if (typeof displayFormat === "string") {
12174
12206
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
12175
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12176
- import_components34.InputWithDisplayFormat,
12207
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12208
+ import_components35.InputWithDisplayFormat,
12177
12209
  __spreadValues({
12178
12210
  displayPattern: displayFormat,
12179
12211
  onChange: (newValue) => onChange(newValue)
12180
12212
  }, inputProps)
12181
12213
  );
12182
12214
  }
12183
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12215
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12184
12216
  }
12185
12217
  function TextAreaInput(_a) {
12186
12218
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12187
12219
  const textAreaProps = __spreadValues({ id, name: id }, rest);
12188
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12189
- import_components34.TextareaWithDisplayFormat,
12220
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12221
+ import_components35.TextareaWithDisplayFormat,
12190
12222
  __spreadValues({
12191
12223
  displayPattern: displayFormat,
12192
12224
  onChange: (newValue) => onChange(newValue)
12193
12225
  }, textAreaProps)
12194
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12226
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12195
12227
  }
12196
12228
  function NumericInput(_a) {
12197
12229
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12198
12230
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
12199
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12200
- import_components34.InputWithDisplayFormat,
12231
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12232
+ import_components35.InputWithDisplayFormat,
12201
12233
  __spreadValues({
12202
12234
  displayPattern: displayFormat,
12203
12235
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
12204
12236
  }, numericProps)
12205
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12206
- import_components34.Input,
12237
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12238
+ import_components35.Input,
12207
12239
  __spreadValues({
12208
12240
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
12209
12241
  }, numericProps)
@@ -12211,12 +12243,12 @@ function NumericInput(_a) {
12211
12243
  }
12212
12244
  function PhoneNumberInput(_a) {
12213
12245
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
12214
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12246
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components35.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12215
12247
  }
12216
12248
  var VariableTextInput_default = VariableTextInput;
12217
12249
 
12218
12250
  // src/revamp/wise/renderers/TextInputRenderer.tsx
12219
- var import_jsx_runtime53 = require("react/jsx-runtime");
12251
+ var import_jsx_runtime54 = require("react/jsx-runtime");
12220
12252
  var TextInputRenderer = {
12221
12253
  canRenderType: "input-text",
12222
12254
  render: (props) => {
@@ -12241,14 +12273,14 @@ var TextInputRenderer = {
12241
12273
  ]);
12242
12274
  const value = initialValue != null ? initialValue : "";
12243
12275
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
12244
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps }) });
12276
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VariableTextInput_default, { control, inputProps }) });
12245
12277
  }
12246
12278
  };
12247
12279
  var TextInputRenderer_default = TextInputRenderer;
12248
12280
 
12249
12281
  // src/revamp/wise/renderers/UploadInputRenderer.tsx
12250
- var import_components35 = require("@transferwise/components");
12251
- var import_jsx_runtime54 = require("react/jsx-runtime");
12282
+ var import_components36 = require("@transferwise/components");
12283
+ var import_jsx_runtime55 = require("react/jsx-runtime");
12252
12284
  var UploadInputRenderer = {
12253
12285
  canRenderType: "input-upload",
12254
12286
  render: (props) => {
@@ -12264,8 +12296,8 @@ var UploadInputRenderer = {
12264
12296
  };
12265
12297
  return (
12266
12298
  // We don't pass help here as there is no sensible place to display it
12267
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12268
- import_components35.UploadInput,
12299
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12300
+ import_components36.UploadInput,
12269
12301
  {
12270
12302
  id,
12271
12303
  description,
@@ -12300,97 +12332,36 @@ var LargeUploadRenderer = {
12300
12332
  "id",
12301
12333
  "accepts",
12302
12334
  "control",
12303
- "label",
12304
- "description",
12305
- "disabled",
12306
- "error",
12307
- "help",
12308
- "maxSize",
12309
- "type",
12310
- "onUpload"
12311
- ]);
12312
- const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
12313
- const onUploadFile = async (file, fileName) => {
12314
- try {
12315
- const convertedFile = file ? await toFile(file, fileName) : null;
12316
- await onUpload(convertedFile);
12317
- } catch (e) {
12318
- await onUpload(null);
12319
- throw e;
12320
- }
12321
- };
12322
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12323
- import_components35.Upload,
12324
- __spreadProps(__spreadValues({}, uploadProps), {
12325
- usAccept: getAcceptsString(accepts),
12326
- usDisabled: disabled,
12327
- onSuccess: onUploadFile,
12328
- onFailure: async () => onUpload(null),
12329
- onCancel: async () => onUpload(null)
12330
- })
12331
- ) });
12332
- }
12333
- };
12334
-
12335
- // src/revamp/wise/renderers/ReviewRenderer.tsx
12336
- var import_components36 = require("@transferwise/components");
12337
- var import_jsx_runtime55 = require("react/jsx-runtime");
12338
- var ReviewRenderer = {
12339
- canRenderType: "review",
12340
- render: ({ callToAction, control, fields, margin, title }) => {
12341
- const orientation = mapControlToDefinitionListLayout(control);
12342
- const action = callToAction ? {
12343
- text: callToAction.title,
12344
- onClick: (event) => {
12345
- event.preventDefault();
12346
- callToAction.onClick();
12347
- }
12348
- } : void 0;
12349
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
12350
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
12351
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12352
- import_components36.DefinitionList,
12353
- {
12354
- layout: orientation,
12355
- definitions: fields.map(({ label, value, help }, index) => ({
12356
- key: String(index),
12357
- title: label,
12358
- value: getFieldValue(value, help, orientation)
12359
- }))
12360
- }
12361
- ) })
12362
- ] });
12363
- }
12364
- };
12365
- var ReviewRenderer_default = ReviewRenderer;
12366
- var mapControlToDefinitionListLayout = (control) => {
12367
- switch (control) {
12368
- case "horizontal":
12369
- case "horizontal-end-aligned":
12370
- return "HORIZONTAL_RIGHT_ALIGNED";
12371
- case "horizontal-start-aligned":
12372
- return "HORIZONTAL_LEFT_ALIGNED";
12373
- case "vertical-two-column":
12374
- return "VERTICAL_TWO_COLUMN";
12375
- case "vertical":
12376
- case "vertical-one-column":
12377
- default:
12378
- return "VERTICAL_ONE_COLUMN";
12379
- }
12380
- };
12381
- var getFieldValue = (value, help, orientation) => {
12382
- if (help) {
12383
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12384
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
12385
- " ",
12386
- value
12387
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12388
- value,
12389
- " ",
12390
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
12391
- ] });
12335
+ "label",
12336
+ "description",
12337
+ "disabled",
12338
+ "error",
12339
+ "help",
12340
+ "maxSize",
12341
+ "type",
12342
+ "onUpload"
12343
+ ]);
12344
+ const uploadProps = __spreadProps(__spreadValues({}, rest), { id, name: id });
12345
+ const onUploadFile = async (file, fileName) => {
12346
+ try {
12347
+ const convertedFile = file ? await toFile(file, fileName) : null;
12348
+ await onUpload(convertedFile);
12349
+ } catch (e) {
12350
+ await onUpload(null);
12351
+ throw e;
12352
+ }
12353
+ };
12354
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12355
+ import_components36.Upload,
12356
+ __spreadProps(__spreadValues({}, uploadProps), {
12357
+ usAccept: getAcceptsString(accepts),
12358
+ usDisabled: disabled,
12359
+ onSuccess: onUploadFile,
12360
+ onFailure: async () => onUpload(null),
12361
+ onCancel: async () => onUpload(null)
12362
+ })
12363
+ ) });
12392
12364
  }
12393
- return value;
12394
12365
  };
12395
12366
 
12396
12367
  // src/revamp/wise/renderers/step/StepRenderer.tsx
@@ -12915,7 +12886,6 @@ function isReference(block) {
12915
12886
 
12916
12887
  // src/legacy/dynamicFlow/DynamicFlow.tsx
12917
12888
  var import_react66 = require("react");
12918
- var import_react_intl40 = require("react-intl");
12919
12889
 
12920
12890
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
12921
12891
  var import_react24 = require("react");
@@ -13029,6 +12999,61 @@ function FeatureContextProvider({ features, children }) {
13029
12999
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FeatureContext.Provider, { value: features, children });
13030
13000
  }
13031
13001
 
13002
+ // src/common/cameraCapture/utils/mobile-utils.ts
13003
+ var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
13004
+ var isMobileUA = (userAgent = window.navigator.userAgent) => (
13005
+ // eslint-disable-next-line regexp/no-unused-capturing-group
13006
+ /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
13007
+ );
13008
+ var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
13009
+ var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
13010
+ if ("maxTouchPoints" in navigator2) {
13011
+ return navigator2.maxTouchPoints > 0;
13012
+ }
13013
+ const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
13014
+ if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
13015
+ return Boolean(mQ.matches);
13016
+ }
13017
+ return false;
13018
+ };
13019
+
13020
+ // src/common/utils/debounce.ts
13021
+ var debounce2 = (callback, waitMs) => {
13022
+ let timeoutId;
13023
+ let lastArgs;
13024
+ const clearTimer = () => {
13025
+ if (timeoutId) {
13026
+ clearTimeout(timeoutId);
13027
+ timeoutId = null;
13028
+ }
13029
+ lastArgs = null;
13030
+ };
13031
+ const debouncedFn = (...args) => {
13032
+ lastArgs = args;
13033
+ if (timeoutId !== null) {
13034
+ clearTimeout(timeoutId);
13035
+ }
13036
+ timeoutId = setTimeout(() => {
13037
+ callback(...lastArgs);
13038
+ timeoutId = null;
13039
+ lastArgs = null;
13040
+ }, waitMs);
13041
+ };
13042
+ debouncedFn.cancel = () => {
13043
+ if (timeoutId !== null) {
13044
+ clearTimer();
13045
+ }
13046
+ };
13047
+ debouncedFn.flush = () => {
13048
+ if (timeoutId !== null) {
13049
+ callback(...lastArgs);
13050
+ clearTimer();
13051
+ }
13052
+ };
13053
+ debouncedFn.isPending = () => timeoutId !== null;
13054
+ return debouncedFn;
13055
+ };
13056
+
13032
13057
  // src/legacy/common/utils/api-utils.ts
13033
13058
  function isStatus2xx(status) {
13034
13059
  return status >= 200 && status < 300;
@@ -13491,63 +13516,6 @@ var dateStringToDate = (dateString) => {
13491
13516
  };
13492
13517
  var dateToDateString2 = (date) => formatDate2(date);
13493
13518
 
13494
- // src/legacy/common/utils/debounce.ts
13495
- var debounce2 = (callback, waitMs) => {
13496
- let timeoutId;
13497
- let lastArgs;
13498
- const clearTimer = () => {
13499
- if (timeoutId) {
13500
- clearTimeout(timeoutId);
13501
- timeoutId = null;
13502
- }
13503
- lastArgs = null;
13504
- };
13505
- const debouncedFn = (...args) => {
13506
- lastArgs = args;
13507
- if (timeoutId !== null) {
13508
- clearTimeout(timeoutId);
13509
- }
13510
- timeoutId = setTimeout(() => {
13511
- callback(...lastArgs);
13512
- timeoutId = null;
13513
- lastArgs = null;
13514
- }, waitMs);
13515
- };
13516
- debouncedFn.cancel = () => {
13517
- if (timeoutId !== null) {
13518
- clearTimer();
13519
- }
13520
- };
13521
- debouncedFn.flush = () => {
13522
- if (timeoutId !== null) {
13523
- callback(...lastArgs);
13524
- clearTimer();
13525
- }
13526
- };
13527
- debouncedFn.isPending = () => timeoutId !== null;
13528
- return debouncedFn;
13529
- };
13530
-
13531
- // src/legacy/common/utils/is-equal.ts
13532
- var isEqual = (a, b) => {
13533
- if (a === b) {
13534
- return true;
13535
- }
13536
- if (Array.isArray(a) && Array.isArray(b)) {
13537
- return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
13538
- }
13539
- if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
13540
- return true;
13541
- }
13542
- return false;
13543
- };
13544
- var isObjectEquals = (a, b) => {
13545
- const keysA = Object.keys(a);
13546
- const keysB = Object.keys(b);
13547
- return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
13548
- };
13549
- var isNonNullObject = (a) => typeof a === "object" && a !== null;
13550
-
13551
13519
  // src/legacy/common/utils/file-utils.ts
13552
13520
  function toKilobytes2(sizeInBytes) {
13553
13521
  const ONE_KB_IN_BYTES = 1024;
@@ -13583,6 +13551,52 @@ var generateRandomId = (prefix = "") => {
13583
13551
  return `${prefixString}${Math.floor(1e8 * Math.random())}`;
13584
13552
  };
13585
13553
 
13554
+ // src/legacy/common/utils/is-equal.ts
13555
+ var isEqual = (a, b) => {
13556
+ if (a === b) {
13557
+ return true;
13558
+ }
13559
+ if (Array.isArray(a) && Array.isArray(b)) {
13560
+ return a.length === b.length && a.every((item, index) => isEqual(item, b[index]));
13561
+ }
13562
+ if (isNonNullObject(a) && isNonNullObject(b) && isObjectEquals(a, b)) {
13563
+ return true;
13564
+ }
13565
+ return false;
13566
+ };
13567
+ var isObjectEquals = (a, b) => {
13568
+ const keysA = Object.keys(a);
13569
+ const keysB = Object.keys(b);
13570
+ return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
13571
+ };
13572
+ var isNonNullObject = (a) => typeof a === "object" && a !== null;
13573
+
13574
+ // src/legacy/common/utils/misc-utils.ts
13575
+ var isBasicError = (error) => isString2(error) || isNull3(error);
13576
+
13577
+ // src/legacy/common/utils/model-utils.ts
13578
+ var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
13579
+ var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
13580
+ var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
13581
+ var isNullableStringModel = (model) => isString2(model) || isNull3(model);
13582
+ var isArrayModel2 = (model) => {
13583
+ if (isArray2(model)) {
13584
+ if (model.length === 0) {
13585
+ return true;
13586
+ }
13587
+ return model.every(
13588
+ (item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
13589
+ );
13590
+ }
13591
+ return false;
13592
+ };
13593
+ var isNullableArrayModel = (model) => {
13594
+ if (isNull3(model)) {
13595
+ return true;
13596
+ }
13597
+ return isArrayModel2(model);
13598
+ };
13599
+
13586
13600
  // src/legacy/common/utils/schema-utils.ts
13587
13601
  function isConstSchema2(schema) {
13588
13602
  return !isUndefined3(schema == null ? void 0 : schema.const);
@@ -13711,50 +13725,6 @@ var filterHiddenSchemas = (schemas) => schemas.filter((schema) => {
13711
13725
  return (schema == null ? void 0 : schema.hidden) !== true;
13712
13726
  });
13713
13727
 
13714
- // src/legacy/common/utils/model-utils.ts
13715
- var isObjectModel2 = (model) => typeof model === "object" && model !== null && model.constructor === Object;
13716
- var isNullableObjectModel = (model) => isNull3(model) || isObjectModel2(model);
13717
- var isNullableBasicModel = (model) => isBoolean2(model) || isNumber3(model) || isString2(model) || isNull3(model);
13718
- var isNullableStringModel = (model) => isString2(model) || isNull3(model);
13719
- var isArrayModel2 = (model) => {
13720
- if (isArray2(model)) {
13721
- if (model.length === 0) {
13722
- return true;
13723
- }
13724
- return model.every(
13725
- (item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean" || typeof item === "object"
13726
- );
13727
- }
13728
- return false;
13729
- };
13730
- var isNullableArrayModel = (model) => {
13731
- if (isNull3(model)) {
13732
- return true;
13733
- }
13734
- return isArrayModel2(model);
13735
- };
13736
-
13737
- // src/legacy/common/utils/misc-utils.ts
13738
- var isBasicError = (error) => isString2(error) || isNull3(error);
13739
-
13740
- // src/legacy/common/utils/mobile-utils.ts
13741
- var isMobile = () => isMobileScreenSize() && (isTouchScreen() || isMobileUA());
13742
- var isMobileUA = (userAgent = window.navigator.userAgent) => (
13743
- // eslint-disable-next-line regexp/no-unused-capturing-group
13744
- /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(userAgent)
13745
- );
13746
- var isMobileScreenSize = (width = window.screen.width, height = window.screen.height) => width < 768 || height < 768;
13747
- var isTouchScreen = (navigator2 = window.navigator, matchMedia = window.matchMedia) => {
13748
- if ("maxTouchPoints" in navigator2) {
13749
- return navigator2.maxTouchPoints > 0;
13750
- }
13751
- const mQ = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)");
13752
- if ((mQ == null ? void 0 : mQ.media) === "(pointer:coarse)") {
13753
- return Boolean(mQ.matches);
13754
- }
13755
- return false;
13756
- };
13757
-
13758
13728
  // src/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.tsx
13759
13729
  var import_react28 = require("react");
13760
13730
  function useDebouncedFunction(callback, waitMs) {
@@ -15474,7 +15444,7 @@ var logInvalidTypeFallbackWarning = ({
15474
15444
  };
15475
15445
 
15476
15446
  // src/legacy/formControl/utils/getAutocompleteString.ts
15477
- var getAutocompleteString3 = (hints, { prefix = "", suffix = "" } = {}) => {
15447
+ var getAutocompleteString2 = (hints, { prefix = "", suffix = "" } = {}) => {
15478
15448
  const autoCompleteString = hints.map((hint) => {
15479
15449
  const builtHint = `${prefix}${hint}${suffix}`;
15480
15450
  return isAutocompleteToken(builtHint) ? autocompleteTokenMap2[builtHint] : void 0;
@@ -15557,7 +15527,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
15557
15527
  this.getAutocompleteValue = ({ prefix = "", suffix = "" } = {}) => {
15558
15528
  const { autoComplete, autocompleteHint } = this.props;
15559
15529
  if (isArray2(autocompleteHint)) {
15560
- return getAutocompleteString3(autocompleteHint, { prefix, suffix });
15530
+ return getAutocompleteString2(autocompleteHint, { prefix, suffix });
15561
15531
  }
15562
15532
  return autoComplete ? "on" : "off";
15563
15533
  };
@@ -17968,12 +17938,12 @@ var LayoutStep_default = LayoutStep;
17968
17938
  // src/legacy/step/cameraStep/CameraStep.tsx
17969
17939
  var import_react62 = require("react");
17970
17940
 
17971
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
17941
+ // src/common/cameraCapture/CameraCapture.tsx
17972
17942
  var import_react61 = require("react");
17973
17943
  var import_react_intl37 = require("react-intl");
17974
17944
  var import_react_webcam = __toESM(require("react-webcam"));
17975
17945
 
17976
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.ts
17946
+ // src/common/cameraCapture/CameraCapture.messages.ts
17977
17947
  var import_react_intl33 = require("react-intl");
17978
17948
  var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
17979
17949
  reviewSubmit: {
@@ -18033,7 +18003,7 @@ var CameraCapture_messages_default = (0, import_react_intl33.defineMessages)({
18033
18003
  }
18034
18004
  });
18035
18005
 
18036
- // src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
18006
+ // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
18037
18007
  var import_components73 = require("@transferwise/components");
18038
18008
  var import_react_intl34 = require("react-intl");
18039
18009
  var import_jsx_runtime118 = require("react/jsx-runtime");
@@ -18080,10 +18050,10 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime118.j
18080
18050
  }
18081
18051
  );
18082
18052
 
18083
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18053
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18084
18054
  var import_react_intl36 = require("react-intl");
18085
18055
 
18086
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18056
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
18087
18057
  var import_react_intl35 = require("react-intl");
18088
18058
  var OrientationLockOverlay_messages_default = (0, import_react_intl35.defineMessages)({
18089
18059
  text: {
@@ -18093,7 +18063,7 @@ var OrientationLockOverlay_messages_default = (0, import_react_intl35.defineMess
18093
18063
  }
18094
18064
  });
18095
18065
 
18096
- // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18066
+ // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18097
18067
  var import_jsx_runtime119 = require("react/jsx-runtime");
18098
18068
  function OrientationLockOverlay() {
18099
18069
  const intl = (0, import_react_intl36.useIntl)();
@@ -18113,23 +18083,11 @@ function OrientationLockOverlay() {
18113
18083
  }
18114
18084
  var OrientationLockOverlay_default = OrientationLockOverlay;
18115
18085
 
18116
- // src/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18117
- var import_components74 = require("@transferwise/components");
18118
- var import_jsx_runtime120 = require("react/jsx-runtime");
18119
- function CameraErrorScreen({ title, description, actionButton, onAction }) {
18120
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
18121
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
18122
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
18123
- onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
18124
- ] }) }) });
18125
- }
18126
- var CameraErrorScreen_default = CameraErrorScreen;
18127
-
18128
- // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
18086
+ // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18129
18087
  var import_react58 = require("react");
18130
18088
  var import_screenfull = __toESM(require_screenfull());
18131
18089
 
18132
- // src/legacy/step/cameraStep/cameraCapture/utils/index.ts
18090
+ // src/common/cameraCapture/utils/index.ts
18133
18091
  var isSelfieCamera = (stream) => {
18134
18092
  var _a;
18135
18093
  const { facingMode } = ((_a = getVideoTrack(stream)) == null ? void 0 : _a.getSettings()) || {};
@@ -18175,7 +18133,7 @@ var getVideoCapabilities = (videoStream) => {
18175
18133
  return (_b = (_a = getVideoTrack(videoStream)) == null ? void 0 : _a.getCapabilities) == null ? void 0 : _b.call(_a);
18176
18134
  };
18177
18135
 
18178
- // src/legacy/step/cameraStep/cameraCapture/tracking/index.ts
18136
+ // src/common/cameraCapture/tracking/index.ts
18179
18137
  var trackCameraError = (message, onEvent, error) => onEvent == null ? void 0 : onEvent(message, { Error: getSerializedError(error) });
18180
18138
  var getSerializedError = (error) => error instanceof DOMException ? JSON.stringify({
18181
18139
  name: error == null ? void 0 : error.name,
@@ -18197,13 +18155,13 @@ var getCameraStartedProperties = async (props, videoStream) => {
18197
18155
  });
18198
18156
  };
18199
18157
  var trackCameraOrientationLandscape = (onEvent) => {
18200
- onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {});
18158
+ void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Lock Overlay Shown", {}));
18201
18159
  };
18202
18160
  var trackCameraOrientationLocked = (onEvent) => {
18203
- onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {});
18161
+ void (onEvent == null ? void 0 : onEvent("Dynamic Flow - Camera Orientation Locked", {}));
18204
18162
  };
18205
18163
 
18206
- // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
18164
+ // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18207
18165
  var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18208
18166
  const lockOrientation = (0, import_react58.useCallback)(() => {
18209
18167
  if (window.screen.orientation && "lock" in window.screen.orientation && typeof window.screen.orientation.lock === "function") {
@@ -18265,37 +18223,37 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18265
18223
  var noop5 = () => {
18266
18224
  };
18267
18225
 
18268
- // src/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.ts
18226
+ // src/common/cameraCapture/hooks/useVideoConstraints.ts
18269
18227
  var import_react59 = require("react");
18270
18228
  var useVideoConstraints = (direction) => {
18271
18229
  const [videoConstraints, setVideoConstraints] = (0, import_react59.useState)();
18230
+ (0, import_react59.useEffect)(() => {
18231
+ void getVideoConstraints(direction).then(setVideoConstraints);
18232
+ }, [direction]);
18233
+ return { videoConstraints };
18234
+ };
18235
+ var getVideoConstraints = async (dir) => {
18272
18236
  const defaultVideoConstraints = {
18273
- facingMode: direction === "front" ? "user" : "environment",
18237
+ facingMode: dir === "front" ? "user" : "environment",
18274
18238
  height: { min: 480, max: 1080, ideal: 720 },
18275
18239
  width: { min: 640, max: 1920, ideal: 1280 },
18276
18240
  frameRate: 30,
18277
18241
  aspectRatio: 16 / 9
18278
18242
  };
18279
- (0, import_react59.useEffect)(() => {
18280
- void getVideoConstraints(direction).then(setVideoConstraints);
18281
- }, [direction]);
18282
- const getVideoConstraints = async (direction2) => {
18283
- if (direction2 === "back") {
18284
- const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
18285
- if (mainCamera == null ? void 0 : mainCamera.deviceId) {
18286
- return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
18287
- deviceId: { exact: mainCamera.deviceId }
18288
- });
18289
- }
18243
+ if (dir === "back") {
18244
+ const mainCamera = (await getAvailableVideoDevices()).find(isMainBackCamera);
18245
+ if (mainCamera == null ? void 0 : mainCamera.deviceId) {
18246
+ return __spreadProps(__spreadValues({}, defaultVideoConstraints), {
18247
+ deviceId: { exact: mainCamera.deviceId }
18248
+ });
18290
18249
  }
18291
- return defaultVideoConstraints;
18292
- };
18293
- return { videoConstraints };
18250
+ }
18251
+ return defaultVideoConstraints;
18294
18252
  };
18295
18253
 
18296
- // src/legacy/step/cameraStep/cameraCapture/overlay/Overlay.tsx
18254
+ // src/common/cameraCapture/overlay/Overlay.tsx
18297
18255
  var import_react60 = require("react");
18298
- var import_jsx_runtime121 = require("react/jsx-runtime");
18256
+ var import_jsx_runtime120 = require("react/jsx-runtime");
18299
18257
  var captureButtonHeight = 92;
18300
18258
  var reviewButtonsHeight = 120;
18301
18259
  var imageHeight = 40;
@@ -18317,18 +18275,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18317
18275
  return () => window.removeEventListener("resize", listener);
18318
18276
  });
18319
18277
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
18320
- let helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
18321
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18322
- title && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h4", { className: "camera-capture-title", children: title }),
18323
- instructions && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("small", { className: "camera-capture-instructions", children: instructions })
18278
+ let helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
18279
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18280
+ title && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h4", { className: "camera-capture-title", children: title }),
18281
+ instructions && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("small", { className: "camera-capture-instructions", children: instructions })
18324
18282
  ] });
18325
18283
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
18326
18284
  if (reviewInstructions) {
18327
18285
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
18328
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
18286
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
18329
18287
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
18330
18288
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
18331
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_jsx_runtime121.Fragment, {});
18289
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, {});
18332
18290
  }
18333
18291
  }
18334
18292
  const framePosition = {
@@ -18346,19 +18304,31 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18346
18304
  width: "90%"
18347
18305
  }
18348
18306
  };
18349
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18350
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("mask", { id: "mask", children: [
18351
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
18352
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("image", __spreadValues({ href: overlay }, framePosition))
18307
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18308
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("mask", { id: "mask", children: [
18309
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
18310
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("image", __spreadValues({ href: overlay }, framePosition))
18353
18311
  ] }) }),
18354
- overlay && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18355
- outline && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("image", __spreadValues({ href: outline }, framePosition)),
18356
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18312
+ overlay && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18313
+ outline && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("image", __spreadValues({ href: outline }, framePosition)),
18314
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18357
18315
  ] });
18358
18316
  }
18359
18317
  var Overlay_default = Overlay;
18360
18318
 
18361
- // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
18319
+ // src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18320
+ var import_components74 = require("@transferwise/components");
18321
+ var import_jsx_runtime121 = require("react/jsx-runtime");
18322
+ function CameraErrorScreen({ title, description, actionButton, onAction }) {
18323
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
18324
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
18325
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
18326
+ onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
18327
+ ] }) }) });
18328
+ }
18329
+ var CameraErrorScreen_default = CameraErrorScreen;
18330
+
18331
+ // src/common/cameraCapture/CameraCapture.tsx
18362
18332
  var import_jsx_runtime122 = require("react/jsx-runtime");
18363
18333
  function CameraCapture({
18364
18334
  direction = "back",
@@ -19033,7 +19003,6 @@ var DynamicFlowComponent = ({
19033
19003
  setSchemaModel
19034
19004
  } = useDynamicFlowState(initialStep);
19035
19005
  const [submitted, setSubmitted] = (0, import_react66.useState)(false);
19036
- const { locale } = (0, import_react_intl40.useIntl)();
19037
19006
  const { isLoading, loader, setLoadingState } = useLoader(
19038
19007
  loaderConfig,
19039
19008
  initialStep ? "idle" : "initial"
@@ -19071,15 +19040,13 @@ var DynamicFlowComponent = ({
19071
19040
  const { url, method = "POST" } = action;
19072
19041
  return httpClient(url != null ? url : "", {
19073
19042
  method,
19074
- credentials: "include",
19075
19043
  headers: __spreadValues({
19076
- "Content-Type": "application/json",
19077
- "accept-language": locale
19044
+ "Content-Type": "application/json"
19078
19045
  }, etag2 ? { "If-None-Match": etag2 } : {}),
19079
19046
  body: method === "GET" ? void 0 : JSON.stringify(data)
19080
19047
  });
19081
19048
  },
19082
- [httpClient, locale]
19049
+ [httpClient]
19083
19050
  );
19084
19051
  const performAction = async (action, data = {}) => {
19085
19052
  cancelPendingRefreshes();