@adyen/kyc-components 4.5.0 → 4.6.0-beta.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 (268) hide show
  1. package/README.md +31 -43
  2. package/dist/{AcceptTermsOfServiceComponent-Bo8nB0Eb.js → AcceptTermsOfServiceComponent-DTURkN9O.js} +17 -20
  3. package/dist/{AccountSetupRejected-DQcFbIXL.js → AccountSetupRejected-D7yqqcm_.js} +2 -2
  4. package/dist/{ActionBar-Bj1Km-LP.js → ActionBar-CdFYb-7S.js} +2 -2
  5. package/dist/{Address-C0rbmhQL.js → Address-BkeFTMl-.js} +16 -16
  6. package/dist/{Avatar-Cl1-jo6c.js → Avatar-BpQFX0rJ.js} +2 -2
  7. package/dist/{BusinessFinancingComponent-Bk0PbC9m.js → BusinessFinancingComponent-CshEgNjO.js} +5 -5
  8. package/dist/{BusinessFinancingDropin-BAYyFYt9.js → BusinessFinancingDropin-B2kKDCNB.js} +31 -34
  9. package/dist/{BusinessFinancingPage-Cc--qt48.js → BusinessFinancingPage-96zTF7BJ.js} +4 -4
  10. package/dist/{BusinessTypeSelectionPage-C63ujxOo.js → BusinessTypeSelectionPage-BVucjw8H.js} +9 -14
  11. package/dist/{Checkbox-DnP0i74G.js → Checkbox-Dwf4zXgj.js} +2 -2
  12. package/dist/{Confirm-Bf4Pjkty.js → Confirm-DOjzHnlC.js} +3 -3
  13. package/dist/{ConstitutionalDocument-CddO3OSY.js → ConstitutionalDocument-C4HWFtJ-.js} +336 -92
  14. package/dist/{ContactDetails-BZ7dqNuH.js → ContactDetails-ByrH32Jo.js} +12 -7
  15. package/dist/{ContextGuidance-0XKaQ9Ba.js → ContextGuidance-BUczCMV3.js} +2 -2
  16. package/dist/{CountryField-BTwq-LdM.js → CountryField-C9nbUmpe.js} +3 -3
  17. package/dist/{CreateIndividualComponent-B0RfIm2Q.js → CreateIndividualComponent-AOb8RP8N.js} +6 -6
  18. package/dist/{CreateTransferInstrumentComponent-XiVVyTGX.js → CreateTransferInstrumentComponent-BBytn3E3.js} +5 -5
  19. package/dist/{Currency-COs4cPiC.js → Currency-B1ApVUnP.js} +7 -7
  20. package/dist/{CustomerSupport-WsGepkci.js → CustomerSupport-DDtZA5jI.js} +11 -16
  21. package/dist/{DebugModal-BG-xZugG.js → DebugModal-wXFq4cg1.js} +127 -98
  22. package/dist/DecisionMakerDetails-Up9HU_qy.js +275 -0
  23. package/dist/{DecisionMakerDetailsPage-BNDJ4G9u.js → DecisionMakerDetailsPage-OeI7y1aX.js} +10 -10
  24. package/dist/{DecisionMakers-BkgGDV_d.js → DecisionMakers-5bUJ4S4V.js} +22 -259
  25. package/dist/{Dropzone-1307mgIt.js → Dropzone-Bf8v-4iJ.js} +4 -4
  26. package/dist/{EmbeddedStatus-C9Scvouz.js → EmbeddedStatus-DQmqyOzv.js} +3 -3
  27. package/dist/{EndStateLayout-D8bTvH_H.js → EndStateLayout-DZgYKmw6.js} +2 -2
  28. package/dist/{EntityAssociation-CFtBLGS6.js → EntityAssociation-Dc8O6xJv.js} +5 -5
  29. package/dist/{EntityGuidanceStatus-5wNdPvGh.js → EntityGuidanceStatus-DhCqUWGF.js} +4 -4
  30. package/dist/{ErrorPanel-DNuuMh-W.js → ErrorPanel-4HIDH4sr.js} +11 -12
  31. package/dist/{Field-DhgxtDHi.js → Field-CWq5XOh3.js} +2 -2
  32. package/dist/{FormNavigation-CNUCAuSA.js → FormNavigation-CDlQZRNb.js} +3 -3
  33. package/dist/{Individual.rules-BMayKVCw.js → Individual.rules-BhSXCdTl.js} +12 -12
  34. package/dist/{IndividualDropin-CNYG1UJb.js → IndividualDropin-DS8kUrXB.js} +252 -97
  35. package/dist/{InputDate-UU6golKr.js → InputDate-C2NEOpK4.js} +1 -1
  36. package/dist/{InputText-B_Dy6ooB.js → InputText-20pWI3ja.js} +2 -2
  37. package/dist/{Introduction-Dal7p5Mk.js → Introduction-D6x5z2oe.js} +4 -9
  38. package/dist/InvitedDecisionMakerComponent-Bg-DMehe.js +211 -0
  39. package/dist/{JpAddress-DEzR_98l.js → JpAddress-CX4IfNRB.js} +11 -11
  40. package/dist/{LandingLayout-CHRI270t.js → LandingLayout-y-X0NrR1.js} +2 -2
  41. package/dist/{LegalCompanyNameField-BtcoTH2A.js → LegalCompanyNameField-lEerISaT.js} +16 -16
  42. package/dist/{LegalRepresentativeDetailsPage-DkeUe4ta.js → LegalRepresentativeDetailsPage-C6dOsu1g.js} +5 -5
  43. package/dist/{Link-Bl_GjNYw.js → Link-DeFoaStC.js} +2 -2
  44. package/dist/{ListItem-DvSwwjUU.js → ListItem-BFxtRiVb.js} +3 -3
  45. package/dist/{LoaderWrapper-Coambg3s.js → LoaderWrapper-Bh1b67kY.js} +2 -2
  46. package/dist/{ManageIndividualComponent-Cg7imjd5.js → ManageIndividualComponent-DHYNg_KN.js} +5 -5
  47. package/dist/{ManageTermsOfServiceComponent-DIblbnOJ.js → ManageTermsOfServiceComponent-BNzELB7A.js} +4 -4
  48. package/dist/{ManageTransferInstrumentComponent-COucevgP.js → ManageTransferInstrumentComponent-9r84TFsu.js} +11 -11
  49. package/dist/{MaskedInput-CFPRK30D.js → MaskedInput-DPSvsK95.js} +5 -5
  50. package/dist/{MaybeModal-BBBJD1jn.js → MaybeModal-BbrppFfg.js} +3 -3
  51. package/dist/{Modal-DJLTbW4Y.js → Modal-CAVcW_pH.js} +2 -2
  52. package/dist/{Name-Bu38kdOA.js → Name-eQhc9Vta.js} +4 -4
  53. package/dist/{NewSummary-oIcQyhuq.js → NewSummary-B_xfd8vG.js} +5 -5
  54. package/dist/{OnboardingDropinComponent-DqQmqcO8.js → OnboardingDropinComponent-BRZuLCE8.js} +145 -218
  55. package/dist/{PayoutDetailsDropin-D7AR5BSQ.js → PayoutDetailsDropin-B6ZMIVid.js} +183 -1065
  56. package/dist/{PayoutDetailsPage-BCBGGB28.js → PayoutDetailsPage-BSzf6sev.js} +6 -6
  57. package/dist/{RadioGroup-DCmqcl_S.js → RadioGroup-BZ-EfNXM.js} +2 -2
  58. package/dist/{Review-DQA1vIzH.js → Review-BVeMAC7t.js} +6 -6
  59. package/dist/{RootBusinessDetailsPage--bsR-yKt.js → RootBusinessDetailsPage-OlgTozou.js} +6 -6
  60. package/dist/{RootBusinessLinesPage-DIYKqsLt.js → RootBusinessLinesPage-CUwKkzZU.js} +93 -91
  61. package/dist/{RootIndividualDetailsPage-CXKr1vhL.js → RootIndividualDetailsPage-CqP8gdvk.js} +7 -6
  62. package/dist/{Select-CyK-d8L8.js → Select-DSLn5CCG.js} +4 -4
  63. package/dist/{SignPCIComponent-BvAt735T.js → SignPCIComponent-CT6GL442.js} +12 -19
  64. package/dist/{SingpassSelection-Cidszm4a.js → SingpassSelection-BORgM-de.js} +144 -7
  65. package/dist/{SoleProprietorshipPage-CgAHjrJh.js → SoleProprietorshipPage-BylQa2F1.js} +5 -5
  66. package/dist/{SourceOfFundsPage-Rh40Ip6D.js → SourceOfFundsPage-Br-FaeUd.js} +270 -98
  67. package/dist/{StepProgressIndicator-C38x_hKs.js → StepProgressIndicator-ZZsrHrtb.js} +2 -2
  68. package/dist/{StoreProvider-o79GZkUo.js → StoreProvider-lJLpl6iE.js} +155 -148
  69. package/dist/{Summary-DbPdEnQi.js → Summary-DdFh8LL0.js} +25 -22
  70. package/dist/{TaxInformationField-C6DdzDTL.js → TaxInformationField-5nazrzc4.js} +568 -795
  71. package/dist/{TaxReportingDropin-Dc75TUYl.js → TaxReportingDropin-DAeAPOI5.js} +26 -26
  72. package/dist/{TextArea-XLgx9WmG.js → TextArea-D0eJRv8v.js} +2 -2
  73. package/dist/{TileGroup-DsYUn_bt.js → TileGroup-C8YY0Xwv.js} +3 -3
  74. package/dist/{TrustDetailsPage-B_QUEYM5.js → TrustDetailsPage-BHo4SFbD.js} +64 -65
  75. package/dist/{TrustMemberCompanyPage-aBW14Thb.js → TrustMemberCompanyPage-CZMF952c.js} +7 -7
  76. package/dist/{TrustMemberIndividualPage-DNgZI75l.js → TrustMemberIndividualPage-RSIXbPaf.js} +6 -6
  77. package/dist/{TrustMemberRoleAndTypePage-CbOyf3oB.js → TrustMemberRoleAndTypePage-BehlWyo7.js} +27 -27
  78. package/dist/{TrustMembersOverview-7waB6Dud.js → TrustMembersOverview-KI0J7peC.js} +16 -18
  79. package/dist/{UnincorporatedPartnershipIndividualPage-DFvESJUR.js → UnincorporatedPartnershipIndividualPage-CNf-sPP4.js} +5 -5
  80. package/dist/{UnincorporatedPartnershipMemberCompanyPage-j2xmgM94.js → UnincorporatedPartnershipMemberCompanyPage-OyKeY30-.js} +6 -6
  81. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-BlJsglW1.js → UnincorporatedPartnershipMemberRoleAndTypePage-Bt21JX-F.js} +11 -11
  82. package/dist/{UnincorporatedPartnershipMembersOverview-1-yK01Ox.js → UnincorporatedPartnershipMembersOverview-DdTGn8QH.js} +7 -7
  83. package/dist/{VerificationErrorAlert-BsJqccUV.js → VerificationErrorAlert-ChGZqC_p.js} +3 -3
  84. package/dist/{ViewVerificationStatusComponent-Bx3tJek7.js → ViewVerificationStatusComponent-9RUetbsi.js} +3 -3
  85. package/dist/adyen-business-financing.js +4 -4
  86. package/dist/adyen-individual-configuration.js +4 -4
  87. package/dist/adyen-individual-status.js +4 -4
  88. package/dist/adyen-invited-decision-maker.js +4 -117
  89. package/dist/adyen-kyc-components.js +17 -17
  90. package/dist/adyen-onboarding.js +4 -4
  91. package/dist/adyen-terms-of-service-management.js +4 -4
  92. package/dist/adyen-terms-of-service-status.js +4 -4
  93. package/dist/adyen-transfer-instrument-configuration.js +4 -4
  94. package/dist/adyen-transfer-instrument-management.js +4 -4
  95. package/dist/adyen-verification-status.js +4 -4
  96. package/dist/{bafinUtils-sfpUKqEq.js → bafinUtils-m56sOqio.js} +2 -2
  97. package/dist/{commonValidators-h59h4U6_.js → commonValidators-cEWuPs2I.js} +1 -1
  98. package/dist/{dropinUtils-C78qUFNH.js → dropinUtils-B-qE8vvG.js} +53 -9
  99. package/dist/en-US-CJDkXFZ6.js +13 -0
  100. package/dist/en-US-CTbVLoNF.js +13 -0
  101. package/dist/en-US-CfazE4ht.js +13 -0
  102. package/dist/{en-US-G607HIyo.js → en-US-DPoDE0uz.js} +7 -7
  103. package/dist/en-US-DrUYyPhF.js +13 -0
  104. package/dist/{formUtils-D9HJXrvu.js → formUtils-DjInEErz.js} +3 -3
  105. package/dist/{getName-C1Pp12yX.js → getName-CzAV6RHp.js} +2 -2
  106. package/dist/{getProblemsForEntity-CyQdh7Lw.js → getProblemsForEntity-CVzYoCCC.js} +2 -2
  107. package/dist/getTrustedFields-BeaCYGD7.js +104 -0
  108. package/dist/{isEmpty-Dxhg5YWQ.js → isEmpty-CRqBruDc.js} +1 -1
  109. package/dist/japanSupportUtils-BK4rTASp.js +16 -0
  110. package/dist/{localizeDateString-ltj3KR-p.js → localizeDateString-BSZiJcEb.js} +2 -2
  111. package/dist/{mapExistingFile-J5xtIyOp.js → mapExistingFile-BcvOzQNH.js} +3 -76
  112. package/dist/{mapJpAddressSchemaToAddressLocalizations-BCTFanCP.js → mapJpAddressSchemaToAddressLocalizations-BgHjkrJG.js} +2 -36
  113. package/dist/{mapLegalEntityToIndividualSchema-fUEX0pyE.js → mapLegalEntityToIndividualSchema-_HlywUjg.js} +4 -4
  114. package/dist/{mapTransferInstrumentToPayoutAccount-BxS7kMUd.js → mapTransferInstrumentToPayoutAccount-69DkBhXm.js} +2 -2
  115. package/dist/omitObscuredFieldsIfUnchanged-tsdNkCyN.js +29 -0
  116. package/dist/{patternValidators-DmtoCjEe.js → patternValidators-DuOaKe_S.js} +2 -2
  117. package/dist/{process-field-configurations-Bo_HZH3p.js → process-field-configurations-DcWH0t4d.js} +2 -2
  118. package/dist/{resolveEnvironment-9pYwfLRr.js → resolveEnvironment-Bs-ygpN1.js} +17 -24
  119. package/dist/{roleMetadata-ZbDuZjur.js → roleMetadata-B-2OBUCV.js} +3 -3
  120. package/dist/style.css +230 -275
  121. package/dist/styles-CLV89_hH.js +230 -275
  122. package/dist/types/api/toggles/useToggles.d.ts +2 -1
  123. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +2 -1
  124. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -29
  125. package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +1 -1
  126. package/dist/types/components/BankAccount/forms/BankVerification/verification/{widget → overlay}/types.d.ts +4 -14
  127. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +1 -1
  128. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +4 -5
  129. package/dist/types/components/Business/forms/rules.d.ts +1 -1
  130. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +2 -2
  131. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsGettingStarted.d.ts +6 -0
  132. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +2 -2
  133. package/dist/types/components/Business/tasks/BusinessDetailsDropin/validate.d.ts +7 -5
  134. package/dist/types/components/Business/utils/companyUtil.d.ts +2 -2
  135. package/dist/types/components/Business/utils/formatDataForSummary.d.ts +3 -2
  136. package/dist/types/components/Business/utils/submit.d.ts +1 -1
  137. package/dist/types/components/Business/utils/useCompanySearchFeature.d.ts +5 -0
  138. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +1 -1
  139. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
  140. package/dist/types/components/Contract/tasks/PciDropin/PciDropin.d.ts +1 -1
  141. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +9 -9
  142. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +11 -0
  143. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +15 -0
  144. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +5 -4
  145. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +3 -3
  146. package/dist/types/components/Individual/forms/IdNowVerificationModal/IFrameWidget.d.ts +9 -0
  147. package/dist/types/components/Individual/forms/Individual.rules.d.ts +1 -1
  148. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
  149. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -2
  150. package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerSubmitSuccess/InvitedDecisionMakerSubmitSuccess.d.ts +6 -1
  151. package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useTaskStatusWithTimeout.d.ts +15 -0
  152. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +14 -0
  153. package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
  154. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -0
  155. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -1
  156. package/dist/types/components/Shared/devex/DebugListener/DebugTogglesAndSettings.d.ts +8 -0
  157. package/dist/types/components/Shared/devex/DebugListener/debugInfo.d.ts +2 -1
  158. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/RegistrationNumberTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +12 -0
  159. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → BusinessRegistrationNumberField/RegistrationNumberTypeSelector}/getDefaultRegistrationNumberType.d.ts +4 -4
  160. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → BusinessRegistrationNumberField/RegistrationNumberTypeSelector}/inferCompanyRegistrationNumberType.d.ts +3 -3
  161. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
  162. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/registrationNumberTypes.d.ts +92 -0
  163. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +8 -1
  164. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +0 -483
  165. package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -1
  166. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +2 -2
  167. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
  168. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +2 -2
  169. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  170. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -0
  171. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/TaxIdNumberTypeSelector.d.ts +5 -5
  172. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/getDefaultTaxIdNumberType.d.ts +5 -5
  173. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/inferTaxIdNumberType.d.ts +5 -5
  174. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +1 -2
  175. package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +232 -0
  176. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +8 -0
  177. package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/VatNumberTypeSelector.d.ts +14 -0
  178. package/dist/types/components/Shared/fields/{IdFieldTypeSelector → VatNumberField/VatNumberTypeSelector}/getDefaultVatNumberType.d.ts +2 -2
  179. package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/inferVatNumberType.d.ts +3 -0
  180. package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +1 -2
  181. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +10 -1
  182. package/dist/types/components/Shared/fields/VatNumberField/vatNumberTypes.d.ts +149 -0
  183. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +5 -0
  184. package/dist/types/components/Shared/forms/Address/utils.d.ts +6 -1
  185. package/dist/types/components/Shared/forms/Address/validate.d.ts +3 -3
  186. package/dist/types/components/Trust/mapping/mapLegalEntityToTrust.d.ts +2 -2
  187. package/dist/types/components/Trust/mapping/mapTrustToLegalEntity.d.ts +2 -2
  188. package/dist/types/components/Trust/tasks/TrustDropin/validate.d.ts +2 -2
  189. package/dist/types/components/UnincorporatedPartnership/mapping/mapLegalEntityToUnincorporatedPartnership.d.ts +2 -2
  190. package/dist/types/components/UnincorporatedPartnership/mapping/mapUnincorporatedPartnershipToLegalEntity.d.ts +2 -2
  191. package/dist/types/components/index.d.ts +2 -2
  192. package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +5 -0
  193. package/dist/types/context/FormRouterContext/FormRouterContextProvider.d.ts +1 -1
  194. package/dist/types/context/FormRouterContext/types.d.ts +1 -0
  195. package/dist/types/context/FormRouterContext/useFormRouterContext.d.ts +4 -0
  196. package/dist/types/context/SettingsContext/types.d.ts +2 -0
  197. package/dist/types/context/ToggleContext/ToggleContext.d.ts +2 -0
  198. package/dist/types/context/ToggleContext/ToggleContextProvider.d.ts +9 -0
  199. package/dist/types/context/{ExperimentContext → ToggleContext}/types.d.ts +42 -32
  200. package/dist/types/context/ToggleContext/useToggleContext.d.ts +1 -0
  201. package/dist/types/core/EmbedShell/EmbedShell.d.ts +3 -3
  202. package/dist/types/core/UIElement/UIElement.d.ts +3 -2
  203. package/dist/types/core/models/api/organization.d.ts +1 -1
  204. package/dist/types/embeds/baseEmbedProps.d.ts +3 -3
  205. package/dist/types/hooks/useFormComposer.d.ts +1 -0
  206. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +1 -1
  207. package/dist/types/hooks/useTaskLandedEvent.d.ts +7 -0
  208. package/dist/types/language/types.d.ts +2 -9
  209. package/dist/types/language/utils.d.ts +2 -2
  210. package/dist/types/router/routeConfig.d.ts +1 -0
  211. package/dist/types/stores/globalStore/taskTypes.d.ts +1 -0
  212. package/dist/types/types/form-rules.d.ts +2 -2
  213. package/dist/types/utils/api/processCapabilitites.d.ts +1 -1
  214. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  215. package/dist/types/utils/japanSupportUtils.d.ts +2 -2
  216. package/dist/{types-Bbb9XYx7.js → types-C4u-zy-W.js} +2 -2
  217. package/dist/{types-_ugkpUNx.js → types-CTwBMnPB.js} +46 -37
  218. package/dist/{types-Dz6L62GR.js → types-Cop44iUw.js} +2 -2
  219. package/dist/{types-CQ2p58-6.js → types-Dv0COrvY.js} +3 -2
  220. package/dist/{types-C4ieOutZ.js → types-QKgg5_IB.js} +2 -2
  221. package/dist/{unincorporated-partnership-BC2PWEgm.js → unincorporated-partnership-DCtqSVs0.js} +2 -2
  222. package/dist/{useAssociatedLegalEntity-BSvkLl8Y.js → useAssociatedLegalEntity-COa3bZhe.js} +2 -2
  223. package/dist/{useBusinessDetailsData-BMzgGX4d.js → useBusinessDetailsData-DslnLoRz.js} +443 -397
  224. package/dist/{useCreateLegalEntity-i6pKh0i4.js → useCreateLegalEntity-CO7qV3Sc.js} +2 -2
  225. package/dist/{useForm-CdWcC_Oh.js → useForm-F0hPmSqd.js} +3 -3
  226. package/dist/{useFormContext-DGfVqoR2.js → useFormContext-EeYo1zte.js} +17 -8
  227. package/dist/{useGlobalData-B6jCg1Ek.js → useGlobalData-DKxTj6bo.js} +24 -15
  228. package/dist/{useMultiForm-Cmp2wrss.js → useMultiForm-CR9pqYjq.js} +4 -4
  229. package/dist/{useOnboardingStatus-Dm_xuWC2.js → useOnboardingStatus-D2I19RDh.js} +2 -2
  230. package/dist/{useScenarios-ho-q4vGs.js → useScenarios-BvV1t76w.js} +2 -2
  231. package/dist/{useTermsOfServiceStatus-Dof1-HII.js → useTermsOfServiceStatus-C0uqYCFG.js} +2 -2
  232. package/dist/{useToastContext-CflZZ_Su.js → useToastContext-Dl59lP3Q.js} +2 -2
  233. package/dist/{useUnincorporatedPartnershipMembers-rfHqZZWF.js → useUnincorporatedPartnershipMembers-BRQxcrvc.js} +5 -5
  234. package/dist/{useUpdateBusinessLines-vNF2Y_nP.js → useUpdateBusinessLines-FG7FE2l9.js} +6 -6
  235. package/dist/{useUpdateLegalEntity-CtdSLVIW.js → useUpdateLegalEntity-Dr3e1mG2.js} +3 -3
  236. package/dist/{utils-CPWcV5kL.js → utils-2-VlpJvY.js} +2 -2
  237. package/dist/{utils-DHB6YxqA.js → utils-Bmx7w6cI.js} +6 -6
  238. package/dist/{utils-CXn7BO_7.js → utils-CCjjhUUz.js} +53 -6
  239. package/dist/{utils-CF18b8u8.js → utils-CWrDCmo5.js} +22 -2
  240. package/dist/{utils-DXCw1aJK.js → utils-DCXRR-sY.js} +1 -1
  241. package/dist/{validate-DPhS2sGf.js → validate-B--uGfCw.js} +1 -1
  242. package/dist/{validate-BH9M6gvx.js → validate-DdW_lr56.js} +3 -3
  243. package/dist/{validationError-BDDYiyYy.js → validationError-DmyvOY60.js} +2 -2
  244. package/package.json +1 -5
  245. package/dist/RadioGroupCard-nQz2Uhca.js +0 -152
  246. package/dist/en-US--1W760fR.js +0 -13
  247. package/dist/en-US-CKLQU2sJ.js +0 -13
  248. package/dist/en-US-CozY33On.js +0 -13
  249. package/dist/en-US-DLY20x1O.js +0 -13
  250. package/dist/iframeWidget-D-vHGFmR.js +0 -234
  251. package/dist/instant-verification-UrnuHTYn.js +0 -40
  252. package/dist/japanSupportUtils-C5HeKRQ7.js +0 -16
  253. package/dist/manual-verification-BO8zgAYT.js +0 -41
  254. package/dist/types/components/BankAccount/forms/BankDocument/BankDocument.d.ts +0 -5
  255. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +0 -9
  256. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirementsModal.d.ts +0 -6
  257. package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/BankVerificationWidget.d.ts +0 -3
  258. package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/iframeWidget.d.ts +0 -32
  259. package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
  260. package/dist/types/components/Business/utils/useCompanySearchExperiments.d.ts +0 -5
  261. package/dist/types/components/Shared/devex/DebugListener/DebugExperimentsAndSettings.d.ts +0 -7
  262. package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +0 -20
  263. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +0 -21
  264. package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +0 -3
  265. package/dist/types/context/ExperimentContext/ExperimentsContext.d.ts +0 -2
  266. package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +0 -8
  267. package/dist/types/context/ExperimentContext/useExperimentsContext.d.ts +0 -1
  268. package/dist/types/utils/bankVerification/dom.d.ts +0 -1
@@ -2,49 +2,51 @@
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] = "f695ba6f-74db-43b7-ba25-679d9fc7cc1c", e._sentryDebugIdIdentifier = "sentry-dbid-f695ba6f-74db-43b7-ba25-679d9fc7cc1c");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b54fae94-a110-45ed-a0d3-ce9bce69b48d", e._sentryDebugIdIdentifier = "sentry-dbid-b54fae94-a110-45ed-a0d3-ce9bce69b48d");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
- import { b as useApiContext, h as httpPost, j as httpGet, u as useTranslation, O as Typography, G as Alert, W as Button, ac as translateTranslatable, V as Loader, B as Icon, C as IconButton, Z as TASK_STATUS_POLLING_INTERVAL_MS, aB as Header, P as StackLayout, m as createLogger, R as useLegalEntity, U as ROOT_LE, z as useAnalyticsContext, bS as useLegalEntities, a as addResourceBundles, w as EntityTypes, a9 as getLegalEntityCountry, _ as __variableDynamicImportRuntimeHelper } from "./StoreProvider-o79GZkUo.js";
10
+ import { b as useApiContext, j as httpPost, k as httpGet, u as useTranslation, N as Typography, C as Alert, V as Button, ab as translateTranslatable, U as Loader, z as Icon, B as IconButton, Y as TASK_STATUS_POLLING_INTERVAL_MS, aB as Header, O as StackLayout, ae as createLogger, P as useLegalEntity, R as ROOT_LE, x as useAnalyticsContext, bQ as useLegalEntities, ah as objectsDeepEqual, a as addResourceBundles, E as EntityTypes, a8 as getLegalEntityCountry, _ as __variableDynamicImportRuntimeHelper } from "./StoreProvider-lJLpl6iE.js";
11
11
  import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
12
- import { u as useCapabilityProblems, g as getProblemsForEntity } from "./getProblemsForEntity-CyQdh7Lw.js";
12
+ import { u as useCapabilityProblems, g as getProblemsForEntity } from "./getProblemsForEntity-CVzYoCCC.js";
13
13
  import { useState, useMemo, useCallback, useEffect } from "preact/hooks";
14
- import { f as useTaskStatus, j as useBusinessLines } from "./OnboardingDropinComponent-DqQmqcO8.js";
14
+ import { h as useBusinessLines } from "./OnboardingDropinComponent-BRZuLCE8.js";
15
15
  import { useMutation, useQuery, useQueryClient } from "@tanstack/preact-query";
16
- import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-CflZZ_Su.js";
17
- import { u as useCreateLegalEntity } from "./useCreateLegalEntity-i6pKh0i4.js";
18
- import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-CtdSLVIW.js";
19
- import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-DGfVqoR2.js";
20
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-C78qUFNH.js";
21
- import { u as useMultiForm } from "./useMultiForm-Cmp2wrss.js";
22
- import { c as createDocumentRequest, d as documentApiUtils } from "./validate-BH9M6gvx.js";
16
+ import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-Dl59lP3Q.js";
17
+ import { u as useCreateLegalEntity } from "./useCreateLegalEntity-CO7qV3Sc.js";
18
+ import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-Dr3e1mG2.js";
19
+ import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-EeYo1zte.js";
20
+ import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-B-qE8vvG.js";
21
+ import { u as useMultiForm } from "./useMultiForm-CR9pqYjq.js";
22
+ import { c as createDocumentRequest, d as documentApiUtils } from "./validate-DdW_lr56.js";
23
+ import { i as isEmpty } from "./isEmpty-CRqBruDc.js";
23
24
  import { f as formatObject } from "./utils-DNSfZiio.js";
24
25
  import { signal } from "@preact/signals";
25
- import { E as ErrorPanel } from "./ErrorPanel-DNuuMh-W.js";
26
- import { c as createFormUtils } from "./formUtils-D9HJXrvu.js";
27
- import { F as Field } from "./Field-DhgxtDHi.js";
28
- import { S as Select } from "./Select-CyK-d8L8.js";
29
- import { T as TextArea } from "./TextArea-XLgx9WmG.js";
30
- import { I as InputDate } from "./InputDate-UU6golKr.js";
26
+ import { E as ErrorPanel } from "./ErrorPanel-4HIDH4sr.js";
27
+ import { c as createFormUtils } from "./formUtils-DjInEErz.js";
28
+ import { F as Field } from "./Field-CWq5XOh3.js";
29
+ import { S as Select } from "./Select-DSLn5CCG.js";
30
+ import { T as TextArea } from "./TextArea-D0eJRv8v.js";
31
+ import { I as InputDate } from "./InputDate-C2NEOpK4.js";
31
32
  import { I as InputGroup } from "./InputGroup-WBfGDV5F.js";
32
- import { I as InputText } from "./InputText-B_Dy6ooB.js";
33
- import { a as allowedCurrencies, T as TODAY_DATE, b as formatDateForInput, S as SOF_CHARACTERS_LIMIT, g as getInputErrors, c as formatAmountWithCurrency, s as sofCategoryItemMapper, d as getPageHeadings, e as getServiceTranslationSelectTitle, h as getSofCardDetails, i as getGettingStartedCardDetails, j as getAdditionalDataSchemaKeys, k as getServiceTranslation, p as parseSOFDocumentDescription, l as getRelevantErrors, m as getUniqueRemediationActions, n as SOF_INVALID_INPUT_ERROR_CODES, o as getServiceTranslationKey, q as getDocumentRequirements, r as getDocumentLists, t as getSourceOfFundsRequiredFields, M as MISSING_DATA_SOF_UPLOAD_CODE, u as parseOriginatorDetails, v as getSourceOfFundsRequiredForms, w as getSourceOfFundsPayload, A as ALLOWED_SOF_SERVICES, x as parseSofOriginatorPayload } from "./utils-CXn7BO_7.js";
34
- import { R as RadioGroup } from "./RadioGroup-DCmqcl_S.js";
35
- import { C as CountryField } from "./CountryField-BTwq-LdM.js";
36
- import { A as Avatar } from "./Avatar-Cl1-jo6c.js";
37
- import { M as Modal } from "./Modal-DJLTbW4Y.js";
38
- import { C as Confirm } from "./Confirm-Bf4Pjkty.js";
39
- import { T as TileGroup } from "./TileGroup-DsYUn_bt.js";
33
+ import { I as InputText } from "./InputText-20pWI3ja.js";
34
+ import { a as allowedCurrencies, T as TODAY_DATE, b as formatDateForInput, S as SOF_CHARACTERS_LIMIT, g as getInputErrors, c as formatAmountWithCurrency, s as sofCategoryItemMapper, d as getPageHeadings, e as getServiceTranslationSelectTitle, h as getSofCardDetails, i as getGettingStartedCardDetails, j as getAdditionalDataSchemaKeys, k as getServiceTranslation, p as parseSOFDocumentDescription, l as getRelevantErrors, m as getUniqueRemediationActions, n as SOF_INVALID_INPUT_ERROR_CODES, o as getServiceTranslationKey, q as getDocumentRequirements, r as getDocumentLists, t as getSourceOfFundsRequiredFields, M as MISSING_DATA_SOF_UPLOAD_CODE, u as parseOriginatorDetails, v as getApplicableBusinessLines, w as areSourceOfFundsEqual, x as getSourceOfFundsRequiredForms, y as getSourceOfFundsPayload, z as getAdditionalDataForOriginator, A as ALLOWED_SOF_SERVICES, B as parseSofOriginatorPayload } from "./utils-CCjjhUUz.js";
35
+ import { R as RadioGroup } from "./RadioGroup-BZ-EfNXM.js";
36
+ import { C as CountryField } from "./CountryField-C9nbUmpe.js";
37
+ import { A as Avatar } from "./Avatar-BpQFX0rJ.js";
38
+ import { M as Modal } from "./Modal-CAVcW_pH.js";
39
+ import { C as Confirm } from "./Confirm-DOjzHnlC.js";
40
+ import { C as Checkbox } from "./Checkbox-Dwf4zXgj.js";
41
+ import { T as TileGroup } from "./TileGroup-C8YY0Xwv.js";
40
42
  import { lazy } from "preact/compat";
41
- import { I as Image } from "./unincorporated-partnership-BC2PWEgm.js";
42
- import { L as LandingLayout } from "./LandingLayout-CHRI270t.js";
43
- import { i as isEmpty } from "./isEmpty-Dxhg5YWQ.js";
43
+ import { u as useTaskStatus } from "./getTrustedFields-BeaCYGD7.js";
44
+ import { I as Image } from "./unincorporated-partnership-DCtqSVs0.js";
45
+ import { L as LandingLayout } from "./LandingLayout-y-X0NrR1.js";
44
46
  import { C as Card } from "./Card-OQuFzmxm.js";
45
47
  import { S as StructuredList } from "./StructuredList-CNha20ka.js";
46
- import { D as Dropzone } from "./Dropzone-1307mgIt.js";
47
- import { v as validateDateNotInTheFuture } from "./validate-DPhS2sGf.js";
48
+ import { D as Dropzone } from "./Dropzone-Bf8v-4iJ.js";
49
+ import { v as validateDateNotInTheFuture } from "./validate-B--uGfCw.js";
48
50
  const updateSourceOfFunds = async (businessLineId, legalEntityId, baseUrl, data) => {
49
51
  return httpPost(
50
52
  {
@@ -112,6 +114,7 @@ const sourceOfFunds = "adyen-kyc-source-of-funds";
112
114
  const sourceOfFundsWrapperLoading = "adyen-kyc-source-of-funds-wrapper-loading";
113
115
  const sourceOfFundsWrapperHeading = "adyen-kyc-source-of-funds-wrapper-heading";
114
116
  const sourceOfFundsWrapperDescription = "adyen-kyc-source-of-funds-wrapper-description";
117
+ const sourceOfFundsSameAsCheckbox = "adyen-kyc-source-of-funds-same-as-checkbox";
115
118
  const sourceOfFundsGettingStarted = "adyen-kyc-source-of-funds-getting-started";
116
119
  const sourceOfFundsGettingStartedError = "adyen-kyc-source-of-funds-getting-started-error";
117
120
  const sourceOfFundsGettingStartedErrorActions = "adyen-kyc-source-of-funds-getting-started-error-actions";
@@ -137,6 +140,7 @@ const styles = {
137
140
  sourceOfFundsWrapperLoading,
138
141
  sourceOfFundsWrapperHeading,
139
142
  sourceOfFundsWrapperDescription,
143
+ sourceOfFundsSameAsCheckbox,
140
144
  sourceOfFundsGettingStarted,
141
145
  sourceOfFundsGettingStartedError,
142
146
  sourceOfFundsGettingStartedErrorActions,
@@ -1210,11 +1214,17 @@ function SourceOfFundsType(props) {
1210
1214
  data: formData,
1211
1215
  categories,
1212
1216
  errors: formErrors,
1213
- fieldValidationErrors: formFieldProblems
1217
+ fieldValidationErrors: formFieldProblems,
1218
+ sameAsOption,
1219
+ useSameAs,
1220
+ onUseSameAsChange
1214
1221
  } = props;
1215
1222
  const { form } = useFormContext();
1216
1223
  const { handleChangeFor } = form;
1217
1224
  const handleFieldChange = (fieldName, mode) => handleChangeFor(fieldName, "sourceOfFundsType", mode);
1225
+ const handleUseSameAsChange = (isChecked) => {
1226
+ onUseSameAsChange?.(isChecked);
1227
+ };
1218
1228
  const formUtils = createFormUtils(props, t);
1219
1229
  const categoryItems = [
1220
1230
  {
@@ -1229,16 +1239,32 @@ function SourceOfFundsType(props) {
1229
1239
  })) ?? []
1230
1240
  ];
1231
1241
  const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
1232
- return /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
1233
- TileGroup,
1234
- {
1235
- name: "type",
1236
- tiles: categoryItems,
1237
- errorMessage: typeof errorMessage !== "boolean" ? translateTranslatable(t, errorMessage) : errorMessage,
1238
- selected: formData?.type ? formData.type : [],
1239
- onChange: handleFieldChange("type", "input")
1240
- }
1241
- ) });
1242
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1243
+ sameAsOption && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsSameAsCheckbox, children: /* @__PURE__ */ jsx(Field, { name: "useSameAs", children: (childProps) => /* @__PURE__ */ jsx(
1244
+ Checkbox,
1245
+ {
1246
+ ...childProps,
1247
+ "aria-required": false,
1248
+ "aria-invalid": false,
1249
+ name: "useSameAs",
1250
+ label: t(($) => $["useSameFundingSourceAndDetails"], {
1251
+ ns: "sof"
1252
+ }),
1253
+ checked: Boolean(useSameAs),
1254
+ onChange: handleUseSameAsChange
1255
+ }
1256
+ ) }) }),
1257
+ /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
1258
+ TileGroup,
1259
+ {
1260
+ name: "type",
1261
+ tiles: categoryItems,
1262
+ errorMessage: typeof errorMessage !== "boolean" ? translateTranslatable(t, errorMessage) : void 0,
1263
+ selected: formData?.type ? formData.type : [],
1264
+ onChange: handleFieldChange("type", "input")
1265
+ }
1266
+ ) })
1267
+ ] });
1242
1268
  }
1243
1269
  function getIconById(id) {
1244
1270
  switch (id) {
@@ -1279,7 +1305,14 @@ function getIconById(id) {
1279
1305
  }
1280
1306
  }
1281
1307
  function SourceOfFunds(props) {
1282
- const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
1308
+ const {
1309
+ activeForm,
1310
+ activeBusinessLine,
1311
+ sourceOfFundsType,
1312
+ sameAsOption,
1313
+ useSameAs,
1314
+ onUseSameAsChange
1315
+ } = props;
1283
1316
  const { form } = useFormContext();
1284
1317
  const { data: formData, errors, valid, fieldProblems: fieldValidationErrors } = form;
1285
1318
  const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
@@ -1321,7 +1354,10 @@ function SourceOfFunds(props) {
1321
1354
  data: formData?.sourceOfFundsType,
1322
1355
  errors: errors?.sourceOfFundsType,
1323
1356
  valid: valid?.sourceOfFundsType,
1324
- fieldValidationErrors: fieldValidationErrors?.sourceOfFundsType
1357
+ fieldValidationErrors: fieldValidationErrors?.sourceOfFundsType,
1358
+ sameAsOption,
1359
+ useSameAs,
1360
+ onUseSameAsChange
1325
1361
  }
1326
1362
  ),
1327
1363
  activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx(
@@ -1862,6 +1898,7 @@ function SourceOfFundsDropin({
1862
1898
  const [gettingStarted, setGettingStarted] = useState(true);
1863
1899
  const [showUploadPage, setShowUploadPage] = useState(false);
1864
1900
  const [loading, setLoading] = useState(false);
1901
+ const [useSameAs, setUseSameAs] = useState(false);
1865
1902
  const { baseUrl, rootLegalEntityId } = useApiContext();
1866
1903
  const { t: sofT } = useTranslation("sof");
1867
1904
  const userEvents = useAnalyticsContext();
@@ -1881,6 +1918,7 @@ function SourceOfFundsDropin({
1881
1918
  const {
1882
1919
  data = activeSourceOfFund,
1883
1920
  setFormData,
1921
+ setData,
1884
1922
  requiredFields,
1885
1923
  isValid,
1886
1924
  triggerValidation
@@ -1936,20 +1974,21 @@ function SourceOfFundsDropin({
1936
1974
  setLoading(true);
1937
1975
  try {
1938
1976
  if (normalizedBusinessLines.length) {
1939
- const firstBusinessLine = normalizedBusinessLines[0];
1940
- const sourceOfFundsMap = normalizedBusinessLines.map(
1941
- (businessLine) => mapSourceOfFundToSourceOfFundsSchema(businessLine)
1977
+ setAllBusinessLines(
1978
+ (prev) => objectsDeepEqual(prev, normalizedBusinessLines) ? prev : normalizedBusinessLines
1942
1979
  );
1943
- if (firstBusinessLine) {
1944
- setActiveBusinessLine(firstBusinessLine);
1945
- const mappedSof = sourceOfFundsMap[0];
1946
- setActiveSourceOfFund(mappedSof);
1947
- setAllBusinessLines(normalizedBusinessLines);
1948
- if (mappedSof?.sourceOfFundsType) {
1949
- setFormData("sourceOfFundsType", mappedSof.sourceOfFundsType);
1950
- }
1951
- if (mappedSof?.additionalData) {
1952
- setFormData("additionalData", mappedSof.additionalData);
1980
+ if (!activeBusinessLine) {
1981
+ const firstBusinessLine = normalizedBusinessLines[0];
1982
+ if (firstBusinessLine) {
1983
+ const mappedSof = mapSourceOfFundToSourceOfFundsSchema(firstBusinessLine);
1984
+ setActiveBusinessLine(firstBusinessLine);
1985
+ setActiveSourceOfFund(mappedSof);
1986
+ if (mappedSof?.sourceOfFundsType) {
1987
+ setFormData("sourceOfFundsType", mappedSof.sourceOfFundsType);
1988
+ }
1989
+ if (mappedSof?.additionalData) {
1990
+ setFormData("additionalData", mappedSof.additionalData);
1991
+ }
1953
1992
  }
1954
1993
  }
1955
1994
  }
@@ -1960,12 +1999,30 @@ function SourceOfFundsDropin({
1960
1999
  setLoading(false);
1961
2000
  }
1962
2001
  }
1963
- }, [sofBusinessLines, areLegalEntitiesLoading, normalizedBusinessLines, sofT, logger]);
2002
+ }, [
2003
+ sofBusinessLines,
2004
+ areLegalEntitiesLoading,
2005
+ normalizedBusinessLines,
2006
+ activeBusinessLine,
2007
+ sofT,
2008
+ logger
2009
+ ]);
1964
2010
  useEffect(() => {
1965
- userEvents.addTaskEvent("Landed on page", {
1966
- actionType: "start"
1967
- });
1968
- }, [userEvents]);
2011
+ if (!gettingStarted && activeBusinessLine && allBusinessLines.length > 1) {
2012
+ const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2013
+ if (applicableBusinessLines.length > 1) {
2014
+ const allHaveSoFType = applicableBusinessLines.every((bl) => bl.sourceOfFunds?.type);
2015
+ if (allHaveSoFType) {
2016
+ const currentSoF = mapSourceOfFundToSourceOfFundsSchema(activeBusinessLine);
2017
+ const allIdentical = applicableBusinessLines.filter((bl) => bl.id !== activeBusinessLine.id).every((bl) => {
2018
+ const blSoF = mapSourceOfFundToSourceOfFundsSchema(bl);
2019
+ return areSourceOfFundsEqual(currentSoF, blSoF);
2020
+ });
2021
+ setUseSameAs(allIdentical);
2022
+ }
2023
+ }
2024
+ }
2025
+ }, [gettingStarted, activeBusinessLine, allBusinessLines]);
1969
2026
  const sourceOfFundsRequiredForms = useMemo(
1970
2027
  () => getSourceOfFundsRequiredForms(data?.sourceOfFundsType),
1971
2028
  [data?.sourceOfFundsType]
@@ -2017,50 +2074,108 @@ function SourceOfFundsDropin({
2017
2074
  setLoadingStatus("loading");
2018
2075
  const { additionalData } = sofData;
2019
2076
  const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
2020
- if (sofType === "donations" || sofType === "inheritance") {
2021
- try {
2022
- sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(
2023
- additionalData,
2024
- activeSourceOfFund?.additionalData
2025
- );
2026
- } catch (e) {
2027
- setSofErrorMessage(e?.message || sofT(($) => $["errorUpdatingSourceOfFunds"]));
2028
- logger.log("Error updating source of funds", e);
2029
- }
2030
- eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2031
- }
2032
2077
  if (sofType === "thirdPartyFunding") {
2033
2078
  eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
2034
2079
  }
2035
- const sofMutationPayload = {
2036
- ...sofPayload,
2037
- businessLineId: activeBusinessLine.id
2038
- };
2039
- try {
2040
- await updateSoFMutation(sofMutationPayload);
2041
- userEvents.addTaskEvent("Success", {
2042
- actionType: "submit",
2043
- returnValue: sofType,
2044
- additionalData: eventsAdditionalData
2080
+ if (sofType === "donations" || sofType === "inheritance") {
2081
+ eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2082
+ }
2083
+ const targetBusinessLines = useSameAs ? getApplicableBusinessLines(allBusinessLines) : [activeBusinessLine];
2084
+ const savePromises = targetBusinessLines.filter((bl) => bl.id).map(async (bl) => {
2085
+ const payload = { ...sofPayload };
2086
+ if (sofType === "donations" || sofType === "inheritance") {
2087
+ try {
2088
+ const blSourceOfFunds = mapSourceOfFundToSourceOfFundsSchema(bl);
2089
+ const blAdditionalData = blSourceOfFunds?.additionalData;
2090
+ const originatorDataForBl = useSameAs ? {
2091
+ ...additionalData,
2092
+ originatorLegalEntityId: blAdditionalData?.originatorLegalEntityId
2093
+ } : getAdditionalDataForOriginator(
2094
+ additionalData,
2095
+ activeSourceOfFund?.additionalData,
2096
+ useSameAs
2097
+ );
2098
+ payload.originatorLegalEntityId = await createOrUpdateOriginator(
2099
+ originatorDataForBl,
2100
+ blAdditionalData
2101
+ );
2102
+ } catch (e) {
2103
+ logger.log("Error creating originator legal entity for business line", e);
2104
+ throw e;
2105
+ }
2106
+ }
2107
+ return updateSoFMutation({
2108
+ ...payload,
2109
+ businessLineId: bl.id
2045
2110
  });
2046
- setGettingStarted(true);
2047
- setShowUploadPage(false);
2048
- setActiveSourceOfFund({ sourceOfFundsType: {}, additionalData: {} });
2049
- gotoFormByFormIndex(0);
2050
- setSofErrorMessage("");
2051
- showToast({ label: sofT(($) => $["successAddedFundingSources"]), variant: "success" });
2052
- const hasUnfilledBusinessLines = allBusinessLines.some(
2053
- (bl) => bl.id !== activeBusinessLine.id && !bl.sourceOfFunds?.type
2054
- );
2055
- if (!hasUnfilledBusinessLines) {
2056
- handleHomeClick?.();
2111
+ });
2112
+ try {
2113
+ const results = await Promise.allSettled(savePromises);
2114
+ const failures = results.filter((r) => r.status === "rejected");
2115
+ if (failures.length > 0) {
2116
+ setSofErrorMessage(
2117
+ sofT(($) => $["errorUpdatingMultipleSourceOfFunds"], { count: failures.length })
2118
+ );
2119
+ logger.error("Failed to update SoF for some business lines", failures);
2120
+ }
2121
+ const successes = results.filter((r) => r.status === "fulfilled");
2122
+ if (successes.length > 0) {
2123
+ userEvents.addTaskEvent("Success", {
2124
+ actionType: "submit",
2125
+ returnValue: sofType,
2126
+ additionalData: {
2127
+ ...eventsAdditionalData,
2128
+ appliedToMultiple: useSameAs,
2129
+ successCount: successes.length,
2130
+ failureCount: failures.length
2131
+ }
2132
+ });
2133
+ setGettingStarted(true);
2134
+ setShowUploadPage(false);
2135
+ setActiveSourceOfFund({ sourceOfFundsType: {}, additionalData: {} });
2136
+ gotoFormByFormIndex(0);
2137
+ setUseSameAs(false);
2138
+ if (failures.length === 0) {
2139
+ showToast({ label: sofT(($) => $["successAddedFundingSources"]), variant: "success" });
2140
+ setSofErrorMessage("");
2141
+ } else {
2142
+ showToast({
2143
+ label: sofT(($) => $["successAddedFundingSources"]),
2144
+ variant: "success"
2145
+ });
2146
+ }
2147
+ if (useSameAs) {
2148
+ } else {
2149
+ const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2150
+ const businessLinesWithSoFAfterSubmit = applicableBusinessLines.filter((bl) => {
2151
+ const wasJustUpdated = targetBusinessLines.some((target) => target.id === bl.id);
2152
+ return wasJustUpdated || !isEmpty(bl.sourceOfFunds);
2153
+ });
2154
+ if (businessLinesWithSoFAfterSubmit.length === applicableBusinessLines.length) {
2155
+ handleHomeClick?.();
2156
+ }
2157
+ }
2158
+ } else {
2159
+ setSofErrorMessage(sofT(($) => $["errorUpdatingSourceOfFunds"]));
2057
2160
  }
2058
2161
  } catch (e) {
2059
2162
  setSofErrorMessage(sofT(($) => $["errorUpdatingSourceOfFunds"]));
2060
2163
  logger.log("Error updating source of funds", e);
2061
2164
  }
2062
2165
  setLoadingStatus("success");
2063
- }, [data, activeSourceOfFund, handleHomeClick, allBusinessLines]);
2166
+ }, [
2167
+ data,
2168
+ activeSourceOfFund,
2169
+ activeBusinessLine,
2170
+ allBusinessLines,
2171
+ useSameAs,
2172
+ updateSoFMutation,
2173
+ createOrUpdateOriginator,
2174
+ userEvents,
2175
+ showToast,
2176
+ sofT,
2177
+ logger
2178
+ ]);
2064
2179
  const handleGettingStarted = useCallback(() => {
2065
2180
  setGettingStarted(!gettingStarted);
2066
2181
  }, [gettingStarted]);
@@ -2068,8 +2183,61 @@ function SourceOfFundsDropin({
2068
2183
  setActiveBusinessLine(businessLine);
2069
2184
  setActiveSourceOfFund(SoF);
2070
2185
  setGettingStarted(false);
2186
+ setUseSameAs(false);
2071
2187
  };
2072
- const { handleNextClick, activeForm, gotoFormByFormIndex, steps, handleBackClick } = useFormComposer({
2188
+ const sameAsOption = useMemo(() => {
2189
+ if (!activeBusinessLine || !allBusinessLines.length) {
2190
+ return void 0;
2191
+ }
2192
+ const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2193
+ if (applicableBusinessLines.length <= 1) {
2194
+ return void 0;
2195
+ }
2196
+ return {
2197
+ businessLineId: "",
2198
+ // Not used anymore
2199
+ productName: sofT(($) => $["useSameFundingSourceAndDetails"]),
2200
+ sourceOfFunds: activeSourceOfFund
2201
+ };
2202
+ }, [activeBusinessLine, allBusinessLines, activeSourceOfFund, sofT]);
2203
+ const setAdditionalDataFields = useCallback(
2204
+ (additionalData) => {
2205
+ if (!additionalData) return;
2206
+ Object.keys(additionalData).forEach((key) => {
2207
+ const fieldKey = key;
2208
+ const value = additionalData[fieldKey];
2209
+ if (value !== void 0) {
2210
+ setData(fieldKey, value, "additionalData");
2211
+ }
2212
+ });
2213
+ },
2214
+ [setData]
2215
+ );
2216
+ const handleUseSameAsChange = useCallback(
2217
+ (checked) => {
2218
+ setUseSameAs(checked);
2219
+ if (checked && sameAsOption) {
2220
+ const { sourceOfFunds: sourceOfFunds2 } = sameAsOption;
2221
+ setActiveSourceOfFund(sourceOfFunds2);
2222
+ setFormData("sourceOfFundsType", sourceOfFunds2.sourceOfFundsType);
2223
+ setAdditionalDataFields(sourceOfFunds2.additionalData);
2224
+ } else if (!checked && activeBusinessLine) {
2225
+ const currentSoF = mapSourceOfFundToSourceOfFundsSchema(activeBusinessLine);
2226
+ setActiveSourceOfFund(currentSoF);
2227
+ setFormData("sourceOfFundsType", currentSoF.sourceOfFundsType);
2228
+ setAdditionalDataFields(currentSoF.additionalData);
2229
+ }
2230
+ },
2231
+ [sameAsOption, activeBusinessLine, setFormData, setAdditionalDataFields]
2232
+ );
2233
+ const {
2234
+ handleNextClick,
2235
+ activeForm,
2236
+ gotoFormByFormIndex,
2237
+ gotoFormByFormId,
2238
+ steps,
2239
+ handleBackClick
2240
+ } = useFormComposer({
2073
2241
  problems,
2074
2242
  forms,
2075
2243
  onSubmit: handleSubmit,
@@ -2116,6 +2284,7 @@ function SourceOfFundsDropin({
2116
2284
  disableNextButton: !activeForm.isValid,
2117
2285
  activeForm,
2118
2286
  gotoFormByFormIndex,
2287
+ gotoFormByFormId,
2119
2288
  handleBackClick: steps.current === 0 ? handleGettingStarted : handleBackClick,
2120
2289
  handleCancelClick: handleHomeClick,
2121
2290
  handleNextClick,
@@ -2129,7 +2298,10 @@ function SourceOfFundsDropin({
2129
2298
  activeForm,
2130
2299
  activeBusinessLine,
2131
2300
  sourceOfFundsType: data?.sourceOfFundsType?.type,
2132
- data: activeSourceOfFund
2301
+ data: activeSourceOfFund,
2302
+ sameAsOption,
2303
+ useSameAs,
2304
+ onUseSameAsChange: handleUseSameAsChange
2133
2305
  }
2134
2306
  )
2135
2307
  }
@@ -2141,7 +2313,7 @@ const SourceOfFundsPage = ({ onSubmit, handleHomeClick }) => {
2141
2313
  const capabilityProblems = useCapabilityProblems();
2142
2314
  const { i18n } = useTranslation();
2143
2315
  addResourceBundles(i18n, [
2144
- { ns: "sof", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../tasks/SourceOfFundsDropin/language/bg-BG.json": () => import("./bg-BG-BvLl6gaB.js"), "../tasks/SourceOfFundsDropin/language/cs-CZ.json": () => import("./cs-CZ-hT5w5It6.js"), "../tasks/SourceOfFundsDropin/language/da-DK.json": () => import("./da-DK-DZwlENGe.js"), "../tasks/SourceOfFundsDropin/language/de-DE.json": () => import("./de-DE-DXR3EpEc.js"), "../tasks/SourceOfFundsDropin/language/el-GR.json": () => import("./el-GR-DtFE64KX.js"), "../tasks/SourceOfFundsDropin/language/en-US.json": () => import("./en-US-CozY33On.js"), "../tasks/SourceOfFundsDropin/language/es-ES.json": () => import("./es-ES-yMXcOjDL.js"), "../tasks/SourceOfFundsDropin/language/et-EE.json": () => import("./et-EE-C8RrUpLm.js"), "../tasks/SourceOfFundsDropin/language/fi-FI.json": () => import("./fi-FI-xqnQ38yC.js"), "../tasks/SourceOfFundsDropin/language/fr-FR.json": () => import("./fr-FR-BSynpexF.js"), "../tasks/SourceOfFundsDropin/language/hr-HR.json": () => import("./hr-HR-D5V7g9H2.js"), "../tasks/SourceOfFundsDropin/language/hu-HU.json": () => import("./hu-HU-hbVM6tMS.js"), "../tasks/SourceOfFundsDropin/language/it-IT.json": () => import("./it-IT-C_651bEP.js"), "../tasks/SourceOfFundsDropin/language/ja-JP.json": () => import("./ja-JP-CvNJvxkQ.js"), "../tasks/SourceOfFundsDropin/language/lt-LT.json": () => import("./lt-LT-Ci357QYQ.js"), "../tasks/SourceOfFundsDropin/language/lv-LV.json": () => import("./lv-LV-Dxe-A5vo.js"), "../tasks/SourceOfFundsDropin/language/nl-NL.json": () => import("./nl-NL-JChnFdCY.js"), "../tasks/SourceOfFundsDropin/language/no-NO.json": () => import("./no-NO--OoWld_l.js"), "../tasks/SourceOfFundsDropin/language/pl-PL.json": () => import("./pl-PL-DtJ3sgVO.js"), "../tasks/SourceOfFundsDropin/language/pt-BR.json": () => import("./pt-BR-C0I_kTQ6.js"), "../tasks/SourceOfFundsDropin/language/pt-PT.json": () => import("./pt-PT-Bf4IV7wp.js"), "../tasks/SourceOfFundsDropin/language/ro-RO.json": () => import("./ro-RO-4j2I7YM7.js"), "../tasks/SourceOfFundsDropin/language/sk-SK.json": () => import("./sk-SK-C5Qmv4E6.js"), "../tasks/SourceOfFundsDropin/language/sl-SI.json": () => import("./sl-SI-BZpXMHiG.js"), "../tasks/SourceOfFundsDropin/language/sv-SE.json": () => import("./sv-SE-DsPdegWB.js") }), `../tasks/SourceOfFundsDropin/language/${lang}.json`, 5) }
2316
+ { ns: "sof", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../tasks/SourceOfFundsDropin/language/bg-BG.json": () => import("./bg-BG-BvLl6gaB.js"), "../tasks/SourceOfFundsDropin/language/cs-CZ.json": () => import("./cs-CZ-hT5w5It6.js"), "../tasks/SourceOfFundsDropin/language/da-DK.json": () => import("./da-DK-DZwlENGe.js"), "../tasks/SourceOfFundsDropin/language/de-DE.json": () => import("./de-DE-DXR3EpEc.js"), "../tasks/SourceOfFundsDropin/language/el-GR.json": () => import("./el-GR-DtFE64KX.js"), "../tasks/SourceOfFundsDropin/language/en-US.json": () => import("./en-US-CfazE4ht.js"), "../tasks/SourceOfFundsDropin/language/es-ES.json": () => import("./es-ES-yMXcOjDL.js"), "../tasks/SourceOfFundsDropin/language/et-EE.json": () => import("./et-EE-C8RrUpLm.js"), "../tasks/SourceOfFundsDropin/language/fi-FI.json": () => import("./fi-FI-xqnQ38yC.js"), "../tasks/SourceOfFundsDropin/language/fr-FR.json": () => import("./fr-FR-BSynpexF.js"), "../tasks/SourceOfFundsDropin/language/hr-HR.json": () => import("./hr-HR-D5V7g9H2.js"), "../tasks/SourceOfFundsDropin/language/hu-HU.json": () => import("./hu-HU-hbVM6tMS.js"), "../tasks/SourceOfFundsDropin/language/it-IT.json": () => import("./it-IT-C_651bEP.js"), "../tasks/SourceOfFundsDropin/language/ja-JP.json": () => import("./ja-JP-CvNJvxkQ.js"), "../tasks/SourceOfFundsDropin/language/lt-LT.json": () => import("./lt-LT-Ci357QYQ.js"), "../tasks/SourceOfFundsDropin/language/lv-LV.json": () => import("./lv-LV-Dxe-A5vo.js"), "../tasks/SourceOfFundsDropin/language/nl-NL.json": () => import("./nl-NL-JChnFdCY.js"), "../tasks/SourceOfFundsDropin/language/no-NO.json": () => import("./no-NO--OoWld_l.js"), "../tasks/SourceOfFundsDropin/language/pl-PL.json": () => import("./pl-PL-DtJ3sgVO.js"), "../tasks/SourceOfFundsDropin/language/pt-BR.json": () => import("./pt-BR-C0I_kTQ6.js"), "../tasks/SourceOfFundsDropin/language/pt-PT.json": () => import("./pt-PT-Bf4IV7wp.js"), "../tasks/SourceOfFundsDropin/language/ro-RO.json": () => import("./ro-RO-4j2I7YM7.js"), "../tasks/SourceOfFundsDropin/language/sk-SK.json": () => import("./sk-SK-C5Qmv4E6.js"), "../tasks/SourceOfFundsDropin/language/sl-SI.json": () => import("./sl-SI-BZpXMHiG.js"), "../tasks/SourceOfFundsDropin/language/sv-SE.json": () => import("./sv-SE-DsPdegWB.js") }), `../tasks/SourceOfFundsDropin/language/${lang}.json`, 5) }
2145
2317
  ]);
2146
2318
  if (!rootLe) {
2147
2319
  return /* @__PURE__ */ jsx(Loader, {});
@@ -2,14 +2,14 @@
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] = "5d0bfbbc-2e63-463f-9715-576f8980eec9", e._sentryDebugIdIdentifier = "sentry-dbid-5d0bfbbc-2e63-463f-9715-576f8980eec9");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "cff67b72-0c0d-4a97-a579-5f22fd96673b", e._sentryDebugIdIdentifier = "sentry-dbid-cff67b72-0c0d-4a97-a579-5f22fd96673b");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx } from "preact/jsx-runtime";
11
11
  import cx from "classnames";
12
- import { u as useTranslation, O as Typography } from "./StoreProvider-o79GZkUo.js";
12
+ import { u as useTranslation, N as Typography } from "./StoreProvider-lJLpl6iE.js";
13
13
  const range = (stop, start = 0, step = 1) => Array.from({ length: (stop - start) / step + 1 }, (_, i) => start + i * step);
14
14
  const progressBar = "adyen-kyc-progress-bar";
15
15
  const progressBarThick = "adyen-kyc-progress-bar-thick";