@adyen/kyc-components 3.11.3 → 3.12.1
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";
|
|
@@ -659,6 +661,7 @@ const nameOfBankAccountHolder = "We need to know about the bank account where yo
|
|
|
659
661
|
const enterValidAccountDetails = "Please enter valid account details";
|
|
660
662
|
const enterValid_ = "Please enter valid: %{fieldNames}";
|
|
661
663
|
const whatBestDescribesYourBusinessSetup = "What best describes your business setup?";
|
|
664
|
+
const howWouldYouLikeToSetUpYourAccount = "How would you like to set up your account";
|
|
662
665
|
const whichLegalArrangementDoesYourBusinessHave = "Which legal arrangement does your business have?";
|
|
663
666
|
const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for you";
|
|
664
667
|
const changeYourBusinessSetup = "Change your business setup?";
|
|
@@ -804,11 +807,13 @@ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
|
|
|
804
807
|
const certificateOfIncorporation = "Certificate of incorporation";
|
|
805
808
|
const certificateOfFormation = "Certificate of formation";
|
|
806
809
|
const secretaryOfStateFiling = "Secretary of State filing";
|
|
810
|
+
const secretaryOfStateFiling__PR = "Department of State filing";
|
|
807
811
|
const partnerShipAgreement = "Partnership agreement";
|
|
808
812
|
const charter = "Charter";
|
|
809
813
|
const articlesOfIncorporation = "Articles of incorporation";
|
|
810
814
|
const meetingRecords = "Board of directors' meeting records of decisions";
|
|
811
815
|
const secretaryOfStateRegDoc = "Registration document from Secretary of State";
|
|
816
|
+
const secretaryOfStateRegDoc__PR = "Registration document from Department of State";
|
|
812
817
|
const certificateOfIncumbency = "Certificate of incumbency";
|
|
813
818
|
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.";
|
|
814
819
|
const learnMore = "Learn more";
|
|
@@ -835,6 +840,10 @@ const addresses = "Addresses";
|
|
|
835
840
|
const loading = "Loading";
|
|
836
841
|
const businessIncorporationNumber = "Business incorporation number";
|
|
837
842
|
const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
|
|
843
|
+
const retrieveMyInfoBusiness = "Retrieve Myinfo business";
|
|
844
|
+
const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
|
|
845
|
+
const enterTheDetailsYourself = "Enter the details yourself";
|
|
846
|
+
const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
|
|
838
847
|
const verificationMethod = "Verification method";
|
|
839
848
|
const verifyViaMobileBankAppOrBankWebsite = "Verify the account via mobile bank app or bank website";
|
|
840
849
|
const provideAccountDetailsAndUploadBankStatement = "Provide account details and upload a scan of a bank statement";
|
|
@@ -905,6 +914,7 @@ const legalCompanyName__helperText = "Enter the name exactly as it is on your co
|
|
|
905
914
|
const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
|
|
906
915
|
const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
|
|
907
916
|
const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
|
|
917
|
+
const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
|
|
908
918
|
const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
|
|
909
919
|
const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
|
|
910
920
|
const taxInformationNumber = "Tax Identification Number";
|
|
@@ -1286,6 +1296,7 @@ const onboardingRedirectRejectedDescriptionP1 = "Your account can’t be set up.
|
|
|
1286
1296
|
const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
|
|
1287
1297
|
const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
|
|
1288
1298
|
const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
|
|
1299
|
+
const failToLaunchSingpass = "failed to launch Singpass";
|
|
1289
1300
|
const addBankDetails = "Add bank details";
|
|
1290
1301
|
const addMissingBankDetails = "We are missing your bank details in order to perform payouts, please add your bank account.";
|
|
1291
1302
|
const bankDetails = "Bank details";
|
|
@@ -1454,6 +1465,7 @@ const defaultTrans = {
|
|
|
1454
1465
|
registeredAddressHeaderDescription,
|
|
1455
1466
|
registeredAddressHeaderDescription__NL,
|
|
1456
1467
|
registeredAddressHeaderDescription__US,
|
|
1468
|
+
registeredAddressHeaderDescription__PR,
|
|
1457
1469
|
registeredAddressTrustHeaderDescription,
|
|
1458
1470
|
operationalAddress,
|
|
1459
1471
|
provideRegistrationDetails,
|
|
@@ -1931,6 +1943,7 @@ const defaultTrans = {
|
|
|
1931
1943
|
enterValidAccountDetails,
|
|
1932
1944
|
enterValid_,
|
|
1933
1945
|
whatBestDescribesYourBusinessSetup,
|
|
1946
|
+
howWouldYouLikeToSetUpYourAccount,
|
|
1934
1947
|
whichLegalArrangementDoesYourBusinessHave,
|
|
1935
1948
|
sorryWeCantSetUpAnAccountForYou,
|
|
1936
1949
|
changeYourBusinessSetup,
|
|
@@ -2078,11 +2091,13 @@ const defaultTrans = {
|
|
|
2078
2091
|
certificateOfIncorporation,
|
|
2079
2092
|
certificateOfFormation,
|
|
2080
2093
|
secretaryOfStateFiling,
|
|
2094
|
+
secretaryOfStateFiling__PR,
|
|
2081
2095
|
partnerShipAgreement,
|
|
2082
2096
|
charter,
|
|
2083
2097
|
articlesOfIncorporation,
|
|
2084
2098
|
meetingRecords,
|
|
2085
2099
|
secretaryOfStateRegDoc,
|
|
2100
|
+
secretaryOfStateRegDoc__PR,
|
|
2086
2101
|
certificateOfIncumbency,
|
|
2087
2102
|
documentIssuedWithinLastYear,
|
|
2088
2103
|
learnMore,
|
|
@@ -2110,6 +2125,10 @@ const defaultTrans = {
|
|
|
2110
2125
|
loading,
|
|
2111
2126
|
businessIncorporationNumber,
|
|
2112
2127
|
doNotHaveBusinessIncorporationNumber,
|
|
2128
|
+
retrieveMyInfoBusiness,
|
|
2129
|
+
getYourBusinessVerifiedDetails,
|
|
2130
|
+
enterTheDetailsYourself,
|
|
2131
|
+
youAlsoHaveToUploadSomeSupportingDocuments,
|
|
2113
2132
|
verificationMethod,
|
|
2114
2133
|
verifyViaMobileBankAppOrBankWebsite,
|
|
2115
2134
|
provideAccountDetailsAndUploadBankStatement,
|
|
@@ -2180,6 +2199,7 @@ const defaultTrans = {
|
|
|
2180
2199
|
legalCompanyName__helperText__AU,
|
|
2181
2200
|
legalCompanyName__helperText__NL,
|
|
2182
2201
|
legalCompanyName__helperText__US,
|
|
2202
|
+
legalCompanyName__helperText__PR,
|
|
2183
2203
|
legalCompanyName__helperText__SG,
|
|
2184
2204
|
legalCompanyName__helperText__HK,
|
|
2185
2205
|
taxInformationNumber,
|
|
@@ -2561,6 +2581,7 @@ const defaultTrans = {
|
|
|
2561
2581
|
onboardingRedirectVerifiedDescriptionP1,
|
|
2562
2582
|
onboardingRedirectLinkError,
|
|
2563
2583
|
onboardingRedirectOpenError,
|
|
2584
|
+
failToLaunchSingpass,
|
|
2564
2585
|
addBankDetails,
|
|
2565
2586
|
addMissingBankDetails,
|
|
2566
2587
|
bankDetails,
|
|
@@ -2779,13 +2800,6 @@ function useToastContext() {
|
|
|
2779
2800
|
}
|
|
2780
2801
|
return context;
|
|
2781
2802
|
}
|
|
2782
|
-
const CoreContext = createContext(void 0);
|
|
2783
|
-
const useCoreContext = () => {
|
|
2784
|
-
const context = useContext(CoreContext);
|
|
2785
|
-
if (!context)
|
|
2786
|
-
throw Error("You need a <CoreProvider> to use core context");
|
|
2787
|
-
return context;
|
|
2788
|
-
};
|
|
2789
2803
|
var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
2790
2804
|
SettingNames2["AcceptedCountries"] = "acceptedCountries";
|
|
2791
2805
|
SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
|
|
@@ -6710,7 +6724,6 @@ const InputRadio = ({
|
|
|
6710
6724
|
});
|
|
6711
6725
|
function RadioGroup({
|
|
6712
6726
|
items = [],
|
|
6713
|
-
i18n,
|
|
6714
6727
|
name,
|
|
6715
6728
|
onChange = noop,
|
|
6716
6729
|
value,
|
|
@@ -6719,6 +6732,9 @@ function RadioGroup({
|
|
|
6719
6732
|
className,
|
|
6720
6733
|
disabled = false
|
|
6721
6734
|
}) {
|
|
6735
|
+
const {
|
|
6736
|
+
i18n
|
|
6737
|
+
} = useI18nContext();
|
|
6722
6738
|
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
6723
6739
|
return jsx("div", {
|
|
6724
6740
|
className: "adyen-kyc-radio-group",
|
|
@@ -6907,7 +6923,6 @@ function CompanyRegistrationNumberTypeSelector({
|
|
|
6907
6923
|
name: "companyRegistrationNumberType",
|
|
6908
6924
|
items: options,
|
|
6909
6925
|
value: selected,
|
|
6910
|
-
i18n,
|
|
6911
6926
|
onChange: (e) => handleSelect(e.target.value)
|
|
6912
6927
|
})
|
|
6913
6928
|
});
|
|
@@ -7239,11 +7254,6 @@ const businessRegistrationNumberMasks = {
|
|
|
7239
7254
|
nonProfit: {
|
|
7240
7255
|
mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
|
|
7241
7256
|
}
|
|
7242
|
-
},
|
|
7243
|
-
[CountryCodes.UnitedStates]: {
|
|
7244
|
-
default: {
|
|
7245
|
-
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
7246
|
-
}
|
|
7247
7257
|
}
|
|
7248
7258
|
};
|
|
7249
7259
|
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])?)*$/;
|
|
@@ -7376,9 +7386,6 @@ const businessRegistrationNumberPatterns = {
|
|
|
7376
7386
|
[CountryCodes.Portugal]: {
|
|
7377
7387
|
default: /^\d{9}$/
|
|
7378
7388
|
},
|
|
7379
|
-
[CountryCodes.PuertoRico]: {
|
|
7380
|
-
default: /^\d{9}$/
|
|
7381
|
-
},
|
|
7382
7389
|
[CountryCodes.Romania]: {
|
|
7383
7390
|
default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
|
|
7384
7391
|
},
|
|
@@ -7403,9 +7410,6 @@ const businessRegistrationNumberPatterns = {
|
|
|
7403
7410
|
[CountryCodes.UnitedKingdom]: {
|
|
7404
7411
|
default: /^[a-zA-Z0-9]{8}$/,
|
|
7405
7412
|
nonProfit: /^\d{6,7}$/
|
|
7406
|
-
},
|
|
7407
|
-
[CountryCodes.UnitedStates]: {
|
|
7408
|
-
default: /^\d{9}$/
|
|
7409
7413
|
}
|
|
7410
7414
|
};
|
|
7411
7415
|
const CountryIdNumberPatterns = {
|
|
@@ -7423,6 +7427,7 @@ const CountryIdNumberPatterns = {
|
|
|
7423
7427
|
},
|
|
7424
7428
|
[CountryCodes.Sweden]: /^\d{10}$|^\d{12}$/,
|
|
7425
7429
|
[CountryCodes.UnitedStates]: {
|
|
7430
|
+
// used by CountryCodes.PuertoRico
|
|
7426
7431
|
ssn: /^\d{9}$/,
|
|
7427
7432
|
ssnLastFour: /^\d{4}$/
|
|
7428
7433
|
}
|
|
@@ -7990,16 +7995,7 @@ const defaultFieldConfig$8 = {
|
|
|
7990
7995
|
}
|
|
7991
7996
|
},
|
|
7992
7997
|
[CountryCodes.PuertoRico]: {
|
|
7993
|
-
|
|
7994
|
-
mask: businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
|
|
7995
|
-
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default),
|
|
7996
|
-
guidanceText: {
|
|
7997
|
-
key: "enterNDigitsForExample",
|
|
7998
|
-
values: {
|
|
7999
|
-
numDigits: "9",
|
|
8000
|
-
example: "12-3456789"
|
|
8001
|
-
}
|
|
8002
|
-
}
|
|
7998
|
+
// should exactly match CountryCodes.UnitedStates
|
|
8003
7999
|
},
|
|
8004
8000
|
[CountryCodes.Romania]: {
|
|
8005
8001
|
label: "numarOrdineRegistrulComertului",
|
|
@@ -8758,6 +8754,20 @@ const defaultFieldConfig$7 = {
|
|
|
8758
8754
|
}
|
|
8759
8755
|
}
|
|
8760
8756
|
},
|
|
8757
|
+
[CountryCodes.PuertoRico]: {
|
|
8758
|
+
// should exactly match CountryCodes.UnitedStates
|
|
8759
|
+
label: "employerIdentificationNumber",
|
|
8760
|
+
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
8761
|
+
mask: {
|
|
8762
|
+
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
8763
|
+
},
|
|
8764
|
+
guidanceText: {
|
|
8765
|
+
key: "validationPleaseEnterAValidEINWithFormat",
|
|
8766
|
+
values: {
|
|
8767
|
+
format: "XX-XXXXXXX"
|
|
8768
|
+
}
|
|
8769
|
+
}
|
|
8770
|
+
},
|
|
8761
8771
|
/**
|
|
8762
8772
|
* NOT YET SUPPORTED
|
|
8763
8773
|
* These are brought over from the old pattern files. We have no idea if they are accurate or not.
|
|
@@ -9469,7 +9479,6 @@ function TaxIdNumberTypeSelector({
|
|
|
9469
9479
|
name: "taxIdNumberType",
|
|
9470
9480
|
items: options,
|
|
9471
9481
|
value: selected,
|
|
9472
|
-
i18n,
|
|
9473
9482
|
onChange: (e) => handleSelect(e.target.value)
|
|
9474
9483
|
})
|
|
9475
9484
|
});
|
|
@@ -10382,7 +10391,21 @@ const countryConfig$3 = {
|
|
|
10382
10391
|
label: "vatAbsenceReason"
|
|
10383
10392
|
}
|
|
10384
10393
|
},
|
|
10385
|
-
[CountryCodes.PuertoRico]: {
|
|
10394
|
+
[CountryCodes.PuertoRico]: {
|
|
10395
|
+
// exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
|
|
10396
|
+
country: {
|
|
10397
|
+
label: "companyCountry"
|
|
10398
|
+
},
|
|
10399
|
+
legalCompanyName: {
|
|
10400
|
+
helperText: "legalCompanyName__helperText__US"
|
|
10401
|
+
},
|
|
10402
|
+
tradingName: {
|
|
10403
|
+
label: "doingBusinessAs"
|
|
10404
|
+
},
|
|
10405
|
+
exemptedFromTax: {
|
|
10406
|
+
label: "doNotHaveEIN"
|
|
10407
|
+
}
|
|
10408
|
+
},
|
|
10386
10409
|
[CountryCodes.Romania]: {},
|
|
10387
10410
|
[CountryCodes.Slovakia]: {},
|
|
10388
10411
|
[CountryCodes.Slovenia]: {},
|
|
@@ -10638,6 +10661,13 @@ const EntityTypeSelectionRadioCardBody = ({
|
|
|
10638
10661
|
})]
|
|
10639
10662
|
});
|
|
10640
10663
|
};
|
|
10664
|
+
const CoreContext = createContext(void 0);
|
|
10665
|
+
const useCoreContext = () => {
|
|
10666
|
+
const context = useContext(CoreContext);
|
|
10667
|
+
if (!context)
|
|
10668
|
+
throw Error("You need a <CoreProvider> to use core context");
|
|
10669
|
+
return context;
|
|
10670
|
+
};
|
|
10641
10671
|
var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
|
|
10642
10672
|
TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
|
|
10643
10673
|
TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
|
|
@@ -10772,6 +10802,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
|
10772
10802
|
TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
|
|
10773
10803
|
TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
|
|
10774
10804
|
TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
|
|
10805
|
+
TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
|
|
10775
10806
|
return TaskTypes2;
|
|
10776
10807
|
})(TaskTypes || {});
|
|
10777
10808
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
@@ -10921,8 +10952,8 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
|
|
|
10921
10952
|
})(DecisionMakerType || {});
|
|
10922
10953
|
const REQUIRED = "REQUIRED";
|
|
10923
10954
|
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];
|
|
10924
|
-
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
10925
|
-
const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.UnitedStates];
|
|
10955
|
+
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
10956
|
+
const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
10926
10957
|
const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
|
|
10927
10958
|
const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
|
|
10928
10959
|
const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
|
|
@@ -11877,12 +11908,20 @@ function ListItem({
|
|
|
11877
11908
|
const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
|
|
11878
11909
|
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
|
|
11879
11910
|
const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
|
|
11880
|
-
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11911
|
+
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11881
11912
|
const ADDRESS_SCHEMAS = {
|
|
11882
11913
|
[CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11883
11914
|
[CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
11884
11915
|
[CountryCodes.UnitedKingdom]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
11885
11916
|
[CountryCodes.UnitedStates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11917
|
+
[CountryCodes.PuertoRico]: [
|
|
11918
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11919
|
+
COUNTRY,
|
|
11920
|
+
ADDRESS,
|
|
11921
|
+
OTHER_ADDRESS_INFORMATION,
|
|
11922
|
+
CITY,
|
|
11923
|
+
POSTAL_CODE
|
|
11924
|
+
],
|
|
11886
11925
|
[CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
|
|
11887
11926
|
[CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
|
|
11888
11927
|
default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
|
|
@@ -11898,10 +11937,14 @@ const LABELS = {
|
|
|
11898
11937
|
otherAddressInformation: {
|
|
11899
11938
|
default: OTHER_ADDRESS_INFORMATION,
|
|
11900
11939
|
[CountryCodes.Canada]: "apartmentSuiteOptional",
|
|
11940
|
+
[CountryCodes.PuertoRico]: "apartmentSuiteOptional",
|
|
11941
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11901
11942
|
[CountryCodes.UnitedStates]: "apartmentSuiteOptional"
|
|
11902
11943
|
},
|
|
11903
11944
|
postalCode: {
|
|
11904
11945
|
default: POSTAL_CODE,
|
|
11946
|
+
[CountryCodes.PuertoRico]: "zipCode",
|
|
11947
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11905
11948
|
[CountryCodes.UnitedStates]: "zipCode"
|
|
11906
11949
|
},
|
|
11907
11950
|
stateOrProvince: {
|
|
@@ -12327,7 +12370,8 @@ const postalCodePatterns = {
|
|
|
12327
12370
|
[CountryCodes.Norway]: createRegExpByDigits(4),
|
|
12328
12371
|
[CountryCodes.Poland]: /^\d{2}-\d{3}$/,
|
|
12329
12372
|
[CountryCodes.Portugal]: /^[1-9]\d{3}([- ]?\d{3})?$/,
|
|
12330
|
-
[CountryCodes.PuertoRico]:
|
|
12373
|
+
[CountryCodes.PuertoRico]: /^\d{5}(?:[ -]?\d{4})?$/,
|
|
12374
|
+
// should exactly match CountryCodes.UnitedStates
|
|
12331
12375
|
[CountryCodes.Romania]: createRegExpByDigits(6),
|
|
12332
12376
|
[CountryCodes.Slovakia]: /^(SK-)?\d{5}$/,
|
|
12333
12377
|
[CountryCodes.Slovenia]: /^(SI-)?\d{4}$/,
|
|
@@ -12971,7 +13015,6 @@ function RegistrationAddressComponent(props) {
|
|
|
12971
13015
|
name: "operationalAddressIsSame",
|
|
12972
13016
|
items: operationalAddressIsSameItems,
|
|
12973
13017
|
value: formData.operationalAddressIsSame,
|
|
12974
|
-
i18n,
|
|
12975
13018
|
disabled: formUtils.isReadOnly("operationalAddressIsSame"),
|
|
12976
13019
|
onChange: handleChangeFor("operationalAddressIsSame"),
|
|
12977
13020
|
"aria-required": true,
|
|
@@ -12994,6 +13037,33 @@ function RegistrationAddressComponent(props) {
|
|
|
12994
13037
|
});
|
|
12995
13038
|
}
|
|
12996
13039
|
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
13040
|
+
[CountryCodes.PuertoRico]: {
|
|
13041
|
+
// should exactly match CountryCodes.UnitedStates
|
|
13042
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13043
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
13044
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling__PR"]
|
|
13045
|
+
},
|
|
13046
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
13047
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13048
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
13049
|
+
},
|
|
13050
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
13051
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13052
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
13053
|
+
},
|
|
13054
|
+
[CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
|
|
13055
|
+
header: "acceptedDocumentsForGovernment",
|
|
13056
|
+
documents: ["charter"]
|
|
13057
|
+
},
|
|
13058
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13059
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13060
|
+
documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc__PR", "certificateOfIncumbency"]
|
|
13061
|
+
},
|
|
13062
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13063
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13064
|
+
documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
|
|
13065
|
+
}
|
|
13066
|
+
},
|
|
12997
13067
|
[CountryCodes.UnitedStates]: {
|
|
12998
13068
|
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
12999
13069
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
@@ -13022,11 +13092,13 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
|
13022
13092
|
}
|
|
13023
13093
|
};
|
|
13024
13094
|
const GuidanceContent$1 = ({
|
|
13025
|
-
i18n,
|
|
13026
13095
|
country: country2,
|
|
13027
13096
|
companyType: companyType2
|
|
13028
13097
|
}) => {
|
|
13029
13098
|
var _a;
|
|
13099
|
+
const {
|
|
13100
|
+
i18n
|
|
13101
|
+
} = useI18nContext();
|
|
13030
13102
|
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
|
|
13031
13103
|
return jsx("div", {
|
|
13032
13104
|
className: "adyen-kyc-upload-field__guidance",
|
|
@@ -13097,8 +13169,7 @@ function RegistrationDocumentComponent({
|
|
|
13097
13169
|
description: i18n.get(description2),
|
|
13098
13170
|
documentField: "registrationDocument",
|
|
13099
13171
|
documentType: DocumentType.REGISTRATION_DOCUMENT,
|
|
13100
|
-
guidanceContent: GuidanceContent$1
|
|
13101
|
-
i18n,
|
|
13172
|
+
guidanceContent: jsx(GuidanceContent$1, {
|
|
13102
13173
|
country: country2,
|
|
13103
13174
|
companyType: companyType2
|
|
13104
13175
|
}),
|
|
@@ -13107,6 +13178,29 @@ function RegistrationDocumentComponent({
|
|
|
13107
13178
|
});
|
|
13108
13179
|
}
|
|
13109
13180
|
const ACCEPTED_DOCUMENTS_MAP = {
|
|
13181
|
+
[CountryCodes.PuertoRico]: {
|
|
13182
|
+
// should exactly match CountryCodes.UnitedStates
|
|
13183
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13184
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
13185
|
+
documents: ["irsCP575"]
|
|
13186
|
+
},
|
|
13187
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
13188
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13189
|
+
documents: ["annualReport", "secForm10k"]
|
|
13190
|
+
},
|
|
13191
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
13192
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13193
|
+
documents: ["annualReport", "secForm10k"]
|
|
13194
|
+
},
|
|
13195
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13196
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13197
|
+
documents: ["annualReport"]
|
|
13198
|
+
},
|
|
13199
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13200
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13201
|
+
documents: ["irsScheduleK1"]
|
|
13202
|
+
}
|
|
13203
|
+
},
|
|
13110
13204
|
[CountryCodes.UnitedStates]: {
|
|
13111
13205
|
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13112
13206
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
@@ -13131,11 +13225,13 @@ const ACCEPTED_DOCUMENTS_MAP = {
|
|
|
13131
13225
|
}
|
|
13132
13226
|
};
|
|
13133
13227
|
const GuidanceContent = ({
|
|
13134
|
-
i18n,
|
|
13135
13228
|
country: country2,
|
|
13136
13229
|
companyType: companyType2
|
|
13137
13230
|
}) => {
|
|
13138
13231
|
var _a;
|
|
13232
|
+
const {
|
|
13233
|
+
i18n
|
|
13234
|
+
} = useI18nContext();
|
|
13139
13235
|
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
|
|
13140
13236
|
return jsx("div", {
|
|
13141
13237
|
className: "adyen-kyc-upload-field__guidance",
|
|
@@ -13199,8 +13295,7 @@ function TaxDocumentComponent({
|
|
|
13199
13295
|
description: i18n.get(description2),
|
|
13200
13296
|
documentField: "taxDocument",
|
|
13201
13297
|
documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
|
|
13202
|
-
guidanceContent: GuidanceContent
|
|
13203
|
-
i18n,
|
|
13298
|
+
guidanceContent: jsx(GuidanceContent, {
|
|
13204
13299
|
country: country2,
|
|
13205
13300
|
companyType: companyType2
|
|
13206
13301
|
}),
|
|
@@ -13536,7 +13631,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
|
13536
13631
|
});
|
|
13537
13632
|
const getFileExtention = (fileName2) => fileName2.split(".").pop();
|
|
13538
13633
|
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];
|
|
13539
|
-
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
|
|
13634
|
+
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
13540
13635
|
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];
|
|
13541
13636
|
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];
|
|
13542
13637
|
const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
|
|
@@ -13547,6 +13642,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
|
|
|
13547
13642
|
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
13548
13643
|
// strictly a subset of countries which use tax ID
|
|
13549
13644
|
CountryCodes.Canada,
|
|
13645
|
+
CountryCodes.PuertoRico,
|
|
13550
13646
|
CountryCodes.UnitedStates
|
|
13551
13647
|
];
|
|
13552
13648
|
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
@@ -13595,10 +13691,10 @@ const rules$2 = ({
|
|
|
13595
13691
|
companyRegistrationNumberExemptionAllowed: () => {
|
|
13596
13692
|
var _a, _b;
|
|
13597
13693
|
const companyType2 = ("companyType" in data || "companyStructure" in data) && (((_a = data.companyType) == null ? void 0 : _a.entityType) || ((_b = data.companyStructure) == null ? void 0 : _b.entityType));
|
|
13598
|
-
if (country2 ===
|
|
13694
|
+
if (country2 === CountryCodes.Germany && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
|
|
13599
13695
|
return "REQUIRED";
|
|
13600
13696
|
}
|
|
13601
|
-
if (country2 ===
|
|
13697
|
+
if (country2 === CountryCodes.Denmark && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
|
|
13602
13698
|
return "REQUIRED";
|
|
13603
13699
|
}
|
|
13604
13700
|
},
|
|
@@ -15617,13 +15713,22 @@ const IdVerificationMethodOptionFooter = ({
|
|
|
15617
15713
|
};
|
|
15618
15714
|
const idVerificationMethodFields = ["idVerificationMethod"];
|
|
15619
15715
|
function IdVerificationMethodComponent(props) {
|
|
15716
|
+
const {
|
|
15717
|
+
id: id2,
|
|
15718
|
+
data: propsData,
|
|
15719
|
+
fieldValidationErrors,
|
|
15720
|
+
validators,
|
|
15721
|
+
formVerificationErrors,
|
|
15722
|
+
name,
|
|
15723
|
+
countryOfResidence
|
|
15724
|
+
} = props;
|
|
15620
15725
|
const {
|
|
15621
15726
|
i18n
|
|
15622
15727
|
} = useI18nContext();
|
|
15623
15728
|
const {
|
|
15624
15729
|
getImageUrl
|
|
15625
15730
|
} = useConfigurationApi();
|
|
15626
|
-
const verificationMethodFormId =
|
|
15731
|
+
const verificationMethodFormId = id2;
|
|
15627
15732
|
const schema = idVerificationMethodFields;
|
|
15628
15733
|
const stateRef = useRef({
|
|
15629
15734
|
setState: null
|
|
@@ -15641,11 +15746,11 @@ function IdVerificationMethodComponent(props) {
|
|
|
15641
15746
|
...props,
|
|
15642
15747
|
schema,
|
|
15643
15748
|
defaultData: {
|
|
15644
|
-
...
|
|
15749
|
+
...propsData,
|
|
15645
15750
|
idVerificationMethod: "instantVerification"
|
|
15646
15751
|
},
|
|
15647
|
-
rules:
|
|
15648
|
-
fieldProblems:
|
|
15752
|
+
rules: validators,
|
|
15753
|
+
fieldProblems: fieldValidationErrors
|
|
15649
15754
|
});
|
|
15650
15755
|
const formUtils = formUtilities(props, i18n);
|
|
15651
15756
|
useEffect(() => {
|
|
@@ -15672,15 +15777,15 @@ function IdVerificationMethodComponent(props) {
|
|
|
15672
15777
|
children: [jsx(FormHeader, {
|
|
15673
15778
|
heading: i18n.get("verificationMethod")
|
|
15674
15779
|
}), jsx(ErrorPanel, {
|
|
15675
|
-
verificationErrors:
|
|
15676
|
-
validationErrors:
|
|
15780
|
+
verificationErrors: formVerificationErrors,
|
|
15781
|
+
validationErrors: fieldValidationErrors,
|
|
15677
15782
|
formUtils,
|
|
15678
15783
|
id: "ariaErrorField"
|
|
15679
15784
|
}), jsx("div", {
|
|
15680
15785
|
dangerouslySetInnerHTML: {
|
|
15681
15786
|
__html: i18n.get("idUploadDocumentSubtitle", {
|
|
15682
15787
|
values: {
|
|
15683
|
-
name
|
|
15788
|
+
name
|
|
15684
15789
|
}
|
|
15685
15790
|
})
|
|
15686
15791
|
}
|
|
@@ -15747,7 +15852,7 @@ function IdVerificationMethodComponent(props) {
|
|
|
15747
15852
|
}),
|
|
15748
15853
|
titleId: "howVerificationWithOnfidoWork",
|
|
15749
15854
|
contentId: "howVerificationWithOnfidoWorkContent"
|
|
15750
|
-
}),
|
|
15855
|
+
}), (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && jsx("div", {
|
|
15751
15856
|
dangerouslySetInnerHTML: {
|
|
15752
15857
|
__html: i18n.get("byProceedingToTheNextStepYouConfirmThatYouHaveReadUnderstandAndAcceptTheTerms")
|
|
15753
15858
|
}
|
|
@@ -16858,7 +16963,6 @@ function IndividualIdNumberTypeSelector({
|
|
|
16858
16963
|
name: "individualIdNumberType",
|
|
16859
16964
|
items: options,
|
|
16860
16965
|
value: selected,
|
|
16861
|
-
i18n,
|
|
16862
16966
|
onChange: (e) => {
|
|
16863
16967
|
var _a;
|
|
16864
16968
|
return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
|
|
@@ -18883,6 +18987,7 @@ const currencyByCountry = {
|
|
|
18883
18987
|
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
18884
18988
|
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
18885
18989
|
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
18990
|
+
// should exactly match CountryCodes.UnitedStates
|
|
18886
18991
|
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
18887
18992
|
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
18888
18993
|
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
@@ -24295,7 +24400,6 @@ function CompanyDropinComponent({
|
|
|
24295
24400
|
const {
|
|
24296
24401
|
isExperimentEnabled
|
|
24297
24402
|
} = useExperimentsContext();
|
|
24298
|
-
useCoreContext();
|
|
24299
24403
|
const {
|
|
24300
24404
|
i18n,
|
|
24301
24405
|
setLocale
|
|
@@ -24846,13 +24950,15 @@ const mapCompanyDataResponseToFormSchema = (company2) => ({
|
|
|
24846
24950
|
const CompanyLookupResultsHeader = ({
|
|
24847
24951
|
results,
|
|
24848
24952
|
status,
|
|
24849
|
-
i18n,
|
|
24850
24953
|
hasInternalError,
|
|
24851
24954
|
selectedCompanyId,
|
|
24852
24955
|
verifiedCompany,
|
|
24853
24956
|
retrySearch,
|
|
24854
24957
|
reset
|
|
24855
24958
|
}) => {
|
|
24959
|
+
const {
|
|
24960
|
+
i18n
|
|
24961
|
+
} = useI18nContext();
|
|
24856
24962
|
const numberOfResults = results == null ? void 0 : results.length;
|
|
24857
24963
|
const headerText = useMemo(() => {
|
|
24858
24964
|
if (hasInternalError && !selectedCompanyId) {
|
|
@@ -24887,7 +24993,7 @@ const CompanyLookupResultsHeader = ({
|
|
|
24887
24993
|
onClick: reset,
|
|
24888
24994
|
children: "Reset selection"
|
|
24889
24995
|
})]
|
|
24890
|
-
}), descriptionText && jsxs("div", {
|
|
24996
|
+
}), descriptionText && status !== "loading" && jsxs("div", {
|
|
24891
24997
|
className: "adyen-company-lookup-results-header__description",
|
|
24892
24998
|
children: [hasInternalError && !selectedCompanyId && jsx("button", {
|
|
24893
24999
|
type: "button",
|
|
@@ -24911,9 +25017,11 @@ const LookupResultBody = ({
|
|
|
24911
25017
|
})]
|
|
24912
25018
|
});
|
|
24913
25019
|
const LookupResultAlert = ({
|
|
24914
|
-
i18n,
|
|
24915
25020
|
type
|
|
24916
25021
|
}) => {
|
|
25022
|
+
const {
|
|
25023
|
+
i18n
|
|
25024
|
+
} = useI18nContext();
|
|
24917
25025
|
const iconType = {
|
|
24918
25026
|
verified: AlertTypes.SUCCESS,
|
|
24919
25027
|
warning: AlertTypes.WARNING,
|
|
@@ -24939,7 +25047,6 @@ const LookupResultAlert = ({
|
|
|
24939
25047
|
};
|
|
24940
25048
|
const LookupResult = ({
|
|
24941
25049
|
classes,
|
|
24942
|
-
i18n,
|
|
24943
25050
|
option,
|
|
24944
25051
|
status,
|
|
24945
25052
|
isSelected,
|
|
@@ -24993,7 +25100,6 @@ const LookupResult = ({
|
|
|
24993
25100
|
label: classes
|
|
24994
25101
|
}
|
|
24995
25102
|
}), showAlert && jsx(LookupResultAlert, {
|
|
24996
|
-
i18n,
|
|
24997
25103
|
type: alertType
|
|
24998
25104
|
})]
|
|
24999
25105
|
});
|
|
@@ -25019,7 +25125,6 @@ const LookupResult = ({
|
|
|
25019
25125
|
label: classes
|
|
25020
25126
|
}
|
|
25021
25127
|
}), showAlert && jsx(LookupResultAlert, {
|
|
25022
|
-
i18n,
|
|
25023
25128
|
type: alertType
|
|
25024
25129
|
})]
|
|
25025
25130
|
})
|
|
@@ -25029,7 +25134,6 @@ const CompanyLookupResultsList = ({
|
|
|
25029
25134
|
results,
|
|
25030
25135
|
selectedCompanyId,
|
|
25031
25136
|
status,
|
|
25032
|
-
i18n,
|
|
25033
25137
|
hasInternalError,
|
|
25034
25138
|
tin = "",
|
|
25035
25139
|
verifiedCompany,
|
|
@@ -25060,7 +25164,6 @@ const CompanyLookupResultsList = ({
|
|
|
25060
25164
|
classes: optionClasses(option),
|
|
25061
25165
|
option,
|
|
25062
25166
|
status,
|
|
25063
|
-
i18n,
|
|
25064
25167
|
tin,
|
|
25065
25168
|
isSelected: isOptionSelected(option),
|
|
25066
25169
|
isInvalid: isOptionInvalid(option),
|
|
@@ -25107,9 +25210,7 @@ function CompanyLookup({
|
|
|
25107
25210
|
handleVerifyTin
|
|
25108
25211
|
}) {
|
|
25109
25212
|
var _a;
|
|
25110
|
-
|
|
25111
|
-
i18n
|
|
25112
|
-
} = useI18nContext();
|
|
25213
|
+
useI18nContext();
|
|
25113
25214
|
const {
|
|
25114
25215
|
status,
|
|
25115
25216
|
results,
|
|
@@ -25194,7 +25295,6 @@ function CompanyLookup({
|
|
|
25194
25295
|
children: [jsx(CompanyLookupResultsHeader, {
|
|
25195
25296
|
results,
|
|
25196
25297
|
status,
|
|
25197
|
-
i18n,
|
|
25198
25298
|
hasInternalError,
|
|
25199
25299
|
selectedCompanyId,
|
|
25200
25300
|
verifiedCompany,
|
|
@@ -25206,7 +25306,6 @@ function CompanyLookup({
|
|
|
25206
25306
|
results,
|
|
25207
25307
|
selectedCompanyId,
|
|
25208
25308
|
status,
|
|
25209
|
-
i18n,
|
|
25210
25309
|
hasInternalError,
|
|
25211
25310
|
tin: taxInformationNumber2,
|
|
25212
25311
|
verifiedCompany,
|
|
@@ -26596,9 +26695,6 @@ function useCompanySearchTaskSubmit({
|
|
|
26596
26695
|
onExternalSubmit,
|
|
26597
26696
|
handleUpdateLegalEntity
|
|
26598
26697
|
}) {
|
|
26599
|
-
const {
|
|
26600
|
-
setAccountHolder
|
|
26601
|
-
} = useCoreContext();
|
|
26602
26698
|
const {
|
|
26603
26699
|
showToast,
|
|
26604
26700
|
clearToasts
|
|
@@ -26682,7 +26778,6 @@ function useCompanySearchTaskSubmit({
|
|
|
26682
26778
|
}
|
|
26683
26779
|
});
|
|
26684
26780
|
logger$f.log(submittedLegalEntity);
|
|
26685
|
-
setAccountHolder(entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type]);
|
|
26686
26781
|
clearToasts();
|
|
26687
26782
|
onExternalSubmit == null ? void 0 : onExternalSubmit(data);
|
|
26688
26783
|
} catch (e) {
|
|
@@ -26718,7 +26813,7 @@ function useCompanySearchTaskSubmit({
|
|
|
26718
26813
|
} finally {
|
|
26719
26814
|
setLoadingStatus("success");
|
|
26720
26815
|
}
|
|
26721
|
-
}, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems,
|
|
26816
|
+
}, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
|
|
26722
26817
|
return {
|
|
26723
26818
|
submit: submit2
|
|
26724
26819
|
};
|
|
@@ -27126,6 +27221,16 @@ const useShouldShowIntroduction = ({
|
|
|
27126
27221
|
});
|
|
27127
27222
|
return canSeeIntroduction && !hasSeenIntroduction;
|
|
27128
27223
|
};
|
|
27224
|
+
const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
|
|
27225
|
+
const useHasSeenSingpassSelection = ({
|
|
27226
|
+
legalEntityId
|
|
27227
|
+
}) => {
|
|
27228
|
+
const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(getHasSeenSingpassSelectionStorageKey(legalEntityId), false);
|
|
27229
|
+
return {
|
|
27230
|
+
hasSeenSingpassSelection,
|
|
27231
|
+
setHasSeenSingpassSelection
|
|
27232
|
+
};
|
|
27233
|
+
};
|
|
27129
27234
|
const logger$e = createLogger("useAssociatedLegalArrangement");
|
|
27130
27235
|
function useAssociatedLegalArrangement({
|
|
27131
27236
|
rootLegalEntity,
|
|
@@ -29082,6 +29187,152 @@ function ReviewComponent({
|
|
|
29082
29187
|
footer
|
|
29083
29188
|
});
|
|
29084
29189
|
}
|
|
29190
|
+
const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
|
|
29191
|
+
/* @__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" }),
|
|
29192
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
|
|
29193
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
|
|
29194
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
|
|
29195
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
|
|
29196
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
|
|
29197
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
|
|
29198
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
|
|
29199
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
|
|
29200
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
|
|
29201
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
|
|
29202
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
|
|
29203
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
|
|
29204
|
+
/* @__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" }),
|
|
29205
|
+
/* @__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" }),
|
|
29206
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
|
|
29207
|
+
/* @__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" }),
|
|
29208
|
+
/* @__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" }),
|
|
29209
|
+
/* @__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" })
|
|
29210
|
+
] });
|
|
29211
|
+
const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
|
|
29212
|
+
/* @__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" }),
|
|
29213
|
+
/* @__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" }),
|
|
29214
|
+
/* @__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" }),
|
|
29215
|
+
/* @__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" }),
|
|
29216
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.15 44.19h-6.07V62.4h6.07z" }),
|
|
29217
|
+
/* @__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" }),
|
|
29218
|
+
/* @__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" }),
|
|
29219
|
+
/* @__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" }),
|
|
29220
|
+
/* @__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" }),
|
|
29221
|
+
/* @__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" }),
|
|
29222
|
+
/* @__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" }),
|
|
29223
|
+
/* @__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" }),
|
|
29224
|
+
/* @__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" }),
|
|
29225
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 28.37H33.95v3.74H58.3z" }),
|
|
29226
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M46.12 42.77H33.95v3.74h12.17z" }),
|
|
29227
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M36.72 30.24h18.8" }),
|
|
29228
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 35.46H33.95v3.74H58.3z" }),
|
|
29229
|
+
/* @__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" }),
|
|
29230
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M33.9 21.3h18.82M33.9 24.97h8.4" }),
|
|
29231
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 43.55h-39.1v6.02h39.1z" }),
|
|
29232
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.27 61.31H80.7v6.02h19.56z" }),
|
|
29233
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M85.17 46.56h30.2" }),
|
|
29234
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 52.25h-39.1v6.02h39.1z" }),
|
|
29235
|
+
/* @__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" }),
|
|
29236
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
|
|
29237
|
+
] });
|
|
29238
|
+
const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
|
|
29239
|
+
/* @__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" }),
|
|
29240
|
+
/* @__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" })
|
|
29241
|
+
] });
|
|
29242
|
+
const setupAccountMethods = ["singpass", "manual"];
|
|
29243
|
+
const setupAccountMethodFields = ["setupAccountMethod"];
|
|
29244
|
+
const getSetupAccountMethodMetadata = () => ({
|
|
29245
|
+
singpass: {
|
|
29246
|
+
name: "retrieveMyInfoBusiness",
|
|
29247
|
+
description: "getYourBusinessVerifiedDetails",
|
|
29248
|
+
icon: jsx("span", {
|
|
29249
|
+
className: "adyen-kyc-setup-singpass-container",
|
|
29250
|
+
children: jsx(SvgSetupSingpass, {})
|
|
29251
|
+
}),
|
|
29252
|
+
provider: {
|
|
29253
|
+
name: "singpass",
|
|
29254
|
+
icon: jsx("span", {
|
|
29255
|
+
className: "adyen-kyc-singpass-logo-container",
|
|
29256
|
+
children: jsx(SvgSingpassLogo, {})
|
|
29257
|
+
})
|
|
29258
|
+
}
|
|
29259
|
+
},
|
|
29260
|
+
manual: {
|
|
29261
|
+
name: "enterTheDetailsYourself",
|
|
29262
|
+
description: "youAlsoHaveToUploadSomeSupportingDocuments",
|
|
29263
|
+
icon: jsx("span", {
|
|
29264
|
+
className: "adyen-kyc-setup-manual-container",
|
|
29265
|
+
children: jsx(SvgSetupManual, {})
|
|
29266
|
+
})
|
|
29267
|
+
}
|
|
29268
|
+
});
|
|
29269
|
+
const SingpassSelection = (props) => {
|
|
29270
|
+
const {
|
|
29271
|
+
handleNextClick
|
|
29272
|
+
} = props;
|
|
29273
|
+
const {
|
|
29274
|
+
i18n
|
|
29275
|
+
} = useI18nContext();
|
|
29276
|
+
const [selectedMethod, setSelectedMethod] = useState();
|
|
29277
|
+
const selectSetupAccountMethod = (method) => {
|
|
29278
|
+
setSelectedMethod(method);
|
|
29279
|
+
handleChangeFor("setupAccountMethod")(method);
|
|
29280
|
+
};
|
|
29281
|
+
const {
|
|
29282
|
+
handleChangeFor,
|
|
29283
|
+
data
|
|
29284
|
+
} = useForm({
|
|
29285
|
+
...props,
|
|
29286
|
+
schema: setupAccountMethodFields,
|
|
29287
|
+
defaultData: {}
|
|
29288
|
+
});
|
|
29289
|
+
const methodsMetadata = getSetupAccountMethodMetadata();
|
|
29290
|
+
return jsx("div", {
|
|
29291
|
+
className: "adl-u-display-flex adl-u-justify-content-center",
|
|
29292
|
+
children: jsxs("div", {
|
|
29293
|
+
className: "adyen-kyc-singpass-selection",
|
|
29294
|
+
children: [jsx("header", {
|
|
29295
|
+
className: "adl-u-margin-bottom-32",
|
|
29296
|
+
children: jsx(Heading, {
|
|
29297
|
+
level: 2,
|
|
29298
|
+
children: i18n.get("howWouldYouLikeToSetUpYourAccount")
|
|
29299
|
+
})
|
|
29300
|
+
}), jsx("form", {
|
|
29301
|
+
children: jsx(Field, {
|
|
29302
|
+
name: "setupAccountMethod",
|
|
29303
|
+
children: (childProps) => jsx(RadioCardSelect, {
|
|
29304
|
+
...childProps,
|
|
29305
|
+
name: "setupAccountMethod",
|
|
29306
|
+
options: setupAccountMethods,
|
|
29307
|
+
onSelect: selectSetupAccountMethod,
|
|
29308
|
+
selected: data.setupAccountMethod,
|
|
29309
|
+
optionId: (method) => method,
|
|
29310
|
+
optionName: (method) => methodsMetadata[method].name,
|
|
29311
|
+
optionDescription: (method) => methodsMetadata[method].description,
|
|
29312
|
+
className: "adyen-kyc-field-verification-methods",
|
|
29313
|
+
optionClassNames: () => ({
|
|
29314
|
+
icon: "adyen-kyc-radio-group-card__illustration",
|
|
29315
|
+
label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
|
|
29316
|
+
footer: "adyen-kyc-field-verification-methods__footer"
|
|
29317
|
+
}),
|
|
29318
|
+
renderOptionIcon: (method) => methodsMetadata[method].icon,
|
|
29319
|
+
renderOptionFooter: (method) => {
|
|
29320
|
+
var _a;
|
|
29321
|
+
return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
|
|
29322
|
+
}
|
|
29323
|
+
})
|
|
29324
|
+
})
|
|
29325
|
+
}), jsx(Button, {
|
|
29326
|
+
label: i18n.get("next"),
|
|
29327
|
+
block: true,
|
|
29328
|
+
disabled: !selectedMethod,
|
|
29329
|
+
onClick: () => handleNextClick(selectedMethod),
|
|
29330
|
+
type: "button",
|
|
29331
|
+
role: "button"
|
|
29332
|
+
})]
|
|
29333
|
+
})
|
|
29334
|
+
});
|
|
29335
|
+
};
|
|
29085
29336
|
const businessTypeMapping = {
|
|
29086
29337
|
myName: {
|
|
29087
29338
|
[LegalEntityType.INDIVIDUAL]: "individual"
|
|
@@ -32708,6 +32959,13 @@ function DropinComposerComponent({
|
|
|
32708
32959
|
} = useToastContext();
|
|
32709
32960
|
const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
|
|
32710
32961
|
const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
|
|
32962
|
+
const isSingpassExperimentEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
|
|
32963
|
+
const {
|
|
32964
|
+
hasSeenSingpassSelection,
|
|
32965
|
+
setHasSeenSingpassSelection
|
|
32966
|
+
} = useHasSeenSingpassSelection({
|
|
32967
|
+
legalEntityId: legalEntityResponse.id
|
|
32968
|
+
});
|
|
32711
32969
|
const [leId, setLeId] = useLeId();
|
|
32712
32970
|
const showIntroduction = useShouldShowIntroduction({
|
|
32713
32971
|
legalEntity: legalEntityResponse
|
|
@@ -32718,16 +32976,22 @@ function DropinComposerComponent({
|
|
|
32718
32976
|
legalEntityId: legalEntityResponse.id
|
|
32719
32977
|
});
|
|
32720
32978
|
const [tasks, setTasks] = useState([]);
|
|
32979
|
+
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32980
|
+
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32981
|
+
const isSoleProp = accountHolder2 === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
|
|
32982
|
+
const isSingpassEnabled = rootLegalEntityCountry === CountryCodes.Singapore && isSingpassExperimentEnabled && !hasSeenSingpassSelection;
|
|
32983
|
+
const shouldShowSingpass = isSingpassEnabled && (isSoleProp || legalEntityResponse.type === LegalEntityType.ORGANIZATION);
|
|
32721
32984
|
const initialTask = useMemo(() => {
|
|
32722
32985
|
if (isNewEntryFlowEnabled && (!accountHolder2 || legalEntityResponse.id !== leId)) {
|
|
32723
32986
|
return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
32724
32987
|
}
|
|
32725
32988
|
if (showIntroduction)
|
|
32726
32989
|
return TaskTypes.INTRODUCTION;
|
|
32990
|
+
if (isSingpassEnabled)
|
|
32991
|
+
return TaskTypes.SINGPASS_SELECTION;
|
|
32727
32992
|
return TaskTypes.TASKS_OVERVIEW;
|
|
32728
32993
|
}, [showIntroduction, isNewEntryFlowEnabled, accountHolder2, legalEntityResponse, leId]);
|
|
32729
32994
|
const [taskHistory, setTaskHistory] = useState([initialTask]);
|
|
32730
|
-
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32731
32995
|
const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
|
|
32732
32996
|
const {
|
|
32733
32997
|
associatedLegalArrangement,
|
|
@@ -32749,7 +33013,6 @@ function DropinComposerComponent({
|
|
|
32749
33013
|
const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
|
|
32750
33014
|
const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
|
|
32751
33015
|
const [transferInstrument, setTransferInstrument] = useState(null);
|
|
32752
|
-
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32753
33016
|
const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
|
|
32754
33017
|
const [bankVerificationVendors, setBankVerificationVendors] = useState();
|
|
32755
33018
|
const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
|
|
@@ -33013,6 +33276,33 @@ function DropinComposerComponent({
|
|
|
33013
33276
|
});
|
|
33014
33277
|
}
|
|
33015
33278
|
};
|
|
33279
|
+
const handleSingpassSelectionNextClick = async (method) => {
|
|
33280
|
+
const {
|
|
33281
|
+
handleOpenSingpassAuthorizationLink
|
|
33282
|
+
} = args;
|
|
33283
|
+
if (method === "singpass" && handleOpenSingpassAuthorizationLink) {
|
|
33284
|
+
try {
|
|
33285
|
+
const {
|
|
33286
|
+
item: {
|
|
33287
|
+
authUrl
|
|
33288
|
+
}
|
|
33289
|
+
} = await handleOpenSingpassAuthorizationLink();
|
|
33290
|
+
setHasSeenSingpassSelection(true);
|
|
33291
|
+
window.open(authUrl, "_blank").focus();
|
|
33292
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33293
|
+
} catch (e) {
|
|
33294
|
+
logger$b.error(e);
|
|
33295
|
+
showToast({
|
|
33296
|
+
label: i18n.get("failToLaunchSingpass"),
|
|
33297
|
+
type: ToastType.ERROR
|
|
33298
|
+
});
|
|
33299
|
+
}
|
|
33300
|
+
}
|
|
33301
|
+
if (method === "manual") {
|
|
33302
|
+
setHasSeenSingpassSelection(true);
|
|
33303
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33304
|
+
}
|
|
33305
|
+
};
|
|
33016
33306
|
const onNavigateTo = (task) => {
|
|
33017
33307
|
setTaskHistory([...taskHistory, task]);
|
|
33018
33308
|
onNavigate(task);
|
|
@@ -33272,7 +33562,15 @@ function DropinComposerComponent({
|
|
|
33272
33562
|
setLeId(legalEntityResponse.id);
|
|
33273
33563
|
setAccountHolder(newAccountHolder);
|
|
33274
33564
|
await refreshLegalEntity();
|
|
33275
|
-
|
|
33565
|
+
if (showIntroduction) {
|
|
33566
|
+
onNavigateTo(TaskTypes.INTRODUCTION);
|
|
33567
|
+
return;
|
|
33568
|
+
}
|
|
33569
|
+
if (isSingpassEnabled && newAccountHolder === "theCompanyIWorkFor" || newAccountHolder === "mySoleProprietorName") {
|
|
33570
|
+
onNavigateTo(TaskTypes.SINGPASS_SELECTION);
|
|
33571
|
+
return;
|
|
33572
|
+
}
|
|
33573
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33276
33574
|
},
|
|
33277
33575
|
taskHistory,
|
|
33278
33576
|
setTaskHistory,
|
|
@@ -33283,11 +33581,19 @@ function DropinComposerComponent({
|
|
|
33283
33581
|
eventEmitter
|
|
33284
33582
|
})
|
|
33285
33583
|
});
|
|
33584
|
+
case TaskTypes.SINGPASS_SELECTION:
|
|
33585
|
+
return jsx(SingpassSelection, {
|
|
33586
|
+
handleNextClick: handleSingpassSelectionNextClick
|
|
33587
|
+
});
|
|
33286
33588
|
case TaskTypes.INTRODUCTION:
|
|
33287
33589
|
return jsx(Introduction, {
|
|
33288
33590
|
legalEntity: rootLegalEntity,
|
|
33289
33591
|
onExitIntroduction: () => {
|
|
33290
33592
|
setHasSeenIntroduction(true);
|
|
33593
|
+
if (shouldShowSingpass) {
|
|
33594
|
+
onNavigateTo(TaskTypes.SINGPASS_SELECTION);
|
|
33595
|
+
return;
|
|
33596
|
+
}
|
|
33291
33597
|
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33292
33598
|
},
|
|
33293
33599
|
tasks
|
|
@@ -35484,7 +35790,7 @@ const ConfigurationApiProvider = ({
|
|
|
35484
35790
|
isEmbeddedDropin,
|
|
35485
35791
|
loadingContext
|
|
35486
35792
|
} = authContext;
|
|
35487
|
-
const sdkVersion = "3.
|
|
35793
|
+
const sdkVersion = "3.12.1";
|
|
35488
35794
|
useAnalytics({
|
|
35489
35795
|
onUserEvent,
|
|
35490
35796
|
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
|
};
|