@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
80 lines (79 loc) • 5.12 kB
JavaScript
try {
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "489d1031-291e-4a6f-a7d8-024baca50781", e._sentryDebugIdIdentifier = "sentry-dbid-489d1031-291e-4a6f-a7d8-024baca50781");
} catch (e) {}
import { n as addResourceBundles, r as useTranslation } from "./translation-BYvhW5zA.js";
import { A as _rolldown_dynamic_import_helper_default } from "./resolveEnvironment-DNmu53Rr.js";
import { r as Loader } from "./Button-i8I2dHP8.js";
import { r as useLegalEntity } from "./useLegalEntity-CtlUQv_J.js";
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BHh7Ux8v.js";
import { a as noop } from "./AnalyticsContext-BFrJmsp0.js";
import { C as EntityTypes } from "./processCapabilities-fPuXc9gL.js";
import { t as TaskTypes } from "./taskTypes-NawDTp5n.js";
import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-D6XC4DZ2.js";
import { t as IndividualDropin } from "./IndividualDropin-DHrcFHNx.js";
import { jsx } from "preact/jsx-runtime";
import { skipToken } from "@tanstack/preact-query";
import { useParams } from "wouter-preact";
//#region src/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.tsx
function UnincorporatedPartnershipIndividualPage({ memberId: memberIdProp, partnershipId, member, asModal = false, hideSidebar = false, isTargetLegalEntityType = false, onSubmit, handleBackClick, handleCloseClick, handleHomeClick = noop }) {
const routeParams = useParams();
const memberId = memberIdProp ?? routeParams.memberId;
const { data: memberLe } = useLegalEntity(memberId || skipToken);
const { data: partnershipLe } = useLegalEntity(partnershipId ?? skipToken);
const capabilityProblems = useCapabilityProblems();
const { i18n } = useTranslation();
addResourceBundles(i18n, [{
ns: "individual",
importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
"../../Individual/language/bg-BG.json": () => import("./bg-BG-VIyyeYUh.js"),
"../../Individual/language/cs-CZ.json": () => import("./cs-CZ-D8nnXFEh.js"),
"../../Individual/language/da-DK.json": () => import("./da-DK-Cq-1LB6T.js"),
"../../Individual/language/de-DE.json": () => import("./de-DE-Bc55gBv4.js"),
"../../Individual/language/el-GR.json": () => import("./el-GR-Cr-3NgPk.js"),
"../../Individual/language/en-US.instructions.json": () => import("./en-US.instructions-DfgivDPI.js"),
"../../Individual/language/en-US.json": () => import("./en-US-C1J9jcVI.js"),
"../../Individual/language/es-ES.json": () => import("./es-ES-uVSZu-EQ.js"),
"../../Individual/language/es-LA.json": () => import("./es-LA-BU5Op1kh.js"),
"../../Individual/language/et-EE.json": () => import("./et-EE-BFb0MPqf.js"),
"../../Individual/language/fi-FI.json": () => import("./fi-FI-BI9sCCEP.js"),
"../../Individual/language/fr-FR.json": () => import("./fr-FR-_TkFnevF.js"),
"../../Individual/language/hr-HR.json": () => import("./hr-HR-DubR_a2h.js"),
"../../Individual/language/hu-HU.json": () => import("./hu-HU-CK6lbZ-D.js"),
"../../Individual/language/it-IT.json": () => import("./it-IT-CVVOlFfY.js"),
"../../Individual/language/ja-JP.json": () => import("./ja-JP-B8sNFjt_.js"),
"../../Individual/language/lt-LT.json": () => import("./lt-LT-C9lXLzZA.js"),
"../../Individual/language/lv-LV.json": () => import("./lv-LV-2Q8G1u4p.js"),
"../../Individual/language/nl-NL.json": () => import("./nl-NL-DMdoFepr.js"),
"../../Individual/language/no-NO.json": () => import("./no-NO-CwgewQst.js"),
"../../Individual/language/pl-PL.json": () => import("./pl-PL-D-TVYshE.js"),
"../../Individual/language/pt-BR.json": () => import("./pt-BR-DwHag_mp.js"),
"../../Individual/language/pt-PT.json": () => import("./pt-PT-BVcFY8gr.js"),
"../../Individual/language/ro-RO.json": () => import("./ro-RO-D3Yk1KoW.js"),
"../../Individual/language/sk-SK.json": () => import("./sk-SK-D3UYKttr.js"),
"../../Individual/language/sl-SI.json": () => import("./sl-SI-BkcElOhl.js"),
"../../Individual/language/sv-SE.json": () => import("./sv-SE-DkZ2LyW5.js")
}), `../../Individual/language/${lang}.json`, 5)
}]);
if (!partnershipLe || memberId && !memberLe) return /* @__PURE__ */ jsx(Loader, {});
const country = getLegalEntityCountry(memberLe ?? partnershipLe);
const problems = capabilityProblems && memberId ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, memberId) : void 0;
return /* @__PURE__ */ jsx(IndividualDropin, {
taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL,
taskName: "partnershipMemberDetails",
legalEntityResponse: memberLe,
parentLegalEntity: partnershipLe,
trustMember: member,
problems,
country,
asModal,
hideSidebar,
isTargetLegalEntityType,
onSubmit,
handleBackClick,
handleCloseClick,
handleHomeClick
});
}
//#endregion
export { UnincorporatedPartnershipIndividualPage };