@adyen/kyc-components 3.11.2 → 3.12.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/adyen-kyc-components.es.js +384 -78
- package/dist/style.css +47 -0
- package/dist/types/components/CompanyLookup/CompanyLookupResultsHeader.d.ts +1 -1
- package/dist/types/components/CompanyLookup/CompanyLookupResultsList.d.ts +1 -1
- package/dist/types/components/CompanyLookup/LookupResult.d.ts +1 -1
- package/dist/types/components/CompanyLookup/types.d.ts +0 -5
- package/dist/types/components/Dropins/types.d.ts +9 -0
- package/dist/types/components/SingpassSelection/index.d.ts +15 -0
- package/dist/types/components/SingpassSelection/types.d.ts +9 -0
- package/dist/types/components/TaskList/types.d.ts +2 -1
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +0 -2
- package/dist/types/core/Context/ExperimentContext/types.d.ts +2 -1
- package/dist/types/core/hooks/singpass/useHasSeenSingpassSelection.d.ts +7 -0
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +0 -5
- package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +0 -6
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import { lazy, Suspense, useId, forwardRef, memo, useMemo as useMemo$1, useEffec
|
|
|
6
6
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
7
7
|
import { debounce, noop as noop$1, isEmpty as isEmpty$1, range } from "lodash";
|
|
8
8
|
import OpenBankingSDK from "@adyen/openbankingsdk";
|
|
9
|
+
import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
|
|
9
10
|
import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
|
|
10
11
|
import AdyenDocumentViewer from "@adyen/adyen-document-viewer";
|
|
11
12
|
const ConfigurationApiContext = createContext(void 0);
|
|
@@ -187,6 +188,7 @@ const registrationAddress = "Registration address";
|
|
|
187
188
|
const registeredAddressHeaderDescription = "The address as it appears on your company's official registration documents.";
|
|
188
189
|
const registeredAddressHeaderDescription__NL = "The address registered to your company with the Chamber of Commerce.";
|
|
189
190
|
const registeredAddressHeaderDescription__US = "Your address as it appears on your Secretary of State Registration.";
|
|
191
|
+
const registeredAddressHeaderDescription__PR = "Your address as it appears on your Department of State Registration.";
|
|
190
192
|
const registeredAddressTrustHeaderDescription = "The address registered to your trust";
|
|
191
193
|
const operationalAddress = "Operational address";
|
|
192
194
|
const provideRegistrationDetails = "Provide registration details";
|
|
@@ -658,6 +660,7 @@ const nameOfBankAccountHolder = "We need to know about the bank account where yo
|
|
|
658
660
|
const enterValidAccountDetails = "Please enter valid account details";
|
|
659
661
|
const enterValid_ = "Please enter valid: %{fieldNames}";
|
|
660
662
|
const whatBestDescribesYourBusinessSetup = "What best describes your business setup?";
|
|
663
|
+
const howWouldYouLikeToSetUpYourAccount = "How would you like to set up your account";
|
|
661
664
|
const whichLegalArrangementDoesYourBusinessHave = "Which legal arrangement does your business have?";
|
|
662
665
|
const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for you";
|
|
663
666
|
const changeYourBusinessSetup = "Change your business setup?";
|
|
@@ -803,11 +806,13 @@ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
|
|
|
803
806
|
const certificateOfIncorporation = "Certificate of incorporation";
|
|
804
807
|
const certificateOfFormation = "Certificate of formation";
|
|
805
808
|
const secretaryOfStateFiling = "Secretary of State filing";
|
|
809
|
+
const secretaryOfStateFiling__PR = "Department of State filing";
|
|
806
810
|
const partnerShipAgreement = "Partnership agreement";
|
|
807
811
|
const charter = "Charter";
|
|
808
812
|
const articlesOfIncorporation = "Articles of incorporation";
|
|
809
813
|
const meetingRecords = "Board of directors' meeting records of decisions";
|
|
810
814
|
const secretaryOfStateRegDoc = "Registration document from Secretary of State";
|
|
815
|
+
const secretaryOfStateRegDoc__PR = "Registration document from Department of State";
|
|
811
816
|
const certificateOfIncumbency = "Certificate of incumbency";
|
|
812
817
|
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.";
|
|
813
818
|
const learnMore = "Learn more";
|
|
@@ -834,6 +839,10 @@ const addresses = "Addresses";
|
|
|
834
839
|
const loading = "Loading";
|
|
835
840
|
const businessIncorporationNumber = "Business incorporation number";
|
|
836
841
|
const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
|
|
842
|
+
const retrieveMyInfoBusiness = "Retrieve Myinfo business";
|
|
843
|
+
const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
|
|
844
|
+
const enterTheDetailsYourself = "Enter the details yourself";
|
|
845
|
+
const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
|
|
837
846
|
const verificationMethod = "Verification method";
|
|
838
847
|
const verifyViaMobileBankAppOrBankWebsite = "Verify the account via mobile bank app or bank website";
|
|
839
848
|
const provideAccountDetailsAndUploadBankStatement = "Provide account details and upload a scan of a bank statement";
|
|
@@ -904,6 +913,7 @@ const legalCompanyName__helperText = "Enter the name exactly as it is on your co
|
|
|
904
913
|
const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
|
|
905
914
|
const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
|
|
906
915
|
const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
|
|
916
|
+
const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
|
|
907
917
|
const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
|
|
908
918
|
const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
|
|
909
919
|
const taxInformationNumber = "Tax Identification Number";
|
|
@@ -1285,6 +1295,7 @@ const onboardingRedirectRejectedDescriptionP1 = "Your account can’t be set up.
|
|
|
1285
1295
|
const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
|
|
1286
1296
|
const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
|
|
1287
1297
|
const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
|
|
1298
|
+
const failToLaunchSingpass = "failed to launch Singpass";
|
|
1288
1299
|
const addBankDetails = "Add bank details";
|
|
1289
1300
|
const addMissingBankDetails = "We are missing your bank details in order to perform payouts, please add your bank account.";
|
|
1290
1301
|
const bankDetails = "Bank details";
|
|
@@ -1453,6 +1464,7 @@ const defaultTrans = {
|
|
|
1453
1464
|
registeredAddressHeaderDescription,
|
|
1454
1465
|
registeredAddressHeaderDescription__NL,
|
|
1455
1466
|
registeredAddressHeaderDescription__US,
|
|
1467
|
+
registeredAddressHeaderDescription__PR,
|
|
1456
1468
|
registeredAddressTrustHeaderDescription,
|
|
1457
1469
|
operationalAddress,
|
|
1458
1470
|
provideRegistrationDetails,
|
|
@@ -1929,6 +1941,7 @@ const defaultTrans = {
|
|
|
1929
1941
|
enterValidAccountDetails,
|
|
1930
1942
|
enterValid_,
|
|
1931
1943
|
whatBestDescribesYourBusinessSetup,
|
|
1944
|
+
howWouldYouLikeToSetUpYourAccount,
|
|
1932
1945
|
whichLegalArrangementDoesYourBusinessHave,
|
|
1933
1946
|
sorryWeCantSetUpAnAccountForYou,
|
|
1934
1947
|
changeYourBusinessSetup,
|
|
@@ -2076,11 +2089,13 @@ const defaultTrans = {
|
|
|
2076
2089
|
certificateOfIncorporation,
|
|
2077
2090
|
certificateOfFormation,
|
|
2078
2091
|
secretaryOfStateFiling,
|
|
2092
|
+
secretaryOfStateFiling__PR,
|
|
2079
2093
|
partnerShipAgreement,
|
|
2080
2094
|
charter,
|
|
2081
2095
|
articlesOfIncorporation,
|
|
2082
2096
|
meetingRecords,
|
|
2083
2097
|
secretaryOfStateRegDoc,
|
|
2098
|
+
secretaryOfStateRegDoc__PR,
|
|
2084
2099
|
certificateOfIncumbency,
|
|
2085
2100
|
documentIssuedWithinLastYear,
|
|
2086
2101
|
learnMore,
|
|
@@ -2108,6 +2123,10 @@ const defaultTrans = {
|
|
|
2108
2123
|
loading,
|
|
2109
2124
|
businessIncorporationNumber,
|
|
2110
2125
|
doNotHaveBusinessIncorporationNumber,
|
|
2126
|
+
retrieveMyInfoBusiness,
|
|
2127
|
+
getYourBusinessVerifiedDetails,
|
|
2128
|
+
enterTheDetailsYourself,
|
|
2129
|
+
youAlsoHaveToUploadSomeSupportingDocuments,
|
|
2111
2130
|
verificationMethod,
|
|
2112
2131
|
verifyViaMobileBankAppOrBankWebsite,
|
|
2113
2132
|
provideAccountDetailsAndUploadBankStatement,
|
|
@@ -2178,6 +2197,7 @@ const defaultTrans = {
|
|
|
2178
2197
|
legalCompanyName__helperText__AU,
|
|
2179
2198
|
legalCompanyName__helperText__NL,
|
|
2180
2199
|
legalCompanyName__helperText__US,
|
|
2200
|
+
legalCompanyName__helperText__PR,
|
|
2181
2201
|
legalCompanyName__helperText__SG,
|
|
2182
2202
|
legalCompanyName__helperText__HK,
|
|
2183
2203
|
taxInformationNumber,
|
|
@@ -2559,6 +2579,7 @@ const defaultTrans = {
|
|
|
2559
2579
|
onboardingRedirectVerifiedDescriptionP1,
|
|
2560
2580
|
onboardingRedirectLinkError,
|
|
2561
2581
|
onboardingRedirectOpenError,
|
|
2582
|
+
failToLaunchSingpass,
|
|
2562
2583
|
addBankDetails,
|
|
2563
2584
|
addMissingBankDetails,
|
|
2564
2585
|
bankDetails,
|
|
@@ -2777,13 +2798,6 @@ function useToastContext() {
|
|
|
2777
2798
|
}
|
|
2778
2799
|
return context;
|
|
2779
2800
|
}
|
|
2780
|
-
const CoreContext = createContext(void 0);
|
|
2781
|
-
const useCoreContext = () => {
|
|
2782
|
-
const context = useContext(CoreContext);
|
|
2783
|
-
if (!context)
|
|
2784
|
-
throw Error("You need a <CoreProvider> to use core context");
|
|
2785
|
-
return context;
|
|
2786
|
-
};
|
|
2787
2801
|
var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
2788
2802
|
SettingNames2["AcceptedCountries"] = "acceptedCountries";
|
|
2789
2803
|
SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
|
|
@@ -6708,7 +6722,6 @@ const InputRadio = ({
|
|
|
6708
6722
|
});
|
|
6709
6723
|
function RadioGroup({
|
|
6710
6724
|
items = [],
|
|
6711
|
-
i18n,
|
|
6712
6725
|
name,
|
|
6713
6726
|
onChange = noop,
|
|
6714
6727
|
value,
|
|
@@ -6717,6 +6730,9 @@ function RadioGroup({
|
|
|
6717
6730
|
className,
|
|
6718
6731
|
disabled = false
|
|
6719
6732
|
}) {
|
|
6733
|
+
const {
|
|
6734
|
+
i18n
|
|
6735
|
+
} = useI18nContext();
|
|
6720
6736
|
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
6721
6737
|
return jsx("div", {
|
|
6722
6738
|
className: "adyen-kyc-radio-group",
|
|
@@ -6905,7 +6921,6 @@ function CompanyRegistrationNumberTypeSelector({
|
|
|
6905
6921
|
name: "companyRegistrationNumberType",
|
|
6906
6922
|
items: options,
|
|
6907
6923
|
value: selected,
|
|
6908
|
-
i18n,
|
|
6909
6924
|
onChange: (e) => handleSelect(e.target.value)
|
|
6910
6925
|
})
|
|
6911
6926
|
});
|
|
@@ -7237,11 +7252,6 @@ const businessRegistrationNumberMasks = {
|
|
|
7237
7252
|
nonProfit: {
|
|
7238
7253
|
mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
|
|
7239
7254
|
}
|
|
7240
|
-
},
|
|
7241
|
-
[CountryCodes.UnitedStates]: {
|
|
7242
|
-
default: {
|
|
7243
|
-
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
7244
|
-
}
|
|
7245
7255
|
}
|
|
7246
7256
|
};
|
|
7247
7257
|
const emailPattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
@@ -7374,9 +7384,6 @@ const businessRegistrationNumberPatterns = {
|
|
|
7374
7384
|
[CountryCodes.Portugal]: {
|
|
7375
7385
|
default: /^\d{9}$/
|
|
7376
7386
|
},
|
|
7377
|
-
[CountryCodes.PuertoRico]: {
|
|
7378
|
-
default: /^\d{9}$/
|
|
7379
|
-
},
|
|
7380
7387
|
[CountryCodes.Romania]: {
|
|
7381
7388
|
default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
|
|
7382
7389
|
},
|
|
@@ -7401,9 +7408,6 @@ const businessRegistrationNumberPatterns = {
|
|
|
7401
7408
|
[CountryCodes.UnitedKingdom]: {
|
|
7402
7409
|
default: /^[a-zA-Z0-9]{8}$/,
|
|
7403
7410
|
nonProfit: /^\d{6,7}$/
|
|
7404
|
-
},
|
|
7405
|
-
[CountryCodes.UnitedStates]: {
|
|
7406
|
-
default: /^\d{9}$/
|
|
7407
7411
|
}
|
|
7408
7412
|
};
|
|
7409
7413
|
const CountryIdNumberPatterns = {
|
|
@@ -7421,6 +7425,7 @@ const CountryIdNumberPatterns = {
|
|
|
7421
7425
|
},
|
|
7422
7426
|
[CountryCodes.Sweden]: /^\d{10}$|^\d{12}$/,
|
|
7423
7427
|
[CountryCodes.UnitedStates]: {
|
|
7428
|
+
// used by CountryCodes.PuertoRico
|
|
7424
7429
|
ssn: /^\d{9}$/,
|
|
7425
7430
|
ssnLastFour: /^\d{4}$/
|
|
7426
7431
|
}
|
|
@@ -7988,16 +7993,7 @@ const defaultFieldConfig$8 = {
|
|
|
7988
7993
|
}
|
|
7989
7994
|
},
|
|
7990
7995
|
[CountryCodes.PuertoRico]: {
|
|
7991
|
-
|
|
7992
|
-
mask: businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
|
|
7993
|
-
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default),
|
|
7994
|
-
guidanceText: {
|
|
7995
|
-
key: "enterNDigitsForExample",
|
|
7996
|
-
values: {
|
|
7997
|
-
numDigits: "9",
|
|
7998
|
-
example: "12-3456789"
|
|
7999
|
-
}
|
|
8000
|
-
}
|
|
7996
|
+
// should exactly match CountryCodes.UnitedStates
|
|
8001
7997
|
},
|
|
8002
7998
|
[CountryCodes.Romania]: {
|
|
8003
7999
|
label: "numarOrdineRegistrulComertului",
|
|
@@ -8756,6 +8752,20 @@ const defaultFieldConfig$7 = {
|
|
|
8756
8752
|
}
|
|
8757
8753
|
}
|
|
8758
8754
|
},
|
|
8755
|
+
[CountryCodes.PuertoRico]: {
|
|
8756
|
+
// should exactly match CountryCodes.UnitedStates
|
|
8757
|
+
label: "employerIdentificationNumber",
|
|
8758
|
+
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
8759
|
+
mask: {
|
|
8760
|
+
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
8761
|
+
},
|
|
8762
|
+
guidanceText: {
|
|
8763
|
+
key: "validationPleaseEnterAValidEINWithFormat",
|
|
8764
|
+
values: {
|
|
8765
|
+
format: "XX-XXXXXXX"
|
|
8766
|
+
}
|
|
8767
|
+
}
|
|
8768
|
+
},
|
|
8759
8769
|
/**
|
|
8760
8770
|
* NOT YET SUPPORTED
|
|
8761
8771
|
* These are brought over from the old pattern files. We have no idea if they are accurate or not.
|
|
@@ -9467,7 +9477,6 @@ function TaxIdNumberTypeSelector({
|
|
|
9467
9477
|
name: "taxIdNumberType",
|
|
9468
9478
|
items: options,
|
|
9469
9479
|
value: selected,
|
|
9470
|
-
i18n,
|
|
9471
9480
|
onChange: (e) => handleSelect(e.target.value)
|
|
9472
9481
|
})
|
|
9473
9482
|
});
|
|
@@ -10380,7 +10389,21 @@ const countryConfig$3 = {
|
|
|
10380
10389
|
label: "vatAbsenceReason"
|
|
10381
10390
|
}
|
|
10382
10391
|
},
|
|
10383
|
-
[CountryCodes.PuertoRico]: {
|
|
10392
|
+
[CountryCodes.PuertoRico]: {
|
|
10393
|
+
// exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
|
|
10394
|
+
country: {
|
|
10395
|
+
label: "companyCountry"
|
|
10396
|
+
},
|
|
10397
|
+
legalCompanyName: {
|
|
10398
|
+
helperText: "legalCompanyName__helperText__US"
|
|
10399
|
+
},
|
|
10400
|
+
tradingName: {
|
|
10401
|
+
label: "doingBusinessAs"
|
|
10402
|
+
},
|
|
10403
|
+
exemptedFromTax: {
|
|
10404
|
+
label: "doNotHaveEIN"
|
|
10405
|
+
}
|
|
10406
|
+
},
|
|
10384
10407
|
[CountryCodes.Romania]: {},
|
|
10385
10408
|
[CountryCodes.Slovakia]: {},
|
|
10386
10409
|
[CountryCodes.Slovenia]: {},
|
|
@@ -10636,6 +10659,13 @@ const EntityTypeSelectionRadioCardBody = ({
|
|
|
10636
10659
|
})]
|
|
10637
10660
|
});
|
|
10638
10661
|
};
|
|
10662
|
+
const CoreContext = createContext(void 0);
|
|
10663
|
+
const useCoreContext = () => {
|
|
10664
|
+
const context = useContext(CoreContext);
|
|
10665
|
+
if (!context)
|
|
10666
|
+
throw Error("You need a <CoreProvider> to use core context");
|
|
10667
|
+
return context;
|
|
10668
|
+
};
|
|
10639
10669
|
var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
|
|
10640
10670
|
TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
|
|
10641
10671
|
TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
|
|
@@ -10770,6 +10800,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
|
10770
10800
|
TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
|
|
10771
10801
|
TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
|
|
10772
10802
|
TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
|
|
10803
|
+
TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
|
|
10773
10804
|
return TaskTypes2;
|
|
10774
10805
|
})(TaskTypes || {});
|
|
10775
10806
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
@@ -10919,8 +10950,8 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
|
|
|
10919
10950
|
})(DecisionMakerType || {});
|
|
10920
10951
|
const REQUIRED = "REQUIRED";
|
|
10921
10952
|
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];
|
|
10922
|
-
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
10923
|
-
const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.UnitedStates];
|
|
10953
|
+
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
10954
|
+
const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
10924
10955
|
const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
|
|
10925
10956
|
const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
|
|
10926
10957
|
const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
|
|
@@ -11875,12 +11906,20 @@ function ListItem({
|
|
|
11875
11906
|
const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
|
|
11876
11907
|
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
|
|
11877
11908
|
const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
|
|
11878
|
-
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11909
|
+
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11879
11910
|
const ADDRESS_SCHEMAS = {
|
|
11880
11911
|
[CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11881
11912
|
[CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
11882
11913
|
[CountryCodes.UnitedKingdom]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
11883
11914
|
[CountryCodes.UnitedStates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11915
|
+
[CountryCodes.PuertoRico]: [
|
|
11916
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11917
|
+
COUNTRY,
|
|
11918
|
+
ADDRESS,
|
|
11919
|
+
OTHER_ADDRESS_INFORMATION,
|
|
11920
|
+
CITY,
|
|
11921
|
+
POSTAL_CODE
|
|
11922
|
+
],
|
|
11884
11923
|
[CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
|
|
11885
11924
|
[CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
|
|
11886
11925
|
default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
|
|
@@ -11896,10 +11935,14 @@ const LABELS = {
|
|
|
11896
11935
|
otherAddressInformation: {
|
|
11897
11936
|
default: OTHER_ADDRESS_INFORMATION,
|
|
11898
11937
|
[CountryCodes.Canada]: "apartmentSuiteOptional",
|
|
11938
|
+
[CountryCodes.PuertoRico]: "apartmentSuiteOptional",
|
|
11939
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11899
11940
|
[CountryCodes.UnitedStates]: "apartmentSuiteOptional"
|
|
11900
11941
|
},
|
|
11901
11942
|
postalCode: {
|
|
11902
11943
|
default: POSTAL_CODE,
|
|
11944
|
+
[CountryCodes.PuertoRico]: "zipCode",
|
|
11945
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11903
11946
|
[CountryCodes.UnitedStates]: "zipCode"
|
|
11904
11947
|
},
|
|
11905
11948
|
stateOrProvince: {
|
|
@@ -12325,7 +12368,8 @@ const postalCodePatterns = {
|
|
|
12325
12368
|
[CountryCodes.Norway]: createRegExpByDigits(4),
|
|
12326
12369
|
[CountryCodes.Poland]: /^\d{2}-\d{3}$/,
|
|
12327
12370
|
[CountryCodes.Portugal]: /^[1-9]\d{3}([- ]?\d{3})?$/,
|
|
12328
|
-
[CountryCodes.PuertoRico]:
|
|
12371
|
+
[CountryCodes.PuertoRico]: /^\d{5}(?:[ -]?\d{4})?$/,
|
|
12372
|
+
// should exactly match CountryCodes.UnitedStates
|
|
12329
12373
|
[CountryCodes.Romania]: createRegExpByDigits(6),
|
|
12330
12374
|
[CountryCodes.Slovakia]: /^(SK-)?\d{5}$/,
|
|
12331
12375
|
[CountryCodes.Slovenia]: /^(SI-)?\d{4}$/,
|
|
@@ -12969,7 +13013,6 @@ function RegistrationAddressComponent(props) {
|
|
|
12969
13013
|
name: "operationalAddressIsSame",
|
|
12970
13014
|
items: operationalAddressIsSameItems,
|
|
12971
13015
|
value: formData.operationalAddressIsSame,
|
|
12972
|
-
i18n,
|
|
12973
13016
|
disabled: formUtils.isReadOnly("operationalAddressIsSame"),
|
|
12974
13017
|
onChange: handleChangeFor("operationalAddressIsSame"),
|
|
12975
13018
|
"aria-required": true,
|
|
@@ -12992,6 +13035,33 @@ function RegistrationAddressComponent(props) {
|
|
|
12992
13035
|
});
|
|
12993
13036
|
}
|
|
12994
13037
|
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
13038
|
+
[CountryCodes.PuertoRico]: {
|
|
13039
|
+
// should exactly match CountryCodes.UnitedStates
|
|
13040
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13041
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
13042
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling__PR"]
|
|
13043
|
+
},
|
|
13044
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
13045
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13046
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
13047
|
+
},
|
|
13048
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
13049
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13050
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
13051
|
+
},
|
|
13052
|
+
[CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
|
|
13053
|
+
header: "acceptedDocumentsForGovernment",
|
|
13054
|
+
documents: ["charter"]
|
|
13055
|
+
},
|
|
13056
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13057
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13058
|
+
documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc__PR", "certificateOfIncumbency"]
|
|
13059
|
+
},
|
|
13060
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13061
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13062
|
+
documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
|
|
13063
|
+
}
|
|
13064
|
+
},
|
|
12995
13065
|
[CountryCodes.UnitedStates]: {
|
|
12996
13066
|
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
12997
13067
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
@@ -13020,11 +13090,13 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
|
13020
13090
|
}
|
|
13021
13091
|
};
|
|
13022
13092
|
const GuidanceContent$1 = ({
|
|
13023
|
-
i18n,
|
|
13024
13093
|
country: country2,
|
|
13025
13094
|
companyType: companyType2
|
|
13026
13095
|
}) => {
|
|
13027
13096
|
var _a;
|
|
13097
|
+
const {
|
|
13098
|
+
i18n
|
|
13099
|
+
} = useI18nContext();
|
|
13028
13100
|
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
|
|
13029
13101
|
return jsx("div", {
|
|
13030
13102
|
className: "adyen-kyc-upload-field__guidance",
|
|
@@ -13095,8 +13167,7 @@ function RegistrationDocumentComponent({
|
|
|
13095
13167
|
description: i18n.get(description2),
|
|
13096
13168
|
documentField: "registrationDocument",
|
|
13097
13169
|
documentType: DocumentType.REGISTRATION_DOCUMENT,
|
|
13098
|
-
guidanceContent: GuidanceContent$1
|
|
13099
|
-
i18n,
|
|
13170
|
+
guidanceContent: jsx(GuidanceContent$1, {
|
|
13100
13171
|
country: country2,
|
|
13101
13172
|
companyType: companyType2
|
|
13102
13173
|
}),
|
|
@@ -13105,6 +13176,29 @@ function RegistrationDocumentComponent({
|
|
|
13105
13176
|
});
|
|
13106
13177
|
}
|
|
13107
13178
|
const ACCEPTED_DOCUMENTS_MAP = {
|
|
13179
|
+
[CountryCodes.PuertoRico]: {
|
|
13180
|
+
// should exactly match CountryCodes.UnitedStates
|
|
13181
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13182
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
13183
|
+
documents: ["irsCP575"]
|
|
13184
|
+
},
|
|
13185
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
13186
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13187
|
+
documents: ["annualReport", "secForm10k"]
|
|
13188
|
+
},
|
|
13189
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
13190
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13191
|
+
documents: ["annualReport", "secForm10k"]
|
|
13192
|
+
},
|
|
13193
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13194
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13195
|
+
documents: ["annualReport"]
|
|
13196
|
+
},
|
|
13197
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13198
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13199
|
+
documents: ["irsScheduleK1"]
|
|
13200
|
+
}
|
|
13201
|
+
},
|
|
13108
13202
|
[CountryCodes.UnitedStates]: {
|
|
13109
13203
|
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13110
13204
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
@@ -13129,11 +13223,13 @@ const ACCEPTED_DOCUMENTS_MAP = {
|
|
|
13129
13223
|
}
|
|
13130
13224
|
};
|
|
13131
13225
|
const GuidanceContent = ({
|
|
13132
|
-
i18n,
|
|
13133
13226
|
country: country2,
|
|
13134
13227
|
companyType: companyType2
|
|
13135
13228
|
}) => {
|
|
13136
13229
|
var _a;
|
|
13230
|
+
const {
|
|
13231
|
+
i18n
|
|
13232
|
+
} = useI18nContext();
|
|
13137
13233
|
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
|
|
13138
13234
|
return jsx("div", {
|
|
13139
13235
|
className: "adyen-kyc-upload-field__guidance",
|
|
@@ -13197,8 +13293,7 @@ function TaxDocumentComponent({
|
|
|
13197
13293
|
description: i18n.get(description2),
|
|
13198
13294
|
documentField: "taxDocument",
|
|
13199
13295
|
documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
|
|
13200
|
-
guidanceContent: GuidanceContent
|
|
13201
|
-
i18n,
|
|
13296
|
+
guidanceContent: jsx(GuidanceContent, {
|
|
13202
13297
|
country: country2,
|
|
13203
13298
|
companyType: companyType2
|
|
13204
13299
|
}),
|
|
@@ -13534,7 +13629,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
|
13534
13629
|
});
|
|
13535
13630
|
const getFileExtention = (fileName2) => fileName2.split(".").pop();
|
|
13536
13631
|
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
|
|
13537
|
-
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
|
|
13632
|
+
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
13538
13633
|
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
|
|
13539
13634
|
const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.Gibraltar, CountryCodes.HongKong, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.Singapore, CountryCodes.UnitedStates];
|
|
13540
13635
|
const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
|
|
@@ -13545,6 +13640,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
|
|
|
13545
13640
|
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
13546
13641
|
// strictly a subset of countries which use tax ID
|
|
13547
13642
|
CountryCodes.Canada,
|
|
13643
|
+
CountryCodes.PuertoRico,
|
|
13548
13644
|
CountryCodes.UnitedStates
|
|
13549
13645
|
];
|
|
13550
13646
|
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
@@ -13593,10 +13689,10 @@ const rules$2 = ({
|
|
|
13593
13689
|
companyRegistrationNumberExemptionAllowed: () => {
|
|
13594
13690
|
var _a, _b;
|
|
13595
13691
|
const companyType2 = ("companyType" in data || "companyStructure" in data) && (((_a = data.companyType) == null ? void 0 : _a.entityType) || ((_b = data.companyStructure) == null ? void 0 : _b.entityType));
|
|
13596
|
-
if (country2 ===
|
|
13692
|
+
if (country2 === CountryCodes.Germany && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
|
|
13597
13693
|
return "REQUIRED";
|
|
13598
13694
|
}
|
|
13599
|
-
if (country2 ===
|
|
13695
|
+
if (country2 === CountryCodes.Denmark && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
|
|
13600
13696
|
return "REQUIRED";
|
|
13601
13697
|
}
|
|
13602
13698
|
},
|
|
@@ -15615,13 +15711,22 @@ const IdVerificationMethodOptionFooter = ({
|
|
|
15615
15711
|
};
|
|
15616
15712
|
const idVerificationMethodFields = ["idVerificationMethod"];
|
|
15617
15713
|
function IdVerificationMethodComponent(props) {
|
|
15714
|
+
const {
|
|
15715
|
+
id: id2,
|
|
15716
|
+
data: propsData,
|
|
15717
|
+
fieldValidationErrors,
|
|
15718
|
+
validators,
|
|
15719
|
+
formVerificationErrors,
|
|
15720
|
+
name,
|
|
15721
|
+
countryOfResidence
|
|
15722
|
+
} = props;
|
|
15618
15723
|
const {
|
|
15619
15724
|
i18n
|
|
15620
15725
|
} = useI18nContext();
|
|
15621
15726
|
const {
|
|
15622
15727
|
getImageUrl
|
|
15623
15728
|
} = useConfigurationApi();
|
|
15624
|
-
const verificationMethodFormId =
|
|
15729
|
+
const verificationMethodFormId = id2;
|
|
15625
15730
|
const schema = idVerificationMethodFields;
|
|
15626
15731
|
const stateRef = useRef({
|
|
15627
15732
|
setState: null
|
|
@@ -15639,11 +15744,11 @@ function IdVerificationMethodComponent(props) {
|
|
|
15639
15744
|
...props,
|
|
15640
15745
|
schema,
|
|
15641
15746
|
defaultData: {
|
|
15642
|
-
...
|
|
15747
|
+
...propsData,
|
|
15643
15748
|
idVerificationMethod: "instantVerification"
|
|
15644
15749
|
},
|
|
15645
|
-
rules:
|
|
15646
|
-
fieldProblems:
|
|
15750
|
+
rules: validators,
|
|
15751
|
+
fieldProblems: fieldValidationErrors
|
|
15647
15752
|
});
|
|
15648
15753
|
const formUtils = formUtilities(props, i18n);
|
|
15649
15754
|
useEffect(() => {
|
|
@@ -15670,15 +15775,15 @@ function IdVerificationMethodComponent(props) {
|
|
|
15670
15775
|
children: [jsx(FormHeader, {
|
|
15671
15776
|
heading: i18n.get("verificationMethod")
|
|
15672
15777
|
}), jsx(ErrorPanel, {
|
|
15673
|
-
verificationErrors:
|
|
15674
|
-
validationErrors:
|
|
15778
|
+
verificationErrors: formVerificationErrors,
|
|
15779
|
+
validationErrors: fieldValidationErrors,
|
|
15675
15780
|
formUtils,
|
|
15676
15781
|
id: "ariaErrorField"
|
|
15677
15782
|
}), jsx("div", {
|
|
15678
15783
|
dangerouslySetInnerHTML: {
|
|
15679
15784
|
__html: i18n.get("idUploadDocumentSubtitle", {
|
|
15680
15785
|
values: {
|
|
15681
|
-
name
|
|
15786
|
+
name
|
|
15682
15787
|
}
|
|
15683
15788
|
})
|
|
15684
15789
|
}
|
|
@@ -15745,7 +15850,7 @@ function IdVerificationMethodComponent(props) {
|
|
|
15745
15850
|
}),
|
|
15746
15851
|
titleId: "howVerificationWithOnfidoWork",
|
|
15747
15852
|
contentId: "howVerificationWithOnfidoWorkContent"
|
|
15748
|
-
}),
|
|
15853
|
+
}), (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && jsx("div", {
|
|
15749
15854
|
dangerouslySetInnerHTML: {
|
|
15750
15855
|
__html: i18n.get("byProceedingToTheNextStepYouConfirmThatYouHaveReadUnderstandAndAcceptTheTerms")
|
|
15751
15856
|
}
|
|
@@ -16856,7 +16961,6 @@ function IndividualIdNumberTypeSelector({
|
|
|
16856
16961
|
name: "individualIdNumberType",
|
|
16857
16962
|
items: options,
|
|
16858
16963
|
value: selected,
|
|
16859
|
-
i18n,
|
|
16860
16964
|
onChange: (e) => {
|
|
16861
16965
|
var _a;
|
|
16862
16966
|
return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
|
|
@@ -18881,6 +18985,7 @@ const currencyByCountry = {
|
|
|
18881
18985
|
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
18882
18986
|
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
18883
18987
|
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
18988
|
+
// should exactly match CountryCodes.UnitedStates
|
|
18884
18989
|
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
18885
18990
|
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
18886
18991
|
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
@@ -24293,7 +24398,6 @@ function CompanyDropinComponent({
|
|
|
24293
24398
|
const {
|
|
24294
24399
|
isExperimentEnabled
|
|
24295
24400
|
} = useExperimentsContext();
|
|
24296
|
-
useCoreContext();
|
|
24297
24401
|
const {
|
|
24298
24402
|
i18n,
|
|
24299
24403
|
setLocale
|
|
@@ -24844,13 +24948,15 @@ const mapCompanyDataResponseToFormSchema = (company2) => ({
|
|
|
24844
24948
|
const CompanyLookupResultsHeader = ({
|
|
24845
24949
|
results,
|
|
24846
24950
|
status,
|
|
24847
|
-
i18n,
|
|
24848
24951
|
hasInternalError,
|
|
24849
24952
|
selectedCompanyId,
|
|
24850
24953
|
verifiedCompany,
|
|
24851
24954
|
retrySearch,
|
|
24852
24955
|
reset
|
|
24853
24956
|
}) => {
|
|
24957
|
+
const {
|
|
24958
|
+
i18n
|
|
24959
|
+
} = useI18nContext();
|
|
24854
24960
|
const numberOfResults = results == null ? void 0 : results.length;
|
|
24855
24961
|
const headerText = useMemo(() => {
|
|
24856
24962
|
if (hasInternalError && !selectedCompanyId) {
|
|
@@ -24885,7 +24991,7 @@ const CompanyLookupResultsHeader = ({
|
|
|
24885
24991
|
onClick: reset,
|
|
24886
24992
|
children: "Reset selection"
|
|
24887
24993
|
})]
|
|
24888
|
-
}), descriptionText && jsxs("div", {
|
|
24994
|
+
}), descriptionText && status !== "loading" && jsxs("div", {
|
|
24889
24995
|
className: "adyen-company-lookup-results-header__description",
|
|
24890
24996
|
children: [hasInternalError && !selectedCompanyId && jsx("button", {
|
|
24891
24997
|
type: "button",
|
|
@@ -24909,9 +25015,11 @@ const LookupResultBody = ({
|
|
|
24909
25015
|
})]
|
|
24910
25016
|
});
|
|
24911
25017
|
const LookupResultAlert = ({
|
|
24912
|
-
i18n,
|
|
24913
25018
|
type
|
|
24914
25019
|
}) => {
|
|
25020
|
+
const {
|
|
25021
|
+
i18n
|
|
25022
|
+
} = useI18nContext();
|
|
24915
25023
|
const iconType = {
|
|
24916
25024
|
verified: AlertTypes.SUCCESS,
|
|
24917
25025
|
warning: AlertTypes.WARNING,
|
|
@@ -24937,7 +25045,6 @@ const LookupResultAlert = ({
|
|
|
24937
25045
|
};
|
|
24938
25046
|
const LookupResult = ({
|
|
24939
25047
|
classes,
|
|
24940
|
-
i18n,
|
|
24941
25048
|
option,
|
|
24942
25049
|
status,
|
|
24943
25050
|
isSelected,
|
|
@@ -24991,7 +25098,6 @@ const LookupResult = ({
|
|
|
24991
25098
|
label: classes
|
|
24992
25099
|
}
|
|
24993
25100
|
}), showAlert && jsx(LookupResultAlert, {
|
|
24994
|
-
i18n,
|
|
24995
25101
|
type: alertType
|
|
24996
25102
|
})]
|
|
24997
25103
|
});
|
|
@@ -25017,7 +25123,6 @@ const LookupResult = ({
|
|
|
25017
25123
|
label: classes
|
|
25018
25124
|
}
|
|
25019
25125
|
}), showAlert && jsx(LookupResultAlert, {
|
|
25020
|
-
i18n,
|
|
25021
25126
|
type: alertType
|
|
25022
25127
|
})]
|
|
25023
25128
|
})
|
|
@@ -25027,7 +25132,6 @@ const CompanyLookupResultsList = ({
|
|
|
25027
25132
|
results,
|
|
25028
25133
|
selectedCompanyId,
|
|
25029
25134
|
status,
|
|
25030
|
-
i18n,
|
|
25031
25135
|
hasInternalError,
|
|
25032
25136
|
tin = "",
|
|
25033
25137
|
verifiedCompany,
|
|
@@ -25058,7 +25162,6 @@ const CompanyLookupResultsList = ({
|
|
|
25058
25162
|
classes: optionClasses(option),
|
|
25059
25163
|
option,
|
|
25060
25164
|
status,
|
|
25061
|
-
i18n,
|
|
25062
25165
|
tin,
|
|
25063
25166
|
isSelected: isOptionSelected(option),
|
|
25064
25167
|
isInvalid: isOptionInvalid(option),
|
|
@@ -25105,9 +25208,7 @@ function CompanyLookup({
|
|
|
25105
25208
|
handleVerifyTin
|
|
25106
25209
|
}) {
|
|
25107
25210
|
var _a;
|
|
25108
|
-
|
|
25109
|
-
i18n
|
|
25110
|
-
} = useI18nContext();
|
|
25211
|
+
useI18nContext();
|
|
25111
25212
|
const {
|
|
25112
25213
|
status,
|
|
25113
25214
|
results,
|
|
@@ -25192,7 +25293,6 @@ function CompanyLookup({
|
|
|
25192
25293
|
children: [jsx(CompanyLookupResultsHeader, {
|
|
25193
25294
|
results,
|
|
25194
25295
|
status,
|
|
25195
|
-
i18n,
|
|
25196
25296
|
hasInternalError,
|
|
25197
25297
|
selectedCompanyId,
|
|
25198
25298
|
verifiedCompany,
|
|
@@ -25204,7 +25304,6 @@ function CompanyLookup({
|
|
|
25204
25304
|
results,
|
|
25205
25305
|
selectedCompanyId,
|
|
25206
25306
|
status,
|
|
25207
|
-
i18n,
|
|
25208
25307
|
hasInternalError,
|
|
25209
25308
|
tin: taxInformationNumber2,
|
|
25210
25309
|
verifiedCompany,
|
|
@@ -26594,9 +26693,6 @@ function useCompanySearchTaskSubmit({
|
|
|
26594
26693
|
onExternalSubmit,
|
|
26595
26694
|
handleUpdateLegalEntity
|
|
26596
26695
|
}) {
|
|
26597
|
-
const {
|
|
26598
|
-
setAccountHolder
|
|
26599
|
-
} = useCoreContext();
|
|
26600
26696
|
const {
|
|
26601
26697
|
showToast,
|
|
26602
26698
|
clearToasts
|
|
@@ -26680,7 +26776,6 @@ function useCompanySearchTaskSubmit({
|
|
|
26680
26776
|
}
|
|
26681
26777
|
});
|
|
26682
26778
|
logger$f.log(submittedLegalEntity);
|
|
26683
|
-
setAccountHolder(entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type]);
|
|
26684
26779
|
clearToasts();
|
|
26685
26780
|
onExternalSubmit == null ? void 0 : onExternalSubmit(data);
|
|
26686
26781
|
} catch (e) {
|
|
@@ -26716,7 +26811,7 @@ function useCompanySearchTaskSubmit({
|
|
|
26716
26811
|
} finally {
|
|
26717
26812
|
setLoadingStatus("success");
|
|
26718
26813
|
}
|
|
26719
|
-
}, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems,
|
|
26814
|
+
}, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
|
|
26720
26815
|
return {
|
|
26721
26816
|
submit: submit2
|
|
26722
26817
|
};
|
|
@@ -27124,6 +27219,16 @@ const useShouldShowIntroduction = ({
|
|
|
27124
27219
|
});
|
|
27125
27220
|
return canSeeIntroduction && !hasSeenIntroduction;
|
|
27126
27221
|
};
|
|
27222
|
+
const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
|
|
27223
|
+
const useHasSeenSingpassSelection = ({
|
|
27224
|
+
legalEntityId
|
|
27225
|
+
}) => {
|
|
27226
|
+
const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(getHasSeenSingpassSelectionStorageKey(legalEntityId), false);
|
|
27227
|
+
return {
|
|
27228
|
+
hasSeenSingpassSelection,
|
|
27229
|
+
setHasSeenSingpassSelection
|
|
27230
|
+
};
|
|
27231
|
+
};
|
|
27127
27232
|
const logger$e = createLogger("useAssociatedLegalArrangement");
|
|
27128
27233
|
function useAssociatedLegalArrangement({
|
|
27129
27234
|
rootLegalEntity,
|
|
@@ -29080,6 +29185,152 @@ function ReviewComponent({
|
|
|
29080
29185
|
footer
|
|
29081
29186
|
});
|
|
29082
29187
|
}
|
|
29188
|
+
const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
|
|
29189
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#EEF0F3", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M66.82 10.09H2.9c-1.19 0-2.15.96-2.15 2.15v84.05c0 1.19.96 2.15 2.15 2.15h63.9c1.2 0 2.15-.96 2.15-2.15V12.24c0-1.19-.96-2.15-2.14-2.15" }),
|
|
29190
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
|
|
29191
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
|
|
29192
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
|
|
29193
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
|
|
29194
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
|
|
29195
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
|
|
29196
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
|
|
29197
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
|
|
29198
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
|
|
29199
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
|
|
29200
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
|
|
29201
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
|
|
29202
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.1.79H19.17c-1.18 0-2.14.96-2.14 2.15v84.05c0 1.19.96 2.15 2.14 2.15H83.1c1.19 0 2.15-.96 2.15-2.15V2.94c0-1.19-.96-2.15-2.15-2.15" }),
|
|
29203
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M64.64 16.78h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1z" }),
|
|
29204
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
|
|
29205
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 51.9h22.54m-22.54 5.7h32.82M25.44 68.99h26.54m-26.54 5.69H37.4" }),
|
|
29206
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M54.4 10.14h17.28M27.93 41.7v2.84m-.4-2.94h.8m-.8 3.2h.8m-.8-25.02h7.83m3.49 0h9.75M27.7 31.5h14.32m9.96-11.72h2.85" }),
|
|
29207
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m79.81 76.03 1.96 21.5a1.12 1.12 0 0 0 1.93.68l6.59-6.82q.2-.2.46-.28l9.01-2.96c.9-.3 1.05-1.52.23-2.02L81.51 74.96a1.12 1.12 0 0 0-1.69 1.06z" })
|
|
29208
|
+
] });
|
|
29209
|
+
const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
|
|
29210
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.82 76.52a6.1 6.1 0 0 0 6.11 6.11h76.67a6.1 6.1 0 0 0 6.11-6.11V21.46H55.83z" }),
|
|
29211
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M138.6 13.88H61.93a6.1 6.1 0 0 0-6.11 6.11v1.47h88.88V20a6.1 6.1 0 0 0-6.11-6.11z" }),
|
|
29212
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
|
|
29213
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
|
|
29214
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.15 44.19h-6.07V62.4h6.07z" }),
|
|
29215
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M42.8 76.1a11 11 0 0 0 1.4 3.63l.14.24" }),
|
|
29216
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 1.11H33.74a6.1 6.1 0 0 0-6.1 6.11v61.05a6.1 6.1 0 0 0 6.1 6.1h24.42a6.1 6.1 0 0 0 6.1-6.1V7.22a6.1 6.1 0 0 0-6.1-6.1" }),
|
|
29217
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M62.74 7.22a4.6 4.6 0 0 0-4.58-4.58H33.74a4.6 4.6 0 0 0-4.58 4.58v53.42h33.58z" }),
|
|
29218
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M45.94 69.8a3.05 3.05 0 1 0 0-6.1 3.05 3.05 0 0 0 0 6.1" }),
|
|
29219
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M29.16 60.64v7.63a4.6 4.6 0 0 0 4.58 4.58h24.42a4.6 4.6 0 0 0 4.58-4.58v-7.63" }),
|
|
29220
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
|
|
29221
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
|
|
29222
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 2.64H33.74a4.6 4.6 0 0 0-4.56 4.16h33.54a4.6 4.6 0 0 0-4.56-4.16" }),
|
|
29223
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 28.37H33.95v3.74H58.3z" }),
|
|
29224
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M46.12 42.77H33.95v3.74h12.17z" }),
|
|
29225
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M36.72 30.24h18.8" }),
|
|
29226
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 35.46H33.95v3.74H58.3z" }),
|
|
29227
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M37.86 36.19v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.94.81h-2.28m12.15-1.15v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.95.81h-2.29m6.65-1.15v2.3m.82-1.96-1.63 1.61m1.63 0-1.63-1.61m1.95.81h-2.28m-9.87-1.15v2.3m.81-1.96-1.62 1.61m1.62 0-1.62-1.61m1.96.81h-2.3" }),
|
|
29228
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M33.9 21.3h18.82M33.9 24.97h8.4" }),
|
|
29229
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 43.55h-39.1v6.02h39.1z" }),
|
|
29230
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.27 61.31H80.7v6.02h19.56z" }),
|
|
29231
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M85.17 46.56h30.2" }),
|
|
29232
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 52.25h-39.1v6.02h39.1z" }),
|
|
29233
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M86.73 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.67 1.1h-3.13m19.61-1.56v3.13m1.1-2.68-2.21 2.21m2.21 0-2.21-2.2m2.67 1.1h-3.13m10.59-1.56v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1h-3.12M95.75 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1H94.2" }),
|
|
29234
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
|
|
29235
|
+
] });
|
|
29236
|
+
const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
|
|
29237
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#F4333D", d: "M5.88 11.8c-2.54 0-4.34-.85-5.13-1.57l1.69-2.48a5.5 5.5 0 0 0 3.44 1.36c.92 0 1.33-.27 1.33-.77 0-.38-.32-.68-1.3-.9l-2-.47c-1.96-.46-2.89-1.65-2.89-3.3C1.02 1.42 2.82.1 5.5.1c2.07 0 3.73.63 4.54 1.35L8.35 3.92A4.5 4.5 0 0 0 5.5 2.75c-.86 0-1.24.3-1.24.74 0 .45.4.7 1.17.88l2 .45c2.05.45 3.04 1.56 3.04 3.18 0 2.32-1.73 3.81-4.59 3.81m12-.22h3.38V5.52c0-1.48.72-2.4 2.12-2.4 1.32 0 2.02.76 2.02 2.4v6.06h3.37V4.67c0-3.02-1.5-4.58-4.09-4.58q-2.2 0-3.42 1.74V1.1c0-.5-.29-.8-.78-.8h-2.59v11.27M42.46.32v9.75c0 4.24-2.75 5.93-6.12 5.93-2.25 0-4.12-.59-5.24-1.6l1.75-2.61a5 5 0 0 0 3.49 1.37c1.73 0 2.74-1.1 2.74-2.64V9.8c-.8 1.02-1.98 1.47-3.41 1.47-2.73 0-5.09-2.39-5.09-5.59S32.93.09 35.66.09a3.9 3.9 0 0 1 3.41 1.7V1.1c0-.5.3-.8.8-.8zM39.2 5.68c0-1.46-1.1-2.61-2.63-2.61A2.57 2.57 0 0 0 34 5.68a2.6 2.6 0 0 0 2.57 2.61 2.56 2.56 0 0 0 2.63-2.61m18 .27c0 3.47-2.35 5.86-5.28 5.86-1.53 0-2.74-.45-3.62-1.46v5.38h-3.37V.32h2.59c.5 0 .78.29.78.79v.67A4.2 4.2 0 0 1 51.91.1c2.93 0 5.29 2.39 5.29 5.86m-3.4 0c0-1.69-1.2-2.88-2.78-2.88a2.77 2.77 0 0 0-2.83 2.88 2.8 2.8 0 0 0 2.83 2.89c1.58 0 2.77-1.2 2.77-2.89M70.91.32v11.26h-3.38v-1.46a4.2 4.2 0 0 1-3.62 1.69c-2.92 0-5.28-2.39-5.28-5.86S61 .09 63.92.09c1.53 0 2.8.54 3.62 1.7V1.1c0-.5.3-.8.79-.8zm-3.26 5.63a2.8 2.8 0 0 0-2.84-2.88c-1.57 0-2.76 1.19-2.76 2.88 0 1.7 1.19 2.89 2.76 2.89 1.6 0 2.84-1.2 2.84-2.89m10.1 5.86c2.85 0 4.58-1.49 4.58-3.8 0-1.63-.99-2.73-3.03-3.19l-2-.45c-.77-.18-1.18-.43-1.18-.88s.39-.74 1.24-.74c1.04 0 2.11.5 2.86 1.17l1.68-2.48C81.11.72 79.44.1 77.37.1 74.7.1 72.9 1.42 72.9 3.68c0 1.64.92 2.83 2.88 3.29l2 .47c.99.22 1.3.52 1.3.9 0 .5-.4.77-1.33.77a5.5 5.5 0 0 1-3.44-1.36l-1.68 2.48c.78.72 2.58 1.58 5.12 1.58m10.65 0C91.27 11.8 93 10.32 93 8c0-1.63-.99-2.73-3.04-3.19l-2-.45c-.76-.18-1.17-.43-1.17-.88s.38-.74 1.24-.74c1.03 0 2.11.5 2.86 1.17l1.68-2.48C91.77.72 90.1.1 88.03.1c-2.68 0-4.47 1.33-4.47 3.59 0 1.64.92 2.83 2.87 3.29l2 .47c1 .22 1.3.52 1.3.9 0 .5-.4.77-1.32.77a5.5 5.5 0 0 1-3.44-1.36l-1.69 2.48c.8.72 2.6 1.58 5.13 1.58" }),
|
|
29238
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#000", d: "M13.8 3.92c1.1 0 1.95-.86 1.95-1.96S14.9 0 13.8 0s-1.96.86-1.96 1.96.85 1.96 1.96 1.96m-2.12 7.66h4.23l-.9-7a5 5 0 0 1-2.43 0z" })
|
|
29239
|
+
] });
|
|
29240
|
+
const setupAccountMethods = ["singpass", "manual"];
|
|
29241
|
+
const setupAccountMethodFields = ["setupAccountMethod"];
|
|
29242
|
+
const getSetupAccountMethodMetadata = () => ({
|
|
29243
|
+
singpass: {
|
|
29244
|
+
name: "retrieveMyInfoBusiness",
|
|
29245
|
+
description: "getYourBusinessVerifiedDetails",
|
|
29246
|
+
icon: jsx("span", {
|
|
29247
|
+
className: "adyen-kyc-setup-singpass-container",
|
|
29248
|
+
children: jsx(SvgSetupSingpass, {})
|
|
29249
|
+
}),
|
|
29250
|
+
provider: {
|
|
29251
|
+
name: "singpass",
|
|
29252
|
+
icon: jsx("span", {
|
|
29253
|
+
className: "adyen-kyc-singpass-logo-container",
|
|
29254
|
+
children: jsx(SvgSingpassLogo, {})
|
|
29255
|
+
})
|
|
29256
|
+
}
|
|
29257
|
+
},
|
|
29258
|
+
manual: {
|
|
29259
|
+
name: "enterTheDetailsYourself",
|
|
29260
|
+
description: "youAlsoHaveToUploadSomeSupportingDocuments",
|
|
29261
|
+
icon: jsx("span", {
|
|
29262
|
+
className: "adyen-kyc-setup-manual-container",
|
|
29263
|
+
children: jsx(SvgSetupManual, {})
|
|
29264
|
+
})
|
|
29265
|
+
}
|
|
29266
|
+
});
|
|
29267
|
+
const SingpassSelection = (props) => {
|
|
29268
|
+
const {
|
|
29269
|
+
handleNextClick
|
|
29270
|
+
} = props;
|
|
29271
|
+
const {
|
|
29272
|
+
i18n
|
|
29273
|
+
} = useI18nContext();
|
|
29274
|
+
const [selectedMethod, setSelectedMethod] = useState();
|
|
29275
|
+
const selectSetupAccountMethod = (method) => {
|
|
29276
|
+
setSelectedMethod(method);
|
|
29277
|
+
handleChangeFor("setupAccountMethod")(method);
|
|
29278
|
+
};
|
|
29279
|
+
const {
|
|
29280
|
+
handleChangeFor,
|
|
29281
|
+
data
|
|
29282
|
+
} = useForm({
|
|
29283
|
+
...props,
|
|
29284
|
+
schema: setupAccountMethodFields,
|
|
29285
|
+
defaultData: {}
|
|
29286
|
+
});
|
|
29287
|
+
const methodsMetadata = getSetupAccountMethodMetadata();
|
|
29288
|
+
return jsx("div", {
|
|
29289
|
+
className: "adl-u-display-flex adl-u-justify-content-center",
|
|
29290
|
+
children: jsxs("div", {
|
|
29291
|
+
className: "adyen-kyc-singpass-selection",
|
|
29292
|
+
children: [jsx("header", {
|
|
29293
|
+
className: "adl-u-margin-bottom-32",
|
|
29294
|
+
children: jsx(Heading, {
|
|
29295
|
+
level: 2,
|
|
29296
|
+
children: i18n.get("howWouldYouLikeToSetUpYourAccount")
|
|
29297
|
+
})
|
|
29298
|
+
}), jsx("form", {
|
|
29299
|
+
children: jsx(Field, {
|
|
29300
|
+
name: "setupAccountMethod",
|
|
29301
|
+
children: (childProps) => jsx(RadioCardSelect, {
|
|
29302
|
+
...childProps,
|
|
29303
|
+
name: "setupAccountMethod",
|
|
29304
|
+
options: setupAccountMethods,
|
|
29305
|
+
onSelect: selectSetupAccountMethod,
|
|
29306
|
+
selected: data.setupAccountMethod,
|
|
29307
|
+
optionId: (method) => method,
|
|
29308
|
+
optionName: (method) => methodsMetadata[method].name,
|
|
29309
|
+
optionDescription: (method) => methodsMetadata[method].description,
|
|
29310
|
+
className: "adyen-kyc-field-verification-methods",
|
|
29311
|
+
optionClassNames: () => ({
|
|
29312
|
+
icon: "adyen-kyc-radio-group-card__illustration",
|
|
29313
|
+
label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
|
|
29314
|
+
footer: "adyen-kyc-field-verification-methods__footer"
|
|
29315
|
+
}),
|
|
29316
|
+
renderOptionIcon: (method) => methodsMetadata[method].icon,
|
|
29317
|
+
renderOptionFooter: (method) => {
|
|
29318
|
+
var _a;
|
|
29319
|
+
return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
|
|
29320
|
+
}
|
|
29321
|
+
})
|
|
29322
|
+
})
|
|
29323
|
+
}), jsx(Button, {
|
|
29324
|
+
label: i18n.get("next"),
|
|
29325
|
+
block: true,
|
|
29326
|
+
disabled: !selectedMethod,
|
|
29327
|
+
onClick: () => handleNextClick(selectedMethod),
|
|
29328
|
+
type: "button",
|
|
29329
|
+
role: "button"
|
|
29330
|
+
})]
|
|
29331
|
+
})
|
|
29332
|
+
});
|
|
29333
|
+
};
|
|
29083
29334
|
const businessTypeMapping = {
|
|
29084
29335
|
myName: {
|
|
29085
29336
|
[LegalEntityType.INDIVIDUAL]: "individual"
|
|
@@ -32706,6 +32957,13 @@ function DropinComposerComponent({
|
|
|
32706
32957
|
} = useToastContext();
|
|
32707
32958
|
const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
|
|
32708
32959
|
const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
|
|
32960
|
+
const isSingpassExperimentEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
|
|
32961
|
+
const {
|
|
32962
|
+
hasSeenSingpassSelection,
|
|
32963
|
+
setHasSeenSingpassSelection
|
|
32964
|
+
} = useHasSeenSingpassSelection({
|
|
32965
|
+
legalEntityId: legalEntityResponse.id
|
|
32966
|
+
});
|
|
32709
32967
|
const [leId, setLeId] = useLeId();
|
|
32710
32968
|
const showIntroduction = useShouldShowIntroduction({
|
|
32711
32969
|
legalEntity: legalEntityResponse
|
|
@@ -32716,16 +32974,22 @@ function DropinComposerComponent({
|
|
|
32716
32974
|
legalEntityId: legalEntityResponse.id
|
|
32717
32975
|
});
|
|
32718
32976
|
const [tasks, setTasks] = useState([]);
|
|
32977
|
+
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32978
|
+
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32979
|
+
const isSoleProp = accountHolder2 === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
|
|
32980
|
+
const isSingpassEnabled = rootLegalEntityCountry === CountryCodes.Singapore && isSingpassExperimentEnabled && !hasSeenSingpassSelection;
|
|
32981
|
+
const shouldShowSingpass = isSingpassEnabled && (isSoleProp || legalEntityResponse.type === LegalEntityType.ORGANIZATION);
|
|
32719
32982
|
const initialTask = useMemo(() => {
|
|
32720
32983
|
if (isNewEntryFlowEnabled && (!accountHolder2 || legalEntityResponse.id !== leId)) {
|
|
32721
32984
|
return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
32722
32985
|
}
|
|
32723
32986
|
if (showIntroduction)
|
|
32724
32987
|
return TaskTypes.INTRODUCTION;
|
|
32988
|
+
if (isSingpassEnabled)
|
|
32989
|
+
return TaskTypes.SINGPASS_SELECTION;
|
|
32725
32990
|
return TaskTypes.TASKS_OVERVIEW;
|
|
32726
32991
|
}, [showIntroduction, isNewEntryFlowEnabled, accountHolder2, legalEntityResponse, leId]);
|
|
32727
32992
|
const [taskHistory, setTaskHistory] = useState([initialTask]);
|
|
32728
|
-
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32729
32993
|
const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
|
|
32730
32994
|
const {
|
|
32731
32995
|
associatedLegalArrangement,
|
|
@@ -32747,7 +33011,6 @@ function DropinComposerComponent({
|
|
|
32747
33011
|
const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
|
|
32748
33012
|
const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
|
|
32749
33013
|
const [transferInstrument, setTransferInstrument] = useState(null);
|
|
32750
|
-
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32751
33014
|
const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
|
|
32752
33015
|
const [bankVerificationVendors, setBankVerificationVendors] = useState();
|
|
32753
33016
|
const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
|
|
@@ -33003,6 +33266,33 @@ function DropinComposerComponent({
|
|
|
33003
33266
|
});
|
|
33004
33267
|
}
|
|
33005
33268
|
};
|
|
33269
|
+
const handleSingpassSelectionNextClick = async (method) => {
|
|
33270
|
+
const {
|
|
33271
|
+
handleOpenSingpassAuthorizationLink
|
|
33272
|
+
} = args;
|
|
33273
|
+
if (method === "singpass" && handleOpenSingpassAuthorizationLink) {
|
|
33274
|
+
try {
|
|
33275
|
+
const {
|
|
33276
|
+
item: {
|
|
33277
|
+
authUrl
|
|
33278
|
+
}
|
|
33279
|
+
} = await handleOpenSingpassAuthorizationLink();
|
|
33280
|
+
setHasSeenSingpassSelection(true);
|
|
33281
|
+
window.open(authUrl, "_blank").focus();
|
|
33282
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33283
|
+
} catch (e) {
|
|
33284
|
+
logger$b.error(e);
|
|
33285
|
+
showToast({
|
|
33286
|
+
label: i18n.get("failToLaunchSingpass"),
|
|
33287
|
+
type: ToastType.ERROR
|
|
33288
|
+
});
|
|
33289
|
+
}
|
|
33290
|
+
}
|
|
33291
|
+
if (method === "manual") {
|
|
33292
|
+
setHasSeenSingpassSelection(true);
|
|
33293
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33294
|
+
}
|
|
33295
|
+
};
|
|
33006
33296
|
const onNavigateTo = (task) => {
|
|
33007
33297
|
setTaskHistory([...taskHistory, task]);
|
|
33008
33298
|
onNavigate(task);
|
|
@@ -33262,7 +33552,15 @@ function DropinComposerComponent({
|
|
|
33262
33552
|
setLeId(legalEntityResponse.id);
|
|
33263
33553
|
setAccountHolder(newAccountHolder);
|
|
33264
33554
|
await refreshLegalEntity();
|
|
33265
|
-
|
|
33555
|
+
if (showIntroduction) {
|
|
33556
|
+
onNavigateTo(TaskTypes.INTRODUCTION);
|
|
33557
|
+
return;
|
|
33558
|
+
}
|
|
33559
|
+
if (isSingpassEnabled && newAccountHolder === "theCompanyIWorkFor" || newAccountHolder === "mySoleProprietorName") {
|
|
33560
|
+
onNavigateTo(TaskTypes.SINGPASS_SELECTION);
|
|
33561
|
+
return;
|
|
33562
|
+
}
|
|
33563
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33266
33564
|
},
|
|
33267
33565
|
taskHistory,
|
|
33268
33566
|
setTaskHistory,
|
|
@@ -33273,11 +33571,19 @@ function DropinComposerComponent({
|
|
|
33273
33571
|
eventEmitter
|
|
33274
33572
|
})
|
|
33275
33573
|
});
|
|
33574
|
+
case TaskTypes.SINGPASS_SELECTION:
|
|
33575
|
+
return jsx(SingpassSelection, {
|
|
33576
|
+
handleNextClick: handleSingpassSelectionNextClick
|
|
33577
|
+
});
|
|
33276
33578
|
case TaskTypes.INTRODUCTION:
|
|
33277
33579
|
return jsx(Introduction, {
|
|
33278
33580
|
legalEntity: rootLegalEntity,
|
|
33279
33581
|
onExitIntroduction: () => {
|
|
33280
33582
|
setHasSeenIntroduction(true);
|
|
33583
|
+
if (shouldShowSingpass) {
|
|
33584
|
+
onNavigateTo(TaskTypes.SINGPASS_SELECTION);
|
|
33585
|
+
return;
|
|
33586
|
+
}
|
|
33281
33587
|
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33282
33588
|
},
|
|
33283
33589
|
tasks
|
|
@@ -35474,7 +35780,7 @@ const ConfigurationApiProvider = ({
|
|
|
35474
35780
|
isEmbeddedDropin,
|
|
35475
35781
|
loadingContext
|
|
35476
35782
|
} = authContext;
|
|
35477
|
-
const sdkVersion = "3.
|
|
35783
|
+
const sdkVersion = "3.12.0";
|
|
35478
35784
|
useAnalytics({
|
|
35479
35785
|
onUserEvent,
|
|
35480
35786
|
legalEntityId: rootLegalEntityId,
|
package/dist/style.css
CHANGED
|
@@ -99786,6 +99786,53 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
99786
99786
|
/* #endregion */
|
|
99787
99787
|
/* #region Inline components */
|
|
99788
99788
|
/* #endregion */
|
|
99789
|
+
.adyen-kyc-singpass-selection {
|
|
99790
|
+
max-width: 544px;
|
|
99791
|
+
}
|
|
99792
|
+
.adyen-kyc-singpass-selection__nav {
|
|
99793
|
+
margin-top: 32px;
|
|
99794
|
+
}
|
|
99795
|
+
.adyen-kyc-singpass-selection__confirm {
|
|
99796
|
+
display: flex;
|
|
99797
|
+
gap: 16px;
|
|
99798
|
+
margin-top: 32px;
|
|
99799
|
+
}
|
|
99800
|
+
.adyen-kyc-singpass-selection__confirm button {
|
|
99801
|
+
flex-grow: 1;
|
|
99802
|
+
}
|
|
99803
|
+
|
|
99804
|
+
.adyen-kyc-setup-singpass-container {
|
|
99805
|
+
width: 143px;
|
|
99806
|
+
}
|
|
99807
|
+
|
|
99808
|
+
.adyen-kyc-setup-manual-container {
|
|
99809
|
+
width: 99px;
|
|
99810
|
+
}
|
|
99811
|
+
|
|
99812
|
+
.adyen-kyc-singpass-logo-container {
|
|
99813
|
+
width: 92px;
|
|
99814
|
+
}/* #region Spacing */
|
|
99815
|
+
/* #endregion */
|
|
99816
|
+
/* #region Colors */
|
|
99817
|
+
/* #endregion */
|
|
99818
|
+
/* #region Fonts */
|
|
99819
|
+
/* #endregion */
|
|
99820
|
+
/* #region Borders */
|
|
99821
|
+
/* #endregion */
|
|
99822
|
+
/* #region Box-shadow */
|
|
99823
|
+
/* #endregion */
|
|
99824
|
+
/* #region Shadows */
|
|
99825
|
+
/* #endregion */
|
|
99826
|
+
/* #region Z-index */
|
|
99827
|
+
/* #endregion */
|
|
99828
|
+
/* #region Transition */
|
|
99829
|
+
/* #endregion */
|
|
99830
|
+
/* #region Timing functions */
|
|
99831
|
+
/* #endregion */
|
|
99832
|
+
/* #region Focus ring */
|
|
99833
|
+
/* #endregion */
|
|
99834
|
+
/* #region Inline components */
|
|
99835
|
+
/* #endregion */
|
|
99789
99836
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
99790
99837
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
99791
99838
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CompanyLookupResultsHeaderProps } from './types';
|
|
2
|
-
export declare const CompanyLookupResultsHeader: ({ results, status,
|
|
2
|
+
export declare const CompanyLookupResultsHeader: ({ results, status, hasInternalError, selectedCompanyId, verifiedCompany, retrySearch, reset, }: CompanyLookupResultsHeaderProps) => import("preact").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CompanyLookupResultsListProps } from './types';
|
|
2
|
-
export declare const CompanyLookupResultsList: ({ results, selectedCompanyId, status,
|
|
2
|
+
export declare const CompanyLookupResultsList: ({ results, selectedCompanyId, status, hasInternalError, tin, verifiedCompany, verify, }: CompanyLookupResultsListProps) => import("preact").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './LookupResult.scss';
|
|
2
2
|
import { LookupResultProps } from './types';
|
|
3
|
-
export declare const LookupResult: ({ classes,
|
|
3
|
+
export declare const LookupResult: ({ classes, option, status, isSelected, isInvalid, isVerified, isError, tin, verifiedCompany, onSelect, }: LookupResultProps) => import("preact").JSX.Element;
|
|
@@ -5,7 +5,6 @@ import type { CountryCode } from '../../core/models/country-code';
|
|
|
5
5
|
import type { ProvinceCode } from '../../core/models/province-code';
|
|
6
6
|
import type { StateCode } from '../../core/models/state-code';
|
|
7
7
|
import type { BaseTrackingPayload } from '../../core/utils';
|
|
8
|
-
import type Language from '../../language';
|
|
9
8
|
import type { ValidatorMode } from '../../utils/validation/types';
|
|
10
9
|
import type { CompanyBasicsSchema } from '../CompanyBasics/types';
|
|
11
10
|
import type { CompanySearchSchema } from '../CompanySearch/types';
|
|
@@ -15,12 +14,10 @@ export interface LookupResultBodyProps {
|
|
|
15
14
|
address: string | undefined;
|
|
16
15
|
}
|
|
17
16
|
export interface LookupResultAlertProps {
|
|
18
|
-
i18n: Language;
|
|
19
17
|
type: 'verified' | 'warning' | 'error';
|
|
20
18
|
}
|
|
21
19
|
export interface LookupResultProps {
|
|
22
20
|
classes: string;
|
|
23
|
-
i18n: Language;
|
|
24
21
|
option: CompanySearchResult;
|
|
25
22
|
status: HookStatus;
|
|
26
23
|
isSelected: boolean;
|
|
@@ -34,7 +31,6 @@ export interface LookupResultProps {
|
|
|
34
31
|
export interface CompanyLookupResultsHeaderProps {
|
|
35
32
|
results: readonly CompanySearchResult[] | undefined;
|
|
36
33
|
status: HookStatus;
|
|
37
|
-
i18n: Language;
|
|
38
34
|
hasInternalError: boolean;
|
|
39
35
|
selectedCompanyId: string | undefined;
|
|
40
36
|
verifiedCompany: CompanyDatasetResponse | undefined;
|
|
@@ -45,7 +41,6 @@ export interface CompanyLookupResultsListProps {
|
|
|
45
41
|
results: readonly CompanySearchResult[];
|
|
46
42
|
selectedCompanyId: string | undefined;
|
|
47
43
|
status: HookStatus;
|
|
48
|
-
i18n: Language;
|
|
49
44
|
hasInternalError: boolean;
|
|
50
45
|
tin: string | undefined;
|
|
51
46
|
verifiedCompany: CompanyDatasetResponse | undefined;
|
|
@@ -17,6 +17,13 @@ import { TranslationKey } from '../../language/types';
|
|
|
17
17
|
import EventEmitter from '../EventEmitter';
|
|
18
18
|
import { TaskTypes } from '../TaskList/types';
|
|
19
19
|
import type { BasicComponentProps } from '../UIElement';
|
|
20
|
+
interface SingpassLinkResponseItem {
|
|
21
|
+
authUrl: string;
|
|
22
|
+
success: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface SingpassLinkResponse {
|
|
25
|
+
item: SingpassLinkResponseItem;
|
|
26
|
+
}
|
|
20
27
|
export interface DropinComposerProps extends DropinAPIHandlers, BasicComponentProps {
|
|
21
28
|
capabilities?: CapabilityName[];
|
|
22
29
|
legalEntityResponse: ExistingLegalEntity;
|
|
@@ -59,6 +66,7 @@ export interface DropinAPIHandlers {
|
|
|
59
66
|
handleVerifyTin?(data: TinVerificationRequest): Promise<TinVerificationResponse>;
|
|
60
67
|
handleGetOnboardingStatus?(): Promise<OnboardingStatusResponse>;
|
|
61
68
|
handleGenerateOnboardingLink?(config: OnboardingLinkConfig): Promise<OnboardingLinkResponse>;
|
|
69
|
+
handleOpenSingpassAuthorizationLink?(): Promise<SingpassLinkResponse>;
|
|
62
70
|
handleCreateTrustedTransferInstrument?(code: string, state: string): Promise<CreateTrustedTransferInstrumentResponse>;
|
|
63
71
|
}
|
|
64
72
|
export interface DropinProps {
|
|
@@ -75,3 +83,4 @@ export interface DropinProps {
|
|
|
75
83
|
taskType?: TaskTypes;
|
|
76
84
|
taskName?: TranslationKey;
|
|
77
85
|
}
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './_singpass-selection.component.scss';
|
|
2
|
+
import type { JSX } from 'preact';
|
|
3
|
+
import { TranslationKey } from '../../language/types';
|
|
4
|
+
import { SetUpAccountMethodProps, SetupAccountMethodSchema } from './types';
|
|
5
|
+
export declare const setupAccountMethodFields: Array<keyof SetupAccountMethodSchema>;
|
|
6
|
+
export interface SetupAccountMetadata {
|
|
7
|
+
name: TranslationKey;
|
|
8
|
+
description: TranslationKey;
|
|
9
|
+
icon: JSX.Element;
|
|
10
|
+
provider?: {
|
|
11
|
+
name: string;
|
|
12
|
+
icon: JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const SingpassSelection: (props: SetUpAccountMethodProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BaseInnerFormProps } from '../../core/hooks/useForm';
|
|
2
|
+
export declare const setupAccountMethods: readonly ["singpass", "manual"];
|
|
3
|
+
export type SetupAccountMethod = (typeof setupAccountMethods)[number];
|
|
4
|
+
export interface SetupAccountMethodSchema {
|
|
5
|
+
setupAccountMethod: SetupAccountMethod | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface SetUpAccountMethodProps extends BaseInnerFormProps<SetupAccountMethodSchema> {
|
|
8
|
+
handleNextClick: (setupAccountMethod: SetupAccountMethod | undefined) => void;
|
|
9
|
+
}
|
|
@@ -29,7 +29,8 @@ export declare enum TaskTypes {
|
|
|
29
29
|
TRUST_MEMBER_COMPANY_OWNER = "TRUST_MEMBER_COMPANY_OWNER",
|
|
30
30
|
SOLE_PROPRIETOR_COMPANY = "SOLE_PROPRIETOR_COMPANY",
|
|
31
31
|
LEGAL_ENTITY_TYPE_SWITCHER = "LEGAL_ENTITY_TYPE_SWITCHER",
|
|
32
|
-
CAPABILITY_REJECTED = "CAPABILITY_REJECTED"
|
|
32
|
+
CAPABILITY_REJECTED = "CAPABILITY_REJECTED",
|
|
33
|
+
SINGPASS_SELECTION = "SINGPASS_SELECTION"
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Order of TaskStatus enums are used to define the priority of the statuses
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './RadioGroup.scss';
|
|
2
2
|
import { RadioGroupProps } from './types';
|
|
3
|
-
export default function RadioGroup({ items,
|
|
3
|
+
export default function RadioGroup({ items, name, onChange, value, isInvalid, uniqueId, className, disabled, }: RadioGroupProps): import("preact").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TargetedEvent } from 'preact/compat';
|
|
2
|
-
import Language from '../../../../language/Language';
|
|
3
2
|
import { TranslationKey } from '../../../../language/types';
|
|
4
3
|
interface RadioGroupItem {
|
|
5
4
|
name: TranslationKey;
|
|
@@ -9,7 +8,6 @@ export interface RadioGroupProps {
|
|
|
9
8
|
className?: string;
|
|
10
9
|
isInvalid?: boolean;
|
|
11
10
|
items: readonly RadioGroupItem[];
|
|
12
|
-
i18n: Language;
|
|
13
11
|
name?: string;
|
|
14
12
|
onChange: (e: TargetedEvent<HTMLInputElement>) => void;
|
|
15
13
|
value?: string;
|
|
@@ -8,7 +8,8 @@ export declare enum ExperimentNames {
|
|
|
8
8
|
EnableNewEntryFlow = "EnableNewEntryFlow",
|
|
9
9
|
AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
|
|
10
10
|
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
|
|
11
|
-
ShowUnsupportedEntityType = "ShowUnsupportedEntityType"
|
|
11
|
+
ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
|
|
12
|
+
ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies"
|
|
12
13
|
}
|
|
13
14
|
export type ExperimentName = `${ExperimentNames}`;
|
|
14
15
|
export type Experiments = {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface UseHasSeenSingpassSelectionProps {
|
|
2
|
+
legalEntityId: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const useHasSeenSingpassSelection: ({ legalEntityId, }: UseHasSeenSingpassSelectionProps) => {
|
|
5
|
+
hasSeenSingpassSelection: boolean;
|
|
6
|
+
setHasSeenSingpassSelection: import("preact/hooks").StateUpdater<boolean>;
|
|
7
|
+
};
|
|
@@ -126,9 +126,6 @@ export declare const businessRegistrationNumberPatterns: {
|
|
|
126
126
|
PT: {
|
|
127
127
|
default: RegExp;
|
|
128
128
|
};
|
|
129
|
-
PR: {
|
|
130
|
-
default: RegExp;
|
|
131
|
-
};
|
|
132
129
|
RO: {
|
|
133
130
|
default: RegExp;
|
|
134
131
|
};
|
|
@@ -154,7 +151,4 @@ export declare const businessRegistrationNumberPatterns: {
|
|
|
154
151
|
default: RegExp;
|
|
155
152
|
nonProfit: RegExp;
|
|
156
153
|
};
|
|
157
|
-
US: {
|
|
158
|
-
default: RegExp;
|
|
159
|
-
};
|
|
160
154
|
};
|