@adyen/kyc-components 2.50.1 → 2.50.3
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.
|
@@ -837,7 +837,7 @@ const defaultTrans = {
|
|
|
837
837
|
doingBusinessAsNameFiling__US: "Doing business as (DBA) filing, such as your articles of incorporation",
|
|
838
838
|
businessRegistrationDocument__FR: "Business registration document, such as a KBIS extract or situation au répertoire sirene",
|
|
839
839
|
taxFiling: "Tax filing",
|
|
840
|
-
taxFiling__US: "Tax filing
|
|
840
|
+
taxFiling__US: "Tax filing such as Schedule SE (Form 1040)",
|
|
841
841
|
einVerificationLetter: "Employer identification number (EIN) verification letter, also known as a CP 575 or 147c letter",
|
|
842
842
|
areYouACompany: "Are you a company?",
|
|
843
843
|
singingUpAsIndividualButLooksLikeYouAreACompany: "You’re now signing up as an individual. But it looks like you’re a company that uses a company bank account to receive payouts.",
|
|
@@ -9575,7 +9575,7 @@ const businessDetailsBase = {
|
|
|
9575
9575
|
rule: "countryRequiresRegistrationNumberForCompanies"
|
|
9576
9576
|
}
|
|
9577
9577
|
};
|
|
9578
|
-
const taxInformationBase = {
|
|
9578
|
+
const taxInformationBase$1 = {
|
|
9579
9579
|
vatNumber: {
|
|
9580
9580
|
rule: "countryUsesVat"
|
|
9581
9581
|
},
|
|
@@ -9637,7 +9637,7 @@ const fieldsPerScenario$3 = {
|
|
|
9637
9637
|
},
|
|
9638
9638
|
L: {
|
|
9639
9639
|
...companyBase,
|
|
9640
|
-
...taxInformationBase
|
|
9640
|
+
...taxInformationBase$1
|
|
9641
9641
|
},
|
|
9642
9642
|
L_PROOFOFADDRESS: {
|
|
9643
9643
|
proofOfAddressDocument: {
|
|
@@ -9672,7 +9672,7 @@ const companySearchFieldsPerScenario = {
|
|
|
9672
9672
|
},
|
|
9673
9673
|
L: {
|
|
9674
9674
|
...companySearchBase,
|
|
9675
|
-
...taxInformationBase
|
|
9675
|
+
...taxInformationBase$1
|
|
9676
9676
|
},
|
|
9677
9677
|
L_PROOFOFADDRESS: {
|
|
9678
9678
|
proofOfAddressDocument: {
|
|
@@ -9707,7 +9707,7 @@ const businessDetailsFieldsPerScenario = {
|
|
|
9707
9707
|
},
|
|
9708
9708
|
L: {
|
|
9709
9709
|
...businessDetailsBase,
|
|
9710
|
-
...taxInformationBase
|
|
9710
|
+
...taxInformationBase$1
|
|
9711
9711
|
},
|
|
9712
9712
|
L_PROOFOFADDRESS: {
|
|
9713
9713
|
proofOfAddressDocument: {
|
|
@@ -22900,7 +22900,7 @@ const solePropBase = {
|
|
|
22900
22900
|
rule: "countryOfGoverningLawRequired"
|
|
22901
22901
|
}
|
|
22902
22902
|
};
|
|
22903
|
-
const
|
|
22903
|
+
const taxInformationBase = {
|
|
22904
22904
|
vatNumber: {
|
|
22905
22905
|
rule: "countryUsesVat"
|
|
22906
22906
|
},
|
|
@@ -22911,7 +22911,7 @@ const taxIdBase = {
|
|
|
22911
22911
|
rule: "countryUsesVat"
|
|
22912
22912
|
},
|
|
22913
22913
|
// it still needs support from the BE: https://youtrack.is.adyen.com/issue/UO-2290
|
|
22914
|
-
|
|
22914
|
+
taxInformation: {
|
|
22915
22915
|
rule: "countryUsesTaxId"
|
|
22916
22916
|
},
|
|
22917
22917
|
exemptedFromTax: {
|
|
@@ -22935,7 +22935,7 @@ const fieldsPerScenario = {
|
|
|
22935
22935
|
},
|
|
22936
22936
|
L: {
|
|
22937
22937
|
...solePropBase,
|
|
22938
|
-
...
|
|
22938
|
+
...taxInformationBase
|
|
22939
22939
|
},
|
|
22940
22940
|
L_ConstDoc: {
|
|
22941
22941
|
constitutionalDocument: {
|
|
@@ -34171,7 +34171,7 @@ function SolePropDropinComponent({
|
|
|
34171
34171
|
handleUpdateLegalEntity,
|
|
34172
34172
|
handleCreateLegalEntity
|
|
34173
34173
|
}) {
|
|
34174
|
-
var _a, _b;
|
|
34174
|
+
var _a, _b, _c, _d;
|
|
34175
34175
|
const {
|
|
34176
34176
|
i18n
|
|
34177
34177
|
} = useI18nContext();
|
|
@@ -34192,9 +34192,21 @@ function SolePropDropinComponent({
|
|
|
34192
34192
|
} = useSettingsContext();
|
|
34193
34193
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
34194
34194
|
const formRef = useRef(null);
|
|
34195
|
+
const {
|
|
34196
|
+
state: {
|
|
34197
|
+
currentState
|
|
34198
|
+
}
|
|
34199
|
+
} = useStateContext();
|
|
34200
|
+
const formValidity = currentState.validityByForm;
|
|
34201
|
+
useEffect(() => {
|
|
34202
|
+
setData({
|
|
34203
|
+
...currentState.data
|
|
34204
|
+
});
|
|
34205
|
+
onChange == null ? void 0 : onChange(currentState);
|
|
34206
|
+
}, [currentState]);
|
|
34195
34207
|
const dataFromResponse = getDataWithDefaultAddress(legalEntityResponse, parentLegalEntity);
|
|
34196
34208
|
const [data, setData] = useState(dataFromResponse);
|
|
34197
|
-
const country = ((_a = dataFromResponse == null ? void 0 : dataFromResponse.solePropRegistrationAddress) == null ? void 0 :
|
|
34209
|
+
const country = ((_b = (_a = currentState.data) == null ? void 0 : _a.solePropNameAndCountry) == null ? void 0 : _b.country) || ((_c = dataFromResponse == null ? void 0 : dataFromResponse.solePropRegistrationAddress) == null ? void 0 : _c.registrationAddress.country) || externalCountry;
|
|
34198
34210
|
const baseTrackingPayload = getBaseTrackingPayload({
|
|
34199
34211
|
trackingConfig,
|
|
34200
34212
|
parentLegalEntity,
|
|
@@ -34223,18 +34235,6 @@ function SolePropDropinComponent({
|
|
|
34223
34235
|
isSettingEnabled
|
|
34224
34236
|
}), [country, data, taskType, requiredFields, isSettingEnabled]);
|
|
34225
34237
|
const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, solePropForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
34226
|
-
const {
|
|
34227
|
-
state: {
|
|
34228
|
-
currentState
|
|
34229
|
-
}
|
|
34230
|
-
} = useStateContext();
|
|
34231
|
-
const formValidity = currentState.validityByForm;
|
|
34232
|
-
useEffect(() => {
|
|
34233
|
-
setData({
|
|
34234
|
-
...currentState.data
|
|
34235
|
-
});
|
|
34236
|
-
onChange == null ? void 0 : onChange(currentState);
|
|
34237
|
-
}, [currentState]);
|
|
34238
34238
|
const forms2 = useMemo(() => {
|
|
34239
34239
|
const requiredForms = getRequiredForms(solePropForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
|
|
34240
34240
|
return addValidityToForms(requiredForms, formValidity, problems);
|
|
@@ -34342,7 +34342,7 @@ function SolePropDropinComponent({
|
|
|
34342
34342
|
};
|
|
34343
34343
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
|
|
34344
34344
|
const formatDataForSummary2 = (data2, forms22) => {
|
|
34345
|
-
var _a2, _b2,
|
|
34345
|
+
var _a2, _b2, _c2, _d2, _e, _f;
|
|
34346
34346
|
let summaryData = cloneObject(data2);
|
|
34347
34347
|
if (isCountryOfGoverningLawEnabled) {
|
|
34348
34348
|
summaryData.solePropNameAndCountry = getUpdatedCountryOfGoverningLaw(summaryData.solePropNameAndCountry);
|
|
@@ -34351,9 +34351,9 @@ function SolePropDropinComponent({
|
|
|
34351
34351
|
summaryData.solePropNameAndCountry = {
|
|
34352
34352
|
legalNameOfSoleProprietor: (_b2 = data2.solePropNameAndCountry) == null ? void 0 : _b2.legalCompanyName,
|
|
34353
34353
|
countryRegionOfEstablishment: solePropCountry,
|
|
34354
|
-
countryOfGoverningLaw: ((
|
|
34354
|
+
countryOfGoverningLaw: ((_c2 = summaryData.solePropNameAndCountry) == null ? void 0 : _c2.countryOfGoverningLaw) && datasetUtils.getCountryName(summaryData.solePropNameAndCountry.countryOfGoverningLaw)
|
|
34355
34355
|
};
|
|
34356
|
-
if ((
|
|
34356
|
+
if ((_d2 = summaryData.companyRegistrationDetails) == null ? void 0 : _d2.taxInformation) {
|
|
34357
34357
|
const taxInformation = summaryData.companyRegistrationDetails.taxInformation.find((taxId) => {
|
|
34358
34358
|
var _a3;
|
|
34359
34359
|
return taxId.country === ((_a3 = data2.solePropNameAndCountry) == null ? void 0 : _a3.country);
|
|
@@ -34420,7 +34420,7 @@ function SolePropDropinComponent({
|
|
|
34420
34420
|
activeForm,
|
|
34421
34421
|
capabilities,
|
|
34422
34422
|
data: dataFromResponse,
|
|
34423
|
-
country: ((
|
|
34423
|
+
country: ((_d = data == null ? void 0 : data.solePropNameAndCountry) == null ? void 0 : _d.country) || country,
|
|
34424
34424
|
problems,
|
|
34425
34425
|
handleAddressSearch,
|
|
34426
34426
|
handleFindAddress,
|
|
@@ -38725,7 +38725,7 @@ const ConfigurationApiProvider = ({
|
|
|
38725
38725
|
isEmbeddedDropin,
|
|
38726
38726
|
loadingContext
|
|
38727
38727
|
} = authContext;
|
|
38728
|
-
const sdkVersion = "2.50.
|
|
38728
|
+
const sdkVersion = "2.50.3";
|
|
38729
38729
|
useAnalytics({
|
|
38730
38730
|
onUserEvent,
|
|
38731
38731
|
legalEntityId: rootLegalEntityId,
|
|
@@ -39353,7 +39353,7 @@ const DebugModal = ({
|
|
|
39353
39353
|
};
|
|
39354
39354
|
const copyToClipboard = async () => {
|
|
39355
39355
|
const toCopy = {
|
|
39356
|
-
sdkVersion: "2.50.
|
|
39356
|
+
sdkVersion: "2.50.3",
|
|
39357
39357
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
39358
39358
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
39359
39359
|
};
|
|
@@ -39383,7 +39383,7 @@ const DebugModal = ({
|
|
|
39383
39383
|
children: [jsxs("div", {
|
|
39384
39384
|
className: "adyen-kyc-debug-modal__meta",
|
|
39385
39385
|
children: [jsxs("span", {
|
|
39386
|
-
children: ["SDK version: ", "2.50.
|
|
39386
|
+
children: ["SDK version: ", "2.50.3"]
|
|
39387
39387
|
}), jsxs("span", {
|
|
39388
39388
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
39389
39389
|
})]
|
|
@@ -3,7 +3,7 @@ import type { ScenarioFields, ScenarioFieldSettings } from './scenario-fields';
|
|
|
3
3
|
export declare const solePropBase: {
|
|
4
4
|
[key: string]: ScenarioFieldSettings;
|
|
5
5
|
};
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const taxInformationBase: {
|
|
7
7
|
[key: string]: ScenarioFieldSettings;
|
|
8
8
|
};
|
|
9
9
|
export declare const fieldsPerScenario: ScenarioFields<typeof solePropBase>;
|