@adyen/kyc-components 3.76.0-beta.2 → 3.77.0-beta.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-BNWEyy3c.js → AcceptTermsOfServiceComponent-ZN14lKHm.js} +36 -40
- package/dist/{AccountSetupRejected-BLa9hHc6.js → AccountSetupRejected-C8eFATP8.js} +2 -2
- package/dist/{Avatar-CVeIdcU1.js → Avatar-C7ZUQNln.js} +1 -1
- package/dist/{BusinessDetailsDropin-Cth6usCx.js → BusinessDetailsDropin-DaSd4474.js} +250 -320
- package/dist/{BusinessFinancingComponent-DMZ7OC-t.js → BusinessFinancingComponent-BnX9toBP.js} +2 -2
- package/dist/{BusinessFinancingDropin-nkm1T_VW.js → BusinessFinancingDropin-rL5tkiMx.js} +150 -180
- package/dist/{BusinessFinancingPage-ClLydo_l.js → BusinessFinancingPage-DEMKJI8q.js} +2 -2
- package/dist/{BusinessTypeSelectionPage-B_EcYfuQ.js → BusinessTypeSelectionPage-CWf0USde.js} +69 -74
- package/dist/{ContractViewer-0Y7eYFZy.js → ContractViewer-5lET2dpq.js} +196 -193
- package/dist/{CreateIndividualComponent-BFWBHGQG.js → CreateIndividualComponent-DS9SUci-.js} +7 -7
- package/dist/{CreateTransferInstrumentComponent-ByplBqO-.js → CreateTransferInstrumentComponent-XK83Kr9-.js} +4 -4
- package/dist/{CustomerSupport-BkPX2SeV.js → CustomerSupport-BtvEBfVW.js} +22 -27
- package/dist/{DebugModal-B7shmfqs.js → DebugModal-ClYkb1No.js} +12 -16
- package/dist/{DecisionMakerDetailsPage-DJd1TUem.js → DecisionMakerDetailsPage-CipLHBc9.js} +3 -3
- package/dist/{DecisionMakers-HXkVxWdD.js → DecisionMakers-CTO7-jJ1.js} +8 -9
- package/dist/{EmbeddedStatus-BsAq2Dd4.js → EmbeddedStatus-BKA1_IeD.js} +3 -3
- package/dist/{FormEndState-0QyaBqNM.js → FormEndState-BE4uFoSx.js} +1 -1
- package/dist/{FormFlow-CWeRv61a.js → FormFlow-DenWDG_K.js} +5 -6
- package/dist/{IndividualOnfidoDropin-6W2KOCkR.js → IndividualOnfidoDropin-DRIwBy4I.js} +523 -708
- package/dist/{Introduction-DqvHiwuD.js → Introduction-NhZoqdGV.js} +9 -9
- package/dist/{LegalRepresentativeDetailsPage-BVGJUm1u.js → LegalRepresentativeDetailsPage-mlm9MnNJ.js} +3 -3
- package/dist/{ManageIndividualComponent-0X0RKWum.js → ManageIndividualComponent-BISFSq5X.js} +7 -11
- package/dist/{ManagePCIComponent-CCB3_Qet.js → ManagePCIComponent-DAVROflU.js} +4 -4
- package/dist/{ManageTermsOfServiceComponent-BkxhuO4D.js → ManageTermsOfServiceComponent-CMHX4Bwf.js} +6 -7
- package/dist/{ManageTransferInstrumentComponent-jNCZd_2L.js → ManageTransferInstrumentComponent-rnB4wvKd.js} +20 -28
- package/dist/{OnboardingDropinComponent-DqxfSr3H.js → OnboardingDropinComponent-CQtsv5YX.js} +186 -229
- package/dist/{ProviderButton-DGf9gX3F.js → ProviderButton-DEPKE1x0.js} +5 -6
- package/dist/{Review-BnAghPZ8.js → Review-BcU7ZWaq.js} +3 -3
- package/dist/{RootBusinessDetailsPage-CfD-XmPL.js → RootBusinessDetailsPage-0RRnHBxI.js} +2 -2
- package/dist/{RootIndividualDetailsPage-CAm-_ZaK.js → RootIndividualDetailsPage-zJ3H2Epr.js} +3 -3
- package/dist/{SignPCIComponent-Cyglzlv4.js → SignPCIComponent-B3wZKA1p.js} +17 -18
- package/dist/{SingpassSelection-7m5Liba0.js → SingpassSelection--tBHK1sT.js} +3 -6
- package/dist/{SoleProprietorshipPage-BWe7BU0x.js → SoleProprietorshipPage-DiqGeuGp.js} +2 -2
- package/dist/{SourceOfFunds.module-pCe7gDF1.js → SourceOfFunds.module-BghcbwX4.js} +1 -1
- package/dist/{SourceOfFundsPage-DfJkV5a_.js → SourceOfFundsPage-D80l-fP6.js} +385 -445
- package/dist/{StoreProvider-B8jb0iWs.js → StoreProvider-BoKfzy1G.js} +2757 -4922
- package/dist/{TaskItemStatus-Bwl3iLYN.js → TaskItemStatus-Cj75jru-.js} +3 -3
- package/dist/{TaxReportingDropin-tAau23lj.js → TaxReportingDropin-C-ENUzND.js} +42 -51
- package/dist/{TileGroup-Dc0OdM7G.js → TileGroup-H7otWCG0.js} +6 -8
- package/dist/{TrustDetailsPage-C1mpQUva.js → TrustDetailsPage-96vwGHCA.js} +61 -74
- package/dist/{TrustMemberCompanyPage-6JBrJvJt.js → TrustMemberCompanyPage-brjPO9mJ.js} +3 -3
- package/dist/{TrustMemberIndividualPage-DaGd7UC-.js → TrustMemberIndividualPage-D4WBuBWx.js} +3 -3
- package/dist/{UnincorporatedPartnershipIndividualPage-oQzwAZ4M.js → UnincorporatedPartnershipIndividualPage-BckT0hbB.js} +3 -3
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-PrQlscN5.js → UnincorporatedPartnershipMemberCompanyPage-BrK0BtKQ.js} +2 -2
- package/dist/{VerificationErrorAlert-CZ_cy-No.js → VerificationErrorAlert-DQM_JZx-.js} +3 -3
- package/dist/{ViewVerificationStatusComponent-DWUd-Ui4.js → ViewVerificationStatusComponent-iHJPpr-0.js} +11 -12
- package/dist/adyen-business-financing.js +2 -2
- package/dist/adyen-individual.js +2 -2
- package/dist/adyen-kyc-components.js +15 -16
- package/dist/adyen-manage-individual.js +2 -2
- package/dist/adyen-manage-pci.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-sign-pci.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/bg-BG-CRw-yV0n.js +13 -0
- package/dist/cs-CZ-CKaXnO0J.js +13 -0
- package/dist/{css-BVvJOiE1.js → css-gtF0cOM0.js} +1 -1
- package/dist/da-DK-yugi-zGr.js +13 -0
- package/dist/de-DE-B3nctkG8.js +13 -0
- package/dist/de-DE-C9D0VHPK.js +13 -0
- package/dist/el-GR-CdgLZhuO.js +13 -0
- package/dist/el-GR-Cfek3dpt.js +13 -0
- package/dist/en-US-DSoLr6rp.js +13 -0
- package/dist/es-ES-BRfK6tX7.js +13 -0
- package/dist/es-ES-Be9ntX5H.js +13 -0
- package/dist/et-EE-CnhmrnD_.js +13 -0
- package/dist/fi-FI-DXCfpnHj.js +13 -0
- package/dist/fr-FR-Dk6Lw2On.js +13 -0
- package/dist/fr-FR-FzCZ5niV.js +13 -0
- package/dist/{getFieldsWithExistingData-C5RMZWIi.js → getFieldsWithExistingData-D5gXk_bx.js} +3 -4
- package/dist/{hasDataChanged-DhXq3Ew0.js → hasDataChanged-CFmj-BD0.js} +3 -3
- package/dist/hr-HR-DIVU0YhD.js +13 -0
- package/dist/hu-HU-BqIaQOvc.js +13 -0
- package/dist/it-IT-D7G4BaP7.js +13 -0
- package/dist/it-IT-_Wa83lsl.js +13 -0
- package/dist/ja-JP-BcbV8ztd.js +13 -0
- package/dist/ja-JP-DTW_hY1L.js +13 -0
- package/dist/{json-CdE7Jopx.js → json-BDrvkduV.js} +1 -1
- package/dist/{style.css → kyc-components.css} +184 -419
- package/dist/{localizeDateString-Dw1cCTYk.js → localizeDateString-C0w49Bpo.js} +5 -5
- package/dist/lt-LT-InjX-Q9A.js +13 -0
- package/dist/lv-LV-CGvjqeg2.js +13 -0
- package/dist/{mapFinancialReportsToFinancialInformation-BQyJvw4d.js → mapFinancialReportsToFinancialInformation-CVzX21IN.js} +19 -12
- package/dist/nl-NL-BuSsBOd9.js +13 -0
- package/dist/nl-NL-CFzm75Jw.js +13 -0
- package/dist/no-NO-1oDvJ_s2.js +13 -0
- package/dist/pl-PL-BlMeifdM.js +13 -0
- package/dist/{plaintext-DNX3H-Ae.js → plaintext--LKKXoHO.js} +1 -1
- package/dist/pt-PT-B74E7Ui9.js +13 -0
- package/dist/pt-PT-DpDxAynk.js +13 -0
- package/dist/{resolveEnvironment-DrwG9kga.js → resolveEnvironment-lBjpoef2.js} +3 -3
- package/dist/ro-RO-CG5G2hM2.js +13 -0
- package/dist/ru-RU-FZb2upqh.js +13 -0
- package/dist/{rules-CiKpqW94.js → rules-CjPpOz28.js} +43 -70
- package/dist/sk-SK-CZZJsLFf.js +13 -0
- package/dist/sl-SI-BzTwh4Mo.js +13 -0
- package/dist/styles-CLV89_hH.js +184 -419
- package/dist/sv-SE-B1gRccAU.js +13 -0
- package/dist/sv-SE-rckxD-43.js +13 -0
- package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +3 -3
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +1 -0
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +0 -3
- package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +1 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +0 -1
- package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +0 -1
- package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +0 -1
- package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +1 -0
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
- package/dist/types/components/Shared/Summary/Summary.d.ts +0 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +5 -3
- package/dist/types/components/Shared/fields/CountryField/CountryField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +5 -3
- package/dist/types/components/Shared/forms/Address/AddressField.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/SearchAddress.d.ts +2 -2
- package/dist/types/components/Shared/forms/Address/types.d.ts +0 -1
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +1 -1
- package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +1 -2
- package/dist/types/components/ui/atoms/Field/Field.d.ts +1 -1
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +3 -0
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +1 -0
- package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
- package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +1 -5
- package/dist/types/context/StateContext/types.d.ts +0 -1
- package/dist/types/core/models/api/financialReport.d.ts +2 -2
- package/dist/types/hooks/useForm/types.d.ts +0 -3
- package/dist/types/utils/api/processCapabilitites.d.ts +2 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/urlUtils.d.ts +1 -0
- package/dist/types/utils/validatorUtils.d.ts +2 -0
- package/dist/{useMultiForm-gmydSRIF.js → useMultiForm-q8mBlCXm.js} +110 -132
- package/dist/{useOnboardingStatus-Cf9Bq2cP.js → useOnboardingStatus-BmSsv7-K.js} +1 -1
- package/dist/{useSalesChannelsSettings-CCO0Tvty.js → useSalesChannelsSettings-oyzwycGJ.js} +1 -1
- package/dist/{useTermsOfServiceStatus-Bu_bk5M7.js → useTermsOfServiceStatus-CUOhC07G.js} +1 -1
- package/dist/{useUpdateLegalEntity-DRCeGSXw.js → useUpdateLegalEntity-Co1v-kls.js} +2 -2
- package/dist/{utils-CENa3cmf.js → utils-CFnfY4R5.js} +18 -11
- package/dist/{validate-B6mUuFzS.js → validate-C28F4IP8.js} +2 -2
- package/dist/{yaml-BkADEL69.js → yaml-OqlmI9qq.js} +1 -1
- package/dist/zh-CN-wUb4MmTZ.js +13 -0
- package/dist/zh-TW-DNTXHLKa.js +13 -0
- package/package.json +11 -13
- package/dist/bg-BG-COTwZXwN.js +0 -2040
- package/dist/cs-CZ-DUlgJKVq.js +0 -2040
- package/dist/da-DK-BDzDHhVR.js +0 -2040
- package/dist/de-DE-B3TpRjZX.js +0 -994
- package/dist/de-DE-DJdgXqS_.js +0 -2040
- package/dist/el-GR-CFEuLvxK.js +0 -994
- package/dist/el-GR-D5i9BNyh.js +0 -2040
- package/dist/en-US-ghR-1_C2.js +0 -994
- package/dist/es-ES-BtWn2FOQ.js +0 -994
- package/dist/es-ES-VOSWszW5.js +0 -2040
- package/dist/et-EE-Bp4Ngsn4.js +0 -2040
- package/dist/fi-FI-DaujOE-a.js +0 -2040
- package/dist/fr-FR-BdPZxk11.js +0 -2040
- package/dist/fr-FR-HvIkGqJf.js +0 -994
- package/dist/hr-HR-BY7C7NxY.js +0 -2040
- package/dist/hu-HU-DHCty-Tc.js +0 -2040
- package/dist/it-IT-BMsuhZEQ.js +0 -2040
- package/dist/it-IT-CjbZahlB.js +0 -994
- package/dist/ja-JP-4jufT0xh.js +0 -994
- package/dist/ja-JP-BYDz1z2G.js +0 -2040
- package/dist/lt-LT-DNJ9V9xV.js +0 -2040
- package/dist/lv-LV-CFJwN5wq.js +0 -2040
- package/dist/nl-NL-B3xjfpMi.js +0 -994
- package/dist/nl-NL-DibAf790.js +0 -2040
- package/dist/no-NO-DHCy5rXx.js +0 -2040
- package/dist/pl-PL-eZBNH5HH.js +0 -2040
- package/dist/pt-PT-BpYDD-PX.js +0 -994
- package/dist/pt-PT-CiN_Wmfe.js +0 -2040
- package/dist/ro-RO-CgyMTvLc.js +0 -2040
- package/dist/ru-RU-BlgIj-Q4.js +0 -994
- package/dist/sk-SK-B5qlQB_U.js +0 -2040
- package/dist/sl-SI-8PPfrGzL.js +0 -2040
- package/dist/sv-SE-7lcf_fB9.js +0 -994
- package/dist/sv-SE-ZWLw6D3j.js +0 -2040
- package/dist/zh-CN-xYZH718R.js +0 -994
- package/dist/zh-TW-DqBBNurv.js +0 -994
package/dist/{AcceptTermsOfServiceComponent-BNWEyy3c.js → AcceptTermsOfServiceComponent-ZN14lKHm.js}
RENAMED
|
@@ -2,19 +2,19 @@
|
|
|
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] = "829dcf45-d717-40fd-975f-aa073b829c6e", e._sentryDebugIdIdentifier = "sentry-dbid-829dcf45-d717-40fd-975f-aa073b829c6e");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
11
|
import { useState, useCallback, useEffect } from "preact/hooks";
|
|
12
|
-
import { p as useApiContext, be as useInvalidateRootLegalEntity, bf as useMutation, bh as httpPost, q as useQuery, w as skipToken, r as httpGet, X as createLogger, b as useI18nContext, $ as useAnalyticsContext, a5 as useToastContext, a6 as useExperimentsContext, au as useForm, B as Alert, Z as Button, a2 as LoaderWrapper, az as Field,
|
|
13
|
-
import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-
|
|
14
|
-
import { C as ContractViewer, O as OutlinedIcon } from "./ContractViewer-
|
|
15
|
-
import { F as FormEndState } from "./FormEndState-
|
|
12
|
+
import { p as useApiContext, be as useInvalidateRootLegalEntity, bf as useMutation, bh as httpPost, q as useQuery, w as skipToken, r as httpGet, X as createLogger, b as useI18nContext, $ as useAnalyticsContext, a5 as useToastContext, a6 as useExperimentsContext, au as useForm, B as Alert, Z as Button, a2 as LoaderWrapper, az as Field, bK as Select, bI as Checkbox, aO as ActionBar, bJ as MaybeModal, b4 as ModalContent, b6 as ModalFooter, bx as StepProgressIndicator, b7 as Spacer, y as LegalEntityType, af as getOwnSignatories, x as doesLegalEntityRequiresLegalRepresentative, v as getLegalRepresentative, am as getLegalEntityNameBasedOnType, aM as FormNavigation, a as useLegalEntity, R as ROOT_LE, L as Loader, W as TaskTypes } from "./StoreProvider-BoKfzy1G.js";
|
|
13
|
+
import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-CUOhC07G.js";
|
|
14
|
+
import { C as ContractViewer, O as OutlinedIcon } from "./ContractViewer-5lET2dpq.js";
|
|
15
|
+
import { F as FormEndState } from "./FormEndState-BE4uFoSx.js";
|
|
16
16
|
import { d as downloadFile } from "./file-CiG1D0zy.js";
|
|
17
|
-
import { l as localizeDateString } from "./localizeDateString-
|
|
17
|
+
import { l as localizeDateString } from "./localizeDateString-C0w49Bpo.js";
|
|
18
18
|
const acceptTermsOfService = async (legalEntityId, baseUrl, termsOfServiceDocumentId, data) => {
|
|
19
19
|
return httpPost(
|
|
20
20
|
{
|
|
@@ -110,8 +110,8 @@ const useServiceAgreement = ({
|
|
|
110
110
|
const { data: acceptedServiceAgreement, isSuccess: isAcceptedServiceAgreementSuccess } = useAcceptedTermsOfService(acceptanceId, "JSON");
|
|
111
111
|
if (isUnAcceptedServiceAgreementSuccess || isAcceptedServiceAgreementSuccess) {
|
|
112
112
|
const termsOfService = unAcceptedServiceAgreement ?? acceptedServiceAgreement;
|
|
113
|
-
const documentId =
|
|
114
|
-
if (
|
|
113
|
+
const documentId = unAcceptedServiceAgreement?.termsOfServiceDocumentId ?? acceptedServiceAgreement?.termsOfServiceAcceptanceReference;
|
|
114
|
+
if (termsOfService?.document && documentId) {
|
|
115
115
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(termsOfService.document))));
|
|
116
116
|
return {
|
|
117
117
|
loading: "success",
|
|
@@ -171,7 +171,6 @@ function ServiceAgreementDropin({
|
|
|
171
171
|
asModal = false,
|
|
172
172
|
handleCloseClick
|
|
173
173
|
}) {
|
|
174
|
-
var _a, _b;
|
|
175
174
|
const { i18n } = useI18nContext();
|
|
176
175
|
const userEvents = useAnalyticsContext();
|
|
177
176
|
const { showToast } = useToastContext();
|
|
@@ -197,15 +196,15 @@ function ServiceAgreementDropin({
|
|
|
197
196
|
const [activeFormIndex, setActiveFormIndex] = useState(0);
|
|
198
197
|
const [activeForm, setActiveForm] = useState(forms[activeFormIndex]);
|
|
199
198
|
const [hasFinished, setHasFinished] = useState(false);
|
|
200
|
-
const canSign =
|
|
199
|
+
const canSign = serviceAgreementTypes?.includes(activeForm?.serviceAgreementType) && !activeForm?.acceptanceId;
|
|
201
200
|
const isLastStep = activeFormIndex === forms.length - 1;
|
|
202
|
-
const showSignedAlert = !!
|
|
201
|
+
const showSignedAlert = !!activeForm?.acceptanceId;
|
|
203
202
|
const translationKeys = {
|
|
204
203
|
home: "goToOverview",
|
|
205
204
|
next: canSign ? "sign" : "continue"
|
|
206
205
|
};
|
|
207
206
|
const { refetch: downloadAcceptedTermsAsPdf } = useAcceptedTermsOfService(
|
|
208
|
-
activeForm
|
|
207
|
+
activeForm?.acceptanceId,
|
|
209
208
|
"PDF",
|
|
210
209
|
{
|
|
211
210
|
enabled: false
|
|
@@ -219,8 +218,8 @@ function ServiceAgreementDropin({
|
|
|
219
218
|
}, [i18n, showToast]);
|
|
220
219
|
const { loading: contractLoadingStatus, serviceAgreement } = useServiceAgreement({
|
|
221
220
|
handleServiceAgreementIsNotAvailableInThatLanguage,
|
|
222
|
-
acceptanceId: activeForm
|
|
223
|
-
serviceAgreementType: activeForm
|
|
221
|
+
acceptanceId: activeForm?.acceptanceId,
|
|
222
|
+
serviceAgreementType: activeForm?.serviceAgreementType,
|
|
224
223
|
language: i18n.languageCode
|
|
225
224
|
});
|
|
226
225
|
const { handleChangeFor, triggerValidation, data, valid, isValid, errors } = useForm({
|
|
@@ -228,7 +227,6 @@ function ServiceAgreementDropin({
|
|
|
228
227
|
rules: serviceAgreementValidationRules
|
|
229
228
|
});
|
|
230
229
|
const getSigners = () => {
|
|
231
|
-
var _a2, _b2;
|
|
232
230
|
if (legalEntityResponse.type === LegalEntityType.ORGANIZATION) {
|
|
233
231
|
return getOwnSignatories(legalEntityResponse).map(({ legalEntityId: id, name }) => ({
|
|
234
232
|
id: id ?? "",
|
|
@@ -241,8 +239,8 @@ function ServiceAgreementDropin({
|
|
|
241
239
|
}
|
|
242
240
|
return [
|
|
243
241
|
{
|
|
244
|
-
id: legalEntityResponse
|
|
245
|
-
name: `${
|
|
242
|
+
id: legalEntityResponse?.id,
|
|
243
|
+
name: `${legalEntityResponse?.individual?.name.firstName} ${legalEntityResponse?.individual?.name.lastName}`
|
|
246
244
|
}
|
|
247
245
|
];
|
|
248
246
|
};
|
|
@@ -270,8 +268,8 @@ function ServiceAgreementDropin({
|
|
|
270
268
|
showToast({ label: i18n.get("serviceAgreementSignFailed"), variant: "error" });
|
|
271
269
|
userEvents.addTaskEvent("Encountered error", {
|
|
272
270
|
...baseTracking,
|
|
273
|
-
returnType:
|
|
274
|
-
returnValue:
|
|
271
|
+
returnType: e?.errorCode || "backend",
|
|
272
|
+
returnValue: e?.title ?? e?.message
|
|
275
273
|
});
|
|
276
274
|
}
|
|
277
275
|
} else {
|
|
@@ -307,7 +305,7 @@ function ServiceAgreementDropin({
|
|
|
307
305
|
gotoForm(initialFormIndex);
|
|
308
306
|
}, []);
|
|
309
307
|
useEffect(() => {
|
|
310
|
-
userEvents.updateSharedEventProperties({ page: activeForm
|
|
308
|
+
userEvents.updateSharedEventProperties({ page: activeForm?.formName });
|
|
311
309
|
}, [activeForm]);
|
|
312
310
|
const gotoForm = (index) => {
|
|
313
311
|
setActiveForm(forms[index]);
|
|
@@ -315,7 +313,7 @@ function ServiceAgreementDropin({
|
|
|
315
313
|
};
|
|
316
314
|
const onDownloadAcceptedTermsOfServiceDocument = async () => {
|
|
317
315
|
const { isError, isSuccess, data: data2 } = await downloadAcceptedTermsAsPdf();
|
|
318
|
-
if (isSuccess &&
|
|
316
|
+
if (isSuccess && data2?.document) {
|
|
319
317
|
await downloadFile(data2.document, `${i18n.get(activeForm.formName)}.pdf`);
|
|
320
318
|
}
|
|
321
319
|
if (isError) {
|
|
@@ -332,7 +330,7 @@ function ServiceAgreementDropin({
|
|
|
332
330
|
language: languageCode,
|
|
333
331
|
termsOfServiceDocumentFormat: "PDF"
|
|
334
332
|
});
|
|
335
|
-
if (!
|
|
333
|
+
if (!response?.document) {
|
|
336
334
|
throw new Error(`No terms Of service document found in response`);
|
|
337
335
|
}
|
|
338
336
|
await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
|
|
@@ -361,13 +359,12 @@ function ServiceAgreementDropin({
|
|
|
361
359
|
}
|
|
362
360
|
);
|
|
363
361
|
const getSignedName = (acceptanceId) => {
|
|
364
|
-
var _a2;
|
|
365
362
|
if (!acceptanceId) return "";
|
|
366
363
|
const signatory = serviceAgreementAcceptanceInfos.find(({ id }) => id === acceptanceId);
|
|
367
|
-
const legalEntitySignatory =
|
|
368
|
-
({ legalEntityId }) => legalEntityId ===
|
|
364
|
+
const legalEntitySignatory = legalEntityResponse.entityAssociations?.find(
|
|
365
|
+
({ legalEntityId }) => legalEntityId === signatory?.acceptedBy
|
|
369
366
|
);
|
|
370
|
-
return
|
|
367
|
+
return legalEntitySignatory?.name ?? getLegalEntityNameBasedOnType(legalEntityResponse);
|
|
371
368
|
};
|
|
372
369
|
const signedAlert = showSignedAlert && /* @__PURE__ */ jsx(
|
|
373
370
|
Alert,
|
|
@@ -431,7 +428,7 @@ function ServiceAgreementDropin({
|
|
|
431
428
|
Button,
|
|
432
429
|
{
|
|
433
430
|
variant: "secondary",
|
|
434
|
-
onClick:
|
|
431
|
+
onClick: activeForm?.acceptanceId ? onDownloadAcceptedTermsOfServiceDocument : onDownloadUnacceptedTermsOfServiceDocument,
|
|
435
432
|
icon: "download",
|
|
436
433
|
children: i18n.get("downloadAsPdf")
|
|
437
434
|
}
|
|
@@ -447,10 +444,10 @@ function ServiceAgreementDropin({
|
|
|
447
444
|
{
|
|
448
445
|
name: "signer",
|
|
449
446
|
label: i18n.get("signer"),
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
errorMessage: (_a = errors.signer) == null ? void 0 : _a.errorMessage,
|
|
447
|
+
className: "adyen-kyc-u-margin-top-32 adyen-kyc-u-width-half",
|
|
448
|
+
errorMessage: errors.signer?.errorMessage,
|
|
453
449
|
isValid: valid.signer,
|
|
450
|
+
dataTestId: "signer",
|
|
454
451
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
455
452
|
Select,
|
|
456
453
|
{
|
|
@@ -471,7 +468,7 @@ function ServiceAgreementDropin({
|
|
|
471
468
|
el: "fieldset",
|
|
472
469
|
name: "acceptServiceAgreement",
|
|
473
470
|
className: "adyen-kyc-u-margin-top-16",
|
|
474
|
-
errorMessage:
|
|
471
|
+
errorMessage: errors.acceptServiceAgreement?.errorMessage,
|
|
475
472
|
isValid: valid.acceptServiceAgreement,
|
|
476
473
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
477
474
|
Checkbox,
|
|
@@ -572,13 +569,12 @@ function AcceptTermsOfServiceComponent({
|
|
|
572
569
|
const { mutateAsync: acceptTermsOfService2 } = useAcceptTermsOfService();
|
|
573
570
|
const handleOnClose = () => {
|
|
574
571
|
if (modalView) {
|
|
575
|
-
onUnmount
|
|
572
|
+
onUnmount?.();
|
|
576
573
|
}
|
|
577
|
-
onClose
|
|
574
|
+
onClose?.();
|
|
578
575
|
};
|
|
579
576
|
const handleSign = useCallback(
|
|
580
577
|
async (legalEntityId2, termsOfServiceDocumentId, signedBy) => {
|
|
581
|
-
var _a;
|
|
582
578
|
const acceptedTermsOfService = await acceptTermsOfService2({
|
|
583
579
|
acceptedBy: signedBy.acceptedBy,
|
|
584
580
|
legalEntityReference: legalEntityId2,
|
|
@@ -593,25 +589,25 @@ function AcceptTermsOfServiceComponent({
|
|
|
593
589
|
};
|
|
594
590
|
const { acceptedTermsOfServices } = stepsData;
|
|
595
591
|
acceptedTermsOfServices.push(paramAllowList);
|
|
596
|
-
const unAcceptedTos =
|
|
592
|
+
const unAcceptedTos = serviceAgreementStatus?.termsOfServiceTypes?.filter(
|
|
597
593
|
(tosType) => tosType !== acceptedTermsOfService.type
|
|
598
|
-
)
|
|
594
|
+
) ?? [];
|
|
599
595
|
const newStepsData = {
|
|
600
596
|
unAcceptedTermsOfServiceTypes: unAcceptedTos,
|
|
601
597
|
acceptedTermsOfServices
|
|
602
598
|
};
|
|
603
599
|
setStepsData(newStepsData);
|
|
604
|
-
onAccept
|
|
600
|
+
onAccept?.(newStepsData);
|
|
605
601
|
},
|
|
606
|
-
[onAccept, stepsData, acceptTermsOfService2, serviceAgreementStatus
|
|
602
|
+
[onAccept, stepsData, acceptTermsOfService2, serviceAgreementStatus?.termsOfServiceTypes]
|
|
607
603
|
);
|
|
608
604
|
return isStatusLoading || isAcceptanceInfoLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
|
|
609
605
|
ServiceAgreementDropin,
|
|
610
606
|
{
|
|
611
607
|
taskType: TaskTypes.SERVICE_AGREEMENT,
|
|
612
608
|
legalEntityResponse: legalEntity,
|
|
613
|
-
serviceAgreementTypes:
|
|
614
|
-
serviceAgreementAcceptanceInfos:
|
|
609
|
+
serviceAgreementTypes: serviceAgreementStatus?.termsOfServiceTypes ?? [],
|
|
610
|
+
serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfos?.data ?? [],
|
|
615
611
|
handleHomeClick: handleOnClose,
|
|
616
612
|
handleSign,
|
|
617
613
|
asEmbedded,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
11
|
-
import { b as useI18nContext, A as AlertIcon, F as FormHeader } from "./StoreProvider-
|
|
12
|
-
import { D as DropinLayout } from "./OnboardingDropinComponent-
|
|
11
|
+
import { b as useI18nContext, A as AlertIcon, F as FormHeader } from "./StoreProvider-BoKfzy1G.js";
|
|
12
|
+
import { D as DropinLayout } from "./OnboardingDropinComponent-CQtsv5YX.js";
|
|
13
13
|
function AccountSetupRejected() {
|
|
14
14
|
const { i18n } = useI18nContext();
|
|
15
15
|
const content = /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
;
|
|
10
10
|
import { jsx } from "preact/jsx-runtime";
|
|
11
11
|
import cx from "classnames";
|
|
12
|
-
import { a3 as Icon } from "./StoreProvider-
|
|
12
|
+
import { a3 as Icon } from "./StoreProvider-BoKfzy1G.js";
|
|
13
13
|
const avatar = "adyen-kyc-avatar";
|
|
14
14
|
const avatarLabel = "adyen-kyc-avatar-label";
|
|
15
15
|
const avatarPrimary = "adyen-kyc-avatar-primary";
|