@wise/dynamic-flow-client 3.9.1 → 3.9.2-experimental-535221d

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 (565) hide show
  1. package/build/common/errorBoundary/ErrorBoundary.js +44 -0
  2. package/build/common/errorBoundary/ErrorBoundaryAlert.js +12 -0
  3. package/build/common/httpClientContext/HttpClientContext.js +24 -0
  4. package/build/common/httpClientContext/index.js +1 -0
  5. package/build/common/makeHttpClient/index.js +1 -0
  6. package/build/common/makeHttpClient/makeHttpClient.js +34 -0
  7. package/build/common/makeHttpClient/makeHttpClient.spec.js +141 -0
  8. package/build/common/messages/external-confirmation.messages.js +23 -0
  9. package/build/common/messages/generic-error.messages.js +18 -0
  10. package/build/common/messages/help.messages.js +8 -0
  11. package/build/common/messages/multi-file-upload.messages.js +18 -0
  12. package/build/common/messages/multi-select.messages.js +8 -0
  13. package/build/common/messages/paragraph.messages.js +13 -0
  14. package/build/common/messages/repeatable.messages.js +23 -0
  15. package/build/common/messages/validation.array.messages.js +13 -0
  16. package/build/common/messages/validation.messages.js +53 -0
  17. package/build/common/utils/api-utils.js +4 -0
  18. package/build/i18n/de.json +46 -46
  19. package/build/i18n/en.json +46 -46
  20. package/build/i18n/es.json +46 -46
  21. package/build/i18n/fr.json +46 -46
  22. package/build/i18n/hu.json +46 -46
  23. package/build/i18n/id.json +46 -46
  24. package/build/i18n/index.js +36 -0
  25. package/build/i18n/it.json +46 -46
  26. package/build/i18n/ja.json +46 -46
  27. package/build/i18n/pl.json +46 -46
  28. package/build/i18n/pt.json +46 -46
  29. package/build/i18n/ro.json +46 -46
  30. package/build/i18n/ru.json +46 -46
  31. package/build/i18n/th.json +46 -46
  32. package/build/i18n/tr.json +46 -46
  33. package/build/i18n/zh_CN.json +46 -46
  34. package/build/i18n/zh_HK.json +46 -46
  35. package/build/index.js +11 -0
  36. package/build/legacy/common/constants/DateMode.js +4 -0
  37. package/build/legacy/common/constants/FeatureName.js +4 -0
  38. package/build/legacy/common/constants/FormControlType.js +21 -0
  39. package/build/legacy/common/constants/MonthFormat.js +4 -0
  40. package/build/legacy/common/constants/Size.js +7 -0
  41. package/build/legacy/common/constants/index.js +4 -0
  42. package/build/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.js +25 -0
  43. package/build/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.js +15 -0
  44. package/build/legacy/common/contexts/eventsContext/EventsContext.js +38 -0
  45. package/build/legacy/common/contexts/eventsContext/EventsContext.spec.js +47 -0
  46. package/build/legacy/common/contexts/featureContext/FeatureContext.js +11 -0
  47. package/build/legacy/common/contexts/featureContext/FeatureContext.spec.js +30 -0
  48. package/build/legacy/common/contexts/index.js +3 -0
  49. package/build/legacy/common/contexts/logContext/LogContext.js +44 -0
  50. package/build/legacy/common/contexts/logContext/LogContext.spec.js +43 -0
  51. package/build/legacy/common/hooks/index.js +7 -0
  52. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.js +9 -0
  53. package/build/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.spec.js +59 -0
  54. package/build/legacy/common/hooks/useExternal/useExternal.js +15 -0
  55. package/build/legacy/common/hooks/useExternal/useExternal.spec.js +236 -0
  56. package/build/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.js +71 -0
  57. package/build/legacy/common/hooks/usePersistAsync/usePersistAsync.js +172 -0
  58. package/build/legacy/common/hooks/usePolling/usePolling.js +53 -0
  59. package/build/legacy/common/hooks/usePrevious/usePrevious.js +8 -0
  60. package/build/legacy/common/hooks/useStepPolling/useStepPolling.js +45 -0
  61. package/build/legacy/common/hooks/useStepPolling/useStepPolling.spec.js +288 -0
  62. package/build/legacy/common/messages.js +8 -0
  63. package/build/legacy/common/utils/api-utils.js +6 -0
  64. package/build/legacy/common/utils/date-utils.js +22 -0
  65. package/build/legacy/common/utils/debounce.js +39 -0
  66. package/build/legacy/common/utils/debounce.spec.js +72 -0
  67. package/build/legacy/common/utils/file-utils.js +45 -0
  68. package/build/legacy/common/utils/file-utils.spec.js +69 -0
  69. package/build/legacy/common/utils/id-utils.js +5 -0
  70. package/build/legacy/common/utils/id-utils.spec.js +12 -0
  71. package/build/legacy/common/utils/index.js +11 -0
  72. package/build/legacy/common/utils/is-equal.js +21 -0
  73. package/build/legacy/common/utils/is-equal.spec.js +88 -0
  74. package/build/legacy/common/utils/misc-utils.js +4 -0
  75. package/build/legacy/common/utils/mobile-utils.js +23 -0
  76. package/build/legacy/common/utils/mobile-utils.spec.js +71 -0
  77. package/build/legacy/common/utils/model-utils.js +33 -0
  78. package/build/legacy/common/utils/schema-utils.js +113 -0
  79. package/build/legacy/common/utils/step-utils.js +32 -0
  80. package/build/legacy/common/validators/index.js +5 -0
  81. package/build/legacy/common/validators/models/model-utils.js +119 -0
  82. package/build/legacy/common/validators/models/model-utils.spec.js +45 -0
  83. package/build/legacy/common/validators/models/model-validators.js +62 -0
  84. package/build/legacy/common/validators/models/model-validators.spec.js +647 -0
  85. package/build/legacy/common/validators/schemas/schema-validators.js +101 -0
  86. package/build/legacy/common/validators/schemas/schema-validators.spec.js +157 -0
  87. package/build/legacy/common/validators/types/type-validators.js +14 -0
  88. package/build/legacy/common/validators/types/type-validators.spec.js +147 -0
  89. package/build/legacy/common/validators/validationFailures/validation-failures.js +139 -0
  90. package/build/legacy/common/validators/validationFailures/validation-failures.spec.js +198 -0
  91. package/build/legacy/common/validators/validationFailures/validation-failures.utils.js +40 -0
  92. package/build/legacy/common/validators/validationFailures/validation-failures.utils.spec.js +145 -0
  93. package/build/legacy/common/validators/values/value-validators.js +6 -0
  94. package/build/legacy/common/validators/values/value-validators.spec.js +22 -0
  95. package/build/legacy/dynamic-flow-types.js +1 -0
  96. package/build/legacy/dynamicFlow/BackButton.js +22 -0
  97. package/build/legacy/dynamicFlow/DynamicFlow.js +345 -0
  98. package/build/legacy/dynamicFlow/DynamicFlowStep.js +37 -0
  99. package/build/legacy/dynamicFlow/DynamicFlowTypes.js +1 -0
  100. package/build/legacy/dynamicFlow/index.js +1 -0
  101. package/build/legacy/dynamicFlow/stories/dev-tools/DynamicFlow.story.js +78 -0
  102. package/build/legacy/dynamicFlow/stories/dev-tools/ErrorResponses.story.js +124 -0
  103. package/build/legacy/dynamicFlow/stories/dev-tools/Examples.story.js +25 -0
  104. package/build/legacy/dynamicFlow/stories/dev-tools/Features.story.js +33 -0
  105. package/build/legacy/dynamicFlow/stories/dev-tools/JsonSchemaForm.story.js +31 -0
  106. package/build/legacy/dynamicFlow/stories/dev-tools/RefreshOnChange.story.js +194 -0
  107. package/build/legacy/dynamicFlow/stories/dev-tools/SearchFeature.story.js +253 -0
  108. package/build/legacy/dynamicFlow/stories/dev-tools/ServerTest.story.js +44 -0
  109. package/build/legacy/dynamicFlow/stories/dev-tools/Upload.story.js +212 -0
  110. package/build/legacy/dynamicFlow/stories/dev-tools/ValidationAsync.story.js +156 -0
  111. package/build/legacy/dynamicFlow/stories/examples/ObjectConst.story.js +150 -0
  112. package/build/legacy/dynamicFlow/stories/fixtureHttpClient.js +117 -0
  113. package/build/legacy/dynamicFlow/stories/visual-tests/VisualTests.story.js +43 -0
  114. package/build/legacy/dynamicFlow/tests/Actions.spec.js +232 -0
  115. package/build/legacy/dynamicFlow/tests/AllOfSchema.spec.js +196 -0
  116. package/build/legacy/dynamicFlow/tests/AutocompleteHints.spec.js +59 -0
  117. package/build/legacy/dynamicFlow/tests/DynamicFlow.BackButton.spec.js +179 -0
  118. package/build/legacy/dynamicFlow/tests/DynamicFlow.search.spec.js +475 -0
  119. package/build/legacy/dynamicFlow/tests/DynamicFlow.spec.js +559 -0
  120. package/build/legacy/dynamicFlow/tests/DynamicImage.spec.js +287 -0
  121. package/build/legacy/dynamicFlow/tests/DynamicInstructions.spec.js +49 -0
  122. package/build/legacy/dynamicFlow/tests/HiddenSchemas.spec.js +307 -0
  123. package/build/legacy/dynamicFlow/tests/ModalLayout.spec.js +252 -0
  124. package/build/legacy/dynamicFlow/tests/MultiSelect.spec.js +327 -0
  125. package/build/legacy/dynamicFlow/tests/MultipleFileUploadSchema.spec.js +401 -0
  126. package/build/legacy/dynamicFlow/tests/ObjectSchema.spec.js +295 -0
  127. package/build/legacy/dynamicFlow/tests/OneOfSchema.spec.js +773 -0
  128. package/build/legacy/dynamicFlow/tests/PersistAsync.blob-schema.spec.js +331 -0
  129. package/build/legacy/dynamicFlow/tests/PersistAsync.string-schema.spec.js +389 -0
  130. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.debouncing.spec.js +391 -0
  131. package/build/legacy/dynamicFlow/tests/RefreshStepOnChange.spec.js +567 -0
  132. package/build/legacy/dynamicFlow/tests/RepeatableSchema.spec.js +977 -0
  133. package/build/legacy/dynamicFlow/tests/StepModel.spec.js +119 -0
  134. package/build/legacy/dynamicFlow/tests/ValidationAsync.spec.js +484 -0
  135. package/build/legacy/dynamicFlow/tests/ssr.spec.js +47 -0
  136. package/build/legacy/dynamicFlow/utils/index.js +5 -0
  137. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.js +185 -0
  138. package/build/legacy/dynamicFlow/utils/responseParsers/response-parsers.spec.js +463 -0
  139. package/build/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.js +35 -0
  140. package/build/legacy/dynamicFlow/utils/useDynamicFlowState.js +137 -0
  141. package/build/legacy/dynamicFlow/utils/useLoader.js +22 -0
  142. package/build/legacy/formControl/FormControl.js +267 -0
  143. package/build/legacy/formControl/Select.spec.js +104 -0
  144. package/build/legacy/formControl/index.js +1 -0
  145. package/build/legacy/formControl/utils/getAutocompleteString.js +80 -0
  146. package/build/legacy/formControl/utils/getAutocompleteString.spec.js +30 -0
  147. package/build/legacy/formControl/utils/index.js +2 -0
  148. package/build/legacy/formControl/utils/value-utils.js +108 -0
  149. package/build/legacy/formControl/utils/value-utils.spec.js +158 -0
  150. package/build/legacy/jsonSchemaForm/JsonSchemaForm.end-to-end.spec.js +534 -0
  151. package/build/legacy/jsonSchemaForm/JsonSchemaForm.js +24 -0
  152. package/build/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.js +50 -0
  153. package/build/legacy/jsonSchemaForm/allOfSchema/index.js +1 -0
  154. package/build/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.js +25 -0
  155. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.js +34 -0
  156. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/index.js +1 -0
  157. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.js +73 -0
  158. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.js +141 -0
  159. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/index.js +1 -0
  160. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/index.js +2 -0
  161. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/upload-utils.js +79 -0
  162. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.js +14 -0
  163. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.js +7 -0
  164. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.js +134 -0
  165. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.js +85 -0
  166. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.js +135 -0
  167. package/build/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/utils/summary-utils.spec.js +909 -0
  168. package/build/legacy/jsonSchemaForm/arrayTypeSchema/index.js +1 -0
  169. package/build/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.js +100 -0
  170. package/build/legacy/jsonSchemaForm/basicTypeSchema/index.js +1 -0
  171. package/build/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.js +89 -0
  172. package/build/legacy/jsonSchemaForm/controlFeedback/index.js +1 -0
  173. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.js +85 -0
  174. package/build/legacy/jsonSchemaForm/genericSchema/GenericSchema.rtl.spec.js +55 -0
  175. package/build/legacy/jsonSchemaForm/genericSchema/index.js +1 -0
  176. package/build/legacy/jsonSchemaForm/help/Help.js +9 -0
  177. package/build/legacy/jsonSchemaForm/help/index.js +1 -0
  178. package/build/legacy/jsonSchemaForm/index.js +1 -0
  179. package/build/legacy/jsonSchemaForm/objectSchema/ObjectSchema.js +77 -0
  180. package/build/legacy/jsonSchemaForm/objectSchema/index.js +1 -0
  181. package/build/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.js +155 -0
  182. package/build/legacy/jsonSchemaForm/oneOfSchema/index.js +1 -0
  183. package/build/legacy/jsonSchemaForm/oneOfSchema/utils.js +68 -0
  184. package/build/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.js +26 -0
  185. package/build/legacy/jsonSchemaForm/persistAsyncSchema/index.js +1 -0
  186. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.js +165 -0
  187. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/index.js +1 -0
  188. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.js +131 -0
  189. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.js +31 -0
  190. package/build/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/index.js +1 -0
  191. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.js +72 -0
  192. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/index.js +1 -0
  193. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.js +8 -0
  194. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.js +16 -0
  195. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.js +31 -0
  196. package/build/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.js +32 -0
  197. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.js +54 -0
  198. package/build/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.js +13 -0
  199. package/build/legacy/jsonSchemaForm/readOnlySchema/index.js +1 -0
  200. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.js +138 -0
  201. package/build/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.spec.js +312 -0
  202. package/build/legacy/jsonSchemaForm/schemaFormControl/index.js +1 -0
  203. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/index.js +1 -0
  204. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.js +107 -0
  205. package/build/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.spec.js +220 -0
  206. package/build/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.js +150 -0
  207. package/build/legacy/jsonSchemaForm/validationAsyncSchema/index.js +1 -0
  208. package/build/legacy/layout/DynamicLayout.js +68 -0
  209. package/build/legacy/layout/alert/DynamicAlert.js +29 -0
  210. package/build/legacy/layout/box/DynamicBox.js +30 -0
  211. package/build/legacy/layout/button/DynamicButton.js +16 -0
  212. package/build/legacy/layout/button/DynamicButton.spec.js +141 -0
  213. package/build/legacy/layout/button/utils.js +45 -0
  214. package/build/legacy/layout/button/utils.spec.js +50 -0
  215. package/build/legacy/layout/columns/DynamicColumns.js +27 -0
  216. package/build/legacy/layout/decision/DynamicDecision.js +10 -0
  217. package/build/legacy/layout/divider/DynamicDivider.js +9 -0
  218. package/build/legacy/layout/external/DynamicExternal.js +32 -0
  219. package/build/legacy/layout/external/DynamicExternal.messages.js +8 -0
  220. package/build/legacy/layout/form/DynamicForm.js +22 -0
  221. package/build/legacy/layout/heading/DynamicHeading.js +40 -0
  222. package/build/legacy/layout/icon/DynamicIcon.js +17 -0
  223. package/build/legacy/layout/icon/DynamicIcon.spec.js +20 -0
  224. package/build/legacy/layout/icon/FlagIcon.js +11 -0
  225. package/build/legacy/layout/icon/NamedIcon.js +19 -0
  226. package/build/legacy/layout/image/DynamicImage.js +112 -0
  227. package/build/legacy/layout/index.js +20 -0
  228. package/build/legacy/layout/instructions/DynamicInstructions.js +19 -0
  229. package/build/legacy/layout/list/DynamicStatusList.js +37 -0
  230. package/build/legacy/layout/list/DynamicStatusList.spec.js +111 -0
  231. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.js +11 -0
  232. package/build/legacy/layout/loadingIndicator/DynamicLoadingIndicator.spec.js +25 -0
  233. package/build/legacy/layout/markdown/DynamicMarkdown.js +12 -0
  234. package/build/legacy/layout/markdown/DynamicMarkdown.spec.js +58 -0
  235. package/build/legacy/layout/modal/DynamicModal.js +26 -0
  236. package/build/legacy/layout/paragraph/DynamicParagraph.js +35 -0
  237. package/build/legacy/layout/paragraph/useSnackBarIfAvailable.js +9 -0
  238. package/build/legacy/layout/review/DynamicReview.js +47 -0
  239. package/build/legacy/layout/review/DynamicReview.spec.js +152 -0
  240. package/build/legacy/layout/search/DynamicSearch.js +83 -0
  241. package/build/legacy/layout/search/SearchInput.js +6 -0
  242. package/build/legacy/layout/search/SearchResults.js +20 -0
  243. package/build/legacy/layout/search/useSearch.js +137 -0
  244. package/build/legacy/layout/utils/getNavigationOptionMedia.js +17 -0
  245. package/build/legacy/layout/utils/index.js +32 -0
  246. package/build/legacy/step/cameraStep/CameraStep.js +124 -0
  247. package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.js +161 -0
  248. package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.js +58 -0
  249. package/build/legacy/step/cameraStep/cameraCapture/CameraCapture.spec.js +432 -0
  250. package/build/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.js +17 -0
  251. package/build/legacy/step/cameraStep/cameraCapture/components/index.js +3 -0
  252. package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.js +8 -0
  253. package/build/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.js +8 -0
  254. package/build/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.js +62 -0
  255. package/build/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.js +80 -0
  256. package/build/legacy/step/cameraStep/cameraCapture/index.js +1 -0
  257. package/build/legacy/step/cameraStep/cameraCapture/overlay/Overlay.js +77 -0
  258. package/build/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.js +7 -0
  259. package/build/legacy/step/cameraStep/cameraCapture/screens/index.js +1 -0
  260. package/build/legacy/step/cameraStep/cameraCapture/tracking/index.js +109 -0
  261. package/build/legacy/step/cameraStep/cameraCapture/types/index.js +7 -0
  262. package/build/legacy/step/cameraStep/cameraCapture/utils/index.js +107 -0
  263. package/build/legacy/step/cameraStep/index.js +1 -0
  264. package/build/legacy/step/externalConfirmationStep/ExternalConfirmationStep.js +64 -0
  265. package/build/legacy/step/externalConfirmationStep/index.js +1 -0
  266. package/build/legacy/step/index.js +3 -0
  267. package/build/legacy/step/layoutStep/LayoutStep.js +33 -0
  268. package/build/legacy/step/layoutStep/index.js +1 -0
  269. package/build/legacy/step/layoutStep/utils/index.js +2 -0
  270. package/build/legacy/step/layoutStep/utils/inline-reference-utils.js +105 -0
  271. package/build/legacy/step/layoutStep/utils/layout-utils.js +212 -0
  272. package/build/legacy/test-utils/DynamicFlowProviders.js +8 -0
  273. package/build/legacy/test-utils/index.js +4 -0
  274. package/build/legacy/test-utils/legacy-utils.js +69 -0
  275. package/build/legacy/test-utils/log-utils.js +9 -0
  276. package/build/main.js +735 -684
  277. package/build/main.min.js +1 -1
  278. package/build/main.mjs +503 -452
  279. package/build/revamp/DynamicFlowCore.js +25 -0
  280. package/build/revamp/DynamicFlowWise.js +32 -0
  281. package/build/revamp/DynamicFlowWise.spec.js +105 -0
  282. package/build/revamp/DynamicFragmentWise.js +83 -0
  283. package/build/revamp/domain/components/AlertComponent.js +50 -0
  284. package/build/revamp/domain/components/AllOfComponent.js +72 -0
  285. package/build/revamp/domain/components/BooleanInputComponent.js +109 -0
  286. package/build/revamp/domain/components/BoxComponent.js +65 -0
  287. package/build/revamp/domain/components/ButtonComponent.js +50 -0
  288. package/build/revamp/domain/components/ColumnsComponent.js +74 -0
  289. package/build/revamp/domain/components/ConstComponent.js +50 -0
  290. package/build/revamp/domain/components/ContainerComponent.js +65 -0
  291. package/build/revamp/domain/components/DateInputComponent.js +128 -0
  292. package/build/revamp/domain/components/DecisionComponent.js +50 -0
  293. package/build/revamp/domain/components/DividerComponent.js +50 -0
  294. package/build/revamp/domain/components/FormComponent.js +65 -0
  295. package/build/revamp/domain/components/HeadingComponent.js +50 -0
  296. package/build/revamp/domain/components/ImageComponent.js +50 -0
  297. package/build/revamp/domain/components/InstructionsComponent.js +50 -0
  298. package/build/revamp/domain/components/IntegerInputComponent.js +129 -0
  299. package/build/revamp/domain/components/LoadingIndicatorComponent.js +50 -0
  300. package/build/revamp/domain/components/MarkdownComponent.js +50 -0
  301. package/build/revamp/domain/components/ModalComponent.js +65 -0
  302. package/build/revamp/domain/components/MultiUploadInputComponent.js +192 -0
  303. package/build/revamp/domain/components/NumberInputComponent.js +129 -0
  304. package/build/revamp/domain/components/ObjectComponent.js +104 -0
  305. package/build/revamp/domain/components/ParagraphComponent.js +50 -0
  306. package/build/revamp/domain/components/ReviewComponent.js +50 -0
  307. package/build/revamp/domain/components/SelectInputComponent.js +140 -0
  308. package/build/revamp/domain/components/StatusListComponent.js +50 -0
  309. package/build/revamp/domain/components/StepDomainComponent.js +87 -0
  310. package/build/revamp/domain/components/TextInputComponent.js +129 -0
  311. package/build/revamp/domain/components/UploadInputComponent.js +154 -0
  312. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.js +150 -0
  313. package/build/revamp/domain/components/repeatableComponent/RepeatableComponent.spec.js +146 -0
  314. package/build/revamp/domain/components/searchComponent/SearchComponent.js +111 -0
  315. package/build/revamp/domain/components/searchComponent/SearchComponent.spec.js +327 -0
  316. package/build/revamp/domain/components/utils/component-utils.js +18 -0
  317. package/build/revamp/domain/components/utils/debounce.js +38 -0
  318. package/build/revamp/domain/components/utils/debounce.spec.js +72 -0
  319. package/build/revamp/domain/components/utils/file-utils.js +46 -0
  320. package/build/revamp/domain/components/utils/getComponentForLocalValueKey.js +31 -0
  321. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.js +53 -0
  322. package/build/revamp/domain/components/utils/isPartialLocalValueMatch.spec.js +108 -0
  323. package/build/revamp/domain/features/events.js +1 -0
  324. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.js +133 -0
  325. package/build/revamp/domain/features/persistAsync/getComponentPersistAsync.spec.js +200 -0
  326. package/build/revamp/domain/features/persistAsync/getInitialPersistedState.js +6 -0
  327. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.js +103 -0
  328. package/build/revamp/domain/features/persistAsync/getPerformPersistAsync.spec.js +280 -0
  329. package/build/revamp/domain/features/polling/getStepPolling.js +82 -0
  330. package/build/revamp/domain/features/polling/getStepPolling.spec.js +170 -0
  331. package/build/revamp/domain/features/refresh/getPerformRefresh.js +16 -0
  332. package/build/revamp/domain/features/search/getPerformSearchFunction.js +104 -0
  333. package/build/revamp/domain/features/search/getPerformSearchFunction.spec.js +260 -0
  334. package/build/revamp/domain/features/summary/summary-utils.js +39 -0
  335. package/build/revamp/domain/features/summary/summary-utils.spec.js +110 -0
  336. package/build/revamp/domain/features/utils/http-utils.js +34 -0
  337. package/build/revamp/domain/features/utils/response-utils.js +9 -0
  338. package/build/revamp/domain/features/validation/spec-utils.js +16 -0
  339. package/build/revamp/domain/features/validation/validation-functions.js +12 -0
  340. package/build/revamp/domain/features/validation/validation-functions.spec.js +110 -0
  341. package/build/revamp/domain/features/validation/value-checks.js +111 -0
  342. package/build/revamp/domain/features/validation/value-checks.spec.js +204 -0
  343. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.js +95 -0
  344. package/build/revamp/domain/features/validationAsync/getComponentValidationAsync.spec.js +178 -0
  345. package/build/revamp/domain/features/validationAsync/getInitialValidationState.js +5 -0
  346. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.js +107 -0
  347. package/build/revamp/domain/features/validationAsync/getPerformValidationAsync.spec.js +266 -0
  348. package/build/revamp/domain/mappers/layout/alertLayoutToComponent.js +12 -0
  349. package/build/revamp/domain/mappers/layout/boxLayoutToComponents.js +15 -0
  350. package/build/revamp/domain/mappers/layout/buttonLayoutToComponent.js +45 -0
  351. package/build/revamp/domain/mappers/layout/columnsLayoutToComponent.js +18 -0
  352. package/build/revamp/domain/mappers/layout/decisionLayoutToComponent.js +40 -0
  353. package/build/revamp/domain/mappers/layout/dividerLayoutToComponent.js +5 -0
  354. package/build/revamp/domain/mappers/layout/formLayoutToComponent.js +27 -0
  355. package/build/revamp/domain/mappers/layout/headingLayoutToComponent.js +13 -0
  356. package/build/revamp/domain/mappers/layout/imageLayoutToComponent.js +12 -0
  357. package/build/revamp/domain/mappers/layout/infoLayoutToComponent.js +12 -0
  358. package/build/revamp/domain/mappers/layout/instructionsLayoutToComponent.js +18 -0
  359. package/build/revamp/domain/mappers/layout/listLayoutToComponent.js +30 -0
  360. package/build/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.js +5 -0
  361. package/build/revamp/domain/mappers/layout/markdownLayoutToComponent.js +12 -0
  362. package/build/revamp/domain/mappers/layout/modalLayoutToComponent.js +17 -0
  363. package/build/revamp/domain/mappers/layout/paragraphLayoutToComponent.js +12 -0
  364. package/build/revamp/domain/mappers/layout/reviewLayoutToComponent.js +51 -0
  365. package/build/revamp/domain/mappers/layout/searchLayoutToComponent.js +14 -0
  366. package/build/revamp/domain/mappers/layout/statusListLayoutToComponent.js +11 -0
  367. package/build/revamp/domain/mappers/mapLayoutToComponent.js +63 -0
  368. package/build/revamp/domain/mappers/mapSchemaToComponent.js +84 -0
  369. package/build/revamp/domain/mappers/mapSchemaToComponent.spec.js +197 -0
  370. package/build/revamp/domain/mappers/mapStepToComponent.js +159 -0
  371. package/build/revamp/domain/mappers/mapStepToComponent.spec.js +236 -0
  372. package/build/revamp/domain/mappers/schema/allOfSchemaToComponent.js +29 -0
  373. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToComponent.js +35 -0
  374. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToMultiUploadComponent.js +64 -0
  375. package/build/revamp/domain/mappers/schema/arraySchemaToComponent/arraySchemaToRepeatableComponent.js +66 -0
  376. package/build/revamp/domain/mappers/schema/blobSchemaToComponent.js +30 -0
  377. package/build/revamp/domain/mappers/schema/booleanSchemaToComponent.js +38 -0
  378. package/build/revamp/domain/mappers/schema/constSchemaToComponent.js +14 -0
  379. package/build/revamp/domain/mappers/schema/integerSchemaToComponent.js +36 -0
  380. package/build/revamp/domain/mappers/schema/numberSchemaToComponent.js +35 -0
  381. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.js +41 -0
  382. package/build/revamp/domain/mappers/schema/objectSchemaToComponent/objectSchemaToComponent.spec.js +165 -0
  383. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.js +67 -0
  384. package/build/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.spec.js +316 -0
  385. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.js +14 -0
  386. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.spec.js +220 -0
  387. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.js +37 -0
  388. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.js +45 -0
  389. package/build/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.js +32 -0
  390. package/build/revamp/domain/mappers/schema/tests/test-utils.js +27 -0
  391. package/build/revamp/domain/mappers/schema/types.js +1 -0
  392. package/build/revamp/domain/mappers/schema/utils/getPersistAsyncInitialState.js +35 -0
  393. package/build/revamp/domain/mappers/schema/utils/getValidationAsyncInitialState.js +25 -0
  394. package/build/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.js +28 -0
  395. package/build/revamp/domain/mappers/types.js +1 -0
  396. package/build/revamp/domain/mappers/utils/getAutocompleteString.js +76 -0
  397. package/build/revamp/domain/mappers/utils/getAutocompleteString.spec.js +21 -0
  398. package/build/revamp/domain/mappers/utils/getRandomId.js +2 -0
  399. package/build/revamp/domain/mappers/utils/inlineAction.js +23 -0
  400. package/build/revamp/domain/mappers/utils/legacy-utils.js +53 -0
  401. package/build/revamp/domain/types.js +1 -0
  402. package/build/revamp/flow/executeRefresh.js +97 -0
  403. package/build/revamp/flow/executeSubmission.js +160 -0
  404. package/build/revamp/flow/getResponseType.js +76 -0
  405. package/build/revamp/flow/response-utils.js +92 -0
  406. package/build/revamp/renderers/CoreContainerRenderer.js +8 -0
  407. package/build/revamp/renderers/getRenderFunction.js +55 -0
  408. package/build/revamp/renderers/getSchemaErrorMessageFunction.js +90 -0
  409. package/build/revamp/renderers/mappers/alertComponentToProps.js +4 -0
  410. package/build/revamp/renderers/mappers/allOfComponentToProps.js +11 -0
  411. package/build/revamp/renderers/mappers/booleanInputComponentToProps.js +16 -0
  412. package/build/revamp/renderers/mappers/boxComponentToProps.js +4 -0
  413. package/build/revamp/renderers/mappers/buttonComponentToProps.js +14 -0
  414. package/build/revamp/renderers/mappers/columnsComponentToProps.js +4 -0
  415. package/build/revamp/renderers/mappers/componentToRendererProps.js +105 -0
  416. package/build/revamp/renderers/mappers/containerComponentToProps.js +4 -0
  417. package/build/revamp/renderers/mappers/dateInputComponentToProps.js +13 -0
  418. package/build/revamp/renderers/mappers/decisionComponentToProps.js +4 -0
  419. package/build/revamp/renderers/mappers/dividerComponentToProps.js +4 -0
  420. package/build/revamp/renderers/mappers/formComponentToProps.js +4 -0
  421. package/build/revamp/renderers/mappers/headingComponentToProps.js +11 -0
  422. package/build/revamp/renderers/mappers/hiddenComponentToProps.js +3 -0
  423. package/build/revamp/renderers/mappers/imageComponentToProps.js +11 -0
  424. package/build/revamp/renderers/mappers/instructionsComponentToProps.js +10 -0
  425. package/build/revamp/renderers/mappers/integerInputComponentToProps.js +13 -0
  426. package/build/revamp/renderers/mappers/loadingIndicatorComponentToProps.js +9 -0
  427. package/build/revamp/renderers/mappers/markdownComponentToProps.js +10 -0
  428. package/build/revamp/renderers/mappers/modalComponentToProps.js +10 -0
  429. package/build/revamp/renderers/mappers/multiUploadInputComponentToProps.js +24 -0
  430. package/build/revamp/renderers/mappers/numberInputComponentToProps.js +13 -0
  431. package/build/revamp/renderers/mappers/objectComponentToProps.js +11 -0
  432. package/build/revamp/renderers/mappers/paragraphComponentToProps.js +10 -0
  433. package/build/revamp/renderers/mappers/repeatableComponentToProps.js +40 -0
  434. package/build/revamp/renderers/mappers/reviewComponentToProps.js +11 -0
  435. package/build/revamp/renderers/mappers/searchComponentToProps.js +53 -0
  436. package/build/revamp/renderers/mappers/selectInputComponentToProps.js +29 -0
  437. package/build/revamp/renderers/mappers/statusListComponentToProps.js +10 -0
  438. package/build/revamp/renderers/mappers/textInputComponentToProps.js +13 -0
  439. package/build/revamp/renderers/mappers/uploadInputComponentToProps.js +16 -0
  440. package/build/revamp/renderers/mappers/utils/inputComponentToProps.js +27 -0
  441. package/build/revamp/renderers/stepComponentToProps.js +11 -0
  442. package/build/revamp/renderers/types.js +1 -0
  443. package/build/revamp/stories/dev-tools/ActionResponse.story.js +101 -0
  444. package/build/revamp/stories/dev-tools/DynamicFlowRevamp.story.js +314 -0
  445. package/build/revamp/stories/dev-tools/EditableStep.story.js +71 -0
  446. package/build/revamp/stories/dev-tools/ErrorHandling.story.js +149 -0
  447. package/build/revamp/stories/dev-tools/External.story.js +83 -0
  448. package/build/revamp/stories/dev-tools/OneOf.Inititalisation.story.js +123 -0
  449. package/build/revamp/stories/dev-tools/PersistAsync.story.js +168 -0
  450. package/build/revamp/stories/dev-tools/Polling.story.js +79 -0
  451. package/build/revamp/stories/dev-tools/RefreshOnChange.story.js +309 -0
  452. package/build/revamp/stories/dev-tools/RefreshOnChange.with.PersistAsync.story.js +1004 -0
  453. package/build/revamp/stories/dev-tools/SearchFeature.story.js +260 -0
  454. package/build/revamp/stories/dev-tools/ServerTest.story.js +81 -0
  455. package/build/revamp/stories/dev-tools/Upload.story.js +221 -0
  456. package/build/revamp/stories/dev-tools/ValidationAsync.story.js +161 -0
  457. package/build/revamp/stories/examples/ObjectConst.story.js +153 -0
  458. package/build/revamp/stories/examples/OneOfInitialisation.story.js +102 -0
  459. package/build/revamp/stories/utils/fixtureHttpClient.js +130 -0
  460. package/build/revamp/stories/utils/mockSearchHandler.js +125 -0
  461. package/build/revamp/stories/visual-tests/VisualTests.story.js +111 -0
  462. package/build/revamp/test-utils/component-utils.js +19 -0
  463. package/build/revamp/test-utils/step-utils.js +6 -0
  464. package/build/revamp/tests/ImageRenderer.spec.js +108 -0
  465. package/build/revamp/tests/InitialAction.spec.js +299 -0
  466. package/build/revamp/tests/InitialStep.spec.js +104 -0
  467. package/build/revamp/tests/Logging.spec.js +112 -0
  468. package/build/revamp/tests/OneOfInitialisation.spec.js +754 -0
  469. package/build/revamp/tests/Polling.spec.js +611 -0
  470. package/build/revamp/tests/RefreshOnChange.ResponseHandling.spec.js +322 -0
  471. package/build/revamp/tests/RefreshOnChange.with.Segmented.spec.js +447 -0
  472. package/build/revamp/tests/RefreshOnChange.with.Tabs.spec.js +447 -0
  473. package/build/revamp/tests/RefreshOnChangePreserve.spec.js +218 -0
  474. package/build/revamp/tests/Rerendering.spec.js +156 -0
  475. package/build/revamp/tests/SegmentedControl.spec.js +48 -0
  476. package/build/revamp/tests/Submission.ResponseHandling.spec.js +697 -0
  477. package/build/revamp/tests/Submission.spec.js +399 -0
  478. package/build/revamp/tests/legacy/Actions.spec.js +242 -0
  479. package/build/revamp/tests/legacy/BackButton.spec.js +189 -0
  480. package/build/revamp/tests/legacy/HiddenSchemas.spec.js +312 -0
  481. package/build/revamp/tests/legacy/MultipleFileUploadSchema.spec.js +447 -0
  482. package/build/revamp/tests/legacy/PersistAsync.blob-schema.spec.js +339 -0
  483. package/build/revamp/tests/legacy/PersistAsync.string-schema.spec.js +385 -0
  484. package/build/revamp/tests/legacy/RefreshStepOnChange.debouncing.spec.js +352 -0
  485. package/build/revamp/tests/legacy/RefreshStepOnChange.spec.js +623 -0
  486. package/build/revamp/tests/legacy/Search.spec.js +501 -0
  487. package/build/revamp/tests/legacy/ValidationAsync.spec.js +452 -0
  488. package/build/revamp/tests/legacy/useExternal.spec.js +235 -0
  489. package/build/revamp/types.js +1 -0
  490. package/build/revamp/useDynamicFlowCore.js +285 -0
  491. package/build/revamp/utils/component-utils.js +86 -0
  492. package/build/revamp/utils/component-utils.spec.js +385 -0
  493. package/build/revamp/utils/findComponent.js +29 -0
  494. package/build/revamp/utils/findComponent.spec.js +92 -0
  495. package/build/revamp/utils/type-utils.js +59 -0
  496. package/build/revamp/utils/type-validators.js +16 -0
  497. package/build/revamp/utils/type-validators.spec.js +163 -0
  498. package/build/revamp/utils/useStableCallback.js +21 -0
  499. package/build/revamp/wise/renderers/AlertRenderer.js +11 -0
  500. package/build/revamp/wise/renderers/BooleanInputRenderer.js +34 -0
  501. package/build/revamp/wise/renderers/BoxRenderer.js +19 -0
  502. package/build/revamp/wise/renderers/ButtonRenderer.js +53 -0
  503. package/build/revamp/wise/renderers/ColumnsRenderer.js +14 -0
  504. package/build/revamp/wise/renderers/DateInputRenderer.js +35 -0
  505. package/build/revamp/wise/renderers/DecisionRenderer.js +18 -0
  506. package/build/revamp/wise/renderers/DividerRenderer.js +10 -0
  507. package/build/revamp/wise/renderers/FormRenderer.js +10 -0
  508. package/build/revamp/wise/renderers/FormSectionRenderer.js +16 -0
  509. package/build/revamp/wise/renderers/HeadingRenderer.js +57 -0
  510. package/build/revamp/wise/renderers/ImageRenderer.js +112 -0
  511. package/build/revamp/wise/renderers/InstructionsRenderer.js +23 -0
  512. package/build/revamp/wise/renderers/IntegerInputRenderer.js +38 -0
  513. package/build/revamp/wise/renderers/LoadingIndicatorRenderer.js +11 -0
  514. package/build/revamp/wise/renderers/MarkdownRenderer.js +11 -0
  515. package/build/revamp/wise/renderers/ModalRenderer.js +25 -0
  516. package/build/revamp/wise/renderers/MultiUploadInputRenderer.js +63 -0
  517. package/build/revamp/wise/renderers/NumberInputRenderer.js +38 -0
  518. package/build/revamp/wise/renderers/ParagraphRenderer.js +45 -0
  519. package/build/revamp/wise/renderers/RepeatableRenderer.js +58 -0
  520. package/build/revamp/wise/renderers/ReviewRenderer.js +35 -0
  521. package/build/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.js +59 -0
  522. package/build/revamp/wise/renderers/SearchRenderer/ErrorResult.js +11 -0
  523. package/build/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.js +63 -0
  524. package/build/revamp/wise/renderers/SearchRenderer/SearchRenderer.js +21 -0
  525. package/build/revamp/wise/renderers/SelectInputRenderer/OptionMedia.js +16 -0
  526. package/build/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.js +14 -0
  527. package/build/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.js +21 -0
  528. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.js +33 -0
  529. package/build/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.js +56 -0
  530. package/build/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.js +16 -0
  531. package/build/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.js +22 -0
  532. package/build/revamp/wise/renderers/StatusListRenderer.js +21 -0
  533. package/build/revamp/wise/renderers/TextInputRenderer.js +35 -0
  534. package/build/revamp/wise/renderers/UploadInputRenderer.js +136 -0
  535. package/build/revamp/wise/renderers/components/FieldInput.js +9 -0
  536. package/build/revamp/wise/renderers/components/Help.js +10 -0
  537. package/build/revamp/wise/renderers/components/LabelContentWithHelp.js +6 -0
  538. package/build/revamp/wise/renderers/components/UploadFieldInput.js +14 -0
  539. package/build/revamp/wise/renderers/components/VariableDateInput.js +30 -0
  540. package/build/revamp/wise/renderers/components/VariableTextInput.js +69 -0
  541. package/build/revamp/wise/renderers/components/icon/DynamicIcon.js +17 -0
  542. package/build/revamp/wise/renderers/components/icon/FlagIcon.js +11 -0
  543. package/build/revamp/wise/renderers/components/icon/NamedIcon.js +19 -0
  544. package/build/revamp/wise/renderers/components/icon/NavigationOptionMedia.js +20 -0
  545. package/build/revamp/wise/renderers/getWiseRenderers.js +59 -0
  546. package/build/revamp/wise/renderers/hooks/useSnackBarIfAvailable.js +6 -0
  547. package/build/revamp/wise/renderers/step/BackButton.js +11 -0
  548. package/build/revamp/wise/renderers/step/ExternalConfirmationDialog.js +20 -0
  549. package/build/revamp/wise/renderers/step/StepRenderer.js +30 -0
  550. package/build/revamp/wise/renderers/step/StepRendererContext.js +11 -0
  551. package/build/revamp/wise/renderers/step/useExternal.js +15 -0
  552. package/build/revamp/wise/renderers/utils/file-utils.js +70 -0
  553. package/build/revamp/wise/renderers/utils/getRandomId.js +2 -0
  554. package/build/revamp/wise/renderers/utils/input-utils.js +6 -0
  555. package/build/revamp/wise/renderers/utils/layout-utils.js +31 -0
  556. package/build/revamp/wise/renderers/utils/value-utils.js +23 -0
  557. package/build/revamp/wise/renderers/utils/value-utils.spec.js +33 -0
  558. package/build/revamp/wise/renderers/validators/type-validators.js +15 -0
  559. package/build/test-utils/NeptuneProviders.js +23 -0
  560. package/build/test-utils/fetch-utils.js +104 -0
  561. package/build/test-utils/index.js +2 -0
  562. package/build/test-utils/rtl-utils.js +20 -0
  563. package/build/types/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +1 -0
  564. package/build/types/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.d.ts +2 -0
  565. package/package.json +2 -2
package/build/main.mjs CHANGED
@@ -10202,7 +10202,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10202
10202
  return deterministicId || (id ? `radix-${id}` : "");
10203
10203
  }
10204
10204
 
10205
- // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.27.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10205
+ // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.29.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10206
10206
  var import_classnames = __toESM(require_classnames(), 1);
10207
10207
  import { InlineAlert, Sentiment as Sentiment2, Input, TextArea } from "@transferwise/components";
10208
10208
  import { createContext as createContext2, useContext as useContext2, forwardRef } from "react";
@@ -11652,6 +11652,7 @@ function SelectInputRendererComponent(props) {
11652
11652
  label,
11653
11653
  options,
11654
11654
  placeholder,
11655
+ required,
11655
11656
  selectedIndex,
11656
11657
  onSelect
11657
11658
  } = props;
@@ -11694,26 +11695,60 @@ function SelectInputRendererComponent(props) {
11694
11695
  renderValue,
11695
11696
  filterable: items.length >= 8,
11696
11697
  onChange: onSelect,
11697
- onClear: () => onSelect(null)
11698
+ onClear: required ? void 0 : () => onSelect(null)
11698
11699
  }
11699
11700
  ) }),
11700
11701
  children
11701
11702
  ] });
11702
11703
  }
11703
11704
 
11705
+ // src/revamp/wise/renderers/SelectInputRenderer/SegmentedInputRendererComponent.tsx
11706
+ import { useEffect as useEffect5 } from "react";
11707
+ import { SegmentedControl } from "@transferwise/components";
11708
+ import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs18 } from "react/jsx-runtime";
11709
+ function SegmentedInputRendererComponent(props) {
11710
+ const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
11711
+ useEffect5(() => {
11712
+ if (!isValidIndex2(selectedIndex, options.length)) {
11713
+ onSelect(0);
11714
+ }
11715
+ }, [selectedIndex, onSelect, options.length]);
11716
+ return /* @__PURE__ */ jsxs18(Fragment9, { children: [
11717
+ /* @__PURE__ */ jsx48(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx48(
11718
+ SegmentedControl,
11719
+ {
11720
+ name: `${id}-segmented-control`,
11721
+ value: String(selectedIndex),
11722
+ mode: "view",
11723
+ segments: options.map((option, index) => ({
11724
+ id: String(index),
11725
+ value: String(index),
11726
+ label: option.title,
11727
+ controls: `${id}-children`
11728
+ })),
11729
+ onChange: (value) => onSelect(Number(value))
11730
+ }
11731
+ ) }),
11732
+ /* @__PURE__ */ jsx48("div", { id: `${id}-children`, children })
11733
+ ] });
11734
+ }
11735
+ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
11736
+
11704
11737
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
11705
- import { jsx as jsx48 } from "react/jsx-runtime";
11738
+ import { jsx as jsx49 } from "react/jsx-runtime";
11706
11739
  var SelectInputRenderer = {
11707
11740
  canRenderType: "input-select",
11708
11741
  render: (props) => {
11709
11742
  switch (props.control) {
11710
11743
  case "radio":
11711
- return /* @__PURE__ */ jsx48(RadioInputRendererComponent, __spreadValues({}, props));
11744
+ return /* @__PURE__ */ jsx49(RadioInputRendererComponent, __spreadValues({}, props));
11712
11745
  case "tab":
11713
- return props.options.length > 3 ? /* @__PURE__ */ jsx48(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx48(TabInputRendererComponent, __spreadValues({}, props));
11746
+ return props.options.length > 3 ? /* @__PURE__ */ jsx49(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx49(TabInputRendererComponent, __spreadValues({}, props));
11747
+ case "segmented":
11748
+ return props.options.length > 3 ? /* @__PURE__ */ jsx49(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx49(SegmentedInputRendererComponent, __spreadValues({}, props));
11714
11749
  case "select":
11715
11750
  default:
11716
- return /* @__PURE__ */ jsx48(SelectInputRendererComponent, __spreadValues({}, props));
11751
+ return /* @__PURE__ */ jsx49(SelectInputRendererComponent, __spreadValues({}, props));
11717
11752
  }
11718
11753
  }
11719
11754
  };
@@ -11721,17 +11756,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
11721
11756
 
11722
11757
  // src/revamp/wise/renderers/StatusListRenderer.tsx
11723
11758
  import { Header as Header4, Summary } from "@transferwise/components";
11724
- import { jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
11759
+ import { jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
11725
11760
  var StatusListRenderer = {
11726
11761
  canRenderType: "status-list",
11727
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs18("div", { className: getMargin(margin), children: [
11728
- title ? /* @__PURE__ */ jsx49(Header4, { title }) : null,
11729
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx49(
11762
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
11763
+ title ? /* @__PURE__ */ jsx50(Header4, { title }) : null,
11764
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx50(
11730
11765
  Summary,
11731
11766
  {
11732
11767
  title: itemTitle,
11733
11768
  description,
11734
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx49(DynamicIcon_default, { name: icon.name }) : null,
11769
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx50(DynamicIcon_default, { name: icon.name }) : null,
11735
11770
  status: mapStatus(status)
11736
11771
  },
11737
11772
  `${title}/${description || ""}`
@@ -11754,31 +11789,31 @@ import {
11754
11789
  TextArea as TextArea2,
11755
11790
  TextareaWithDisplayFormat
11756
11791
  } from "@transferwise/components";
11757
- import { jsx as jsx50 } from "react/jsx-runtime";
11792
+ import { jsx as jsx51 } from "react/jsx-runtime";
11758
11793
  function VariableTextInput({
11759
11794
  control,
11760
11795
  inputProps
11761
11796
  }) {
11762
11797
  switch (control) {
11763
11798
  case "password":
11764
- return /* @__PURE__ */ jsx50(TextInput, __spreadValues({ type: "password" }, inputProps));
11799
+ return /* @__PURE__ */ jsx51(TextInput, __spreadValues({ type: "password" }, inputProps));
11765
11800
  case "email":
11766
- return /* @__PURE__ */ jsx50(TextInput, __spreadValues({ type: "email" }, inputProps));
11801
+ return /* @__PURE__ */ jsx51(TextInput, __spreadValues({ type: "email" }, inputProps));
11767
11802
  case "textarea":
11768
- return /* @__PURE__ */ jsx50(TextAreaInput, __spreadValues({}, inputProps));
11803
+ return /* @__PURE__ */ jsx51(TextAreaInput, __spreadValues({}, inputProps));
11769
11804
  case "numeric":
11770
- return /* @__PURE__ */ jsx50(NumericInput, __spreadValues({ type: "number" }, inputProps));
11805
+ return /* @__PURE__ */ jsx51(NumericInput, __spreadValues({ type: "number" }, inputProps));
11771
11806
  case "phone-number":
11772
- return /* @__PURE__ */ jsx50(PhoneNumberInput, __spreadValues({}, inputProps));
11807
+ return /* @__PURE__ */ jsx51(PhoneNumberInput, __spreadValues({}, inputProps));
11773
11808
  default:
11774
- return /* @__PURE__ */ jsx50(TextInput, __spreadValues({ type: "text" }, inputProps));
11809
+ return /* @__PURE__ */ jsx51(TextInput, __spreadValues({ type: "text" }, inputProps));
11775
11810
  }
11776
11811
  }
11777
11812
  function TextInput(_a) {
11778
11813
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
11779
11814
  if (typeof displayFormat === "string") {
11780
11815
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
11781
- return /* @__PURE__ */ jsx50(
11816
+ return /* @__PURE__ */ jsx51(
11782
11817
  InputWithDisplayFormat,
11783
11818
  __spreadValues({
11784
11819
  displayPattern: displayFormat,
@@ -11786,29 +11821,29 @@ function TextInput(_a) {
11786
11821
  }, inputProps)
11787
11822
  );
11788
11823
  }
11789
- return /* @__PURE__ */ jsx50(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
11824
+ return /* @__PURE__ */ jsx51(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
11790
11825
  }
11791
11826
  function TextAreaInput(_a) {
11792
11827
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
11793
11828
  const textAreaProps = __spreadValues({ id, name: id }, rest);
11794
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx50(
11829
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx51(
11795
11830
  TextareaWithDisplayFormat,
11796
11831
  __spreadValues({
11797
11832
  displayPattern: displayFormat,
11798
11833
  onChange: (newValue) => onChange(newValue)
11799
11834
  }, textAreaProps)
11800
- ) : /* @__PURE__ */ jsx50(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
11835
+ ) : /* @__PURE__ */ jsx51(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
11801
11836
  }
11802
11837
  function NumericInput(_a) {
11803
11838
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
11804
11839
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
11805
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx50(
11840
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx51(
11806
11841
  InputWithDisplayFormat,
11807
11842
  __spreadValues({
11808
11843
  displayPattern: displayFormat,
11809
11844
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
11810
11845
  }, numericProps)
11811
- ) : /* @__PURE__ */ jsx50(
11846
+ ) : /* @__PURE__ */ jsx51(
11812
11847
  Input6,
11813
11848
  __spreadValues({
11814
11849
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
@@ -11817,12 +11852,12 @@ function NumericInput(_a) {
11817
11852
  }
11818
11853
  function PhoneNumberInput(_a) {
11819
11854
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
11820
- return /* @__PURE__ */ jsx50(PhoneNumber, __spreadValues({ initialValue: value }, rest));
11855
+ return /* @__PURE__ */ jsx51(PhoneNumber, __spreadValues({ initialValue: value }, rest));
11821
11856
  }
11822
11857
  var VariableTextInput_default = VariableTextInput;
11823
11858
 
11824
11859
  // src/revamp/wise/renderers/TextInputRenderer.tsx
11825
- import { jsx as jsx51 } from "react/jsx-runtime";
11860
+ import { jsx as jsx52 } from "react/jsx-runtime";
11826
11861
  var TextInputRenderer = {
11827
11862
  canRenderType: "input-text",
11828
11863
  render: (props) => {
@@ -11847,14 +11882,14 @@ var TextInputRenderer = {
11847
11882
  ]);
11848
11883
  const value = initialValue != null ? initialValue : "";
11849
11884
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
11850
- return /* @__PURE__ */ jsx51(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx51(VariableTextInput_default, { control, inputProps }) });
11885
+ return /* @__PURE__ */ jsx52(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx52(VariableTextInput_default, { control, inputProps }) });
11851
11886
  }
11852
11887
  };
11853
11888
  var TextInputRenderer_default = TextInputRenderer;
11854
11889
 
11855
11890
  // src/revamp/wise/renderers/UploadInputRenderer.tsx
11856
11891
  import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
11857
- import { jsx as jsx52 } from "react/jsx-runtime";
11892
+ import { jsx as jsx53 } from "react/jsx-runtime";
11858
11893
  var UploadInputRenderer = {
11859
11894
  canRenderType: "input-upload",
11860
11895
  render: (props) => {
@@ -11870,7 +11905,7 @@ var UploadInputRenderer = {
11870
11905
  };
11871
11906
  return (
11872
11907
  // We don't pass help here as there is no sensible place to display it
11873
- /* @__PURE__ */ jsx52(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx52(
11908
+ /* @__PURE__ */ jsx53(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx53(
11874
11909
  UploadInput2,
11875
11910
  {
11876
11911
  id,
@@ -11925,7 +11960,7 @@ var LargeUploadRenderer = {
11925
11960
  throw e;
11926
11961
  }
11927
11962
  };
11928
- return /* @__PURE__ */ jsx52(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx52(
11963
+ return /* @__PURE__ */ jsx53(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx53(
11929
11964
  Upload,
11930
11965
  __spreadProps(__spreadValues({}, uploadProps), {
11931
11966
  usAccept: getAcceptsString(accepts),
@@ -11940,7 +11975,7 @@ var LargeUploadRenderer = {
11940
11975
 
11941
11976
  // src/revamp/wise/renderers/ReviewRenderer.tsx
11942
11977
  import { DefinitionList, Header as Header5 } from "@transferwise/components";
11943
- import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs19 } from "react/jsx-runtime";
11978
+ import { Fragment as Fragment10, jsx as jsx54, jsxs as jsxs20 } from "react/jsx-runtime";
11944
11979
  var ReviewRenderer = {
11945
11980
  canRenderType: "review",
11946
11981
  render: ({ callToAction, control, fields, margin, title }) => {
@@ -11952,9 +11987,9 @@ var ReviewRenderer = {
11952
11987
  callToAction.onClick();
11953
11988
  }
11954
11989
  } : void 0;
11955
- return /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
11956
- (title || callToAction) && /* @__PURE__ */ jsx53(Header5, { title: title != null ? title : "", action }),
11957
- /* @__PURE__ */ jsx53("div", { className: margin, children: /* @__PURE__ */ jsx53(
11990
+ return /* @__PURE__ */ jsxs20("div", { className: getMargin(margin), children: [
11991
+ (title || callToAction) && /* @__PURE__ */ jsx54(Header5, { title: title != null ? title : "", action }),
11992
+ /* @__PURE__ */ jsx54("div", { className: margin, children: /* @__PURE__ */ jsx54(
11958
11993
  DefinitionList,
11959
11994
  {
11960
11995
  layout: orientation,
@@ -11971,14 +12006,14 @@ var ReviewRenderer = {
11971
12006
  var ReviewRenderer_default = ReviewRenderer;
11972
12007
  var getFieldValue = (value, help, orientation) => {
11973
12008
  if (help) {
11974
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs19(Fragment9, { children: [
11975
- /* @__PURE__ */ jsx53(Help_default, { help }),
12009
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs20(Fragment10, { children: [
12010
+ /* @__PURE__ */ jsx54(Help_default, { help }),
11976
12011
  " ",
11977
12012
  value
11978
- ] }) : /* @__PURE__ */ jsxs19(Fragment9, { children: [
12013
+ ] }) : /* @__PURE__ */ jsxs20(Fragment10, { children: [
11979
12014
  value,
11980
12015
  " ",
11981
- /* @__PURE__ */ jsx53(Help_default, { help })
12016
+ /* @__PURE__ */ jsx54(Help_default, { help })
11982
12017
  ] });
11983
12018
  }
11984
12019
  return value;
@@ -12017,17 +12052,17 @@ var external_confirmation_messages_default = defineMessages8({
12017
12052
 
12018
12053
  // src/revamp/wise/renderers/step/ExternalConfirmationDialog.tsx
12019
12054
  import { Button as Button5, Markdown as Markdown5 } from "@transferwise/components";
12020
- import { jsx as jsx54, jsxs as jsxs20 } from "react/jsx-runtime";
12055
+ import { jsx as jsx55, jsxs as jsxs21 } from "react/jsx-runtime";
12021
12056
  function ExternalConfirmationDialog({
12022
12057
  external,
12023
12058
  onClose
12024
12059
  }) {
12025
12060
  const { formatMessage } = useIntl7();
12026
- return /* @__PURE__ */ jsx54("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
12027
- /* @__PURE__ */ jsx54("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
12028
- /* @__PURE__ */ jsx54(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
12029
- /* @__PURE__ */ jsx54("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
12030
- /* @__PURE__ */ jsx54(
12061
+ return /* @__PURE__ */ jsx55("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs21("div", { className: "df-box-renderer-width-lg", children: [
12062
+ /* @__PURE__ */ jsx55("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
12063
+ /* @__PURE__ */ jsx55(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
12064
+ /* @__PURE__ */ jsx55("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs21("div", { className: "df-box-renderer-width-lg", children: [
12065
+ /* @__PURE__ */ jsx55(
12031
12066
  Button5,
12032
12067
  {
12033
12068
  block: true,
@@ -12041,7 +12076,7 @@ function ExternalConfirmationDialog({
12041
12076
  children: formatMessage(external_confirmation_messages_default.open)
12042
12077
  }
12043
12078
  ),
12044
- /* @__PURE__ */ jsx54(Button5, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
12079
+ /* @__PURE__ */ jsx55(Button5, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
12045
12080
  ] }) })
12046
12081
  ] }) });
12047
12082
  }
@@ -12054,12 +12089,12 @@ function getOrigin(url) {
12054
12089
  }
12055
12090
 
12056
12091
  // src/revamp/wise/renderers/step/useExternal.tsx
12057
- import { useEffect as useEffect5, useState as useState9 } from "react";
12092
+ import { useEffect as useEffect6, useState as useState9 } from "react";
12058
12093
  function useExternal(url) {
12059
12094
  const [externalWindow, setExternalWindow] = useState9(null);
12060
12095
  const [hasDismissed, setHasDismissed] = useState9(false);
12061
12096
  const dismissConfirmation = () => setHasDismissed(true);
12062
- useEffect5(() => {
12097
+ useEffect6(() => {
12063
12098
  if (url) {
12064
12099
  setHasDismissed(false);
12065
12100
  setExternalWindow(window.open(url, "_blank"));
@@ -12072,9 +12107,9 @@ function useExternal(url) {
12072
12107
  // src/revamp/wise/renderers/step/BackButton.tsx
12073
12108
  import { Avatar as Avatar4 } from "@transferwise/components";
12074
12109
  import { ArrowLeft } from "@transferwise/icons";
12075
- import { jsx as jsx55, jsxs as jsxs21 } from "react/jsx-runtime";
12110
+ import { jsx as jsx56, jsxs as jsxs22 } from "react/jsx-runtime";
12076
12111
  function BackButton({ title, onClick }) {
12077
- return /* @__PURE__ */ jsxs21(
12112
+ return /* @__PURE__ */ jsxs22(
12078
12113
  "a",
12079
12114
  {
12080
12115
  href: "/",
@@ -12085,8 +12120,8 @@ function BackButton({ title, onClick }) {
12085
12120
  onClick();
12086
12121
  },
12087
12122
  children: [
12088
- /* @__PURE__ */ jsx55("span", { className: "sr-only", children: title }),
12089
- /* @__PURE__ */ jsx55(Avatar4, { type: "icon", children: /* @__PURE__ */ jsx55(ArrowLeft, { size: "24" }) })
12123
+ /* @__PURE__ */ jsx56("span", { className: "sr-only", children: title }),
12124
+ /* @__PURE__ */ jsx56(Avatar4, { type: "icon", children: /* @__PURE__ */ jsx56(ArrowLeft, { size: "24" }) })
12090
12125
  ]
12091
12126
  }
12092
12127
  );
@@ -12094,7 +12129,7 @@ function BackButton({ title, onClick }) {
12094
12129
  var BackButton_default = BackButton;
12095
12130
 
12096
12131
  // src/revamp/wise/renderers/step/StepRenderer.tsx
12097
- import { jsx as jsx56, jsxs as jsxs22 } from "react/jsx-runtime";
12132
+ import { jsx as jsx57, jsxs as jsxs23 } from "react/jsx-runtime";
12098
12133
  var StepRenderer = {
12099
12134
  canRenderType: "step",
12100
12135
  render: StepRendererComponent
@@ -12104,10 +12139,10 @@ function StepRendererComponent(props) {
12104
12139
  const value = useMemo4(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
12105
12140
  const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
12106
12141
  if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
12107
- return /* @__PURE__ */ jsx56(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
12142
+ return /* @__PURE__ */ jsx57(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
12108
12143
  }
12109
- return /* @__PURE__ */ jsxs22(StepRendererContextProvider, { value, children: [
12110
- back ? /* @__PURE__ */ jsx56(BackButton_default, __spreadValues({}, back)) : null,
12144
+ return /* @__PURE__ */ jsxs23(StepRendererContextProvider, { value, children: [
12145
+ back ? /* @__PURE__ */ jsx57(BackButton_default, __spreadValues({}, back)) : null,
12111
12146
  children
12112
12147
  ] });
12113
12148
  }
@@ -12146,18 +12181,18 @@ var getWiseRenderers = () => [
12146
12181
  ];
12147
12182
 
12148
12183
  // src/revamp/DynamicFlowWise.tsx
12149
- import { jsx as jsx57 } from "react/jsx-runtime";
12184
+ import { jsx as jsx58 } from "react/jsx-runtime";
12150
12185
  var wiseRenderers = getWiseRenderers();
12151
12186
  function DynamicFlowWise(props) {
12152
12187
  const { httpClient, renderers } = props;
12153
12188
  const mergedRenderers = useMemo5(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
12154
- return /* @__PURE__ */ jsx57(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx57(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers })) });
12189
+ return /* @__PURE__ */ jsx58(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx58(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers })) });
12155
12190
  }
12156
12191
  var DynamicFlowWise_default = DynamicFlowWise;
12157
12192
 
12158
12193
  // src/revamp/DynamicFragmentWise.tsx
12159
12194
  import { forwardRef as forwardRef3, useImperativeHandle, useMemo as useMemo6 } from "react";
12160
- import { jsx as jsx58 } from "react/jsx-runtime";
12195
+ import { jsx as jsx59 } from "react/jsx-runtime";
12161
12196
  var wiseRenderers2 = getWiseRenderers();
12162
12197
  var DynamicFragmentWise = forwardRef3(function DynamicFragmentWise2(props, ref) {
12163
12198
  const { httpClient, onEvent, onError, renderers } = props;
@@ -12182,14 +12217,14 @@ var DynamicFragmentWise = forwardRef3(function DynamicFragmentWise2(props, ref)
12182
12217
  () => getRenderFunction([CoreContainerRenderer, ...mergedRenderers, StepRenderer]),
12183
12218
  [mergedRenderers]
12184
12219
  );
12185
- return /* @__PURE__ */ jsx58(
12220
+ return /* @__PURE__ */ jsx59(
12186
12221
  ErrorBoundary_default,
12187
12222
  {
12188
12223
  onError: (error) => {
12189
12224
  onEvent == null ? void 0 : onEvent("Dynamic Flow - Failed");
12190
12225
  onError(error);
12191
12226
  },
12192
- children: /* @__PURE__ */ jsx58(HttpClientProvider, { httpClient, children: stepComponentRef.current ? render(stepComponentRef.current) : null })
12227
+ children: /* @__PURE__ */ jsx59(HttpClientProvider, { httpClient, children: stepComponentRef.current ? render(stepComponentRef.current) : null })
12193
12228
  }
12194
12229
  );
12195
12230
  });
@@ -12500,7 +12535,7 @@ function isReference(block) {
12500
12535
  }
12501
12536
 
12502
12537
  // src/legacy/dynamicFlow/DynamicFlow.tsx
12503
- import { useCallback as useCallback11, useEffect as useEffect25, useMemo as useMemo22, useState as useState34 } from "react";
12538
+ import { useCallback as useCallback11, useEffect as useEffect26, useMemo as useMemo22, useState as useState34 } from "react";
12504
12539
 
12505
12540
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
12506
12541
  import { createContext as createContext4, useContext as useContext5, useMemo as useMemo7 } from "react";
@@ -12523,7 +12558,7 @@ var noop2 = () => {
12523
12558
  };
12524
12559
 
12525
12560
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
12526
- import { jsx as jsx59 } from "react/jsx-runtime";
12561
+ import { jsx as jsx60 } from "react/jsx-runtime";
12527
12562
  var defaultContextValue = {
12528
12563
  loading: false,
12529
12564
  registerPersistAsyncPromise: (promise) => {
@@ -12538,7 +12573,7 @@ var DynamicFlowProvider = ({ loading, children }) => {
12538
12573
  registerPersistAsyncPromise: addPendingPromise
12539
12574
  };
12540
12575
  }, [loading, pendingPromises, addPendingPromise]);
12541
- return /* @__PURE__ */ jsx59(DFContext.Provider, { value: providerValue, children });
12576
+ return /* @__PURE__ */ jsx60(DFContext.Provider, { value: providerValue, children });
12542
12577
  };
12543
12578
  var useDynamicFlow = () => {
12544
12579
  const context = useContext5(DFContext);
@@ -12547,7 +12582,7 @@ var useDynamicFlow = () => {
12547
12582
 
12548
12583
  // src/legacy/common/contexts/eventsContext/EventsContext.tsx
12549
12584
  import { createContext as createContext5, useContext as useContext6, useMemo as useMemo8 } from "react";
12550
- import { jsx as jsx60 } from "react/jsx-runtime";
12585
+ import { jsx as jsx61 } from "react/jsx-runtime";
12551
12586
  var EventsContext = createContext5({
12552
12587
  triggerEvent: () => {
12553
12588
  }
@@ -12557,7 +12592,7 @@ function EventsContextProvider({ metadata, children, onEvent }) {
12557
12592
  () => ({ triggerEvent: getEventDispatcher(onEvent, metadata) }),
12558
12593
  [onEvent, metadata]
12559
12594
  );
12560
- return /* @__PURE__ */ jsx60(EventsContext.Provider, { value, children });
12595
+ return /* @__PURE__ */ jsx61(EventsContext.Provider, { value, children });
12561
12596
  }
12562
12597
  function useEventDispatcher() {
12563
12598
  const { triggerEvent } = useContext6(EventsContext);
@@ -12572,7 +12607,7 @@ var getEventDispatcher = (onEvent, metadata) => (eventName, properties = {}) =>
12572
12607
 
12573
12608
  // src/legacy/common/contexts/logContext/LogContext.tsx
12574
12609
  import { createContext as createContext6, useContext as useContext7, useMemo as useMemo9 } from "react";
12575
- import { jsx as jsx61 } from "react/jsx-runtime";
12610
+ import { jsx as jsx62 } from "react/jsx-runtime";
12576
12611
  var getLogger = (level, onLog, flowId = "UNKNOWN-FLOW-ID", stepId = "UNKNOWN-FLOW-ID") => (title, description, extra) => {
12577
12612
  try {
12578
12613
  onLog(level, `Dynamic Flow ${level} - ${title} - ${description}`, __spreadValues({
@@ -12594,7 +12629,7 @@ function LogProvider({ flowId, stepId, children, onLog }) {
12594
12629
  }),
12595
12630
  [onLog, flowId, stepId]
12596
12631
  );
12597
- return /* @__PURE__ */ jsx61(LogContext.Provider, { value, children });
12632
+ return /* @__PURE__ */ jsx62(LogContext.Provider, { value, children });
12598
12633
  }
12599
12634
  var useLogger = () => {
12600
12635
  const logging = useContext7(LogContext);
@@ -12608,10 +12643,10 @@ var useLogger = () => {
12608
12643
 
12609
12644
  // src/legacy/common/contexts/featureContext/FeatureContext.tsx
12610
12645
  import { createContext as createContext7, useContext as useContext8 } from "react";
12611
- import { jsx as jsx62 } from "react/jsx-runtime";
12646
+ import { jsx as jsx63 } from "react/jsx-runtime";
12612
12647
  var FeatureContext = createContext7([]);
12613
12648
  function FeatureContextProvider({ features, children }) {
12614
- return /* @__PURE__ */ jsx62(FeatureContext.Provider, { value: features, children });
12649
+ return /* @__PURE__ */ jsx63(FeatureContext.Provider, { value: features, children });
12615
12650
  }
12616
12651
 
12617
12652
  // src/legacy/common/utils/api-utils.ts
@@ -13347,12 +13382,12 @@ function useDebouncedFunction(callback, waitMs) {
13347
13382
  }
13348
13383
 
13349
13384
  // src/legacy/common/hooks/useExternal/useExternal.tsx
13350
- import { useEffect as useEffect6, useState as useState11 } from "react";
13385
+ import { useEffect as useEffect7, useState as useState11 } from "react";
13351
13386
  function useExternal2(url) {
13352
13387
  const [externalWindow, setExternalWindow] = useState11(null);
13353
13388
  const [hasManuallyTriggered, setHasManuallyTriggered] = useState11(false);
13354
13389
  const dismissConfirmation = () => setHasManuallyTriggered(true);
13355
- useEffect6(() => {
13390
+ useEffect7(() => {
13356
13391
  if (url) {
13357
13392
  setHasManuallyTriggered(false);
13358
13393
  setExternalWindow(window.open(url, "_blank"));
@@ -13424,7 +13459,7 @@ import { useState as useState28 } from "react";
13424
13459
  import { useIntl as useIntl19 } from "react-intl";
13425
13460
 
13426
13461
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
13427
- import { useEffect as useEffect17, useState as useState27 } from "react";
13462
+ import { useEffect as useEffect18, useState as useState27 } from "react";
13428
13463
  import { useIntl as useIntl18 } from "react-intl";
13429
13464
 
13430
13465
  // src/legacy/common/constants/DateMode.ts
@@ -13473,7 +13508,7 @@ var Size = {
13473
13508
 
13474
13509
  // src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
13475
13510
  var import_classnames16 = __toESM(require_classnames());
13476
- import { useEffect as useEffect16, useMemo as useMemo17, useState as useState26 } from "react";
13511
+ import { useEffect as useEffect17, useMemo as useMemo17, useState as useState26 } from "react";
13477
13512
 
13478
13513
  // src/legacy/layout/alert/DynamicAlert.tsx
13479
13514
  import { Alert as Alert3 } from "@transferwise/components";
@@ -13482,19 +13517,19 @@ import { Alert as Alert3 } from "@transferwise/components";
13482
13517
  import { Avatar as Avatar5, AvatarType as AvatarType4 } from "@transferwise/components";
13483
13518
 
13484
13519
  // src/legacy/layout/icon/FlagIcon.tsx
13485
- import { jsx as jsx63 } from "react/jsx-runtime";
13520
+ import { jsx as jsx64 } from "react/jsx-runtime";
13486
13521
  var isFlagIcon2 = (name) => name.startsWith("flag-");
13487
13522
  function FlagIcon2({ name }) {
13488
13523
  if (!isFlagIcon2(name)) {
13489
13524
  return null;
13490
13525
  }
13491
13526
  const code = name.substring(5);
13492
- return /* @__PURE__ */ jsx63(Flag, { intrinsicSize: 24, code });
13527
+ return /* @__PURE__ */ jsx64(Flag, { intrinsicSize: 24, code });
13493
13528
  }
13494
13529
 
13495
13530
  // src/legacy/layout/icon/NamedIcon.tsx
13496
13531
  import * as icons2 from "@transferwise/icons";
13497
- import { jsx as jsx64 } from "react/jsx-runtime";
13532
+ import { jsx as jsx65 } from "react/jsx-runtime";
13498
13533
  var isNamedIcon2 = (name) => {
13499
13534
  const iconName = toCapitalisedCamelCase2(name);
13500
13535
  return Object.keys(icons2).includes(iconName);
@@ -13505,19 +13540,19 @@ function NamedIcon2({ name }) {
13505
13540
  }
13506
13541
  const iconName = toCapitalisedCamelCase2(name);
13507
13542
  const Icon = icons2[iconName];
13508
- return /* @__PURE__ */ jsx64(Icon, { size: 24 });
13543
+ return /* @__PURE__ */ jsx65(Icon, { size: 24 });
13509
13544
  }
13510
13545
  var toCapitalisedCamelCase2 = (value) => value.split("-").map(capitaliseFirstChar2).join("");
13511
13546
  var capitaliseFirstChar2 = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
13512
13547
 
13513
13548
  // src/legacy/layout/icon/DynamicIcon.tsx
13514
- import { jsx as jsx65 } from "react/jsx-runtime";
13549
+ import { jsx as jsx66 } from "react/jsx-runtime";
13515
13550
  function DynamicIcon2({ type }) {
13516
13551
  if (isFlagIcon2(type)) {
13517
- return /* @__PURE__ */ jsx65(FlagIcon2, { name: type });
13552
+ return /* @__PURE__ */ jsx66(FlagIcon2, { name: type });
13518
13553
  }
13519
13554
  if (isNamedIcon2(type)) {
13520
- return /* @__PURE__ */ jsx65(NamedIcon2, { name: type });
13555
+ return /* @__PURE__ */ jsx66(NamedIcon2, { name: type });
13521
13556
  }
13522
13557
  return null;
13523
13558
  }
@@ -13527,17 +13562,17 @@ function isValidIconName(name) {
13527
13562
  var DynamicIcon_default2 = DynamicIcon2;
13528
13563
 
13529
13564
  // src/legacy/layout/utils/getNavigationOptionMedia.tsx
13530
- import { jsx as jsx66 } from "react/jsx-runtime";
13565
+ import { jsx as jsx67 } from "react/jsx-runtime";
13531
13566
  var getNavigationOptionMedia = ({ icon, image }) => {
13532
13567
  if (icon == null ? void 0 : icon.name) {
13533
- return /* @__PURE__ */ jsx66(Avatar5, { type: AvatarType4.ICON, children: /* @__PURE__ */ jsx66(DynamicIcon_default2, { type: icon.name }) });
13568
+ return /* @__PURE__ */ jsx67(Avatar5, { type: AvatarType4.ICON, children: /* @__PURE__ */ jsx67(DynamicIcon_default2, { type: icon.name }) });
13534
13569
  }
13535
13570
  if (icon == null ? void 0 : icon.text) {
13536
- return /* @__PURE__ */ jsx66(Avatar5, { type: AvatarType4.INITIALS, children: icon.text });
13571
+ return /* @__PURE__ */ jsx67(Avatar5, { type: AvatarType4.INITIALS, children: icon.text });
13537
13572
  }
13538
13573
  if (image == null ? void 0 : image.url) {
13539
13574
  const { url, text } = image;
13540
- return /* @__PURE__ */ jsx66("img", { src: url, alt: text });
13575
+ return /* @__PURE__ */ jsx67("img", { src: url, alt: text });
13541
13576
  }
13542
13577
  return null;
13543
13578
  };
@@ -13573,10 +13608,10 @@ var getTextAlignment2 = (align) => {
13573
13608
  var getTextAlignmentAndMargin2 = (component) => `${getTextAlignment2(component.align)} ${getMargin2(component.margin)}`;
13574
13609
 
13575
13610
  // src/legacy/layout/alert/DynamicAlert.tsx
13576
- import { jsx as jsx67 } from "react/jsx-runtime";
13611
+ import { jsx as jsx68 } from "react/jsx-runtime";
13577
13612
  var DynamicAlert = (props) => {
13578
13613
  const alert = props.component;
13579
- return /* @__PURE__ */ jsx67(
13614
+ return /* @__PURE__ */ jsx68(
13580
13615
  Alert3,
13581
13616
  {
13582
13617
  type: mapContextToAlertType(legacy_mapContext(alert.context)),
@@ -13609,12 +13644,12 @@ var mapContextToAlertType = (context) => {
13609
13644
  var DynamicAlert_default = DynamicAlert;
13610
13645
 
13611
13646
  // src/legacy/layout/box/DynamicBox.tsx
13612
- import { jsx as jsx68 } from "react/jsx-runtime";
13647
+ import { jsx as jsx69 } from "react/jsx-runtime";
13613
13648
  var DynamicBox = (props) => {
13614
13649
  const box = props.component;
13615
13650
  const margin = getMargin2(box.margin || box.border ? "lg" : "xs");
13616
13651
  if (!box.width || box.width === "xl") {
13617
- return /* @__PURE__ */ jsx68("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ jsx68(
13652
+ return /* @__PURE__ */ jsx69("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ jsx69(
13618
13653
  DynamicLayout_default,
13619
13654
  {
13620
13655
  components: box.components,
@@ -13627,7 +13662,7 @@ var DynamicBox = (props) => {
13627
13662
  }
13628
13663
  ) });
13629
13664
  }
13630
- return /* @__PURE__ */ jsx68("div", { className: "row", children: /* @__PURE__ */ jsx68("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ jsx68("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ jsx68(
13665
+ return /* @__PURE__ */ jsx69("div", { className: "row", children: /* @__PURE__ */ jsx69("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ jsx69("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ jsx69(
13631
13666
  DynamicLayout_default,
13632
13667
  {
13633
13668
  components: box.components,
@@ -13711,7 +13746,7 @@ var getButtonSize = (size) => {
13711
13746
  };
13712
13747
 
13713
13748
  // src/legacy/layout/button/DynamicButton.tsx
13714
- import { jsx as jsx69 } from "react/jsx-runtime";
13749
+ import { jsx as jsx70 } from "react/jsx-runtime";
13715
13750
  function DynamicButton(props) {
13716
13751
  var _a;
13717
13752
  const { component, onAction } = props;
@@ -13720,7 +13755,7 @@ function DynamicButton(props) {
13720
13755
  const priority = getButtonPriority(component);
13721
13756
  const { loading } = useDynamicFlow();
13722
13757
  const className = getMargin2(component.margin || "md");
13723
- return /* @__PURE__ */ jsx69(
13758
+ return /* @__PURE__ */ jsx70(
13724
13759
  Button6,
13725
13760
  {
13726
13761
  size: getButtonSize(component.size),
@@ -13737,12 +13772,12 @@ function DynamicButton(props) {
13737
13772
  var DynamicButton_default = DynamicButton;
13738
13773
 
13739
13774
  // src/legacy/layout/columns/DynamicColumns.tsx
13740
- import { jsx as jsx70, jsxs as jsxs23 } from "react/jsx-runtime";
13775
+ import { jsx as jsx71, jsxs as jsxs24 } from "react/jsx-runtime";
13741
13776
  var DynamicColumns = (props) => {
13742
13777
  const columns = props.component;
13743
13778
  const { leftWidth, rightWidth } = getWidth(columns.bias);
13744
- return /* @__PURE__ */ jsxs23("div", { className: `${getMargin2(columns.margin || "xs")} row`, children: [
13745
- /* @__PURE__ */ jsx70("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ jsx70(
13779
+ return /* @__PURE__ */ jsxs24("div", { className: `${getMargin2(columns.margin || "xs")} row`, children: [
13780
+ /* @__PURE__ */ jsx71("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ jsx71(
13746
13781
  DynamicLayout_default,
13747
13782
  {
13748
13783
  components: columns.left,
@@ -13754,7 +13789,7 @@ var DynamicColumns = (props) => {
13754
13789
  onPersistAsync: props.onPersistAsync
13755
13790
  }
13756
13791
  ) }),
13757
- /* @__PURE__ */ jsx70("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ jsx70(
13792
+ /* @__PURE__ */ jsx71("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ jsx71(
13758
13793
  DynamicLayout_default,
13759
13794
  {
13760
13795
  components: columns.right,
@@ -13790,10 +13825,10 @@ var DynamicColumns_default = DynamicColumns;
13790
13825
 
13791
13826
  // src/legacy/layout/decision/DynamicDecision.tsx
13792
13827
  import { NavigationOption as NavigationOption4, NavigationOptionsList as NavigationOptionsList3 } from "@transferwise/components";
13793
- import { jsx as jsx71 } from "react/jsx-runtime";
13828
+ import { jsx as jsx72 } from "react/jsx-runtime";
13794
13829
  function DynamicDecision({ component, onAction }) {
13795
13830
  const { loading } = useDynamicFlow();
13796
- return /* @__PURE__ */ jsx71("div", { className: getMargin2(component.margin), children: /* @__PURE__ */ jsx71(NavigationOptionsList3, { children: component.options.map((option) => /* @__PURE__ */ jsx71(
13831
+ return /* @__PURE__ */ jsx72("div", { className: getMargin2(component.margin), children: /* @__PURE__ */ jsx72(NavigationOptionsList3, { children: component.options.map((option) => /* @__PURE__ */ jsx72(
13797
13832
  NavigationOption4,
13798
13833
  {
13799
13834
  title: option.title,
@@ -13810,17 +13845,17 @@ function DynamicDecision({ component, onAction }) {
13810
13845
  var DynamicDecision_default = DynamicDecision;
13811
13846
 
13812
13847
  // src/legacy/layout/divider/DynamicDivider.tsx
13813
- import { jsx as jsx72 } from "react/jsx-runtime";
13848
+ import { jsx as jsx73 } from "react/jsx-runtime";
13814
13849
  var DynamicDivider = ({ component }) => {
13815
13850
  const margin = getMargin2(component.margin);
13816
13851
  const className = `m-t-0 ${margin}`;
13817
- return /* @__PURE__ */ jsx72("hr", { className });
13852
+ return /* @__PURE__ */ jsx73("hr", { className });
13818
13853
  };
13819
13854
  var DynamicDivider_default = DynamicDivider;
13820
13855
 
13821
13856
  // src/legacy/layout/external/DynamicExternal.tsx
13822
13857
  import { Button as Button7, Loader as Loader2, Size as Size2 } from "@transferwise/components";
13823
- import { useCallback as useCallback6, useEffect as useEffect7 } from "react";
13858
+ import { useCallback as useCallback6, useEffect as useEffect8 } from "react";
13824
13859
  import { useIntl as useIntl8 } from "react-intl";
13825
13860
 
13826
13861
  // src/legacy/layout/external/DynamicExternal.messages.ts
@@ -13834,7 +13869,7 @@ var DynamicExternal_messages_default = defineMessages9({
13834
13869
  });
13835
13870
 
13836
13871
  // src/legacy/layout/external/DynamicExternal.tsx
13837
- import { Fragment as Fragment10, jsx as jsx73, jsxs as jsxs24 } from "react/jsx-runtime";
13872
+ import { Fragment as Fragment11, jsx as jsx74, jsxs as jsxs25 } from "react/jsx-runtime";
13838
13873
  var DynamicExternal = ({ component, onAction }) => {
13839
13874
  const { requestUrl, responseHandlers, polling, retryTitle } = component;
13840
13875
  const intl = useIntl8();
@@ -13842,29 +13877,29 @@ var DynamicExternal = ({ component, onAction }) => {
13842
13877
  () => window.open(requestUrl, "df-external-window"),
13843
13878
  [requestUrl]
13844
13879
  );
13845
- useEffect7(() => {
13880
+ useEffect8(() => {
13846
13881
  openExternalUrl();
13847
13882
  }, [openExternalUrl]);
13848
13883
  const pollingConfiguration = polling && responseHandlers ? __spreadProps(__spreadValues({}, polling), {
13849
13884
  responseHandlers
13850
13885
  }) : void 0;
13851
13886
  useExternalStepPolling(pollingConfiguration, onAction);
13852
- return /* @__PURE__ */ jsxs24(Fragment10, { children: [
13853
- /* @__PURE__ */ jsx73(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
13854
- /* @__PURE__ */ jsx73("br", {}),
13855
- /* @__PURE__ */ jsx73(Button7, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
13887
+ return /* @__PURE__ */ jsxs25(Fragment11, { children: [
13888
+ /* @__PURE__ */ jsx74(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
13889
+ /* @__PURE__ */ jsx74("br", {}),
13890
+ /* @__PURE__ */ jsx74(Button7, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
13856
13891
  ] });
13857
13892
  };
13858
13893
  var DynamicExternal_default = DynamicExternal;
13859
13894
 
13860
13895
  // src/legacy/jsonSchemaForm/genericSchema/GenericSchema.tsx
13861
- import { useEffect as useEffect14 } from "react";
13896
+ import { useEffect as useEffect15 } from "react";
13862
13897
 
13863
13898
  // src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
13864
13899
  var import_classnames7 = __toESM(require_classnames());
13865
13900
  import { Header as Header6 } from "@transferwise/components";
13866
13901
  import { useState as useState12 } from "react";
13867
- import { Fragment as Fragment11, jsx as jsx74, jsxs as jsxs25 } from "react/jsx-runtime";
13902
+ import { Fragment as Fragment12, jsx as jsx75, jsxs as jsxs26 } from "react/jsx-runtime";
13868
13903
  var splitModel = (model, schemas) => schemas.map((schema) => getValidObjectModelParts(model, schema) || {});
13869
13904
  var combineModels = (models) => models.reduce((current, combined) => __spreadValues(__spreadValues({}, combined), current), {});
13870
13905
  var getSchemaColumnClasses = (width) => ({
@@ -13880,12 +13915,12 @@ function AllOfSchema(props) {
13880
13915
  props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model: combineModels(models) }));
13881
13916
  };
13882
13917
  const [models, setModels] = useState12(splitModel(props.model, props.schema.allOf));
13883
- return /* @__PURE__ */ jsxs25(Fragment11, { children: [
13884
- props.schema.title && /* @__PURE__ */ jsx74(Header6, { title: props.schema.title }),
13885
- props.schema.description && /* @__PURE__ */ jsx74("p", { children: props.schema.description }),
13886
- /* @__PURE__ */ jsx74("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
13918
+ return /* @__PURE__ */ jsxs26(Fragment12, { children: [
13919
+ props.schema.title && /* @__PURE__ */ jsx75(Header6, { title: props.schema.title }),
13920
+ props.schema.description && /* @__PURE__ */ jsx75("p", { children: props.schema.description }),
13921
+ /* @__PURE__ */ jsx75("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
13887
13922
  // eslint-disable-next-line react/no-array-index-key
13888
- /* @__PURE__ */ jsx74("div", { className: (0, import_classnames7.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ jsx74(
13923
+ /* @__PURE__ */ jsx75("div", { className: (0, import_classnames7.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ jsx75(
13889
13924
  GenericSchema_default,
13890
13925
  {
13891
13926
  schema,
@@ -13920,7 +13955,7 @@ import { useMemo as useMemo11, useState as useState13 } from "react";
13920
13955
  import { InlineAlert as InlineAlert4 } from "@transferwise/components";
13921
13956
  import { formatDate as formatDate3 } from "@transferwise/formatting";
13922
13957
  import { useIntl as useIntl9 } from "react-intl";
13923
- import { jsx as jsx75, jsxs as jsxs26 } from "react/jsx-runtime";
13958
+ import { jsx as jsx76, jsxs as jsxs27 } from "react/jsx-runtime";
13924
13959
  function ControlFeedback(props) {
13925
13960
  var _a;
13926
13961
  const defaultValidationMessages = useDefaultValidationMessages(props.schema);
@@ -13929,12 +13964,12 @@ function ControlFeedback(props) {
13929
13964
  const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean((_a = props.validations) == null ? void 0 : _a.length);
13930
13965
  const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
13931
13966
  const hasInfoMessage = Boolean(props.infoMessage);
13932
- return /* @__PURE__ */ jsxs26("div", { id: props.id, children: [
13933
- isErrorVisible ? /* @__PURE__ */ jsx75(InlineAlert4, { type: "error", children: props.errors }) : null,
13934
- isValidationVisible ? /* @__PURE__ */ jsx75(InlineAlert4, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ jsx75("div", { children: validationMessages[validation] }, validation)) }) : null,
13935
- (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ jsxs26(InlineAlert4, { type: "info", children: [
13936
- isDescriptionVisible && /* @__PURE__ */ jsx75("div", { children: props.schema.description }),
13937
- hasInfoMessage && /* @__PURE__ */ jsx75("div", { children: props.infoMessage })
13967
+ return /* @__PURE__ */ jsxs27("div", { id: props.id, children: [
13968
+ isErrorVisible ? /* @__PURE__ */ jsx76(InlineAlert4, { type: "error", children: props.errors }) : null,
13969
+ isValidationVisible ? /* @__PURE__ */ jsx76(InlineAlert4, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ jsx76("div", { children: validationMessages[validation] }, validation)) }) : null,
13970
+ (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ jsxs27(InlineAlert4, { type: "info", children: [
13971
+ isDescriptionVisible && /* @__PURE__ */ jsx76("div", { children: props.schema.description }),
13972
+ hasInfoMessage && /* @__PURE__ */ jsx76("div", { children: props.infoMessage })
13938
13973
  ] })
13939
13974
  ] });
13940
13975
  }
@@ -14060,7 +14095,7 @@ function useFormattedDefaultErrorMessages({
14060
14095
  }
14061
14096
 
14062
14097
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
14063
- import { jsx as jsx76, jsxs as jsxs27 } from "react/jsx-runtime";
14098
+ import { jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
14064
14099
  function MultipleFileUploadSchema(props) {
14065
14100
  var _a, _b;
14066
14101
  const { onChange, schema } = props;
@@ -14122,10 +14157,10 @@ function MultipleFileUploadSchema(props) {
14122
14157
  onDeleteFile: () => Promise.resolve()
14123
14158
  });
14124
14159
  const feedbackId = `${uid}-feedback`;
14125
- return /* @__PURE__ */ jsxs27("div", { className: (0, import_classnames8.default)("form-group", { "has-error": showError }), children: [
14126
- /* @__PURE__ */ jsx76("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
14127
- /* @__PURE__ */ jsx76("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx76(UploadInput3, __spreadValues({}, uploadInputProps)) }),
14128
- /* @__PURE__ */ jsx76(
14160
+ return /* @__PURE__ */ jsxs28("div", { className: (0, import_classnames8.default)("form-group", { "has-error": showError }), children: [
14161
+ /* @__PURE__ */ jsx77("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
14162
+ /* @__PURE__ */ jsx77("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx77(UploadInput3, __spreadValues({}, uploadInputProps)) }),
14163
+ /* @__PURE__ */ jsx77(
14129
14164
  ControlFeedback_default,
14130
14165
  {
14131
14166
  id: feedbackId,
@@ -14168,12 +14203,12 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
14168
14203
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
14169
14204
  var import_classnames9 = __toESM(require_classnames());
14170
14205
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
14171
- import { useEffect as useEffect8, useMemo as useMemo12, useState as useState14 } from "react";
14206
+ import { useEffect as useEffect9, useMemo as useMemo12, useState as useState14 } from "react";
14172
14207
  import { useIntl as useIntl11 } from "react-intl";
14173
14208
 
14174
14209
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
14175
14210
  import { Avatar as Avatar6, AvatarType as AvatarType5 } from "@transferwise/components";
14176
- import { jsx as jsx77 } from "react/jsx-runtime";
14211
+ import { jsx as jsx78 } from "react/jsx-runtime";
14177
14212
  var mapConstSchemaToOption = (schema, controlType) => {
14178
14213
  switch (controlType) {
14179
14214
  case "select":
@@ -14197,7 +14232,7 @@ var mapKeywordsToSearchStrings = (searchStrings) => isArray2(searchStrings) ? {
14197
14232
  var mapImage = (image) => {
14198
14233
  if (image == null ? void 0 : image.url) {
14199
14234
  return {
14200
- icon: /* @__PURE__ */ jsx77("div", { className: "media", children: /* @__PURE__ */ jsx77("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx77("img", { src: image.url, alt: image.name || "" }) }) }),
14235
+ icon: /* @__PURE__ */ jsx78("div", { className: "media", children: /* @__PURE__ */ jsx78("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx78("img", { src: image.url, alt: image.name || "" }) }) }),
14201
14236
  hideIconInTrigger: true
14202
14237
  };
14203
14238
  }
@@ -14206,17 +14241,17 @@ var mapImage = (image) => {
14206
14241
  var getIconPropertyForSelectOption = (icon) => {
14207
14242
  if ((icon == null ? void 0 : icon.name) && isFlagIcon2(icon.name)) {
14208
14243
  return {
14209
- icon: /* @__PURE__ */ jsx77(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
14244
+ icon: /* @__PURE__ */ jsx78(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
14210
14245
  };
14211
14246
  }
14212
14247
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
14213
14248
  return {
14214
- icon: /* @__PURE__ */ jsx77(DynamicIcon_default2, { type: icon.name })
14249
+ icon: /* @__PURE__ */ jsx78(DynamicIcon_default2, { type: icon.name })
14215
14250
  };
14216
14251
  }
14217
14252
  if (icon == null ? void 0 : icon.text) {
14218
14253
  return {
14219
- icon: /* @__PURE__ */ jsx77("span", { children: icon.text })
14254
+ icon: /* @__PURE__ */ jsx78("span", { children: icon.text })
14220
14255
  };
14221
14256
  }
14222
14257
  return null;
@@ -14224,17 +14259,17 @@ var getIconPropertyForSelectOption = (icon) => {
14224
14259
  var getAvatarPropertyForRadioOption = ({ image, icon }) => {
14225
14260
  if (image == null ? void 0 : image.url) {
14226
14261
  return {
14227
- avatar: /* @__PURE__ */ jsx77(Avatar6, { type: AvatarType5.THUMBNAIL, children: /* @__PURE__ */ jsx77("img", { src: image.url, alt: "" }) })
14262
+ avatar: /* @__PURE__ */ jsx78(Avatar6, { type: AvatarType5.THUMBNAIL, children: /* @__PURE__ */ jsx78("img", { src: image.url, alt: "" }) })
14228
14263
  };
14229
14264
  }
14230
14265
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
14231
14266
  return {
14232
- avatar: /* @__PURE__ */ jsx77(Avatar6, { type: AvatarType5.ICON, children: /* @__PURE__ */ jsx77(DynamicIcon_default2, { type: icon.name }) })
14267
+ avatar: /* @__PURE__ */ jsx78(Avatar6, { type: AvatarType5.ICON, children: /* @__PURE__ */ jsx78(DynamicIcon_default2, { type: icon.name }) })
14233
14268
  };
14234
14269
  }
14235
14270
  if (icon == null ? void 0 : icon.text) {
14236
14271
  return {
14237
- avatar: /* @__PURE__ */ jsx77(Avatar6, { type: AvatarType5.INITIALS, children: icon.text })
14272
+ avatar: /* @__PURE__ */ jsx78(Avatar6, { type: AvatarType5.INITIALS, children: icon.text })
14238
14273
  };
14239
14274
  }
14240
14275
  return null;
@@ -14273,7 +14308,7 @@ var multi_select_messages_default = defineMessages11({
14273
14308
  });
14274
14309
 
14275
14310
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
14276
- import { jsx as jsx78, jsxs as jsxs28 } from "react/jsx-runtime";
14311
+ import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
14277
14312
  function MultiSelectSchema({
14278
14313
  schema,
14279
14314
  model,
@@ -14288,7 +14323,7 @@ function MultiSelectSchema({
14288
14323
  const id = useMemo12(() => schema.$id || generateRandomId(), [schema.$id]);
14289
14324
  const [changed, setChanged] = useState14(false);
14290
14325
  const [selected, setSelected] = useState14(getInitialModelIndices(model, options));
14291
- useEffect8(
14326
+ useEffect9(
14292
14327
  () => {
14293
14328
  if (selected) {
14294
14329
  broadcastModelChange(selected);
@@ -14325,9 +14360,9 @@ function MultiSelectSchema({
14325
14360
  const formGroupClasses = {
14326
14361
  "has-error": shouldShowInitialError || shouldShowValidationError
14327
14362
  };
14328
- return /* @__PURE__ */ jsxs28("div", { className: (0, import_classnames9.default)("d-flex flex-column", formGroupClasses), children: [
14329
- schema.title ? /* @__PURE__ */ jsx78("label", { htmlFor: id, children: schema.title }) : void 0,
14330
- /* @__PURE__ */ jsx78(
14363
+ return /* @__PURE__ */ jsxs29("div", { className: (0, import_classnames9.default)("d-flex flex-column", formGroupClasses), children: [
14364
+ schema.title ? /* @__PURE__ */ jsx79("label", { htmlFor: id, children: schema.title }) : void 0,
14365
+ /* @__PURE__ */ jsx79(
14331
14366
  SelectInput2,
14332
14367
  {
14333
14368
  id,
@@ -14345,12 +14380,12 @@ function MultiSelectSchema({
14345
14380
  if (withinTrigger) {
14346
14381
  return selected && index === selected[0] ? getFormattedMessage() : void 0;
14347
14382
  }
14348
- return /* @__PURE__ */ jsx78(SelectInputOptionContent2, { title: label, note: note != null ? note : secondary, icon });
14383
+ return /* @__PURE__ */ jsx79(SelectInputOptionContent2, { title: label, note: note != null ? note : secondary, icon });
14349
14384
  },
14350
14385
  onChange: broadcastModelChange
14351
14386
  }
14352
14387
  ),
14353
- /* @__PURE__ */ jsx78(
14388
+ /* @__PURE__ */ jsx79(
14354
14389
  ControlFeedback_default,
14355
14390
  {
14356
14391
  id: `${id}-feedback`,
@@ -14382,9 +14417,9 @@ import { useIntl as useIntl13 } from "react-intl";
14382
14417
 
14383
14418
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
14384
14419
  import { NavigationOption as NavigationOption5 } from "@transferwise/components";
14385
- import { jsx as jsx79 } from "react/jsx-runtime";
14420
+ import { jsx as jsx80 } from "react/jsx-runtime";
14386
14421
  function ItemSummaryOption2({ item, onClick }) {
14387
- return /* @__PURE__ */ jsx79(
14422
+ return /* @__PURE__ */ jsx80(
14388
14423
  NavigationOption5,
14389
14424
  {
14390
14425
  media: getNavigationOptionMedia(item),
@@ -14399,7 +14434,7 @@ function ItemSummaryOption2({ item, onClick }) {
14399
14434
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
14400
14435
  import { useState as useState15 } from "react";
14401
14436
  import { useIntl as useIntl12 } from "react-intl";
14402
- import { jsx as jsx80 } from "react/jsx-runtime";
14437
+ import { jsx as jsx81 } from "react/jsx-runtime";
14403
14438
  function RepeatableSchemaStep({
14404
14439
  type,
14405
14440
  schema,
@@ -14447,7 +14482,7 @@ function RepeatableSchemaStep({
14447
14482
  }
14448
14483
  onModelChange(__spreadProps(__spreadValues({}, modelChangeProps), { model: model2 }));
14449
14484
  };
14450
- return /* @__PURE__ */ jsx80(
14485
+ return /* @__PURE__ */ jsx81(
14451
14486
  DynamicFlowStep,
14452
14487
  {
14453
14488
  step,
@@ -14653,7 +14688,7 @@ var schemaSummaryProvides = (summary, providesProp) => (
14653
14688
 
14654
14689
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
14655
14690
  var import_classnames10 = __toESM(require_classnames());
14656
- import { jsx as jsx81, jsxs as jsxs29 } from "react/jsx-runtime";
14691
+ import { jsx as jsx82, jsxs as jsxs30 } from "react/jsx-runtime";
14657
14692
  function RepeatableSchema({
14658
14693
  schema,
14659
14694
  model,
@@ -14730,9 +14765,9 @@ function RepeatableSchema({
14730
14765
  const formGroupClasses = {
14731
14766
  "has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
14732
14767
  };
14733
- return /* @__PURE__ */ jsxs29("div", { id, className: (0, import_classnames10.default)(formGroupClasses), children: [
14734
- schema.title && /* @__PURE__ */ jsx81(Header7, { title: schema.title }),
14735
- itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ jsx81(
14768
+ return /* @__PURE__ */ jsxs30("div", { id, className: (0, import_classnames10.default)(formGroupClasses), children: [
14769
+ schema.title && /* @__PURE__ */ jsx82(Header7, { title: schema.title }),
14770
+ itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ jsx82(
14736
14771
  ItemSummaryOption2,
14737
14772
  {
14738
14773
  item: itemSummary,
@@ -14740,21 +14775,21 @@ function RepeatableSchema({
14740
14775
  },
14741
14776
  JSON.stringify(itemSummary)
14742
14777
  )),
14743
- /* @__PURE__ */ jsx81(
14778
+ /* @__PURE__ */ jsx82(
14744
14779
  NavigationOption6,
14745
14780
  {
14746
- media: /* @__PURE__ */ jsx81(Plus2, {}),
14781
+ media: /* @__PURE__ */ jsx82(Plus2, {}),
14747
14782
  title: schema.addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
14748
14783
  showMediaAtAllSizes: true,
14749
14784
  onClick: onAddItem
14750
14785
  }
14751
14786
  ),
14752
- /* @__PURE__ */ jsx81(
14787
+ /* @__PURE__ */ jsx82(
14753
14788
  Modal3,
14754
14789
  {
14755
14790
  open: openModalType !== null,
14756
14791
  title: (openModalType === "add" ? schema.addItemTitle : schema.editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
14757
- body: /* @__PURE__ */ jsx81(
14792
+ body: /* @__PURE__ */ jsx82(
14758
14793
  RepeatableSchemaStep_default,
14759
14794
  {
14760
14795
  type: openModalType != null ? openModalType : "add",
@@ -14769,7 +14804,7 @@ function RepeatableSchema({
14769
14804
  onClose: onCancelEdit
14770
14805
  }
14771
14806
  ),
14772
- /* @__PURE__ */ jsx81(
14807
+ /* @__PURE__ */ jsx82(
14773
14808
  ControlFeedback_default,
14774
14809
  {
14775
14810
  id: `${id}-feedback`,
@@ -14811,17 +14846,17 @@ var getUpdatedItemSummaries = (action, {
14811
14846
  var RepeatableSchema_default = RepeatableSchema;
14812
14847
 
14813
14848
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.tsx
14814
- import { jsx as jsx82 } from "react/jsx-runtime";
14849
+ import { jsx as jsx83 } from "react/jsx-runtime";
14815
14850
  function ArrayListSchema(props) {
14816
14851
  const { schema } = props;
14817
14852
  if (isMultipleFileUploadSchema(schema)) {
14818
- return /* @__PURE__ */ jsx82(MultipleFileUploadSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
14853
+ return /* @__PURE__ */ jsx83(MultipleFileUploadSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
14819
14854
  }
14820
14855
  if (isMultiSelectConstSchema(schema)) {
14821
- return /* @__PURE__ */ jsx82(MultiSelectSchema, __spreadProps(__spreadValues({}, props), { schema }));
14856
+ return /* @__PURE__ */ jsx83(MultiSelectSchema, __spreadProps(__spreadValues({}, props), { schema }));
14822
14857
  }
14823
14858
  if (isListArraySchema(schema)) {
14824
- return /* @__PURE__ */ jsx82(RepeatableSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
14859
+ return /* @__PURE__ */ jsx83(RepeatableSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
14825
14860
  }
14826
14861
  throw new Error("Invalid array list schema");
14827
14862
  }
@@ -14832,11 +14867,11 @@ ArrayListSchema.defaultProps = {
14832
14867
  var ArrayListSchema_default = ArrayListSchema;
14833
14868
 
14834
14869
  // src/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.tsx
14835
- import { jsx as jsx83 } from "react/jsx-runtime";
14870
+ import { jsx as jsx84 } from "react/jsx-runtime";
14836
14871
  var ArraySchema = (props) => {
14837
14872
  const { schema } = props;
14838
14873
  if (isListArraySchema(schema)) {
14839
- return /* @__PURE__ */ jsx83(ArrayListSchema_default, __spreadValues({}, props));
14874
+ return /* @__PURE__ */ jsx84(ArrayListSchema_default, __spreadValues({}, props));
14840
14875
  }
14841
14876
  throw new Error("Not implemented");
14842
14877
  };
@@ -14848,8 +14883,8 @@ var ArraySchema_default = ArraySchema;
14848
14883
  // src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
14849
14884
  var import_classnames11 = __toESM(require_classnames());
14850
14885
  import { Header as Header8 } from "@transferwise/components";
14851
- import { useState as useState17, useEffect as useEffect9 } from "react";
14852
- import { Fragment as Fragment12, jsx as jsx84, jsxs as jsxs30 } from "react/jsx-runtime";
14886
+ import { useState as useState17, useEffect as useEffect10 } from "react";
14887
+ import { Fragment as Fragment13, jsx as jsx85, jsxs as jsxs31 } from "react/jsx-runtime";
14853
14888
  var getSchemaColumnClasses2 = (width) => ({
14854
14889
  "col-xs-12": true,
14855
14890
  "col-sm-6": width === "md",
@@ -14867,7 +14902,7 @@ function ObjectSchema(props) {
14867
14902
  props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model }));
14868
14903
  };
14869
14904
  const isRequired = (propertyName) => props.schema.required && props.schema.required.includes(propertyName);
14870
- useEffect9(() => {
14905
+ useEffect10(() => {
14871
14906
  const newModel = getValidObjectModelParts(model, props.schema) || {};
14872
14907
  setModel(newModel);
14873
14908
  if (!isEqual(newModel, model)) {
@@ -14885,22 +14920,22 @@ function ObjectSchema(props) {
14885
14920
  const isPropertyDefined = (propertyName) => typeof props.schema.properties[propertyName] !== "undefined";
14886
14921
  const orderedPropertyNames = Array.from(allorderedPropertiesSet).filter(isPropertyDefined);
14887
14922
  const propsErrors = props.errors;
14888
- return /* @__PURE__ */ jsxs30(Fragment12, { children: [
14889
- props.schema.alert && /* @__PURE__ */ jsx84(DynamicAlert_default, { component: props.schema.alert }),
14890
- /* @__PURE__ */ jsxs30("fieldset", { children: [
14891
- props.schema.title && !props.hideTitle && /* @__PURE__ */ jsx84(Header8, { title: props.schema.title, as: "legend" }),
14892
- props.schema.description && !props.hideTitle && /* @__PURE__ */ jsxs30("p", { children: [
14923
+ return /* @__PURE__ */ jsxs31(Fragment13, { children: [
14924
+ props.schema.alert && /* @__PURE__ */ jsx85(DynamicAlert_default, { component: props.schema.alert }),
14925
+ /* @__PURE__ */ jsxs31("fieldset", { children: [
14926
+ props.schema.title && !props.hideTitle && /* @__PURE__ */ jsx85(Header8, { title: props.schema.title, as: "legend" }),
14927
+ props.schema.description && !props.hideTitle && /* @__PURE__ */ jsxs31("p", { children: [
14893
14928
  " ",
14894
14929
  props.schema.description,
14895
14930
  " "
14896
14931
  ] }),
14897
- /* @__PURE__ */ jsx84("div", { className: "row", children: orderedPropertyNames.map((propertyName) => /* @__PURE__ */ jsx84(
14932
+ /* @__PURE__ */ jsx85("div", { className: "row", children: orderedPropertyNames.map((propertyName) => /* @__PURE__ */ jsx85(
14898
14933
  "div",
14899
14934
  {
14900
14935
  className: (0, import_classnames11.default)(
14901
14936
  getSchemaColumnClasses2(props.schema.properties[propertyName].width)
14902
14937
  ),
14903
- children: /* @__PURE__ */ jsx84(
14938
+ children: /* @__PURE__ */ jsx85(
14904
14939
  GenericSchema_default,
14905
14940
  {
14906
14941
  schema: props.schema.properties[propertyName],
@@ -14928,19 +14963,19 @@ var ObjectSchema_default = ObjectSchema;
14928
14963
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
14929
14964
  var import_classnames12 = __toESM(require_classnames());
14930
14965
  import { Header as Header9 } from "@transferwise/components";
14931
- import { useEffect as useEffect11, useMemo as useMemo14, useState as useState18 } from "react";
14966
+ import { useEffect as useEffect12, useMemo as useMemo14, useState as useState18 } from "react";
14932
14967
 
14933
14968
  // src/legacy/jsonSchemaForm/help/Help.tsx
14934
14969
  import { Markdown as Markdown6, Info as Info2 } from "@transferwise/components";
14935
14970
  import { useIntl as useIntl14 } from "react-intl";
14936
- import { jsx as jsx85 } from "react/jsx-runtime";
14971
+ import { jsx as jsx86 } from "react/jsx-runtime";
14937
14972
  function Help2(props) {
14938
14973
  const intl = useIntl14();
14939
- return /* @__PURE__ */ jsx85(
14974
+ return /* @__PURE__ */ jsx86(
14940
14975
  Info2,
14941
14976
  {
14942
14977
  className: "m-l-1",
14943
- content: /* @__PURE__ */ jsx85(Markdown6, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
14978
+ content: /* @__PURE__ */ jsx86(Markdown6, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
14944
14979
  presentation: "POPOVER",
14945
14980
  size: "sm",
14946
14981
  "aria-label": intl.formatMessage(help_messages_default.helpAria)
@@ -14950,7 +14985,7 @@ function Help2(props) {
14950
14985
  var Help_default2 = Help2;
14951
14986
 
14952
14987
  // src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
14953
- import { useEffect as useEffect10 } from "react";
14988
+ import { useEffect as useEffect11 } from "react";
14954
14989
 
14955
14990
  // src/legacy/formControl/FormControl.tsx
14956
14991
  import {
@@ -15152,7 +15187,7 @@ var autocompleteTokenMap2 = {
15152
15187
  };
15153
15188
 
15154
15189
  // src/legacy/formControl/FormControl.tsx
15155
- import { Fragment as Fragment13, jsx as jsx86 } from "react/jsx-runtime";
15190
+ import { Fragment as Fragment14, jsx as jsx87 } from "react/jsx-runtime";
15156
15191
  var _FormControl = class _FormControl extends PureComponent {
15157
15192
  constructor(props) {
15158
15193
  super(props);
@@ -15240,7 +15275,7 @@ var _FormControl = class _FormControl extends PureComponent {
15240
15275
  } = this.props;
15241
15276
  switch (type) {
15242
15277
  case FormControlType.RADIO:
15243
- return /* @__PURE__ */ jsx86(
15278
+ return /* @__PURE__ */ jsx87(
15244
15279
  RadioGroup2,
15245
15280
  {
15246
15281
  radios: options.map(this.mapOption),
@@ -15250,7 +15285,7 @@ var _FormControl = class _FormControl extends PureComponent {
15250
15285
  }
15251
15286
  );
15252
15287
  case FormControlType.CHECKBOX:
15253
- return /* @__PURE__ */ jsx86(
15288
+ return /* @__PURE__ */ jsx87(
15254
15289
  Checkbox2,
15255
15290
  {
15256
15291
  checked: getSafeBooleanValue(value, { coerceValue: true }),
@@ -15268,7 +15303,7 @@ var _FormControl = class _FormControl extends PureComponent {
15268
15303
  const search = options.length >= 8;
15269
15304
  const items = options;
15270
15305
  const selected = this.getSelectedOption(options);
15271
- return /* @__PURE__ */ jsx86("div", { className: "d-flex flex-column", children: /* @__PURE__ */ jsx86(
15306
+ return /* @__PURE__ */ jsx87("div", { className: "d-flex flex-column", children: /* @__PURE__ */ jsx87(
15272
15307
  SelectInput3,
15273
15308
  {
15274
15309
  id,
@@ -15278,7 +15313,7 @@ var _FormControl = class _FormControl extends PureComponent {
15278
15313
  disabled: value2.disabled
15279
15314
  })),
15280
15315
  value: selected != null ? selected : null,
15281
- renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ jsx86(
15316
+ renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ jsx87(
15282
15317
  SelectInputOptionContent3,
15283
15318
  {
15284
15319
  title: label2,
@@ -15299,7 +15334,7 @@ var _FormControl = class _FormControl extends PureComponent {
15299
15334
  onFilterChange: search && onSearchChange ? ({ query }) => {
15300
15335
  onSearchChange(query);
15301
15336
  } : void 0,
15302
- onClear: () => {
15337
+ onClear: required ? void 0 : () => {
15303
15338
  this.setState({ selectedOption: null });
15304
15339
  this.props.onChange(null);
15305
15340
  }
@@ -15307,13 +15342,13 @@ var _FormControl = class _FormControl extends PureComponent {
15307
15342
  ) });
15308
15343
  }
15309
15344
  case FormControlType.TAB:
15310
- return /* @__PURE__ */ jsx86(
15345
+ return /* @__PURE__ */ jsx87(
15311
15346
  Tabs2,
15312
15347
  {
15313
15348
  selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
15314
15349
  tabs: options.map((option) => ({
15315
15350
  title: option.label,
15316
- content: /* @__PURE__ */ jsx86(Fragment13, {}),
15351
+ content: /* @__PURE__ */ jsx87(Fragment14, {}),
15317
15352
  disabled: option.disabled || false
15318
15353
  })),
15319
15354
  name: id,
@@ -15328,7 +15363,7 @@ var _FormControl = class _FormControl extends PureComponent {
15328
15363
  );
15329
15364
  case FormControlType.NUMERIC:
15330
15365
  case FormControlType.NUMBER: {
15331
- return /* @__PURE__ */ jsx86(
15366
+ return /* @__PURE__ */ jsx87(
15332
15367
  "input",
15333
15368
  {
15334
15369
  autoComplete: this.getAutocompleteValue(),
@@ -15362,7 +15397,7 @@ var _FormControl = class _FormControl extends PureComponent {
15362
15397
  );
15363
15398
  }
15364
15399
  case FormControlType.HIDDEN:
15365
- return /* @__PURE__ */ jsx86(
15400
+ return /* @__PURE__ */ jsx87(
15366
15401
  "input",
15367
15402
  {
15368
15403
  type: "hidden",
@@ -15372,7 +15407,7 @@ var _FormControl = class _FormControl extends PureComponent {
15372
15407
  }
15373
15408
  );
15374
15409
  case FormControlType.PASSWORD:
15375
- return /* @__PURE__ */ jsx86(
15410
+ return /* @__PURE__ */ jsx87(
15376
15411
  "input",
15377
15412
  {
15378
15413
  autoComplete: this.getAutocompleteValue(),
@@ -15392,7 +15427,7 @@ var _FormControl = class _FormControl extends PureComponent {
15392
15427
  );
15393
15428
  case FormControlType.DATE:
15394
15429
  case FormControlType.DATETIME:
15395
- return /* @__PURE__ */ jsx86(
15430
+ return /* @__PURE__ */ jsx87(
15396
15431
  DateInput2,
15397
15432
  {
15398
15433
  dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
@@ -15408,7 +15443,7 @@ var _FormControl = class _FormControl extends PureComponent {
15408
15443
  }
15409
15444
  );
15410
15445
  case FormControlType.DATELOOKUP: {
15411
- return /* @__PURE__ */ jsx86(
15446
+ return /* @__PURE__ */ jsx87(
15412
15447
  DateLookup2,
15413
15448
  {
15414
15449
  value: getSafeDateStringValue(value),
@@ -15426,7 +15461,7 @@ var _FormControl = class _FormControl extends PureComponent {
15426
15461
  );
15427
15462
  }
15428
15463
  case FormControlType.TEL:
15429
- return /* @__PURE__ */ jsx86(
15464
+ return /* @__PURE__ */ jsx87(
15430
15465
  PhoneNumberInput2,
15431
15466
  {
15432
15467
  disabled,
@@ -15458,7 +15493,7 @@ var _FormControl = class _FormControl extends PureComponent {
15458
15493
  autoComplete: this.getAutocompleteValue()
15459
15494
  };
15460
15495
  if (this.props.displayPattern) {
15461
- return /* @__PURE__ */ jsx86(
15496
+ return /* @__PURE__ */ jsx87(
15462
15497
  TextareaWithDisplayFormat2,
15463
15498
  __spreadProps(__spreadValues({
15464
15499
  displayPattern: this.props.displayPattern
@@ -15467,7 +15502,7 @@ var _FormControl = class _FormControl extends PureComponent {
15467
15502
  })
15468
15503
  );
15469
15504
  }
15470
- return /* @__PURE__ */ jsx86(
15505
+ return /* @__PURE__ */ jsx87(
15471
15506
  "textarea",
15472
15507
  __spreadProps(__spreadValues({}, textareaProps), {
15473
15508
  "aria-describedby": describedBy,
@@ -15480,7 +15515,7 @@ var _FormControl = class _FormControl extends PureComponent {
15480
15515
  return (
15481
15516
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15482
15517
  // @ts-expect-error - TODO: Remove this once Upload is migrated to TypeScript
15483
- /* @__PURE__ */ jsx86(
15518
+ /* @__PURE__ */ jsx87(
15484
15519
  Upload2,
15485
15520
  __spreadProps(__spreadValues({}, uploadProps), {
15486
15521
  usAccept: uploadProps.usAccept || "*",
@@ -15518,7 +15553,7 @@ var _FormControl = class _FormControl extends PureComponent {
15518
15553
  autoComplete: this.getAutocompleteValue()
15519
15554
  };
15520
15555
  if (this.props.displayPattern) {
15521
- return /* @__PURE__ */ jsx86(
15556
+ return /* @__PURE__ */ jsx87(
15522
15557
  InputWithDisplayFormat2,
15523
15558
  __spreadProps(__spreadValues({
15524
15559
  displayPattern: this.props.displayPattern
@@ -15527,7 +15562,7 @@ var _FormControl = class _FormControl extends PureComponent {
15527
15562
  })
15528
15563
  );
15529
15564
  }
15530
- return /* @__PURE__ */ jsx86(
15565
+ return /* @__PURE__ */ jsx87(
15531
15566
  "input",
15532
15567
  __spreadProps(__spreadValues({}, inputProps), {
15533
15568
  "aria-describedby": describedBy,
@@ -15576,14 +15611,17 @@ _FormControl.defaultProps = {
15576
15611
  var FormControl = _FormControl;
15577
15612
 
15578
15613
  // src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
15579
- import { jsx as jsx87 } from "react/jsx-runtime";
15614
+ import { jsx as jsx88 } from "react/jsx-runtime";
15580
15615
  var isNativeInput = (propsSchemaType) => propsSchemaType === "string" || propsSchemaType === "number";
15581
15616
  var getControlType = (schema) => {
15582
15617
  if (isOneOfSchema2(schema)) {
15583
15618
  if (schema.control === FormControlType.TAB && schema.oneOf.length > 3) {
15584
15619
  return FormControlType.SELECT;
15585
15620
  }
15586
- return schema.control || FormControlType.SELECT;
15621
+ if (schema.control == null || !Object.values(FormControlType).includes(schema.control)) {
15622
+ return FormControlType.SELECT;
15623
+ }
15624
+ return schema.control;
15587
15625
  }
15588
15626
  if (isStringSchema2(schema)) {
15589
15627
  return getStringSchemaControlType(schema);
@@ -15634,14 +15672,25 @@ var getOptions = (schema, controlType) => {
15634
15672
  return null;
15635
15673
  };
15636
15674
  function SchemaFormControl(props) {
15637
- const { id, schema, value, disabled, onChange, onFocus, onBlur, onSearchChange, describedBy } = props;
15675
+ const {
15676
+ id,
15677
+ schema,
15678
+ value,
15679
+ disabled,
15680
+ required,
15681
+ onChange,
15682
+ onFocus,
15683
+ onBlur,
15684
+ onSearchChange,
15685
+ describedBy
15686
+ } = props;
15638
15687
  const log = useLogger();
15639
15688
  const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
15640
15689
  const onModelChange = (value2, type, metadata) => {
15641
15690
  onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
15642
15691
  };
15643
15692
  const controlType = getControlType(schema);
15644
- useEffect10(() => {
15693
+ useEffect11(() => {
15645
15694
  warnIfInvalidSchema(schema, log, controlType);
15646
15695
  }, [JSON.stringify(schema), log, controlType]);
15647
15696
  const options = schema.values || getOptions(schema, controlType);
@@ -15665,9 +15714,10 @@ function SchemaFormControl(props) {
15665
15714
  displayPattern: schema.displayFormat,
15666
15715
  // TODO: LOW avoid type assertion below
15667
15716
  uploadProps: mapSchemaToUploadOptions(schema),
15668
- describedBy
15717
+ describedBy,
15718
+ required
15669
15719
  };
15670
- return /* @__PURE__ */ jsx87("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ jsx87(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
15720
+ return /* @__PURE__ */ jsx88("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ jsx88(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
15671
15721
  }
15672
15722
  SchemaFormControl.defaultProps = {
15673
15723
  value: null,
@@ -15696,7 +15746,7 @@ var warnIfInvalidSchema = (schema, log, controlType) => {
15696
15746
  var SchemaFormControl_default = SchemaFormControl;
15697
15747
 
15698
15748
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
15699
- import { Fragment as Fragment14, jsx as jsx88, jsxs as jsxs31 } from "react/jsx-runtime";
15749
+ import { Fragment as Fragment15, jsx as jsx89, jsxs as jsxs32 } from "react/jsx-runtime";
15700
15750
  function OneOfSchema(props) {
15701
15751
  const onEvent = useEventDispatcher();
15702
15752
  const [changed, setChanged] = useState18(false);
@@ -15714,7 +15764,7 @@ function OneOfSchema(props) {
15714
15764
  searchValueLength: searchValue.length
15715
15765
  });
15716
15766
  };
15717
- useEffect11(() => {
15767
+ useEffect12(() => {
15718
15768
  const modelIndex = getValidIndexFromValue(props.schema, props.model);
15719
15769
  const defaultIndex = getValidIndexFromValue(props.schema, props.schema.default);
15720
15770
  if (modelIndex === -1 && defaultIndex >= 0) {
@@ -15772,12 +15822,12 @@ function OneOfSchema(props) {
15772
15822
  "has-error": !changed && props.errors && !isEmpty(props.errors) || (props.submitted || changed && blurred) && validations.length
15773
15823
  };
15774
15824
  const feedbackId = `${id}-feedback`;
15775
- return /* @__PURE__ */ jsxs31(Fragment14, { children: [
15776
- (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ jsxs31(Fragment14, { children: [
15777
- props.schema.alert && /* @__PURE__ */ jsx88(DynamicAlert_default, { component: props.schema.alert }),
15778
- /* @__PURE__ */ jsxs31("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
15825
+ return /* @__PURE__ */ jsxs32(Fragment15, { children: [
15826
+ (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ jsxs32(Fragment15, { children: [
15827
+ props.schema.alert && /* @__PURE__ */ jsx89(DynamicAlert_default, { component: props.schema.alert }),
15828
+ /* @__PURE__ */ jsxs32("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
15779
15829
  getTitleAndHelp(props.schema, id),
15780
- /* @__PURE__ */ jsx88(
15830
+ /* @__PURE__ */ jsx89(
15781
15831
  SchemaFormControl_default,
15782
15832
  {
15783
15833
  id,
@@ -15785,13 +15835,14 @@ function OneOfSchema(props) {
15785
15835
  value: schemaIndex,
15786
15836
  disabled: props.disabled,
15787
15837
  describedBy: feedbackId,
15838
+ required: props.required,
15788
15839
  onChange: onChooseNewSchema,
15789
15840
  onFocus,
15790
15841
  onBlur,
15791
15842
  onSearchChange
15792
15843
  }
15793
15844
  ),
15794
- /* @__PURE__ */ jsx88(
15845
+ /* @__PURE__ */ jsx89(
15795
15846
  ControlFeedback_default,
15796
15847
  {
15797
15848
  id: feedbackId,
@@ -15807,7 +15858,7 @@ function OneOfSchema(props) {
15807
15858
  )
15808
15859
  ] })
15809
15860
  ] }),
15810
- isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ jsx88(
15861
+ isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ jsx89(
15811
15862
  GenericSchema_default,
15812
15863
  {
15813
15864
  schema: props.schema.oneOf[schemaIndex],
@@ -15824,16 +15875,16 @@ function OneOfSchema(props) {
15824
15875
  }
15825
15876
  function getTitleAndHelp(schema, forId) {
15826
15877
  var _a;
15827
- const helpElement = schema.help ? /* @__PURE__ */ jsx88(Help_default2, { help: schema.help }) : null;
15828
- const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ jsx88("div", { className: "m-b-1", children: /* @__PURE__ */ jsxs31("label", { className: "control-label d-inline", htmlFor: forId, children: [
15878
+ const helpElement = schema.help ? /* @__PURE__ */ jsx89(Help_default2, { help: schema.help }) : null;
15879
+ const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ jsx89("div", { className: "m-b-1", children: /* @__PURE__ */ jsxs32("label", { className: "control-label d-inline", htmlFor: forId, children: [
15829
15880
  schema.title,
15830
15881
  " ",
15831
15882
  helpElement
15832
- ] }) }) : /* @__PURE__ */ jsx88(Fragment14, { children: helpElement ? /* @__PURE__ */ jsxs31("h4", { className: "m-b-2", children: [
15883
+ ] }) }) : /* @__PURE__ */ jsx89(Fragment15, { children: helpElement ? /* @__PURE__ */ jsxs32("h4", { className: "m-b-2", children: [
15833
15884
  schema.title,
15834
15885
  " ",
15835
15886
  helpElement
15836
- ] }) : /* @__PURE__ */ jsx88(Header9, { title: (_a = schema.title) != null ? _a : "" }) });
15887
+ ] }) : /* @__PURE__ */ jsx89(Header9, { title: (_a = schema.title) != null ? _a : "" }) });
15837
15888
  return schema.title ? titleElement : helpElement;
15838
15889
  }
15839
15890
  function getValidations(props, schemaIndex) {
@@ -15870,12 +15921,12 @@ var OneOfSchema_default = OneOfSchema;
15870
15921
 
15871
15922
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
15872
15923
  var import_classnames13 = __toESM(require_classnames());
15873
- import { useEffect as useEffect12, useState as useState19 } from "react";
15924
+ import { useEffect as useEffect13, useState as useState19 } from "react";
15874
15925
 
15875
15926
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
15876
15927
  import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
15877
15928
  import { useMemo as useMemo15 } from "react";
15878
- import { jsx as jsx89 } from "react/jsx-runtime";
15929
+ import { jsx as jsx90 } from "react/jsx-runtime";
15879
15930
  function UploadInputAdapter(props) {
15880
15931
  const {
15881
15932
  id,
@@ -15908,7 +15959,7 @@ function UploadInputAdapter(props) {
15908
15959
  return Promise.reject();
15909
15960
  });
15910
15961
  };
15911
- return /* @__PURE__ */ jsx89(
15962
+ return /* @__PURE__ */ jsx90(
15912
15963
  UploadInput4,
15913
15964
  {
15914
15965
  id,
@@ -15928,7 +15979,7 @@ function UploadInputAdapter(props) {
15928
15979
  }
15929
15980
 
15930
15981
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
15931
- import { jsx as jsx90, jsxs as jsxs32 } from "react/jsx-runtime";
15982
+ import { jsx as jsx91, jsxs as jsxs33 } from "react/jsx-runtime";
15932
15983
  function PersistAsyncBlobSchema(props) {
15933
15984
  const { model, schema, submitted, required, errors, onChange } = props;
15934
15985
  const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = useState19({});
@@ -15937,7 +15988,7 @@ function PersistAsyncBlobSchema(props) {
15937
15988
  const [changed, setChanged] = useState19(false);
15938
15989
  const httpClient = useHttpClient();
15939
15990
  const onEvent = useEventDispatcher();
15940
- useEffect12(() => {
15991
+ useEffect13(() => {
15941
15992
  if (submitted) {
15942
15993
  setValidations(getValidationFailures(model, schema, Boolean(required)));
15943
15994
  } else {
@@ -15974,8 +16025,8 @@ function PersistAsyncBlobSchema(props) {
15974
16025
  };
15975
16026
  const id = schema.$id || schema.persistAsync.schema.$id || schema.persistAsync.idProperty;
15976
16027
  const feedbackId = `${id}-feedback`;
15977
- return /* @__PURE__ */ jsxs32("div", { className: (0, import_classnames13.default)(formGroupClasses), children: [
15978
- /* @__PURE__ */ jsx90("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx90(
16028
+ return /* @__PURE__ */ jsxs33("div", { className: (0, import_classnames13.default)(formGroupClasses), children: [
16029
+ /* @__PURE__ */ jsx91("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx91(
15979
16030
  UploadInputAdapter,
15980
16031
  __spreadValues({
15981
16032
  id,
@@ -15992,7 +16043,7 @@ function PersistAsyncBlobSchema(props) {
15992
16043
  onCancel
15993
16044
  }, mapSchemaToUploadOptions(schema.persistAsync.schema))
15994
16045
  ) }),
15995
- /* @__PURE__ */ jsx90(
16046
+ /* @__PURE__ */ jsx91(
15996
16047
  ControlFeedback_default,
15997
16048
  {
15998
16049
  id: feedbackId,
@@ -16017,17 +16068,17 @@ PersistAsyncBlobSchema.defaultProps = {
16017
16068
  var PersistAsyncBlobSchema_default = PersistAsyncBlobSchema;
16018
16069
 
16019
16070
  // src/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.tsx
16020
- import { jsx as jsx91 } from "react/jsx-runtime";
16071
+ import { jsx as jsx92 } from "react/jsx-runtime";
16021
16072
  function PersistAsyncSchema(props) {
16022
16073
  const { schema } = props;
16023
16074
  const persistAsyncSchemaType = schema.persistAsync.schema.type;
16024
16075
  if (persistAsyncSchemaType === "blob") {
16025
- return /* @__PURE__ */ jsx91(
16076
+ return /* @__PURE__ */ jsx92(
16026
16077
  PersistAsyncBlobSchema_default,
16027
16078
  __spreadValues({}, props)
16028
16079
  );
16029
16080
  }
16030
- return /* @__PURE__ */ jsx91(PersistAsyncBasicSchema_default, __spreadValues({}, props));
16081
+ return /* @__PURE__ */ jsx92(PersistAsyncBasicSchema_default, __spreadValues({}, props));
16031
16082
  }
16032
16083
  PersistAsyncSchema.defaultProps = {
16033
16084
  required: false
@@ -16048,7 +16099,7 @@ var getSelectionFromModel = (schema, model) => {
16048
16099
 
16049
16100
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
16050
16101
  import { Checkbox as Checkbox3 } from "@transferwise/components";
16051
- import { jsx as jsx92 } from "react/jsx-runtime";
16102
+ import { jsx as jsx93 } from "react/jsx-runtime";
16052
16103
  var PromotedOneOfCheckboxControl = (props) => {
16053
16104
  const { id, selection, setSelection } = props;
16054
16105
  const { promoted, other, checkedMeans } = props.promotion;
@@ -16059,14 +16110,14 @@ var PromotedOneOfCheckboxControl = (props) => {
16059
16110
  const toggleSelection = () => {
16060
16111
  setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
16061
16112
  };
16062
- return /* @__PURE__ */ jsx92("div", { className: "form-group", children: /* @__PURE__ */ jsx92(Checkbox3, { id, label: title, checked, onChange: toggleSelection }) });
16113
+ return /* @__PURE__ */ jsx93("div", { className: "form-group", children: /* @__PURE__ */ jsx93(Checkbox3, { id, label: title, checked, onChange: toggleSelection }) });
16063
16114
  };
16064
16115
  PromotedOneOfCheckboxControl.defaultProps = {};
16065
16116
  var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
16066
16117
 
16067
16118
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
16068
16119
  import { RadioGroup as RadioGroup3 } from "@transferwise/components";
16069
- import { jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
16120
+ import { jsx as jsx94, jsxs as jsxs34 } from "react/jsx-runtime";
16070
16121
  function PromotedOneOfRadioControl(props) {
16071
16122
  var _a, _b;
16072
16123
  const { id, selection, setSelection, promotion, promotedOneOf, title } = props;
@@ -16083,9 +16134,9 @@ function PromotedOneOfRadioControl(props) {
16083
16134
  secondary: promotion.other.description
16084
16135
  }, getAvatarPropertyForRadioOption(promotion.other))
16085
16136
  ];
16086
- return /* @__PURE__ */ jsxs33("div", { className: "form-group", children: [
16087
- title && /* @__PURE__ */ jsx93("label", { className: "control-label", htmlFor: id, children: title }),
16088
- /* @__PURE__ */ jsx93(
16137
+ return /* @__PURE__ */ jsxs34("div", { className: "form-group", children: [
16138
+ title && /* @__PURE__ */ jsx94("label", { className: "control-label", htmlFor: id, children: title }),
16139
+ /* @__PURE__ */ jsx94(
16089
16140
  RadioGroup3,
16090
16141
  {
16091
16142
  name: "promoted-selection",
@@ -16103,16 +16154,16 @@ PromotedOneOfRadioControl.defaultProps = {
16103
16154
  var PromotedOneOfRadioControl_default = PromotedOneOfRadioControl;
16104
16155
 
16105
16156
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.tsx
16106
- import { Fragment as Fragment15, jsx as jsx94 } from "react/jsx-runtime";
16157
+ import { Fragment as Fragment16, jsx as jsx95 } from "react/jsx-runtime";
16107
16158
  function PromotedOneOfControl(props) {
16108
16159
  const controlType = props.promotion.control || "radio";
16109
16160
  switch (controlType) {
16110
16161
  case "radio":
16111
- return /* @__PURE__ */ jsx94(PromotedOneOfRadioControl_default, __spreadValues({}, props));
16162
+ return /* @__PURE__ */ jsx95(PromotedOneOfRadioControl_default, __spreadValues({}, props));
16112
16163
  case "checkbox":
16113
- return /* @__PURE__ */ jsx94(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
16164
+ return /* @__PURE__ */ jsx95(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
16114
16165
  default:
16115
- return /* @__PURE__ */ jsx94(Fragment15, {});
16166
+ return /* @__PURE__ */ jsx95(Fragment16, {});
16116
16167
  }
16117
16168
  }
16118
16169
  PromotedOneOfControl.defaultProps = {
@@ -16122,7 +16173,7 @@ PromotedOneOfControl.defaultProps = {
16122
16173
  var PromotedOneOfControl_default = PromotedOneOfControl;
16123
16174
 
16124
16175
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
16125
- import { Fragment as Fragment16, jsx as jsx95, jsxs as jsxs34 } from "react/jsx-runtime";
16176
+ import { Fragment as Fragment17, jsx as jsx96, jsxs as jsxs35 } from "react/jsx-runtime";
16126
16177
  var isPromoted = (schema) => schema.promoted === true;
16127
16178
  var PromotedOneOfSchema = (props) => {
16128
16179
  var _a;
@@ -16133,9 +16184,9 @@ var PromotedOneOfSchema = (props) => {
16133
16184
  const promotedOneOf = props.schema.oneOf.find(isPromoted);
16134
16185
  const promotedObjectSchema = getPromotedObjectSchema(promotedOneOf);
16135
16186
  const otherOneOf = getOtherOneOf(props.schema);
16136
- return /* @__PURE__ */ jsxs34(Fragment16, { children: [
16137
- promotedAlert && /* @__PURE__ */ jsx95(DynamicAlert_default, { component: promotedAlert }),
16138
- /* @__PURE__ */ jsx95(
16187
+ return /* @__PURE__ */ jsxs35(Fragment17, { children: [
16188
+ promotedAlert && /* @__PURE__ */ jsx96(DynamicAlert_default, { component: promotedAlert }),
16189
+ /* @__PURE__ */ jsx96(
16139
16190
  PromotedOneOfControl_default,
16140
16191
  {
16141
16192
  id: props.schema.$id,
@@ -16146,8 +16197,8 @@ var PromotedOneOfSchema = (props) => {
16146
16197
  setSelection
16147
16198
  }
16148
16199
  ),
16149
- selection === "promoted" && /* @__PURE__ */ jsx95(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
16150
- selection === "other" && /* @__PURE__ */ jsx95(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
16200
+ selection === "promoted" && /* @__PURE__ */ jsx96(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
16201
+ selection === "other" && /* @__PURE__ */ jsx96(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
16151
16202
  ] });
16152
16203
  };
16153
16204
  function getPromotedObjectSchema(promotedSchema) {
@@ -16196,12 +16247,12 @@ var ReadOnlySchema_messages_default = defineMessages12({
16196
16247
  });
16197
16248
 
16198
16249
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
16199
- import { Fragment as Fragment17, jsx as jsx96, jsxs as jsxs35 } from "react/jsx-runtime";
16250
+ import { Fragment as Fragment18, jsx as jsx97, jsxs as jsxs36 } from "react/jsx-runtime";
16200
16251
  function ReadOnlySchema({ schema, model }) {
16201
16252
  const { title = "" } = schema;
16202
16253
  const { formatMessage } = useIntl15();
16203
16254
  const value = getValueForSchema({ schema, model, formatMessage });
16204
- return /* @__PURE__ */ jsx96(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
16255
+ return /* @__PURE__ */ jsx97(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
16205
16256
  }
16206
16257
  var ReadOnlySchema_default = ReadOnlySchema;
16207
16258
  function getValueForSchema({
@@ -16234,7 +16285,7 @@ function getSelectedOneOf(schema, model) {
16234
16285
  function getValueFromOption(option) {
16235
16286
  const text = option.title && option.description ? `${option.title} - ${option.description}` : option.title || "";
16236
16287
  const icon = getAvatarPropertyForRadioOption({ icon: option.icon });
16237
- return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ jsxs35(Fragment17, { children: [
16288
+ return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ jsxs36(Fragment18, { children: [
16238
16289
  icon.avatar,
16239
16290
  " ",
16240
16291
  text
@@ -16242,8 +16293,8 @@ function getValueFromOption(option) {
16242
16293
  }
16243
16294
 
16244
16295
  // src/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.tsx
16245
- import { useEffect as useEffect13, useRef as useRef3, useState as useState21 } from "react";
16246
- import { jsx as jsx97 } from "react/jsx-runtime";
16296
+ import { useEffect as useEffect14, useRef as useRef3, useState as useState21 } from "react";
16297
+ import { jsx as jsx98 } from "react/jsx-runtime";
16247
16298
  function ValidationAsyncSchema(props) {
16248
16299
  const { schema, model, required, submitted, errors, onChange } = props;
16249
16300
  const [validationAsyncModel, setValidationAsyncModel] = useState21(model);
@@ -16257,7 +16308,7 @@ function ValidationAsyncSchema(props) {
16257
16308
  const httpClient = useHttpClient();
16258
16309
  const onEvent = useEventDispatcher();
16259
16310
  const log = useLogger();
16260
- useEffect13(() => {
16311
+ useEffect14(() => {
16261
16312
  if (!schema.validationAsync.method) {
16262
16313
  log.warning(
16263
16314
  "Invalid schema or model",
@@ -16327,20 +16378,20 @@ function ValidationAsyncSchema(props) {
16327
16378
  required,
16328
16379
  schema
16329
16380
  };
16330
- return /* @__PURE__ */ jsx97(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
16381
+ return /* @__PURE__ */ jsx98(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
16331
16382
  }
16332
16383
  ValidationAsyncSchema.defaultProps = { required: false };
16333
16384
  var ValidationAsyncSchema_default = ValidationAsyncSchema;
16334
16385
 
16335
16386
  // src/legacy/jsonSchemaForm/genericSchema/GenericSchema.tsx
16336
- import { Fragment as Fragment18, jsx as jsx98 } from "react/jsx-runtime";
16387
+ import { Fragment as Fragment19, jsx as jsx99 } from "react/jsx-runtime";
16337
16388
  import { createElement } from "react";
16338
16389
  function GenericSchemaForm(props) {
16339
16390
  const { schema, model = null, errors = null, hideTitle = false, disabled = false } = props;
16340
16391
  const schemaProps = __spreadProps(__spreadValues({}, props), { model, errors, hideTitle, disabled });
16341
16392
  const type = getSchemaType(schema);
16342
16393
  const log = useLogger();
16343
- useEffect14(() => {
16394
+ useEffect15(() => {
16344
16395
  if (!isValidGenericSchema(schema, model, errors)) {
16345
16396
  log.error(
16346
16397
  "Invalid schema or model",
@@ -16350,29 +16401,29 @@ function GenericSchemaForm(props) {
16350
16401
  }, [JSON.stringify(schema), JSON.stringify(model), JSON.stringify(errors), type, log]);
16351
16402
  switch (type) {
16352
16403
  case "readOnly":
16353
- return /* @__PURE__ */ jsx98(ReadOnlySchema_default, __spreadValues({}, schemaProps));
16404
+ return /* @__PURE__ */ jsx99(ReadOnlySchema_default, __spreadValues({}, schemaProps));
16354
16405
  case "persistAsync":
16355
- return /* @__PURE__ */ jsx98(PersistAsyncSchema_default, __spreadValues({}, schemaProps));
16406
+ return /* @__PURE__ */ jsx99(PersistAsyncSchema_default, __spreadValues({}, schemaProps));
16356
16407
  case "validationAsync":
16357
- return /* @__PURE__ */ jsx98(ValidationAsyncSchema_default, __spreadValues({}, schemaProps));
16408
+ return /* @__PURE__ */ jsx99(ValidationAsyncSchema_default, __spreadValues({}, schemaProps));
16358
16409
  case "basic": {
16359
16410
  const basicTypeProps = __spreadValues({
16360
16411
  infoMessage: null
16361
16412
  }, schemaProps);
16362
- return /* @__PURE__ */ jsx98(BasicTypeSchema_default, __spreadValues({}, basicTypeProps));
16413
+ return /* @__PURE__ */ jsx99(BasicTypeSchema_default, __spreadValues({}, basicTypeProps));
16363
16414
  }
16364
16415
  case "object":
16365
16416
  return /* @__PURE__ */ createElement(ObjectSchema_default, __spreadProps(__spreadValues({}, schemaProps), { key: JSON.stringify(schema) }));
16366
16417
  case "array":
16367
- return /* @__PURE__ */ jsx98(ArraySchema_default, __spreadValues({}, schemaProps));
16418
+ return /* @__PURE__ */ jsx99(ArraySchema_default, __spreadValues({}, schemaProps));
16368
16419
  case "promotedOneOf":
16369
- return /* @__PURE__ */ jsx98(PromotedOneOfSchema_default, __spreadValues({}, schemaProps));
16420
+ return /* @__PURE__ */ jsx99(PromotedOneOfSchema_default, __spreadValues({}, schemaProps));
16370
16421
  case "oneOf":
16371
- return /* @__PURE__ */ jsx98(OneOfSchema_default, __spreadValues({}, schemaProps));
16422
+ return /* @__PURE__ */ jsx99(OneOfSchema_default, __spreadValues({}, schemaProps));
16372
16423
  case "allOf":
16373
- return /* @__PURE__ */ jsx98(AllOfSchema_default, __spreadValues({}, schemaProps));
16424
+ return /* @__PURE__ */ jsx99(AllOfSchema_default, __spreadValues({}, schemaProps));
16374
16425
  }
16375
- return /* @__PURE__ */ jsx98(Fragment18, {});
16426
+ return /* @__PURE__ */ jsx99(Fragment19, {});
16376
16427
  }
16377
16428
  var GenericSchema_default = GenericSchemaForm;
16378
16429
  var isValidGenericSchema = (schema, model, errors) => {
@@ -16399,7 +16450,7 @@ var isValidGenericSchema = (schema, model, errors) => {
16399
16450
  };
16400
16451
 
16401
16452
  // src/legacy/layout/form/DynamicForm.tsx
16402
- import { jsx as jsx99 } from "react/jsx-runtime";
16453
+ import { jsx as jsx100 } from "react/jsx-runtime";
16403
16454
  function DynamicForm({
16404
16455
  component,
16405
16456
  model = null,
@@ -16409,7 +16460,7 @@ function DynamicForm({
16409
16460
  onPersistAsync
16410
16461
  }) {
16411
16462
  const formSchema = component.schema;
16412
- return /* @__PURE__ */ jsx99("div", { className: getMargin2(component.margin || "md"), children: /* @__PURE__ */ jsx99(
16463
+ return /* @__PURE__ */ jsx100("div", { className: getMargin2(component.margin || "md"), children: /* @__PURE__ */ jsx100(
16413
16464
  GenericSchema_default,
16414
16465
  {
16415
16466
  schema: formSchema,
@@ -16428,62 +16479,62 @@ var DynamicForm_default = DynamicForm;
16428
16479
  // src/legacy/layout/heading/DynamicHeading.tsx
16429
16480
  var import_classnames14 = __toESM(require_classnames());
16430
16481
  import { Display as Display2 } from "@transferwise/components";
16431
- import { jsx as jsx100 } from "react/jsx-runtime";
16482
+ import { jsx as jsx101 } from "react/jsx-runtime";
16432
16483
  var DynamicHeading = (props) => {
16433
16484
  const { text, size = "md", align = "left", margin = "md", control } = props.component;
16434
16485
  const classes = (0, import_classnames14.default)(getTextAlignmentAndMargin2({ align, margin }));
16435
- return control === "display" ? /* @__PURE__ */ jsx100(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ jsx100(StandardHeading2, { size, text, classes });
16486
+ return control === "display" ? /* @__PURE__ */ jsx101(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ jsx101(StandardHeading2, { size, text, classes });
16436
16487
  };
16437
16488
  var StandardHeading2 = ({ size, text, classes }) => {
16438
16489
  switch (size) {
16439
16490
  case "xs":
16440
- return /* @__PURE__ */ jsx100("h5", { className: classes, children: text });
16491
+ return /* @__PURE__ */ jsx101("h5", { className: classes, children: text });
16441
16492
  case "sm":
16442
- return /* @__PURE__ */ jsx100("h4", { className: classes, children: text });
16493
+ return /* @__PURE__ */ jsx101("h4", { className: classes, children: text });
16443
16494
  case "lg":
16444
- return /* @__PURE__ */ jsx100("h2", { className: classes, children: text });
16495
+ return /* @__PURE__ */ jsx101("h2", { className: classes, children: text });
16445
16496
  case "xl":
16446
- return /* @__PURE__ */ jsx100("h1", { className: classes, children: text });
16497
+ return /* @__PURE__ */ jsx101("h1", { className: classes, children: text });
16447
16498
  case "md":
16448
16499
  default:
16449
- return /* @__PURE__ */ jsx100("h3", { className: classes, children: text });
16500
+ return /* @__PURE__ */ jsx101("h3", { className: classes, children: text });
16450
16501
  }
16451
16502
  };
16452
16503
  var DisplayHeading2 = ({ size, text, classes }) => {
16453
16504
  switch (size) {
16454
16505
  case "xs":
16455
16506
  case "sm":
16456
- return /* @__PURE__ */ jsx100(Display2, { type: "display-small", className: classes, children: text });
16507
+ return /* @__PURE__ */ jsx101(Display2, { type: "display-small", className: classes, children: text });
16457
16508
  case "xl":
16458
16509
  case "lg":
16459
- return /* @__PURE__ */ jsx100(Display2, { type: "display-large", className: classes, children: text });
16510
+ return /* @__PURE__ */ jsx101(Display2, { type: "display-large", className: classes, children: text });
16460
16511
  case "md":
16461
16512
  default:
16462
- return /* @__PURE__ */ jsx100(Display2, { type: "display-medium", className: classes, children: text });
16513
+ return /* @__PURE__ */ jsx101(Display2, { type: "display-medium", className: classes, children: text });
16463
16514
  }
16464
16515
  };
16465
16516
  var DynamicHeading_default = DynamicHeading;
16466
16517
 
16467
16518
  // src/legacy/layout/markdown/DynamicMarkdown.tsx
16468
16519
  import { Markdown as Markdown7 } from "@transferwise/components";
16469
- import { jsx as jsx101 } from "react/jsx-runtime";
16520
+ import { jsx as jsx102 } from "react/jsx-runtime";
16470
16521
  var DynamicMarkdown = ({ component }) => {
16471
16522
  const { content, align, margin } = component;
16472
- return /* @__PURE__ */ jsx101("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ jsx101(Markdown7, { config: { link: { target: "_blank" } }, children: content }) });
16523
+ return /* @__PURE__ */ jsx102("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ jsx102(Markdown7, { config: { link: { target: "_blank" } }, children: content }) });
16473
16524
  };
16474
16525
  var DynamicInfo = ({ component }) => {
16475
- return /* @__PURE__ */ jsx101("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ jsx101(Markdown7, { config: { link: { target: "_blank" } }, children: component.markdown }) });
16526
+ return /* @__PURE__ */ jsx102("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ jsx102(Markdown7, { config: { link: { target: "_blank" } }, children: component.markdown }) });
16476
16527
  };
16477
16528
 
16478
16529
  // src/legacy/layout/image/DynamicImage.tsx
16479
16530
  import { Image as Image2 } from "@transferwise/components";
16480
- import { useEffect as useEffect15, useState as useState22 } from "react";
16481
- import { jsx as jsx102 } from "react/jsx-runtime";
16531
+ import { useEffect as useEffect16, useState as useState22 } from "react";
16532
+ import { jsx as jsx103 } from "react/jsx-runtime";
16482
16533
  function DynamicImage({ component: image }) {
16483
16534
  const { url, size, text, margin, accessibilityDescription } = image;
16484
16535
  const httpClient = useHttpClient();
16485
16536
  const [imageSource, setImageSource] = useState22("");
16486
- useEffect15(() => {
16537
+ useEffect16(() => {
16487
16538
  void getImageSource2(httpClient, url).then(setImageSource);
16488
16539
  }, [url, httpClient]);
16489
16540
  const imageProps = {
@@ -16495,7 +16546,7 @@ function DynamicImage({ component: image }) {
16495
16546
  if (!imageSource) {
16496
16547
  return null;
16497
16548
  }
16498
- return /* @__PURE__ */ jsx102("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx102(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
16549
+ return /* @__PURE__ */ jsx103("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx103(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
16499
16550
  }
16500
16551
  var readImageBlobAsDataURL2 = (imageBlob) => (
16501
16552
  // we can safely assume the type of reader.result is string
@@ -16532,47 +16583,47 @@ var DynamicImage_default = DynamicImage;
16532
16583
 
16533
16584
  // src/legacy/layout/instructions/DynamicInstructions.tsx
16534
16585
  import { Header as Header10, InstructionsList as InstructionsList2 } from "@transferwise/components";
16535
- import { jsx as jsx103, jsxs as jsxs36 } from "react/jsx-runtime";
16586
+ import { jsx as jsx104, jsxs as jsxs37 } from "react/jsx-runtime";
16536
16587
  var doContext2 = ["positive", "neutral"];
16537
16588
  var dontContext2 = ["warning", "negative"];
16538
16589
  var DynamicInstructions = ({ component }) => {
16539
16590
  const { items } = component;
16540
16591
  const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
16541
16592
  const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
16542
- return /* @__PURE__ */ jsxs36("div", { className: getMargin2(component.margin || "md"), children: [
16543
- component.title ? /* @__PURE__ */ jsx103(Header10, { title: component.title }) : null,
16544
- /* @__PURE__ */ jsx103(InstructionsList2, { dos, donts })
16593
+ return /* @__PURE__ */ jsxs37("div", { className: getMargin2(component.margin || "md"), children: [
16594
+ component.title ? /* @__PURE__ */ jsx104(Header10, { title: component.title }) : null,
16595
+ /* @__PURE__ */ jsx104(InstructionsList2, { dos, donts })
16545
16596
  ] });
16546
16597
  };
16547
16598
  var DynamicInstructions_default = DynamicInstructions;
16548
16599
 
16549
16600
  // src/legacy/layout/DynamicLayout.tsx
16550
- import { Fragment as Fragment19, jsx as jsx104 } from "react/jsx-runtime";
16601
+ import { Fragment as Fragment20, jsx as jsx105 } from "react/jsx-runtime";
16551
16602
  var getKey = (component) => JSON.stringify(component);
16552
16603
  function DynamicLayout(props) {
16553
16604
  const { components, model, submitted, errors, onModelChange, onAction, onPersistAsync, baseUrl } = props;
16554
16605
  const renderComponent = (component) => {
16555
16606
  switch (component.type) {
16556
16607
  case "heading":
16557
- return /* @__PURE__ */ jsx104(DynamicHeading_default, { component }, getKey(component));
16608
+ return /* @__PURE__ */ jsx105(DynamicHeading_default, { component }, getKey(component));
16558
16609
  case "paragraph":
16559
- return /* @__PURE__ */ jsx104(DynamicParagraph_default, { component }, getKey(component));
16610
+ return /* @__PURE__ */ jsx105(DynamicParagraph_default, { component }, getKey(component));
16560
16611
  case "image":
16561
- return /* @__PURE__ */ jsx104(DynamicImage_default, { component }, getKey(component));
16612
+ return /* @__PURE__ */ jsx105(DynamicImage_default, { component }, getKey(component));
16562
16613
  case "alert":
16563
- return /* @__PURE__ */ jsx104(DynamicAlert_default, { component }, getKey(component));
16614
+ return /* @__PURE__ */ jsx105(DynamicAlert_default, { component }, getKey(component));
16564
16615
  case "review":
16565
- return /* @__PURE__ */ jsx104(DynamicReview_default, { component, onAction }, getKey(component));
16616
+ return /* @__PURE__ */ jsx105(DynamicReview_default, { component, onAction }, getKey(component));
16566
16617
  case "divider":
16567
- return /* @__PURE__ */ jsx104(DynamicDivider_default, { component }, getKey(component));
16618
+ return /* @__PURE__ */ jsx105(DynamicDivider_default, { component }, getKey(component));
16568
16619
  case "info":
16569
- return /* @__PURE__ */ jsx104(DynamicInfo, { component }, getKey(component));
16620
+ return /* @__PURE__ */ jsx105(DynamicInfo, { component }, getKey(component));
16570
16621
  case "instructions":
16571
- return /* @__PURE__ */ jsx104(DynamicInstructions_default, { component }, getKey(component));
16622
+ return /* @__PURE__ */ jsx105(DynamicInstructions_default, { component }, getKey(component));
16572
16623
  case "markdown":
16573
- return /* @__PURE__ */ jsx104(DynamicMarkdown, { component }, getKey(component));
16624
+ return /* @__PURE__ */ jsx105(DynamicMarkdown, { component }, getKey(component));
16574
16625
  case "columns":
16575
- return /* @__PURE__ */ jsx104(
16626
+ return /* @__PURE__ */ jsx105(
16576
16627
  DynamicColumns_default,
16577
16628
  {
16578
16629
  component,
@@ -16586,7 +16637,7 @@ function DynamicLayout(props) {
16586
16637
  getKey(component)
16587
16638
  );
16588
16639
  case "form":
16589
- return /* @__PURE__ */ jsx104(
16640
+ return /* @__PURE__ */ jsx105(
16590
16641
  DynamicForm_default,
16591
16642
  {
16592
16643
  component,
@@ -16599,9 +16650,9 @@ function DynamicLayout(props) {
16599
16650
  getKey(__spreadProps(__spreadValues({}, component), { errors: errors != null ? errors : null }))
16600
16651
  );
16601
16652
  case "button":
16602
- return /* @__PURE__ */ jsx104(DynamicButton_default, { component, onAction }, getKey(component));
16653
+ return /* @__PURE__ */ jsx105(DynamicButton_default, { component, onAction }, getKey(component));
16603
16654
  case "box":
16604
- return /* @__PURE__ */ jsx104(
16655
+ return /* @__PURE__ */ jsx105(
16605
16656
  DynamicBox_default,
16606
16657
  {
16607
16658
  component,
@@ -16615,18 +16666,18 @@ function DynamicLayout(props) {
16615
16666
  getKey(component)
16616
16667
  );
16617
16668
  case "decision":
16618
- return /* @__PURE__ */ jsx104(DynamicDecision_default, { component, onAction }, getKey(component));
16669
+ return /* @__PURE__ */ jsx105(DynamicDecision_default, { component, onAction }, getKey(component));
16619
16670
  case "external":
16620
- return /* @__PURE__ */ jsx104(DynamicExternal_default, { component, onAction }, getKey(component));
16671
+ return /* @__PURE__ */ jsx105(DynamicExternal_default, { component, onAction }, getKey(component));
16621
16672
  case "list":
16622
16673
  case "status-list":
16623
- return /* @__PURE__ */ jsx104(DynamicStatusList_default, { component, onAction }, getKey(component));
16674
+ return /* @__PURE__ */ jsx105(DynamicStatusList_default, { component, onAction }, getKey(component));
16624
16675
  case "loading-indicator":
16625
- return /* @__PURE__ */ jsx104(DynamicLoadingIndicator_default, { component }, getKey(component));
16676
+ return /* @__PURE__ */ jsx105(DynamicLoadingIndicator_default, { component }, getKey(component));
16626
16677
  case "search":
16627
- return /* @__PURE__ */ jsx104(DynamicSearch_default, { component, onAction }, getKey(component));
16678
+ return /* @__PURE__ */ jsx105(DynamicSearch_default, { component, onAction }, getKey(component));
16628
16679
  case "modal":
16629
- return /* @__PURE__ */ jsx104(
16680
+ return /* @__PURE__ */ jsx105(
16630
16681
  DynamicModal_default,
16631
16682
  {
16632
16683
  component,
@@ -16640,22 +16691,22 @@ function DynamicLayout(props) {
16640
16691
  getKey(component)
16641
16692
  );
16642
16693
  default:
16643
- return /* @__PURE__ */ jsx104("div", {}, getKey(component));
16694
+ return /* @__PURE__ */ jsx105("div", {}, getKey(component));
16644
16695
  }
16645
16696
  };
16646
16697
  if (useHasHttpClientProvider() || baseUrl == null) {
16647
- return /* @__PURE__ */ jsx104(Fragment19, { children: components.map(renderComponent) });
16698
+ return /* @__PURE__ */ jsx105(Fragment20, { children: components.map(renderComponent) });
16648
16699
  }
16649
- return /* @__PURE__ */ jsx104(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
16700
+ return /* @__PURE__ */ jsx105(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
16650
16701
  }
16651
16702
  var DynamicLayout_default = DynamicLayout;
16652
16703
 
16653
16704
  // src/legacy/layout/list/DynamicStatusList.tsx
16654
16705
  import { Header as Header11, Summary as Summary2 } from "@transferwise/components";
16655
- import { jsx as jsx105, jsxs as jsxs37 } from "react/jsx-runtime";
16706
+ import { jsx as jsx106, jsxs as jsxs38 } from "react/jsx-runtime";
16656
16707
  var DynamicStatusList = ({ component }) => {
16657
- return /* @__PURE__ */ jsxs37("div", { className: getMargin2(component.margin || "md"), children: [
16658
- component.title ? /* @__PURE__ */ jsx105(Header11, { title: component.title }) : null,
16708
+ return /* @__PURE__ */ jsxs38("div", { className: getMargin2(component.margin || "md"), children: [
16709
+ component.title ? /* @__PURE__ */ jsx106(Header11, { title: component.title }) : null,
16659
16710
  component.items.map(mapListItemToSummary)
16660
16711
  ] });
16661
16712
  };
@@ -16664,8 +16715,8 @@ var mapListItemToSummary = ({ title, description, icon, status }) => {
16664
16715
  key: `${title}/${description || ""}`,
16665
16716
  title,
16666
16717
  description
16667
- }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ jsx105(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
16668
- return /* @__PURE__ */ jsx105(Summary2, __spreadValues({}, props));
16718
+ }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ jsx106(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
16719
+ return /* @__PURE__ */ jsx106(Summary2, __spreadValues({}, props));
16669
16720
  };
16670
16721
  var statusListMap = {
16671
16722
  done: "done",
@@ -16682,10 +16733,10 @@ var DynamicStatusList_default = DynamicStatusList;
16682
16733
 
16683
16734
  // src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
16684
16735
  import { Loader as Loader3 } from "@transferwise/components";
16685
- import { jsx as jsx106 } from "react/jsx-runtime";
16736
+ import { jsx as jsx107 } from "react/jsx-runtime";
16686
16737
  var DynamicLoadingIndicator = ({ component }) => {
16687
16738
  const { margin = "md", size = "md" } = component;
16688
- return /* @__PURE__ */ jsx106(
16739
+ return /* @__PURE__ */ jsx107(
16689
16740
  Loader3,
16690
16741
  {
16691
16742
  size,
@@ -16713,12 +16764,12 @@ function noop3() {
16713
16764
  }
16714
16765
 
16715
16766
  // src/legacy/layout/paragraph/DynamicParagraph.tsx
16716
- import { jsx as jsx107, jsxs as jsxs38 } from "react/jsx-runtime";
16767
+ import { jsx as jsx108, jsxs as jsxs39 } from "react/jsx-runtime";
16717
16768
  function DynamicParagraph({ component }) {
16718
- return component.control === "copyable" ? /* @__PURE__ */ jsx107(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ jsx107(BasicDynamicParagraph, { component });
16769
+ return component.control === "copyable" ? /* @__PURE__ */ jsx108(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ jsx108(BasicDynamicParagraph, { component });
16719
16770
  }
16720
16771
  function BasicDynamicParagraph({ component }) {
16721
- return /* @__PURE__ */ jsxs38("p", { className: getTextAlignmentAndMargin2(component), children: [
16772
+ return /* @__PURE__ */ jsxs39("p", { className: getTextAlignmentAndMargin2(component), children: [
16722
16773
  " ",
16723
16774
  component.text,
16724
16775
  " "
@@ -16736,8 +16787,8 @@ function CopyableDynamicParagraph({ component }) {
16736
16787
  align: component.align,
16737
16788
  margin: "sm"
16738
16789
  })} form-control`;
16739
- return /* @__PURE__ */ jsxs38("div", { className: getTextAlignmentAndMargin2(component), children: [
16740
- /* @__PURE__ */ jsx107(
16790
+ return /* @__PURE__ */ jsxs39("div", { className: getTextAlignmentAndMargin2(component), children: [
16791
+ /* @__PURE__ */ jsx108(
16741
16792
  "input",
16742
16793
  {
16743
16794
  type: "text",
@@ -16747,7 +16798,7 @@ function CopyableDynamicParagraph({ component }) {
16747
16798
  style: { textOverflow: "ellipsis" }
16748
16799
  }
16749
16800
  ),
16750
- /* @__PURE__ */ jsx107(Button8, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
16801
+ /* @__PURE__ */ jsx108(Button8, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
16751
16802
  ] });
16752
16803
  }
16753
16804
  function noop4() {
@@ -16756,7 +16807,7 @@ var DynamicParagraph_default = DynamicParagraph;
16756
16807
 
16757
16808
  // src/legacy/layout/review/DynamicReview.tsx
16758
16809
  import { DefinitionList as DefinitionList3, Header as Header12 } from "@transferwise/components";
16759
- import { Fragment as Fragment20, jsx as jsx108, jsxs as jsxs39 } from "react/jsx-runtime";
16810
+ import { Fragment as Fragment21, jsx as jsx109, jsxs as jsxs40 } from "react/jsx-runtime";
16760
16811
  var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
16761
16812
  key: String(index),
16762
16813
  title: label,
@@ -16764,14 +16815,14 @@ var getDefinitions = (orientation, review) => review.fields.map(({ label, value,
16764
16815
  }));
16765
16816
  var getFieldValue2 = (value, help, orientation) => {
16766
16817
  if (help) {
16767
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs39(Fragment20, { children: [
16768
- /* @__PURE__ */ jsx108(Help_default2, { help }),
16818
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs40(Fragment21, { children: [
16819
+ /* @__PURE__ */ jsx109(Help_default2, { help }),
16769
16820
  " ",
16770
16821
  value
16771
- ] }) : /* @__PURE__ */ jsxs39(Fragment20, { children: [
16822
+ ] }) : /* @__PURE__ */ jsxs40(Fragment21, { children: [
16772
16823
  value,
16773
16824
  " ",
16774
- /* @__PURE__ */ jsx108(Help_default2, { help })
16825
+ /* @__PURE__ */ jsx109(Help_default2, { help })
16775
16826
  ] });
16776
16827
  }
16777
16828
  return value;
@@ -16796,9 +16847,9 @@ function DynamicReview(props) {
16796
16847
  const orientation = getReviewLayout(review);
16797
16848
  const callToAction = review.callToAction ? getReviewAction2(review.callToAction.title, review.callToAction.action) : null;
16798
16849
  const legacyCallToAction = !callToAction && review.action ? getReviewAction2(review.action.title || "", review.action) : null;
16799
- return /* @__PURE__ */ jsxs39("div", { className: margin, children: [
16800
- review.title && /* @__PURE__ */ jsx108(Header12, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
16801
- /* @__PURE__ */ jsx108("div", { className: margin, children: /* @__PURE__ */ jsx108(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
16850
+ return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
16851
+ review.title && /* @__PURE__ */ jsx109(Header12, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
16852
+ /* @__PURE__ */ jsx109("div", { className: margin, children: /* @__PURE__ */ jsx109(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
16802
16853
  ] });
16803
16854
  }
16804
16855
  var DynamicReview_default = DynamicReview;
@@ -16809,11 +16860,11 @@ import { Search as Search2 } from "@transferwise/icons";
16809
16860
 
16810
16861
  // src/legacy/layout/search/SearchInput.tsx
16811
16862
  import { Input as Input7 } from "@transferwise/components";
16812
- import { jsx as jsx109, jsxs as jsxs40 } from "react/jsx-runtime";
16863
+ import { jsx as jsx110, jsxs as jsxs41 } from "react/jsx-runtime";
16813
16864
  var SearchInput = ({ title, value, onFocus, onChange }) => {
16814
- return /* @__PURE__ */ jsxs40("label", { className: "control-label d-inline", children: [
16865
+ return /* @__PURE__ */ jsxs41("label", { className: "control-label d-inline", children: [
16815
16866
  title,
16816
- /* @__PURE__ */ jsx109(
16867
+ /* @__PURE__ */ jsx110(
16817
16868
  Input7,
16818
16869
  {
16819
16870
  type: "text",
@@ -16829,12 +16880,12 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
16829
16880
  // src/legacy/layout/search/SearchResults.tsx
16830
16881
  import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
16831
16882
  import { useIntl as useIntl17 } from "react-intl";
16832
- import { jsx as jsx110, jsxs as jsxs41 } from "react/jsx-runtime";
16883
+ import { jsx as jsx111, jsxs as jsxs42 } from "react/jsx-runtime";
16833
16884
  function SearchResults2({ results, emptyMessage, onSelect }) {
16834
16885
  if (results.length === 0) {
16835
- return /* @__PURE__ */ jsx110("p", { className: "m-t-2", children: emptyMessage });
16886
+ return /* @__PURE__ */ jsx111("p", { className: "m-t-2", children: emptyMessage });
16836
16887
  }
16837
- return /* @__PURE__ */ jsx110(NavigationOptionsList4, { children: results.map((result) => /* @__PURE__ */ jsx110(
16888
+ return /* @__PURE__ */ jsx111(NavigationOptionsList4, { children: results.map((result) => /* @__PURE__ */ jsx111(
16838
16889
  NavigationOption7,
16839
16890
  {
16840
16891
  title: result.title,
@@ -16849,10 +16900,10 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
16849
16900
  }
16850
16901
  function ErrorResult2({ onRetrySearch }) {
16851
16902
  const intl = useIntl17();
16852
- return /* @__PURE__ */ jsxs41("p", { className: "m-t-2", children: [
16903
+ return /* @__PURE__ */ jsxs42("p", { className: "m-t-2", children: [
16853
16904
  intl.formatMessage(generic_error_messages_default.genericError),
16854
16905
  "\xA0",
16855
- /* @__PURE__ */ jsx110(
16906
+ /* @__PURE__ */ jsx111(
16856
16907
  "a",
16857
16908
  {
16858
16909
  href: "/",
@@ -16938,7 +16989,7 @@ var addQueryParameter2 = (url, key, value) => {
16938
16989
  // src/legacy/layout/search/DynamicSearch.tsx
16939
16990
  var import_classnames15 = __toESM(require_classnames());
16940
16991
  import { Markdown as Markdown8, Typeahead as Typeahead2 } from "@transferwise/components";
16941
- import { jsx as jsx111, jsxs as jsxs42 } from "react/jsx-runtime";
16992
+ import { jsx as jsx112, jsxs as jsxs43 } from "react/jsx-runtime";
16942
16993
  var DEBOUNCE_TIME2 = 400;
16943
16994
  function DynamicSearch({ component, onAction }) {
16944
16995
  const [query, setQuery] = useState24("");
@@ -16974,16 +17025,16 @@ function DynamicSearch({ component, onAction }) {
16974
17025
  void search(query);
16975
17026
  };
16976
17027
  if (control === "inline") {
16977
- return /* @__PURE__ */ jsx111("div", { className: (0, import_classnames15.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ jsxs42("label", { className: "control-label d-inline", children: [
17028
+ return /* @__PURE__ */ jsx112("div", { className: (0, import_classnames15.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ jsxs43("label", { className: "control-label d-inline", children: [
16978
17029
  title,
16979
- /* @__PURE__ */ jsx111("div", { className: "m-t-1", children: /* @__PURE__ */ jsx111(
17030
+ /* @__PURE__ */ jsx112("div", { className: "m-t-1", children: /* @__PURE__ */ jsx112(
16980
17031
  Typeahead2,
16981
17032
  {
16982
17033
  id: "typeahead-input-id",
16983
17034
  name: "typeahead-input-name",
16984
17035
  size: "md",
16985
17036
  maxHeight: 100,
16986
- footer: /* @__PURE__ */ jsx111(
17037
+ footer: /* @__PURE__ */ jsx112(
16987
17038
  TypeaheadFooter2,
16988
17039
  {
16989
17040
  state: status,
@@ -16994,7 +17045,7 @@ function DynamicSearch({ component, onAction }) {
16994
17045
  ),
16995
17046
  multiple: false,
16996
17047
  clearable: false,
16997
- addon: /* @__PURE__ */ jsx111(Search2, { size: 24 }),
17048
+ addon: /* @__PURE__ */ jsx112(Search2, { size: 24 }),
16998
17049
  options: results.map(mapResultToTypeaheadOption2),
16999
17050
  onChange: (values) => {
17000
17051
  if (values.length > 0) {
@@ -17009,11 +17060,11 @@ function DynamicSearch({ component, onAction }) {
17009
17060
  ) })
17010
17061
  ] }) });
17011
17062
  }
17012
- return /* @__PURE__ */ jsxs42("div", { className: getMargin2(margin != null ? margin : "md"), children: [
17013
- /* @__PURE__ */ jsx111(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
17014
- status === "loading" && /* @__PURE__ */ jsx111(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
17015
- status === "error" && /* @__PURE__ */ jsx111(ErrorResult2, { onRetrySearch }),
17016
- status === "success" && /* @__PURE__ */ jsx111(SearchResults2, { results, emptyMessage, onSelect: onResultSelected })
17063
+ return /* @__PURE__ */ jsxs43("div", { className: getMargin2(margin != null ? margin : "md"), children: [
17064
+ /* @__PURE__ */ jsx112(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
17065
+ status === "loading" && /* @__PURE__ */ jsx112(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
17066
+ status === "error" && /* @__PURE__ */ jsx112(ErrorResult2, { onRetrySearch }),
17067
+ status === "success" && /* @__PURE__ */ jsx112(SearchResults2, { results, emptyMessage, onSelect: onResultSelected })
17017
17068
  ] });
17018
17069
  }
17019
17070
  function mapResultToTypeaheadOption2(result) {
@@ -17032,13 +17083,13 @@ function TypeaheadFooter2({
17032
17083
  emptyMessage
17033
17084
  }) {
17034
17085
  if (state === "success" && results.length === 0) {
17035
- return /* @__PURE__ */ jsx111(Markdown8, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
17086
+ return /* @__PURE__ */ jsx112(Markdown8, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
17036
17087
  }
17037
17088
  if (state === "error" && results.length === 0) {
17038
- return /* @__PURE__ */ jsx111("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx111(ErrorResult2, { onRetrySearch }) });
17089
+ return /* @__PURE__ */ jsx112("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx112(ErrorResult2, { onRetrySearch }) });
17039
17090
  }
17040
17091
  if (state === "loading" || results.length === 0) {
17041
- return /* @__PURE__ */ jsx111("p", { className: "m-t-2 m-x-2", children: "Loading..." });
17092
+ return /* @__PURE__ */ jsx112("p", { className: "m-t-2 m-x-2", children: "Loading..." });
17042
17093
  }
17043
17094
  return null;
17044
17095
  }
@@ -17047,20 +17098,20 @@ var DynamicSearch_default = DynamicSearch;
17047
17098
  // src/legacy/layout/modal/DynamicModal.tsx
17048
17099
  import { Button as Button9, Modal as Modal4 } from "@transferwise/components";
17049
17100
  import { useState as useState25 } from "react";
17050
- import { jsx as jsx112, jsxs as jsxs43 } from "react/jsx-runtime";
17101
+ import { jsx as jsx113, jsxs as jsxs44 } from "react/jsx-runtime";
17051
17102
  function DynamicModal(props) {
17052
17103
  const [visible, isVisible] = useState25(false);
17053
17104
  const { component, onAction } = props;
17054
17105
  const { margin = "md" } = component;
17055
- return /* @__PURE__ */ jsxs43("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
17056
- /* @__PURE__ */ jsx112(Button9, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
17057
- /* @__PURE__ */ jsx112(
17106
+ return /* @__PURE__ */ jsxs44("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
17107
+ /* @__PURE__ */ jsx113(Button9, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
17108
+ /* @__PURE__ */ jsx113(
17058
17109
  Modal4,
17059
17110
  {
17060
17111
  scroll: "content",
17061
17112
  open: visible,
17062
17113
  size: "lg",
17063
- body: /* @__PURE__ */ jsx112(
17114
+ body: /* @__PURE__ */ jsx113(
17064
17115
  DynamicLayout_default,
17065
17116
  __spreadProps(__spreadValues({}, props), {
17066
17117
  components: component.content.components,
@@ -17078,7 +17129,7 @@ function DynamicModal(props) {
17078
17129
  var DynamicModal_default = DynamicModal;
17079
17130
 
17080
17131
  // src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
17081
- import { Fragment as Fragment21, jsx as jsx113, jsxs as jsxs44 } from "react/jsx-runtime";
17132
+ import { Fragment as Fragment22, jsx as jsx114, jsxs as jsxs45 } from "react/jsx-runtime";
17082
17133
  var isNullish3 = (value) => isNull3(value) || isUndefined3(value);
17083
17134
  var getDefaultValue = (schema) => {
17084
17135
  return schema.type === "boolean" && isNullish3(schema.default) ? false : schema.default;
@@ -17137,9 +17188,9 @@ var BasicTypeSchema = (props) => {
17137
17188
  };
17138
17189
  const isConst = props.schema.const;
17139
17190
  const isHidden = props.schema.hidden || isConst;
17140
- useEffect16(refreshValidations, [props.model, props.submitted]);
17141
- useEffect16(onSchemaChange, [props.schema]);
17142
- useEffect16(() => {
17191
+ useEffect17(refreshValidations, [props.model, props.submitted]);
17192
+ useEffect17(onSchemaChange, [props.schema]);
17193
+ useEffect17(() => {
17143
17194
  var _a2;
17144
17195
  const newModel = (_a2 = props.model) != null ? _a2 : null;
17145
17196
  if (newModel !== model) {
@@ -17154,15 +17205,15 @@ var BasicTypeSchema = (props) => {
17154
17205
  const showLabel = props.schema.format !== "file" && props.schema.type !== "boolean";
17155
17206
  const schemaHelp = props.schema.help;
17156
17207
  const feedbackId = `${id}-feedback`;
17157
- return !isHidden ? /* @__PURE__ */ jsxs44(Fragment21, { children: [
17158
- props.schema.alert && /* @__PURE__ */ jsx113(DynamicAlert_default, { component: props.schema.alert }),
17159
- /* @__PURE__ */ jsxs44("div", { className: (0, import_classnames16.default)(formGroupClasses), children: [
17160
- showLabel && /* @__PURE__ */ jsxs44("div", { className: "d-inline-block m-b-1", children: [
17161
- /* @__PURE__ */ jsx113("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
17162
- !!schemaHelp && /* @__PURE__ */ jsx113(Help_default2, { help: schemaHelp })
17208
+ return !isHidden ? /* @__PURE__ */ jsxs45(Fragment22, { children: [
17209
+ props.schema.alert && /* @__PURE__ */ jsx114(DynamicAlert_default, { component: props.schema.alert }),
17210
+ /* @__PURE__ */ jsxs45("div", { className: (0, import_classnames16.default)(formGroupClasses), children: [
17211
+ showLabel && /* @__PURE__ */ jsxs45("div", { className: "d-inline-block m-b-1", children: [
17212
+ /* @__PURE__ */ jsx114("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
17213
+ !!schemaHelp && /* @__PURE__ */ jsx114(Help_default2, { help: schemaHelp })
17163
17214
  ] }),
17164
- !showLabel && !!schemaHelp && /* @__PURE__ */ jsx113(Help_default2, { help: schemaHelp }),
17165
- /* @__PURE__ */ jsx113(
17215
+ !showLabel && !!schemaHelp && /* @__PURE__ */ jsx114(Help_default2, { help: schemaHelp }),
17216
+ /* @__PURE__ */ jsx114(
17166
17217
  SchemaFormControl_default,
17167
17218
  {
17168
17219
  id,
@@ -17175,7 +17226,7 @@ var BasicTypeSchema = (props) => {
17175
17226
  describedBy: feedbackId
17176
17227
  }
17177
17228
  ),
17178
- /* @__PURE__ */ jsx113(
17229
+ /* @__PURE__ */ jsx114(
17179
17230
  ControlFeedback_default,
17180
17231
  {
17181
17232
  id: feedbackId,
@@ -17200,7 +17251,7 @@ BasicTypeSchema.defaultProps = {
17200
17251
  var BasicTypeSchema_default = BasicTypeSchema;
17201
17252
 
17202
17253
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
17203
- import { jsx as jsx114 } from "react/jsx-runtime";
17254
+ import { jsx as jsx115 } from "react/jsx-runtime";
17204
17255
  var getIdFromResponse = (idProperty, response) => response[idProperty];
17205
17256
  var getErrorFromResponse = (errorProperty, response) => {
17206
17257
  var _a;
@@ -17223,7 +17274,7 @@ function PersistAsyncBasicSchema(props) {
17223
17274
  const [persistAsyncError, setPersistAsyncError] = useState27(null);
17224
17275
  const [fieldSubmitted, setFieldSubmitted] = useState27(false);
17225
17276
  const [abortController, setAbortController] = useState27(null);
17226
- useEffect17(() => {
17277
+ useEffect18(() => {
17227
17278
  if (controlTypesWithPersistOnChange.has(
17228
17279
  // TODO: LOW avoid type assertion below -- control type may be nullish. consider ?? ''
17229
17280
  getControlType(schema.persistAsync.schema)
@@ -17290,7 +17341,7 @@ function PersistAsyncBasicSchema(props) {
17290
17341
  setPersistAsyncModel(newPersistAsyncModel);
17291
17342
  }
17292
17343
  };
17293
- return /* @__PURE__ */ jsx114(
17344
+ return /* @__PURE__ */ jsx115(
17294
17345
  BasicTypeSchema_default,
17295
17346
  {
17296
17347
  required,
@@ -17390,7 +17441,7 @@ function hasStringMessage(value) {
17390
17441
  }
17391
17442
 
17392
17443
  // src/legacy/common/hooks/usePolling/usePolling.tsx
17393
- import { useEffect as useEffect18, useMemo as useMemo18, useRef as useRef5 } from "react";
17444
+ import { useEffect as useEffect19, useMemo as useMemo18, useRef as useRef5 } from "react";
17394
17445
  function usePolling({
17395
17446
  asyncFn,
17396
17447
  interval,
@@ -17411,7 +17462,7 @@ function usePolling({
17411
17462
  ),
17412
17463
  [asyncFn, maxAttempts, maxConsecutiveFails]
17413
17464
  );
17414
- useEffect18(() => {
17465
+ useEffect19(() => {
17415
17466
  if (interval > 0) {
17416
17467
  const intervalReference = setInterval(() => {
17417
17468
  poll();
@@ -17419,7 +17470,7 @@ function usePolling({
17419
17470
  return () => clearInterval(intervalReference);
17420
17471
  }
17421
17472
  }, [poll, interval]);
17422
- useEffect18(() => {
17473
+ useEffect19(() => {
17423
17474
  onPollingResponseReference.current = onPollingResponse;
17424
17475
  onFailureReference.current = onFailure;
17425
17476
  }, [onPollingResponse, onFailure]);
@@ -17450,10 +17501,10 @@ function createPollingClosure(asyncFn, maxAttempts, maxConsecutiveFails, onPolli
17450
17501
  }
17451
17502
 
17452
17503
  // src/legacy/common/hooks/usePrevious/usePrevious.js
17453
- import { useEffect as useEffect19, useRef as useRef6 } from "react";
17504
+ import { useEffect as useEffect20, useRef as useRef6 } from "react";
17454
17505
  var usePrevious = (value) => {
17455
17506
  const reference = useRef6();
17456
- useEffect19(() => {
17507
+ useEffect20(() => {
17457
17508
  reference.current = value;
17458
17509
  }, [value]);
17459
17510
  return reference.current;
@@ -17501,7 +17552,7 @@ function useStepPolling(polling, onAction) {
17501
17552
  }
17502
17553
 
17503
17554
  // src/legacy/step/layoutStep/LayoutStep.tsx
17504
- import { jsx as jsx115 } from "react/jsx-runtime";
17555
+ import { jsx as jsx116 } from "react/jsx-runtime";
17505
17556
  var getComponents = (step, options) => {
17506
17557
  var _a;
17507
17558
  if (isEmpty(step)) {
@@ -17524,7 +17575,7 @@ var LayoutStep = (props) => {
17524
17575
  onEvent("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
17525
17576
  };
17526
17577
  useStepPolling(stepSpecification.polling, onAction);
17527
- return /* @__PURE__ */ jsx115(
17578
+ return /* @__PURE__ */ jsx116(
17528
17579
  DynamicLayout_default,
17529
17580
  {
17530
17581
  components,
@@ -17540,10 +17591,10 @@ var LayoutStep = (props) => {
17540
17591
  var LayoutStep_default = LayoutStep;
17541
17592
 
17542
17593
  // src/legacy/step/cameraStep/CameraStep.tsx
17543
- import { useEffect as useEffect24, useState as useState31 } from "react";
17594
+ import { useEffect as useEffect25, useState as useState31 } from "react";
17544
17595
 
17545
17596
  // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
17546
- import { useCallback as useCallback10, useEffect as useEffect23, useMemo as useMemo20, useRef as useRef8, useState as useState30 } from "react";
17597
+ import { useCallback as useCallback10, useEffect as useEffect24, useMemo as useMemo20, useRef as useRef8, useState as useState30 } from "react";
17547
17598
  import { useIntl as useIntl22 } from "react-intl";
17548
17599
  import Webcam from "react-webcam";
17549
17600
 
@@ -17610,15 +17661,15 @@ var CameraCapture_messages_default = defineMessages13({
17610
17661
  // src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
17611
17662
  import { Button as Button10, ControlType, Priority, Size as Size3 } from "@transferwise/components";
17612
17663
  import { useIntl as useIntl20 } from "react-intl";
17613
- import { jsx as jsx116, jsxs as jsxs45 } from "react/jsx-runtime";
17614
- var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx116("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx116(CaptureButton, { onClick: onCapture }) });
17664
+ import { jsx as jsx117, jsxs as jsxs46 } from "react/jsx-runtime";
17665
+ var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx117("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx117(CaptureButton, { onClick: onCapture }) });
17615
17666
  var ReviewBottomBar = ({
17616
17667
  onSubmit,
17617
17668
  onRetry
17618
17669
  }) => {
17619
17670
  const intl = useIntl20();
17620
- return /* @__PURE__ */ jsx116("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx116("div", { className: "row", children: /* @__PURE__ */ jsxs45("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
17621
- /* @__PURE__ */ jsx116(
17671
+ return /* @__PURE__ */ jsx117("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx117("div", { className: "row", children: /* @__PURE__ */ jsxs46("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
17672
+ /* @__PURE__ */ jsx117(
17622
17673
  Button10,
17623
17674
  {
17624
17675
  className: "m-b-1",
@@ -17629,7 +17680,7 @@ var ReviewBottomBar = ({
17629
17680
  children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
17630
17681
  }
17631
17682
  ),
17632
- /* @__PURE__ */ jsx116(
17683
+ /* @__PURE__ */ jsx117(
17633
17684
  Button10,
17634
17685
  {
17635
17686
  className: "m-b-2",
@@ -17643,14 +17694,14 @@ var ReviewBottomBar = ({
17643
17694
  )
17644
17695
  ] }) }) });
17645
17696
  };
17646
- var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx116(
17697
+ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx117(
17647
17698
  "button",
17648
17699
  {
17649
17700
  type: "button",
17650
17701
  className: "camera-capture-btn m-b-2",
17651
17702
  "data-testid": "camera-capture-button",
17652
17703
  onClick,
17653
- children: /* @__PURE__ */ jsx116("span", { className: "camera-capture-btn-inner" })
17704
+ children: /* @__PURE__ */ jsx117("span", { className: "camera-capture-btn-inner" })
17654
17705
  }
17655
17706
  );
17656
17707
 
@@ -17668,11 +17719,11 @@ var OrientationLockOverlay_messages_default = defineMessages14({
17668
17719
  });
17669
17720
 
17670
17721
  // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
17671
- import { jsx as jsx117, jsxs as jsxs46 } from "react/jsx-runtime";
17722
+ import { jsx as jsx118, jsxs as jsxs47 } from "react/jsx-runtime";
17672
17723
  function OrientationLockOverlay() {
17673
17724
  const intl = useIntl21();
17674
- return /* @__PURE__ */ jsxs46("div", { className: "orientation-lock-overlay", children: [
17675
- /* @__PURE__ */ jsx117(
17725
+ return /* @__PURE__ */ jsxs47("div", { className: "orientation-lock-overlay", children: [
17726
+ /* @__PURE__ */ jsx118(
17676
17727
  "img",
17677
17728
  {
17678
17729
  className: "m-b-3",
@@ -17682,26 +17733,26 @@ function OrientationLockOverlay() {
17682
17733
  alt: ""
17683
17734
  }
17684
17735
  ),
17685
- /* @__PURE__ */ jsx117("p", { className: "text-center m-b-0", children: intl.formatMessage(OrientationLockOverlay_messages_default.text) })
17736
+ /* @__PURE__ */ jsx118("p", { className: "text-center m-b-0", children: intl.formatMessage(OrientationLockOverlay_messages_default.text) })
17686
17737
  ] });
17687
17738
  }
17688
17739
  var OrientationLockOverlay_default = OrientationLockOverlay;
17689
17740
 
17690
17741
  // src/legacy/step/cameraStep/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
17691
17742
  import { Button as Button11 } from "@transferwise/components";
17692
- import { jsx as jsx118, jsxs as jsxs47 } from "react/jsx-runtime";
17743
+ import { jsx as jsx119, jsxs as jsxs48 } from "react/jsx-runtime";
17693
17744
  function CameraErrorScreen({ title, description, actionButton, onAction }) {
17694
- return /* @__PURE__ */ jsx118("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx118("div", { className: "row", children: /* @__PURE__ */ jsxs47("div", { className: "col-md-6 col-md-offset-3", children: [
17695
- /* @__PURE__ */ jsx118("h2", { className: "text-xs-center m-b-3", children: title }),
17696
- /* @__PURE__ */ jsx118("p", { className: "text-xs-center m-b-5", children: description }),
17697
- onAction && actionButton && /* @__PURE__ */ jsx118(Button11, { block: true, onClick: onAction, children: actionButton })
17745
+ return /* @__PURE__ */ jsx119("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx119("div", { className: "row", children: /* @__PURE__ */ jsxs48("div", { className: "col-md-6 col-md-offset-3", children: [
17746
+ /* @__PURE__ */ jsx119("h2", { className: "text-xs-center m-b-3", children: title }),
17747
+ /* @__PURE__ */ jsx119("p", { className: "text-xs-center m-b-5", children: description }),
17748
+ onAction && actionButton && /* @__PURE__ */ jsx119(Button11, { block: true, onClick: onAction, children: actionButton })
17698
17749
  ] }) }) });
17699
17750
  }
17700
17751
  var CameraErrorScreen_default = CameraErrorScreen;
17701
17752
 
17702
17753
  // src/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.ts
17703
17754
  var import_screenfull = __toESM(require_screenfull());
17704
- import { useCallback as useCallback9, useEffect as useEffect20 } from "react";
17755
+ import { useCallback as useCallback9, useEffect as useEffect21 } from "react";
17705
17756
 
17706
17757
  // src/legacy/step/cameraStep/cameraCapture/utils/index.ts
17707
17758
  var isSelfieCamera = (stream) => {
@@ -17814,7 +17865,7 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
17814
17865
  },
17815
17866
  [onEvent]
17816
17867
  );
17817
- useEffect20(() => {
17868
+ useEffect21(() => {
17818
17869
  var _a, _b;
17819
17870
  if (shouldLockOrientation) {
17820
17871
  (_b = (_a = window.screen) == null ? void 0 : _a.orientation) == null ? void 0 : _b.addEventListener(
@@ -17837,7 +17888,7 @@ var noop5 = () => {
17837
17888
  };
17838
17889
 
17839
17890
  // src/legacy/step/cameraStep/cameraCapture/hooks/useVideoConstraints.ts
17840
- import { useEffect as useEffect21, useState as useState29 } from "react";
17891
+ import { useEffect as useEffect22, useState as useState29 } from "react";
17841
17892
  var useVideoConstraints = (direction) => {
17842
17893
  const [videoConstraints, setVideoConstraints] = useState29();
17843
17894
  const defaultVideoConstraints = {
@@ -17847,7 +17898,7 @@ var useVideoConstraints = (direction) => {
17847
17898
  frameRate: 30,
17848
17899
  aspectRatio: 16 / 9
17849
17900
  };
17850
- useEffect21(() => {
17901
+ useEffect22(() => {
17851
17902
  void getVideoConstraints(direction).then(setVideoConstraints);
17852
17903
  }, [direction]);
17853
17904
  const getVideoConstraints = async (direction2) => {
@@ -17865,8 +17916,8 @@ var useVideoConstraints = (direction) => {
17865
17916
  };
17866
17917
 
17867
17918
  // src/legacy/step/cameraStep/cameraCapture/overlay/Overlay.tsx
17868
- import { useEffect as useEffect22, useRef as useRef7 } from "react";
17869
- import { Fragment as Fragment22, jsx as jsx119, jsxs as jsxs48 } from "react/jsx-runtime";
17919
+ import { useEffect as useEffect23, useRef as useRef7 } from "react";
17920
+ import { Fragment as Fragment23, jsx as jsx120, jsxs as jsxs49 } from "react/jsx-runtime";
17870
17921
  var captureButtonHeight = 92;
17871
17922
  var reviewButtonsHeight = 120;
17872
17923
  var imageHeight = 40;
@@ -17876,7 +17927,7 @@ var reviewInstructionsHeight = 40;
17876
17927
  var overlayMaxWidth = 800;
17877
17928
  function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstructions }) {
17878
17929
  const svgReference = useRef7(null);
17879
- useEffect22(() => {
17930
+ useEffect23(() => {
17880
17931
  const listener = debounce2(() => {
17881
17932
  var _a;
17882
17933
  if ((_a = svgReference.current) == null ? void 0 : _a.innerHTML) {
@@ -17888,18 +17939,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
17888
17939
  return () => window.removeEventListener("resize", listener);
17889
17940
  });
17890
17941
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
17891
- let helperBox = /* @__PURE__ */ jsxs48(Fragment22, { children: [
17892
- imageUrl && /* @__PURE__ */ jsx119("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
17893
- title && /* @__PURE__ */ jsx119("h4", { className: "camera-capture-title", children: title }),
17894
- instructions && /* @__PURE__ */ jsx119("small", { className: "camera-capture-instructions", children: instructions })
17942
+ let helperBox = /* @__PURE__ */ jsxs49(Fragment23, { children: [
17943
+ imageUrl && /* @__PURE__ */ jsx120("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
17944
+ title && /* @__PURE__ */ jsx120("h4", { className: "camera-capture-title", children: title }),
17945
+ instructions && /* @__PURE__ */ jsx120("small", { className: "camera-capture-instructions", children: instructions })
17895
17946
  ] });
17896
17947
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
17897
17948
  if (reviewInstructions) {
17898
17949
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
17899
- helperBox = /* @__PURE__ */ jsx119("small", { className: "camera-capture-instructions", children: reviewInstructions });
17950
+ helperBox = /* @__PURE__ */ jsx120("small", { className: "camera-capture-instructions", children: reviewInstructions });
17900
17951
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
17901
17952
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
17902
- helperBox = /* @__PURE__ */ jsx119(Fragment22, {});
17953
+ helperBox = /* @__PURE__ */ jsx120(Fragment23, {});
17903
17954
  }
17904
17955
  }
17905
17956
  const framePosition = {
@@ -17917,20 +17968,20 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
17917
17968
  width: "90%"
17918
17969
  }
17919
17970
  };
17920
- return /* @__PURE__ */ jsxs48("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
17921
- /* @__PURE__ */ jsx119("defs", { children: /* @__PURE__ */ jsxs48("mask", { id: "mask", children: [
17922
- /* @__PURE__ */ jsx119("rect", { width: "100%", height: "100%", fill: "#fff" }),
17923
- /* @__PURE__ */ jsx119("image", __spreadValues({ href: overlay }, framePosition))
17971
+ return /* @__PURE__ */ jsxs49("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
17972
+ /* @__PURE__ */ jsx120("defs", { children: /* @__PURE__ */ jsxs49("mask", { id: "mask", children: [
17973
+ /* @__PURE__ */ jsx120("rect", { width: "100%", height: "100%", fill: "#fff" }),
17974
+ /* @__PURE__ */ jsx120("image", __spreadValues({ href: overlay }, framePosition))
17924
17975
  ] }) }),
17925
- overlay && /* @__PURE__ */ jsx119("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
17926
- outline && /* @__PURE__ */ jsx119("image", __spreadValues({ href: outline }, framePosition)),
17927
- /* @__PURE__ */ jsx119("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ jsx119("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
17976
+ overlay && /* @__PURE__ */ jsx120("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
17977
+ outline && /* @__PURE__ */ jsx120("image", __spreadValues({ href: outline }, framePosition)),
17978
+ /* @__PURE__ */ jsx120("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ jsx120("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
17928
17979
  ] });
17929
17980
  }
17930
17981
  var Overlay_default = Overlay;
17931
17982
 
17932
17983
  // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
17933
- import { jsx as jsx120, jsxs as jsxs49 } from "react/jsx-runtime";
17984
+ import { jsx as jsx121, jsxs as jsxs50 } from "react/jsx-runtime";
17934
17985
  function CameraCapture({
17935
17986
  direction = "back",
17936
17987
  overlay = "",
@@ -18033,13 +18084,13 @@ function CameraCapture({
18033
18084
  setReviewImage(void 0);
18034
18085
  };
18035
18086
  const handleRetryCameraAccess = () => setMode("CAPTURE" /* CAPTURE */);
18036
- useEffect23(() => {
18087
+ useEffect24(() => {
18037
18088
  if (mode !== "CAPTURE" /* CAPTURE */) {
18038
18089
  exitFullScreen();
18039
18090
  }
18040
18091
  }, [mode, exitFullScreen]);
18041
- const captureScreen = /* @__PURE__ */ jsxs49("div", { className: "camera-capture", children: [
18042
- videoConstraints && /* @__PURE__ */ jsx120(
18092
+ const captureScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
18093
+ videoConstraints && /* @__PURE__ */ jsx121(
18043
18094
  Webcam,
18044
18095
  {
18045
18096
  ref: webcamReference,
@@ -18050,7 +18101,7 @@ function CameraCapture({
18050
18101
  onUserMedia: handleUserMedia
18051
18102
  }
18052
18103
  ),
18053
- /* @__PURE__ */ jsx120(
18104
+ /* @__PURE__ */ jsx121(
18054
18105
  Overlay_default,
18055
18106
  {
18056
18107
  overlay,
@@ -18060,8 +18111,8 @@ function CameraCapture({
18060
18111
  instructions
18061
18112
  }
18062
18113
  ),
18063
- shouldLockOrientation && /* @__PURE__ */ jsx120(OrientationLockOverlay_default, {}),
18064
- ready && /* @__PURE__ */ jsx120(
18114
+ shouldLockOrientation && /* @__PURE__ */ jsx121(OrientationLockOverlay_default, {}),
18115
+ ready && /* @__PURE__ */ jsx121(
18065
18116
  CaptureBottomBar,
18066
18117
  {
18067
18118
  onCapture: () => {
@@ -18070,9 +18121,9 @@ function CameraCapture({
18070
18121
  }
18071
18122
  )
18072
18123
  ] });
18073
- const reviewScreen = /* @__PURE__ */ jsxs49("div", { className: "camera-capture", children: [
18074
- /* @__PURE__ */ jsx120("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
18075
- /* @__PURE__ */ jsx120(
18124
+ const reviewScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
18125
+ /* @__PURE__ */ jsx121("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
18126
+ /* @__PURE__ */ jsx121(
18076
18127
  Overlay_default,
18077
18128
  {
18078
18129
  overlay,
@@ -18082,18 +18133,18 @@ function CameraCapture({
18082
18133
  reviewInstructions: intl.formatMessage(CameraCapture_messages_default.reviewInstructions)
18083
18134
  }
18084
18135
  ),
18085
- /* @__PURE__ */ jsx120(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
18136
+ /* @__PURE__ */ jsx121(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
18086
18137
  ] });
18087
- return /* @__PURE__ */ jsxs49("section", { children: [
18138
+ return /* @__PURE__ */ jsxs50("section", { children: [
18088
18139
  mode === "CAPTURE" /* CAPTURE */ && captureScreen,
18089
18140
  mode === "REVIEW" /* REVIEW */ && reviewScreen,
18090
- mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ jsx120(CameraErrorScreen_default, __spreadValues({}, cameraError))
18141
+ mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ jsx121(CameraErrorScreen_default, __spreadValues({}, cameraError))
18091
18142
  ] });
18092
18143
  }
18093
18144
  var CameraCapture_default = CameraCapture;
18094
18145
 
18095
18146
  // src/legacy/step/cameraStep/CameraStep.tsx
18096
- import { jsx as jsx121 } from "react/jsx-runtime";
18147
+ import { jsx as jsx122 } from "react/jsx-runtime";
18097
18148
  function blobToBase64(blob) {
18098
18149
  return new Promise((resolve, _) => {
18099
18150
  const reader = new FileReader();
@@ -18112,7 +18163,7 @@ function CameraStep(props) {
18112
18163
  const { overlay, outline } = assets || {};
18113
18164
  const { url: imageUrl } = image || {};
18114
18165
  const [captureClicked, setCaptureClicked] = useState31(false);
18115
- useEffect24(() => {
18166
+ useEffect25(() => {
18116
18167
  if (captureClicked) {
18117
18168
  onAction(action);
18118
18169
  }
@@ -18131,7 +18182,7 @@ function CameraStep(props) {
18131
18182
  });
18132
18183
  }
18133
18184
  };
18134
- return /* @__PURE__ */ jsx121(
18185
+ return /* @__PURE__ */ jsx122(
18135
18186
  CameraCapture_default,
18136
18187
  {
18137
18188
  overlay,
@@ -18181,12 +18232,12 @@ function getFirstAction(step) {
18181
18232
 
18182
18233
  // src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
18183
18234
  import { useIntl as useIntl23 } from "react-intl";
18184
- import { jsx as jsx122 } from "react/jsx-runtime";
18235
+ import { jsx as jsx123 } from "react/jsx-runtime";
18185
18236
  var noop6 = () => {
18186
18237
  };
18187
18238
  function ExternalConfirmationStep({ url, onClose }) {
18188
18239
  const { formatMessage } = useIntl23();
18189
- return /* @__PURE__ */ jsx122(
18240
+ return /* @__PURE__ */ jsx123(
18190
18241
  DynamicLayout_default,
18191
18242
  {
18192
18243
  components: [
@@ -18253,9 +18304,9 @@ function getOrigin2(url) {
18253
18304
  // src/legacy/dynamicFlow/BackButton.tsx
18254
18305
  import { Avatar as Avatar7 } from "@transferwise/components";
18255
18306
  import { ArrowLeft as ArrowLeft2 } from "@transferwise/icons";
18256
- import { jsx as jsx123, jsxs as jsxs50 } from "react/jsx-runtime";
18307
+ import { jsx as jsx124, jsxs as jsxs51 } from "react/jsx-runtime";
18257
18308
  function BackButton2({ title, action, onAction }) {
18258
- return /* @__PURE__ */ jsxs50(
18309
+ return /* @__PURE__ */ jsxs51(
18259
18310
  "a",
18260
18311
  {
18261
18312
  href: "/",
@@ -18266,8 +18317,8 @@ function BackButton2({ title, action, onAction }) {
18266
18317
  onAction(__spreadProps(__spreadValues({}, action), { skipValidation: true }));
18267
18318
  },
18268
18319
  children: [
18269
- /* @__PURE__ */ jsx123("span", { className: "sr-only", children: title }),
18270
- /* @__PURE__ */ jsx123(Avatar7, { type: "icon", children: /* @__PURE__ */ jsx123(ArrowLeft2, { size: "24" }) })
18320
+ /* @__PURE__ */ jsx124("span", { className: "sr-only", children: title }),
18321
+ /* @__PURE__ */ jsx124(Avatar7, { type: "icon", children: /* @__PURE__ */ jsx124(ArrowLeft2, { size: "24" }) })
18271
18322
  ]
18272
18323
  }
18273
18324
  );
@@ -18275,7 +18326,7 @@ function BackButton2({ title, action, onAction }) {
18275
18326
  var BackButton_default2 = BackButton2;
18276
18327
 
18277
18328
  // src/legacy/dynamicFlow/DynamicFlowStep.tsx
18278
- import { Fragment as Fragment23, jsx as jsx124, jsxs as jsxs51 } from "react/jsx-runtime";
18329
+ import { Fragment as Fragment24, jsx as jsx125, jsxs as jsxs52 } from "react/jsx-runtime";
18279
18330
  function DynamicFlowStep(props) {
18280
18331
  var _a, _b, _c;
18281
18332
  const { step, globalError, onAction } = props;
@@ -18284,20 +18335,20 @@ function DynamicFlowStep(props) {
18284
18335
  const { requiresManualTrigger, dismissConfirmation } = useExternal2(externalUrl);
18285
18336
  if (step === void 0) {
18286
18337
  if (globalError) {
18287
- return /* @__PURE__ */ jsx124(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } });
18338
+ return /* @__PURE__ */ jsx125(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } });
18288
18339
  }
18289
18340
  return null;
18290
18341
  }
18291
18342
  if (externalUrl && requiresManualTrigger) {
18292
- return /* @__PURE__ */ jsx124(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
18343
+ return /* @__PURE__ */ jsx125(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
18293
18344
  }
18294
18345
  if (isCameraStep(step)) {
18295
- return /* @__PURE__ */ jsx124(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
18346
+ return /* @__PURE__ */ jsx125(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
18296
18347
  }
18297
- return /* @__PURE__ */ jsxs51(Fragment23, { children: [
18298
- backButton && /* @__PURE__ */ jsx124(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
18299
- globalError ? /* @__PURE__ */ jsx124(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
18300
- /* @__PURE__ */ jsx124(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
18348
+ return /* @__PURE__ */ jsxs52(Fragment24, { children: [
18349
+ backButton && /* @__PURE__ */ jsx125(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
18350
+ globalError ? /* @__PURE__ */ jsx125(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
18351
+ /* @__PURE__ */ jsx125(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
18301
18352
  ] });
18302
18353
  }
18303
18354
 
@@ -18446,7 +18497,7 @@ var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object"
18446
18497
  // src/legacy/dynamicFlow/utils/useLoader.tsx
18447
18498
  import { Loader as Loader4, Size as Size4 } from "@transferwise/components";
18448
18499
  import { useState as useState33 } from "react";
18449
- import { jsx as jsx125 } from "react/jsx-runtime";
18500
+ import { jsx as jsx126 } from "react/jsx-runtime";
18450
18501
  function useLoader(loaderConfig, initialState) {
18451
18502
  const config = __spreadValues({
18452
18503
  size: Size4.EXTRA_LARGE,
@@ -18455,7 +18506,7 @@ function useLoader(loaderConfig, initialState) {
18455
18506
  }, loaderConfig);
18456
18507
  const [loadingState, setLoadingState] = useState33(initialState);
18457
18508
  const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
18458
- const loader = shouldDisplayLoader ? /* @__PURE__ */ jsx125(
18509
+ const loader = shouldDisplayLoader ? /* @__PURE__ */ jsx126(
18459
18510
  Loader4,
18460
18511
  {
18461
18512
  size: config.size,
@@ -18558,7 +18609,7 @@ var assertResponseIsValid2 = (response) => {
18558
18609
  var isResponse2 = (response) => typeof response === "object" && response !== null && "clone" in response && "bodyUsed" in response;
18559
18610
 
18560
18611
  // src/legacy/dynamicFlow/DynamicFlow.tsx
18561
- import { jsx as jsx126 } from "react/jsx-runtime";
18612
+ import { jsx as jsx127 } from "react/jsx-runtime";
18562
18613
  var noop7 = () => {
18563
18614
  };
18564
18615
  var DynamicFlowComponent = ({
@@ -18673,10 +18724,10 @@ var DynamicFlowComponent = ({
18673
18724
  },
18674
18725
  [onCompletion, dispatchEvent]
18675
18726
  );
18676
- useEffect25(() => {
18727
+ useEffect26(() => {
18677
18728
  dispatchEvent("Dynamic Flow - Flow Started", {});
18678
18729
  }, []);
18679
- useEffect25(() => {
18730
+ useEffect26(() => {
18680
18731
  if (!initialStep) {
18681
18732
  const action = __spreadValues({
18682
18733
  id: "#initial-step-request",
@@ -18796,7 +18847,7 @@ var DynamicFlowComponent = ({
18796
18847
  await performAction(action);
18797
18848
  }
18798
18849
  };
18799
- return /* @__PURE__ */ jsx126(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ jsx126(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ jsx126(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ jsx126(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx126(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ jsx126(
18850
+ return /* @__PURE__ */ jsx127(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ jsx127(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ jsx127(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ jsx127(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx127(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ jsx127(
18800
18851
  DynamicFlowStep,
18801
18852
  {
18802
18853
  step,
@@ -18813,7 +18864,7 @@ var DynamicFlowComponent = ({
18813
18864
  ) }) }) }) }) });
18814
18865
  };
18815
18866
  function DynamicFlow(props) {
18816
- return /* @__PURE__ */ jsx126(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ jsx126(DynamicFlowComponent, __spreadValues({}, props)) });
18867
+ return /* @__PURE__ */ jsx127(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ jsx127(DynamicFlowComponent, __spreadValues({}, props)) });
18817
18868
  }
18818
18869
  var DynamicFlow_default = DynamicFlow;
18819
18870
  var combineModels2 = (formModels) => Object.values(formModels).reduce((previous, model) => __spreadValues(__spreadValues({}, previous), model), {});
@@ -18830,19 +18881,19 @@ var shouldTriggerRefresh = (props) => {
18830
18881
  };
18831
18882
 
18832
18883
  // src/legacy/jsonSchemaForm/JsonSchemaForm.tsx
18833
- import { jsx as jsx127 } from "react/jsx-runtime";
18884
+ import { jsx as jsx128 } from "react/jsx-runtime";
18834
18885
  function JsonSchemaForm(props) {
18835
18886
  const schemaProps = __spreadValues({
18836
18887
  model: null,
18837
18888
  errors: null
18838
18889
  }, props);
18839
18890
  const { baseUrl = "", onEvent = noop8, onLog = noop8 } = props;
18840
- return /* @__PURE__ */ jsx127(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog, children: /* @__PURE__ */ jsx127(
18891
+ return /* @__PURE__ */ jsx128(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog, children: /* @__PURE__ */ jsx128(
18841
18892
  EventsContextProvider,
18842
18893
  {
18843
18894
  metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" },
18844
18895
  onEvent,
18845
- children: /* @__PURE__ */ jsx127(HttpClientProviderFromBaseUrl, { baseUrl, children: /* @__PURE__ */ jsx127(GenericSchema_default, __spreadValues({}, schemaProps)) })
18896
+ children: /* @__PURE__ */ jsx128(HttpClientProviderFromBaseUrl, { baseUrl, children: /* @__PURE__ */ jsx128(GenericSchema_default, __spreadValues({}, schemaProps)) })
18846
18897
  }
18847
18898
  ) });
18848
18899
  }