@adyen/kyc-components 2.37.2 → 2.38.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 +385 -79
- 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";
|
|
@@ -653,6 +655,7 @@ const soleProprietorshipDetails = "Sole proprietorship details";
|
|
|
653
655
|
const selectAccountHolder = "Select account holder";
|
|
654
656
|
const nameOfBankAccountHolder = "We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?";
|
|
655
657
|
const whatBestDescribesYourBusinessSetup = "What best describes your business setup?";
|
|
658
|
+
const howWouldYouLikeToSetUpYourAccount = "How would you like to set up your account";
|
|
656
659
|
const whichLegalArrangementDoesYourBusinessHave = "Which legal arrangement does your business have?";
|
|
657
660
|
const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for you";
|
|
658
661
|
const changeYourBusinessSetup = "Change your business setup?";
|
|
@@ -798,11 +801,13 @@ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
|
|
|
798
801
|
const certificateOfIncorporation = "Certificate of incorporation";
|
|
799
802
|
const certificateOfFormation = "Certificate of formation";
|
|
800
803
|
const secretaryOfStateFiling = "Secretary of State filing";
|
|
804
|
+
const secretaryOfStateFiling__PR = "Department of State filing";
|
|
801
805
|
const partnerShipAgreement = "Partnership agreement";
|
|
802
806
|
const charter = "Charter";
|
|
803
807
|
const articlesOfIncorporation = "Articles of incorporation";
|
|
804
808
|
const meetingRecords = "Board of directors' meeting records of decisions";
|
|
805
809
|
const secretaryOfStateRegDoc = "Registration document from Secretary of State";
|
|
810
|
+
const secretaryOfStateRegDoc__PR = "Registration document from Department of State";
|
|
806
811
|
const certificateOfIncumbency = "Certificate of incumbency";
|
|
807
812
|
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.";
|
|
808
813
|
const learnMore = "Learn more";
|
|
@@ -829,6 +834,10 @@ const addresses = "Addresses";
|
|
|
829
834
|
const loading = "Loading";
|
|
830
835
|
const businessIncorporationNumber = "Business incorporation number";
|
|
831
836
|
const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
|
|
837
|
+
const retrieveMyInfoBusiness = "Retrieve Myinfo business";
|
|
838
|
+
const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
|
|
839
|
+
const enterTheDetailsYourself = "Enter the details yourself";
|
|
840
|
+
const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
|
|
832
841
|
const verificationMethod = "Verification method";
|
|
833
842
|
const verifyViaMobileBankAppOrBankWebsite = "Verify the account via mobile bank app or bank website";
|
|
834
843
|
const provideAccountDetailsAndUploadBankStatement = "Provide account details and upload a scan of a bank statement";
|
|
@@ -899,6 +908,7 @@ const legalCompanyName__helperText = "Enter the name exactly as it is on your co
|
|
|
899
908
|
const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
|
|
900
909
|
const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
|
|
901
910
|
const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
|
|
911
|
+
const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
|
|
902
912
|
const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
|
|
903
913
|
const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
|
|
904
914
|
const taxInformationNumber = "Tax Identification Number";
|
|
@@ -1281,6 +1291,7 @@ const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
|
|
|
1281
1291
|
const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
|
|
1282
1292
|
const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
|
|
1283
1293
|
const eg_ = "E.g. %{examples}";
|
|
1294
|
+
const failToLaunchSingpass = "failed to launch Singpass";
|
|
1284
1295
|
const defaultTrans = {
|
|
1285
1296
|
smartling,
|
|
1286
1297
|
close,
|
|
@@ -1435,6 +1446,7 @@ const defaultTrans = {
|
|
|
1435
1446
|
registeredAddressHeaderDescription,
|
|
1436
1447
|
registeredAddressHeaderDescription__NL,
|
|
1437
1448
|
registeredAddressHeaderDescription__US,
|
|
1449
|
+
registeredAddressHeaderDescription__PR,
|
|
1438
1450
|
registeredAddressTrustHeaderDescription,
|
|
1439
1451
|
operationalAddress,
|
|
1440
1452
|
provideRegistrationDetails,
|
|
@@ -1906,6 +1918,7 @@ const defaultTrans = {
|
|
|
1906
1918
|
selectAccountHolder,
|
|
1907
1919
|
nameOfBankAccountHolder,
|
|
1908
1920
|
whatBestDescribesYourBusinessSetup,
|
|
1921
|
+
howWouldYouLikeToSetUpYourAccount,
|
|
1909
1922
|
whichLegalArrangementDoesYourBusinessHave,
|
|
1910
1923
|
sorryWeCantSetUpAnAccountForYou,
|
|
1911
1924
|
changeYourBusinessSetup,
|
|
@@ -2053,11 +2066,13 @@ const defaultTrans = {
|
|
|
2053
2066
|
certificateOfIncorporation,
|
|
2054
2067
|
certificateOfFormation,
|
|
2055
2068
|
secretaryOfStateFiling,
|
|
2069
|
+
secretaryOfStateFiling__PR,
|
|
2056
2070
|
partnerShipAgreement,
|
|
2057
2071
|
charter,
|
|
2058
2072
|
articlesOfIncorporation,
|
|
2059
2073
|
meetingRecords,
|
|
2060
2074
|
secretaryOfStateRegDoc,
|
|
2075
|
+
secretaryOfStateRegDoc__PR,
|
|
2061
2076
|
certificateOfIncumbency,
|
|
2062
2077
|
documentIssuedWithinLastYear,
|
|
2063
2078
|
learnMore,
|
|
@@ -2085,6 +2100,10 @@ const defaultTrans = {
|
|
|
2085
2100
|
loading,
|
|
2086
2101
|
businessIncorporationNumber,
|
|
2087
2102
|
doNotHaveBusinessIncorporationNumber,
|
|
2103
|
+
retrieveMyInfoBusiness,
|
|
2104
|
+
getYourBusinessVerifiedDetails,
|
|
2105
|
+
enterTheDetailsYourself,
|
|
2106
|
+
youAlsoHaveToUploadSomeSupportingDocuments,
|
|
2088
2107
|
verificationMethod,
|
|
2089
2108
|
verifyViaMobileBankAppOrBankWebsite,
|
|
2090
2109
|
provideAccountDetailsAndUploadBankStatement,
|
|
@@ -2155,6 +2174,7 @@ const defaultTrans = {
|
|
|
2155
2174
|
legalCompanyName__helperText__AU,
|
|
2156
2175
|
legalCompanyName__helperText__NL,
|
|
2157
2176
|
legalCompanyName__helperText__US,
|
|
2177
|
+
legalCompanyName__helperText__PR,
|
|
2158
2178
|
legalCompanyName__helperText__SG,
|
|
2159
2179
|
legalCompanyName__helperText__HK,
|
|
2160
2180
|
taxInformationNumber,
|
|
@@ -2536,7 +2556,8 @@ const defaultTrans = {
|
|
|
2536
2556
|
onboardingRedirectVerifiedDescriptionP1,
|
|
2537
2557
|
onboardingRedirectLinkError,
|
|
2538
2558
|
onboardingRedirectOpenError,
|
|
2539
|
-
eg_
|
|
2559
|
+
eg_,
|
|
2560
|
+
failToLaunchSingpass
|
|
2540
2561
|
};
|
|
2541
2562
|
const FALLBACK_LOCALE = "en-US";
|
|
2542
2563
|
const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
|
|
@@ -2741,13 +2762,6 @@ function useToastContext() {
|
|
|
2741
2762
|
}
|
|
2742
2763
|
return context;
|
|
2743
2764
|
}
|
|
2744
|
-
const CoreContext = createContext(void 0);
|
|
2745
|
-
const useCoreContext = () => {
|
|
2746
|
-
const context = useContext(CoreContext);
|
|
2747
|
-
if (!context)
|
|
2748
|
-
throw Error("You need a <CoreProvider> to use core context");
|
|
2749
|
-
return context;
|
|
2750
|
-
};
|
|
2751
2765
|
var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
2752
2766
|
SettingNames2["AcceptedCountries"] = "acceptedCountries";
|
|
2753
2767
|
SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
|
|
@@ -6661,7 +6675,6 @@ const InputRadio = ({
|
|
|
6661
6675
|
});
|
|
6662
6676
|
function RadioGroup({
|
|
6663
6677
|
items = [],
|
|
6664
|
-
i18n,
|
|
6665
6678
|
name,
|
|
6666
6679
|
onChange = noop,
|
|
6667
6680
|
value,
|
|
@@ -6670,6 +6683,9 @@ function RadioGroup({
|
|
|
6670
6683
|
className,
|
|
6671
6684
|
disabled = false
|
|
6672
6685
|
}) {
|
|
6686
|
+
const {
|
|
6687
|
+
i18n
|
|
6688
|
+
} = useI18nContext();
|
|
6673
6689
|
const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
|
|
6674
6690
|
return jsx("div", {
|
|
6675
6691
|
className: "adyen-kyc-radio-group",
|
|
@@ -6858,7 +6874,6 @@ function CompanyRegistrationNumberTypeSelector({
|
|
|
6858
6874
|
name: "companyRegistrationNumberType",
|
|
6859
6875
|
items: options,
|
|
6860
6876
|
value: selected,
|
|
6861
|
-
i18n,
|
|
6862
6877
|
onChange: (e) => handleSelect(e.target.value)
|
|
6863
6878
|
})
|
|
6864
6879
|
});
|
|
@@ -7190,11 +7205,6 @@ const businessRegistrationNumberMasks = {
|
|
|
7190
7205
|
nonProfit: {
|
|
7191
7206
|
mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
|
|
7192
7207
|
}
|
|
7193
|
-
},
|
|
7194
|
-
[CountryCodes.UnitedStates]: {
|
|
7195
|
-
default: {
|
|
7196
|
-
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
7197
|
-
}
|
|
7198
7208
|
}
|
|
7199
7209
|
};
|
|
7200
7210
|
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])?)*$/;
|
|
@@ -7327,9 +7337,6 @@ const businessRegistrationNumberPatterns = {
|
|
|
7327
7337
|
[CountryCodes.Portugal]: {
|
|
7328
7338
|
default: /^\d{9}$/
|
|
7329
7339
|
},
|
|
7330
|
-
[CountryCodes.PuertoRico]: {
|
|
7331
|
-
default: /^\d{9}$/
|
|
7332
|
-
},
|
|
7333
7340
|
[CountryCodes.Romania]: {
|
|
7334
7341
|
default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
|
|
7335
7342
|
},
|
|
@@ -7354,9 +7361,6 @@ const businessRegistrationNumberPatterns = {
|
|
|
7354
7361
|
[CountryCodes.UnitedKingdom]: {
|
|
7355
7362
|
default: /^[a-zA-Z0-9]{8}$/,
|
|
7356
7363
|
nonProfit: /^\d{6,7}$/
|
|
7357
|
-
},
|
|
7358
|
-
[CountryCodes.UnitedStates]: {
|
|
7359
|
-
default: /^\d{9}$/
|
|
7360
7364
|
}
|
|
7361
7365
|
};
|
|
7362
7366
|
const CountryIdNumberPatterns = {
|
|
@@ -7374,6 +7378,7 @@ const CountryIdNumberPatterns = {
|
|
|
7374
7378
|
},
|
|
7375
7379
|
[CountryCodes.Sweden]: /^\d{10}$|^\d{12}$/,
|
|
7376
7380
|
[CountryCodes.UnitedStates]: {
|
|
7381
|
+
// used by CountryCodes.PuertoRico
|
|
7377
7382
|
ssn: /^\d{9}$/,
|
|
7378
7383
|
ssnLastFour: /^\d{4}$/
|
|
7379
7384
|
}
|
|
@@ -7941,16 +7946,7 @@ const defaultFieldConfig$8 = {
|
|
|
7941
7946
|
}
|
|
7942
7947
|
},
|
|
7943
7948
|
[CountryCodes.PuertoRico]: {
|
|
7944
|
-
|
|
7945
|
-
mask: businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
|
|
7946
|
-
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default),
|
|
7947
|
-
guidanceText: {
|
|
7948
|
-
key: "enterNDigitsForExample",
|
|
7949
|
-
values: {
|
|
7950
|
-
numDigits: "9",
|
|
7951
|
-
example: "12-3456789"
|
|
7952
|
-
}
|
|
7953
|
-
}
|
|
7949
|
+
// should exactly match CountryCodes.UnitedStates
|
|
7954
7950
|
},
|
|
7955
7951
|
[CountryCodes.Romania]: {
|
|
7956
7952
|
label: "numarOrdineRegistrulComertului",
|
|
@@ -8702,6 +8698,20 @@ const defaultFieldConfig$7 = {
|
|
|
8702
8698
|
}
|
|
8703
8699
|
}
|
|
8704
8700
|
},
|
|
8701
|
+
[CountryCodes.PuertoRico]: {
|
|
8702
|
+
// should exactly match CountryCodes.UnitedStates
|
|
8703
|
+
label: "employerIdentificationNumber",
|
|
8704
|
+
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
8705
|
+
mask: {
|
|
8706
|
+
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
8707
|
+
},
|
|
8708
|
+
guidanceText: {
|
|
8709
|
+
key: "validationPleaseEnterAValidEINWithFormat",
|
|
8710
|
+
values: {
|
|
8711
|
+
format: "XX-XXXXXXX"
|
|
8712
|
+
}
|
|
8713
|
+
}
|
|
8714
|
+
},
|
|
8705
8715
|
/**
|
|
8706
8716
|
* NOT YET SUPPORTED
|
|
8707
8717
|
* These are brought over from the old pattern files. We have no idea if they are accurate or not.
|
|
@@ -9413,7 +9423,6 @@ function TaxIdNumberTypeSelector({
|
|
|
9413
9423
|
name: "taxIdNumberType",
|
|
9414
9424
|
items: options,
|
|
9415
9425
|
value: selected,
|
|
9416
|
-
i18n,
|
|
9417
9426
|
onChange: (e) => handleSelect(e.target.value)
|
|
9418
9427
|
})
|
|
9419
9428
|
});
|
|
@@ -10326,7 +10335,21 @@ const countryConfig$3 = {
|
|
|
10326
10335
|
label: "vatAbsenceReason"
|
|
10327
10336
|
}
|
|
10328
10337
|
},
|
|
10329
|
-
[CountryCodes.PuertoRico]: {
|
|
10338
|
+
[CountryCodes.PuertoRico]: {
|
|
10339
|
+
// exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
|
|
10340
|
+
country: {
|
|
10341
|
+
label: "companyCountry"
|
|
10342
|
+
},
|
|
10343
|
+
legalCompanyName: {
|
|
10344
|
+
helperText: "legalCompanyName__helperText__US"
|
|
10345
|
+
},
|
|
10346
|
+
tradingName: {
|
|
10347
|
+
label: "doingBusinessAs"
|
|
10348
|
+
},
|
|
10349
|
+
exemptedFromTax: {
|
|
10350
|
+
label: "doNotHaveEIN"
|
|
10351
|
+
}
|
|
10352
|
+
},
|
|
10330
10353
|
[CountryCodes.Romania]: {},
|
|
10331
10354
|
[CountryCodes.Slovakia]: {},
|
|
10332
10355
|
[CountryCodes.Slovenia]: {},
|
|
@@ -10582,6 +10605,13 @@ const EntityTypeSelectionRadioCardBody = ({
|
|
|
10582
10605
|
})]
|
|
10583
10606
|
});
|
|
10584
10607
|
};
|
|
10608
|
+
const CoreContext = createContext(void 0);
|
|
10609
|
+
const useCoreContext = () => {
|
|
10610
|
+
const context = useContext(CoreContext);
|
|
10611
|
+
if (!context)
|
|
10612
|
+
throw Error("You need a <CoreProvider> to use core context");
|
|
10613
|
+
return context;
|
|
10614
|
+
};
|
|
10585
10615
|
var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
|
|
10586
10616
|
TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
|
|
10587
10617
|
TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
|
|
@@ -10716,6 +10746,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
|
10716
10746
|
TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
|
|
10717
10747
|
TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
|
|
10718
10748
|
TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
|
|
10749
|
+
TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
|
|
10719
10750
|
return TaskTypes2;
|
|
10720
10751
|
})(TaskTypes || {});
|
|
10721
10752
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
@@ -10865,8 +10896,8 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
|
|
|
10865
10896
|
})(DecisionMakerType || {});
|
|
10866
10897
|
const REQUIRED = "REQUIRED";
|
|
10867
10898
|
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];
|
|
10868
|
-
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
10869
|
-
const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.UnitedStates];
|
|
10899
|
+
const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
10900
|
+
const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
10870
10901
|
const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
|
|
10871
10902
|
const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
|
|
10872
10903
|
const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
|
|
@@ -11821,12 +11852,20 @@ function ListItem({
|
|
|
11821
11852
|
const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
|
|
11822
11853
|
const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
|
|
11823
11854
|
const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
|
|
11824
|
-
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11855
|
+
const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
|
|
11825
11856
|
const ADDRESS_SCHEMAS = {
|
|
11826
11857
|
[CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11827
11858
|
[CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
11828
11859
|
[CountryCodes.UnitedKingdom]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
|
|
11829
11860
|
[CountryCodes.UnitedStates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
|
|
11861
|
+
[CountryCodes.PuertoRico]: [
|
|
11862
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11863
|
+
COUNTRY,
|
|
11864
|
+
ADDRESS,
|
|
11865
|
+
OTHER_ADDRESS_INFORMATION,
|
|
11866
|
+
CITY,
|
|
11867
|
+
POSTAL_CODE
|
|
11868
|
+
],
|
|
11830
11869
|
[CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
|
|
11831
11870
|
[CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
|
|
11832
11871
|
default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
|
|
@@ -11842,10 +11881,14 @@ const LABELS = {
|
|
|
11842
11881
|
otherAddressInformation: {
|
|
11843
11882
|
default: OTHER_ADDRESS_INFORMATION,
|
|
11844
11883
|
[CountryCodes.Canada]: "apartmentSuiteOptional",
|
|
11884
|
+
[CountryCodes.PuertoRico]: "apartmentSuiteOptional",
|
|
11885
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11845
11886
|
[CountryCodes.UnitedStates]: "apartmentSuiteOptional"
|
|
11846
11887
|
},
|
|
11847
11888
|
postalCode: {
|
|
11848
11889
|
default: POSTAL_CODE,
|
|
11890
|
+
[CountryCodes.PuertoRico]: "zipCode",
|
|
11891
|
+
// should exactly match CountryCodes.UnitedStates
|
|
11849
11892
|
[CountryCodes.UnitedStates]: "zipCode"
|
|
11850
11893
|
},
|
|
11851
11894
|
stateOrProvince: {
|
|
@@ -12271,7 +12314,8 @@ const postalCodePatterns = {
|
|
|
12271
12314
|
[CountryCodes.Norway]: createRegExpByDigits(4),
|
|
12272
12315
|
[CountryCodes.Poland]: /^\d{2}-\d{3}$/,
|
|
12273
12316
|
[CountryCodes.Portugal]: /^[1-9]\d{3}([- ]?\d{3})?$/,
|
|
12274
|
-
[CountryCodes.PuertoRico]:
|
|
12317
|
+
[CountryCodes.PuertoRico]: /^\d{5}(?:[ -]?\d{4})?$/,
|
|
12318
|
+
// should exactly match CountryCodes.UnitedStates
|
|
12275
12319
|
[CountryCodes.Romania]: createRegExpByDigits(6),
|
|
12276
12320
|
[CountryCodes.Slovakia]: /^(SK-)?\d{5}$/,
|
|
12277
12321
|
[CountryCodes.Slovenia]: /^(SI-)?\d{4}$/,
|
|
@@ -12915,7 +12959,6 @@ function RegistrationAddressComponent(props) {
|
|
|
12915
12959
|
name: "operationalAddressIsSame",
|
|
12916
12960
|
items: operationalAddressIsSameItems,
|
|
12917
12961
|
value: formData.operationalAddressIsSame,
|
|
12918
|
-
i18n,
|
|
12919
12962
|
disabled: formUtils.isReadOnly("operationalAddressIsSame"),
|
|
12920
12963
|
onChange: handleChangeFor("operationalAddressIsSame"),
|
|
12921
12964
|
"aria-required": true,
|
|
@@ -12938,6 +12981,33 @@ function RegistrationAddressComponent(props) {
|
|
|
12938
12981
|
});
|
|
12939
12982
|
}
|
|
12940
12983
|
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
12984
|
+
[CountryCodes.PuertoRico]: {
|
|
12985
|
+
// should exactly match CountryCodes.UnitedStates
|
|
12986
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
12987
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
12988
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling__PR"]
|
|
12989
|
+
},
|
|
12990
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
12991
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
12992
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
12993
|
+
},
|
|
12994
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
12995
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
12996
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
12997
|
+
},
|
|
12998
|
+
[CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
|
|
12999
|
+
header: "acceptedDocumentsForGovernment",
|
|
13000
|
+
documents: ["charter"]
|
|
13001
|
+
},
|
|
13002
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13003
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13004
|
+
documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc__PR", "certificateOfIncumbency"]
|
|
13005
|
+
},
|
|
13006
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13007
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13008
|
+
documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
|
|
13009
|
+
}
|
|
13010
|
+
},
|
|
12941
13011
|
[CountryCodes.UnitedStates]: {
|
|
12942
13012
|
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
12943
13013
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
@@ -12966,11 +13036,13 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
|
12966
13036
|
}
|
|
12967
13037
|
};
|
|
12968
13038
|
const GuidanceContent$1 = ({
|
|
12969
|
-
i18n,
|
|
12970
13039
|
country: country2,
|
|
12971
13040
|
companyType: companyType2
|
|
12972
13041
|
}) => {
|
|
12973
13042
|
var _a;
|
|
13043
|
+
const {
|
|
13044
|
+
i18n
|
|
13045
|
+
} = useI18nContext();
|
|
12974
13046
|
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
|
|
12975
13047
|
return jsx("div", {
|
|
12976
13048
|
className: "adyen-kyc-upload-field__guidance",
|
|
@@ -13041,8 +13113,7 @@ function RegistrationDocumentComponent({
|
|
|
13041
13113
|
description: i18n.get(description2),
|
|
13042
13114
|
documentField: "registrationDocument",
|
|
13043
13115
|
documentType: DocumentType.REGISTRATION_DOCUMENT,
|
|
13044
|
-
guidanceContent: GuidanceContent$1
|
|
13045
|
-
i18n,
|
|
13116
|
+
guidanceContent: jsx(GuidanceContent$1, {
|
|
13046
13117
|
country: country2,
|
|
13047
13118
|
companyType: companyType2
|
|
13048
13119
|
}),
|
|
@@ -13051,6 +13122,29 @@ function RegistrationDocumentComponent({
|
|
|
13051
13122
|
});
|
|
13052
13123
|
}
|
|
13053
13124
|
const ACCEPTED_DOCUMENTS_MAP = {
|
|
13125
|
+
[CountryCodes.PuertoRico]: {
|
|
13126
|
+
// should exactly match CountryCodes.UnitedStates
|
|
13127
|
+
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13128
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
13129
|
+
documents: ["irsCP575"]
|
|
13130
|
+
},
|
|
13131
|
+
[CompanyTypesValue.PUBLIC_COMPANY]: {
|
|
13132
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13133
|
+
documents: ["annualReport", "secForm10k"]
|
|
13134
|
+
},
|
|
13135
|
+
[CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
|
|
13136
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
13137
|
+
documents: ["annualReport", "secForm10k"]
|
|
13138
|
+
},
|
|
13139
|
+
[CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
|
|
13140
|
+
header: "acceptedDocumentsForNonProfit",
|
|
13141
|
+
documents: ["annualReport"]
|
|
13142
|
+
},
|
|
13143
|
+
[CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
|
|
13144
|
+
header: "acceptedDocumentsForPartnerships",
|
|
13145
|
+
documents: ["irsScheduleK1"]
|
|
13146
|
+
}
|
|
13147
|
+
},
|
|
13054
13148
|
[CountryCodes.UnitedStates]: {
|
|
13055
13149
|
[CompanyTypesValue.PRIVATE_COMPANY]: {
|
|
13056
13150
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
@@ -13075,11 +13169,13 @@ const ACCEPTED_DOCUMENTS_MAP = {
|
|
|
13075
13169
|
}
|
|
13076
13170
|
};
|
|
13077
13171
|
const GuidanceContent = ({
|
|
13078
|
-
i18n,
|
|
13079
13172
|
country: country2,
|
|
13080
13173
|
companyType: companyType2
|
|
13081
13174
|
}) => {
|
|
13082
13175
|
var _a;
|
|
13176
|
+
const {
|
|
13177
|
+
i18n
|
|
13178
|
+
} = useI18nContext();
|
|
13083
13179
|
const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
|
|
13084
13180
|
return jsx("div", {
|
|
13085
13181
|
className: "adyen-kyc-upload-field__guidance",
|
|
@@ -13143,8 +13239,7 @@ function TaxDocumentComponent({
|
|
|
13143
13239
|
description: i18n.get(description2),
|
|
13144
13240
|
documentField: "taxDocument",
|
|
13145
13241
|
documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
|
|
13146
|
-
guidanceContent: GuidanceContent
|
|
13147
|
-
i18n,
|
|
13242
|
+
guidanceContent: jsx(GuidanceContent, {
|
|
13148
13243
|
country: country2,
|
|
13149
13244
|
companyType: companyType2
|
|
13150
13245
|
}),
|
|
@@ -13480,7 +13575,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
|
13480
13575
|
});
|
|
13481
13576
|
const getFileExtention = (fileName2) => fileName2.split(".").pop();
|
|
13482
13577
|
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];
|
|
13483
|
-
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
|
|
13578
|
+
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
|
|
13484
13579
|
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];
|
|
13485
13580
|
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];
|
|
13486
13581
|
const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
|
|
@@ -13491,6 +13586,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
|
|
|
13491
13586
|
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
13492
13587
|
// strictly a subset of countries which use tax ID
|
|
13493
13588
|
CountryCodes.Canada,
|
|
13589
|
+
CountryCodes.PuertoRico,
|
|
13494
13590
|
CountryCodes.UnitedStates
|
|
13495
13591
|
];
|
|
13496
13592
|
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
@@ -13539,10 +13635,10 @@ const rules$2 = ({
|
|
|
13539
13635
|
companyRegistrationNumberExemptionAllowed: () => {
|
|
13540
13636
|
var _a, _b;
|
|
13541
13637
|
const companyType2 = ("companyType" in data || "companyStructure" in data) && (((_a = data.companyType) == null ? void 0 : _a.entityType) || ((_b = data.companyStructure) == null ? void 0 : _b.entityType));
|
|
13542
|
-
if (country2 ===
|
|
13638
|
+
if (country2 === CountryCodes.Germany && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
|
|
13543
13639
|
return "REQUIRED";
|
|
13544
13640
|
}
|
|
13545
|
-
if (country2 ===
|
|
13641
|
+
if (country2 === CountryCodes.Denmark && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
|
|
13546
13642
|
return "REQUIRED";
|
|
13547
13643
|
}
|
|
13548
13644
|
},
|
|
@@ -15475,13 +15571,22 @@ const IdVerificationMethodOptionFooter = ({
|
|
|
15475
15571
|
};
|
|
15476
15572
|
const idVerificationMethodFields = ["idVerificationMethod"];
|
|
15477
15573
|
function IdVerificationMethodComponent(props) {
|
|
15574
|
+
const {
|
|
15575
|
+
id: id2,
|
|
15576
|
+
data: propsData,
|
|
15577
|
+
fieldValidationErrors,
|
|
15578
|
+
validators,
|
|
15579
|
+
formVerificationErrors,
|
|
15580
|
+
name,
|
|
15581
|
+
countryOfResidence
|
|
15582
|
+
} = props;
|
|
15478
15583
|
const {
|
|
15479
15584
|
i18n
|
|
15480
15585
|
} = useI18nContext();
|
|
15481
15586
|
const {
|
|
15482
15587
|
getImageUrl
|
|
15483
15588
|
} = useConfigurationApi();
|
|
15484
|
-
const verificationMethodFormId =
|
|
15589
|
+
const verificationMethodFormId = id2;
|
|
15485
15590
|
const schema = idVerificationMethodFields;
|
|
15486
15591
|
const stateRef = useRef({
|
|
15487
15592
|
setState: null
|
|
@@ -15499,11 +15604,11 @@ function IdVerificationMethodComponent(props) {
|
|
|
15499
15604
|
...props,
|
|
15500
15605
|
schema,
|
|
15501
15606
|
defaultData: {
|
|
15502
|
-
...
|
|
15607
|
+
...propsData,
|
|
15503
15608
|
idVerificationMethod: "instantVerification"
|
|
15504
15609
|
},
|
|
15505
|
-
rules:
|
|
15506
|
-
fieldProblems:
|
|
15610
|
+
rules: validators,
|
|
15611
|
+
fieldProblems: fieldValidationErrors
|
|
15507
15612
|
});
|
|
15508
15613
|
const formUtils = formUtilities(props, i18n);
|
|
15509
15614
|
useEffect(() => {
|
|
@@ -15530,15 +15635,15 @@ function IdVerificationMethodComponent(props) {
|
|
|
15530
15635
|
children: [jsx(FormHeader, {
|
|
15531
15636
|
heading: i18n.get("verificationMethod")
|
|
15532
15637
|
}), jsx(ErrorPanel, {
|
|
15533
|
-
verificationErrors:
|
|
15534
|
-
validationErrors:
|
|
15638
|
+
verificationErrors: formVerificationErrors,
|
|
15639
|
+
validationErrors: fieldValidationErrors,
|
|
15535
15640
|
formUtils,
|
|
15536
15641
|
id: "ariaErrorField"
|
|
15537
15642
|
}), jsx("div", {
|
|
15538
15643
|
dangerouslySetInnerHTML: {
|
|
15539
15644
|
__html: i18n.get("idUploadDocumentSubtitle", {
|
|
15540
15645
|
values: {
|
|
15541
|
-
name
|
|
15646
|
+
name
|
|
15542
15647
|
}
|
|
15543
15648
|
})
|
|
15544
15649
|
}
|
|
@@ -15605,7 +15710,7 @@ function IdVerificationMethodComponent(props) {
|
|
|
15605
15710
|
}),
|
|
15606
15711
|
titleId: "howVerificationWithOnfidoWork",
|
|
15607
15712
|
contentId: "howVerificationWithOnfidoWorkContent"
|
|
15608
|
-
}),
|
|
15713
|
+
}), (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && jsx("div", {
|
|
15609
15714
|
dangerouslySetInnerHTML: {
|
|
15610
15715
|
__html: i18n.get("byProceedingToTheNextStepYouConfirmThatYouHaveReadUnderstandAndAcceptTheTerms")
|
|
15611
15716
|
}
|
|
@@ -16716,7 +16821,6 @@ function IndividualIdNumberTypeSelector({
|
|
|
16716
16821
|
name: "individualIdNumberType",
|
|
16717
16822
|
items: options,
|
|
16718
16823
|
value: selected,
|
|
16719
|
-
i18n,
|
|
16720
16824
|
onChange: (e) => {
|
|
16721
16825
|
var _a;
|
|
16722
16826
|
return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
|
|
@@ -18718,6 +18822,7 @@ const currencyByCountry = {
|
|
|
18718
18822
|
[CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
|
|
18719
18823
|
[CountryCodes.Portugal]: [Currencies.EUR],
|
|
18720
18824
|
[CountryCodes.PuertoRico]: [Currencies.USD],
|
|
18825
|
+
// should exactly match CountryCodes.UnitedStates
|
|
18721
18826
|
[CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
|
|
18722
18827
|
[CountryCodes.Singapore]: [Currencies.SGD],
|
|
18723
18828
|
[CountryCodes.Slovakia]: [Currencies.EUR],
|
|
@@ -24045,7 +24150,6 @@ function CompanyDropinComponent({
|
|
|
24045
24150
|
const {
|
|
24046
24151
|
isExperimentEnabled
|
|
24047
24152
|
} = useExperimentsContext();
|
|
24048
|
-
useCoreContext();
|
|
24049
24153
|
const {
|
|
24050
24154
|
i18n,
|
|
24051
24155
|
setLocale
|
|
@@ -24596,13 +24700,15 @@ const mapCompanyDataResponseToFormSchema = (company2) => ({
|
|
|
24596
24700
|
const CompanyLookupResultsHeader = ({
|
|
24597
24701
|
results,
|
|
24598
24702
|
status,
|
|
24599
|
-
i18n,
|
|
24600
24703
|
hasInternalError,
|
|
24601
24704
|
selectedCompanyId,
|
|
24602
24705
|
verifiedCompany,
|
|
24603
24706
|
retrySearch,
|
|
24604
24707
|
reset
|
|
24605
24708
|
}) => {
|
|
24709
|
+
const {
|
|
24710
|
+
i18n
|
|
24711
|
+
} = useI18nContext();
|
|
24606
24712
|
const numberOfResults = results == null ? void 0 : results.length;
|
|
24607
24713
|
const headerText = useMemo(() => {
|
|
24608
24714
|
if (hasInternalError && !selectedCompanyId) {
|
|
@@ -24637,7 +24743,7 @@ const CompanyLookupResultsHeader = ({
|
|
|
24637
24743
|
onClick: reset,
|
|
24638
24744
|
children: "Reset selection"
|
|
24639
24745
|
})]
|
|
24640
|
-
}), descriptionText && jsxs("div", {
|
|
24746
|
+
}), descriptionText && status !== "loading" && jsxs("div", {
|
|
24641
24747
|
className: "adyen-company-lookup-results-header__description",
|
|
24642
24748
|
children: [hasInternalError && !selectedCompanyId && jsx("button", {
|
|
24643
24749
|
type: "button",
|
|
@@ -24661,9 +24767,11 @@ const LookupResultBody = ({
|
|
|
24661
24767
|
})]
|
|
24662
24768
|
});
|
|
24663
24769
|
const LookupResultAlert = ({
|
|
24664
|
-
i18n,
|
|
24665
24770
|
type
|
|
24666
24771
|
}) => {
|
|
24772
|
+
const {
|
|
24773
|
+
i18n
|
|
24774
|
+
} = useI18nContext();
|
|
24667
24775
|
const iconType = {
|
|
24668
24776
|
verified: AlertTypes.SUCCESS,
|
|
24669
24777
|
warning: AlertTypes.WARNING,
|
|
@@ -24689,7 +24797,6 @@ const LookupResultAlert = ({
|
|
|
24689
24797
|
};
|
|
24690
24798
|
const LookupResult = ({
|
|
24691
24799
|
classes,
|
|
24692
|
-
i18n,
|
|
24693
24800
|
option,
|
|
24694
24801
|
status,
|
|
24695
24802
|
isSelected,
|
|
@@ -24743,7 +24850,6 @@ const LookupResult = ({
|
|
|
24743
24850
|
label: classes
|
|
24744
24851
|
}
|
|
24745
24852
|
}), showAlert && jsx(LookupResultAlert, {
|
|
24746
|
-
i18n,
|
|
24747
24853
|
type: alertType
|
|
24748
24854
|
})]
|
|
24749
24855
|
});
|
|
@@ -24769,7 +24875,6 @@ const LookupResult = ({
|
|
|
24769
24875
|
label: classes
|
|
24770
24876
|
}
|
|
24771
24877
|
}), showAlert && jsx(LookupResultAlert, {
|
|
24772
|
-
i18n,
|
|
24773
24878
|
type: alertType
|
|
24774
24879
|
})]
|
|
24775
24880
|
})
|
|
@@ -24779,7 +24884,6 @@ const CompanyLookupResultsList = ({
|
|
|
24779
24884
|
results,
|
|
24780
24885
|
selectedCompanyId,
|
|
24781
24886
|
status,
|
|
24782
|
-
i18n,
|
|
24783
24887
|
hasInternalError,
|
|
24784
24888
|
tin = "",
|
|
24785
24889
|
verifiedCompany,
|
|
@@ -24810,7 +24914,6 @@ const CompanyLookupResultsList = ({
|
|
|
24810
24914
|
classes: optionClasses(option),
|
|
24811
24915
|
option,
|
|
24812
24916
|
status,
|
|
24813
|
-
i18n,
|
|
24814
24917
|
tin,
|
|
24815
24918
|
isSelected: isOptionSelected(option),
|
|
24816
24919
|
isInvalid: isOptionInvalid(option),
|
|
@@ -24857,9 +24960,7 @@ function CompanyLookup({
|
|
|
24857
24960
|
handleVerifyTin
|
|
24858
24961
|
}) {
|
|
24859
24962
|
var _a;
|
|
24860
|
-
|
|
24861
|
-
i18n
|
|
24862
|
-
} = useI18nContext();
|
|
24963
|
+
useI18nContext();
|
|
24863
24964
|
const {
|
|
24864
24965
|
status,
|
|
24865
24966
|
results,
|
|
@@ -24944,7 +25045,6 @@ function CompanyLookup({
|
|
|
24944
25045
|
children: [jsx(CompanyLookupResultsHeader, {
|
|
24945
25046
|
results,
|
|
24946
25047
|
status,
|
|
24947
|
-
i18n,
|
|
24948
25048
|
hasInternalError,
|
|
24949
25049
|
selectedCompanyId,
|
|
24950
25050
|
verifiedCompany,
|
|
@@ -24956,7 +25056,6 @@ function CompanyLookup({
|
|
|
24956
25056
|
results,
|
|
24957
25057
|
selectedCompanyId,
|
|
24958
25058
|
status,
|
|
24959
|
-
i18n,
|
|
24960
25059
|
hasInternalError,
|
|
24961
25060
|
tin: taxInformationNumber2,
|
|
24962
25061
|
verifiedCompany,
|
|
@@ -26346,9 +26445,6 @@ function useCompanySearchTaskSubmit({
|
|
|
26346
26445
|
onExternalSubmit,
|
|
26347
26446
|
handleUpdateLegalEntity
|
|
26348
26447
|
}) {
|
|
26349
|
-
const {
|
|
26350
|
-
setAccountHolder
|
|
26351
|
-
} = useCoreContext();
|
|
26352
26448
|
const {
|
|
26353
26449
|
showToast,
|
|
26354
26450
|
clearToasts
|
|
@@ -26432,7 +26528,6 @@ function useCompanySearchTaskSubmit({
|
|
|
26432
26528
|
}
|
|
26433
26529
|
});
|
|
26434
26530
|
logger$c.log(submittedLegalEntity);
|
|
26435
|
-
setAccountHolder(entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type]);
|
|
26436
26531
|
clearToasts();
|
|
26437
26532
|
onExternalSubmit == null ? void 0 : onExternalSubmit(data);
|
|
26438
26533
|
} catch (e) {
|
|
@@ -26468,7 +26563,7 @@ function useCompanySearchTaskSubmit({
|
|
|
26468
26563
|
} finally {
|
|
26469
26564
|
setLoadingStatus("success");
|
|
26470
26565
|
}
|
|
26471
|
-
}, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems,
|
|
26566
|
+
}, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
|
|
26472
26567
|
return {
|
|
26473
26568
|
submit: submit2
|
|
26474
26569
|
};
|
|
@@ -26876,6 +26971,16 @@ const useShouldShowIntroduction = ({
|
|
|
26876
26971
|
});
|
|
26877
26972
|
return canSeeIntroduction && !hasSeenIntroduction;
|
|
26878
26973
|
};
|
|
26974
|
+
const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
|
|
26975
|
+
const useHasSeenSingpassSelection = ({
|
|
26976
|
+
legalEntityId
|
|
26977
|
+
}) => {
|
|
26978
|
+
const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(getHasSeenSingpassSelectionStorageKey(legalEntityId), false);
|
|
26979
|
+
return {
|
|
26980
|
+
hasSeenSingpassSelection,
|
|
26981
|
+
setHasSeenSingpassSelection
|
|
26982
|
+
};
|
|
26983
|
+
};
|
|
26879
26984
|
const logger$b = createLogger("useAssociatedLegalArrangement");
|
|
26880
26985
|
function useAssociatedLegalArrangement({
|
|
26881
26986
|
rootLegalEntity,
|
|
@@ -28812,6 +28917,152 @@ function ReviewComponent({
|
|
|
28812
28917
|
footer
|
|
28813
28918
|
});
|
|
28814
28919
|
}
|
|
28920
|
+
const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
|
|
28921
|
+
/* @__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" }),
|
|
28922
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
|
|
28923
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
|
|
28924
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
|
|
28925
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
|
|
28926
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
|
|
28927
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
|
|
28928
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
|
|
28929
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
|
|
28930
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
|
|
28931
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
|
|
28932
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
|
|
28933
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
|
|
28934
|
+
/* @__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" }),
|
|
28935
|
+
/* @__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" }),
|
|
28936
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
|
|
28937
|
+
/* @__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" }),
|
|
28938
|
+
/* @__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" }),
|
|
28939
|
+
/* @__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" })
|
|
28940
|
+
] });
|
|
28941
|
+
const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
|
|
28942
|
+
/* @__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" }),
|
|
28943
|
+
/* @__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" }),
|
|
28944
|
+
/* @__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" }),
|
|
28945
|
+
/* @__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" }),
|
|
28946
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.15 44.19h-6.07V62.4h6.07z" }),
|
|
28947
|
+
/* @__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" }),
|
|
28948
|
+
/* @__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" }),
|
|
28949
|
+
/* @__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" }),
|
|
28950
|
+
/* @__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" }),
|
|
28951
|
+
/* @__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" }),
|
|
28952
|
+
/* @__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" }),
|
|
28953
|
+
/* @__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" }),
|
|
28954
|
+
/* @__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" }),
|
|
28955
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 28.37H33.95v3.74H58.3z" }),
|
|
28956
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M46.12 42.77H33.95v3.74h12.17z" }),
|
|
28957
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M36.72 30.24h18.8" }),
|
|
28958
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 35.46H33.95v3.74H58.3z" }),
|
|
28959
|
+
/* @__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" }),
|
|
28960
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M33.9 21.3h18.82M33.9 24.97h8.4" }),
|
|
28961
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 43.55h-39.1v6.02h39.1z" }),
|
|
28962
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.27 61.31H80.7v6.02h19.56z" }),
|
|
28963
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M85.17 46.56h30.2" }),
|
|
28964
|
+
/* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 52.25h-39.1v6.02h39.1z" }),
|
|
28965
|
+
/* @__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" }),
|
|
28966
|
+
/* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
|
|
28967
|
+
] });
|
|
28968
|
+
const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
|
|
28969
|
+
/* @__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" }),
|
|
28970
|
+
/* @__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" })
|
|
28971
|
+
] });
|
|
28972
|
+
const setupAccountMethods = ["singpass", "manual"];
|
|
28973
|
+
const setupAccountMethodFields = ["setupAccountMethod"];
|
|
28974
|
+
const getSetupAccountMethodMetadata = () => ({
|
|
28975
|
+
singpass: {
|
|
28976
|
+
name: "retrieveMyInfoBusiness",
|
|
28977
|
+
description: "getYourBusinessVerifiedDetails",
|
|
28978
|
+
icon: jsx("span", {
|
|
28979
|
+
className: "adyen-kyc-setup-singpass-container",
|
|
28980
|
+
children: jsx(SvgSetupSingpass, {})
|
|
28981
|
+
}),
|
|
28982
|
+
provider: {
|
|
28983
|
+
name: "singpass",
|
|
28984
|
+
icon: jsx("span", {
|
|
28985
|
+
className: "adyen-kyc-singpass-logo-container",
|
|
28986
|
+
children: jsx(SvgSingpassLogo, {})
|
|
28987
|
+
})
|
|
28988
|
+
}
|
|
28989
|
+
},
|
|
28990
|
+
manual: {
|
|
28991
|
+
name: "enterTheDetailsYourself",
|
|
28992
|
+
description: "youAlsoHaveToUploadSomeSupportingDocuments",
|
|
28993
|
+
icon: jsx("span", {
|
|
28994
|
+
className: "adyen-kyc-setup-manual-container",
|
|
28995
|
+
children: jsx(SvgSetupManual, {})
|
|
28996
|
+
})
|
|
28997
|
+
}
|
|
28998
|
+
});
|
|
28999
|
+
const SingpassSelection = (props) => {
|
|
29000
|
+
const {
|
|
29001
|
+
handleNextClick
|
|
29002
|
+
} = props;
|
|
29003
|
+
const {
|
|
29004
|
+
i18n
|
|
29005
|
+
} = useI18nContext();
|
|
29006
|
+
const [selectedMethod, setSelectedMethod] = useState();
|
|
29007
|
+
const selectSetupAccountMethod = (method) => {
|
|
29008
|
+
setSelectedMethod(method);
|
|
29009
|
+
handleChangeFor("setupAccountMethod")(method);
|
|
29010
|
+
};
|
|
29011
|
+
const {
|
|
29012
|
+
handleChangeFor,
|
|
29013
|
+
data
|
|
29014
|
+
} = useForm({
|
|
29015
|
+
...props,
|
|
29016
|
+
schema: setupAccountMethodFields,
|
|
29017
|
+
defaultData: {}
|
|
29018
|
+
});
|
|
29019
|
+
const methodsMetadata = getSetupAccountMethodMetadata();
|
|
29020
|
+
return jsx("div", {
|
|
29021
|
+
className: "adl-u-display-flex adl-u-justify-content-center",
|
|
29022
|
+
children: jsxs("div", {
|
|
29023
|
+
className: "adyen-kyc-singpass-selection",
|
|
29024
|
+
children: [jsx("header", {
|
|
29025
|
+
className: "adl-u-margin-bottom-32",
|
|
29026
|
+
children: jsx(Heading, {
|
|
29027
|
+
level: 2,
|
|
29028
|
+
children: i18n.get("howWouldYouLikeToSetUpYourAccount")
|
|
29029
|
+
})
|
|
29030
|
+
}), jsx("form", {
|
|
29031
|
+
children: jsx(Field, {
|
|
29032
|
+
name: "setupAccountMethod",
|
|
29033
|
+
children: (childProps) => jsx(RadioCardSelect, {
|
|
29034
|
+
...childProps,
|
|
29035
|
+
name: "setupAccountMethod",
|
|
29036
|
+
options: setupAccountMethods,
|
|
29037
|
+
onSelect: selectSetupAccountMethod,
|
|
29038
|
+
selected: data.setupAccountMethod,
|
|
29039
|
+
optionId: (method) => method,
|
|
29040
|
+
optionName: (method) => methodsMetadata[method].name,
|
|
29041
|
+
optionDescription: (method) => methodsMetadata[method].description,
|
|
29042
|
+
className: "adyen-kyc-field-verification-methods",
|
|
29043
|
+
optionClassNames: () => ({
|
|
29044
|
+
icon: "adyen-kyc-radio-group-card__illustration",
|
|
29045
|
+
label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
|
|
29046
|
+
footer: "adyen-kyc-field-verification-methods__footer"
|
|
29047
|
+
}),
|
|
29048
|
+
renderOptionIcon: (method) => methodsMetadata[method].icon,
|
|
29049
|
+
renderOptionFooter: (method) => {
|
|
29050
|
+
var _a;
|
|
29051
|
+
return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
|
|
29052
|
+
}
|
|
29053
|
+
})
|
|
29054
|
+
})
|
|
29055
|
+
}), jsx(Button, {
|
|
29056
|
+
label: i18n.get("next"),
|
|
29057
|
+
block: true,
|
|
29058
|
+
disabled: !selectedMethod,
|
|
29059
|
+
onClick: () => handleNextClick(selectedMethod),
|
|
29060
|
+
type: "button",
|
|
29061
|
+
role: "button"
|
|
29062
|
+
})]
|
|
29063
|
+
})
|
|
29064
|
+
});
|
|
29065
|
+
};
|
|
28815
29066
|
const businessTypeMapping = {
|
|
28816
29067
|
myName: {
|
|
28817
29068
|
[LegalEntityType.INDIVIDUAL]: "individual"
|
|
@@ -32444,6 +32695,13 @@ function DropinComposerComponent({
|
|
|
32444
32695
|
} = useToastContext();
|
|
32445
32696
|
const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
|
|
32446
32697
|
const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
|
|
32698
|
+
const isSingpassExperimentEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
|
|
32699
|
+
const {
|
|
32700
|
+
hasSeenSingpassSelection,
|
|
32701
|
+
setHasSeenSingpassSelection
|
|
32702
|
+
} = useHasSeenSingpassSelection({
|
|
32703
|
+
legalEntityId: legalEntityResponse.id
|
|
32704
|
+
});
|
|
32447
32705
|
const [leId, setLeId] = useLeId();
|
|
32448
32706
|
const showIntroduction = useShouldShowIntroduction({
|
|
32449
32707
|
legalEntity: legalEntityResponse
|
|
@@ -32454,16 +32712,22 @@ function DropinComposerComponent({
|
|
|
32454
32712
|
legalEntityId: legalEntityResponse.id
|
|
32455
32713
|
});
|
|
32456
32714
|
const [tasks, setTasks] = useState([]);
|
|
32715
|
+
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32716
|
+
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32717
|
+
const isSoleProp = accountHolder2 === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
|
|
32718
|
+
const isSingpassEnabled = rootLegalEntityCountry === CountryCodes.Singapore && isSingpassExperimentEnabled && !hasSeenSingpassSelection;
|
|
32719
|
+
const shouldShowSingpass = isSingpassEnabled && (isSoleProp || legalEntityResponse.type === LegalEntityType.ORGANIZATION);
|
|
32457
32720
|
const initialTask = useMemo(() => {
|
|
32458
32721
|
if (isNewEntryFlowEnabled && (!accountHolder2 || legalEntityResponse.id !== leId)) {
|
|
32459
32722
|
return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
32460
32723
|
}
|
|
32461
32724
|
if (showIntroduction)
|
|
32462
32725
|
return TaskTypes.INTRODUCTION;
|
|
32726
|
+
if (isSingpassEnabled)
|
|
32727
|
+
return TaskTypes.SINGPASS_SELECTION;
|
|
32463
32728
|
return TaskTypes.TASKS_OVERVIEW;
|
|
32464
32729
|
}, [showIntroduction, isNewEntryFlowEnabled, accountHolder2, legalEntityResponse, leId]);
|
|
32465
32730
|
const [taskHistory, setTaskHistory] = useState([initialTask]);
|
|
32466
|
-
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32467
32731
|
const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
|
|
32468
32732
|
const {
|
|
32469
32733
|
associatedLegalArrangement,
|
|
@@ -32485,7 +32749,6 @@ function DropinComposerComponent({
|
|
|
32485
32749
|
const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
|
|
32486
32750
|
const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
|
|
32487
32751
|
const [transferInstrument, setTransferInstrument] = useState(null);
|
|
32488
|
-
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
|
|
32489
32752
|
const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
|
|
32490
32753
|
const [bankVerificationVendors, setBankVerificationVendors] = useState();
|
|
32491
32754
|
const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
|
|
@@ -32749,6 +33012,33 @@ function DropinComposerComponent({
|
|
|
32749
33012
|
});
|
|
32750
33013
|
}
|
|
32751
33014
|
};
|
|
33015
|
+
const handleSingpassSelectionNextClick = async (method) => {
|
|
33016
|
+
const {
|
|
33017
|
+
handleOpenSingpassAuthorizationLink
|
|
33018
|
+
} = args;
|
|
33019
|
+
if (method === "singpass" && handleOpenSingpassAuthorizationLink) {
|
|
33020
|
+
try {
|
|
33021
|
+
const {
|
|
33022
|
+
item: {
|
|
33023
|
+
authUrl
|
|
33024
|
+
}
|
|
33025
|
+
} = await handleOpenSingpassAuthorizationLink();
|
|
33026
|
+
setHasSeenSingpassSelection(true);
|
|
33027
|
+
window.open(authUrl, "_blank").focus();
|
|
33028
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33029
|
+
} catch (e) {
|
|
33030
|
+
logger$8.error(e);
|
|
33031
|
+
showToast({
|
|
33032
|
+
label: i18n.get("failToLaunchSingpass"),
|
|
33033
|
+
type: ToastType.ERROR
|
|
33034
|
+
});
|
|
33035
|
+
}
|
|
33036
|
+
}
|
|
33037
|
+
if (method === "manual") {
|
|
33038
|
+
setHasSeenSingpassSelection(true);
|
|
33039
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33040
|
+
}
|
|
33041
|
+
};
|
|
32752
33042
|
const onNavigateTo = (task) => {
|
|
32753
33043
|
setTaskHistory([...taskHistory, task]);
|
|
32754
33044
|
onNavigate(task);
|
|
@@ -33008,7 +33298,15 @@ function DropinComposerComponent({
|
|
|
33008
33298
|
setLeId(legalEntityResponse.id);
|
|
33009
33299
|
setAccountHolder(newAccountHolder);
|
|
33010
33300
|
await refreshLegalEntity();
|
|
33011
|
-
|
|
33301
|
+
if (showIntroduction) {
|
|
33302
|
+
onNavigateTo(TaskTypes.INTRODUCTION);
|
|
33303
|
+
return;
|
|
33304
|
+
}
|
|
33305
|
+
if (isSingpassEnabled && newAccountHolder === "theCompanyIWorkFor" || newAccountHolder === "mySoleProprietorName") {
|
|
33306
|
+
onNavigateTo(TaskTypes.SINGPASS_SELECTION);
|
|
33307
|
+
return;
|
|
33308
|
+
}
|
|
33309
|
+
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33012
33310
|
},
|
|
33013
33311
|
taskHistory,
|
|
33014
33312
|
setTaskHistory,
|
|
@@ -33019,11 +33317,19 @@ function DropinComposerComponent({
|
|
|
33019
33317
|
eventEmitter
|
|
33020
33318
|
})
|
|
33021
33319
|
});
|
|
33320
|
+
case TaskTypes.SINGPASS_SELECTION:
|
|
33321
|
+
return jsx(SingpassSelection, {
|
|
33322
|
+
handleNextClick: handleSingpassSelectionNextClick
|
|
33323
|
+
});
|
|
33022
33324
|
case TaskTypes.INTRODUCTION:
|
|
33023
33325
|
return jsx(Introduction, {
|
|
33024
33326
|
legalEntity: rootLegalEntity,
|
|
33025
33327
|
onExitIntroduction: () => {
|
|
33026
33328
|
setHasSeenIntroduction(true);
|
|
33329
|
+
if (shouldShowSingpass) {
|
|
33330
|
+
onNavigateTo(TaskTypes.SINGPASS_SELECTION);
|
|
33331
|
+
return;
|
|
33332
|
+
}
|
|
33027
33333
|
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
33028
33334
|
},
|
|
33029
33335
|
tasks
|
|
@@ -34564,7 +34870,7 @@ const ConfigurationApiProvider = ({
|
|
|
34564
34870
|
isEmbeddedDropin,
|
|
34565
34871
|
loadingContext
|
|
34566
34872
|
} = authContext;
|
|
34567
|
-
const sdkVersion = "2.
|
|
34873
|
+
const sdkVersion = "2.38.1";
|
|
34568
34874
|
useAnalytics({
|
|
34569
34875
|
onUserEvent,
|
|
34570
34876
|
legalEntityId: rootLegalEntityId,
|
package/dist/style.css
CHANGED
|
@@ -99763,6 +99763,53 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
|
|
|
99763
99763
|
/* #endregion */
|
|
99764
99764
|
/* #region Inline components */
|
|
99765
99765
|
/* #endregion */
|
|
99766
|
+
.adyen-kyc-singpass-selection {
|
|
99767
|
+
max-width: 544px;
|
|
99768
|
+
}
|
|
99769
|
+
.adyen-kyc-singpass-selection__nav {
|
|
99770
|
+
margin-top: 32px;
|
|
99771
|
+
}
|
|
99772
|
+
.adyen-kyc-singpass-selection__confirm {
|
|
99773
|
+
display: flex;
|
|
99774
|
+
gap: 16px;
|
|
99775
|
+
margin-top: 32px;
|
|
99776
|
+
}
|
|
99777
|
+
.adyen-kyc-singpass-selection__confirm button {
|
|
99778
|
+
flex-grow: 1;
|
|
99779
|
+
}
|
|
99780
|
+
|
|
99781
|
+
.adyen-kyc-setup-singpass-container {
|
|
99782
|
+
width: 143px;
|
|
99783
|
+
}
|
|
99784
|
+
|
|
99785
|
+
.adyen-kyc-setup-manual-container {
|
|
99786
|
+
width: 99px;
|
|
99787
|
+
}
|
|
99788
|
+
|
|
99789
|
+
.adyen-kyc-singpass-logo-container {
|
|
99790
|
+
width: 92px;
|
|
99791
|
+
}/* #region Spacing */
|
|
99792
|
+
/* #endregion */
|
|
99793
|
+
/* #region Colors */
|
|
99794
|
+
/* #endregion */
|
|
99795
|
+
/* #region Fonts */
|
|
99796
|
+
/* #endregion */
|
|
99797
|
+
/* #region Borders */
|
|
99798
|
+
/* #endregion */
|
|
99799
|
+
/* #region Box-shadow */
|
|
99800
|
+
/* #endregion */
|
|
99801
|
+
/* #region Shadows */
|
|
99802
|
+
/* #endregion */
|
|
99803
|
+
/* #region Z-index */
|
|
99804
|
+
/* #endregion */
|
|
99805
|
+
/* #region Transition */
|
|
99806
|
+
/* #endregion */
|
|
99807
|
+
/* #region Timing functions */
|
|
99808
|
+
/* #endregion */
|
|
99809
|
+
/* #region Focus ring */
|
|
99810
|
+
/* #endregion */
|
|
99811
|
+
/* #region Inline components */
|
|
99812
|
+
/* #endregion */
|
|
99766
99813
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
99767
99814
|
/* stylelint-disable-line scss/dollar-variable-pattern */
|
|
99768
99815
|
/* 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;
|
|
@@ -16,6 +16,13 @@ import { TranslationKey } from '../../language/types';
|
|
|
16
16
|
import EventEmitter from '../EventEmitter';
|
|
17
17
|
import { TaskTypes } from '../TaskList/types';
|
|
18
18
|
import type { BasicComponentProps } from '../UIElement';
|
|
19
|
+
interface SingpassLinkResponseItem {
|
|
20
|
+
authUrl: string;
|
|
21
|
+
success: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface SingpassLinkResponse {
|
|
24
|
+
item: SingpassLinkResponseItem;
|
|
25
|
+
}
|
|
19
26
|
export interface DropinComposerProps extends DropinAPIHandlers, BasicComponentProps {
|
|
20
27
|
capabilities?: CapabilityName[];
|
|
21
28
|
legalEntityResponse: ExistingLegalEntity;
|
|
@@ -58,6 +65,7 @@ export interface DropinAPIHandlers {
|
|
|
58
65
|
handleVerifyTin?(data: TinVerificationRequest): Promise<TinVerificationResponse>;
|
|
59
66
|
handleGetOnboardingStatus?(): Promise<OnboardingStatusResponse>;
|
|
60
67
|
handleGenerateOnboardingLink?(config: OnboardingLinkConfig): Promise<OnboardingLinkResponse>;
|
|
68
|
+
handleOpenSingpassAuthorizationLink?(): Promise<SingpassLinkResponse>;
|
|
61
69
|
}
|
|
62
70
|
export interface DropinProps {
|
|
63
71
|
legalEntityResponse?: ExistingLegalEntity;
|
|
@@ -73,3 +81,4 @@ export interface DropinProps {
|
|
|
73
81
|
taskType?: TaskTypes;
|
|
74
82
|
taskName?: TranslationKey;
|
|
75
83
|
}
|
|
84
|
+
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
|
+
}
|
|
@@ -28,7 +28,8 @@ export declare enum TaskTypes {
|
|
|
28
28
|
TRUST_MEMBER_COMPANY_OWNER = "TRUST_MEMBER_COMPANY_OWNER",
|
|
29
29
|
SOLE_PROPRIETOR_COMPANY = "SOLE_PROPRIETOR_COMPANY",
|
|
30
30
|
LEGAL_ENTITY_TYPE_SWITCHER = "LEGAL_ENTITY_TYPE_SWITCHER",
|
|
31
|
-
CAPABILITY_REJECTED = "CAPABILITY_REJECTED"
|
|
31
|
+
CAPABILITY_REJECTED = "CAPABILITY_REJECTED",
|
|
32
|
+
SINGPASS_SELECTION = "SINGPASS_SELECTION"
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* 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
|
};
|