@adyen/kyc-components 3.76.3 → 3.77.0-beta.1
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-C3V731bH.js → AcceptTermsOfServiceComponent-WTEKgPVt.js} +36 -40
- package/dist/{AccountSetupRejected-bq2hrmu-.js → AccountSetupRejected-CIQuxXLY.js} +2 -2
- package/dist/{Avatar-3MOygTP9.js → Avatar-BJYDv1Ar.js} +1 -1
- package/dist/{BusinessDetailsDropin-Duc71mfS.js → BusinessDetailsDropin-ChnYNgo4.js} +250 -320
- package/dist/{BusinessFinancingComponent-u7ltaVK0.js → BusinessFinancingComponent-BBEZAdO9.js} +2 -2
- package/dist/{BusinessFinancingDropin-DLE7ETbI.js → BusinessFinancingDropin-Bcn9KS7_.js} +150 -180
- package/dist/{BusinessFinancingPage-CEEi6PcZ.js → BusinessFinancingPage-BRNwYKmT.js} +2 -2
- package/dist/{BusinessTypeSelectionPage-Dybj65v6.js → BusinessTypeSelectionPage-DUEUCWHY.js} +69 -74
- package/dist/{ContractViewer-0kEQu6By.js → ContractViewer-708cVL6N.js} +196 -193
- package/dist/{CreateIndividualComponent-VcuAGdji.js → CreateIndividualComponent-DXfJBqsm.js} +6 -6
- package/dist/{CreateTransferInstrumentComponent-CxPOcJBD.js → CreateTransferInstrumentComponent-DPXiWljQ.js} +3 -3
- package/dist/{CustomerSupport-BPtW9sKz.js → CustomerSupport-IzHhC65g.js} +21 -26
- package/dist/{DebugModal-D9VvfCmh.js → DebugModal-zCCEKOHn.js} +12 -16
- package/dist/{DecisionMakerDetailsPage-ta8WkonF.js → DecisionMakerDetailsPage-ALg9mmxg.js} +2 -2
- package/dist/{DecisionMakers-CEqr6LLo.js → DecisionMakers-BzNXJkx5.js} +7 -8
- package/dist/{EmbeddedStatus-BfXFWtd9.js → EmbeddedStatus-C7ZbvJrU.js} +3 -3
- package/dist/{FormEndState-D2y3OosF.js → FormEndState-D2RzLrIv.js} +1 -1
- package/dist/{FormFlow-6wFVsBGd.js → FormFlow-j2CwOJWy.js} +4 -5
- package/dist/{IndividualOnfidoDropin-CvnIM45k.js → IndividualOnfidoDropin-CvL-Yr9h.js} +507 -645
- package/dist/{Introduction-B6hmb9fK.js → Introduction-BDlHh7ew.js} +8 -8
- package/dist/{LegalRepresentativeDetailsPage-DAwqaNEX.js → LegalRepresentativeDetailsPage-DqAUihve.js} +2 -2
- package/dist/{ManageIndividualComponent-er0MIZpS.js → ManageIndividualComponent-DIk2wvlz.js} +7 -11
- package/dist/{ManagePCIComponent-CLJJBaY5.js → ManagePCIComponent-BdlzsQqO.js} +4 -4
- package/dist/{ManageTermsOfServiceComponent-BfdCTOFq.js → ManageTermsOfServiceComponent-DB1-Vo35.js} +6 -7
- package/dist/{ManageTransferInstrumentComponent-BMkbrc6J.js → ManageTransferInstrumentComponent-DfX55cuK.js} +20 -28
- package/dist/{OnboardingDropinComponent-B3Ceo9Sa.js → OnboardingDropinComponent-Cn5iAzbv.js} +186 -229
- package/dist/{ProviderButton-NLK2FsiD.js → ProviderButton-BaLypVYo.js} +4 -5
- package/dist/{Review-B5FCv7_t.js → Review-CAq_2I-E.js} +2 -2
- package/dist/{RootBusinessDetailsPage-CoggSPSA.js → RootBusinessDetailsPage-DX-H6CIy.js} +2 -2
- package/dist/{RootIndividualDetailsPage-CgGnWbJR.js → RootIndividualDetailsPage-RUBw-42Q.js} +2 -2
- package/dist/{SignPCIComponent-DeENkCtR.js → SignPCIComponent-Df4oTQuO.js} +17 -18
- package/dist/{SingpassSelection-CQQT-6iD.js → SingpassSelection-BUlxELfI.js} +2 -5
- package/dist/{SoleProprietorshipPage-DhSqcpgd.js → SoleProprietorshipPage-CQI2uVbx.js} +2 -2
- package/dist/{SourceOfFunds.module-B6lRIY7Z.js → SourceOfFunds.module-Cr-fely_.js} +1 -1
- package/dist/{SourceOfFundsPage-SqCQc3gy.js → SourceOfFundsPage-DeYS7i29.js} +385 -445
- package/dist/{StoreProvider-BafgY4AM.js → StoreProvider-BrRdDvRD.js} +2497 -4744
- package/dist/{TaskItemStatus-v2hXtLeo.js → TaskItemStatus-CRW18YEt.js} +2 -2
- package/dist/{TaxReportingDropin-BzEIhO7h.js → TaxReportingDropin-R2aKA5m9.js} +41 -50
- package/dist/{TileGroup-BmC0xth5.js → TileGroup-CvpNkrLc.js} +6 -8
- package/dist/{TrustDetailsPage-Bn8coejp.js → TrustDetailsPage-BAzpVvls.js} +61 -74
- package/dist/{TrustMemberCompanyPage-N9eM6EqA.js → TrustMemberCompanyPage-B0JnaXwV.js} +3 -3
- package/dist/{TrustMemberIndividualPage-C60R5Udv.js → TrustMemberIndividualPage-B9rePqeT.js} +2 -2
- package/dist/{UnincorporatedPartnershipIndividualPage-C2KRE-W0.js → UnincorporatedPartnershipIndividualPage-C4qYdZSl.js} +2 -2
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-HY2UrO0m.js → UnincorporatedPartnershipMemberCompanyPage-Bc9xGrsF.js} +2 -2
- package/dist/{VerificationErrorAlert-CFt6JZfO.js → VerificationErrorAlert-Bg4vL7pT.js} +3 -3
- package/dist/{ViewVerificationStatusComponent-BsXPn8nw.js → ViewVerificationStatusComponent-DWSR9LEo.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-CuH1HCst.js → css-CLuJIElL.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-D48pjTVK.js → getFieldsWithExistingData-CBicZjFs.js} +2 -3
- package/dist/{hasDataChanged-PSMjYHG9.js → hasDataChanged-CXJVCR6e.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-B0_kBnis.js → json-BjWB0qFp.js} +1 -1
- package/dist/{style.css → kyc-components.css} +184 -419
- package/dist/{localizeDateString-DJUsfABW.js → localizeDateString-CbNoUJA8.js} +5 -5
- package/dist/lt-LT-InjX-Q9A.js +13 -0
- package/dist/lv-LV-CGvjqeg2.js +13 -0
- package/dist/{mapFinancialReportsToFinancialInformation-B37D6HIb.js → mapFinancialReportsToFinancialInformation-BSw47oTR.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-Bl3bwitY.js → plaintext-gixHsy-4.js} +1 -1
- package/dist/pt-PT-B74E7Ui9.js +13 -0
- package/dist/pt-PT-DpDxAynk.js +13 -0
- package/dist/{resolveEnvironment-BC0a9aZH.js → resolveEnvironment-Db6sOTRm.js} +3 -3
- package/dist/ro-RO-CG5G2hM2.js +13 -0
- package/dist/ru-RU-FZb2upqh.js +13 -0
- package/dist/{rules-BS4PHjQj.js → rules-C58gMIhU.js} +42 -69
- 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/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/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-dm89puU3.js → useMultiForm-BVNodhuF.js} +109 -131
- package/dist/{useOnboardingStatus-D5_rf7Nj.js → useOnboardingStatus-D1StsMfq.js} +1 -1
- package/dist/{useSalesChannelsSettings-gdc_FFjP.js → useSalesChannelsSettings-CLdEt82t.js} +1 -1
- package/dist/{useTermsOfServiceStatus-B-3LfVZN.js → useTermsOfServiceStatus-BoGp8Uwf.js} +1 -1
- package/dist/{useUpdateLegalEntity-EqURNCSS.js → useUpdateLegalEntity-Dq1_zjoK.js} +1 -1
- package/dist/{utils-BsikY8kY.js → utils-DL82tc-K.js} +18 -11
- package/dist/{validate-BVwcth48.js → validate-oBon75jd.js} +1 -1
- package/dist/{yaml--rja7woq.js → yaml-BcbMORik.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-C3V731bH.js → AcceptTermsOfServiceComponent-WTEKgPVt.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] = "c692c9a6-1c60-4fad-aaf3-6daee1cdff58", e._sentryDebugIdIdentifier = "sentry-dbid-c692c9a6-1c60-4fad-aaf3-6daee1cdff58");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
11
|
import { useState, useEffect, useCallback } 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, 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,
|
|
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-BrRdDvRD.js";
|
|
13
|
+
import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-BoGp8Uwf.js";
|
|
14
|
+
import { C as ContractViewer, O as OutlinedIcon } from "./ContractViewer-708cVL6N.js";
|
|
15
|
+
import { F as FormEndState } from "./FormEndState-D2RzLrIv.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-CbNoUJA8.js";
|
|
18
18
|
const acceptTermsOfService = async (legalEntityId, baseUrl, termsOfServiceDocumentId, data) => {
|
|
19
19
|
return httpPost(
|
|
20
20
|
{
|
|
@@ -114,8 +114,8 @@ const useServiceAgreement = ({
|
|
|
114
114
|
const { data: acceptedServiceAgreement, isSuccess: isAcceptedServiceAgreementSuccess } = useAcceptedTermsOfService(acceptanceId, "JSON");
|
|
115
115
|
if (isUnAcceptedServiceAgreementSuccess || isAcceptedServiceAgreementSuccess) {
|
|
116
116
|
const termsOfService = unAcceptedServiceAgreement ?? acceptedServiceAgreement;
|
|
117
|
-
const documentId =
|
|
118
|
-
if (
|
|
117
|
+
const documentId = unAcceptedServiceAgreement?.termsOfServiceDocumentId ?? acceptedServiceAgreement?.termsOfServiceAcceptanceReference;
|
|
118
|
+
if (termsOfService?.document && documentId) {
|
|
119
119
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(termsOfService.document))));
|
|
120
120
|
return {
|
|
121
121
|
loading: "success",
|
|
@@ -175,7 +175,6 @@ function ServiceAgreementDropin({
|
|
|
175
175
|
asModal = false,
|
|
176
176
|
handleCloseClick
|
|
177
177
|
}) {
|
|
178
|
-
var _a, _b;
|
|
179
178
|
const { i18n } = useI18nContext();
|
|
180
179
|
const userEvents = useAnalyticsContext();
|
|
181
180
|
const { showToast } = useToastContext();
|
|
@@ -201,15 +200,15 @@ function ServiceAgreementDropin({
|
|
|
201
200
|
const [activeFormIndex, setActiveFormIndex] = useState(0);
|
|
202
201
|
const [activeForm, setActiveForm] = useState(forms[activeFormIndex]);
|
|
203
202
|
const [hasFinished, setHasFinished] = useState(false);
|
|
204
|
-
const canSign =
|
|
203
|
+
const canSign = serviceAgreementTypes?.includes(activeForm?.serviceAgreementType) && !activeForm?.acceptanceId;
|
|
205
204
|
const isLastStep = activeFormIndex === forms.length - 1;
|
|
206
|
-
const showSignedAlert = !!
|
|
205
|
+
const showSignedAlert = !!activeForm?.acceptanceId;
|
|
207
206
|
const translationKeys = {
|
|
208
207
|
home: "goToOverview",
|
|
209
208
|
next: canSign ? "sign" : "continue"
|
|
210
209
|
};
|
|
211
210
|
const { refetch: downloadAcceptedTermsAsPdf } = useAcceptedTermsOfService(
|
|
212
|
-
activeForm
|
|
211
|
+
activeForm?.acceptanceId,
|
|
213
212
|
"PDF",
|
|
214
213
|
{
|
|
215
214
|
enabled: false
|
|
@@ -223,8 +222,8 @@ function ServiceAgreementDropin({
|
|
|
223
222
|
}, [i18n, showToast]);
|
|
224
223
|
const { loading: contractLoadingStatus, serviceAgreement } = useServiceAgreement({
|
|
225
224
|
handleServiceAgreementIsNotAvailableInThatLanguage,
|
|
226
|
-
acceptanceId: activeForm
|
|
227
|
-
serviceAgreementType: activeForm
|
|
225
|
+
acceptanceId: activeForm?.acceptanceId,
|
|
226
|
+
serviceAgreementType: activeForm?.serviceAgreementType,
|
|
228
227
|
language: i18n.languageCode
|
|
229
228
|
});
|
|
230
229
|
const { handleChangeFor, triggerValidation, data, valid, isValid, errors } = useForm({
|
|
@@ -232,7 +231,6 @@ function ServiceAgreementDropin({
|
|
|
232
231
|
rules: serviceAgreementValidationRules
|
|
233
232
|
});
|
|
234
233
|
const getSigners = () => {
|
|
235
|
-
var _a2, _b2;
|
|
236
234
|
if (legalEntityResponse.type === LegalEntityType.ORGANIZATION) {
|
|
237
235
|
return getOwnSignatories(legalEntityResponse).map(({ legalEntityId: id, name }) => ({
|
|
238
236
|
id: id ?? "",
|
|
@@ -245,8 +243,8 @@ function ServiceAgreementDropin({
|
|
|
245
243
|
}
|
|
246
244
|
return [
|
|
247
245
|
{
|
|
248
|
-
id: legalEntityResponse
|
|
249
|
-
name: `${
|
|
246
|
+
id: legalEntityResponse?.id,
|
|
247
|
+
name: `${legalEntityResponse?.individual?.name.firstName} ${legalEntityResponse?.individual?.name.lastName}`
|
|
250
248
|
}
|
|
251
249
|
];
|
|
252
250
|
};
|
|
@@ -274,8 +272,8 @@ function ServiceAgreementDropin({
|
|
|
274
272
|
showToast({ label: i18n.get("serviceAgreementSignFailed"), variant: "error" });
|
|
275
273
|
userEvents.addTaskEvent("Encountered error", {
|
|
276
274
|
...baseTracking,
|
|
277
|
-
returnType:
|
|
278
|
-
returnValue:
|
|
275
|
+
returnType: e?.errorCode || "backend",
|
|
276
|
+
returnValue: e?.title ?? e?.message
|
|
279
277
|
});
|
|
280
278
|
}
|
|
281
279
|
} else {
|
|
@@ -311,7 +309,7 @@ function ServiceAgreementDropin({
|
|
|
311
309
|
gotoForm(initialFormIndex);
|
|
312
310
|
}, []);
|
|
313
311
|
useEffect(() => {
|
|
314
|
-
userEvents.updateSharedEventProperties({ page: activeForm
|
|
312
|
+
userEvents.updateSharedEventProperties({ page: activeForm?.formName });
|
|
315
313
|
}, [activeForm]);
|
|
316
314
|
const gotoForm = (index) => {
|
|
317
315
|
setActiveForm(forms[index]);
|
|
@@ -319,7 +317,7 @@ function ServiceAgreementDropin({
|
|
|
319
317
|
};
|
|
320
318
|
const onDownloadAcceptedTermsOfServiceDocument = async () => {
|
|
321
319
|
const { isError, isSuccess, data: data2 } = await downloadAcceptedTermsAsPdf();
|
|
322
|
-
if (isSuccess &&
|
|
320
|
+
if (isSuccess && data2?.document) {
|
|
323
321
|
await downloadFile(data2.document, `${i18n.get(activeForm.formName)}.pdf`);
|
|
324
322
|
}
|
|
325
323
|
if (isError) {
|
|
@@ -336,7 +334,7 @@ function ServiceAgreementDropin({
|
|
|
336
334
|
language: languageCode,
|
|
337
335
|
termsOfServiceDocumentFormat: "PDF"
|
|
338
336
|
});
|
|
339
|
-
if (!
|
|
337
|
+
if (!response?.document) {
|
|
340
338
|
throw new Error(`No terms Of service document found in response`);
|
|
341
339
|
}
|
|
342
340
|
await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
|
|
@@ -369,13 +367,12 @@ function ServiceAgreementDropin({
|
|
|
369
367
|
}
|
|
370
368
|
);
|
|
371
369
|
const getSignedName = (acceptanceId) => {
|
|
372
|
-
var _a2;
|
|
373
370
|
if (!acceptanceId) return "";
|
|
374
371
|
const signatory = serviceAgreementAcceptanceInfos.find(({ id }) => id === acceptanceId);
|
|
375
|
-
const legalEntitySignatory =
|
|
376
|
-
({ legalEntityId }) => legalEntityId ===
|
|
372
|
+
const legalEntitySignatory = legalEntityResponse.entityAssociations?.find(
|
|
373
|
+
({ legalEntityId }) => legalEntityId === signatory?.acceptedBy
|
|
377
374
|
);
|
|
378
|
-
return
|
|
375
|
+
return legalEntitySignatory?.name ?? getLegalEntityNameBasedOnType(legalEntityResponse);
|
|
379
376
|
};
|
|
380
377
|
const signedAlert = showSignedAlert && /* @__PURE__ */ jsx(
|
|
381
378
|
Alert,
|
|
@@ -439,7 +436,7 @@ function ServiceAgreementDropin({
|
|
|
439
436
|
Button,
|
|
440
437
|
{
|
|
441
438
|
variant: "secondary",
|
|
442
|
-
onClick:
|
|
439
|
+
onClick: activeForm?.acceptanceId ? onDownloadAcceptedTermsOfServiceDocument : onDownloadUnacceptedTermsOfServiceDocument,
|
|
443
440
|
icon: "download",
|
|
444
441
|
children: i18n.get("downloadAsPdf")
|
|
445
442
|
}
|
|
@@ -455,10 +452,10 @@ function ServiceAgreementDropin({
|
|
|
455
452
|
{
|
|
456
453
|
name: "signer",
|
|
457
454
|
label: i18n.get("signer"),
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
errorMessage: (_a = errors.signer) == null ? void 0 : _a.errorMessage,
|
|
455
|
+
className: "adyen-kyc-u-margin-top-32 adyen-kyc-u-width-half",
|
|
456
|
+
errorMessage: errors.signer?.errorMessage,
|
|
461
457
|
isValid: valid.signer,
|
|
458
|
+
dataTestId: "signer",
|
|
462
459
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
463
460
|
Select,
|
|
464
461
|
{
|
|
@@ -479,7 +476,7 @@ function ServiceAgreementDropin({
|
|
|
479
476
|
el: "fieldset",
|
|
480
477
|
name: "acceptServiceAgreement",
|
|
481
478
|
className: "adyen-kyc-u-margin-top-16",
|
|
482
|
-
errorMessage:
|
|
479
|
+
errorMessage: errors.acceptServiceAgreement?.errorMessage,
|
|
483
480
|
isValid: valid.acceptServiceAgreement,
|
|
484
481
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
485
482
|
Checkbox,
|
|
@@ -580,13 +577,12 @@ function AcceptTermsOfServiceComponent({
|
|
|
580
577
|
const { mutateAsync: acceptTermsOfService2 } = useAcceptTermsOfService();
|
|
581
578
|
const handleOnClose = () => {
|
|
582
579
|
if (modalView) {
|
|
583
|
-
onUnmount
|
|
580
|
+
onUnmount?.();
|
|
584
581
|
}
|
|
585
|
-
onClose
|
|
582
|
+
onClose?.();
|
|
586
583
|
};
|
|
587
584
|
const handleSign = useCallback(
|
|
588
585
|
async (legalEntityId2, termsOfServiceDocumentId, signedBy) => {
|
|
589
|
-
var _a;
|
|
590
586
|
const acceptedTermsOfService = await acceptTermsOfService2({
|
|
591
587
|
acceptedBy: signedBy.acceptedBy,
|
|
592
588
|
legalEntityReference: legalEntityId2,
|
|
@@ -601,25 +597,25 @@ function AcceptTermsOfServiceComponent({
|
|
|
601
597
|
};
|
|
602
598
|
const { acceptedTermsOfServices } = stepsData;
|
|
603
599
|
acceptedTermsOfServices.push(paramAllowList);
|
|
604
|
-
const unAcceptedTos =
|
|
600
|
+
const unAcceptedTos = serviceAgreementStatus?.termsOfServiceTypes?.filter(
|
|
605
601
|
(tosType) => tosType !== acceptedTermsOfService.type
|
|
606
|
-
)
|
|
602
|
+
) ?? [];
|
|
607
603
|
const newStepsData = {
|
|
608
604
|
unAcceptedTermsOfServiceTypes: unAcceptedTos,
|
|
609
605
|
acceptedTermsOfServices
|
|
610
606
|
};
|
|
611
607
|
setStepsData(newStepsData);
|
|
612
|
-
onAccept
|
|
608
|
+
onAccept?.(newStepsData);
|
|
613
609
|
},
|
|
614
|
-
[onAccept, stepsData, acceptTermsOfService2, serviceAgreementStatus
|
|
610
|
+
[onAccept, stepsData, acceptTermsOfService2, serviceAgreementStatus?.termsOfServiceTypes]
|
|
615
611
|
);
|
|
616
612
|
return isStatusLoading || isAcceptanceInfoLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
|
|
617
613
|
ServiceAgreementDropin,
|
|
618
614
|
{
|
|
619
615
|
taskType: TaskTypes.SERVICE_AGREEMENT,
|
|
620
616
|
legalEntityResponse: legalEntity,
|
|
621
|
-
serviceAgreementTypes:
|
|
622
|
-
serviceAgreementAcceptanceInfos:
|
|
617
|
+
serviceAgreementTypes: serviceAgreementStatus?.termsOfServiceTypes ?? [],
|
|
618
|
+
serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfos?.data ?? [],
|
|
623
619
|
handleHomeClick: handleOnClose,
|
|
624
620
|
handleSign,
|
|
625
621
|
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-BrRdDvRD.js";
|
|
12
|
+
import { D as DropinLayout } from "./OnboardingDropinComponent-Cn5iAzbv.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-BrRdDvRD.js";
|
|
13
13
|
const avatar = "adyen-kyc-avatar";
|
|
14
14
|
const avatarLabel = "adyen-kyc-avatar-label";
|
|
15
15
|
const avatarPrimary = "adyen-kyc-avatar-primary";
|