@adyen/kyc-components 3.19.0 → 3.19.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 +395 -145
- package/dist/style.css +1428 -950
- package/dist/types/components/BusinessDetails/forms.d.ts +2 -1
- package/dist/types/components/CompanyOtherDetails/types.d.ts +2 -1
- package/dist/types/components/CompanyRegistrationDetails/types.d.ts +1 -0
- package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanyDropin/types.d.ts +0 -2
- package/dist/types/components/Individual/types.d.ts +3 -1
- package/dist/types/components/SingpassBanner/index.d.ts +2 -0
- package/dist/types/components/SingpassSelection/index.d.ts +1 -0
- package/dist/types/components/SingpassSelection/types.d.ts +4 -0
- package/dist/types/components/internal/StockISINField/types.d.ts +1 -1
- package/dist/types/components/internal/StockTickerSymbol/StockTickerSymbolField.d.ts +3 -0
- package/dist/types/components/internal/StockTickerSymbol/fieldConfig.d.ts +3 -0
- package/dist/types/components/internal/StockTickerSymbol/index.d.ts +1 -0
- package/dist/types/components/internal/StockTickerSymbol/types.d.ts +5 -0
- package/dist/types/core/Context/ExperimentContext/types.d.ts +1 -0
- package/dist/types/core/hooks/useCanSeeEntitySelection.d.ts +6 -0
- package/dist/types/utils/get-props.d.ts +17 -0
- package/dist/types/utils/mapping/componentApiMapping.d.ts +3 -0
- package/dist/types/utils/verification/helpers/verify-id-number-helper.d.ts +8 -3
- package/dist/types/utils/verification/verificationUtils.d.ts +14 -4
- package/package.json +1 -1
- package/dist/types/core/models/id-verification-status.d.ts +0 -7
|
@@ -856,7 +856,9 @@ const addresses = "Addresses";
|
|
|
856
856
|
const loading = "Loading";
|
|
857
857
|
const businessIncorporationNumber = "Business incorporation number";
|
|
858
858
|
const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
|
|
859
|
+
const retrieveMyInfo = "Retrieve Myinfo";
|
|
859
860
|
const retrieveMyInfoBusiness = "Retrieve Myinfo business";
|
|
861
|
+
const getYourVerifiedDetailsInstantly = "Get your verified details instantly and skip uploading documents.";
|
|
860
862
|
const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
|
|
861
863
|
const enterTheDetailsYourself = "Enter the details yourself";
|
|
862
864
|
const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
|
|
@@ -937,6 +939,7 @@ const taxInformationNumber = "Tax Identification Number";
|
|
|
937
939
|
const taxInformationNumber__HK = "Business Registration number (BRN)";
|
|
938
940
|
const stockExchangeMIC = "Market Identifier Code (MIC)";
|
|
939
941
|
const stockISIN = "International Securities Identification Number (ISIN)";
|
|
942
|
+
const stockTickerSymbol = "Stock ticker symbol";
|
|
940
943
|
const companyLookupResultsHeader = "Let's find your company";
|
|
941
944
|
const companyLookupResultsHeader__searching = "Searching for companies...";
|
|
942
945
|
const companyLookupResultsHeader__verifying = "Verifying company selection...";
|
|
@@ -1324,8 +1327,9 @@ const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, pleas
|
|
|
1324
1327
|
const forExample_ = "For example: %{examples}";
|
|
1325
1328
|
const failToLaunchSingpass = "failed to launch Singpass";
|
|
1326
1329
|
const retrieveMyinfoBusinessWith = "Retrieve Myinfo business with";
|
|
1330
|
+
const retrieveMyinfoWith = "Retrieve Myinfo with";
|
|
1327
1331
|
const getSetUpInstantly = "Get set up instantly";
|
|
1328
|
-
const
|
|
1332
|
+
const myInfoBusinessYouCanGetVerifiedDetails = "With Myinfo business, you can get your business's verified details instantly and skip uploading documents.";
|
|
1329
1333
|
const addBankDetails = "Add bank details";
|
|
1330
1334
|
const addMissingBankDetails = "We are missing your bank details in order to perform payouts, please add your bank account.";
|
|
1331
1335
|
const bankDetails = "Bank details";
|
|
@@ -1339,6 +1343,7 @@ const missingDetailsToPerformPayouts = "We are missing some details in order to
|
|
|
1339
1343
|
const completeAddingAccount = "Complete adding account";
|
|
1340
1344
|
const removeThisBankAccount = "Remove this bank account";
|
|
1341
1345
|
const editDetails = "Edit details";
|
|
1346
|
+
const myInfoYouCanGetVerifiedDetails = "With Myinfo, you can get your verified details instantly and skip uploading documents.";
|
|
1342
1347
|
const sessionTimeout = "Session timeout";
|
|
1343
1348
|
const thisSessionWillExpireIn = "This session will expire in %{timeUntilExpiry}. Continue working to avoid losing any unsaved data.";
|
|
1344
1349
|
const xMinutes = "%{minutes} minutes";
|
|
@@ -2183,7 +2188,9 @@ const defaultTrans = {
|
|
|
2183
2188
|
loading,
|
|
2184
2189
|
businessIncorporationNumber,
|
|
2185
2190
|
doNotHaveBusinessIncorporationNumber,
|
|
2191
|
+
retrieveMyInfo,
|
|
2186
2192
|
retrieveMyInfoBusiness,
|
|
2193
|
+
getYourVerifiedDetailsInstantly,
|
|
2187
2194
|
getYourBusinessVerifiedDetails,
|
|
2188
2195
|
enterTheDetailsYourself,
|
|
2189
2196
|
youAlsoHaveToUploadSomeSupportingDocuments,
|
|
@@ -2264,6 +2271,7 @@ const defaultTrans = {
|
|
|
2264
2271
|
taxInformationNumber__HK,
|
|
2265
2272
|
stockExchangeMIC,
|
|
2266
2273
|
stockISIN,
|
|
2274
|
+
stockTickerSymbol,
|
|
2267
2275
|
companyLookupResultsHeader,
|
|
2268
2276
|
companyLookupResultsHeader__searching,
|
|
2269
2277
|
companyLookupResultsHeader__verifying,
|
|
@@ -2651,8 +2659,9 @@ const defaultTrans = {
|
|
|
2651
2659
|
forExample_,
|
|
2652
2660
|
failToLaunchSingpass,
|
|
2653
2661
|
retrieveMyinfoBusinessWith,
|
|
2662
|
+
retrieveMyinfoWith,
|
|
2654
2663
|
getSetUpInstantly,
|
|
2655
|
-
|
|
2664
|
+
myInfoBusinessYouCanGetVerifiedDetails,
|
|
2656
2665
|
addBankDetails,
|
|
2657
2666
|
addMissingBankDetails,
|
|
2658
2667
|
bankDetails,
|
|
@@ -2666,6 +2675,7 @@ const defaultTrans = {
|
|
|
2666
2675
|
completeAddingAccount,
|
|
2667
2676
|
removeThisBankAccount,
|
|
2668
2677
|
editDetails,
|
|
2678
|
+
myInfoYouCanGetVerifiedDetails,
|
|
2669
2679
|
sessionTimeout,
|
|
2670
2680
|
thisSessionWillExpireIn,
|
|
2671
2681
|
xMinutes,
|
|
@@ -3538,6 +3548,49 @@ function getFormProps(props, innerFormId) {
|
|
|
3538
3548
|
shouldValidate: (activeFormId ? activeFormId === innerFormId : true) && props.shouldValidate
|
|
3539
3549
|
};
|
|
3540
3550
|
}
|
|
3551
|
+
function removeFormLayer(obj, formId) {
|
|
3552
|
+
if (!obj) {
|
|
3553
|
+
return obj;
|
|
3554
|
+
}
|
|
3555
|
+
const formIdWithDelimiter = `${formId}.`;
|
|
3556
|
+
return Object.entries(obj).reduce((acc, [key, value]) => {
|
|
3557
|
+
const newKey = key.startsWith(formIdWithDelimiter) ? key.substring(formIdWithDelimiter.length, key.length) : key;
|
|
3558
|
+
return {
|
|
3559
|
+
...acc,
|
|
3560
|
+
[newKey]: value
|
|
3561
|
+
};
|
|
3562
|
+
}, {});
|
|
3563
|
+
}
|
|
3564
|
+
function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
3565
|
+
const newProps = getFormProps(props, innerFormId);
|
|
3566
|
+
if (newProps === null) {
|
|
3567
|
+
return null;
|
|
3568
|
+
}
|
|
3569
|
+
const {
|
|
3570
|
+
placeholders,
|
|
3571
|
+
labels: labels2,
|
|
3572
|
+
data,
|
|
3573
|
+
helperText,
|
|
3574
|
+
masks
|
|
3575
|
+
} = newProps;
|
|
3576
|
+
return {
|
|
3577
|
+
placeholders,
|
|
3578
|
+
labels: labels2,
|
|
3579
|
+
data,
|
|
3580
|
+
helperText,
|
|
3581
|
+
masks,
|
|
3582
|
+
// maintain the structure of the special fields
|
|
3583
|
+
readOnlyFields: removeFormLayer(props.readOnlyFields, innerFormId),
|
|
3584
|
+
requiredFields: removeFormLayer(props.requiredFields, innerFormId),
|
|
3585
|
+
optionalFields: removeFormLayer(props.optionalFields, innerFormId),
|
|
3586
|
+
obscuredFields: removeFormLayer(props.obscuredFields, innerFormId),
|
|
3587
|
+
verifyFields: removeFormLayer(props.verifyFields, innerFormId),
|
|
3588
|
+
// the rest we just pass along for now, as they will be eventually be processed by getFormProps
|
|
3589
|
+
problems: props.problems,
|
|
3590
|
+
validators: props.validators,
|
|
3591
|
+
shouldValidate: props.shouldValidate
|
|
3592
|
+
};
|
|
3593
|
+
}
|
|
3541
3594
|
function getFieldProps(props, innerFormFields) {
|
|
3542
3595
|
if (innerFormFields) {
|
|
3543
3596
|
const nestedFormProps = {
|
|
@@ -7823,20 +7876,21 @@ const Accordion = ({
|
|
|
7823
7876
|
};
|
|
7824
7877
|
return jsxs("details", {
|
|
7825
7878
|
onToggle: handleToggle,
|
|
7826
|
-
className,
|
|
7879
|
+
className: cx(className, "adyen-kyc-accordion__details"),
|
|
7827
7880
|
children: [jsxs("summary", {
|
|
7881
|
+
className: "adyen-kyc-accordion__summary",
|
|
7828
7882
|
role: "button",
|
|
7829
7883
|
children: [expandOnLeft && jsx("img", {
|
|
7830
|
-
className: "
|
|
7884
|
+
className: "adyen-kyc-accordion__arrow",
|
|
7831
7885
|
src: ChevronDownIcon,
|
|
7832
7886
|
alt: ""
|
|
7833
7887
|
}), icon, title, !expandOnLeft && jsx("img", {
|
|
7834
|
-
className: "
|
|
7888
|
+
className: "adyen-kyc-accordion__arrow adyen-kyc-accordion__arrow--right",
|
|
7835
7889
|
src: ChevronDownIcon,
|
|
7836
7890
|
alt: ""
|
|
7837
7891
|
})]
|
|
7838
7892
|
}), jsx("section", {
|
|
7839
|
-
className: "
|
|
7893
|
+
className: "adyen-kyc-accordion__content",
|
|
7840
7894
|
children
|
|
7841
7895
|
})]
|
|
7842
7896
|
});
|
|
@@ -8001,6 +8055,54 @@ const stockISINFieldMetadata = {
|
|
|
8001
8055
|
}
|
|
8002
8056
|
}
|
|
8003
8057
|
};
|
|
8058
|
+
const STOCK_TICKER_SYMBOL_FIELD = ["stockTickerSymbol"];
|
|
8059
|
+
function StockTickerSymbolField({
|
|
8060
|
+
data,
|
|
8061
|
+
valid,
|
|
8062
|
+
errors,
|
|
8063
|
+
labels: labels2,
|
|
8064
|
+
placeholders,
|
|
8065
|
+
readonly,
|
|
8066
|
+
mask,
|
|
8067
|
+
guidanceText,
|
|
8068
|
+
handleChangeFor
|
|
8069
|
+
}) {
|
|
8070
|
+
return jsx(MaskedInputText, {
|
|
8071
|
+
name: "stockTickerSymbol",
|
|
8072
|
+
label: labels2.stockTickerSymbol ?? "",
|
|
8073
|
+
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockTickerSymbol,
|
|
8074
|
+
placeholder: placeholders == null ? void 0 : placeholders.stockTickerSymbol,
|
|
8075
|
+
...mask,
|
|
8076
|
+
classNameModifiers: {
|
|
8077
|
+
field: ["stockTickerSymbol"],
|
|
8078
|
+
input: ["stockTickerSymbol"]
|
|
8079
|
+
},
|
|
8080
|
+
errorMessage: errors.stockTickerSymbol,
|
|
8081
|
+
isValid: valid.stockTickerSymbol ?? false,
|
|
8082
|
+
value: data.stockTickerSymbol ?? "",
|
|
8083
|
+
readonly,
|
|
8084
|
+
onInput: handleChangeFor("stockTickerSymbol", "input"),
|
|
8085
|
+
onBlur: handleChangeFor("stockTickerSymbol", "blur"),
|
|
8086
|
+
"aria-required": true,
|
|
8087
|
+
"aria-label": labels2.stockTickerSymbol,
|
|
8088
|
+
"aria-invalid": !valid.stockTickerSymbol
|
|
8089
|
+
});
|
|
8090
|
+
}
|
|
8091
|
+
const stockTickerSymbolFieldMetadata = {
|
|
8092
|
+
label: "stockTickerSymbol",
|
|
8093
|
+
validators: [validatePatternOnBlur(/^[A-Z\d]{1,5}$/)],
|
|
8094
|
+
mask: {
|
|
8095
|
+
mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(4)),
|
|
8096
|
+
transformOnType: uppercase
|
|
8097
|
+
},
|
|
8098
|
+
guidanceText: {
|
|
8099
|
+
key: "enterAMaximumOfNCharactersForExample",
|
|
8100
|
+
values: {
|
|
8101
|
+
maxChars: "5",
|
|
8102
|
+
example: "ADYEN"
|
|
8103
|
+
}
|
|
8104
|
+
}
|
|
8105
|
+
};
|
|
8004
8106
|
const defaultFieldMetadata$7 = {
|
|
8005
8107
|
label: "taxId"
|
|
8006
8108
|
};
|
|
@@ -9103,6 +9205,7 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
|
|
|
9103
9205
|
ExperimentNames2["AllowMoreRolesForMainRootTrustee"] = "AllowMoreRolesForMainRootTrustee";
|
|
9104
9206
|
ExperimentNames2["ShowUnsupportedEntityType"] = "ShowUnsupportedEntityType";
|
|
9105
9207
|
ExperimentNames2["ShowSingPassButtonForCompanies"] = "ShowSingPassButtonForCompanies";
|
|
9208
|
+
ExperimentNames2["ShowSingPassButtonForIndividuals"] = "ShowSingPassButtonForIndividuals";
|
|
9106
9209
|
ExperimentNames2["ShowExtraTaxExemptionReasons"] = "ShowExtraTaxExemptionReasons";
|
|
9107
9210
|
ExperimentNames2["EnableCountryOfGoverningLawForUKCompanies"] = "EnableCountryOfGoverningLawForUKCompanies";
|
|
9108
9211
|
ExperimentNames2["HidePayoutAccountTask"] = "HidePayoutAccountTask";
|
|
@@ -9299,7 +9402,7 @@ const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [{
|
|
|
9299
9402
|
companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP],
|
|
9300
9403
|
country: CountryCodes.PuertoRico
|
|
9301
9404
|
}];
|
|
9302
|
-
const companyRegistrationDetailsFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", ...vatNumberFields, ...taxIdFields, "dateOfIncorporation"];
|
|
9405
|
+
const companyRegistrationDetailsFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", "stockTickerSymbol", ...vatNumberFields, ...taxIdFields, "dateOfIncorporation"];
|
|
9303
9406
|
function CompanyRegistrationDetailsComponent(props) {
|
|
9304
9407
|
var _a, _b;
|
|
9305
9408
|
const {
|
|
@@ -9308,13 +9411,14 @@ function CompanyRegistrationDetailsComponent(props) {
|
|
|
9308
9411
|
let mergedProps = props;
|
|
9309
9412
|
mergedProps = mergeFieldMetadataIntoProps("stockExchangeMIC", stockExchangeMICFieldMetadata, mergedProps);
|
|
9310
9413
|
mergedProps = mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, mergedProps);
|
|
9414
|
+
mergedProps = mergeFieldMetadataIntoProps("stockTickerSymbol", stockTickerSymbolFieldMetadata, mergedProps);
|
|
9311
9415
|
const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country === mergedProps.country && f.companyType.includes(mergedProps.companyType));
|
|
9312
9416
|
const stateRef = useRef({
|
|
9313
9417
|
setState: null
|
|
9314
9418
|
});
|
|
9315
9419
|
const COMPANY_REGISTRATION_DETAILS = mergedProps.id;
|
|
9316
9420
|
const requiredFields = mergedProps.requiredFields || companyRegistrationDetailsFields;
|
|
9317
|
-
const directChildFields = requiredFields.filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "dateOfIncorporation"].includes(field));
|
|
9421
|
+
const directChildFields = requiredFields.filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "stockTickerSymbol", "dateOfIncorporation"].includes(field));
|
|
9318
9422
|
const {
|
|
9319
9423
|
getData
|
|
9320
9424
|
} = useStateContext();
|
|
@@ -9484,6 +9588,16 @@ function CompanyRegistrationDetailsComponent(props) {
|
|
|
9484
9588
|
guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
|
|
9485
9589
|
readonly: formUtils.isReadOnly("stockISIN"),
|
|
9486
9590
|
handleChangeFor
|
|
9591
|
+
}), formUtils.isRequiredField("stockTickerSymbol") && jsx(StockTickerSymbolField, {
|
|
9592
|
+
data: formUtils.getFieldData(data, STOCK_TICKER_SYMBOL_FIELD),
|
|
9593
|
+
valid: formUtils.getFieldValid(valid, STOCK_TICKER_SYMBOL_FIELD),
|
|
9594
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, STOCK_TICKER_SYMBOL_FIELD),
|
|
9595
|
+
labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
|
|
9596
|
+
placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
|
|
9597
|
+
mask: formUtils.getMask("stockTickerSymbol"),
|
|
9598
|
+
guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
|
|
9599
|
+
readonly: formUtils.isReadOnly("stockTickerSymbol"),
|
|
9600
|
+
handleChangeFor
|
|
9487
9601
|
}), formUtils.isRequiredField("registrationNumber", !hideOptionalRegistrationNumberField) && jsx(BusinessRegistrationNumber, {
|
|
9488
9602
|
...registrationNumberProps,
|
|
9489
9603
|
companyType: mergedProps.companyType,
|
|
@@ -9553,10 +9667,13 @@ const companyBase = {
|
|
|
9553
9667
|
rule: "REQUIRED"
|
|
9554
9668
|
},
|
|
9555
9669
|
stockExchangeMIC: {
|
|
9556
|
-
rule: "
|
|
9670
|
+
rule: "ifPubliclyTradedCompany"
|
|
9557
9671
|
},
|
|
9558
9672
|
stockISIN: {
|
|
9559
|
-
rule: "
|
|
9673
|
+
rule: "ifPubliclyTradedCompany"
|
|
9674
|
+
},
|
|
9675
|
+
stockTickerSymbol: {
|
|
9676
|
+
rule: "ifPubliclyTradedCompany"
|
|
9560
9677
|
},
|
|
9561
9678
|
tradingName: {
|
|
9562
9679
|
rule: "REQUIRED"
|
|
@@ -9606,10 +9723,13 @@ const companySearchBase = {
|
|
|
9606
9723
|
rule: "countryRequiresStateOrProvince"
|
|
9607
9724
|
},
|
|
9608
9725
|
stockExchangeMIC: {
|
|
9609
|
-
rule: "
|
|
9726
|
+
rule: "ifPubliclyTradedCompany"
|
|
9610
9727
|
},
|
|
9611
9728
|
stockISIN: {
|
|
9612
|
-
rule: "
|
|
9729
|
+
rule: "ifPubliclyTradedCompany"
|
|
9730
|
+
},
|
|
9731
|
+
stockTickerSymbol: {
|
|
9732
|
+
rule: "ifPubliclyTradedCompany"
|
|
9613
9733
|
},
|
|
9614
9734
|
dateOfIncorporation: {
|
|
9615
9735
|
rule: "countryRequiresDateOfIncorporationForCompanies"
|
|
@@ -9653,10 +9773,13 @@ const businessDetailsBase = {
|
|
|
9653
9773
|
rule: "countryRequiresStateOrProvince"
|
|
9654
9774
|
},
|
|
9655
9775
|
stockExchangeMIC: {
|
|
9656
|
-
rule: "
|
|
9776
|
+
rule: "ifPubliclyTradedCompany"
|
|
9657
9777
|
},
|
|
9658
9778
|
stockISIN: {
|
|
9659
|
-
rule: "
|
|
9779
|
+
rule: "ifPubliclyTradedCompany"
|
|
9780
|
+
},
|
|
9781
|
+
stockTickerSymbol: {
|
|
9782
|
+
rule: "ifPubliclyTradedCompany"
|
|
9660
9783
|
},
|
|
9661
9784
|
dateOfIncorporation: {
|
|
9662
9785
|
rule: "countryRequiresDateOfIncorporationForCompanies"
|
|
@@ -10250,12 +10373,6 @@ const EntityTypeSelectionRadioCardBody = ({
|
|
|
10250
10373
|
})]
|
|
10251
10374
|
});
|
|
10252
10375
|
};
|
|
10253
|
-
const CoreContext = createContext(void 0);
|
|
10254
|
-
const useCoreContext = () => {
|
|
10255
|
-
const context = useContext(CoreContext);
|
|
10256
|
-
if (!context) throw Error("You need a <CoreProvider> to use core context");
|
|
10257
|
-
return context;
|
|
10258
|
-
};
|
|
10259
10376
|
var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
|
|
10260
10377
|
TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
|
|
10261
10378
|
TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
|
|
@@ -10681,9 +10798,6 @@ function AccountHolder(props) {
|
|
|
10681
10798
|
dataStoreId,
|
|
10682
10799
|
capabilities
|
|
10683
10800
|
} = props;
|
|
10684
|
-
const {
|
|
10685
|
-
setAccountHolder
|
|
10686
|
-
} = useCoreContext();
|
|
10687
10801
|
const {
|
|
10688
10802
|
isSettingEnabled
|
|
10689
10803
|
} = useSettingsContext();
|
|
@@ -10732,9 +10846,6 @@ function AccountHolder(props) {
|
|
|
10732
10846
|
dataStoreId
|
|
10733
10847
|
}
|
|
10734
10848
|
});
|
|
10735
|
-
if (data == null ? void 0 : data.accountHolder) {
|
|
10736
|
-
setAccountHolder(data.accountHolder);
|
|
10737
|
-
}
|
|
10738
10849
|
}, [data, errors, valid, dataStoreId]);
|
|
10739
10850
|
const formUtils = formUtilities(props, i18n);
|
|
10740
10851
|
const questionLabel = i18n.get("nameOfBankAccountHolder");
|
|
@@ -12359,6 +12470,7 @@ function Address(props) {
|
|
|
12359
12470
|
maxlength: getMaxLengthByFieldAndCountry(countrySpecificFormatters, fieldName, data.country),
|
|
12360
12471
|
hideField,
|
|
12361
12472
|
"aria-label": formUtils.getLabel(fieldName, fieldName),
|
|
12473
|
+
readOnly: formUtils.isReadOnly(fieldName),
|
|
12362
12474
|
trimOnBlur: true
|
|
12363
12475
|
}, fieldName);
|
|
12364
12476
|
};
|
|
@@ -12486,16 +12598,22 @@ function RegistrationAddressComponent(props) {
|
|
|
12486
12598
|
} = useI18nContext();
|
|
12487
12599
|
const {
|
|
12488
12600
|
id: id2,
|
|
12489
|
-
data,
|
|
12490
|
-
country: country2,
|
|
12491
|
-
validators,
|
|
12492
12601
|
heading,
|
|
12493
12602
|
description: description2,
|
|
12494
12603
|
handleAddressSearch,
|
|
12495
12604
|
handleFindAddress,
|
|
12496
|
-
|
|
12605
|
+
country: country2,
|
|
12606
|
+
data,
|
|
12607
|
+
validators,
|
|
12497
12608
|
kompanyAddress
|
|
12498
12609
|
} = props;
|
|
12610
|
+
const {
|
|
12611
|
+
requiredFields: registrationAddressRequiredFields,
|
|
12612
|
+
optionalFields: registrationAddressOptionalFields,
|
|
12613
|
+
readOnlyFields: registrationAddressReadOnlyFields,
|
|
12614
|
+
obscuredFields: registrationAddressObscuredFields,
|
|
12615
|
+
verifyFields: registrationAddressVerifyFields
|
|
12616
|
+
} = getFormProps(props, props.id);
|
|
12499
12617
|
const {
|
|
12500
12618
|
data: formData,
|
|
12501
12619
|
valid: formValid,
|
|
@@ -12508,9 +12626,17 @@ function RegistrationAddressComponent(props) {
|
|
|
12508
12626
|
defaultData: data,
|
|
12509
12627
|
rules: validators || registrationAddressValidationRules,
|
|
12510
12628
|
obscuredFields: [],
|
|
12511
|
-
optionalFields
|
|
12629
|
+
optionalFields: registrationAddressOptionalFields
|
|
12512
12630
|
});
|
|
12513
|
-
const
|
|
12631
|
+
const mergedProps = {
|
|
12632
|
+
...props,
|
|
12633
|
+
requiredFields: registrationAddressRequiredFields,
|
|
12634
|
+
optionalFields: registrationAddressOptionalFields,
|
|
12635
|
+
readOnlyFields: registrationAddressReadOnlyFields,
|
|
12636
|
+
obscuredFields: registrationAddressObscuredFields,
|
|
12637
|
+
verifyFields: registrationAddressVerifyFields
|
|
12638
|
+
};
|
|
12639
|
+
const formUtils = formUtilities(mergedProps, i18n);
|
|
12514
12640
|
const stateRef = useRef({
|
|
12515
12641
|
setState: null
|
|
12516
12642
|
});
|
|
@@ -12540,8 +12666,8 @@ function RegistrationAddressComponent(props) {
|
|
|
12540
12666
|
heading,
|
|
12541
12667
|
description: description2
|
|
12542
12668
|
}), jsx(ErrorPanel, {
|
|
12543
|
-
verificationErrors: id2 ? (_b = (_a = props
|
|
12544
|
-
validationErrors: id2 ? (_d = (_c = props
|
|
12669
|
+
verificationErrors: id2 ? (_b = (_a = props.problems) == null ? void 0 : _a.verificationErrors) == null ? void 0 : _b[id2] : void 0,
|
|
12670
|
+
validationErrors: id2 ? (_d = (_c = props.problems) == null ? void 0 : _c.validationErrors) == null ? void 0 : _d[id2] : void 0,
|
|
12545
12671
|
formUtils,
|
|
12546
12672
|
id: "ariaErrorField"
|
|
12547
12673
|
}), jsx(ContextGuidance, {
|
|
@@ -12916,7 +13042,7 @@ function CompanyComponent(props) {
|
|
|
12916
13042
|
const companyNameAndCountryFormProps = getFormProps(props, CompanyNameAndCountryFormID);
|
|
12917
13043
|
const companyTypeFormProps = getFormProps(props, CompanyTypeFormID);
|
|
12918
13044
|
const companyRegistrationDetailsFormProps = getFormProps(props, CompanyRegistrationDetailsFormID);
|
|
12919
|
-
const companyRegistrationAddressFormProps =
|
|
13045
|
+
const companyRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, CompanyRegistrationAddressFormID);
|
|
12920
13046
|
const companyRegistrationDocumentFormProps = getFormProps(props, CompanyRegistrationDocumentFormID);
|
|
12921
13047
|
const companyTaxDocumentFormProps = getFormProps(props, CompanyTaxDocumentFormID);
|
|
12922
13048
|
const handleStateChange = ({
|
|
@@ -13220,16 +13346,7 @@ const rules$2 = ({
|
|
|
13220
13346
|
return "REQUIRED";
|
|
13221
13347
|
}
|
|
13222
13348
|
},
|
|
13223
|
-
|
|
13224
|
-
var _a, _b;
|
|
13225
|
-
if ("companyType" in data && ((_a = data.companyType) == null ? void 0 : _a.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
|
|
13226
|
-
return "REQUIRED";
|
|
13227
|
-
}
|
|
13228
|
-
if ("companyStructure" in data && ((_b = data.companyStructure) == null ? void 0 : _b.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
|
|
13229
|
-
return "REQUIRED";
|
|
13230
|
-
}
|
|
13231
|
-
},
|
|
13232
|
-
stockISINIfTypePublic: () => {
|
|
13349
|
+
ifPubliclyTradedCompany: () => {
|
|
13233
13350
|
var _a, _b;
|
|
13234
13351
|
if ("companyType" in data && ((_a = data.companyType) == null ? void 0 : _a.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
|
|
13235
13352
|
return "REQUIRED";
|
|
@@ -13556,6 +13673,7 @@ const businessDetailsBaseMapping = {
|
|
|
13556
13673
|
"additionalInformation.isUen": "organization.isUen",
|
|
13557
13674
|
"additionalInformation.stockExchangeMIC": "organization.stockData.marketIdentifier",
|
|
13558
13675
|
"additionalInformation.stockISIN": "organization.stockData.stockNumber",
|
|
13676
|
+
"additionalInformation.stockTickerSymbol": "organization.stockData.tickerSymbol",
|
|
13559
13677
|
"companyRegistrationAddress.registrationAddress.city": "organization.registeredAddress.city",
|
|
13560
13678
|
"companyRegistrationAddress.registrationAddress.country": "organization.registeredAddress.country",
|
|
13561
13679
|
"companyRegistrationAddress.registrationAddress.postalCode": "organization.registeredAddress.postalCode",
|
|
@@ -13582,6 +13700,7 @@ const companyBaseMapping = {
|
|
|
13582
13700
|
"companyRegistrationDetails.isUen": "organization.isUen",
|
|
13583
13701
|
"companyRegistrationDetails.stockExchangeMIC": "organization.stockData.marketIdentifier",
|
|
13584
13702
|
"companyRegistrationDetails.stockISIN": "organization.stockData.stockNumber",
|
|
13703
|
+
"companyRegistrationDetails.stockTickerSymbol": "organization.stockData.tickerSymbol",
|
|
13585
13704
|
"companyRegistrationAddress.registrationAddress.city": "organization.registeredAddress.city",
|
|
13586
13705
|
"companyRegistrationAddress.registrationAddress.country": "organization.registeredAddress.country",
|
|
13587
13706
|
"companyRegistrationAddress.registrationAddress.postalCode": "organization.registeredAddress.postalCode",
|
|
@@ -13621,7 +13740,8 @@ const companySearchBaseMapping = {
|
|
|
13621
13740
|
"companyOtherDetails.dateOfIncorporation": "organization.dateOfIncorporation",
|
|
13622
13741
|
"companyOtherDetails.isUen": "organization.isUen",
|
|
13623
13742
|
"companyOtherDetails.stockExchangeMIC": "organization.stockData.marketIdentifier",
|
|
13624
|
-
"companyOtherDetails.stockISIN": "organization.stockData.stockNumber"
|
|
13743
|
+
"companyOtherDetails.stockISIN": "organization.stockData.stockNumber",
|
|
13744
|
+
"companyOtherDetails.stockTickerSymbol": "organization.stockData.tickerSymbol"
|
|
13625
13745
|
};
|
|
13626
13746
|
const trustBaseMapping = {
|
|
13627
13747
|
"trustRegistrationDetails.trustType": "trust.type",
|
|
@@ -15107,54 +15227,83 @@ function IdVerificationMethodComponent(props) {
|
|
|
15107
15227
|
})]
|
|
15108
15228
|
});
|
|
15109
15229
|
}
|
|
15110
|
-
const
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
fieldName: FIELD,
|
|
15117
|
-
translationKey: "unableToVerifyTheIdNumber"
|
|
15118
|
-
};
|
|
15119
|
-
}
|
|
15120
|
-
if ((idRtnData == null ? void 0 : idRtnData.status) === 500) {
|
|
15121
|
-
return {
|
|
15122
|
-
status: "verified",
|
|
15123
|
-
data: idRtnData,
|
|
15124
|
-
fieldName: FIELD
|
|
15125
|
-
};
|
|
15126
|
-
}
|
|
15127
|
-
if ((idRtnData == null ? void 0 : idRtnData.verified) === "true") {
|
|
15128
|
-
return {
|
|
15129
|
-
status: "verified",
|
|
15130
|
-
data: idRtnData,
|
|
15131
|
-
fieldName: FIELD
|
|
15132
|
-
};
|
|
15230
|
+
const COUNTRY_ID_NUMBER_MASKS = {
|
|
15231
|
+
[CountryCodes.PuertoRico]: {
|
|
15232
|
+
length: 4
|
|
15233
|
+
},
|
|
15234
|
+
[CountryCodes.UnitedStates]: {
|
|
15235
|
+
length: 4
|
|
15133
15236
|
}
|
|
15134
15237
|
};
|
|
15238
|
+
const FIELD = "idNumber";
|
|
15239
|
+
const handleVerifyIdNumber = async (formData, country2, verifyFn) => {
|
|
15240
|
+
var _a, _b;
|
|
15241
|
+
const verified2 = {
|
|
15242
|
+
field: "idNumber",
|
|
15243
|
+
isVerified: true
|
|
15244
|
+
};
|
|
15245
|
+
if (formData.idNumberExempt) return verified2;
|
|
15246
|
+
const isCountryWithMaskedIdNumber = Object.keys(COUNTRY_ID_NUMBER_MASKS).includes(country2);
|
|
15247
|
+
const isValueMasked = ((_a = formData.idNumber) == null ? void 0 : _a.length) === ((_b = COUNTRY_ID_NUMBER_MASKS[country2]) == null ? void 0 : _b.length);
|
|
15248
|
+
if (isCountryWithMaskedIdNumber && isValueMasked) return verified2;
|
|
15249
|
+
const response = await verifyFn({
|
|
15250
|
+
name: {
|
|
15251
|
+
firstName: formData.firstName || "",
|
|
15252
|
+
lastName: formData.lastName || ""
|
|
15253
|
+
},
|
|
15254
|
+
countryCode: country2,
|
|
15255
|
+
idNumber: formData.idNumber || ""
|
|
15256
|
+
});
|
|
15257
|
+
const isNotVerified = (response == null ? void 0 : response.status) === 422 || (response == null ? void 0 : response.verified) === "false";
|
|
15258
|
+
if (isNotVerified) return {
|
|
15259
|
+
field: FIELD,
|
|
15260
|
+
isVerified: false,
|
|
15261
|
+
messageKey: "unableToVerifyTheIdNumber"
|
|
15262
|
+
};
|
|
15263
|
+
return {
|
|
15264
|
+
field: FIELD,
|
|
15265
|
+
isVerified: true
|
|
15266
|
+
};
|
|
15267
|
+
};
|
|
15268
|
+
const FIELDS_WITH_EXTERNAL_VERIFICATION = ["idNumber"];
|
|
15135
15269
|
function useVerification(fieldsToVerify, country2) {
|
|
15136
15270
|
const {
|
|
15137
15271
|
verifyIdNumber: verifyIdNumber2
|
|
15138
15272
|
} = useConfigurationApi();
|
|
15139
15273
|
const hasFieldsToVerify = !!(fieldsToVerify == null ? void 0 : fieldsToVerify.length);
|
|
15140
15274
|
const verifyFields = useCallback(async (formState, savedData) => {
|
|
15141
|
-
const
|
|
15142
|
-
|
|
15143
|
-
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15275
|
+
const isVerifications = fieldsToVerify.some((field) => FIELDS_WITH_EXTERNAL_VERIFICATION.includes(field));
|
|
15276
|
+
if (!isVerifications) return [];
|
|
15277
|
+
const verifications = fieldsToVerify.filter((f) => {
|
|
15278
|
+
const field = f;
|
|
15279
|
+
const isValue = formState.data[field];
|
|
15280
|
+
if (!isValue) return false;
|
|
15281
|
+
const isDirty = isValue && formState.data[field] !== savedData[field];
|
|
15282
|
+
if (!isDirty) return false;
|
|
15283
|
+
if (typeof field !== "string") return false;
|
|
15284
|
+
const hasVerification = FIELDS_WITH_EXTERNAL_VERIFICATION.includes(field);
|
|
15285
|
+
if (hasVerification) return true;
|
|
15286
|
+
return false;
|
|
15287
|
+
}).map(async (field) => {
|
|
15288
|
+
switch (field) {
|
|
15289
|
+
case "idNumber":
|
|
15290
|
+
return handleVerifyIdNumber(
|
|
15291
|
+
// made this hook more agnostic in general
|
|
15292
|
+
// and removed the ts-strict-ignore
|
|
15293
|
+
//
|
|
15294
|
+
// need to coerce the schema here to make the check happy
|
|
15295
|
+
formState.data,
|
|
15296
|
+
country2,
|
|
15297
|
+
verifyIdNumber2
|
|
15298
|
+
);
|
|
15299
|
+
default:
|
|
15300
|
+
return {
|
|
15301
|
+
field,
|
|
15302
|
+
isVerified: true
|
|
15303
|
+
};
|
|
15155
15304
|
}
|
|
15156
15305
|
});
|
|
15157
|
-
return Promise.all(
|
|
15306
|
+
return Promise.all(verifications);
|
|
15158
15307
|
}, [fieldsToVerify, country2]);
|
|
15159
15308
|
return {
|
|
15160
15309
|
hasFieldsToVerify,
|
|
@@ -17076,7 +17225,7 @@ function PersonalDetailsComponent(props) {
|
|
|
17076
17225
|
verifyFields({
|
|
17077
17226
|
data: personalDetailsData
|
|
17078
17227
|
}, props.data).then((verifiedArr) => {
|
|
17079
|
-
const isVerified = verifiedArr.every((item) => item.
|
|
17228
|
+
const isVerified = verifiedArr.every((item) => (item == null ? void 0 : item.isVerified) === true);
|
|
17080
17229
|
const t1 = performance.now();
|
|
17081
17230
|
const elapsedTime = Math.floor(t1 - t0);
|
|
17082
17231
|
if (elapsedTime < minTime) {
|
|
@@ -17093,10 +17242,10 @@ function PersonalDetailsComponent(props) {
|
|
|
17093
17242
|
...externalErrors
|
|
17094
17243
|
};
|
|
17095
17244
|
verifiedArr.forEach((error) => {
|
|
17096
|
-
if (error.
|
|
17097
|
-
errorObj[error.
|
|
17245
|
+
if (error.isVerified === false) {
|
|
17246
|
+
errorObj[error.field] = {
|
|
17098
17247
|
isValid: false,
|
|
17099
|
-
errorMessage: error.
|
|
17248
|
+
errorMessage: error.messageKey
|
|
17100
17249
|
};
|
|
17101
17250
|
}
|
|
17102
17251
|
});
|
|
@@ -18995,6 +19144,12 @@ function BankVerification(props) {
|
|
|
18995
19144
|
});
|
|
18996
19145
|
}
|
|
18997
19146
|
const BankVerification$1 = memo(BankVerification);
|
|
19147
|
+
const CoreContext = createContext(void 0);
|
|
19148
|
+
const useCoreContext = () => {
|
|
19149
|
+
const context = useContext(CoreContext);
|
|
19150
|
+
if (!context) throw Error("You need a <CoreProvider> to use core context");
|
|
19151
|
+
return context;
|
|
19152
|
+
};
|
|
18998
19153
|
const countriesWithMultipleCurrencies = /* @__PURE__ */ new Set([CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.CzechRepublic, CountryCodes.Hungary, CountryCodes.Romania, CountryCodes.Switzerland]);
|
|
18999
19154
|
const countriesWithLocalFormat = /* @__PURE__ */ new Set([CountryCodes.Denmark, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.UnitedKingdom]);
|
|
19000
19155
|
const payoutCurrencySupport = {
|
|
@@ -20696,7 +20851,7 @@ function SolePropComponent(props) {
|
|
|
20696
20851
|
const [tradingName2, setTradingName] = useState();
|
|
20697
20852
|
const solePropNameAndCountryFormProps = getFormProps(props, solePropNameAndCountryFormId);
|
|
20698
20853
|
const solePropsRegistrationDetailsFormProps = getFormProps(props, solePropRegistrationDetailsFormId);
|
|
20699
|
-
const solePropRegistrationAddressFormProps =
|
|
20854
|
+
const solePropRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, solePropRegistrationAddressFormId);
|
|
20700
20855
|
const solePropDocumentsFormProps = getFormProps(props, solePropDocumentFormId);
|
|
20701
20856
|
const handleStateChange = ({
|
|
20702
20857
|
currentState
|
|
@@ -21293,7 +21448,7 @@ function TrustComponent(props) {
|
|
|
21293
21448
|
i18n
|
|
21294
21449
|
} = useI18nContext();
|
|
21295
21450
|
const trustRegistrationDetailsFormProps = getFormProps(props, trustRegistrationDetailsFormId);
|
|
21296
|
-
const trustRegistrationAddressFormProps =
|
|
21451
|
+
const trustRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, trustRegistrationAddressFormId);
|
|
21297
21452
|
const trustDocumentFormProps = getFormProps(props, trustConstitutionalDocumentFormId);
|
|
21298
21453
|
const handleStateChange = () => {
|
|
21299
21454
|
};
|
|
@@ -22656,10 +22811,13 @@ const solePropBase = {
|
|
|
22656
22811
|
rule: "REQUIRED"
|
|
22657
22812
|
},
|
|
22658
22813
|
stockExchangeMIC: {
|
|
22659
|
-
rule: "
|
|
22814
|
+
rule: "ifPubliclyTradedCompany"
|
|
22660
22815
|
},
|
|
22661
22816
|
stockISIN: {
|
|
22662
|
-
rule: "
|
|
22817
|
+
rule: "ifPubliclyTradedCompany"
|
|
22818
|
+
},
|
|
22819
|
+
stockTickerSymbol: {
|
|
22820
|
+
rule: "ifPubliclyTradedCompany"
|
|
22663
22821
|
},
|
|
22664
22822
|
tradingName: {
|
|
22665
22823
|
rule: "REQUIRED"
|
|
@@ -23589,7 +23747,7 @@ function VatNumberField({
|
|
|
23589
23747
|
}
|
|
23590
23748
|
const BUSINESS_NAME_FIELD = ["businessName"];
|
|
23591
23749
|
const basicInformationFields = [...COUNTRY_FIELD, ...BUSINESS_NAME_FIELD, ...STATE_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
|
|
23592
|
-
const additionalInformationFields = [...LEGAL_COMPANY_NAME_FIELD, ...TRADING_NAME_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD];
|
|
23750
|
+
const additionalInformationFields = [...LEGAL_COMPANY_NAME_FIELD, ...TRADING_NAME_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...STOCK_TICKER_SYMBOL_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD];
|
|
23593
23751
|
const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [...BUSINESS_NAME_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
|
|
23594
23752
|
const getForms = (country2) => ({
|
|
23595
23753
|
basicInformation: {
|
|
@@ -24305,7 +24463,7 @@ const FormWrapper = ({
|
|
|
24305
24463
|
isExperimentEnabled
|
|
24306
24464
|
} = useExperimentsContext();
|
|
24307
24465
|
const showExtraTaxExemptionReasons = isExperimentEnabled(ExperimentNames.ShowExtraTaxExemptionReasons);
|
|
24308
|
-
const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a = summaryData.companyRegistrationDetails) == null ? void 0 : _a.vatAbsenceReason);
|
|
24466
|
+
const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a = summaryData.companyRegistrationDetails) == null ? void 0 : _a.vatAbsenceReason) && ["companyDetails"].includes(taskName);
|
|
24309
24467
|
const summaryContent = jsx("div", {
|
|
24310
24468
|
className: "adyen-kyc-form-wrapper",
|
|
24311
24469
|
children: jsx(Summary, {
|
|
@@ -25061,10 +25219,13 @@ function CompanyDropinComponent({
|
|
|
25061
25219
|
handleUpdateLegalEntity,
|
|
25062
25220
|
handleHomeClick,
|
|
25063
25221
|
onTypeSwitch,
|
|
25064
|
-
onChange
|
|
25065
|
-
accountHolder: accountHolder2
|
|
25222
|
+
onChange
|
|
25066
25223
|
}) {
|
|
25067
25224
|
var _a, _b;
|
|
25225
|
+
const {
|
|
25226
|
+
accountHolder: accountHolder2,
|
|
25227
|
+
setAccountHolder
|
|
25228
|
+
} = useCoreContext();
|
|
25068
25229
|
const {
|
|
25069
25230
|
showToast,
|
|
25070
25231
|
clearToasts
|
|
@@ -25196,7 +25357,8 @@ function CompanyDropinComponent({
|
|
|
25196
25357
|
legalEntityName: dataSubmitted.companyNameAndCountry.legalCompanyName,
|
|
25197
25358
|
usedAdditionalAddress: dataSubmitted.companyRegistrationAddress.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
25198
25359
|
};
|
|
25199
|
-
|
|
25360
|
+
const newAccountHolder = dataSubmitted.companyType.accountHolder ?? accountHolder2;
|
|
25361
|
+
legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(taskType, legalEntityResponse, newAccountHolder);
|
|
25200
25362
|
if (!isCountryOfGoverningLawEnabled && ((_a2 = legalEntity.organization) == null ? void 0 : _a2.countryOfGoverningLaw)) {
|
|
25201
25363
|
delete legalEntity.organization.countryOfGoverningLaw;
|
|
25202
25364
|
}
|
|
@@ -25212,6 +25374,7 @@ function CompanyDropinComponent({
|
|
|
25212
25374
|
} else {
|
|
25213
25375
|
legalEntity = await handleUpdateLegalEntity(drop("type").from(legalEntity), legalEntityResponse.id);
|
|
25214
25376
|
}
|
|
25377
|
+
setAccountHolder(newAccountHolder);
|
|
25215
25378
|
userEvents.addEvent("Saved company details", {
|
|
25216
25379
|
segmentation: {
|
|
25217
25380
|
...baseTrackingPayload,
|
|
@@ -26277,7 +26440,7 @@ const TradingNameFieldValidation = () => ({
|
|
|
26277
26440
|
}]
|
|
26278
26441
|
});
|
|
26279
26442
|
const COMPANY_OTHER_DETAILS_FORM_ID = "companyOtherDetails";
|
|
26280
|
-
const companyOtherDetailsFields = [...TRADING_NAME_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD];
|
|
26443
|
+
const companyOtherDetailsFields = [...TRADING_NAME_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...STOCK_TICKER_SYMBOL_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD];
|
|
26281
26444
|
function CompanyOtherDetails({
|
|
26282
26445
|
data,
|
|
26283
26446
|
labels: labels2,
|
|
@@ -26313,7 +26476,7 @@ function CompanyOtherDetails({
|
|
|
26313
26476
|
const existingTaxId = (_c = (_b = data == null ? void 0 : data.taxInformation) == null ? void 0 : _b.find((taxId2) => taxId2.country === country2)) == null ? void 0 : _c.number;
|
|
26314
26477
|
const defaultTaxIdNumberType = existingTaxId ? inferTaxIdNumberType(existingTaxId, country2, companyType2) : (_d = getTaxIdNumberOptions(country2, companyType2)) == null ? void 0 : _d[0].id;
|
|
26315
26478
|
const [taxIdNumberType, setTaxIdNumberType] = useState$1(defaultTaxIdNumberType);
|
|
26316
|
-
const directChildFields = companyOtherDetailsFields.filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "dateOfIncorporation"].includes(field));
|
|
26479
|
+
const directChildFields = companyOtherDetailsFields.filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "stockTickerSymbol", "dateOfIncorporation"].includes(field));
|
|
26317
26480
|
const initialFormUtilsProps = useMemo$1(() => ({
|
|
26318
26481
|
allFields,
|
|
26319
26482
|
labels: labels2,
|
|
@@ -26350,6 +26513,8 @@ function CompanyOtherDetails({
|
|
|
26350
26513
|
return mergeFieldMetadataIntoProps("stockExchangeMIC", stockExchangeMICFieldMetadata, acc);
|
|
26351
26514
|
case "stockISIN":
|
|
26352
26515
|
return mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, acc);
|
|
26516
|
+
case "stockTickerSymbol":
|
|
26517
|
+
return mergeFieldMetadataIntoProps("stockTickerSymbol", stockTickerSymbolFieldMetadata, acc);
|
|
26353
26518
|
case "registrationNumber":
|
|
26354
26519
|
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$8[country2], {
|
|
26355
26520
|
companyType: companyType2,
|
|
@@ -26524,6 +26689,19 @@ function CompanyOtherDetails({
|
|
|
26524
26689
|
readonly: formUtils.isReadOnly("stockISIN"),
|
|
26525
26690
|
handleChangeFor
|
|
26526
26691
|
})
|
|
26692
|
+
}), formUtils.isRequiredField("stockTickerSymbol") && jsx("div", {
|
|
26693
|
+
className: "adyen-kyc-field-wrapper",
|
|
26694
|
+
children: jsx(StockTickerSymbolField, {
|
|
26695
|
+
data: formUtils.getFieldData(formData, STOCK_TICKER_SYMBOL_FIELD),
|
|
26696
|
+
valid: formUtils.getFieldValid(formValid, STOCK_TICKER_SYMBOL_FIELD),
|
|
26697
|
+
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_TICKER_SYMBOL_FIELD),
|
|
26698
|
+
labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
|
|
26699
|
+
placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
|
|
26700
|
+
mask: formUtils.getMask("stockTickerSymbol"),
|
|
26701
|
+
guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
|
|
26702
|
+
readonly: formUtils.isReadOnly("stockTickerSymbol"),
|
|
26703
|
+
handleChangeFor
|
|
26704
|
+
})
|
|
26527
26705
|
})]
|
|
26528
26706
|
})]
|
|
26529
26707
|
});
|
|
@@ -26971,7 +27149,7 @@ function CompanySearchComponent(props) {
|
|
|
26971
27149
|
}), jsx("div", {
|
|
26972
27150
|
className: formWrapperClasses(forms.companyRegistrationAddress.formId),
|
|
26973
27151
|
children: jsx(RegistrationAddressComponent, {
|
|
26974
|
-
...
|
|
27152
|
+
...getNestedOuterFormPropsFromOuterFormProps(props, forms.companyRegistrationAddress.formId),
|
|
26975
27153
|
id: forms.companyRegistrationAddress.formId,
|
|
26976
27154
|
heading: i18n.get(forms.companyRegistrationAddress.formName),
|
|
26977
27155
|
description: i18n.get(forms.companyRegistrationAddress.formDescription, {
|
|
@@ -27359,13 +27537,23 @@ const useIsEligibleForSingpass = ({
|
|
|
27359
27537
|
const {
|
|
27360
27538
|
isExperimentEnabled
|
|
27361
27539
|
} = useExperimentsContext();
|
|
27362
|
-
if (
|
|
27363
|
-
|
|
27540
|
+
if (getLegalEntityCountry(legalEntity) !== CountryCodes.Singapore) {
|
|
27541
|
+
return false;
|
|
27542
|
+
}
|
|
27543
|
+
const isSingpassForCompaniesEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
|
|
27544
|
+
const isSingpassForIndividualsEnabled = isExperimentEnabled("ShowSingPassButtonForIndividuals");
|
|
27545
|
+
if (!isSingpassForCompaniesEnabled && !isSingpassForIndividualsEnabled) return false;
|
|
27546
|
+
const isSingpassEnabled = Boolean(handleOpenSingpassAuthorizationLink);
|
|
27364
27547
|
if (!isSingpassEnabled) return false;
|
|
27365
27548
|
if (accountHolder2) {
|
|
27366
|
-
return accountHolder2 === "theCompanyIWorkFor";
|
|
27549
|
+
return accountHolder2 === "theCompanyIWorkFor" && isSingpassForCompaniesEnabled || accountHolder2 === "myName" && isSingpassForIndividualsEnabled;
|
|
27367
27550
|
}
|
|
27368
|
-
|
|
27551
|
+
const legalEntityType = legalEntity.type;
|
|
27552
|
+
const isPartOfTrust = isPartOfTrustFromLegalEntity(legalEntity);
|
|
27553
|
+
const isVanillaOrganization = legalEntityType === LegalEntityType.ORGANIZATION && !isPartOfTrust;
|
|
27554
|
+
const hasSoleProprietor = hasSolePropInLegalEntity(legalEntity);
|
|
27555
|
+
const isVanillaIndividual = legalEntityType === LegalEntityType.INDIVIDUAL && !hasSoleProprietor;
|
|
27556
|
+
return isVanillaOrganization && isSingpassForCompaniesEnabled || isVanillaIndividual && isSingpassForIndividualsEnabled;
|
|
27369
27557
|
};
|
|
27370
27558
|
const logger$f = createLogger("useAssociatedLegalArrangement");
|
|
27371
27559
|
function useAssociatedLegalArrangement({
|
|
@@ -27392,6 +27580,14 @@ function useAssociatedLegalArrangement({
|
|
|
27392
27580
|
refreshAssociatedLegalArrangement
|
|
27393
27581
|
};
|
|
27394
27582
|
}
|
|
27583
|
+
const getCanSeeEntitySelectionStorageKey = (legalEntityId) => `ENTITY_SELECTION_SEEN-${legalEntityId}`;
|
|
27584
|
+
const useCanSeeEntitySelection = (legalEntityId) => {
|
|
27585
|
+
const [canSeeEntitySelectionFromLocalStorage, setCanSeeEntitySelectionIntoLocalStorage] = useLocalStorage(getCanSeeEntitySelectionStorageKey(legalEntityId), true);
|
|
27586
|
+
return {
|
|
27587
|
+
canSeeEntitySelection: canSeeEntitySelectionFromLocalStorage,
|
|
27588
|
+
setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
|
|
27589
|
+
};
|
|
27590
|
+
};
|
|
27395
27591
|
const logger$e = createLogger("useExemptSettlor");
|
|
27396
27592
|
const useExemptSettlor = ({
|
|
27397
27593
|
trust: trust2,
|
|
@@ -29349,33 +29545,57 @@ const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http:
|
|
|
29349
29545
|
] });
|
|
29350
29546
|
const setupAccountMethods = ["singpass", "manual"];
|
|
29351
29547
|
const setupAccountMethodFields = ["setupAccountMethod"];
|
|
29352
|
-
const
|
|
29353
|
-
|
|
29354
|
-
|
|
29355
|
-
|
|
29356
|
-
|
|
29357
|
-
|
|
29358
|
-
|
|
29359
|
-
|
|
29360
|
-
|
|
29361
|
-
|
|
29548
|
+
const getSingpassSelectionDisabled = (legalEntityType) => {
|
|
29549
|
+
switch (legalEntityType) {
|
|
29550
|
+
case LegalEntityType.INDIVIDUAL:
|
|
29551
|
+
case LegalEntityType.ORGANIZATION:
|
|
29552
|
+
return false;
|
|
29553
|
+
default:
|
|
29554
|
+
return true;
|
|
29555
|
+
}
|
|
29556
|
+
};
|
|
29557
|
+
const legalEntityTypeToSelectionTranslationKeyMap = {
|
|
29558
|
+
[LegalEntityType.INDIVIDUAL]: "retrieveMyInfo",
|
|
29559
|
+
[LegalEntityType.ORGANIZATION]: "retrieveMyInfoBusiness"
|
|
29560
|
+
};
|
|
29561
|
+
const legalEntityTypeToSelectionDescriptionTranslationKeyMap = {
|
|
29562
|
+
[LegalEntityType.INDIVIDUAL]: "getYourVerifiedDetailsInstantly",
|
|
29563
|
+
[LegalEntityType.ORGANIZATION]: "getYourBusinessVerifiedDetails"
|
|
29564
|
+
};
|
|
29565
|
+
const getSetupAccountMethodMetadata = (legalEntityType) => {
|
|
29566
|
+
const translationSingpassNameKey = legalEntityTypeToSelectionTranslationKeyMap[legalEntityType] ?? "retrieveMyInfoBusiness";
|
|
29567
|
+
const translationSingpassDescriptionKey = legalEntityTypeToSelectionDescriptionTranslationKeyMap[legalEntityType] ?? "getYourBusinessVerifiedDetails";
|
|
29568
|
+
const isSingpassSelectionDisabled = getSingpassSelectionDisabled(legalEntityType);
|
|
29569
|
+
return {
|
|
29570
|
+
singpass: {
|
|
29571
|
+
name: translationSingpassNameKey,
|
|
29572
|
+
description: translationSingpassDescriptionKey,
|
|
29362
29573
|
icon: jsx("span", {
|
|
29363
|
-
className: "adyen-kyc-singpass-
|
|
29364
|
-
children: jsx(
|
|
29574
|
+
className: "adyen-kyc-setup-singpass-container",
|
|
29575
|
+
children: jsx(SvgSetupSingpass, {})
|
|
29576
|
+
}),
|
|
29577
|
+
provider: {
|
|
29578
|
+
name: "singpass",
|
|
29579
|
+
icon: jsx("span", {
|
|
29580
|
+
className: "adyen-kyc-singpass-logo-container",
|
|
29581
|
+
children: jsx(SvgSingpassLogo, {})
|
|
29582
|
+
})
|
|
29583
|
+
},
|
|
29584
|
+
isOptionDisabled: isSingpassSelectionDisabled
|
|
29585
|
+
},
|
|
29586
|
+
manual: {
|
|
29587
|
+
name: "enterTheDetailsYourself",
|
|
29588
|
+
description: "youAlsoHaveToUploadSomeSupportingDocuments",
|
|
29589
|
+
icon: jsx("span", {
|
|
29590
|
+
className: "adyen-kyc-setup-manual-container",
|
|
29591
|
+
children: jsx(SvgSetupManual, {})
|
|
29365
29592
|
})
|
|
29366
29593
|
}
|
|
29367
|
-
}
|
|
29368
|
-
|
|
29369
|
-
name: "enterTheDetailsYourself",
|
|
29370
|
-
description: "youAlsoHaveToUploadSomeSupportingDocuments",
|
|
29371
|
-
icon: jsx("span", {
|
|
29372
|
-
className: "adyen-kyc-setup-manual-container",
|
|
29373
|
-
children: jsx(SvgSetupManual, {})
|
|
29374
|
-
})
|
|
29375
|
-
}
|
|
29376
|
-
});
|
|
29594
|
+
};
|
|
29595
|
+
};
|
|
29377
29596
|
const SingpassSelection = (props) => {
|
|
29378
29597
|
const {
|
|
29598
|
+
legalEntityType,
|
|
29379
29599
|
handleNextClick
|
|
29380
29600
|
} = props;
|
|
29381
29601
|
const {
|
|
@@ -29394,7 +29614,7 @@ const SingpassSelection = (props) => {
|
|
|
29394
29614
|
schema: setupAccountMethodFields,
|
|
29395
29615
|
defaultData: {}
|
|
29396
29616
|
});
|
|
29397
|
-
const methodsMetadata = getSetupAccountMethodMetadata();
|
|
29617
|
+
const methodsMetadata = getSetupAccountMethodMetadata(legalEntityType);
|
|
29398
29618
|
return jsx("div", {
|
|
29399
29619
|
children: jsxs("div", {
|
|
29400
29620
|
className: "adyen-kyc-singpass-selection",
|
|
@@ -29486,10 +29706,21 @@ const hasPayoutAccount = (legalEntityResponse) => {
|
|
|
29486
29706
|
var _a;
|
|
29487
29707
|
return Boolean((_a = legalEntityResponse.transferInstruments) == null ? void 0 : _a.length);
|
|
29488
29708
|
};
|
|
29709
|
+
const legalEntityTypeToSubtitleTranslationKey = {
|
|
29710
|
+
[LegalEntityType.INDIVIDUAL]: "myInfoYouCanGetVerifiedDetails",
|
|
29711
|
+
[LegalEntityType.ORGANIZATION]: "myInfoBusinessYouCanGetVerifiedDetails"
|
|
29712
|
+
};
|
|
29713
|
+
const legalEntityTypeToButtonTextTranslationKeyMap = {
|
|
29714
|
+
[LegalEntityType.INDIVIDUAL]: "retrieveMyinfoWith",
|
|
29715
|
+
[LegalEntityType.ORGANIZATION]: "retrieveMyinfoBusinessWith"
|
|
29716
|
+
};
|
|
29489
29717
|
const SingpassBanner = (props) => {
|
|
29490
29718
|
const {
|
|
29719
|
+
legalEntityType,
|
|
29491
29720
|
onClick
|
|
29492
29721
|
} = props;
|
|
29722
|
+
const subtitleTranslationKey = legalEntityTypeToSubtitleTranslationKey[legalEntityType];
|
|
29723
|
+
const buttonTextTranslationKey = legalEntityTypeToButtonTextTranslationKeyMap[legalEntityType];
|
|
29493
29724
|
const {
|
|
29494
29725
|
i18n
|
|
29495
29726
|
} = useI18nContext();
|
|
@@ -29498,14 +29729,14 @@ const SingpassBanner = (props) => {
|
|
|
29498
29729
|
hasCloseButton: false,
|
|
29499
29730
|
icon: false,
|
|
29500
29731
|
title: i18n.get("getSetUpInstantly"),
|
|
29501
|
-
children: [jsx("div", {
|
|
29732
|
+
children: [subtitleTranslationKey && jsx("div", {
|
|
29502
29733
|
className: cx("adyen-task-list-singpass-banner__subtitle"),
|
|
29503
|
-
children: i18n.get(
|
|
29734
|
+
children: i18n.get(subtitleTranslationKey)
|
|
29504
29735
|
}), jsxs("button", {
|
|
29505
29736
|
type: "button",
|
|
29506
29737
|
className: cx("adyen-kyc-button adyen-task-list-singpass-banner__button"),
|
|
29507
29738
|
onClick,
|
|
29508
|
-
children: [i18n.get(
|
|
29739
|
+
children: [buttonTextTranslationKey && i18n.get(buttonTextTranslationKey), jsx(SvgSingpassLogo, {})]
|
|
29509
29740
|
})]
|
|
29510
29741
|
});
|
|
29511
29742
|
};
|
|
@@ -29788,7 +30019,8 @@ function TaskListComponent({
|
|
|
29788
30019
|
})]
|
|
29789
30020
|
})]
|
|
29790
30021
|
}), onRetrieveMyinfoBusinessWithSingpass && jsx(SingpassBanner, {
|
|
29791
|
-
onClick: onRetrieveMyinfoBusinessWithSingpass
|
|
30022
|
+
onClick: onRetrieveMyinfoBusinessWithSingpass,
|
|
30023
|
+
legalEntityType: legalEntityResponse.type
|
|
29792
30024
|
}), hasExpired && jsx(ExpiredBanner, {}), jsxs("div", {
|
|
29793
30025
|
children: [hasTaskOfGroupAccountDetails && jsxs(TaskListGroup, {
|
|
29794
30026
|
title: isCompany ? i18n.get(companyTaskDescriptionKey) : i18n.get(isEnableNewEntryFlowEnabled ? "provideFewDetailsAboutYourself" : "accountDetailsDescription"),
|
|
@@ -30279,6 +30511,10 @@ function IndividualDropinComponent({
|
|
|
30279
30511
|
handleBackClick: externalBackClick
|
|
30280
30512
|
}) {
|
|
30281
30513
|
var _a, _b, _c, _d;
|
|
30514
|
+
const {
|
|
30515
|
+
accountHolder: accountHolder2,
|
|
30516
|
+
setAccountHolder
|
|
30517
|
+
} = useCoreContext();
|
|
30282
30518
|
const {
|
|
30283
30519
|
i18n
|
|
30284
30520
|
} = useI18nContext();
|
|
@@ -30514,12 +30750,14 @@ function IndividualDropinComponent({
|
|
|
30514
30750
|
idDocumentType: idDocumentType || null
|
|
30515
30751
|
}
|
|
30516
30752
|
});
|
|
30517
|
-
|
|
30753
|
+
const accountHolderToEvaluated = ((_c2 = dataSubmitted.personalDetails) == null ? void 0 : _c2.accountHolder) ?? accountHolder2;
|
|
30754
|
+
legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(taskType, legalEntityResponse, accountHolderToEvaluated ?? void 0);
|
|
30518
30755
|
const createdLegalEntity = await submitLegalEntity({
|
|
30519
30756
|
dataSubmitted,
|
|
30520
30757
|
legalEntity,
|
|
30521
30758
|
idDocumentType
|
|
30522
30759
|
});
|
|
30760
|
+
setAccountHolder(accountHolderToEvaluated);
|
|
30523
30761
|
await submitDocuments2({
|
|
30524
30762
|
forms: forms2,
|
|
30525
30763
|
legalEntity: createdLegalEntity,
|
|
@@ -30711,7 +30949,8 @@ function IndividualDropinComponent({
|
|
|
30711
30949
|
handleFindAddress,
|
|
30712
30950
|
onTypeSwitch,
|
|
30713
30951
|
onCountryChange: setCountry,
|
|
30714
|
-
shouldValidate
|
|
30952
|
+
shouldValidate,
|
|
30953
|
+
accountHolder: accountHolder2
|
|
30715
30954
|
})
|
|
30716
30955
|
});
|
|
30717
30956
|
}
|
|
@@ -33133,6 +33372,9 @@ const useNavigation = ({
|
|
|
33133
33372
|
const {
|
|
33134
33373
|
accountHolder: accountHolder2
|
|
33135
33374
|
} = useCoreContext();
|
|
33375
|
+
const {
|
|
33376
|
+
canSeeEntitySelection
|
|
33377
|
+
} = useCanSeeEntitySelection(legalEntity.id);
|
|
33136
33378
|
const eligibleForSingpass = useIsEligibleForSingpass({
|
|
33137
33379
|
legalEntity,
|
|
33138
33380
|
accountHolder: accountHolder2,
|
|
@@ -33169,7 +33411,7 @@ const useNavigation = ({
|
|
|
33169
33411
|
if (pushedTask === "default") {
|
|
33170
33412
|
const defaultTask = getDefaultTask({
|
|
33171
33413
|
legalEntity,
|
|
33172
|
-
|
|
33414
|
+
canSeeEntitySelection,
|
|
33173
33415
|
showIntroduction,
|
|
33174
33416
|
isNewEntryFlowEnabled,
|
|
33175
33417
|
shouldShowSingpassSelection
|
|
@@ -33186,13 +33428,13 @@ const useNavigation = ({
|
|
|
33186
33428
|
};
|
|
33187
33429
|
const getDefaultTask = ({
|
|
33188
33430
|
legalEntity,
|
|
33189
|
-
|
|
33431
|
+
canSeeEntitySelection,
|
|
33190
33432
|
isNewEntryFlowEnabled,
|
|
33191
33433
|
showIntroduction,
|
|
33192
33434
|
shouldShowSingpassSelection
|
|
33193
33435
|
}) => {
|
|
33194
33436
|
const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection(legalEntity);
|
|
33195
|
-
if (isNewEntryFlowEnabled &&
|
|
33437
|
+
if (isNewEntryFlowEnabled && canSeeEntitySelection && !hasLegalEntityProgressedBeyondEntitySelection) return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
33196
33438
|
if (showIntroduction) return TaskTypes.INTRODUCTION;
|
|
33197
33439
|
if (shouldShowSingpassSelection) return TaskTypes.SINGPASS_SELECTION;
|
|
33198
33440
|
return TaskTypes.TASKS_OVERVIEW;
|
|
@@ -33222,6 +33464,9 @@ function DropinComposerComponent({
|
|
|
33222
33464
|
accountHolder: accountHolder2,
|
|
33223
33465
|
setAccountHolder
|
|
33224
33466
|
} = useCoreContext();
|
|
33467
|
+
const {
|
|
33468
|
+
setCanSeeEntitySelection
|
|
33469
|
+
} = useCanSeeEntitySelection(legalEntityResponse.id);
|
|
33225
33470
|
const {
|
|
33226
33471
|
i18n
|
|
33227
33472
|
} = useI18nContext();
|
|
@@ -33248,13 +33493,13 @@ function DropinComposerComponent({
|
|
|
33248
33493
|
} = useHasSeenIntroduction({
|
|
33249
33494
|
legalEntityId: legalEntityResponse.id
|
|
33250
33495
|
});
|
|
33496
|
+
const [tasks, setTasks] = useState([]);
|
|
33497
|
+
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
33251
33498
|
const eligibleForSingpass = useIsEligibleForSingpass({
|
|
33252
|
-
legalEntity:
|
|
33499
|
+
legalEntity: rootLegalEntity,
|
|
33253
33500
|
accountHolder: accountHolder2,
|
|
33254
33501
|
handleOpenSingpassAuthorizationLink
|
|
33255
33502
|
});
|
|
33256
|
-
const [tasks, setTasks] = useState([]);
|
|
33257
|
-
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
33258
33503
|
const rootLegalEntityCountry = getLegalEntityCountry(rootLegalEntity);
|
|
33259
33504
|
const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
|
|
33260
33505
|
const {
|
|
@@ -33794,6 +34039,10 @@ function DropinComposerComponent({
|
|
|
33794
34039
|
clearInterval(timeoutId);
|
|
33795
34040
|
};
|
|
33796
34041
|
}, [refreshLegalEntity, rootLegalEntity]);
|
|
34042
|
+
useEffect(() => {
|
|
34043
|
+
const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder2);
|
|
34044
|
+
if (newAccountHolder !== accountHolder2) setAccountHolder(newAccountHolder);
|
|
34045
|
+
}, [accountHolder2, rootLegalEntity]);
|
|
33797
34046
|
if (isLoadingConfiguration) {
|
|
33798
34047
|
return jsx(Shimmer, {});
|
|
33799
34048
|
}
|
|
@@ -33807,6 +34056,7 @@ function DropinComposerComponent({
|
|
|
33807
34056
|
accountHolder: accountHolder2,
|
|
33808
34057
|
onComplete: async (newAccountHolder) => {
|
|
33809
34058
|
setAccountHolder(newAccountHolder);
|
|
34059
|
+
setCanSeeEntitySelection(false);
|
|
33810
34060
|
await refreshLegalEntity();
|
|
33811
34061
|
navigateTo("default");
|
|
33812
34062
|
},
|
|
@@ -33818,7 +34068,9 @@ function DropinComposerComponent({
|
|
|
33818
34068
|
});
|
|
33819
34069
|
case TaskTypes.SINGPASS_SELECTION:
|
|
33820
34070
|
return jsx(SingpassSelection, {
|
|
33821
|
-
handleNextClick: handleSingpassSelectionNextClick
|
|
34071
|
+
handleNextClick: handleSingpassSelectionNextClick,
|
|
34072
|
+
accountHolder: accountHolder2,
|
|
34073
|
+
legalEntityType: rootLegalEntity.type
|
|
33822
34074
|
});
|
|
33823
34075
|
case TaskTypes.INTRODUCTION:
|
|
33824
34076
|
return jsx(Introduction, {
|
|
@@ -34000,8 +34252,7 @@ function DropinComposerComponent({
|
|
|
34000
34252
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
34001
34253
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress,
|
|
34002
34254
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
34003
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
34004
|
-
accountHolder: accountHolder2
|
|
34255
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
34005
34256
|
});
|
|
34006
34257
|
case TaskTypes.COMPANY_SEARCH:
|
|
34007
34258
|
return jsx(CompanySearchDropinComponent, {
|
|
@@ -34094,8 +34345,7 @@ function DropinComposerComponent({
|
|
|
34094
34345
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
34095
34346
|
associationDetail: trustMember,
|
|
34096
34347
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
34097
|
-
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
34098
|
-
accountHolder: accountHolder2
|
|
34348
|
+
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
34099
34349
|
});
|
|
34100
34350
|
case TaskTypes.PAYOUT:
|
|
34101
34351
|
case TaskTypes.PAYIN:
|
|
@@ -36460,7 +36710,7 @@ const ConfigurationApiProvider = ({
|
|
|
36460
36710
|
isEmbeddedDropin,
|
|
36461
36711
|
loadingContext
|
|
36462
36712
|
} = authContext;
|
|
36463
|
-
const sdkVersion = "3.19.
|
|
36713
|
+
const sdkVersion = "3.19.1";
|
|
36464
36714
|
useAnalytics({
|
|
36465
36715
|
onUserEvent,
|
|
36466
36716
|
legalEntityId: rootLegalEntityId,
|