@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.
- package/README.md +31 -43
- package/dist/{AcceptTermsOfServiceComponent-Bo8nB0Eb.js → AcceptTermsOfServiceComponent-DTURkN9O.js} +17 -20
- package/dist/{AccountSetupRejected-DQcFbIXL.js → AccountSetupRejected-D7yqqcm_.js} +2 -2
- package/dist/{ActionBar-Bj1Km-LP.js → ActionBar-CdFYb-7S.js} +2 -2
- package/dist/{Address-C0rbmhQL.js → Address-BkeFTMl-.js} +16 -16
- package/dist/{Avatar-Cl1-jo6c.js → Avatar-BpQFX0rJ.js} +2 -2
- package/dist/{BusinessFinancingComponent-Bk0PbC9m.js → BusinessFinancingComponent-CshEgNjO.js} +5 -5
- package/dist/{BusinessFinancingDropin-BAYyFYt9.js → BusinessFinancingDropin-B2kKDCNB.js} +31 -34
- package/dist/{BusinessFinancingPage-Cc--qt48.js → BusinessFinancingPage-96zTF7BJ.js} +4 -4
- package/dist/{BusinessTypeSelectionPage-C63ujxOo.js → BusinessTypeSelectionPage-BVucjw8H.js} +9 -14
- package/dist/{Checkbox-DnP0i74G.js → Checkbox-Dwf4zXgj.js} +2 -2
- package/dist/{Confirm-Bf4Pjkty.js → Confirm-DOjzHnlC.js} +3 -3
- package/dist/{ConstitutionalDocument-CddO3OSY.js → ConstitutionalDocument-C4HWFtJ-.js} +336 -92
- package/dist/{ContactDetails-BZ7dqNuH.js → ContactDetails-ByrH32Jo.js} +12 -7
- package/dist/{ContextGuidance-0XKaQ9Ba.js → ContextGuidance-BUczCMV3.js} +2 -2
- package/dist/{CountryField-BTwq-LdM.js → CountryField-C9nbUmpe.js} +3 -3
- package/dist/{CreateIndividualComponent-B0RfIm2Q.js → CreateIndividualComponent-AOb8RP8N.js} +6 -6
- package/dist/{CreateTransferInstrumentComponent-XiVVyTGX.js → CreateTransferInstrumentComponent-BBytn3E3.js} +5 -5
- package/dist/{Currency-COs4cPiC.js → Currency-B1ApVUnP.js} +7 -7
- package/dist/{CustomerSupport-WsGepkci.js → CustomerSupport-DDtZA5jI.js} +11 -16
- package/dist/{DebugModal-BG-xZugG.js → DebugModal-wXFq4cg1.js} +127 -98
- package/dist/DecisionMakerDetails-Up9HU_qy.js +275 -0
- package/dist/{DecisionMakerDetailsPage-BNDJ4G9u.js → DecisionMakerDetailsPage-OeI7y1aX.js} +10 -10
- package/dist/{DecisionMakers-BkgGDV_d.js → DecisionMakers-5bUJ4S4V.js} +22 -259
- package/dist/{Dropzone-1307mgIt.js → Dropzone-Bf8v-4iJ.js} +4 -4
- package/dist/{EmbeddedStatus-C9Scvouz.js → EmbeddedStatus-DQmqyOzv.js} +3 -3
- package/dist/{EndStateLayout-D8bTvH_H.js → EndStateLayout-DZgYKmw6.js} +2 -2
- package/dist/{EntityAssociation-CFtBLGS6.js → EntityAssociation-Dc8O6xJv.js} +5 -5
- package/dist/{EntityGuidanceStatus-5wNdPvGh.js → EntityGuidanceStatus-DhCqUWGF.js} +4 -4
- package/dist/{ErrorPanel-DNuuMh-W.js → ErrorPanel-4HIDH4sr.js} +11 -12
- package/dist/{Field-DhgxtDHi.js → Field-CWq5XOh3.js} +2 -2
- package/dist/{FormNavigation-CNUCAuSA.js → FormNavigation-CDlQZRNb.js} +3 -3
- package/dist/{Individual.rules-BMayKVCw.js → Individual.rules-BhSXCdTl.js} +12 -12
- package/dist/{IndividualDropin-CNYG1UJb.js → IndividualDropin-DS8kUrXB.js} +252 -97
- package/dist/{InputDate-UU6golKr.js → InputDate-C2NEOpK4.js} +1 -1
- package/dist/{InputText-B_Dy6ooB.js → InputText-20pWI3ja.js} +2 -2
- package/dist/{Introduction-Dal7p5Mk.js → Introduction-D6x5z2oe.js} +4 -9
- package/dist/InvitedDecisionMakerComponent-Bg-DMehe.js +211 -0
- package/dist/{JpAddress-DEzR_98l.js → JpAddress-CX4IfNRB.js} +11 -11
- package/dist/{LandingLayout-CHRI270t.js → LandingLayout-y-X0NrR1.js} +2 -2
- package/dist/{LegalCompanyNameField-BtcoTH2A.js → LegalCompanyNameField-lEerISaT.js} +16 -16
- package/dist/{LegalRepresentativeDetailsPage-DkeUe4ta.js → LegalRepresentativeDetailsPage-C6dOsu1g.js} +5 -5
- package/dist/{Link-Bl_GjNYw.js → Link-DeFoaStC.js} +2 -2
- package/dist/{ListItem-DvSwwjUU.js → ListItem-BFxtRiVb.js} +3 -3
- package/dist/{LoaderWrapper-Coambg3s.js → LoaderWrapper-Bh1b67kY.js} +2 -2
- package/dist/{ManageIndividualComponent-Cg7imjd5.js → ManageIndividualComponent-DHYNg_KN.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-DIblbnOJ.js → ManageTermsOfServiceComponent-BNzELB7A.js} +4 -4
- package/dist/{ManageTransferInstrumentComponent-COucevgP.js → ManageTransferInstrumentComponent-9r84TFsu.js} +11 -11
- package/dist/{MaskedInput-CFPRK30D.js → MaskedInput-DPSvsK95.js} +5 -5
- package/dist/{MaybeModal-BBBJD1jn.js → MaybeModal-BbrppFfg.js} +3 -3
- package/dist/{Modal-DJLTbW4Y.js → Modal-CAVcW_pH.js} +2 -2
- package/dist/{Name-Bu38kdOA.js → Name-eQhc9Vta.js} +4 -4
- package/dist/{NewSummary-oIcQyhuq.js → NewSummary-B_xfd8vG.js} +5 -5
- package/dist/{OnboardingDropinComponent-DqQmqcO8.js → OnboardingDropinComponent-BRZuLCE8.js} +145 -218
- package/dist/{PayoutDetailsDropin-D7AR5BSQ.js → PayoutDetailsDropin-B6ZMIVid.js} +183 -1065
- package/dist/{PayoutDetailsPage-BCBGGB28.js → PayoutDetailsPage-BSzf6sev.js} +6 -6
- package/dist/{RadioGroup-DCmqcl_S.js → RadioGroup-BZ-EfNXM.js} +2 -2
- package/dist/{Review-DQA1vIzH.js → Review-BVeMAC7t.js} +6 -6
- package/dist/{RootBusinessDetailsPage--bsR-yKt.js → RootBusinessDetailsPage-OlgTozou.js} +6 -6
- package/dist/{RootBusinessLinesPage-DIYKqsLt.js → RootBusinessLinesPage-CUwKkzZU.js} +93 -91
- package/dist/{RootIndividualDetailsPage-CXKr1vhL.js → RootIndividualDetailsPage-CqP8gdvk.js} +7 -6
- package/dist/{Select-CyK-d8L8.js → Select-DSLn5CCG.js} +4 -4
- package/dist/{SignPCIComponent-BvAt735T.js → SignPCIComponent-CT6GL442.js} +12 -19
- package/dist/{SingpassSelection-Cidszm4a.js → SingpassSelection-BORgM-de.js} +144 -7
- package/dist/{SoleProprietorshipPage-CgAHjrJh.js → SoleProprietorshipPage-BylQa2F1.js} +5 -5
- package/dist/{SourceOfFundsPage-Rh40Ip6D.js → SourceOfFundsPage-Br-FaeUd.js} +270 -98
- package/dist/{StepProgressIndicator-C38x_hKs.js → StepProgressIndicator-ZZsrHrtb.js} +2 -2
- package/dist/{StoreProvider-o79GZkUo.js → StoreProvider-lJLpl6iE.js} +155 -148
- package/dist/{Summary-DbPdEnQi.js → Summary-DdFh8LL0.js} +25 -22
- package/dist/{TaxInformationField-C6DdzDTL.js → TaxInformationField-5nazrzc4.js} +568 -795
- package/dist/{TaxReportingDropin-Dc75TUYl.js → TaxReportingDropin-DAeAPOI5.js} +26 -26
- package/dist/{TextArea-XLgx9WmG.js → TextArea-D0eJRv8v.js} +2 -2
- package/dist/{TileGroup-DsYUn_bt.js → TileGroup-C8YY0Xwv.js} +3 -3
- package/dist/{TrustDetailsPage-B_QUEYM5.js → TrustDetailsPage-BHo4SFbD.js} +64 -65
- package/dist/{TrustMemberCompanyPage-aBW14Thb.js → TrustMemberCompanyPage-CZMF952c.js} +7 -7
- package/dist/{TrustMemberIndividualPage-DNgZI75l.js → TrustMemberIndividualPage-RSIXbPaf.js} +6 -6
- package/dist/{TrustMemberRoleAndTypePage-CbOyf3oB.js → TrustMemberRoleAndTypePage-BehlWyo7.js} +27 -27
- package/dist/{TrustMembersOverview-7waB6Dud.js → TrustMembersOverview-KI0J7peC.js} +16 -18
- package/dist/{UnincorporatedPartnershipIndividualPage-DFvESJUR.js → UnincorporatedPartnershipIndividualPage-CNf-sPP4.js} +5 -5
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-j2xmgM94.js → UnincorporatedPartnershipMemberCompanyPage-OyKeY30-.js} +6 -6
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-BlJsglW1.js → UnincorporatedPartnershipMemberRoleAndTypePage-Bt21JX-F.js} +11 -11
- package/dist/{UnincorporatedPartnershipMembersOverview-1-yK01Ox.js → UnincorporatedPartnershipMembersOverview-DdTGn8QH.js} +7 -7
- package/dist/{VerificationErrorAlert-BsJqccUV.js → VerificationErrorAlert-ChGZqC_p.js} +3 -3
- package/dist/{ViewVerificationStatusComponent-Bx3tJek7.js → ViewVerificationStatusComponent-9RUetbsi.js} +3 -3
- package/dist/adyen-business-financing.js +4 -4
- package/dist/adyen-individual-configuration.js +4 -4
- package/dist/adyen-individual-status.js +4 -4
- package/dist/adyen-invited-decision-maker.js +4 -117
- package/dist/adyen-kyc-components.js +17 -17
- package/dist/adyen-onboarding.js +4 -4
- package/dist/adyen-terms-of-service-management.js +4 -4
- package/dist/adyen-terms-of-service-status.js +4 -4
- package/dist/adyen-transfer-instrument-configuration.js +4 -4
- package/dist/adyen-transfer-instrument-management.js +4 -4
- package/dist/adyen-verification-status.js +4 -4
- package/dist/{bafinUtils-sfpUKqEq.js → bafinUtils-m56sOqio.js} +2 -2
- package/dist/{commonValidators-h59h4U6_.js → commonValidators-cEWuPs2I.js} +1 -1
- package/dist/{dropinUtils-C78qUFNH.js → dropinUtils-B-qE8vvG.js} +53 -9
- package/dist/en-US-CJDkXFZ6.js +13 -0
- package/dist/en-US-CTbVLoNF.js +13 -0
- package/dist/en-US-CfazE4ht.js +13 -0
- package/dist/{en-US-G607HIyo.js → en-US-DPoDE0uz.js} +7 -7
- package/dist/en-US-DrUYyPhF.js +13 -0
- package/dist/{formUtils-D9HJXrvu.js → formUtils-DjInEErz.js} +3 -3
- package/dist/{getName-C1Pp12yX.js → getName-CzAV6RHp.js} +2 -2
- package/dist/{getProblemsForEntity-CyQdh7Lw.js → getProblemsForEntity-CVzYoCCC.js} +2 -2
- package/dist/getTrustedFields-BeaCYGD7.js +104 -0
- package/dist/{isEmpty-Dxhg5YWQ.js → isEmpty-CRqBruDc.js} +1 -1
- package/dist/japanSupportUtils-BK4rTASp.js +16 -0
- package/dist/{localizeDateString-ltj3KR-p.js → localizeDateString-BSZiJcEb.js} +2 -2
- package/dist/{mapExistingFile-J5xtIyOp.js → mapExistingFile-BcvOzQNH.js} +3 -76
- package/dist/{mapJpAddressSchemaToAddressLocalizations-BCTFanCP.js → mapJpAddressSchemaToAddressLocalizations-BgHjkrJG.js} +2 -36
- package/dist/{mapLegalEntityToIndividualSchema-fUEX0pyE.js → mapLegalEntityToIndividualSchema-_HlywUjg.js} +4 -4
- package/dist/{mapTransferInstrumentToPayoutAccount-BxS7kMUd.js → mapTransferInstrumentToPayoutAccount-69DkBhXm.js} +2 -2
- package/dist/omitObscuredFieldsIfUnchanged-tsdNkCyN.js +29 -0
- package/dist/{patternValidators-DmtoCjEe.js → patternValidators-DuOaKe_S.js} +2 -2
- package/dist/{process-field-configurations-Bo_HZH3p.js → process-field-configurations-DcWH0t4d.js} +2 -2
- package/dist/{resolveEnvironment-9pYwfLRr.js → resolveEnvironment-Bs-ygpN1.js} +17 -24
- package/dist/{roleMetadata-ZbDuZjur.js → roleMetadata-B-2OBUCV.js} +3 -3
- package/dist/style.css +230 -275
- package/dist/styles-CLV89_hH.js +230 -275
- package/dist/types/api/toggles/useToggles.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -29
- package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/BankVerification/verification/{widget → overlay}/types.d.ts +4 -14
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +4 -5
- package/dist/types/components/Business/forms/rules.d.ts +1 -1
- package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +2 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsGettingStarted.d.ts +6 -0
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +2 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/validate.d.ts +7 -5
- package/dist/types/components/Business/utils/companyUtil.d.ts +2 -2
- package/dist/types/components/Business/utils/formatDataForSummary.d.ts +3 -2
- package/dist/types/components/Business/utils/submit.d.ts +1 -1
- package/dist/types/components/Business/utils/useCompanySearchFeature.d.ts +5 -0
- package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
- package/dist/types/components/Contract/tasks/PciDropin/PciDropin.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +9 -9
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +11 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +15 -0
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +5 -4
- package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +3 -3
- package/dist/types/components/Individual/forms/IdNowVerificationModal/IFrameWidget.d.ts +9 -0
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +1 -1
- package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerSubmitSuccess/InvitedDecisionMakerSubmitSuccess.d.ts +6 -1
- package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useTaskStatusWithTimeout.d.ts +15 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +14 -0
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -0
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -1
- package/dist/types/components/Shared/devex/DebugListener/DebugTogglesAndSettings.d.ts +8 -0
- package/dist/types/components/Shared/devex/DebugListener/debugInfo.d.ts +2 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/RegistrationNumberTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +12 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → BusinessRegistrationNumberField/RegistrationNumberTypeSelector}/getDefaultRegistrationNumberType.d.ts +4 -4
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → BusinessRegistrationNumberField/RegistrationNumberTypeSelector}/inferCompanyRegistrationNumberType.d.ts +3 -3
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/registrationNumberTypes.d.ts +92 -0
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +8 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +0 -483
- package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +2 -2
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +2 -2
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/TaxIdNumberTypeSelector.d.ts +5 -5
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/getDefaultTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/inferTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +1 -2
- package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +232 -0
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +8 -0
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/VatNumberTypeSelector.d.ts +14 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → VatNumberField/VatNumberTypeSelector}/getDefaultVatNumberType.d.ts +2 -2
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/inferVatNumberType.d.ts +3 -0
- package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +1 -2
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +10 -1
- package/dist/types/components/Shared/fields/VatNumberField/vatNumberTypes.d.ts +149 -0
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +5 -0
- package/dist/types/components/Shared/forms/Address/utils.d.ts +6 -1
- package/dist/types/components/Shared/forms/Address/validate.d.ts +3 -3
- package/dist/types/components/Trust/mapping/mapLegalEntityToTrust.d.ts +2 -2
- package/dist/types/components/Trust/mapping/mapTrustToLegalEntity.d.ts +2 -2
- package/dist/types/components/Trust/tasks/TrustDropin/validate.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/mapping/mapLegalEntityToUnincorporatedPartnership.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/mapping/mapUnincorporatedPartnershipToLegalEntity.d.ts +2 -2
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +5 -0
- package/dist/types/context/FormRouterContext/FormRouterContextProvider.d.ts +1 -1
- package/dist/types/context/FormRouterContext/types.d.ts +1 -0
- package/dist/types/context/FormRouterContext/useFormRouterContext.d.ts +4 -0
- package/dist/types/context/SettingsContext/types.d.ts +2 -0
- package/dist/types/context/ToggleContext/ToggleContext.d.ts +2 -0
- package/dist/types/context/ToggleContext/ToggleContextProvider.d.ts +9 -0
- package/dist/types/context/{ExperimentContext → ToggleContext}/types.d.ts +42 -32
- package/dist/types/context/ToggleContext/useToggleContext.d.ts +1 -0
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +3 -3
- package/dist/types/core/UIElement/UIElement.d.ts +3 -2
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/embeds/baseEmbedProps.d.ts +3 -3
- package/dist/types/hooks/useFormComposer.d.ts +1 -0
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +1 -1
- package/dist/types/hooks/useTaskLandedEvent.d.ts +7 -0
- package/dist/types/language/types.d.ts +2 -9
- package/dist/types/language/utils.d.ts +2 -2
- package/dist/types/router/routeConfig.d.ts +1 -0
- package/dist/types/stores/globalStore/taskTypes.d.ts +1 -0
- package/dist/types/types/form-rules.d.ts +2 -2
- package/dist/types/utils/api/processCapabilitites.d.ts +1 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/japanSupportUtils.d.ts +2 -2
- package/dist/{types-Bbb9XYx7.js → types-C4u-zy-W.js} +2 -2
- package/dist/{types-_ugkpUNx.js → types-CTwBMnPB.js} +46 -37
- package/dist/{types-Dz6L62GR.js → types-Cop44iUw.js} +2 -2
- package/dist/{types-CQ2p58-6.js → types-Dv0COrvY.js} +3 -2
- package/dist/{types-C4ieOutZ.js → types-QKgg5_IB.js} +2 -2
- package/dist/{unincorporated-partnership-BC2PWEgm.js → unincorporated-partnership-DCtqSVs0.js} +2 -2
- package/dist/{useAssociatedLegalEntity-BSvkLl8Y.js → useAssociatedLegalEntity-COa3bZhe.js} +2 -2
- package/dist/{useBusinessDetailsData-BMzgGX4d.js → useBusinessDetailsData-DslnLoRz.js} +443 -397
- package/dist/{useCreateLegalEntity-i6pKh0i4.js → useCreateLegalEntity-CO7qV3Sc.js} +2 -2
- package/dist/{useForm-CdWcC_Oh.js → useForm-F0hPmSqd.js} +3 -3
- package/dist/{useFormContext-DGfVqoR2.js → useFormContext-EeYo1zte.js} +17 -8
- package/dist/{useGlobalData-B6jCg1Ek.js → useGlobalData-DKxTj6bo.js} +24 -15
- package/dist/{useMultiForm-Cmp2wrss.js → useMultiForm-CR9pqYjq.js} +4 -4
- package/dist/{useOnboardingStatus-Dm_xuWC2.js → useOnboardingStatus-D2I19RDh.js} +2 -2
- package/dist/{useScenarios-ho-q4vGs.js → useScenarios-BvV1t76w.js} +2 -2
- package/dist/{useTermsOfServiceStatus-Dof1-HII.js → useTermsOfServiceStatus-C0uqYCFG.js} +2 -2
- package/dist/{useToastContext-CflZZ_Su.js → useToastContext-Dl59lP3Q.js} +2 -2
- package/dist/{useUnincorporatedPartnershipMembers-rfHqZZWF.js → useUnincorporatedPartnershipMembers-BRQxcrvc.js} +5 -5
- package/dist/{useUpdateBusinessLines-vNF2Y_nP.js → useUpdateBusinessLines-FG7FE2l9.js} +6 -6
- package/dist/{useUpdateLegalEntity-CtdSLVIW.js → useUpdateLegalEntity-Dr3e1mG2.js} +3 -3
- package/dist/{utils-CPWcV5kL.js → utils-2-VlpJvY.js} +2 -2
- package/dist/{utils-DHB6YxqA.js → utils-Bmx7w6cI.js} +6 -6
- package/dist/{utils-CXn7BO_7.js → utils-CCjjhUUz.js} +53 -6
- package/dist/{utils-CF18b8u8.js → utils-CWrDCmo5.js} +22 -2
- package/dist/{utils-DXCw1aJK.js → utils-DCXRR-sY.js} +1 -1
- package/dist/{validate-DPhS2sGf.js → validate-B--uGfCw.js} +1 -1
- package/dist/{validate-BH9M6gvx.js → validate-DdW_lr56.js} +3 -3
- package/dist/{validationError-BDDYiyYy.js → validationError-DmyvOY60.js} +2 -2
- package/package.json +1 -5
- package/dist/RadioGroupCard-nQz2Uhca.js +0 -152
- package/dist/en-US--1W760fR.js +0 -13
- package/dist/en-US-CKLQU2sJ.js +0 -13
- package/dist/en-US-CozY33On.js +0 -13
- package/dist/en-US-DLY20x1O.js +0 -13
- package/dist/iframeWidget-D-vHGFmR.js +0 -234
- package/dist/instant-verification-UrnuHTYn.js +0 -40
- package/dist/japanSupportUtils-C5HeKRQ7.js +0 -16
- package/dist/manual-verification-BO8zgAYT.js +0 -41
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocument.d.ts +0 -5
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +0 -9
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirementsModal.d.ts +0 -6
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/BankVerificationWidget.d.ts +0 -3
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/iframeWidget.d.ts +0 -32
- package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
- package/dist/types/components/Business/utils/useCompanySearchExperiments.d.ts +0 -5
- package/dist/types/components/Shared/devex/DebugListener/DebugExperimentsAndSettings.d.ts +0 -7
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +0 -20
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +0 -21
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +0 -3
- package/dist/types/context/ExperimentContext/ExperimentsContext.d.ts +0 -2
- package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +0 -8
- package/dist/types/context/ExperimentContext/useExperimentsContext.d.ts +0 -1
- 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] = "
|
|
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,
|
|
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-
|
|
12
|
+
import { u as useCapabilityProblems, g as getProblemsForEntity } from "./getProblemsForEntity-CVzYoCCC.js";
|
|
13
13
|
import { useState, useMemo, useCallback, useEffect } from "preact/hooks";
|
|
14
|
-
import {
|
|
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-
|
|
17
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-
|
|
18
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
19
|
-
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-
|
|
20
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-
|
|
21
|
-
import { u as useMultiForm } from "./useMultiForm-
|
|
22
|
-
import { c as createDocumentRequest, d as documentApiUtils } from "./validate-
|
|
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-
|
|
26
|
-
import { c as createFormUtils } from "./formUtils-
|
|
27
|
-
import { F as Field } from "./Field-
|
|
28
|
-
import { S as Select } from "./Select-
|
|
29
|
-
import { T as TextArea } from "./TextArea-
|
|
30
|
-
import { I as InputDate } from "./InputDate-
|
|
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-
|
|
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
|
|
34
|
-
import { R as RadioGroup } from "./RadioGroup-
|
|
35
|
-
import { C as CountryField } from "./CountryField-
|
|
36
|
-
import { A as Avatar } from "./Avatar-
|
|
37
|
-
import { M as Modal } from "./Modal-
|
|
38
|
-
import { C as Confirm } from "./Confirm-
|
|
39
|
-
import {
|
|
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 {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
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-
|
|
47
|
-
import { v as validateDateNotInTheFuture } from "./validate-
|
|
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__ */
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
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 {
|
|
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
|
-
|
|
1940
|
-
|
|
1941
|
-
(businessLine) => mapSourceOfFundToSourceOfFundsSchema(businessLine)
|
|
1977
|
+
setAllBusinessLines(
|
|
1978
|
+
(prev) => objectsDeepEqual(prev, normalizedBusinessLines) ? prev : normalizedBusinessLines
|
|
1942
1979
|
);
|
|
1943
|
-
if (
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
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
|
-
}, [
|
|
2002
|
+
}, [
|
|
2003
|
+
sofBusinessLines,
|
|
2004
|
+
areLegalEntitiesLoading,
|
|
2005
|
+
normalizedBusinessLines,
|
|
2006
|
+
activeBusinessLine,
|
|
2007
|
+
sofT,
|
|
2008
|
+
logger
|
|
2009
|
+
]);
|
|
1964
2010
|
useEffect(() => {
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
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
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
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
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
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
|
-
}, [
|
|
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
|
|
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-
|
|
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] = "
|
|
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,
|
|
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";
|