@adyen/kyc-components 2.36.3 → 2.37.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/dist/es/AT-0q_5SJBQ.js +24 -0
- package/dist/es/AT-BgQV6hNb.js +29 -0
- package/dist/es/AT-njBxlQEe.js +25 -0
- package/dist/es/AU-C8Ubk0YW.js +19 -0
- package/dist/es/AU-DFQDmtVS.js +22 -0
- package/dist/es/AU-Dqj7rU9m.js +31 -0
- package/dist/es/BE-B9YzjIbl.js +21 -0
- package/dist/es/BE-C2-55587.js +20 -0
- package/dist/es/BE-DXN0rypg.js +25 -0
- package/dist/es/BR-B9ECFEsA.js +30 -0
- package/dist/es/BR-Cm5wlqzu.js +26 -0
- package/dist/es/BR-DRRnRMe_.js +24 -0
- package/dist/es/CA-CcUb1PsZ.js +28 -0
- package/dist/es/CA-DF_5NHUp.js +16 -0
- package/dist/es/CA-GPzRNbT4.js +19 -0
- package/dist/es/CH-BN1IKzah.js +20 -0
- package/dist/es/CH-DQ7wM16k.js +20 -0
- package/dist/es/CH-DS_pPGGY.js +20 -0
- package/dist/es/CZ-BC067qOt.js +24 -0
- package/dist/es/CZ-BC6mPfpV.js +28 -0
- package/dist/es/CZ-CGN19Iaf.js +24 -0
- package/dist/es/DE-BPXDYsIg.js +31 -0
- package/dist/es/DE-C2b48uc9.js +26 -0
- package/dist/es/DE-CWIcy4sf.js +25 -0
- package/dist/es/DK-CUV7SrN_.js +23 -0
- package/dist/es/DK-DQdJTd7G.js +24 -0
- package/dist/es/DK-DzkpuGcK.js +22 -0
- package/dist/es/ES-CXBTHBlj.js +24 -0
- package/dist/es/ES-DlS7RO1p.js +24 -0
- package/dist/es/ES-kwu_f0TB.js +33 -0
- package/dist/es/FI-D9lkf5Ag.js +20 -0
- package/dist/es/FI-DJJ7pR5Q.js +22 -0
- package/dist/es/FI-DrPckuaI.js +25 -0
- package/dist/es/FR-C62B055T.js +22 -0
- package/dist/es/FR-CgtCG2F8.js +28 -0
- package/dist/es/FR-CmqiYchK.js +26 -0
- package/dist/es/GB-BsDyOPB2.js +19 -0
- package/dist/es/GB-C3gyya0v.js +23 -0
- package/dist/es/GB-CyOmxXhp.js +31 -0
- package/dist/es/HK-BHvvteyC.js +16 -0
- package/dist/es/HK-DL3Ev2gw.js +22 -0
- package/dist/es/HK-aqSN9boX.js +19 -0
- package/dist/es/HR-BYmZgEjN.js +22 -0
- package/dist/es/HR-BuR2eqt5.js +23 -0
- package/dist/es/HR-lqt3S_K0.js +24 -0
- package/dist/es/HU-BeWCk1sl.js +21 -0
- package/dist/es/HU-CXniaSYg.js +21 -0
- package/dist/es/HU-Cy7JJAmz.js +24 -0
- package/dist/es/IE-BqkOpYi0.js +29 -0
- package/dist/es/IE-DY6xU4Nq.js +16 -0
- package/dist/es/IE-ncc5PJTM.js +19 -0
- package/dist/es/IT-DIpVZHWq.js +25 -0
- package/dist/es/IT-DUpC-s62.js +24 -0
- package/dist/es/IT-o8X0Ep0w.js +24 -0
- package/dist/es/LT-DYEMsFLH.js +25 -0
- package/dist/es/LT-YEft7Aof.js +27 -0
- package/dist/es/LT-vsmh_veZ.js +16 -0
- package/dist/es/NL-Bl-zh21O.js +24 -0
- package/dist/es/NL-C0CXV7LQ.js +26 -0
- package/dist/es/NL-D4GPWO-k.js +18 -0
- package/dist/es/NO-6kmy-zV2.js +24 -0
- package/dist/es/NO-BWDB_9Zh.js +28 -0
- package/dist/es/NO-C2rMiNW_.js +16 -0
- package/dist/es/PL-B6DmYhdz.js +23 -0
- package/dist/es/PL-Cci2LxIN.js +24 -0
- package/dist/es/PL-DfF0yMD3.js +25 -0
- package/dist/es/PT-CiWuVvP4.js +23 -0
- package/dist/es/PT-ClgahH9J.js +25 -0
- package/dist/es/PT-_SJeajc_.js +29 -0
- package/dist/es/RO-B_4Ca0mt.js +20 -0
- package/dist/es/RO-CbO4Kr4f.js +16 -0
- package/dist/es/RO-DzjKAzZD.js +24 -0
- package/dist/es/SE-BJB_aDpP.js +26 -0
- package/dist/es/SE-ClnBSAdx.js +21 -0
- package/dist/es/SE-L3pYtteT.js +24 -0
- package/dist/es/SG-BCG6hbHH.js +19 -0
- package/dist/es/SG-Bys5Yryz.js +25 -0
- package/dist/es/SG-CQ7yymJt.js +21 -0
- package/dist/es/SI-CKmjaPXK.js +22 -0
- package/dist/es/SI-Dba9CKmF.js +25 -0
- package/dist/es/SI-DdcTeBdP.js +24 -0
- package/dist/es/SK-BHbQeHKV.js +21 -0
- package/dist/es/SK-DOx6jvRF.js +24 -0
- package/dist/es/SK-DdRSQwOF.js +28 -0
- package/dist/es/US-BfGmXLD9.js +19 -0
- package/dist/es/US-CtLttEVX.js +26 -0
- package/dist/es/US-Dxp45Utb.js +17 -0
- package/dist/es/adyen-kyc-components.es.js +928 -506
- package/dist/es/company-2-JG34IScE.js +8 -0
- package/dist/es/user-D6swzlYs.js +11 -0
- package/dist/es/user-business-CwS5j1qX.js +11 -0
- package/dist/es/users-3-BdjQ9rEA.js +8 -0
- package/dist/style.css +7777 -5851
- package/dist/types/components/BankVerification/BankVerification.d.ts +1 -1
- package/dist/types/components/BankVerification/types.d.ts +5 -5
- package/dist/types/components/BusinessTypeSelection/component/EntityTypeRadioGroupCard.d.ts +11 -0
- package/dist/types/components/BusinessTypeSelection/utils.d.ts +6 -3
- package/dist/types/components/Company/component/CompanyComponent.d.ts +4 -0
- package/dist/types/components/Company/types.d.ts +2 -1
- package/dist/types/components/CompanyBasics/types.d.ts +3 -3
- package/dist/types/components/CompanyLookup/types.d.ts +4 -4
- package/dist/types/components/CompanySearch/forms.d.ts +2 -0
- package/dist/types/components/DocumentUpload/types.d.ts +4 -0
- package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +0 -3
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +2 -1
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/useServiceAgreement.d.ts +1 -0
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +6 -2
- package/dist/types/components/Dropins/types.d.ts +4 -2
- package/dist/types/components/Individual/types.d.ts +2 -3
- package/dist/types/components/PayoutAccount/types.d.ts +2 -1
- package/dist/types/components/PayoutDetails/types.d.ts +4 -3
- package/dist/types/components/RegistrationDocument/RegistrationDocumentComponent.d.ts +2 -0
- package/dist/types/components/RegistrationDocument/config.d.ts +3 -0
- package/dist/types/components/RegistrationDocument/index.d.ts +1 -0
- package/dist/types/components/RegistrationDocument/types.d.ts +15 -0
- package/dist/types/components/SoleProp/types.d.ts +2 -1
- package/dist/types/components/TaskList/types.d.ts +2 -2
- package/dist/types/components/TaxDocument/TaxDocumentComponent.d.ts +2 -0
- package/dist/types/components/TaxDocument/config.d.ts +3 -0
- package/dist/types/components/TaxDocument/index.d.ts +1 -0
- package/dist/types/components/TaxDocument/types.d.ts +15 -0
- package/dist/types/components/Trust/types.d.ts +2 -1
- package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +2 -2
- package/dist/types/components/internal/EntityAssociation/types.d.ts +2 -2
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCard.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +3 -2
- package/dist/types/components/internal/FormFields/RadioGroupCard/RadioGroupCard.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroupCard/types.d.ts +9 -3
- package/dist/types/components/internal/Icon/Icon.d.ts +4 -0
- package/dist/types/components/internal/Remove/types.d.ts +3 -3
- package/dist/types/components/internal/Summary/Summary.d.ts +1 -1
- package/dist/types/components/internal/Summary/types.d.ts +1 -0
- package/dist/types/components/internal/TaxInformationField/types.d.ts +2 -2
- package/dist/types/components/internal/VatNumberField/types.d.ts +2 -2
- package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +1 -1
- package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +2 -1
- package/dist/types/core/hooks/useCompanySearch/types.d.ts +2 -2
- package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +3 -3
- package/dist/types/core/hooks/useForm/types.d.ts +11 -10
- package/dist/types/core/hooks/useFormComposer.d.ts +2 -2
- package/dist/types/core/hooks/useLocalStorage.d.ts +2 -2
- package/dist/types/core/models/api/contracts.d.ts +6 -0
- package/dist/types/core/models/api/get-configuration.d.ts +2 -1
- package/dist/types/core/models/form-rules.d.ts +2 -0
- package/dist/types/core/models/form.d.ts +1 -0
- package/dist/types/datasets/localized/companyTypeExamples/getCompanyTypeExamplesForCountry.d.ts +5 -0
- package/dist/types/datasets/localized/legalArrangementTypeExamples/getLegalArrangementTypeExamplesForCountry.d.ts +5 -0
- package/dist/types/datasets/localized/legalEntityTypeExamples/getBusinessTypeExamplesForCountry.d.ts +5 -0
- package/dist/types/utils/accountHolderUtils.d.ts +2 -0
- package/dist/types/utils/api/processCapabilitites.d.ts +4 -2
- package/dist/types/utils/getLegalEntityCountry.d.ts +3 -0
- package/dist/types/utils/useStateFromProp.d.ts +2 -2
- package/package.json +1 -1
|
@@ -16,6 +16,16 @@ const useConfigurationApi = () => {
|
|
|
16
16
|
}
|
|
17
17
|
return configurationApi;
|
|
18
18
|
};
|
|
19
|
+
const ExperimentsContext = createContext({
|
|
20
|
+
isExperimentEnabled: () => false
|
|
21
|
+
});
|
|
22
|
+
function useExperimentsContext() {
|
|
23
|
+
const context = useContext(ExperimentsContext);
|
|
24
|
+
if (context === void 0) {
|
|
25
|
+
throw new Error("useExperimentContext must be used within a ExperimentProvider");
|
|
26
|
+
}
|
|
27
|
+
return context;
|
|
28
|
+
}
|
|
19
29
|
const smartling = {
|
|
20
30
|
placeholder_format: "YAML",
|
|
21
31
|
translate_paths: [
|
|
@@ -115,6 +125,7 @@ const browse = "Browse";
|
|
|
115
125
|
const supports = "Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.";
|
|
116
126
|
const complete = "Complete";
|
|
117
127
|
const summary$1 = "Summary";
|
|
128
|
+
const summaryLegalCaption = "By submitting this summary you are confirming the following; I confirm (on behalf of the company that I am authorized to represent), that the information and supporting documentation provided during this KYC process is accurate and up-to-date, and therefore correctly represents the current state of affairs.";
|
|
118
129
|
const selectDocument = "Select a document";
|
|
119
130
|
const passport = "Passport";
|
|
120
131
|
const passportNumber = "Passport number";
|
|
@@ -152,9 +163,9 @@ const verifyPrefilledInfoIsCorrect = "Verify if your prefilled information is co
|
|
|
152
163
|
const legalStructureHeader = "Tell us your legal structure";
|
|
153
164
|
const whatTypeOfCompanyDoYouHave = "What type of company do you have?";
|
|
154
165
|
const privateCompanyTitle = "Private company";
|
|
155
|
-
const privateCompanyDescription = "
|
|
166
|
+
const privateCompanyDescription = "Your company is owned privately and not traded on a public stock exchange. ";
|
|
156
167
|
const publicCompanyTitle = "Public company";
|
|
157
|
-
const publicCompanyDescription = "
|
|
168
|
+
const publicCompanyDescription = "Your company is traded on a public stock exchange, and has to disclose financial information to the public regularly.";
|
|
158
169
|
const partnershipIncorporated = "Incorporated partnership";
|
|
159
170
|
const partnershipUnincorporated = "Unincorporated partnership";
|
|
160
171
|
const partnershipIncorporatedDescription = "An agreement between two or more people who run a business together.";
|
|
@@ -162,9 +173,9 @@ const partnershipUnincorporatedDescription = "You or your partners are personall
|
|
|
162
173
|
const partnershipIncorporatedNewEntryFlowDescription = "You and your partners have limited liability for business debts.";
|
|
163
174
|
const partnershipUnincorporatedNewEntryFlowDescription = "You or your partners are personally liable for business debts.";
|
|
164
175
|
const nonProfitOrCharitableOrgTitle = "Non-profit or charitable organization";
|
|
165
|
-
const nonProfitOrCharitableOrgDescription = "
|
|
176
|
+
const nonProfitOrCharitableOrgDescription = "Your organization has official non-profit or tax-exempt status.";
|
|
166
177
|
const governmentalOrganizationTitle = "Governmental organization";
|
|
167
|
-
const governmentalOrganizationDescription = "
|
|
178
|
+
const governmentalOrganizationDescription = "Your organization is owned by the government or state.";
|
|
168
179
|
const associationIncorporated = "Incorporated association";
|
|
169
180
|
const associationIncorporatedDescription = "A registered entity without profit that's organized around a purpose such as recreation, culture, or charity.";
|
|
170
181
|
const jobTitle = "Job title";
|
|
@@ -279,7 +290,7 @@ const failedToGetPciTemplate = "Failed to get PCI template";
|
|
|
279
290
|
const failedToGetPciTemplateInSelectedLanguageFallbackToEn = "Failed to get the PCI template in the selected language. Falling back to English.";
|
|
280
291
|
const failedToDownloadPci = "Failed to download PCI document(s)";
|
|
281
292
|
const signServiceAgreement = "Sign services agreement";
|
|
282
|
-
const
|
|
293
|
+
const failedToDownloadAcceptedServiceAgreementDocument = "Failed to download accepted service agreement document";
|
|
283
294
|
const paymentProcessingTerms = "Payment Processing Terms";
|
|
284
295
|
const accountHolderTerms = "Account Holder Terms";
|
|
285
296
|
const capitalUserTerms = "Capital User Terms";
|
|
@@ -346,6 +357,7 @@ const decisionMakers = "Decision-makers";
|
|
|
346
357
|
const goToIntroduction = "How does it work?";
|
|
347
358
|
const goToOverview = "Go to overview";
|
|
348
359
|
const goToOverviewFromIntroduction = "Skip intro";
|
|
360
|
+
const previous = "Previous";
|
|
349
361
|
const saveAndGoToOverview = "Save and go to overview";
|
|
350
362
|
const pleaseEnsureTheFollowing = "Please ensure the following section is fulfilled to complete the review of your data.";
|
|
351
363
|
const edit = "Edit";
|
|
@@ -645,11 +657,11 @@ const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for
|
|
|
645
657
|
const changeYourBusinessSetup = "Change your business setup?";
|
|
646
658
|
const someInformationWillNotBeSaved = "Some information that you entered previously will not be saved. ";
|
|
647
659
|
const yesChange = "Yes, change";
|
|
648
|
-
const youAreNotSoleProprietorAndUseBankAccount = "You’re not a sole proprietor and you use a
|
|
660
|
+
const youAreNotSoleProprietorAndUseBankAccount = "You’re not a registered sole proprietor, and you use a bank account in your name.";
|
|
649
661
|
const soleProprietorship = "Sole proprietorship";
|
|
650
|
-
const youAreRegisteredSoleProprietorAndUseBankAccount = "You’re a registered sole proprietor and you use a bank account in your name or sole proprietorship’s name.";
|
|
662
|
+
const youAreRegisteredSoleProprietorAndUseBankAccount = "You’re a registered sole proprietor, and you use a bank account in your name or sole proprietorship’s name.";
|
|
651
663
|
const company = "Company";
|
|
652
|
-
const
|
|
664
|
+
const yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners = "Your business is registered as a separate legal entity from its owners.";
|
|
653
665
|
const trust = "Trust";
|
|
654
666
|
const trustPartnershipOrAssociation = "Trust, partnership, or association";
|
|
655
667
|
const partnershipOrAssociation = "Partnership, or association";
|
|
@@ -662,7 +674,7 @@ const association = "Association";
|
|
|
662
674
|
const partnership = "Partnership";
|
|
663
675
|
const youAreTrusteeManagingTheTrustForBeneficiaries = "You’re a trustee managing the trust for beneficiaries.";
|
|
664
676
|
const jointlyOwnedBusinessWhereTwoOrMorePeopleOperateAndShareProfits = "A jointly owned business where two or more people operate and share profits.";
|
|
665
|
-
const
|
|
677
|
+
const yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose = "Your association is registered. It was set up for recreational, cultural, or non-profit purposes.";
|
|
666
678
|
const ourFinancialServicesAreNotAvailableYetForPartnershipsAndAssociations = "Our financial services aren’t available yet for partnerships and associations";
|
|
667
679
|
const needHelpYouCanAlwaysReachOutToCustomerSupport = "Need help? You can always reach out to customer support.";
|
|
668
680
|
const myName = "My name";
|
|
@@ -771,6 +783,26 @@ const goBackAndProvideDocumentScans = "Go back and provide document scans";
|
|
|
771
783
|
const identityCard = "Identity card";
|
|
772
784
|
const uploadOneOfTheFollowing = "Upload one of the following so we can verify your information:";
|
|
773
785
|
const uploadOneOfTheseDocuments = "Upload one of these documents:";
|
|
786
|
+
const acceptedDocumentsForPrivateCompanies = "Accepted documents for private companies";
|
|
787
|
+
const acceptedDocumentsForPublicCompanies = "Accepted documents for public companies";
|
|
788
|
+
const acceptedDocumentsForPartnerships = "Accepted documents for partnerships";
|
|
789
|
+
const acceptedDocumentsForGovernment = "Accepted documents for government agencies";
|
|
790
|
+
const acceptedDocumentsForNonProfit = "Accepted documents for non-profit organizations";
|
|
791
|
+
const includesLegalCompanyName = "Includes the legal name of your company";
|
|
792
|
+
const includesEIN = "Includes your EIN (Employer Identification Number)";
|
|
793
|
+
const irsCP575 = "IRS CP 575 letter";
|
|
794
|
+
const secForm10k = "SEC Form 10-K";
|
|
795
|
+
const annualReport = "Annual Report";
|
|
796
|
+
const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
|
|
797
|
+
const certificateOfIncorporation = "Certificate of incorporation";
|
|
798
|
+
const certificateOfFormation = "Certificate of formation";
|
|
799
|
+
const secretaryOfStateFiling = "Secretary of State filing";
|
|
800
|
+
const partnerShipAgreement = "Partnership agreement";
|
|
801
|
+
const charter = "Charter";
|
|
802
|
+
const articlesOfIncorporation = "Articles of incorporation";
|
|
803
|
+
const meetingRecords = "Board of directors' meeting records of decisions";
|
|
804
|
+
const secretaryOfStateRegDoc = "Registration document from Secretary of State";
|
|
805
|
+
const certificateOfIncumbency = "Certificate of incumbency";
|
|
774
806
|
const documentIssuedWithinLastYear = "The document must be issued in the last 12 months. If it is older, make sure it contains a signature and a statement of affairs from the last 12 months.";
|
|
775
807
|
const learnMore = "Learn more";
|
|
776
808
|
const doingBusinessAsNameFiling = "Doing business as (DBA) filing";
|
|
@@ -892,9 +924,11 @@ const companyStructureFormName = "Company structure";
|
|
|
892
924
|
const companyStructureFormDescription = "What type of company do you have?";
|
|
893
925
|
const companyOtherDetailsFormName = "Other details";
|
|
894
926
|
const companyRegistrationDocumentFormName = "Registration document";
|
|
895
|
-
const
|
|
927
|
+
const companyRegistrationDocumentHeading = "Upload a registration document";
|
|
928
|
+
const companyRegistrationDocumentFormDescription = "We need an official document to verify your organization’s details.";
|
|
896
929
|
const companyTaxDocumentFormName = "Tax document";
|
|
897
|
-
const
|
|
930
|
+
const companyTaxDocumentFormHeading = "Upload a tax document";
|
|
931
|
+
const companyTaxDocumentFormDescription = "We need an official document to verify your organization’s tax details.";
|
|
898
932
|
const errorMessage_1_10 = "Information couldn’t be verified";
|
|
899
933
|
const errorMessage_1_11 = "Document didn’t meet requirements";
|
|
900
934
|
const errorMessage_1_12 = "Legal entity declined";
|
|
@@ -1245,6 +1279,7 @@ const onboardingRedirectRejectedDescriptionP1 = "Your account can’t be set up.
|
|
|
1245
1279
|
const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
|
|
1246
1280
|
const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
|
|
1247
1281
|
const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
|
|
1282
|
+
const eg_ = "E.g. %{examples}";
|
|
1248
1283
|
const defaultTrans = {
|
|
1249
1284
|
smartling,
|
|
1250
1285
|
close,
|
|
@@ -1337,6 +1372,7 @@ const defaultTrans = {
|
|
|
1337
1372
|
supports,
|
|
1338
1373
|
complete,
|
|
1339
1374
|
summary: summary$1,
|
|
1375
|
+
summaryLegalCaption,
|
|
1340
1376
|
selectDocument,
|
|
1341
1377
|
passport,
|
|
1342
1378
|
passportNumber,
|
|
@@ -1501,7 +1537,7 @@ const defaultTrans = {
|
|
|
1501
1537
|
failedToGetPciTemplateInSelectedLanguageFallbackToEn,
|
|
1502
1538
|
failedToDownloadPci,
|
|
1503
1539
|
signServiceAgreement,
|
|
1504
|
-
|
|
1540
|
+
failedToDownloadAcceptedServiceAgreementDocument,
|
|
1505
1541
|
paymentProcessingTerms,
|
|
1506
1542
|
accountHolderTerms,
|
|
1507
1543
|
capitalUserTerms,
|
|
@@ -1568,6 +1604,7 @@ const defaultTrans = {
|
|
|
1568
1604
|
goToIntroduction,
|
|
1569
1605
|
goToOverview,
|
|
1570
1606
|
goToOverviewFromIntroduction,
|
|
1607
|
+
previous,
|
|
1571
1608
|
saveAndGoToOverview,
|
|
1572
1609
|
pleaseEnsureTheFollowing,
|
|
1573
1610
|
edit,
|
|
@@ -1876,7 +1913,7 @@ const defaultTrans = {
|
|
|
1876
1913
|
soleProprietorship,
|
|
1877
1914
|
youAreRegisteredSoleProprietorAndUseBankAccount,
|
|
1878
1915
|
company,
|
|
1879
|
-
|
|
1916
|
+
yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners,
|
|
1880
1917
|
trust,
|
|
1881
1918
|
trustPartnershipOrAssociation,
|
|
1882
1919
|
partnershipOrAssociation,
|
|
@@ -1889,7 +1926,7 @@ const defaultTrans = {
|
|
|
1889
1926
|
partnership,
|
|
1890
1927
|
youAreTrusteeManagingTheTrustForBeneficiaries,
|
|
1891
1928
|
jointlyOwnedBusinessWhereTwoOrMorePeopleOperateAndShareProfits,
|
|
1892
|
-
|
|
1929
|
+
yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose,
|
|
1893
1930
|
ourFinancialServicesAreNotAvailableYetForPartnershipsAndAssociations,
|
|
1894
1931
|
needHelpYouCanAlwaysReachOutToCustomerSupport,
|
|
1895
1932
|
myName,
|
|
@@ -2000,6 +2037,26 @@ const defaultTrans = {
|
|
|
2000
2037
|
identityCard,
|
|
2001
2038
|
uploadOneOfTheFollowing,
|
|
2002
2039
|
uploadOneOfTheseDocuments,
|
|
2040
|
+
acceptedDocumentsForPrivateCompanies,
|
|
2041
|
+
acceptedDocumentsForPublicCompanies,
|
|
2042
|
+
acceptedDocumentsForPartnerships,
|
|
2043
|
+
acceptedDocumentsForGovernment,
|
|
2044
|
+
acceptedDocumentsForNonProfit,
|
|
2045
|
+
includesLegalCompanyName,
|
|
2046
|
+
includesEIN,
|
|
2047
|
+
irsCP575,
|
|
2048
|
+
secForm10k,
|
|
2049
|
+
annualReport,
|
|
2050
|
+
irsScheduleK1,
|
|
2051
|
+
certificateOfIncorporation,
|
|
2052
|
+
certificateOfFormation,
|
|
2053
|
+
secretaryOfStateFiling,
|
|
2054
|
+
partnerShipAgreement,
|
|
2055
|
+
charter,
|
|
2056
|
+
articlesOfIncorporation,
|
|
2057
|
+
meetingRecords,
|
|
2058
|
+
secretaryOfStateRegDoc,
|
|
2059
|
+
certificateOfIncumbency,
|
|
2003
2060
|
documentIssuedWithinLastYear,
|
|
2004
2061
|
learnMore,
|
|
2005
2062
|
doingBusinessAsNameFiling,
|
|
@@ -2122,8 +2179,10 @@ const defaultTrans = {
|
|
|
2122
2179
|
companyStructureFormDescription,
|
|
2123
2180
|
companyOtherDetailsFormName,
|
|
2124
2181
|
companyRegistrationDocumentFormName,
|
|
2182
|
+
companyRegistrationDocumentHeading,
|
|
2125
2183
|
companyRegistrationDocumentFormDescription,
|
|
2126
2184
|
companyTaxDocumentFormName,
|
|
2185
|
+
companyTaxDocumentFormHeading,
|
|
2127
2186
|
companyTaxDocumentFormDescription,
|
|
2128
2187
|
errorMessage_1_10,
|
|
2129
2188
|
errorMessage_1_11,
|
|
@@ -2474,7 +2533,8 @@ const defaultTrans = {
|
|
|
2474
2533
|
onboardingRedirectRejectedDescriptionP1,
|
|
2475
2534
|
onboardingRedirectVerifiedDescriptionP1,
|
|
2476
2535
|
onboardingRedirectLinkError,
|
|
2477
|
-
onboardingRedirectOpenError
|
|
2536
|
+
onboardingRedirectOpenError,
|
|
2537
|
+
eg_
|
|
2478
2538
|
};
|
|
2479
2539
|
const FALLBACK_LOCALE = "en-US";
|
|
2480
2540
|
const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
|
|
@@ -2686,16 +2746,6 @@ const useCoreContext = () => {
|
|
|
2686
2746
|
throw Error("You need a <CoreProvider> to use core context");
|
|
2687
2747
|
return context;
|
|
2688
2748
|
};
|
|
2689
|
-
const ExperimentsContext = createContext({
|
|
2690
|
-
isExperimentEnabled: () => false
|
|
2691
|
-
});
|
|
2692
|
-
function useExperimentsContext() {
|
|
2693
|
-
const context = useContext(ExperimentsContext);
|
|
2694
|
-
if (context === void 0) {
|
|
2695
|
-
throw new Error("useExperimentContext must be used within a ExperimentProvider");
|
|
2696
|
-
}
|
|
2697
|
-
return context;
|
|
2698
|
-
}
|
|
2699
2749
|
var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
2700
2750
|
SettingNames2["AcceptedCountries"] = "acceptedCountries";
|
|
2701
2751
|
SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
|
|
@@ -2932,6 +2982,7 @@ const icons = {
|
|
|
2932
2982
|
"chevron-right": lazy(() => import("./chevron-right-DczMHcvL.js")),
|
|
2933
2983
|
"chevron-up": lazy(() => import("./chevron-up-BLtnROd5.js")),
|
|
2934
2984
|
company: lazy(() => import("./company-D5_F_6SW.js")),
|
|
2985
|
+
"company-2": lazy(() => import("./company-2-JG34IScE.js")),
|
|
2935
2986
|
contract: lazy(() => import("./contract-C6wDy9zU.js")),
|
|
2936
2987
|
"controlling-person": lazy(() => import("./controlling-person-C4KoSyi2.js")),
|
|
2937
2988
|
cross: lazy(() => import("./cross-BadGfrgB.js")),
|
|
@@ -2955,6 +3006,9 @@ const icons = {
|
|
|
2955
3006
|
signatory: lazy(() => import("./signatory-BVoLPYPu.js")),
|
|
2956
3007
|
store: lazy(() => import("./store-D2z639xh.js")),
|
|
2957
3008
|
trust: lazy(() => import("./trust-CpcaQaV7.js")),
|
|
3009
|
+
user: lazy(() => import("./user-D6swzlYs.js")),
|
|
3010
|
+
"user-business": lazy(() => import("./user-business-CwS5j1qX.js")),
|
|
3011
|
+
"users-3": lazy(() => import("./users-3-BdjQ9rEA.js")),
|
|
2958
3012
|
warning: lazy(() => import("./warning-99uFf1WU.js")),
|
|
2959
3013
|
wrong: lazy(() => import("./wrong-1wvh7nZe.js"))
|
|
2960
3014
|
};
|
|
@@ -10322,6 +10376,210 @@ const countryConfig$3 = {
|
|
|
10322
10376
|
}
|
|
10323
10377
|
}
|
|
10324
10378
|
};
|
|
10379
|
+
const companyTypeExamples = /* @__PURE__ */ Object.assign({ "./AT.json": () => import("./AT-BgQV6hNb.js"), "./AU.json": () => import("./AU-Dqj7rU9m.js"), "./BE.json": () => import("./BE-DXN0rypg.js"), "./BR.json": () => import("./BR-B9ECFEsA.js"), "./CA.json": () => import("./CA-CcUb1PsZ.js"), "./CH.json": () => import("./CH-DQ7wM16k.js"), "./CZ.json": () => import("./CZ-BC6mPfpV.js"), "./DE.json": () => import("./DE-BPXDYsIg.js"), "./DK.json": () => import("./DK-DzkpuGcK.js"), "./ES.json": () => import("./ES-kwu_f0TB.js"), "./FI.json": () => import("./FI-DrPckuaI.js"), "./FR.json": () => import("./FR-CgtCG2F8.js"), "./GB.json": () => import("./GB-CyOmxXhp.js"), "./HK.json": () => import("./HK-DL3Ev2gw.js"), "./HR.json": () => import("./HR-BYmZgEjN.js"), "./HU.json": () => import("./HU-CXniaSYg.js"), "./IE.json": () => import("./IE-BqkOpYi0.js"), "./IT.json": () => import("./IT-o8X0Ep0w.js"), "./LT.json": () => import("./LT-YEft7Aof.js"), "./NL.json": () => import("./NL-C0CXV7LQ.js"), "./NO.json": () => import("./NO-BWDB_9Zh.js"), "./PL.json": () => import("./PL-Cci2LxIN.js"), "./PT.json": () => import("./PT-_SJeajc_.js"), "./RO.json": () => import("./RO-B_4Ca0mt.js"), "./SE.json": () => import("./SE-BJB_aDpP.js"), "./SG.json": () => import("./SG-Bys5Yryz.js"), "./SI.json": () => import("./SI-Dba9CKmF.js"), "./SK.json": () => import("./SK-DdRSQwOF.js"), "./US.json": () => import("./US-CtLttEVX.js") });
|
|
10380
|
+
const getCompanyTypeExamplesForCountry = async (country2) => {
|
|
10381
|
+
const importForCountry = companyTypeExamples[`./${country2}.json`];
|
|
10382
|
+
if (!importForCountry) {
|
|
10383
|
+
console.warn(`No company type examples available for ${country2}`);
|
|
10384
|
+
return {};
|
|
10385
|
+
}
|
|
10386
|
+
return (await importForCountry()).default;
|
|
10387
|
+
};
|
|
10388
|
+
const useCompanyTypeExamples = (country2) => {
|
|
10389
|
+
const [examples, setExamples] = useState();
|
|
10390
|
+
useEffect(() => {
|
|
10391
|
+
getCompanyTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
|
|
10392
|
+
}, [country2]);
|
|
10393
|
+
return examples;
|
|
10394
|
+
};
|
|
10395
|
+
const RadioCard = ({
|
|
10396
|
+
optionId,
|
|
10397
|
+
optionName,
|
|
10398
|
+
optionDescription,
|
|
10399
|
+
optionSubtitle,
|
|
10400
|
+
name,
|
|
10401
|
+
uniqueId,
|
|
10402
|
+
isInvalid,
|
|
10403
|
+
isSelected,
|
|
10404
|
+
onSelect,
|
|
10405
|
+
classNames,
|
|
10406
|
+
disabled,
|
|
10407
|
+
loading: loading2,
|
|
10408
|
+
icon,
|
|
10409
|
+
body,
|
|
10410
|
+
footer
|
|
10411
|
+
}) => {
|
|
10412
|
+
const {
|
|
10413
|
+
i18n
|
|
10414
|
+
} = useI18nContext();
|
|
10415
|
+
return jsxs("label", {
|
|
10416
|
+
htmlFor: uniqueId,
|
|
10417
|
+
className: cx(["adl-radio-card", classNames == null ? void 0 : classNames.label, {
|
|
10418
|
+
"adl-radio-card--disabled": disabled
|
|
10419
|
+
}]),
|
|
10420
|
+
children: [icon && jsx("div", {
|
|
10421
|
+
className: cx("adl-radio-card__icon", classNames == null ? void 0 : classNames.icon),
|
|
10422
|
+
"aria-hidden": "true",
|
|
10423
|
+
children: icon
|
|
10424
|
+
}), jsxs("div", {
|
|
10425
|
+
className: "adl-radio-card__content",
|
|
10426
|
+
children: [jsx("div", {
|
|
10427
|
+
className: "adl-radio-card__header adl-u-display-flex adl-u-align-items-center",
|
|
10428
|
+
children: jsxs("div", {
|
|
10429
|
+
className: cx(["adl-label", "adyen-kyc-radio-group-card__label", classNames == null ? void 0 : classNames.header, {
|
|
10430
|
+
"adyen-kyc-radio-group-card__label--invalid": isInvalid
|
|
10431
|
+
}]),
|
|
10432
|
+
children: [optionSubtitle && jsx("div", {
|
|
10433
|
+
className: "adyen-kyc-radio-group-card__subtitle",
|
|
10434
|
+
children: i18n.get(optionSubtitle) ?? optionSubtitle
|
|
10435
|
+
}), i18n.get(optionName) ?? optionName]
|
|
10436
|
+
})
|
|
10437
|
+
}), jsx("div", {
|
|
10438
|
+
className: cx("adl-radio-card__body", classNames == null ? void 0 : classNames.body),
|
|
10439
|
+
children: body ?? (optionDescription && i18n.get(optionDescription)) ?? optionDescription
|
|
10440
|
+
}), footer && jsx("div", {
|
|
10441
|
+
className: cx("adl-radio-card__footer", classNames == null ? void 0 : classNames.footer),
|
|
10442
|
+
children: footer
|
|
10443
|
+
})]
|
|
10444
|
+
}), loading2 ? jsx("span", {
|
|
10445
|
+
className: "adl-radio-card__loading-icon",
|
|
10446
|
+
children: jsx(Loader, {
|
|
10447
|
+
size: "xsmall",
|
|
10448
|
+
dot: true
|
|
10449
|
+
})
|
|
10450
|
+
}) : jsx(InputRadio, {
|
|
10451
|
+
id: uniqueId,
|
|
10452
|
+
type: "radio",
|
|
10453
|
+
checked: isSelected,
|
|
10454
|
+
className: "adyen-kyc-radio-group-card__input",
|
|
10455
|
+
name,
|
|
10456
|
+
onChange: onSelect,
|
|
10457
|
+
onClick: onSelect,
|
|
10458
|
+
value: optionId,
|
|
10459
|
+
"aria-checked": isSelected,
|
|
10460
|
+
disabled
|
|
10461
|
+
})]
|
|
10462
|
+
}, optionId);
|
|
10463
|
+
};
|
|
10464
|
+
function RadioCardSelect({
|
|
10465
|
+
options,
|
|
10466
|
+
name,
|
|
10467
|
+
onSelect,
|
|
10468
|
+
selected,
|
|
10469
|
+
isInvalid,
|
|
10470
|
+
uniqueId,
|
|
10471
|
+
className,
|
|
10472
|
+
optionId,
|
|
10473
|
+
optionName,
|
|
10474
|
+
optionDescription,
|
|
10475
|
+
optionSubtitle,
|
|
10476
|
+
optionClassNames,
|
|
10477
|
+
renderOptionIcon,
|
|
10478
|
+
renderOptionBody,
|
|
10479
|
+
renderOptionFooter,
|
|
10480
|
+
isOptionDisabled
|
|
10481
|
+
}) {
|
|
10482
|
+
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
10483
|
+
return jsx("div", {
|
|
10484
|
+
className: className ?? "adyen-kyc-radio-group-card",
|
|
10485
|
+
children: options.map((option) => jsx(RadioCard, {
|
|
10486
|
+
optionId: optionId(option),
|
|
10487
|
+
optionName: optionName(option),
|
|
10488
|
+
optionDescription: optionDescription == null ? void 0 : optionDescription(option),
|
|
10489
|
+
optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
|
|
10490
|
+
uniqueId: getUniqueId(uniqueIdBase),
|
|
10491
|
+
isInvalid,
|
|
10492
|
+
isSelected: selected === option,
|
|
10493
|
+
onSelect: () => onSelect(option),
|
|
10494
|
+
name,
|
|
10495
|
+
classNames: optionClassNames == null ? void 0 : optionClassNames(option),
|
|
10496
|
+
icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
|
|
10497
|
+
body: renderOptionBody == null ? void 0 : renderOptionBody(option),
|
|
10498
|
+
footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
|
|
10499
|
+
disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option)
|
|
10500
|
+
}, optionId(option)))
|
|
10501
|
+
});
|
|
10502
|
+
}
|
|
10503
|
+
function RadioGroupCard({
|
|
10504
|
+
items,
|
|
10505
|
+
name,
|
|
10506
|
+
onSelect,
|
|
10507
|
+
selected,
|
|
10508
|
+
isInvalid,
|
|
10509
|
+
uniqueId,
|
|
10510
|
+
className,
|
|
10511
|
+
itemClassNames,
|
|
10512
|
+
itemIcon,
|
|
10513
|
+
itemBody,
|
|
10514
|
+
itemFooter,
|
|
10515
|
+
isItemDisabled
|
|
10516
|
+
}) {
|
|
10517
|
+
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
10518
|
+
return jsx("div", {
|
|
10519
|
+
className: className ?? "adyen-kyc-radio-group-card",
|
|
10520
|
+
children: items.map((item) => jsx(RadioCard, {
|
|
10521
|
+
optionId: item.id,
|
|
10522
|
+
optionName: item.name,
|
|
10523
|
+
optionDescription: item.description,
|
|
10524
|
+
optionSubtitle: item.subtitle,
|
|
10525
|
+
uniqueId: getUniqueId(uniqueIdBase),
|
|
10526
|
+
isInvalid,
|
|
10527
|
+
isSelected: selected === item,
|
|
10528
|
+
onSelect: () => onSelect(item),
|
|
10529
|
+
name,
|
|
10530
|
+
classNames: itemClassNames == null ? void 0 : itemClassNames(item),
|
|
10531
|
+
icon: itemIcon == null ? void 0 : itemIcon(item),
|
|
10532
|
+
body: itemBody == null ? void 0 : itemBody(item),
|
|
10533
|
+
footer: itemFooter == null ? void 0 : itemFooter(item),
|
|
10534
|
+
disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
|
|
10535
|
+
}, item.id))
|
|
10536
|
+
});
|
|
10537
|
+
}
|
|
10538
|
+
const EntityTypeRadioGroupCard = ({
|
|
10539
|
+
examples,
|
|
10540
|
+
...baseProps
|
|
10541
|
+
}) => jsx(RadioGroupCard, {
|
|
10542
|
+
...baseProps,
|
|
10543
|
+
itemBody: (
|
|
10544
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
10545
|
+
(option) => option.description ? jsx(EntityTypeSelectionRadioCardBody, {
|
|
10546
|
+
description: option.description,
|
|
10547
|
+
examples: examples == null ? void 0 : examples[option.id]
|
|
10548
|
+
}) : void 0
|
|
10549
|
+
),
|
|
10550
|
+
itemClassNames: () => ({
|
|
10551
|
+
header: "adyen-kyc-entity-type-radio-group-card__header",
|
|
10552
|
+
icon: "adyen-kyc-entity-type-radio-group-card__icon",
|
|
10553
|
+
label: "adyen-kyc-entity-type-radio-group-card__container",
|
|
10554
|
+
body: "adyen-kyc-entity-type-radio-group-card__body"
|
|
10555
|
+
})
|
|
10556
|
+
});
|
|
10557
|
+
const EntityTypeSelectionRadioCardBody = ({
|
|
10558
|
+
description: description2,
|
|
10559
|
+
examples
|
|
10560
|
+
}) => {
|
|
10561
|
+
const {
|
|
10562
|
+
i18n
|
|
10563
|
+
} = useI18nContext();
|
|
10564
|
+
if (!examples)
|
|
10565
|
+
return jsx("span", {
|
|
10566
|
+
children: i18n.get(description2)
|
|
10567
|
+
});
|
|
10568
|
+
return jsxs(Fragment, {
|
|
10569
|
+
children: [jsx("span", {
|
|
10570
|
+
className: "adyen-kyc-entity-type-radio-group-card__description",
|
|
10571
|
+
children: i18n.get(description2)
|
|
10572
|
+
}), jsxs("span", {
|
|
10573
|
+
className: "adyen-kyc-entity-type-radio-group-card__examples",
|
|
10574
|
+
children: [i18n.get({
|
|
10575
|
+
key: "eg_",
|
|
10576
|
+
values: {
|
|
10577
|
+
examples: examples.join(", ")
|
|
10578
|
+
}
|
|
10579
|
+
}), "."]
|
|
10580
|
+
})]
|
|
10581
|
+
});
|
|
10582
|
+
};
|
|
10325
10583
|
var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
|
|
10326
10584
|
TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
|
|
10327
10585
|
TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
|
|
@@ -10433,13 +10691,6 @@ const TRUST_DEFAULT_DESCRIPTIONS_MAP = {
|
|
|
10433
10691
|
/* SETTLOR */
|
|
10434
10692
|
]: "provideAtLeastOneSettlor"
|
|
10435
10693
|
};
|
|
10436
|
-
var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
|
|
10437
|
-
DecisionMakerType2["CONTROLLING_PERSON"] = "uboThroughControl";
|
|
10438
|
-
DecisionMakerType2["OWNER"] = "uboThroughOwnership";
|
|
10439
|
-
DecisionMakerType2["SIGNATORY"] = "signatory";
|
|
10440
|
-
DecisionMakerType2["DIRECTOR"] = "director";
|
|
10441
|
-
return DecisionMakerType2;
|
|
10442
|
-
})(DecisionMakerType || {});
|
|
10443
10694
|
var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
10444
10695
|
TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
|
|
10445
10696
|
TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
|
|
@@ -10478,6 +10729,138 @@ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
|
10478
10729
|
TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
|
|
10479
10730
|
return TaskStatus2;
|
|
10480
10731
|
})(TaskStatus || {});
|
|
10732
|
+
const getDirectEntityAssociations = (rootLE, legalEntityId) => {
|
|
10733
|
+
var _a;
|
|
10734
|
+
return ((_a = rootLE == null ? void 0 : rootLE.entityAssociations) == null ? void 0 : _a.filter((association2) => association2.associatorId === legalEntityId)) ?? [];
|
|
10735
|
+
};
|
|
10736
|
+
const getOwnEntityAssociations = (legalEntity) => getDirectEntityAssociations(legalEntity, legalEntity.id);
|
|
10737
|
+
const getOwnSoleProprietorshipIdArray = (legalEntity) => {
|
|
10738
|
+
const ownAssociations = getOwnEntityAssociations(legalEntity);
|
|
10739
|
+
return ownAssociations.filter((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP).map((ea) => ea.legalEntityId).filter((id2) => id2 !== void 0);
|
|
10740
|
+
};
|
|
10741
|
+
const hasSolePropInLegalEntity = (rootLegalEntity) => {
|
|
10742
|
+
var _a;
|
|
10743
|
+
return ((_a = rootLegalEntity.entityAssociations) == null ? void 0 : _a.some((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP && ea.associatorId === rootLegalEntity.id)) ?? false;
|
|
10744
|
+
};
|
|
10745
|
+
const getOwnSolePropProblems = (rootLegalEntity, capabilityProblems) => {
|
|
10746
|
+
var _a;
|
|
10747
|
+
const solePropLegalEntityId = getOwnSoleProprietorshipIdArray(rootLegalEntity)[0];
|
|
10748
|
+
return (_a = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a[solePropLegalEntityId];
|
|
10749
|
+
};
|
|
10750
|
+
const hasOwnEntityAssociationOfType = (type, entityAssociations, legalEntityId) => (entityAssociations == null ? void 0 : entityAssociations.some((ea) => ea.type === type && ea.associatorId === legalEntityId)) ?? false;
|
|
10751
|
+
const removeEntityAssociationByType = (type, entityAssociations, legalEntityId) => entityAssociations.filter((ea) => ea.type !== type || ea.associatorId !== legalEntityId);
|
|
10752
|
+
const isRootLegalEntity = (legalEntity, taskType) => legalEntity.type === LegalEntityType.INDIVIDUAL && taskType === TaskTypes.INDIVIDUAL || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY_SEARCH;
|
|
10753
|
+
const filterOutUnwantedAssociationsIfRootLE = (taskType, legalEntity, accountHolder2) => {
|
|
10754
|
+
if (!(legalEntity == null ? void 0 : legalEntity.entityAssociations)) {
|
|
10755
|
+
return void 0;
|
|
10756
|
+
}
|
|
10757
|
+
let entityAssociations = getOwnEntityAssociations(legalEntity);
|
|
10758
|
+
if (!isRootLegalEntity(legalEntity, taskType)) {
|
|
10759
|
+
return entityAssociations;
|
|
10760
|
+
}
|
|
10761
|
+
if (accountHolder2 !== "mySoleProprietorName" && hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id)) {
|
|
10762
|
+
entityAssociations = removeEntityAssociationByType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id);
|
|
10763
|
+
}
|
|
10764
|
+
if (accountHolder2 !== "aTrust" && hasOwnEntityAssociationOfType(LegalEntityType.TRUST, entityAssociations, legalEntity.id)) {
|
|
10765
|
+
entityAssociations = removeEntityAssociationByType(LegalEntityType.TRUST, entityAssociations, legalEntity.id);
|
|
10766
|
+
}
|
|
10767
|
+
return entityAssociations;
|
|
10768
|
+
};
|
|
10769
|
+
var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
|
|
10770
|
+
VerificationStatus2["VALID"] = "valid";
|
|
10771
|
+
VerificationStatus2["PENDING"] = "pending";
|
|
10772
|
+
VerificationStatus2["INVALID"] = "invalid";
|
|
10773
|
+
VerificationStatus2["REJECTED"] = "rejected";
|
|
10774
|
+
return VerificationStatus2;
|
|
10775
|
+
})(VerificationStatus || {});
|
|
10776
|
+
function getNestedPropertyKeys(obj, includeUndefined = false) {
|
|
10777
|
+
const fieldNames = [];
|
|
10778
|
+
Object.entries(obj).forEach(([key, value]) => {
|
|
10779
|
+
if (typeof value === "object" && value !== null) {
|
|
10780
|
+
const nested = getNestedPropertyKeys(value).map((name) => `${key}.${name}`);
|
|
10781
|
+
fieldNames.push(...nested);
|
|
10782
|
+
return;
|
|
10783
|
+
}
|
|
10784
|
+
if (value !== void 0 || includeUndefined) {
|
|
10785
|
+
fieldNames.push(key);
|
|
10786
|
+
}
|
|
10787
|
+
});
|
|
10788
|
+
return fieldNames;
|
|
10789
|
+
}
|
|
10790
|
+
const getTaskStatus = (type, capabilityProblems, rootLegalEntity, entityIds, skipPendingCapabilitiesCheck = false) => {
|
|
10791
|
+
if (!(entityIds == null ? void 0 : entityIds.length) || entityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity))
|
|
10792
|
+
return TaskStatus.EMPTY;
|
|
10793
|
+
const importantCapabilityStatus = checkForImportantCapabilityStatus(type, capabilityProblems, entityIds);
|
|
10794
|
+
if (importantCapabilityStatus)
|
|
10795
|
+
return importantCapabilityStatus;
|
|
10796
|
+
if (!skipPendingCapabilitiesCheck && hasPendingCapabilities(rootLegalEntity))
|
|
10797
|
+
return TaskStatus.PROCESSING;
|
|
10798
|
+
return TaskStatus.FINISHED;
|
|
10799
|
+
};
|
|
10800
|
+
const IMPORTANT_STATUSES = [TaskStatus.DETAILS_REQUIRED, TaskStatus.DOWNLOAD, TaskStatus.ERROR, TaskStatus.PROCESSING];
|
|
10801
|
+
function checkForImportantCapabilityStatus(type, capabilityProblems, entityIds) {
|
|
10802
|
+
if (!(capabilityProblems == null ? void 0 : capabilityProblems[type]) || !entityIds)
|
|
10803
|
+
return;
|
|
10804
|
+
const importantStatuses = Object.entries(capabilityProblems[type]).filter(([key]) => entityIds.includes(key)).map(([, value]) => value.status).filter((status) => status !== void 0 && IMPORTANT_STATUSES.includes(status));
|
|
10805
|
+
if (!importantStatuses.length)
|
|
10806
|
+
return;
|
|
10807
|
+
return importantStatuses.reduce((prev, curr) => curr > prev ? curr : prev);
|
|
10808
|
+
}
|
|
10809
|
+
const hasPendingCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse.capabilities ?? {}).some((capability) => capability.verificationStatus === "pending");
|
|
10810
|
+
const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus !== VerificationStatus.PENDING);
|
|
10811
|
+
const hasRejectedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).some((capability) => capability.verificationStatus === VerificationStatus.REJECTED);
|
|
10812
|
+
const emptyFieldsForIndividual = ["name.firstName", "name.lastName", "residentialAddress.country"];
|
|
10813
|
+
const emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
|
|
10814
|
+
const emptyFieldsForTrust = ["name", "registeredAddress.country"];
|
|
10815
|
+
const emptyFieldsForSoleProp = ["name", "registeredAddress.country"];
|
|
10816
|
+
const emptyFieldsByEntityType = {
|
|
10817
|
+
[LegalEntityType.INDIVIDUAL]: emptyFieldsForIndividual,
|
|
10818
|
+
[LegalEntityType.ORGANIZATION]: emptyFieldsForOrganization,
|
|
10819
|
+
[LegalEntityType.TRUST]: emptyFieldsForTrust,
|
|
10820
|
+
[LegalEntityType.SOLE_PROPRIETORSHIP]: emptyFieldsForSoleProp
|
|
10821
|
+
};
|
|
10822
|
+
function isEmptyEntity(legalEntity) {
|
|
10823
|
+
var _a;
|
|
10824
|
+
const type = legalEntity == null ? void 0 : legalEntity.type;
|
|
10825
|
+
if (!type)
|
|
10826
|
+
return true;
|
|
10827
|
+
if ((_a = legalEntity.documentDetails) == null ? void 0 : _a.length)
|
|
10828
|
+
return false;
|
|
10829
|
+
const minimumFields = emptyFieldsByEntityType[type];
|
|
10830
|
+
const typeSpecificSection = legalEntity[type];
|
|
10831
|
+
if (!typeSpecificSection)
|
|
10832
|
+
return true;
|
|
10833
|
+
const fieldsOnEntity = getNestedPropertyKeys(typeSpecificSection);
|
|
10834
|
+
return !fieldsOnEntity.some((field) => !minimumFields.includes(field));
|
|
10835
|
+
}
|
|
10836
|
+
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
|
|
10837
|
+
const entityTypeToCorrespondingAccountHolderOption = {
|
|
10838
|
+
[LegalEntityType.INDIVIDUAL]: "myName",
|
|
10839
|
+
[LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
|
|
10840
|
+
[LegalEntityType.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
|
|
10841
|
+
[LegalEntityType.TRUST]: "aTrust"
|
|
10842
|
+
};
|
|
10843
|
+
const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false) => {
|
|
10844
|
+
if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.type))
|
|
10845
|
+
return void 0;
|
|
10846
|
+
if (hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
|
|
10847
|
+
return "mySoleProprietorName";
|
|
10848
|
+
}
|
|
10849
|
+
if (hasOwnEntityAssociationOfType(LegalEntityType.TRUST, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
|
|
10850
|
+
return "aTrust";
|
|
10851
|
+
}
|
|
10852
|
+
if (isTypeChanging || !isEmptyEntity(legalEntityResponse)) {
|
|
10853
|
+
return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
|
|
10854
|
+
}
|
|
10855
|
+
};
|
|
10856
|
+
const allowIndividualWithoutSoleProp = (capabilities) => !(capabilities == null ? void 0 : capabilities.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c)));
|
|
10857
|
+
var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
|
|
10858
|
+
DecisionMakerType2["CONTROLLING_PERSON"] = "uboThroughControl";
|
|
10859
|
+
DecisionMakerType2["OWNER"] = "uboThroughOwnership";
|
|
10860
|
+
DecisionMakerType2["SIGNATORY"] = "signatory";
|
|
10861
|
+
DecisionMakerType2["DIRECTOR"] = "director";
|
|
10862
|
+
return DecisionMakerType2;
|
|
10863
|
+
})(DecisionMakerType || {});
|
|
10481
10864
|
const REQUIRED = "REQUIRED";
|
|
10482
10865
|
const SOLE_PROP_COUNTRIES = [CountryCodes.Austria, CountryCodes.Australia, CountryCodes.Belgium, CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.Cyprus, CountryCodes.CzechRepublic, CountryCodes.Denmark, CountryCodes.Estonia, CountryCodes.Finland, CountryCodes.France, CountryCodes.Germany, CountryCodes.Gibraltar, CountryCodes.Greece, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Hungary, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Italy, CountryCodes.Jersey, CountryCodes.Latvia, CountryCodes.Liechtenstein, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Malta, CountryCodes.Monaco, CountryCodes.Netherlands, CountryCodes.NewZealand, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Portugal, CountryCodes.PuertoRico, CountryCodes.Romania, CountryCodes.Singapore, CountryCodes.Slovakia, CountryCodes.Slovenia, CountryCodes.Spain, CountryCodes.Sweden, CountryCodes.Switzerland, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
|
|
10483
10866
|
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
@@ -10494,7 +10877,8 @@ const rules$3 = ({
|
|
|
10494
10877
|
data,
|
|
10495
10878
|
country: country2,
|
|
10496
10879
|
taskType,
|
|
10497
|
-
isEmbeddedDropin
|
|
10880
|
+
isEmbeddedDropin,
|
|
10881
|
+
isExperimentEnabled = () => false
|
|
10498
10882
|
}) => ({
|
|
10499
10883
|
isDirectorIdNumberRequiredForCountry: () => {
|
|
10500
10884
|
var _a, _b, _c, _d, _e;
|
|
@@ -10565,7 +10949,7 @@ const rules$3 = ({
|
|
|
10565
10949
|
}
|
|
10566
10950
|
},
|
|
10567
10951
|
accountHolderIfCustomer: () => {
|
|
10568
|
-
if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin) {
|
|
10952
|
+
if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin && !(isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewEntryFlow"))) {
|
|
10569
10953
|
return REQUIRED;
|
|
10570
10954
|
}
|
|
10571
10955
|
},
|
|
@@ -10611,7 +10995,6 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
|
|
|
10611
10995
|
return [];
|
|
10612
10996
|
}
|
|
10613
10997
|
}
|
|
10614
|
-
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
|
|
10615
10998
|
function AccountHolder(props) {
|
|
10616
10999
|
var _a;
|
|
10617
11000
|
const {
|
|
@@ -10625,15 +11008,12 @@ function AccountHolder(props) {
|
|
|
10625
11008
|
capabilities
|
|
10626
11009
|
} = props;
|
|
10627
11010
|
const {
|
|
10628
|
-
|
|
11011
|
+
setAccountHolder
|
|
10629
11012
|
} = useCoreContext();
|
|
10630
11013
|
const {
|
|
10631
11014
|
isSettingEnabled
|
|
10632
11015
|
} = useSettingsContext();
|
|
10633
|
-
const
|
|
10634
|
-
isExperimentEnabled
|
|
10635
|
-
} = useExperimentsContext();
|
|
10636
|
-
const isChangeToMyNameAllowed = !(capabilities == null ? void 0 : capabilities.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c)));
|
|
11016
|
+
const isChangeToMyNameAllowed = allowIndividualWithoutSoleProp(capabilities ?? []);
|
|
10637
11017
|
const accountHolderOptions = getAvailableAccountHolderOptions(props.legalEntityType, isSettingEnabled(SettingNames.AllowLegalEntityTypeChange), TRUST_COUNTRIES.includes(props.country), SOLE_PROP_COUNTRIES.includes(props.country), isChangeToMyNameAllowed).map((accountHolderOption) => ({
|
|
10638
11018
|
id: accountHolderOption,
|
|
10639
11019
|
name: i18n.get(accountHolderOption),
|
|
@@ -10648,10 +11028,6 @@ function AccountHolder(props) {
|
|
|
10648
11028
|
const defaultData = {
|
|
10649
11029
|
accountHolder: isDefaultOptionAvailable ? (_a = props.data) == null ? void 0 : _a.accountHolder : void 0
|
|
10650
11030
|
};
|
|
10651
|
-
const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
|
|
10652
|
-
if (isNewEntryFlowEnabled && defaultData) {
|
|
10653
|
-
defaultData.accountHolder = accountHolder2 || defaultData.accountHolder;
|
|
10654
|
-
}
|
|
10655
11031
|
const {
|
|
10656
11032
|
handleChangeFor,
|
|
10657
11033
|
data,
|
|
@@ -10677,6 +11053,7 @@ function AccountHolder(props) {
|
|
|
10677
11053
|
dataStoreId
|
|
10678
11054
|
}
|
|
10679
11055
|
});
|
|
11056
|
+
setAccountHolder((data == null ? void 0 : data.accountHolder) ?? null);
|
|
10680
11057
|
}, [data, errors, valid, dataStoreId]);
|
|
10681
11058
|
const formUtils = formUtilities(props, i18n);
|
|
10682
11059
|
const questionLabel = i18n.get("nameOfBankAccountHolder");
|
|
@@ -10688,9 +11065,6 @@ function AccountHolder(props) {
|
|
|
10688
11065
|
label: questionLabel,
|
|
10689
11066
|
errorMessage: formUtils.getErrorMessage("accountHolder", errors, fieldProblems),
|
|
10690
11067
|
isValid: valid.accountHolder,
|
|
10691
|
-
className: cx({
|
|
10692
|
-
"adl-u-display-none": isNewEntryFlowEnabled
|
|
10693
|
-
}),
|
|
10694
11068
|
classNameModifiers: ["account-holder"],
|
|
10695
11069
|
children: (childProps) => jsx(Select, {
|
|
10696
11070
|
...childProps,
|
|
@@ -10703,150 +11077,6 @@ function AccountHolder(props) {
|
|
|
10703
11077
|
}) : null]
|
|
10704
11078
|
});
|
|
10705
11079
|
}
|
|
10706
|
-
const RadioCard = ({
|
|
10707
|
-
optionId,
|
|
10708
|
-
optionName,
|
|
10709
|
-
optionDescription,
|
|
10710
|
-
optionSubtitle,
|
|
10711
|
-
name,
|
|
10712
|
-
uniqueId,
|
|
10713
|
-
isInvalid,
|
|
10714
|
-
isSelected,
|
|
10715
|
-
onSelect,
|
|
10716
|
-
labelClassName,
|
|
10717
|
-
className,
|
|
10718
|
-
disabled,
|
|
10719
|
-
loading: loading2,
|
|
10720
|
-
icon,
|
|
10721
|
-
body,
|
|
10722
|
-
footer
|
|
10723
|
-
}) => {
|
|
10724
|
-
const {
|
|
10725
|
-
i18n
|
|
10726
|
-
} = useI18nContext();
|
|
10727
|
-
return jsxs("label", {
|
|
10728
|
-
htmlFor: uniqueId,
|
|
10729
|
-
className: cx(["adl-radio-card", labelClassName, {
|
|
10730
|
-
"adl-radio-card--disabled": disabled
|
|
10731
|
-
}]),
|
|
10732
|
-
children: [icon && jsx("div", {
|
|
10733
|
-
className: "adl-u-margin-bottom-16 adl-radio-card__icon",
|
|
10734
|
-
"aria-hidden": "true",
|
|
10735
|
-
children: icon
|
|
10736
|
-
}), jsxs("div", {
|
|
10737
|
-
className: "adl-radio-card__content",
|
|
10738
|
-
children: [jsxs("div", {
|
|
10739
|
-
className: "adl-radio-card__header adl-u-display-flex adl-u-align-items-center",
|
|
10740
|
-
children: [jsxs("div", {
|
|
10741
|
-
className: cx(["adl-label", "adyen-kyc-radio-group-card__label", "adl-u-margin-bottom-16", className, {
|
|
10742
|
-
"adyen-kyc-radio-group-card__label--invalid": isInvalid
|
|
10743
|
-
}]),
|
|
10744
|
-
children: [optionSubtitle && jsx("div", {
|
|
10745
|
-
className: "adyen-kyc-radio-group-card__subtitle",
|
|
10746
|
-
children: i18n.get(optionSubtitle) ?? optionSubtitle
|
|
10747
|
-
}), i18n.get(optionName) ?? optionName]
|
|
10748
|
-
}), loading2 ? jsx("span", {
|
|
10749
|
-
className: "adl-radio-card__loading-icon",
|
|
10750
|
-
children: jsx(Loader, {
|
|
10751
|
-
size: "xsmall",
|
|
10752
|
-
dot: true
|
|
10753
|
-
})
|
|
10754
|
-
}) : jsx(InputRadio, {
|
|
10755
|
-
id: uniqueId,
|
|
10756
|
-
type: "radio",
|
|
10757
|
-
checked: isSelected,
|
|
10758
|
-
className: "adyen-kyc-radio-group-card__input",
|
|
10759
|
-
name,
|
|
10760
|
-
onChange: onSelect,
|
|
10761
|
-
onClick: onSelect,
|
|
10762
|
-
value: optionId,
|
|
10763
|
-
"aria-checked": isSelected,
|
|
10764
|
-
disabled
|
|
10765
|
-
})]
|
|
10766
|
-
}), jsx("div", {
|
|
10767
|
-
className: "adl-radio-card__body adl-u-margin-bottom-16",
|
|
10768
|
-
children: body ?? (optionDescription && i18n.get(optionDescription)) ?? optionDescription
|
|
10769
|
-
}), footer && jsx("div", {
|
|
10770
|
-
className: "adl-u-margin-bottom-16",
|
|
10771
|
-
children: footer
|
|
10772
|
-
})]
|
|
10773
|
-
})]
|
|
10774
|
-
}, optionId);
|
|
10775
|
-
};
|
|
10776
|
-
function RadioCardSelect({
|
|
10777
|
-
options,
|
|
10778
|
-
name,
|
|
10779
|
-
onSelect,
|
|
10780
|
-
selected,
|
|
10781
|
-
isInvalid,
|
|
10782
|
-
uniqueId,
|
|
10783
|
-
className,
|
|
10784
|
-
optionId,
|
|
10785
|
-
optionName,
|
|
10786
|
-
optionDescription,
|
|
10787
|
-
optionSubtitle,
|
|
10788
|
-
optionLabelClassName,
|
|
10789
|
-
renderOptionIcon,
|
|
10790
|
-
renderOptionBody,
|
|
10791
|
-
renderOptionFooter,
|
|
10792
|
-
isOptionDisabled
|
|
10793
|
-
}) {
|
|
10794
|
-
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
10795
|
-
return jsx("div", {
|
|
10796
|
-
className: className ?? "adyen-kyc-radio-group-card",
|
|
10797
|
-
children: options.map((option) => jsx(RadioCard, {
|
|
10798
|
-
optionId: optionId(option),
|
|
10799
|
-
optionName: optionName(option),
|
|
10800
|
-
optionDescription: optionDescription == null ? void 0 : optionDescription(option),
|
|
10801
|
-
optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
|
|
10802
|
-
uniqueId: getUniqueId(uniqueIdBase),
|
|
10803
|
-
isInvalid,
|
|
10804
|
-
isSelected: selected === option,
|
|
10805
|
-
onSelect: () => onSelect(option),
|
|
10806
|
-
name,
|
|
10807
|
-
labelClassName: optionLabelClassName == null ? void 0 : optionLabelClassName(option),
|
|
10808
|
-
icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
|
|
10809
|
-
body: renderOptionBody == null ? void 0 : renderOptionBody(option),
|
|
10810
|
-
footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
|
|
10811
|
-
disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option)
|
|
10812
|
-
}, optionId(option)))
|
|
10813
|
-
});
|
|
10814
|
-
}
|
|
10815
|
-
function RadioGroupCard({
|
|
10816
|
-
items,
|
|
10817
|
-
name,
|
|
10818
|
-
onSelect,
|
|
10819
|
-
selected,
|
|
10820
|
-
isInvalid,
|
|
10821
|
-
uniqueId,
|
|
10822
|
-
className,
|
|
10823
|
-
itemLabelClassName,
|
|
10824
|
-
itemIcon,
|
|
10825
|
-
itemBody,
|
|
10826
|
-
itemFooter,
|
|
10827
|
-
isItemDisabled
|
|
10828
|
-
}) {
|
|
10829
|
-
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
10830
|
-
return jsx("div", {
|
|
10831
|
-
className: className ?? "adyen-kyc-radio-group-card",
|
|
10832
|
-
children: items.map((item) => jsx(RadioCard, {
|
|
10833
|
-
optionId: item.id,
|
|
10834
|
-
optionName: item.name,
|
|
10835
|
-
optionDescription: item.description,
|
|
10836
|
-
optionSubtitle: item.subtitle,
|
|
10837
|
-
uniqueId: getUniqueId(uniqueIdBase),
|
|
10838
|
-
isInvalid,
|
|
10839
|
-
isSelected: selected === item,
|
|
10840
|
-
onSelect: () => onSelect(item),
|
|
10841
|
-
name,
|
|
10842
|
-
labelClassName: itemLabelClassName == null ? void 0 : itemLabelClassName(item),
|
|
10843
|
-
icon: itemIcon == null ? void 0 : itemIcon(item),
|
|
10844
|
-
body: itemBody == null ? void 0 : itemBody(item),
|
|
10845
|
-
footer: itemFooter == null ? void 0 : itemFooter(item),
|
|
10846
|
-
disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
|
|
10847
|
-
}, item.id))
|
|
10848
|
-
});
|
|
10849
|
-
}
|
|
10850
11080
|
const companyTypeValidationRules = {
|
|
10851
11081
|
entityType: {
|
|
10852
11082
|
modes: ["blur"],
|
|
@@ -10901,6 +11131,7 @@ function CompanyTypeComponent(props) {
|
|
|
10901
11131
|
});
|
|
10902
11132
|
}, [data, valid, errors, isValid]);
|
|
10903
11133
|
const companyTypeOptions = isNewEntryFlowEnabled ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
|
|
11134
|
+
const companyTypeExamples2 = useCompanyTypeExamples(country2);
|
|
10904
11135
|
return jsxs(Fragment, {
|
|
10905
11136
|
children: [jsx(StateContextSetter, {
|
|
10906
11137
|
owner: COMPANY_TYPE_ID,
|
|
@@ -10920,7 +11151,7 @@ function CompanyTypeComponent(props) {
|
|
|
10920
11151
|
errorMessage: formUtils.getErrorMessage("entityType", errors, fieldProblems),
|
|
10921
11152
|
label: formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
|
|
10922
11153
|
classNameModifiers: ["entityType"],
|
|
10923
|
-
children: (childProps) => jsx(
|
|
11154
|
+
children: (childProps) => jsx(EntityTypeRadioGroupCard, {
|
|
10924
11155
|
...childProps,
|
|
10925
11156
|
name: "entityType",
|
|
10926
11157
|
items: companyTypeOptions,
|
|
@@ -10929,7 +11160,8 @@ function CompanyTypeComponent(props) {
|
|
|
10929
11160
|
onSelect: (item) => handleChangeFor("entityType")(item.id),
|
|
10930
11161
|
"aria-required": true,
|
|
10931
11162
|
"aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
|
|
10932
|
-
"aria-invalid": !valid.entityType
|
|
11163
|
+
"aria-invalid": !valid.entityType,
|
|
11164
|
+
examples: companyTypeExamples2
|
|
10933
11165
|
})
|
|
10934
11166
|
}), !isNewEntryFlowEnabled && formUtils.isRequiredField("accountHolder") && country2 && jsx(AccountHolder, {
|
|
10935
11167
|
...accountHolderProps,
|
|
@@ -11552,7 +11784,7 @@ function DocumentUploadComponent({
|
|
|
11552
11784
|
})]
|
|
11553
11785
|
});
|
|
11554
11786
|
}
|
|
11555
|
-
const DocumentUpload = memo(DocumentUploadComponent, (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name);
|
|
11787
|
+
const DocumentUpload = memo(DocumentUploadComponent, (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name && prevProps.country === nextProps.country && prevProps.companyType === nextProps.companyType);
|
|
11556
11788
|
function List({
|
|
11557
11789
|
className,
|
|
11558
11790
|
nested,
|
|
@@ -12698,6 +12930,221 @@ function RegistrationAddressComponent(props) {
|
|
|
12698
12930
|
})]
|
|
12699
12931
|
});
|
|
12700
12932
|
}
|
|
12933
|
+
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
12934
|
+
[CountryCodes.UnitedStates]: {
|
|
12935
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
12936
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
12937
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
|
|
12938
|
+
},
|
|
12939
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
12940
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
12941
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
12942
|
+
},
|
|
12943
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
12944
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
12945
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
12946
|
+
},
|
|
12947
|
+
[CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
|
|
12948
|
+
header: "acceptedDocumentsForGovernment",
|
|
12949
|
+
documents: ["charter"]
|
|
12950
|
+
},
|
|
12951
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
12952
|
+
header: "acceptedDocumentsForNonProfit",
|
|
12953
|
+
documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc", "certificateOfIncumbency"]
|
|
12954
|
+
},
|
|
12955
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
12956
|
+
header: "acceptedDocumentsForPartnerships",
|
|
12957
|
+
documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
|
|
12958
|
+
}
|
|
12959
|
+
}
|
|
12960
|
+
};
|
|
12961
|
+
const GuidanceContent$1 = ({
|
|
12962
|
+
i18n,
|
|
12963
|
+
country: country2,
|
|
12964
|
+
companyType: companyType2
|
|
12965
|
+
}) => {
|
|
12966
|
+
var _a;
|
|
12967
|
+
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
|
|
12968
|
+
return jsx("div", {
|
|
12969
|
+
className: "adyen-kyc-upload-field__guidance",
|
|
12970
|
+
children: country2 === "US" ? jsxs(Fragment, {
|
|
12971
|
+
children: [acceptedDocGuidance && jsxs("div", {
|
|
12972
|
+
className: "adl-u-margin-bottom-24",
|
|
12973
|
+
children: [jsx("strong", {
|
|
12974
|
+
children: i18n.get(acceptedDocGuidance.header)
|
|
12975
|
+
}), jsx(List, {
|
|
12976
|
+
className: "adl-u-margin-left-8",
|
|
12977
|
+
children: acceptedDocGuidance.documents.map((document2) => jsx(ListItem, {
|
|
12978
|
+
children: i18n.get(document2)
|
|
12979
|
+
}, document2))
|
|
12980
|
+
})]
|
|
12981
|
+
}), jsxs("div", {
|
|
12982
|
+
className: "adl-u-margin-bottom-24",
|
|
12983
|
+
children: [jsx("strong", {
|
|
12984
|
+
children: i18n.get("documentRequirements")
|
|
12985
|
+
}), jsx(List, {
|
|
12986
|
+
className: "adl-u-margin-left-8",
|
|
12987
|
+
children: jsx(ListItem, {
|
|
12988
|
+
children: i18n.get("includesLegalCompanyName")
|
|
12989
|
+
})
|
|
12990
|
+
})]
|
|
12991
|
+
})]
|
|
12992
|
+
}) : jsxs(Fragment, {
|
|
12993
|
+
children: [jsxs("div", {
|
|
12994
|
+
className: "adl-u-margin-bottom-24",
|
|
12995
|
+
children: [jsxs("strong", {
|
|
12996
|
+
children: [" ", i18n.get("requirements")]
|
|
12997
|
+
}), jsxs(List, {
|
|
12998
|
+
className: "adyen-kyc-upload-field__requirements",
|
|
12999
|
+
children: [jsx(ListItem, {
|
|
13000
|
+
children: i18n.get("documentIssuedByGovernmentAuthority")
|
|
13001
|
+
}), jsx(ListItem, {
|
|
13002
|
+
children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
|
|
13003
|
+
values: {
|
|
13004
|
+
numberOfMonths: 12
|
|
13005
|
+
}
|
|
13006
|
+
})
|
|
13007
|
+
})]
|
|
13008
|
+
})]
|
|
13009
|
+
}), jsx(ContextGuidance, {
|
|
13010
|
+
page: "Company registration document",
|
|
13011
|
+
titleId: "whatIfDocumentIsMoreThan12MonthsOld",
|
|
13012
|
+
contentId: "ifDocumentMoreThan12months",
|
|
13013
|
+
title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
|
|
13014
|
+
content: i18n.get("ifDocumentMoreThan12months")
|
|
13015
|
+
})]
|
|
13016
|
+
})
|
|
13017
|
+
});
|
|
13018
|
+
};
|
|
13019
|
+
function RegistrationDocumentComponent({
|
|
13020
|
+
id: id2,
|
|
13021
|
+
country: country2,
|
|
13022
|
+
companyType: companyType2 = CompanyTypesValue.PRIVATE_COMPANY,
|
|
13023
|
+
heading = "companyRegistrationDocumentHeading",
|
|
13024
|
+
description: description2 = "companyRegistrationDocumentFormDescription",
|
|
13025
|
+
...props
|
|
13026
|
+
}) {
|
|
13027
|
+
const {
|
|
13028
|
+
i18n
|
|
13029
|
+
} = useI18nContext();
|
|
13030
|
+
return jsx(DocumentUpload, {
|
|
13031
|
+
...props,
|
|
13032
|
+
id: id2,
|
|
13033
|
+
heading: i18n.get(heading),
|
|
13034
|
+
description: i18n.get(description2),
|
|
13035
|
+
documentField: "registrationDocument",
|
|
13036
|
+
documentType: DocumentType.REGISTRATION_DOCUMENT,
|
|
13037
|
+
guidanceContent: GuidanceContent$1({
|
|
13038
|
+
i18n,
|
|
13039
|
+
country: country2,
|
|
13040
|
+
companyType: companyType2
|
|
13041
|
+
}),
|
|
13042
|
+
companyType: companyType2,
|
|
13043
|
+
country: country2
|
|
13044
|
+
});
|
|
13045
|
+
}
|
|
13046
|
+
const ACCEPTED_DOCUMENTS_MAP = {
|
|
13047
|
+
[CountryCodes.UnitedStates]: {
|
|
13048
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13049
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
13050
|
+
documents: ["irsCP575"]
|
|
13051
|
+
},
|
|
13052
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
13053
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13054
|
+
documents: ["annualReport", "secForm10k"]
|
|
13055
|
+
},
|
|
13056
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
13057
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13058
|
+
documents: ["annualReport", "secForm10k"]
|
|
13059
|
+
},
|
|
13060
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13061
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13062
|
+
documents: ["annualReport"]
|
|
13063
|
+
},
|
|
13064
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13065
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13066
|
+
documents: ["irsScheduleK1"]
|
|
13067
|
+
}
|
|
13068
|
+
}
|
|
13069
|
+
};
|
|
13070
|
+
const GuidanceContent = ({
|
|
13071
|
+
i18n,
|
|
13072
|
+
country: country2,
|
|
13073
|
+
companyType: companyType2
|
|
13074
|
+
}) => {
|
|
13075
|
+
var _a;
|
|
13076
|
+
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
|
|
13077
|
+
return jsx("div", {
|
|
13078
|
+
className: "adyen-kyc-upload-field__guidance",
|
|
13079
|
+
children: country2 === "US" ? jsxs(Fragment, {
|
|
13080
|
+
children: [acceptedDocGuidance && jsxs("div", {
|
|
13081
|
+
className: "adl-u-margin-bottom-24",
|
|
13082
|
+
children: [jsx("strong", {
|
|
13083
|
+
children: i18n.get(acceptedDocGuidance.header)
|
|
13084
|
+
}), jsx(List, {
|
|
13085
|
+
className: "adl-u-margin-left-8",
|
|
13086
|
+
children: acceptedDocGuidance.documents.map((document2) => jsx(ListItem, {
|
|
13087
|
+
children: i18n.get(document2)
|
|
13088
|
+
}, document2))
|
|
13089
|
+
})]
|
|
13090
|
+
}), jsxs("div", {
|
|
13091
|
+
className: "adl-u-margin-bottom-24",
|
|
13092
|
+
children: [jsx("strong", {
|
|
13093
|
+
children: i18n.get("documentRequirements")
|
|
13094
|
+
}), jsxs(List, {
|
|
13095
|
+
className: "adl-u-margin-left-8",
|
|
13096
|
+
children: [jsx(ListItem, {
|
|
13097
|
+
children: i18n.get("includesLegalCompanyName")
|
|
13098
|
+
}), jsx(ListItem, {
|
|
13099
|
+
children: i18n.get("includesEIN")
|
|
13100
|
+
})]
|
|
13101
|
+
})]
|
|
13102
|
+
})]
|
|
13103
|
+
}) : jsxs("div", {
|
|
13104
|
+
className: "adl-u-margin-bottom-24",
|
|
13105
|
+
children: [jsxs("div", {
|
|
13106
|
+
className: "adyen-kyc-upload-field__subtitle",
|
|
13107
|
+
children: [" ", i18n.get("requirements")]
|
|
13108
|
+
}), jsxs(List, {
|
|
13109
|
+
className: "adyen-kyc-upload-field__requirements",
|
|
13110
|
+
children: [jsx(ListItem, {
|
|
13111
|
+
children: i18n.get("containsNameOfCompany")
|
|
13112
|
+
}), jsx(ListItem, {
|
|
13113
|
+
children: i18n.get("documentShowsTaxIdOfCompany")
|
|
13114
|
+
}), jsx(ListItem, {
|
|
13115
|
+
children: i18n.get("issuedByTheTaxAuthority")
|
|
13116
|
+
})]
|
|
13117
|
+
})]
|
|
13118
|
+
})
|
|
13119
|
+
});
|
|
13120
|
+
};
|
|
13121
|
+
function TaxDocumentComponent({
|
|
13122
|
+
id: id2,
|
|
13123
|
+
country: country2,
|
|
13124
|
+
companyType: companyType2 = CompanyTypesValue.PRIVATE_COMPANY,
|
|
13125
|
+
heading = "companyTaxDocumentFormHeading",
|
|
13126
|
+
description: description2 = "companyTaxDocumentFormDescription",
|
|
13127
|
+
...props
|
|
13128
|
+
}) {
|
|
13129
|
+
const {
|
|
13130
|
+
i18n
|
|
13131
|
+
} = useI18nContext();
|
|
13132
|
+
return jsx(DocumentUpload, {
|
|
13133
|
+
...props,
|
|
13134
|
+
id: id2,
|
|
13135
|
+
heading: i18n.get(heading),
|
|
13136
|
+
description: i18n.get(description2),
|
|
13137
|
+
documentField: "taxDocument",
|
|
13138
|
+
documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
|
|
13139
|
+
guidanceContent: GuidanceContent({
|
|
13140
|
+
i18n,
|
|
13141
|
+
country: country2,
|
|
13142
|
+
companyType: companyType2
|
|
13143
|
+
}),
|
|
13144
|
+
companyType: companyType2,
|
|
13145
|
+
country: country2
|
|
13146
|
+
});
|
|
13147
|
+
}
|
|
12701
13148
|
const companyForms = {
|
|
12702
13149
|
companyNameAndCountry: {
|
|
12703
13150
|
formId: "companyNameAndCountry",
|
|
@@ -12722,11 +13169,15 @@ const companyForms = {
|
|
|
12722
13169
|
companyRegistrationDocument: {
|
|
12723
13170
|
formId: "companyRegistrationDocument",
|
|
12724
13171
|
formName: "registrationDocument",
|
|
13172
|
+
formHeading: "companyRegistrationDocumentHeading",
|
|
13173
|
+
formDescription: "companyRegistrationDocumentFormDescription",
|
|
12725
13174
|
fields: ["registrationDocument"]
|
|
12726
13175
|
},
|
|
12727
13176
|
companyTaxDocument: {
|
|
12728
13177
|
formId: "companyTaxDocument",
|
|
12729
13178
|
formName: "taxDocument",
|
|
13179
|
+
formHeading: "companyTaxDocumentFormHeading",
|
|
13180
|
+
formDescription: "companyTaxDocumentFormDescription",
|
|
12730
13181
|
fields: ["taxDocument"]
|
|
12731
13182
|
}
|
|
12732
13183
|
};
|
|
@@ -12741,7 +13192,8 @@ function CompanyComponent(props) {
|
|
|
12741
13192
|
const {
|
|
12742
13193
|
i18n
|
|
12743
13194
|
} = useI18nContext();
|
|
12744
|
-
const [currentCompanyType, setCurrentCompanyType] = useState(
|
|
13195
|
+
const [currentCompanyType, setCurrentCompanyType] = useState(void 0);
|
|
13196
|
+
const [currentCountry, setCurrentCountry] = useState(props.country);
|
|
12745
13197
|
const companyNameAndCountryFormProps = getFormProps(props, CompanyNameAndCountryFormID);
|
|
12746
13198
|
const companyTypeFormProps = getFormProps(props, CompanyTypeFormID);
|
|
12747
13199
|
const companyRegistrationDetailsFormProps = getFormProps(props, CompanyRegistrationDetailsFormID);
|
|
@@ -12757,6 +13209,7 @@ function CompanyComponent(props) {
|
|
|
12757
13209
|
setCurrentCompanyType(companyType2);
|
|
12758
13210
|
const companyCountryPrev = (_d = (_c = prevState.data) == null ? void 0 : _c[CompanyNameAndCountryFormID]) == null ? void 0 : _d.country;
|
|
12759
13211
|
const companyCountry2 = (_f = (_e = currentState.data) == null ? void 0 : _e[CompanyNameAndCountryFormID]) == null ? void 0 : _f.country;
|
|
13212
|
+
setCurrentCountry(companyCountry2);
|
|
12760
13213
|
const accountHolder2 = (_h = (_g = currentState.data) == null ? void 0 : _g[CompanyTypeFormID]) == null ? void 0 : _h.accountHolder;
|
|
12761
13214
|
if (companyCountry2 != null && companyCountry2 !== companyCountryPrev) {
|
|
12762
13215
|
props.onCountryChange(companyCountry2);
|
|
@@ -12812,51 +13265,32 @@ function CompanyComponent(props) {
|
|
|
12812
13265
|
})
|
|
12813
13266
|
}), jsx("div", {
|
|
12814
13267
|
className: props.activeForm.formId !== CompanyRegistrationDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
12815
|
-
children: jsx(
|
|
13268
|
+
children: jsx(RegistrationDocumentComponent, {
|
|
12816
13269
|
...companyRegistrationDocumentFormProps,
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
className: "adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16",
|
|
12823
|
-
children: i18n.get("registrationDocumentSubTitle")
|
|
12824
|
-
}), jsxs("div", {
|
|
12825
|
-
className: "adyen-kyc-upload-field__subtitle",
|
|
12826
|
-
children: [" ", i18n.get("requirements")]
|
|
12827
|
-
}), jsxs(List, {
|
|
12828
|
-
className: "adyen-kyc-upload-field__requirements",
|
|
12829
|
-
children: [jsx(ListItem, {
|
|
12830
|
-
children: i18n.get("documentIssuedByGovernmentAuthority")
|
|
12831
|
-
}), jsx(ListItem, {
|
|
12832
|
-
children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
|
|
12833
|
-
values: {
|
|
12834
|
-
numberOfMonths: 12
|
|
12835
|
-
}
|
|
12836
|
-
})
|
|
12837
|
-
})]
|
|
12838
|
-
}), jsx(ContextGuidance, {
|
|
12839
|
-
page: "Company registration document",
|
|
12840
|
-
titleId: "whatIfDocumentIsMoreThan12MonthsOld",
|
|
12841
|
-
contentId: "ifDocumentMoreThan12months",
|
|
12842
|
-
title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
|
|
12843
|
-
content: i18n.get("ifDocumentMoreThan12months")
|
|
12844
|
-
})]
|
|
12845
|
-
}),
|
|
12846
|
-
id: CompanyRegistrationDocumentFormID
|
|
13270
|
+
id: companyForms.companyRegistrationDocument.formId,
|
|
13271
|
+
heading: companyForms.companyRegistrationDocument.formHeading,
|
|
13272
|
+
description: companyForms.companyRegistrationDocument.formDescription,
|
|
13273
|
+
country: currentCountry,
|
|
13274
|
+
companyType: currentCompanyType
|
|
12847
13275
|
})
|
|
12848
13276
|
}), jsx("div", {
|
|
12849
13277
|
className: props.activeForm.formId !== CompanyTaxDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
12850
|
-
children: jsx(
|
|
13278
|
+
children: currentCountry === "US" ? jsx(TaxDocumentComponent, {
|
|
13279
|
+
...companyTaxDocumentFormProps,
|
|
13280
|
+
id: CompanyTaxDocumentFormID,
|
|
13281
|
+
heading: companyForms.companyTaxDocument.formHeading,
|
|
13282
|
+
description: companyForms.companyTaxDocument.formDescription,
|
|
13283
|
+
country: currentCountry,
|
|
13284
|
+
companyType: currentCompanyType
|
|
13285
|
+
}) : jsx(DocumentUpload, {
|
|
12851
13286
|
...companyTaxDocumentFormProps,
|
|
12852
13287
|
documentField: "taxDocument",
|
|
12853
|
-
documentType:
|
|
12854
|
-
heading: i18n.get(
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
}), jsxs("div", {
|
|
13288
|
+
documentType: DocumentType.VAT_DOCUMENT,
|
|
13289
|
+
heading: i18n.get(companyForms.companyTaxDocument.formHeading),
|
|
13290
|
+
description: i18n.get(companyForms.companyTaxDocument.formDescription),
|
|
13291
|
+
guidanceContent: jsxs("div", {
|
|
13292
|
+
className: "adl-u-margin-bottom-24",
|
|
13293
|
+
children: [jsxs("div", {
|
|
12860
13294
|
className: "adyen-kyc-upload-field__subtitle",
|
|
12861
13295
|
children: [" ", i18n.get("requirements")]
|
|
12862
13296
|
}), jsxs(List, {
|
|
@@ -13060,7 +13494,8 @@ const COUNTRIES_WITH_IN_APP_SEARCH_COMPANY_VERIFICATION = [CountryCodes.UnitedSt
|
|
|
13060
13494
|
const rules$2 = ({
|
|
13061
13495
|
data,
|
|
13062
13496
|
country: country2,
|
|
13063
|
-
taskType
|
|
13497
|
+
taskType,
|
|
13498
|
+
isExperimentEnabled = () => false
|
|
13064
13499
|
}) => ({
|
|
13065
13500
|
countryRequiresStateOrProvince: () => {
|
|
13066
13501
|
if (COUNTRIES_WITH_STATES_DATASET.includes(country2)) {
|
|
@@ -13125,7 +13560,7 @@ const rules$2 = ({
|
|
|
13125
13560
|
}
|
|
13126
13561
|
},
|
|
13127
13562
|
accountHolderIfCustomer: () => {
|
|
13128
|
-
if (taskType === TaskTypes.COMPANY) {
|
|
13563
|
+
if (taskType === TaskTypes.COMPANY && !isExperimentEnabled("EnableNewEntryFlow")) {
|
|
13129
13564
|
return "REQUIRED";
|
|
13130
13565
|
}
|
|
13131
13566
|
},
|
|
@@ -13153,129 +13588,6 @@ const getObscuredAccountNumber = ({
|
|
|
13153
13588
|
accountIdentifier,
|
|
13154
13589
|
realLastFour
|
|
13155
13590
|
}) => realLastFour ? `*******${realLastFour}` : accountIdentifier;
|
|
13156
|
-
const getDirectEntityAssociations = (rootLE, legalEntityId) => {
|
|
13157
|
-
var _a;
|
|
13158
|
-
return ((_a = rootLE == null ? void 0 : rootLE.entityAssociations) == null ? void 0 : _a.filter((association2) => association2.associatorId === legalEntityId)) ?? [];
|
|
13159
|
-
};
|
|
13160
|
-
const getOwnEntityAssociations = (legalEntity) => getDirectEntityAssociations(legalEntity, legalEntity.id);
|
|
13161
|
-
const getOwnSoleProprietorshipIdArray = (legalEntity) => {
|
|
13162
|
-
const ownAssociations = getOwnEntityAssociations(legalEntity);
|
|
13163
|
-
return ownAssociations.filter((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP).map((ea) => ea.legalEntityId).filter((id2) => id2 !== void 0);
|
|
13164
|
-
};
|
|
13165
|
-
const hasSolePropInLegalEntity = (rootLegalEntity) => {
|
|
13166
|
-
var _a;
|
|
13167
|
-
return ((_a = rootLegalEntity.entityAssociations) == null ? void 0 : _a.some((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP && ea.associatorId === rootLegalEntity.id)) ?? false;
|
|
13168
|
-
};
|
|
13169
|
-
const getOwnSolePropProblems = (rootLegalEntity, capabilityProblems) => {
|
|
13170
|
-
var _a;
|
|
13171
|
-
const solePropLegalEntityId = getOwnSoleProprietorshipIdArray(rootLegalEntity)[0];
|
|
13172
|
-
return (_a = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a[solePropLegalEntityId];
|
|
13173
|
-
};
|
|
13174
|
-
const hasOwnEntityAssociationOfType = (type, entityAssociations, legalEntityId) => (entityAssociations == null ? void 0 : entityAssociations.some((ea) => ea.type === type && ea.associatorId === legalEntityId)) ?? false;
|
|
13175
|
-
const removeEntityAssociationByType = (type, entityAssociations, legalEntityId) => entityAssociations.filter((ea) => ea.type !== type || ea.associatorId !== legalEntityId);
|
|
13176
|
-
const isRootLegalEntity = (legalEntity, taskType) => legalEntity.type === LegalEntityType.INDIVIDUAL && taskType === TaskTypes.INDIVIDUAL || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY_SEARCH;
|
|
13177
|
-
const filterOutUnwantedAssociationsIfRootLE = (taskType, legalEntity, accountHolder2) => {
|
|
13178
|
-
if (!(legalEntity == null ? void 0 : legalEntity.entityAssociations)) {
|
|
13179
|
-
return void 0;
|
|
13180
|
-
}
|
|
13181
|
-
let entityAssociations = getOwnEntityAssociations(legalEntity);
|
|
13182
|
-
if (!isRootLegalEntity(legalEntity, taskType)) {
|
|
13183
|
-
return entityAssociations;
|
|
13184
|
-
}
|
|
13185
|
-
if (accountHolder2 !== "mySoleProprietorName" && hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id)) {
|
|
13186
|
-
entityAssociations = removeEntityAssociationByType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id);
|
|
13187
|
-
}
|
|
13188
|
-
if (accountHolder2 !== "aTrust" && hasOwnEntityAssociationOfType(LegalEntityType.TRUST, entityAssociations, legalEntity.id)) {
|
|
13189
|
-
entityAssociations = removeEntityAssociationByType(LegalEntityType.TRUST, entityAssociations, legalEntity.id);
|
|
13190
|
-
}
|
|
13191
|
-
return entityAssociations;
|
|
13192
|
-
};
|
|
13193
|
-
var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
|
|
13194
|
-
VerificationStatus2["VALID"] = "valid";
|
|
13195
|
-
VerificationStatus2["PENDING"] = "pending";
|
|
13196
|
-
VerificationStatus2["INVALID"] = "invalid";
|
|
13197
|
-
VerificationStatus2["REJECTED"] = "rejected";
|
|
13198
|
-
return VerificationStatus2;
|
|
13199
|
-
})(VerificationStatus || {});
|
|
13200
|
-
function getNestedPropertyKeys(obj, includeUndefined = false) {
|
|
13201
|
-
const fieldNames = [];
|
|
13202
|
-
Object.entries(obj).forEach(([key, value]) => {
|
|
13203
|
-
if (typeof value === "object" && value !== null) {
|
|
13204
|
-
const nested = getNestedPropertyKeys(value).map((name) => `${key}.${name}`);
|
|
13205
|
-
fieldNames.push(...nested);
|
|
13206
|
-
return;
|
|
13207
|
-
}
|
|
13208
|
-
if (value !== void 0 || includeUndefined) {
|
|
13209
|
-
fieldNames.push(key);
|
|
13210
|
-
}
|
|
13211
|
-
});
|
|
13212
|
-
return fieldNames;
|
|
13213
|
-
}
|
|
13214
|
-
const getTaskStatus = (type, capabilityProblems, rootLegalEntity, entityIds, skipPendingCapabilitiesCheck = false) => {
|
|
13215
|
-
if (!(entityIds == null ? void 0 : entityIds.length) || entityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity))
|
|
13216
|
-
return TaskStatus.EMPTY;
|
|
13217
|
-
const importantCapabilityStatus = checkForImportantCapabilityStatus(type, capabilityProblems, entityIds);
|
|
13218
|
-
if (importantCapabilityStatus)
|
|
13219
|
-
return importantCapabilityStatus;
|
|
13220
|
-
if (!skipPendingCapabilitiesCheck && hasPendingCapabilities(rootLegalEntity))
|
|
13221
|
-
return TaskStatus.PROCESSING;
|
|
13222
|
-
return TaskStatus.FINISHED;
|
|
13223
|
-
};
|
|
13224
|
-
const IMPORTANT_STATUSES = [TaskStatus.DETAILS_REQUIRED, TaskStatus.DOWNLOAD, TaskStatus.ERROR, TaskStatus.PROCESSING];
|
|
13225
|
-
function checkForImportantCapabilityStatus(type, capabilityProblems, entityIds) {
|
|
13226
|
-
if (!(capabilityProblems == null ? void 0 : capabilityProblems[type]) || !entityIds)
|
|
13227
|
-
return;
|
|
13228
|
-
const importantStatuses = Object.entries(capabilityProblems[type]).filter(([key]) => entityIds.includes(key)).map(([, value]) => value.status).filter((status) => status !== void 0 && IMPORTANT_STATUSES.includes(status));
|
|
13229
|
-
if (!importantStatuses.length)
|
|
13230
|
-
return;
|
|
13231
|
-
return importantStatuses.reduce((prev, curr) => curr > prev ? curr : prev);
|
|
13232
|
-
}
|
|
13233
|
-
const hasPendingCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse.capabilities ?? {}).some((capability) => capability.verificationStatus === "pending");
|
|
13234
|
-
const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus !== VerificationStatus.PENDING);
|
|
13235
|
-
const hasRejectedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).some((capability) => capability.verificationStatus === VerificationStatus.REJECTED);
|
|
13236
|
-
const emptyFieldsForIndividual = ["name.firstName", "name.lastName", "residentialAddress.country"];
|
|
13237
|
-
const emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
|
|
13238
|
-
const emptyFieldsForTrust = ["name", "registeredAddress.country"];
|
|
13239
|
-
const emptyFieldsForSoleProp = ["name", "registeredAddress.country"];
|
|
13240
|
-
const emptyFieldsByEntityType = {
|
|
13241
|
-
[LegalEntityType.INDIVIDUAL]: emptyFieldsForIndividual,
|
|
13242
|
-
[LegalEntityType.ORGANIZATION]: emptyFieldsForOrganization,
|
|
13243
|
-
[LegalEntityType.TRUST]: emptyFieldsForTrust,
|
|
13244
|
-
[LegalEntityType.SOLE_PROPRIETORSHIP]: emptyFieldsForSoleProp
|
|
13245
|
-
};
|
|
13246
|
-
function isEmptyEntity(legalEntity) {
|
|
13247
|
-
var _a;
|
|
13248
|
-
const type = legalEntity == null ? void 0 : legalEntity.type;
|
|
13249
|
-
if (!type)
|
|
13250
|
-
return true;
|
|
13251
|
-
if ((_a = legalEntity.documentDetails) == null ? void 0 : _a.length)
|
|
13252
|
-
return false;
|
|
13253
|
-
const minimumFields = emptyFieldsByEntityType[type];
|
|
13254
|
-
const typeSpecificSection = legalEntity[type];
|
|
13255
|
-
if (!typeSpecificSection)
|
|
13256
|
-
return true;
|
|
13257
|
-
const fieldsOnEntity = getNestedPropertyKeys(typeSpecificSection);
|
|
13258
|
-
return !fieldsOnEntity.some((field) => !minimumFields.includes(field));
|
|
13259
|
-
}
|
|
13260
|
-
const entityTypeToCorrespondingAccountHolderOption = {
|
|
13261
|
-
[LegalEntityType.INDIVIDUAL]: "myName",
|
|
13262
|
-
[LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
|
|
13263
|
-
[LegalEntityType.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
|
|
13264
|
-
[LegalEntityType.TRUST]: "aTrust"
|
|
13265
|
-
};
|
|
13266
|
-
const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false) => {
|
|
13267
|
-
if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.type))
|
|
13268
|
-
return void 0;
|
|
13269
|
-
if (hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
|
|
13270
|
-
return "mySoleProprietorName";
|
|
13271
|
-
}
|
|
13272
|
-
if (hasOwnEntityAssociationOfType(LegalEntityType.TRUST, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
|
|
13273
|
-
return "aTrust";
|
|
13274
|
-
}
|
|
13275
|
-
if (isTypeChanging || !isEmptyEntity(legalEntityResponse)) {
|
|
13276
|
-
return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
|
|
13277
|
-
}
|
|
13278
|
-
};
|
|
13279
13591
|
const countryToTaxInfoTypeMap = {
|
|
13280
13592
|
US: "EIN",
|
|
13281
13593
|
AU: "ABN",
|
|
@@ -15247,7 +15559,9 @@ function IdVerificationMethodComponent(props) {
|
|
|
15247
15559
|
optionName: (method) => methodsMetadata[method].name,
|
|
15248
15560
|
optionDescription: (method) => methodsMetadata[method].description,
|
|
15249
15561
|
className: "adyen-kyc-field-verification-methods",
|
|
15250
|
-
|
|
15562
|
+
optionClassNames: () => ({
|
|
15563
|
+
label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
|
|
15564
|
+
}),
|
|
15251
15565
|
renderOptionIcon: (method) => jsx(IdVerificationMethodOptionIcon, {
|
|
15252
15566
|
method,
|
|
15253
15567
|
methodsMetadata
|
|
@@ -20612,7 +20926,9 @@ function PayoutVerificationMethod(props) {
|
|
|
20612
20926
|
optionDescription: (method) => methodsMetadata[method].description,
|
|
20613
20927
|
optionSubtitle: (method) => methodsMetadata[method].subtitle,
|
|
20614
20928
|
className: "adyen-kyc-field-verification-methods",
|
|
20615
|
-
|
|
20929
|
+
optionClassNames: () => ({
|
|
20930
|
+
label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
|
|
20931
|
+
}),
|
|
20616
20932
|
isOptionDisabled: (option) => props.bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
|
|
20617
20933
|
renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
|
|
20618
20934
|
method,
|
|
@@ -20879,9 +21195,8 @@ function ConstitutionalDocumentUpload({
|
|
|
20879
21195
|
i18n
|
|
20880
21196
|
} = useI18nContext();
|
|
20881
21197
|
const guidanceContent = jsxs("div", {
|
|
20882
|
-
className: "adyen-kyc-upload-field__guidance",
|
|
21198
|
+
className: "adyen-kyc-upload-field__guidance adl-u-margin-bottom-24",
|
|
20883
21199
|
children: [jsx("strong", {
|
|
20884
|
-
className: "adyen-kyc-upload-field__subtitle",
|
|
20885
21200
|
children: i18n.get("uploadOneOfTheseDocuments")
|
|
20886
21201
|
}), jsx(List, {
|
|
20887
21202
|
className: "adl-u-margin-left-8",
|
|
@@ -20891,7 +21206,7 @@ function ConstitutionalDocumentUpload({
|
|
|
20891
21206
|
}) => jsx(ListItem, {
|
|
20892
21207
|
children: i18n.get(name)
|
|
20893
21208
|
}, id22))
|
|
20894
|
-
}), jsx("div", {
|
|
21209
|
+
}), props.country !== "US" && jsx("div", {
|
|
20895
21210
|
className: "adl-u-margin-y-16",
|
|
20896
21211
|
children: jsxs("span", {
|
|
20897
21212
|
children: [i18n.get("documentIssuedWithinLastYear"), " "]
|
|
@@ -22091,6 +22406,7 @@ const getInitialProblemState = (baseEntityType, entityId, legalEntity) => baseEn
|
|
|
22091
22406
|
...cloneObject(entityProblemInitialState),
|
|
22092
22407
|
entityType: baseEntityType
|
|
22093
22408
|
};
|
|
22409
|
+
const getCapabilities = (legalEntity) => Object.keys((legalEntity == null ? void 0 : legalEntity.capabilities) ?? {});
|
|
22094
22410
|
function VerificationErrors({
|
|
22095
22411
|
verificationErrors,
|
|
22096
22412
|
formUtils
|
|
@@ -22234,7 +22550,8 @@ function Summary({
|
|
|
22234
22550
|
labels: labels2,
|
|
22235
22551
|
problems,
|
|
22236
22552
|
trackNavigation: trackNavigation2 = noop,
|
|
22237
|
-
omittedForms = []
|
|
22553
|
+
omittedForms = [],
|
|
22554
|
+
showLegalCaption = false
|
|
22238
22555
|
}) {
|
|
22239
22556
|
var _a, _b;
|
|
22240
22557
|
const {
|
|
@@ -22369,6 +22686,9 @@ function Summary({
|
|
|
22369
22686
|
}), jsx("ul", {
|
|
22370
22687
|
className: "adyen-kyc-summary",
|
|
22371
22688
|
children: renderSummary(data)
|
|
22689
|
+
}), showLegalCaption && jsx("span", {
|
|
22690
|
+
className: "adyen-kyc-summary__legal-caption",
|
|
22691
|
+
children: i18n.get("summaryLegalCaption")
|
|
22372
22692
|
})]
|
|
22373
22693
|
});
|
|
22374
22694
|
}
|
|
@@ -23240,8 +23560,9 @@ const getFieldsWithExistingData = (legalEntity, isExperimentEnabled) => {
|
|
|
23240
23560
|
}
|
|
23241
23561
|
return nonDocumentFields;
|
|
23242
23562
|
};
|
|
23563
|
+
const getLegalEntityCountry = (legalEntityResponse) => legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? legalEntityResponse.individual.residentialAddress.country : legalEntityResponse.organization.registeredAddress.country;
|
|
23243
23564
|
const organizationTypesToSkipCompanyStructureForm = ["partnershipIncorporated", "associationIncorporated"];
|
|
23244
|
-
const getBusinessType = (businessTypeItems, accountHolder2, legalEntityType, companyTypesValue) => {
|
|
23565
|
+
const getBusinessType = (businessTypeItems, country2, accountHolder2, legalEntityType, companyTypesValue, capabilities = []) => {
|
|
23245
23566
|
const findBusinessType = (id2) => businessTypeItems.find((bt) => bt.id === id2);
|
|
23246
23567
|
if (organizationTypesToSkipCompanyStructureForm.includes(companyTypesValue ?? "")) {
|
|
23247
23568
|
return findBusinessType("legalArrangement");
|
|
@@ -23256,7 +23577,13 @@ const getBusinessType = (businessTypeItems, accountHolder2, legalEntityType, com
|
|
|
23256
23577
|
case LegalEntityType.ORGANIZATION:
|
|
23257
23578
|
return findBusinessType("company");
|
|
23258
23579
|
case LegalEntityType.INDIVIDUAL:
|
|
23259
|
-
|
|
23580
|
+
if (allowIndividualWithoutSoleProp(capabilities)) {
|
|
23581
|
+
return findBusinessType("individual");
|
|
23582
|
+
}
|
|
23583
|
+
if (SOLE_PROP_COUNTRIES.includes(country2)) {
|
|
23584
|
+
return findBusinessType("soleProprietorship");
|
|
23585
|
+
}
|
|
23586
|
+
return findBusinessType("company");
|
|
23260
23587
|
}
|
|
23261
23588
|
};
|
|
23262
23589
|
const businessTypes = [{
|
|
@@ -23273,20 +23600,39 @@ const businessTypes = [{
|
|
|
23273
23600
|
id: "company",
|
|
23274
23601
|
accountHolder: "theCompanyIWorkFor",
|
|
23275
23602
|
name: "company",
|
|
23276
|
-
description: "
|
|
23603
|
+
description: "yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners"
|
|
23277
23604
|
}];
|
|
23605
|
+
const businessTypeIcons = {
|
|
23606
|
+
individual: "user",
|
|
23607
|
+
soleProprietorship: "user-business",
|
|
23608
|
+
company: "company-2",
|
|
23609
|
+
legalArrangement: "users-3"
|
|
23610
|
+
};
|
|
23278
23611
|
const legalArrangementBusinessType = {
|
|
23279
23612
|
id: "legalArrangement",
|
|
23280
|
-
name: "
|
|
23281
|
-
description: "
|
|
23282
|
-
};
|
|
23283
|
-
const
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23613
|
+
name: "trustPartnershipOrAssociation",
|
|
23614
|
+
description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfTrustPartnershipOrAssociation"
|
|
23615
|
+
};
|
|
23616
|
+
const getLegalArrangementDisplayOption = (country2) => ({
|
|
23617
|
+
...legalArrangementBusinessType,
|
|
23618
|
+
...!TRUST_COUNTRIES.includes(country2) ? {
|
|
23619
|
+
name: "partnershipOrAssociation",
|
|
23620
|
+
description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfPartnershipOrAssociation"
|
|
23621
|
+
} : {}
|
|
23622
|
+
});
|
|
23623
|
+
const getBusinessTypeOptions = (country2, capabilities) => {
|
|
23624
|
+
const legalArrangementDisplayOption = getLegalArrangementDisplayOption(country2);
|
|
23625
|
+
const allowedBusinessTypes = businessTypes.filter((businessType) => {
|
|
23626
|
+
switch (businessType.id) {
|
|
23627
|
+
case "individual":
|
|
23628
|
+
return allowIndividualWithoutSoleProp(capabilities);
|
|
23629
|
+
case "soleProprietorship":
|
|
23630
|
+
return SOLE_PROP_COUNTRIES.includes(country2);
|
|
23631
|
+
default:
|
|
23632
|
+
return true;
|
|
23633
|
+
}
|
|
23634
|
+
});
|
|
23635
|
+
return [...allowedBusinessTypes, legalArrangementDisplayOption];
|
|
23290
23636
|
};
|
|
23291
23637
|
const legalArrangementItems = [{
|
|
23292
23638
|
id: "aTrust",
|
|
@@ -23307,22 +23653,26 @@ const legalArrangementItems = [{
|
|
|
23307
23653
|
id: "associationIncorporated",
|
|
23308
23654
|
accountHolder: "theCompanyIWorkFor",
|
|
23309
23655
|
name: "associationIncorporated",
|
|
23310
|
-
description: "
|
|
23656
|
+
description: "yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose"
|
|
23311
23657
|
}];
|
|
23312
|
-
const getLegalArrangementOptions = (country2,
|
|
23658
|
+
const getLegalArrangementOptions = (country2, showUnsupportedEntityType) => legalArrangementItems.filter((legalArrangementItem) => {
|
|
23313
23659
|
if (legalArrangementItem.id !== "aTrust" && legalArrangementItem.id !== "partnershipUnincorporated") {
|
|
23314
23660
|
return true;
|
|
23315
23661
|
}
|
|
23316
|
-
if (legalArrangementItem.id === "partnershipUnincorporated" &&
|
|
23662
|
+
if (legalArrangementItem.id === "partnershipUnincorporated" && showUnsupportedEntityType) {
|
|
23317
23663
|
return true;
|
|
23318
23664
|
}
|
|
23319
|
-
return
|
|
23665
|
+
return TRUST_COUNTRIES.includes(country2);
|
|
23320
23666
|
});
|
|
23321
|
-
const
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23325
|
-
const
|
|
23667
|
+
const useSelectionOptions = (legalEntityResponse) => {
|
|
23668
|
+
const {
|
|
23669
|
+
isExperimentEnabled
|
|
23670
|
+
} = useExperimentsContext();
|
|
23671
|
+
const showUnsupportedEntityType = isExperimentEnabled("ShowUnsupportedEntityType");
|
|
23672
|
+
const country2 = getLegalEntityCountry(legalEntityResponse);
|
|
23673
|
+
const capabilities = getCapabilities(legalEntityResponse);
|
|
23674
|
+
const businessTypeOptions = getBusinessTypeOptions(country2, capabilities);
|
|
23675
|
+
const legalArrangementOptions = getLegalArrangementOptions(country2, showUnsupportedEntityType);
|
|
23326
23676
|
return {
|
|
23327
23677
|
businessTypeOptions,
|
|
23328
23678
|
legalArrangementOptions
|
|
@@ -23551,6 +23901,7 @@ const FormWrapper = ({
|
|
|
23551
23901
|
handleHomeClick == null ? void 0 : handleHomeClick();
|
|
23552
23902
|
}
|
|
23553
23903
|
};
|
|
23904
|
+
const showLegalCaption = ["solePropDetails", "companyDetails"].includes(taskName);
|
|
23554
23905
|
const summaryContent = jsx("div", {
|
|
23555
23906
|
className: "adyen-kyc-form-wrapper",
|
|
23556
23907
|
children: jsx(Summary, {
|
|
@@ -23565,7 +23916,8 @@ const FormWrapper = ({
|
|
|
23565
23916
|
forms: forms2,
|
|
23566
23917
|
gotoForm: gotoFormByFormIndex,
|
|
23567
23918
|
labels: labels2,
|
|
23568
|
-
problems
|
|
23919
|
+
problems,
|
|
23920
|
+
showLegalCaption
|
|
23569
23921
|
})
|
|
23570
23922
|
});
|
|
23571
23923
|
const formFooter = !hideDropinLayout && !hideFooter && jsx(ActionBar, {
|
|
@@ -23684,8 +24036,9 @@ function CompanyDropinComponent({
|
|
|
23684
24036
|
isSettingEnabled
|
|
23685
24037
|
} = useSettingsContext();
|
|
23686
24038
|
const {
|
|
23687
|
-
|
|
23688
|
-
} =
|
|
24039
|
+
isExperimentEnabled
|
|
24040
|
+
} = useExperimentsContext();
|
|
24041
|
+
useCoreContext();
|
|
23689
24042
|
const {
|
|
23690
24043
|
i18n,
|
|
23691
24044
|
setLocale
|
|
@@ -23730,7 +24083,8 @@ function CompanyDropinComponent({
|
|
|
23730
24083
|
country: country2,
|
|
23731
24084
|
taskType,
|
|
23732
24085
|
requiredFields,
|
|
23733
|
-
isSettingEnabled
|
|
24086
|
+
isSettingEnabled,
|
|
24087
|
+
isExperimentEnabled
|
|
23734
24088
|
}), [country2, data, taskType, requiredFields, isSettingEnabled]);
|
|
23735
24089
|
const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, companyForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
23736
24090
|
const {
|
|
@@ -23794,7 +24148,6 @@ function CompanyDropinComponent({
|
|
|
23794
24148
|
}
|
|
23795
24149
|
};
|
|
23796
24150
|
const onSubmit = async () => {
|
|
23797
|
-
var _a2;
|
|
23798
24151
|
const dataSubmitted = data;
|
|
23799
24152
|
const savedLegalEntityData = mapLegalEntityToCompany(legalEntityResponse, false);
|
|
23800
24153
|
const filteredData = removeOldDataBySchema(dataSubmitted, savedLegalEntityData);
|
|
@@ -23835,9 +24188,6 @@ function CompanyDropinComponent({
|
|
|
23835
24188
|
await attachAssociationToParentLegalEntity({
|
|
23836
24189
|
legalEntity
|
|
23837
24190
|
});
|
|
23838
|
-
if (taskType === TaskTypes.COMPANY) {
|
|
23839
|
-
setAccountHolder((_a2 = dataSubmitted == null ? void 0 : dataSubmitted.companyType) == null ? void 0 : _a2.accountHolder);
|
|
23840
|
-
}
|
|
23841
24191
|
setLoadingStatus("success");
|
|
23842
24192
|
clearToasts();
|
|
23843
24193
|
onExternalSubmit == null ? void 0 : onExternalSubmit(dataSubmitted);
|
|
@@ -24382,7 +24732,9 @@ const LookupResult = ({
|
|
|
24382
24732
|
isInvalid,
|
|
24383
24733
|
isSelected,
|
|
24384
24734
|
onSelect: noop$1,
|
|
24385
|
-
|
|
24735
|
+
classNames: {
|
|
24736
|
+
label: classes
|
|
24737
|
+
}
|
|
24386
24738
|
}), showAlert && jsx(LookupResultAlert, {
|
|
24387
24739
|
i18n,
|
|
24388
24740
|
type: alertType
|
|
@@ -24406,7 +24758,9 @@ const LookupResult = ({
|
|
|
24406
24758
|
onSelect: () => selectAndVerify(tin, option),
|
|
24407
24759
|
disabled: Boolean(verifiedCompany) || status === "loading" && !isSelected,
|
|
24408
24760
|
loading: status === "loading" && isSelected,
|
|
24409
|
-
|
|
24761
|
+
classNames: {
|
|
24762
|
+
label: classes
|
|
24763
|
+
}
|
|
24410
24764
|
}), showAlert && jsx(LookupResultAlert, {
|
|
24411
24765
|
i18n,
|
|
24412
24766
|
type: alertType
|
|
@@ -25639,12 +25993,14 @@ const forms = {
|
|
|
25639
25993
|
companyRegistrationDocument: {
|
|
25640
25994
|
formId: "companyRegistrationDocument",
|
|
25641
25995
|
formName: "companyRegistrationDocumentFormName",
|
|
25996
|
+
formHeading: "companyRegistrationDocumentHeading",
|
|
25642
25997
|
formDescription: "companyRegistrationDocumentFormDescription",
|
|
25643
25998
|
fields: ["registrationDocument"]
|
|
25644
25999
|
},
|
|
25645
26000
|
companyTaxDocument: {
|
|
25646
26001
|
formId: "companyTaxDocument",
|
|
25647
26002
|
formName: "companyTaxDocumentFormName",
|
|
26003
|
+
formHeading: "companyTaxDocumentFormHeading",
|
|
25648
26004
|
formDescription: "companyTaxDocumentFormDescription",
|
|
25649
26005
|
fields: ["taxDocument"]
|
|
25650
26006
|
}
|
|
@@ -26085,7 +26441,7 @@ function useCompanySearchTaskSubmit({
|
|
|
26085
26441
|
};
|
|
26086
26442
|
}
|
|
26087
26443
|
function CompanySearchComponent(props) {
|
|
26088
|
-
var _a, _b, _c;
|
|
26444
|
+
var _a, _b, _c, _d, _e;
|
|
26089
26445
|
const {
|
|
26090
26446
|
i18n
|
|
26091
26447
|
} = useI18nContext();
|
|
@@ -26165,54 +26521,33 @@ function CompanySearchComponent(props) {
|
|
|
26165
26521
|
})
|
|
26166
26522
|
}), jsx("div", {
|
|
26167
26523
|
className: formWrapperClasses(forms.companyRegistrationDocument.formId),
|
|
26168
|
-
children: jsx(
|
|
26524
|
+
children: jsx(RegistrationDocumentComponent, {
|
|
26169
26525
|
...getFormProps(props, forms.companyRegistrationDocument.formId),
|
|
26170
26526
|
id: forms.companyRegistrationDocument.formId,
|
|
26171
|
-
heading:
|
|
26172
|
-
description:
|
|
26173
|
-
|
|
26174
|
-
|
|
26175
|
-
guidanceContent: jsxs(Fragment, {
|
|
26176
|
-
children: [jsx("div", {
|
|
26177
|
-
className: "adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16",
|
|
26178
|
-
children: i18n.get("registrationDocumentSubTitle")
|
|
26179
|
-
}), jsxs("div", {
|
|
26180
|
-
className: "adyen-kyc-upload-field__subtitle",
|
|
26181
|
-
children: [" ", i18n.get("requirements")]
|
|
26182
|
-
}), jsxs(List, {
|
|
26183
|
-
className: "adyen-kyc-upload-field__requirements",
|
|
26184
|
-
children: [jsx(ListItem, {
|
|
26185
|
-
children: i18n.get("documentIssuedByGovernmentAuthority")
|
|
26186
|
-
}), jsx(ListItem, {
|
|
26187
|
-
children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
|
|
26188
|
-
values: {
|
|
26189
|
-
numberOfMonths: 12
|
|
26190
|
-
}
|
|
26191
|
-
})
|
|
26192
|
-
})]
|
|
26193
|
-
}), jsx(ContextGuidance, {
|
|
26194
|
-
page: "Company registration document",
|
|
26195
|
-
titleId: "whatIfDocumentIsMoreThan12MonthsOld",
|
|
26196
|
-
contentId: "ifDocumentMoreThan12months",
|
|
26197
|
-
title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
|
|
26198
|
-
content: i18n.get("ifDocumentMoreThan12months")
|
|
26199
|
-
})]
|
|
26200
|
-
})
|
|
26527
|
+
heading: forms.companyRegistrationDocument.formHeading,
|
|
26528
|
+
description: forms.companyRegistrationDocument.formDescription,
|
|
26529
|
+
country: country2,
|
|
26530
|
+
companyType: (_d = globalData.companyStructure) == null ? void 0 : _d.entityType
|
|
26201
26531
|
})
|
|
26202
26532
|
}), jsx("div", {
|
|
26203
26533
|
className: formWrapperClasses(forms.companyTaxDocument.formId),
|
|
26204
|
-
children: jsx(
|
|
26534
|
+
children: country2 === "US" ? jsx(TaxDocumentComponent, {
|
|
26535
|
+
...getFormProps(props, forms.companyTaxDocument.formId),
|
|
26536
|
+
id: forms.companyTaxDocument.formId,
|
|
26537
|
+
heading: forms.companyTaxDocument.formHeading,
|
|
26538
|
+
description: forms.companyTaxDocument.formDescription,
|
|
26539
|
+
country: country2,
|
|
26540
|
+
companyType: (_e = globalData.companyStructure) == null ? void 0 : _e.entityType
|
|
26541
|
+
}) : jsx(DocumentUpload, {
|
|
26205
26542
|
...getFormProps(props, forms.companyTaxDocument.formId),
|
|
26206
26543
|
id: forms.companyTaxDocument.formId,
|
|
26207
|
-
heading: i18n.get(forms.companyTaxDocument.
|
|
26544
|
+
heading: i18n.get(forms.companyTaxDocument.formHeading),
|
|
26208
26545
|
description: i18n.get(forms.companyTaxDocument.formDescription),
|
|
26209
26546
|
documentField: "taxDocument",
|
|
26210
|
-
documentType:
|
|
26211
|
-
guidanceContent: jsxs(
|
|
26212
|
-
|
|
26213
|
-
|
|
26214
|
-
children: i18n.get("uploadTaxationDocument")
|
|
26215
|
-
}), jsxs("div", {
|
|
26547
|
+
documentType: DocumentType.VAT_DOCUMENT,
|
|
26548
|
+
guidanceContent: jsxs("div", {
|
|
26549
|
+
className: "adl-u-margin-bottom-24",
|
|
26550
|
+
children: [jsxs("div", {
|
|
26216
26551
|
className: "adyen-kyc-upload-field__subtitle",
|
|
26217
26552
|
children: [" ", i18n.get("requirements")]
|
|
26218
26553
|
}), jsxs(List, {
|
|
@@ -26306,7 +26641,7 @@ function CompanySearchDropinComponent({
|
|
|
26306
26641
|
}, []);
|
|
26307
26642
|
const getConfigurationData = useCallback(() => getConfiguration2({
|
|
26308
26643
|
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
26309
|
-
capabilities: capabilities ??
|
|
26644
|
+
capabilities: capabilities ?? getCapabilities(legalEntityResponse),
|
|
26310
26645
|
country: country2
|
|
26311
26646
|
}), [getConfiguration2, capabilities, country2, legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities]);
|
|
26312
26647
|
const {
|
|
@@ -26877,6 +27212,38 @@ function AccountSetupRejected() {
|
|
|
26877
27212
|
content
|
|
26878
27213
|
});
|
|
26879
27214
|
}
|
|
27215
|
+
const legalArrangementTypeExamples = /* @__PURE__ */ Object.assign({ "./AT.json": () => import("./AT-njBxlQEe.js"), "./AU.json": () => import("./AU-DFQDmtVS.js"), "./BE.json": () => import("./BE-C2-55587.js"), "./BR.json": () => import("./BR-DRRnRMe_.js"), "./CA.json": () => import("./CA-DF_5NHUp.js"), "./CH.json": () => import("./CH-DS_pPGGY.js"), "./CZ.json": () => import("./CZ-CGN19Iaf.js"), "./DE.json": () => import("./DE-CWIcy4sf.js"), "./DK.json": () => import("./DK-CUV7SrN_.js"), "./ES.json": () => import("./ES-CXBTHBlj.js"), "./FI.json": () => import("./FI-D9lkf5Ag.js"), "./FR.json": () => import("./FR-C62B055T.js"), "./GB.json": () => import("./GB-C3gyya0v.js"), "./HK.json": () => import("./HK-BHvvteyC.js"), "./HR.json": () => import("./HR-BuR2eqt5.js"), "./HU.json": () => import("./HU-BeWCk1sl.js"), "./IE.json": () => import("./IE-DY6xU4Nq.js"), "./IT.json": () => import("./IT-DIpVZHWq.js"), "./LT.json": () => import("./LT-vsmh_veZ.js"), "./NL.json": () => import("./NL-D4GPWO-k.js"), "./NO.json": () => import("./NO-C2rMiNW_.js"), "./PL.json": () => import("./PL-B6DmYhdz.js"), "./PT.json": () => import("./PT-CiWuVvP4.js"), "./RO.json": () => import("./RO-CbO4Kr4f.js"), "./SE.json": () => import("./SE-ClnBSAdx.js"), "./SG.json": () => import("./SG-CQ7yymJt.js"), "./SI.json": () => import("./SI-CKmjaPXK.js"), "./SK.json": () => import("./SK-BHbQeHKV.js"), "./US.json": () => import("./US-Dxp45Utb.js") });
|
|
27216
|
+
const getLegalArrangementTypeExamplesForCountry = async (country2) => {
|
|
27217
|
+
const importForCountry = legalArrangementTypeExamples[`./${country2}.json`];
|
|
27218
|
+
if (!importForCountry) {
|
|
27219
|
+
console.warn(`No legal arrangement type examples available for ${country2}`);
|
|
27220
|
+
return {};
|
|
27221
|
+
}
|
|
27222
|
+
return (await importForCountry()).default;
|
|
27223
|
+
};
|
|
27224
|
+
const useLegalArrangementTypeExamples = (country2) => {
|
|
27225
|
+
const [examples, setExamples] = useState();
|
|
27226
|
+
useEffect(() => {
|
|
27227
|
+
getLegalArrangementTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
|
|
27228
|
+
}, [country2]);
|
|
27229
|
+
return examples;
|
|
27230
|
+
};
|
|
27231
|
+
const businessTypeExamples = /* @__PURE__ */ Object.assign({ "./AT.json": () => import("./AT-0q_5SJBQ.js"), "./AU.json": () => import("./AU-C8Ubk0YW.js"), "./BE.json": () => import("./BE-B9YzjIbl.js"), "./BR.json": () => import("./BR-Cm5wlqzu.js"), "./CA.json": () => import("./CA-GPzRNbT4.js"), "./CH.json": () => import("./CH-BN1IKzah.js"), "./CZ.json": () => import("./CZ-BC067qOt.js"), "./DE.json": () => import("./DE-C2b48uc9.js"), "./DK.json": () => import("./DK-DQdJTd7G.js"), "./ES.json": () => import("./ES-DlS7RO1p.js"), "./FI.json": () => import("./FI-DJJ7pR5Q.js"), "./FR.json": () => import("./FR-CmqiYchK.js"), "./GB.json": () => import("./GB-BsDyOPB2.js"), "./HK.json": () => import("./HK-aqSN9boX.js"), "./HR.json": () => import("./HR-lqt3S_K0.js"), "./HU.json": () => import("./HU-Cy7JJAmz.js"), "./IE.json": () => import("./IE-ncc5PJTM.js"), "./IT.json": () => import("./IT-DUpC-s62.js"), "./LT.json": () => import("./LT-DYEMsFLH.js"), "./NL.json": () => import("./NL-Bl-zh21O.js"), "./NO.json": () => import("./NO-6kmy-zV2.js"), "./PL.json": () => import("./PL-DfF0yMD3.js"), "./PT.json": () => import("./PT-ClgahH9J.js"), "./RO.json": () => import("./RO-DzjKAzZD.js"), "./SE.json": () => import("./SE-L3pYtteT.js"), "./SG.json": () => import("./SG-BCG6hbHH.js"), "./SI.json": () => import("./SI-DdcTeBdP.js"), "./SK.json": () => import("./SK-DOx6jvRF.js"), "./US.json": () => import("./US-BfGmXLD9.js") });
|
|
27232
|
+
const getBusinessTypeExamplesForCountry = async (country2) => {
|
|
27233
|
+
const importForCountry = businessTypeExamples[`./${country2}.json`];
|
|
27234
|
+
if (!importForCountry) {
|
|
27235
|
+
console.warn(`No business type examples available for ${country2}`);
|
|
27236
|
+
return {};
|
|
27237
|
+
}
|
|
27238
|
+
return (await importForCountry()).default;
|
|
27239
|
+
};
|
|
27240
|
+
const useBusinessTypeExamples = (country2) => {
|
|
27241
|
+
const [examples, setExamples] = useState();
|
|
27242
|
+
useEffect(() => {
|
|
27243
|
+
getBusinessTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
|
|
27244
|
+
}, [country2]);
|
|
27245
|
+
return examples;
|
|
27246
|
+
};
|
|
26880
27247
|
const headingTypes = {
|
|
26881
27248
|
1: ({
|
|
26882
27249
|
children,
|
|
@@ -26978,6 +27345,9 @@ const businessTypeSelectionStepTitles = {
|
|
|
26978
27345
|
/* CONFIRM_BUSINESS_SETUP_CHANGE */
|
|
26979
27346
|
]: "changeYourBusinessSetup"
|
|
26980
27347
|
};
|
|
27348
|
+
const BusinessTypeIcon = (item) => jsx(Icon, {
|
|
27349
|
+
name: businessTypeIcons[item.id]
|
|
27350
|
+
});
|
|
26981
27351
|
const BusinessTypeSelection = ({
|
|
26982
27352
|
legalEntityResponse,
|
|
26983
27353
|
accountHolder: accountHolder2,
|
|
@@ -26995,9 +27365,6 @@ const BusinessTypeSelection = ({
|
|
|
26995
27365
|
const {
|
|
26996
27366
|
showToast
|
|
26997
27367
|
} = useToastContext();
|
|
26998
|
-
const {
|
|
26999
|
-
isExperimentEnabled
|
|
27000
|
-
} = useExperimentsContext();
|
|
27001
27368
|
const [loadingStatus, setLoadingStatus] = useState();
|
|
27002
27369
|
const [currentStep, setCurrentStep] = useState(
|
|
27003
27370
|
0
|
|
@@ -27013,14 +27380,13 @@ const BusinessTypeSelection = ({
|
|
|
27013
27380
|
const {
|
|
27014
27381
|
businessTypeOptions,
|
|
27015
27382
|
legalArrangementOptions
|
|
27016
|
-
} =
|
|
27017
|
-
ShowUnsupportedEntityType: isExperimentEnabled("ShowUnsupportedEntityType")
|
|
27018
|
-
});
|
|
27383
|
+
} = useSelectionOptions(legalEntityResponse);
|
|
27019
27384
|
const currentLegalEntityType = legalEntityResponse == null ? void 0 : legalEntityResponse.type;
|
|
27020
27385
|
const currentCompanyTypesValue = (_a = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _a.type;
|
|
27021
|
-
const
|
|
27022
|
-
const
|
|
27023
|
-
const
|
|
27386
|
+
const capabilities = getCapabilities(legalEntityResponse);
|
|
27387
|
+
const country2 = getLegalEntityCountry(legalEntityResponse);
|
|
27388
|
+
const defaultBusinessType = getBusinessType(businessTypeOptions, country2, accountHolder2, legalEntityResponse == null ? void 0 : legalEntityResponse.type, (_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type, capabilities);
|
|
27389
|
+
const defaultLegalArrangementType = legalArrangementOptions.find((item) => item.id === getDefaultLegalArrangementOrSuborganizationType(legalEntityResponse, accountHolder2));
|
|
27024
27390
|
const defaultTrusteeType = legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? trusteeTypeItems[0] : trusteeTypeItems[1];
|
|
27025
27391
|
const {
|
|
27026
27392
|
handleChangeFor,
|
|
@@ -27164,6 +27530,8 @@ const BusinessTypeSelection = ({
|
|
|
27164
27530
|
}
|
|
27165
27531
|
};
|
|
27166
27532
|
const isWeCannotSetUpAccountStep = currentStep === 2;
|
|
27533
|
+
const businessTypeExamples2 = useBusinessTypeExamples(country2);
|
|
27534
|
+
const legalArrangementTypeExamples2 = useLegalArrangementTypeExamples(country2);
|
|
27167
27535
|
return jsx(LoaderWrapper, {
|
|
27168
27536
|
status: loadingStatus,
|
|
27169
27537
|
formOpacityWhenLoading: 0.3,
|
|
@@ -27185,15 +27553,17 @@ const BusinessTypeSelection = ({
|
|
|
27185
27553
|
errorMessage: i18n.get((_i = errors.businessType) == null ? void 0 : _i.errorMessage),
|
|
27186
27554
|
showErrorIconBottom: true,
|
|
27187
27555
|
isValid: valid.businessType,
|
|
27188
|
-
children: (childProps) => jsx(
|
|
27556
|
+
children: (childProps) => jsx(EntityTypeRadioGroupCard, {
|
|
27189
27557
|
...childProps,
|
|
27190
27558
|
name: "businessType",
|
|
27191
27559
|
items: businessTypeOptions,
|
|
27560
|
+
itemIcon: BusinessTypeIcon,
|
|
27192
27561
|
selected: businessTypeOptions.find((type) => {
|
|
27193
27562
|
var _a2;
|
|
27194
27563
|
return type.id === ((_a2 = data.businessType) == null ? void 0 : _a2.id);
|
|
27195
27564
|
}),
|
|
27196
|
-
onSelect: (item) => handleChangeFor("businessType")(item)
|
|
27565
|
+
onSelect: (item) => handleChangeFor("businessType")(item),
|
|
27566
|
+
examples: businessTypeExamples2
|
|
27197
27567
|
})
|
|
27198
27568
|
}), currentStep === 1 && jsxs(Fragment, {
|
|
27199
27569
|
children: [jsx(Field, {
|
|
@@ -27202,7 +27572,7 @@ const BusinessTypeSelection = ({
|
|
|
27202
27572
|
errorMessage: i18n.get((_j = errors.legalArrangement) == null ? void 0 : _j.errorMessage),
|
|
27203
27573
|
showErrorIconBottom: true,
|
|
27204
27574
|
isValid: valid.legalArrangement,
|
|
27205
|
-
children: (childProps) => jsx(
|
|
27575
|
+
children: (childProps) => jsx(EntityTypeRadioGroupCard, {
|
|
27206
27576
|
...childProps,
|
|
27207
27577
|
name: "legalArrangement",
|
|
27208
27578
|
items: legalArrangementOptions,
|
|
@@ -27210,7 +27580,8 @@ const BusinessTypeSelection = ({
|
|
|
27210
27580
|
var _a2;
|
|
27211
27581
|
return legalArrangementOption.id === ((_a2 = data.legalArrangement) == null ? void 0 : _a2.id);
|
|
27212
27582
|
}),
|
|
27213
|
-
onSelect: (item) => handleChangeFor("legalArrangement")(item)
|
|
27583
|
+
onSelect: (item) => handleChangeFor("legalArrangement")(item),
|
|
27584
|
+
examples: legalArrangementTypeExamples2
|
|
27214
27585
|
})
|
|
27215
27586
|
}), ((_k = data.legalArrangement) == null ? void 0 : _k.id) === "aTrust" && jsx(Field, {
|
|
27216
27587
|
name: "trusteeType",
|
|
@@ -29187,9 +29558,7 @@ function IndividualDropinComponent({
|
|
|
29187
29558
|
handleBackClick: externalBackClick
|
|
29188
29559
|
}) {
|
|
29189
29560
|
var _a, _b, _c, _d;
|
|
29190
|
-
|
|
29191
|
-
setAccountHolder
|
|
29192
|
-
} = useCoreContext();
|
|
29561
|
+
useCoreContext();
|
|
29193
29562
|
const {
|
|
29194
29563
|
i18n,
|
|
29195
29564
|
setLocale
|
|
@@ -29204,6 +29573,9 @@ function IndividualDropinComponent({
|
|
|
29204
29573
|
const {
|
|
29205
29574
|
isEmbeddedDropin
|
|
29206
29575
|
} = useAuthContext();
|
|
29576
|
+
const {
|
|
29577
|
+
isExperimentEnabled
|
|
29578
|
+
} = useExperimentsContext();
|
|
29207
29579
|
let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
|
|
29208
29580
|
const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
|
|
29209
29581
|
let roleTypes = [];
|
|
@@ -29246,7 +29618,8 @@ function IndividualDropinComponent({
|
|
|
29246
29618
|
data,
|
|
29247
29619
|
country: country2,
|
|
29248
29620
|
taskType,
|
|
29249
|
-
isEmbeddedDropin
|
|
29621
|
+
isEmbeddedDropin,
|
|
29622
|
+
isExperimentEnabled
|
|
29250
29623
|
}), [country2, data, taskType]);
|
|
29251
29624
|
const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, individualForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
29252
29625
|
const {
|
|
@@ -29403,7 +29776,7 @@ function IndividualDropinComponent({
|
|
|
29403
29776
|
}
|
|
29404
29777
|
};
|
|
29405
29778
|
const onSubmit = async () => {
|
|
29406
|
-
var _a2, _b2, _c2
|
|
29779
|
+
var _a2, _b2, _c2;
|
|
29407
29780
|
setLoadingStatus("loading");
|
|
29408
29781
|
const dataSubmitted = omitObscuredFieldsIfUnchanged(individualObscuredFields, data, dataFromResponse);
|
|
29409
29782
|
if (!dataSubmitted) {
|
|
@@ -29442,9 +29815,6 @@ function IndividualDropinComponent({
|
|
|
29442
29815
|
dataSubmitted
|
|
29443
29816
|
});
|
|
29444
29817
|
}
|
|
29445
|
-
if (taskType === TaskTypes.INDIVIDUAL) {
|
|
29446
|
-
setAccountHolder(((_d2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _d2.accountHolder) || null);
|
|
29447
|
-
}
|
|
29448
29818
|
setLoadingStatus("success");
|
|
29449
29819
|
clearToasts();
|
|
29450
29820
|
externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
|
|
@@ -29606,7 +29976,7 @@ function IndividualDropinComponent({
|
|
|
29606
29976
|
hideNavigation,
|
|
29607
29977
|
children: jsx(IndividualComponent, {
|
|
29608
29978
|
...derivedProps,
|
|
29609
|
-
capabilities:
|
|
29979
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
29610
29980
|
data: {
|
|
29611
29981
|
...dataFromResponse,
|
|
29612
29982
|
...documents2
|
|
@@ -29724,7 +30094,6 @@ const rules$1 = ({
|
|
|
29724
30094
|
}
|
|
29725
30095
|
}
|
|
29726
30096
|
});
|
|
29727
|
-
const getRegistrationCountry = (legalEntityResponse) => legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? legalEntityResponse.individual.residentialAddress.country : legalEntityResponse.organization.registeredAddress.country;
|
|
29728
30097
|
const labels = () => ({
|
|
29729
30098
|
verifiedAccountHolder: () => "accountHolder",
|
|
29730
30099
|
verifiedBankCountry: () => "bankCountry",
|
|
@@ -29791,7 +30160,7 @@ function PayoutDetailsDropinComponent({
|
|
|
29791
30160
|
const {
|
|
29792
30161
|
getConfiguration: getConfiguration2
|
|
29793
30162
|
} = useConfigurationApi();
|
|
29794
|
-
const defaultPayoutCountry =
|
|
30163
|
+
const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
|
|
29795
30164
|
const [bankAccountCountry2, setBankAccountCountry] = useState(defaultPayoutCountry);
|
|
29796
30165
|
const existingPayoutDetails = transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument) : void 0;
|
|
29797
30166
|
const [documents2, setDocuments] = useState();
|
|
@@ -31069,7 +31438,8 @@ const useServiceAgreement = ({
|
|
|
31069
31438
|
try {
|
|
31070
31439
|
const {
|
|
31071
31440
|
termsOfServiceDocumentId,
|
|
31072
|
-
document: document2
|
|
31441
|
+
document: document2,
|
|
31442
|
+
type
|
|
31073
31443
|
} = await handleGetServiceAgreement(legalEntityId, {
|
|
31074
31444
|
type: serviceAgreementType,
|
|
31075
31445
|
language: agreementLanguage
|
|
@@ -31081,7 +31451,8 @@ const useServiceAgreement = ({
|
|
|
31081
31451
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
31082
31452
|
setServiceAgreement({
|
|
31083
31453
|
id: termsOfServiceDocumentId,
|
|
31084
|
-
contract
|
|
31454
|
+
contract,
|
|
31455
|
+
type
|
|
31085
31456
|
});
|
|
31086
31457
|
setLoading("success");
|
|
31087
31458
|
} catch (err) {
|
|
@@ -31113,6 +31484,7 @@ const serviceAgreementTypesTranslationMapping = {
|
|
|
31113
31484
|
function ServiceAgreementDropinComponent({
|
|
31114
31485
|
legalEntityResponse,
|
|
31115
31486
|
handleGetServiceAgreement,
|
|
31487
|
+
handleDownloadAcceptedTermsOfServiceDocument,
|
|
31116
31488
|
handleHomeClick,
|
|
31117
31489
|
handleSign,
|
|
31118
31490
|
taskType,
|
|
@@ -31133,19 +31505,25 @@ function ServiceAgreementDropinComponent({
|
|
|
31133
31505
|
task: taskType
|
|
31134
31506
|
});
|
|
31135
31507
|
const [loadingStatus, setLoadingStatus] = useState();
|
|
31508
|
+
const signedForms = serviceAgreementAcceptanceInfos.map((serviceAgreementAcceptanceInfo) => ({
|
|
31509
|
+
formId: serviceAgreementAcceptanceInfo.id,
|
|
31510
|
+
serviceAgreementType: serviceAgreementAcceptanceInfo.type,
|
|
31511
|
+
acceptanceId: serviceAgreementAcceptanceInfo.id,
|
|
31512
|
+
acceptedByName: serviceAgreementAcceptanceInfo.acceptedByName,
|
|
31513
|
+
formName: serviceAgreementTypesTranslationMapping[serviceAgreementAcceptanceInfo.type],
|
|
31514
|
+
isValid: true
|
|
31515
|
+
}));
|
|
31136
31516
|
const formsToBeSigned = serviceAgreementTypes.map((serviceAgreementType) => ({
|
|
31137
31517
|
formId: serviceAgreementType,
|
|
31518
|
+
serviceAgreementType,
|
|
31138
31519
|
formName: serviceAgreementTypesTranslationMapping[serviceAgreementType],
|
|
31139
31520
|
isValid: false
|
|
31140
31521
|
}));
|
|
31141
|
-
const
|
|
31142
|
-
|
|
31143
|
-
|
|
31144
|
-
|
|
31145
|
-
|
|
31146
|
-
const forms2 = [...formsToBeSigned, ...signedForms];
|
|
31147
|
-
const [activeForm, setActiveForm] = useState(forms2[0]);
|
|
31148
|
-
const canSign = serviceAgreementTypes.includes(activeForm.formId);
|
|
31522
|
+
const forms2 = [...signedForms, ...formsToBeSigned];
|
|
31523
|
+
const [activeFormIndex, setActiveFormIndex] = useState(0);
|
|
31524
|
+
const [activeForm, setActiveForm] = useState(forms2[activeFormIndex]);
|
|
31525
|
+
const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm.serviceAgreementType)) && !activeForm.acceptanceId;
|
|
31526
|
+
const canDownload = !!handleDownloadAcceptedTermsOfServiceDocument && !!activeForm.acceptanceId;
|
|
31149
31527
|
const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
|
|
31150
31528
|
showToast({
|
|
31151
31529
|
label: i18n.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),
|
|
@@ -31159,7 +31537,7 @@ function ServiceAgreementDropinComponent({
|
|
|
31159
31537
|
handleGetServiceAgreement,
|
|
31160
31538
|
handleServiceAgreementIsNotAvailableInThatLanguage,
|
|
31161
31539
|
legalEntityId: legalEntityResponse.id,
|
|
31162
|
-
serviceAgreementType: activeForm.
|
|
31540
|
+
serviceAgreementType: activeForm.serviceAgreementType,
|
|
31163
31541
|
language: i18n.languageCode
|
|
31164
31542
|
});
|
|
31165
31543
|
const {
|
|
@@ -31189,9 +31567,9 @@ function ServiceAgreementDropinComponent({
|
|
|
31189
31567
|
...baseTrackingPayload
|
|
31190
31568
|
}
|
|
31191
31569
|
});
|
|
31570
|
+
triggerValidation();
|
|
31192
31571
|
if (loadingStatus === "loading" || !serviceAgreement || !data.signer)
|
|
31193
31572
|
return;
|
|
31194
|
-
triggerValidation();
|
|
31195
31573
|
if (isValid) {
|
|
31196
31574
|
try {
|
|
31197
31575
|
setLoadingStatus("loading");
|
|
@@ -31208,6 +31586,8 @@ function ServiceAgreementDropinComponent({
|
|
|
31208
31586
|
...baseTrackingPayload
|
|
31209
31587
|
}
|
|
31210
31588
|
});
|
|
31589
|
+
data.acceptServiceAgreement = false;
|
|
31590
|
+
data.signer = void 0;
|
|
31211
31591
|
} catch {
|
|
31212
31592
|
setLoadingStatus("success");
|
|
31213
31593
|
showToast({
|
|
@@ -31246,12 +31626,10 @@ function ServiceAgreementDropinComponent({
|
|
|
31246
31626
|
});
|
|
31247
31627
|
};
|
|
31248
31628
|
useEffect(() => {
|
|
31249
|
-
if (
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
|
|
31253
|
-
}
|
|
31254
|
-
}, [serviceAgreementTypes]);
|
|
31629
|
+
if (!serviceAgreementAcceptanceInfos.length)
|
|
31630
|
+
return;
|
|
31631
|
+
gotoForm(serviceAgreementAcceptanceInfos.length - 1);
|
|
31632
|
+
}, [serviceAgreementAcceptanceInfos]);
|
|
31255
31633
|
useEffect(() => {
|
|
31256
31634
|
userEvents.addPageView("ToS dropin");
|
|
31257
31635
|
userEvents.addEvent("Started ToS task", {
|
|
@@ -31259,27 +31637,38 @@ function ServiceAgreementDropinComponent({
|
|
|
31259
31637
|
...baseTrackingPayload
|
|
31260
31638
|
}
|
|
31261
31639
|
});
|
|
31640
|
+
const initialFormIndex = forms2.length === signedForms.length ? 0 : signedForms.length;
|
|
31641
|
+
gotoForm(initialFormIndex);
|
|
31262
31642
|
}, []);
|
|
31263
31643
|
const gotoForm = (index) => {
|
|
31264
31644
|
setActiveForm(forms2[index]);
|
|
31645
|
+
setActiveFormIndex(index);
|
|
31646
|
+
};
|
|
31647
|
+
const onDownloadAcceptedTermsOfServiceDocument = async () => {
|
|
31648
|
+
try {
|
|
31649
|
+
if (!canDownload)
|
|
31650
|
+
return;
|
|
31651
|
+
const response = await handleDownloadAcceptedTermsOfServiceDocument(legalEntityResponse.id, activeForm.acceptanceId);
|
|
31652
|
+
await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
|
|
31653
|
+
} catch (e) {
|
|
31654
|
+
showToast({
|
|
31655
|
+
label: i18n.get("failedToDownloadAcceptedServiceAgreementDocument"),
|
|
31656
|
+
type: ToastType.ERROR
|
|
31657
|
+
});
|
|
31658
|
+
}
|
|
31265
31659
|
};
|
|
31266
|
-
const sidebar =
|
|
31660
|
+
const sidebar = jsx(LoaderWrapper, {
|
|
31267
31661
|
status: loadingStatus,
|
|
31268
31662
|
formOpacityWhenLoading: 0.3,
|
|
31269
31663
|
showSpinner: false,
|
|
31270
31664
|
className: "adyen-kyc-dropin__sidebar-wrapper",
|
|
31271
|
-
children:
|
|
31272
|
-
forms:
|
|
31665
|
+
children: !!forms2.length && jsx(FormNavigation, {
|
|
31666
|
+
forms: forms2,
|
|
31273
31667
|
activeForm,
|
|
31274
31668
|
gotoForm,
|
|
31275
31669
|
taskName: "signServiceAgreement",
|
|
31276
31670
|
className: "adl-u-margin-bottom-24"
|
|
31277
|
-
})
|
|
31278
|
-
forms: signedForms,
|
|
31279
|
-
activeForm,
|
|
31280
|
-
gotoForm: (index) => gotoForm(formsToBeSigned.length + index),
|
|
31281
|
-
taskName: "signedDocuments"
|
|
31282
|
-
})]
|
|
31671
|
+
})
|
|
31283
31672
|
});
|
|
31284
31673
|
const content = jsxs(LoaderWrapper, {
|
|
31285
31674
|
status: loadingStatus,
|
|
@@ -31322,11 +31711,35 @@ function ServiceAgreementDropinComponent({
|
|
|
31322
31711
|
onChange: handleChangeFor("acceptServiceAgreement")
|
|
31323
31712
|
})
|
|
31324
31713
|
})]
|
|
31714
|
+
}), canDownload && jsx(Card, {
|
|
31715
|
+
stateful: true,
|
|
31716
|
+
className: "adl-u-margin-top-32",
|
|
31717
|
+
onClick: onDownloadAcceptedTermsOfServiceDocument,
|
|
31718
|
+
onKeyDown: handleKeys(["Enter"], onDownloadAcceptedTermsOfServiceDocument ?? noop),
|
|
31719
|
+
children: jsxs("div", {
|
|
31720
|
+
className: "adyen-kyc-download-card",
|
|
31721
|
+
children: [activeForm.acceptedByName && jsx("div", {
|
|
31722
|
+
className: "adyen-kyc-download-card__name",
|
|
31723
|
+
children: activeForm.acceptedByName
|
|
31724
|
+
}), jsx(Status, {
|
|
31725
|
+
className: "adl-status--finished adyen-kyc-download-card__status",
|
|
31726
|
+
iconStatusClass: "adl-status__icon--finished",
|
|
31727
|
+
icon: "check",
|
|
31728
|
+
text: i18n.get("signed")
|
|
31729
|
+
}), jsx(Icon, {
|
|
31730
|
+
className: "adyen-kyc-download-card__icon",
|
|
31731
|
+
name: "download"
|
|
31732
|
+
})]
|
|
31733
|
+
})
|
|
31325
31734
|
}), jsx(ActionBar, {
|
|
31326
31735
|
onHome: goHome,
|
|
31327
31736
|
homeButtonLabel: i18n.get("goToOverview"),
|
|
31328
|
-
onNext: canSign ? handleSignClick :
|
|
31329
|
-
nextButtonLabel: canSign ?
|
|
31737
|
+
onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
|
|
31738
|
+
nextButtonLabel: i18n.get(canSign ? "sign" : "next"),
|
|
31739
|
+
nextButtonDisabled: !canSign && activeFormIndex === forms2.length - 1,
|
|
31740
|
+
onBack: () => gotoForm(activeFormIndex - 1),
|
|
31741
|
+
hideBackButton: activeFormIndex === 0,
|
|
31742
|
+
backButtonLabel: i18n.get("previous")
|
|
31330
31743
|
})]
|
|
31331
31744
|
});
|
|
31332
31745
|
return jsx(DropinLayout, {
|
|
@@ -32030,7 +32443,7 @@ function DropinComposerComponent({
|
|
|
32030
32443
|
const [pciTemplateResponse, setPciTemplateResponse] = useState(null);
|
|
32031
32444
|
const [pciStatus, setPciStatus] = useState(null);
|
|
32032
32445
|
const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
|
|
32033
|
-
const [
|
|
32446
|
+
const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
|
|
32034
32447
|
const [transferInstrument, setTransferInstrument] = useState(null);
|
|
32035
32448
|
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32036
32449
|
const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
|
|
@@ -32090,11 +32503,19 @@ function DropinComposerComponent({
|
|
|
32090
32503
|
return;
|
|
32091
32504
|
getPciTemplate().catch(logger$8.error);
|
|
32092
32505
|
}, [getPciTemplate, tasks]);
|
|
32506
|
+
const addFetchedAcceptedByName = async (acceptanceInfo) => {
|
|
32507
|
+
const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
|
|
32508
|
+
return {
|
|
32509
|
+
...acceptanceInfo,
|
|
32510
|
+
acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
|
|
32511
|
+
};
|
|
32512
|
+
};
|
|
32093
32513
|
const getServiceAgreementAcceptanceInfos = async () => {
|
|
32094
32514
|
if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
|
|
32095
32515
|
try {
|
|
32096
32516
|
const response = await args.handleGetServiceAgreementAcceptanceInfos(rootLegalEntity.id);
|
|
32097
|
-
|
|
32517
|
+
const serviceAgreementAcceptanceInfosWithNames2 = await Promise.all(response.data.map(addFetchedAcceptedByName));
|
|
32518
|
+
setServiceAgreementAcceptanceInfosWithNames(serviceAgreementAcceptanceInfosWithNames2);
|
|
32098
32519
|
} catch (e) {
|
|
32099
32520
|
logger$8.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
32100
32521
|
}
|
|
@@ -32573,7 +32994,7 @@ function DropinComposerComponent({
|
|
|
32573
32994
|
onPciDownload,
|
|
32574
32995
|
pciStatus,
|
|
32575
32996
|
serviceAgreementTypes,
|
|
32576
|
-
serviceAgreementAcceptanceInfos,
|
|
32997
|
+
serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfosWithNames,
|
|
32577
32998
|
isReview: reviewRequired,
|
|
32578
32999
|
hasRequiredTrustMemberCount: hasRequiredTrustMemberCount(trustMembers2),
|
|
32579
33000
|
onTransferInstrumentDelete: deleteTransferInstrument
|
|
@@ -32603,7 +33024,7 @@ function DropinComposerComponent({
|
|
|
32603
33024
|
legalEntityResponse: rootLegalEntity,
|
|
32604
33025
|
country: rootLegalEntityCountry,
|
|
32605
33026
|
problems: getLegalEntityProblems(rootLegalEntity),
|
|
32606
|
-
capabilities:
|
|
33027
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32607
33028
|
onChange: componentOnChange,
|
|
32608
33029
|
eventEmitter,
|
|
32609
33030
|
onSubmit: async (data) => {
|
|
@@ -32641,7 +33062,7 @@ function DropinComposerComponent({
|
|
|
32641
33062
|
legalEntityResponse: associatedLegalEntity,
|
|
32642
33063
|
country: rootLegalEntityCountry,
|
|
32643
33064
|
problems: getLegalEntityProblems(associatedLegalEntity),
|
|
32644
|
-
capabilities:
|
|
33065
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32645
33066
|
onChange: componentOnChange,
|
|
32646
33067
|
eventEmitter,
|
|
32647
33068
|
onSubmit: componentOnSubmit,
|
|
@@ -32666,7 +33087,7 @@ function DropinComposerComponent({
|
|
|
32666
33087
|
legalEntityResponse: associatedLegalEntity,
|
|
32667
33088
|
problems: getLegalEntityProblems(associatedLegalEntity),
|
|
32668
33089
|
country: rootLegalEntityCountry,
|
|
32669
|
-
capabilities:
|
|
33090
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32670
33091
|
onChange: componentOnChange,
|
|
32671
33092
|
eventEmitter,
|
|
32672
33093
|
onSubmit: async (data) => {
|
|
@@ -32694,7 +33115,7 @@ function DropinComposerComponent({
|
|
|
32694
33115
|
legalEntityResponse: associatedLegalEntity,
|
|
32695
33116
|
country: rootLegalEntityCountry,
|
|
32696
33117
|
problems: getLegalEntityProblems(associatedLegalEntity),
|
|
32697
|
-
capabilities:
|
|
33118
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32698
33119
|
onChange: componentOnChange,
|
|
32699
33120
|
eventEmitter,
|
|
32700
33121
|
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
|
|
@@ -32720,7 +33141,7 @@ function DropinComposerComponent({
|
|
|
32720
33141
|
taskType: TaskTypes.COMPANY,
|
|
32721
33142
|
taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
|
|
32722
33143
|
legalEntityResponse: rootLegalEntity,
|
|
32723
|
-
capabilities:
|
|
33144
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32724
33145
|
problems: getLegalEntityProblems(rootLegalEntity),
|
|
32725
33146
|
onChange: componentOnChange,
|
|
32726
33147
|
eventEmitter,
|
|
@@ -32747,7 +33168,7 @@ function DropinComposerComponent({
|
|
|
32747
33168
|
taskType: TaskTypes.COMPANY_SEARCH,
|
|
32748
33169
|
taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
|
|
32749
33170
|
legalEntityResponse: rootLegalEntity,
|
|
32750
|
-
capabilities:
|
|
33171
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32751
33172
|
problems: getLegalEntityProblems(rootLegalEntity),
|
|
32752
33173
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
32753
33174
|
country: legalEntityResponse.organization.registeredAddress.country ?? contextCountry,
|
|
@@ -32780,7 +33201,7 @@ function DropinComposerComponent({
|
|
|
32780
33201
|
taskType: TaskTypes.TRUST_MEMBER_COMPANY,
|
|
32781
33202
|
parentLegalEntity: associatedLegalArrangement,
|
|
32782
33203
|
legalEntityResponse: associatedLegalEntity,
|
|
32783
|
-
capabilities:
|
|
33204
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32784
33205
|
problems: (_d = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _d[rootLegalEntity.id],
|
|
32785
33206
|
onChange: componentOnChange,
|
|
32786
33207
|
eventEmitter,
|
|
@@ -32807,7 +33228,7 @@ function DropinComposerComponent({
|
|
|
32807
33228
|
associatedLegalArrangement,
|
|
32808
33229
|
refreshLegalEntity,
|
|
32809
33230
|
accountHolder: getPayoutAccountHolderName(rootLegalEntity, i18n),
|
|
32810
|
-
capabilities:
|
|
33231
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32811
33232
|
onChange: componentOnChange,
|
|
32812
33233
|
eventEmitter,
|
|
32813
33234
|
onSubmit: componentOnSubmit,
|
|
@@ -32832,7 +33253,7 @@ function DropinComposerComponent({
|
|
|
32832
33253
|
problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
|
|
32833
33254
|
parentLegalEntity: rootLegalEntity,
|
|
32834
33255
|
legalEntityResponse: associatedLegalArrangement,
|
|
32835
|
-
capabilities:
|
|
33256
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32836
33257
|
onChange: componentOnChange,
|
|
32837
33258
|
eventEmitter,
|
|
32838
33259
|
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
|
|
@@ -32884,7 +33305,7 @@ function DropinComposerComponent({
|
|
|
32884
33305
|
taskType: TaskTypes.SOLE_PROPRIETOR_COMPANY,
|
|
32885
33306
|
parentLegalEntity: rootLegalEntity,
|
|
32886
33307
|
legalEntityResponse: associatedLegalArrangement,
|
|
32887
|
-
capabilities:
|
|
33308
|
+
capabilities: getCapabilities(legalEntityResponse),
|
|
32888
33309
|
problems: (_i = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _i[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
|
|
32889
33310
|
onChange: componentOnChange,
|
|
32890
33311
|
eventEmitter,
|
|
@@ -32903,8 +33324,9 @@ function DropinComposerComponent({
|
|
|
32903
33324
|
},
|
|
32904
33325
|
taskType: TaskTypes.SERVICE_AGREEMENT,
|
|
32905
33326
|
serviceAgreementTypes,
|
|
32906
|
-
serviceAgreementAcceptanceInfos,
|
|
33327
|
+
serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfosWithNames,
|
|
32907
33328
|
handleGetServiceAgreement: args.handleGetServiceAgreement,
|
|
33329
|
+
handleDownloadAcceptedTermsOfServiceDocument: args.handleDownloadAcceptedTermsOfServiceDocument,
|
|
32908
33330
|
handleHomeClick: navigateBack,
|
|
32909
33331
|
handleSign: async (...params) => {
|
|
32910
33332
|
await args.handleSignServiceAgreement(...params);
|
|
@@ -34092,7 +34514,7 @@ const ConfigurationApiProvider = ({
|
|
|
34092
34514
|
isEmbeddedDropin,
|
|
34093
34515
|
loadingContext
|
|
34094
34516
|
} = authContext;
|
|
34095
|
-
const sdkVersion = "2.
|
|
34517
|
+
const sdkVersion = "2.37.0";
|
|
34096
34518
|
useAnalytics({
|
|
34097
34519
|
onUserEvent,
|
|
34098
34520
|
legalEntityId: rootLegalEntityId,
|