UNPKG

@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.

108 lines (107 loc) 6.75 kB
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] = "8dcc7a34-d097-4091-956d-94ae8e195278", e._sentryDebugIdIdentifier = "sentry-dbid-8dcc7a34-d097-4091-956d-94ae8e195278"); } catch (e) {} import { n as addResourceBundles, r as useTranslation } from "./translation-BFxyJ1c5.js"; import { r as Loader } from "./Button-oj6H8OrC.js"; import { r as useLegalEntity } from "./useLegalEntity-yxi9XhLi.js"; import { t as getLegalEntityCountry } from "./getLegalEntityCountry-C6bSV6sB.js"; import { s as noop } from "./useAnalyticsContext-BVFDMrVE.js"; import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-rq_tsyLP.js"; import { C as EntityTypes } from "./processCapabilities-DlZY9-Jc.js"; import { p as TaskTypes } from "./entityAssociationUtil-BEzUdPbm.js"; import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-BLcIg3x_.js"; import { t as IndividualDropin } from "./IndividualDropin-D1n1fwWm.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-BlOJQ7iZ.js"), "../../Individual/language/cs-CZ.json": () => import("./cs-CZ-CtEcakjz.js"), "../../Individual/language/da-DK.json": () => import("./da-DK-Cp1cdZTG.js"), "../../Individual/language/de-DE.json": () => import("./de-DE-ZWLyKP5G.js"), "../../Individual/language/el-GR.json": () => import("./el-GR-DSmTVw3A.js"), "../../Individual/language/en-US.instructions.json": () => import("./en-US.instructions-HI_HXwIA.js"), "../../Individual/language/en-US.json": () => import("./en-US-5p2iDJhN.js"), "../../Individual/language/es-ES.json": () => import("./es-ES-CKWpTQva.js"), "../../Individual/language/et-EE.json": () => import("./et-EE-BeU-JlIv.js"), "../../Individual/language/fi-FI.json": () => import("./fi-FI-DKJi4py_.js"), "../../Individual/language/fr-FR.json": () => import("./fr-FR-JIF28b7U.js"), "../../Individual/language/hr-HR.json": () => import("./hr-HR-C4LLZhRc.js"), "../../Individual/language/hu-HU.json": () => import("./hu-HU-1NJpWkUj.js"), "../../Individual/language/it-IT.json": () => import("./it-IT-C4b9Y6tP.js"), "../../Individual/language/ja-JP.json": () => import("./ja-JP-BFkGV7Ct.js"), "../../Individual/language/lt-LT.json": () => import("./lt-LT-Cq2T_YgH.js"), "../../Individual/language/lv-LV.json": () => import("./lv-LV-DcclJdry.js"), "../../Individual/language/nl-NL.json": () => import("./nl-NL-DWgJVfgU.js"), "../../Individual/language/no-NO.json": () => import("./no-NO-BCZzdSpR.js"), "../../Individual/language/pl-PL.json": () => import("./pl-PL-D3efS6b_.js"), "../../Individual/language/pt-BR.json": () => import("./pt-BR-OCQiqikl.js"), "../../Individual/language/pt-PT.json": () => import("./pt-PT-BHbd93Ic.js"), "../../Individual/language/ro-RO.json": () => import("./ro-RO-CVzi0I9_.js"), "../../Individual/language/sk-SK.json": () => import("./sk-SK-woMNza6o.js"), "../../Individual/language/sl-SI.json": () => import("./sl-SI-Czu6HrQs.js"), "../../Individual/language/sv-SE.json": () => import("./sv-SE-BIe7wyHM.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-Doq5SqNZ.js"), "../language/cs-CZ.json": () => import("./cs-CZ-CNCOzk0z.js"), "../language/da-DK.json": () => import("./da-DK-Dq9DBbxy.js"), "../language/de-DE.json": () => import("./de-DE-BnAkTJpS.js"), "../language/el-GR.json": () => import("./el-GR-WE5RvoaZ.js"), "../language/en-US.json": () => import("./en-US-Y8C6Dmuq.js"), "../language/es-ES.json": () => import("./es-ES-DyrLbt2G.js"), "../language/et-EE.json": () => import("./et-EE-CjKIw3AU.js"), "../language/fi-FI.json": () => import("./fi-FI-YpLcMuZy.js"), "../language/fr-FR.json": () => import("./fr-FR-CWBeJe7e.js"), "../language/hr-HR.json": () => import("./hr-HR-B0eeXkQr.js"), "../language/hu-HU.json": () => import("./hu-HU-DmlhDBmZ.js"), "../language/it-IT.json": () => import("./it-IT-C3AVk1uR.js"), "../language/ja-JP.json": () => import("./ja-JP-ogtt9tGy.js"), "../language/lt-LT.json": () => import("./lt-LT-948HQZhZ.js"), "../language/lv-LV.json": () => import("./lv-LV-CrfpEaoB.js"), "../language/nl-NL.json": () => import("./nl-NL-CQYif340.js"), "../language/no-NO.json": () => import("./no-NO-DKzoUIzk.js"), "../language/pl-PL.json": () => import("./pl-PL-CWLfHfaM.js"), "../language/pt-BR.json": () => import("./pt-BR-BWN_WzRl.js"), "../language/pt-PT.json": () => import("./pt-PT-wBADnHVq.js"), "../language/ro-RO.json": () => import("./ro-RO-C2tZmDar.js"), "../language/sk-SK.json": () => import("./sk-SK-BsanrSCF.js"), "../language/sl-SI.json": () => import("./sl-SI-BsiDU3hz.js"), "../language/sv-SE.json": () => import("./sv-SE-DDCAUQsX.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 };