@adyen/kyc-components 2.70.3 → 2.71.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/{BG-BVR5ytc-.js → BG-9eEmxtKB.js} +2 -2
- package/dist/es/adyen-kyc-components.es.js +43 -85
- package/dist/types/core/Context/ExperimentContext/types.d.ts +0 -4
- package/dist/types/core/models/currency.d.ts +0 -1
- package/dist/types/utils/api/processCapabilitites.d.ts +1 -2
- package/dist/types/utils/getFieldsWithExistingData.d.ts +1 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
try {
|
|
4
4
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "40d1dc95-b7c5-46d5-9879-893580b78671", e._sentryDebugIdIdentifier = "sentry-dbid-40d1dc95-b7c5-46d5-9879-893580b78671");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
const BG = {
|
|
11
11
|
iban: {
|
|
12
12
|
bankStatementRequirement: "REQUIRED",
|
|
13
|
-
defaultCurrency: "
|
|
13
|
+
defaultCurrency: "EUR",
|
|
14
14
|
fields: [
|
|
15
15
|
"accountHolder",
|
|
16
16
|
"accountHolderCity",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
try {
|
|
4
4
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "63c1ea62-14ce-439d-84bd-e63f6089a914", e._sentryDebugIdIdentifier = "sentry-dbid-63c1ea62-14ce-439d-84bd-e63f6089a914");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -2990,14 +2990,10 @@ function getFieldProps(props, innerFormFields) {
|
|
|
2990
2990
|
return null;
|
|
2991
2991
|
}
|
|
2992
2992
|
var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
|
|
2993
|
-
ExperimentNames2["EnableNewBusinessDetailsFlow"] = "EnableNewBusinessDetailsFlow";
|
|
2994
|
-
ExperimentNames2["EnableKompanySearchByRegistrationNumber"] = "EnableKompanySearchByRegistrationNumber";
|
|
2995
2993
|
ExperimentNames2["EnableNewAddressComponent"] = "EnableNewAddressComponent";
|
|
2996
2994
|
ExperimentNames2["AllowOrganizationSettlorWithExemptionReason"] = "AllowOrganizationSettlorWithExemptionReason";
|
|
2997
2995
|
ExperimentNames2["AllowMoreRolesForMainRootTrustee"] = "AllowMoreRolesForMainRootTrustee";
|
|
2998
2996
|
ExperimentNames2["ShowUnsupportedEntityType"] = "ShowUnsupportedEntityType";
|
|
2999
|
-
ExperimentNames2["ShowSingPassButtonForCompanies"] = "ShowSingPassButtonForCompanies";
|
|
3000
|
-
ExperimentNames2["ShowSingPassButtonForIndividuals"] = "ShowSingPassButtonForIndividuals";
|
|
3001
2997
|
ExperimentNames2["ShowExtraTaxExemptionReasons"] = "ShowExtraTaxExemptionReasons";
|
|
3002
2998
|
ExperimentNames2["EnableCountryOfGoverningLawForUKCompanies"] = "EnableCountryOfGoverningLawForUKCompanies";
|
|
3003
2999
|
ExperimentNames2["HidePayoutAccountTask"] = "HidePayoutAccountTask";
|
|
@@ -7315,18 +7311,16 @@ const defaultFieldConfig$9 = {
|
|
|
7315
7311
|
};
|
|
7316
7312
|
}
|
|
7317
7313
|
},
|
|
7318
|
-
[CountryCodes.UnitedStates]: ({ state
|
|
7314
|
+
[CountryCodes.UnitedStates]: ({ state }) => ({
|
|
7319
7315
|
label: "registrationNumber__US",
|
|
7320
7316
|
// eslint-disable-next-line no-nested-ternary
|
|
7321
|
-
mask:
|
|
7317
|
+
mask: state ? businessRegistrationNumberMasks[CountryCodes.UnitedStates][state] : businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
|
|
7322
7318
|
// eslint-disable-next-line no-nested-ternary
|
|
7323
|
-
validators:
|
|
7324
|
-
businessRegistrationNumberPatterns[CountryCodes.UnitedStates][state]
|
|
7325
|
-
) : validatePatternOnBlur(
|
|
7319
|
+
validators: state ? validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates][state]) : validatePatternOnBlur(
|
|
7326
7320
|
businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default
|
|
7327
|
-
)
|
|
7321
|
+
),
|
|
7328
7322
|
// eslint-disable-next-line no-nested-ternary
|
|
7329
|
-
guidanceText:
|
|
7323
|
+
guidanceText: state ? stateFormatGuidanceText[state] : stateFormatGuidanceText.default
|
|
7330
7324
|
})
|
|
7331
7325
|
};
|
|
7332
7326
|
const cachedStripPatterns = /* @__PURE__ */ new Map();
|
|
@@ -11515,7 +11509,6 @@ const DocumentUpload = memo(
|
|
|
11515
11509
|
var Currencies = /* @__PURE__ */ ((Currencies2) => {
|
|
11516
11510
|
Currencies2["AED"] = "AED";
|
|
11517
11511
|
Currencies2["AUD"] = "AUD";
|
|
11518
|
-
Currencies2["BGN"] = "BGN";
|
|
11519
11512
|
Currencies2["BRL"] = "BRL";
|
|
11520
11513
|
Currencies2["CAD"] = "CAD";
|
|
11521
11514
|
Currencies2["CHF"] = "CHF";
|
|
@@ -11542,7 +11535,7 @@ const currencyByCountry = {
|
|
|
11542
11535
|
[CountryCodes.Austria]: [Currencies.EUR],
|
|
11543
11536
|
[CountryCodes.Belgium]: [Currencies.EUR],
|
|
11544
11537
|
[CountryCodes.Brazil]: [Currencies.BRL],
|
|
11545
|
-
[CountryCodes.Bulgaria]: [Currencies.
|
|
11538
|
+
[CountryCodes.Bulgaria]: [Currencies.EUR],
|
|
11546
11539
|
[CountryCodes.Canada]: [Currencies.CAD, Currencies.USD],
|
|
11547
11540
|
[CountryCodes.Croatia]: [Currencies.HRK, Currencies.EUR],
|
|
11548
11541
|
[CountryCodes.Cyprus]: [Currencies.EUR],
|
|
@@ -14446,7 +14439,7 @@ const rules$3 = ({
|
|
|
14446
14439
|
},
|
|
14447
14440
|
countryRequiresRegistrationNumberForCompanies: () => {
|
|
14448
14441
|
var _a, _b;
|
|
14449
|
-
if (
|
|
14442
|
+
if (country === "US") {
|
|
14450
14443
|
return "OPTIONAL";
|
|
14451
14444
|
}
|
|
14452
14445
|
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
|
|
@@ -20389,7 +20382,6 @@ function BankVerification(props) {
|
|
|
20389
20382
|
}
|
|
20390
20383
|
const BankVerification$1 = memo(BankVerification);
|
|
20391
20384
|
const countriesWithMultipleCurrencies = /* @__PURE__ */ new Set([
|
|
20392
|
-
CountryCodes.Bulgaria,
|
|
20393
20385
|
CountryCodes.Canada,
|
|
20394
20386
|
CountryCodes.Croatia,
|
|
20395
20387
|
CountryCodes.CzechRepublic,
|
|
@@ -23655,7 +23647,7 @@ const UNRELATED_DATA_MISSING_ERROR_CODES = [
|
|
|
23655
23647
|
"2_8193"
|
|
23656
23648
|
];
|
|
23657
23649
|
const UNRELATED_INVALID_INPUT_ERROR_CODES = ["1_14", "2_901", "2_902"];
|
|
23658
|
-
function getCapabilityProblems(response, country
|
|
23650
|
+
function getCapabilityProblems(response, country) {
|
|
23659
23651
|
const capabilities = (response == null ? void 0 : response.capabilities) || {};
|
|
23660
23652
|
const capabilityProblems = {};
|
|
23661
23653
|
Object.values(capabilities).forEach(({ problems }) => {
|
|
@@ -23665,12 +23657,7 @@ function getCapabilityProblems(response, country, isExperimentEnabled) {
|
|
|
23665
23657
|
const { type: entityType, id: entityId } = problem.entity;
|
|
23666
23658
|
capabilityProblems[entityType] = capabilityProblems[entityType] || {};
|
|
23667
23659
|
capabilityProblems[entityType][entityId] = capabilityProblems[entityType][entityId] ?? getInitialProblemState(entityType, entityId, response);
|
|
23668
|
-
setProblem(
|
|
23669
|
-
problem,
|
|
23670
|
-
capabilityProblems[entityType][entityId],
|
|
23671
|
-
country,
|
|
23672
|
-
isExperimentEnabled
|
|
23673
|
-
);
|
|
23660
|
+
setProblem(problem, capabilityProblems[entityType][entityId], country);
|
|
23674
23661
|
}
|
|
23675
23662
|
});
|
|
23676
23663
|
}
|
|
@@ -23683,19 +23670,19 @@ const overrideVerificationErrors = (verificationErrors, country) => verification
|
|
|
23683
23670
|
}
|
|
23684
23671
|
return verificationError;
|
|
23685
23672
|
});
|
|
23686
|
-
function setProblem(problem, entityProblems, country
|
|
23673
|
+
function setProblem(problem, entityProblems, country) {
|
|
23687
23674
|
var _a;
|
|
23688
23675
|
if ((_a = problem.verificationErrors) == null ? void 0 : _a.length) {
|
|
23689
23676
|
overrideVerificationErrors(problem.verificationErrors, country).forEach((error) => {
|
|
23690
|
-
setVerificationError(error, entityProblems
|
|
23677
|
+
setVerificationError(error, entityProblems);
|
|
23691
23678
|
});
|
|
23692
23679
|
}
|
|
23693
23680
|
}
|
|
23694
|
-
function setVerificationError(error, entityProblems
|
|
23681
|
+
function setVerificationError(error, entityProblems) {
|
|
23695
23682
|
switch (error.type) {
|
|
23696
23683
|
case VerificationErrorType.INVALID_INPUT: {
|
|
23697
23684
|
if (!isUnRelatedErrorCode(error)) {
|
|
23698
|
-
setInvalidInputError(error, entityProblems
|
|
23685
|
+
setInvalidInputError(error, entityProblems);
|
|
23699
23686
|
}
|
|
23700
23687
|
break;
|
|
23701
23688
|
}
|
|
@@ -23735,7 +23722,7 @@ const getLinkedRemedidationFormFields = (acc, field) => {
|
|
|
23735
23722
|
break;
|
|
23736
23723
|
}
|
|
23737
23724
|
};
|
|
23738
|
-
function setInvalidInputError(parentVerificationError, entityProblems
|
|
23725
|
+
function setInvalidInputError(parentVerificationError, entityProblems) {
|
|
23739
23726
|
var _a, _b;
|
|
23740
23727
|
const processedSubErrors = (_a = parentVerificationError == null ? void 0 : parentVerificationError.subErrors) == null ? void 0 : _a.reduce(
|
|
23741
23728
|
(acc, { code, remediatingActions }) => {
|
|
@@ -23744,9 +23731,7 @@ function setInvalidInputError(parentVerificationError, entityProblems, isExperim
|
|
|
23744
23731
|
const remMapping = invalidInputRemediationActionMappings[remediatingAction.code];
|
|
23745
23732
|
if (remMapping) {
|
|
23746
23733
|
const { entityType } = entityProblems;
|
|
23747
|
-
const mappedCompFields = remMapping.flatMap(
|
|
23748
|
-
(context) => getComponentMappingFromLEFieldPath(context, entityType, isExperimentEnabled)
|
|
23749
|
-
).filter(Boolean);
|
|
23734
|
+
const mappedCompFields = remMapping.flatMap((context) => getComponentMappingFromLEFieldPath(context, entityType)).filter(Boolean);
|
|
23750
23735
|
const formsAndFields = mappedCompFields == null ? void 0 : mappedCompFields.reduce(
|
|
23751
23736
|
(acc3, fullFieldPath) => {
|
|
23752
23737
|
const [form, field] = fullFieldPath.split(/\.(.+)/, 2);
|
|
@@ -23797,7 +23782,7 @@ function setInvalidInputError(parentVerificationError, entityProblems, isExperim
|
|
|
23797
23782
|
});
|
|
23798
23783
|
setPriorityStatus(entityProblems, TaskStatus.ERROR);
|
|
23799
23784
|
}
|
|
23800
|
-
const getComponentMappingFromLEFieldPath = (context, entityType
|
|
23785
|
+
const getComponentMappingFromLEFieldPath = (context, entityType) => {
|
|
23801
23786
|
if (!(context == null ? void 0 : context.key)) {
|
|
23802
23787
|
return null;
|
|
23803
23788
|
}
|
|
@@ -23808,7 +23793,7 @@ const getComponentMappingFromLEFieldPath = (context, entityType, isExperimentEna
|
|
|
23808
23793
|
case LegalEntityType.INDIVIDUAL:
|
|
23809
23794
|
return remediationIndividualApiKeyMapping[context.key];
|
|
23810
23795
|
case LegalEntityType.ORGANIZATION:
|
|
23811
|
-
return
|
|
23796
|
+
return remediationBusinessDetailsApiKeyMapping[context.key];
|
|
23812
23797
|
case EntityType.BANK_ACCOUNT:
|
|
23813
23798
|
return remediationPayoutApiKeyMapping[context.key];
|
|
23814
23799
|
case LegalEntityType.SOLE_PROPRIETORSHIP:
|
|
@@ -24912,12 +24897,12 @@ function getNestedPropertyKeys(obj, includeUndefined = false, includeFalsy = tru
|
|
|
24912
24897
|
});
|
|
24913
24898
|
return fieldNames;
|
|
24914
24899
|
}
|
|
24915
|
-
const convertApiFieldNameToSchemaFieldName = (apiField, legalEntityType
|
|
24900
|
+
const convertApiFieldNameToSchemaFieldName = (apiField, legalEntityType) => {
|
|
24916
24901
|
switch (legalEntityType) {
|
|
24917
24902
|
case LegalEntityType.INDIVIDUAL:
|
|
24918
24903
|
return individualApiKeyMapping[apiField];
|
|
24919
24904
|
case LegalEntityType.ORGANIZATION:
|
|
24920
|
-
return
|
|
24905
|
+
return businessDetailsApiKeyMapping[apiField];
|
|
24921
24906
|
case LegalEntityType.SOLE_PROPRIETORSHIP:
|
|
24922
24907
|
return solePropApiKeyMapping[apiField];
|
|
24923
24908
|
case LegalEntityType.TRUST:
|
|
@@ -24930,14 +24915,12 @@ const knownProblematicFields = [
|
|
|
24930
24915
|
"personalDetails.typeOfIdentity",
|
|
24931
24916
|
"personalDetails.issuerState"
|
|
24932
24917
|
];
|
|
24933
|
-
const getFieldsWithExistingData = (legalEntity
|
|
24918
|
+
const getFieldsWithExistingData = (legalEntity) => {
|
|
24934
24919
|
var _a;
|
|
24935
24920
|
const apiFieldsWithExistingData = getNestedPropertyKeys(legalEntity);
|
|
24936
24921
|
const legalEntityType = legalEntity.type;
|
|
24937
24922
|
if (!legalEntityType) return [];
|
|
24938
|
-
const nonDocumentFields = apiFieldsWithExistingData.map(
|
|
24939
|
-
(field) => convertApiFieldNameToSchemaFieldName(field, legalEntityType, isExperimentEnabled)
|
|
24940
|
-
).filter((field) => field !== void 0).filter((field) => !knownProblematicFields.includes(field));
|
|
24923
|
+
const nonDocumentFields = apiFieldsWithExistingData.map((field) => convertApiFieldNameToSchemaFieldName(field, legalEntityType)).filter((field) => field !== void 0).filter((field) => !knownProblematicFields.includes(field));
|
|
24941
24924
|
if ((_a = legalEntity.documentDetails) == null ? void 0 : _a.length) {
|
|
24942
24925
|
const documentFields = legalEntity.documentDetails.map((document2) => legalEntityDocumentToFieldMapping[legalEntityType][document2.type]).filter((field) => field !== void 0);
|
|
24943
24926
|
return [...nonDocumentFields, ...documentFields];
|
|
@@ -26458,7 +26441,6 @@ function CompanyStructureComponent({
|
|
|
26458
26441
|
});
|
|
26459
26442
|
const formUtils = formUtilities({ labels: labels2, requiredFields }, i18n);
|
|
26460
26443
|
useEffect(() => {
|
|
26461
|
-
if (!isExperimentEnabled("EnableNewBusinessDetailsFlow")) return;
|
|
26462
26444
|
if (!showCompanyStructure && !verifiedBusiness) {
|
|
26463
26445
|
setValid("entityType", false);
|
|
26464
26446
|
return setData("entityType", data == null ? void 0 : data.entityType);
|
|
@@ -28376,7 +28358,7 @@ function BusinessDetailsDropinComponent({
|
|
|
28376
28358
|
}, []);
|
|
28377
28359
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
28378
28360
|
const [currentProblems, setCurrentProblems] = useState(
|
|
28379
|
-
problems ?? ((_c = (_b = getCapabilityProblems(legalEntityResponse, currentCountry
|
|
28361
|
+
problems ?? ((_c = (_b = getCapabilityProblems(legalEntityResponse, currentCountry)) == null ? void 0 : _b.LegalEntity) == null ? void 0 : _c[legalEntityResponse.id])
|
|
28380
28362
|
);
|
|
28381
28363
|
const [showCompanyStructure, setShowCompanyStructure] = useState(currentCountry !== "US");
|
|
28382
28364
|
const [showBusinessSelection, setShowBusinessSelection] = useState(false);
|
|
@@ -28412,7 +28394,7 @@ function BusinessDetailsDropinComponent({
|
|
|
28412
28394
|
initialForms,
|
|
28413
28395
|
(currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [],
|
|
28414
28396
|
(currentProblems == null ? void 0 : currentProblems.missingData) ?? [],
|
|
28415
|
-
legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse
|
|
28397
|
+
legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [],
|
|
28416
28398
|
customRules,
|
|
28417
28399
|
{},
|
|
28418
28400
|
{},
|
|
@@ -29391,14 +29373,14 @@ const singpassReducer = (state, action) => {
|
|
|
29391
29373
|
return state;
|
|
29392
29374
|
}
|
|
29393
29375
|
};
|
|
29394
|
-
const getApiMapping = (
|
|
29376
|
+
const getApiMapping = (legalEntity) => {
|
|
29395
29377
|
if (!legalEntity) return;
|
|
29396
29378
|
const { type } = legalEntity;
|
|
29397
29379
|
if (type === LegalEntityType.INDIVIDUAL) {
|
|
29398
29380
|
return individualComponentsKeyMapping;
|
|
29399
29381
|
}
|
|
29400
29382
|
if (type === LegalEntityType.ORGANIZATION) {
|
|
29401
|
-
return
|
|
29383
|
+
return businessDetailsComponentsKeyMapping;
|
|
29402
29384
|
}
|
|
29403
29385
|
};
|
|
29404
29386
|
const getTrustedEntityAssociations = (legalEntityTrustedFields) => {
|
|
@@ -29424,11 +29406,7 @@ const useSingpassMyInfoLogin = ({
|
|
|
29424
29406
|
singpassReducer,
|
|
29425
29407
|
defaultSingpassState
|
|
29426
29408
|
);
|
|
29427
|
-
const
|
|
29428
|
-
const isSingpassForCompaniesEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
|
|
29429
|
-
const isSingpassForIndividualsEnabled = isExperimentEnabled("ShowSingPassButtonForIndividuals");
|
|
29430
|
-
const enableBusinessDetailsFlow = isExperimentEnabled("EnableNewBusinessDetailsFlow");
|
|
29431
|
-
const apiMapping = getApiMapping(enableBusinessDetailsFlow, legalEntity);
|
|
29409
|
+
const apiMapping = getApiMapping(legalEntity);
|
|
29432
29410
|
const legalEntityTrustedFields = legalEntity == null ? void 0 : legalEntity.trustedFields;
|
|
29433
29411
|
const isEligibleForSingpass = useMemo(() => {
|
|
29434
29412
|
if (!legalEntity) {
|
|
@@ -29437,18 +29415,17 @@ const useSingpassMyInfoLogin = ({
|
|
|
29437
29415
|
if (getLegalEntityCountry(legalEntity) !== CountryCodes.Singapore) {
|
|
29438
29416
|
return false;
|
|
29439
29417
|
}
|
|
29440
|
-
if (!isSingpassForCompaniesEnabled && !isSingpassForIndividualsEnabled) return false;
|
|
29441
29418
|
const isSingpassEnabled = Boolean(handleOpenSingpassAuthorizationLink);
|
|
29442
29419
|
if (!isSingpassEnabled) return false;
|
|
29443
29420
|
if (accountHolder) {
|
|
29444
|
-
return accountHolder === "theCompanyIWorkFor"
|
|
29421
|
+
return accountHolder === "theCompanyIWorkFor" || accountHolder === "myName";
|
|
29445
29422
|
}
|
|
29446
29423
|
const legalEntityType = legalEntity.type;
|
|
29447
29424
|
const isPartOfTrust = isPartOfTrustFromLegalEntity(legalEntity);
|
|
29448
29425
|
const isVanillaOrganization = legalEntityType === LegalEntityType.ORGANIZATION && !isPartOfTrust;
|
|
29449
29426
|
const hasSoleProprietor = hasSolePropInLegalEntity(legalEntity);
|
|
29450
29427
|
const isVanillaIndividual = legalEntityType === LegalEntityType.INDIVIDUAL && !hasSoleProprietor;
|
|
29451
|
-
return isVanillaOrganization
|
|
29428
|
+
return isVanillaOrganization || isVanillaIndividual;
|
|
29452
29429
|
}, [legalEntity, accountHolder, handleOpenSingpassAuthorizationLink]);
|
|
29453
29430
|
const singpassTrustedFields = useMemo(() => {
|
|
29454
29431
|
var _a;
|
|
@@ -31808,7 +31785,7 @@ function TaskListComponent({
|
|
|
31808
31785
|
onTransferInstrumentDelete,
|
|
31809
31786
|
singpassComponent
|
|
31810
31787
|
}) {
|
|
31811
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l
|
|
31788
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
31812
31789
|
const { accountHolder } = useCoreContext();
|
|
31813
31790
|
const { i18n } = useI18nContext();
|
|
31814
31791
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
@@ -31828,7 +31805,7 @@ function TaskListComponent({
|
|
|
31828
31805
|
const isCompany = tasks.some((task) => task === TaskTypes.COMPANY);
|
|
31829
31806
|
const companyTaskType = useMemo(() => {
|
|
31830
31807
|
if (isCompany) {
|
|
31831
|
-
return
|
|
31808
|
+
return TaskTypes.BUSINESS_DETAILS;
|
|
31832
31809
|
}
|
|
31833
31810
|
}, [isCompany, isExperimentEnabled]);
|
|
31834
31811
|
const hasSoleProprietorship = accountHolder === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
|
|
@@ -31856,7 +31833,6 @@ function TaskListComponent({
|
|
|
31856
31833
|
);
|
|
31857
31834
|
const handleOnNavigateToTaskReview = () => onNavigateToTask(TaskTypes.REVIEW);
|
|
31858
31835
|
const handleOnNavigateToTaskIndividual = () => onNavigateToTask(TaskTypes.INDIVIDUAL);
|
|
31859
|
-
const handleOnNavigateToTaskCompany = () => onNavigateToTask(TaskTypes.COMPANY);
|
|
31860
31836
|
const handleOnNavigateToTaskBusinessDetails = () => onNavigateToTask(TaskTypes.BUSINESS_DETAILS);
|
|
31861
31837
|
const handleOnNavigateToTaskDecisionMaker = () => onNavigateToTask(TaskTypes.DECISION_MAKER_OVERVIEW);
|
|
31862
31838
|
const handleOnNavigateToTaskTrust = () => onNavigateToTask(TaskTypes.TRUST);
|
|
@@ -31966,22 +31942,6 @@ function TaskListComponent({
|
|
|
31966
31942
|
problems: getOwnSolePropProblems(legalEntityResponse, capabilityProblems)
|
|
31967
31943
|
}
|
|
31968
31944
|
),
|
|
31969
|
-
companyTaskType === TaskTypes.COMPANY && /* @__PURE__ */ jsx(
|
|
31970
|
-
TaskListItem,
|
|
31971
|
-
{
|
|
31972
|
-
testId: TaskTypes.COMPANY,
|
|
31973
|
-
onNavigateToTask: handleOnNavigateToTaskCompany,
|
|
31974
|
-
icon: "company",
|
|
31975
|
-
titleKey: hasTrust ? "companyTrusteeDetails" : "companyDetails",
|
|
31976
|
-
status: getTaskStatus(
|
|
31977
|
-
EntityType.LEGAL_ENTITY,
|
|
31978
|
-
capabilityProblems,
|
|
31979
|
-
legalEntityResponse,
|
|
31980
|
-
[legalEntityResponse.id]
|
|
31981
|
-
),
|
|
31982
|
-
problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[legalEntityResponse.id]
|
|
31983
|
-
}
|
|
31984
|
-
),
|
|
31985
31945
|
companyTaskType === TaskTypes.BUSINESS_DETAILS && /* @__PURE__ */ jsx(
|
|
31986
31946
|
TaskListItem,
|
|
31987
31947
|
{
|
|
@@ -31995,7 +31955,7 @@ function TaskListComponent({
|
|
|
31995
31955
|
legalEntityResponse,
|
|
31996
31956
|
[legalEntityResponse.id]
|
|
31997
31957
|
),
|
|
31998
|
-
problems: (
|
|
31958
|
+
problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[legalEntityResponse.id]
|
|
31999
31959
|
}
|
|
32000
31960
|
),
|
|
32001
31961
|
tasks.includes(TaskTypes.DECISION_MAKER) && /* @__PURE__ */ jsx(
|
|
@@ -32090,10 +32050,10 @@ function TaskListComponent({
|
|
|
32090
32050
|
EntityType.BANK_ACCOUNT,
|
|
32091
32051
|
capabilityProblems,
|
|
32092
32052
|
legalEntityResponse,
|
|
32093
|
-
[(
|
|
32053
|
+
[(_h = (_g = legalEntityResponse == null ? void 0 : legalEntityResponse.transferInstruments) == null ? void 0 : _g[0]) == null ? void 0 : _h.id]
|
|
32094
32054
|
) : TaskStatus.DETAILS_REQUIRED,
|
|
32095
32055
|
disabled: !canAddPayoutAccount,
|
|
32096
|
-
problems: (
|
|
32056
|
+
problems: (_k = capabilityProblems == null ? void 0 : capabilityProblems.BankAccount) == null ? void 0 : _k[(_j = (_i = legalEntityResponse == null ? void 0 : legalEntityResponse.transferInstruments) == null ? void 0 : _i[0]) == null ? void 0 : _j.id]
|
|
32097
32057
|
}
|
|
32098
32058
|
)
|
|
32099
32059
|
}
|
|
@@ -32131,7 +32091,7 @@ function TaskListComponent({
|
|
|
32131
32091
|
icon: "review",
|
|
32132
32092
|
titleKey: "submitReviewOfYourData",
|
|
32133
32093
|
status: TaskStatus.SUBMIT,
|
|
32134
|
-
problems: (
|
|
32094
|
+
problems: (_l = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _l[legalEntityResponse.id],
|
|
32135
32095
|
showErrorAlerts: "always"
|
|
32136
32096
|
}
|
|
32137
32097
|
) })
|
|
@@ -33178,7 +33138,7 @@ const useBankConfigurationHandlers = ({
|
|
|
33178
33138
|
provider
|
|
33179
33139
|
};
|
|
33180
33140
|
};
|
|
33181
|
-
const accountFormatsImports = /* @__PURE__ */ Object.assign({ "./AD.json": () => import("./AD-CyP5INSp.js"), "./AE.json": () => import("./AE-mIZ12t47.js"), "./AI.json": () => import("./AI-CYOqGKk2.js"), "./AL.json": () => import("./AL-BX1fEo1A.js"), "./AR.json": () => import("./AR-C9kMRnHG.js"), "./AS.json": () => import("./AS-B0TMZQ6o.js"), "./AT.json": () => import("./AT-DJLlevck.js"), "./AU.json": () => import("./AU-B5LSe4bo.js"), "./AX.json": () => import("./AX-Z6f6EnJc.js"), "./AZ.json": () => import("./AZ-BqrKjWMH.js"), "./BA.json": () => import("./BA-BbP72Tn6.js"), "./BE.json": () => import("./BE-B-m_4F41.js"), "./BG.json": () => import("./BG-
|
|
33141
|
+
const accountFormatsImports = /* @__PURE__ */ Object.assign({ "./AD.json": () => import("./AD-CyP5INSp.js"), "./AE.json": () => import("./AE-mIZ12t47.js"), "./AI.json": () => import("./AI-CYOqGKk2.js"), "./AL.json": () => import("./AL-BX1fEo1A.js"), "./AR.json": () => import("./AR-C9kMRnHG.js"), "./AS.json": () => import("./AS-B0TMZQ6o.js"), "./AT.json": () => import("./AT-DJLlevck.js"), "./AU.json": () => import("./AU-B5LSe4bo.js"), "./AX.json": () => import("./AX-Z6f6EnJc.js"), "./AZ.json": () => import("./AZ-BqrKjWMH.js"), "./BA.json": () => import("./BA-BbP72Tn6.js"), "./BE.json": () => import("./BE-B-m_4F41.js"), "./BG.json": () => import("./BG-9eEmxtKB.js"), "./BH.json": () => import("./BH-Ded1Eyrc.js"), "./BM.json": () => import("./BM-CBl-UQUl.js"), "./BR.json": () => import("./BR-DsY9PZVZ.js"), "./BS.json": () => import("./BS-dBfArxRw.js"), "./BV.json": () => import("./BV-D0QBsH7-.js"), "./BY.json": () => import("./BY-BsQUo3fM.js"), "./CA.json": () => import("./CA-DT4cmOOe.js"), "./CH.json": () => import("./CH-CesIKOYy.js"), "./CN.json": () => import("./CN-BV-5PSpq.js"), "./CR.json": () => import("./CR-Dtv-rXg9.js"), "./CY.json": () => import("./CY-BnJ7k_mN.js"), "./CZ.json": () => import("./CZ-BhoS6sd6.js"), "./DE.json": () => import("./DE-DdcbG-CC.js"), "./DK.json": () => import("./DK-DA8qRrzq.js"), "./DO.json": () => import("./DO-B1BWc3Iy.js"), "./EC.json": () => import("./EC-DbNXe71-.js"), "./EE.json": () => import("./EE-CaXoPgZz.js"), "./ES.json": () => import("./ES-Bt_oaIaf.js"), "./FI.json": () => import("./FI-C5V3lLuN.js"), "./FJ.json": () => import("./FJ-CBdbPf5l.js"), "./FO.json": () => import("./FO-1pD1p939.js"), "./FR.json": () => import("./FR-Bc1tLIC4.js"), "./GB.json": () => import("./GB-CgPHb-dM.js"), "./GE.json": () => import("./GE-Deog1a3Z.js"), "./GF.json": () => import("./GF-Cda8N7A4.js"), "./GG.json": () => import("./GG-BGuqxplU.js"), "./GI.json": () => import("./GI-CROkpYrU.js"), "./GL.json": () => import("./GL-0vO9Of9c.js"), "./GP.json": () => import("./GP-za-3opp-.js"), "./GR.json": () => import("./GR-B9c2boG8.js"), "./GT.json": () => import("./GT-C1jhs-Dx.js"), "./GU.json": () => import("./GU-CALV5vh1.js"), "./HK.json": () => import("./HK-BB3PIq-Z.js"), "./HR.json": () => import("./HR-p4luVYpu.js"), "./HU.json": () => import("./HU-v3vOxRm8.js"), "./ID.json": () => import("./ID-BcOv4SXj.js"), "./IE.json": () => import("./IE-Cli_j7Al.js"), "./IL.json": () => import("./IL-CQ0yHRRe.js"), "./IM.json": () => import("./IM-mpIyBn16.js"), "./IN.json": () => import("./IN-BhEI9o7G.js"), "./IS.json": () => import("./IS-02zCAdvq.js"), "./IT.json": () => import("./IT-CzURFhrK.js"), "./JE.json": () => import("./JE-MFwIYti7.js"), "./JM.json": () => import("./JM-BMGgBK6y.js"), "./JO.json": () => import("./JO-rY8A8f9C.js"), "./JP.json": () => import("./JP-BQG5dF1Y.js"), "./KR.json": () => import("./KR-74SwXHka.js"), "./KW.json": () => import("./KW-CcVPOJ8B.js"), "./KY.json": () => import("./KY-DXCeltYA.js"), "./KZ.json": () => import("./KZ-CZNjdp22.js"), "./LB.json": () => import("./LB-DZ5YfAsO.js"), "./LI.json": () => import("./LI-DA06W10W.js"), "./LT.json": () => import("./LT-DuU6E2Ct.js"), "./LU.json": () => import("./LU-BQHhNpDy.js"), "./LV.json": () => import("./LV-DN7wckbP.js"), "./MC.json": () => import("./MC-DtSWC4jS.js"), "./MD.json": () => import("./MD-DVc0183a.js"), "./ME.json": () => import("./ME-DiJhSuli.js"), "./MK.json": () => import("./MK-BZxslBTS.js"), "./MP.json": () => import("./MP-7IpnbfCj.js"), "./MQ.json": () => import("./MQ-DusG_no1.js"), "./MR.json": () => import("./MR-DaBVNHqN.js"), "./MT.json": () => import("./MT-DeDMQ1f_.js"), "./MU.json": () => import("./MU-D3gGVu1R.js"), "./MX.json": () => import("./MX-CZVOFg3D.js"), "./MY.json": () => import("./MY-ym71svTa.js"), "./NC.json": () => import("./NC-xzMvjp9-.js"), "./NL.json": () => import("./NL-aVL0NAp-.js"), "./NO.json": () => import("./NO-DlYk5HZt.js"), "./NZ.json": () => import("./NZ-DbPw3QYJ.js"), "./PE.json": () => import("./PE-CdxgPh3v.js"), "./PF.json": () => import("./PF-CstaOd9Z.js"), "./PH.json": () => import("./PH-BYgMDYIH.js"), "./PK.json": () => import("./PK-bLhtgsEk.js"), "./PL.json": () => import("./PL-Bg7axKQA.js"), "./PM.json": () => import("./PM-BWbxAh4u.js"), "./PR.json": () => import("./PR-CFPKXEXp.js"), "./PS.json": () => import("./PS-B8obOOWY.js"), "./PT.json": () => import("./PT-hB1HnBM2.js"), "./QA.json": () => import("./QA-CSfx-mvb.js"), "./RE.json": () => import("./RE-BApq1FJ6.js"), "./RO.json": () => import("./RO-BLlC4CKq.js"), "./RS.json": () => import("./RS-BCenke-W.js"), "./RU.json": () => import("./RU-D27RC7dq.js"), "./SA.json": () => import("./SA-C9VgxCgm.js"), "./SE.json": () => import("./SE-q25Qt85B.js"), "./SG.json": () => import("./SG-DoCqjlFi.js"), "./SI.json": () => import("./SI-BzA-ozn6.js"), "./SJ.json": () => import("./SJ-Z9jwQQlz.js"), "./SK.json": () => import("./SK-DOTdLJPw.js"), "./SM.json": () => import("./SM-B4BIgmhk.js"), "./TF.json": () => import("./TF-BOWng-Dz.js"), "./TH.json": () => import("./TH-CvyXLcZK.js"), "./TL.json": () => import("./TL-BWslydRz.js"), "./TN.json": () => import("./TN-Cjd3bM_V.js"), "./TR.json": () => import("./TR-BBx5CuWS.js"), "./TT.json": () => import("./TT-D4-z5BA-.js"), "./TW.json": () => import("./TW-BC8YpnMr.js"), "./UA.json": () => import("./UA-DrXUnAe6.js"), "./US.json": () => import("./US-D8dI5_i1.js"), "./UY.json": () => import("./UY-DEHqLXhX.js"), "./VA.json": () => import("./VA-bPXdCnwD.js"), "./VG.json": () => import("./VG-DnKAVCsi.js"), "./VI.json": () => import("./VI-CU9MA9ux.js"), "./VN.json": () => import("./VN-CTSqsmB6.js"), "./WF.json": () => import("./WF-CwHbsjtJ.js"), "./YT.json": () => import("./YT-BCyAAbo7.js"), "./ZA.json": () => import("./ZA-NU7slima.js") });
|
|
33182
33142
|
const getAccountFormatsForCountry = async (country) => {
|
|
33183
33143
|
const importForCountry = accountFormatsImports[`./${country}.json`];
|
|
33184
33144
|
if (!importForCountry) {
|
|
@@ -35928,7 +35888,7 @@ function DropinComposerComponent({
|
|
|
35928
35888
|
const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
|
|
35929
35889
|
const [transferInstrument, setTransferInstrument] = useState(null);
|
|
35930
35890
|
const [capabilityProblems, setCapabilityProblems] = useState(
|
|
35931
|
-
getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry
|
|
35891
|
+
getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry)
|
|
35932
35892
|
);
|
|
35933
35893
|
const { currentTask, previousTask, navigateTo, navigateBack } = useNavigation({
|
|
35934
35894
|
legalEntity: legalEntityResponse,
|
|
@@ -36063,9 +36023,7 @@ function DropinComposerComponent({
|
|
|
36063
36023
|
(legalEntity) => {
|
|
36064
36024
|
if (!legalEntity) return;
|
|
36065
36025
|
setRootLegalEntity(legalEntity);
|
|
36066
|
-
setCapabilityProblems(
|
|
36067
|
-
getCapabilityProblems(legalEntity, getLegalEntityCountry(legalEntity), isExperimentEnabled)
|
|
36068
|
-
);
|
|
36026
|
+
setCapabilityProblems(getCapabilityProblems(legalEntity, getLegalEntityCountry(legalEntity)));
|
|
36069
36027
|
},
|
|
36070
36028
|
[isExperimentEnabled]
|
|
36071
36029
|
);
|
|
@@ -39355,7 +39313,7 @@ const convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
|
|
|
39355
39313
|
};
|
|
39356
39314
|
};
|
|
39357
39315
|
const useAnalytics = ({ onUserEvent, legalEntityId, componentName }) => {
|
|
39358
|
-
const sdkVersion = "2.
|
|
39316
|
+
const sdkVersion = "2.71.1";
|
|
39359
39317
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
39360
39318
|
const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
|
|
39361
39319
|
useEffect(() => {
|
|
@@ -39697,7 +39655,7 @@ const ConfigurationApiProvider = ({
|
|
|
39697
39655
|
[authContext, rootLegalEntityId]
|
|
39698
39656
|
);
|
|
39699
39657
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
39700
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "2.
|
|
39658
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "2.71.1" }),
|
|
39701
39659
|
children
|
|
39702
39660
|
] });
|
|
39703
39661
|
};
|
|
@@ -40313,7 +40271,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40313
40271
|
};
|
|
40314
40272
|
const copyToClipboard = async () => {
|
|
40315
40273
|
const toCopy = {
|
|
40316
|
-
sdkVersion: "2.
|
|
40274
|
+
sdkVersion: "2.71.1",
|
|
40317
40275
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40318
40276
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40319
40277
|
};
|
|
@@ -40378,7 +40336,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40378
40336
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40379
40337
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40380
40338
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40381
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.
|
|
40339
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.71.1" })
|
|
40382
40340
|
] }) }),
|
|
40383
40341
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40384
40342
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
|
@@ -40523,7 +40481,7 @@ class UIElement extends BaseElement {
|
|
|
40523
40481
|
userEvents.updateBaseTrackingPayload({
|
|
40524
40482
|
...baseTracking,
|
|
40525
40483
|
componentName: this.props.componentName,
|
|
40526
|
-
sdkVersion: "2.
|
|
40484
|
+
sdkVersion: "2.71.1",
|
|
40527
40485
|
userAgent: navigator.userAgent
|
|
40528
40486
|
});
|
|
40529
40487
|
return /* @__PURE__ */ jsx(SettingsProvider, { settings: this.props.settings, children: /* @__PURE__ */ jsx(
|
|
@@ -4,14 +4,10 @@ import type { ComponentChildren } from 'preact';
|
|
|
4
4
|
* This list is defined in the BE.
|
|
5
5
|
*/
|
|
6
6
|
export declare enum ExperimentNames {
|
|
7
|
-
EnableNewBusinessDetailsFlow = "EnableNewBusinessDetailsFlow",
|
|
8
|
-
EnableKompanySearchByRegistrationNumber = "EnableKompanySearchByRegistrationNumber",
|
|
9
7
|
EnableNewAddressComponent = "EnableNewAddressComponent",
|
|
10
8
|
AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
|
|
11
9
|
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
|
|
12
10
|
ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
|
|
13
|
-
ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies",
|
|
14
|
-
ShowSingPassButtonForIndividuals = "ShowSingPassButtonForIndividuals",
|
|
15
11
|
ShowExtraTaxExemptionReasons = "ShowExtraTaxExemptionReasons",
|
|
16
12
|
EnableCountryOfGoverningLawForUKCompanies = "EnableCountryOfGoverningLawForUKCompanies",
|
|
17
13
|
HidePayoutAccountTask = "HidePayoutAccountTask",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ExperimentName } from '../../core/Context/ExperimentContext/types';
|
|
2
1
|
import type { CapabilityName } from '../../core/models/api/capability';
|
|
3
2
|
import type { ExistingLegalEntity, LegalEntity } from '../../core/models/api/legal-entity';
|
|
4
3
|
import type { CountryCode } from '../../core/models/country-code';
|
|
@@ -52,6 +51,6 @@ import type { Remediation } from '../../core/models/errors/remediation';
|
|
|
52
51
|
* ```
|
|
53
52
|
*
|
|
54
53
|
* */
|
|
55
|
-
export declare function getCapabilityProblems(response: LegalEntity, country: CountryCode
|
|
54
|
+
export declare function getCapabilityProblems(response: LegalEntity, country: CountryCode): CapabilityProblems;
|
|
56
55
|
export declare const remediationHasFileUploadField: (remediation: Remediation) => boolean;
|
|
57
56
|
export declare const getCapabilities: (legalEntity?: ExistingLegalEntity) => CapabilityName[];
|
|
@@ -3,8 +3,7 @@ import type { CompanySchema } from '../components/Company/types';
|
|
|
3
3
|
import type { IndividualSchema } from '../components/Individual/types';
|
|
4
4
|
import type { SolePropSchema } from '../components/SoleProp/types';
|
|
5
5
|
import type { TrustSchema } from '../components/Trust/types';
|
|
6
|
-
import type { ExperimentName } from '../core/Context/ExperimentContext/types';
|
|
7
6
|
import type { ExistingLegalEntity } from '../core/models/api/legal-entity';
|
|
8
7
|
import type { RecursiveKeyOf } from './getNestedPropertyKeys';
|
|
9
8
|
export type AnyTLDSFieldName = RecursiveKeyOf<IndividualSchema> | RecursiveKeyOf<CompanySchema> | RecursiveKeyOf<BusinessDetailsSchema> | RecursiveKeyOf<SolePropSchema> | RecursiveKeyOf<TrustSchema>;
|
|
10
|
-
export declare const getFieldsWithExistingData: (legalEntity: ExistingLegalEntity
|
|
9
|
+
export declare const getFieldsWithExistingData: (legalEntity: ExistingLegalEntity) => AnyTLDSFieldName[];
|