@adyen/kyc-components 3.8.2 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/{NO-CjZgx8a-.js → NO-CjMA-wtT.js} +0 -1
- package/dist/es/adyen-kyc-components.es.js +655 -218
- package/dist/style.css +6 -13
- package/dist/types/components/BaseElement.d.ts +1 -1
- package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +1 -3
- package/dist/types/components/Dropins/types.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent.d.ts +6 -0
- package/dist/types/components/EmbeddedDropins/{OnboardingRedirect/OnboardingRedirectComponent.d.ts → ViewVerificationStatus/ViewVerificationStatusComponent.d.ts} +6 -5
- package/dist/types/components/EmbeddedDropins/{OnboardingRedirect → ViewVerificationStatus}/content.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/index.d.ts +2 -0
- package/dist/types/components/EmbeddedDropins/{OnboardingRedirect → ViewVerificationStatus}/types.d.ts +1 -1
- package/dist/types/components/UIElement.d.ts +2 -1
- package/dist/types/components/index.d.ts +4 -2
- package/dist/types/components/internal/CollapsibleContainer/types.d.ts +1 -1
- package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiProvider.d.ts +5 -1
- package/dist/types/core/Context/SettingsContext/types.d.ts +2 -2
- package/dist/types/core/Context/SettingsContext/useSetting.d.ts +1 -1
- package/dist/types/core/SDKValidation/index.d.ts +1 -1
- package/dist/types/core/Services/componentApi/accept-service-agreement.d.ts +3 -0
- package/dist/types/core/Services/componentApi/download-pci.d.ts +3 -0
- package/dist/types/core/Services/componentApi/generate-onboarding-link.d.ts +1 -1
- package/dist/types/core/Services/componentApi/get-analytics-session.d.ts +2 -0
- package/dist/types/core/Services/componentApi/get-onboarding-status.d.ts +1 -1
- package/dist/types/core/Services/componentApi/get-pci-questionnaire.d.ts +3 -0
- package/dist/types/core/Services/componentApi/get-pci-status.d.ts +3 -0
- package/dist/types/core/Services/componentApi/get-pci-template.d.ts +3 -0
- package/dist/types/core/Services/componentApi/get-service-agreement-acceptance-info.d.ts +3 -0
- package/dist/types/core/Services/componentApi/get-service-agreement-status.d.ts +3 -0
- package/dist/types/core/Services/componentApi/get-service-agreement.d.ts +3 -0
- package/dist/types/core/Services/componentApi/push-events.d.ts +2 -0
- package/dist/types/core/Services/componentApi/sign-pci.d.ts +3 -0
- package/dist/types/core/core.d.ts +1 -1
- package/dist/types/core/hooks/useAnalytics.d.ts +11 -0
- package/dist/types/core/hooks/useAssociatedLegalArrangement.d.ts +2 -0
- package/dist/types/core/hooks/useComponentApi.d.ts +13 -0
- package/dist/types/core/models/api/analytics.d.ts +9 -0
- package/dist/types/core/models/api/{onboarding-redirect.d.ts → view-verification-status.d.ts} +6 -6
- package/dist/types/core/user-events.d.ts +7 -8
- package/dist/types/utils/masking/maskTypes.d.ts +5 -0
- package/dist/types/utils/masking/matchAgainstMask.d.ts +3 -0
- package/dist/types/utils/masking/shiftRight.d.ts +15 -0
- package/package.json +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingRedirect/index.d.ts +0 -2
- package/dist/types/core/hooks/useTrust.d.ts +0 -11
|
@@ -1241,19 +1241,14 @@ const introductionScreenEpilogueTitle = "Why do we need this information?";
|
|
|
1241
1241
|
const introductionScreenEpilogueDescriptionP1 = "We check all this information against official records to verify your identity and comply with financial regulations.";
|
|
1242
1242
|
const introductionScreenEpilogueDescriptionP2 = "Your information will be used only for these purposes.";
|
|
1243
1243
|
const oib = "OIB";
|
|
1244
|
-
const
|
|
1245
|
-
const
|
|
1246
|
-
const
|
|
1247
|
-
const
|
|
1248
|
-
const
|
|
1249
|
-
const
|
|
1250
|
-
const
|
|
1251
|
-
const
|
|
1252
|
-
const onboardingRedirectErrorsDescriptionP2 = "You need to correct some information before we can activate your account.";
|
|
1253
|
-
const onboardingRedirectErrorsCtaButton = "Correct information";
|
|
1254
|
-
const onboardingRedirectFinishedHeader = "You’re all set";
|
|
1255
|
-
const onboardingRedirectFinishedDescriptionP1 = "We reviewed the information you submitted and successfully verified your account.";
|
|
1256
|
-
const onboardingRedirectFinishedCtaButton = "View data";
|
|
1244
|
+
const onboardingRedirectAwaitingDescriptionP1 = "Verify your business details to start receiving payments.";
|
|
1245
|
+
const onboardingRedirectAwaitingCtaButton = "Continue";
|
|
1246
|
+
const onboardingRedirectInReviewDescriptionP1 = "We’re reviewing your details. It might take up to 2 business days.";
|
|
1247
|
+
const onboardingRedirectInReviewCtaButton = "Go to details";
|
|
1248
|
+
const onboardingRedirectUnsuccessfulDescriptionP1 = "We couldn’t verify some details. Check if they’re correct and make any updates needed.";
|
|
1249
|
+
const onboardingRedirectUnsuccessfulCtaButton = "Update details";
|
|
1250
|
+
const onboardingRedirectRejectedDescriptionP1 = "Your account can’t be set up.";
|
|
1251
|
+
const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
|
|
1257
1252
|
const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
|
|
1258
1253
|
const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
|
|
1259
1254
|
const addBankDetails = "Add bank details";
|
|
@@ -2495,19 +2490,14 @@ const defaultTrans = {
|
|
|
2495
2490
|
introductionScreenEpilogueDescriptionP1,
|
|
2496
2491
|
introductionScreenEpilogueDescriptionP2,
|
|
2497
2492
|
oib,
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
onboardingRedirectErrorsDescriptionP2,
|
|
2507
|
-
onboardingRedirectErrorsCtaButton,
|
|
2508
|
-
onboardingRedirectFinishedHeader,
|
|
2509
|
-
onboardingRedirectFinishedDescriptionP1,
|
|
2510
|
-
onboardingRedirectFinishedCtaButton,
|
|
2493
|
+
onboardingRedirectAwaitingDescriptionP1,
|
|
2494
|
+
onboardingRedirectAwaitingCtaButton,
|
|
2495
|
+
onboardingRedirectInReviewDescriptionP1,
|
|
2496
|
+
onboardingRedirectInReviewCtaButton,
|
|
2497
|
+
onboardingRedirectUnsuccessfulDescriptionP1,
|
|
2498
|
+
onboardingRedirectUnsuccessfulCtaButton,
|
|
2499
|
+
onboardingRedirectRejectedDescriptionP1,
|
|
2500
|
+
onboardingRedirectVerifiedDescriptionP1,
|
|
2511
2501
|
onboardingRedirectLinkError,
|
|
2512
2502
|
onboardingRedirectOpenError,
|
|
2513
2503
|
addBankDetails,
|
|
@@ -2750,7 +2740,6 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
|
2750
2740
|
SettingNames2["AllowIntraRegionCrossBorderPayout"] = "allowIntraRegionCrossBorderPayout";
|
|
2751
2741
|
SettingNames2["AllowLegalEntityTypeChange"] = "changeLegalEntityType";
|
|
2752
2742
|
SettingNames2["AllowPrefilledCountryEdit"] = "editPrefilledCountry";
|
|
2753
|
-
SettingNames2["LimitToOneTransferInstrument"] = "limitToOneTransferInstrument";
|
|
2754
2743
|
SettingNames2["RequirePciSignEcommerce"] = "requirePciSignEcommerce";
|
|
2755
2744
|
SettingNames2["RequirePciSignPos"] = "requirePciSignPos";
|
|
2756
2745
|
SettingNames2["RequirePciSignEcomMoto"] = "requirePciSignEcomMoto";
|
|
@@ -2759,6 +2748,7 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
|
2759
2748
|
SettingNames2["HideOnboardingIntroductionOrganization"] = "hideOnboardingIntroductionOrganization";
|
|
2760
2749
|
SettingNames2["HideOnboardingIntroductionTrust"] = "hideOnboardingIntroductionTrust";
|
|
2761
2750
|
SettingNames2["HideOnboardingIntroductionSoleProprietor"] = "hideOnboardingIntroductionSoleProprietor";
|
|
2751
|
+
SettingNames2["TransferInstrumentLimit"] = "transferInstrumentLimit";
|
|
2762
2752
|
SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
|
|
2763
2753
|
return SettingNames2;
|
|
2764
2754
|
})(SettingNames || {});
|
|
@@ -6238,6 +6228,102 @@ const isValueObscured = (value) => {
|
|
|
6238
6228
|
var _a;
|
|
6239
6229
|
return typeof value === "string" && !!((_a = value.match(/[*]{1,}/)) == null ? void 0 : _a.length);
|
|
6240
6230
|
};
|
|
6231
|
+
const shiftRight = (possibleShifts, matchedTokens, remainingTokens) => {
|
|
6232
|
+
let shiftsToTry = [...possibleShifts];
|
|
6233
|
+
let current = {
|
|
6234
|
+
matchedTokens,
|
|
6235
|
+
remainingTokens
|
|
6236
|
+
};
|
|
6237
|
+
while (current.remainingTokens.length > 0 && shiftsToTry.length > 0) {
|
|
6238
|
+
const possibleShift = shiftsToTry[0];
|
|
6239
|
+
const shifted = tryShift(current.matchedTokens, current.remainingTokens, possibleShift.fromIndex, possibleShift.shiftDistance);
|
|
6240
|
+
if (shifted === "notPossible") {
|
|
6241
|
+
shiftsToTry = shiftsToTry.slice(1);
|
|
6242
|
+
} else {
|
|
6243
|
+
current = shifted;
|
|
6244
|
+
shiftsToTry = [...possibleShifts];
|
|
6245
|
+
}
|
|
6246
|
+
}
|
|
6247
|
+
return current;
|
|
6248
|
+
};
|
|
6249
|
+
const findPossibleShifts = (mask) => {
|
|
6250
|
+
const inputOnlyMask = mask.filter((t) => t.type === "input");
|
|
6251
|
+
const optionals = inputOnlyMask.filter((t) => t.optional);
|
|
6252
|
+
const possibleShifts = [];
|
|
6253
|
+
for (const optional of optionals) {
|
|
6254
|
+
const index = inputOnlyMask.indexOf(optional);
|
|
6255
|
+
for (let i = index + 1; i < inputOnlyMask.length; i += 1) {
|
|
6256
|
+
const laterToken = inputOnlyMask[i];
|
|
6257
|
+
if (laterToken.type === "input") {
|
|
6258
|
+
possibleShifts.push({
|
|
6259
|
+
fromIndex: index,
|
|
6260
|
+
shiftDistance: i - index
|
|
6261
|
+
});
|
|
6262
|
+
}
|
|
6263
|
+
}
|
|
6264
|
+
}
|
|
6265
|
+
return possibleShifts.sort((s1, s2) => {
|
|
6266
|
+
if (s1.fromIndex === s2.fromIndex) {
|
|
6267
|
+
return s2.shiftDistance - s1.shiftDistance;
|
|
6268
|
+
}
|
|
6269
|
+
return s1.fromIndex - s2.fromIndex;
|
|
6270
|
+
});
|
|
6271
|
+
};
|
|
6272
|
+
const tryShift = (matchedTokens, remainingTokens, fromIndex, shiftDistance) => {
|
|
6273
|
+
const normalizedTokens = [...matchedTokens.map((token, i) => ({
|
|
6274
|
+
...token,
|
|
6275
|
+
currentValue: token.char,
|
|
6276
|
+
originalIndex: i
|
|
6277
|
+
})), ...remainingTokens.map((token, i) => ({
|
|
6278
|
+
...token,
|
|
6279
|
+
currentValue: null,
|
|
6280
|
+
originalIndex: i + matchedTokens.length
|
|
6281
|
+
}))];
|
|
6282
|
+
const normalizedInputTokens = normalizedTokens.filter((token) => token.type === "input");
|
|
6283
|
+
if (normalizedTokens[fromIndex].currentValue === null) {
|
|
6284
|
+
return "notPossible";
|
|
6285
|
+
}
|
|
6286
|
+
const emptyInputsAfter = normalizedInputTokens.slice(fromIndex + 1).filter((t) => !t.currentValue);
|
|
6287
|
+
if (shiftDistance > emptyInputsAfter.length) {
|
|
6288
|
+
return "notPossible";
|
|
6289
|
+
}
|
|
6290
|
+
for (let i = 0; i < normalizedInputTokens.length; i += 1) {
|
|
6291
|
+
const token = normalizedInputTokens[i];
|
|
6292
|
+
if (i < fromIndex) {
|
|
6293
|
+
token.potentialValue = token.currentValue;
|
|
6294
|
+
} else if (i < fromIndex + shiftDistance) {
|
|
6295
|
+
token.potentialValue = null;
|
|
6296
|
+
} else {
|
|
6297
|
+
token.potentialValue = normalizedInputTokens[i - shiftDistance].currentValue;
|
|
6298
|
+
}
|
|
6299
|
+
}
|
|
6300
|
+
const allValid = normalizedInputTokens.every((token) => {
|
|
6301
|
+
var _a;
|
|
6302
|
+
if (!token.potentialValue) {
|
|
6303
|
+
return token.optional;
|
|
6304
|
+
}
|
|
6305
|
+
return ((_a = token.allow) == null ? void 0 : _a.test(token.potentialValue)) ?? true;
|
|
6306
|
+
});
|
|
6307
|
+
if (!allValid)
|
|
6308
|
+
return "notPossible";
|
|
6309
|
+
let matchedUpTo = 0;
|
|
6310
|
+
for (let i = 0; i < normalizedTokens.length; i += 1) {
|
|
6311
|
+
const token = normalizedInputTokens.find((t) => t.originalIndex === i) ?? normalizedTokens[i];
|
|
6312
|
+
if (token.type === "input" && !token.potentialValue && !token.optional) {
|
|
6313
|
+
break;
|
|
6314
|
+
}
|
|
6315
|
+
matchedUpTo = i + 1;
|
|
6316
|
+
}
|
|
6317
|
+
const newMatchedTokens = normalizedTokens.slice(0, matchedUpTo).map((token) => ({
|
|
6318
|
+
...token,
|
|
6319
|
+
char: token.type === "nonInput" ? token.char : token.potentialValue
|
|
6320
|
+
}));
|
|
6321
|
+
const newRemainingTokens = normalizedTokens.slice(matchedUpTo);
|
|
6322
|
+
return {
|
|
6323
|
+
matchedTokens: newMatchedTokens,
|
|
6324
|
+
remainingTokens: newRemainingTokens
|
|
6325
|
+
};
|
|
6326
|
+
};
|
|
6241
6327
|
const getAvailableInputTokens = (tokens) => {
|
|
6242
6328
|
const availableTokens = [];
|
|
6243
6329
|
for (const token of tokens) {
|
|
@@ -6280,7 +6366,7 @@ const matchAgainstMask = (pureValue, mask, acceptObscuredValue = false) => {
|
|
|
6280
6366
|
let tokensToProcess = [...mask.tokens];
|
|
6281
6367
|
let charsToProcess = pureValue;
|
|
6282
6368
|
let charIndex = 0;
|
|
6283
|
-
let
|
|
6369
|
+
let matchedTokens = [];
|
|
6284
6370
|
if (acceptObscuredValue && isValueObscured(pureValue)) {
|
|
6285
6371
|
return {
|
|
6286
6372
|
outcome: "obscureCorrect",
|
|
@@ -6294,27 +6380,32 @@ const matchAgainstMask = (pureValue, mask, acceptObscuredValue = false) => {
|
|
|
6294
6380
|
const shiftTokens = (increment) => {
|
|
6295
6381
|
tokensToProcess = tokensToProcess.slice(increment);
|
|
6296
6382
|
};
|
|
6383
|
+
const displayValue = () => matchedTokens.map((token) => token.char).join("");
|
|
6297
6384
|
while (true) {
|
|
6298
6385
|
const char = charsToProcess[0];
|
|
6299
6386
|
const token = tokensToProcess[0];
|
|
6300
6387
|
if (!char && !tokensToProcess.some((t) => t.type === "input" && !t.optional))
|
|
6301
6388
|
return {
|
|
6302
6389
|
outcome: "correct",
|
|
6303
|
-
displayValue: displayValue + getEagerSuffix(tokensToProcess),
|
|
6390
|
+
displayValue: displayValue() + getEagerSuffix(tokensToProcess),
|
|
6304
6391
|
potentialForMoreOptionalInput: getPotentialForMoreOptionalInput(tokensToProcess)
|
|
6305
6392
|
};
|
|
6306
|
-
if (!char)
|
|
6393
|
+
if (!char) {
|
|
6394
|
+
const output = shiftRight(mask.possibleShifts, matchedTokens, tokensToProcess);
|
|
6395
|
+
matchedTokens = output.matchedTokens;
|
|
6396
|
+
tokensToProcess = output.remainingTokens;
|
|
6307
6397
|
return {
|
|
6308
6398
|
outcome: "partialCorrect",
|
|
6309
|
-
displayValue: displayValue + getEagerSuffix(tokensToProcess)
|
|
6399
|
+
displayValue: displayValue() + getEagerSuffix(tokensToProcess)
|
|
6310
6400
|
};
|
|
6401
|
+
}
|
|
6311
6402
|
if (!token)
|
|
6312
6403
|
return {
|
|
6313
6404
|
outcome: "mismatch",
|
|
6314
6405
|
badChar: char,
|
|
6315
6406
|
mismatchAtChar: charIndex,
|
|
6316
6407
|
mismatchedToken: "inputTooLong",
|
|
6317
|
-
partialDisplayValue: displayValue
|
|
6408
|
+
partialDisplayValue: displayValue()
|
|
6318
6409
|
};
|
|
6319
6410
|
if (token.type === "nonInput") {
|
|
6320
6411
|
if (token.includeInValue) {
|
|
@@ -6324,11 +6415,11 @@ const matchAgainstMask = (pureValue, mask, acceptObscuredValue = false) => {
|
|
|
6324
6415
|
badChar: char,
|
|
6325
6416
|
mismatchAtChar: charIndex,
|
|
6326
6417
|
mismatchedToken: token,
|
|
6327
|
-
partialDisplayValue: displayValue
|
|
6418
|
+
partialDisplayValue: displayValue()
|
|
6328
6419
|
};
|
|
6329
6420
|
shiftChars(1);
|
|
6330
6421
|
}
|
|
6331
|
-
|
|
6422
|
+
matchedTokens.push(token);
|
|
6332
6423
|
shiftTokens(1);
|
|
6333
6424
|
}
|
|
6334
6425
|
if (token.type === "input") {
|
|
@@ -6340,9 +6431,12 @@ const matchAgainstMask = (pureValue, mask, acceptObscuredValue = false) => {
|
|
|
6340
6431
|
badChar: char,
|
|
6341
6432
|
mismatchAtChar: charIndex,
|
|
6342
6433
|
mismatchedToken: token,
|
|
6343
|
-
partialDisplayValue: displayValue
|
|
6434
|
+
partialDisplayValue: displayValue()
|
|
6344
6435
|
};
|
|
6345
|
-
|
|
6436
|
+
matchedTokens.push({
|
|
6437
|
+
...matchingToken,
|
|
6438
|
+
char
|
|
6439
|
+
});
|
|
6346
6440
|
shiftTokens(matchingToken.offset + 1);
|
|
6347
6441
|
shiftChars(1);
|
|
6348
6442
|
}
|
|
@@ -6797,7 +6891,8 @@ const customInputs = (length, regex, optional = false) => makeArrayOfRepeatedObj
|
|
|
6797
6891
|
optional
|
|
6798
6892
|
});
|
|
6799
6893
|
const makeMask = (...tokens) => ({
|
|
6800
|
-
tokens
|
|
6894
|
+
tokens,
|
|
6895
|
+
possibleShifts: findPossibleShifts(tokens)
|
|
6801
6896
|
});
|
|
6802
6897
|
const uppercase = (str) => (str == null ? void 0 : str.toUpperCase()) ?? str;
|
|
6803
6898
|
const businessRegistrationNumberMasks = {
|
|
@@ -8222,13 +8317,16 @@ var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
|
8222
8317
|
function CollapsibleContainer({
|
|
8223
8318
|
children,
|
|
8224
8319
|
collapsed = false,
|
|
8225
|
-
animationDuration
|
|
8320
|
+
animationDuration = 0
|
|
8226
8321
|
}) {
|
|
8227
8322
|
const collapsibleContainerEl = useRef(null);
|
|
8228
8323
|
const [height, setHeight] = useState(collapsed ? 0 : void 0);
|
|
8229
8324
|
useEffect(() => {
|
|
8230
8325
|
var _a;
|
|
8231
8326
|
setHeight(collapsed ? 0 : (_a = collapsibleContainerEl.current) == null ? void 0 : _a.scrollHeight);
|
|
8327
|
+
setTimeout(() => {
|
|
8328
|
+
setHeight(collapsed ? 0 : "auto");
|
|
8329
|
+
}, animationDuration * 1e3);
|
|
8232
8330
|
}, [collapsed]);
|
|
8233
8331
|
return jsx("div", {
|
|
8234
8332
|
className: "adyen-collapsible-container",
|
|
@@ -8236,7 +8334,7 @@ function CollapsibleContainer({
|
|
|
8236
8334
|
ref: collapsibleContainerEl,
|
|
8237
8335
|
style: {
|
|
8238
8336
|
height,
|
|
8239
|
-
transitionDuration: animationDuration
|
|
8337
|
+
transitionDuration: `${animationDuration}s`
|
|
8240
8338
|
},
|
|
8241
8339
|
children
|
|
8242
8340
|
});
|
|
@@ -8335,7 +8433,7 @@ function AccordionItem({
|
|
|
8335
8433
|
}) : null]
|
|
8336
8434
|
}), jsx(CollapsibleContainer, {
|
|
8337
8435
|
collapsed: !isOpen,
|
|
8338
|
-
animationDuration:
|
|
8436
|
+
animationDuration: 0.1,
|
|
8339
8437
|
children: jsx("div", {
|
|
8340
8438
|
className: "adl-accordion__content",
|
|
8341
8439
|
children
|
|
@@ -10606,7 +10704,8 @@ function AccountHolder(props) {
|
|
|
10606
10704
|
const defaultData = {
|
|
10607
10705
|
accountHolder: isDefaultOptionAvailable ? (_a = props.data) == null ? void 0 : _a.accountHolder : void 0
|
|
10608
10706
|
};
|
|
10609
|
-
|
|
10707
|
+
const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
|
|
10708
|
+
if (isNewEntryFlowEnabled && defaultData) {
|
|
10610
10709
|
defaultData.accountHolder = accountHolder2 || defaultData.accountHolder;
|
|
10611
10710
|
}
|
|
10612
10711
|
const {
|
|
@@ -10645,6 +10744,9 @@ function AccountHolder(props) {
|
|
|
10645
10744
|
label: questionLabel,
|
|
10646
10745
|
errorMessage: formUtils.getErrorMessage("accountHolder", errors, fieldProblems),
|
|
10647
10746
|
isValid: valid.accountHolder,
|
|
10747
|
+
className: cx({
|
|
10748
|
+
"adl-u-display-none": isNewEntryFlowEnabled
|
|
10749
|
+
}),
|
|
10648
10750
|
classNameModifiers: ["account-holder"],
|
|
10649
10751
|
children: (childProps) => jsx(Select, {
|
|
10650
10752
|
...childProps,
|
|
@@ -13158,11 +13260,6 @@ const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount2, bankCou
|
|
|
13158
13260
|
...localAccount,
|
|
13159
13261
|
routingNumber: payoutAccount2.branchCode
|
|
13160
13262
|
};
|
|
13161
|
-
case "noLocal":
|
|
13162
|
-
return {
|
|
13163
|
-
type: "noLocal",
|
|
13164
|
-
accountNumber: `${payoutAccount2.bankCode}${payoutAccount2.bankAccountNumber}`
|
|
13165
|
-
};
|
|
13166
13263
|
case "huLocal":
|
|
13167
13264
|
case "plLocal":
|
|
13168
13265
|
default:
|
|
@@ -17497,7 +17594,7 @@ function PersonalDetailsComponent(props) {
|
|
|
17497
17594
|
"aria-label": formUtils.getLabel("jobTitle"),
|
|
17498
17595
|
"aria-invalid": !valid.birthDate
|
|
17499
17596
|
})
|
|
17500
|
-
}),
|
|
17597
|
+
}), formUtils.isRequiredField("accountHolder") && data.residencyCountry && jsx(AccountHolder, {
|
|
17501
17598
|
...accountHolderProps,
|
|
17502
17599
|
country: data.residencyCountry,
|
|
17503
17600
|
dataStoreId: PERSONAL_DETAILS,
|
|
@@ -19373,7 +19470,7 @@ const defaultFieldMetadata$4 = {
|
|
|
19373
19470
|
};
|
|
19374
19471
|
const defaultFieldConfig$4 = {
|
|
19375
19472
|
[CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
|
|
19376
|
-
[CountryCodes.Norway]: simpleBankAccountNumberMetadata("
|
|
19473
|
+
[CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
|
|
19377
19474
|
[CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
|
|
19378
19475
|
[CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
|
|
19379
19476
|
[CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
|
|
@@ -19967,9 +20064,7 @@ const ibanMask = (country2, inputLength, allowLettersInBban) => {
|
|
|
19967
20064
|
tokens.push(spacer, ...inputToken(remainder));
|
|
19968
20065
|
}
|
|
19969
20066
|
return {
|
|
19970
|
-
mask:
|
|
19971
|
-
tokens
|
|
19972
|
-
},
|
|
20067
|
+
mask: makeMask(...tokens),
|
|
19973
20068
|
transformOnType: allowLettersInBban ? uppercase : void 0
|
|
19974
20069
|
};
|
|
19975
20070
|
};
|
|
@@ -25695,7 +25790,7 @@ const CompanyStructureValidation = {
|
|
|
25695
25790
|
};
|
|
25696
25791
|
const COMPANY_STRUCTURE_FORM_ID = "companyStructure";
|
|
25697
25792
|
const companyStructureFields = ["entityType"];
|
|
25698
|
-
function
|
|
25793
|
+
function CompanyStructureComponent({
|
|
25699
25794
|
data,
|
|
25700
25795
|
labels: labels2,
|
|
25701
25796
|
heading,
|
|
@@ -25709,6 +25804,7 @@ function CompanyStructure({
|
|
|
25709
25804
|
const {
|
|
25710
25805
|
i18n
|
|
25711
25806
|
} = useI18nContext();
|
|
25807
|
+
const isNewEntryFlowEnabled = useEnableNewEntryFlow();
|
|
25712
25808
|
const {
|
|
25713
25809
|
updateStateSlice
|
|
25714
25810
|
} = useGlobalDataSlice(COMPANY_STRUCTURE_FORM_ID);
|
|
@@ -25751,6 +25847,7 @@ function CompanyStructure({
|
|
|
25751
25847
|
fieldProblems: formFieldProblems
|
|
25752
25848
|
});
|
|
25753
25849
|
}, [formSchema, formData, formErrors, formValid, formFieldProblems, updateStateSlice]);
|
|
25850
|
+
const companyTypeOptions = isNewEntryFlowEnabled ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
|
|
25754
25851
|
return jsxs("form", {
|
|
25755
25852
|
children: [jsx(FormHeader, {
|
|
25756
25853
|
heading,
|
|
@@ -25771,8 +25868,8 @@ function CompanyStructure({
|
|
|
25771
25868
|
"aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
|
|
25772
25869
|
"aria-invalid": !formValid.entityType,
|
|
25773
25870
|
name: "entityType",
|
|
25774
|
-
items:
|
|
25775
|
-
selected:
|
|
25871
|
+
items: companyTypeOptions,
|
|
25872
|
+
selected: companyTypeOptions.find((type) => type.id === (formData == null ? void 0 : formData.entityType)),
|
|
25776
25873
|
readonly: disabled,
|
|
25777
25874
|
isItemDisabled: () => disabled,
|
|
25778
25875
|
onSelect: (item) => handleChangeFor("entityType")(item.id)
|
|
@@ -25780,7 +25877,6 @@ function CompanyStructure({
|
|
|
25780
25877
|
})]
|
|
25781
25878
|
});
|
|
25782
25879
|
}
|
|
25783
|
-
const CompanyStructureComponent = memo(CompanyStructure, (prevProps, nextProps) => objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.labels, nextProps.labels) && objectsDeepEqual(prevProps.heading, nextProps.heading) && objectsDeepEqual(prevProps.description, nextProps.description) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && prevProps.kompanyVerifiedData === nextProps.kompanyVerifiedData);
|
|
25784
25880
|
const forms = {
|
|
25785
25881
|
companyBasics: {
|
|
25786
25882
|
formId: "companyBasics",
|
|
@@ -26675,15 +26771,22 @@ function useAssociatedLegalArrangement({
|
|
|
26675
26771
|
}) {
|
|
26676
26772
|
const [associatedLegalArrangement, setAssociatedLegalArrangement] = useState();
|
|
26677
26773
|
const getAssociatedEntity = useCallback(async (entityId) => getLegalEntity2 == null ? void 0 : getLegalEntity2(entityId), [getLegalEntity2]);
|
|
26678
|
-
|
|
26774
|
+
const refreshAssociatedLegalArrangement = useCallback(() => {
|
|
26679
26775
|
var _a;
|
|
26680
26776
|
const foundEntity = (_a = rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations) == null ? void 0 : _a.find((entity) => entity.type === LegalEntityType.SOLE_PROPRIETORSHIP || entity.type === LegalEntityType.TRUST);
|
|
26681
26777
|
if (foundEntity == null ? void 0 : foundEntity.legalEntityId) {
|
|
26682
26778
|
getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$e.error);
|
|
26683
26779
|
}
|
|
26684
26780
|
}, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
|
|
26781
|
+
useEffect(() => {
|
|
26782
|
+
if (!associatedLegalArrangement) {
|
|
26783
|
+
refreshAssociatedLegalArrangement();
|
|
26784
|
+
}
|
|
26785
|
+
}, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
|
|
26685
26786
|
return {
|
|
26686
|
-
associatedLegalArrangement
|
|
26787
|
+
associatedLegalArrangement,
|
|
26788
|
+
setAssociatedLegalArrangement,
|
|
26789
|
+
refreshAssociatedLegalArrangement
|
|
26687
26790
|
};
|
|
26688
26791
|
}
|
|
26689
26792
|
const logger$d = createLogger("useExemptSettlor");
|
|
@@ -26698,7 +26801,7 @@ const useExemptSettlor = ({
|
|
|
26698
26801
|
setExemptSettlor(exemptSettlorLE);
|
|
26699
26802
|
}, [handleGetLegalEntity]);
|
|
26700
26803
|
useEffect(() => {
|
|
26701
|
-
if (!trust2)
|
|
26804
|
+
if (!(trust2 == null ? void 0 : trust2.trust))
|
|
26702
26805
|
return;
|
|
26703
26806
|
updateExemptSettlor(trust2).catch(logger$d.error);
|
|
26704
26807
|
}, [trust2, updateExemptSettlor]);
|
|
@@ -26730,26 +26833,6 @@ function useSalesChannelsSettings() {
|
|
|
26730
26833
|
return settings;
|
|
26731
26834
|
}, [isSettingEnabled]);
|
|
26732
26835
|
}
|
|
26733
|
-
const logger$c = createLogger("useTrust");
|
|
26734
|
-
const useTrust = ({
|
|
26735
|
-
rootLegalEntity,
|
|
26736
|
-
handleGetLegalEntity
|
|
26737
|
-
}) => {
|
|
26738
|
-
const [trust2, setTrust] = useState();
|
|
26739
|
-
const refreshTrust = useCallback(async () => {
|
|
26740
|
-
var _a, _b;
|
|
26741
|
-
const trustId = (_b = (_a = rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations) == null ? void 0 : _a.find((association2) => association2.type === LegalEntityType.TRUST)) == null ? void 0 : _b.legalEntityId;
|
|
26742
|
-
const trustLE = trustId ? await handleGetLegalEntity(trustId) : void 0;
|
|
26743
|
-
setTrust(trustLE);
|
|
26744
|
-
return trustLE;
|
|
26745
|
-
}, [handleGetLegalEntity]);
|
|
26746
|
-
useEffect(() => {
|
|
26747
|
-
if (hasOwnEntityAssociationOfType(LegalEntityType.TRUST, rootLegalEntity.entityAssociations, rootLegalEntity.id)) {
|
|
26748
|
-
refreshTrust().catch(logger$c.error);
|
|
26749
|
-
}
|
|
26750
|
-
}, [refreshTrust]);
|
|
26751
|
-
return [trust2, refreshTrust];
|
|
26752
|
-
};
|
|
26753
26836
|
const downloadFile = async (base64, filename) => {
|
|
26754
26837
|
saveBlobAsFile(base64ToBlob(base64), filename);
|
|
26755
26838
|
};
|
|
@@ -28816,7 +28899,7 @@ function TaskListComponent({
|
|
|
28816
28899
|
const {
|
|
28817
28900
|
isExperimentEnabled
|
|
28818
28901
|
} = useExperimentsContext();
|
|
28819
|
-
const
|
|
28902
|
+
const transferInstrumentLimit = useSetting("transferInstrumentLimit");
|
|
28820
28903
|
const isEnableNewEntryFlowEnabled = useEnableNewEntryFlow();
|
|
28821
28904
|
const canSeeIntroduction = useCanSeeIntroduction({
|
|
28822
28905
|
legalEntity: legalEntityResponse
|
|
@@ -28964,7 +29047,7 @@ function TaskListComponent({
|
|
|
28964
29047
|
capabilityProblems,
|
|
28965
29048
|
onNavigateToTask: () => handleOnNavigateToTaskPayout(transferInstrument.id),
|
|
28966
29049
|
onTransferInstrumentDelete: () => onTransferInstrumentDelete(transferInstrument.id)
|
|
28967
|
-
}, transferInstrument.id)), !
|
|
29050
|
+
}, transferInstrument.id)), !transferInstrumentLimit || transferInstruments.length < transferInstrumentLimit ? jsxs(Card, {
|
|
28968
29051
|
stateful: true,
|
|
28969
29052
|
onClick: () => handleOnNavigateToTaskPayout(),
|
|
28970
29053
|
className: "adyen-task adl-add-payout",
|
|
@@ -29870,7 +29953,7 @@ const useBankConfigurationHandlers = ({
|
|
|
29870
29953
|
getBankVerificationVendorsHandler
|
|
29871
29954
|
};
|
|
29872
29955
|
};
|
|
29873
|
-
const accountFormatsImports = /* @__PURE__ */ Object.assign({ "./AD.json": () => import("./AD-rNM7cqE8.js"), "./AE.json": () => import("./AE-DoU2c3CQ.js"), "./AI.json": () => import("./AI-BQBZ2VVt.js"), "./AL.json": () => import("./AL-s4ei1ra4.js"), "./AR.json": () => import("./AR-DDR8RTlN.js"), "./AS.json": () => import("./AS-CvpjtIPo.js"), "./AT.json": () => import("./AT-Du3jf0QK.js"), "./AU.json": () => import("./AU-CaRlRNzq.js"), "./AX.json": () => import("./AX-DL2IpBlq.js"), "./AZ.json": () => import("./AZ-DgnKHqSW.js"), "./BA.json": () => import("./BA-DbzAHDbo.js"), "./BE.json": () => import("./BE-B8RVrEa-.js"), "./BG.json": () => import("./BG-BAU_RbNU.js"), "./BH.json": () => import("./BH-zzl3Aicz.js"), "./BM.json": () => import("./BM-Bx0QpJE_.js"), "./BR.json": () => import("./BR-CcE5GVb_.js"), "./BS.json": () => import("./BS-C5xv5epf.js"), "./BV.json": () => import("./BV-BO7Uhvet.js"), "./BY.json": () => import("./BY-Dn7i3b4O.js"), "./CA.json": () => import("./CA-BzjyYlZe.js"), "./CH.json": () => import("./CH-BvlOBUqB.js"), "./CN.json": () => import("./CN-y0BC6iBw.js"), "./CR.json": () => import("./CR-tTzdtq6M.js"), "./CY.json": () => import("./CY-Bjyj7q7k.js"), "./CZ.json": () => import("./CZ-DdsXQiz6.js"), "./DE.json": () => import("./DE-k6sF_Z8P.js"), "./DK.json": () => import("./DK-CUWikATU.js"), "./DO.json": () => import("./DO-DpDyoh4y.js"), "./EC.json": () => import("./EC--TPKDJme.js"), "./EE.json": () => import("./EE-o0O1NAuh.js"), "./ES.json": () => import("./ES-8DboqUrj.js"), "./FI.json": () => import("./FI-CwVBRBBQ.js"), "./FJ.json": () => import("./FJ-DkKmOAd6.js"), "./FO.json": () => import("./FO-BCZCVxXR.js"), "./FR.json": () => import("./FR-NtJ3QSfd.js"), "./GB.json": () => import("./GB-BhRiUVO6.js"), "./GE.json": () => import("./GE--9n2R8_p.js"), "./GF.json": () => import("./GF-BeND08-O.js"), "./GG.json": () => import("./GG-DcYzHlYO.js"), "./GI.json": () => import("./GI-BWXRySSY.js"), "./GL.json": () => import("./GL-Cu7M9Xnx.js"), "./GP.json": () => import("./GP-Dm3WhONm.js"), "./GR.json": () => import("./GR-C0snveYS.js"), "./GT.json": () => import("./GT-BykjfmEK.js"), "./GU.json": () => import("./GU-oom5Ehbd.js"), "./HK.json": () => import("./HK-Dr5b-SwK.js"), "./HR.json": () => import("./HR-DKAQpsSV.js"), "./HU.json": () => import("./HU-DJWWX_5P.js"), "./ID.json": () => import("./ID-BWJvoyJo.js"), "./IE.json": () => import("./IE-BPh0CHaO.js"), "./IL.json": () => import("./IL-B8E0HdBj.js"), "./IM.json": () => import("./IM-ClrsAYLm.js"), "./IN.json": () => import("./IN-CVsYzQzI.js"), "./IS.json": () => import("./IS-BkDwjQHz.js"), "./IT.json": () => import("./IT-B3cLskCx.js"), "./JE.json": () => import("./JE-C8HBNrJn.js"), "./JM.json": () => import("./JM-CH_LXMnd.js"), "./JO.json": () => import("./JO-CD_uH_Uk.js"), "./JP.json": () => import("./JP-DtK_xb_Y.js"), "./KR.json": () => import("./KR-DBPY5awJ.js"), "./KW.json": () => import("./KW-CiSCIyPm.js"), "./KY.json": () => import("./KY-FU9AuEMz.js"), "./KZ.json": () => import("./KZ-CMFj-_rM.js"), "./LB.json": () => import("./LB-BRGM3Yl3.js"), "./LI.json": () => import("./LI-DlCX-3GD.js"), "./LT.json": () => import("./LT-XRkygwh8.js"), "./LU.json": () => import("./LU-CV14IXAu.js"), "./LV.json": () => import("./LV-ByV8yuF8.js"), "./MC.json": () => import("./MC-CwHePfdt.js"), "./MD.json": () => import("./MD-_IIMR66Q.js"), "./ME.json": () => import("./ME-Cfx8llkg.js"), "./MK.json": () => import("./MK-CEzz7Z_a.js"), "./MP.json": () => import("./MP-C5acK0KC.js"), "./MQ.json": () => import("./MQ-BEZo6wPU.js"), "./MR.json": () => import("./MR-BoFyF5R-.js"), "./MT.json": () => import("./MT-C_-lQGuI.js"), "./MU.json": () => import("./MU-_tM1ai_B.js"), "./MX.json": () => import("./MX-eayygS1f.js"), "./MY.json": () => import("./MY-CsKpuB-w.js"), "./NC.json": () => import("./NC-Bel2A-Fk.js"), "./NL.json": () => import("./NL-C3LxWTQ7.js"), "./NO.json": () => import("./NO-
|
|
29956
|
+
const accountFormatsImports = /* @__PURE__ */ Object.assign({ "./AD.json": () => import("./AD-rNM7cqE8.js"), "./AE.json": () => import("./AE-DoU2c3CQ.js"), "./AI.json": () => import("./AI-BQBZ2VVt.js"), "./AL.json": () => import("./AL-s4ei1ra4.js"), "./AR.json": () => import("./AR-DDR8RTlN.js"), "./AS.json": () => import("./AS-CvpjtIPo.js"), "./AT.json": () => import("./AT-Du3jf0QK.js"), "./AU.json": () => import("./AU-CaRlRNzq.js"), "./AX.json": () => import("./AX-DL2IpBlq.js"), "./AZ.json": () => import("./AZ-DgnKHqSW.js"), "./BA.json": () => import("./BA-DbzAHDbo.js"), "./BE.json": () => import("./BE-B8RVrEa-.js"), "./BG.json": () => import("./BG-BAU_RbNU.js"), "./BH.json": () => import("./BH-zzl3Aicz.js"), "./BM.json": () => import("./BM-Bx0QpJE_.js"), "./BR.json": () => import("./BR-CcE5GVb_.js"), "./BS.json": () => import("./BS-C5xv5epf.js"), "./BV.json": () => import("./BV-BO7Uhvet.js"), "./BY.json": () => import("./BY-Dn7i3b4O.js"), "./CA.json": () => import("./CA-BzjyYlZe.js"), "./CH.json": () => import("./CH-BvlOBUqB.js"), "./CN.json": () => import("./CN-y0BC6iBw.js"), "./CR.json": () => import("./CR-tTzdtq6M.js"), "./CY.json": () => import("./CY-Bjyj7q7k.js"), "./CZ.json": () => import("./CZ-DdsXQiz6.js"), "./DE.json": () => import("./DE-k6sF_Z8P.js"), "./DK.json": () => import("./DK-CUWikATU.js"), "./DO.json": () => import("./DO-DpDyoh4y.js"), "./EC.json": () => import("./EC--TPKDJme.js"), "./EE.json": () => import("./EE-o0O1NAuh.js"), "./ES.json": () => import("./ES-8DboqUrj.js"), "./FI.json": () => import("./FI-CwVBRBBQ.js"), "./FJ.json": () => import("./FJ-DkKmOAd6.js"), "./FO.json": () => import("./FO-BCZCVxXR.js"), "./FR.json": () => import("./FR-NtJ3QSfd.js"), "./GB.json": () => import("./GB-BhRiUVO6.js"), "./GE.json": () => import("./GE--9n2R8_p.js"), "./GF.json": () => import("./GF-BeND08-O.js"), "./GG.json": () => import("./GG-DcYzHlYO.js"), "./GI.json": () => import("./GI-BWXRySSY.js"), "./GL.json": () => import("./GL-Cu7M9Xnx.js"), "./GP.json": () => import("./GP-Dm3WhONm.js"), "./GR.json": () => import("./GR-C0snveYS.js"), "./GT.json": () => import("./GT-BykjfmEK.js"), "./GU.json": () => import("./GU-oom5Ehbd.js"), "./HK.json": () => import("./HK-Dr5b-SwK.js"), "./HR.json": () => import("./HR-DKAQpsSV.js"), "./HU.json": () => import("./HU-DJWWX_5P.js"), "./ID.json": () => import("./ID-BWJvoyJo.js"), "./IE.json": () => import("./IE-BPh0CHaO.js"), "./IL.json": () => import("./IL-B8E0HdBj.js"), "./IM.json": () => import("./IM-ClrsAYLm.js"), "./IN.json": () => import("./IN-CVsYzQzI.js"), "./IS.json": () => import("./IS-BkDwjQHz.js"), "./IT.json": () => import("./IT-B3cLskCx.js"), "./JE.json": () => import("./JE-C8HBNrJn.js"), "./JM.json": () => import("./JM-CH_LXMnd.js"), "./JO.json": () => import("./JO-CD_uH_Uk.js"), "./JP.json": () => import("./JP-DtK_xb_Y.js"), "./KR.json": () => import("./KR-DBPY5awJ.js"), "./KW.json": () => import("./KW-CiSCIyPm.js"), "./KY.json": () => import("./KY-FU9AuEMz.js"), "./KZ.json": () => import("./KZ-CMFj-_rM.js"), "./LB.json": () => import("./LB-BRGM3Yl3.js"), "./LI.json": () => import("./LI-DlCX-3GD.js"), "./LT.json": () => import("./LT-XRkygwh8.js"), "./LU.json": () => import("./LU-CV14IXAu.js"), "./LV.json": () => import("./LV-ByV8yuF8.js"), "./MC.json": () => import("./MC-CwHePfdt.js"), "./MD.json": () => import("./MD-_IIMR66Q.js"), "./ME.json": () => import("./ME-Cfx8llkg.js"), "./MK.json": () => import("./MK-CEzz7Z_a.js"), "./MP.json": () => import("./MP-C5acK0KC.js"), "./MQ.json": () => import("./MQ-BEZo6wPU.js"), "./MR.json": () => import("./MR-BoFyF5R-.js"), "./MT.json": () => import("./MT-C_-lQGuI.js"), "./MU.json": () => import("./MU-_tM1ai_B.js"), "./MX.json": () => import("./MX-eayygS1f.js"), "./MY.json": () => import("./MY-CsKpuB-w.js"), "./NC.json": () => import("./NC-Bel2A-Fk.js"), "./NL.json": () => import("./NL-C3LxWTQ7.js"), "./NO.json": () => import("./NO-CjMA-wtT.js"), "./NZ.json": () => import("./NZ-CG-hMfLg.js"), "./PE.json": () => import("./PE-DvMRqGF_.js"), "./PF.json": () => import("./PF-f7fSMI_4.js"), "./PH.json": () => import("./PH-CjFT8xMY.js"), "./PK.json": () => import("./PK-wMg8N3zK.js"), "./PL.json": () => import("./PL-WpWUBPgN.js"), "./PM.json": () => import("./PM-D4sBI2Px.js"), "./PR.json": () => import("./PR-BJ09dEXF.js"), "./PS.json": () => import("./PS-CWFZXVi8.js"), "./PT.json": () => import("./PT-BarBZmwW.js"), "./QA.json": () => import("./QA-CtUmYTKA.js"), "./RE.json": () => import("./RE-DfaVzCe-.js"), "./RO.json": () => import("./RO-DmWLrUu-.js"), "./RS.json": () => import("./RS-DilO913f.js"), "./RU.json": () => import("./RU-B83Fu7c3.js"), "./SA.json": () => import("./SA-BpimyQxp.js"), "./SE.json": () => import("./SE-BXNcwTPQ.js"), "./SG.json": () => import("./SG-Uyk6Nl41.js"), "./SI.json": () => import("./SI-B5ALffDQ.js"), "./SJ.json": () => import("./SJ-BrJofAMz.js"), "./SK.json": () => import("./SK-DOE_fS4w.js"), "./SM.json": () => import("./SM-BBQZf4DZ.js"), "./TF.json": () => import("./TF-BDwH1us-.js"), "./TH.json": () => import("./TH-BxFJXEcZ.js"), "./TL.json": () => import("./TL-BzbQs-FD.js"), "./TN.json": () => import("./TN-Dc91A3rb.js"), "./TR.json": () => import("./TR-BBxkpnZQ.js"), "./TT.json": () => import("./TT-D-FKOmmE.js"), "./TW.json": () => import("./TW-r3G_Qs5B.js"), "./UA.json": () => import("./UA-vpfj8SEN.js"), "./US.json": () => import("./US-CFOdL8kt.js"), "./UY.json": () => import("./UY-CUwq2MHm.js"), "./VA.json": () => import("./VA-DlPtJwY9.js"), "./VG.json": () => import("./VG-yM0HOg57.js"), "./VI.json": () => import("./VI-I7ADXxNd.js"), "./VN.json": () => import("./VN-0gy1H7YD.js"), "./WF.json": () => import("./WF-BlzFGDgv.js"), "./YT.json": () => import("./YT-17mSpzMD.js"), "./ZA.json": () => import("./ZA-BcxFTdWL.js") });
|
|
29874
29957
|
const getAccountFormatsForCountry = async (country2) => {
|
|
29875
29958
|
const importForCountry = accountFormatsImports[`./${country2}.json`];
|
|
29876
29959
|
if (!importForCountry) {
|
|
@@ -31236,11 +31319,11 @@ const serviceAgreementValidationRules = {
|
|
|
31236
31319
|
},
|
|
31237
31320
|
acceptServiceAgreement: {
|
|
31238
31321
|
modes: ["blur"],
|
|
31239
|
-
validate: (
|
|
31322
|
+
validate: (acceptServiceAgreement2) => !!acceptServiceAgreement2,
|
|
31240
31323
|
errorMessage: "fieldIsRequired"
|
|
31241
31324
|
}
|
|
31242
31325
|
};
|
|
31243
|
-
const logger$
|
|
31326
|
+
const logger$c = createLogger("useServiceAgreement");
|
|
31244
31327
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
31245
31328
|
const useServiceAgreement = ({
|
|
31246
31329
|
handleGetServiceAgreement,
|
|
@@ -31269,7 +31352,7 @@ const useServiceAgreement = ({
|
|
|
31269
31352
|
language: agreementLanguage
|
|
31270
31353
|
});
|
|
31271
31354
|
if (!document2) {
|
|
31272
|
-
logger$
|
|
31355
|
+
logger$c.log('"document" field was missing in response');
|
|
31273
31356
|
return;
|
|
31274
31357
|
}
|
|
31275
31358
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
@@ -31287,7 +31370,7 @@ const useServiceAgreement = ({
|
|
|
31287
31370
|
throw err;
|
|
31288
31371
|
}
|
|
31289
31372
|
};
|
|
31290
|
-
requestServiceAgreement().catch(logger$
|
|
31373
|
+
requestServiceAgreement().catch(logger$c.error);
|
|
31291
31374
|
}, [handleGetServiceAgreement, handleServiceAgreementIsNotAvailableInThatLanguage, agreementLanguage, legalEntityId, serviceAgreementType]);
|
|
31292
31375
|
return {
|
|
31293
31376
|
loading: loading2,
|
|
@@ -32152,7 +32235,7 @@ function TrustDropinComponent({
|
|
|
32152
32235
|
}
|
|
32153
32236
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
32154
32237
|
const POLLING_INTERVAL = 3e3;
|
|
32155
|
-
const logger$
|
|
32238
|
+
const logger$b = createLogger("DropinComposerComponent");
|
|
32156
32239
|
const isOrganizationSettlorWithExemptionReasonEnabled = (enabled, country2) => country2 === CountryCodes.Australia && enabled;
|
|
32157
32240
|
function DropinComposerComponent({
|
|
32158
32241
|
capabilities,
|
|
@@ -32164,7 +32247,7 @@ function DropinComposerComponent({
|
|
|
32164
32247
|
onNavigate = noop,
|
|
32165
32248
|
...args
|
|
32166
32249
|
}) {
|
|
32167
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
32250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
32168
32251
|
const {
|
|
32169
32252
|
contextCountry,
|
|
32170
32253
|
accountHolder: accountHolder2,
|
|
@@ -32207,20 +32290,17 @@ function DropinComposerComponent({
|
|
|
32207
32290
|
const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
|
|
32208
32291
|
const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
|
|
32209
32292
|
const {
|
|
32210
|
-
associatedLegalArrangement
|
|
32293
|
+
associatedLegalArrangement,
|
|
32294
|
+
setAssociatedLegalArrangement,
|
|
32295
|
+
refreshAssociatedLegalArrangement
|
|
32211
32296
|
} = useAssociatedLegalArrangement({
|
|
32212
32297
|
rootLegalEntity,
|
|
32213
32298
|
getLegalEntity: args == null ? void 0 : args.handleGetLegalEntity
|
|
32214
32299
|
});
|
|
32215
32300
|
const [associatedLegalEntityParent, setAssociatedLegalEntityParent] = useState(null);
|
|
32216
32301
|
const [legalEntityType, setLegalEntityType] = useState(null);
|
|
32217
|
-
const [solePropietor, setSolePropietor] = useState(null);
|
|
32218
|
-
const [trust2, refreshTrust] = useTrust({
|
|
32219
|
-
rootLegalEntity,
|
|
32220
|
-
handleGetLegalEntity: args.handleGetLegalEntity
|
|
32221
|
-
});
|
|
32222
32302
|
const exemptSettlor = useExemptSettlor({
|
|
32223
|
-
trust:
|
|
32303
|
+
trust: associatedLegalArrangement,
|
|
32224
32304
|
handleGetLegalEntity: args.handleGetLegalEntity
|
|
32225
32305
|
});
|
|
32226
32306
|
const [trustMember, setTrustMember] = useState(null);
|
|
@@ -32235,9 +32315,9 @@ function DropinComposerComponent({
|
|
|
32235
32315
|
const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
|
|
32236
32316
|
const reviewRequired = (rootLegalEntity == null ? void 0 : rootLegalEntity.id) && ((_b = (_a = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a[rootLegalEntity.id]) == null ? void 0 : _b.isReviewRequired);
|
|
32237
32317
|
const additionalSalesChannels = useSalesChannelsSettings();
|
|
32238
|
-
const isOrganizationSettlorWithExemptionEnabled = isOrganizationSettlorWithExemptionReasonEnabled(isExperimentEnabled("AllowOrganizationSettlorWithExemptionReason"),
|
|
32318
|
+
const isOrganizationSettlorWithExemptionEnabled = isOrganizationSettlorWithExemptionReasonEnabled(isExperimentEnabled("AllowOrganizationSettlorWithExemptionReason"), (_c = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) == null ? void 0 : _c.countryOfGoverningLaw);
|
|
32239
32319
|
const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
|
|
32240
|
-
const trustMembers2 =
|
|
32320
|
+
const trustMembers2 = (associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) ? allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(associatedLegalArrangement, rootLegalEntity, exemptSettlor) : getTrustMembers(associatedLegalArrangement, rootLegalEntity, exemptSettlor) : [];
|
|
32241
32321
|
const getLegalEntityProblems = (le) => {
|
|
32242
32322
|
var _a2;
|
|
32243
32323
|
if (le == null ? void 0 : le.id) {
|
|
@@ -32245,7 +32325,7 @@ function DropinComposerComponent({
|
|
|
32245
32325
|
}
|
|
32246
32326
|
return void 0;
|
|
32247
32327
|
};
|
|
32248
|
-
const
|
|
32328
|
+
const getPciStatus2 = async () => {
|
|
32249
32329
|
var _a2, _b2;
|
|
32250
32330
|
if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetPciStatus)) {
|
|
32251
32331
|
try {
|
|
@@ -32256,12 +32336,12 @@ function DropinComposerComponent({
|
|
|
32256
32336
|
setPciStatus(response);
|
|
32257
32337
|
return response;
|
|
32258
32338
|
} catch (e) {
|
|
32259
|
-
logger$
|
|
32339
|
+
logger$b.warn(i18n.get("failedToGetPciStatus"));
|
|
32260
32340
|
}
|
|
32261
32341
|
}
|
|
32262
32342
|
return void 0;
|
|
32263
32343
|
};
|
|
32264
|
-
const
|
|
32344
|
+
const getPciTemplate2 = useCallback(async () => {
|
|
32265
32345
|
const requestPciTemplate = async (language) => {
|
|
32266
32346
|
const response = await args.handleGetPciTemplate(rootLegalEntity.id, {
|
|
32267
32347
|
language,
|
|
@@ -32285,25 +32365,25 @@ function DropinComposerComponent({
|
|
|
32285
32365
|
useEffect(() => {
|
|
32286
32366
|
if (!tasks.includes(TaskTypes.PCI_DSS))
|
|
32287
32367
|
return;
|
|
32288
|
-
|
|
32289
|
-
}, [
|
|
32368
|
+
getPciTemplate2().catch(logger$b.error);
|
|
32369
|
+
}, [getPciTemplate2, tasks]);
|
|
32290
32370
|
const getServiceAgreementAcceptanceInfos = async () => {
|
|
32291
32371
|
if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
|
|
32292
32372
|
try {
|
|
32293
32373
|
const response = await args.handleGetServiceAgreementAcceptanceInfos(rootLegalEntity.id);
|
|
32294
32374
|
setServiceAgreementAcceptanceInfos(response.data);
|
|
32295
32375
|
} catch (e) {
|
|
32296
|
-
logger$
|
|
32376
|
+
logger$b.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
32297
32377
|
}
|
|
32298
32378
|
}
|
|
32299
32379
|
};
|
|
32300
|
-
const
|
|
32380
|
+
const getServiceAgreementStatus2 = async () => {
|
|
32301
32381
|
if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementStatus)) {
|
|
32302
32382
|
try {
|
|
32303
32383
|
const response = await args.handleGetServiceAgreementStatus(rootLegalEntity.id);
|
|
32304
32384
|
setServiceAgreementTypes(response.termsOfServiceTypes);
|
|
32305
32385
|
} catch (e) {
|
|
32306
|
-
logger$
|
|
32386
|
+
logger$b.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
32307
32387
|
}
|
|
32308
32388
|
}
|
|
32309
32389
|
};
|
|
@@ -32312,7 +32392,7 @@ function DropinComposerComponent({
|
|
|
32312
32392
|
if (id2) {
|
|
32313
32393
|
try {
|
|
32314
32394
|
const response = await (args == null ? void 0 : args.handleGetLegalEntity(id2));
|
|
32315
|
-
|
|
32395
|
+
setAssociatedLegalArrangement(response);
|
|
32316
32396
|
} catch (e) {
|
|
32317
32397
|
showToast({
|
|
32318
32398
|
label: i18n.get("failedToFetchSoleProp"),
|
|
@@ -32342,7 +32422,7 @@ function DropinComposerComponent({
|
|
|
32342
32422
|
setCapabilityProblems(getCapabilityProblems(response, rootLegalEntityCountry, isExperimentEnabled));
|
|
32343
32423
|
return response;
|
|
32344
32424
|
} catch (e) {
|
|
32345
|
-
logger$
|
|
32425
|
+
logger$b.warn(i18n.get("failedToFetchLegalEntityDetails"));
|
|
32346
32426
|
}
|
|
32347
32427
|
}
|
|
32348
32428
|
return void 0;
|
|
@@ -32372,27 +32452,27 @@ function DropinComposerComponent({
|
|
|
32372
32452
|
case "company":
|
|
32373
32453
|
await deleteAssociatedTrustMember({
|
|
32374
32454
|
associatedTrustMember: trustMember2,
|
|
32375
|
-
trust:
|
|
32455
|
+
trust: associatedLegalArrangement,
|
|
32376
32456
|
handleUpdateLegalEntity: args.handleUpdateLegalEntity
|
|
32377
32457
|
});
|
|
32378
32458
|
break;
|
|
32379
32459
|
case "undefinedBeneficiary":
|
|
32380
32460
|
await deleteUndefinedBeneficiary({
|
|
32381
32461
|
undefinedBeneficiary: trustMember2,
|
|
32382
|
-
trust:
|
|
32462
|
+
trust: associatedLegalArrangement,
|
|
32383
32463
|
handleUpdateLegalEntity: args.handleUpdateLegalEntity
|
|
32384
32464
|
});
|
|
32385
32465
|
break;
|
|
32386
32466
|
case "rootTrustee":
|
|
32387
32467
|
throw new Error("Cannot delete root trustee");
|
|
32388
32468
|
}
|
|
32389
|
-
await
|
|
32469
|
+
await refreshAssociatedLegalArrangement();
|
|
32390
32470
|
showToast({
|
|
32391
32471
|
type: ToastType.SUCCESS,
|
|
32392
32472
|
label: i18n.get("successFullyRemovedTrustMember")
|
|
32393
32473
|
});
|
|
32394
32474
|
} catch (err) {
|
|
32395
|
-
logger$
|
|
32475
|
+
logger$b.error(`Failed to delete trust member`, err);
|
|
32396
32476
|
showToast({
|
|
32397
32477
|
type: ToastType.ERROR,
|
|
32398
32478
|
label: i18n.get("failedToRemoveTrustMember")
|
|
@@ -32401,7 +32481,7 @@ function DropinComposerComponent({
|
|
|
32401
32481
|
};
|
|
32402
32482
|
const addOrUpdateTrustMember = async (updated, existing) => {
|
|
32403
32483
|
if ((existing == null ? void 0 : existing.trustMemberType) === "undefinedBeneficiary" && updated.trustMemberType === "undefinedBeneficiary" && existing.description === updated.description) {
|
|
32404
|
-
await
|
|
32484
|
+
await refreshLegalArrangementAndRunOnSubmit(associatedLegalArrangement, 1);
|
|
32405
32485
|
return;
|
|
32406
32486
|
}
|
|
32407
32487
|
try {
|
|
@@ -32409,7 +32489,7 @@ function DropinComposerComponent({
|
|
|
32409
32489
|
case "undefinedBeneficiary":
|
|
32410
32490
|
await addOrUpdateUndefinedBeneficiary({
|
|
32411
32491
|
newOrUpdated: updated,
|
|
32412
|
-
trust:
|
|
32492
|
+
trust: associatedLegalArrangement,
|
|
32413
32493
|
handleUpdateLegalEntity: args.handleUpdateLegalEntity
|
|
32414
32494
|
});
|
|
32415
32495
|
break;
|
|
@@ -32420,7 +32500,7 @@ function DropinComposerComponent({
|
|
|
32420
32500
|
handleCreateLegalEntity: args.handleCreateLegalEntity
|
|
32421
32501
|
}) : await createExemptSettlor({
|
|
32422
32502
|
exemptSettlor: updated,
|
|
32423
|
-
trust:
|
|
32503
|
+
trust: associatedLegalArrangement,
|
|
32424
32504
|
handleCreateLegalEntity: args.handleCreateLegalEntity
|
|
32425
32505
|
});
|
|
32426
32506
|
updated.legalEntityId = newSettlorLE.id;
|
|
@@ -32439,7 +32519,7 @@ function DropinComposerComponent({
|
|
|
32439
32519
|
}
|
|
32440
32520
|
await addOrUpdateAssociatedTrustMember({
|
|
32441
32521
|
newOrUpdated: updated,
|
|
32442
|
-
trust:
|
|
32522
|
+
trust: associatedLegalArrangement,
|
|
32443
32523
|
handleUpdateLegalEntity: args.handleUpdateLegalEntity
|
|
32444
32524
|
});
|
|
32445
32525
|
break;
|
|
@@ -32447,7 +32527,7 @@ function DropinComposerComponent({
|
|
|
32447
32527
|
case "company":
|
|
32448
32528
|
await addOrUpdateAssociatedTrustMember({
|
|
32449
32529
|
newOrUpdated: updated,
|
|
32450
|
-
trust:
|
|
32530
|
+
trust: associatedLegalArrangement,
|
|
32451
32531
|
handleUpdateLegalEntity: args.handleUpdateLegalEntity
|
|
32452
32532
|
});
|
|
32453
32533
|
break;
|
|
@@ -32456,21 +32536,21 @@ function DropinComposerComponent({
|
|
|
32456
32536
|
existing.roles = updated.roles;
|
|
32457
32537
|
await updateRootTrusteeTrustMember({
|
|
32458
32538
|
trustMember: existing,
|
|
32459
|
-
trust:
|
|
32539
|
+
trust: associatedLegalArrangement,
|
|
32460
32540
|
handleUpdateLegalEntity: args.handleUpdateLegalEntity
|
|
32461
32541
|
});
|
|
32462
32542
|
}
|
|
32463
32543
|
break;
|
|
32464
32544
|
default:
|
|
32465
|
-
logger$
|
|
32545
|
+
logger$b.warn(`Updating trust member type "${trustMember.trustMemberType}" is not implemented.`);
|
|
32466
32546
|
}
|
|
32467
32547
|
showToast({
|
|
32468
32548
|
label: i18n.get("successfullyUpdatedDetails"),
|
|
32469
32549
|
type: ToastType.SUCCESS
|
|
32470
32550
|
});
|
|
32471
|
-
await
|
|
32551
|
+
await refreshLegalArrangementAndRunOnSubmit(associatedLegalArrangement, 1);
|
|
32472
32552
|
} catch (err) {
|
|
32473
|
-
logger$
|
|
32553
|
+
logger$b.error(err);
|
|
32474
32554
|
showToast({
|
|
32475
32555
|
label: i18n.get("failedToUpdateDetails"),
|
|
32476
32556
|
type: ToastType.ERROR
|
|
@@ -32508,7 +32588,7 @@ function DropinComposerComponent({
|
|
|
32508
32588
|
if (id2) {
|
|
32509
32589
|
try {
|
|
32510
32590
|
await getTransferInstrument2(id2);
|
|
32511
|
-
if (hasSolePropInLegalEntity(rootLegalEntity) && !
|
|
32591
|
+
if (hasSolePropInLegalEntity(rootLegalEntity) && !associatedLegalArrangement) {
|
|
32512
32592
|
await getSolePropietor();
|
|
32513
32593
|
}
|
|
32514
32594
|
} finally {
|
|
@@ -32521,7 +32601,7 @@ function DropinComposerComponent({
|
|
|
32521
32601
|
};
|
|
32522
32602
|
const onNavigateToPci = async (task = TaskTypes.PCI_DSS) => {
|
|
32523
32603
|
try {
|
|
32524
|
-
await
|
|
32604
|
+
await getPciTemplate2();
|
|
32525
32605
|
onNavigateTo(task);
|
|
32526
32606
|
} catch (e) {
|
|
32527
32607
|
showToast({
|
|
@@ -32539,8 +32619,7 @@ function DropinComposerComponent({
|
|
|
32539
32619
|
};
|
|
32540
32620
|
const onNavigateToTrust = async (task = TaskTypes.TRUST) => {
|
|
32541
32621
|
try {
|
|
32542
|
-
|
|
32543
|
-
if (trust22) {
|
|
32622
|
+
if (associatedLegalArrangement) {
|
|
32544
32623
|
onNavigateTo(task);
|
|
32545
32624
|
} else {
|
|
32546
32625
|
onNavigateTo(TaskTypes.TRUST);
|
|
@@ -32635,8 +32714,8 @@ function DropinComposerComponent({
|
|
|
32635
32714
|
await refreshLegalEntity();
|
|
32636
32715
|
navigateBack(backStepCount);
|
|
32637
32716
|
};
|
|
32638
|
-
const
|
|
32639
|
-
await
|
|
32717
|
+
const refreshLegalArrangementAndRunOnSubmit = async (data, backSteps) => {
|
|
32718
|
+
await refreshAssociatedLegalArrangement();
|
|
32640
32719
|
await componentOnSubmit(data, backSteps);
|
|
32641
32720
|
};
|
|
32642
32721
|
const onPciDownload = async () => {
|
|
@@ -32683,14 +32762,14 @@ function DropinComposerComponent({
|
|
|
32683
32762
|
if (data == null ? void 0 : data.taskList) {
|
|
32684
32763
|
setTasks(data.taskList);
|
|
32685
32764
|
if (data.taskList.includes(TaskTypes.PCI_DSS)) {
|
|
32686
|
-
await
|
|
32765
|
+
await getPciStatus2();
|
|
32687
32766
|
}
|
|
32688
|
-
await
|
|
32767
|
+
await getServiceAgreementStatus2();
|
|
32689
32768
|
await getServiceAgreementAcceptanceInfos();
|
|
32690
32769
|
}
|
|
32691
32770
|
};
|
|
32692
32771
|
setIsLoadingConfiguration(true);
|
|
32693
|
-
fetchConfiguration().catch(logger$
|
|
32772
|
+
fetchConfiguration().catch(logger$b.error).finally(() => {
|
|
32694
32773
|
setIsLoadingConfiguration(false);
|
|
32695
32774
|
onLoad();
|
|
32696
32775
|
});
|
|
@@ -32709,7 +32788,7 @@ function DropinComposerComponent({
|
|
|
32709
32788
|
return;
|
|
32710
32789
|
}
|
|
32711
32790
|
const timeoutId = setTimeout(() => {
|
|
32712
|
-
refreshLegalEntity().catch(logger$
|
|
32791
|
+
refreshLegalEntity().catch(logger$b.error);
|
|
32713
32792
|
}, POLLING_INTERVAL);
|
|
32714
32793
|
return () => {
|
|
32715
32794
|
clearInterval(timeoutId);
|
|
@@ -32868,7 +32947,7 @@ function DropinComposerComponent({
|
|
|
32868
32947
|
onChange: componentOnChange,
|
|
32869
32948
|
eventEmitter,
|
|
32870
32949
|
onSubmit: async (data) => {
|
|
32871
|
-
await
|
|
32950
|
+
await refreshAssociatedLegalArrangement();
|
|
32872
32951
|
await componentOnSubmit(data);
|
|
32873
32952
|
},
|
|
32874
32953
|
handleHomeClick: navigateBack,
|
|
@@ -32888,14 +32967,14 @@ function DropinComposerComponent({
|
|
|
32888
32967
|
topLevelLegalEntity: legalEntityResponse
|
|
32889
32968
|
},
|
|
32890
32969
|
taskType: TaskTypes.TRUST_MEMBER_INDIVIDUAL,
|
|
32891
|
-
parentLegalEntity:
|
|
32970
|
+
parentLegalEntity: associatedLegalArrangement,
|
|
32892
32971
|
legalEntityResponse: associatedLegalEntity,
|
|
32893
32972
|
country: rootLegalEntityCountry,
|
|
32894
32973
|
problems: getLegalEntityProblems(associatedLegalEntity),
|
|
32895
32974
|
capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
|
|
32896
32975
|
onChange: componentOnChange,
|
|
32897
32976
|
eventEmitter,
|
|
32898
|
-
onSubmit: (data) =>
|
|
32977
|
+
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
|
|
32899
32978
|
handleBackClick: navigateBack,
|
|
32900
32979
|
handleHomeClick: () => onNavigateTo(TaskTypes.TRUST_MEMBER_OVERVIEW),
|
|
32901
32980
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
@@ -32976,13 +33055,13 @@ function DropinComposerComponent({
|
|
|
32976
33055
|
topLevelLegalEntity: legalEntityResponse
|
|
32977
33056
|
},
|
|
32978
33057
|
taskType: TaskTypes.TRUST_MEMBER_COMPANY,
|
|
32979
|
-
parentLegalEntity:
|
|
33058
|
+
parentLegalEntity: associatedLegalArrangement,
|
|
32980
33059
|
legalEntityResponse: associatedLegalEntity,
|
|
32981
33060
|
capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
|
|
32982
|
-
problems: (
|
|
33061
|
+
problems: (_d = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _d[rootLegalEntity.id],
|
|
32983
33062
|
onChange: componentOnChange,
|
|
32984
33063
|
eventEmitter,
|
|
32985
|
-
onSubmit: (data) =>
|
|
33064
|
+
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
|
|
32986
33065
|
handleBackClick: navigateBack,
|
|
32987
33066
|
handleHomeClick: navigateBack,
|
|
32988
33067
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
@@ -32998,7 +33077,7 @@ function DropinComposerComponent({
|
|
|
32998
33077
|
},
|
|
32999
33078
|
taskType: currentTask,
|
|
33000
33079
|
taskName: currentTask === TaskTypes.PAYIN ? "payinDetails" : "payoutDetails",
|
|
33001
|
-
problems: (
|
|
33080
|
+
problems: (_e = capabilityProblems == null ? void 0 : capabilityProblems.BankAccount) == null ? void 0 : _e[transferInstrument == null ? void 0 : transferInstrument.id],
|
|
33002
33081
|
transferInstrument,
|
|
33003
33082
|
setTransferInstrument,
|
|
33004
33083
|
legalEntityResponse: rootLegalEntity,
|
|
@@ -33027,16 +33106,16 @@ function DropinComposerComponent({
|
|
|
33027
33106
|
topLevelLegalEntity: legalEntityResponse
|
|
33028
33107
|
},
|
|
33029
33108
|
taskType: TaskTypes.TRUST,
|
|
33030
|
-
problems: (
|
|
33109
|
+
problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
|
|
33031
33110
|
parentLegalEntity: rootLegalEntity,
|
|
33032
|
-
legalEntityResponse:
|
|
33111
|
+
legalEntityResponse: associatedLegalArrangement,
|
|
33033
33112
|
capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
|
|
33034
33113
|
onChange: componentOnChange,
|
|
33035
33114
|
eventEmitter,
|
|
33036
|
-
onSubmit:
|
|
33115
|
+
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
|
|
33037
33116
|
handleHomeClick: navigateBack,
|
|
33038
33117
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
33039
|
-
country: (((
|
|
33118
|
+
country: (((_g = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) == null ? void 0 : _g.countryOfGoverningLaw) || ((_h = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) == null ? void 0 : _h.registeredAddress.country)) ?? rootLegalEntityCountry,
|
|
33040
33119
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
33041
33120
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
33042
33121
|
});
|
|
@@ -33053,7 +33132,7 @@ function DropinComposerComponent({
|
|
|
33053
33132
|
return jsx(RoleAndTypeDropinComponent, {
|
|
33054
33133
|
navigateToFullDropinFor: onNavigateToTrustMember,
|
|
33055
33134
|
navigateBack: async () => {
|
|
33056
|
-
await
|
|
33135
|
+
await refreshAssociatedLegalArrangement();
|
|
33057
33136
|
navigateBack();
|
|
33058
33137
|
},
|
|
33059
33138
|
existingTrustMember: trustMember,
|
|
@@ -33072,7 +33151,7 @@ function DropinComposerComponent({
|
|
|
33072
33151
|
handleHomeClick: navigateBack,
|
|
33073
33152
|
handleSign: async (...params) => {
|
|
33074
33153
|
await args.handleSignPci(...params);
|
|
33075
|
-
await
|
|
33154
|
+
await getPciStatus2();
|
|
33076
33155
|
},
|
|
33077
33156
|
eventEmitter
|
|
33078
33157
|
});
|
|
@@ -33081,15 +33160,15 @@ function DropinComposerComponent({
|
|
|
33081
33160
|
...args,
|
|
33082
33161
|
taskType: TaskTypes.SOLE_PROPRIETOR_COMPANY,
|
|
33083
33162
|
parentLegalEntity: rootLegalEntity,
|
|
33084
|
-
legalEntityResponse:
|
|
33163
|
+
legalEntityResponse: associatedLegalArrangement,
|
|
33085
33164
|
capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
|
|
33086
|
-
problems: (
|
|
33165
|
+
problems: (_i = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _i[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
|
|
33087
33166
|
onChange: componentOnChange,
|
|
33088
33167
|
eventEmitter,
|
|
33089
|
-
onSubmit:
|
|
33168
|
+
onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
|
|
33090
33169
|
handleHomeClick: navigateBack,
|
|
33091
33170
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
33092
|
-
country: (((
|
|
33171
|
+
country: (((_j = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.soleProprietorship) == null ? void 0 : _j.countryOfGoverningLaw) || ((_l = (_k = associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.soleProprietorship) == null ? void 0 : _k.registeredAddress) == null ? void 0 : _l.country)) ?? rootLegalEntityCountry,
|
|
33093
33172
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
33094
33173
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress
|
|
33095
33174
|
});
|
|
@@ -33106,7 +33185,7 @@ function DropinComposerComponent({
|
|
|
33106
33185
|
handleHomeClick: navigateBack,
|
|
33107
33186
|
handleSign: async (...params) => {
|
|
33108
33187
|
await args.handleSignServiceAgreement(...params);
|
|
33109
|
-
await
|
|
33188
|
+
await getServiceAgreementStatus2();
|
|
33110
33189
|
await getServiceAgreementAcceptanceInfos();
|
|
33111
33190
|
},
|
|
33112
33191
|
eventEmitter
|
|
@@ -33368,6 +33447,26 @@ const updateTransferInstrument = async (context, transferInstrument, transferIns
|
|
|
33368
33447
|
}
|
|
33369
33448
|
}, transferInstrument);
|
|
33370
33449
|
};
|
|
33450
|
+
const acceptServiceAgreement = async (context, termsOfServiceDocumentId, data) => {
|
|
33451
|
+
const {
|
|
33452
|
+
loadingContext,
|
|
33453
|
+
legalEntityId
|
|
33454
|
+
} = context;
|
|
33455
|
+
return httpPost({
|
|
33456
|
+
loadingContext,
|
|
33457
|
+
errorLevel: "warn",
|
|
33458
|
+
errorMessage: `Failed to get service agreement status`,
|
|
33459
|
+
path: `${legalEntityId}/termsOfService/accept`,
|
|
33460
|
+
authentication: "jwt",
|
|
33461
|
+
headers: {
|
|
33462
|
+
"Content-Type": "application/json"
|
|
33463
|
+
}
|
|
33464
|
+
}, {
|
|
33465
|
+
...data,
|
|
33466
|
+
legalEntityReference: legalEntityId,
|
|
33467
|
+
termsOfServiceDocumentId
|
|
33468
|
+
});
|
|
33469
|
+
};
|
|
33371
33470
|
const createTrustedTransferInstrument = async (context, code2, state2) => {
|
|
33372
33471
|
const {
|
|
33373
33472
|
loadingContext,
|
|
@@ -33404,6 +33503,22 @@ const deleteTransferInstrument = async (context, transferInstrumentId) => {
|
|
|
33404
33503
|
}
|
|
33405
33504
|
});
|
|
33406
33505
|
};
|
|
33506
|
+
const downloadPci = async (context, pciDocumentReference) => {
|
|
33507
|
+
const {
|
|
33508
|
+
loadingContext,
|
|
33509
|
+
legalEntityId
|
|
33510
|
+
} = context;
|
|
33511
|
+
return httpGet({
|
|
33512
|
+
loadingContext,
|
|
33513
|
+
errorLevel: "warn",
|
|
33514
|
+
errorMessage: `Failed to download pci document`,
|
|
33515
|
+
path: `${legalEntityId}/pci/questionnaires/${pciDocumentReference}`,
|
|
33516
|
+
authentication: "jwt",
|
|
33517
|
+
headers: {
|
|
33518
|
+
"Content-Type": "application/json"
|
|
33519
|
+
}
|
|
33520
|
+
});
|
|
33521
|
+
};
|
|
33407
33522
|
const generateOnboardingLink = async (context, config) => {
|
|
33408
33523
|
const {
|
|
33409
33524
|
loadingContext,
|
|
@@ -33436,6 +33551,16 @@ const getAddress = async (context, addressId) => {
|
|
|
33436
33551
|
}
|
|
33437
33552
|
});
|
|
33438
33553
|
};
|
|
33554
|
+
const getAnalyticsSession = async (loadingContext, data) => httpPost({
|
|
33555
|
+
loadingContext,
|
|
33556
|
+
errorLevel: "warn",
|
|
33557
|
+
errorMessage: `Failed to get analytics sessionId`,
|
|
33558
|
+
path: `analytics/ui`,
|
|
33559
|
+
authentication: "jwt",
|
|
33560
|
+
headers: {
|
|
33561
|
+
"Content-Type": "application/json"
|
|
33562
|
+
}
|
|
33563
|
+
}, data);
|
|
33439
33564
|
const getIdverificationToken = async (context, request) => {
|
|
33440
33565
|
const {
|
|
33441
33566
|
loadingContext,
|
|
@@ -33468,6 +33593,102 @@ const getOnboardingStatus = async (context) => {
|
|
|
33468
33593
|
}
|
|
33469
33594
|
});
|
|
33470
33595
|
};
|
|
33596
|
+
const getPciQuestionnaires = async (context) => {
|
|
33597
|
+
const {
|
|
33598
|
+
loadingContext,
|
|
33599
|
+
legalEntityId
|
|
33600
|
+
} = context;
|
|
33601
|
+
return httpGet({
|
|
33602
|
+
loadingContext,
|
|
33603
|
+
errorLevel: "warn",
|
|
33604
|
+
errorMessage: `Failed to get pci questionnaires`,
|
|
33605
|
+
path: `${legalEntityId}/pci/questionnaires`,
|
|
33606
|
+
authentication: "jwt",
|
|
33607
|
+
headers: {
|
|
33608
|
+
"Content-Type": "application/json"
|
|
33609
|
+
}
|
|
33610
|
+
});
|
|
33611
|
+
};
|
|
33612
|
+
const getPciStatus = async (context, data) => {
|
|
33613
|
+
const {
|
|
33614
|
+
loadingContext,
|
|
33615
|
+
legalEntityId
|
|
33616
|
+
} = context;
|
|
33617
|
+
return httpPost({
|
|
33618
|
+
loadingContext,
|
|
33619
|
+
errorLevel: "warn",
|
|
33620
|
+
errorMessage: `Failed to get pci status`,
|
|
33621
|
+
path: `${legalEntityId}/pci/signingRequired`,
|
|
33622
|
+
authentication: "jwt",
|
|
33623
|
+
headers: {
|
|
33624
|
+
"Content-Type": "application/json"
|
|
33625
|
+
}
|
|
33626
|
+
}, data);
|
|
33627
|
+
};
|
|
33628
|
+
const getPciTemplate = async (context, data) => {
|
|
33629
|
+
const {
|
|
33630
|
+
loadingContext,
|
|
33631
|
+
legalEntityId
|
|
33632
|
+
} = context;
|
|
33633
|
+
return httpPost({
|
|
33634
|
+
loadingContext,
|
|
33635
|
+
errorLevel: "warn",
|
|
33636
|
+
errorMessage: `Failed to generate pciTemplate`,
|
|
33637
|
+
path: `${legalEntityId}/pci/generatePciTemplates`,
|
|
33638
|
+
authentication: "jwt",
|
|
33639
|
+
headers: {
|
|
33640
|
+
"Content-Type": "application/json"
|
|
33641
|
+
}
|
|
33642
|
+
}, data);
|
|
33643
|
+
};
|
|
33644
|
+
const getServiceAgreement = async (context, data) => {
|
|
33645
|
+
const {
|
|
33646
|
+
loadingContext,
|
|
33647
|
+
legalEntityId
|
|
33648
|
+
} = context;
|
|
33649
|
+
return httpPost({
|
|
33650
|
+
loadingContext,
|
|
33651
|
+
errorLevel: "warn",
|
|
33652
|
+
errorMessage: `Failed to get service agreement status`,
|
|
33653
|
+
path: `${legalEntityId}/termsOfService`,
|
|
33654
|
+
authentication: "jwt",
|
|
33655
|
+
headers: {
|
|
33656
|
+
"Content-Type": "application/json"
|
|
33657
|
+
}
|
|
33658
|
+
}, data);
|
|
33659
|
+
};
|
|
33660
|
+
const getServiceAgreementAcceptanceInfo = async (context) => {
|
|
33661
|
+
const {
|
|
33662
|
+
loadingContext,
|
|
33663
|
+
legalEntityId
|
|
33664
|
+
} = context;
|
|
33665
|
+
return httpGet({
|
|
33666
|
+
loadingContext,
|
|
33667
|
+
errorLevel: "warn",
|
|
33668
|
+
errorMessage: `Failed to get service agreement acceptance info`,
|
|
33669
|
+
path: `${legalEntityId}/termsOfService/termsOfServiceAcceptanceInfo`,
|
|
33670
|
+
authentication: "jwt",
|
|
33671
|
+
headers: {
|
|
33672
|
+
"Content-Type": "application/json"
|
|
33673
|
+
}
|
|
33674
|
+
});
|
|
33675
|
+
};
|
|
33676
|
+
const getServiceAgreementStatus = async (context) => {
|
|
33677
|
+
const {
|
|
33678
|
+
loadingContext,
|
|
33679
|
+
legalEntityId
|
|
33680
|
+
} = context;
|
|
33681
|
+
return httpGet({
|
|
33682
|
+
loadingContext,
|
|
33683
|
+
errorLevel: "warn",
|
|
33684
|
+
errorMessage: `Failed to get service agreement status`,
|
|
33685
|
+
path: `${legalEntityId}/termsOfService/termsOfServiceStatus`,
|
|
33686
|
+
authentication: "jwt",
|
|
33687
|
+
headers: {
|
|
33688
|
+
"Content-Type": "application/json"
|
|
33689
|
+
}
|
|
33690
|
+
});
|
|
33691
|
+
};
|
|
33471
33692
|
const handleBankVerificationError = async (context, errorCode, errorMessage, state2, metadata) => {
|
|
33472
33693
|
const {
|
|
33473
33694
|
loadingContext,
|
|
@@ -33506,6 +33727,16 @@ const idVerificationStartcheck = async (context, request) => {
|
|
|
33506
33727
|
}
|
|
33507
33728
|
}, request);
|
|
33508
33729
|
};
|
|
33730
|
+
const pushEvents = async (loadingContext, sessionId, event) => httpPost({
|
|
33731
|
+
loadingContext,
|
|
33732
|
+
errorLevel: "warn",
|
|
33733
|
+
errorMessage: `Failed to push events`,
|
|
33734
|
+
path: `analytics/ui/${sessionId}`,
|
|
33735
|
+
authentication: "jwt",
|
|
33736
|
+
headers: {
|
|
33737
|
+
"Content-Type": "application/json"
|
|
33738
|
+
}
|
|
33739
|
+
}, event);
|
|
33509
33740
|
const searchAddress = async (context, address2) => {
|
|
33510
33741
|
const {
|
|
33511
33742
|
loadingContext,
|
|
@@ -33522,6 +33753,22 @@ const searchAddress = async (context, address2) => {
|
|
|
33522
33753
|
}
|
|
33523
33754
|
}, address2);
|
|
33524
33755
|
};
|
|
33756
|
+
const signPci = async (context, data) => {
|
|
33757
|
+
const {
|
|
33758
|
+
loadingContext,
|
|
33759
|
+
legalEntityId
|
|
33760
|
+
} = context;
|
|
33761
|
+
return httpPost({
|
|
33762
|
+
loadingContext,
|
|
33763
|
+
errorLevel: "warn",
|
|
33764
|
+
errorMessage: `Failed to sign pci`,
|
|
33765
|
+
path: `${legalEntityId}/pci/signPciTemplates`,
|
|
33766
|
+
authentication: "jwt",
|
|
33767
|
+
headers: {
|
|
33768
|
+
"Content-Type": "application/json"
|
|
33769
|
+
}
|
|
33770
|
+
}, data);
|
|
33771
|
+
};
|
|
33525
33772
|
const COMPONENTS_API_VERSION = "v1";
|
|
33526
33773
|
const useComponentApi = (rootLegalEntityId) => {
|
|
33527
33774
|
const authContext = useAuthContext();
|
|
@@ -33567,7 +33814,45 @@ const useComponentApi = (rootLegalEntityId) => {
|
|
|
33567
33814
|
idVerificationStartCheck: async (legalEntityId, data) => idVerificationStartcheck(baseRequestContext, data),
|
|
33568
33815
|
getTransferInstruments: async () => getTransferInstruments(baseRequestContext),
|
|
33569
33816
|
getOnboardingStatus: async () => getOnboardingStatus(baseRequestContext),
|
|
33570
|
-
generateOnboardingLink: async (config) => generateOnboardingLink(baseRequestContext, config)
|
|
33817
|
+
generateOnboardingLink: async (config) => generateOnboardingLink(baseRequestContext, config),
|
|
33818
|
+
getAnalyticsSession: async (data) => getAnalyticsSession(loadingContext, data),
|
|
33819
|
+
pushEvents: async (sessionId, event) => pushEvents(loadingContext, sessionId, event),
|
|
33820
|
+
getPciStatus: async (legalEntityId, data) => getPciStatus({
|
|
33821
|
+
...baseRequestContext,
|
|
33822
|
+
legalEntityId
|
|
33823
|
+
}, data),
|
|
33824
|
+
getPciTemplate: async (legalEntityId, data) => getPciTemplate({
|
|
33825
|
+
...baseRequestContext,
|
|
33826
|
+
legalEntityId
|
|
33827
|
+
}, data),
|
|
33828
|
+
signPci: async (legalEntityId, data) => signPci({
|
|
33829
|
+
...baseRequestContext,
|
|
33830
|
+
legalEntityId
|
|
33831
|
+
}, data),
|
|
33832
|
+
getPciQuestionnaires: async (legalEntityId) => getPciQuestionnaires({
|
|
33833
|
+
...baseRequestContext,
|
|
33834
|
+
legalEntityId
|
|
33835
|
+
}),
|
|
33836
|
+
downloadPci: async (legalEntityId, pciReference) => downloadPci({
|
|
33837
|
+
...baseRequestContext,
|
|
33838
|
+
legalEntityId
|
|
33839
|
+
}, pciReference),
|
|
33840
|
+
getServiceAgreementAcceptanceInfos: async (legalEntityId) => getServiceAgreementAcceptanceInfo({
|
|
33841
|
+
...baseRequestContext,
|
|
33842
|
+
legalEntityId
|
|
33843
|
+
}),
|
|
33844
|
+
getServiceAgreementStatus: async (legalEntityId) => getServiceAgreementStatus({
|
|
33845
|
+
...baseRequestContext,
|
|
33846
|
+
legalEntityId
|
|
33847
|
+
}),
|
|
33848
|
+
getServiceAgreement: async (legalEntityId, serviceAgreementRequest) => getServiceAgreement({
|
|
33849
|
+
...baseRequestContext,
|
|
33850
|
+
legalEntityId
|
|
33851
|
+
}, serviceAgreementRequest),
|
|
33852
|
+
acceptServiceAgreement: async (legalEntityId, termsOfServiceDocumentId, data) => acceptServiceAgreement({
|
|
33853
|
+
...baseRequestContext,
|
|
33854
|
+
legalEntityId
|
|
33855
|
+
}, termsOfServiceDocumentId, data)
|
|
33571
33856
|
};
|
|
33572
33857
|
}, [base, rootLegalEntityId]);
|
|
33573
33858
|
};
|
|
@@ -33590,7 +33875,7 @@ class EventEmitter {
|
|
|
33590
33875
|
};
|
|
33591
33876
|
}
|
|
33592
33877
|
}
|
|
33593
|
-
const logger$
|
|
33878
|
+
const logger$a = createLogger("CreateIndividualComponent");
|
|
33594
33879
|
function CreateIndividualComponent({
|
|
33595
33880
|
parentLegalEntityId,
|
|
33596
33881
|
legalEntityId,
|
|
@@ -33627,13 +33912,13 @@ function CreateIndividualComponent({
|
|
|
33627
33912
|
setParentLegalEntity(parentEntity);
|
|
33628
33913
|
setLegalEntity(entity);
|
|
33629
33914
|
} catch (error) {
|
|
33630
|
-
logger$
|
|
33915
|
+
logger$a.error(error);
|
|
33631
33916
|
} finally {
|
|
33632
33917
|
setLoadingStatus("success");
|
|
33633
33918
|
}
|
|
33634
33919
|
}, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
|
|
33635
33920
|
useEffect(() => {
|
|
33636
|
-
fetchLegalEntity().catch(logger$
|
|
33921
|
+
fetchLegalEntity().catch(logger$a.error);
|
|
33637
33922
|
}, [fetchLegalEntity]);
|
|
33638
33923
|
const country2 = ((_a = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _a.residentialAddress.country) ?? contextCountry;
|
|
33639
33924
|
return loadingStatus === "loading" ? jsx(Loader, {
|
|
@@ -33658,7 +33943,7 @@ function CreateIndividualComponent({
|
|
|
33658
33943
|
taskType
|
|
33659
33944
|
});
|
|
33660
33945
|
}
|
|
33661
|
-
const logger$
|
|
33946
|
+
const logger$9 = createLogger("CreateTransferInstrumentComponent");
|
|
33662
33947
|
function CreateTransferInstrumentComponent({
|
|
33663
33948
|
legalEntityId,
|
|
33664
33949
|
transferInstrumentId,
|
|
@@ -33701,7 +33986,7 @@ function CreateTransferInstrumentComponent({
|
|
|
33701
33986
|
const ti = await getTransferInstrument2(transferInstrumentId);
|
|
33702
33987
|
setTransferInstrument(ti);
|
|
33703
33988
|
}
|
|
33704
|
-
})().catch(logger$
|
|
33989
|
+
})().catch(logger$9.error).finally(() => {
|
|
33705
33990
|
setLoadingStatus("success");
|
|
33706
33991
|
});
|
|
33707
33992
|
}, [transferInstrumentId, fetchLegalEntity, getTransferInstrument2]);
|
|
@@ -33898,7 +34183,7 @@ function ManageTransferInstrumentOverviewItem({
|
|
|
33898
34183
|
})]
|
|
33899
34184
|
}, transferInstrumentReference.transferInstrument.id);
|
|
33900
34185
|
}
|
|
33901
|
-
const logger$
|
|
34186
|
+
const logger$8 = createLogger("ManageTransferInstrumentOverview");
|
|
33902
34187
|
function ManageTransferInstrumentOverview({
|
|
33903
34188
|
transferInstrumentReferences,
|
|
33904
34189
|
onAdd,
|
|
@@ -33923,7 +34208,7 @@ function ManageTransferInstrumentOverview({
|
|
|
33923
34208
|
...transferInstrumentsMap
|
|
33924
34209
|
});
|
|
33925
34210
|
} catch (e) {
|
|
33926
|
-
logger$
|
|
34211
|
+
logger$8.error(e);
|
|
33927
34212
|
}
|
|
33928
34213
|
};
|
|
33929
34214
|
const onRemoveTransferinstrument = async (transferInstrumentId) => {
|
|
@@ -33931,7 +34216,7 @@ function ManageTransferInstrumentOverview({
|
|
|
33931
34216
|
await deleteTransferInstrument2(transferInstrumentId);
|
|
33932
34217
|
onRemove(transferInstrumentId);
|
|
33933
34218
|
} catch (e) {
|
|
33934
|
-
logger$
|
|
34219
|
+
logger$8.error(e);
|
|
33935
34220
|
}
|
|
33936
34221
|
};
|
|
33937
34222
|
const transferInstrumentListEle = transferInstrumentReferences.map((transferInstrumentRef) => jsx(ManageTransferInstrumentOverviewItem, {
|
|
@@ -33956,7 +34241,7 @@ function ManageTransferInstrumentOverview({
|
|
|
33956
34241
|
})]
|
|
33957
34242
|
});
|
|
33958
34243
|
}
|
|
33959
|
-
const logger$
|
|
34244
|
+
const logger$7 = createLogger("ManageTransferInstrumentComponent");
|
|
33960
34245
|
function ManageTransferInstrumentComponent({
|
|
33961
34246
|
legalEntityId,
|
|
33962
34247
|
onAdd,
|
|
@@ -33992,7 +34277,7 @@ function ManageTransferInstrumentComponent({
|
|
|
33992
34277
|
}, [getTransferInstruments2, getLegalEntity2, i18n, legalEntityId]);
|
|
33993
34278
|
useEffect(() => {
|
|
33994
34279
|
eventEmitter == null ? void 0 : eventEmitter.on("updateLocale", (locale) => setLocale(locale));
|
|
33995
|
-
init2().catch(logger$
|
|
34280
|
+
init2().catch(logger$7.error).finally(() => {
|
|
33996
34281
|
setLoadingStatus("success");
|
|
33997
34282
|
});
|
|
33998
34283
|
}, [init2, setLocale, eventEmitter]);
|
|
@@ -34002,7 +34287,7 @@ function ManageTransferInstrumentComponent({
|
|
|
34002
34287
|
}
|
|
34003
34288
|
}, [hasOnlyVerifiedTransferInstruments, timeoutId, transferInstruments]);
|
|
34004
34289
|
const onRemove = (transferInstrumentId) => {
|
|
34005
|
-
refreshTransferInstruments().catch(logger$
|
|
34290
|
+
refreshTransferInstruments().catch(logger$7.error);
|
|
34006
34291
|
onRemoveSuccess == null ? void 0 : onRemoveSuccess(transferInstrumentId, legalEntityId);
|
|
34007
34292
|
};
|
|
34008
34293
|
const render2 = () => {
|
|
@@ -34030,46 +34315,120 @@ function ManageTransferInstrumentComponent({
|
|
|
34030
34315
|
children: render2()
|
|
34031
34316
|
});
|
|
34032
34317
|
}
|
|
34318
|
+
const logger$6 = createLogger("CreateIndividualComponent");
|
|
34319
|
+
function OnboardingDropinComponent({
|
|
34320
|
+
legalEntityId,
|
|
34321
|
+
eventEmitter
|
|
34322
|
+
}) {
|
|
34323
|
+
var _a;
|
|
34324
|
+
const {
|
|
34325
|
+
contextCountry
|
|
34326
|
+
} = useCoreContext();
|
|
34327
|
+
if (!legalEntityId) {
|
|
34328
|
+
throw new Error("Must provide at-least legalEntityId");
|
|
34329
|
+
}
|
|
34330
|
+
const {
|
|
34331
|
+
getLegalEntity: getLegalEntity2,
|
|
34332
|
+
createLegalEntity: createLegalEntity2,
|
|
34333
|
+
updateLegalEntity: updateLegalEntity2,
|
|
34334
|
+
getDocument: getDocument2,
|
|
34335
|
+
createDocument: createDocument2,
|
|
34336
|
+
updateDocument: updateDocument2,
|
|
34337
|
+
searchAddress: searchAddress2,
|
|
34338
|
+
getAddress: getAddress2,
|
|
34339
|
+
getIdVerificationToken,
|
|
34340
|
+
idVerificationStartCheck,
|
|
34341
|
+
getPciStatus: getPciStatus2,
|
|
34342
|
+
getPciTemplate: getPciTemplate2,
|
|
34343
|
+
signPci: signPci2,
|
|
34344
|
+
getPciQuestionnaires: getPciQuestionnaires2,
|
|
34345
|
+
downloadPci: downloadPci2,
|
|
34346
|
+
getServiceAgreementAcceptanceInfos,
|
|
34347
|
+
getServiceAgreementStatus: getServiceAgreementStatus2,
|
|
34348
|
+
getServiceAgreement: getServiceAgreement2,
|
|
34349
|
+
acceptServiceAgreement: acceptServiceAgreement2
|
|
34350
|
+
} = useComponentApi(legalEntityId);
|
|
34351
|
+
const [legalEntity, setLegalEntity] = useState();
|
|
34352
|
+
const [loadingStatus, setLoadingStatus] = useState("loading");
|
|
34353
|
+
const fetchLegalEntity = useCallback(async () => {
|
|
34354
|
+
try {
|
|
34355
|
+
const le = await getLegalEntity2(legalEntityId);
|
|
34356
|
+
setLegalEntity(le);
|
|
34357
|
+
} catch (error) {
|
|
34358
|
+
logger$6.error(error);
|
|
34359
|
+
} finally {
|
|
34360
|
+
setLoadingStatus("success");
|
|
34361
|
+
}
|
|
34362
|
+
}, [legalEntityId, getLegalEntity2]);
|
|
34363
|
+
useEffect(() => {
|
|
34364
|
+
fetchLegalEntity().catch(logger$6.error);
|
|
34365
|
+
}, [fetchLegalEntity]);
|
|
34366
|
+
((_a = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _a.residentialAddress.country) ?? contextCountry;
|
|
34367
|
+
return loadingStatus === "loading" || !legalEntity ? jsx(Loader, {
|
|
34368
|
+
size: "medium"
|
|
34369
|
+
}) : jsx(DropinComposerComponent, {
|
|
34370
|
+
eventEmitter: eventEmitter ?? new EventEmitter(),
|
|
34371
|
+
legalEntityResponse: legalEntity,
|
|
34372
|
+
handleGetDocument: getDocument2,
|
|
34373
|
+
handleCreateDocument: createDocument2,
|
|
34374
|
+
handleUpdateDocument: updateDocument2,
|
|
34375
|
+
handleUpdateLegalEntity: updateLegalEntity2,
|
|
34376
|
+
handleCreateLegalEntity: createLegalEntity2,
|
|
34377
|
+
handleFindAddress: getAddress2,
|
|
34378
|
+
handleAddressSearch: searchAddress2,
|
|
34379
|
+
handleGetIdVerificationToken: getIdVerificationToken,
|
|
34380
|
+
handleGetIdVerificationStartCheck: idVerificationStartCheck,
|
|
34381
|
+
handleGetPciStatus: getPciStatus2,
|
|
34382
|
+
handleGetPciTemplate: getPciTemplate2,
|
|
34383
|
+
handleSignPci: signPci2,
|
|
34384
|
+
handleGetPciQuestionnaires: getPciQuestionnaires2,
|
|
34385
|
+
handleDownloadPci: downloadPci2,
|
|
34386
|
+
handleGetServiceAgreementAcceptanceInfos: getServiceAgreementAcceptanceInfos,
|
|
34387
|
+
handleGetServiceAgreementStatus: getServiceAgreementStatus2,
|
|
34388
|
+
handleGetServiceAgreement: getServiceAgreement2,
|
|
34389
|
+
handleSignServiceAgreement: acceptServiceAgreement2
|
|
34390
|
+
});
|
|
34391
|
+
}
|
|
34392
|
+
var OnboardingUrlTarget = /* @__PURE__ */ ((OnboardingUrlTarget2) => {
|
|
34393
|
+
OnboardingUrlTarget2["BLANK"] = "_blank";
|
|
34394
|
+
OnboardingUrlTarget2["SELF"] = "_self";
|
|
34395
|
+
return OnboardingUrlTarget2;
|
|
34396
|
+
})(OnboardingUrlTarget || {});
|
|
34033
34397
|
var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
|
|
34034
|
-
OnboardingStatus2["
|
|
34035
|
-
OnboardingStatus2["
|
|
34036
|
-
OnboardingStatus2["
|
|
34037
|
-
OnboardingStatus2["
|
|
34398
|
+
OnboardingStatus2["AWAITING_DATA"] = "AWAITING_DATA";
|
|
34399
|
+
OnboardingStatus2["IN_REVIEW"] = "IN_REVIEW";
|
|
34400
|
+
OnboardingStatus2["UNSUCCESSFUL"] = "UNSUCCESSFUL";
|
|
34401
|
+
OnboardingStatus2["REJECTED"] = "REJECTED";
|
|
34402
|
+
OnboardingStatus2["VERIFIED"] = "VERIFIED";
|
|
34038
34403
|
return OnboardingStatus2;
|
|
34039
34404
|
})(OnboardingStatus || {});
|
|
34040
34405
|
const contentMap = {
|
|
34041
|
-
[OnboardingStatus.
|
|
34042
|
-
|
|
34043
|
-
|
|
34044
|
-
ctaButton: "onboardingRedirectInitialCtaButton"
|
|
34406
|
+
[OnboardingStatus.AWAITING_DATA]: {
|
|
34407
|
+
description: ["onboardingRedirectAwaitingDescriptionP1"],
|
|
34408
|
+
ctaButton: "onboardingRedirectAwaitingCtaButton"
|
|
34045
34409
|
},
|
|
34046
|
-
[OnboardingStatus.
|
|
34047
|
-
|
|
34048
|
-
|
|
34049
|
-
ctaButton: "onboardingRedirectInProgressCtaButton"
|
|
34410
|
+
[OnboardingStatus.IN_REVIEW]: {
|
|
34411
|
+
description: ["onboardingRedirectInReviewDescriptionP1"],
|
|
34412
|
+
ctaButton: "onboardingRedirectInReviewCtaButton"
|
|
34050
34413
|
},
|
|
34051
|
-
[OnboardingStatus.
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
ctaButton: "onboardingRedirectErrorsCtaButton"
|
|
34414
|
+
[OnboardingStatus.UNSUCCESSFUL]: {
|
|
34415
|
+
description: ["onboardingRedirectUnsuccessfulDescriptionP1"],
|
|
34416
|
+
ctaButton: "onboardingRedirectUnsuccessfulCtaButton"
|
|
34055
34417
|
},
|
|
34056
|
-
[OnboardingStatus.
|
|
34057
|
-
|
|
34058
|
-
|
|
34059
|
-
|
|
34418
|
+
[OnboardingStatus.REJECTED]: {
|
|
34419
|
+
description: ["onboardingRedirectRejectedDescriptionP1"]
|
|
34420
|
+
},
|
|
34421
|
+
[OnboardingStatus.VERIFIED]: {
|
|
34422
|
+
description: ["onboardingRedirectVerifiedDescriptionP1"]
|
|
34060
34423
|
}
|
|
34061
34424
|
};
|
|
34062
34425
|
function getContentByStatus(status) {
|
|
34063
34426
|
return contentMap[status];
|
|
34064
34427
|
}
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
OnboardingUrlTarget2["SELF"] = "_self";
|
|
34068
|
-
return OnboardingUrlTarget2;
|
|
34069
|
-
})(OnboardingUrlTarget || {});
|
|
34070
|
-
const logger$5 = createLogger("OnboardingRedirectComponent");
|
|
34071
|
-
function OnboardingRedirectComponent({
|
|
34428
|
+
const logger$5 = createLogger("ViewVerificationStatusComponent");
|
|
34429
|
+
function ViewVerificationStatusComponent({
|
|
34072
34430
|
legalEntityId,
|
|
34431
|
+
hideExplanation = false,
|
|
34073
34432
|
returnUrl,
|
|
34074
34433
|
redirectTarget,
|
|
34075
34434
|
onStatusChange,
|
|
@@ -34153,6 +34512,12 @@ function OnboardingRedirectComponent({
|
|
|
34153
34512
|
const {
|
|
34154
34513
|
redirectUrl
|
|
34155
34514
|
} = await generateOnboardingLink2(config);
|
|
34515
|
+
if (!redirectUrl) {
|
|
34516
|
+
handleError({
|
|
34517
|
+
trKey: "onboardingRedirectLinkError"
|
|
34518
|
+
});
|
|
34519
|
+
return;
|
|
34520
|
+
}
|
|
34156
34521
|
openUrl(redirectUrl, config);
|
|
34157
34522
|
} catch (error) {
|
|
34158
34523
|
handleError({
|
|
@@ -34180,6 +34545,20 @@ function OnboardingRedirectComponent({
|
|
|
34180
34545
|
});
|
|
34181
34546
|
}
|
|
34182
34547
|
};
|
|
34548
|
+
const renderFooter = () => {
|
|
34549
|
+
const statusesWithoutActions = [OnboardingStatus.REJECTED, OnboardingStatus.VERIFIED];
|
|
34550
|
+
if (statusesWithoutActions.includes(onboardingStatus) || !(content == null ? void 0 : content.ctaButton)) {
|
|
34551
|
+
return;
|
|
34552
|
+
}
|
|
34553
|
+
return jsx(Button, {
|
|
34554
|
+
label: i18n.get(content.ctaButton),
|
|
34555
|
+
onClick: redirectToAdyen,
|
|
34556
|
+
type: "button",
|
|
34557
|
+
className: "adyen-view-verification-status__button",
|
|
34558
|
+
role: "link",
|
|
34559
|
+
status: loadingLinkStatus === "loading" ? "loading" : "default"
|
|
34560
|
+
});
|
|
34561
|
+
};
|
|
34183
34562
|
const renderBody = () => {
|
|
34184
34563
|
if (alertContent) {
|
|
34185
34564
|
return jsx(Alert, {
|
|
@@ -34190,24 +34569,12 @@ function OnboardingRedirectComponent({
|
|
|
34190
34569
|
}
|
|
34191
34570
|
if (content) {
|
|
34192
34571
|
return jsxs(Fragment, {
|
|
34193
|
-
children: [jsx("
|
|
34194
|
-
className: "adyen-
|
|
34195
|
-
children: i18n.get(content.header)
|
|
34196
|
-
}), content.description.map((key) => jsx("p", {
|
|
34197
|
-
className: "adyen-onboarding-redirect__description",
|
|
34572
|
+
children: [hideExplanation ? null : content.description.map((key) => jsx("p", {
|
|
34573
|
+
className: "adyen-view-verification-status__description",
|
|
34198
34574
|
children: i18n.get(key)
|
|
34199
34575
|
}, key)), jsx("div", {
|
|
34200
|
-
className: "adyen-
|
|
34201
|
-
children:
|
|
34202
|
-
label: i18n.get(content.ctaButton),
|
|
34203
|
-
onClick: redirectToAdyen,
|
|
34204
|
-
type: "button",
|
|
34205
|
-
className: "adyen-onboarding-redirect__button",
|
|
34206
|
-
role: "link",
|
|
34207
|
-
negative: onboardingStatus !== OnboardingStatus.FINISHED,
|
|
34208
|
-
tertiary: onboardingStatus === OnboardingStatus.FINISHED,
|
|
34209
|
-
status: loadingLinkStatus === "loading" ? "loading" : "default"
|
|
34210
|
-
})
|
|
34576
|
+
className: "adyen-view-verification-status__footer",
|
|
34577
|
+
children: renderFooter()
|
|
34211
34578
|
})]
|
|
34212
34579
|
});
|
|
34213
34580
|
}
|
|
@@ -34216,7 +34583,7 @@ function OnboardingRedirectComponent({
|
|
|
34216
34583
|
});
|
|
34217
34584
|
};
|
|
34218
34585
|
return jsx("section", {
|
|
34219
|
-
className: "adyen-
|
|
34586
|
+
className: "adyen-view-verification-status",
|
|
34220
34587
|
children: renderBody()
|
|
34221
34588
|
});
|
|
34222
34589
|
}
|
|
@@ -34232,7 +34599,8 @@ const componentsMap = {
|
|
|
34232
34599
|
createTransferInstrumentComponent: CreateTransferInstrumentComponent,
|
|
34233
34600
|
createIndividualComponent: CreateIndividualComponent,
|
|
34234
34601
|
manageTransferInstrumentComponent: ManageTransferInstrumentComponent,
|
|
34235
|
-
|
|
34602
|
+
onboardingDropinComponent: OnboardingDropinComponent,
|
|
34603
|
+
viewVerificationStatusComponent: ViewVerificationStatusComponent
|
|
34236
34604
|
};
|
|
34237
34605
|
const AuthProvider = ({
|
|
34238
34606
|
children,
|
|
@@ -34262,6 +34630,46 @@ const AuthProvider = ({
|
|
|
34262
34630
|
children
|
|
34263
34631
|
});
|
|
34264
34632
|
};
|
|
34633
|
+
const convertToEmbeddedEvent = (eventQueueItem) => {
|
|
34634
|
+
const [eventType, event] = eventQueueItem;
|
|
34635
|
+
const hasEventData = typeof event === "object";
|
|
34636
|
+
const eventName = hasEventData ? event.key : event;
|
|
34637
|
+
return {
|
|
34638
|
+
eventType,
|
|
34639
|
+
eventName,
|
|
34640
|
+
...hasEventData && {
|
|
34641
|
+
eventData: event.segmentation
|
|
34642
|
+
}
|
|
34643
|
+
};
|
|
34644
|
+
};
|
|
34645
|
+
const useAnalytics = async ({
|
|
34646
|
+
onUserEvent,
|
|
34647
|
+
isEmbeddedDropin,
|
|
34648
|
+
legalEntityId,
|
|
34649
|
+
sdkVersion,
|
|
34650
|
+
componentName
|
|
34651
|
+
}) => {
|
|
34652
|
+
const {
|
|
34653
|
+
getAnalyticsSession: getAnalyticsSession2,
|
|
34654
|
+
pushEvents: pushEvents2
|
|
34655
|
+
} = useComponentApi(legalEntityId);
|
|
34656
|
+
if (isEmbeddedDropin) {
|
|
34657
|
+
const {
|
|
34658
|
+
id: sessionId
|
|
34659
|
+
} = await getAnalyticsSession2({
|
|
34660
|
+
sdkVersion,
|
|
34661
|
+
componentName,
|
|
34662
|
+
userAgent: navigator.userAgent,
|
|
34663
|
+
legalEntityId
|
|
34664
|
+
});
|
|
34665
|
+
userEvents.subscribe((data) => {
|
|
34666
|
+
const eventItem = convertToEmbeddedEvent(data);
|
|
34667
|
+
pushEvents2(sessionId, eventItem);
|
|
34668
|
+
});
|
|
34669
|
+
} else if (onUserEvent) {
|
|
34670
|
+
userEvents.subscribe(onUserEvent);
|
|
34671
|
+
}
|
|
34672
|
+
};
|
|
34265
34673
|
let isDocumentGuidanceLoaded = false;
|
|
34266
34674
|
const getIconContainer = () => {
|
|
34267
34675
|
const container = document.createElement("div");
|
|
@@ -34593,19 +35001,37 @@ const getKycExternalApi = ({
|
|
|
34593
35001
|
});
|
|
34594
35002
|
const ConfigurationApiProvider = ({
|
|
34595
35003
|
children,
|
|
34596
|
-
|
|
35004
|
+
onUserEvent,
|
|
35005
|
+
rootLegalEntityId,
|
|
35006
|
+
componentName
|
|
34597
35007
|
}) => {
|
|
34598
35008
|
const authContext = useAuthContext();
|
|
34599
|
-
const
|
|
34600
|
-
|
|
35009
|
+
const {
|
|
35010
|
+
isEmbeddedDropin,
|
|
35011
|
+
loadingContext
|
|
35012
|
+
} = authContext;
|
|
35013
|
+
const sdkVersion = "3.10.0";
|
|
35014
|
+
useAnalytics({
|
|
35015
|
+
onUserEvent,
|
|
35016
|
+
isEmbeddedDropin,
|
|
35017
|
+
legalEntityId: rootLegalEntityId,
|
|
35018
|
+
sdkVersion,
|
|
35019
|
+
componentName
|
|
35020
|
+
});
|
|
35021
|
+
const contextValue = useMemo(() => isEmbeddedDropin ? getEmbeddedApi({
|
|
35022
|
+
base: loadingContext,
|
|
34601
35023
|
rootLegalEntityId
|
|
34602
35024
|
}) : getKycExternalApi({
|
|
34603
|
-
loadingContext
|
|
35025
|
+
loadingContext,
|
|
34604
35026
|
clientKey: authContext.clientKey
|
|
34605
35027
|
}), [authContext, rootLegalEntityId]);
|
|
34606
|
-
return
|
|
35028
|
+
return jsxs(ConfigurationApiContext.Provider, {
|
|
34607
35029
|
value: contextValue,
|
|
34608
|
-
children
|
|
35030
|
+
children: [jsx("span", {
|
|
35031
|
+
className: "adyen-kyc__sdk-version",
|
|
35032
|
+
hidden: true,
|
|
35033
|
+
children: sdkVersion
|
|
35034
|
+
}), children]
|
|
34609
35035
|
});
|
|
34610
35036
|
};
|
|
34611
35037
|
const logger$2 = createLogger("CoreProvider");
|
|
@@ -34748,7 +35174,7 @@ const settingsDefaults = {
|
|
|
34748
35174
|
hideOnboardingIntroductionTrust: true,
|
|
34749
35175
|
hideOnboardingIntroductionSoleProprietor: true,
|
|
34750
35176
|
viewOnboardingGuidance: false,
|
|
34751
|
-
|
|
35177
|
+
transferInstrumentLimit: 0
|
|
34752
35178
|
};
|
|
34753
35179
|
function SettingsProvider({
|
|
34754
35180
|
children,
|
|
@@ -35058,8 +35484,8 @@ const getRootLegalEntityId = (componentProps) => {
|
|
|
35058
35484
|
throw new Error("You must provide either `legalEntityId` or `legalEntityResponse`");
|
|
35059
35485
|
};
|
|
35060
35486
|
class UIElement extends BaseElement {
|
|
35061
|
-
constructor(
|
|
35062
|
-
super(
|
|
35487
|
+
constructor() {
|
|
35488
|
+
super(...arguments);
|
|
35063
35489
|
this.render = () => {
|
|
35064
35490
|
var _a;
|
|
35065
35491
|
const Component = this.props.component;
|
|
@@ -35072,6 +35498,8 @@ class UIElement extends BaseElement {
|
|
|
35072
35498
|
loadingContext: this.props.loadingContext,
|
|
35073
35499
|
children: jsx(ConfigurationApiProvider, {
|
|
35074
35500
|
rootLegalEntityId: getRootLegalEntityId(this.props.componentProps),
|
|
35501
|
+
onUserEvent: this.props.onUserEvent,
|
|
35502
|
+
componentName: this.props.componentName,
|
|
35075
35503
|
children: jsx(CoreProvider, {
|
|
35076
35504
|
contextCountry: this.props.contextCountry,
|
|
35077
35505
|
enableNewEntryFlowExperiment: (_a = this.props.experiments) == null ? void 0 : _a.EnableNewEntryFlow,
|
|
@@ -35100,8 +35528,6 @@ class UIElement extends BaseElement {
|
|
|
35100
35528
|
})
|
|
35101
35529
|
});
|
|
35102
35530
|
};
|
|
35103
|
-
if (props.onUserEvent)
|
|
35104
|
-
userEvents.subscribe(props.onUserEvent);
|
|
35105
35531
|
}
|
|
35106
35532
|
}
|
|
35107
35533
|
const normalizeEnvironment = (env) => env.endsWith("/") ? env : `${env}/`;
|
|
@@ -35752,11 +36178,14 @@ const createIndividualComponentSchema = {
|
|
|
35752
36178
|
type: "function"
|
|
35753
36179
|
}
|
|
35754
36180
|
};
|
|
35755
|
-
const
|
|
36181
|
+
const viewVerificationStatusComponentSchema = {
|
|
35756
36182
|
legalEntityId: {
|
|
35757
36183
|
type: "string",
|
|
35758
36184
|
required: true
|
|
35759
36185
|
},
|
|
36186
|
+
hideExplanation: {
|
|
36187
|
+
type: "boolean"
|
|
36188
|
+
},
|
|
35760
36189
|
redirectTarget: {
|
|
35761
36190
|
type: "string"
|
|
35762
36191
|
},
|
|
@@ -35773,6 +36202,12 @@ const onboardingRedirectComponentSchema = {
|
|
|
35773
36202
|
type: "string"
|
|
35774
36203
|
}
|
|
35775
36204
|
};
|
|
36205
|
+
const onboardingDropinComponentSchema = {
|
|
36206
|
+
legalEntityId: {
|
|
36207
|
+
type: "string",
|
|
36208
|
+
required: true
|
|
36209
|
+
}
|
|
36210
|
+
};
|
|
35776
36211
|
const componentsSchemaMap = {
|
|
35777
36212
|
payoutAccount: payoutAccountSchema,
|
|
35778
36213
|
soleProprietorDropin: solePropDropinSchema,
|
|
@@ -35785,7 +36220,8 @@ const componentsSchemaMap = {
|
|
|
35785
36220
|
manageTransferInstrumentComponent: manageTransferInstrumentComponentSchema,
|
|
35786
36221
|
createIndividualComponent: createIndividualComponentSchema,
|
|
35787
36222
|
createTransferInstrumentComponent: createTransferInstrumentComponentSchema,
|
|
35788
|
-
|
|
36223
|
+
viewVerificationStatusComponent: viewVerificationStatusComponentSchema,
|
|
36224
|
+
onboardingDropinComponent: onboardingDropinComponentSchema
|
|
35789
36225
|
};
|
|
35790
36226
|
const validateComponentName = (componentName) => {
|
|
35791
36227
|
if (!componentName) {
|
|
@@ -35914,7 +36350,8 @@ class Core {
|
|
|
35914
36350
|
const uiElement = new UIElement({
|
|
35915
36351
|
...mergedOptions,
|
|
35916
36352
|
component,
|
|
35917
|
-
componentProps: mergedOptions
|
|
36353
|
+
componentProps: mergedOptions,
|
|
36354
|
+
componentName
|
|
35918
36355
|
});
|
|
35919
36356
|
this.components.push(uiElement);
|
|
35920
36357
|
return uiElement;
|