@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.
110 lines (109 loc) • 6.87 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] = "5652e7fb-ce77-41da-ad16-ad7febdfc27b", e._sentryDebugIdIdentifier = "sentry-dbid-5652e7fb-ce77-41da-ad16-ad7febdfc27b");
} 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/Trust/pages/TrustMemberIndividualPage.tsx
function TrustMemberIndividualPage({ trustId, memberId: memberIdProp, newMember, 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: trustLe } = useLegalEntity(trustId ?? 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)
}, {
ns: "trust",
importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
"../language/bg-BG.json": () => import("./bg-BG-qQc6pN4K.js"),
"../language/cs-CZ.json": () => import("./cs-CZ-Jsmhr_B3.js"),
"../language/da-DK.json": () => import("./da-DK-CXZXQspY.js"),
"../language/de-DE.json": () => import("./de-DE-BRJ0jBty.js"),
"../language/el-GR.json": () => import("./el-GR-BMGYrO4V.js"),
"../language/en-US.json": () => import("./en-US-CWDI7JKT.js"),
"../language/es-ES.json": () => import("./es-ES-pt4yy_U2.js"),
"../language/es-LA.json": () => import("./es-LA-DU9jNyAv.js"),
"../language/et-EE.json": () => import("./et-EE-dDMeDiTJ.js"),
"../language/fi-FI.json": () => import("./fi-FI-iRb7nS7X.js"),
"../language/fr-FR.json": () => import("./fr-FR-DUrcyeOg.js"),
"../language/hr-HR.json": () => import("./hr-HR-LnDb18bf.js"),
"../language/hu-HU.json": () => import("./hu-HU-Cc7wqn6A.js"),
"../language/it-IT.json": () => import("./it-IT-BPA_Upt_.js"),
"../language/ja-JP.json": () => import("./ja-JP-CYb1SAoz.js"),
"../language/lt-LT.json": () => import("./lt-LT-B9Nm7OZQ.js"),
"../language/lv-LV.json": () => import("./lv-LV-DkjsE74u.js"),
"../language/nl-NL.json": () => import("./nl-NL-BtdPxlFm.js"),
"../language/no-NO.json": () => import("./no-NO-BIhMgC99.js"),
"../language/pl-PL.json": () => import("./pl-PL-BT6NmGgO.js"),
"../language/pt-BR.json": () => import("./pt-BR-B0SUw4uu.js"),
"../language/pt-PT.json": () => import("./pt-PT-KikTTc5A.js"),
"../language/ro-RO.json": () => import("./ro-RO-DajmyI4j.js"),
"../language/sk-SK.json": () => import("./sk-SK-DJWcs0qJ.js"),
"../language/sl-SI.json": () => import("./sl-SI-C_QeUL6t.js"),
"../language/sv-SE.json": () => import("./sv-SE-D3MOTV-T.js")
}), `../language/${lang}.json`, 3)
}]);
if (!trustLe || memberId && !memberLe) return /* @__PURE__ */ jsx(Loader, {});
const country = getLegalEntityCountry(memberLe ?? trustLe);
const problems = capabilityProblems && memberId ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, memberId) : void 0;
return /* @__PURE__ */ jsx(IndividualDropin, {
taskType: TaskTypes.TRUST_MEMBER_INDIVIDUAL,
taskName: "trustMemberDetails",
legalEntityResponse: memberLe,
parentLegalEntity: trustLe,
trustMember: newMember,
problems,
country,
asModal,
hideSidebar,
isTargetLegalEntityType,
onSubmit,
handleBackClick,
handleCloseClick,
handleHomeClick
});
}
//#endregion
export { TrustMemberIndividualPage };