@adyen/kyc-components 3.82.2 → 3.82.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.
- package/dist/{AcceptTermsOfServiceComponent-SUI-Gay3.js → AcceptTermsOfServiceComponent-DBiIy4Kp.js} +14 -14
- package/dist/{AccountSetupRejected-CWKZ1tTW.js → AccountSetupRejected-D27RKt9K.js} +4 -4
- package/dist/{Address-wVmHTSPw.js → Address-ByYSgoVJ.js} +7 -7
- package/dist/{Alert-DLxh7-8w.js → Alert-TryjgqmO.js} +1 -1
- package/dist/{Avatar-C5JTIpwu.js → Avatar-CKP57y-Q.js} +1 -1
- package/dist/{BusinessDetailsDropin-Cr2U6fR3.js → BusinessDetailsDropin-CNFVVwGJ.js} +33 -33
- package/dist/{BusinessFinancingComponent-YOFOlp_h.js → BusinessFinancingComponent-DCD8DE-r.js} +4 -4
- package/dist/{BusinessFinancingDropin-DQZiR-IB.js → BusinessFinancingDropin-Dhc_JYVL.js} +22 -22
- package/dist/{BusinessFinancingPage-LT_Py0hN.js → BusinessFinancingPage-Cj5fDj-T.js} +3 -3
- package/dist/{BusinessTypeSelectionPage-k2Q7W0Mn.js → BusinessTypeSelectionPage-BhA3bBL3.js} +6 -6
- package/dist/{Card-Tr1fI5am.js → Card-BG1vjevh.js} +3 -3
- package/dist/{Confirm-JoQJOE3O.js → Confirm-CDy3GQty.js} +2 -2
- package/dist/{CountryField-iSMu28Mk.js → CountryField-XyMQgLEa.js} +4 -4
- package/dist/{CreateIndividualComponent-ClNn2xJg.js → CreateIndividualComponent-Wn27xAGP.js} +5 -5
- package/dist/{CreateTransferInstrumentComponent-yzsw5TTg.js → CreateTransferInstrumentComponent-B91wUVZO.js} +5 -5
- package/dist/{Currency-Go1bmfbD.js → Currency-C9f9JFqI.js} +5 -5
- package/dist/{CustomerSupport-C4tsbfth.js → CustomerSupport-BkZrAQI8.js} +8 -8
- package/dist/{DebugModal-B-o2DxSe.js → DebugModal-C-Kde1W7.js} +6 -6
- package/dist/{DecisionMakerDetailsPage-BrXGA3kf.js → DecisionMakerDetailsPage-DGCjjcXo.js} +6 -6
- package/dist/{DecisionMakers-aR8bSImU.js → DecisionMakers-BnVBSP2h.js} +17 -17
- package/dist/{Dropzone-DB9V0sM_.js → Dropzone-DhG3qmwK.js} +3 -3
- package/dist/{EmbeddedStatus-L5Ejg05e.js → EmbeddedStatus-CR9dSA8Q.js} +2 -2
- package/dist/{EndStateLayout-BHcSEGUy.js → EndStateLayout-CND9jpze.js} +1 -1
- package/dist/{FormFlow-DbvyREd3.js → FormFlow-CEWANC6O.js} +6 -6
- package/dist/{FormNavigation-CEVhOVCM.js → FormNavigation-BPlMuV0j.js} +1 -1
- package/dist/{IndividualOnfidoDropin-CsmtZoD6.js → IndividualOnfidoDropin-B0Ofb9y0.js} +38 -38
- package/dist/{InputDate-DL2uWfA_.js → InputDate-_HFaTMsL.js} +1 -1
- package/dist/{InputText-DZhDhSHU.js → InputText-BXjA-CEb.js} +2 -2
- package/dist/{Introduction-BnDuQe0P.js → Introduction-r3a_Q_wG.js} +4 -4
- package/dist/{LegalRepresentativeDetailsPage-CFCa0Psw.js → LegalRepresentativeDetailsPage-DzPDCpVt.js} +4 -4
- package/dist/{Link-H_NUrrQh.js → Link-D_9J4IJA.js} +1 -1
- package/dist/{ManageIndividualComponent-CMH6zq4t.js → ManageIndividualComponent-Dlx3--0h.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-CqpVk2Xs.js → ManageTermsOfServiceComponent-BCDYAf1s.js} +5 -5
- package/dist/{ManageTransferInstrumentComponent-BYLeYGAe.js → ManageTransferInstrumentComponent-Cohe-fiW.js} +12 -12
- package/dist/{MaskedInput-d6ynk2DD.js → MaskedInput-Nyf8vcDx.js} +3 -3
- package/dist/{MaybeModal-D66squvj.js → MaybeModal-CposTKIL.js} +2 -2
- package/dist/{Modal-Cd7U20yD.js → Modal-BUqWVdHG.js} +1 -1
- package/dist/{OnboardingDropinComponent-BLs1ytyI.js → OnboardingDropinComponent-BQMB-M3f.js} +42 -42
- package/dist/{PayoutDetailsDropin-WtZW5UuV.js → PayoutDetailsDropin-DzkFGL_4.js} +25 -25
- package/dist/{RadioGroup-CSiEda6F.js → RadioGroup-BDZqV-Mr.js} +4 -4
- package/dist/{RegistrationAddress-R2IiB9Ve.js → RegistrationAddress-B7q1pOsn.js} +12 -12
- package/dist/{Review-4BwgO2_f.js → Review-DoC_0S-s.js} +6 -6
- package/dist/{RootBusinessDetailsPage-CtJ-K76Z.js → RootBusinessDetailsPage-Bbr2WffY.js} +27 -27
- package/dist/{RootIndividualDetailsPage-B4uGKMez.js → RootIndividualDetailsPage-DiKCTWp6.js} +4 -4
- package/dist/{SignPCIComponent-DNyKu7Nm.js → SignPCIComponent-BrwKPa1E.js} +9 -9
- package/dist/{SingpassSelection-Df94BbH_.js → SingpassSelection-DF8-ifNE.js} +3 -3
- package/dist/{SoleProprietorshipPage-BWyEYtMH.js → SoleProprietorshipPage-crVbQlEJ.js} +4 -4
- package/dist/{SourceOfFundsPage-Dh023bHi.js → SourceOfFundsPage-_on4Vmam.js} +26 -26
- package/dist/{StepProgressIndicator-BucOrwKd.js → StepProgressIndicator-hlEMGZu8.js} +1 -1
- package/dist/{StoreProvider-wlEnMP3i.js → StoreProvider-CiZ-dp-b.js} +4 -4
- package/dist/{TaskItemStatus-C-Njc7DC.js → TaskItemStatus-BQVo7foa.js} +1 -1
- package/dist/{TaskStatusIndicator-Dv0Mc-Km.js → TaskStatusIndicator-q1aiZloQ.js} +1 -1
- package/dist/{TaxInformationField-tKF_0haj.js → TaxInformationField-B8mQXSpZ.js} +12 -12
- package/dist/{TaxReportingDropin-Csu-pEqc.js → TaxReportingDropin-CRHhjxw-.js} +17 -17
- package/dist/{TileGroup-DEC83DCn.js → TileGroup-ClHre2Us.js} +2 -2
- package/dist/{TrustDetailsPage-CUAO8IO4.js → TrustDetailsPage-CGFw51Cl.js} +22 -22
- package/dist/{TrustMemberCompanyPage-fmSEycW1.js → TrustMemberCompanyPage-CgpUmMoS.js} +5 -5
- package/dist/{TrustMemberIndividualPage-ClhOZ8a1.js → TrustMemberIndividualPage-3wYiHTR1.js} +4 -4
- package/dist/{UnincorporatedPartnershipIndividualPage-CJ0y-apw.js → UnincorporatedPartnershipIndividualPage-BVz1iaWD.js} +4 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-CZQp6aIG.js → UnincorporatedPartnershipMemberCompanyPage-CEcZtCEv.js} +5 -5
- package/dist/{ViewVerificationStatusComponent-DuUKHS2R.js → ViewVerificationStatusComponent-4CnmMR2o.js} +3 -3
- package/dist/adyen-business-financing.js +2 -2
- package/dist/adyen-individual.js +2 -2
- package/dist/adyen-kyc-components.js +21 -21
- package/dist/adyen-manage-individual.js +2 -2
- package/dist/adyen-manage-terms-of-service.js +2 -2
- package/dist/adyen-manage-transfer-instruments.js +2 -2
- package/dist/adyen-onboarding.js +2 -2
- package/dist/adyen-terms-of-service.js +2 -2
- package/dist/adyen-transfer-instrument.js +2 -2
- package/dist/adyen-verification-status.js +2 -2
- package/dist/{analytics-CORlrLRf.js → analytics-VGKSXUs3.js} +1 -1
- package/dist/{bafinUtils-DLTAySgX.js → bafinUtils-rVLqT7tm.js} +5 -5
- package/dist/{commonValidators-QR43B0Ha.js → commonValidators-DYVRk_o-.js} +1 -1
- package/dist/{dropinUtils-DEsrhYpI.js → dropinUtils-CAMPNh0H.js} +2 -2
- package/dist/{fieldConfigurations-D_iawESq.js → fieldConfigurations-D1NqrGgr.js} +6 -6
- package/dist/{getName-C4Pxr0ab.js → getName-CLl4DLz5.js} +1 -1
- package/dist/{hasDataChanged-ByQSHK_m.js → hasDataChanged-l0jAbTM1.js} +1 -1
- package/dist/{iframeWidget-D9C_KIwR.js → iframeWidget-CNxl2fM8.js} +3 -3
- package/dist/{isEmpty-BQJyCmjV.js → isEmpty-B2Jgc-Ae.js} +1 -1
- package/dist/{localizeDateString-C5K0krdw.js → localizeDateString-D52U55KH.js} +1 -1
- package/dist/{mapExistingFile-CjQICfcM.js → mapExistingFile-d1IBaXjL.js} +3 -3
- package/dist/{mapScriptLocalization-B4D7OxNz.js → mapScriptLocalization-CogsH2uy.js} +3 -3
- package/dist/{mapTransferInstrumentToPayoutAccount-CpeE4kbr.js → mapTransferInstrumentToPayoutAccount-MzAJdTLN.js} +1 -1
- package/dist/{resolveEnvironment-CXDbuHvq.js → resolveEnvironment-3SDOk4j8.js} +3 -3
- package/dist/{rules-DENS4Q9p.js → rules-mx2LkA3c.js} +3 -3
- package/dist/{translation-DD0CkeYX.js → translation-DlBV-aLd.js} +1 -1
- package/dist/types/core/process-field-configurations.d.ts +4 -1
- package/dist/types/utils/addLinkedFields.d.ts +26 -2
- package/dist/{types-DC2RJOQB.js → types-BgtfChBm.js} +1 -1
- package/dist/{types-BdLjSZ_L.js → types-BvfH1Hq9.js} +1 -1
- package/dist/{useAssociatedLegalEntity-CsKbF3Mo.js → useAssociatedLegalEntity-CdDDTgFh.js} +1 -1
- package/dist/{useDataset-KpIFgCMq.js → useDataset-gWnPim6D.js} +1 -1
- package/dist/{useForm-lGwsWpQe.js → useForm-B9xiR6rk.js} +2 -2
- package/dist/{useGlobalData-BtKU3xhR.js → useGlobalData-wXN1Shit.js} +9 -9
- package/dist/{useMultiForm-BzBD0i-f.js → useMultiForm-CApCTqZE.js} +3 -3
- package/dist/{useOnboardingStatus-Dney9Bak.js → useOnboardingStatus-NmD-_0MX.js} +1 -1
- package/dist/{useScenarios-Dei_gPcX.js → useScenarios-DzBi2C-3.js} +1 -1
- package/dist/{useTermsOfServiceStatus-B_EAC_gv.js → useTermsOfServiceStatus-CcV1l3Cn.js} +1 -1
- package/dist/{useToastContext-Di9myP0k.js → useToastContext-B2dmvtea.js} +1 -1
- package/dist/{useUnincorporatedPartnershipMembers-D-oaBt_8.js → useUnincorporatedPartnershipMembers-DErNsU0p.js} +4 -4
- package/dist/{utils-YVMM6naZ.js → utils-CE3nKLt4.js} +1 -1
- package/dist/{utils-7zBGFwP6.js → utils-Du8tQ9jO.js} +1 -1
- package/dist/{utils-BACR-Sq5.js → utils-co6TAFWB.js} +6 -6
- package/dist/{validate-Da9A3vs4.js → validate-BiC_TxbN.js} +1 -1
- package/dist/{validate-Bbd71WPE.js → validate-CF1WjpO2.js} +67 -18
- package/dist/{validate-C_m3dM1T.js → validate-D-lb4Q7H.js} +6 -6
- package/dist/{validationError-DE82pJmH.js → validationError-BB54fFFA.js} +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useRef, useCallback } from "preact/hooks";
|
|
11
|
-
import { bp as userEvents } from "./StoreProvider-
|
|
11
|
+
import { bp as userEvents } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
12
|
const debounce = (func, wait) => {
|
|
13
13
|
let timerId;
|
|
14
14
|
let shouldInvoke;
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useReducer, useMemo, useContext } from "preact/hooks";
|
|
11
|
-
import { b as useApiContext, j as useQuery, k as httpPost, X as useExperimentsContext, g as getLegalEntityCountry, a8 as CountryCodes, z as isPartOfTrustFromLegalEntity, y as LegalEntityTypes, C as hasSolePropInLegalEntity, ah as individualComponentsKeyMapping, ai as businessDetailsComponentsKeyMapping, aj as SettingsContext, a as useTranslation, x as Typography, ak as DecisionMakerTypes, M as TaskTypes, al as Scenarios } from "./StoreProvider-
|
|
12
|
-
import { e as TrustedFieldsProviders } from "./fieldConfigurations-
|
|
11
|
+
import { b as useApiContext, j as useQuery, k as httpPost, X as useExperimentsContext, g as getLegalEntityCountry, a8 as CountryCodes, z as isPartOfTrustFromLegalEntity, y as LegalEntityTypes, C as hasSolePropInLegalEntity, ah as individualComponentsKeyMapping, ai as businessDetailsComponentsKeyMapping, aj as SettingsContext, a as useTranslation, x as Typography, ak as DecisionMakerTypes, M as TaskTypes, al as Scenarios } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
|
+
import { e as TrustedFieldsProviders } from "./fieldConfigurations-D1NqrGgr.js";
|
|
13
13
|
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
14
|
-
import { F as Field, S as SelectListItem } from "./useForm-
|
|
15
|
-
import { I as InputText } from "./InputText-
|
|
16
|
-
import { c as createFormUtils, r as roleMetadata } from "./CountryField-
|
|
14
|
+
import { F as Field, S as SelectListItem } from "./useForm-B9xiR6rk.js";
|
|
15
|
+
import { I as InputText } from "./InputText-BXjA-CEb.js";
|
|
16
|
+
import { c as createFormUtils, r as roleMetadata } from "./CountryField-XyMQgLEa.js";
|
|
17
17
|
import cx from "classnames";
|
|
18
18
|
import { signal, computed } from "@preact/signals";
|
|
19
19
|
async function convertToSingpassLinkResponse(openIdInitiateResponse) {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useState, useEffect, useMemo } from "preact/hooks";
|
|
11
|
-
import { U as useAnalyticsContext, N as createLogger } from "./StoreProvider-
|
|
12
|
-
import { d as summaryStep, h as FormRouterContext } from "./CountryField-
|
|
11
|
+
import { U as useAnalyticsContext, N as createLogger } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
|
+
import { d as summaryStep, h as FormRouterContext } from "./CountryField-XyMQgLEa.js";
|
|
13
13
|
import { jsx } from "preact/jsx-runtime";
|
|
14
14
|
const trackNavigation = ({
|
|
15
15
|
userEvents,
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { c as useLegalEntity, R as ROOT_LE, X as useExperimentsContext, am as getCapabilityProblems, g as getLegalEntityCountry, N as createLogger, b as useApiContext, an as hasText, ao as isValidMinLength, ap as matchesRegex, a9 as isEmpty, aq as NO_ALPHABET_REGEX, ar as EMOJI_REGEX, as as hasRepeatedCharacters, at as isInvalidName, au as OTHER_ENTITIES_VALID_CHAR_REGEX, av as LATIN_SPACE_MARK_PUNCTUATION_REGEX, aw as standardKatakanaValidator, ax as standardKanjiValidator, U as useAnalyticsContext, a as useTranslation, L as Loader } from "./StoreProvider-
|
|
10
|
+
import { c as useLegalEntity, R as ROOT_LE, X as useExperimentsContext, am as getCapabilityProblems, g as getLegalEntityCountry, N as createLogger, b as useApiContext, an as hasText, ao as isValidMinLength, ap as matchesRegex, a9 as isEmpty, aq as NO_ALPHABET_REGEX, ar as EMOJI_REGEX, as as hasRepeatedCharacters, at as isInvalidName, au as OTHER_ENTITIES_VALID_CHAR_REGEX, av as LATIN_SPACE_MARK_PUNCTUATION_REGEX, aw as standardKatakanaValidator, ax as standardKanjiValidator, U as useAnalyticsContext, a as useTranslation, L as Loader } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
import { useContext, useMemo, useRef, useState, useEffect } from "preact/hooks";
|
|
12
12
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
13
13
|
import { createContext } from "preact";
|
|
14
|
-
import { a as Alert } from "./Alert-
|
|
14
|
+
import { a as Alert } from "./Alert-TryjgqmO.js";
|
|
15
15
|
import cx from "classnames";
|
|
16
|
-
import { d as debouncedInputEvent } from "./analytics-
|
|
17
|
-
import { c as convertFullToHalf } from "./InputText-
|
|
16
|
+
import { d as debouncedInputEvent } from "./analytics-VGKSXUs3.js";
|
|
17
|
+
import { c as convertFullToHalf } from "./InputText-BXjA-CEb.js";
|
|
18
18
|
import { Suspense } from "preact/compat";
|
|
19
|
-
import { b as useId } from "./useForm-
|
|
20
|
-
import { R as Radio } from "./CountryField-
|
|
19
|
+
import { b as useId } from "./useForm-B9xiR6rk.js";
|
|
20
|
+
import { R as Radio } from "./CountryField-XyMQgLEa.js";
|
|
21
21
|
const useCapabilityProblems = () => {
|
|
22
22
|
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
23
23
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { y as LegalEntityTypes, a6 as getOwnEntityAssociations } from "./StoreProvider-
|
|
10
|
+
import { y as LegalEntityTypes, a6 as getOwnEntityAssociations } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const getIndividualLegalEntityName = (legalEntityResponse) => {
|
|
12
12
|
if (!legalEntityResponse || !legalEntityResponse?.individual) return "";
|
|
13
13
|
return `${legalEntityResponse.individual?.name?.firstName ?? ""} ${legalEntityResponse.individual?.name?.lastName ?? ""}`;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { az as entriesOf, af as objectsDeepEqual } from "./StoreProvider-
|
|
10
|
+
import { az as entriesOf, af as objectsDeepEqual } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const hasDataChanged = (initialData, currentData) => entriesOf(currentData ?? {}).some(([key, value]) => {
|
|
12
12
|
if (typeof value === "object") {
|
|
13
13
|
return !objectsDeepEqual(value, initialData?.[key]);
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { ay as cloneObject, N as createLogger, by as isString, k as httpPost } from "./StoreProvider-
|
|
11
|
-
import { i as isValueObscured } from "./MaskedInput-
|
|
10
|
+
import { ay as cloneObject, N as createLogger, by as isString, k as httpPost } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
|
+
import { i as isValueObscured } from "./MaskedInput-Nyf8vcDx.js";
|
|
12
12
|
import { g as getProp, d as deleteProp } from "./utils-DNSfZiio.js";
|
|
13
|
-
import { A as AdyenKycSdkError } from "./mapExistingFile-
|
|
13
|
+
import { A as AdyenKycSdkError } from "./mapExistingFile-d1IBaXjL.js";
|
|
14
14
|
const omitObscuredFieldsIfUnchanged = (obscuredFields, dataSubmitted, savedData) => {
|
|
15
15
|
if (!dataSubmitted) {
|
|
16
16
|
return;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { aD as keysOf } from "./StoreProvider-
|
|
10
|
+
import { aD as keysOf } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const isEmpty = (obj, ignoreEmptyProperties = true) => {
|
|
12
12
|
if (obj === null || obj === void 0) return true;
|
|
13
13
|
if (Array.isArray(obj)) return obj.length === 0;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { N as createLogger } from "./StoreProvider-
|
|
10
|
+
import { N as createLogger } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const localizeDateString = (dateString, locale, options) => {
|
|
12
12
|
const logger = createLogger();
|
|
13
13
|
const formatOptions = {
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useEffect, useState, useMemo } from "preact/hooks";
|
|
11
|
-
import { u as useScenarios } from "./useScenarios-
|
|
12
|
-
import { a8 as CountryCodes, N as createLogger, a as useTranslation, V as Icon } from "./StoreProvider-
|
|
11
|
+
import { u as useScenarios } from "./useScenarios-DzBi2C-3.js";
|
|
12
|
+
import { a8 as CountryCodes, N as createLogger, a as useTranslation, V as Icon } from "./StoreProvider-CiZ-dp-b.js";
|
|
13
13
|
import { signal } from "@preact/signals";
|
|
14
14
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
15
15
|
import cx from "classnames";
|
|
16
16
|
import { lazy } from "preact/compat";
|
|
17
|
-
import { I as Image } from "./fieldConfigurations-
|
|
17
|
+
import { I as Image } from "./fieldConfigurations-D1NqrGgr.js";
|
|
18
18
|
class AdyenKycSdkError extends Error {
|
|
19
19
|
sourceError;
|
|
20
20
|
constructor(message, sourceError) {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { b as useApiContext, j as useQuery, o as httpGet, X as useExperimentsContext, a8 as CountryCodes } from "./StoreProvider-
|
|
11
|
-
import { u as useSetting } from "./bafinUtils-
|
|
12
|
-
import { u as useCapabilities } from "./TaxInformationField-
|
|
10
|
+
import { b as useApiContext, j as useQuery, o as httpGet, X as useExperimentsContext, a8 as CountryCodes } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
|
+
import { u as useSetting } from "./bafinUtils-rVLqT7tm.js";
|
|
12
|
+
import { u as useCapabilities } from "./TaxInformationField-B8mQXSpZ.js";
|
|
13
13
|
const getSupportedCountries = async (legalEntityId, baseUrl) => {
|
|
14
14
|
return httpGet({
|
|
15
15
|
baseUrl,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { b as useApiContext, j as useQuery, q as skipToken, o as httpGet, bz as payoutComponentKeyMapping } from "./StoreProvider-
|
|
10
|
+
import { b as useApiContext, j as useQuery, q as skipToken, o as httpGet, bz as payoutComponentKeyMapping } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
import { m as mapWith } from "./utils-DNSfZiio.js";
|
|
12
12
|
const getTransferInstrument = async (legalEntityId, baseUrl, transferInstrumentId) => {
|
|
13
13
|
return httpGet({
|
|
@@ -2,13 +2,13 @@
|
|
|
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] = "b7899803-971b-46ca-adb4-2e43a792a5c0", e._sentryDebugIdIdentifier = "sentry-dbid-b7899803-971b-46ca-adb4-2e43a792a5c0");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
11
|
-
import { aP as refreshSession, B as Button, L as Loader, S as SettingsProvider, Q as QueryClientProvider, A as ApiProvider, E as ExperimentsContextProvider, d as StoreProvider, e as AnalyticsProvider, I as I18nProvider, D as DebugListener, T as ToastContextProvider, f as StateProvider, h as setSdkTokenHandler, n as normalizeEnvironment } from "./StoreProvider-
|
|
11
|
+
import { aP as refreshSession, B as Button, L as Loader, S as SettingsProvider, Q as QueryClientProvider, A as ApiProvider, E as ExperimentsContextProvider, d as StoreProvider, e as AnalyticsProvider, I as I18nProvider, D as DebugListener, T as ToastContextProvider, f as StateProvider, h as setSdkTokenHandler, n as normalizeEnvironment } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
12
|
import { useState, useEffect } from "preact/hooks";
|
|
13
13
|
const sheet = new CSSStyleSheet();
|
|
14
14
|
const stylesheets = [sheet];
|
|
@@ -56,7 +56,7 @@ const EmbedShell = ({
|
|
|
56
56
|
experiments,
|
|
57
57
|
refreshExperiments,
|
|
58
58
|
children: /* @__PURE__ */ jsxs(StoreProvider, { children: [
|
|
59
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.82.
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.82.3" }),
|
|
60
60
|
/* @__PURE__ */ jsx(
|
|
61
61
|
AnalyticsProvider,
|
|
62
62
|
{
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { a8 as CountryCodes, b9 as allowedCountriesForNominee, ak as DecisionMakerTypes, M as TaskTypes, al as Scenarios } from "./StoreProvider-
|
|
11
|
-
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET } from "./utils-
|
|
10
|
+
import { a8 as CountryCodes, b9 as allowedCountriesForNominee, ak as DecisionMakerTypes, M as TaskTypes, al as Scenarios } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
|
+
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET } from "./utils-Du8tQ9jO.js";
|
|
12
12
|
import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
|
|
13
|
-
import { g as getLocalizedIdDocumentTypeOptions } from "./utils-
|
|
13
|
+
import { g as getLocalizedIdDocumentTypeOptions } from "./utils-CE3nKLt4.js";
|
|
14
14
|
const REQUIRED = "REQUIRED";
|
|
15
15
|
const OPTIONAL = "OPTIONAL";
|
|
16
16
|
const SOLE_PROP_COUNTRIES = [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { createElement, isValidElement, cloneElement, Children, Fragment, useContext } from "preact/compat";
|
|
11
|
-
import { aI as warnOnce, aJ as getI18n, aK as getDefaults, aL as isString, aM as warn, aN as isObject, aO as I18nContext } from "./StoreProvider-
|
|
11
|
+
import { aI as warnOnce, aJ as getI18n, aK as getDefaults, aL as isString, aM as warn, aN as isObject, aO as I18nContext } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
12
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
13
13
|
const v = glob$1[path$13];
|
|
14
14
|
if (v) return typeof v === "function" ? v() : Promise.resolve(v);
|
|
@@ -6,11 +6,13 @@ import type { LegalEntityType } from './models/api/legal-entity-type';
|
|
|
6
6
|
import type { VerificationError } from './models/api/verification-error';
|
|
7
7
|
import type { Remediation } from '../types/errors/remediation';
|
|
8
8
|
import type { FormList } from '../types/form';
|
|
9
|
-
import type { FormConfiguration, FormConfigurationWithoutRules, PerScenarioFormConfiguration } from '../types/form-configuration';
|
|
9
|
+
import type { FieldSettings, FormConfiguration, FormConfigurationWithoutRules, PerScenarioFormConfiguration } from '../types/form-configuration';
|
|
10
10
|
import type { FormRules } from '../types/form-rules';
|
|
11
11
|
import type { AnyTLDSFieldName } from '../utils/getFieldsWithExistingData';
|
|
12
12
|
export declare const composePerScenarioFormConfigurations: <TLDS extends TopLevelDataSchema>(scenarios: Scenario[] | undefined, configurations: PerScenarioFormConfiguration<TLDS, string>) => FormConfiguration<TLDS, string>;
|
|
13
13
|
export declare const augmentWithCountryConfigs: <OuterFormSchema extends TopLevelDataSchema>(countrySpecificConfig: FormConfigurationWithoutRules<OuterFormSchema> | undefined, baseFormConfig: FormConfiguration<OuterFormSchema, string>) => FormConfiguration<OuterFormSchema, string>;
|
|
14
|
+
export declare const isFieldRequired: (fieldSettings: FieldSettings<string>, customRules: FormRules<string>) => boolean;
|
|
15
|
+
export declare const isFieldOptional: (fieldSettings: FieldSettings<string>, customRules: FormRules<string>) => boolean;
|
|
14
16
|
export type PropsFromConfiguration<OuterFormSchema> = Required<Pick<BaseOuterFormProps<OuterFormSchema>, 'allFields' | 'requiredFields' | 'optionalFields' | 'obscuredFields' | 'trustedFields'>>;
|
|
15
17
|
/**
|
|
16
18
|
* function: getPropsFromScenarios
|
|
@@ -65,3 +67,4 @@ customRules, legalEntityType, legalEntityTrustedFields, remediationFieldAsOption
|
|
|
65
67
|
remediationFieldAsOptional?: boolean;
|
|
66
68
|
}): PropsFromConfiguration<OuterFormSchema> | undefined;
|
|
67
69
|
export declare const makeTLDSFieldName: (formId: string, fieldName: string) => AnyTLDSFieldName;
|
|
70
|
+
export declare const isFieldRequiredToRemediateDataMissingError: (formId: string, field: string, dataMissingErrors: VerificationError[]) => boolean;
|
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import type { TopLevelDataSchema } from '../context/StateContext/types';
|
|
2
|
+
import type { VerificationError } from '../core/models/api/verification-error';
|
|
3
|
+
import type { FormConfiguration } from '../types/form-configuration';
|
|
2
4
|
import type { FormRules } from '../types/form-rules';
|
|
3
5
|
import type { AnyTLDSFieldName } from './getFieldsWithExistingData';
|
|
4
|
-
export declare const linkedFieldsMap: Partial<Record<AnyTLDSFieldName, AnyTLDSFieldName>>;
|
|
5
|
-
|
|
6
|
+
export declare const linkedFieldsMap: Partial<Record<AnyTLDSFieldName, AnyTLDSFieldName[]>>;
|
|
7
|
+
interface CalculateLinkedRequiredFieldsOptions<OuterFormSchema extends TopLevelDataSchema> {
|
|
8
|
+
field: Extract<keyof OuterFormSchema[keyof OuterFormSchema], string>;
|
|
9
|
+
formId: Extract<keyof OuterFormSchema, string>;
|
|
10
|
+
customRules: FormRules<string>;
|
|
11
|
+
scenarioConfiguration: FormConfiguration<OuterFormSchema, string>;
|
|
12
|
+
dataMissingErrors: VerificationError[];
|
|
13
|
+
formFieldsWithExistingData: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* This function is used to process fields linked to other fields that have custom rules that can return either REQUIRED or OPTIONAL
|
|
17
|
+
* depending on the value of their links. An example of this is the Vat number, this will be REQUIRED when exemption is false but OPTIONAL when exemption is true.
|
|
18
|
+
* This needs to be done due to functions like isFieldRequiredToRemediateDataMissingError, which do not take into account the custom rules and instead mark
|
|
19
|
+
* these fields as required regardless of the rule.
|
|
20
|
+
*
|
|
21
|
+
* @param field - Field being processed
|
|
22
|
+
* @param formId - Form this field is associated to
|
|
23
|
+
* @param customRules - The rules associated to the form flow
|
|
24
|
+
* @param scenarioConfiguration - The static configuration returned from the scenario, i.e. L1, L, etc
|
|
25
|
+
* @param dataMissingErrors - Missing data problems on the LE response
|
|
26
|
+
* @param formFieldsWithExistingData - The current fields that have existing data within the LE response
|
|
27
|
+
*/
|
|
28
|
+
export declare function calculateLinkedRequiredFields<OuterFormSchema extends TopLevelDataSchema>({ field, formId, customRules, scenarioConfiguration, dataMissingErrors, formFieldsWithExistingData, }: CalculateLinkedRequiredFieldsOptions<OuterFormSchema>): {
|
|
6
29
|
isRequiredFromLinkedField: boolean;
|
|
7
30
|
isOptionalFromLinkedField: boolean;
|
|
8
31
|
};
|
|
32
|
+
export {};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { a8 as CountryCodes } from "./StoreProvider-
|
|
10
|
+
import { a8 as CountryCodes } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
import { C as Currencies } from "./currency-BGwQyxBo.js";
|
|
12
12
|
const currencyByCountry = {
|
|
13
13
|
[CountryCodes.Australia]: [Currencies.AUD],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useMemo } from "preact/hooks";
|
|
11
|
-
import { N as createLogger, c as useLegalEntity, q as skipToken } from "./StoreProvider-
|
|
11
|
+
import { N as createLogger, c as useLegalEntity, q as skipToken } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
12
|
const logger = createLogger();
|
|
13
13
|
function useAssociatedLegalEntity(parentLegalEntity, associationType) {
|
|
14
14
|
const matchingAssociation = useMemo(() => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useState, useEffect } from "preact/hooks";
|
|
11
|
-
import { N as createLogger, u as useI18nContext } from "./StoreProvider-
|
|
11
|
+
import { N as createLogger, u as useI18nContext } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
12
|
const normalizedDatasets = {};
|
|
13
13
|
const datasets = {};
|
|
14
14
|
const createDatasetKey = (identifier, locale) => `${identifier}_${locale}`.toLowerCase();
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
|
|
11
11
|
import cx from "classnames";
|
|
12
12
|
import { useState, useEffect, useRef, useMemo, useCallback, useReducer } from "preact/hooks";
|
|
13
|
-
import { U as useAnalyticsContext, a as useTranslation, V as Icon, w as translateStringOrObject, L as Loader, W as noop, x as Typography, N as createLogger, a9 as isEmpty, az as entriesOf, aG as doArraysMatch } from "./StoreProvider-
|
|
13
|
+
import { U as useAnalyticsContext, a as useTranslation, V as Icon, w as translateStringOrObject, L as Loader, W as noop, x as Typography, N as createLogger, a9 as isEmpty, az as entriesOf, aG as doArraysMatch } from "./StoreProvider-CiZ-dp-b.js";
|
|
14
14
|
import { computed, signal, useSignal, useSignalEffect } from "@preact/signals";
|
|
15
15
|
import { K as KEYBOARD_KEYS } from "./keys-BpNgnAsD.js";
|
|
16
|
-
import { d as debouncedInputEvent } from "./analytics-
|
|
16
|
+
import { d as debouncedInputEvent } from "./analytics-VGKSXUs3.js";
|
|
17
17
|
function Checkbox({
|
|
18
18
|
id,
|
|
19
19
|
name,
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
;
|
|
10
10
|
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
11
11
|
import { useContext, useState, useCallback, useMemo } from "preact/hooks";
|
|
12
|
-
import { bw as StateContext, a as useTranslation, U as useAnalyticsContext, X as useExperimentsContext, B as Button } from "./StoreProvider-
|
|
13
|
-
import { L as LoaderWrapper } from "./useForm-
|
|
14
|
-
import { M as MaybeModal } from "./MaybeModal-
|
|
15
|
-
import { a as ModalContent, c as ModalHeader, b as ModalFooter } from "./Modal-
|
|
12
|
+
import { bw as StateContext, a as useTranslation, U as useAnalyticsContext, X as useExperimentsContext, B as Button } from "./StoreProvider-CiZ-dp-b.js";
|
|
13
|
+
import { L as LoaderWrapper } from "./useForm-B9xiR6rk.js";
|
|
14
|
+
import { M as MaybeModal } from "./MaybeModal-CposTKIL.js";
|
|
15
|
+
import { a as ModalContent, c as ModalHeader, b as ModalFooter } from "./Modal-BUqWVdHG.js";
|
|
16
16
|
import { S as Spacer } from "./Spacer-BK3jDget.js";
|
|
17
|
-
import { S as StepProgressIndicator } from "./StepProgressIndicator-
|
|
18
|
-
import { t as trackNavigation, F as FormRouterContextProvider } from "./dropinUtils-
|
|
19
|
-
import { F as FormNavigation } from "./FormNavigation-
|
|
20
|
-
import { d as summaryStep, S as Summary } from "./CountryField-
|
|
21
|
-
import { a as debounce } from "./analytics-
|
|
17
|
+
import { S as StepProgressIndicator } from "./StepProgressIndicator-hlEMGZu8.js";
|
|
18
|
+
import { t as trackNavigation, F as FormRouterContextProvider } from "./dropinUtils-CAMPNh0H.js";
|
|
19
|
+
import { F as FormNavigation } from "./FormNavigation-BPlMuV0j.js";
|
|
20
|
+
import { d as summaryStep, S as Summary } from "./CountryField-XyMQgLEa.js";
|
|
21
|
+
import { a as debounce } from "./analytics-VGKSXUs3.js";
|
|
22
22
|
function useStateContext() {
|
|
23
23
|
const context = useContext(StateContext);
|
|
24
24
|
if (process.env.NODE_ENV === "development" && !context) {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useCallback, useMemo, useReducer, useEffect } from "preact/hooks";
|
|
11
|
-
import { af as objectsDeepEqual, N as createLogger, a9 as isEmpty } from "./StoreProvider-
|
|
12
|
-
import { V as ValidationResult } from "./useForm-
|
|
13
|
-
import { a as isNotEmptyValidator } from "./commonValidators-
|
|
11
|
+
import { af as objectsDeepEqual, N as createLogger, a9 as isEmpty } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
|
+
import { V as ValidationResult } from "./useForm-B9xiR6rk.js";
|
|
13
|
+
import { a as isNotEmptyValidator } from "./commonValidators-DYVRk_o-.js";
|
|
14
14
|
const omitKeys = (obj, omit) => Object.keys(obj).filter((k) => !omit.includes(k)).reduce((a, c) => {
|
|
15
15
|
a[c] = obj[c];
|
|
16
16
|
return a;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { b as useApiContext, j as useQuery, o as httpGet } from "./StoreProvider-
|
|
10
|
+
import { b as useApiContext, j as useQuery, o as httpGet } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const getOnboardingStatus = async (legalEntityId, baseUrl) => {
|
|
12
12
|
return httpGet({
|
|
13
13
|
baseUrl,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { b as useApiContext, j as useQuery, az as entriesOf, q as skipToken, al as Scenarios, o as httpGet } from "./StoreProvider-
|
|
10
|
+
import { b as useApiContext, j as useQuery, az as entriesOf, q as skipToken, al as Scenarios, o as httpGet } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const getScenarios = async (legalEntityId, baseUrl, legalEntityType, countryCode) => {
|
|
12
12
|
const scenarioParams = new URLSearchParams({
|
|
13
13
|
...countryCode && { countryCode },
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { b as useApiContext, j as useQuery, o as httpGet } from "./StoreProvider-
|
|
10
|
+
import { b as useApiContext, j as useQuery, o as httpGet } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
const getTermsOfServiceAcceptanceInfos = async (legalEntityId, baseUrl) => {
|
|
12
12
|
return httpGet({
|
|
13
13
|
baseUrl,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { N as createLogger, aC as useQueryClient, b as useApiContext, aH as ToastContext } from "./StoreProvider-
|
|
10
|
+
import { N as createLogger, aC as useQueryClient, b as useApiContext, aH as ToastContext } from "./StoreProvider-CiZ-dp-b.js";
|
|
11
11
|
import { useCallback, useContext } from "preact/hooks";
|
|
12
12
|
const logger = createLogger();
|
|
13
13
|
const QUERIES_TO_INVALIDATE_WHEN_ROOT_LE_IS_INVALIDATED = [
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { useMemo } from "preact/hooks";
|
|
11
|
-
import { y as LegalEntityTypes, a6 as getOwnEntityAssociations, c as useLegalEntity, R as ROOT_LE } from "./StoreProvider-
|
|
12
|
-
import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-
|
|
13
|
-
import { U as UnincorporatedPartnershipMemberTypes } from "./CountryField-
|
|
14
|
-
import { g as getLegalEntityNameBasedOnType } from "./getName-
|
|
11
|
+
import { y as LegalEntityTypes, a6 as getOwnEntityAssociations, c as useLegalEntity, R as ROOT_LE } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
|
+
import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-CdDDTgFh.js";
|
|
13
|
+
import { U as UnincorporatedPartnershipMemberTypes } from "./CountryField-XyMQgLEa.js";
|
|
14
|
+
import { g as getLegalEntityNameBasedOnType } from "./getName-CLl4DLz5.js";
|
|
15
15
|
const getMemberOwnerId = (memberId, entityAssociations) => entityAssociations.find((association) => association.associatorId === memberId)?.legalEntityId;
|
|
16
16
|
const convertEntityAssociationIntoUnincorporatedPartnershipMember = (association) => {
|
|
17
17
|
if (association.entityType === LegalEntityTypes.INDIVIDUAL || association.entityType === LegalEntityTypes.ORGANIZATION)
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import { R as RadioGroupCard } from "./fieldConfigurations-
|
|
12
|
-
import { a as useTranslation, g as getLegalEntityCountry, bC as getCapabilities, y as LegalEntityTypes, G as hasOwnEntityAssociationOfType, a8 as CountryCodes } from "./StoreProvider-
|
|
13
|
-
import { C as CompanyTypesValues } from "./bafinUtils-
|
|
14
|
-
import { d as allowIndividualWithoutSoleProp } from "./OnboardingDropinComponent-
|
|
15
|
-
import { S as SOLE_PROP_COUNTRIES } from "./rules-
|
|
16
|
-
import { A as ALLOWED_UNINCORPORATED_PARTNERSHIP_COUNTRIES } from "./types-
|
|
11
|
+
import { R as RadioGroupCard } from "./fieldConfigurations-D1NqrGgr.js";
|
|
12
|
+
import { a as useTranslation, g as getLegalEntityCountry, bC as getCapabilities, y as LegalEntityTypes, G as hasOwnEntityAssociationOfType, a8 as CountryCodes } from "./StoreProvider-CiZ-dp-b.js";
|
|
13
|
+
import { C as CompanyTypesValues } from "./bafinUtils-rVLqT7tm.js";
|
|
14
|
+
import { d as allowIndividualWithoutSoleProp } from "./OnboardingDropinComponent-BQMB-M3f.js";
|
|
15
|
+
import { S as SOLE_PROP_COUNTRIES } from "./rules-mx2LkA3c.js";
|
|
16
|
+
import { A as ALLOWED_UNINCORPORATED_PARTNERSHIP_COUNTRIES } from "./types-BgtfChBm.js";
|
|
17
17
|
const EntityTypeRadioGroupCard = ({
|
|
18
18
|
examples,
|
|
19
19
|
optionDescription,
|
|
@@ -2,38 +2,80 @@
|
|
|
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] = "3e807c18-d9fe-4afd-bc14-aab576e2afd9", e._sentryDebugIdIdentifier = "sentry-dbid-3e807c18-d9fe-4afd-bc14-aab576e2afd9");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { e as TrustedFieldsProviders } from "./fieldConfigurations-
|
|
11
|
-
import { N as createLogger, bu as businessDetailsApiKeyMapping, a$ as individualApiKeyMapping, aE as remediationHasFileUploadField, bv as dataMissingRemediationsToFieldsMap, aD as keysOf, k as httpPost, aB as httpDelete, o as httpGet, bw as StateContext, a as useTranslation, U as useAnalyticsContext, V as Icon, x as Typography, P as IconButton } from "./StoreProvider-
|
|
12
|
-
import { g as getLocalizedIdDocumentTypeOptions } from "./utils-
|
|
10
|
+
import { e as TrustedFieldsProviders } from "./fieldConfigurations-D1NqrGgr.js";
|
|
11
|
+
import { N as createLogger, bu as businessDetailsApiKeyMapping, a$ as individualApiKeyMapping, aE as remediationHasFileUploadField, bv as dataMissingRemediationsToFieldsMap, aD as keysOf, k as httpPost, aB as httpDelete, o as httpGet, bw as StateContext, a as useTranslation, U as useAnalyticsContext, V as Icon, x as Typography, P as IconButton } from "./StoreProvider-CiZ-dp-b.js";
|
|
12
|
+
import { g as getLocalizedIdDocumentTypeOptions } from "./utils-CE3nKLt4.js";
|
|
13
13
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
14
14
|
import cx from "classnames";
|
|
15
15
|
import { useEffect } from "preact/hooks";
|
|
16
16
|
const linkedFieldsMap = {
|
|
17
|
-
"additionalInformation.vatNumber":
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
"additionalInformation.vatNumber": [
|
|
18
|
+
"additionalInformation.exemptedFromVat",
|
|
19
|
+
"additionalInformation.vatAbsenceReason"
|
|
20
|
+
]
|
|
20
21
|
};
|
|
21
|
-
function calculateLinkedRequiredFields(
|
|
22
|
+
function calculateLinkedRequiredFields({
|
|
23
|
+
field,
|
|
24
|
+
formId,
|
|
25
|
+
customRules,
|
|
26
|
+
scenarioConfiguration,
|
|
27
|
+
dataMissingErrors,
|
|
28
|
+
formFieldsWithExistingData
|
|
29
|
+
}) {
|
|
22
30
|
const tldsField = makeTLDSFieldName(formId, field);
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
31
|
+
const isRootField = Boolean(linkedFieldsMap[tldsField]);
|
|
32
|
+
if (isRootField) {
|
|
33
|
+
const fieldSettings = scenarioConfiguration?.[field];
|
|
34
|
+
const isFieldRequiredBySettings = fieldSettings && isFieldRequired(fieldSettings, customRules);
|
|
35
|
+
const isFieldPopulated = formFieldsWithExistingData?.includes(field);
|
|
36
|
+
const isFieldNeededToRemediateDataMissingError = isFieldRequiredToRemediateDataMissingError(
|
|
37
|
+
formId,
|
|
38
|
+
field,
|
|
39
|
+
dataMissingErrors
|
|
40
|
+
);
|
|
41
|
+
const isRootFieldRequired = isFieldRequiredBySettings || isFieldPopulated || isFieldNeededToRemediateDataMissingError;
|
|
42
|
+
if (!isRootFieldRequired) {
|
|
43
|
+
return {
|
|
44
|
+
isRequiredFromLinkedField: false,
|
|
45
|
+
isOptionalFromLinkedField: false
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
switch (field) {
|
|
49
|
+
case "vatNumber": {
|
|
50
|
+
const processedRule = customRules.countryUsesVat();
|
|
51
|
+
return {
|
|
52
|
+
isRequiredFromLinkedField: processedRule === "REQUIRED",
|
|
53
|
+
isOptionalFromLinkedField: processedRule === "OPTIONAL"
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const rootLinkedField = Object.entries(linkedFieldsMap).find(
|
|
59
|
+
([, linkedFields]) => linkedFields.includes(tldsField)
|
|
60
|
+
)?.[0];
|
|
61
|
+
if (!rootLinkedField)
|
|
25
62
|
return {
|
|
26
63
|
isRequiredFromLinkedField: false,
|
|
27
64
|
isOptionalFromLinkedField: false
|
|
28
65
|
};
|
|
66
|
+
const linkedFieldKey = rootLinkedField.split(".")[1];
|
|
67
|
+
const linkedFieldSettings = scenarioConfiguration?.[linkedFieldKey];
|
|
68
|
+
const isLinkedFieldRequired = linkedFieldSettings && isFieldRequired(linkedFieldSettings, customRules);
|
|
69
|
+
const isLinkedFieldPopulated = formFieldsWithExistingData?.includes(linkedFieldKey);
|
|
70
|
+
const isLinkedFieldRequiredToRemediateDataMissingError = isFieldRequiredToRemediateDataMissingError(formId, linkedFieldKey, dataMissingErrors);
|
|
71
|
+
const isRootLinkedFieldRequired = isLinkedFieldRequired || isLinkedFieldPopulated || isLinkedFieldRequiredToRemediateDataMissingError;
|
|
72
|
+
if (!isRootLinkedFieldRequired) {
|
|
73
|
+
return {
|
|
74
|
+
isRequiredFromLinkedField: false,
|
|
75
|
+
isOptionalFromLinkedField: false
|
|
76
|
+
};
|
|
77
|
+
}
|
|
29
78
|
switch (field) {
|
|
30
|
-
case "vatNumber": {
|
|
31
|
-
const processedRule = customRules.countryUsesVat();
|
|
32
|
-
return {
|
|
33
|
-
isRequiredFromLinkedField: processedRule === "REQUIRED",
|
|
34
|
-
isOptionalFromLinkedField: processedRule === "OPTIONAL"
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
79
|
case "exemptedFromVat": {
|
|
38
80
|
const processedRule = customRules.isVatExempt();
|
|
39
81
|
return {
|
|
@@ -187,7 +229,14 @@ function getPropsFromConfigurations({
|
|
|
187
229
|
const isRequiredByRemediationAction = !remediationFieldAsOptional && isFieldRequiredByRemediationAction;
|
|
188
230
|
const isOptionalByRemediationAction = remediationFieldAsOptional && isFieldRequiredByRemediationAction;
|
|
189
231
|
const isRequiredFieldPopulated = !isOptionalFromFieldConfig && formFieldsWithExistingData.includes(field);
|
|
190
|
-
const { isRequiredFromLinkedField, isOptionalFromLinkedField } = calculateLinkedRequiredFields(
|
|
232
|
+
const { isRequiredFromLinkedField, isOptionalFromLinkedField } = calculateLinkedRequiredFields({
|
|
233
|
+
field,
|
|
234
|
+
formId,
|
|
235
|
+
customRules,
|
|
236
|
+
scenarioConfiguration,
|
|
237
|
+
dataMissingErrors,
|
|
238
|
+
formFieldsWithExistingData
|
|
239
|
+
});
|
|
191
240
|
const isRequired = (isRequiredFromFieldConfig || isRequiredByRemediationAction || isFieldNeededToRemediateDataMissingError || isRequiredFieldPopulated || isRequiredFromLinkedField) && !isOptionalFromLinkedField;
|
|
192
241
|
if (isRequired && !readonly.includes(field)) {
|
|
193
242
|
requiredFields[formId] = requiredFields[formId] ? [...requiredFields[formId], field] : [field];
|