@saasquatch/mint-components 2.1.10-56 → 2.1.11-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-a26deae6.js → ShadowViewAddon-2b3f51be.js} +7 -7
- package/dist/cjs/{data-8c8a08f6.js → data-6b5095f8.js} +2 -91
- package/dist/cjs/eventKeys-7af4df4d.js +5 -0
- package/dist/cjs/{global-b7b1b8fe.js → global-0f8b1267.js} +3177 -3126
- package/dist/cjs/{index.module-f8c8495f.js → index.module-42d413d9.js} +154 -149
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/parseStates-d1effc19.js +16 -0
- package/dist/cjs/{re-render-72a0ef45.js → re-render-69bde9ee.js} +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +484 -99
- package/dist/cjs/sqm-big-stat_46.cjs.entry.js +404 -93
- package/dist/cjs/sqm-close-button.cjs.entry.js +1 -1
- package/dist/cjs/sqm-code-verification.cjs.entry.js +7 -8
- package/dist/cjs/sqm-context-router.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +892 -0
- package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -2
- package/dist/cjs/sqm-google-sign-in.cjs.entry.js +1 -1
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-checkbox-field-view-0af2a157.js → sqm-lead-checkbox-field-view-d90f8941.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-lead-input-field-view-0cd7ebdb.js → sqm-lead-input-field-view-818d9e9a.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +4 -4
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-navigation-sidebar-item-view-49b152dd.js → sqm-navigation-sidebar-item-view-20693e59.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +3 -3
- package/dist/cjs/sqm-partner-info-modal-view-464c52c9.js +135 -0
- package/dist/cjs/sqm-password-field.cjs.entry.js +2 -2
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-c81fe7f1.js → sqm-portal-email-verification-view-60f8e0a7.js} +2 -2
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +6 -6
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-639337e3.js → sqm-portal-profile-view-2bfd7afd.js} +2 -2
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-registration-form-view-020f661c.js → sqm-portal-registration-form-view-fd48f1d3.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-6b1acd90.js → sqm-portal-reset-password-view-d90d77f9.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-verify-email-view-424e406a.js → sqm-portal-verify-email-view-b31638f8.js} +2 -2
- package/dist/cjs/sqm-qr-code.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +6 -6
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -5
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +265 -84
- package/dist/cjs/sqm-tab.cjs.entry.js +2 -2
- package/dist/cjs/sqm-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-text-span-view-f274fdf2.js → sqm-text-span-view-8a32dd8c.js} +1 -1
- package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-01bf2f41.js} +33 -40
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
- package/dist/cjs/{useChildElements-041127d7.js → useChildElements-89bc50a9.js} +1 -1
- package/dist/cjs/{useInstantAccessRegistration-2398df36.js → useInstantAccessRegistration-651aa95b.js} +2 -2
- package/dist/cjs/{useLeadFormState-b4c2ab5b.js → useLeadFormState-76d3b511.js} +2 -2
- package/dist/cjs/{usePayoutStatus-0192fccd.js → usePayoutStatus-cf050a03.js} +4 -6
- package/dist/cjs/{usePortalRegistrationForm-23ee2d62.js → usePortalRegistrationForm-31822dc4.js} +2 -2
- package/dist/cjs/{useReferralCodes-0f7948af.js → useReferralCodes-89c2b972.js} +1 -1
- package/dist/cjs/{useReferralTable-6e9de0d5.js → useReferralTable-d3ddfd05.js} +3 -3
- package/dist/cjs/{useRegistrationFormState-4fe5b770.js → useRegistrationFormState-a223f597.js} +1 -1
- package/dist/cjs/{useVerificationEmail-5d19aa99.js → useVerificationEmail-994bc32f.js} +1 -1
- package/dist/cjs/{utilities-fcdb9504.js → utilities-096934ea.js} +1 -1
- package/dist/cjs/utils-a8e0bd9b.js +93 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +150 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +129 -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 +284 -0
- package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +0 -1
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +1 -27
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +2 -2
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +13 -1
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +2 -2
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +12 -1
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -2
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
- package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +16 -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-widget-verification.js +510 -11
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +20 -5
- package/dist/collection/components/tax-and-cash/data.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +75 -37
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +688 -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/sqm-indirect-tax-form.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +49 -11
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +4 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +9 -17
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +34 -16
- package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-78b791d2.js} +7 -7
- package/dist/{mint-components/p-0c0d4065.js → esm/data-33c16dff.js} +24 -5
- package/dist/esm/eventKeys-f76b6a03.js +3 -0
- package/dist/esm/{global-96c14d63.js → global-39f55ec2.js} +3177 -3126
- package/dist/esm/{index.module-b23fdad8.js → index.module-cede12c6.js} +153 -150
- package/dist/esm/{keys-406491dc.js → keys-db1897ae.js} +1 -1
- 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-7a0c7976.js} +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +474 -89
- package/dist/esm/sqm-big-stat_46.entry.js +398 -87
- package/dist/esm/sqm-close-button.entry.js +1 -1
- package/dist/esm/sqm-code-verification.entry.js +8 -9
- package/dist/esm/sqm-context-router.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +887 -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-7cee2b4e.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-11a4f9a9.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-48e7e0d3.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-a6324934.js +132 -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-426370f1.js → sqm-portal-email-verification-view-33f5c108.js} +2 -2
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +6 -6
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-88fd6a93.js} +2 -2
- package/dist/esm/sqm-portal-profile.entry.js +5 -5
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-9bf30b56.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f8d1689c.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
- package/dist/esm/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-0b70c1b1.js} +2 -2
- package/dist/esm/sqm-qr-code.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +6 -6
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
- package/dist/esm/sqm-stencilbook.entry.js +231 -50
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-4db9e33f.js} +1 -1
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-365cef98.js} +12 -19
- package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
- package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-c26d7347.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-e2392f42.js} +2 -2
- package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-9099c8d4.js} +2 -2
- package/dist/esm/{usePayoutStatus-46c0c289.js → usePayoutStatus-fa504d49.js} +3 -4
- package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-5844032a.js} +2 -2
- package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-3cde72d4.js} +1 -1
- package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-35e6d4c1.js} +3 -3
- package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-1813bdef.js} +1 -1
- package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-cb3d51e3.js} +1 -1
- package/dist/esm/{utilities-77b1e0cc.js → utilities-c9e730ed.js} +1 -1
- package/dist/esm/utils-8267d3d8.js +85 -0
- package/dist/esm-es5/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-78b791d2.js} +1 -1
- package/dist/esm-es5/data-33c16dff.js +1 -0
- package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
- package/dist/esm-es5/global-39f55ec2.js +285 -0
- package/dist/esm-es5/index.module-cede12c6.js +1 -0
- package/dist/esm-es5/{keys-406491dc.js → keys-db1897ae.js} +1 -1
- 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-7a0c7976.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
- 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-7cee2b4e.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-11a4f9a9.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-48e7e0d3.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-a6324934.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-426370f1.js → sqm-portal-email-verification-view-33f5c108.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-f015fd6a.js → sqm-portal-profile-view-88fd6a93.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-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-9bf30b56.js} +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f8d1689c.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-0b70c1b1.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-cell.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-text-span-view-738acfb3.js → sqm-text-span-view-4db9e33f.js} +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-365cef98.js +1 -0
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-c26d7347.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-e2392f42.js} +1 -1
- package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-9099c8d4.js} +1 -1
- package/dist/esm-es5/{usePayoutStatus-46c0c289.js → usePayoutStatus-fa504d49.js} +2 -2
- package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-5844032a.js} +1 -1
- package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-3cde72d4.js} +1 -1
- package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-35e6d4c1.js} +1 -1
- package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-1813bdef.js} +1 -1
- package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-cb3d51e3.js} +1 -1
- package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-c9e730ed.js} +1 -1
- package/dist/esm-es5/utils-8267d3d8.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-f35d856a.system.js → p-00463c83.system.js} +1 -1
- package/dist/mint-components/p-037c1a4f.system.entry.js +1 -0
- package/dist/mint-components/p-038d0b8f.entry.js +133 -0
- package/dist/mint-components/{p-217dedde.js → p-0553e659.js} +2 -2
- package/dist/mint-components/{p-642f2c89.js → p-092db51a.js} +1 -1
- package/dist/mint-components/{p-a4f8abad.js → p-095b7128.js} +1 -1
- package/dist/mint-components/{p-95510f27.entry.js → p-0c43b6ff.entry.js} +1 -1
- package/dist/mint-components/{p-3366b81e.js → p-0d75a207.js} +2 -2
- package/dist/mint-components/{p-e4f17c21.system.js → p-0fec43e8.system.js} +1 -1
- package/dist/mint-components/p-115dfc03.system.js +1 -0
- package/dist/mint-components/p-13f3a647.js +1 -0
- package/dist/mint-components/{p-f55ecf35.system.js → p-140e6a15.system.js} +1 -1
- package/dist/mint-components/{p-3bc62ca6.entry.js → p-160828b4.entry.js} +1 -1
- package/dist/mint-components/{p-c30d0049.system.entry.js → p-16deb1a9.system.entry.js} +1 -1
- package/dist/mint-components/{p-f0baeed0.entry.js → p-19293c16.entry.js} +1 -1
- package/dist/mint-components/{p-b66f45d1.entry.js → p-1b0cbbae.entry.js} +1 -1
- package/dist/mint-components/p-1c413a06.system.js +1 -0
- package/dist/mint-components/{p-d4570314.entry.js → p-1d49dddc.entry.js} +1 -1
- package/dist/mint-components/p-1e35f151.system.js +1 -0
- package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-21e7079a.system.entry.js} +1 -1
- package/dist/mint-components/{p-5141769d.system.entry.js → p-247cfbdc.system.entry.js} +1 -1
- package/dist/mint-components/{p-8583ce0c.system.js → p-28e0062c.system.js} +1 -1
- package/dist/mint-components/p-28ed2ae9.js +1 -0
- package/dist/mint-components/{p-e3497e0e.system.entry.js → p-28fe7357.system.entry.js} +1 -1
- package/dist/mint-components/{p-25558a33.entry.js → p-2d3a12f2.entry.js} +2 -2
- package/dist/mint-components/{p-f1374258.system.entry.js → p-2f4d8ab8.system.entry.js} +1 -1
- package/dist/mint-components/{p-ec0b649a.entry.js → p-3181e54a.entry.js} +1 -1
- package/dist/mint-components/{p-fb5c9802.entry.js → p-3218bb1d.entry.js} +1 -1
- package/dist/mint-components/{p-035d9b65.js → p-32d078a3.js} +1 -1
- package/dist/mint-components/{p-8f2d03c7.entry.js → p-3461a8cb.entry.js} +1 -1
- package/dist/mint-components/{p-90833864.system.entry.js → p-357040e6.system.entry.js} +1 -1
- package/dist/mint-components/{p-85721089.system.js → p-36395228.system.js} +1 -1
- package/dist/mint-components/{p-e6ace3ab.js → p-370e0d75.js} +1 -1
- package/dist/mint-components/{p-fc284f91.system.entry.js → p-3756d0d1.system.entry.js} +1 -1
- package/dist/mint-components/{p-db0a2afd.entry.js → p-37658fec.entry.js} +1 -1
- package/dist/mint-components/{p-7b909aa5.system.js → p-379cb9f1.system.js} +1 -1
- package/dist/mint-components/{p-55676213.entry.js → p-38dc2f60.entry.js} +1 -1
- package/dist/mint-components/p-39840341.js +1 -0
- package/dist/mint-components/{p-f581aac7.js → p-3c333076.js} +1 -1
- package/dist/mint-components/{p-bc386a7b.js → p-3c555674.js} +1 -1
- package/dist/mint-components/{p-bab4929e.js → p-3c88d2ed.js} +2 -2
- package/dist/mint-components/{p-f8a09b0f.js → p-438f6702.js} +152 -152
- package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-45475cf9.system.entry.js} +1 -1
- package/dist/mint-components/{p-56ca7e3c.js → p-45e2a83a.js} +1 -1
- package/dist/mint-components/{p-7161e1a6.js → p-4723526d.js} +1 -1
- package/dist/mint-components/{p-cabf6326.js → p-50d959bd.js} +1 -1
- package/dist/mint-components/{p-626b31cb.system.entry.js → p-52748a87.system.entry.js} +1 -1
- package/dist/mint-components/p-52eca331.js +1 -0
- package/dist/mint-components/{p-cb0a5990.entry.js → p-55627a5c.entry.js} +1 -1
- package/dist/mint-components/{p-d997001a.js → p-567a5ded.js} +1 -1
- package/dist/mint-components/{p-5b871e38.system.entry.js → p-5c9d030a.system.entry.js} +1 -1
- package/dist/mint-components/{p-c8a8d231.entry.js → p-5dc9e95b.entry.js} +2 -2
- package/dist/mint-components/p-5e26014d.system.js +1 -0
- package/dist/mint-components/{p-80e116ec.system.entry.js → p-60085f20.system.entry.js} +1 -1
- package/dist/mint-components/{p-52674798.entry.js → p-608da224.entry.js} +1 -1
- package/dist/mint-components/{p-f39cf252.system.entry.js → p-6194855b.system.entry.js} +1 -1
- package/dist/mint-components/{p-013564b3.entry.js → p-62212b9a.entry.js} +1 -1
- package/dist/mint-components/{p-c45a929a.system.entry.js → p-62e1c8b2.system.entry.js} +1 -1
- package/dist/mint-components/p-63c299f1.system.js +1 -0
- package/dist/mint-components/p-64041ee1.entry.js +291 -0
- package/dist/mint-components/p-647933ac.entry.js +122 -0
- package/dist/mint-components/p-64f56cc9.system.js +285 -0
- package/dist/mint-components/p-6562cbec.system.entry.js +1 -0
- package/dist/mint-components/{p-70570e4d.system.entry.js → p-691d34f1.system.entry.js} +1 -1
- package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-6a4496b3.system.entry.js} +1 -1
- package/dist/mint-components/{p-692e14c5.system.js → p-6b1a6b0c.system.js} +1 -1
- package/dist/mint-components/p-6f8dde97.system.js +1 -0
- package/dist/mint-components/p-70e34ae1.system.js +6 -0
- package/dist/mint-components/{p-b9f57e84.system.entry.js → p-71561bb2.system.entry.js} +1 -1
- package/dist/mint-components/{p-d65991d0.entry.js → p-731c4d33.entry.js} +1 -1
- package/dist/mint-components/{p-77b9cde8.system.js → p-7547180f.system.js} +1 -1
- package/dist/mint-components/{p-a0c5631b.system.js → p-77117f6c.system.js} +1 -1
- package/dist/mint-components/{p-dd368927.system.entry.js → p-7a08d288.system.entry.js} +1 -1
- package/dist/mint-components/p-7d5956ec.system.entry.js +1 -0
- package/dist/mint-components/{p-d18dedd4.js → p-7e36a1ff.js} +1 -1
- package/dist/mint-components/{p-e6240c72.js → p-8474aa63.js} +1 -1
- package/dist/mint-components/{p-e84b874c.js → p-857a2d77.js} +1 -1
- package/dist/mint-components/{p-205cfdcd.system.js → p-86381dc7.system.js} +1 -1
- package/dist/mint-components/{p-b2b85238.entry.js → p-86a70151.entry.js} +1 -1
- package/dist/mint-components/{p-058aefe1.entry.js → p-886fb141.entry.js} +1 -1
- package/dist/mint-components/{p-6668f9f0.entry.js → p-88c9cc1b.entry.js} +1 -1
- package/dist/mint-components/{p-ce050888.system.js → p-8b258a3e.system.js} +1 -1
- package/dist/mint-components/p-8ecc8875.js +116 -0
- package/dist/mint-components/{p-0d83907e.js → p-8f9c1387.js} +1 -1
- package/dist/mint-components/{p-d005df28.system.entry.js → p-95aaf35a.system.entry.js} +1 -1
- package/dist/mint-components/{p-77fa2383.entry.js → p-96e4e6a4.entry.js} +1 -1
- package/dist/mint-components/{p-09f7aacd.entry.js → p-991f60fc.entry.js} +2 -2
- package/dist/mint-components/p-996eb820.entry.js +1 -0
- package/dist/mint-components/{p-027fc3be.system.entry.js → p-998c989a.system.entry.js} +1 -1
- package/dist/mint-components/{p-7b59e13c.system.js → p-9b33e2a7.system.js} +1 -1
- package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-9bd53e4d.system.entry.js} +1 -1
- package/dist/mint-components/{p-61897e72.entry.js → p-9c1b0c8b.entry.js} +1 -1
- package/dist/mint-components/{p-5ff7b000.entry.js → p-9d6984e7.entry.js} +2 -2
- package/dist/mint-components/{p-982d1f6f.entry.js → p-9e43f1eb.entry.js} +2 -2
- package/dist/mint-components/p-a0986077.system.entry.js +1 -0
- package/dist/mint-components/p-a1e1c42a.js +1 -0
- package/dist/mint-components/p-a2db4345.system.js +1 -0
- package/dist/mint-components/{p-669d52c4.js → p-a7f72a66.js} +1 -1
- package/dist/mint-components/{p-172675ca.system.js → p-a86ce218.system.js} +1 -1
- package/dist/mint-components/p-a8891ebd.js +1 -0
- package/dist/mint-components/p-a8ecdc44.system.js +1 -0
- package/dist/mint-components/p-aa319fbe.entry.js +9 -0
- package/dist/mint-components/{p-d6193876.system.js → p-b1b8e629.system.js} +1 -1
- package/dist/mint-components/p-b2a99637.system.js +1 -0
- package/dist/mint-components/p-b2bde2f5.entry.js +1 -0
- package/dist/mint-components/p-b451970a.system.entry.js +1 -0
- package/dist/mint-components/{p-e12754f5.system.entry.js → p-b5c0bad5.system.entry.js} +1 -1
- package/dist/mint-components/{p-5c4ba8a0.entry.js → p-b5fed7c6.entry.js} +1 -1
- package/dist/mint-components/{p-3286ef38.js → p-bcadd021.js} +1 -1
- package/dist/mint-components/p-c7535e70.system.entry.js +1 -0
- package/dist/mint-components/{p-5b1d2866.system.js → p-c84a2512.system.js} +1 -1
- package/dist/mint-components/{p-f4e36adf.system.entry.js → p-c8e45671.system.entry.js} +1 -1
- package/dist/mint-components/{p-e00ec007.js → p-ce11858c.js} +1 -1
- package/dist/mint-components/{p-ab0ea688.system.entry.js → p-d01949f7.system.entry.js} +1 -1
- package/dist/mint-components/p-d20188db.js +1 -0
- package/dist/mint-components/{p-19c441b2.system.js → p-d355336b.system.js} +1 -1
- package/dist/mint-components/{p-782af7ae.system.entry.js → p-d5a1c979.system.entry.js} +1 -1
- package/dist/mint-components/p-d6714617.entry.js +1 -0
- package/dist/mint-components/{p-aefc6c4f.system.entry.js → p-dbdb2a46.system.entry.js} +1 -1
- package/dist/mint-components/{p-3c46b4dd.system.js → p-df88dcaa.system.js} +1 -1
- package/dist/mint-components/{p-18133026.system.entry.js → p-e1292288.system.entry.js} +1 -1
- package/dist/mint-components/{p-036a2617.system.js → p-e4dbca9a.system.js} +1 -1
- package/dist/mint-components/p-e95402dc.js +49 -0
- package/dist/mint-components/{p-2d5c2bd4.system.entry.js → p-e9e05970.system.entry.js} +1 -1
- package/dist/mint-components/p-ee0f1cf1.system.js +1 -0
- package/dist/mint-components/{p-09348341.entry.js → p-f11d29fd.entry.js} +1 -1
- package/dist/mint-components/{p-dac20392.system.js → p-f368f04a.system.js} +1 -1
- package/dist/mint-components/{p-653db72e.entry.js → p-f4a57aed.entry.js} +1 -1
- package/dist/mint-components/p-f9671d6a.system.entry.js +1 -0
- package/dist/mint-components/{p-e5ea43b1.entry.js → p-f972e5c9.entry.js} +2 -2
- package/dist/mint-components/{p-5ce78407.system.entry.js → p-fb4ab5ba.system.entry.js} +1 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +12 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +51 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +122 -0
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +17 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +0 -1
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +0 -5
- package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +2 -1
- package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +2 -1
- package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +78 -0
- package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
- package/dist/types/components/tax-and-cash/data.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +2 -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 +165 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +7 -0
- package/dist/types/components.d.ts +614 -82
- package/dist/types/saasquatch.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/shoelace/assets/icons/twitter-x.svg +4 -0
- 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/collection/components/sqm-user-attribute/UserAttribute.stories.js +0 -25
- package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +0 -19
- package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +0 -163
- package/dist/collection/components/sqm-user-attribute/useUserAttribute.js +0 -26
- package/dist/esm/data-12e6aae1.js +0 -216
- package/dist/esm/extractProps-54064fb0.js +0 -32
- 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/global-96c14d63.js +0 -271
- package/dist/esm-es5/index.module-b23fdad8.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/mint-components/p-02499e08.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-0a3d4374.system.entry.js +0 -1
- package/dist/mint-components/p-2cce6e14.entry.js +0 -9
- package/dist/mint-components/p-30c1ef36.system.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-4da5a3fe.system.entry.js +0 -1
- 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-6c4ad51a.js +0 -1
- package/dist/mint-components/p-6e512063.entry.js +0 -25
- package/dist/mint-components/p-7265bbcb.system.js +0 -271
- package/dist/mint-components/p-738dce27.system.entry.js +0 -1
- package/dist/mint-components/p-7efb8782.system.js +0 -1
- package/dist/mint-components/p-8fb1708b.system.entry.js +0 -1
- package/dist/mint-components/p-91a96e98.entry.js +0 -1
- package/dist/mint-components/p-a7f52290.entry.js +0 -281
- package/dist/mint-components/p-b395470f.entry.js +0 -16
- package/dist/mint-components/p-c67f8558.system.entry.js +0 -1
- package/dist/mint-components/p-ca098be1.system.js +0 -1
- package/dist/mint-components/p-d0993bb9.js +0 -1
- package/dist/mint-components/p-d4f332a7.entry.js +0 -106
- package/dist/mint-components/p-de0d6fd7.js +0 -49
- 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-fbe00c97.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
- package/dist/types/components/sqm-user-attribute/UserAttribute.stories.d.ts +0 -7
- package/dist/types/components/sqm-user-attribute/sqm-user-attribute-view.d.ts +0 -8
- package/dist/types/components/sqm-user-attribute/sqm-user-attribute.d.ts +0 -42
- package/dist/types/components/sqm-user-attribute/useUserAttribute.d.ts +0 -3
|
@@ -3,26 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-8277cbb3.js');
|
|
6
|
-
const global = require('./global-
|
|
6
|
+
const global = require('./global-0f8b1267.js');
|
|
7
7
|
const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-42d413d9.js');
|
|
9
9
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
11
11
|
const utils = require('./utils-6847bc06.js');
|
|
12
12
|
const JSS = require('./JSS-8503a151.js');
|
|
13
13
|
require('./mixins-4761d472.js');
|
|
14
14
|
const GenericTableView = require('./GenericTableView-be5648e4.js');
|
|
15
|
-
const reRender = require('./re-render-
|
|
16
|
-
const useChildElements = require('./useChildElements-
|
|
15
|
+
const reRender = require('./re-render-69bde9ee.js');
|
|
16
|
+
const useChildElements = require('./useChildElements-89bc50a9.js');
|
|
17
17
|
const luxon = require('./luxon-c1ad356a.js');
|
|
18
|
-
const useReferralTable = require('./useReferralTable-
|
|
19
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
20
|
-
const
|
|
18
|
+
const useReferralTable = require('./useReferralTable-d3ddfd05.js');
|
|
19
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-01bf2f41.js');
|
|
20
|
+
const utils$1 = require('./utils-a8e0bd9b.js');
|
|
21
|
+
const data = require('./data-6b5095f8.js');
|
|
21
22
|
const keys = require('./keys-cff24974.js');
|
|
22
|
-
const
|
|
23
|
+
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
24
|
+
const usePayoutStatus = require('./usePayoutStatus-cf050a03.js');
|
|
23
25
|
|
|
24
26
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
25
|
-
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;
|
|
27
|
+
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;
|
|
26
28
|
const { errors, ...formState } = props.states.formState;
|
|
27
29
|
return {
|
|
28
30
|
0: {
|
|
@@ -31,44 +33,54 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
31
33
|
helpText: getValidationErrorMessage({
|
|
32
34
|
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,
|
|
33
35
|
label: props.text.beneficiaryAccountNameLabel,
|
|
36
|
+
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,
|
|
37
|
+
fieldName: "beneficiaryAccountName",
|
|
34
38
|
}),
|
|
35
39
|
})))),
|
|
36
40
|
},
|
|
37
41
|
1: {
|
|
38
|
-
input: (index.h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((
|
|
42
|
+
input: (index.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) && {
|
|
39
43
|
class: "error-input",
|
|
40
44
|
helpText: getValidationErrorMessage({
|
|
41
|
-
type: (
|
|
45
|
+
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,
|
|
42
46
|
label: props.text.bankAccountTypeLabel,
|
|
47
|
+
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,
|
|
48
|
+
fieldName: "bankAccountType",
|
|
43
49
|
}),
|
|
44
50
|
})),
|
|
45
51
|
index.h("sl-menu-item", { value: "CHECKING" }, props.text.checkingSelectItemLabel),
|
|
46
52
|
index.h("sl-menu-item", { value: "SAVINGS" }, props.text.savingsSelectItemLabel))),
|
|
47
53
|
},
|
|
48
54
|
2: {
|
|
49
|
-
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((
|
|
55
|
+
input: (index.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) && {
|
|
50
56
|
class: "error-input",
|
|
51
57
|
helpText: getValidationErrorMessage({
|
|
52
|
-
type: (
|
|
58
|
+
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,
|
|
53
59
|
label: props.text.bankAccountNumberLabel,
|
|
60
|
+
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,
|
|
61
|
+
fieldName: "bankAccountNumber",
|
|
54
62
|
}),
|
|
55
63
|
})))),
|
|
56
64
|
},
|
|
57
65
|
3: {
|
|
58
|
-
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((
|
|
66
|
+
input: (index.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) && {
|
|
59
67
|
class: "error-input",
|
|
60
68
|
helpText: getValidationErrorMessage({
|
|
61
|
-
type: (
|
|
69
|
+
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,
|
|
62
70
|
label: props.text.ibanLabel,
|
|
71
|
+
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,
|
|
72
|
+
fieldName: "bankAccountNumber",
|
|
63
73
|
}),
|
|
64
74
|
})))),
|
|
65
75
|
},
|
|
66
76
|
4: {
|
|
67
|
-
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((
|
|
77
|
+
input: (index.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) && {
|
|
68
78
|
class: "error-input",
|
|
69
79
|
helpText: getValidationErrorMessage({
|
|
70
|
-
type: (
|
|
80
|
+
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,
|
|
71
81
|
label: props.text.swiftCodeLabel,
|
|
82
|
+
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,
|
|
83
|
+
fieldName: "swiftCode",
|
|
72
84
|
}),
|
|
73
85
|
})))),
|
|
74
86
|
},
|
|
@@ -78,35 +90,41 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
78
90
|
defaultMessage: props.text.routingCodeLabel,
|
|
79
91
|
}, {
|
|
80
92
|
bankCountry,
|
|
81
|
-
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((
|
|
93
|
+
}), 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) && {
|
|
82
94
|
class: "error-input",
|
|
83
95
|
helpText: getValidationErrorMessage({
|
|
84
|
-
type: (
|
|
96
|
+
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,
|
|
85
97
|
label: global.intl.formatMessage({
|
|
86
98
|
id: "routingCodeErrorText",
|
|
87
99
|
defaultMessage: props.text.routingCodeLabel,
|
|
88
100
|
}, {
|
|
89
101
|
bankCountry,
|
|
90
102
|
}),
|
|
103
|
+
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,
|
|
104
|
+
fieldName: "routingCode",
|
|
91
105
|
}),
|
|
92
106
|
})))),
|
|
93
107
|
},
|
|
94
108
|
6: {
|
|
95
|
-
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((
|
|
109
|
+
input: (index.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) && {
|
|
96
110
|
class: "error-input",
|
|
97
111
|
helpText: getValidationErrorMessage({
|
|
98
|
-
type: (
|
|
112
|
+
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,
|
|
99
113
|
label: props.text.bankNameLabel,
|
|
114
|
+
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,
|
|
115
|
+
fieldName: "bankName",
|
|
100
116
|
}),
|
|
101
117
|
})))),
|
|
102
118
|
},
|
|
103
119
|
7: {
|
|
104
120
|
input: [
|
|
105
|
-
index.h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
121
|
+
index.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) && {
|
|
106
122
|
class: "error-input",
|
|
107
123
|
helpText: getValidationErrorMessage({
|
|
108
|
-
type: (
|
|
124
|
+
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,
|
|
109
125
|
label: props.text.classificationLabel,
|
|
126
|
+
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,
|
|
127
|
+
fieldName: "beneficiaryClassification",
|
|
110
128
|
}),
|
|
111
129
|
})),
|
|
112
130
|
index.h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
|
|
@@ -117,100 +135,122 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
117
135
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
118
136
|
}, {
|
|
119
137
|
bankCountry,
|
|
120
|
-
}), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((
|
|
138
|
+
}), 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) && {
|
|
121
139
|
class: "error-input",
|
|
122
140
|
helpText: getValidationErrorMessage({
|
|
123
|
-
type: (
|
|
141
|
+
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,
|
|
124
142
|
label: props.text.taxPayerIdLabel,
|
|
143
|
+
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,
|
|
144
|
+
fieldName: "taxPayerId",
|
|
125
145
|
}),
|
|
126
146
|
}))),
|
|
127
147
|
],
|
|
128
148
|
},
|
|
129
149
|
8: {
|
|
130
|
-
input: (index.h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
150
|
+
input: (index.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) && {
|
|
131
151
|
class: "error-input",
|
|
132
152
|
helpText: getValidationErrorMessage({
|
|
133
|
-
type: (
|
|
153
|
+
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,
|
|
134
154
|
label: props.text.classificationCPFLabel,
|
|
155
|
+
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,
|
|
156
|
+
fieldName: "beneficiaryClassification",
|
|
135
157
|
}),
|
|
136
158
|
})),
|
|
137
159
|
index.h("sl-menu-item", { value: "CPF" }, "CPF"),
|
|
138
160
|
index.h("sl-menu-item", { value: "CNPJ" }, "CNPJ"))),
|
|
139
161
|
},
|
|
140
162
|
9: {
|
|
141
|
-
input: (index.h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((
|
|
163
|
+
input: (index.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) && {
|
|
142
164
|
class: "error-input",
|
|
143
165
|
helpText: getValidationErrorMessage({
|
|
144
|
-
type: (
|
|
166
|
+
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,
|
|
145
167
|
label: props.text.patronymicNameLabel,
|
|
168
|
+
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,
|
|
169
|
+
fieldName: "patronymicName",
|
|
146
170
|
}),
|
|
147
171
|
})))),
|
|
148
172
|
},
|
|
149
173
|
10: {
|
|
150
|
-
input: (index.h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((
|
|
174
|
+
input: (index.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) && {
|
|
151
175
|
class: "error-input",
|
|
152
176
|
helpText: getValidationErrorMessage({
|
|
153
|
-
type: (
|
|
177
|
+
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,
|
|
154
178
|
label: props.text.voCodeLabel,
|
|
179
|
+
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,
|
|
180
|
+
fieldName: "voCode",
|
|
155
181
|
}),
|
|
156
182
|
})))),
|
|
157
183
|
},
|
|
158
184
|
11: {
|
|
159
|
-
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((
|
|
185
|
+
input: (index.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) && {
|
|
160
186
|
class: "error-input",
|
|
161
187
|
helpText: getValidationErrorMessage({
|
|
162
|
-
type: (
|
|
188
|
+
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,
|
|
163
189
|
label: props.text.agencyCodeLabel,
|
|
190
|
+
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,
|
|
191
|
+
fieldName: "agencyCode",
|
|
164
192
|
}),
|
|
165
193
|
})))),
|
|
166
194
|
},
|
|
167
195
|
12: {
|
|
168
196
|
input: [
|
|
169
|
-
index.h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((
|
|
197
|
+
index.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) && {
|
|
170
198
|
class: "error-input",
|
|
171
199
|
helpText: getValidationErrorMessage({
|
|
172
|
-
type: (
|
|
200
|
+
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,
|
|
173
201
|
label: props.text.bankAddressLabel,
|
|
202
|
+
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,
|
|
203
|
+
fieldName: "bankAddress",
|
|
174
204
|
}),
|
|
175
205
|
}))),
|
|
176
|
-
index.h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((
|
|
206
|
+
index.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) && {
|
|
177
207
|
class: "error-input",
|
|
178
208
|
helpText: getValidationErrorMessage({
|
|
179
|
-
type: (
|
|
209
|
+
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,
|
|
180
210
|
label: props.text.bankCityLabel,
|
|
211
|
+
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,
|
|
212
|
+
fieldName: "bankCity",
|
|
181
213
|
}),
|
|
182
214
|
}))),
|
|
183
|
-
index.h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((
|
|
215
|
+
index.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) && {
|
|
184
216
|
class: "error-input",
|
|
185
217
|
helpText: getValidationErrorMessage({
|
|
186
|
-
type: (
|
|
218
|
+
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,
|
|
187
219
|
label: props.text.bankStateLabel,
|
|
220
|
+
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,
|
|
221
|
+
fieldName: "bankState",
|
|
188
222
|
}),
|
|
189
223
|
}))),
|
|
190
|
-
index.h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((
|
|
224
|
+
index.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) && {
|
|
191
225
|
class: "error-input",
|
|
192
226
|
helpText: getValidationErrorMessage({
|
|
193
|
-
type: (
|
|
227
|
+
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,
|
|
194
228
|
label: props.text.bankPostalCodeLabel,
|
|
229
|
+
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,
|
|
230
|
+
fieldName: "bankPostalCode",
|
|
195
231
|
}),
|
|
196
232
|
}))),
|
|
197
233
|
],
|
|
198
234
|
},
|
|
199
235
|
13: {
|
|
200
|
-
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((
|
|
236
|
+
input: (index.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) && {
|
|
201
237
|
class: "error-input",
|
|
202
238
|
helpText: getValidationErrorMessage({
|
|
203
|
-
type: (
|
|
239
|
+
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,
|
|
204
240
|
label: props.text.branchCodeLabel,
|
|
241
|
+
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,
|
|
242
|
+
fieldName: "branchCode",
|
|
205
243
|
}),
|
|
206
244
|
})))),
|
|
207
245
|
},
|
|
208
246
|
14: {
|
|
209
|
-
input: (index.h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
247
|
+
input: (index.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) && {
|
|
210
248
|
class: "error-input",
|
|
211
249
|
helpText: getValidationErrorMessage({
|
|
212
|
-
type: (
|
|
250
|
+
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,
|
|
213
251
|
label: props.text.classificationLabel,
|
|
252
|
+
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,
|
|
253
|
+
fieldName: "beneficiaryClassification",
|
|
214
254
|
}),
|
|
215
255
|
})),
|
|
216
256
|
index.h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
|
|
@@ -803,6 +843,95 @@ const paypalFeeMap = {
|
|
|
803
843
|
const ACH_PAYMENT_METHOD = 3;
|
|
804
844
|
const WIRE_PAYMENT_METHOD = 5;
|
|
805
845
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
846
|
+
/**
|
|
847
|
+
* Maps GraphQL validation error field names to form field names.
|
|
848
|
+
*/
|
|
849
|
+
const API_FIELD_TO_FORM_FIELD = {
|
|
850
|
+
// bankProvinceState → form uses bankState
|
|
851
|
+
bankProvinceState: "bankState",
|
|
852
|
+
};
|
|
853
|
+
/**
|
|
854
|
+
* Maps Impact API error code paths (from validationErrors[].errorPath) to short,
|
|
855
|
+
* readable frontend error codes used in the ICU select props.
|
|
856
|
+
*/
|
|
857
|
+
const API_ERROR_PATH_TO_FRONTEND = {
|
|
858
|
+
// Beneficiary account name
|
|
859
|
+
"withdrawal.settings.error.empty_beneficiaryname": "empty",
|
|
860
|
+
"withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
|
|
861
|
+
"withdrawal.settings.error.numeric_beneficiaryname": "numeric",
|
|
862
|
+
"withdrawal_settings.error.beneficiaryname.size": "tooLong",
|
|
863
|
+
"withdrawal.settings.error.non_english_beneficiaryname": "nonEnglish",
|
|
864
|
+
"withdrawal_settings.error.business_beneficiaryname_match": "businessNameMismatch",
|
|
865
|
+
"withdrawal_settings.error.beneficiaryname_match": "nameMismatch",
|
|
866
|
+
"withdrawal_settings.error.business_checkpayeename_match": "businessPayeeMismatch",
|
|
867
|
+
"withdrawal_settings.error.checkpayeename_match": "payeeMismatch",
|
|
868
|
+
// Bank account number
|
|
869
|
+
"withdrawal.settings.error.accountnumber.empty": "empty",
|
|
870
|
+
"withdrawal.settings.error.accountnumber.uk": "invalidUk",
|
|
871
|
+
"withdrawal.settings.error.bankaccount.invalid": "invalid",
|
|
872
|
+
// IBAN
|
|
873
|
+
"withdrawal.settings.error.iban": "ibanEmpty",
|
|
874
|
+
"withdrawal.settings.error.iban.alphanumeric": "ibanAlphanumeric",
|
|
875
|
+
"withdrawal.settings.error.iban.invalid": "ibanInvalid",
|
|
876
|
+
"withdrawal.settings.error.iban.uk.country.mismatch": "ibanCountryMismatch",
|
|
877
|
+
// Routing code
|
|
878
|
+
"withdrawal.settings.error.bsbNumber": "invalidBsb",
|
|
879
|
+
"withdrawal.settings.error.sortcode": "invalidSortCode",
|
|
880
|
+
"withdrawal.settings.error.routingNumber": "empty",
|
|
881
|
+
"withdrawal.settings.error.routingcode": "invalid",
|
|
882
|
+
// SWIFT / BIC
|
|
883
|
+
"withdrawal.settings.error.bic": "empty",
|
|
884
|
+
"withdrawal.settings.error.bic.alphanumeric": "alphanumeric",
|
|
885
|
+
"withdrawal.settings.error.bic.invalid": "invalid",
|
|
886
|
+
// Bank account type
|
|
887
|
+
"global.error.invalid.accounttype": "empty",
|
|
888
|
+
// Bank name
|
|
889
|
+
"withdrawal.settings.error.bankName": "empty",
|
|
890
|
+
// Tax payer ID
|
|
891
|
+
"withdrawal.settings.error.taxPayerId": "empty",
|
|
892
|
+
"withdrawal.settings.error.taxPayerId.ar": "emptyAr",
|
|
893
|
+
"withdrawal.settings.error.taxPayerId.kr": "emptyKr",
|
|
894
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric": "alphanumeric",
|
|
895
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric.ar": "alphanumericAr",
|
|
896
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric.kr": "alphanumericKr",
|
|
897
|
+
"withdrawal.settings.error.taxPayerId.invalid": "invalid",
|
|
898
|
+
"withdrawal.settings.error.taxPayerId.invalid.ar": "invalidAr",
|
|
899
|
+
"withdrawal.settings.error.taxPayerId.invalid.kr": "invalidKr",
|
|
900
|
+
"withdrawal.settings.error.taxPayerId.invalid.kzt": "invalidKzt",
|
|
901
|
+
"withdrawal.settings.error.taxPayerId.cnpj": "cnpjTooShort",
|
|
902
|
+
"withdrawal.settings.error.taxPayerId.cpf": "cpfTooShort",
|
|
903
|
+
// Patronymic name
|
|
904
|
+
"withdrawal.settings.error.patronymicName": "empty",
|
|
905
|
+
"withdrawal.settings.error.patronymicName.alphanumeric": "alphanumeric",
|
|
906
|
+
// VO code
|
|
907
|
+
"withdrawal.settings.error.voCode": "empty",
|
|
908
|
+
"withdrawal.settings.error.voCode.alphanumeric": "alphanumeric",
|
|
909
|
+
// Agency code
|
|
910
|
+
"withdrawal.settings.error.agencyCode": "empty",
|
|
911
|
+
"withdrawal.settings.error.agencyCode.alphanumeric": "alphanumeric",
|
|
912
|
+
"withdrawal.settings.error.agencyCode.length": "tooShort",
|
|
913
|
+
// Bank address fields
|
|
914
|
+
"withdrawal.settings.error.bankAddress": "empty",
|
|
915
|
+
"withdrawal.settings.error.bankCity": "empty",
|
|
916
|
+
"withdrawal.settings.error.bankProvinceState": "empty",
|
|
917
|
+
"withdrawal.settings.error.bankPostalCode": "empty",
|
|
918
|
+
// Branch code / name
|
|
919
|
+
"withdrawal.settings.error.branchCode": "invalid",
|
|
920
|
+
"withdrawal.settings.error.branchName": "empty",
|
|
921
|
+
// Classification code
|
|
922
|
+
"withdrawal.settings.error.classificationCode.invalid": "empty",
|
|
923
|
+
"withdrawal.settings.error.classificationCode.invalid.kzt": "invalidKzt",
|
|
924
|
+
// PayPal
|
|
925
|
+
"payment.error.email": "empty",
|
|
926
|
+
"payment.error.paypal_not_supported": "unsupportedCurrency",
|
|
927
|
+
"payment.error.email.invalid": "invalidEmail",
|
|
928
|
+
"payment.error.paypal_verification_incomplete": "verificationIncomplete",
|
|
929
|
+
// Payment schedule
|
|
930
|
+
"payment.error.no_threshold": "empty",
|
|
931
|
+
"payment.error.invalid_threshold": "invalid",
|
|
932
|
+
"payment.error.no_dayOfMonth": "empty",
|
|
933
|
+
"payment.error.invalid_dayOfMonth": "invalid",
|
|
934
|
+
};
|
|
806
935
|
function getFormInputs({ bitset, formMap }) {
|
|
807
936
|
// Convert bitset to binary representation
|
|
808
937
|
const binary = bitset.toString(2).padStart(Object.keys(formMap).length, "0");
|
|
@@ -826,6 +955,7 @@ const SAVE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
|
|
|
826
955
|
validationErrors {
|
|
827
956
|
field
|
|
828
957
|
message
|
|
958
|
+
code
|
|
829
959
|
}
|
|
830
960
|
}
|
|
831
961
|
}
|
|
@@ -841,6 +971,7 @@ const UPDATE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
|
|
|
841
971
|
validationErrors {
|
|
842
972
|
field
|
|
843
973
|
message
|
|
974
|
+
code
|
|
844
975
|
}
|
|
845
976
|
}
|
|
846
977
|
}
|
|
@@ -1013,10 +1144,13 @@ function useBankingInfoForm(props) {
|
|
|
1013
1144
|
else if (!success) {
|
|
1014
1145
|
console.error("Validation failed: ", validationErrors);
|
|
1015
1146
|
const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
|
|
1147
|
+
const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
|
|
1148
|
+
const errorCode = API_ERROR_PATH_TO_FRONTEND[error.errorPath] || error.errorPath;
|
|
1016
1149
|
return {
|
|
1017
1150
|
...agg,
|
|
1018
|
-
[
|
|
1151
|
+
[formField]: {
|
|
1019
1152
|
type: "invalid",
|
|
1153
|
+
errorCode,
|
|
1020
1154
|
},
|
|
1021
1155
|
};
|
|
1022
1156
|
}, {});
|
|
@@ -1027,7 +1161,7 @@ function useBankingInfoForm(props) {
|
|
|
1027
1161
|
return;
|
|
1028
1162
|
}
|
|
1029
1163
|
// Fire form change event
|
|
1030
|
-
window.dispatchEvent(new Event(
|
|
1164
|
+
window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
|
|
1031
1165
|
await refetch();
|
|
1032
1166
|
setStep("/dashboard");
|
|
1033
1167
|
}
|
|
@@ -1431,6 +1565,156 @@ const BankingInfoForm = class {
|
|
|
1431
1565
|
* @uiName Information modal button text
|
|
1432
1566
|
*/
|
|
1433
1567
|
this.modalButtonText = "I understand, update my information";
|
|
1568
|
+
// ──────────────────────────────────────────────────────────────────
|
|
1569
|
+
// Per-field validation error messages
|
|
1570
|
+
// Each prop uses ICU select on {errorCode} to pick the right message.
|
|
1571
|
+
// Error codes are short frontend keys mapped from the API error codes.
|
|
1572
|
+
// The `other` branch displays the raw API message directly via {errorCode},
|
|
1573
|
+
// which is already human-readable English (e.g. "Invalid Routing Code").
|
|
1574
|
+
// ──────────────────────────────────────────────────────────────────
|
|
1575
|
+
/**
|
|
1576
|
+
* Error messages for the beneficiary / account holder name field.
|
|
1577
|
+
* Supports error codes: empty, invalidCharacters, numeric, tooLong,
|
|
1578
|
+
* nonEnglish, businessNameMismatch, nameMismatch, businessPayeeMismatch, payeeMismatch
|
|
1579
|
+
* @uiName Beneficiary account name error
|
|
1580
|
+
* @uiWidget textArea
|
|
1581
|
+
*/
|
|
1582
|
+
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}}}";
|
|
1583
|
+
/**
|
|
1584
|
+
* Error messages for the bank account number / IBAN field.
|
|
1585
|
+
* Supports error codes: empty, invalidUk, invalid, ibanEmpty,
|
|
1586
|
+
* ibanAlphanumeric, ibanInvalid, ibanCountryMismatch
|
|
1587
|
+
* @uiName Bank account number / IBAN error
|
|
1588
|
+
* @uiWidget textArea
|
|
1589
|
+
*/
|
|
1590
|
+
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}}}";
|
|
1591
|
+
/**
|
|
1592
|
+
* Error messages for the routing code / sort code / BSB field.
|
|
1593
|
+
* Supports error codes: invalidBsb, invalidSortCode, empty, invalid
|
|
1594
|
+
* @uiName Routing code error
|
|
1595
|
+
* @uiWidget textArea
|
|
1596
|
+
*/
|
|
1597
|
+
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}}}";
|
|
1598
|
+
/**
|
|
1599
|
+
* Error messages for the SWIFT / BIC code field.
|
|
1600
|
+
* Supports error codes: empty, alphanumeric, invalid
|
|
1601
|
+
* @uiName SWIFT code error
|
|
1602
|
+
* @uiWidget textArea
|
|
1603
|
+
*/
|
|
1604
|
+
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}}}";
|
|
1605
|
+
/**
|
|
1606
|
+
* Error messages for the bank account type field.
|
|
1607
|
+
* Supports error codes: empty
|
|
1608
|
+
* @uiName Bank account type error
|
|
1609
|
+
* @uiWidget textArea
|
|
1610
|
+
*/
|
|
1611
|
+
this.bankAccountTypeError = "{errorCode, select, empty {Bank account type is required} other {{errorCode}}}";
|
|
1612
|
+
/**
|
|
1613
|
+
* Error messages for the bank name field.
|
|
1614
|
+
* Supports error codes: empty
|
|
1615
|
+
* @uiName Bank name error
|
|
1616
|
+
* @uiWidget textArea
|
|
1617
|
+
*/
|
|
1618
|
+
this.bankNameError = "{errorCode, select, empty {Bank name is required} other {{errorCode}}}";
|
|
1619
|
+
/**
|
|
1620
|
+
* Error messages for the tax payer ID / classification entity field.
|
|
1621
|
+
* Supports error codes: empty, emptyAr, emptyKr, alphanumeric, alphanumericAr,
|
|
1622
|
+
* alphanumericKr, invalid, invalidAr, invalidKr, invalidKzt, cnpjTooShort, cpfTooShort
|
|
1623
|
+
* @uiName Tax payer ID error
|
|
1624
|
+
* @uiWidget textArea
|
|
1625
|
+
*/
|
|
1626
|
+
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}}}";
|
|
1627
|
+
/**
|
|
1628
|
+
* Error messages for the patronymic name field.
|
|
1629
|
+
* Supports error codes: empty, alphanumeric
|
|
1630
|
+
* @uiName Patronymic name error
|
|
1631
|
+
* @uiWidget textArea
|
|
1632
|
+
*/
|
|
1633
|
+
this.patronymicNameError = "{errorCode, select, empty {Patronymic name is required} alphanumeric {Patronymic name must contain only letters and numbers} other {{errorCode}}}";
|
|
1634
|
+
/**
|
|
1635
|
+
* Error messages for the VO code field.
|
|
1636
|
+
* Supports error codes: empty, alphanumeric
|
|
1637
|
+
* @uiName VO code error
|
|
1638
|
+
* @uiWidget textArea
|
|
1639
|
+
*/
|
|
1640
|
+
this.voCodeError = "{errorCode, select, empty {VO code is required} alphanumeric {VO code must contain only letters and numbers} other {{errorCode}}}";
|
|
1641
|
+
/**
|
|
1642
|
+
* Error messages for the agency code field.
|
|
1643
|
+
* Supports error codes: empty, alphanumeric, tooShort
|
|
1644
|
+
* @uiName Agency code error
|
|
1645
|
+
* @uiWidget textArea
|
|
1646
|
+
*/
|
|
1647
|
+
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}}}";
|
|
1648
|
+
/**
|
|
1649
|
+
* Error messages for the bank address field.
|
|
1650
|
+
* Supports error codes: empty
|
|
1651
|
+
* @uiName Bank address error
|
|
1652
|
+
* @uiWidget textArea
|
|
1653
|
+
*/
|
|
1654
|
+
this.bankAddressError = "{errorCode, select, empty {Bank address is required} other {{errorCode}}}";
|
|
1655
|
+
/**
|
|
1656
|
+
* Error messages for the bank city field.
|
|
1657
|
+
* Supports error codes: empty
|
|
1658
|
+
* @uiName Bank city error
|
|
1659
|
+
* @uiWidget textArea
|
|
1660
|
+
*/
|
|
1661
|
+
this.bankCityError = "{errorCode, select, empty {Bank city is required} other {{errorCode}}}";
|
|
1662
|
+
/**
|
|
1663
|
+
* Error messages for the bank province/state field.
|
|
1664
|
+
* Supports error codes: empty
|
|
1665
|
+
* @uiName Bank province/state error
|
|
1666
|
+
* @uiWidget textArea
|
|
1667
|
+
*/
|
|
1668
|
+
this.bankStateError = "{errorCode, select, empty {Bank province/state is required} other {{errorCode}}}";
|
|
1669
|
+
/**
|
|
1670
|
+
* Error messages for the bank postal code field.
|
|
1671
|
+
* Supports error codes: empty
|
|
1672
|
+
* @uiName Bank postal code error
|
|
1673
|
+
* @uiWidget textArea
|
|
1674
|
+
*/
|
|
1675
|
+
this.bankPostalCodeError = "{errorCode, select, empty {Bank postal code is required} other {{errorCode}}}";
|
|
1676
|
+
/**
|
|
1677
|
+
* Error messages for the branch code field.
|
|
1678
|
+
* Supports error codes: invalid
|
|
1679
|
+
* @uiName Branch code error
|
|
1680
|
+
* @uiWidget textArea
|
|
1681
|
+
*/
|
|
1682
|
+
this.branchCodeError = "{errorCode, select, invalid {Branch code is invalid} other {{errorCode}}}";
|
|
1683
|
+
/**
|
|
1684
|
+
* Error messages for the branch name field.
|
|
1685
|
+
* Supports error codes: empty
|
|
1686
|
+
* @uiName Branch name error
|
|
1687
|
+
* @uiWidget textArea
|
|
1688
|
+
*/
|
|
1689
|
+
this.branchNameError = "{errorCode, select, empty {Branch name is required} other {{errorCode}}}";
|
|
1690
|
+
/**
|
|
1691
|
+
* Error messages for the classification code field.
|
|
1692
|
+
* Supports error codes: empty, invalidKzt
|
|
1693
|
+
* @uiName Classification code error
|
|
1694
|
+
* @uiWidget textArea
|
|
1695
|
+
*/
|
|
1696
|
+
this.classificationCodeError = "{errorCode, select, empty {Classification code is required} invalidKzt {Classification code must be exactly 2 characters} other {{errorCode}}}";
|
|
1697
|
+
/**
|
|
1698
|
+
* Error messages for the PayPal email field.
|
|
1699
|
+
* Supports error codes: empty, unsupportedCurrency, invalidEmail, verificationIncomplete
|
|
1700
|
+
* @uiName PayPal email error
|
|
1701
|
+
* @uiWidget textArea
|
|
1702
|
+
*/
|
|
1703
|
+
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}}}";
|
|
1704
|
+
/**
|
|
1705
|
+
* Error messages for the payment threshold field.
|
|
1706
|
+
* Supports error codes: empty, invalid
|
|
1707
|
+
* @uiName Payment threshold error
|
|
1708
|
+
* @uiWidget textArea
|
|
1709
|
+
*/
|
|
1710
|
+
this.paymentThresholdError = "{errorCode, select, empty {Payment threshold is required} invalid {Payment threshold is invalid} other {{errorCode}}}";
|
|
1711
|
+
/**
|
|
1712
|
+
* Error messages for the payment day field.
|
|
1713
|
+
* Supports error codes: empty, invalid
|
|
1714
|
+
* @uiName Payment day error
|
|
1715
|
+
* @uiWidget textArea
|
|
1716
|
+
*/
|
|
1717
|
+
this.paymentDayError = "{errorCode, select, empty {Payment day is required} invalid {Payment day must be the 1st or the 15th} other {{errorCode}}}";
|
|
1434
1718
|
domContextHooks_module.h$1(this);
|
|
1435
1719
|
}
|
|
1436
1720
|
disconnectedCallback() { }
|
|
@@ -1444,17 +1728,54 @@ const BankingInfoForm = class {
|
|
|
1444
1728
|
loadingErrorAlertDescription: props.loadingErrorAlertDescription,
|
|
1445
1729
|
loadingErrorAlertHeader: props.loadingErrorAlertHeader,
|
|
1446
1730
|
},
|
|
1731
|
+
errorMessages: {
|
|
1732
|
+
beneficiaryAccountName: props.beneficiaryAccountNameError,
|
|
1733
|
+
bankAccountNumber: props.bankAccountNumberError,
|
|
1734
|
+
routingCode: props.routingCodeError,
|
|
1735
|
+
swiftCode: props.swiftCodeError,
|
|
1736
|
+
bankAccountType: props.bankAccountTypeError,
|
|
1737
|
+
bankName: props.bankNameError,
|
|
1738
|
+
taxPayerId: props.taxPayerIdError,
|
|
1739
|
+
patronymicName: props.patronymicNameError,
|
|
1740
|
+
voCode: props.voCodeError,
|
|
1741
|
+
agencyCode: props.agencyCodeError,
|
|
1742
|
+
bankAddress: props.bankAddressError,
|
|
1743
|
+
bankCity: props.bankCityError,
|
|
1744
|
+
bankState: props.bankStateError,
|
|
1745
|
+
bankPostalCode: props.bankPostalCodeError,
|
|
1746
|
+
branchCode: props.branchCodeError,
|
|
1747
|
+
branchName: props.branchNameError,
|
|
1748
|
+
beneficiaryClassification: props.classificationCodeError,
|
|
1749
|
+
paypalEmailAddress: props.paypalEmailError,
|
|
1750
|
+
paymentThreshold: props.paymentThresholdError,
|
|
1751
|
+
paymentDay: props.paymentDayError,
|
|
1752
|
+
},
|
|
1447
1753
|
};
|
|
1448
1754
|
}
|
|
1449
1755
|
render() {
|
|
1450
|
-
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;
|
|
1756
|
+
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;
|
|
1451
1757
|
const props = index_module.isDemo()
|
|
1452
1758
|
? useDemoBankingInfoForm(this)
|
|
1453
1759
|
: useBankingInfoForm(this);
|
|
1454
1760
|
const { errors } = props.states.formState;
|
|
1455
1761
|
const fieldRequiredError = this.fieldRequiredError;
|
|
1456
1762
|
const fieldInvalidError = this.fieldInvalidError;
|
|
1457
|
-
function getValidationErrorMessage({ type, label, }) {
|
|
1763
|
+
function getValidationErrorMessage({ type, label, errorCode, fieldName, }) {
|
|
1764
|
+
var _a;
|
|
1765
|
+
// If we have a specific error code from the API, try to use
|
|
1766
|
+
// the per-field ICU error message template for a rich message
|
|
1767
|
+
if (type === "invalid" && errorCode && fieldName) {
|
|
1768
|
+
const errorTemplate = (_a = props.text.errorMessages) === null || _a === void 0 ? void 0 : _a[fieldName];
|
|
1769
|
+
if (errorTemplate) {
|
|
1770
|
+
return global.intl.formatMessage({
|
|
1771
|
+
id: `fieldError-${fieldName}-${errorCode}`,
|
|
1772
|
+
defaultMessage: errorTemplate,
|
|
1773
|
+
}, {
|
|
1774
|
+
errorCode,
|
|
1775
|
+
fieldName: label,
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1458
1779
|
if (type === "required") {
|
|
1459
1780
|
return global.intl.formatMessage({
|
|
1460
1781
|
id: `requiredText-${label}`,
|
|
@@ -1537,37 +1858,45 @@ const BankingInfoForm = class {
|
|
|
1537
1858
|
helpText: getValidationErrorMessage({
|
|
1538
1859
|
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,
|
|
1539
1860
|
label: props.text.bankLocationLabel,
|
|
1861
|
+
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,
|
|
1862
|
+
fieldName: "bankCountry",
|
|
1540
1863
|
}),
|
|
1541
1864
|
})), index.h("sl-input", { disabled: props.states.saveLoading, class: sheet.classes.SearchInput, placeholder: this.searchForCountryText, onKeyDown: (e) => {
|
|
1542
1865
|
// Stop shoelace intercepting key presses
|
|
1543
1866
|
e.stopPropagation();
|
|
1544
1867
|
}, "onSl-input": (e) => {
|
|
1545
1868
|
props.callbacks.setCountrySearch(e.target.value);
|
|
1546
|
-
} }), (
|
|
1547
|
-
|
|
1869
|
+
} }), (_f = props.states.countries) === null || _f === void 0 ? void 0 :
|
|
1870
|
+
_f.map((country) => {
|
|
1548
1871
|
return (index.h("sl-menu-item", { value: country.countryCode }, country.displayName));
|
|
1549
|
-
}), (
|
|
1550
|
-
|
|
1872
|
+
}), (_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.allCountries) === null || _h === void 0 ? void 0 :
|
|
1873
|
+
_h.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName))))),
|
|
1551
1874
|
paymentMethodSlot: (index.h("sl-input", { key: "paymentMethod", label: props.text.paymentMethod, placeholder: props.states.paymentMethodFeeLabel, disabled: true })),
|
|
1552
|
-
paymentThresholdSelectSlot: (index.h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((
|
|
1875
|
+
paymentThresholdSelectSlot: (index.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) && {
|
|
1553
1876
|
class: "error-input",
|
|
1554
1877
|
helpText: getValidationErrorMessage({
|
|
1555
|
-
type: (
|
|
1878
|
+
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,
|
|
1556
1879
|
label: props.text.paymentThresholdSelectLabel,
|
|
1880
|
+
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,
|
|
1881
|
+
fieldName: "paymentThreshold",
|
|
1557
1882
|
}),
|
|
1558
1883
|
})), props.states.thresholds.map((t) => (index.h("sl-menu-item", { value: t }, `${props.states.currency}${t}`))))),
|
|
1559
|
-
paymentFixedDaySelectSlot: (index.h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((
|
|
1884
|
+
paymentFixedDaySelectSlot: (index.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) && {
|
|
1560
1885
|
class: "error-input",
|
|
1561
1886
|
helpText: getValidationErrorMessage({
|
|
1562
|
-
type: (
|
|
1887
|
+
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,
|
|
1563
1888
|
label: props.text.paymentDaySelectLabel,
|
|
1889
|
+
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,
|
|
1890
|
+
fieldName: "paymentDay",
|
|
1564
1891
|
}),
|
|
1565
1892
|
})), index.h("sl-menu-item", { value: "1" }, props.text.paymentDayFirstOfMonthLabelText), index.h("sl-menu-item", { value: "15" }, props.text.paymentDayFifteenthOfMonthLabelText))),
|
|
1566
|
-
paypalInputSlot: (index.h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((
|
|
1893
|
+
paypalInputSlot: (index.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) && {
|
|
1567
1894
|
class: "error-input",
|
|
1568
1895
|
helpText: getValidationErrorMessage({
|
|
1569
|
-
type: (
|
|
1896
|
+
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,
|
|
1570
1897
|
label: props.text.payPalInputLabel,
|
|
1898
|
+
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,
|
|
1899
|
+
fieldName: "paypalEmailAddress",
|
|
1571
1900
|
}),
|
|
1572
1901
|
})))),
|
|
1573
1902
|
} })));
|
|
@@ -1716,7 +2045,7 @@ function useDocusignForm(props) {
|
|
|
1716
2045
|
const [showExitButton, setShowExitButton] = domContextHooks_module.useState(false);
|
|
1717
2046
|
const [showModal, setShowModal] = domContextHooks_module.useState(true);
|
|
1718
2047
|
// Only look at current document if it's valid (same as required type)
|
|
1719
|
-
const existingDocumentType =
|
|
2048
|
+
const existingDocumentType = utils$1.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
|
|
1720
2049
|
? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
|
|
1721
2050
|
const actualDocumentType = existingDocumentType ||
|
|
1722
2051
|
getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
|
|
@@ -1774,7 +2103,7 @@ function useDocusignForm(props) {
|
|
|
1774
2103
|
if (!result.completeImpactPublisherTaxDocument.success)
|
|
1775
2104
|
throw new Error();
|
|
1776
2105
|
// Fire form change event
|
|
1777
|
-
window.dispatchEvent(new Event(
|
|
2106
|
+
window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
|
|
1778
2107
|
setShowExitButton(true);
|
|
1779
2108
|
}
|
|
1780
2109
|
catch (e) {
|
|
@@ -1814,7 +2143,7 @@ function useDocusignForm(props) {
|
|
|
1814
2143
|
},
|
|
1815
2144
|
docusignStatus,
|
|
1816
2145
|
documentType: actualDocumentType,
|
|
1817
|
-
documentTypeString:
|
|
2146
|
+
documentTypeString: utils$1.taxTypeToName(actualDocumentType),
|
|
1818
2147
|
showExitButton,
|
|
1819
2148
|
showModal,
|
|
1820
2149
|
},
|
|
@@ -2543,6 +2872,32 @@ const CONNECT_PARTNER = index_module.dist.gql `
|
|
|
2543
2872
|
}
|
|
2544
2873
|
}
|
|
2545
2874
|
`;
|
|
2875
|
+
const COMPLETE_PARTNER = index_module.dist.gql `
|
|
2876
|
+
mutation completeImpactConnection($vars: ImpactConnectionInput!) {
|
|
2877
|
+
completeImpactConnection(impactConnectionInput: $vars) {
|
|
2878
|
+
success
|
|
2879
|
+
validationErrors {
|
|
2880
|
+
field
|
|
2881
|
+
message
|
|
2882
|
+
}
|
|
2883
|
+
user {
|
|
2884
|
+
id
|
|
2885
|
+
accountId
|
|
2886
|
+
impactConnection {
|
|
2887
|
+
connected
|
|
2888
|
+
publisher {
|
|
2889
|
+
brandedSignup
|
|
2890
|
+
requiredTaxDocumentType
|
|
2891
|
+
currentTaxDocument {
|
|
2892
|
+
type
|
|
2893
|
+
status
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
`;
|
|
2546
2901
|
function getOption(countries, countryCode) {
|
|
2547
2902
|
if (!countries)
|
|
2548
2903
|
return;
|
|
@@ -2561,11 +2916,12 @@ function useIndirectTaxForm(props) {
|
|
|
2561
2916
|
const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
2562
2917
|
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
2563
2918
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
2919
|
+
const [completeImpactPartner, { loading: completeLoading, errors: completeErrors },] = index_module.$e(COMPLETE_PARTNER);
|
|
2564
2920
|
const userForm = index_module.Fn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
2565
2921
|
const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
2566
2922
|
const { data: _countriesRes, loading: countriesLoading } = index_module.$n(data.COUNTRIES_QUERY_NAMESPACE);
|
|
2567
2923
|
const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
|
|
2568
|
-
const _countries = domContextHooks_module.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) =>
|
|
2924
|
+
const _countries = domContextHooks_module.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) => utils$1.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
|
|
2569
2925
|
const [loading, setLoading] = domContextHooks_module.useState(false);
|
|
2570
2926
|
const [formState, setFormState] = domContextHooks_module.useState({});
|
|
2571
2927
|
const [errors, setErrors] = domContextHooks_module.useState({});
|
|
@@ -2623,7 +2979,7 @@ function useIndirectTaxForm(props) {
|
|
|
2623
2979
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
2624
2980
|
};
|
|
2625
2981
|
async function connectPartner(formData) {
|
|
2626
|
-
var _a, _b, _c, _d, _e;
|
|
2982
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2627
2983
|
const vars = {
|
|
2628
2984
|
user: {
|
|
2629
2985
|
id: user.id,
|
|
@@ -2645,22 +3001,33 @@ function useIndirectTaxForm(props) {
|
|
|
2645
3001
|
additionalTaxId: formData.qstNumber,
|
|
2646
3002
|
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2647
3003
|
};
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
if (
|
|
3004
|
+
//AL: TODO completePartnerMutation might change
|
|
3005
|
+
let result = null;
|
|
3006
|
+
let connectionResult;
|
|
3007
|
+
if ((_b = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.connected) {
|
|
3008
|
+
result = await completeImpactPartner({
|
|
3009
|
+
vars,
|
|
3010
|
+
});
|
|
3011
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.completeImpactConnection;
|
|
3012
|
+
}
|
|
3013
|
+
else {
|
|
3014
|
+
result = await connectImpactPartner({
|
|
3015
|
+
vars,
|
|
3016
|
+
});
|
|
3017
|
+
connectionResult = (_d = result) === null || _d === void 0 ? void 0 : _d.createImpactConnection;
|
|
3018
|
+
}
|
|
3019
|
+
if (!result || ((_e = result) === null || _e === void 0 ? void 0 : _e.message))
|
|
2652
3020
|
throw new Error();
|
|
2653
|
-
if (!(
|
|
3021
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
2654
3022
|
// Output backend errors to console for now
|
|
2655
|
-
console.error("Failed to create Impact connection: ",
|
|
3023
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
2656
3024
|
throw new Error();
|
|
2657
3025
|
}
|
|
2658
3026
|
await refetch();
|
|
2659
|
-
const resultPublisher = (
|
|
2660
|
-
|
|
2661
|
-
const hasValidCurrentDocument = data.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
3027
|
+
const resultPublisher = (_g = (_f = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher;
|
|
3028
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2662
3029
|
// Fire form change event
|
|
2663
|
-
window.dispatchEvent(new Event(
|
|
3030
|
+
window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
|
|
2664
3031
|
return {
|
|
2665
3032
|
resultPublisher,
|
|
2666
3033
|
hasValidCurrentDocument,
|
|
@@ -2723,8 +3090,8 @@ function useIndirectTaxForm(props) {
|
|
|
2723
3090
|
states: {
|
|
2724
3091
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
2725
3092
|
hideSteps: context.hideSteps,
|
|
2726
|
-
disabled: loading || countriesLoading || connectLoading,
|
|
2727
|
-
loading: loading || connectLoading || countriesLoading,
|
|
3093
|
+
disabled: loading || countriesLoading || connectLoading || completeLoading,
|
|
3094
|
+
loading: loading || connectLoading || countriesLoading || completeLoading,
|
|
2728
3095
|
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),
|
|
2729
3096
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
2730
3097
|
formState: {
|
|
@@ -2816,7 +3183,7 @@ const IndirectTaxForm = class {
|
|
|
2816
3183
|
/**
|
|
2817
3184
|
* @uiName Indirect tax number field label
|
|
2818
3185
|
*/
|
|
2819
|
-
this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
3186
|
+
this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
|
|
2820
3187
|
/**
|
|
2821
3188
|
* Displayed to participants registered for QST.
|
|
2822
3189
|
* @uiName QST number field label
|
|
@@ -2855,7 +3222,7 @@ const IndirectTaxForm = class {
|
|
|
2855
3222
|
/**
|
|
2856
3223
|
* @uiName Missing indirect tax number error message
|
|
2857
3224
|
*/
|
|
2858
|
-
this.indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
3225
|
+
this.indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";
|
|
2859
3226
|
/**
|
|
2860
3227
|
* Placeholder text displayed in the country search dropdown
|
|
2861
3228
|
* @uiName Country field placeholder text
|
|
@@ -3666,7 +4033,7 @@ const PayoutDetailsCard = class {
|
|
|
3666
4033
|
* Badge text indicating payout status
|
|
3667
4034
|
* @uiName Payout badge status text
|
|
3668
4035
|
*/
|
|
3669
|
-
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
4036
|
+
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
3670
4037
|
/**
|
|
3671
4038
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
3672
4039
|
* @uiName Payout schedule by threshold text
|
|
@@ -4527,7 +4894,7 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4527
4894
|
dateSubmitted,
|
|
4528
4895
|
documentType,
|
|
4529
4896
|
canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
|
|
4530
|
-
documentTypeString:
|
|
4897
|
+
documentTypeString: utils$1.taxTypeToName(documentType),
|
|
4531
4898
|
status: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _f === void 0 ? void 0 : _f.status,
|
|
4532
4899
|
subRegion: getSubRegionName((_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.indirectTaxRegion),
|
|
4533
4900
|
subRegionTaxNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.withholdingTaxId,
|
|
@@ -4720,7 +5087,7 @@ const TaxAndCashDashboard = class {
|
|
|
4720
5087
|
/**
|
|
4721
5088
|
* @uiName Payout status badge
|
|
4722
5089
|
*/
|
|
4723
|
-
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
5090
|
+
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
4724
5091
|
/**
|
|
4725
5092
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
4726
5093
|
* @uiName Payout schedule by threshold text
|
|
@@ -5037,6 +5404,7 @@ function useUserInfoForm(props) {
|
|
|
5037
5404
|
const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
5038
5405
|
const user = index_module.J();
|
|
5039
5406
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
5407
|
+
const [completeImpactPartner, { loading: completeLoading, errors: completeErrors },] = index_module.$e(COMPLETE_PARTNER);
|
|
5040
5408
|
const { data: tenantData } = index_module.wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
5041
5409
|
const { data: data$1, loading, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
5042
5410
|
const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
|
|
@@ -5058,7 +5426,7 @@ function useUserInfoForm(props) {
|
|
|
5058
5426
|
if (!user || step !== "/1")
|
|
5059
5427
|
return;
|
|
5060
5428
|
// If form already filled out, skip initialising it
|
|
5061
|
-
if (
|
|
5429
|
+
if (utils$1.objectIsFull(userFormContext))
|
|
5062
5430
|
return;
|
|
5063
5431
|
// Prefer MI email if it was verified before this
|
|
5064
5432
|
const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
|
|
@@ -5071,8 +5439,13 @@ function useUserInfoForm(props) {
|
|
|
5071
5439
|
lastName: user.impactConnection.user.lastName,
|
|
5072
5440
|
countryCode: user.impactConnection.publisher.countryCode,
|
|
5073
5441
|
currency: user.impactConnection.publisher.currency,
|
|
5074
|
-
phoneNumberCountryCode
|
|
5075
|
-
|
|
5442
|
+
// when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "000000" and the phoneNumberCountryCode to "DZ"
|
|
5443
|
+
phoneNumberCountryCode: user.impactConnection.publisher.phoneNumber === "0000000"
|
|
5444
|
+
? null
|
|
5445
|
+
: user.impactConnection.publisher.phoneNumberCountryCode,
|
|
5446
|
+
phoneNumber: user.impactConnection.publisher.phoneNumber === "0000000"
|
|
5447
|
+
? null
|
|
5448
|
+
: user.impactConnection.publisher.phoneNumber,
|
|
5076
5449
|
address: user.impactConnection.publisher.billingAddress,
|
|
5077
5450
|
city: user.impactConnection.publisher.billingCity,
|
|
5078
5451
|
state: user.impactConnection.publisher.billingState,
|
|
@@ -5143,7 +5516,7 @@ function useUserInfoForm(props) {
|
|
|
5143
5516
|
}
|
|
5144
5517
|
}, [currencySearch, currencies]);
|
|
5145
5518
|
async function connectPartner(formData) {
|
|
5146
|
-
var _a, _b, _c, _d, _e;
|
|
5519
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5147
5520
|
const vars = {
|
|
5148
5521
|
user: {
|
|
5149
5522
|
id: user.id,
|
|
@@ -5160,23 +5533,35 @@ function useUserInfoForm(props) {
|
|
|
5160
5533
|
phoneNumber: formData.phoneNumber,
|
|
5161
5534
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
5162
5535
|
};
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5536
|
+
//AL: TODO completePartnerMutation might change
|
|
5537
|
+
// if user already has an impact connection, call completeImpactPartner to update their information instead of connectPartner
|
|
5538
|
+
const userData = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
|
|
5539
|
+
let result = null;
|
|
5540
|
+
let connectionResult;
|
|
5541
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
5542
|
+
console.log(vars, "values for completeImpactPartner");
|
|
5543
|
+
result = await completeImpactPartner({
|
|
5544
|
+
vars,
|
|
5545
|
+
});
|
|
5546
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
5547
|
+
}
|
|
5548
|
+
else {
|
|
5549
|
+
result = await connectImpactPartner({
|
|
5550
|
+
vars,
|
|
5551
|
+
});
|
|
5552
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
5553
|
+
}
|
|
5554
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
5167
5555
|
throw new Error();
|
|
5168
|
-
if (!(
|
|
5169
|
-
|
|
5170
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
5171
|
-
.validationErrors);
|
|
5556
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
5557
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
5172
5558
|
throw new Error();
|
|
5173
5559
|
}
|
|
5174
5560
|
await refetch();
|
|
5175
|
-
const resultPublisher = (
|
|
5176
|
-
|
|
5177
|
-
const hasValidCurrentDocument = data.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
5561
|
+
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;
|
|
5562
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
5178
5563
|
// Fire form change event
|
|
5179
|
-
window.dispatchEvent(new Event(
|
|
5564
|
+
window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
|
|
5180
5565
|
return {
|
|
5181
5566
|
resultPublisher,
|
|
5182
5567
|
hasValidCurrentDocument,
|
|
@@ -5298,9 +5683,9 @@ function useUserInfoForm(props) {
|
|
|
5298
5683
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
5299
5684
|
hideState: !hasStates,
|
|
5300
5685
|
hideSteps: !!context.hideSteps,
|
|
5301
|
-
disabled: loading || connectLoading,
|
|
5686
|
+
disabled: loading || connectLoading || completeLoading,
|
|
5302
5687
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
5303
|
-
loading: loading || connectLoading,
|
|
5688
|
+
loading: loading || connectLoading || completeLoading,
|
|
5304
5689
|
isPartner: !!((_g = (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
5305
5690
|
isUser: !!((_j = (_h = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
5306
5691
|
formState: {
|