@adyen/kyc-components 3.67.3 → 3.68.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/AcceptTermsOfServiceComponent-yutCVhdr.js +1717 -0
- package/dist/{AccountSetupRejected-ChiJY18-.js → AccountSetupRejected-Bp9MbaZF.js} +3 -2
- package/dist/{BusinessTypeSelection-D7ZvvIMS.js → BusinessTypeSelection-Bda3HjOy.js} +16 -16
- package/dist/{CXEL7IU7-Bk2n0dNy.js → CXEL7IU7-DIlmKme0.js} +3 -3
- package/dist/CreateIndividualComponent-wIMjaodd.js +3798 -0
- package/dist/{CustomerSupport-CJNWyhvH.js → CustomerSupport-BBpiWDZu.js} +4 -3
- package/dist/{DebugModal-Bv0myReE.js → DebugModal-Chl6VeCw.js} +8 -9
- package/dist/{DecisionMakers-ChL8AjTJ.js → DecisionMakers-91Uxeb4Z.js} +4 -2
- package/dist/EmbedShell-BgnrqkKO.js +60 -0
- package/dist/{core-B_WrZP-J.js → EventEmitter-MB52FRnR.js} +1221 -23638
- package/dist/{HASRA6WW-1uv7rGnF.js → HASRA6WW-CYutWFzS.js} +2 -2
- package/dist/{I3HPI4QX-Cu2MHefw.js → I3HPI4QX-h-J4eisw.js} +3 -3
- package/dist/{Introduction-S84AjEkr.js → Introduction-Cn5uh084.js} +3 -2
- package/dist/{Review-B416UIqb.js → Review-BITkfvbx.js} +3 -2
- package/dist/{SingpassSelection-CGe7MVVA.js → SingpassSelection-BPrfSrSw.js} +3 -3
- package/dist/{TaxReportingDropin-CUnugFcz.js → TaxReportingDropin-DZLUs3Hb.js} +47 -16
- package/dist/adyen-kyc-components.js +1 -1
- package/dist/adyenConfig.js +3 -13
- package/dist/core-DnQST_lN.js +18040 -0
- package/dist/{css-BdtMD5A5.js → css-ChtZI8YA.js} +2 -2
- package/dist/individual.js +35 -19
- package/dist/{json-DbFHJS1e.js → json-CY-QM445.js} +2 -2
- package/dist/listToRecord-CogvyLiD.js +160 -0
- package/dist/{plaintext-DuNA8yq2.js → plaintext-BzvCXlZZ.js} +2 -2
- package/dist/style.css +948 -377
- package/dist/styles-CLV89_hH.js +6142 -0
- package/dist/terms-of-service-preact.js +15 -0
- package/dist/terms-of-service-react.js +15 -0
- package/dist/terms-of-service.js +55 -0
- package/dist/types/api/configurations/useScenarios.d.ts +180 -0
- package/dist/types/api/configurations/useTaskTypes.d.ts +5 -0
- package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +5 -2
- package/dist/types/api/pciTemplate/usePciStatus.d.ts +4 -2
- package/dist/types/api/pciTemplate/usePciTemplate.d.ts +4 -2
- package/dist/types/api/pciTemplate/useSignPci.d.ts +4 -1
- package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +4 -1
- package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +5 -2
- package/dist/types/api/termsOfService/useTermsOfService.d.ts +5 -2
- package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +4 -1
- package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +5 -2
- package/dist/types/api/types.d.ts +14 -0
- package/dist/types/api/validation/useValidateAccountIdentification.d.ts +6 -2
- package/dist/types/api/validation/useValidatePhoneNumber.d.ts +14 -0
- package/dist/types/components/BankAccount/hooks/useAsyncAccountDetailsValidationRules.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -4
- package/dist/types/components/EFP/tasks/HighExposureDropin/types.d.ts +0 -2
- package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +2 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +2 -8
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +4 -3
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +3 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -5
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -4
- package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +1 -1
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +10 -0
- package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +2 -2
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +2 -2
- package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/types.d.ts +0 -3
- package/dist/types/components/Trust/forms/Trust/types.d.ts +2 -2
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +30 -0
- package/dist/types/components/Trust/tasks/TrustDropin/TrustDropin.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +6 -3
- package/dist/types/components/Trust/utils/addOrUpdateAssociatedTrustMember.d.ts +4 -4
- package/dist/types/components/Trust/utils/addOrUpdateUndefinedBeneficiary.d.ts +2 -2
- package/dist/types/components/Trust/utils/updateExemptSettlorName.d.ts +4 -4
- package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedPartnershipMembers.d.ts +2 -2
- package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +3 -3
- package/dist/types/components/ui/atoms/Field/Field.d.ts +26 -7
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +4 -2
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +2 -6
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
- package/dist/types/components/ui/atoms/Select/Select.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -2
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +4 -2
- package/dist/types/context/ExperimentContext/types.d.ts +0 -10
- package/dist/types/context/SettingsContext/types.d.ts +3 -1
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +26 -0
- package/dist/types/core/models/errors/validation-error.d.ts +1 -9
- package/dist/types/core/services/http.d.ts +3 -3
- package/dist/types/core/services/types.d.ts +2 -2
- package/dist/types/embeds/individual/individual.types.d.ts +5 -1
- package/dist/types/embeds/individual/preact/Individual.d.ts +3 -3
- package/dist/types/embeds/individual/react/Individual.d.ts +3 -3
- package/dist/types/embeds/individual/vue/individual.types.d.ts +3 -3
- package/dist/types/embeds/terms-of-service/adyen-terms-of-service.d.ts +1 -0
- package/dist/types/embeds/terms-of-service/preact/TermsOfService.d.ts +10 -0
- package/dist/types/embeds/terms-of-service/react/TermsOfService.d.ts +20 -0
- package/dist/types/embeds/terms-of-service/terms-of-service.types.d.ts +8 -0
- package/dist/types/embeds/utils.d.ts +4 -0
- package/dist/types/hooks/useScenarioConfiguration.d.ts +11 -4
- package/dist/types/utils/api/processValidationErrors.d.ts +5 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/utils-Do7EwrWz.js +24 -0
- package/dist/{yaml-CZT9wc9a.js → yaml-CFgf8XoZ.js} +2 -2
- package/package.json +16 -1
- package/dist/types/context/ConfigurationApiContext/ConfigurationApiContext.d.ts +0 -7
- package/dist/types/context/ConfigurationApiContext/ConfigurationApiProvider.d.ts +0 -7
- package/dist/types/context/ConfigurationApiContext/getEmbeddedApi.d.ts +0 -5
- package/dist/types/context/ConfigurationApiContext/useConfigurationApi.d.ts +0 -2
- package/dist/types/core/models/api/get-configuration.d.ts +0 -17
- package/dist/types/core/models/api/get-tasks.d.ts +0 -2
- package/dist/types/core/services/componentApi/get-scenarios.d.ts +0 -4
- package/dist/types/core/services/componentApi/get-tasks.d.ts +0 -3
- package/dist/types/core/services/componentApi/update-legal-entity.d.ts +0 -3
- package/dist/types/core/services/componentApi/validate-phone-number.d.ts +0 -3
- package/dist/types/hooks/useComponentApi.d.ts +0 -10
|
@@ -5,12 +5,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
{
|
|
6
6
|
try {
|
|
7
7
|
let e2 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n2 = new e2.Error().stack;
|
|
8
|
-
n2 && (e2._sentryDebugIds = e2._sentryDebugIds || {}, e2._sentryDebugIds[n2] = "
|
|
8
|
+
n2 && (e2._sentryDebugIds = e2._sentryDebugIds || {}, e2._sentryDebugIds[n2] = "a43ec45d-0f33-421d-a0d3-de9eb584ac0c", e2._sentryDebugIdIdentifier = "sentry-dbid-a43ec45d-0f33-421d-a0d3-de9eb584ac0c");
|
|
9
9
|
} catch (e2) {
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
;
|
|
13
|
-
import {
|
|
13
|
+
import { e3 as createContext, e4 as createSignal, e5 as onMount, e6 as createEffect, e1 as createMemo, e2 as createComponent, e7 as Portal, e8 as Show, e9 as template, ea as insert, eb as createRenderEffect, ec as className, ed as clearDelegatedEvents, ee as delegateEvents, ef as useContext, eg as onCleanup, eh as sortFns, ei as mutationSortFns, ej as on, ek as setAttribute, el as getSidedProp, em as use, en as createUniqueId, eo as batch, ep as getQueryStatusLabel, eq as getMutationStatusColor, er as getQueryStatusColor, es as getQueryStatusColorByLabel, et as displayValue, eu as For, ev as convertRemToPixels, ew as untrack, ex as $TRACK, ey as useTransition, ez as spread, eA as mergeProps, eB as createRoot, eC as serialize, eD as Index, eE as updateNestedDataByPath, eF as addEventListener, eG as stringify, eH as Match, eI as Switch, eJ as deleteNestedDataByPath, eK as splitProps, eL as Dynamic, eM as createComputed } from "./EventEmitter-MB52FRnR.js";
|
|
14
14
|
var isNonNullable = (i2) => i2 != null;
|
|
15
15
|
var filterNonNullable = (arr) => arr.filter(isNonNullable);
|
|
16
16
|
function chain(callbacks) {
|
|
@@ -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] = "267751bd-63ff-44dd-a168-336bee5094f7", e._sentryDebugIdIdentifier = "sentry-dbid-267751bd-63ff-44dd-a168-336bee5094f7");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./HASRA6WW-
|
|
11
|
-
import {
|
|
10
|
+
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./HASRA6WW-CYutWFzS.js";
|
|
11
|
+
import { e0 as getPreferredColorScheme, e1 as createMemo, e2 as createComponent } from "./EventEmitter-MB52FRnR.js";
|
|
12
12
|
var DevtoolsComponent = (props) => {
|
|
13
13
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
14
14
|
prefix: "TanstackQueryDevtools"
|
|
@@ -2,15 +2,16 @@
|
|
|
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] = "a3115e4d-e79a-45f1-b982-9a53f7f69cf5", e._sentryDebugIdIdentifier = "sentry-dbid-a3115e4d-e79a-45f1-b982-9a53f7f69cf5");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
|
|
11
11
|
import { useMemo as useMemo$1, useState, useEffect } from "preact/hooks";
|
|
12
|
-
import {
|
|
12
|
+
import { T as TaskTypes, J as LegalEntityType, dZ as getTranslationKeysByPrefix, i as useI18nContext, j as useAnalyticsContext, dD as StepProgressIndicator, G as Button } from "./EventEmitter-MB52FRnR.js";
|
|
13
13
|
import { useMemo } from "preact/compat";
|
|
14
|
+
import { u as useCanSeeIntroduction, a as useLegalEntityType, t as toCapitalized } from "./core-DnQST_lN.js";
|
|
14
15
|
var IntroductionScreens = ((IntroductionScreens2) => {
|
|
15
16
|
IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
|
|
16
17
|
IntroductionScreens2[IntroductionScreens2["INDIVIDUAL"] = TaskTypes.INDIVIDUAL] = "INDIVIDUAL";
|
|
@@ -2,14 +2,15 @@
|
|
|
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] = "1d709188-b2e1-4e66-9565-a9e49f006970", e._sentryDebugIdIdentifier = "sentry-dbid-1d709188-b2e1-4e66-9565-a9e49f006970");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
11
11
|
import { useState } from "preact/hooks";
|
|
12
|
-
import {
|
|
12
|
+
import { a as useApiContext, d as useMutation, h as httpPost, i as useI18nContext, l as useToastContext, L as LoaderWrapper, bX as FormHeader, d0 as Checkbox, cG as ActionBar } from "./EventEmitter-MB52FRnR.js";
|
|
13
|
+
import { D as DropinLayout } from "./core-DnQST_lN.js";
|
|
13
14
|
const confirmReview = async (legalEntityId, url) => {
|
|
14
15
|
return httpPost({
|
|
15
16
|
loadingContext: url,
|
|
@@ -2,14 +2,14 @@
|
|
|
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] = "22878715-0e38-40fc-8077-94b6f207c2e6", e._sentryDebugIdIdentifier = "sentry-dbid-22878715-0e38-40fc-8077-94b6f207c2e6");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
11
11
|
import { useState } from "preact/hooks";
|
|
12
|
-
import {
|
|
12
|
+
import { i as useI18nContext, bi as useForm, E as Typography, b8 as Field, cy as RadioGroupCard, G as Button, bw as Svg, J as LegalEntityType } from "./EventEmitter-MB52FRnR.js";
|
|
13
13
|
const setupAccountMethods = ["singpass", "manual"];
|
|
14
14
|
const setupAccountMethodFields = ["setupAccountMethod"];
|
|
15
15
|
const getSingpassSelectionDisabled = (legalEntityType) => {
|
|
@@ -81,7 +81,7 @@ const SingpassSelection = (props) => {
|
|
|
81
81
|
const methodsMetadata = getSetupAccountMethodMetadata(legalEntityType);
|
|
82
82
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-singpass-selection", children: [
|
|
83
83
|
/* @__PURE__ */ jsx("header", { className: "adyen-kyc-u-margin-bottom-32", children: /* @__PURE__ */ jsx(Typography, { el: "h2", variant: "title-m", children: i18n.get("howWouldYouLikeToSetUpYourAccount") }) }),
|
|
84
|
-
/* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsx(Field, { name: "setupAccountMethod", children: (childProps) => /* @__PURE__ */ jsx(
|
|
84
|
+
/* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "setupAccountMethod", children: (childProps) => /* @__PURE__ */ jsx(
|
|
85
85
|
RadioGroupCard,
|
|
86
86
|
{
|
|
87
87
|
...childProps,
|
|
@@ -2,15 +2,17 @@
|
|
|
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] = "162a0fd3-becc-487c-8ff4-7c72c28622d9", e._sentryDebugIdIdentifier = "sentry-dbid-162a0fd3-becc-487c-8ff4-7c72c28622d9");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
11
|
+
import { a as useApiContext, b as useQuery, e as httpGet, E as Typography, i as useI18nContext, bN as useFormContext, U as Alert, b8 as Field, ba as RadioGroup, av as getFormProps, Q as Icon, aL as isEmpty, bw as Svg, G as Button, V as Card, W as StructuredList, Y as IconButton, H as isEmpty$1, f as useQueryClient, j as useAnalyticsContext, u as useLegalEntity, c as createLogger, K as Loader } from "./EventEmitter-MB52FRnR.js";
|
|
12
12
|
import { useState, useRef, useEffect, useMemo, useCallback } from "preact/hooks";
|
|
13
|
+
import { B as useUpdateLegalEntity, O as useMultiForm, h as getRequiredForms, i as addValidityToForms, j as useFormComposer, U as FormContextProvider, F as FormWrapper } from "./CreateIndividualComponent-wIMjaodd.js";
|
|
13
14
|
import { signal } from "@preact/signals";
|
|
15
|
+
import { s as sofStyles, T as TaskStatusIndicator, n as normalizedTaskStatusStore } from "./core-DnQST_lN.js";
|
|
14
16
|
const getTaxClassification = async (legalEntityId, url) => {
|
|
15
17
|
return httpGet({
|
|
16
18
|
loadingContext: url,
|
|
@@ -91,10 +93,19 @@ const getTaxStatusSummary = (i18n, taxReportingClassification) => {
|
|
|
91
93
|
] : [];
|
|
92
94
|
};
|
|
93
95
|
const getTaxOptionsRadioItems = (i18n, taxRecommendationData, taxReportingClassification) => {
|
|
96
|
+
const businessType = taxRecommendationData == null ? void 0 : taxRecommendationData.businessType;
|
|
97
|
+
const allowedTypes = getSupportedTaxClassificationTypes(businessType);
|
|
98
|
+
const allowedTaxReportingOptions = Object.fromEntries(
|
|
99
|
+
Object.entries(taxReportingOptions).filter(
|
|
100
|
+
([key]) => allowedTypes.includes(key)
|
|
101
|
+
)
|
|
102
|
+
);
|
|
94
103
|
const taxOptionsWithoutRecommendation = Object.fromEntries(
|
|
95
|
-
Object.entries(
|
|
104
|
+
Object.entries(allowedTaxReportingOptions).filter(
|
|
105
|
+
([key]) => key !== (taxRecommendationData == null ? void 0 : taxRecommendationData.type)
|
|
106
|
+
)
|
|
96
107
|
);
|
|
97
|
-
const taxReportingOptionsToShow = (taxRecommendationData == null ? void 0 : taxRecommendationData.type) && !(taxReportingClassification == null ? void 0 : taxReportingClassification.type) ? taxOptionsWithoutRecommendation :
|
|
108
|
+
const taxReportingOptionsToShow = (taxRecommendationData == null ? void 0 : taxRecommendationData.type) && !(taxReportingClassification == null ? void 0 : taxReportingClassification.type) ? taxOptionsWithoutRecommendation : allowedTaxReportingOptions;
|
|
98
109
|
return Object.entries(taxReportingOptionsToShow).map(([key, value]) => ({
|
|
99
110
|
id: key,
|
|
100
111
|
name: key,
|
|
@@ -111,13 +122,34 @@ const getRecommendedTaxOptionsRadioItems = (i18n, showRecommendation, taxRecomme
|
|
|
111
122
|
}
|
|
112
123
|
] : [];
|
|
113
124
|
};
|
|
125
|
+
const getSupportedTaxClassificationTypes = (businessType) => {
|
|
126
|
+
const publicCompanyTypes = [
|
|
127
|
+
"listedPublicCompany",
|
|
128
|
+
"subsidiaryOfListedPublicCompany",
|
|
129
|
+
"governmentalOrganization",
|
|
130
|
+
"internationalOrganization"
|
|
131
|
+
];
|
|
132
|
+
if (!businessType) {
|
|
133
|
+
return [];
|
|
134
|
+
}
|
|
135
|
+
if (publicCompanyTypes.includes(businessType)) {
|
|
136
|
+
return ["nonFinancialNonReportable"];
|
|
137
|
+
}
|
|
138
|
+
if (businessType === "financialInstitution") {
|
|
139
|
+
return ["financialNonReportable"];
|
|
140
|
+
} else if (businessType === "other") {
|
|
141
|
+
return ["nonFinancialActive", "nonFinancialPassive"];
|
|
142
|
+
} else {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
};
|
|
114
146
|
function TaxReportingClassificationForm({
|
|
115
147
|
data,
|
|
116
148
|
taxReportingClassification,
|
|
117
149
|
taxRecommendationData,
|
|
118
150
|
errors
|
|
119
151
|
}) {
|
|
120
|
-
var _a
|
|
152
|
+
var _a;
|
|
121
153
|
const { i18n } = useI18nContext();
|
|
122
154
|
const { form } = useFormContext();
|
|
123
155
|
const { handleChangeFor } = form;
|
|
@@ -146,7 +178,7 @@ function TaxReportingClassificationForm({
|
|
|
146
178
|
((_a = errors == null ? void 0 : errors.type) == null ? void 0 : _a.errorMessage) && /* @__PURE__ */ jsx(Alert, { variant: "error", title: i18n.get(errors.type.errorMessage) }),
|
|
147
179
|
showRecommendation ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
148
180
|
/* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: i18n.get("recommendedForYourBusiness") }),
|
|
149
|
-
/* @__PURE__ */ jsx(Field, {
|
|
181
|
+
/* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: (childProps) => /* @__PURE__ */ jsx(
|
|
150
182
|
RadioGroup,
|
|
151
183
|
{
|
|
152
184
|
...childProps,
|
|
@@ -156,9 +188,9 @@ function TaxReportingClassificationForm({
|
|
|
156
188
|
onChange: handleFieldChange("type", "input")
|
|
157
189
|
}
|
|
158
190
|
) }),
|
|
159
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: i18n.get("otherOptions") })
|
|
191
|
+
taxOptionsRadioItems.length ? /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: i18n.get(taxOptionsRadioItems.length === 1 ? "other" : "otherOptions") }) : null
|
|
160
192
|
] }) : null,
|
|
161
|
-
/* @__PURE__ */ jsx(Field, { name: "type", children: (childProps) => /* @__PURE__ */ jsx(
|
|
193
|
+
/* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: (childProps) => /* @__PURE__ */ jsx(
|
|
162
194
|
RadioGroup,
|
|
163
195
|
{
|
|
164
196
|
...childProps,
|
|
@@ -376,19 +408,14 @@ function TaxReportingDropin({ problems, handleHomeClick }) {
|
|
|
376
408
|
);
|
|
377
409
|
useEffect(() => {
|
|
378
410
|
var _a2, _b2, _c2;
|
|
379
|
-
if (!((_a2 = data == null ? void 0 : data.taxClassification) == null ? void 0 : _a2.type) && ((
|
|
380
|
-
setData(
|
|
381
|
-
"type",
|
|
382
|
-
((_c2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _c2.type) ?? (taxRecommendationData == null ? void 0 : taxRecommendationData.type),
|
|
383
|
-
"taxClassification"
|
|
384
|
-
);
|
|
411
|
+
if (!((_a2 = data == null ? void 0 : data.taxClassification) == null ? void 0 : _a2.type) && ((_b2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _b2.type)) {
|
|
412
|
+
setData("type", (_c2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _c2.type, "taxClassification");
|
|
385
413
|
(async () => {
|
|
386
414
|
await triggerValidation("taxClassification");
|
|
387
415
|
})().catch(() => console.error("Error triggering validation"));
|
|
388
416
|
}
|
|
389
417
|
}, [
|
|
390
418
|
(_d = data == null ? void 0 : data.taxClassification) == null ? void 0 : _d.type,
|
|
391
|
-
taxRecommendationData == null ? void 0 : taxRecommendationData.type,
|
|
392
419
|
(_e = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _e.type,
|
|
393
420
|
setData,
|
|
394
421
|
triggerValidation
|
|
@@ -403,7 +430,7 @@ function TaxReportingDropin({ problems, handleHomeClick }) {
|
|
|
403
430
|
return addValidityToForms(requiredFormsWithoutSummary, form.isValid, problems);
|
|
404
431
|
}, [form.isValid, problems]);
|
|
405
432
|
const handleSubmit = useCallback(async () => {
|
|
406
|
-
var _a2;
|
|
433
|
+
var _a2, _b2;
|
|
407
434
|
if (!legalEntityData) {
|
|
408
435
|
return;
|
|
409
436
|
}
|
|
@@ -436,6 +463,10 @@ function TaxReportingDropin({ problems, handleHomeClick }) {
|
|
|
436
463
|
gotoFormByFormIndex(0);
|
|
437
464
|
setTaxClassificationErrorMessage("");
|
|
438
465
|
setLoadingStatus("success");
|
|
466
|
+
userEvents.addTaskEvent("Success", {
|
|
467
|
+
actionType: "submit",
|
|
468
|
+
returnValue: (_b2 = data == null ? void 0 : data.taxClassification) == null ? void 0 : _b2.type
|
|
469
|
+
});
|
|
439
470
|
} catch (e) {
|
|
440
471
|
setTaxClassificationErrorMessage((e == null ? void 0 : e.message) || i18n.get("errorUpdatingTaxClassification"));
|
|
441
472
|
logger.log("Error updating source of funds", e);
|
package/dist/adyenConfig.js
CHANGED
|
@@ -2,23 +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] = "e146d49f-84b4-4a2a-b5e5-09c45667b6fb", e._sentryDebugIdIdentifier = "sentry-dbid-e146d49f-84b4-4a2a-b5e5-09c45667b6fb");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import { C as Core } from "./core-
|
|
11
|
-
|
|
12
|
-
live: "https://live.adyen.com",
|
|
13
|
-
test: "https://test.adyen.com"
|
|
14
|
-
});
|
|
15
|
-
const propsToCoreOptions = (options, token) => ({
|
|
16
|
-
...options,
|
|
17
|
-
sdkToken: token,
|
|
18
|
-
getSdkToken: options.fetchToken,
|
|
19
|
-
// Merchant facing 'live'|'test', fallback to raw/unmapped value for local/beta
|
|
20
|
-
environment: environmentMap[options.environment] ?? options.environment
|
|
21
|
-
});
|
|
10
|
+
import { C as Core } from "./core-DnQST_lN.js";
|
|
11
|
+
import { p as propsToCoreOptions } from "./utils-Do7EwrWz.js";
|
|
22
12
|
const loadAdyenConfig = async (config) => {
|
|
23
13
|
if (!config.environment) {
|
|
24
14
|
config.environment = "live";
|