@saasquatch/mint-components 2.2.0 → 2.3.0-2
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/cjs/{data-8c8a08f6.js → data-89ac73dd.js} +2 -90
- package/dist/cjs/eventKeys-7af4df4d.js +5 -0
- package/dist/cjs/{keys-cff24974.js → keys-5a2c9ed2.js} +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/parseStates-d1effc19.js +16 -0
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +461 -339
- package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_47.cjs.entry.js} +450 -16
- package/dist/cjs/sqm-code-verification.cjs.entry.js +4 -5
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +893 -0
- package/dist/cjs/sqm-partner-info-modal-view-f6faecf5.js +149 -0
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +27 -9
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +30 -9
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +732 -326
- package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-0e1ddbe4.js} +34 -426
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
- package/dist/cjs/{usePayoutStatus-0192fccd.js → useIndirectTaxForm-c3c1ec56.js} +294 -5
- package/dist/cjs/utils-a3b3d05b.js +478 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +171 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +143 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +670 -0
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +276 -0
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +2 -2
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +209 -145
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -10
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -0
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +2 -2
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +223 -137
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +30 -10
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -0
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -0
- package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +16 -0
- package/dist/collection/components/sqm-widget-verification/keys.js +2 -0
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +3 -4
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -2
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +19 -9
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +486 -46
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +43 -11
- package/dist/collection/components/tax-and-cash/data.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +93 -37
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +738 -13
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +95 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +51 -12
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +59 -30
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +51 -2
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +10 -18
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +0 -25
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +34 -17
- package/dist/esm/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +5 -5
- package/dist/{mint-components/p-0c0d4065.js → esm/data-8698cbc6.js} +25 -5
- package/dist/esm/eventKeys-f76b6a03.js +3 -0
- package/dist/esm/{global-96c14d63.js → global-75e96214.js} +1 -1
- package/dist/esm/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
- package/dist/esm/keys-1054056a.js +8 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/parseStates-ed75e224.js +14 -0
- package/dist/esm/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +448 -326
- package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_47.entry.js} +454 -21
- package/dist/esm/sqm-close-button.entry.js +1 -1
- package/dist/esm/sqm-code-verification.entry.js +7 -8
- package/dist/esm/sqm-context-router.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +888 -0
- package/dist/esm/sqm-empty_4.entry.js +2 -2
- package/dist/esm/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
- package/dist/esm/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
- package/dist/esm/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +4 -4
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +3 -3
- package/dist/esm/sqm-partner-info-modal-view-d6f3a215.js +146 -0
- package/dist/esm/sqm-password-field.entry.js +2 -2
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +4 -4
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
- package/dist/esm/sqm-qr-code.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +32 -14
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +35 -14
- package/dist/esm/sqm-stencilbook.entry.js +708 -302
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-e1ba6009.js} +14 -403
- package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
- package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
- package/dist/esm/{usePayoutStatus-46c0c289.js → useIndirectTaxForm-b2888ea5.js} +292 -5
- package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +2 -2
- package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +2 -2
- package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +2 -2
- package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
- package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +3 -3
- package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
- package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
- package/dist/esm/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
- package/dist/esm/utils-4f5cd04c.js +467 -0
- package/dist/esm-es5/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +1 -1
- package/dist/esm-es5/data-8698cbc6.js +1 -0
- package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
- package/dist/esm-es5/{global-96c14d63.js → global-75e96214.js} +1 -1
- package/dist/esm-es5/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
- package/dist/esm-es5/keys-1054056a.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/parseStates-ed75e224.js +1 -0
- package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -0
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -0
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-d6f3a215.js +1 -0
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +1 -0
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
- package/dist/esm-es5/useIndirectTaxForm-b2888ea5.js +6 -0
- package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +1 -1
- package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +1 -1
- package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +1 -1
- package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
- package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +1 -1
- package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
- package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
- package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
- package/dist/esm-es5/utils-4f5cd04c.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-626b31cb.system.entry.js → p-025ddad2.system.entry.js} +1 -1
- package/dist/mint-components/{p-5b871e38.system.entry.js → p-02c0f88e.system.entry.js} +1 -1
- package/dist/mint-components/{p-f55ecf35.system.js → p-02e2b13b.system.js} +1 -1
- package/dist/mint-components/{p-a4f8abad.js → p-0766438e.js} +1 -1
- package/dist/mint-components/{p-205cfdcd.system.js → p-0815b973.system.js} +1 -1
- package/dist/mint-components/{p-db0a2afd.entry.js → p-092c2606.entry.js} +1 -1
- package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-099ce3d5.system.entry.js} +1 -1
- package/dist/mint-components/p-0a6489fa.entry.js +1 -0
- package/dist/mint-components/p-0afa6148.js +1 -0
- package/dist/mint-components/{p-fc284f91.system.entry.js → p-0b32e1d4.system.entry.js} +1 -1
- package/dist/mint-components/p-115dfc03.system.js +1 -0
- package/dist/mint-components/{p-7b59e13c.system.js → p-1317cc92.system.js} +1 -1
- package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-13bb56a8.system.entry.js} +1 -1
- package/dist/mint-components/{p-f8a09b0f.js → p-13d8ecad.js} +1 -1
- package/dist/mint-components/p-13f3a647.js +1 -0
- package/dist/mint-components/{p-61897e72.entry.js → p-14183edc.entry.js} +1 -1
- package/dist/mint-components/{p-8f2d03c7.entry.js → p-1599a178.entry.js} +1 -1
- package/dist/mint-components/{p-02499e08.entry.js → p-1b0326d1.entry.js} +1 -1
- package/dist/mint-components/p-1d398dbc.entry.js +11 -0
- package/dist/mint-components/p-1d86895f.system.js +1 -0
- package/dist/mint-components/p-1e6a2945.js +1 -0
- package/dist/mint-components/{p-c8a3f3b0.js → p-1efb42e2.js} +1 -1
- package/dist/mint-components/p-1f387c7b.system.js +1 -0
- package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-209157a9.system.entry.js} +1 -1
- package/dist/mint-components/{p-30c1ef36.system.js → p-2190dc73.system.js} +1 -1
- package/dist/mint-components/{p-80e116ec.system.entry.js → p-24f1d342.system.entry.js} +1 -1
- package/dist/mint-components/{p-6668f9f0.entry.js → p-27daf264.entry.js} +1 -1
- package/dist/mint-components/p-28ed2ae9.js +1 -0
- package/dist/mint-components/{p-09f7aacd.entry.js → p-29bc5f50.entry.js} +2 -2
- package/dist/mint-components/{p-738dce27.system.entry.js → p-2d3f7b76.system.entry.js} +1 -1
- package/dist/mint-components/p-2ed13619.entry.js +1 -0
- package/dist/mint-components/{p-c45a929a.system.entry.js → p-30cfe3e3.system.entry.js} +1 -1
- package/dist/mint-components/{p-d55c50af.system.js → p-31815fb6.system.js} +1 -1
- package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-3354cc75.system.entry.js} +1 -1
- package/dist/mint-components/{p-5bc5c61e.entry.js → p-335a5736.entry.js} +1 -1
- package/dist/mint-components/{p-e9485160.system.entry.js → p-33ca28ba.system.entry.js} +1 -1
- package/dist/mint-components/p-3596e241.entry.js +116 -0
- package/dist/mint-components/{p-8583ce0c.system.js → p-376c7608.system.js} +1 -1
- package/dist/mint-components/p-37e24621.system.entry.js +1 -0
- package/dist/mint-components/{p-95510f27.entry.js → p-38d04e4b.entry.js} +1 -1
- package/dist/mint-components/{p-e84b874c.js → p-3a41b39c.js} +1 -1
- package/dist/mint-components/{p-e5ea43b1.entry.js → p-3bbc0db2.entry.js} +2 -2
- package/dist/mint-components/{p-982d1f6f.entry.js → p-432a44de.entry.js} +3 -2
- package/dist/mint-components/{p-bab4929e.js → p-45230a44.js} +1 -1
- package/dist/mint-components/p-4691e9d5.system.js +1 -0
- package/dist/mint-components/{p-1d92c169.entry.js → p-4d73a616.entry.js} +1 -1
- package/dist/mint-components/{p-3bc62ca6.entry.js → p-4e3db52b.entry.js} +1 -1
- package/dist/mint-components/{p-3286ef38.js → p-4eaa3eb7.js} +1 -1
- package/dist/mint-components/{p-013564b3.entry.js → p-4eadbd5b.entry.js} +1 -1
- package/dist/mint-components/p-4f9dc974.js +1 -0
- package/dist/mint-components/{p-f7ca4cc4.system.entry.js → p-51ae6716.system.entry.js} +1 -1
- package/dist/mint-components/p-56b33268.system.entry.js +1 -0
- package/dist/mint-components/p-58c24352.system.js +6 -0
- package/dist/mint-components/p-5c52100b.js +117 -0
- package/dist/mint-components/{p-77b9cde8.system.js → p-5fdf0286.system.js} +1 -1
- package/dist/mint-components/{p-09348341.entry.js → p-60b1f3d9.entry.js} +1 -1
- package/dist/mint-components/{p-d005df28.system.entry.js → p-623a0a0b.system.entry.js} +1 -1
- package/dist/mint-components/{p-c30d0049.system.entry.js → p-6b4e5d94.system.entry.js} +1 -1
- package/dist/mint-components/{p-f4e36adf.system.entry.js → p-6f6c3ac6.system.entry.js} +1 -1
- package/dist/mint-components/p-6f8dde97.system.js +1 -0
- package/dist/mint-components/{p-43c31fd5.system.js → p-7628e56f.system.js} +1 -1
- package/dist/mint-components/{p-653db72e.entry.js → p-78e6dc8d.entry.js} +1 -1
- package/dist/mint-components/{p-f581aac7.js → p-7a091fa7.js} +1 -1
- package/dist/mint-components/{p-40bad95a.entry.js → p-7cbdf341.entry.js} +2 -2
- package/dist/mint-components/{p-044f930a.system.js → p-7d2d9ef9.system.js} +1 -1
- package/dist/mint-components/{p-5c4ba8a0.entry.js → p-7ea3f49c.entry.js} +1 -1
- package/dist/mint-components/{p-5ce78407.system.entry.js → p-81bc6dca.system.entry.js} +1 -1
- package/dist/mint-components/{p-f6528f8a.entry.js → p-84495fb8.entry.js} +1 -1
- package/dist/mint-components/{p-b96e90a2.system.entry.js → p-86d20b47.system.entry.js} +1 -1
- package/dist/mint-components/p-87f86492.js +1 -0
- package/dist/mint-components/{p-d0993bb9.js → p-8a6531d2.js} +1 -1
- package/dist/mint-components/p-8ae8968c.js +1 -0
- package/dist/mint-components/{p-7265bbcb.system.js → p-8e148cb0.system.js} +1 -1
- package/dist/mint-components/p-8f15bf17.entry.js +1 -0
- package/dist/mint-components/{p-b66f45d1.entry.js → p-921eb024.entry.js} +1 -1
- package/dist/mint-components/{p-f1374258.system.entry.js → p-925aa740.system.entry.js} +1 -1
- package/dist/mint-components/p-99eecdcb.system.entry.js +1 -0
- package/dist/mint-components/{p-e12754f5.system.entry.js → p-9a15cd5a.system.entry.js} +1 -1
- package/dist/mint-components/p-9c1f5317.system.js +1 -0
- package/dist/mint-components/{p-832aea99.js → p-9f48640d.js} +1 -1
- package/dist/mint-components/p-a38eece5.system.entry.js +1 -0
- package/dist/mint-components/p-a49d9288.entry.js +1 -0
- package/dist/mint-components/{p-90833864.system.entry.js → p-ab59c5eb.system.entry.js} +1 -1
- package/dist/mint-components/{p-e6240c72.js → p-abd717d4.js} +1 -1
- package/dist/mint-components/p-abe9f5b1.js +99 -0
- package/dist/mint-components/p-ae2f610e.system.js +1 -0
- package/dist/mint-components/p-b222bace.system.entry.js +1 -0
- package/dist/mint-components/{p-19c441b2.system.js → p-b2ad3fca.system.js} +1 -1
- package/dist/mint-components/{p-c8a8d231.entry.js → p-b3309d9b.entry.js} +2 -2
- package/dist/mint-components/p-b419f9ac.entry.js +299 -0
- package/dist/mint-components/{p-8962e023.js → p-b871d158.js} +1 -1
- package/dist/mint-components/p-b96ed8eb.js +1 -0
- package/dist/mint-components/p-badf28bb.system.js +1 -0
- package/dist/mint-components/{p-035d9b65.js → p-bb0b5e4b.js} +1 -1
- package/dist/mint-components/{p-52674798.entry.js → p-bcfdb510.entry.js} +1 -1
- package/dist/mint-components/p-be6a0dee.system.js +1 -0
- package/dist/mint-components/{p-642f2c89.js → p-bf9ab2d3.js} +1 -1
- package/dist/mint-components/{p-bc386a7b.js → p-c0a85e22.js} +1 -1
- package/dist/mint-components/p-c0f8f977.system.entry.js +1 -0
- package/dist/mint-components/p-c41d536d.entry.js +1 -0
- package/dist/mint-components/{p-a0c5631b.system.js → p-c66e5217.system.js} +1 -1
- package/dist/mint-components/p-cdabd9de.system.js +1 -0
- package/dist/mint-components/p-cfc35705.system.entry.js +1 -0
- package/dist/mint-components/{p-0d83907e.js → p-cfea215d.js} +1 -1
- package/dist/mint-components/p-d08408b3.entry.js +1 -0
- package/dist/mint-components/{p-172675ca.system.js → p-d284ae70.system.js} +1 -1
- package/dist/mint-components/{p-027fc3be.system.entry.js → p-d34564f8.system.entry.js} +1 -1
- package/dist/mint-components/{p-1021a49f.system.entry.js → p-db6bf7cf.system.entry.js} +1 -1
- package/dist/mint-components/{p-4da5a3fe.system.entry.js → p-df897432.system.entry.js} +1 -1
- package/dist/mint-components/{p-036a2617.system.js → p-e651593c.system.js} +1 -1
- package/dist/mint-components/{p-f39cf252.system.entry.js → p-e6de31a7.system.entry.js} +1 -1
- package/dist/mint-components/{p-2668335b.js → p-e8e7af06.js} +1 -1
- package/dist/mint-components/{p-85721089.system.js → p-e920c95c.system.js} +1 -1
- package/dist/mint-components/{p-3366b81e.js → p-eae44b42.js} +2 -2
- package/dist/mint-components/p-ebc519bc.system.js +1 -0
- package/dist/mint-components/{p-af407cce.entry.js → p-ef32fa8f.entry.js} +1 -1
- package/dist/mint-components/{p-7efb8782.system.js → p-f32050f6.system.js} +1 -1
- package/dist/mint-components/{p-782af7ae.system.entry.js → p-f6de2e5c.system.entry.js} +1 -1
- package/dist/mint-components/{p-9390586b.system.entry.js → p-fa85ea51.system.entry.js} +1 -1
- package/dist/mint-components/p-ff013776.entry.js +9 -0
- package/dist/mint-components/p-ffcebe78.entry.js +83 -0
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +15 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +50 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +123 -0
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +17 -0
- package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +18 -1
- package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +19 -7
- package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
- package/dist/types/components/sqm-widget-verification/keys.d.ts +2 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +75 -7
- package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
- package/dist/types/components/tax-and-cash/data.d.ts +3 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +8 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +173 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +7 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -5
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -4
- package/dist/types/components.d.ts +644 -32
- package/dist/types/saasquatch.d.ts +2 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -4
- package/dist/cjs/extractProps-e9c55ba8.js +0 -35
- package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -418
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -214
- package/dist/esm/data-12e6aae1.js +0 -216
- package/dist/esm/extractProps-54064fb0.js +0 -32
- package/dist/esm/keys-406491dc.js +0 -6
- package/dist/esm/sqm-email-verification.entry.js +0 -414
- package/dist/esm/sqm-widget-verification.entry.js +0 -210
- package/dist/esm-es5/data-12e6aae1.js +0 -1
- package/dist/esm-es5/extractProps-54064fb0.js +0 -1
- package/dist/esm-es5/keys-406491dc.js +0 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +0 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
- package/dist/esm-es5/usePayoutStatus-46c0c289.js +0 -6
- package/dist/mint-components/p-00b235c5.system.entry.js +0 -1
- package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
- package/dist/mint-components/p-0797a946.js +0 -1
- package/dist/mint-components/p-13292317.entry.js +0 -11
- package/dist/mint-components/p-2d5c2bd4.system.entry.js +0 -1
- package/dist/mint-components/p-38c7775a.js +0 -1
- package/dist/mint-components/p-3adbfd0b.system.js +0 -6
- package/dist/mint-components/p-3af3e2c1.entry.js +0 -25
- package/dist/mint-components/p-5492dd51.system.entry.js +0 -1
- package/dist/mint-components/p-57dd28bd.system.js +0 -1
- package/dist/mint-components/p-5b1d2866.system.js +0 -1
- package/dist/mint-components/p-6c4ad51a.js +0 -1
- package/dist/mint-components/p-77fa2383.entry.js +0 -1
- package/dist/mint-components/p-7939e4af.entry.js +0 -1
- package/dist/mint-components/p-8285869e.entry.js +0 -9
- package/dist/mint-components/p-892797eb.system.entry.js +0 -1
- package/dist/mint-components/p-91a96e98.entry.js +0 -1
- package/dist/mint-components/p-b2b85238.entry.js +0 -1
- package/dist/mint-components/p-b395470f.entry.js +0 -16
- package/dist/mint-components/p-bba16a46.system.entry.js +0 -1
- package/dist/mint-components/p-be12607e.entry.js +0 -281
- package/dist/mint-components/p-bf188b72.system.entry.js +0 -1
- package/dist/mint-components/p-ca098be1.system.js +0 -1
- package/dist/mint-components/p-d18dedd4.js +0 -1
- package/dist/mint-components/p-d4f332a7.entry.js +0 -106
- package/dist/mint-components/p-d6193876.system.js +0 -1
- package/dist/mint-components/p-de0d6fd7.js +0 -49
- package/dist/mint-components/p-e00ec007.js +0 -1
- package/dist/mint-components/p-e55aafe9.system.js +0 -1
- package/dist/mint-components/p-ea03e50e.system.js +0 -1
- package/dist/mint-components/p-ec0b649a.entry.js +0 -1
- package/dist/mint-components/p-f8026ed6.system.js +0 -1
- package/dist/mint-components/p-fb804001.system.entry.js +0 -1
- package/dist/mint-components/p-fe70e20c.entry.js +0 -1
- package/dist/mint-components/p-ff118a19.system.js +0 -1
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as Host, g as getElement } from './index-38ad4957.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
3
|
-
import { m as useRef, k as useState, f as useEffect, n as h$1,
|
|
4
|
-
import { d as dist, _, L, J, q as Pn, F as Fn, r as $n, $ as $e, i as isDemo,
|
|
2
|
+
import { i as intl } from './global-75e96214.js';
|
|
3
|
+
import { m as useRef, k as useState, f as useEffect, n as h$1, b as browser, j as useReducer, u as useMemo } from './dom-context-hooks.module-50442785.js';
|
|
4
|
+
import { d as dist, _, L, J, q as Pn, F as Fn, r as $n, $ as $e, i as isDemo, p as En, b as useCallback, R as Rn, w as wn } from './index.module-02cb914c.js';
|
|
5
5
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import { g as getProps } from './utils-334c1e34.js';
|
|
8
8
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
9
9
|
import './mixins-f750863a.js';
|
|
10
10
|
import { G as GenericTableView } from './GenericTableView-8c72ac30.js';
|
|
11
|
-
import { u as useRerenderListener, a as useRequestRerender } from './re-render-
|
|
12
|
-
import { u as useChildElements } from './useChildElements-
|
|
11
|
+
import { u as useRerenderListener, a as useRequestRerender } from './re-render-bf46ba54.js';
|
|
12
|
+
import { u as useChildElements } from './useChildElements-06937df7.js';
|
|
13
13
|
import { l as luxon } from './luxon-1be92a8e.js';
|
|
14
|
-
import { g as generateUserError } from './useReferralTable-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
14
|
+
import { g as generateUserError } from './useReferralTable-03d32c6f.js';
|
|
15
|
+
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, U as UserInfoFormView } from './sqm-user-info-form-view-e1ba6009.js';
|
|
16
|
+
import { t as taxTypeToName, b as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, o as objectIsFull, A as ADDRESS_REGIONS } from './utils-4f5cd04c.js';
|
|
17
|
+
import { F as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE } from './data-8698cbc6.js';
|
|
18
|
+
import { c as VERIFICATION_EVENT_KEY } from './keys-1054056a.js';
|
|
19
|
+
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
20
|
+
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-b2888ea5.js';
|
|
19
21
|
|
|
20
22
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
|
|
22
24
|
const { errors, ...formState } = props.states.formState;
|
|
23
25
|
return {
|
|
24
26
|
0: {
|
|
@@ -27,44 +29,54 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
27
29
|
helpText: getValidationErrorMessage({
|
|
28
30
|
type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.beneficiaryAccountName) === null || _c === void 0 ? void 0 : _c.type,
|
|
29
31
|
label: props.text.beneficiaryAccountNameLabel,
|
|
32
|
+
errorCode: (_e = (_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.beneficiaryAccountName) === null || _e === void 0 ? void 0 : _e.errorCode,
|
|
33
|
+
fieldName: "beneficiaryAccountName",
|
|
30
34
|
}),
|
|
31
35
|
})))),
|
|
32
36
|
},
|
|
33
37
|
1: {
|
|
34
|
-
input: (h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((
|
|
38
|
+
input: (h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((_f = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _f === void 0 ? void 0 : _f.bankAccountType) && {
|
|
35
39
|
class: "error-input",
|
|
36
40
|
helpText: getValidationErrorMessage({
|
|
37
|
-
type: (
|
|
41
|
+
type: (_h = (_g = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _g === void 0 ? void 0 : _g.bankAccountType) === null || _h === void 0 ? void 0 : _h.type,
|
|
38
42
|
label: props.text.bankAccountTypeLabel,
|
|
43
|
+
errorCode: (_k = (_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.bankAccountType) === null || _k === void 0 ? void 0 : _k.errorCode,
|
|
44
|
+
fieldName: "bankAccountType",
|
|
39
45
|
}),
|
|
40
46
|
})),
|
|
41
47
|
h("sl-menu-item", { value: "CHECKING" }, props.text.checkingSelectItemLabel),
|
|
42
48
|
h("sl-menu-item", { value: "SAVINGS" }, props.text.savingsSelectItemLabel))),
|
|
43
49
|
},
|
|
44
50
|
2: {
|
|
45
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((
|
|
51
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.bankAccountNumber) && {
|
|
46
52
|
class: "error-input",
|
|
47
53
|
helpText: getValidationErrorMessage({
|
|
48
|
-
type: (
|
|
54
|
+
type: (_o = (_m = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _m === void 0 ? void 0 : _m.bankAccountNumber) === null || _o === void 0 ? void 0 : _o.type,
|
|
49
55
|
label: props.text.bankAccountNumberLabel,
|
|
56
|
+
errorCode: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.bankAccountNumber) === null || _q === void 0 ? void 0 : _q.errorCode,
|
|
57
|
+
fieldName: "bankAccountNumber",
|
|
50
58
|
}),
|
|
51
59
|
})))),
|
|
52
60
|
},
|
|
53
61
|
3: {
|
|
54
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((
|
|
62
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.bankAccountNumber) && {
|
|
55
63
|
class: "error-input",
|
|
56
64
|
helpText: getValidationErrorMessage({
|
|
57
|
-
type: (
|
|
65
|
+
type: (_t = (_s = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _s === void 0 ? void 0 : _s.bankAccountNumber) === null || _t === void 0 ? void 0 : _t.type,
|
|
58
66
|
label: props.text.ibanLabel,
|
|
67
|
+
errorCode: (_v = (_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.bankAccountNumber) === null || _v === void 0 ? void 0 : _v.errorCode,
|
|
68
|
+
fieldName: "bankAccountNumber",
|
|
59
69
|
}),
|
|
60
70
|
})))),
|
|
61
71
|
},
|
|
62
72
|
4: {
|
|
63
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((
|
|
73
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((_w = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _w === void 0 ? void 0 : _w.swiftCode) && {
|
|
64
74
|
class: "error-input",
|
|
65
75
|
helpText: getValidationErrorMessage({
|
|
66
|
-
type: (
|
|
76
|
+
type: (_y = (_x = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _x === void 0 ? void 0 : _x.swiftCode) === null || _y === void 0 ? void 0 : _y.type,
|
|
67
77
|
label: props.text.swiftCodeLabel,
|
|
78
|
+
errorCode: (_0 = (_z = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _z === void 0 ? void 0 : _z.swiftCode) === null || _0 === void 0 ? void 0 : _0.errorCode,
|
|
79
|
+
fieldName: "swiftCode",
|
|
68
80
|
}),
|
|
69
81
|
})))),
|
|
70
82
|
},
|
|
@@ -74,35 +86,41 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
74
86
|
defaultMessage: props.text.routingCodeLabel,
|
|
75
87
|
}, {
|
|
76
88
|
bankCountry,
|
|
77
|
-
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((
|
|
89
|
+
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.routingCode) && {
|
|
78
90
|
class: "error-input",
|
|
79
91
|
helpText: getValidationErrorMessage({
|
|
80
|
-
type: (
|
|
92
|
+
type: (_3 = (_2 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _2 === void 0 ? void 0 : _2.routingCode) === null || _3 === void 0 ? void 0 : _3.type,
|
|
81
93
|
label: intl.formatMessage({
|
|
82
94
|
id: "routingCodeErrorText",
|
|
83
95
|
defaultMessage: props.text.routingCodeLabel,
|
|
84
96
|
}, {
|
|
85
97
|
bankCountry,
|
|
86
98
|
}),
|
|
99
|
+
errorCode: (_5 = (_4 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _4 === void 0 ? void 0 : _4.routingCode) === null || _5 === void 0 ? void 0 : _5.errorCode,
|
|
100
|
+
fieldName: "routingCode",
|
|
87
101
|
}),
|
|
88
102
|
})))),
|
|
89
103
|
},
|
|
90
104
|
6: {
|
|
91
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((
|
|
105
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((_6 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _6 === void 0 ? void 0 : _6.bankName) && {
|
|
92
106
|
class: "error-input",
|
|
93
107
|
helpText: getValidationErrorMessage({
|
|
94
|
-
type: (
|
|
108
|
+
type: (_8 = (_7 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _7 === void 0 ? void 0 : _7.bankName) === null || _8 === void 0 ? void 0 : _8.type,
|
|
95
109
|
label: props.text.bankNameLabel,
|
|
110
|
+
errorCode: (_10 = (_9 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _9 === void 0 ? void 0 : _9.bankName) === null || _10 === void 0 ? void 0 : _10.errorCode,
|
|
111
|
+
fieldName: "bankName",
|
|
96
112
|
}),
|
|
97
113
|
})))),
|
|
98
114
|
},
|
|
99
115
|
7: {
|
|
100
116
|
input: [
|
|
101
|
-
h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
117
|
+
h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_11 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _11 === void 0 ? void 0 : _11.beneficiaryClassification) && {
|
|
102
118
|
class: "error-input",
|
|
103
119
|
helpText: getValidationErrorMessage({
|
|
104
|
-
type: (
|
|
120
|
+
type: (_13 = (_12 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _12 === void 0 ? void 0 : _12.beneficiaryClassification) === null || _13 === void 0 ? void 0 : _13.type,
|
|
105
121
|
label: props.text.classificationLabel,
|
|
122
|
+
errorCode: (_15 = (_14 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _14 === void 0 ? void 0 : _14.beneficiaryClassification) === null || _15 === void 0 ? void 0 : _15.errorCode,
|
|
123
|
+
fieldName: "beneficiaryClassification",
|
|
106
124
|
}),
|
|
107
125
|
})),
|
|
108
126
|
h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
|
|
@@ -113,106 +131,146 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
113
131
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
114
132
|
}, {
|
|
115
133
|
bankCountry,
|
|
116
|
-
}), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((
|
|
134
|
+
}), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((_16 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _16 === void 0 ? void 0 : _16.beneficiaryTaxPayerId) && {
|
|
117
135
|
class: "error-input",
|
|
118
136
|
helpText: getValidationErrorMessage({
|
|
119
|
-
type: (
|
|
137
|
+
type: (_18 = (_17 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _17 === void 0 ? void 0 : _17.beneficiaryTaxPayerId) === null || _18 === void 0 ? void 0 : _18.type,
|
|
120
138
|
label: props.text.taxPayerIdLabel,
|
|
139
|
+
errorCode: (_20 = (_19 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _19 === void 0 ? void 0 : _19.taxPayerId) === null || _20 === void 0 ? void 0 : _20.errorCode,
|
|
140
|
+
fieldName: "taxPayerId",
|
|
121
141
|
}),
|
|
122
142
|
}))),
|
|
123
143
|
],
|
|
124
144
|
},
|
|
125
145
|
8: {
|
|
126
|
-
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
146
|
+
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_21 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _21 === void 0 ? void 0 : _21.beneficiaryClassification) && {
|
|
127
147
|
class: "error-input",
|
|
128
148
|
helpText: getValidationErrorMessage({
|
|
129
|
-
type: (
|
|
149
|
+
type: (_23 = (_22 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _22 === void 0 ? void 0 : _22.beneficiaryClassification) === null || _23 === void 0 ? void 0 : _23.type,
|
|
130
150
|
label: props.text.classificationCPFLabel,
|
|
151
|
+
errorCode: (_25 = (_24 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _24 === void 0 ? void 0 : _24.beneficiaryClassification) === null || _25 === void 0 ? void 0 : _25.errorCode,
|
|
152
|
+
fieldName: "beneficiaryClassification",
|
|
131
153
|
}),
|
|
132
154
|
})),
|
|
133
155
|
h("sl-menu-item", { value: "CPF" }, "CPF"),
|
|
134
156
|
h("sl-menu-item", { value: "CNPJ" }, "CNPJ"))),
|
|
135
157
|
},
|
|
136
158
|
9: {
|
|
137
|
-
input: (h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((
|
|
159
|
+
input: (h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((_26 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _26 === void 0 ? void 0 : _26.patronymicName) && {
|
|
138
160
|
class: "error-input",
|
|
139
161
|
helpText: getValidationErrorMessage({
|
|
140
|
-
type: (
|
|
162
|
+
type: (_28 = (_27 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _27 === void 0 ? void 0 : _27.patronymicName) === null || _28 === void 0 ? void 0 : _28.type,
|
|
141
163
|
label: props.text.patronymicNameLabel,
|
|
164
|
+
errorCode: (_30 = (_29 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _29 === void 0 ? void 0 : _29.patronymicName) === null || _30 === void 0 ? void 0 : _30.errorCode,
|
|
165
|
+
fieldName: "patronymicName",
|
|
142
166
|
}),
|
|
143
167
|
})))),
|
|
144
168
|
},
|
|
145
169
|
10: {
|
|
146
|
-
input: (h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((
|
|
170
|
+
input: (h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((_31 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _31 === void 0 ? void 0 : _31.voCode) && {
|
|
147
171
|
class: "error-input",
|
|
148
172
|
helpText: getValidationErrorMessage({
|
|
149
|
-
type: (
|
|
173
|
+
type: (_33 = (_32 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _32 === void 0 ? void 0 : _32.voCode) === null || _33 === void 0 ? void 0 : _33.type,
|
|
150
174
|
label: props.text.voCodeLabel,
|
|
175
|
+
errorCode: (_35 = (_34 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _34 === void 0 ? void 0 : _34.voCode) === null || _35 === void 0 ? void 0 : _35.errorCode,
|
|
176
|
+
fieldName: "voCode",
|
|
151
177
|
}),
|
|
152
178
|
})))),
|
|
153
179
|
},
|
|
154
180
|
11: {
|
|
155
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((
|
|
181
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((_36 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _36 === void 0 ? void 0 : _36.agencyCode) && {
|
|
156
182
|
class: "error-input",
|
|
157
183
|
helpText: getValidationErrorMessage({
|
|
158
|
-
type: (
|
|
184
|
+
type: (_38 = (_37 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _37 === void 0 ? void 0 : _37.agencyCode) === null || _38 === void 0 ? void 0 : _38.type,
|
|
159
185
|
label: props.text.agencyCodeLabel,
|
|
186
|
+
errorCode: (_40 = (_39 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _39 === void 0 ? void 0 : _39.agencyCode) === null || _40 === void 0 ? void 0 : _40.errorCode,
|
|
187
|
+
fieldName: "agencyCode",
|
|
160
188
|
}),
|
|
161
189
|
})))),
|
|
162
190
|
},
|
|
163
191
|
12: {
|
|
164
192
|
input: [
|
|
165
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((
|
|
193
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((_41 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _41 === void 0 ? void 0 : _41.bankAddress) && {
|
|
166
194
|
class: "error-input",
|
|
167
195
|
helpText: getValidationErrorMessage({
|
|
168
|
-
type: (
|
|
196
|
+
type: (_43 = (_42 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _42 === void 0 ? void 0 : _42.bankAddress) === null || _43 === void 0 ? void 0 : _43.type,
|
|
169
197
|
label: props.text.bankAddressLabel,
|
|
198
|
+
errorCode: (_45 = (_44 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _44 === void 0 ? void 0 : _44.bankAddress) === null || _45 === void 0 ? void 0 : _45.errorCode,
|
|
199
|
+
fieldName: "bankAddress",
|
|
170
200
|
}),
|
|
171
201
|
}))),
|
|
172
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((
|
|
202
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((_46 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _46 === void 0 ? void 0 : _46.bankCity) && {
|
|
173
203
|
class: "error-input",
|
|
174
204
|
helpText: getValidationErrorMessage({
|
|
175
|
-
type: (
|
|
205
|
+
type: (_48 = (_47 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _47 === void 0 ? void 0 : _47.bankCity) === null || _48 === void 0 ? void 0 : _48.type,
|
|
176
206
|
label: props.text.bankCityLabel,
|
|
207
|
+
errorCode: (_50 = (_49 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _49 === void 0 ? void 0 : _49.bankCity) === null || _50 === void 0 ? void 0 : _50.errorCode,
|
|
208
|
+
fieldName: "bankCity",
|
|
177
209
|
}),
|
|
178
210
|
}))),
|
|
179
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((
|
|
211
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((_51 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _51 === void 0 ? void 0 : _51.bankState) && {
|
|
180
212
|
class: "error-input",
|
|
181
213
|
helpText: getValidationErrorMessage({
|
|
182
|
-
type: (
|
|
214
|
+
type: (_53 = (_52 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _52 === void 0 ? void 0 : _52.bankState) === null || _53 === void 0 ? void 0 : _53.type,
|
|
183
215
|
label: props.text.bankStateLabel,
|
|
216
|
+
errorCode: (_55 = (_54 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _54 === void 0 ? void 0 : _54.bankState) === null || _55 === void 0 ? void 0 : _55.errorCode,
|
|
217
|
+
fieldName: "bankState",
|
|
184
218
|
}),
|
|
185
219
|
}))),
|
|
186
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((
|
|
220
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((_56 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _56 === void 0 ? void 0 : _56.bankPostalCode) && {
|
|
187
221
|
class: "error-input",
|
|
188
222
|
helpText: getValidationErrorMessage({
|
|
189
|
-
type: (
|
|
223
|
+
type: (_58 = (_57 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _57 === void 0 ? void 0 : _57.bankPostalCode) === null || _58 === void 0 ? void 0 : _58.type,
|
|
190
224
|
label: props.text.bankPostalCodeLabel,
|
|
225
|
+
errorCode: (_60 = (_59 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _59 === void 0 ? void 0 : _59.bankPostalCode) === null || _60 === void 0 ? void 0 : _60.errorCode,
|
|
226
|
+
fieldName: "bankPostalCode",
|
|
191
227
|
}),
|
|
192
228
|
}))),
|
|
193
229
|
],
|
|
194
230
|
},
|
|
195
231
|
13: {
|
|
196
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((
|
|
232
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((_61 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _61 === void 0 ? void 0 : _61.branchCode) && {
|
|
197
233
|
class: "error-input",
|
|
198
234
|
helpText: getValidationErrorMessage({
|
|
199
|
-
type: (
|
|
235
|
+
type: (_63 = (_62 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _62 === void 0 ? void 0 : _62.branchCode) === null || _63 === void 0 ? void 0 : _63.type,
|
|
200
236
|
label: props.text.branchCodeLabel,
|
|
237
|
+
errorCode: (_65 = (_64 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _64 === void 0 ? void 0 : _64.branchCode) === null || _65 === void 0 ? void 0 : _65.errorCode,
|
|
238
|
+
fieldName: "branchCode",
|
|
201
239
|
}),
|
|
202
240
|
})))),
|
|
203
241
|
},
|
|
204
242
|
14: {
|
|
205
|
-
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
243
|
+
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_66 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _66 === void 0 ? void 0 : _66.beneficiaryClassification) && {
|
|
206
244
|
class: "error-input",
|
|
207
245
|
helpText: getValidationErrorMessage({
|
|
208
|
-
type: (
|
|
246
|
+
type: (_68 = (_67 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _67 === void 0 ? void 0 : _67.beneficiaryClassification) === null || _68 === void 0 ? void 0 : _68.type,
|
|
209
247
|
label: props.text.classificationLabel,
|
|
248
|
+
errorCode: (_70 = (_69 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _69 === void 0 ? void 0 : _69.beneficiaryClassification) === null || _70 === void 0 ? void 0 : _70.errorCode,
|
|
249
|
+
fieldName: "beneficiaryClassification",
|
|
210
250
|
}),
|
|
211
251
|
})),
|
|
212
252
|
h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
|
|
213
253
|
h("sl-menu-item", { value: "INDIVIDUAL" }, props.text.individualSelectItemLabel),
|
|
214
254
|
h("sl-menu-item", { value: "FOREIGN" }, props.text.foreignSelectItemLabel))),
|
|
215
255
|
},
|
|
256
|
+
15: {
|
|
257
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.branchNameLabel, name: "/branchName", id: "branchName", key: "branchName", type: "text" }, (((_71 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _71 === void 0 ? void 0 : _71.branchName) && {
|
|
258
|
+
class: "error-input",
|
|
259
|
+
helpText: getValidationErrorMessage({
|
|
260
|
+
type: (_73 = (_72 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _72 === void 0 ? void 0 : _72.branchName) === null || _73 === void 0 ? void 0 : _73.type,
|
|
261
|
+
label: props.text.branchNameLabel,
|
|
262
|
+
}),
|
|
263
|
+
})))),
|
|
264
|
+
},
|
|
265
|
+
16: {
|
|
266
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.classificationCodeLabel, name: "/classificationCode", id: "classificationCode", key: "classificationCode", type: "text" }, (((_74 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _74 === void 0 ? void 0 : _74.classificationCode) && {
|
|
267
|
+
class: "error-input",
|
|
268
|
+
helpText: getValidationErrorMessage({
|
|
269
|
+
type: (_76 = (_75 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _75 === void 0 ? void 0 : _75.classificationCode) === null || _76 === void 0 ? void 0 : _76.type,
|
|
270
|
+
label: props.text.classificationCodeLabel,
|
|
271
|
+
}),
|
|
272
|
+
})))),
|
|
273
|
+
},
|
|
216
274
|
};
|
|
217
275
|
}
|
|
218
276
|
|
|
@@ -799,6 +857,95 @@ const paypalFeeMap = {
|
|
|
799
857
|
const ACH_PAYMENT_METHOD = 3;
|
|
800
858
|
const WIRE_PAYMENT_METHOD = 5;
|
|
801
859
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
860
|
+
/**
|
|
861
|
+
* Maps GraphQL validation error field names to form field names.
|
|
862
|
+
*/
|
|
863
|
+
const API_FIELD_TO_FORM_FIELD = {
|
|
864
|
+
// bankProvinceState → form uses bankState
|
|
865
|
+
bankProvinceState: "bankState",
|
|
866
|
+
};
|
|
867
|
+
/**
|
|
868
|
+
* Maps Impact API error code paths (from validationErrors[].errorPath) to short,
|
|
869
|
+
* readable frontend error codes used in the ICU select props.
|
|
870
|
+
*/
|
|
871
|
+
const API_ERROR_PATH_TO_FRONTEND = {
|
|
872
|
+
// Beneficiary account name
|
|
873
|
+
"withdrawal.settings.error.empty_beneficiaryname": "empty",
|
|
874
|
+
"withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
|
|
875
|
+
"withdrawal.settings.error.numeric_beneficiaryname": "numeric",
|
|
876
|
+
"withdrawal_settings.error.beneficiaryname.size": "tooLong",
|
|
877
|
+
"withdrawal.settings.error.non_english_beneficiaryname": "nonEnglish",
|
|
878
|
+
"withdrawal_settings.error.business_beneficiaryname_match": "businessNameMismatch",
|
|
879
|
+
"withdrawal_settings.error.beneficiaryname_match": "nameMismatch",
|
|
880
|
+
"withdrawal_settings.error.business_checkpayeename_match": "businessPayeeMismatch",
|
|
881
|
+
"withdrawal_settings.error.checkpayeename_match": "payeeMismatch",
|
|
882
|
+
// Bank account number
|
|
883
|
+
"withdrawal.settings.error.accountnumber.empty": "empty",
|
|
884
|
+
"withdrawal.settings.error.accountnumber.uk": "invalidUk",
|
|
885
|
+
"withdrawal.settings.error.bankaccount.invalid": "invalid",
|
|
886
|
+
// IBAN
|
|
887
|
+
"withdrawal.settings.error.iban": "ibanEmpty",
|
|
888
|
+
"withdrawal.settings.error.iban.alphanumeric": "ibanAlphanumeric",
|
|
889
|
+
"withdrawal.settings.error.iban.invalid": "ibanInvalid",
|
|
890
|
+
"withdrawal.settings.error.iban.uk.country.mismatch": "ibanCountryMismatch",
|
|
891
|
+
// Routing code
|
|
892
|
+
"withdrawal.settings.error.bsbNumber": "invalidBsb",
|
|
893
|
+
"withdrawal.settings.error.sortcode": "invalidSortCode",
|
|
894
|
+
"withdrawal.settings.error.routingNumber": "empty",
|
|
895
|
+
"withdrawal.settings.error.routingcode": "invalid",
|
|
896
|
+
// SWIFT / BIC
|
|
897
|
+
"withdrawal.settings.error.bic": "empty",
|
|
898
|
+
"withdrawal.settings.error.bic.alphanumeric": "alphanumeric",
|
|
899
|
+
"withdrawal.settings.error.bic.invalid": "invalid",
|
|
900
|
+
// Bank account type
|
|
901
|
+
"global.error.invalid.accounttype": "empty",
|
|
902
|
+
// Bank name
|
|
903
|
+
"withdrawal.settings.error.bankName": "empty",
|
|
904
|
+
// Tax payer ID
|
|
905
|
+
"withdrawal.settings.error.taxPayerId": "empty",
|
|
906
|
+
"withdrawal.settings.error.taxPayerId.ar": "emptyAr",
|
|
907
|
+
"withdrawal.settings.error.taxPayerId.kr": "emptyKr",
|
|
908
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric": "alphanumeric",
|
|
909
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric.ar": "alphanumericAr",
|
|
910
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric.kr": "alphanumericKr",
|
|
911
|
+
"withdrawal.settings.error.taxPayerId.invalid": "invalid",
|
|
912
|
+
"withdrawal.settings.error.taxPayerId.invalid.ar": "invalidAr",
|
|
913
|
+
"withdrawal.settings.error.taxPayerId.invalid.kr": "invalidKr",
|
|
914
|
+
"withdrawal.settings.error.taxPayerId.invalid.kzt": "invalidKzt",
|
|
915
|
+
"withdrawal.settings.error.taxPayerId.cnpj": "cnpjTooShort",
|
|
916
|
+
"withdrawal.settings.error.taxPayerId.cpf": "cpfTooShort",
|
|
917
|
+
// Patronymic name
|
|
918
|
+
"withdrawal.settings.error.patronymicName": "empty",
|
|
919
|
+
"withdrawal.settings.error.patronymicName.alphanumeric": "alphanumeric",
|
|
920
|
+
// VO code
|
|
921
|
+
"withdrawal.settings.error.voCode": "empty",
|
|
922
|
+
"withdrawal.settings.error.voCode.alphanumeric": "alphanumeric",
|
|
923
|
+
// Agency code
|
|
924
|
+
"withdrawal.settings.error.agencyCode": "empty",
|
|
925
|
+
"withdrawal.settings.error.agencyCode.alphanumeric": "alphanumeric",
|
|
926
|
+
"withdrawal.settings.error.agencyCode.length": "tooShort",
|
|
927
|
+
// Bank address fields
|
|
928
|
+
"withdrawal.settings.error.bankAddress": "empty",
|
|
929
|
+
"withdrawal.settings.error.bankCity": "empty",
|
|
930
|
+
"withdrawal.settings.error.bankProvinceState": "empty",
|
|
931
|
+
"withdrawal.settings.error.bankPostalCode": "empty",
|
|
932
|
+
// Branch code / name
|
|
933
|
+
"withdrawal.settings.error.branchCode": "invalid",
|
|
934
|
+
"withdrawal.settings.error.branchName": "empty",
|
|
935
|
+
// Classification code
|
|
936
|
+
"withdrawal.settings.error.classificationCode.invalid": "empty",
|
|
937
|
+
"withdrawal.settings.error.classificationCode.invalid.kzt": "invalidKzt",
|
|
938
|
+
// PayPal
|
|
939
|
+
"payment.error.email": "empty",
|
|
940
|
+
"payment.error.paypal_not_supported": "unsupportedCurrency",
|
|
941
|
+
"payment.error.email.invalid": "invalidEmail",
|
|
942
|
+
"payment.error.paypal_verification_incomplete": "verificationIncomplete",
|
|
943
|
+
// Payment schedule
|
|
944
|
+
"payment.error.no_threshold": "empty",
|
|
945
|
+
"payment.error.invalid_threshold": "invalid",
|
|
946
|
+
"payment.error.no_dayOfMonth": "empty",
|
|
947
|
+
"payment.error.invalid_dayOfMonth": "invalid",
|
|
948
|
+
};
|
|
802
949
|
function getFormInputs({ bitset, formMap }) {
|
|
803
950
|
// Convert bitset to binary representation
|
|
804
951
|
const binary = bitset.toString(2).padStart(Object.keys(formMap).length, "0");
|
|
@@ -822,6 +969,7 @@ const SAVE_WITHDRAWAL_SETTINGS = dist.gql `
|
|
|
822
969
|
validationErrors {
|
|
823
970
|
field
|
|
824
971
|
message
|
|
972
|
+
code
|
|
825
973
|
}
|
|
826
974
|
}
|
|
827
975
|
}
|
|
@@ -837,6 +985,7 @@ const UPDATE_WITHDRAWAL_SETTINGS = dist.gql `
|
|
|
837
985
|
validationErrors {
|
|
838
986
|
field
|
|
839
987
|
message
|
|
988
|
+
code
|
|
840
989
|
}
|
|
841
990
|
}
|
|
842
991
|
}
|
|
@@ -1009,10 +1158,13 @@ function useBankingInfoForm(props) {
|
|
|
1009
1158
|
else if (!success) {
|
|
1010
1159
|
console.error("Validation failed: ", validationErrors);
|
|
1011
1160
|
const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
|
|
1161
|
+
const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
|
|
1162
|
+
const errorCode = API_ERROR_PATH_TO_FRONTEND[error.errorPath] || error.errorPath;
|
|
1012
1163
|
return {
|
|
1013
1164
|
...agg,
|
|
1014
|
-
[
|
|
1165
|
+
[formField]: {
|
|
1015
1166
|
type: "invalid",
|
|
1167
|
+
errorCode,
|
|
1016
1168
|
},
|
|
1017
1169
|
};
|
|
1018
1170
|
}, {});
|
|
@@ -1308,11 +1460,19 @@ const BankingInfoForm = class {
|
|
|
1308
1460
|
* @uiName Branch code field label
|
|
1309
1461
|
*/
|
|
1310
1462
|
this.branchCodeLabel = "Branch code";
|
|
1463
|
+
/**
|
|
1464
|
+
* @uiName Branch name field label
|
|
1465
|
+
*/
|
|
1466
|
+
this.branchNameLabel = "Branch name";
|
|
1311
1467
|
/**
|
|
1312
1468
|
* Label text for the classification input field
|
|
1313
1469
|
* @uiName Classification field label
|
|
1314
1470
|
*/
|
|
1315
1471
|
this.classificationLabel = "Classification";
|
|
1472
|
+
/**
|
|
1473
|
+
* @uiName Classification code field label
|
|
1474
|
+
*/
|
|
1475
|
+
this.classificationCodeLabel = "KBE code";
|
|
1316
1476
|
/**
|
|
1317
1477
|
* @uiName Taxpayer ID field label
|
|
1318
1478
|
*/
|
|
@@ -1427,6 +1587,156 @@ const BankingInfoForm = class {
|
|
|
1427
1587
|
* @uiName Information modal button text
|
|
1428
1588
|
*/
|
|
1429
1589
|
this.modalButtonText = "I understand, update my information";
|
|
1590
|
+
// ──────────────────────────────────────────────────────────────────
|
|
1591
|
+
// Per-field validation error messages
|
|
1592
|
+
// Each prop uses ICU select on {errorCode} to pick the right message.
|
|
1593
|
+
// Error codes are short frontend keys mapped from the API error codes.
|
|
1594
|
+
// The `other` branch displays the raw API message directly via {errorCode},
|
|
1595
|
+
// which is already human-readable English (e.g. "Invalid Routing Code").
|
|
1596
|
+
// ──────────────────────────────────────────────────────────────────
|
|
1597
|
+
/**
|
|
1598
|
+
* Error messages for the beneficiary / account holder name field.
|
|
1599
|
+
* Supports error codes: empty, invalidCharacters, numeric, tooLong,
|
|
1600
|
+
* nonEnglish, businessNameMismatch, nameMismatch, businessPayeeMismatch, payeeMismatch
|
|
1601
|
+
* @uiName Beneficiary account name error
|
|
1602
|
+
* @uiWidget textArea
|
|
1603
|
+
*/
|
|
1604
|
+
this.beneficiaryAccountNameError = "{errorCode, select, empty {Account holder name is required} invalidCharacters {Account holder name contains invalid characters} numeric {Account holder name cannot be purely numeric} tooLong {Account holder name must be 70 characters or fewer} nonEnglish {Account holder name must contain only English characters for this currency} businessNameMismatch {Beneficiary name must match the name on your tax document} nameMismatch {Beneficiary name must match the name on your tax document} businessPayeeMismatch {Payee name must match the name on your tax document} payeeMismatch {Payee name must match the name on your tax document} other {{errorCode}}}";
|
|
1605
|
+
/**
|
|
1606
|
+
* Error messages for the bank account number / IBAN field.
|
|
1607
|
+
* Supports error codes: empty, invalidUk, invalid, ibanEmpty,
|
|
1608
|
+
* ibanAlphanumeric, ibanInvalid, ibanCountryMismatch
|
|
1609
|
+
* @uiName Bank account number / IBAN error
|
|
1610
|
+
* @uiWidget textArea
|
|
1611
|
+
*/
|
|
1612
|
+
this.bankAccountNumberError = "{errorCode, select, empty {Account number is required} invalidUk {Please enter a valid UK account number} invalid {Account number is invalid} ibanEmpty {IBAN is required} ibanAlphanumeric {IBAN must contain only letters and numbers} ibanInvalid {IBAN is invalid} ibanCountryMismatch {UK accounts must use an IBAN starting with GB} other {{errorCode}}}";
|
|
1613
|
+
/**
|
|
1614
|
+
* Error messages for the routing code / sort code / BSB field.
|
|
1615
|
+
* Supports error codes: invalidBsb, invalidSortCode, empty, invalid
|
|
1616
|
+
* @uiName Routing code error
|
|
1617
|
+
* @uiWidget textArea
|
|
1618
|
+
*/
|
|
1619
|
+
this.routingCodeError = "{errorCode, select, invalidBsb {Please enter a valid BSB number} invalidSortCode {Please enter a valid sort code} empty {Routing number is required} invalid {Routing number is invalid} other {{errorCode}}}";
|
|
1620
|
+
/**
|
|
1621
|
+
* Error messages for the SWIFT / BIC code field.
|
|
1622
|
+
* Supports error codes: empty, alphanumeric, invalid
|
|
1623
|
+
* @uiName SWIFT code error
|
|
1624
|
+
* @uiWidget textArea
|
|
1625
|
+
*/
|
|
1626
|
+
this.swiftCodeError = "{errorCode, select, empty {SWIFT/BIC code is required} alphanumeric {SWIFT/BIC code must contain only letters and numbers} invalid {SWIFT/BIC code is invalid} other {{errorCode}}}";
|
|
1627
|
+
/**
|
|
1628
|
+
* Error messages for the bank account type field.
|
|
1629
|
+
* Supports error codes: empty
|
|
1630
|
+
* @uiName Bank account type error
|
|
1631
|
+
* @uiWidget textArea
|
|
1632
|
+
*/
|
|
1633
|
+
this.bankAccountTypeError = "{errorCode, select, empty {Bank account type is required} other {{errorCode}}}";
|
|
1634
|
+
/**
|
|
1635
|
+
* Error messages for the bank name field.
|
|
1636
|
+
* Supports error codes: empty
|
|
1637
|
+
* @uiName Bank name error
|
|
1638
|
+
* @uiWidget textArea
|
|
1639
|
+
*/
|
|
1640
|
+
this.bankNameError = "{errorCode, select, empty {Bank name is required} other {{errorCode}}}";
|
|
1641
|
+
/**
|
|
1642
|
+
* Error messages for the tax payer ID / classification entity field.
|
|
1643
|
+
* Supports error codes: empty, emptyAr, emptyKr, alphanumeric, alphanumericAr,
|
|
1644
|
+
* alphanumericKr, invalid, invalidAr, invalidKr, invalidKzt, cnpjTooShort, cpfTooShort
|
|
1645
|
+
* @uiName Tax payer ID error
|
|
1646
|
+
* @uiWidget textArea
|
|
1647
|
+
*/
|
|
1648
|
+
this.taxPayerIdError = "{errorCode, select, empty {Tax payer ID is required} emptyAr {CUIT/CUIL is required} emptyKr {Classification ID is required} alphanumeric {Tax payer ID must contain only letters and numbers} alphanumericAr {CUIT/CUIL must contain only letters and numbers} alphanumericKr {Classification ID must contain only letters and numbers} invalid {Tax payer ID is invalid} invalidAr {CUIT/CUIL must be 11 characters} invalidKr {Classification ID length is invalid} invalidKzt {Tax payer ID must be 12 characters for KZT} cnpjTooShort {CNPJ must be at least 14 characters} cpfTooShort {CPF must be at least 11 characters} other {{errorCode}}}";
|
|
1649
|
+
/**
|
|
1650
|
+
* Error messages for the patronymic name field.
|
|
1651
|
+
* Supports error codes: empty, alphanumeric
|
|
1652
|
+
* @uiName Patronymic name error
|
|
1653
|
+
* @uiWidget textArea
|
|
1654
|
+
*/
|
|
1655
|
+
this.patronymicNameError = "{errorCode, select, empty {Patronymic name is required} alphanumeric {Patronymic name must contain only letters and numbers} other {{errorCode}}}";
|
|
1656
|
+
/**
|
|
1657
|
+
* Error messages for the VO code field.
|
|
1658
|
+
* Supports error codes: empty, alphanumeric
|
|
1659
|
+
* @uiName VO code error
|
|
1660
|
+
* @uiWidget textArea
|
|
1661
|
+
*/
|
|
1662
|
+
this.voCodeError = "{errorCode, select, empty {VO code is required} alphanumeric {VO code must contain only letters and numbers} other {{errorCode}}}";
|
|
1663
|
+
/**
|
|
1664
|
+
* Error messages for the agency code field.
|
|
1665
|
+
* Supports error codes: empty, alphanumeric, tooShort
|
|
1666
|
+
* @uiName Agency code error
|
|
1667
|
+
* @uiWidget textArea
|
|
1668
|
+
*/
|
|
1669
|
+
this.agencyCodeError = "{errorCode, select, empty {Agency code is required} alphanumeric {Agency code must contain only letters and numbers} tooShort {Agency code must be at least 5 characters} other {{errorCode}}}";
|
|
1670
|
+
/**
|
|
1671
|
+
* Error messages for the bank address field.
|
|
1672
|
+
* Supports error codes: empty
|
|
1673
|
+
* @uiName Bank address error
|
|
1674
|
+
* @uiWidget textArea
|
|
1675
|
+
*/
|
|
1676
|
+
this.bankAddressError = "{errorCode, select, empty {Bank address is required} other {{errorCode}}}";
|
|
1677
|
+
/**
|
|
1678
|
+
* Error messages for the bank city field.
|
|
1679
|
+
* Supports error codes: empty
|
|
1680
|
+
* @uiName Bank city error
|
|
1681
|
+
* @uiWidget textArea
|
|
1682
|
+
*/
|
|
1683
|
+
this.bankCityError = "{errorCode, select, empty {Bank city is required} other {{errorCode}}}";
|
|
1684
|
+
/**
|
|
1685
|
+
* Error messages for the bank province/state field.
|
|
1686
|
+
* Supports error codes: empty
|
|
1687
|
+
* @uiName Bank province/state error
|
|
1688
|
+
* @uiWidget textArea
|
|
1689
|
+
*/
|
|
1690
|
+
this.bankStateError = "{errorCode, select, empty {Bank province/state is required} other {{errorCode}}}";
|
|
1691
|
+
/**
|
|
1692
|
+
* Error messages for the bank postal code field.
|
|
1693
|
+
* Supports error codes: empty
|
|
1694
|
+
* @uiName Bank postal code error
|
|
1695
|
+
* @uiWidget textArea
|
|
1696
|
+
*/
|
|
1697
|
+
this.bankPostalCodeError = "{errorCode, select, empty {Bank postal code is required} other {{errorCode}}}";
|
|
1698
|
+
/**
|
|
1699
|
+
* Error messages for the branch code field.
|
|
1700
|
+
* Supports error codes: invalid
|
|
1701
|
+
* @uiName Branch code error
|
|
1702
|
+
* @uiWidget textArea
|
|
1703
|
+
*/
|
|
1704
|
+
this.branchCodeError = "{errorCode, select, invalid {Branch code is invalid} other {{errorCode}}}";
|
|
1705
|
+
/**
|
|
1706
|
+
* Error messages for the branch name field.
|
|
1707
|
+
* Supports error codes: empty
|
|
1708
|
+
* @uiName Branch name error
|
|
1709
|
+
* @uiWidget textArea
|
|
1710
|
+
*/
|
|
1711
|
+
this.branchNameError = "{errorCode, select, empty {Branch name is required} other {{errorCode}}}";
|
|
1712
|
+
/**
|
|
1713
|
+
* Error messages for the classification code field.
|
|
1714
|
+
* Supports error codes: empty, invalidKzt
|
|
1715
|
+
* @uiName Classification code error
|
|
1716
|
+
* @uiWidget textArea
|
|
1717
|
+
*/
|
|
1718
|
+
this.classificationCodeError = "{errorCode, select, empty {Classification code is required} invalidKzt {Classification code must be exactly 2 characters} other {{errorCode}}}";
|
|
1719
|
+
/**
|
|
1720
|
+
* Error messages for the PayPal email field.
|
|
1721
|
+
* Supports error codes: empty, unsupportedCurrency, invalidEmail, verificationIncomplete
|
|
1722
|
+
* @uiName PayPal email error
|
|
1723
|
+
* @uiWidget textArea
|
|
1724
|
+
*/
|
|
1725
|
+
this.paypalEmailError = "{errorCode, select, empty {PayPal email is required} unsupportedCurrency {PayPal is not supported for this currency} invalidEmail {Please enter a valid email address} verificationIncomplete {PayPal verification is not complete} other {{errorCode}}}";
|
|
1726
|
+
/**
|
|
1727
|
+
* Error messages for the payment threshold field.
|
|
1728
|
+
* Supports error codes: empty, invalid
|
|
1729
|
+
* @uiName Payment threshold error
|
|
1730
|
+
* @uiWidget textArea
|
|
1731
|
+
*/
|
|
1732
|
+
this.paymentThresholdError = "{errorCode, select, empty {Payment threshold is required} invalid {Payment threshold is invalid} other {{errorCode}}}";
|
|
1733
|
+
/**
|
|
1734
|
+
* Error messages for the payment day field.
|
|
1735
|
+
* Supports error codes: empty, invalid
|
|
1736
|
+
* @uiName Payment day error
|
|
1737
|
+
* @uiWidget textArea
|
|
1738
|
+
*/
|
|
1739
|
+
this.paymentDayError = "{errorCode, select, empty {Payment day is required} invalid {Payment day must be the 1st or the 15th} other {{errorCode}}}";
|
|
1430
1740
|
h$1(this);
|
|
1431
1741
|
}
|
|
1432
1742
|
disconnectedCallback() { }
|
|
@@ -1440,17 +1750,54 @@ const BankingInfoForm = class {
|
|
|
1440
1750
|
loadingErrorAlertDescription: props.loadingErrorAlertDescription,
|
|
1441
1751
|
loadingErrorAlertHeader: props.loadingErrorAlertHeader,
|
|
1442
1752
|
},
|
|
1753
|
+
errorMessages: {
|
|
1754
|
+
beneficiaryAccountName: props.beneficiaryAccountNameError,
|
|
1755
|
+
bankAccountNumber: props.bankAccountNumberError,
|
|
1756
|
+
routingCode: props.routingCodeError,
|
|
1757
|
+
swiftCode: props.swiftCodeError,
|
|
1758
|
+
bankAccountType: props.bankAccountTypeError,
|
|
1759
|
+
bankName: props.bankNameError,
|
|
1760
|
+
taxPayerId: props.taxPayerIdError,
|
|
1761
|
+
patronymicName: props.patronymicNameError,
|
|
1762
|
+
voCode: props.voCodeError,
|
|
1763
|
+
agencyCode: props.agencyCodeError,
|
|
1764
|
+
bankAddress: props.bankAddressError,
|
|
1765
|
+
bankCity: props.bankCityError,
|
|
1766
|
+
bankState: props.bankStateError,
|
|
1767
|
+
bankPostalCode: props.bankPostalCodeError,
|
|
1768
|
+
branchCode: props.branchCodeError,
|
|
1769
|
+
branchName: props.branchNameError,
|
|
1770
|
+
beneficiaryClassification: props.classificationCodeError,
|
|
1771
|
+
paypalEmailAddress: props.paypalEmailError,
|
|
1772
|
+
paymentThreshold: props.paymentThresholdError,
|
|
1773
|
+
paymentDay: props.paymentDayError,
|
|
1774
|
+
},
|
|
1443
1775
|
};
|
|
1444
1776
|
}
|
|
1445
1777
|
render() {
|
|
1446
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
1778
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
|
|
1447
1779
|
const props = isDemo()
|
|
1448
1780
|
? useDemoBankingInfoForm(this)
|
|
1449
1781
|
: useBankingInfoForm(this);
|
|
1450
1782
|
const { errors } = props.states.formState;
|
|
1451
1783
|
const fieldRequiredError = this.fieldRequiredError;
|
|
1452
1784
|
const fieldInvalidError = this.fieldInvalidError;
|
|
1453
|
-
function getValidationErrorMessage({ type, label, }) {
|
|
1785
|
+
function getValidationErrorMessage({ type, label, errorCode, fieldName, }) {
|
|
1786
|
+
var _a;
|
|
1787
|
+
// If we have a specific error code from the API, try to use
|
|
1788
|
+
// the per-field ICU error message template for a rich message
|
|
1789
|
+
if (type === "invalid" && errorCode && fieldName) {
|
|
1790
|
+
const errorTemplate = (_a = props.text.errorMessages) === null || _a === void 0 ? void 0 : _a[fieldName];
|
|
1791
|
+
if (errorTemplate) {
|
|
1792
|
+
return intl.formatMessage({
|
|
1793
|
+
id: `fieldError-${fieldName}-${errorCode}`,
|
|
1794
|
+
defaultMessage: errorTemplate,
|
|
1795
|
+
}, {
|
|
1796
|
+
errorCode,
|
|
1797
|
+
fieldName: label,
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1454
1801
|
if (type === "required") {
|
|
1455
1802
|
return intl.formatMessage({
|
|
1456
1803
|
id: `requiredText-${label}`,
|
|
@@ -1533,37 +1880,45 @@ const BankingInfoForm = class {
|
|
|
1533
1880
|
helpText: getValidationErrorMessage({
|
|
1534
1881
|
type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.bankCountry) === null || _c === void 0 ? void 0 : _c.type,
|
|
1535
1882
|
label: props.text.bankLocationLabel,
|
|
1883
|
+
errorCode: (_e = (_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.bankCountry) === null || _e === void 0 ? void 0 : _e.errorCode,
|
|
1884
|
+
fieldName: "bankCountry",
|
|
1536
1885
|
}),
|
|
1537
1886
|
})), h("sl-input", { disabled: props.states.saveLoading, class: sheet.classes.SearchInput, placeholder: this.searchForCountryText, onKeyDown: (e) => {
|
|
1538
1887
|
// Stop shoelace intercepting key presses
|
|
1539
1888
|
e.stopPropagation();
|
|
1540
1889
|
}, "onSl-input": (e) => {
|
|
1541
1890
|
props.callbacks.setCountrySearch(e.target.value);
|
|
1542
|
-
} }), (
|
|
1543
|
-
|
|
1891
|
+
} }), (_f = props.states.countries) === null || _f === void 0 ? void 0 :
|
|
1892
|
+
_f.map((country) => {
|
|
1544
1893
|
return (h("sl-menu-item", { value: country.countryCode }, country.displayName));
|
|
1545
|
-
}), (
|
|
1546
|
-
|
|
1894
|
+
}), (_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.allCountries) === null || _h === void 0 ? void 0 :
|
|
1895
|
+
_h.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName))))),
|
|
1547
1896
|
paymentMethodSlot: (h("sl-input", { key: "paymentMethod", label: props.text.paymentMethod, placeholder: props.states.paymentMethodFeeLabel, disabled: true })),
|
|
1548
|
-
paymentThresholdSelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((
|
|
1897
|
+
paymentThresholdSelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((_k = (_j = props.states) === null || _j === void 0 ? void 0 : _j.formState) === null || _k === void 0 ? void 0 : _k.paymentThreshold) || "" }, (((_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.paymentThreshold) && {
|
|
1549
1898
|
class: "error-input",
|
|
1550
1899
|
helpText: getValidationErrorMessage({
|
|
1551
|
-
type: (
|
|
1900
|
+
type: (_o = (_m = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _m === void 0 ? void 0 : _m.paymentThreshold) === null || _o === void 0 ? void 0 : _o.type,
|
|
1552
1901
|
label: props.text.paymentThresholdSelectLabel,
|
|
1902
|
+
errorCode: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentThreshold) === null || _q === void 0 ? void 0 : _q.errorCode,
|
|
1903
|
+
fieldName: "paymentThreshold",
|
|
1553
1904
|
}),
|
|
1554
1905
|
})), props.states.thresholds.map((t) => (h("sl-menu-item", { value: t }, `${props.states.currency}${t}`))))),
|
|
1555
|
-
paymentFixedDaySelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((
|
|
1906
|
+
paymentFixedDaySelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((_s = (_r = props.states) === null || _r === void 0 ? void 0 : _r.formState) === null || _s === void 0 ? void 0 : _s.paymentDay) || "", name: "/paymentDay", id: "paymentDay" }, (((_t = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _t === void 0 ? void 0 : _t.paymentDay) && {
|
|
1556
1907
|
class: "error-input",
|
|
1557
1908
|
helpText: getValidationErrorMessage({
|
|
1558
|
-
type: (
|
|
1909
|
+
type: (_v = (_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.paymentDay) === null || _v === void 0 ? void 0 : _v.type,
|
|
1559
1910
|
label: props.text.paymentDaySelectLabel,
|
|
1911
|
+
errorCode: (_x = (_w = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _w === void 0 ? void 0 : _w.paymentDay) === null || _x === void 0 ? void 0 : _x.errorCode,
|
|
1912
|
+
fieldName: "paymentDay",
|
|
1560
1913
|
}),
|
|
1561
1914
|
})), h("sl-menu-item", { value: "1" }, props.text.paymentDayFirstOfMonthLabelText), h("sl-menu-item", { value: "15" }, props.text.paymentDayFifteenthOfMonthLabelText))),
|
|
1562
|
-
paypalInputSlot: (h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((
|
|
1915
|
+
paypalInputSlot: (h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((_z = (_y = props.states) === null || _y === void 0 ? void 0 : _y.formState) === null || _z === void 0 ? void 0 : _z.paypalEmailAddress) || "", label: props.text.payPalInputLabel, key: "paypalEmailAddress", name: "/paypalEmailAddress", id: "paypalEmailAddress", type: "text" }, (((_2 = (_1 = (_0 = props.states.formState) === null || _0 === void 0 ? void 0 : _0.errors) === null || _1 === void 0 ? void 0 : _1.inputErrors) === null || _2 === void 0 ? void 0 : _2.paypalEmailAddress) && {
|
|
1563
1916
|
class: "error-input",
|
|
1564
1917
|
helpText: getValidationErrorMessage({
|
|
1565
|
-
type: (
|
|
1918
|
+
type: (_6 = (_5 = (_4 = (_3 = props.states.formState) === null || _3 === void 0 ? void 0 : _3.errors) === null || _4 === void 0 ? void 0 : _4.inputErrors) === null || _5 === void 0 ? void 0 : _5.paypalEmailAddress) === null || _6 === void 0 ? void 0 : _6.type,
|
|
1566
1919
|
label: props.text.payPalInputLabel,
|
|
1920
|
+
errorCode: (_10 = (_9 = (_8 = (_7 = props.states.formState) === null || _7 === void 0 ? void 0 : _7.errors) === null || _8 === void 0 ? void 0 : _8.inputErrors) === null || _9 === void 0 ? void 0 : _9.paypalEmailAddress) === null || _10 === void 0 ? void 0 : _10.errorCode,
|
|
1921
|
+
fieldName: "paypalEmailAddress",
|
|
1567
1922
|
}),
|
|
1568
1923
|
})))),
|
|
1569
1924
|
} })));
|
|
@@ -2513,252 +2868,6 @@ const IndirectTaxFormView = (props) => {
|
|
|
2513
2868
|
h("sl-button", { class: classes.SecondaryButton, type: "text", disabled: states.disabled, onClick: callbacks.onBack, exportparts: "base: secondarybutton-base" }, text.backButton))))));
|
|
2514
2869
|
};
|
|
2515
2870
|
|
|
2516
|
-
const CONNECT_PARTNER = dist.gql `
|
|
2517
|
-
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
2518
|
-
createImpactConnection(impactConnectionInput: $vars) {
|
|
2519
|
-
success
|
|
2520
|
-
validationErrors {
|
|
2521
|
-
field
|
|
2522
|
-
message
|
|
2523
|
-
}
|
|
2524
|
-
user {
|
|
2525
|
-
id
|
|
2526
|
-
accountId
|
|
2527
|
-
impactConnection {
|
|
2528
|
-
connected
|
|
2529
|
-
publisher {
|
|
2530
|
-
brandedSignup
|
|
2531
|
-
requiredTaxDocumentType
|
|
2532
|
-
currentTaxDocument {
|
|
2533
|
-
type
|
|
2534
|
-
status
|
|
2535
|
-
}
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
`;
|
|
2542
|
-
function getOption(countries, countryCode) {
|
|
2543
|
-
if (!countries)
|
|
2544
|
-
return;
|
|
2545
|
-
if (countries.find((c) => c.countryCode === countryCode)) {
|
|
2546
|
-
return "otherRegion";
|
|
2547
|
-
}
|
|
2548
|
-
else {
|
|
2549
|
-
return "notRegistered";
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
|
-
function useIndirectTaxForm(props) {
|
|
2553
|
-
var _a, _b, _c, _d, _e;
|
|
2554
|
-
const user = J();
|
|
2555
|
-
const locale = L();
|
|
2556
|
-
const formRef = useRef(null);
|
|
2557
|
-
const context = Fn(TAX_FORM_CONTEXT_NAMESPACE);
|
|
2558
|
-
const [step, setStep] = Pn(TAX_CONTEXT_NAMESPACE);
|
|
2559
|
-
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
|
|
2560
|
-
const userForm = Fn(USER_FORM_CONTEXT_NAMESPACE);
|
|
2561
|
-
const { data: userData, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
|
|
2562
|
-
const { data: _countriesRes, loading: countriesLoading } = $n(COUNTRIES_QUERY_NAMESPACE);
|
|
2563
|
-
const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
|
|
2564
|
-
const _countries = useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) => getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
|
|
2565
|
-
const [loading, setLoading] = useState(false);
|
|
2566
|
-
const [formState, setFormState] = useState({});
|
|
2567
|
-
const [errors, setErrors] = useState({});
|
|
2568
|
-
const [countrySearch, setCountrySearch] = useState("");
|
|
2569
|
-
const [filteredCountries, setFilteredCountries] = useState(_countries || []);
|
|
2570
|
-
const [option, setOption] = useState("notRegistered");
|
|
2571
|
-
const publisher = (_c = (_b = userData === null || userData === void 0 ? void 0 : userData.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher;
|
|
2572
|
-
useEffect(() => {
|
|
2573
|
-
// reset redirect hash
|
|
2574
|
-
window.location.hash = "";
|
|
2575
|
-
}, []);
|
|
2576
|
-
useEffect(() => {
|
|
2577
|
-
var _a;
|
|
2578
|
-
if (!((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxCountryCode))
|
|
2579
|
-
return;
|
|
2580
|
-
const _option = getOption(_countries, publisher.taxInformation.indirectTaxCountryCode);
|
|
2581
|
-
setOption(_option);
|
|
2582
|
-
}, [publisher, _countries]);
|
|
2583
|
-
useEffect(() => {
|
|
2584
|
-
if (countrySearch.trim() === "") {
|
|
2585
|
-
setFilteredCountries(_countries || []);
|
|
2586
|
-
}
|
|
2587
|
-
else {
|
|
2588
|
-
setFilteredCountries((_countries === null || _countries === void 0 ? void 0 : _countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase()))) || []);
|
|
2589
|
-
}
|
|
2590
|
-
}, [countrySearch, _countries]);
|
|
2591
|
-
useEffect(() => {
|
|
2592
|
-
var _a, _b;
|
|
2593
|
-
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
2594
|
-
if (!user)
|
|
2595
|
-
return;
|
|
2596
|
-
if ((_b = (_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.taxInformation) {
|
|
2597
|
-
setFormState({
|
|
2598
|
-
province: user.impactConnection.publisher.taxInformation.indirectTaxRegion,
|
|
2599
|
-
subRegion: user.impactConnection.publisher.taxInformation.indirectTaxRegion,
|
|
2600
|
-
hasQst: !!user.impactConnection.publisher.taxInformation.additionalTaxId,
|
|
2601
|
-
qstNumber: user.impactConnection.publisher.taxInformation.additionalTaxId,
|
|
2602
|
-
hasSubRegionTaxNumber: !!user.impactConnection.publisher.taxInformation.withholdingTaxId,
|
|
2603
|
-
subRegionTaxNumber: user.impactConnection.publisher.taxInformation.withholdingTaxId,
|
|
2604
|
-
selectedRegion: user.impactConnection.publisher.taxInformation.indirectTaxCountryCode,
|
|
2605
|
-
indirectTaxNumber: user.impactConnection.publisher.taxInformation.indirectTaxId,
|
|
2606
|
-
});
|
|
2607
|
-
}
|
|
2608
|
-
else {
|
|
2609
|
-
setFormState({
|
|
2610
|
-
selectedRegion: (user === null || user === void 0 ? void 0 : user.countryCode) || (userForm === null || userForm === void 0 ? void 0 : userForm.countryCode),
|
|
2611
|
-
});
|
|
2612
|
-
}
|
|
2613
|
-
}, [userData, userForm]);
|
|
2614
|
-
const onFormChange = (field, e) => {
|
|
2615
|
-
var _a, _b;
|
|
2616
|
-
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
2617
|
-
if (!value)
|
|
2618
|
-
console.error("Could not detect select change");
|
|
2619
|
-
setFormState((p) => ({ ...p, [field]: value }));
|
|
2620
|
-
};
|
|
2621
|
-
async function connectPartner(formData) {
|
|
2622
|
-
var _a, _b, _c, _d, _e;
|
|
2623
|
-
const vars = {
|
|
2624
|
-
user: {
|
|
2625
|
-
id: user.id,
|
|
2626
|
-
accountId: user.accountId,
|
|
2627
|
-
},
|
|
2628
|
-
firstName: userForm.firstName,
|
|
2629
|
-
lastName: userForm.lastName,
|
|
2630
|
-
countryCode: userForm.countryCode,
|
|
2631
|
-
currency: userForm.currency,
|
|
2632
|
-
address: userForm.address,
|
|
2633
|
-
city: userForm.city,
|
|
2634
|
-
state: userForm.state,
|
|
2635
|
-
postalCode: userForm.postalCode,
|
|
2636
|
-
phoneNumber: userForm.phoneNumber,
|
|
2637
|
-
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
2638
|
-
indirectTaxCountryCode: formData.selectedRegion,
|
|
2639
|
-
indirectTaxRegion: formData.province || formData.subRegion,
|
|
2640
|
-
indirectTaxId: formData.indirectTaxNumber,
|
|
2641
|
-
additionalTaxId: formData.qstNumber,
|
|
2642
|
-
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2643
|
-
};
|
|
2644
|
-
const result = await connectImpactPartner({
|
|
2645
|
-
vars,
|
|
2646
|
-
});
|
|
2647
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
2648
|
-
throw new Error();
|
|
2649
|
-
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
2650
|
-
// Output backend errors to console for now
|
|
2651
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
2652
|
-
throw new Error();
|
|
2653
|
-
}
|
|
2654
|
-
await refetch();
|
|
2655
|
-
const resultPublisher = (_e = (_d = (_c = result
|
|
2656
|
-
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
2657
|
-
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2658
|
-
// Fire form change event
|
|
2659
|
-
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
2660
|
-
return {
|
|
2661
|
-
resultPublisher,
|
|
2662
|
-
hasValidCurrentDocument,
|
|
2663
|
-
};
|
|
2664
|
-
}
|
|
2665
|
-
const onSubmit = async (event) => {
|
|
2666
|
-
if (!option) {
|
|
2667
|
-
setErrors({ taxDetails: true });
|
|
2668
|
-
return;
|
|
2669
|
-
}
|
|
2670
|
-
let formData = { taxOption: option };
|
|
2671
|
-
let validationErrors = {};
|
|
2672
|
-
const controls = event.target.getFormControls();
|
|
2673
|
-
controls.forEach((control) => {
|
|
2674
|
-
if (!control.name || !control.id)
|
|
2675
|
-
return;
|
|
2676
|
-
if (option === "notRegistered")
|
|
2677
|
-
return; // Don't include fields for notRegistered option
|
|
2678
|
-
const key = control.name;
|
|
2679
|
-
const value = control.value;
|
|
2680
|
-
jsonpointer.set(formData, key, value);
|
|
2681
|
-
if (control.required && !value) {
|
|
2682
|
-
jsonpointer.set(validationErrors, key, true);
|
|
2683
|
-
}
|
|
2684
|
-
});
|
|
2685
|
-
setErrors(validationErrors);
|
|
2686
|
-
if (Object.keys(validationErrors).length) {
|
|
2687
|
-
return;
|
|
2688
|
-
}
|
|
2689
|
-
setLoading(true);
|
|
2690
|
-
try {
|
|
2691
|
-
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
2692
|
-
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
2693
|
-
!hasValidCurrentDocument) {
|
|
2694
|
-
// Go to docusign form
|
|
2695
|
-
setStep("/3");
|
|
2696
|
-
}
|
|
2697
|
-
else {
|
|
2698
|
-
if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
|
|
2699
|
-
// Go to banking information form
|
|
2700
|
-
setStep("/4");
|
|
2701
|
-
}
|
|
2702
|
-
else {
|
|
2703
|
-
// Go right to the dashboard
|
|
2704
|
-
setStep("/dashboard");
|
|
2705
|
-
}
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
catch (e) {
|
|
2709
|
-
setErrors({ general: true });
|
|
2710
|
-
}
|
|
2711
|
-
finally {
|
|
2712
|
-
setLoading(false);
|
|
2713
|
-
}
|
|
2714
|
-
};
|
|
2715
|
-
const onBack = () => {
|
|
2716
|
-
setStep(context.overrideBackStep || "/1");
|
|
2717
|
-
};
|
|
2718
|
-
return {
|
|
2719
|
-
states: {
|
|
2720
|
-
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
2721
|
-
hideSteps: context.hideSteps,
|
|
2722
|
-
disabled: loading || countriesLoading || connectLoading,
|
|
2723
|
-
loading: loading || connectLoading || countriesLoading,
|
|
2724
|
-
isPartner: !!((_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
2725
|
-
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
2726
|
-
formState: {
|
|
2727
|
-
checked: option,
|
|
2728
|
-
errors,
|
|
2729
|
-
},
|
|
2730
|
-
},
|
|
2731
|
-
callbacks: {
|
|
2732
|
-
onBack,
|
|
2733
|
-
onSubmit,
|
|
2734
|
-
onFormChange,
|
|
2735
|
-
onChange: setOption,
|
|
2736
|
-
setCountrySearch,
|
|
2737
|
-
onQstToggle: () => setFormState((p) => ({ ...p, hasQst: !p.hasQst })),
|
|
2738
|
-
onSpainToggle: () => setFormState((p) => ({
|
|
2739
|
-
...p,
|
|
2740
|
-
hasSubRegionTaxNumber: !p.hasSubRegionTaxNumber,
|
|
2741
|
-
})),
|
|
2742
|
-
},
|
|
2743
|
-
data: {
|
|
2744
|
-
esRegions: INDIRECT_TAX_SPAIN_REGIONS,
|
|
2745
|
-
countries: filteredCountries,
|
|
2746
|
-
allCountries: _countries,
|
|
2747
|
-
provinces: INDIRECT_TAX_PROVINCES,
|
|
2748
|
-
},
|
|
2749
|
-
text: props.getTextProps(),
|
|
2750
|
-
refs: {
|
|
2751
|
-
formRef,
|
|
2752
|
-
},
|
|
2753
|
-
slotProps: {
|
|
2754
|
-
formState: {
|
|
2755
|
-
...formState,
|
|
2756
|
-
errors,
|
|
2757
|
-
},
|
|
2758
|
-
},
|
|
2759
|
-
};
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
2871
|
const IndirectTaxForm = class {
|
|
2763
2872
|
constructor(hostRef) {
|
|
2764
2873
|
registerInstance(this, hostRef);
|
|
@@ -5032,7 +5141,8 @@ function useUserInfoForm(props) {
|
|
|
5032
5141
|
const [step, setStep] = Pn(TAX_CONTEXT_NAMESPACE);
|
|
5033
5142
|
const [userFormContext, setUserFormContext] = Pn(USER_FORM_CONTEXT_NAMESPACE);
|
|
5034
5143
|
const user = J();
|
|
5035
|
-
const [connectImpactPartner, { loading: connectLoading
|
|
5144
|
+
const [connectImpactPartner, { loading: connectLoading }] = $e(CONNECT_PARTNER);
|
|
5145
|
+
const [completeImpactPartner, { loading: completeLoading }] = $e(COMPLETE_PARTNER);
|
|
5036
5146
|
const { data: tenantData } = wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
5037
5147
|
const { data, loading, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
|
|
5038
5148
|
const _currencies = Fn(CURRENCIES_NAMESPACE);
|
|
@@ -5067,8 +5177,13 @@ function useUserInfoForm(props) {
|
|
|
5067
5177
|
lastName: user.impactConnection.user.lastName,
|
|
5068
5178
|
countryCode: user.impactConnection.publisher.countryCode,
|
|
5069
5179
|
currency: user.impactConnection.publisher.currency,
|
|
5070
|
-
phoneNumberCountryCode
|
|
5071
|
-
|
|
5180
|
+
// when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "0000000" and the phoneNumberCountryCode to "DZ"
|
|
5181
|
+
phoneNumberCountryCode: user.impactConnection.publisher.phoneNumber === "0000000"
|
|
5182
|
+
? null
|
|
5183
|
+
: user.impactConnection.publisher.phoneNumberCountryCode,
|
|
5184
|
+
phoneNumber: user.impactConnection.publisher.phoneNumber === "0000000"
|
|
5185
|
+
? null
|
|
5186
|
+
: user.impactConnection.publisher.phoneNumber,
|
|
5072
5187
|
address: user.impactConnection.publisher.billingAddress,
|
|
5073
5188
|
city: user.impactConnection.publisher.billingCity,
|
|
5074
5189
|
state: user.impactConnection.publisher.billingState,
|
|
@@ -5139,7 +5254,7 @@ function useUserInfoForm(props) {
|
|
|
5139
5254
|
}
|
|
5140
5255
|
}, [currencySearch, currencies]);
|
|
5141
5256
|
async function connectPartner(formData) {
|
|
5142
|
-
var _a, _b, _c, _d, _e;
|
|
5257
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5143
5258
|
const vars = {
|
|
5144
5259
|
user: {
|
|
5145
5260
|
id: user.id,
|
|
@@ -5156,20 +5271,31 @@ function useUserInfoForm(props) {
|
|
|
5156
5271
|
phoneNumber: formData.phoneNumber,
|
|
5157
5272
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
5158
5273
|
};
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5274
|
+
// If the partner has already been started call completeImpactPartner to
|
|
5275
|
+
// update the remaining details. Otherwise create a new connection.
|
|
5276
|
+
const userData = data === null || data === void 0 ? void 0 : data.user;
|
|
5277
|
+
let result = null;
|
|
5278
|
+
let connectionResult;
|
|
5279
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
5280
|
+
result = await completeImpactPartner({
|
|
5281
|
+
vars,
|
|
5282
|
+
});
|
|
5283
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
5284
|
+
}
|
|
5285
|
+
else {
|
|
5286
|
+
result = await connectImpactPartner({
|
|
5287
|
+
vars,
|
|
5288
|
+
});
|
|
5289
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
5290
|
+
}
|
|
5291
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
5163
5292
|
throw new Error();
|
|
5164
|
-
if (!(
|
|
5165
|
-
|
|
5166
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
5167
|
-
.validationErrors);
|
|
5293
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
5294
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
5168
5295
|
throw new Error();
|
|
5169
5296
|
}
|
|
5170
5297
|
await refetch();
|
|
5171
|
-
const resultPublisher = (
|
|
5172
|
-
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
5298
|
+
const resultPublisher = (_f = (_e = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher;
|
|
5173
5299
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
5174
5300
|
// Fire form change event
|
|
5175
5301
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
@@ -5294,9 +5420,9 @@ function useUserInfoForm(props) {
|
|
|
5294
5420
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
5295
5421
|
hideState: !hasStates,
|
|
5296
5422
|
hideSteps: !!context.hideSteps,
|
|
5297
|
-
disabled: loading || connectLoading,
|
|
5423
|
+
disabled: loading || connectLoading || completeLoading,
|
|
5298
5424
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
5299
|
-
loading: loading || connectLoading,
|
|
5425
|
+
loading: loading || connectLoading || completeLoading,
|
|
5300
5426
|
isPartner: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
5301
5427
|
isUser: !!((_j = (_h = data === null || data === void 0 ? void 0 : data.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
5302
5428
|
formState: {
|
|
@@ -5359,10 +5485,6 @@ const TaxForm = class {
|
|
|
5359
5485
|
* @uiName Currency field label
|
|
5360
5486
|
*/
|
|
5361
5487
|
this.currency = "Currency";
|
|
5362
|
-
/**
|
|
5363
|
-
* @uiName Currency field help text
|
|
5364
|
-
*/
|
|
5365
|
-
this.currencyHelpText = "Choose your preferred payout currency";
|
|
5366
5488
|
/**
|
|
5367
5489
|
* @uiName Setup progress
|
|
5368
5490
|
*/
|