@adyen/kyc-components 4.14.0 → 4.15.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-CHztyhkF.js → AcceptTermsOfServiceComponent-B1_ZqT8v.js} +21 -21
- package/dist/{Accordion-CSpLDvKK.js → Accordion-DmH02rWQ.js} +1 -1
- package/dist/{AccountSetupRejected-C9TJSiM9.js → AccountSetupRejected-CYyJL_st.js} +2 -2
- package/dist/{AdaptiveWorkflow-MtXwzVJR.js → AdaptiveWorkflow-CaDaMZEC.js} +31 -31
- package/dist/{AdaptiveWorkflowComponent-Bhewor7e.js → AdaptiveWorkflowComponent-DqWP2kUh.js} +6 -6
- package/dist/{Address-Db2cQEYy.js → Address-FbRHdNSE.js} +14 -15
- package/dist/{Avatar-DqBKHRAr.js → Avatar-Z3MS8_pW.js} +1 -1
- package/dist/{BusinessFinancingDropin-BK-o6SBq.js → BusinessFinancingDropin-F2e_Y9GW.js} +34 -35
- package/dist/{BusinessFinancingPage-VrHoq-PU.js → BusinessFinancingPage-BR103B31.js} +7 -7
- package/dist/{BusinessTypeSelectionPage-BtvOkjH2.js → BusinessTypeSelectionPage-BpsMCofr.js} +14 -14
- package/dist/{Button-DBN5gM_d.js → Button-3qGOI53m.js} +1 -1
- package/dist/{Checkbox-tUvgt59R.js → Checkbox-DPFQmSgp.js} +1 -1
- package/dist/{CompanyRegistrationNumberTypeSelector-KPG5AiPs.js → CompanyRegistrationNumberTypeSelector-DuhdLlxA.js} +7 -7
- package/dist/{Confirm-C4GotFqm.js → Confirm-6QfuYcA7.js} +3 -3
- package/dist/{ConstitutionalDocument-1qX0SyAJ.js → ConstitutionalDocument-BjENfQq0.js} +57 -19
- package/dist/{ContactDetails-BxXUWdfK.js → ContactDetails-D4jywPM1.js} +7 -7
- package/dist/{ContextGuidance-DjYWbiMK.js → ContextGuidance-DLlQSpdE.js} +2 -2
- package/dist/{CountryField-CsIpt5bM.js → CountryField-CoPyShy3.js} +5 -5
- package/dist/{Currency-CP4knQcg.js → Currency-C75xXkkT.js} +45 -10
- package/dist/{CustomerSupport-q8nKG83q.js → CustomerSupport-DYVyr9Xs.js} +13 -13
- package/dist/{DebugModal-SNkDlKQ8.js → DebugModal-lhHBRJ1F.js} +10 -10
- package/dist/{DecisionMakerDetails-B0569E7J.js → DecisionMakerDetails-CNeaLZcT.js} +15 -15
- package/dist/{DecisionMakerDetailsPage-at2E8IDW.js → DecisionMakerDetailsPage-CjgUmt3Q.js} +8 -8
- package/dist/{DecisionMakers-7YNJLGEs.js → DecisionMakers-DHjQ6_2w.js} +17 -17
- package/dist/{Dropzone-KCksArof.js → Dropzone-CV5ikL-T.js} +19 -7
- package/dist/{EmbeddedStatus-BKVqJCeu.js → EmbeddedStatus-Cz3F9iXD.js} +4 -4
- package/dist/{EndStateLayout-DfThkkI3.js → EndStateLayout-ic1EOve9.js} +2 -2
- package/dist/{EntityAssociation-CWl4JAHM.js → EntityAssociation-C3WXj_Ll.js} +7 -7
- package/dist/{ErrorPanel-BvGPgHnp.js → ErrorPanel-CLMnAAMi.js} +3 -3
- package/dist/{Field-CQWAWo5U.js → Field-DAUlw0M5.js} +3 -3
- package/dist/{FormNavigation-BwLxW6W7.js → FormNavigation-LjknVdf5.js} +2 -2
- package/dist/{Individual.rules-DrC9MYN9.js → Individual.rules-Cc2Uigav.js} +8 -5
- package/dist/{IndividualDropin-BurOIu0c.js → IndividualDropin-BuO2qp78.js} +46 -48
- package/dist/{InputDate-cTgjAhzm.js → InputDate-B_jtgBB5.js} +2 -2
- package/dist/{InputText-8abfNtHh.js → InputText-B-ebylm4.js} +3 -3
- package/dist/{Introduction-QlQ1-xMy.js → Introduction-BigwaxQh.js} +8 -8
- package/dist/{InvitedDecisionMakerComponent-C9epqIjP.js → InvitedDecisionMakerComponent-B6hzsvxg.js} +20 -24
- package/dist/{JpAddress-DWLUHrzL.js → JpAddress-C3t5uUVC.js} +13 -13
- package/dist/{LandingLayout-Dg0sEASR.js → LandingLayout-C1yh_ggf.js} +1 -1
- package/dist/{LegalCompanyNameField-BT9Zfyb8.js → LegalCompanyNameField-BEYJc-cO.js} +5 -5
- package/dist/{LegalRepresentativeDetailsPage-k-Ww3-qI.js → LegalRepresentativeDetailsPage-B-S7peV_.js} +7 -7
- package/dist/{Link-DtaYQWb-.js → Link-C0jrInxa.js} +1 -1
- package/dist/{ListItem-CZWSCEeJ.js → ListItem-C_g-4xPP.js} +2 -2
- package/dist/{MaskedInput-B-xdIAir.js → MaskedInput-Ccb-5Sk2.js} +6 -6
- package/dist/{MaybeModal-S1KtZRDR.js → MaybeModal-DWTUOvUf.js} +2 -2
- package/dist/{Modal-BgeE7zM2.js → Modal-C__-5LgI.js} +1 -1
- package/dist/{Name-DtDvWkku.js → Name-BlfQjJkJ.js} +4 -4
- package/dist/{NewSummary-5Ek4c4_o.js → NewSummary-raAN3-Os.js} +4 -4
- package/dist/{PayoutDetailsDropinMultiForm-3m2wfCKF.js → PayoutDetailsDropinMultiForm-CN3Mq3RI.js} +131 -534
- package/dist/{PayoutDetailsPage-DhCN9wrq.js → PayoutDetailsPage-BXSyHbcR.js} +8 -8
- package/dist/{RadioGroup-DlzXLoMN.js → RadioGroup-CMiBSXCA.js} +2 -2
- package/dist/{Review-l6QsUZNM.js → Review-Dxdqw9W4.js} +8 -8
- package/dist/{RootBusinessDetailsPage-CBvcRUWb.js → RootBusinessDetailsPage-polINWeA.js} +6 -6
- package/dist/{RootBusinessLinesPage-m7XFuOmK.js → RootBusinessLinesPage-CodFfnxC.js} +31 -31
- package/dist/{RootIndividualDetailsPage-Bf2mvA7C.js → RootIndividualDetailsPage-BswgJJjN.js} +7 -7
- package/dist/{Select-vMYP9lm8.js → Select-CvIMIYjl.js} +6 -6
- package/dist/{SignPCIComponent-BXLKxSaq.js → SignPCIComponent-Cckiube5.js} +20 -20
- package/dist/{SingpassSelection-KT4jh9r-.js → SingpassSelection-BrbjLrJ_.js} +6 -6
- package/dist/{SoleProprietorshipPage-D1w2_7wJ.js → SoleProprietorshipPage-CJSXoE6K.js} +7 -7
- package/dist/{SourceOfFundsPage-D5Xgourk.js → SourceOfFundsPage-4PU-1SXQ.js} +35 -35
- package/dist/{Summary-CfY39bvE.js → Summary-CxQgBZob.js} +9 -9
- package/dist/{TaskListItem-CFrbNe84.js → TaskListItem-C8ZjQZX_.js} +9 -9
- package/dist/{TaskVerificationStatus-gGr34dp5.js → TaskVerificationStatus-DTHF8B9j.js} +1 -1
- package/dist/{TaxInformationField-BVFjH0QM.js → TaxInformationField-DXHcjgAF.js} +14 -15
- package/dist/{TaxReportingDropin-BOlYCtfA.js → TaxReportingDropin-CmqB2ntX.js} +18 -18
- package/dist/{TextArea-C2DkQ41s.js → TextArea-BvphlYOu.js} +4 -4
- package/dist/{TileGroup-B7-q4NXH.js → TileGroup-B8II9Mip.js} +2 -2
- package/dist/{TrustDetailsPage-DYxlp77M.js → TrustDetailsPage-DM1VTZI-.js} +32 -32
- package/dist/{TrustMemberCompanyPage-C-lWKgMJ.js → TrustMemberCompanyPage-c3iSRewM.js} +8 -8
- package/dist/{TrustMemberIndividualPage-Dj5Wrfhj.js → TrustMemberIndividualPage-B1rB7uNu.js} +7 -7
- package/dist/{TrustMemberRoleAndTypePage-Bvh9nkGW.js → TrustMemberRoleAndTypePage-XgH8Wwy7.js} +20 -20
- package/dist/{TrustMembersOverview-BuFB9b26.js → TrustMembersOverview-DN9zUUlt.js} +13 -13
- package/dist/{UnincorporatedPartnershipIndividualPage-BhEkonyx.js → UnincorporatedPartnershipIndividualPage-BhyWShKQ.js} +7 -7
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DLtg6RUe.js → UnincorporatedPartnershipMemberCompanyPage-C2KPC7sY.js} +8 -8
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-ytvvGos5.js → UnincorporatedPartnershipMemberRoleAndTypePage-CYEHdEyh.js} +12 -12
- package/dist/{UnincorporatedPartnershipMembersOverview-BIR48dPn.js → UnincorporatedPartnershipMembersOverview-C7UxDf-P.js} +9 -9
- package/dist/{VerificationErrorAlert-DxzcXlqX.js → VerificationErrorAlert-BK9X3AUa.js} +4 -4
- package/dist/{accountHolderUtils-BXvNrlqJ.js → accountHolderUtils-oeDmrJa0.js} +1 -1
- package/dist/adyen-business-financing.js +8 -8
- package/dist/adyen-individual-configuration.js +8 -8
- package/dist/adyen-individual-status.js +8 -8
- package/dist/adyen-invited-decision-maker.js +3 -3
- package/dist/adyen-onboarding.js +62 -57
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +7 -7
- package/dist/adyen-transfer-instrument-configuration.js +7 -7
- package/dist/adyen-transfer-instrument-management.js +13 -13
- package/dist/adyen-verification-status.js +6 -6
- package/dist/{constants-BkamFjj0.js → constants-rWSN2wEc.js} +6 -6
- package/dist/{debouncedInputEvent-D2-Kctv9.js → debouncedInputEvent-Fwwp_K_-.js} +2 -2
- package/dist/en-US-BeIZBdDm.js +7 -0
- package/dist/en-US-CKZZNUWW.js +16 -0
- package/dist/{en-US-BIYEZxZV.js → en-US-CmzloEL3.js} +3 -1
- package/dist/{getProblemsForEntity-CogrYbYP.js → getProblemsForEntity-CXzgYL6R.js} +1 -1
- package/dist/{http-DYzfwjcs.js → http-DeQp0G69.js} +1 -1
- package/dist/{invalidateRootLegalEntity-Ngv5bNVT.js → invalidateRootLegalEntity-C1N15Q0Y.js} +3 -3
- package/dist/{localizeDateString-DB-oTe60.js → localizeDateString-CU7HGR-k.js} +1 -1
- package/dist/{mapExistingFile-CZB9JLAV.js → mapExistingFile-BmyzNoup.js} +2 -2
- package/dist/{mapJpAddressSchemaToAddressLocalizations-DUElzaoS.js → mapJpAddressSchemaToAddressLocalizations-BGLDkUt1.js} +1 -1
- package/dist/{mapLegalEntityToIndividualSchema-BsHNunzQ.js → mapLegalEntityToIndividualSchema-BUIjjkrb.js} +7 -7
- package/dist/{mapTransferInstrumentToPayoutAccount-DuqJ08ye.js → mapTransferInstrumentToPayoutAccount-DZMqLmU8.js} +2 -2
- package/dist/{omitObscuredFieldsIfUnchanged-DYruZ9lP.js → omitObscuredFieldsIfUnchanged-hdceMqqj.js} +2 -2
- package/dist/{patternValidators-7Kab872i.js → patternValidators-CDmm-_TB.js} +1 -1
- package/dist/{process-field-configurations-U459c7bG.js → process-field-configurations-n3ecaPQ8.js} +1 -1
- package/dist/{resolveEnvironment-CIjrqyM1.js → resolveEnvironment-QjQSqNQs.js} +29 -26
- package/dist/{roleMetadata-bznvTmh3.js → roleMetadata-CWdYxbqM.js} +1 -1
- package/dist/{translation-ZXpd9jdD.js → translation-BR3rLb4m.js} +1 -1
- package/dist/types/components/Business/forms/rules.constants.d.ts +39 -3
- package/dist/types/components/Business/forms/rules.d.ts +0 -39
- package/dist/types/components/Business/utils/utils.d.ts +13 -0
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/getFormSlice.d.ts +12 -0
- package/dist/{types-Bvp3aTbC.js → types-KjTYEnAG.js} +1 -1
- package/dist/{unincorporated-partnership-GaTPaALJ.js → unincorporated-partnership-BstfjTh2.js} +1 -1
- package/dist/{useAssociatedLegalEntity-CQAe7Co6.js → useAssociatedLegalEntity-QRvyeNwU.js} +2 -2
- package/dist/{useBusinessDetailsData-BBxBwF3t.js → useBusinessDetailsData-QQBD_f1x.js} +240 -57
- package/dist/{useBusinessLines-Dshc0pYD.js → useBusinessLines-B2iCcDej.js} +1 -1
- package/dist/{useCanSeeIntroduction-CsB0nHOF.js → useCanSeeIntroduction-PbyUkvm7.js} +1 -1
- package/dist/{useCreateLegalEntity-38twl3gB.js → useCreateLegalEntity-zPjl13U3.js} +1 -1
- package/dist/{useDataMissingRemediations-7H0hHxXG.js → useDataMissingRemediations-CrKtd_Fd.js} +1 -1
- package/dist/{useForm-CNC9xGFw.js → useForm-D6hI8MLf.js} +2 -2
- package/dist/{useFormContext-BgTBjjTn.js → useFormContext-BTYjMg5H.js} +8 -8
- package/dist/{useLegalEntity-EN5ubX2H.js → useLegalEntity-BXk2tzGe.js} +1 -1
- package/dist/{useMultiForm-CuEwrpJW.js → useMultiForm-DJ8osfTK.js} +2 -2
- package/dist/{useNavigate-DS8zOHLa.js → useNavigate-DzSXuo5y.js} +31 -31
- package/dist/{useOnboardingStatus-Cf6dZFB2.js → useOnboardingStatus-BgO4uPbW.js} +1 -1
- package/dist/{usePciQuestionnaireList-C3bk4K8n.js → usePciQuestionnaireList-BEPt97lw.js} +1 -1
- package/dist/{useSalesChannels-CC-N9vqE.js → useSalesChannels-CxxzJGtX.js} +2 -2
- package/dist/{useScenarios-ful0VqQ4.js → useScenarios-BRGMIufX.js} +1 -1
- package/dist/{useTaskLandedEvent-CtlV_Bum.js → useTaskLandedEvent-Doq80YT8.js} +1 -1
- package/dist/{useTaskStatus-CLcXCIz7.js → useTaskStatus-BLkHjMgm.js} +1 -1
- package/dist/{useTermsOfServiceStatus-DwWvz0vR.js → useTermsOfServiceStatus-B1OpYOua.js} +1 -1
- package/dist/{useTrustMembers-D0ttlpD3.js → useTrustMembers-pXhb6YbF.js} +3 -3
- package/dist/{useUnincorporatedPartnershipMembers-wgiUFuxT.js → useUnincorporatedPartnershipMembers-DK_yrIU4.js} +3 -3
- package/dist/{useUpdateBusinessLines-BRxlqBnM.js → useUpdateBusinessLines-jlXfi57a.js} +1 -1
- package/dist/{useUpdateLegalEntity--JnQBEVo.js → useUpdateLegalEntity-BxyHb_HE.js} +2 -2
- package/dist/{utils-DcUoR5qG.js → utils-BtyrxTzp.js} +1 -1
- package/dist/{utils-DCyOBn7m.js → utils-D5_baw2Q.js} +3 -3
- package/dist/{constants-DrtMSDfx.js → utils-DNIZ6F6L.js} +67 -2
- package/dist/{utils-BFcQUjSW.js → utils-DubzvooO.js} +59 -276
- package/dist/{validate-5G10CMRq.js → validate-B2bZh_uL.js} +6 -18
- package/dist/{validate-wVBIHHi-.js → validate-DyAEhVQH.js} +1 -1
- package/dist/{validateExtractionResult-D10Irw9a.js → validateExtractionResult-BjS2z1De.js} +14 -14
- package/dist/{validationError-tIm9Zzjt.js → validationError-DqjDv5Q-.js} +1 -1
- package/package.json +1 -1
- package/dist/en-US-xwcTnMwf.js +0 -7
- package/dist/japanSupportUtils-H5Zfox2v.js +0 -11
- package/dist/types/constants/config.d.ts +0 -1
- package/dist/types/context/StateContext/useGlobalData.d.ts +0 -10
- package/dist/types/context/StateContext/useStateContext.d.ts +0 -2
- package/dist/utils-BgdkZkf5.js +0 -71
- package/dist/utils-K8Z-zRnu.js +0 -32
package/dist/{PayoutDetailsDropinMultiForm-3m2wfCKF.js → PayoutDetailsDropinMultiForm-CN3Mq3RI.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
try {
|
|
2
2
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
3
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8f4485db-5ef3-4b77-8f60-9116768c7225", e._sentryDebugIdIdentifier = "sentry-dbid-8f4485db-5ef3-4b77-8f60-9116768c7225");
|
|
4
4
|
} catch (e) {}
|
|
5
|
-
import { a as Icon, i as Typography, o as createLogger, r as useTranslation, t as Trans } from "./translation-
|
|
6
|
-
import { C as useDataset, J as extractFieldName, M as ExperimentNames, N as FeatureNames, T as datasetUtilities, Z as hasEmptyFields,
|
|
7
|
-
import { t as Button } from "./Button-
|
|
8
|
-
import { n as httpGet, r as httpPost, s as useApiContext } from "./http-
|
|
5
|
+
import { a as Icon, i as Typography, o as createLogger, r as useTranslation, t as Trans } from "./translation-BR3rLb4m.js";
|
|
6
|
+
import { C as useDataset, J as extractFieldName, M as ExperimentNames, N as FeatureNames, T as datasetUtilities, Z as hasEmptyFields, ft as useAccountHolder, j as useToggleContext, k as Header, nt as isEmpty, q as concatenateFieldNames, tt as isAccountIdentifierObscured, w as datasetIdentifier, x as Alert } from "./resolveEnvironment-QjQSqNQs.js";
|
|
7
|
+
import { t as Button } from "./Button-3qGOI53m.js";
|
|
8
|
+
import { n as httpGet, r as httpPost, s as useApiContext } from "./http-DeQp0G69.js";
|
|
9
9
|
import { t as LegalEntityTypes } from "./legal-entity-type-0MfCGzUf.js";
|
|
10
10
|
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BHh7Ux8v.js";
|
|
11
11
|
import { t as useSettingsContext } from "./useSettingsContext-Bpf4UqRT.js";
|
|
@@ -16,50 +16,47 @@ import { t as TaskTypes } from "./taskTypes-NawDTp5n.js";
|
|
|
16
16
|
import { d as hasOwnEntityAssociationOfType } from "./entityAssociationUtil-C-wflW8q.js";
|
|
17
17
|
import { t as EEA_Countries } from "./countries-CPj8hkLs.js";
|
|
18
18
|
import { t as Card } from "./Card-BCGLpdw7.js";
|
|
19
|
-
import { i as useAnalyticsContext, t as Modal } from "./Modal-
|
|
19
|
+
import { i as useAnalyticsContext, t as Modal } from "./Modal-C__-5LgI.js";
|
|
20
20
|
import { t as SettingNames } from "./types-Cwq1JAWT.js";
|
|
21
|
-
import { n as useToastContext, t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-
|
|
22
|
-
import { n as translateTranslatable, r as LoaderWrapper } from "./utils-
|
|
23
|
-
import { t as Confirm } from "./Confirm-
|
|
24
|
-
import { n as Image } from "./unincorporated-partnership-
|
|
21
|
+
import { n as useToastContext, t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-C1N15Q0Y.js";
|
|
22
|
+
import { n as translateTranslatable, r as LoaderWrapper } from "./utils-BtyrxTzp.js";
|
|
23
|
+
import { t as Confirm } from "./Confirm-6QfuYcA7.js";
|
|
24
|
+
import { n as Image } from "./unincorporated-partnership-BstfjTh2.js";
|
|
25
25
|
import { n as getLegalEntityNameBasedOnType, r as getPayoutAccountHolderName } from "./getName-D4ECvzcI.js";
|
|
26
|
-
import { i as FormFlow, n as addValidityToForms, o as useFormComposer, r as getRequiredForms, s as FormContextProvider, t as useFormContext } from "./useFormContext-
|
|
27
|
-
import { r as getPropsFromConfigurations, t as augmentWithCountryConfigs } from "./process-field-configurations-
|
|
28
|
-
import { t as ErrorPanel } from "./ErrorPanel-
|
|
26
|
+
import { i as FormFlow, n as addValidityToForms, o as useFormComposer, r as getRequiredForms, s as FormContextProvider, t as useFormContext } from "./useFormContext-BTYjMg5H.js";
|
|
27
|
+
import { r as getPropsFromConfigurations, t as augmentWithCountryConfigs } from "./process-field-configurations-n3ecaPQ8.js";
|
|
28
|
+
import { t as ErrorPanel } from "./ErrorPanel-CLMnAAMi.js";
|
|
29
29
|
import { t as trackNavigation } from "./trackNavigation-DR70qR8T.js";
|
|
30
30
|
import { n as mergeFieldMetadataIntoProps, t as createFormUtils } from "./formUtils-DVc3a6gf.js";
|
|
31
|
-
import { n as summaryStep } from "./Summary-
|
|
31
|
+
import { n as summaryStep } from "./Summary-CxQgBZob.js";
|
|
32
32
|
import { r as summaryItem } from "./summaryItem-uDWmtYtt.js";
|
|
33
|
-
import { n as isNotEmptyValidator, t as useMultiForm } from "./useMultiForm-
|
|
34
|
-
import { a as useUnifyLoadingStatus, i as useScenarioConfiguration, o as payoutAccountFormat, r as getPageName, t as mapExistingFile } from "./mapExistingFile-
|
|
35
|
-
import { t as useTaskLandedEvent } from "./useTaskLandedEvent-
|
|
36
|
-
import { a as alphanumericInputs, c as nonInputs, i as alphaInputs, l as numericInputs, o as customInputs, s as makeMask, t as MaskedInput, u as spacer } from "./MaskedInput-
|
|
37
|
-
import { a as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable, i as isValidationError, o as processValidationErrors, r as isIdDocumentUploadError, s as isMaintenanceModeError, t as isBankStatementUploadError } from "./validationError-
|
|
38
|
-
import { a as
|
|
39
|
-
import { t as omitObscuredFieldsIfUnchanged } from "./omitObscuredFieldsIfUnchanged-
|
|
33
|
+
import { n as isNotEmptyValidator, t as useMultiForm } from "./useMultiForm-DJ8osfTK.js";
|
|
34
|
+
import { a as useUnifyLoadingStatus, i as useScenarioConfiguration, o as payoutAccountFormat, r as getPageName, t as mapExistingFile } from "./mapExistingFile-BmyzNoup.js";
|
|
35
|
+
import { t as useTaskLandedEvent } from "./useTaskLandedEvent-Doq80YT8.js";
|
|
36
|
+
import { a as alphanumericInputs, c as nonInputs, i as alphaInputs, l as numericInputs, o as customInputs, s as makeMask, t as MaskedInput, u as spacer } from "./MaskedInput-Ccb-5Sk2.js";
|
|
37
|
+
import { a as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable, i as isValidationError, o as processValidationErrors, r as isIdDocumentUploadError, s as isMaintenanceModeError, t as isBankStatementUploadError } from "./validationError-DqjDv5Q-.js";
|
|
38
|
+
import { a as createDocumentRequest, i as bytesToSize, l as getFileExtention, n as fileValidationRules, o as documentApiUtils, r as DropzoneFile, s as getDocument, t as defaultFileValidationOptions } from "./validate-B2bZh_uL.js";
|
|
39
|
+
import { t as omitObscuredFieldsIfUnchanged } from "./omitObscuredFieldsIfUnchanged-hdceMqqj.js";
|
|
40
40
|
import { t as uppercase } from "./uppercase-DvjwUM0n.js";
|
|
41
|
-
import { o as validatePatternOnBlur } from "./patternValidators-
|
|
41
|
+
import { o as validatePatternOnBlur } from "./patternValidators-CDmm-_TB.js";
|
|
42
42
|
import { t as bankStatementDescriptionPattern } from "./basePatterns-plHFNzgJ.js";
|
|
43
43
|
import { t as resolveFieldMetadata } from "./fieldConfigurations-CZCFghnK.js";
|
|
44
|
-
import { t as Field } from "./Field-
|
|
45
|
-
import { t as LandingLayout } from "./LandingLayout-
|
|
46
|
-
import { t as Select } from "./Select-
|
|
47
|
-
import {
|
|
48
|
-
import { t as
|
|
49
|
-
import { t as
|
|
50
|
-
import {
|
|
51
|
-
import { t as
|
|
52
|
-
import { t as InputText } from "./InputText-8abfNtHh.js";
|
|
53
|
-
import { n as CountryField } from "./CountryField-CsIpt5bM.js";
|
|
44
|
+
import { t as Field } from "./Field-DAUlw0M5.js";
|
|
45
|
+
import { t as LandingLayout } from "./LandingLayout-C1yh_ggf.js";
|
|
46
|
+
import { t as Select } from "./Select-CvIMIYjl.js";
|
|
47
|
+
import { t as TextArea } from "./TextArea-BvphlYOu.js";
|
|
48
|
+
import { t as Link } from "./Link-C0jrInxa.js";
|
|
49
|
+
import { t as InputText } from "./InputText-B-ebylm4.js";
|
|
50
|
+
import { n as CountryField } from "./CountryField-CoPyShy3.js";
|
|
51
|
+
import { t as ContextGuidance } from "./ContextGuidance-DLlQSpdE.js";
|
|
54
52
|
import { t as createFormRules } from "./form-rules-CUUQGacJ.js";
|
|
55
|
-
import { t as ContextGuidance } from "./ContextGuidance-DjYWbiMK.js";
|
|
56
53
|
import { t as Tag } from "./Tag-CNeDHqKp.js";
|
|
57
|
-
import { n as useTransferInstrument, t as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-
|
|
54
|
+
import { n as useTransferInstrument, t as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-DZMqLmU8.js";
|
|
58
55
|
import { t as Currencies } from "./currency-DQwXq9Mc.js";
|
|
59
|
-
import { t as currencyByCountry } from "./types-
|
|
60
|
-
import { t as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-
|
|
56
|
+
import { t as currencyByCountry } from "./types-KjTYEnAG.js";
|
|
57
|
+
import { t as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-DK_yrIU4.js";
|
|
61
58
|
import { t as Divider } from "./Divider-BENvVRnz.js";
|
|
62
|
-
import { lazy, memo,
|
|
59
|
+
import { lazy, memo, useMemo, useRef, useState } from "preact/compat";
|
|
63
60
|
import { useCallback as useCallback$1, useContext as useContext$1, useEffect as useEffect$1, useMemo as useMemo$1, useRef as useRef$1, useState as useState$1 } from "preact/hooks";
|
|
64
61
|
import cx from "classnames";
|
|
65
62
|
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
@@ -473,6 +470,20 @@ function FilePicker({ files, setFiles, isValid, errorMessage, multiple = false,
|
|
|
473
470
|
] });
|
|
474
471
|
}
|
|
475
472
|
//#endregion
|
|
473
|
+
//#region src/utils/getFormSlice.ts
|
|
474
|
+
function getFormSlice(form, key) {
|
|
475
|
+
return {
|
|
476
|
+
data: form.data[key],
|
|
477
|
+
valid: form.valid[key],
|
|
478
|
+
errors: form.errors[key],
|
|
479
|
+
requiredFields: form.requiredFields?.[key],
|
|
480
|
+
optionalFields: form.optionalFields?.[key],
|
|
481
|
+
obscuredFields: form.obscuredFields?.[key],
|
|
482
|
+
trustedFields: form.trustedFields?.[key],
|
|
483
|
+
handleChange: (fieldName, mode) => form.handleChangeFor(fieldName, key, mode)
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
//#endregion
|
|
476
487
|
//#region src/components/BankAccount/fields/BankAccountNumber/fieldConfig.ts
|
|
477
488
|
var simpleBankAccountNumberMetadata = (example, length, maxLength) => {
|
|
478
489
|
if (maxLength) return {
|
|
@@ -1026,38 +1037,26 @@ var validDocumentTypes = [
|
|
|
1026
1037
|
"RIB"
|
|
1027
1038
|
];
|
|
1028
1039
|
function BankDocumentClassification(props) {
|
|
1029
|
-
const { legalEntity,
|
|
1040
|
+
const { legalEntity, id, fieldValidationErrors: fieldProblems, formVerificationErrors, country, handleNextClick } = props;
|
|
1030
1041
|
const { t } = useTranslation("banking");
|
|
1031
1042
|
const { t: commonT } = useTranslation("common");
|
|
1032
|
-
const stateRef = useRef({ setState: null });
|
|
1033
1043
|
const [showReviewModal, setShowReviewModal] = useState(false);
|
|
1034
1044
|
const inputRef = useRef(null);
|
|
1035
1045
|
const logger = createLogger();
|
|
1036
1046
|
const userEvents = useAnalyticsContext();
|
|
1037
1047
|
const [creditCardError, setCreditCardError] = useState(false);
|
|
1038
|
-
const
|
|
1048
|
+
const { form } = useFormContext();
|
|
1049
|
+
const { data: bankDocumentData, valid, errors, handleChange, requiredFields, optionalFields, trustedFields } = getFormSlice(form, "payoutAccountDocuments");
|
|
1050
|
+
const data = bankDocumentData;
|
|
1051
|
+
const formUtils = createFormUtils({
|
|
1052
|
+
...props,
|
|
1053
|
+
requiredFields,
|
|
1054
|
+
optionalFields,
|
|
1055
|
+
trustedFields
|
|
1056
|
+
}, commonT);
|
|
1039
1057
|
const { isFeatureEnabled } = useToggleContext();
|
|
1040
1058
|
const enableBankDocumentClassification = isFeatureEnabled(FeatureNames.EnableBankDocumentClassification);
|
|
1041
1059
|
const isShadowMode = isFeatureEnabled(FeatureNames.EnableBankDocumentClassificationShadowMode);
|
|
1042
|
-
const rules = useMemo(() => ({
|
|
1043
|
-
...validators || bankDocumentValidationRules,
|
|
1044
|
-
bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
|
|
1045
|
-
}), [validators]);
|
|
1046
|
-
const localForm = useForm({
|
|
1047
|
-
...props,
|
|
1048
|
-
schema: bankDocumentClassificationFields,
|
|
1049
|
-
defaultData: bankData,
|
|
1050
|
-
rules,
|
|
1051
|
-
fieldProblems: fieldValidationErrors,
|
|
1052
|
-
shouldValidate
|
|
1053
|
-
});
|
|
1054
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1055
|
-
const data = useMultiFormMode ? bankData : localForm.data;
|
|
1056
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
1057
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
1058
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
1059
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1060
|
-
const { triggerValidation, setData } = localForm;
|
|
1061
1060
|
const validateDocumentMutation = useValidateDocumentMultipart({
|
|
1062
1061
|
onSuccess: (response) => {
|
|
1063
1062
|
userEvents.addEvent("Success", {
|
|
@@ -1102,7 +1101,6 @@ function BankDocumentClassification(props) {
|
|
|
1102
1101
|
const handleDocumentUpload = async (files) => {
|
|
1103
1102
|
setCreditCardError(false);
|
|
1104
1103
|
handleChange("bankStatementDocument")(files);
|
|
1105
|
-
if (!useMultiFormMode) triggerValidation();
|
|
1106
1104
|
if (!(enableBankDocumentClassification && [
|
|
1107
1105
|
"US",
|
|
1108
1106
|
"FR",
|
|
@@ -1134,40 +1132,6 @@ function BankDocumentClassification(props) {
|
|
|
1134
1132
|
}
|
|
1135
1133
|
}
|
|
1136
1134
|
};
|
|
1137
|
-
const alreadyUploadedDocuments = useMemo(() => bankData?.bankStatementDocument ?? [], [bankData?.bankStatementDocument]);
|
|
1138
|
-
useEffect(() => {
|
|
1139
|
-
if (!useMultiFormMode && alreadyUploadedDocuments.length > 0) {
|
|
1140
|
-
setData("bankStatementDocument", alreadyUploadedDocuments);
|
|
1141
|
-
if (bankData?.description) setData("description", bankData.description);
|
|
1142
|
-
triggerValidation();
|
|
1143
|
-
}
|
|
1144
|
-
}, [
|
|
1145
|
-
alreadyUploadedDocuments,
|
|
1146
|
-
bankData?.description,
|
|
1147
|
-
setData,
|
|
1148
|
-
triggerValidation,
|
|
1149
|
-
useMultiFormMode
|
|
1150
|
-
]);
|
|
1151
|
-
useEffect(() => {
|
|
1152
|
-
if (!useMultiFormMode) stateRef.current?.setState?.({
|
|
1153
|
-
type: "addToState",
|
|
1154
|
-
value: {
|
|
1155
|
-
data,
|
|
1156
|
-
valid,
|
|
1157
|
-
errors,
|
|
1158
|
-
fieldProblems,
|
|
1159
|
-
dataStoreId: id,
|
|
1160
|
-
schema: bankDocumentClassificationFields
|
|
1161
|
-
}
|
|
1162
|
-
});
|
|
1163
|
-
}, [
|
|
1164
|
-
data,
|
|
1165
|
-
valid,
|
|
1166
|
-
errors,
|
|
1167
|
-
fieldProblems,
|
|
1168
|
-
id,
|
|
1169
|
-
useMultiFormMode
|
|
1170
|
-
]);
|
|
1171
1135
|
const trackModalAction = (reason) => {
|
|
1172
1136
|
userEvents.addEvent("Clicked button", {
|
|
1173
1137
|
actionType: "close",
|
|
@@ -1221,17 +1185,13 @@ function BankDocumentClassification(props) {
|
|
|
1221
1185
|
/* @__PURE__ */ jsxs("form", {
|
|
1222
1186
|
className: BankDocumentClassification_module_default.bankDocumentClassification,
|
|
1223
1187
|
children: [
|
|
1224
|
-
!useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, {
|
|
1225
|
-
owner: id,
|
|
1226
|
-
stateRef
|
|
1227
|
-
}),
|
|
1228
1188
|
/* @__PURE__ */ jsx(Header, {
|
|
1229
1189
|
title: t(($) => $["uploadABankDocument"]),
|
|
1230
1190
|
description: t(($) => $["toVerifyYourBankAccountDetails"])
|
|
1231
1191
|
}),
|
|
1232
1192
|
/* @__PURE__ */ jsx(ErrorPanel, {
|
|
1233
1193
|
verificationErrors: formVerificationErrors,
|
|
1234
|
-
validationErrors:
|
|
1194
|
+
validationErrors: fieldProblems,
|
|
1235
1195
|
formUtils,
|
|
1236
1196
|
id: "ariaErrorField"
|
|
1237
1197
|
}),
|
|
@@ -1347,33 +1307,6 @@ function BankDocumentClassification(props) {
|
|
|
1347
1307
|
}
|
|
1348
1308
|
var MemoizedBankDocumentClassification = memo(BankDocumentClassification, (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate);
|
|
1349
1309
|
//#endregion
|
|
1350
|
-
//#region src/context/StateContext/useStateContext.ts
|
|
1351
|
-
function useStateContext() {
|
|
1352
|
-
return useContext$1(StateContext);
|
|
1353
|
-
}
|
|
1354
|
-
//#endregion
|
|
1355
|
-
//#region src/context/StateContext/useGlobalData.ts
|
|
1356
|
-
function useGlobalDataSlice(sliceId) {
|
|
1357
|
-
const { dispatch, getData } = useStateContext();
|
|
1358
|
-
const sliceData = getData()[sliceId];
|
|
1359
|
-
const updateState = useCallback$1((updatedSlice) => dispatch({
|
|
1360
|
-
type: "addToState",
|
|
1361
|
-
value: {
|
|
1362
|
-
...updatedSlice,
|
|
1363
|
-
dataStoreId: sliceId
|
|
1364
|
-
}
|
|
1365
|
-
}), [sliceId]);
|
|
1366
|
-
const clearState = useCallback$1(() => dispatch({
|
|
1367
|
-
type: "removeFromState",
|
|
1368
|
-
value: { dataStoreId: sliceId }
|
|
1369
|
-
}), [sliceId]);
|
|
1370
|
-
return {
|
|
1371
|
-
sliceData,
|
|
1372
|
-
updateStateSlice: useMemo$1(() => debounce(updateState, 200), [updateState]),
|
|
1373
|
-
clearStateSlice: useMemo$1(() => debounce(clearState, 200), [clearState])
|
|
1374
|
-
};
|
|
1375
|
-
}
|
|
1376
|
-
//#endregion
|
|
1377
1310
|
//#region src/datasets/currencies.json
|
|
1378
1311
|
var currencies_default = /* @__PURE__ */ JSON.parse("[{\"currencyCode\":\"AED\",\"description\":\"UAE Dirham\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ALL\",\"description\":\"Albanian Lek\",\"exponent\":2,\"symbol\":\"L\"},{\"currencyCode\":\"AMD\",\"description\":\"Armenian Dram\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ANG\",\"description\":\"Antillian Guilder\",\"exponent\":2,\"symbol\":\"Naƒ\"},{\"currencyCode\":\"AOA\",\"description\":\"Angolan kwanza\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ARS\",\"description\":\"Nuevo Argentine Peso\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"AUD\",\"description\":\"Australian Dollar\",\"exponent\":2,\"symbol\":\"A$\"},{\"currencyCode\":\"AWG\",\"description\":\"Aruban Guilder\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"AZN\",\"description\":\"Azerbaijani manat\",\"exponent\":2,\"symbol\":\"man\"},{\"currencyCode\":\"BAM\",\"description\":\"Bosnia and Herzegovina Convertible Marks\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BBD\",\"description\":\"Barbados Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BDT\",\"description\":\"Bangladesh Taka\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BGL\",\"description\":\"Bulgaria Lev\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BHD\",\"description\":\"Bahraini Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"BMD\",\"description\":\"Bermudian Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BND\",\"description\":\"Brunei Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BOB\",\"description\":\"Bolivia Boliviano\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BRL\",\"description\":\"Brazilian Real\",\"exponent\":2,\"symbol\":\"R$\"},{\"currencyCode\":\"BSD\",\"description\":\"Bahamian Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BTN\",\"description\":\"Bhutan Ngultrum\",\"exponent\":2,\"symbol\":\"Nu.\"},{\"currencyCode\":\"BWP\",\"description\":\"Botswana Pula\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BYN\",\"description\":\"Belarusian Ruble\",\"exponent\":2,\"symbol\":\"Br\"},{\"currencyCode\":\"BYR\",\"description\":\"Belarusian Ruble\",\"exponent\":0,\"symbol\":\"Br\"},{\"currencyCode\":\"BZD\",\"description\":\"Belize Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CAD\",\"description\":\"Canadian Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"CHF\",\"description\":\"Swiss Franc\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CLP\",\"description\":\"Chilean Peso\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"CNY\",\"description\":\"Yuan Renminbi\",\"exponent\":2,\"symbol\":\"¥\"},{\"currencyCode\":\"COP\",\"description\":\"Colombian Peso\",\"exponent\":2,\"symbol\":\"₱\"},{\"currencyCode\":\"CRC\",\"description\":\"Costa Rican Colon\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CSD\",\"description\":\"Serbian Dinar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CUP\",\"description\":\"Cuban Peso\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CVE\",\"description\":\"Cape Verdi Escudo\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"CZK\",\"description\":\"Czech Koruna\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"DJF\",\"description\":\"Djibouti Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"DKK\",\"description\":\"Danish Krone\",\"exponent\":2,\"symbol\":\"kr\"},{\"currencyCode\":\"DOP\",\"description\":\"Dominican Republic Peso\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"DZD\",\"description\":\"Algerian Dinar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"EEK\",\"description\":\"Estonian Krone\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"EGP\",\"description\":\"Egyptian Pound\",\"exponent\":2,\"symbol\":\"£\"},{\"currencyCode\":\"ETB\",\"description\":\"Ethiopian Birr\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"EUR\",\"description\":\"Euro\",\"exponent\":2,\"symbol\":\"€\"},{\"currencyCode\":\"FJD\",\"description\":\"Fiji Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"FKP\",\"description\":\"Falkland Islands Pound\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GBP\",\"description\":\"Pound Sterling\",\"exponent\":2,\"symbol\":\"£\"},{\"currencyCode\":\"GEL\",\"description\":\"Georgian Lari\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GHC\",\"description\":\"Ghanaian Cedi (2nd)\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"GHS\",\"description\":\"Ghanaian Cedi (3rd)\",\"exponent\":2,\"symbol\":\"GH₵\"},{\"currencyCode\":\"GIP\",\"description\":\"Gibraltar Pound\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GMD\",\"description\":\"Gambia Delasi\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GNF\",\"description\":\"Guinea Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"GTQ\",\"description\":\"Guatemala Quetzal\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GYD\",\"description\":\"Guyanese Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HKD\",\"description\":\"Hong Kong Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"HNL\",\"description\":\"Honduras Lempira\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HRK\",\"description\":\"Croatia Kuna\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HTG\",\"description\":\"Haitian Gourde\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HUF\",\"description\":\"Hungarian Forint\",\"exponent\":2,\"symbol\":\"Ft\"},{\"currencyCode\":\"IDR\",\"description\":\"Indonesian Rupiah\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"ILS\",\"description\":\"New Israeli Scheqel\",\"exponent\":2,\"symbol\":\"₪\"},{\"currencyCode\":\"INR\",\"description\":\"Indian Rupee\",\"exponent\":2,\"symbol\":\"₨\"},{\"currencyCode\":\"IQD\",\"description\":\"Iraqi Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"ISK\",\"description\":\"Iceland Krona\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"JMD\",\"description\":\"Jamaican Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"JOD\",\"description\":\"Jordanian Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"JPY\",\"description\":\"Japanese Yen\",\"exponent\":0,\"symbol\":\"¥\"},{\"currencyCode\":\"KES\",\"description\":\"Kenyan Shilling\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KGS\",\"description\":\"Kyrgyzstan Som\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KHR\",\"description\":\"Cambodia Riel\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KMF\",\"description\":\"Comoro Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"KRW\",\"description\":\"South-Korean Won\",\"exponent\":0,\"symbol\":\"₩\"},{\"currencyCode\":\"KWD\",\"description\":\"Kuwaiti Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"KYD\",\"description\":\"Cayman Islands Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KZT\",\"description\":\"Kazakhstani Tenge\",\"exponent\":2,\"symbol\":\"8\"},{\"currencyCode\":\"LAK\",\"description\":\"Laos Kip\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"LBP\",\"description\":\"Lebanese Pound\",\"exponent\":2,\"symbol\":\"£\"},{\"currencyCode\":\"LKR\",\"description\":\"Sri Lanka Rupee\",\"exponent\":2,\"symbol\":\"₨\"},{\"currencyCode\":\"LTL\",\"description\":\"Lithunianian Litas\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"LVL\",\"description\":\"Latvian Lats\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"LYD\",\"description\":\"Libyan Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"MAD\",\"description\":\"Moroccan Dirham\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MDL\",\"description\":\"Moldovia Leu\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MKD\",\"description\":\"Macedonian Denar\",\"exponent\":2,\"symbol\":\"ден\"},{\"currencyCode\":\"MMK\",\"description\":\"Myanmar Kyat\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MNT\",\"description\":\"Mongolia Tugrik\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MOP\",\"description\":\"Macau Pataca\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MRO\",\"description\":\"Mauritania Ouguiya\",\"exponent\":1,\"symbol\":\"\"},{\"currencyCode\":\"MRU\",\"description\":\"Mauritania Ouguiya\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MUR\",\"description\":\"Mauritius Rupee\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MVR\",\"description\":\"Maldives Rufiyaa\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MWK\",\"description\":\"Malawi Kwacha\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MXN\",\"description\":\"Mexican Peso\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"MXP\",\"description\":\"Mexican Peso\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MYR\",\"description\":\"Malaysian Ringgit\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MZN\",\"description\":\"Mozambican Metical\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NAD\",\"description\":\"Namibian Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"NGN\",\"description\":\"Nigerian naira\",\"exponent\":2,\"symbol\":\"&\"},{\"currencyCode\":\"NIO\",\"description\":\"Nicaragua Cordoba Oro\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NOK\",\"description\":\"Norwegian Krone\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NPR\",\"description\":\"Nepalese Rupee\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NZD\",\"description\":\"New Zealand Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"OMR\",\"description\":\"Rial Omani\",\"exponent\":3,\"symbol\":\"﷼\"},{\"currencyCode\":\"PAB\",\"description\":\"Panamanian Balboa\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"PEN\",\"description\":\"Peruvian Nuevo Sol\",\"exponent\":2,\"symbol\":\"S/.\"},{\"currencyCode\":\"PGK\",\"description\":\"New Guinea Kina\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"PHP\",\"description\":\"Philippine Peso\",\"exponent\":2,\"symbol\":\"₱\"},{\"currencyCode\":\"PKR\",\"description\":\"Pakistan Rupee\",\"exponent\":2,\"symbol\":\"₨\"},{\"currencyCode\":\"PLN\",\"description\":\"New Polish Zloty\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"PYG\",\"description\":\"Paraguay Guarani\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"QAR\",\"description\":\"Qatari Rial\",\"exponent\":2,\"symbol\":\"﷼\"},{\"currencyCode\":\"ROL\",\"description\":\"Romanian Lei\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"RON\",\"description\":\"New Romanian Lei\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"RSD\",\"description\":\"Serbian Dinar\",\"exponent\":2,\"symbol\":\"РСД\"},{\"currencyCode\":\"RUB\",\"description\":\"Russian Ruble\",\"exponent\":2,\"symbol\":\"руб\"},{\"currencyCode\":\"RWF\",\"description\":\"Rwanda Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"SAR\",\"description\":\"Saudi Riyal\",\"exponent\":2,\"symbol\":\"﷼\"},{\"currencyCode\":\"SBD\",\"description\":\"Solomon Island Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SCR\",\"description\":\"Seychelles Rupee\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SEK\",\"description\":\"Swedish Krone\",\"exponent\":2,\"symbol\":\"kr\"},{\"currencyCode\":\"SGD\",\"description\":\"Singapore Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"SHP\",\"description\":\"St. Helena Pound\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SKK\",\"description\":\"Slovak Koruna\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SLE\",\"description\":\"Sierra Leone Leone\",\"exponent\":2,\"symbol\":\"Le\"},{\"currencyCode\":\"SLL\",\"description\":\"Sierra Leone Leone\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SOS\",\"description\":\"Somalia Shilling\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SRD\",\"description\":\"Surinamese dollar\",\"exponent\":2,\"symbol\":\"Sr$\"},{\"currencyCode\":\"STD\",\"description\":\"Sao Tome & Principe Dobra\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"STN\",\"description\":\"Sao Tome & Principe Dobra\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SVC\",\"description\":\"El Salvador Colón\",\"exponent\":2,\"symbol\":\"₡\"},{\"currencyCode\":\"SZL\",\"description\":\"Swaziland Lilangeni\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"THB\",\"description\":\"Thai Baht\",\"exponent\":2,\"symbol\":\"฿\"},{\"currencyCode\":\"TND\",\"description\":\"Tunisian Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"TOP\",\"description\":\"Tonga Pa’anga\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"TRY\",\"description\":\"New Turkish Lira\",\"exponent\":2,\"symbol\":\"₤\"},{\"currencyCode\":\"TTD\",\"description\":\"Trinidad & Tobago Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"TWD\",\"description\":\"New Taiwan Dollar\",\"exponent\":2,\"symbol\":\"元\"},{\"currencyCode\":\"TZS\",\"description\":\"Tanzanian Shilling\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"UAH\",\"description\":\"Ukraine Hryvnia\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"UGX\",\"description\":\"Uganda Shilling\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"USD\",\"description\":\"US Dollars\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"UYU\",\"description\":\"Peso Uruguayo\",\"exponent\":2,\"symbol\":\"₱\"},{\"currencyCode\":\"UZS\",\"description\":\"Uzbekistani Som\",\"exponent\":2,\"symbol\":\"som\"},{\"currencyCode\":\"VEF\",\"description\":\"Venezuelan Bolívar\",\"exponent\":2,\"symbol\":\"Bs.F.\"},{\"currencyCode\":\"VND\",\"description\":\"Vietnamese New Dong\",\"exponent\":0,\"symbol\":\"₫\"},{\"currencyCode\":\"VUV\",\"description\":\"Vanuatu Vatu\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"WST\",\"description\":\"Samoan Tala\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"XAF\",\"description\":\"CFA Franc BEAC\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"XCD\",\"description\":\"East Carribean Dollar\",\"exponent\":2,\"symbol\":\"EC$\"},{\"currencyCode\":\"XOF\",\"description\":\"CFA Franc BCEAO\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"XPF\",\"description\":\"CFP Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"YER\",\"description\":\"Yemeni Rial\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ZAR\",\"description\":\"South African Rand\",\"exponent\":2,\"symbol\":\"R\"},{\"currencyCode\":\"ZMK\",\"description\":\"Zambia Kwacha\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ZMW\",\"description\":\"Zambian Kwacha\",\"exponent\":2,\"symbol\":\"\"}]");
|
|
1379
1312
|
//#endregion
|
|
@@ -1620,30 +1553,22 @@ var DEFAULT_CURRENCY_FALLBACK = "USD";
|
|
|
1620
1553
|
var getDefaultCurrencyForCountry = (country) => currencyByCountry[country]?.[0] ?? DEFAULT_CURRENCY_FALLBACK;
|
|
1621
1554
|
var getCountryCodeFromEvent = (event) => event?.target?.value;
|
|
1622
1555
|
function PayoutCountryDetails(props) {
|
|
1623
|
-
const { legalEntityResponse,
|
|
1556
|
+
const { legalEntityResponse, provider, fieldValidationErrors: fieldProblems } = props;
|
|
1624
1557
|
const { t: commonT } = useTranslation("common");
|
|
1625
1558
|
const { t } = useTranslation("banking");
|
|
1626
1559
|
const { isSettingEnabled } = useSettingsContext();
|
|
1560
|
+
const { form } = useFormContext();
|
|
1561
|
+
const { data, valid, errors, handleChange, requiredFields, optionalFields, trustedFields } = getFormSlice(form, "payoutCountryDetails");
|
|
1627
1562
|
const country = getLegalEntityCountry(legalEntityResponse);
|
|
1628
1563
|
const [isModalOpen, setIsModalOpen] = useState$1(false);
|
|
1629
1564
|
const legalEntityType = legalEntityResponse.type;
|
|
1630
1565
|
const defaultCurrency = getDefaultCurrencyForCountry(country);
|
|
1631
|
-
const
|
|
1566
|
+
const formUtils = createFormUtils({
|
|
1632
1567
|
...props,
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
},
|
|
1638
|
-
shouldValidate: true
|
|
1639
|
-
});
|
|
1640
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1641
|
-
const data = useMultiFormMode ? propData : localForm.data;
|
|
1642
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
1643
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
1644
|
-
const fieldProblems = useMultiFormMode ? propFieldValidationErrors : localForm.fieldProblems;
|
|
1645
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1646
|
-
const formUtils = createFormUtils(props, commonT);
|
|
1568
|
+
requiredFields,
|
|
1569
|
+
optionalFields,
|
|
1570
|
+
trustedFields
|
|
1571
|
+
}, commonT);
|
|
1647
1572
|
const allowedBankCountries = Object.keys(currencyByCountry);
|
|
1648
1573
|
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
1649
1574
|
const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
|
|
@@ -1681,22 +1606,6 @@ function PayoutCountryDetails(props) {
|
|
|
1681
1606
|
}) }
|
|
1682
1607
|
})
|
|
1683
1608
|
});
|
|
1684
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutCountryDetails");
|
|
1685
|
-
useEffect$1(() => {
|
|
1686
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
1687
|
-
data: localForm.data,
|
|
1688
|
-
valid: localForm.valid,
|
|
1689
|
-
errors: localForm.errors,
|
|
1690
|
-
fieldProblems: localForm.fieldProblems
|
|
1691
|
-
});
|
|
1692
|
-
}, [
|
|
1693
|
-
localForm.data,
|
|
1694
|
-
localForm.valid,
|
|
1695
|
-
localForm.errors,
|
|
1696
|
-
updateStateSlice,
|
|
1697
|
-
localForm.fieldProblems,
|
|
1698
|
-
useMultiFormMode
|
|
1699
|
-
]);
|
|
1700
1609
|
const updateCountryField = (event) => {
|
|
1701
1610
|
const updatedCountry = getCountryCodeFromEvent(event);
|
|
1702
1611
|
handleChange("bankCountry", "input")(updatedCountry);
|
|
@@ -2083,23 +1992,10 @@ var useInstantVerificationErrorNotification = (notificationVisibilityDuration) =
|
|
|
2083
1992
|
return [errorNotification, setErrorNotification];
|
|
2084
1993
|
};
|
|
2085
1994
|
function BankVerification(props) {
|
|
2086
|
-
const { setBankVerificationError, onBack, hideSidebar, setBankInfoValidated, bankInfoValidated, createTrustedTransferInstrument, country,
|
|
1995
|
+
const { setBankVerificationError, onBack, hideSidebar, setBankInfoValidated, bankInfoValidated, createTrustedTransferInstrument, country, provider } = props;
|
|
2087
1996
|
const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
|
|
2088
|
-
const
|
|
2089
|
-
const
|
|
2090
|
-
const localForm = useForm({
|
|
2091
|
-
...props,
|
|
2092
|
-
schema,
|
|
2093
|
-
defaultData: propData,
|
|
2094
|
-
rules: bankVerificationValidationRules,
|
|
2095
|
-
fieldProblems: fieldValidationErrors
|
|
2096
|
-
});
|
|
2097
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2098
|
-
const data = useMultiFormMode ? propData : localForm.data;
|
|
2099
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
2100
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
2101
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
2102
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1997
|
+
const { form } = useFormContext();
|
|
1998
|
+
const { data: propData, handleChange } = getFormSlice(form, "payoutAccountVerification");
|
|
2103
1999
|
const retrieveBankAccountInfo = async ({ realLastFour, number, bankName }) => {
|
|
2104
2000
|
handleChange("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
|
|
2105
2001
|
handleChange("verifiedBankName")(bankName);
|
|
@@ -2108,42 +2004,19 @@ function BankVerification(props) {
|
|
|
2108
2004
|
handleChange("verifiedCurrencyCode")(propData?.verifiedCurrencyCode ?? currencyByCountry[country]?.[0]);
|
|
2109
2005
|
setBankInfoValidated?.(true);
|
|
2110
2006
|
hideSidebar?.(false);
|
|
2111
|
-
if (!useMultiFormMode) localForm.triggerValidation();
|
|
2112
2007
|
await invalidateRootLegalEntity();
|
|
2113
2008
|
showInstantVerificationPayoutModal.value = false;
|
|
2114
2009
|
};
|
|
2115
|
-
useEffect$1(() => {
|
|
2116
|
-
if (!useMultiFormMode) stateRef.current.setState?.({
|
|
2117
|
-
type: "addToState",
|
|
2118
|
-
value: {
|
|
2119
|
-
data,
|
|
2120
|
-
valid,
|
|
2121
|
-
errors,
|
|
2122
|
-
fieldProblems,
|
|
2123
|
-
dataStoreId: id,
|
|
2124
|
-
schema
|
|
2125
|
-
}
|
|
2126
|
-
});
|
|
2127
|
-
}, [
|
|
2128
|
-
data,
|
|
2129
|
-
valid,
|
|
2130
|
-
errors,
|
|
2131
|
-
localForm.isValid,
|
|
2132
|
-
useMultiFormMode
|
|
2133
|
-
]);
|
|
2134
2010
|
if (provider) {
|
|
2135
2011
|
if (bankInfoValidated || !showInstantVerificationPayoutModal.value) return null;
|
|
2136
|
-
return /* @__PURE__ */
|
|
2137
|
-
owner: id,
|
|
2138
|
-
stateRef
|
|
2139
|
-
}), /* @__PURE__ */ jsx(BankVerificationOverlay, {
|
|
2012
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(BankVerificationOverlay, {
|
|
2140
2013
|
url: provider.redirectUrl,
|
|
2141
2014
|
setBankVerificationError,
|
|
2142
2015
|
onBack,
|
|
2143
2016
|
retrieveBankAccountInfo,
|
|
2144
2017
|
createTrustedTransferInstrument,
|
|
2145
2018
|
providerName: provider.name
|
|
2146
|
-
})
|
|
2019
|
+
}) });
|
|
2147
2020
|
}
|
|
2148
2021
|
}
|
|
2149
2022
|
//#endregion
|
|
@@ -2176,42 +2049,18 @@ function BankAccountFormat(props) {
|
|
|
2176
2049
|
var bankAccountNumberFields = ["bankAccountNumber"];
|
|
2177
2050
|
function BankAccountNumber(props) {
|
|
2178
2051
|
const { t } = useTranslation("common");
|
|
2179
|
-
const { country, fieldConfig = defaultFieldConfig$3, onFocus, onBlur,
|
|
2052
|
+
const { country, fieldConfig = defaultFieldConfig$3, onFocus, onBlur, fieldValidationErrors: fieldProblems } = props;
|
|
2053
|
+
const { form } = useFormContext();
|
|
2054
|
+
const { data, valid, errors, handleChange, obscuredFields } = getFormSlice(form, "payoutAccountDetails");
|
|
2180
2055
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$3);
|
|
2181
|
-
const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata,
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
schema: bankAccountNumberFields,
|
|
2185
|
-
rules: mergedProps.validators,
|
|
2186
|
-
defaultData: mergedProps.data,
|
|
2187
|
-
fieldProblems: mergedProps?.fieldValidationErrors,
|
|
2188
|
-
obscuredFields: mergedProps.obscuredFields
|
|
2056
|
+
const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, {
|
|
2057
|
+
...props,
|
|
2058
|
+
obscuredFields
|
|
2189
2059
|
});
|
|
2190
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2191
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
2192
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2193
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2194
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
2195
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2196
2060
|
const handleBlur = () => {
|
|
2197
2061
|
onBlur?.();
|
|
2198
2062
|
handleChange("bankAccountNumber", "blur");
|
|
2199
2063
|
};
|
|
2200
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2201
|
-
useEffect$1(() => {
|
|
2202
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2203
|
-
data,
|
|
2204
|
-
valid,
|
|
2205
|
-
errors,
|
|
2206
|
-
fieldProblems
|
|
2207
|
-
});
|
|
2208
|
-
}, [
|
|
2209
|
-
data,
|
|
2210
|
-
valid,
|
|
2211
|
-
errors,
|
|
2212
|
-
fieldProblems,
|
|
2213
|
-
useMultiFormMode
|
|
2214
|
-
]);
|
|
2215
2064
|
const formUtils = createFormUtils(mergedProps, t);
|
|
2216
2065
|
return /* @__PURE__ */ jsx(MaskedInput, {
|
|
2217
2066
|
name: "bankAccountNumber",
|
|
@@ -2233,38 +2082,11 @@ function BankAccountNumber(props) {
|
|
|
2233
2082
|
}
|
|
2234
2083
|
//#endregion
|
|
2235
2084
|
//#region src/components/BankAccount/fields/BankCity/BankCity.tsx
|
|
2236
|
-
var bankCityFields = ["bankCity"];
|
|
2237
2085
|
function BankCity(props) {
|
|
2238
2086
|
const { t } = useTranslation("common");
|
|
2239
|
-
const {
|
|
2240
|
-
const
|
|
2241
|
-
|
|
2242
|
-
schema: bankCityFields,
|
|
2243
|
-
rules: validators,
|
|
2244
|
-
defaultData: bankCityData,
|
|
2245
|
-
fieldProblems: fieldValidationErrors
|
|
2246
|
-
});
|
|
2247
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2248
|
-
const data = useMultiFormMode ? bankCityData : localForm.data;
|
|
2249
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2250
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2251
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
2252
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2253
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2254
|
-
useEffect$1(() => {
|
|
2255
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2256
|
-
data,
|
|
2257
|
-
valid,
|
|
2258
|
-
errors,
|
|
2259
|
-
fieldProblems
|
|
2260
|
-
});
|
|
2261
|
-
}, [
|
|
2262
|
-
data,
|
|
2263
|
-
valid,
|
|
2264
|
-
errors,
|
|
2265
|
-
fieldProblems,
|
|
2266
|
-
useMultiFormMode
|
|
2267
|
-
]);
|
|
2087
|
+
const { fieldValidationErrors: fieldProblems } = props;
|
|
2088
|
+
const { form } = useFormContext();
|
|
2089
|
+
const { data, valid, errors, handleChange } = getFormSlice(form, "payoutAccountDetails");
|
|
2268
2090
|
const formUtils = createFormUtils(props, t);
|
|
2269
2091
|
return /* @__PURE__ */ jsx(Field, {
|
|
2270
2092
|
name: "bankCity",
|
|
@@ -2288,38 +2110,11 @@ function BankCity(props) {
|
|
|
2288
2110
|
var bankCodeFields = ["bankCode"];
|
|
2289
2111
|
function BankCode(props) {
|
|
2290
2112
|
const { t } = useTranslation("common");
|
|
2291
|
-
const { country, fieldConfig = defaultFieldConfig$2,
|
|
2113
|
+
const { country, fieldConfig = defaultFieldConfig$2, fieldValidationErrors: fieldProblems } = props;
|
|
2114
|
+
const { form } = useFormContext();
|
|
2115
|
+
const { data, valid, errors, handleChange } = getFormSlice(form, "payoutAccountDetails");
|
|
2292
2116
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
|
|
2293
|
-
const
|
|
2294
|
-
const localForm = useForm({
|
|
2295
|
-
...mergedProps,
|
|
2296
|
-
schema: bankCodeFields,
|
|
2297
|
-
rules: mergedProps.validators,
|
|
2298
|
-
defaultData: mergedProps.data,
|
|
2299
|
-
fieldProblems: mergedProps.fieldValidationErrors
|
|
2300
|
-
});
|
|
2301
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2302
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
2303
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2304
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2305
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
2306
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2307
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2308
|
-
useEffect$1(() => {
|
|
2309
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2310
|
-
data,
|
|
2311
|
-
valid,
|
|
2312
|
-
errors,
|
|
2313
|
-
fieldProblems
|
|
2314
|
-
});
|
|
2315
|
-
}, [
|
|
2316
|
-
data,
|
|
2317
|
-
valid,
|
|
2318
|
-
errors,
|
|
2319
|
-
fieldProblems,
|
|
2320
|
-
useMultiFormMode
|
|
2321
|
-
]);
|
|
2322
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
2117
|
+
const formUtils = createFormUtils(mergeFieldMetadataIntoProps("bankCode", metadata, props), t);
|
|
2323
2118
|
return /* @__PURE__ */ jsx(MaskedInput, {
|
|
2324
2119
|
name: "bankCode",
|
|
2325
2120
|
type: "text",
|
|
@@ -2341,35 +2136,9 @@ function BankCode(props) {
|
|
|
2341
2136
|
var bankNameFields = ["bankName"];
|
|
2342
2137
|
function BankName(props) {
|
|
2343
2138
|
const { t } = useTranslation("common");
|
|
2344
|
-
const {
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2347
|
-
schema: bankNameFields,
|
|
2348
|
-
rules: validators,
|
|
2349
|
-
defaultData: bankNameData,
|
|
2350
|
-
fieldProblems: fieldValidationErrors
|
|
2351
|
-
});
|
|
2352
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2353
|
-
const data = useMultiFormMode ? bankNameData : localForm.data;
|
|
2354
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2355
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2356
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
2357
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2358
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2359
|
-
useEffect$1(() => {
|
|
2360
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2361
|
-
data,
|
|
2362
|
-
valid,
|
|
2363
|
-
errors,
|
|
2364
|
-
fieldProblems
|
|
2365
|
-
});
|
|
2366
|
-
}, [
|
|
2367
|
-
data,
|
|
2368
|
-
valid,
|
|
2369
|
-
errors,
|
|
2370
|
-
fieldProblems,
|
|
2371
|
-
useMultiFormMode
|
|
2372
|
-
]);
|
|
2139
|
+
const { fieldValidationErrors: fieldProblems } = props;
|
|
2140
|
+
const { form } = useFormContext();
|
|
2141
|
+
const { data, valid, errors, handleChange } = getFormSlice(form, "payoutAccountDetails");
|
|
2373
2142
|
const formUtils = createFormUtils(props, t);
|
|
2374
2143
|
return /* @__PURE__ */ jsx(Field, {
|
|
2375
2144
|
name: "bankName",
|
|
@@ -2393,41 +2162,15 @@ function BankName(props) {
|
|
|
2393
2162
|
var branchCodeFields = ["branchCode"];
|
|
2394
2163
|
function BranchCode(props) {
|
|
2395
2164
|
const { t } = useTranslation("common");
|
|
2396
|
-
const { country, fieldConfig = defaultFieldConfig$1, onFocus, onBlur,
|
|
2165
|
+
const { country, fieldConfig = defaultFieldConfig$1, onFocus, onBlur, fieldValidationErrors: fieldProblems } = props;
|
|
2166
|
+
const { form } = useFormContext();
|
|
2167
|
+
const { data, valid, errors, handleChange } = getFormSlice(form, "payoutAccountDetails");
|
|
2397
2168
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$1);
|
|
2398
2169
|
const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
|
|
2399
|
-
const localForm = useForm({
|
|
2400
|
-
...mergedProps,
|
|
2401
|
-
schema: branchCodeFields,
|
|
2402
|
-
rules: mergedProps.validators,
|
|
2403
|
-
defaultData: mergedProps.data,
|
|
2404
|
-
fieldProblems: mergedProps?.fieldValidationErrors
|
|
2405
|
-
});
|
|
2406
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2407
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
2408
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2409
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2410
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
2411
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2412
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2413
2170
|
const handleBlur = () => {
|
|
2414
2171
|
onBlur?.();
|
|
2415
2172
|
handleChange("branchCode", "blur");
|
|
2416
2173
|
};
|
|
2417
|
-
useEffect$1(() => {
|
|
2418
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2419
|
-
data,
|
|
2420
|
-
valid,
|
|
2421
|
-
errors,
|
|
2422
|
-
fieldProblems
|
|
2423
|
-
});
|
|
2424
|
-
}, [
|
|
2425
|
-
data,
|
|
2426
|
-
valid,
|
|
2427
|
-
errors,
|
|
2428
|
-
fieldProblems,
|
|
2429
|
-
useMultiFormMode
|
|
2430
|
-
]);
|
|
2431
2174
|
const formUtils = createFormUtils(mergedProps, t);
|
|
2432
2175
|
return /* @__PURE__ */ jsx(MaskedInput, {
|
|
2433
2176
|
name: "branchCode",
|
|
@@ -2451,39 +2194,14 @@ function BranchCode(props) {
|
|
|
2451
2194
|
var ibanFields = ["iban"];
|
|
2452
2195
|
function Iban(props) {
|
|
2453
2196
|
const { t } = useTranslation("common");
|
|
2454
|
-
const { country, fieldConfig = defaultFieldConfig,
|
|
2197
|
+
const { country, fieldConfig = defaultFieldConfig, fieldValidationErrors: fieldProblems } = props;
|
|
2198
|
+
const { form } = useFormContext();
|
|
2199
|
+
const { data, valid, errors, handleChange, obscuredFields } = getFormSlice(form, "payoutAccountDetails");
|
|
2455
2200
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata);
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
...mergedProps,
|
|
2459
|
-
schema: ibanFields,
|
|
2460
|
-
rules: mergedProps.validators,
|
|
2461
|
-
defaultData: ibanData,
|
|
2462
|
-
fieldProblems: fieldValidationErrors,
|
|
2201
|
+
const formUtils = createFormUtils(mergeFieldMetadataIntoProps("iban", metadata, {
|
|
2202
|
+
...props,
|
|
2463
2203
|
obscuredFields
|
|
2464
|
-
});
|
|
2465
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2466
|
-
const data = useMultiFormMode ? ibanData : localForm.data;
|
|
2467
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2468
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2469
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
2470
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2471
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2472
|
-
useEffect$1(() => {
|
|
2473
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2474
|
-
data,
|
|
2475
|
-
valid,
|
|
2476
|
-
errors,
|
|
2477
|
-
fieldProblems
|
|
2478
|
-
});
|
|
2479
|
-
}, [
|
|
2480
|
-
data,
|
|
2481
|
-
errors,
|
|
2482
|
-
valid,
|
|
2483
|
-
fieldProblems,
|
|
2484
|
-
useMultiFormMode
|
|
2485
|
-
]);
|
|
2486
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
2204
|
+
}), t);
|
|
2487
2205
|
return /* @__PURE__ */ jsx(MaskedInput, {
|
|
2488
2206
|
name: "iban",
|
|
2489
2207
|
type: "text",
|
|
@@ -2506,37 +2224,10 @@ function Iban(props) {
|
|
|
2506
2224
|
var swiftCodeFields = ["swiftCode"];
|
|
2507
2225
|
function SwiftCode(props) {
|
|
2508
2226
|
const { t } = useTranslation("common");
|
|
2509
|
-
const {
|
|
2510
|
-
const
|
|
2511
|
-
const
|
|
2512
|
-
|
|
2513
|
-
schema: swiftCodeFields,
|
|
2514
|
-
rules: mergedProps.validators,
|
|
2515
|
-
defaultData: mergedProps.data,
|
|
2516
|
-
fieldProblems: mergedProps?.fieldValidationErrors
|
|
2517
|
-
});
|
|
2518
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2519
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
2520
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2521
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2522
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
2523
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2524
|
-
const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2525
|
-
useEffect$1(() => {
|
|
2526
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
2527
|
-
data,
|
|
2528
|
-
valid,
|
|
2529
|
-
errors,
|
|
2530
|
-
fieldProblems
|
|
2531
|
-
});
|
|
2532
|
-
}, [
|
|
2533
|
-
data,
|
|
2534
|
-
valid,
|
|
2535
|
-
errors,
|
|
2536
|
-
fieldProblems,
|
|
2537
|
-
useMultiFormMode
|
|
2538
|
-
]);
|
|
2539
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
2227
|
+
const { fieldValidationErrors: fieldProblems, country } = props;
|
|
2228
|
+
const { form } = useFormContext();
|
|
2229
|
+
const { data, valid, errors, handleChange } = getFormSlice(form, "payoutAccountDetails");
|
|
2230
|
+
const formUtils = createFormUtils(mergeFieldMetadataIntoProps("swiftCode", swiftCodeFieldMetadata, props), t);
|
|
2540
2231
|
return /* @__PURE__ */ jsx(MaskedInput, {
|
|
2541
2232
|
name: "swiftCode",
|
|
2542
2233
|
type: "text",
|
|
@@ -2788,22 +2479,18 @@ function PayoutAccount(props) {
|
|
|
2788
2479
|
const { isSettingEnabled } = useSettingsContext();
|
|
2789
2480
|
const isCrossBorderPayoutsEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
|
|
2790
2481
|
const bankAccountFormatSelectionAllowed = isSettingEnabled(SettingNames.AllowBankAccountFormatSelection);
|
|
2791
|
-
const { heading, country, id, legalEntityResponse,
|
|
2482
|
+
const { heading, country, id, legalEntityResponse, arePayoutAccountDetailsInvalid, invalidFieldNames, formVerificationErrors, fieldValidationErrors, preferredCurrencyCode, showInstantVerificationCTA, provider } = props;
|
|
2483
|
+
const { form } = useFormContext();
|
|
2484
|
+
const { data, requiredFields = [], optionalFields, trustedFields, obscuredFields } = getFormSlice(form, "payoutAccountDetails");
|
|
2792
2485
|
const showCheckGuidance = shouldShowCheckGuidance(country) && !showInstantVerificationCTA;
|
|
2793
2486
|
const formUtils = createFormUtils({
|
|
2794
2487
|
...props,
|
|
2795
|
-
requiredFields
|
|
2488
|
+
requiredFields,
|
|
2489
|
+
optionalFields,
|
|
2490
|
+
trustedFields,
|
|
2491
|
+
obscuredFields
|
|
2796
2492
|
}, commonT);
|
|
2797
|
-
const bankAccountNumberProps = getFieldProps(props, bankAccountNumberFields);
|
|
2798
|
-
const swiftCodeProps = getFieldProps(props, swiftCodeFields);
|
|
2799
|
-
const ibanProps = getFieldProps(props, ibanFields);
|
|
2800
|
-
const branchCodeProps = getFieldProps(props, branchCodeFields);
|
|
2801
|
-
const bankNameProps = getFieldProps(props, bankNameFields);
|
|
2802
|
-
const bankCodeProps = getFieldProps(props, bankCodeFields);
|
|
2803
|
-
const bankCityProps = getFieldProps(props, bankCityFields);
|
|
2804
|
-
const { clearStateSlice } = useGlobalDataSlice("payoutAccountDetails");
|
|
2805
2493
|
const handleAccountFormatChange = (accountFormat) => {
|
|
2806
|
-
clearStateSlice();
|
|
2807
2494
|
payoutAccountFormat.value = accountFormat;
|
|
2808
2495
|
};
|
|
2809
2496
|
const localCurrency = isCrossBorderPayoutsEnabled ? isLocalCurrency(country, preferredCurrencyCode) : true;
|
|
@@ -2816,13 +2503,6 @@ function PayoutAccount(props) {
|
|
|
2816
2503
|
}
|
|
2817
2504
|
if (!localCurrency) handleAccountFormatChange?.("numberAndBic");
|
|
2818
2505
|
}, [country, preferredCurrencyCode]);
|
|
2819
|
-
const multiFormProps = handleFieldChange ? {
|
|
2820
|
-
data,
|
|
2821
|
-
valid,
|
|
2822
|
-
errors,
|
|
2823
|
-
fieldValidationErrors,
|
|
2824
|
-
handleFieldChange
|
|
2825
|
-
} : {};
|
|
2826
2506
|
return /* @__PURE__ */ jsxs("form", {
|
|
2827
2507
|
"aria-describedby": "ariaErrorField",
|
|
2828
2508
|
children: [
|
|
@@ -2846,48 +2526,41 @@ function PayoutAccount(props) {
|
|
|
2846
2526
|
handleAccountFormatChange
|
|
2847
2527
|
}),
|
|
2848
2528
|
formUtils.isRequiredField("branchCode") && /* @__PURE__ */ jsx(BranchCode, {
|
|
2849
|
-
...branchCodeProps,
|
|
2850
2529
|
country,
|
|
2851
2530
|
dataStoreId: id,
|
|
2531
|
+
fieldValidationErrors,
|
|
2852
2532
|
onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
|
|
2853
|
-
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
2854
|
-
...multiFormProps
|
|
2533
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
2855
2534
|
}),
|
|
2856
2535
|
formUtils.isRequiredField("bankAccountNumber") && /* @__PURE__ */ jsx(BankAccountNumber, {
|
|
2857
|
-
...bankAccountNumberProps,
|
|
2858
2536
|
country,
|
|
2859
2537
|
dataStoreId: id,
|
|
2538
|
+
fieldValidationErrors,
|
|
2860
2539
|
onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
|
|
2861
|
-
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
2862
|
-
...multiFormProps
|
|
2540
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
2863
2541
|
}),
|
|
2864
2542
|
formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, {
|
|
2865
|
-
...ibanProps,
|
|
2866
2543
|
dataStoreId: id,
|
|
2867
2544
|
country,
|
|
2868
|
-
|
|
2545
|
+
fieldValidationErrors
|
|
2869
2546
|
}),
|
|
2870
2547
|
formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, {
|
|
2871
|
-
...swiftCodeProps,
|
|
2872
2548
|
dataStoreId: id,
|
|
2873
|
-
|
|
2874
|
-
|
|
2549
|
+
country,
|
|
2550
|
+
fieldValidationErrors
|
|
2875
2551
|
}),
|
|
2876
2552
|
formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, {
|
|
2877
|
-
...bankNameProps,
|
|
2878
2553
|
dataStoreId: id,
|
|
2879
|
-
|
|
2554
|
+
fieldValidationErrors
|
|
2880
2555
|
}),
|
|
2881
2556
|
formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, {
|
|
2882
|
-
...bankCodeProps,
|
|
2883
2557
|
country,
|
|
2884
2558
|
dataStoreId: id,
|
|
2885
|
-
|
|
2559
|
+
fieldValidationErrors
|
|
2886
2560
|
}),
|
|
2887
2561
|
formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, {
|
|
2888
|
-
...bankCityProps,
|
|
2889
2562
|
dataStoreId: id,
|
|
2890
|
-
|
|
2563
|
+
fieldValidationErrors
|
|
2891
2564
|
}),
|
|
2892
2565
|
shouldShowPayoutAlert(country) && !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(Alert, {
|
|
2893
2566
|
title: getSupportedCurrencyGuidance(t, country, requiredFields),
|
|
@@ -2987,7 +2660,7 @@ var payoutVerificationMethodFields = [
|
|
|
2987
2660
|
...accountVerificationFields
|
|
2988
2661
|
];
|
|
2989
2662
|
function PayoutVerificationMethod(props) {
|
|
2990
|
-
const { heading, country, accountHolder, provider, bankVendorsLoadingStatus, instantVerificationAvailable, legalEntityResponse,
|
|
2663
|
+
const { heading, country, accountHolder, provider, bankVendorsLoadingStatus, instantVerificationAvailable, legalEntityResponse, bankInfoValidated, fieldValidationErrors: fieldProblems, formVerificationErrors } = props;
|
|
2991
2664
|
const { type: legalEntityType } = legalEntityResponse;
|
|
2992
2665
|
const { t } = useTranslation("banking");
|
|
2993
2666
|
const { t: commonT } = useTranslation("common");
|
|
@@ -2997,46 +2670,14 @@ function PayoutVerificationMethod(props) {
|
|
|
2997
2670
|
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
2998
2671
|
const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout);
|
|
2999
2672
|
const [hasSelectedMethod, setHasSelectedMethod] = useState$1(false);
|
|
3000
|
-
const
|
|
2673
|
+
const { form } = useFormContext();
|
|
2674
|
+
const { data, valid, errors, handleChange, requiredFields, optionalFields, trustedFields } = getFormSlice(form, "payoutVerificationMethod");
|
|
2675
|
+
const formUtils = createFormUtils({
|
|
3001
2676
|
...props,
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
bankCountry: country,
|
|
3007
|
-
...payoutVerificationMethodData
|
|
3008
|
-
},
|
|
3009
|
-
rules: validators || { payoutVerificationMethod: {
|
|
3010
|
-
modes: ["blur"],
|
|
3011
|
-
validate: (payoutVerificationMethod) => !!payoutVerificationMethod
|
|
3012
|
-
} },
|
|
3013
|
-
fieldProblems: fieldValidationErrors
|
|
3014
|
-
});
|
|
3015
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
3016
|
-
const data = useMultiFormMode ? payoutVerificationMethodData : localForm.data;
|
|
3017
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
3018
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
3019
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
3020
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
3021
|
-
const formUtils = createFormUtils(props, commonT);
|
|
3022
|
-
const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
|
|
3023
|
-
const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
|
|
3024
|
-
useEffect$1(() => {
|
|
3025
|
-
if (!useMultiFormMode) updateStateSlice({
|
|
3026
|
-
data: {
|
|
3027
|
-
...sliceData,
|
|
3028
|
-
...localForm.data
|
|
3029
|
-
},
|
|
3030
|
-
errors: localForm.errors,
|
|
3031
|
-
valid: localForm.valid,
|
|
3032
|
-
fieldProblems: localForm.fieldProblems
|
|
3033
|
-
});
|
|
3034
|
-
}, [
|
|
3035
|
-
localForm.data,
|
|
3036
|
-
localForm.errors,
|
|
3037
|
-
localForm.fieldProblems,
|
|
3038
|
-
localForm.valid
|
|
3039
|
-
]);
|
|
2677
|
+
requiredFields,
|
|
2678
|
+
optionalFields,
|
|
2679
|
+
trustedFields
|
|
2680
|
+
}, commonT);
|
|
3040
2681
|
const methodsMetadata = makePayoutVerificationMethodsMetadata(provider?.name);
|
|
3041
2682
|
const selectVerificationMethod = (method) => {
|
|
3042
2683
|
setHasSelectedMethod(true);
|
|
@@ -3063,10 +2704,7 @@ function PayoutVerificationMethod(props) {
|
|
|
3063
2704
|
labels: { country: t(($) => $["bankAccountCountryRegion"]) },
|
|
3064
2705
|
readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
|
|
3065
2706
|
allowedCountries: allowedBankCountries,
|
|
3066
|
-
handleChangeFor: () => (
|
|
3067
|
-
if (!useMultiFormMode) clearPayoutAccountDetails();
|
|
3068
|
-
return handleChange("bankCountry", "input")(e);
|
|
3069
|
-
},
|
|
2707
|
+
handleChangeFor: () => handleChange("bankCountry", "input"),
|
|
3070
2708
|
helperText: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(($) => $[legalEntityType === LegalEntityTypes.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"])
|
|
3071
2709
|
});
|
|
3072
2710
|
const description = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
|
|
@@ -3137,7 +2775,7 @@ function PayoutVerificationMethod(props) {
|
|
|
3137
2775
|
}),
|
|
3138
2776
|
/* @__PURE__ */ jsx(ErrorPanel, {
|
|
3139
2777
|
verificationErrors: formVerificationErrors,
|
|
3140
|
-
validationErrors:
|
|
2778
|
+
validationErrors: fieldProblems,
|
|
3141
2779
|
formUtils,
|
|
3142
2780
|
id: "ariaErrorField"
|
|
3143
2781
|
}),
|
|
@@ -3245,15 +2883,7 @@ function PayoutDetailsMultiform({ activeForm, shouldValidate, problems = {}, cou
|
|
|
3245
2883
|
provider,
|
|
3246
2884
|
shouldValidate,
|
|
3247
2885
|
fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
|
|
3248
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {}
|
|
3249
|
-
data: form.data.payoutCountryDetails,
|
|
3250
|
-
errors: form.errors.payoutCountryDetails,
|
|
3251
|
-
valid: form.valid.payoutCountryDetails,
|
|
3252
|
-
allFields: form.allFields?.payoutCountryDetails,
|
|
3253
|
-
requiredFields: form.requiredFields?.payoutCountryDetails,
|
|
3254
|
-
optionalFields: form.optionalFields?.payoutCountryDetails,
|
|
3255
|
-
trustedFields: form.trustedFields?.payoutCountryDetails,
|
|
3256
|
-
handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutCountryDetails", mode)
|
|
2886
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {}
|
|
3257
2887
|
});
|
|
3258
2888
|
case PayoutVerificationMethodFormID: return /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, {
|
|
3259
2889
|
value: instantVerificationError,
|
|
@@ -3269,15 +2899,7 @@ function PayoutDetailsMultiform({ activeForm, shouldValidate, problems = {}, cou
|
|
|
3269
2899
|
instantVerificationAvailable,
|
|
3270
2900
|
shouldValidate,
|
|
3271
2901
|
fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
|
|
3272
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {}
|
|
3273
|
-
data: form.data.payoutVerificationMethod,
|
|
3274
|
-
errors: form.errors.payoutVerificationMethod,
|
|
3275
|
-
valid: form.valid.payoutVerificationMethod,
|
|
3276
|
-
allFields: form.allFields?.payoutVerificationMethod,
|
|
3277
|
-
requiredFields: form.requiredFields?.payoutVerificationMethod,
|
|
3278
|
-
optionalFields: form.optionalFields?.payoutVerificationMethod,
|
|
3279
|
-
trustedFields: form.trustedFields?.payoutVerificationMethod,
|
|
3280
|
-
handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutVerificationMethod", mode)
|
|
2902
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {}
|
|
3281
2903
|
})
|
|
3282
2904
|
});
|
|
3283
2905
|
case PayoutAccountDetailsFormID: return /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, {
|
|
@@ -3293,15 +2915,6 @@ function PayoutDetailsMultiform({ activeForm, shouldValidate, problems = {}, cou
|
|
|
3293
2915
|
shouldValidate,
|
|
3294
2916
|
fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
|
|
3295
2917
|
formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {},
|
|
3296
|
-
data: form.data.payoutAccountDetails,
|
|
3297
|
-
errors: form.errors.payoutAccountDetails,
|
|
3298
|
-
valid: form.valid.payoutAccountDetails,
|
|
3299
|
-
allFields: form.allFields?.payoutAccountDetails,
|
|
3300
|
-
requiredFields: form.requiredFields?.payoutAccountDetails,
|
|
3301
|
-
optionalFields: form.optionalFields?.payoutAccountDetails,
|
|
3302
|
-
trustedFields: form.trustedFields?.payoutAccountDetails,
|
|
3303
|
-
obscuredFields: form.obscuredFields?.payoutAccountDetails,
|
|
3304
|
-
handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutAccountDetails", mode),
|
|
3305
2918
|
showInstantVerificationCTA,
|
|
3306
2919
|
provider
|
|
3307
2920
|
})
|
|
@@ -3313,14 +2926,6 @@ function PayoutDetailsMultiform({ activeForm, shouldValidate, problems = {}, cou
|
|
|
3313
2926
|
shouldValidate,
|
|
3314
2927
|
fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
|
|
3315
2928
|
formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {},
|
|
3316
|
-
data: form.data.payoutAccountDocuments,
|
|
3317
|
-
errors: form.errors.payoutAccountDocuments,
|
|
3318
|
-
valid: form.valid.payoutAccountDocuments,
|
|
3319
|
-
allFields: form.allFields?.payoutAccountDocuments,
|
|
3320
|
-
requiredFields: form.requiredFields?.payoutAccountDocuments,
|
|
3321
|
-
optionalFields: form.optionalFields?.payoutAccountDocuments,
|
|
3322
|
-
trustedFields: form.trustedFields?.payoutAccountDocuments,
|
|
3323
|
-
handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutAccountDocuments", mode),
|
|
3324
2929
|
handleNextClick
|
|
3325
2930
|
});
|
|
3326
2931
|
default: return null;
|
|
@@ -3342,15 +2947,7 @@ function PayoutDetailsMultiform({ activeForm, shouldValidate, problems = {}, cou
|
|
|
3342
2947
|
createTrustedTransferInstrument,
|
|
3343
2948
|
shouldValidate,
|
|
3344
2949
|
fieldValidationErrors: problems.validationErrors?.[PayoutAccountVerificationFormID] ?? {},
|
|
3345
|
-
formVerificationErrors: problems.verificationErrors?.[PayoutAccountVerificationFormID] ?? {}
|
|
3346
|
-
data: form.data.payoutAccountVerification,
|
|
3347
|
-
errors: form.errors.payoutAccountVerification,
|
|
3348
|
-
valid: form.valid.payoutAccountVerification,
|
|
3349
|
-
allFields: form.allFields?.payoutAccountVerification,
|
|
3350
|
-
requiredFields: form.requiredFields?.payoutAccountVerification,
|
|
3351
|
-
optionalFields: form.optionalFields?.payoutAccountVerification,
|
|
3352
|
-
trustedFields: form.trustedFields?.payoutAccountVerification,
|
|
3353
|
-
handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutAccountVerification", mode)
|
|
2950
|
+
formVerificationErrors: problems.verificationErrors?.[PayoutAccountVerificationFormID] ?? {}
|
|
3354
2951
|
})
|
|
3355
2952
|
})] });
|
|
3356
2953
|
}
|