@adyen/kyc-components 2.9.2 → 2.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/adyen-kyc-components.es.js +253 -191
- package/dist/style.css +36 -8
- package/dist/types/components/AccountSetupRejected/component/AccountSetupRejected.d.ts +2 -0
- package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PciDropin/components/PciDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PciDropin/types.d.ts +0 -1
- package/dist/types/components/PayoutDetails/types.d.ts +1 -0
- package/dist/types/components/TaskList/types.d.ts +2 -1
- package/dist/types/components/TrustRegistrationDetails/types.d.ts +4 -2
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
- package/dist/types/components/internal/Alert/types.d.ts +1 -0
- package/dist/types/core/Services/componentApi/get-allowed-locales.d.ts +3 -0
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/language/config.d.ts +2 -0
- package/dist/types/utils/decision-maker-roles.d.ts +1 -1
- package/dist/types/utils/entity-status-util.d.ts +2 -2
- package/dist/types/utils/get-task-status.d.ts +1 -0
- package/dist/types/utils/trust-util.d.ts +4 -1
- package/package.json +2 -2
|
@@ -218,6 +218,8 @@ const completeReview = "Complete review";
|
|
|
218
218
|
const submitReview = "Submit review";
|
|
219
219
|
const undoWithTimer = "Undo %{secondsLeft}";
|
|
220
220
|
const removing = "Removing...";
|
|
221
|
+
const cantSetUpAcccount = "You can’t set up an account";
|
|
222
|
+
const accountCantBeSetUp = "Your account can’t be set up as your information couldn’t be verified. To find out more, reach out to customer support.";
|
|
221
223
|
const pleaseNote = "Please note:";
|
|
222
224
|
const byClickingSubmitReview = "By clicking 'Submit review', you confirm that all of your information has been reviewed, and that all newly provided or already existing data is accurate and up-to-date.";
|
|
223
225
|
const nameAndCountry = "Name and country";
|
|
@@ -1273,6 +1275,8 @@ const defaultTrans = {
|
|
|
1273
1275
|
submitReview,
|
|
1274
1276
|
undoWithTimer,
|
|
1275
1277
|
removing,
|
|
1278
|
+
cantSetUpAcccount,
|
|
1279
|
+
accountCantBeSetUp,
|
|
1276
1280
|
pleaseNote,
|
|
1277
1281
|
byClickingSubmitReview,
|
|
1278
1282
|
nameAndCountry,
|
|
@@ -2576,6 +2580,7 @@ const Alert = ({
|
|
|
2576
2580
|
});
|
|
2577
2581
|
};
|
|
2578
2582
|
const AlertIcon = ({
|
|
2583
|
+
className,
|
|
2579
2584
|
type
|
|
2580
2585
|
}) => {
|
|
2581
2586
|
switch (type) {
|
|
@@ -2585,7 +2590,8 @@ const AlertIcon = ({
|
|
|
2585
2590
|
});
|
|
2586
2591
|
case AlertTypes.ERROR:
|
|
2587
2592
|
return jsx(Icon, {
|
|
2588
|
-
name: "warning"
|
|
2593
|
+
name: "warning",
|
|
2594
|
+
className
|
|
2589
2595
|
});
|
|
2590
2596
|
case AlertTypes.WARNING:
|
|
2591
2597
|
return jsx(Icon, {
|
|
@@ -2747,7 +2753,7 @@ const createLogger = (namespace) => {
|
|
|
2747
2753
|
});
|
|
2748
2754
|
return methods;
|
|
2749
2755
|
};
|
|
2750
|
-
const logger$
|
|
2756
|
+
const logger$m = createLogger("Link");
|
|
2751
2757
|
const getIconClass = (icon, external) => {
|
|
2752
2758
|
if (external) {
|
|
2753
2759
|
return "adl-link__icon adyen-kyc-icon-external-link";
|
|
@@ -2759,7 +2765,7 @@ const getIconClass = (icon, external) => {
|
|
|
2759
2765
|
};
|
|
2760
2766
|
const isValidLink = (href) => {
|
|
2761
2767
|
if (href === "#") {
|
|
2762
|
-
logger$
|
|
2768
|
+
logger$m.error('Links must include a valid href. If your href is "#", consider using a Button instead');
|
|
2763
2769
|
return false;
|
|
2764
2770
|
}
|
|
2765
2771
|
return true;
|
|
@@ -3352,7 +3358,7 @@ class ValidationResult {
|
|
|
3352
3358
|
return this.validationResults.filter((result) => result.hasError);
|
|
3353
3359
|
}
|
|
3354
3360
|
}
|
|
3355
|
-
const logger$
|
|
3361
|
+
const logger$l = createLogger("useAsyncValidator");
|
|
3356
3362
|
const useAsyncValidator = (asyncRules) => {
|
|
3357
3363
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
3358
3364
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -3375,7 +3381,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
3375
3381
|
hasError: !isValid
|
|
3376
3382
|
}])
|
|
3377
3383
|
});
|
|
3378
|
-
}).catch(logger$
|
|
3384
|
+
}).catch(logger$l.error);
|
|
3379
3385
|
}, [asyncRules, clearAsyncValidationResults]);
|
|
3380
3386
|
return {
|
|
3381
3387
|
asyncValidationResults,
|
|
@@ -7505,7 +7511,7 @@ function datasetUtilities(locale) {
|
|
|
7505
7511
|
getDatasetKey: (identifier) => createDatasetKey(identifier, locale)
|
|
7506
7512
|
};
|
|
7507
7513
|
}
|
|
7508
|
-
const logger$
|
|
7514
|
+
const logger$k = createLogger("CountryField");
|
|
7509
7515
|
const COUNTRY_FIELD = "country";
|
|
7510
7516
|
function CountryField({
|
|
7511
7517
|
data,
|
|
@@ -7528,7 +7534,7 @@ function CountryField({
|
|
|
7528
7534
|
dataset: countriesFromApi
|
|
7529
7535
|
} = useDataset(datasetIdentifier.country);
|
|
7530
7536
|
useEffect(() => {
|
|
7531
|
-
loadFlags2().catch(logger$
|
|
7537
|
+
loadFlags2().catch(logger$k.error);
|
|
7532
7538
|
}, [loadFlags2]);
|
|
7533
7539
|
const countries = countriesFromApi.filter((country2) => allowedCountries.length ? allowedCountries.includes(country2.id) : true).map((item) => ({
|
|
7534
7540
|
...item,
|
|
@@ -8532,6 +8538,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
|
8532
8538
|
TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
|
|
8533
8539
|
TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
|
|
8534
8540
|
TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
|
|
8541
|
+
TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
|
|
8535
8542
|
return TaskTypes2;
|
|
8536
8543
|
})(TaskTypes || {});
|
|
8537
8544
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
@@ -8655,7 +8662,7 @@ const accountHolderValidationRules = {
|
|
|
8655
8662
|
}
|
|
8656
8663
|
};
|
|
8657
8664
|
const accountHolderFields = ["accountHolder"];
|
|
8658
|
-
const logger$
|
|
8665
|
+
const logger$j = createLogger("AccountHolder");
|
|
8659
8666
|
function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntityTypeAllowed, isTrustFlowEnabled, isSoleProprietorshipAllowed, isChangeToMyNameAllowed) {
|
|
8660
8667
|
switch (legalEntityType) {
|
|
8661
8668
|
case LegalEntityType.ORGANIZATION: {
|
|
@@ -8665,7 +8672,7 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
|
|
|
8665
8672
|
return [...isChangeToMyNameAllowed ? ["myName"] : [], ...isChangeOfLegalEntityTypeAllowed ? ["theCompanyIWorkFor"] : [], ...isTrustFlowEnabled ? ["aTrust"] : [], ...isSoleProprietorshipAllowed ? ["mySoleTraderName"] : []];
|
|
8666
8673
|
}
|
|
8667
8674
|
default:
|
|
8668
|
-
logger$
|
|
8675
|
+
logger$j.error(`No available account holder options for legal entity type '${legalEntityType}'`);
|
|
8669
8676
|
return [];
|
|
8670
8677
|
}
|
|
8671
8678
|
}
|
|
@@ -9395,7 +9402,7 @@ function Dropzone(props) {
|
|
|
9395
9402
|
})]
|
|
9396
9403
|
});
|
|
9397
9404
|
}
|
|
9398
|
-
const logger$
|
|
9405
|
+
const logger$i = createLogger("TextArea");
|
|
9399
9406
|
function TextArea(props) {
|
|
9400
9407
|
const {
|
|
9401
9408
|
classNameModifiers,
|
|
@@ -9416,7 +9423,7 @@ function TextArea(props) {
|
|
|
9416
9423
|
} = useI18nContext();
|
|
9417
9424
|
const [value, setValue] = useState("");
|
|
9418
9425
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
9419
|
-
logger$
|
|
9426
|
+
logger$i.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
9420
9427
|
}
|
|
9421
9428
|
const handleInput = (e) => {
|
|
9422
9429
|
var _a;
|
|
@@ -9825,7 +9832,7 @@ function FieldContainer(props) {
|
|
|
9825
9832
|
}
|
|
9826
9833
|
return renderField(fieldName);
|
|
9827
9834
|
}
|
|
9828
|
-
const logger$
|
|
9835
|
+
const logger$h = createLogger("SearchAddress");
|
|
9829
9836
|
const SearchAddress = ({
|
|
9830
9837
|
data,
|
|
9831
9838
|
legalEntityId,
|
|
@@ -9851,7 +9858,7 @@ const SearchAddress = ({
|
|
|
9851
9858
|
const response = await handleFindAddress(selectedAddressId);
|
|
9852
9859
|
autocompleteAddressForm(response);
|
|
9853
9860
|
} catch (e) {
|
|
9854
|
-
logger$
|
|
9861
|
+
logger$h.error(e);
|
|
9855
9862
|
}
|
|
9856
9863
|
};
|
|
9857
9864
|
const onDrilldown = async (selectedAddress) => {
|
|
@@ -9863,7 +9870,7 @@ const SearchAddress = ({
|
|
|
9863
9870
|
}, legalEntityId);
|
|
9864
9871
|
setItems((response == null ? void 0 : response.results) || []);
|
|
9865
9872
|
} catch (e) {
|
|
9866
|
-
logger$
|
|
9873
|
+
logger$h.error(e);
|
|
9867
9874
|
}
|
|
9868
9875
|
};
|
|
9869
9876
|
const onChange = (e) => {
|
|
@@ -9918,7 +9925,7 @@ const SearchAddress = ({
|
|
|
9918
9925
|
setItems([]);
|
|
9919
9926
|
}
|
|
9920
9927
|
} catch (e) {
|
|
9921
|
-
logger$
|
|
9928
|
+
logger$h.error(e);
|
|
9922
9929
|
}
|
|
9923
9930
|
setLoading(false);
|
|
9924
9931
|
}
|
|
@@ -11132,7 +11139,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
|
11132
11139
|
reader.onerror = (error) => reject(error);
|
|
11133
11140
|
});
|
|
11134
11141
|
const getFileExtention = (fileName2) => fileName2.split(".").pop();
|
|
11135
|
-
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
|
|
11142
|
+
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
|
|
11136
11143
|
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
|
|
11137
11144
|
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
|
|
11138
11145
|
const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.Gibraltar, CountryCodes.HongKong, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.Singapore, CountryCodes.UnitedStates];
|
|
@@ -11427,6 +11434,92 @@ const hasMinRequiredDecisionMakerCount = (legalEntityResponse) => {
|
|
|
11427
11434
|
return roleTypes.some((role2) => min ? (existingDecisionMakerCount == null ? void 0 : existingDecisionMakerCount[role2]) ?? min <= 0 : true);
|
|
11428
11435
|
});
|
|
11429
11436
|
};
|
|
11437
|
+
var TrustTypes = /* @__PURE__ */ ((TrustTypes2) => {
|
|
11438
|
+
TrustTypes2["BUSINESS_TRUST"] = "businessTrust";
|
|
11439
|
+
TrustTypes2["CASH_MANAGEMENT_TRUST"] = "cashManagementTrust";
|
|
11440
|
+
TrustTypes2["CHARTIABLE_TRUST"] = "charitableTrust";
|
|
11441
|
+
TrustTypes2["CORPORATE_UNIT_TRUST"] = "corporateUnitTrust";
|
|
11442
|
+
TrustTypes2["DECEASED_ESTATE"] = "deceasedEstate";
|
|
11443
|
+
TrustTypes2["DISCRETIONARY_INVESTMENT_TRUST"] = "discretionaryInvestmentTrust";
|
|
11444
|
+
TrustTypes2["DISCRETIONARY_SERVICES_MANAGEMENT_TRUST"] = "discretionaryServicesManagementTrust";
|
|
11445
|
+
TrustTypes2["DISCRETIONARY_TRADING_TRUST"] = "discretionaryTradingTrust";
|
|
11446
|
+
TrustTypes2["DISCRETIONARY_TRUST"] = "discretionaryTrust";
|
|
11447
|
+
TrustTypes2["FAMILY_TRUST"] = "familyTrust";
|
|
11448
|
+
TrustTypes2["FIRST_HOME_SAVER_ACCOUNTS_TRUST"] = "firstHomeSaverAccountsTrust";
|
|
11449
|
+
TrustTypes2["FIXED_TRUST"] = "fixedTrust";
|
|
11450
|
+
TrustTypes2["FIXED_UNIT_TRUST"] = "fixedUnitTrust";
|
|
11451
|
+
TrustTypes2["HYBRID_TRUST"] = "hybridTrust";
|
|
11452
|
+
TrustTypes2["LISTED_PUBLIC_UNIT_TRUST"] = "listedPublicUnitTrust";
|
|
11453
|
+
TrustTypes2["OTHER_TRUST"] = "otherTrust";
|
|
11454
|
+
TrustTypes2["POOLED_SUPERANNUATION_TRUST"] = "pooledSuperannuationTrust";
|
|
11455
|
+
TrustTypes2["PUBLIC_TRADING_TRUST"] = "publicTradingTrust";
|
|
11456
|
+
TrustTypes2["UNLISTED_PUBLIC_UNIT_TRUST"] = "unlistedPublicUnitTrust";
|
|
11457
|
+
return TrustTypes2;
|
|
11458
|
+
})(TrustTypes || {});
|
|
11459
|
+
const trustTypeOptions = [{
|
|
11460
|
+
id: TrustTypes.BUSINESS_TRUST,
|
|
11461
|
+
name: "businessTrust"
|
|
11462
|
+
}, {
|
|
11463
|
+
id: TrustTypes.CASH_MANAGEMENT_TRUST,
|
|
11464
|
+
name: "cashManagementTrust"
|
|
11465
|
+
}, {
|
|
11466
|
+
id: TrustTypes.CHARTIABLE_TRUST,
|
|
11467
|
+
name: "charitableTrust"
|
|
11468
|
+
}, {
|
|
11469
|
+
id: TrustTypes.CORPORATE_UNIT_TRUST,
|
|
11470
|
+
name: "corporateUnitTrust"
|
|
11471
|
+
}, {
|
|
11472
|
+
id: TrustTypes.DECEASED_ESTATE,
|
|
11473
|
+
name: "deceasedEstate"
|
|
11474
|
+
}, {
|
|
11475
|
+
id: TrustTypes.DISCRETIONARY_INVESTMENT_TRUST,
|
|
11476
|
+
name: "discretionaryInvestmentTrust"
|
|
11477
|
+
}, {
|
|
11478
|
+
id: TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,
|
|
11479
|
+
name: "discretionaryServicesManagementTrust"
|
|
11480
|
+
}, {
|
|
11481
|
+
id: TrustTypes.DISCRETIONARY_TRADING_TRUST,
|
|
11482
|
+
name: "discretionaryTradingTrust"
|
|
11483
|
+
}, {
|
|
11484
|
+
id: TrustTypes.DISCRETIONARY_TRUST,
|
|
11485
|
+
name: "discretionaryTrust"
|
|
11486
|
+
}, {
|
|
11487
|
+
id: TrustTypes.FAMILY_TRUST,
|
|
11488
|
+
name: "familyTrust"
|
|
11489
|
+
}, {
|
|
11490
|
+
id: TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST,
|
|
11491
|
+
name: "firstHomeSaverAccountsTrust"
|
|
11492
|
+
}, {
|
|
11493
|
+
id: TrustTypes.FIXED_TRUST,
|
|
11494
|
+
name: "fixedTrust"
|
|
11495
|
+
}, {
|
|
11496
|
+
id: TrustTypes.FIXED_UNIT_TRUST,
|
|
11497
|
+
name: "fixedUnitTrust"
|
|
11498
|
+
}, {
|
|
11499
|
+
id: TrustTypes.HYBRID_TRUST,
|
|
11500
|
+
name: "hybridTrust"
|
|
11501
|
+
}, {
|
|
11502
|
+
id: TrustTypes.LISTED_PUBLIC_UNIT_TRUST,
|
|
11503
|
+
name: "listedPublicUnitTrust"
|
|
11504
|
+
}, {
|
|
11505
|
+
id: TrustTypes.OTHER_TRUST,
|
|
11506
|
+
name: "otherTrust"
|
|
11507
|
+
}, {
|
|
11508
|
+
id: TrustTypes.POOLED_SUPERANNUATION_TRUST,
|
|
11509
|
+
name: "pooledSuperannuationTrust"
|
|
11510
|
+
}, {
|
|
11511
|
+
id: TrustTypes.PUBLIC_TRADING_TRUST,
|
|
11512
|
+
name: "publicTradingTrust"
|
|
11513
|
+
}, {
|
|
11514
|
+
id: TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST,
|
|
11515
|
+
name: "unlistedPublicUnitTrust"
|
|
11516
|
+
}];
|
|
11517
|
+
const nzSpecificTrustTypes = [TrustTypes.DISCRETIONARY_TRUST, TrustTypes.FAMILY_TRUST, TrustTypes.CHARTIABLE_TRUST, TrustTypes.BUSINESS_TRUST, TrustTypes.OTHER_TRUST];
|
|
11518
|
+
const auSpecificTrustTypes = [TrustTypes.CASH_MANAGEMENT_TRUST, TrustTypes.CORPORATE_UNIT_TRUST, TrustTypes.DECEASED_ESTATE, TrustTypes.DISCRETIONARY_INVESTMENT_TRUST, TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST, TrustTypes.DISCRETIONARY_TRADING_TRUST, TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST, TrustTypes.FIXED_TRUST, TrustTypes.FIXED_UNIT_TRUST, TrustTypes.HYBRID_TRUST, TrustTypes.LISTED_PUBLIC_UNIT_TRUST, TrustTypes.OTHER_TRUST, TrustTypes.POOLED_SUPERANNUATION_TRUST, TrustTypes.PUBLIC_TRADING_TRUST, TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST];
|
|
11519
|
+
const countryToTrustTypes = {
|
|
11520
|
+
[CountryCodes.Australia]: auSpecificTrustTypes,
|
|
11521
|
+
[CountryCodes.NewZealand]: nzSpecificTrustTypes
|
|
11522
|
+
};
|
|
11430
11523
|
const TRUST_MEMBER_COUNT_RANGE = {
|
|
11431
11524
|
[TrustMemberTypes.DEFINED_BENEFICIARY]: {
|
|
11432
11525
|
min: 1
|
|
@@ -11532,6 +11625,20 @@ const trustMemberGuidanceRoles = {
|
|
|
11532
11625
|
className: "adl-tag--orange"
|
|
11533
11626
|
}
|
|
11534
11627
|
};
|
|
11628
|
+
const getCountrySpecificTrustTypeOptions = (country2) => {
|
|
11629
|
+
const countrySpecificTrustTypes = countryToTrustTypes[country2];
|
|
11630
|
+
if (!countrySpecificTrustTypes) {
|
|
11631
|
+
return [];
|
|
11632
|
+
}
|
|
11633
|
+
const countrySpecificTrustTypeOptions = countrySpecificTrustTypes.map((countrySpecificTrustType) => {
|
|
11634
|
+
const countrySpecificTrustTypeOption = trustTypeOptions.find((trustTypeOption) => trustTypeOption.id === countrySpecificTrustType);
|
|
11635
|
+
if (!countrySpecificTrustTypeOption) {
|
|
11636
|
+
throw new Error("getCountrySpecificTrustTypeOptions(): unknown trust type");
|
|
11637
|
+
}
|
|
11638
|
+
return countrySpecificTrustTypeOption;
|
|
11639
|
+
});
|
|
11640
|
+
return countrySpecificTrustTypeOptions;
|
|
11641
|
+
};
|
|
11535
11642
|
const entityAssociationRoles = {
|
|
11536
11643
|
...trustMemberRoles,
|
|
11537
11644
|
...decisionMakerRoles
|
|
@@ -11625,7 +11732,8 @@ function checkForImportantCapabilityStatus(type, capabilityProblems, entityIds)
|
|
|
11625
11732
|
return importantStatuses.reduce((prev, curr) => curr > prev ? curr : prev);
|
|
11626
11733
|
}
|
|
11627
11734
|
const hasPendingCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse.capabilities ?? {}).some((capability) => capability.verificationStatus === "pending");
|
|
11628
|
-
const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus === VerificationStatus.VALID
|
|
11735
|
+
const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus === VerificationStatus.VALID);
|
|
11736
|
+
const hasRejectedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).some((capability) => capability.verificationStatus === VerificationStatus.REJECTED);
|
|
11629
11737
|
const emptyFieldsForIndividual = ["name.firstName", "name.lastName", "residentialAddress.country"];
|
|
11630
11738
|
const emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
|
|
11631
11739
|
const emptyFieldsForTrust = ["name", "registeredAddress.country"];
|
|
@@ -11669,7 +11777,8 @@ const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false
|
|
|
11669
11777
|
const countryToTaxInfoTypeMap = {
|
|
11670
11778
|
US: "EIN",
|
|
11671
11779
|
AU: "ABN",
|
|
11672
|
-
NZ: "IRD"
|
|
11780
|
+
NZ: "IRD",
|
|
11781
|
+
HK: "BRN"
|
|
11673
11782
|
};
|
|
11674
11783
|
const updateTaxInformation = ({
|
|
11675
11784
|
taxId: taxId2,
|
|
@@ -13155,7 +13264,7 @@ const initOnfido = async ({
|
|
|
13155
13264
|
language: getOnfidoLocaleConfig(i18n)
|
|
13156
13265
|
});
|
|
13157
13266
|
};
|
|
13158
|
-
const logger$
|
|
13267
|
+
const logger$g = createLogger("IdVerificationComponent");
|
|
13159
13268
|
function IdVerificationComponent({
|
|
13160
13269
|
userDetails,
|
|
13161
13270
|
handleGetIdVerificationToken,
|
|
@@ -13186,7 +13295,7 @@ function IdVerificationComponent({
|
|
|
13186
13295
|
onIdVerificationError,
|
|
13187
13296
|
onIdVerificationComplete
|
|
13188
13297
|
});
|
|
13189
|
-
})().catch(logger$
|
|
13298
|
+
})().catch(logger$g.error);
|
|
13190
13299
|
return () => {
|
|
13191
13300
|
if (onfidoSdk.current)
|
|
13192
13301
|
onfidoSdk.current.tearDown();
|
|
@@ -13238,7 +13347,7 @@ function IdDocumentAlreadyUpload(props) {
|
|
|
13238
13347
|
})]
|
|
13239
13348
|
});
|
|
13240
13349
|
}
|
|
13241
|
-
const logger$
|
|
13350
|
+
const logger$f = createLogger("IdDocumentInstantVerificationComponent");
|
|
13242
13351
|
const idVerificationSchema = ["instantIdVerificationData", "idDocumentType"];
|
|
13243
13352
|
const documentTypeValidationRules = {
|
|
13244
13353
|
instantIdVerificationData: {
|
|
@@ -13319,7 +13428,7 @@ function IdDocumentInstantVerificationComponent(props) {
|
|
|
13319
13428
|
handleGetIdVerificationToken: props.handleGetIdVerificationToken,
|
|
13320
13429
|
userDetails: props.userDetails,
|
|
13321
13430
|
onIdVerificationComplete: handleIdVerificationComplete,
|
|
13322
|
-
onIdVerificationError: logger$
|
|
13431
|
+
onIdVerificationError: logger$f.error
|
|
13323
13432
|
}), jsxs("div", {
|
|
13324
13433
|
className: "adyen-kyc-document-upload__manual-upload",
|
|
13325
13434
|
children: [i18n.get("canNotCompleteInstantVerification"), " ", jsx("button", {
|
|
@@ -16108,7 +16217,7 @@ const removeAnimationStartListener = (element, listener) => {
|
|
|
16108
16217
|
element.removeEventListener("MSAnimationStart", listener, false);
|
|
16109
16218
|
element.removeEventListener("webkitAnimationStart", listener, false);
|
|
16110
16219
|
};
|
|
16111
|
-
const logger$
|
|
16220
|
+
const logger$e = createLogger("Fetch");
|
|
16112
16221
|
const getRequestObject = (options, data) => {
|
|
16113
16222
|
const {
|
|
16114
16223
|
headers = [],
|
|
@@ -16154,7 +16263,7 @@ const handleFetchError = (message, level) => {
|
|
|
16154
16263
|
case "info":
|
|
16155
16264
|
case "warn":
|
|
16156
16265
|
case "error":
|
|
16157
|
-
return logger$
|
|
16266
|
+
return logger$e[level](message);
|
|
16158
16267
|
default:
|
|
16159
16268
|
throw new Error(message);
|
|
16160
16269
|
}
|
|
@@ -16214,7 +16323,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
|
|
|
16214
16323
|
const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
|
|
16215
16324
|
const MOUNT_TIMEOUT = 10 * 1e3;
|
|
16216
16325
|
const TINK_VENDOR = "Tink";
|
|
16217
|
-
const logger$
|
|
16326
|
+
const logger$d = createLogger("iframeWidget");
|
|
16218
16327
|
const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
|
|
16219
16328
|
const isTerminalMessageData = (data) => Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
|
|
16220
16329
|
const parseMessageJson = (message) => {
|
|
@@ -16233,7 +16342,7 @@ const callbackErrorHandler = async (response) => {
|
|
|
16233
16342
|
try {
|
|
16234
16343
|
await response;
|
|
16235
16344
|
} catch (ex) {
|
|
16236
|
-
logger$
|
|
16345
|
+
logger$d.error(ex);
|
|
16237
16346
|
}
|
|
16238
16347
|
return {
|
|
16239
16348
|
error: "UNKNOWN_ERROR",
|
|
@@ -16339,7 +16448,7 @@ class IFrameWidget {
|
|
|
16339
16448
|
message = responseData.errorMessage;
|
|
16340
16449
|
}
|
|
16341
16450
|
} catch (ex) {
|
|
16342
|
-
logger$
|
|
16451
|
+
logger$d.error(ex);
|
|
16343
16452
|
}
|
|
16344
16453
|
throw new AdyenKycSdkError(message);
|
|
16345
16454
|
}
|
|
@@ -16518,7 +16627,7 @@ function BankVerificationWidget({
|
|
|
16518
16627
|
ref: widgetContainerRef
|
|
16519
16628
|
});
|
|
16520
16629
|
}
|
|
16521
|
-
const logger$
|
|
16630
|
+
const logger$c = createLogger("BankVerification");
|
|
16522
16631
|
const accountVerificationFields = ["verifiedAccountHolder", "verifiedBankCountry", "verifiedBankName", "verifiedCurrencyCode", "verifiedBankAccountNumber"];
|
|
16523
16632
|
const InstantVerificationErrorContext = createContext(null);
|
|
16524
16633
|
const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
|
|
@@ -16552,7 +16661,7 @@ const usePreferredVendorForCountry = (country2, getBankVerificationVendors) => {
|
|
|
16552
16661
|
const preferredVendor2 = vendors[0];
|
|
16553
16662
|
setPreferredVendor(preferredVendor2.name ? preferredVendor2 : null);
|
|
16554
16663
|
};
|
|
16555
|
-
getPreferredVendor().catch(logger$
|
|
16664
|
+
getPreferredVendor().catch(logger$c.error);
|
|
16556
16665
|
}, [country2, getBankVerificationVendors]);
|
|
16557
16666
|
return preferredVendor;
|
|
16558
16667
|
};
|
|
@@ -18504,28 +18613,6 @@ function SolePropComponent(props) {
|
|
|
18504
18613
|
});
|
|
18505
18614
|
}
|
|
18506
18615
|
const Trust = "";
|
|
18507
|
-
var TrustTypes = /* @__PURE__ */ ((TrustTypes2) => {
|
|
18508
|
-
TrustTypes2["BUSINESS_TRUST"] = "businessTrust";
|
|
18509
|
-
TrustTypes2["CASH_MANAGEMENT_TRUST"] = "cashManagementTrust";
|
|
18510
|
-
TrustTypes2["CHARTIABLE_TRUST"] = "charitableTrust";
|
|
18511
|
-
TrustTypes2["CORPORATE_UNIT_TRUST"] = "corporateUnitTrust";
|
|
18512
|
-
TrustTypes2["DECEASED_ESTATE"] = "deceasedEstate";
|
|
18513
|
-
TrustTypes2["DISCRETIONARY_INVESTMENT_TRUST"] = "discretionaryInvestmentTrust";
|
|
18514
|
-
TrustTypes2["DISCRETIONARY_SERVICES_MANAGEMENT_TRUST"] = "discretionaryServicesManagementTrust";
|
|
18515
|
-
TrustTypes2["DISCRETIONARY_TRADING_TRUST"] = "discretionaryTradingTrust";
|
|
18516
|
-
TrustTypes2["DISCRETIONARY_TRUST"] = "discretionaryTrust";
|
|
18517
|
-
TrustTypes2["FAMILY_TRUST"] = "familyTrust";
|
|
18518
|
-
TrustTypes2["FIRST_HOME_SAVER_ACCOUNTS_TRUST"] = "firstHomeSaverAccountsTrust";
|
|
18519
|
-
TrustTypes2["FIXED_TRUST"] = "fixedTrust";
|
|
18520
|
-
TrustTypes2["FIXED_UNIT_TRUST"] = "fixedUnitTrust";
|
|
18521
|
-
TrustTypes2["HYBRID_TRUST"] = "hybridTrust";
|
|
18522
|
-
TrustTypes2["LISTED_PUBLIC_UNIT_TRUST"] = "listedPublicUnitTrust";
|
|
18523
|
-
TrustTypes2["OTHER_TRUST"] = "otherTrust";
|
|
18524
|
-
TrustTypes2["POOLED_SUPERANNUATION_TRUST"] = "pooledSuperannuationTrust";
|
|
18525
|
-
TrustTypes2["PUBLIC_TRADING_TRUST"] = "publicTradingTrust";
|
|
18526
|
-
TrustTypes2["UNLISTED_PUBLIC_UNIT_TRUST"] = "unlistedPublicUnitTrust";
|
|
18527
|
-
return TrustTypes2;
|
|
18528
|
-
})(TrustTypes || {});
|
|
18529
18616
|
const ContextHelper$1 = "";
|
|
18530
18617
|
const ContextHelper = ({
|
|
18531
18618
|
content
|
|
@@ -18538,64 +18625,6 @@ const ContextHelper = ({
|
|
|
18538
18625
|
}), content]
|
|
18539
18626
|
})
|
|
18540
18627
|
});
|
|
18541
|
-
const trustTypeOptions = [{
|
|
18542
|
-
id: TrustTypes.BUSINESS_TRUST,
|
|
18543
|
-
name: "businessTrust"
|
|
18544
|
-
}, {
|
|
18545
|
-
id: TrustTypes.CASH_MANAGEMENT_TRUST,
|
|
18546
|
-
name: "cashManagementTrust"
|
|
18547
|
-
}, {
|
|
18548
|
-
id: TrustTypes.CHARTIABLE_TRUST,
|
|
18549
|
-
name: "charitableTrust"
|
|
18550
|
-
}, {
|
|
18551
|
-
id: TrustTypes.CORPORATE_UNIT_TRUST,
|
|
18552
|
-
name: "corporateUnitTrust"
|
|
18553
|
-
}, {
|
|
18554
|
-
id: TrustTypes.DECEASED_ESTATE,
|
|
18555
|
-
name: "deceasedEstate"
|
|
18556
|
-
}, {
|
|
18557
|
-
id: TrustTypes.DISCRETIONARY_INVESTMENT_TRUST,
|
|
18558
|
-
name: "discretionaryInvestmentTrust"
|
|
18559
|
-
}, {
|
|
18560
|
-
id: TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,
|
|
18561
|
-
name: "discretionaryServicesManagementTrust"
|
|
18562
|
-
}, {
|
|
18563
|
-
id: TrustTypes.DISCRETIONARY_TRADING_TRUST,
|
|
18564
|
-
name: "discretionaryTradingTrust"
|
|
18565
|
-
}, {
|
|
18566
|
-
id: TrustTypes.DISCRETIONARY_TRUST,
|
|
18567
|
-
name: "discretionaryTrust"
|
|
18568
|
-
}, {
|
|
18569
|
-
id: TrustTypes.FAMILY_TRUST,
|
|
18570
|
-
name: "familyTrust"
|
|
18571
|
-
}, {
|
|
18572
|
-
id: TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST,
|
|
18573
|
-
name: "firstHomeSaverAccountsTrust"
|
|
18574
|
-
}, {
|
|
18575
|
-
id: TrustTypes.FIXED_TRUST,
|
|
18576
|
-
name: "fixedTrust"
|
|
18577
|
-
}, {
|
|
18578
|
-
id: TrustTypes.FIXED_UNIT_TRUST,
|
|
18579
|
-
name: "fixedUnitTrust"
|
|
18580
|
-
}, {
|
|
18581
|
-
id: TrustTypes.HYBRID_TRUST,
|
|
18582
|
-
name: "hybridTrust"
|
|
18583
|
-
}, {
|
|
18584
|
-
id: TrustTypes.LISTED_PUBLIC_UNIT_TRUST,
|
|
18585
|
-
name: "listedPublicUnitTrust"
|
|
18586
|
-
}, {
|
|
18587
|
-
id: TrustTypes.OTHER_TRUST,
|
|
18588
|
-
name: "otherTrust"
|
|
18589
|
-
}, {
|
|
18590
|
-
id: TrustTypes.POOLED_SUPERANNUATION_TRUST,
|
|
18591
|
-
name: "pooledSuperannuationTrust"
|
|
18592
|
-
}, {
|
|
18593
|
-
id: TrustTypes.PUBLIC_TRADING_TRUST,
|
|
18594
|
-
name: "publicTradingTrust"
|
|
18595
|
-
}, {
|
|
18596
|
-
id: TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST,
|
|
18597
|
-
name: "unlistedPublicUnitTrust"
|
|
18598
|
-
}];
|
|
18599
18628
|
const trustRegistrationDetailsValidations = {
|
|
18600
18629
|
trustType: {
|
|
18601
18630
|
modes: ["blur"],
|
|
@@ -18664,8 +18693,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18664
18693
|
triggerValidation(["country"]);
|
|
18665
18694
|
}
|
|
18666
18695
|
}, [(_a = props.data) == null ? void 0 : _a.country]);
|
|
18667
|
-
const
|
|
18668
|
-
const selectableTrustTypeOptions = props.country === CountryCodes.NewZealand ? [...nzTrustTypes, TrustTypes.OTHER_TRUST].map((nzTrustType) => trustTypeOptions.find((trustTypeOption) => trustTypeOption.id === nzTrustType)).filter((t) => !!t) : trustTypeOptions.filter((trustTypeOption) => !nzTrustTypes.includes(trustTypeOption.id));
|
|
18696
|
+
const trustTypeOptions2 = getCountrySpecificTrustTypeOptions(props.country) ?? [];
|
|
18669
18697
|
return jsxs(Fragment, {
|
|
18670
18698
|
children: [jsx(StateContextSetter, {
|
|
18671
18699
|
owner: TRUST_REGISTRATION_DETAILS,
|
|
@@ -18719,7 +18747,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18719
18747
|
name: "trustType",
|
|
18720
18748
|
onChange: handleChangeFor("trustType", "blur"),
|
|
18721
18749
|
selected: data.trustType,
|
|
18722
|
-
items:
|
|
18750
|
+
items: trustTypeOptions2.map(({
|
|
18723
18751
|
id: id2,
|
|
18724
18752
|
name
|
|
18725
18753
|
}) => ({
|
|
@@ -19759,7 +19787,7 @@ const defaultPayoutAccountFormat = {
|
|
|
19759
19787
|
[CountryCodes.Sweden]: "local",
|
|
19760
19788
|
[CountryCodes.UnitedKingdom]: "local"
|
|
19761
19789
|
};
|
|
19762
|
-
const logger$
|
|
19790
|
+
const logger$b = createLogger("useScenarioConfiguration");
|
|
19763
19791
|
const useScenarioConfiguration = ({
|
|
19764
19792
|
getConfigurationData,
|
|
19765
19793
|
getPayoutAccountFormatData,
|
|
@@ -19781,12 +19809,12 @@ const useScenarioConfiguration = ({
|
|
|
19781
19809
|
const response = await getConfigurationData();
|
|
19782
19810
|
setConfigurationResponse(response);
|
|
19783
19811
|
} catch (err) {
|
|
19784
|
-
logger$
|
|
19812
|
+
logger$b.warn("WARNING: Configuration request failed - error:", err);
|
|
19785
19813
|
} finally {
|
|
19786
19814
|
setLoadingStatus("success");
|
|
19787
19815
|
}
|
|
19788
19816
|
};
|
|
19789
|
-
makeConfigCallAndSave().catch(logger$
|
|
19817
|
+
makeConfigCallAndSave().catch(logger$b.error);
|
|
19790
19818
|
}, [getConfigurationData, setLoadingStatus]);
|
|
19791
19819
|
useEffect(() => {
|
|
19792
19820
|
setLoadingStatus("loading");
|
|
@@ -19802,12 +19830,12 @@ const useScenarioConfiguration = ({
|
|
|
19802
19830
|
const defaultAccountFormat = defaultPayoutAccountFormat[country2] ?? allowedBankAccountFormats[0];
|
|
19803
19831
|
setAccountFormat(defaultAccountFormat);
|
|
19804
19832
|
} catch (err) {
|
|
19805
|
-
logger$
|
|
19833
|
+
logger$b.warn("WARNING: Payout format request failed - error:", err);
|
|
19806
19834
|
} finally {
|
|
19807
19835
|
setLoadingStatus("success");
|
|
19808
19836
|
}
|
|
19809
19837
|
};
|
|
19810
|
-
makePayoutFormatCallAndSave().catch(logger$
|
|
19838
|
+
makePayoutFormatCallAndSave().catch(logger$b.error);
|
|
19811
19839
|
}, [country2, setAccountFormat, getPayoutAccountFormatData, setLoadingStatus]);
|
|
19812
19840
|
const {
|
|
19813
19841
|
fieldConfigurations,
|
|
@@ -20452,7 +20480,7 @@ var ToastType = /* @__PURE__ */ ((ToastType2) => {
|
|
|
20452
20480
|
return ToastType2;
|
|
20453
20481
|
})(ToastType || {});
|
|
20454
20482
|
const FormComposer = "";
|
|
20455
|
-
const logger$
|
|
20483
|
+
const logger$a = createLogger("FormRouterContextProvider");
|
|
20456
20484
|
function FormRouterContextProvider({
|
|
20457
20485
|
children,
|
|
20458
20486
|
forms,
|
|
@@ -20472,7 +20500,7 @@ function FormRouterContextProvider({
|
|
|
20472
20500
|
if (formIndex > -1) {
|
|
20473
20501
|
setFormIndex(formIndex);
|
|
20474
20502
|
} else {
|
|
20475
|
-
logger$
|
|
20503
|
+
logger$a.error("No form was found to have that field so form navigation failed.");
|
|
20476
20504
|
}
|
|
20477
20505
|
}
|
|
20478
20506
|
}), [forms, handleGetIdVerificationToken, setFormIndex]);
|
|
@@ -21069,7 +21097,7 @@ function CompanyDropinComponent({
|
|
|
21069
21097
|
})
|
|
21070
21098
|
});
|
|
21071
21099
|
}
|
|
21072
|
-
const logger$
|
|
21100
|
+
const logger$9 = createLogger("useExemptSettlor");
|
|
21073
21101
|
const useExemptSettlor = ({
|
|
21074
21102
|
trust,
|
|
21075
21103
|
handleGetLegalEntity
|
|
@@ -21081,7 +21109,7 @@ const useExemptSettlor = ({
|
|
|
21081
21109
|
setExemptSettlor(exemptSettlorLE);
|
|
21082
21110
|
}, [handleGetLegalEntity]);
|
|
21083
21111
|
useEffect(() => {
|
|
21084
|
-
updateExemptSettlor(trust).catch(logger$
|
|
21112
|
+
updateExemptSettlor(trust).catch(logger$9.error);
|
|
21085
21113
|
}, [trust, updateExemptSettlor]);
|
|
21086
21114
|
return exemptSettlor;
|
|
21087
21115
|
};
|
|
@@ -21089,22 +21117,24 @@ function useSalesChannelsSettings() {
|
|
|
21089
21117
|
const {
|
|
21090
21118
|
isSettingEnabled
|
|
21091
21119
|
} = useSettingsContext();
|
|
21092
|
-
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
|
|
21120
|
+
return useMemo(() => {
|
|
21121
|
+
const settings = [];
|
|
21122
|
+
if (isSettingEnabled(SettingNames.RequirePciSignEcommerce)) {
|
|
21123
|
+
settings.push("eCommerce");
|
|
21124
|
+
}
|
|
21125
|
+
if (isSettingEnabled(SettingNames.RequirePciSignPos)) {
|
|
21126
|
+
settings.push("pos");
|
|
21127
|
+
}
|
|
21128
|
+
if (isSettingEnabled(SettingNames.RequirePciSignEcomMoto)) {
|
|
21129
|
+
settings.push("ecomMoto");
|
|
21130
|
+
}
|
|
21131
|
+
if (isSettingEnabled(SettingNames.RequirePciSignPosMoto)) {
|
|
21132
|
+
settings.push("posMoto");
|
|
21133
|
+
}
|
|
21134
|
+
return settings;
|
|
21135
|
+
}, [isSettingEnabled]);
|
|
21106
21136
|
}
|
|
21107
|
-
const logger$
|
|
21137
|
+
const logger$8 = createLogger("useLocalStorage");
|
|
21108
21138
|
function useLocalStorage(key, defaultValue, options) {
|
|
21109
21139
|
const {
|
|
21110
21140
|
serializer,
|
|
@@ -21125,7 +21155,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21125
21155
|
const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
|
|
21126
21156
|
return res;
|
|
21127
21157
|
} catch (err) {
|
|
21128
|
-
logger$
|
|
21158
|
+
logger$8.error(err);
|
|
21129
21159
|
return defaultValue;
|
|
21130
21160
|
}
|
|
21131
21161
|
});
|
|
@@ -21157,7 +21187,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21157
21187
|
try {
|
|
21158
21188
|
updateLocalStorage();
|
|
21159
21189
|
} catch (err) {
|
|
21160
|
-
logger$
|
|
21190
|
+
logger$8.error(err);
|
|
21161
21191
|
}
|
|
21162
21192
|
}, [value]);
|
|
21163
21193
|
useEffect(() => {
|
|
@@ -21172,7 +21202,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21172
21202
|
setValue(event.newValue ? parser(event.newValue) : void 0);
|
|
21173
21203
|
}
|
|
21174
21204
|
} catch (err) {
|
|
21175
|
-
logger$
|
|
21205
|
+
logger$8.error(err);
|
|
21176
21206
|
}
|
|
21177
21207
|
};
|
|
21178
21208
|
if (typeof window === "undefined")
|
|
@@ -21452,6 +21482,24 @@ const updateExemptSettlorName = async ({
|
|
|
21452
21482
|
};
|
|
21453
21483
|
return handleUpdateLegalEntity(exemptSettlorPatch, exemptSettlor.legalEntityId);
|
|
21454
21484
|
};
|
|
21485
|
+
function AccountSetupRejected() {
|
|
21486
|
+
const {
|
|
21487
|
+
i18n
|
|
21488
|
+
} = useI18nContext();
|
|
21489
|
+
const content = jsxs("div", {
|
|
21490
|
+
children: [jsx(AlertIcon, {
|
|
21491
|
+
className: "adl-alert-error-icon",
|
|
21492
|
+
type: AlertTypes.ERROR
|
|
21493
|
+
}), jsx(FormHeader, {
|
|
21494
|
+
heading: i18n.get("cantSetUpAcccount")
|
|
21495
|
+
}), jsx("span", {
|
|
21496
|
+
children: i18n.get("accountCantBeSetUp")
|
|
21497
|
+
})]
|
|
21498
|
+
});
|
|
21499
|
+
return jsx(DropinLayout, {
|
|
21500
|
+
content
|
|
21501
|
+
});
|
|
21502
|
+
}
|
|
21455
21503
|
const DecisionMakers = "";
|
|
21456
21504
|
const iconStatus = (current, min, max) => {
|
|
21457
21505
|
const isEmpty2 = current === 0;
|
|
@@ -23756,6 +23804,7 @@ function PayoutDetailsDropinComponent({
|
|
|
23756
23804
|
capabilities,
|
|
23757
23805
|
handleHomeClick,
|
|
23758
23806
|
homeButtonLabel,
|
|
23807
|
+
hideNavigation,
|
|
23759
23808
|
refreshLegalEntity,
|
|
23760
23809
|
navigateBackToTaskList,
|
|
23761
23810
|
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
@@ -24085,6 +24134,7 @@ function PayoutDetailsDropinComponent({
|
|
|
24085
24134
|
hideDropinLayout,
|
|
24086
24135
|
hideHomeButton,
|
|
24087
24136
|
hideBackButton,
|
|
24137
|
+
hideNavigation,
|
|
24088
24138
|
loadingStatus,
|
|
24089
24139
|
forms,
|
|
24090
24140
|
onSubmit,
|
|
@@ -24434,14 +24484,15 @@ function PciDropinComponent({
|
|
|
24434
24484
|
legalEntityResponse,
|
|
24435
24485
|
pciTemplateResponse,
|
|
24436
24486
|
handleHomeClick,
|
|
24437
|
-
handleLanguageChange,
|
|
24438
24487
|
handleSign,
|
|
24439
24488
|
taskType,
|
|
24489
|
+
eventEmitter,
|
|
24440
24490
|
trackingConfig
|
|
24441
24491
|
}) {
|
|
24442
24492
|
var _a, _b, _c, _d;
|
|
24443
24493
|
const {
|
|
24444
|
-
i18n
|
|
24494
|
+
i18n,
|
|
24495
|
+
setLocale
|
|
24445
24496
|
} = useI18nContext();
|
|
24446
24497
|
const {
|
|
24447
24498
|
showToast
|
|
@@ -24543,8 +24594,8 @@ function PciDropinComponent({
|
|
|
24543
24594
|
});
|
|
24544
24595
|
};
|
|
24545
24596
|
useEffect(() => {
|
|
24546
|
-
|
|
24547
|
-
}, [
|
|
24597
|
+
eventEmitter.on("updateLocale", (locale) => setLocale(locale));
|
|
24598
|
+
}, []);
|
|
24548
24599
|
useEffect(() => {
|
|
24549
24600
|
userEvents.addPageView("PCI dropin");
|
|
24550
24601
|
userEvents.addEvent("Started PCI task", {
|
|
@@ -25098,7 +25149,7 @@ const serviceAgreementValidationRules = {
|
|
|
25098
25149
|
errorMessage: "fieldIsRequired"
|
|
25099
25150
|
}
|
|
25100
25151
|
};
|
|
25101
|
-
const logger$
|
|
25152
|
+
const logger$7 = createLogger("useServiceAgreement");
|
|
25102
25153
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
25103
25154
|
const useServiceAgreement = ({
|
|
25104
25155
|
handleGetServiceAgreement,
|
|
@@ -25127,7 +25178,7 @@ const useServiceAgreement = ({
|
|
|
25127
25178
|
language: agreementLanguage
|
|
25128
25179
|
});
|
|
25129
25180
|
if (!document2) {
|
|
25130
|
-
logger$
|
|
25181
|
+
logger$7.log('"document" field was missing in response');
|
|
25131
25182
|
return;
|
|
25132
25183
|
}
|
|
25133
25184
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
@@ -25145,7 +25196,7 @@ const useServiceAgreement = ({
|
|
|
25145
25196
|
throw err;
|
|
25146
25197
|
}
|
|
25147
25198
|
};
|
|
25148
|
-
requestServiceAgreement().catch(logger$
|
|
25199
|
+
requestServiceAgreement().catch(logger$7.error);
|
|
25149
25200
|
}, [handleGetServiceAgreement, handleServiceAgreementIsNotAvailableInThatLanguage, agreementLanguage, legalEntityId, serviceAgreementType]);
|
|
25150
25201
|
return {
|
|
25151
25202
|
loading: loading2,
|
|
@@ -26457,7 +26508,7 @@ function TrustDropinComponent(props) {
|
|
|
26457
26508
|
}
|
|
26458
26509
|
const PAGES_WITH_STATUS = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
26459
26510
|
const POLLING_INTERVAL = 3e3;
|
|
26460
|
-
const logger$
|
|
26511
|
+
const logger$6 = createLogger("DropinComposerComponent");
|
|
26461
26512
|
function DropinComposerComponent({
|
|
26462
26513
|
capabilities,
|
|
26463
26514
|
legalEntityResponse,
|
|
@@ -26534,12 +26585,12 @@ function DropinComposerComponent({
|
|
|
26534
26585
|
setPciStatus(response);
|
|
26535
26586
|
return response;
|
|
26536
26587
|
} catch (e) {
|
|
26537
|
-
logger$
|
|
26588
|
+
logger$6.warn(i18n.get("failedToGetPciStatus"));
|
|
26538
26589
|
}
|
|
26539
26590
|
}
|
|
26540
26591
|
return void 0;
|
|
26541
26592
|
};
|
|
26542
|
-
const getPciTemplate = async () => {
|
|
26593
|
+
const getPciTemplate = useCallback(async () => {
|
|
26543
26594
|
const requestPciTemplate = async (language) => {
|
|
26544
26595
|
const response = await args.handleGetPciTemplate(legalEntity.id, {
|
|
26545
26596
|
language,
|
|
@@ -26559,14 +26610,19 @@ function DropinComposerComponent({
|
|
|
26559
26610
|
await requestPciTemplate(fallbackLanguageCode);
|
|
26560
26611
|
}
|
|
26561
26612
|
}
|
|
26562
|
-
};
|
|
26613
|
+
}, [additionalSalesChannels, i18n, legalEntity.id, args.handleGetPciTemplate]);
|
|
26614
|
+
useEffect(() => {
|
|
26615
|
+
if (!tasks.includes(TaskTypes.PCI_DSS))
|
|
26616
|
+
return;
|
|
26617
|
+
getPciTemplate().catch(logger$6.error);
|
|
26618
|
+
}, [getPciTemplate, tasks]);
|
|
26563
26619
|
const getServiceAgreementAcceptanceInfos = async () => {
|
|
26564
26620
|
if (legalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
|
|
26565
26621
|
try {
|
|
26566
26622
|
const response = await args.handleGetServiceAgreementAcceptanceInfos(legalEntity.id);
|
|
26567
26623
|
setServiceAgreementAcceptanceInfos(response.data);
|
|
26568
26624
|
} catch (e) {
|
|
26569
|
-
logger$
|
|
26625
|
+
logger$6.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
26570
26626
|
}
|
|
26571
26627
|
}
|
|
26572
26628
|
};
|
|
@@ -26576,7 +26632,7 @@ function DropinComposerComponent({
|
|
|
26576
26632
|
const response = await args.handleGetServiceAgreementStatus(legalEntity.id);
|
|
26577
26633
|
setServiceAgreementTypes(response.termsOfServiceTypes);
|
|
26578
26634
|
} catch (e) {
|
|
26579
|
-
logger$
|
|
26635
|
+
logger$6.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
26580
26636
|
}
|
|
26581
26637
|
}
|
|
26582
26638
|
};
|
|
@@ -26615,7 +26671,7 @@ function DropinComposerComponent({
|
|
|
26615
26671
|
setCapabilityProblems(getCapabilityProblems(response));
|
|
26616
26672
|
return response;
|
|
26617
26673
|
} catch (e) {
|
|
26618
|
-
logger$
|
|
26674
|
+
logger$6.warn(i18n.get("failedToFetchLegalEntityDetails"));
|
|
26619
26675
|
}
|
|
26620
26676
|
}
|
|
26621
26677
|
return void 0;
|
|
@@ -26627,7 +26683,7 @@ function DropinComposerComponent({
|
|
|
26627
26683
|
setTrust(response);
|
|
26628
26684
|
return response;
|
|
26629
26685
|
} catch (e) {
|
|
26630
|
-
logger$
|
|
26686
|
+
logger$6.warn(i18n.get("failedToFetchTrustDetails"));
|
|
26631
26687
|
}
|
|
26632
26688
|
}
|
|
26633
26689
|
return void 0;
|
|
@@ -26677,7 +26733,7 @@ function DropinComposerComponent({
|
|
|
26677
26733
|
label: i18n.get("successFullyRemovedTrustMember")
|
|
26678
26734
|
});
|
|
26679
26735
|
} catch (err) {
|
|
26680
|
-
logger$
|
|
26736
|
+
logger$6.error(`Failed to delete trust member`, err);
|
|
26681
26737
|
showToast({
|
|
26682
26738
|
type: ToastType.ERROR,
|
|
26683
26739
|
label: i18n.get("failedToRemoveTrustMember")
|
|
@@ -26729,7 +26785,7 @@ function DropinComposerComponent({
|
|
|
26729
26785
|
break;
|
|
26730
26786
|
case "rootTrustee":
|
|
26731
26787
|
default:
|
|
26732
|
-
logger$
|
|
26788
|
+
logger$6.warn(`Updating trust member type "${trustMember.trustMemberType}" is not implemented.`);
|
|
26733
26789
|
}
|
|
26734
26790
|
showToast({
|
|
26735
26791
|
label: i18n.get("successfullyUpdatedDetails"),
|
|
@@ -26737,7 +26793,7 @@ function DropinComposerComponent({
|
|
|
26737
26793
|
});
|
|
26738
26794
|
await refreshTrustAndRunOnSubmit(trust, 1);
|
|
26739
26795
|
} catch (err) {
|
|
26740
|
-
logger$
|
|
26796
|
+
logger$6.error(err);
|
|
26741
26797
|
showToast({
|
|
26742
26798
|
label: i18n.get("failedToUpdateDetails"),
|
|
26743
26799
|
type: ToastType.ERROR
|
|
@@ -26960,16 +27016,25 @@ function DropinComposerComponent({
|
|
|
26960
27016
|
}
|
|
26961
27017
|
};
|
|
26962
27018
|
setIsLoadingConfiguration(true);
|
|
26963
|
-
fetchConfiguration().catch(logger$
|
|
27019
|
+
fetchConfiguration().catch(logger$6.error).finally(() => {
|
|
26964
27020
|
setIsLoadingConfiguration(false);
|
|
26965
27021
|
onLoad();
|
|
26966
27022
|
});
|
|
26967
27023
|
}, [legalEntity.type, contextCountry]);
|
|
27024
|
+
useEffect(() => {
|
|
27025
|
+
if (hasRejectedCapabilities(legalEntity)) {
|
|
27026
|
+
setTaskHistory([TaskTypes.CAPABILITY_REJECTED]);
|
|
27027
|
+
}
|
|
27028
|
+
}, [legalEntity]);
|
|
26968
27029
|
useEffect(() => {
|
|
26969
27030
|
if (PAGES_WITH_STATUS.includes(taskHistory[taskHistory.length - 1])) {
|
|
26970
27031
|
if (!pollingId) {
|
|
26971
27032
|
const pollingInterval = setInterval(async () => {
|
|
26972
|
-
if (
|
|
27033
|
+
if (hasRejectedCapabilities(legalEntity)) {
|
|
27034
|
+
setTaskHistory([TaskTypes.CAPABILITY_REJECTED]);
|
|
27035
|
+
clearInterval(pollingId);
|
|
27036
|
+
setPollingId(null);
|
|
27037
|
+
} else if (hasResolvedCapabilities(legalEntity)) {
|
|
26973
27038
|
clearInterval(pollingId);
|
|
26974
27039
|
setPollingId(null);
|
|
26975
27040
|
} else {
|
|
@@ -27000,6 +27065,8 @@ function DropinComposerComponent({
|
|
|
27000
27065
|
},
|
|
27001
27066
|
tasks
|
|
27002
27067
|
});
|
|
27068
|
+
case TaskTypes.CAPABILITY_REJECTED:
|
|
27069
|
+
return jsx(AccountSetupRejected, {});
|
|
27003
27070
|
case TaskTypes.TASKS_OVERVIEW:
|
|
27004
27071
|
return jsx(TaskListComponent, {
|
|
27005
27072
|
onNavigateToTask: navigateTo,
|
|
@@ -27245,7 +27312,6 @@ function DropinComposerComponent({
|
|
|
27245
27312
|
},
|
|
27246
27313
|
taskType: TaskTypes.PCI_DSS,
|
|
27247
27314
|
handleHomeClick: navigateBack,
|
|
27248
|
-
handleLanguageChange: getPciTemplate,
|
|
27249
27315
|
handleSign: async (...params) => {
|
|
27250
27316
|
await args.handleSignPci(...params);
|
|
27251
27317
|
await getPciStatus();
|
|
@@ -27337,23 +27403,6 @@ const createTransferInstrument = async (context, transferInstrument) => {
|
|
|
27337
27403
|
}
|
|
27338
27404
|
}, transferInstrument);
|
|
27339
27405
|
};
|
|
27340
|
-
const getBankVerificationProviders = async (context) => {
|
|
27341
|
-
const {
|
|
27342
|
-
loadingContext,
|
|
27343
|
-
sdkToken,
|
|
27344
|
-
legalEntityId
|
|
27345
|
-
} = context;
|
|
27346
|
-
return httpGet({
|
|
27347
|
-
loadingContext,
|
|
27348
|
-
errorLevel: "warn",
|
|
27349
|
-
errorMessage: `Bank Verification providers not available`,
|
|
27350
|
-
path: `${legalEntityId}/configurations/bankVerificationProviders`,
|
|
27351
|
-
sdkToken,
|
|
27352
|
-
headers: {
|
|
27353
|
-
"Content-Type": "application/json"
|
|
27354
|
-
}
|
|
27355
|
-
});
|
|
27356
|
-
};
|
|
27357
27406
|
const getBankVerificationVendor = async (context, country2) => {
|
|
27358
27407
|
const {
|
|
27359
27408
|
loadingContext,
|
|
@@ -27615,6 +27664,7 @@ class EventEmitter {
|
|
|
27615
27664
|
};
|
|
27616
27665
|
}
|
|
27617
27666
|
}
|
|
27667
|
+
const logger$5 = createLogger("PayoutEmbeddedDropin");
|
|
27618
27668
|
function PayoutEmbeddedDropin({
|
|
27619
27669
|
legalEntityId,
|
|
27620
27670
|
transferInstrumentId,
|
|
@@ -27648,8 +27698,8 @@ function PayoutEmbeddedDropin({
|
|
|
27648
27698
|
const ti = await getTransferInstrument2(transferInstrumentId);
|
|
27649
27699
|
setTransferInstrument(ti);
|
|
27650
27700
|
}
|
|
27651
|
-
})();
|
|
27652
|
-
}, [
|
|
27701
|
+
})().catch(logger$5.error);
|
|
27702
|
+
}, [transferInstrumentId]);
|
|
27653
27703
|
return legalEntity ? jsx(PayoutDetailsDropinComponent, {
|
|
27654
27704
|
eventEmitter: eventEmitter ?? new EventEmitter(),
|
|
27655
27705
|
transferInstrument,
|
|
@@ -27661,6 +27711,7 @@ function PayoutEmbeddedDropin({
|
|
|
27661
27711
|
handleUpdateDocument: updateDocument2,
|
|
27662
27712
|
handleCreateTransferInstrument: createTransferInstrument2,
|
|
27663
27713
|
handleUpdateTransferInstrument: updateTransferInstrument2,
|
|
27714
|
+
hideNavigation: true,
|
|
27664
27715
|
refreshLegalEntity: fetchLegalEntity,
|
|
27665
27716
|
onChange,
|
|
27666
27717
|
onSubmit,
|
|
@@ -27783,6 +27834,23 @@ const getAccountFormatsForCountry = async (country2) => {
|
|
|
27783
27834
|
return (await importForCountry()).default;
|
|
27784
27835
|
};
|
|
27785
27836
|
const getPayoutAccountFormat = async (country2) => getAccountFormatsForCountry(country2);
|
|
27837
|
+
const getAllowedLocales$1 = async (context) => {
|
|
27838
|
+
const {
|
|
27839
|
+
loadingContext,
|
|
27840
|
+
sdkToken,
|
|
27841
|
+
legalEntityId
|
|
27842
|
+
} = context;
|
|
27843
|
+
return httpGet({
|
|
27844
|
+
loadingContext,
|
|
27845
|
+
errorLevel: "warn",
|
|
27846
|
+
errorMessage: `Supported locales not available`,
|
|
27847
|
+
path: `${legalEntityId}/configurations/supportedLocales`,
|
|
27848
|
+
sdkToken,
|
|
27849
|
+
headers: {
|
|
27850
|
+
"Content-Type": "application/json"
|
|
27851
|
+
}
|
|
27852
|
+
});
|
|
27853
|
+
};
|
|
27786
27854
|
const getEmbeddedApi = ({
|
|
27787
27855
|
base,
|
|
27788
27856
|
sdkToken,
|
|
@@ -27799,9 +27867,8 @@ const getEmbeddedApi = ({
|
|
|
27799
27867
|
getConfiguration: async ({
|
|
27800
27868
|
legalEntityType
|
|
27801
27869
|
}) => {
|
|
27802
|
-
const [
|
|
27870
|
+
const [scenarios, tasks] = await Promise.all([getScenarios(baseRequestContext), getTasks(baseRequestContext)]);
|
|
27803
27871
|
return {
|
|
27804
|
-
bankVerificationProviders,
|
|
27805
27872
|
matchingScenario: {
|
|
27806
27873
|
[legalEntityType]: scenarios
|
|
27807
27874
|
},
|
|
@@ -27819,9 +27886,7 @@ const getEmbeddedApi = ({
|
|
|
27819
27886
|
getAllowedCountries: () => {
|
|
27820
27887
|
throw new Error("getAllowedCountries: Not implemented in onboarding component api");
|
|
27821
27888
|
},
|
|
27822
|
-
getAllowedLocales: () =>
|
|
27823
|
-
throw new Error("getAllowedLocales: Not implemented in onboarding component api");
|
|
27824
|
-
},
|
|
27889
|
+
getAllowedLocales: async () => getAllowedLocales$1(baseRequestContext),
|
|
27825
27890
|
validatePhoneNumber: () => {
|
|
27826
27891
|
throw new Error("validatePhoneNumber: Not implemented in onboarding component api");
|
|
27827
27892
|
},
|
|
@@ -28175,7 +28240,7 @@ const useAllowedLocales = () => {
|
|
|
28175
28240
|
const [allowedLocales, setAllowedLocales] = useState();
|
|
28176
28241
|
useEffect(() => {
|
|
28177
28242
|
getAllowedLocales2().then((response) => setAllowedLocales(response.locales)).catch(logger$1.error);
|
|
28178
|
-
}, [
|
|
28243
|
+
}, []);
|
|
28179
28244
|
return allowedLocales;
|
|
28180
28245
|
};
|
|
28181
28246
|
const logger = createLogger("useTranslations");
|
|
@@ -28235,8 +28300,9 @@ const I18nProvider = ({
|
|
|
28235
28300
|
const i18n = useMemo(() => new Language({
|
|
28236
28301
|
locale: loadedLocale,
|
|
28237
28302
|
translations,
|
|
28238
|
-
customTranslations
|
|
28239
|
-
|
|
28303
|
+
customTranslations,
|
|
28304
|
+
allowedLocales
|
|
28305
|
+
}), [loadedLocale, translations, customTranslations, allowedLocales]);
|
|
28240
28306
|
const contextValue = useMemo(() => ({
|
|
28241
28307
|
i18n,
|
|
28242
28308
|
setLocale
|
|
@@ -28872,10 +28938,6 @@ const pciDropinSchema = {
|
|
|
28872
28938
|
type: "object",
|
|
28873
28939
|
required: true
|
|
28874
28940
|
},
|
|
28875
|
-
handleLanguageChange: {
|
|
28876
|
-
type: "function",
|
|
28877
|
-
required: true
|
|
28878
|
-
},
|
|
28879
28941
|
handleHomeClick: {
|
|
28880
28942
|
type: "function",
|
|
28881
28943
|
required: true
|