@adyen/kyc-components 2.68.1 → 2.70.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.
|
@@ -502,6 +502,7 @@ const defaultTrans = {
|
|
|
502
502
|
enterNDigitsAndThen1LetterForExample: "Enter %{numDigits} digits and then 1 letter. For example, %{example}",
|
|
503
503
|
enterNDigitsForExample: "Enter %{numDigits} digits. For example, %{example}",
|
|
504
504
|
enterNLettersAndThenXToYDigitsForExample: "Enter %{numLetters} letters and then %{minDigits} to %{maxDigits} digits. For example, %{example}",
|
|
505
|
+
enterNLetterPrefixOptionallyAndThenXToYDigitsForExample: "Enter %{minDigits} or %{maxDigits} digits, with or without a %{numChars}-letter prefix. For example, %{example1} or %{example2}",
|
|
505
506
|
enterNameExactlyAsAppearInID: "Enter your first name(s) exactly as it appears on your identity document",
|
|
506
507
|
enterSettlorsFirstNameExactlyAsItAppearsInID: "Enter the settlor's first name(s) exactly as it appears on their identity document",
|
|
507
508
|
enterSettlorsLastNameExactlyAsItAppearsInID: "Enter the settlor's last name(s) exactly as it appears on their identity document",
|
|
@@ -653,6 +654,7 @@ const defaultTrans = {
|
|
|
653
654
|
errorMessage_1_5051: "Signing person on the affiliation document could not be verified",
|
|
654
655
|
errorMessage_1_5052: "The affiliation document verifies the payout entity is not 100% affiliated with the company. Setup can't be continued.",
|
|
655
656
|
errorMessage_1_5053: "The affiliation document was not issued within the last 6 months",
|
|
657
|
+
errorMessage_1_5064: "The VAT number didn't match the one on the registry.",
|
|
656
658
|
errorMessage_1_5067: "The legal name didn't match the one on the VAT registry.",
|
|
657
659
|
errorMessage_1_51: "Organization details didn't match the document",
|
|
658
660
|
errorMessage_1_52: "Registration document didn't meet requirements",
|
|
@@ -4344,7 +4346,8 @@ const Select = ({
|
|
|
4344
4346
|
if (enableTracking) {
|
|
4345
4347
|
userEvents.addFieldEvent("Interacted with form field", {
|
|
4346
4348
|
actionType: "select",
|
|
4347
|
-
field: name
|
|
4349
|
+
field: name,
|
|
4350
|
+
returnValue: selectedItem.id
|
|
4348
4351
|
});
|
|
4349
4352
|
}
|
|
4350
4353
|
if (showSearchList) setIsShowList(showSearchList);
|
|
@@ -5757,7 +5760,10 @@ const businessRegistrationNumberMasks = {
|
|
|
5757
5760
|
},
|
|
5758
5761
|
[CountryCodes.UnitedKingdom]: {
|
|
5759
5762
|
default: { mask: makeMask(...alphanumericInputs(8)), transformOnType: uppercase },
|
|
5760
|
-
nonProfit: {
|
|
5763
|
+
nonProfit: {
|
|
5764
|
+
mask: makeMask(...alphaInputs(2, true), ...numericInputs(6), ...numericInputs(1, true)),
|
|
5765
|
+
transformOnType: uppercase
|
|
5766
|
+
}
|
|
5761
5767
|
},
|
|
5762
5768
|
[CountryCodes.UnitedStates]: {
|
|
5763
5769
|
[StateCodesUS.Alabama]: {
|
|
@@ -6475,7 +6481,10 @@ const businessRegistrationNumberPatterns = {
|
|
|
6475
6481
|
[CountryCodes.Spain]: { default: /^[a-zA-Z][a-zA-Z0-9]{8}$/ },
|
|
6476
6482
|
[CountryCodes.Sweden]: { default: /^\d{10}$/ },
|
|
6477
6483
|
[CountryCodes.Switzerland]: { default: /^CHE\d{9}$|^CH\d{11}$/ },
|
|
6478
|
-
[CountryCodes.UnitedKingdom]: {
|
|
6484
|
+
[CountryCodes.UnitedKingdom]: {
|
|
6485
|
+
default: /^[a-zA-Z0-9]{8}$/,
|
|
6486
|
+
nonProfit: /^(?:[A-Z]{2})?\d{6,7}$/
|
|
6487
|
+
},
|
|
6479
6488
|
[CountryCodes.UnitedStates]: {
|
|
6480
6489
|
[StateCodesUS.Alabama]: /^\d{9}$/,
|
|
6481
6490
|
[StateCodesUS.Alaska]: /^\d{8}$/,
|
|
@@ -7268,11 +7277,13 @@ const defaultFieldConfig$9 = {
|
|
|
7268
7277
|
businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].nonProfit
|
|
7269
7278
|
),
|
|
7270
7279
|
guidanceText: {
|
|
7271
|
-
key: "
|
|
7280
|
+
key: "enterNLetterPrefixOptionallyAndThenXToYDigitsForExample",
|
|
7272
7281
|
values: {
|
|
7273
7282
|
minDigits: "6",
|
|
7274
7283
|
maxDigits: "7",
|
|
7275
|
-
|
|
7284
|
+
numChars: "2",
|
|
7285
|
+
example1: "123456",
|
|
7286
|
+
example2: "SC0123456"
|
|
7276
7287
|
}
|
|
7277
7288
|
}
|
|
7278
7289
|
};
|
|
@@ -7858,6 +7869,12 @@ const companyRegistrationNumberOptions = {
|
|
|
7858
7869
|
applicableOnlyFor: [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]
|
|
7859
7870
|
}
|
|
7860
7871
|
],
|
|
7872
|
+
[CountryCodes.UnitedKingdom]: [
|
|
7873
|
+
{
|
|
7874
|
+
id: "charity",
|
|
7875
|
+
name: "charityNumber"
|
|
7876
|
+
}
|
|
7877
|
+
],
|
|
7861
7878
|
[CountryCodes.NewZealand]: [
|
|
7862
7879
|
{
|
|
7863
7880
|
id: "NZBN",
|
|
@@ -23424,8 +23441,8 @@ const invalidInputRemediationActionMappings = {
|
|
|
23424
23441
|
// [{ key: 'documents', type: ['proofOfOwnership'] }] // <---- See DEV-50768,
|
|
23425
23442
|
"1_508": [],
|
|
23426
23443
|
// [{ key: 'documents', type: ['proofOfOwnership'] }] // <---- See DEV-50768
|
|
23427
|
-
"1_512": [{ key: DocumentType.VAT_DOCUMENT }],
|
|
23428
|
-
"1_513": [{ key: DocumentType.VAT_DOCUMENT }],
|
|
23444
|
+
"1_512": [{ key: DocumentType.VAT_DOCUMENT }, { key: "organization.vatNumber" }],
|
|
23445
|
+
"1_513": [{ key: DocumentType.VAT_DOCUMENT }, { key: "organization.vatNumber" }],
|
|
23429
23446
|
"1_600": [{ key: "soleProprietorship.name" }, { key: "soleProprietorship.registeredAddress" }],
|
|
23430
23447
|
// Both trust and soleprop remediation to upload constitutional document use the same codes
|
|
23431
23448
|
"1_601": [{ key: DocumentType.CONSTITUTIONAL_DOCUMENT }],
|
|
@@ -23699,6 +23716,14 @@ const setReviewRequiredError = (verificationError, entityProblems) => {
|
|
|
23699
23716
|
};
|
|
23700
23717
|
setPriorityStatus(entityProblems, TaskStatus.SUBMIT);
|
|
23701
23718
|
};
|
|
23719
|
+
const FIELDS_WITH_LINKED_DATA = ["vatNumber"];
|
|
23720
|
+
const getLinkedRemedidationFormFields = (acc, field) => {
|
|
23721
|
+
switch (field) {
|
|
23722
|
+
case "vatNumber":
|
|
23723
|
+
acc.fields = [...acc.fields, "vatAbsenceReason", "exemptedFromVat"];
|
|
23724
|
+
break;
|
|
23725
|
+
}
|
|
23726
|
+
};
|
|
23702
23727
|
function setInvalidInputError(parentVerificationError, entityProblems, isExperimentEnabled) {
|
|
23703
23728
|
var _a, _b;
|
|
23704
23729
|
const processedSubErrors = (_a = parentVerificationError == null ? void 0 : parentVerificationError.subErrors) == null ? void 0 : _a.reduce(
|
|
@@ -23714,6 +23739,9 @@ function setInvalidInputError(parentVerificationError, entityProblems, isExperim
|
|
|
23714
23739
|
const formsAndFields = mappedCompFields == null ? void 0 : mappedCompFields.reduce(
|
|
23715
23740
|
(acc3, fullFieldPath) => {
|
|
23716
23741
|
const [form, field] = fullFieldPath.split(/\.(.+)/, 2);
|
|
23742
|
+
if (FIELDS_WITH_LINKED_DATA.includes(field)) {
|
|
23743
|
+
getLinkedRemedidationFormFields(acc3, field);
|
|
23744
|
+
}
|
|
23717
23745
|
acc3.forms = [...acc3.forms, form];
|
|
23718
23746
|
acc3.fields = [...acc3.fields, field];
|
|
23719
23747
|
return acc3;
|
|
@@ -39316,7 +39344,7 @@ const convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
|
|
|
39316
39344
|
};
|
|
39317
39345
|
};
|
|
39318
39346
|
const useAnalytics = ({ onUserEvent, legalEntityId, componentName }) => {
|
|
39319
|
-
const sdkVersion = "2.
|
|
39347
|
+
const sdkVersion = "2.70.0";
|
|
39320
39348
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
39321
39349
|
const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
|
|
39322
39350
|
useEffect(() => {
|
|
@@ -39658,7 +39686,7 @@ const ConfigurationApiProvider = ({
|
|
|
39658
39686
|
[authContext, rootLegalEntityId]
|
|
39659
39687
|
);
|
|
39660
39688
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
39661
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "2.
|
|
39689
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "2.70.0" }),
|
|
39662
39690
|
children
|
|
39663
39691
|
] });
|
|
39664
39692
|
};
|
|
@@ -40274,7 +40302,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40274
40302
|
};
|
|
40275
40303
|
const copyToClipboard = async () => {
|
|
40276
40304
|
const toCopy = {
|
|
40277
|
-
sdkVersion: "2.
|
|
40305
|
+
sdkVersion: "2.70.0",
|
|
40278
40306
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40279
40307
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40280
40308
|
};
|
|
@@ -40339,7 +40367,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40339
40367
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40340
40368
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40341
40369
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40342
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.
|
|
40370
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.70.0" })
|
|
40343
40371
|
] }) }),
|
|
40344
40372
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40345
40373
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
|
@@ -40484,7 +40512,7 @@ class UIElement extends BaseElement {
|
|
|
40484
40512
|
userEvents.updateBaseTrackingPayload({
|
|
40485
40513
|
...baseTracking,
|
|
40486
40514
|
componentName: this.props.componentName,
|
|
40487
|
-
sdkVersion: "2.
|
|
40515
|
+
sdkVersion: "2.70.0",
|
|
40488
40516
|
userAgent: navigator.userAgent
|
|
40489
40517
|
});
|
|
40490
40518
|
return /* @__PURE__ */ jsx(SettingsProvider, { settings: this.props.settings, children: /* @__PURE__ */ jsx(
|
|
@@ -47,6 +47,10 @@ export declare const companyRegistrationNumberOptions: {
|
|
|
47
47
|
readonly name: "rnaNumber";
|
|
48
48
|
readonly applicableOnlyFor: readonly [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE];
|
|
49
49
|
}];
|
|
50
|
+
readonly GB: readonly [{
|
|
51
|
+
readonly id: "charity";
|
|
52
|
+
readonly name: "charityNumber";
|
|
53
|
+
}];
|
|
50
54
|
readonly NZ: readonly [{
|
|
51
55
|
readonly id: "NZBN";
|
|
52
56
|
readonly name: "NZBN";
|