@adyen/kyc-components 3.83.0-beta.3 → 3.83.0

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 (132) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-D8e1sDZT.js → AcceptTermsOfServiceComponent-DuGvxDCD.js} +13 -13
  2. package/dist/{AccountSetupRejected-D-KmHQzo.js → AccountSetupRejected-WRvC8Lhx.js} +4 -4
  3. package/dist/{Address-CzLEz7OJ.js → Address-DzNHaLQd.js} +7 -7
  4. package/dist/{Alert-BVGR7MHn.js → Alert-Ce3pDSUY.js} +1 -1
  5. package/dist/{Avatar-5boVtx49.js → Avatar-ERL8LlcN.js} +1 -1
  6. package/dist/{BusinessDetailsDropin-PFz3s7n1.js → BusinessDetailsDropin-CdWljVO6.js} +32 -32
  7. package/dist/{BusinessFinancingComponent-BmjAaTQ_.js → BusinessFinancingComponent-BdV2XNEs.js} +4 -4
  8. package/dist/{BusinessFinancingDropin-DDcRIFam.js → BusinessFinancingDropin-R940kp66.js} +19 -19
  9. package/dist/{BusinessFinancingPage-xRoA3Meg.js → BusinessFinancingPage-CutMOZIo.js} +3 -3
  10. package/dist/{BusinessTypeSelectionPage-p_s4qd7p.js → BusinessTypeSelectionPage-Dn1P9vc8.js} +7 -7
  11. package/dist/{Card-C7Q3YRU0.js → Card-Cma0bwYR.js} +3 -3
  12. package/dist/{CountryField-DsNgjve_.js → CountryField-DrB-OFMR.js} +4 -4
  13. package/dist/{CreateIndividualComponent-CbB7YBHa.js → CreateIndividualComponent-DcwNaN_i.js} +5 -5
  14. package/dist/{CreateTransferInstrumentComponent-oVMAkdHF.js → CreateTransferInstrumentComponent-BFYc-5Zc.js} +5 -5
  15. package/dist/{Currency-Uyxgrwkd.js → Currency-DD63TDvu.js} +5 -5
  16. package/dist/{CustomerSupport-DXyyRzCO.js → CustomerSupport-Cs9YbnBI.js} +7 -7
  17. package/dist/{DebugModal-CZdd5yum.js → DebugModal-AFNn6VI2.js} +6 -6
  18. package/dist/{DecisionMakerDetailsPage-BHeP2p6V.js → DecisionMakerDetailsPage-CUAalT7g.js} +6 -6
  19. package/dist/{DecisionMakers-Dk26nBGg.js → DecisionMakers-c18dspZ1.js} +18 -18
  20. package/dist/{Dropzone-BOUeRyEd.js → Dropzone-DXfuqm2D.js} +3 -3
  21. package/dist/{EmbeddedStatus-DgcVy93W.js → EmbeddedStatus-BjGURjyl.js} +2 -2
  22. package/dist/{EndStateLayout-u-AxbKGP.js → EndStateLayout-BuVgF0ER.js} +1 -1
  23. package/dist/{FormNavigation-BD6vRqzE.js → FormNavigation-DXaxaf1-.js} +2 -2
  24. package/dist/{IndividualOnfidoDropin-B9aZXxls.js → IndividualOnfidoDropin-fERsTakw.js} +34 -34
  25. package/dist/{InputDate-B6pvrg11.js → InputDate-By5i2Hlf.js} +1 -1
  26. package/dist/{InputText-Colyh-Kh.js → InputText-CqLs_M75.js} +2 -2
  27. package/dist/{Introduction-gJpd0kp2.js → Introduction-3UWByITz.js} +6 -6
  28. package/dist/{JpAddress-CoZdQzgA.js → JpAddress-C0iTeXx7.js} +7 -7
  29. package/dist/{LegalRepresentativeDetailsPage-DbWTV4--.js → LegalRepresentativeDetailsPage-DSppGGc6.js} +4 -4
  30. package/dist/{Link-B4XMR3Z3.js → Link-CaxhkJ24.js} +1 -1
  31. package/dist/{ManageIndividualComponent-B7hoW40v.js → ManageIndividualComponent-DBe5ValD.js} +5 -5
  32. package/dist/{ManageTermsOfServiceComponent-CoRVdlHV.js → ManageTermsOfServiceComponent-5GHjPbHb.js} +5 -5
  33. package/dist/{ManageTransferInstrumentComponent-6gs4mfhg.js → ManageTransferInstrumentComponent-muOE0ZjV.js} +11 -11
  34. package/dist/{MaskedInput-BmNxOxDh.js → MaskedInput-OYLtVOZ6.js} +4 -4
  35. package/dist/{Modal-C9YSZFg-.js → Modal-BaaNj5F-.js} +1 -1
  36. package/dist/{OnboardingDropinComponent-D2JTkNNh.js → OnboardingDropinComponent-DIf93Tzb.js} +44 -44
  37. package/dist/{PayoutDetailsDropin-x8Muej_I.js → PayoutDetailsDropin-DIJbRfg_.js} +22 -22
  38. package/dist/{RadioGroup-C2ra80YG.js → RadioGroup-QZCH1TCn.js} +9 -8
  39. package/dist/{RegistrationAddress-BGrll6pG.js → RegistrationAddress-CbElOOZ6.js} +12 -12
  40. package/dist/{Review-BhQ-AH8L.js → Review-1Y__iPB0.js} +6 -6
  41. package/dist/{RootBusinessDetailsPage-DqYFBQpo.js → RootBusinessDetailsPage-Cy5mUuKv.js} +24 -24
  42. package/dist/{RootIndividualDetailsPage-Do_PT_sl.js → RootIndividualDetailsPage-BVr2fbYb.js} +4 -4
  43. package/dist/{SignPCIComponent-AcaoZxZ1.js → SignPCIComponent-BcR2vNVB.js} +8 -8
  44. package/dist/{SingpassSelection-6VykV028.js → SingpassSelection-DDG-DpRN.js} +4 -4
  45. package/dist/{SoleProprietorshipPage-CIaQXc7m.js → SoleProprietorshipPage-XnNdoc8n.js} +5 -5
  46. package/dist/{SourceOfFundsPage-DnPc36e1.js → SourceOfFundsPage-DF3muJcW.js} +271 -238
  47. package/dist/{StepProgressIndicator-BH6aRbBV.js → StepProgressIndicator-BUDjmmPK.js} +1 -1
  48. package/dist/{StoreProvider-C-tQ-rUA.js → StoreProvider-DGxWcgrS.js} +5 -5
  49. package/dist/{TaskItemStatus-Dd6Ancsq.js → TaskItemStatus-Clfh9v2q.js} +2 -2
  50. package/dist/{TaskStatusIndicator-2paxCAz3.js → TaskStatusIndicator-CEZcV_gi.js} +1 -1
  51. package/dist/{TaxInformationField-BZrxESkL.js → TaxInformationField-Bu8s2JZA.js} +15 -15
  52. package/dist/{TaxReportingDropin-WBtjoDpN.js → TaxReportingDropin-C1aPbXfp.js} +16 -16
  53. package/dist/{TileGroup-CMptjQhE.js → TileGroup-AskMVW9b.js} +3 -3
  54. package/dist/{TrustDetailsPage-DOsIHEaD.js → TrustDetailsPage-S0YwnBAx.js} +22 -22
  55. package/dist/{TrustMemberCompanyPage-BDJrieOc.js → TrustMemberCompanyPage-DVm9LzCY.js} +6 -6
  56. package/dist/{TrustMemberIndividualPage-B_9_Dyd8.js → TrustMemberIndividualPage-BqncnJnj.js} +4 -4
  57. package/dist/{UnincorporatedPartnershipIndividualPage-CrWbe7nQ.js → UnincorporatedPartnershipIndividualPage-B_fmnaes.js} +4 -4
  58. package/dist/{UnincorporatedPartnershipMemberCompanyPage-CXlxU6j2.js → UnincorporatedPartnershipMemberCompanyPage-DMBIT2KR.js} +6 -6
  59. package/dist/{ViewVerificationStatusComponent-LQaL-934.js → ViewVerificationStatusComponent-CivzRszd.js} +3 -3
  60. package/dist/adyen-business-financing.js +2 -2
  61. package/dist/adyen-individual-configuration.js +2 -2
  62. package/dist/adyen-individual-status.js +2 -2
  63. package/dist/adyen-kyc-components.js +21 -21
  64. package/dist/adyen-onboarding.js +2 -2
  65. package/dist/adyen-terms-of-service-management.js +2 -2
  66. package/dist/adyen-terms-of-service-status.js +2 -2
  67. package/dist/adyen-transfer-instrument-configuration.js +2 -2
  68. package/dist/adyen-transfer-instrument-management.js +2 -2
  69. package/dist/adyen-verification-status.js +2 -2
  70. package/dist/{analytics-BXYbKtDq.js → analytics-B9jlnux-.js} +1 -1
  71. package/dist/{bafinUtils-BAGrFdfY.js → bafinUtils-BJao1Xb_.js} +5 -5
  72. package/dist/bg-BG-Cr0ewJCW.js +13 -0
  73. package/dist/cs-CZ-7xfNBIeH.js +13 -0
  74. package/dist/da-DK-DC8dAHWf.js +13 -0
  75. package/dist/de-DE-CY7fT1B5.js +13 -0
  76. package/dist/el-GR-C7ThPKtr.js +13 -0
  77. package/dist/en-US-CozY33On.js +13 -0
  78. package/dist/es-ES-Dm8otLm9.js +13 -0
  79. package/dist/et-EE-XPQ-Sf9x.js +13 -0
  80. package/dist/fi-FI-CLg2__EV.js +13 -0
  81. package/dist/{fieldConfigurations--yr7Xy-K.js → fieldConfigurations-BzmPcPW1.js} +6 -6
  82. package/dist/fr-FR-D7U2da1i.js +13 -0
  83. package/dist/{getName-D0WtDjDJ.js → getName-DN1hhEuf.js} +1 -1
  84. package/dist/{hasDataChanged-J_6w1bhM.js → hasDataChanged-Di3pJ9RD.js} +1 -1
  85. package/dist/hr-HR-BVzZeaDc.js +13 -0
  86. package/dist/hu-HU-BJpO-WrQ.js +13 -0
  87. package/dist/{iframeWidget-Dj9mKlbq.js → iframeWidget-CdgdGJSA.js} +3 -3
  88. package/dist/{isEmpty-BibPoa4k.js → isEmpty-Cg1sEY56.js} +1 -1
  89. package/dist/it-IT-5QHf-hkt.js +13 -0
  90. package/dist/ja-JP-a6UbRzaS.js +199 -0
  91. package/dist/{localizeDateString-BmDSv9jw.js → localizeDateString-CjJb5ip4.js} +1 -1
  92. package/dist/lt-LT-Dsy0UVdI.js +13 -0
  93. package/dist/lv-LV-BiilWzcg.js +13 -0
  94. package/dist/{mapExistingFile-CqO3I9R1.js → mapExistingFile-Dww-3m9M.js} +3 -3
  95. package/dist/{mapScriptLocalization-Bs4SSHdl.js → mapScriptLocalization-BXWQCCfg.js} +3 -3
  96. package/dist/{mapTransferInstrumentToPayoutAccount-CwhbCRG_.js → mapTransferInstrumentToPayoutAccount-NoTqg5NI.js} +1 -1
  97. package/dist/nl-NL-DKYvsnqM.js +13 -0
  98. package/dist/no-NO-Bj0_2wjm.js +13 -0
  99. package/dist/pl-PL-B8pWxq6T.js +13 -0
  100. package/dist/pt-PT-Gsd7I9Ff.js +13 -0
  101. package/dist/{resolveEnvironment-BNCyan-c.js → resolveEnvironment-DTf0YGQw.js} +3 -3
  102. package/dist/ro-RO-B4ASHhK6.js +13 -0
  103. package/dist/{rules-DYMXeXsn.js → rules-4TEUMKya.js} +4 -4
  104. package/dist/sk-SK-DibZzOqt.js +13 -0
  105. package/dist/sl-SI-D9rl7bIN.js +13 -0
  106. package/dist/sv-SE-Ez33Bdgp.js +13 -0
  107. package/dist/{translation-DVrJwQIP.js → translation-C21WMjvq.js} +1 -1
  108. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +13 -12
  109. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  110. package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +1 -1
  111. package/dist/types/language/types.d.ts +4 -0
  112. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  113. package/dist/{types-DqyFBiPA.js → types-Dsz7b4S_.js} +1 -1
  114. package/dist/{types-0gvlZUyX.js → types-IWh9Nm-W.js} +1 -1
  115. package/dist/{useAssociatedLegalEntity-Ca-nilTs.js → useAssociatedLegalEntity-CPl7E0oh.js} +1 -1
  116. package/dist/{useDataset-BxIVweaP.js → useDataset-CYBhIC5y.js} +2 -2
  117. package/dist/{useForm-C35E-c4c.js → useForm-NtB5fMq5.js} +3 -3
  118. package/dist/{useGlobalData-4zloXt7p.js → useGlobalData-COgPG9qd.js} +7 -7
  119. package/dist/{useOnboardingStatus-6ZctGwef.js → useOnboardingStatus-B8yCxKXz.js} +1 -1
  120. package/dist/{useScenarios-BuJN2-SN.js → useScenarios-DesE_Dem.js} +1 -1
  121. package/dist/{useTermsOfServiceStatus-BSoCzQ66.js → useTermsOfServiceStatus-qtseJuA8.js} +1 -1
  122. package/dist/{useToastContext-CbDzqtMB.js → useToastContext-D4w2gBxd.js} +1 -1
  123. package/dist/{useUnincorporatedPartnershipMembers-CtPKPHnl.js → useUnincorporatedPartnershipMembers-FOg1r690.js} +4 -4
  124. package/dist/{utils-sXtY6Kzs.js → utils-B1i9qK_1.js} +7 -7
  125. package/dist/{utils-DjfxEb2F.js → utils-BMvr9mIu.js} +1 -1
  126. package/dist/{utils-CjsUd6r9.js → utils-BnQGsYPp.js} +1 -1
  127. package/dist/{validate-Cq9bDLs2.js → validate-BiuAh7Ub.js} +1 -1
  128. package/dist/{validate-BSQrgK6A.js → validate-C6-L7Vfa.js} +2 -2
  129. package/dist/{validate-Dwkuwczv.js → validate-anwsdbQz.js} +6 -6
  130. package/dist/{validationError-Bkr2r9n0.js → validationError-zbgp4iB7.js} +1 -1
  131. package/package.json +1 -1
  132. package/dist/toCapitalized-Bq7laD0b.js +0 -13
@@ -2,45 +2,44 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ff3b5e61-d82c-44f0-a3a4-ab02462eea82", e._sentryDebugIdIdentifier = "sentry-dbid-ff3b5e61-d82c-44f0-a3a4-ab02462eea82");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "24dae386-8d1f-45bd-989f-2ba79a2c808e", e._sentryDebugIdIdentifier = "sentry-dbid-24dae386-8d1f-45bd-989f-2ba79a2c808e");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
- import { a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper } from "./translation-DVrJwQIP.js";
10
+ import { a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper } from "./translation-C21WMjvq.js";
11
11
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
12
- import { b as useApiContext, j as useQuery, o as httpGet, aF as useMutation, k as httpPost, y as LegalEntityTypes, x as Typography, u as useI18nContext, B as Button, a7 as isEmpty, a as useTranslation, L as Loader, V as Icon, P as IconButton, N as createLogger, aH as useQueryClient, c as useLegalEntity, R as ROOT_LE, U as useAnalyticsContext, bM as useLegalEntities, J as EntityTypes, g as getLegalEntityCountry } from "./StoreProvider-C-tQ-rUA.js";
13
- import { T as TextArea, I as Image, d as getPropsFromConfigurations, b as useCapabilityProblems, g as getProblemsForEntity } from "./fieldConfigurations--yr7Xy-K.js";
12
+ import { b as useApiContext, j as useQuery, o as httpGet, aF as useMutation, k as httpPost, y as LegalEntityTypes, x as Typography, a as useTranslation, B as Button, u as useI18nContext, a7 as isEmpty, L as Loader, V as Icon, P as IconButton, N as createLogger, aH as useQueryClient, c as useLegalEntity, R as ROOT_LE, U as useAnalyticsContext, bM as useLegalEntities, J as EntityTypes, g as getLegalEntityCountry } from "./StoreProvider-DGxWcgrS.js";
13
+ import { T as TextArea, I as Image, d as getPropsFromConfigurations, b as useCapabilityProblems, g as getProblemsForEntity } from "./fieldConfigurations-BzmPcPW1.js";
14
14
  import { useState, useMemo, useEffect, useCallback, useRef } from "preact/hooks";
15
- import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-CbDzqtMB.js";
16
- import { R as RadioGroup, c as useCreateLegalEntity, d as useUpdateLegalEntity } from "./RadioGroup-C2ra80YG.js";
17
- import { h as hasDataChanged } from "./hasDataChanged-J_6w1bhM.js";
18
- import { u as useGlobalDataSlice, c as useStateContext, F as FormWrapper } from "./useGlobalData-4zloXt7p.js";
19
- import { C as CountryField, E as ErrorPanel, c as createFormUtils, l as getFormProps, g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./CountryField-DsNgjve_.js";
20
- import { c as createDocumentRequest, d as documentApiUtils } from "./validate-BSQrgK6A.js";
15
+ import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-D4w2gBxd.js";
16
+ import { R as RadioGroup, c as useCreateLegalEntity, d as useUpdateLegalEntity } from "./RadioGroup-QZCH1TCn.js";
17
+ import { h as hasDataChanged } from "./hasDataChanged-Di3pJ9RD.js";
18
+ import { u as useGlobalDataSlice, c as useStateContext, F as FormWrapper } from "./useGlobalData-COgPG9qd.js";
19
+ import { C as CountryField, E as ErrorPanel, c as createFormUtils, l as getFormProps, g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./CountryField-DrB-OFMR.js";
20
+ import { c as createDocumentRequest, d as documentApiUtils } from "./validate-C6-L7Vfa.js";
21
21
  import { f as formatObject } from "./utils-DNSfZiio.js";
22
22
  import { signal } from "@preact/signals";
23
- import { F as Field, S as Select, a as useForm } from "./useForm-C35E-c4c.js";
24
- import { I as InputDate } from "./InputDate-B6pvrg11.js";
23
+ import { F as Field, S as Select, a as useForm } from "./useForm-NtB5fMq5.js";
24
+ import { I as InputDate } from "./InputDate-By5i2Hlf.js";
25
25
  import { I as InputGroup } from "./InputGroup-WBfGDV5F.js";
26
- import { I as InputText } from "./InputText-Colyh-Kh.js";
26
+ import { I as InputText } from "./InputText-CqLs_M75.js";
27
27
  import { C as Currencies } from "./currency-BGwQyxBo.js";
28
28
  import { a as formatAmountWithCurrency } from "./formatCurrency-CMOSdJMB.js";
29
- import { l as localizeDateString } from "./localizeDateString-BmDSv9jw.js";
30
- import { t as toCapitalized } from "./toCapitalized-Bq7laD0b.js";
31
- import { A as Avatar } from "./Avatar-5boVtx49.js";
32
- import { a as Alert } from "./Alert-BVGR7MHn.js";
33
- import { M as Modal } from "./Modal-C9YSZFg-.js";
34
- import { C as Confirm, S as StructuredList } from "./useDataset-BxIVweaP.js";
35
- import { v as validateDateNotInTheFuture } from "./validate-Cq9bDLs2.js";
36
- import { T as TileGroup } from "./TileGroup-CMptjQhE.js";
29
+ import { l as localizeDateString } from "./localizeDateString-CjJb5ip4.js";
30
+ import { A as Avatar } from "./Avatar-ERL8LlcN.js";
31
+ import { a as Alert } from "./Alert-Ce3pDSUY.js";
32
+ import { M as Modal } from "./Modal-BaaNj5F-.js";
33
+ import { C as Confirm, S as StructuredList } from "./useDataset-CYBhIC5y.js";
34
+ import { v as validateDateNotInTheFuture } from "./validate-BiuAh7Ub.js";
35
+ import { T as TileGroup } from "./TileGroup-AskMVW9b.js";
37
36
  import { lazy } from "preact/compat";
38
- import { T as TaskStatusIndicator } from "./TaskStatusIndicator-2paxCAz3.js";
39
- import { L as LandingLayout } from "./bafinUtils-BAGrFdfY.js";
40
- import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-D2JTkNNh.js";
41
- import { i as isEmpty$1 } from "./isEmpty-BibPoa4k.js";
42
- import { C as Card } from "./Card-C7Q3YRU0.js";
43
- import { D as Dropzone } from "./Dropzone-BOUeRyEd.js";
37
+ import { T as TaskStatusIndicator } from "./TaskStatusIndicator-CEZcV_gi.js";
38
+ import { L as LandingLayout } from "./bafinUtils-BJao1Xb_.js";
39
+ import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-DIf93Tzb.js";
40
+ import { i as isEmpty$1 } from "./isEmpty-Cg1sEY56.js";
41
+ import { C as Card } from "./Card-Cma0bwYR.js";
42
+ import { D as Dropzone } from "./Dropzone-DXfuqm2D.js";
44
43
  const getBusinessLines = async (legalEntityId, baseUrl) => {
45
44
  return httpGet({
46
45
  baseUrl,
@@ -241,28 +240,28 @@ const getAdditionalDataSchemaKeys = (sourceOfFundsType, originatorType) => {
241
240
  return [];
242
241
  }
243
242
  };
244
- const getServiceTranslation = (i18n, service) => {
243
+ const getServiceTranslation = (t, service) => {
245
244
  switch (service) {
246
245
  case "banking":
247
- return i18n.get("bankingService");
246
+ return t(($) => $["businessBankAccounts"]);
248
247
  case "issuing":
249
- return i18n.get("issuingService");
248
+ return t(($) => $["paymentCards"]);
250
249
  case "paymentProcessing":
251
- return i18n.get("paymentService");
250
+ return t(($) => $["acceptingPayments"]);
252
251
  default:
253
- return i18n.get("supportingDocuments");
252
+ return t(($) => $["supportingDocuments"]);
254
253
  }
255
254
  };
256
- const getServiceTranslationSelectTitle = (i18n, service) => {
255
+ const getServiceTranslationSelectTitle = (t, service) => {
257
256
  switch (service) {
258
257
  case "banking":
259
- return i18n.get("bankingServiceSelectTitle");
258
+ return t(($) => $["forYourBusinessBankAccounts"]);
260
259
  case "issuing":
261
- return i18n.get("issuingServiceSelectTitle");
260
+ return t(($) => $["forYourPaymentCards"]);
262
261
  case "paymentProcessing":
263
- return i18n.get("paymentServiceSelectTitle");
262
+ return t(($) => $["whenAcceptingPayments"]);
264
263
  default:
265
- return i18n.get("supportingDocuments");
264
+ return t(($) => $["supportingDocuments"]);
266
265
  }
267
266
  };
268
267
  const getServiceTranslationKey = (service) => {
@@ -277,40 +276,40 @@ const getServiceTranslationKey = (service) => {
277
276
  return "supportingDocuments";
278
277
  }
279
278
  };
280
- const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
279
+ const getGettingStartedCardDetails = (sourceOfFundsType, t, data) => {
281
280
  const details = [];
282
281
  sourceOfFundsType?.forEach((type) => {
283
282
  switch (type) {
284
283
  case "amount":
285
284
  details.push({
286
- term: i18n.get("amount"),
285
+ term: t(($) => $["amount"]),
287
286
  details: data?.amount?.currency && data?.amount?.value ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
288
287
  });
289
288
  break;
290
289
  case "description":
291
290
  details.push({
292
- term: i18n.get("description"),
291
+ term: t(($) => $["description"]),
293
292
  details: data?.description || ""
294
293
  });
295
294
  break;
296
295
  case "dateOfFundsReceived":
297
296
  details.push({
298
- term: i18n.get("date"),
299
- details: localizeDateString(data?.dateOfFundsReceived || "", i18n.locale)
297
+ term: t(($) => $["date"]),
298
+ details: localizeDateString(data?.dateOfFundsReceived || "", navigator.language)
300
299
  });
301
300
  break;
302
301
  case "purpose":
303
302
  details.push({
304
- term: i18n.get("reason"),
303
+ term: t(($) => $["reason"]),
305
304
  details: data?.purpose || ""
306
305
  });
307
306
  break;
308
307
  case "relationship":
309
- details.push({ term: i18n.get("relationship"), details: data?.relationship || "" });
308
+ details.push({ term: t(($) => $["relationship"]), details: data?.relationship || "" });
310
309
  break;
311
310
  case "originatorLegalEntityId":
312
311
  details.push({
313
- term: i18n.get("benefactorDetails"),
312
+ term: t(($) => $["benefactorDetails"]),
314
313
  details: [
315
314
  data?.legalName ? `${data?.legalName}` : `${data?.firstName} ${data?.lastName}`,
316
315
  /* @__PURE__ */ jsx(Typography, { color: "secondary", children: data?.country || "" }, "location")
@@ -320,7 +319,7 @@ const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
320
319
  case "financiers":
321
320
  data?.financiers?.map((financier) => {
322
321
  return details.push({
323
- term: i18n.get("investor"),
322
+ term: t(($) => $["investor"]),
324
323
  details: [
325
324
  `${financier?.firstName} ${financier?.lastName}`,
326
325
  /* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.location || "" }, "location"),
@@ -334,19 +333,19 @@ const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
334
333
  break;
335
334
  case "cryptocurrencyExchange":
336
335
  details.push({
337
- term: i18n.get("cryptocurrencyExchange"),
336
+ term: t(($) => $["cryptocurrencyExchange"]),
338
337
  details: data?.cryptocurrencyExchange || ""
339
338
  });
340
339
  break;
341
340
  case "dateOfSourceEvent":
342
341
  details.push({
343
- term: i18n.get("dateOfSourceEvent"),
344
- details: localizeDateString(data?.dateOfSourceEvent || "", i18n.locale)
342
+ term: t(($) => $["dateOfSourceEvent"]),
343
+ details: localizeDateString(data?.dateOfSourceEvent || "", navigator.language)
345
344
  });
346
345
  break;
347
346
  case "website":
348
347
  details.push({
349
- term: i18n.get("website"),
348
+ term: t(($) => $["website"]),
350
349
  details: data?.website || ""
351
350
  });
352
351
  break;
@@ -550,7 +549,7 @@ const getDocumentRequirements = {
550
549
  "investmentAmount",
551
550
  "fundDepositDate"
552
551
  ],
553
- partnerShipAgreement: [
552
+ partnershipAgreement: [
554
553
  "yourBusinessName",
555
554
  "nameAddressSignatureOfAllInvestors",
556
555
  "investmentAmount",
@@ -636,7 +635,7 @@ const getDocumentLists = (sourceOfFundsType) => {
636
635
  "brokerStatements"
637
636
  ];
638
637
  case "thirdPartyFunding":
639
- return ["investorContract", "investorMemo", "notarizedStatement", "partnerShipAgreement"];
638
+ return ["investorContract", "investorMemo", "notarizedStatement", "partnershipAgreement"];
640
639
  case "assetSale":
641
640
  return [
642
641
  "proofOfOwnership",
@@ -646,7 +645,7 @@ const getDocumentLists = (sourceOfFundsType) => {
646
645
  "titleDeed"
647
646
  ];
648
647
  case "rentalIncome":
649
- return ["rentalAgreementOrLease", "proofOfOwnershipRent"];
648
+ return ["rentalAgreementOrLease", "proofOfOwnership"];
650
649
  case "donations":
651
650
  return ["giftOrDonationAgreement"];
652
651
  case "royaltyIncome":
@@ -668,7 +667,7 @@ const getDocumentLists = (sourceOfFundsType) => {
668
667
  return [];
669
668
  }
670
669
  };
671
- const parseSOFDocumentDescription = (i18n, documentDescription) => {
670
+ const parseSOFDocumentDescription = (t, documentDescription) => {
672
671
  if (!documentDescription || documentDescription.trim() === "" || !documentDescription.startsWith("$")) {
673
672
  return void 0;
674
673
  }
@@ -676,8 +675,8 @@ const parseSOFDocumentDescription = (i18n, documentDescription) => {
676
675
  const selectedService = servicePart.split(":")[1];
677
676
  const documentType = typePart.split(":")[1];
678
677
  const parsed = {
679
- selectedService: getServiceTranslation(i18n, selectedService || ""),
680
- documentType: i18n.get(documentType)
678
+ selectedService: getServiceTranslation(t, selectedService || ""),
679
+ documentType: t(($) => $[documentType])
681
680
  };
682
681
  return `${parsed.selectedService} (${parsed.documentType})`;
683
682
  };
@@ -842,15 +841,15 @@ const formatDateForInput = (isoDateString) => {
842
841
  return "";
843
842
  }
844
843
  };
845
- const getSofCardDetails = (i18n, sourceOfFunds2) => {
844
+ const getSofCardDetails = (t, sourceOfFunds2) => {
846
845
  if (!sourceOfFunds2) {
847
846
  return "";
848
847
  }
849
848
  if (sourceOfFunds2?.adyenProcessedFunds) {
850
- return i18n.get("sofTypeAdyenLabel");
849
+ return t(($) => $["transactionsOnThisPlatform"]);
851
850
  }
852
851
  if (sourceOfFunds2?.type) {
853
- return i18n.get(`sofType${toCapitalized(sourceOfFunds2?.type)}Label`);
852
+ return sourceOfFunds2?.type ? t(($) => $[sofCategoryItemMapper[sourceOfFunds2.type]]) : "";
854
853
  }
855
854
  return "";
856
855
  };
@@ -871,10 +870,27 @@ const getUniqueRemediationActions = (error) => {
871
870
  ];
872
871
  return allActions.filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
873
872
  };
873
+ const sofCategoryItemMapper = {
874
+ business: "otherBusinessEarnings",
875
+ employment: "employmentWages",
876
+ cryptocurrencyIncome: "cryptocurrency",
877
+ dividendIncome: "dividends",
878
+ loans: "loans",
879
+ financialAid: "financialAid",
880
+ thirdPartyFunding: "thirdPartyFunding",
881
+ rentalIncome: "rentalIncome",
882
+ royaltyIncome: "royaltyIncome",
883
+ gamblingWinnings: "gambling",
884
+ inheritance: "inheritance",
885
+ pensionIncome: "pensionIncome",
886
+ insuranceSettlement: "insuranceSettlement",
887
+ assetSale: "propertySale",
888
+ donations: "giftOrDonation"
889
+ };
874
890
  function AdditionalDataForAssetSale(props) {
875
- const { i18n } = useI18nContext();
876
891
  const [isFocused, setIsFocused] = useState(false);
877
892
  const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
893
+ const { t: commonT } = useTranslation("common");
878
894
  const handleOnAmountBlur = () => {
879
895
  setIsFocused(false);
880
896
  handleAmountChange("amount");
@@ -900,11 +916,11 @@ function AdditionalDataForAssetSale(props) {
900
916
  Select,
901
917
  {
902
918
  name: "currency",
903
- "aria-label": i18n.get("currency"),
919
+ "aria-label": commonT(($) => $["currency"]),
904
920
  isMulti: false,
905
921
  items: allowedCurrencies,
906
922
  selected: data.amount?.currency,
907
- placeholder: i18n.get("select"),
923
+ placeholder: commonT(($) => $["select"]),
908
924
  onChange: handleAmountChange("currency"),
909
925
  minimal: true
910
926
  }
@@ -976,9 +992,9 @@ function AdditionalDataForAssetSale(props) {
976
992
  ] });
977
993
  }
978
994
  function AdditionalDataForBusiness(props) {
979
- const { i18n } = useI18nContext();
980
995
  const [isFocused, setIsFocused] = useState(false);
981
996
  const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
997
+ const { t: commonT } = useTranslation("common");
982
998
  const handleOnAmountBlur = () => {
983
999
  setIsFocused(false);
984
1000
  handleAmountChange("amount");
@@ -991,7 +1007,7 @@ function AdditionalDataForBusiness(props) {
991
1007
  name: "amount",
992
1008
  label: formUtils.getLabel("amount", "annualTurnover"),
993
1009
  errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
994
- helper: i18n.get("useFiguresFromTheMostRecentYearAvailable"),
1010
+ helper: commonT(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
995
1011
  helperPosition: "below",
996
1012
  children: (childProps) => /* @__PURE__ */ jsxs(
997
1013
  InputGroup,
@@ -1005,11 +1021,11 @@ function AdditionalDataForBusiness(props) {
1005
1021
  Select,
1006
1022
  {
1007
1023
  name: "currency",
1008
- "aria-label": i18n.get("currency"),
1024
+ "aria-label": commonT(($) => $["currency"]),
1009
1025
  isMulti: false,
1010
1026
  items: allowedCurrencies,
1011
1027
  selected: data.amount?.currency,
1012
- placeholder: i18n.get("select"),
1028
+ placeholder: commonT(($) => $["select"]),
1013
1029
  onChange: handleAmountChange("currency"),
1014
1030
  minimal: true
1015
1031
  }
@@ -1058,7 +1074,7 @@ function AdditionalDataForBusiness(props) {
1058
1074
  ] });
1059
1075
  }
1060
1076
  function AdditionalDataForCryptocurrency(props) {
1061
- const { i18n } = useI18nContext();
1077
+ const { t: sofT } = useTranslation("sof");
1062
1078
  const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
1063
1079
  return /* @__PURE__ */ jsx(
1064
1080
  Field,
@@ -1067,7 +1083,7 @@ function AdditionalDataForCryptocurrency(props) {
1067
1083
  label: formUtils.getLabel("cryptocurrencyExchange", "cryptocurrencyExchange"),
1068
1084
  errorMessage: formUtils.getErrorMessage("cryptocurrencyExchange", errors, fieldProblems),
1069
1085
  isValid: valid.cryptocurrencyExchange,
1070
- helper: i18n.get("nameOfTheExchangeWhereTheCryptocurrencyWasHeldPriorToSale"),
1086
+ helper: sofT(($) => $["nameOfTheExchangeWhereTheCryptocurrencyWasHeldPriorToSale"]),
1071
1087
  helperPosition: "below",
1072
1088
  children: (childProps) => /* @__PURE__ */ jsx(
1073
1089
  InputText,
@@ -1097,9 +1113,10 @@ const radioItems = [
1097
1113
  }
1098
1114
  ];
1099
1115
  function AdditionalDataOriginatorLegalEntity(props) {
1100
- const { i18n } = useI18nContext();
1116
+ const { t: sofT } = useTranslation("sof");
1101
1117
  const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, sourceOfFundsType } = props;
1102
1118
  const isDonations = useMemo(() => sourceOfFundsType === "donations", [sourceOfFundsType]);
1119
+ const countryTranslationKey = isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath";
1103
1120
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1104
1121
  /* @__PURE__ */ jsx(
1105
1122
  Field,
@@ -1107,8 +1124,8 @@ function AdditionalDataOriginatorLegalEntity(props) {
1107
1124
  el: "fieldset",
1108
1125
  name: "originatorType",
1109
1126
  className: styles.sourceOfFundsUploadModalContentField,
1110
- label: i18n.get(
1111
- isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"
1127
+ label: sofT(
1128
+ ($) => $[isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"]
1112
1129
  ),
1113
1130
  errorMessage: formUtils.getErrorMessage("originatorType", errors, fieldProblems),
1114
1131
  isValid: valid.originatorType,
@@ -1240,9 +1257,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
1240
1257
  country: formUtils.getErrorMessage("country", errors, fieldProblems)
1241
1258
  },
1242
1259
  labels: {
1243
- country: i18n.get(
1244
- isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath"
1245
- )
1260
+ country: sofT(($) => $[countryTranslationKey])
1246
1261
  },
1247
1262
  readonly: formUtils.isReadOnly("country"),
1248
1263
  handleChangeFor
@@ -1316,7 +1331,8 @@ function AdditionalDataForDonation(props) {
1316
1331
  ] });
1317
1332
  }
1318
1333
  function AdditionalDataForGambling(props) {
1319
- const { i18n } = useI18nContext();
1334
+ const { t: sofT } = useTranslation("sof");
1335
+ const { t: commonT } = useTranslation("common");
1320
1336
  const [focusedInput, setFocusedInput] = useState();
1321
1337
  const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1322
1338
  const handleOnAmountBlur = () => {
@@ -1347,11 +1363,11 @@ function AdditionalDataForGambling(props) {
1347
1363
  Select,
1348
1364
  {
1349
1365
  name: "currency",
1350
- "aria-label": i18n.get("currency"),
1366
+ "aria-label": commonT(($) => $["currency"]),
1351
1367
  isMulti: false,
1352
1368
  items: allowedCurrencies,
1353
1369
  selected: data.amount?.currency,
1354
- placeholder: i18n.get("select"),
1370
+ placeholder: commonT(($) => $["select"]),
1355
1371
  onChange: handleAmountChange("currency"),
1356
1372
  minimal: true
1357
1373
  }
@@ -1380,7 +1396,7 @@ function AdditionalDataForGambling(props) {
1380
1396
  Field,
1381
1397
  {
1382
1398
  name: "dateOfSourceEvent",
1383
- label: formUtils.getLabel("dateOfSourceEvent", "dateOfWinnings"),
1399
+ label: formUtils.getLabel("dateOfSourceEvent", "dateOfWinning"),
1384
1400
  errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
1385
1401
  isValid: valid.dateOfSourceEvent,
1386
1402
  children: (childProps) => /* @__PURE__ */ jsx(
@@ -1404,7 +1420,7 @@ function AdditionalDataForGambling(props) {
1404
1420
  name: "website",
1405
1421
  label: formUtils.getLabel("website", "sourceOfWinnings"),
1406
1422
  errorMessage: formUtils.getErrorMessage("website", errors, fieldProblems),
1407
- helper: i18n.get("nameOfCasinoLotteryGambling"),
1423
+ helper: sofT(($) => $["nameOfCasinoLottery"]),
1408
1424
  helperPosition: "below",
1409
1425
  children: (childProps) => /* @__PURE__ */ jsx(
1410
1426
  InputGroup,
@@ -1436,9 +1452,9 @@ function AdditionalDataForGambling(props) {
1436
1452
  ] });
1437
1453
  }
1438
1454
  function AdditionalDataForInheritance(props) {
1439
- const { i18n } = useI18nContext();
1440
1455
  const [isFocused, setIsFocused] = useState(false);
1441
1456
  const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1457
+ const { t: commonT } = useTranslation("common");
1442
1458
  const handleOnAmountBlur = () => {
1443
1459
  setIsFocused(false);
1444
1460
  handleAmountChange("amount");
@@ -1476,11 +1492,11 @@ function AdditionalDataForInheritance(props) {
1476
1492
  Select,
1477
1493
  {
1478
1494
  name: "currency",
1479
- "aria-label": i18n.get("currency"),
1495
+ "aria-label": commonT(($) => $["currency"]),
1480
1496
  isMulti: false,
1481
1497
  items: allowedCurrencies ?? [],
1482
1498
  selected: data.amount?.currency,
1483
- placeholder: i18n.get("select"),
1499
+ placeholder: commonT(($) => $["select"]),
1484
1500
  onChange: handleAmountChange("currency"),
1485
1501
  minimal: true
1486
1502
  }
@@ -1531,7 +1547,8 @@ function AdditionalDataForInheritance(props) {
1531
1547
  ] });
1532
1548
  }
1533
1549
  const SOFFinancierModal = (props) => {
1534
- const { i18n } = useI18nContext();
1550
+ const { t: sofT } = useTranslation("sof");
1551
+ const { t: commonT } = useTranslation("common");
1535
1552
  const { financier, handleModalClose, indexNumber, handleFinancierUpdate } = props;
1536
1553
  const [formData, setFormData] = useState(financier);
1537
1554
  const [formErrors, setFormErrors] = useState({});
@@ -1597,7 +1614,7 @@ const SOFFinancierModal = (props) => {
1597
1614
  };
1598
1615
  }, {});
1599
1616
  setFormErrors(errors);
1600
- setErrorMessage(i18n.get("pleaseFillInAllFields"));
1617
+ setErrorMessage(sofT(($) => $["pleaseFillInAllFields"]));
1601
1618
  }
1602
1619
  };
1603
1620
  const handleFinancierDelete = async () => {
@@ -1605,21 +1622,21 @@ const SOFFinancierModal = (props) => {
1605
1622
  handleModalClose();
1606
1623
  };
1607
1624
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1608
- /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: i18n.get("investorDetails"), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
1625
+ /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: sofT(($) => $["investorDetails"]), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
1609
1626
  /* @__PURE__ */ jsx(
1610
1627
  Typography,
1611
1628
  {
1612
1629
  variant: "title-l",
1613
1630
  el: "h3",
1614
1631
  className: styles.sourceOfFundsGettingStartedHelpHeader,
1615
- children: i18n.get("investorDetails")
1632
+ children: sofT(($) => $["investorDetails"])
1616
1633
  }
1617
1634
  ),
1618
1635
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsSofFinancierForm, children: [
1619
1636
  errorMessage && /* @__PURE__ */ jsx(
1620
1637
  Alert,
1621
1638
  {
1622
- title: i18n.get("errorSubmittingData"),
1639
+ title: sofT(($) => $["errorSubmittingData"]),
1623
1640
  variant: "error",
1624
1641
  className: styles.sourceOfFundsSofFinancierFormError,
1625
1642
  children: errorMessage
@@ -1630,7 +1647,7 @@ const SOFFinancierModal = (props) => {
1630
1647
  Field,
1631
1648
  {
1632
1649
  name: "firstName",
1633
- label: i18n.get("firstName"),
1650
+ label: commonT(($) => $["firstName"]),
1634
1651
  errorMessage: formErrors.firstName,
1635
1652
  isValid: !formErrors.firstName,
1636
1653
  children: (childProps) => /* @__PURE__ */ jsx(
@@ -1652,7 +1669,7 @@ const SOFFinancierModal = (props) => {
1652
1669
  Field,
1653
1670
  {
1654
1671
  name: "lastName",
1655
- label: i18n.get("lastName"),
1672
+ label: commonT(($) => $["lastName"]),
1656
1673
  errorMessage: formErrors.lastName,
1657
1674
  isValid: !formErrors.lastName,
1658
1675
  children: (childProps) => /* @__PURE__ */ jsx(
@@ -1675,12 +1692,12 @@ const SOFFinancierModal = (props) => {
1675
1692
  Field,
1676
1693
  {
1677
1694
  name: "location",
1678
- label: i18n.get("investorLocation"),
1695
+ label: sofT(($) => $["investorLocation"]),
1679
1696
  errorMessage: formErrors.location,
1680
1697
  isValid: !formErrors.location,
1681
1698
  helperPosition: "below",
1682
1699
  showErrorIconBottom: true,
1683
- helper: i18n.get("theCityAndCountryRegion"),
1700
+ helper: sofT(($) => $["theCityAndCountryRegion"]),
1684
1701
  children: (childProps) => /* @__PURE__ */ jsx(
1685
1702
  InputText,
1686
1703
  {
@@ -1701,7 +1718,7 @@ const SOFFinancierModal = (props) => {
1701
1718
  {
1702
1719
  el: "fieldset",
1703
1720
  name: "amount",
1704
- label: i18n.get("investmentAmount"),
1721
+ label: sofT(($) => $["investmentAmount"]),
1705
1722
  errorMessage: formErrors.amount,
1706
1723
  isValid: !formErrors.amount,
1707
1724
  children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
@@ -1710,11 +1727,11 @@ const SOFFinancierModal = (props) => {
1710
1727
  {
1711
1728
  minimal: true,
1712
1729
  name: "currency",
1713
- "aria-label": i18n.get("currency"),
1730
+ "aria-label": commonT(($) => $["currency"]),
1714
1731
  isMulti: false,
1715
1732
  items: allowedCurrencies,
1716
1733
  selected: formData?.amount?.currency,
1717
- placeholder: i18n.get("select"),
1734
+ placeholder: commonT(($) => $["select"]),
1718
1735
  onChange: (e) => handleInputUpdate("currency", e)
1719
1736
  }
1720
1737
  ),
@@ -1735,15 +1752,15 @@ const SOFFinancierModal = (props) => {
1735
1752
  )
1736
1753
  ] }),
1737
1754
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsFinancierFooter, children: [
1738
- /* @__PURE__ */ jsx(Button, { onClick: handleFinancierSave, children: i18n.get("save") }),
1739
- Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: () => setConfirmOpen(true), children: i18n.get("deleteInvestorDetails") })
1755
+ /* @__PURE__ */ jsx(Button, { onClick: handleFinancierSave, children: commonT(($) => $["save"]) }),
1756
+ Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: () => setConfirmOpen(true), children: sofT(($) => $["deleteInvestorDetails"]) })
1740
1757
  ] })
1741
1758
  ] }) }),
1742
1759
  confirmOpen && /* @__PURE__ */ jsx(
1743
1760
  Confirm,
1744
1761
  {
1745
- title: i18n.get("areYouSureYouWantToDeleteThisInvestorDetails"),
1746
- confirmText: i18n.get("delete"),
1762
+ title: sofT(($) => $["areYouSureYouWantToDeleteThisInvestorDetails"]),
1763
+ confirmText: commonT(($) => $["delete"]),
1747
1764
  onConfirm: handleFinancierDelete,
1748
1765
  onCancel: () => setConfirmOpen(false),
1749
1766
  critical: true
@@ -1756,6 +1773,7 @@ function AdditionalDataForThirdParty(props) {
1756
1773
  const [activeFinancier, setActiveFinancier] = useState();
1757
1774
  const [activeIndex, setActiveIndex] = useState();
1758
1775
  const { data, fieldProblems, errors, handleChangeFor, formUtils, valid } = props;
1776
+ const { t: sofT } = useTranslation("sof");
1759
1777
  const { i18n } = useI18nContext();
1760
1778
  const handleToggleFinancierModal = () => {
1761
1779
  setActiveFinancier(void 0);
@@ -1806,7 +1824,7 @@ function AdditionalDataForThirdParty(props) {
1806
1824
  ),
1807
1825
  variant: "error",
1808
1826
  className: styles.sourceOfFundsSofFinancierFormError,
1809
- children: i18n.get("addAtLeastOneInvestor")
1827
+ children: sofT(($) => $["addAtLeastOneInvestor"])
1810
1828
  }
1811
1829
  ),
1812
1830
  data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs(
@@ -1843,7 +1861,7 @@ function AdditionalDataForThirdParty(props) {
1843
1861
  onClick: handleToggleFinancierModal,
1844
1862
  children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
1845
1863
  /* @__PURE__ */ jsx(Avatar, { iconName: "plus", variant: "tertiary", circle: true }),
1846
- /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addInvestor") })
1864
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: sofT(($) => $["addInvestor"]) })
1847
1865
  ] })
1848
1866
  }
1849
1867
  ),
@@ -2153,7 +2171,7 @@ function SourceOfFundsAdditionalData(props) {
2153
2171
  }
2154
2172
  const sourceOfFundsTypeFields = ["type"];
2155
2173
  function SourceOfFundsType(props) {
2156
- const { t } = useTranslation("common");
2174
+ const { t } = useTranslation(["common", "sof"]);
2157
2175
  const { i18n } = useI18nContext();
2158
2176
  const {
2159
2177
  data: sourceOfFundsTypeDefaultData,
@@ -2191,12 +2209,12 @@ function SourceOfFundsType(props) {
2191
2209
  const categoryItems = [
2192
2210
  {
2193
2211
  value: "adyen",
2194
- label: i18n.get("sofTypeAdyenLabel"),
2212
+ label: t(($) => $["transactionsOnThisPlatform"], { ns: "sof" }),
2195
2213
  icon: getIconById("adyen")
2196
2214
  },
2197
2215
  ...categories?.map((item) => ({
2198
2216
  value: item.id,
2199
- label: i18n.get(`sofType${toCapitalized(item.name)}Label`),
2217
+ label: t(($) => $[sofCategoryItemMapper[item.name]], { ns: "sof" }),
2200
2218
  icon: getIconById(item.id)
2201
2219
  })) ?? []
2202
2220
  ];
@@ -2251,9 +2269,9 @@ function getIconById(id) {
2251
2269
  }
2252
2270
  }
2253
2271
  function SourceOfFunds(props) {
2254
- const { i18n } = useI18nContext();
2255
2272
  const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
2256
2273
  const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
2274
+ const { t: sofT } = useTranslation("sof");
2257
2275
  const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
2258
2276
  const pageHeadings = useMemo(
2259
2277
  () => getPageHeadings(sourceOfFundsType ?? "adyen"),
@@ -2261,20 +2279,15 @@ function SourceOfFunds(props) {
2261
2279
  );
2262
2280
  return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
2263
2281
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsWrapperHeading, children: [
2264
- /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
2265
- activeForm?.formId === "additionalData" ? pageHeadings.heading : {
2266
- key: "selectASourceOfFunding",
2267
- values: {
2268
- type: getServiceTranslationSelectTitle(
2269
- i18n,
2270
- activeBusinessLine?.service || ""
2271
- ).toLowerCase()
2272
- }
2273
- }
2274
- ) }),
2282
+ /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: activeForm?.formId === "additionalData" ? sofT(($) => $[pageHeadings.heading]) : sofT(($) => $["selectASourceOfFunding"], {
2283
+ type: getServiceTranslationSelectTitle(
2284
+ sofT,
2285
+ activeBusinessLine?.service || ""
2286
+ ).toLowerCase()
2287
+ }) }),
2275
2288
  /* @__PURE__ */ jsxs(Typography, { className: styles.sourceOfFundsWrapperDescription, children: [
2276
- activeForm?.formId === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
2277
- sourceOfFundsTypesData?.length === 0 && i18n.get("noCategoriesAvailable")
2289
+ activeForm?.formId === "additionalData" && pageHeadings.description && sofT(($) => $[pageHeadings.description]),
2290
+ sourceOfFundsTypesData?.length === 0 && sofT(($) => $["noCategoriesAvailable"])
2278
2291
  ] })
2279
2292
  ] }),
2280
2293
  sofErrorMessage.value && /* @__PURE__ */ jsxs(
@@ -2305,12 +2318,12 @@ function SourceOfFunds(props) {
2305
2318
  sourceOfFundsType
2306
2319
  }
2307
2320
  ) }),
2308
- activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
2321
+ activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: sofT(($) => $["uploadADocument"]) }) })
2309
2322
  ] });
2310
2323
  }
2311
2324
  function SourceOfFundsGettingStartedCard(props) {
2312
2325
  const { id, title, onClick, isEdit, meta } = props;
2313
- const { i18n } = useI18nContext();
2326
+ const { t: commonT } = useTranslation("common");
2314
2327
  return /* @__PURE__ */ jsx(
2315
2328
  Card,
2316
2329
  {
@@ -2324,7 +2337,7 @@ function SourceOfFundsGettingStartedCard(props) {
2324
2337
  variant: "primary",
2325
2338
  testId: "source-of-funds-getting-card-secondary-button",
2326
2339
  onClick,
2327
- children: i18n.get("start")
2340
+ children: commonT(($) => $["start"])
2328
2341
  }
2329
2342
  ),
2330
2343
  children: isEdit && meta?.length && /* @__PURE__ */ jsx(
@@ -2349,6 +2362,8 @@ const SourceOfFundsGettingStarted = ({
2349
2362
  legalEntity,
2350
2363
  isSoFDocumentMissing
2351
2364
  }) => {
2365
+ const { t: sofT } = useTranslation("sof");
2366
+ const { t: commonT } = useTranslation("common");
2352
2367
  const { i18n } = useI18nContext();
2353
2368
  const hasSourceOfFunds = businessLines?.some(
2354
2369
  (businessLine) => !isEmpty$1(businessLine.sourceOfFunds)
@@ -2363,36 +2378,36 @@ const SourceOfFundsGettingStarted = ({
2363
2378
  const cards = lines.map((line) => {
2364
2379
  const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
2365
2380
  return {
2366
- title: getServiceTranslation(i18n, line.service || ""),
2381
+ title: getServiceTranslation(sofT, line.service || ""),
2367
2382
  type: line?.sourceOfFunds?.type,
2368
2383
  isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
2369
2384
  onClick: () => handleSourceOfFundsClick(SoF, line),
2370
2385
  meta: [
2371
2386
  {
2372
- term: i18n.get("sourceOfFunds"),
2373
- details: getSofCardDetails(i18n, line?.sourceOfFunds)
2387
+ term: sofT(($) => $["sourceOfFunds"]),
2388
+ details: getSofCardDetails(sofT, line?.sourceOfFunds)
2374
2389
  },
2375
2390
  ...getGettingStartedCardDetails(
2376
2391
  getAdditionalDataSchemaKeys(
2377
2392
  line?.sourceOfFunds?.type || "adyen",
2378
2393
  line?.sourceOfFunds?.originatorType
2379
2394
  ),
2380
- i18n,
2395
+ sofT,
2381
2396
  line?.sourceOfFunds
2382
2397
  )
2383
2398
  ]
2384
2399
  };
2385
2400
  }).sort((a) => a?.type ? 1 : -1);
2386
2401
  const uploadCard = {
2387
- title: getServiceTranslation(i18n),
2402
+ title: getServiceTranslation(sofT),
2388
2403
  type: "",
2389
2404
  isEdit: !!sofDocuments?.length,
2390
2405
  onClick: handleNavigateToUploadPage,
2391
2406
  meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
2392
- term: i18n.get("fileName"),
2407
+ term: sofT(($) => $["fileName"]),
2393
2408
  details: [
2394
2409
  doc?.fileName,
2395
- /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc?.description) || "" }, "docDescription")
2410
+ /* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(sofT, doc?.description) || "" }, "docDescription")
2396
2411
  ]
2397
2412
  })) : []
2398
2413
  };
@@ -2433,8 +2448,8 @@ const SourceOfFundsGettingStarted = ({
2433
2448
  LandingLayout,
2434
2449
  {
2435
2450
  media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: digitalWallet }),
2436
- title: i18n.get("fundingSourcesForFinancialProducts"),
2437
- description: i18n.get("inTheNextStepWellCollectInformation"),
2451
+ title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
2452
+ description: sofT(($) => $["inTheNextStepWellCollectInformation"]),
2438
2453
  actions: /* @__PURE__ */ jsxs(Fragment, { children: [
2439
2454
  /* @__PURE__ */ jsx(
2440
2455
  Button,
@@ -2442,7 +2457,7 @@ const SourceOfFundsGettingStarted = ({
2442
2457
  fullWidth: true,
2443
2458
  testId: "source-of-funds-getting-primary-button",
2444
2459
  onClick: handleGettingStartedClick,
2445
- children: i18n.get("gettingStarted")
2460
+ children: sofT(($) => $["getStarted"])
2446
2461
  }
2447
2462
  ),
2448
2463
  handleCancelClick && /* @__PURE__ */ jsx(
@@ -2452,7 +2467,7 @@ const SourceOfFundsGettingStarted = ({
2452
2467
  fullWidth: true,
2453
2468
  testId: "source-of-funds-getting-cancel-button",
2454
2469
  onClick: handleCancelClick,
2455
- children: i18n.get("backToTaskList")
2470
+ children: commonT(($) => $["backToTaskList"])
2456
2471
  }
2457
2472
  )
2458
2473
  ] })
@@ -2471,10 +2486,10 @@ const SourceOfFundsGettingStarted = ({
2471
2486
  className: styles.sourceOfFundsGettingStartedHeading,
2472
2487
  el: "h2",
2473
2488
  variant: "title-l",
2474
- children: i18n.get("fundingSourcesForFinancialProducts")
2489
+ children: sofT(($) => $["fundingSourcesForFinancialProducts"])
2475
2490
  }
2476
2491
  ),
2477
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
2492
+ /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: sofT(($) => $["addAllSourcesOfFundsBeingUsed"]) }),
2478
2493
  errorObjects && errorObjects.map((errorObj, index) => {
2479
2494
  const uniqueActions = getUniqueRemediationActions(errorObj);
2480
2495
  const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
@@ -2508,7 +2523,7 @@ const SourceOfFundsGettingStarted = ({
2508
2523
  variant: "secondary",
2509
2524
  testId: "source-of-funds-getting-return-button",
2510
2525
  onClick: handleCancelClick,
2511
- children: i18n.get("backToTaskList")
2526
+ children: commonT(($) => $["backToTaskList"])
2512
2527
  }
2513
2528
  )
2514
2529
  ] })
@@ -2517,9 +2532,10 @@ const SourceOfFundsGettingStarted = ({
2517
2532
  );
2518
2533
  };
2519
2534
  const SOFUploadModal = (props) => {
2520
- const { i18n } = useI18nContext();
2521
2535
  const { showToast } = useToastContext();
2522
2536
  const logger2 = createLogger();
2537
+ const { t: sofT } = useTranslation("sof");
2538
+ const { t: commonT } = useTranslation("common");
2523
2539
  const { businessLines, handleModalClose, documentUtils } = props;
2524
2540
  const firstService = businessLines?.length === 1 ? businessLines?.[0]?.service : void 0;
2525
2541
  const [selectedService, setSelectedService] = useState(
@@ -2536,9 +2552,9 @@ const SOFUploadModal = (props) => {
2536
2552
  const serviceRadioItems = useMemo(() => {
2537
2553
  return businessLines.map((businessLine) => ({
2538
2554
  id: businessLine.service,
2539
- name: getServiceTranslationKey(businessLine?.service || "")
2555
+ name: sofT(($) => $[getServiceTranslationKey(businessLine?.service || "")])
2540
2556
  }));
2541
- }, [businessLines]);
2557
+ }, [businessLines, sofT]);
2542
2558
  const canUpload = useMemo(() => selectedService && documentType, [selectedService, documentType]);
2543
2559
  const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
2544
2560
  const documentLists = useMemo(() => {
@@ -2549,18 +2565,18 @@ const SOFUploadModal = (props) => {
2549
2565
  const lists = getDocumentLists(selectedType);
2550
2566
  const items = lists.map((list) => ({
2551
2567
  id: list,
2552
- name: i18n.get(list)
2568
+ name: sofT(($) => $[list])
2553
2569
  }));
2554
2570
  return items;
2555
2571
  }
2556
2572
  return [];
2557
- }, [businessLines, i18n, selectedService]);
2573
+ }, [businessLines, sofT, selectedService]);
2558
2574
  const documentRequirements = useMemo(() => {
2559
2575
  return documentType ? getDocumentRequirements[documentType] : [];
2560
2576
  }, [documentType]);
2561
2577
  const onFileUpload = async (files) => {
2562
2578
  if (!canUpload) {
2563
- showToast({ label: i18n.get("unableToUploadDocument"), variant: "error" });
2579
+ showToast({ label: sofT(($) => $["unableToUploadDocument"]), variant: "error" });
2564
2580
  return;
2565
2581
  }
2566
2582
  const formattedDocument = await createDocumentRequest({
@@ -2574,81 +2590,89 @@ const SOFUploadModal = (props) => {
2574
2590
  try {
2575
2591
  await documentUtils.uploadDocuments([formattedDocument], selectedBusinessLineId);
2576
2592
  showToast({
2577
- label: i18n.get("documentUploadedSuccessfully"),
2593
+ label: sofT(($) => $["documentUploadedSuccessfully"]),
2578
2594
  variant: "success",
2579
2595
  duration: 1e4
2580
2596
  });
2581
2597
  handleModalClose();
2582
2598
  } catch (e) {
2583
2599
  logger2.log(e);
2584
- showToast({ label: i18n.get("unableToUploadDocument"), variant: "error" });
2600
+ showToast({ label: sofT(($) => $["unableToUploadDocument"]), variant: "error" });
2585
2601
  }
2586
2602
  }
2587
2603
  };
2588
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: i18n.get("uploadASupportingDocument"), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
2589
- /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }),
2590
- /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
2591
- businessLines?.length > 1 ? /* @__PURE__ */ jsx(
2592
- Field,
2593
- {
2594
- el: "fieldset",
2595
- name: "service",
2596
- className: styles.sourceOfFundsUploadModalContentField,
2597
- label: i18n.get("whatFinancialProductIsThisFor"),
2598
- children: (childProps) => /* @__PURE__ */ jsx(
2599
- RadioGroup,
2604
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
2605
+ Modal,
2606
+ {
2607
+ onClose: handleModalClose,
2608
+ ariaLabel: sofT(($) => $["uploadASupportingDocument"]),
2609
+ inset: true,
2610
+ children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
2611
+ /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: sofT(($) => $["uploadASupportingDocument"]) }),
2612
+ /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
2613
+ businessLines?.length > 1 ? /* @__PURE__ */ jsx(
2614
+ Field,
2600
2615
  {
2601
- ...childProps,
2616
+ el: "fieldset",
2602
2617
  name: "service",
2603
- className: styles.sourceOfFundsUploadModalContentFieldRadioGroup,
2604
- items: serviceRadioItems,
2605
- value: selectedService,
2606
- disabled: false,
2607
- onChange: onRadioChange,
2608
- "aria-required": true
2618
+ className: styles.sourceOfFundsUploadModalContentField,
2619
+ label: sofT(($) => $["whatFinancialProductIsThisFor"]),
2620
+ children: (childProps) => /* @__PURE__ */ jsx(
2621
+ RadioGroup,
2622
+ {
2623
+ ...childProps,
2624
+ name: "service",
2625
+ className: styles.sourceOfFundsUploadModalContentFieldRadioGroup,
2626
+ items: serviceRadioItems,
2627
+ value: selectedService,
2628
+ disabled: false,
2629
+ onChange: onRadioChange,
2630
+ "aria-required": true
2631
+ }
2632
+ )
2609
2633
  }
2610
- )
2611
- }
2612
- ) : null,
2613
- selectedService && /* @__PURE__ */ jsx(
2614
- Field,
2615
- {
2616
- name: "documentType",
2617
- label: i18n.get("documentType"),
2618
- "data-testid": "documentType",
2619
- className: styles.sourceOfFundsUploadModalContentField,
2620
- children: (childProps) => /* @__PURE__ */ jsx(
2621
- Select,
2634
+ ) : null,
2635
+ selectedService && /* @__PURE__ */ jsx(
2636
+ Field,
2622
2637
  {
2623
- ...childProps,
2624
2638
  name: "documentType",
2625
- placeholder: i18n.get("selectOne"),
2626
- selected: documentType,
2627
- items: documentLists,
2628
- onChange: onDocumentTypeChange
2639
+ label: commonT(($) => $["documentType"]),
2640
+ "data-testid": "documentType",
2641
+ className: styles.sourceOfFundsUploadModalContentField,
2642
+ children: (childProps) => /* @__PURE__ */ jsx(
2643
+ Select,
2644
+ {
2645
+ ...childProps,
2646
+ name: "documentType",
2647
+ placeholder: commonT(($) => $["selectOne"]),
2648
+ selected: documentType,
2649
+ items: documentLists,
2650
+ onChange: onDocumentTypeChange
2651
+ }
2652
+ )
2653
+ }
2654
+ ),
2655
+ documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
2656
+ /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: sofT(($) => $["documentShouldShow"]) }),
2657
+ /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: sofT(($) => $[requirement]) }) }, requirement)) })
2658
+ ] }) : null,
2659
+ canUpload && /* @__PURE__ */ jsx(
2660
+ Dropzone,
2661
+ {
2662
+ disabled: !canUpload,
2663
+ onChange: onFileUpload,
2664
+ showMinimal: true,
2665
+ hidePageCount: true,
2666
+ maxSize: 4194304,
2667
+ enableTracking: true,
2668
+ name: "documentField",
2669
+ allowedFileTypes: ["JPG", "JPEG", "PNG", "PDF"]
2629
2670
  }
2630
2671
  )
2631
- }
2632
- ),
2633
- documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
2634
- /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
2635
- /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
2636
- ] }) : null,
2637
- canUpload && /* @__PURE__ */ jsx(
2638
- Dropzone,
2639
- {
2640
- disabled: !canUpload,
2641
- onChange: onFileUpload,
2642
- showMinimal: true,
2643
- hidePageCount: true,
2644
- maxSize: 4194304,
2645
- enableTracking: true,
2646
- name: "documentField",
2647
- allowedFileTypes: ["JPG", "JPEG", "PNG", "PDF"]
2648
- }
2649
- )
2650
- ] })
2651
- ] }) }) });
2672
+ ] })
2673
+ ] })
2674
+ }
2675
+ ) });
2652
2676
  };
2653
2677
  const SourceOfFundsUpload = ({
2654
2678
  businessLines,
@@ -2656,12 +2680,13 @@ const SourceOfFundsUpload = ({
2656
2680
  legalEntity,
2657
2681
  handleNavigateToSummary
2658
2682
  }) => {
2659
- const { i18n } = useI18nContext();
2660
2683
  const [showUploadModal, setShowUploadModal] = useState(false);
2661
2684
  const [docToDelete, setDocToDelete] = useState(void 0);
2662
2685
  const { showToast } = useToastContext();
2663
2686
  const logger2 = createLogger();
2664
2687
  const queryClient = useQueryClient();
2688
+ const { t: sofT } = useTranslation("sof");
2689
+ const { t: commonT } = useTranslation("common");
2665
2690
  const handleModalClose = async () => {
2666
2691
  setShowUploadModal(false);
2667
2692
  await queryClient.invalidateQueries({
@@ -2676,6 +2701,29 @@ const SourceOfFundsUpload = ({
2676
2701
  [legalEntity]
2677
2702
  );
2678
2703
  const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
2704
+ const getTranslatedCategoryName = (categoryKey) => {
2705
+ const translationKey2 = sofCategoryItemMapper[categoryKey];
2706
+ if (!categoryKey || !translationKey2) {
2707
+ return "";
2708
+ }
2709
+ return sofT(($) => $[translationKey2]).toLowerCase();
2710
+ };
2711
+ let translationKey;
2712
+ let translationParams;
2713
+ if (sourceOfFundsCategories?.length > 1) {
2714
+ translationKey = "weNeedProofOfFundingForMultipleCategories";
2715
+ translationParams = {
2716
+ category1_name: getTranslatedCategoryName(sourceOfFundsCategories[0]),
2717
+ category2_name: getTranslatedCategoryName(sourceOfFundsCategories[1])
2718
+ };
2719
+ } else if (sourceOfFundsCategories?.length === 1) {
2720
+ translationKey = "weNeedProofOfFunding";
2721
+ translationParams = {
2722
+ category_name: getTranslatedCategoryName(sourceOfFundsCategories[0])
2723
+ };
2724
+ } else {
2725
+ translationKey = "weNeedProofOfFundingForNoCategory";
2726
+ }
2679
2727
  const handleFileDelete = async (documentId) => {
2680
2728
  if (documentUtils.deleteDocument) {
2681
2729
  try {
@@ -2684,48 +2732,33 @@ const SourceOfFundsUpload = ({
2684
2732
  queryKey: ["legalEntity", legalEntity.id]
2685
2733
  });
2686
2734
  showToast({
2687
- label: i18n.get("documentDeletedSuccessfully"),
2735
+ label: sofT(($) => $["documentDeletedSuccessfully"]),
2688
2736
  variant: "success",
2689
2737
  duration: 1e4
2690
2738
  });
2691
2739
  } catch (e) {
2692
2740
  logger2.log(e);
2693
- showToast({ label: i18n.get("unableToDeleteDocument"), variant: "error" });
2741
+ showToast({ label: sofT(($) => $["unableToDeleteDocument"]), variant: "error" });
2694
2742
  }
2695
2743
  }
2696
2744
  };
2697
2745
  return /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadList, children: [
2698
2746
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadListHeading, children: [
2699
- /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
2700
- /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sourceOfFundsCategories?.length > 1 ? i18n.get("weNeedProofOfFundingPlural", {
2701
- values: {
2702
- category1_name: sourceOfFundsCategories[0] ? i18n.get(
2703
- `sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
2704
- ).toLowerCase() : "",
2705
- category2_name: sourceOfFundsCategories[1] ? i18n.get(
2706
- `sofType${toCapitalized(sourceOfFundsCategories[1])}Label`
2707
- ).toLowerCase() : ""
2708
- }
2709
- }) : i18n.get("weNeedProofOfFunding", {
2710
- values: {
2711
- category_name: sourceOfFundsCategories[0] ? i18n.get(
2712
- `sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
2713
- ).toLowerCase() : ""
2714
- }
2715
- }) })
2747
+ /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: sofT(($) => $["supportingDocuments"]) }),
2748
+ /* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sofT(($) => $[translationKey], translationParams) })
2716
2749
  ] }),
2717
2750
  documents?.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
2718
2751
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
2719
2752
  /* @__PURE__ */ jsx(Avatar, { iconName: "document", circle: true }),
2720
2753
  /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
2721
2754
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: document.fileName }),
2722
- /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: parseSOFDocumentDescription(i18n, document.description) })
2755
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: parseSOFDocumentDescription(sofT, document.description) })
2723
2756
  ] })
2724
2757
  ] }),
2725
2758
  /* @__PURE__ */ jsx(
2726
2759
  IconButton,
2727
2760
  {
2728
- ariaLabel: i18n.get("deleteDocument"),
2761
+ ariaLabel: commonT(($) => $["deleteDocument"]),
2729
2762
  variant: "tertiary",
2730
2763
  icon: "cross",
2731
2764
  onClick: () => setDocToDelete(document),
@@ -2741,22 +2774,19 @@ const SourceOfFundsUpload = ({
2741
2774
  onClick: openUploadModal,
2742
2775
  "data-testId": "source-of-funds-upload-button",
2743
2776
  children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
2744
- /* @__PURE__ */ jsx(Avatar, { label: i18n.get("addDocument"), iconName: "plus", circle: true }),
2745
- /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addDocument") })
2777
+ /* @__PURE__ */ jsx(Avatar, { label: sofT(($) => $["addDocument"]), iconName: "plus", circle: true }),
2778
+ /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: sofT(($) => $["addDocument"]) })
2746
2779
  ] })
2747
2780
  }
2748
2781
  ),
2749
- handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: documents?.length > 0 ? i18n.get("finish") : i18n.get("cancel") }) }),
2782
+ handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: documents?.length > 0 ? commonT(($) => $["finish"]) : commonT(($) => $["cancel"]) }) }),
2750
2783
  !!docToDelete && /* @__PURE__ */ jsx(
2751
2784
  Confirm,
2752
2785
  {
2753
- title: i18n.get({
2754
- key: "areYouSureYouWantToDeleteThisDocument",
2755
- values: {
2756
- deleteDocName: docToDelete?.fileName || ""
2757
- }
2786
+ title: sofT(($) => $["areYouSureYouWantToDeleteThisDocument"], {
2787
+ documentName: docToDelete?.fileName || ""
2758
2788
  }),
2759
- confirmText: i18n.get("delete"),
2789
+ confirmText: commonT(($) => $["delete"]),
2760
2790
  onConfirm: () => handleFileDelete(docToDelete?.id),
2761
2791
  onCancel: () => setDocToDelete(void 0),
2762
2792
  critical: true
@@ -2792,7 +2822,7 @@ function SourceOfFundsDropin({
2792
2822
  } = useStateContext();
2793
2823
  const formValidity = currentState.validityByForm;
2794
2824
  const { baseUrl, rootLegalEntityId } = useApiContext();
2795
- const { i18n } = useI18nContext();
2825
+ const { t: sofT } = useTranslation("sof");
2796
2826
  const userEvents = useAnalyticsContext();
2797
2827
  const { showToast } = useToastContext();
2798
2828
  const { data: businessLinesData, isLoading: isLoadingBusinessLines } = useBusinessLines();
@@ -2829,7 +2859,7 @@ function SourceOfFundsDropin({
2829
2859
  updatedBusinessLine = parseOriginatorDetails(result.data, updatedBusinessLine);
2830
2860
  } else if (result && result.isError) {
2831
2861
  logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
2832
- showToast({ label: i18n.get("unableToLoadRelatedEntity"), variant: "error" });
2862
+ showToast({ label: sofT(($) => $["unableToLoadRelatedEntity"]), variant: "error" });
2833
2863
  }
2834
2864
  if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) {
2835
2865
  updatedBusinessLine.sourceOfFunds.type = "adyen";
@@ -2866,13 +2896,13 @@ function SourceOfFundsDropin({
2866
2896
  }
2867
2897
  }
2868
2898
  } catch (error) {
2869
- showToast({ label: i18n.get("failedToLoadBusinessLines"), variant: "error" });
2899
+ showToast({ label: sofT(($) => $["unableToLoadRelatedEntity"]), variant: "error" });
2870
2900
  logger.error(error);
2871
2901
  } finally {
2872
2902
  setLoading(false);
2873
2903
  }
2874
2904
  }
2875
- }, [filteredBusinessLines, areLegalEntitiesLoading, normalizedBusinessLines, i18n, logger]);
2905
+ }, [filteredBusinessLines, areLegalEntitiesLoading, normalizedBusinessLines, sofT, logger]);
2876
2906
  useEffect(() => {
2877
2907
  userEvents.addTaskEvent("Landed on page", {
2878
2908
  actionType: "start"
@@ -2951,7 +2981,7 @@ function SourceOfFundsDropin({
2951
2981
  try {
2952
2982
  sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
2953
2983
  } catch (e) {
2954
- setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
2984
+ setSofErrorMessage(e?.message || sofT(($) => $["errorUpdatingSourceOfFunds"]));
2955
2985
  logger.log("Error updating source of funds", e);
2956
2986
  }
2957
2987
  eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
@@ -2975,10 +3005,10 @@ function SourceOfFundsDropin({
2975
3005
  setActiveSourceOfFund({});
2976
3006
  gotoFormByFormIndex(0);
2977
3007
  setSofErrorMessage("");
2978
- showToast({ label: i18n.get("successAddedFundingSources"), variant: "success" });
3008
+ showToast({ label: sofT(($) => $["successAddedFundingSources"]), variant: "success" });
2979
3009
  handleHomeClick?.();
2980
3010
  } catch (e) {
2981
- setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
3011
+ setSofErrorMessage(e?.message || sofT(($) => $["errorUpdatingSourceOfFunds"]));
2982
3012
  logger.log("Error updating source of funds", e);
2983
3013
  }
2984
3014
  setLoadingStatus("success");
@@ -3077,7 +3107,10 @@ const SourceOfFundsPage = ({ onSubmit, handleHomeClick }) => {
3077
3107
  const capabilityProblems = useCapabilityProblems();
3078
3108
  const { i18n } = useTranslation();
3079
3109
  addResourceBundles(i18n, i18n.language, [
3080
- { ns: "efp", importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../language/bg-BG.json": () => import("./bg-BG-D5192UVe.js"), "../language/cs-CZ.json": () => import("./cs-CZ-DOqH0WeT.js"), "../language/da-DK.json": () => import("./da-DK-B45X2VaJ.js"), "../language/de-DE.json": () => import("./de-DE-CWvgMDqU.js"), "../language/el-GR.json": () => import("./el-GR-C3rkK_oc.js"), "../language/en-US.json": () => import("./en-US-DIdQJky-.js"), "../language/es-ES.json": () => import("./es-ES-DKCCgVF8.js"), "../language/et-EE.json": () => import("./et-EE-Bc6ioJRG.js"), "../language/fi-FI.json": () => import("./fi-FI-Hhku9Lmc.js"), "../language/fr-FR.json": () => import("./fr-FR-BYuKsZIb.js"), "../language/hr-HR.json": () => import("./hr-HR-CPO5Yw2B.js"), "../language/hu-HU.json": () => import("./hu-HU-mo_0ULJG.js"), "../language/it-IT.json": () => import("./it-IT-Nl57jui-.js"), "../language/ja-JP.json": () => import("./ja-JP-D3oQAH7z.js"), "../language/lt-LT.json": () => import("./lt-LT-CVasDmF3.js"), "../language/lv-LV.json": () => import("./lv-LV-Sbsv8-nD.js"), "../language/nl-NL.json": () => import("./nl-NL-BHkRnVrj.js"), "../language/no-NO.json": () => import("./no-NO-kaAdT9B8.js"), "../language/pl-PL.json": () => import("./pl-PL-DD8JN4Qf.js"), "../language/pt-BR.json": () => import("./pt-BR-DeDXIlM_.js"), "../language/pt-PT.json": () => import("./pt-PT-Xm-pm3mb.js"), "../language/ro-RO.json": () => import("./ro-RO-C3m6aJVP.js"), "../language/sk-SK.json": () => import("./sk-SK-BVc-vNQm.js"), "../language/sl-SI.json": () => import("./sl-SI-D_rqR0D7.js"), "../language/sv-SE.json": () => import("./sv-SE-B3zoXMuH.js") }), `../language/${i18n.language}.json`, 3) }
3110
+ {
3111
+ ns: "sof",
3112
+ importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../tasks/SourceOfFundsDropin/language/bg-BG.json": () => import("./bg-BG-Cr0ewJCW.js"), "../tasks/SourceOfFundsDropin/language/cs-CZ.json": () => import("./cs-CZ-7xfNBIeH.js"), "../tasks/SourceOfFundsDropin/language/da-DK.json": () => import("./da-DK-DC8dAHWf.js"), "../tasks/SourceOfFundsDropin/language/de-DE.json": () => import("./de-DE-CY7fT1B5.js"), "../tasks/SourceOfFundsDropin/language/el-GR.json": () => import("./el-GR-C7ThPKtr.js"), "../tasks/SourceOfFundsDropin/language/en-US.json": () => import("./en-US-CozY33On.js"), "../tasks/SourceOfFundsDropin/language/es-ES.json": () => import("./es-ES-Dm8otLm9.js"), "../tasks/SourceOfFundsDropin/language/et-EE.json": () => import("./et-EE-XPQ-Sf9x.js"), "../tasks/SourceOfFundsDropin/language/fi-FI.json": () => import("./fi-FI-CLg2__EV.js"), "../tasks/SourceOfFundsDropin/language/fr-FR.json": () => import("./fr-FR-D7U2da1i.js"), "../tasks/SourceOfFundsDropin/language/hr-HR.json": () => import("./hr-HR-BVzZeaDc.js"), "../tasks/SourceOfFundsDropin/language/hu-HU.json": () => import("./hu-HU-BJpO-WrQ.js"), "../tasks/SourceOfFundsDropin/language/it-IT.json": () => import("./it-IT-5QHf-hkt.js"), "../tasks/SourceOfFundsDropin/language/ja-JP.json": () => import("./ja-JP-a6UbRzaS.js"), "../tasks/SourceOfFundsDropin/language/lt-LT.json": () => import("./lt-LT-Dsy0UVdI.js"), "../tasks/SourceOfFundsDropin/language/lv-LV.json": () => import("./lv-LV-BiilWzcg.js"), "../tasks/SourceOfFundsDropin/language/nl-NL.json": () => import("./nl-NL-DKYvsnqM.js"), "../tasks/SourceOfFundsDropin/language/no-NO.json": () => import("./no-NO-Bj0_2wjm.js"), "../tasks/SourceOfFundsDropin/language/pl-PL.json": () => import("./pl-PL-B8pWxq6T.js"), "../tasks/SourceOfFundsDropin/language/pt-PT.json": () => import("./pt-PT-Gsd7I9Ff.js"), "../tasks/SourceOfFundsDropin/language/ro-RO.json": () => import("./ro-RO-B4ASHhK6.js"), "../tasks/SourceOfFundsDropin/language/sk-SK.json": () => import("./sk-SK-DibZzOqt.js"), "../tasks/SourceOfFundsDropin/language/sl-SI.json": () => import("./sl-SI-D9rl7bIN.js"), "../tasks/SourceOfFundsDropin/language/sv-SE.json": () => import("./sv-SE-Ez33Bdgp.js") }), `../tasks/SourceOfFundsDropin/language/${i18n.language}.json`, 5)
3113
+ }
3081
3114
  ]);
3082
3115
  if (!rootLe) {
3083
3116
  return /* @__PURE__ */ jsx(Loader, {});