@saasquatch/mint-components 2.1.10-57 → 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 -96
- 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 -90
- 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 -88
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/saasquatch.d.ts +1 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -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 -172
- 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-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-4007afba.system.entry.js +0 -1
- package/dist/mint-components/p-445f50cc.entry.js +0 -9
- 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-746500b2.entry.js +0 -281
- package/dist/mint-components/p-7efb8782.system.js +0 -1
- package/dist/mint-components/p-89a20547.system.entry.js +0 -1
- package/dist/mint-components/p-91a96e98.entry.js +0 -1
- 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 -45
- package/dist/types/components/sqm-user-attribute/useUserAttribute.d.ts +0 -3
|
@@ -25,6 +25,95 @@ export const paypalFeeMap = {
|
|
|
25
25
|
const ACH_PAYMENT_METHOD = 3;
|
|
26
26
|
const WIRE_PAYMENT_METHOD = 5;
|
|
27
27
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
28
|
+
/**
|
|
29
|
+
* Maps GraphQL validation error field names to form field names.
|
|
30
|
+
*/
|
|
31
|
+
const API_FIELD_TO_FORM_FIELD = {
|
|
32
|
+
// bankProvinceState → form uses bankState
|
|
33
|
+
bankProvinceState: "bankState",
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Maps Impact API error code paths (from validationErrors[].errorPath) to short,
|
|
37
|
+
* readable frontend error codes used in the ICU select props.
|
|
38
|
+
*/
|
|
39
|
+
const API_ERROR_PATH_TO_FRONTEND = {
|
|
40
|
+
// Beneficiary account name
|
|
41
|
+
"withdrawal.settings.error.empty_beneficiaryname": "empty",
|
|
42
|
+
"withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
|
|
43
|
+
"withdrawal.settings.error.numeric_beneficiaryname": "numeric",
|
|
44
|
+
"withdrawal_settings.error.beneficiaryname.size": "tooLong",
|
|
45
|
+
"withdrawal.settings.error.non_english_beneficiaryname": "nonEnglish",
|
|
46
|
+
"withdrawal_settings.error.business_beneficiaryname_match": "businessNameMismatch",
|
|
47
|
+
"withdrawal_settings.error.beneficiaryname_match": "nameMismatch",
|
|
48
|
+
"withdrawal_settings.error.business_checkpayeename_match": "businessPayeeMismatch",
|
|
49
|
+
"withdrawal_settings.error.checkpayeename_match": "payeeMismatch",
|
|
50
|
+
// Bank account number
|
|
51
|
+
"withdrawal.settings.error.accountnumber.empty": "empty",
|
|
52
|
+
"withdrawal.settings.error.accountnumber.uk": "invalidUk",
|
|
53
|
+
"withdrawal.settings.error.bankaccount.invalid": "invalid",
|
|
54
|
+
// IBAN
|
|
55
|
+
"withdrawal.settings.error.iban": "ibanEmpty",
|
|
56
|
+
"withdrawal.settings.error.iban.alphanumeric": "ibanAlphanumeric",
|
|
57
|
+
"withdrawal.settings.error.iban.invalid": "ibanInvalid",
|
|
58
|
+
"withdrawal.settings.error.iban.uk.country.mismatch": "ibanCountryMismatch",
|
|
59
|
+
// Routing code
|
|
60
|
+
"withdrawal.settings.error.bsbNumber": "invalidBsb",
|
|
61
|
+
"withdrawal.settings.error.sortcode": "invalidSortCode",
|
|
62
|
+
"withdrawal.settings.error.routingNumber": "empty",
|
|
63
|
+
"withdrawal.settings.error.routingcode": "invalid",
|
|
64
|
+
// SWIFT / BIC
|
|
65
|
+
"withdrawal.settings.error.bic": "empty",
|
|
66
|
+
"withdrawal.settings.error.bic.alphanumeric": "alphanumeric",
|
|
67
|
+
"withdrawal.settings.error.bic.invalid": "invalid",
|
|
68
|
+
// Bank account type
|
|
69
|
+
"global.error.invalid.accounttype": "empty",
|
|
70
|
+
// Bank name
|
|
71
|
+
"withdrawal.settings.error.bankName": "empty",
|
|
72
|
+
// Tax payer ID
|
|
73
|
+
"withdrawal.settings.error.taxPayerId": "empty",
|
|
74
|
+
"withdrawal.settings.error.taxPayerId.ar": "emptyAr",
|
|
75
|
+
"withdrawal.settings.error.taxPayerId.kr": "emptyKr",
|
|
76
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric": "alphanumeric",
|
|
77
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric.ar": "alphanumericAr",
|
|
78
|
+
"withdrawal.settings.error.taxPayerId.alphanumeric.kr": "alphanumericKr",
|
|
79
|
+
"withdrawal.settings.error.taxPayerId.invalid": "invalid",
|
|
80
|
+
"withdrawal.settings.error.taxPayerId.invalid.ar": "invalidAr",
|
|
81
|
+
"withdrawal.settings.error.taxPayerId.invalid.kr": "invalidKr",
|
|
82
|
+
"withdrawal.settings.error.taxPayerId.invalid.kzt": "invalidKzt",
|
|
83
|
+
"withdrawal.settings.error.taxPayerId.cnpj": "cnpjTooShort",
|
|
84
|
+
"withdrawal.settings.error.taxPayerId.cpf": "cpfTooShort",
|
|
85
|
+
// Patronymic name
|
|
86
|
+
"withdrawal.settings.error.patronymicName": "empty",
|
|
87
|
+
"withdrawal.settings.error.patronymicName.alphanumeric": "alphanumeric",
|
|
88
|
+
// VO code
|
|
89
|
+
"withdrawal.settings.error.voCode": "empty",
|
|
90
|
+
"withdrawal.settings.error.voCode.alphanumeric": "alphanumeric",
|
|
91
|
+
// Agency code
|
|
92
|
+
"withdrawal.settings.error.agencyCode": "empty",
|
|
93
|
+
"withdrawal.settings.error.agencyCode.alphanumeric": "alphanumeric",
|
|
94
|
+
"withdrawal.settings.error.agencyCode.length": "tooShort",
|
|
95
|
+
// Bank address fields
|
|
96
|
+
"withdrawal.settings.error.bankAddress": "empty",
|
|
97
|
+
"withdrawal.settings.error.bankCity": "empty",
|
|
98
|
+
"withdrawal.settings.error.bankProvinceState": "empty",
|
|
99
|
+
"withdrawal.settings.error.bankPostalCode": "empty",
|
|
100
|
+
// Branch code / name
|
|
101
|
+
"withdrawal.settings.error.branchCode": "invalid",
|
|
102
|
+
"withdrawal.settings.error.branchName": "empty",
|
|
103
|
+
// Classification code
|
|
104
|
+
"withdrawal.settings.error.classificationCode.invalid": "empty",
|
|
105
|
+
"withdrawal.settings.error.classificationCode.invalid.kzt": "invalidKzt",
|
|
106
|
+
// PayPal
|
|
107
|
+
"payment.error.email": "empty",
|
|
108
|
+
"payment.error.paypal_not_supported": "unsupportedCurrency",
|
|
109
|
+
"payment.error.email.invalid": "invalidEmail",
|
|
110
|
+
"payment.error.paypal_verification_incomplete": "verificationIncomplete",
|
|
111
|
+
// Payment schedule
|
|
112
|
+
"payment.error.no_threshold": "empty",
|
|
113
|
+
"payment.error.invalid_threshold": "invalid",
|
|
114
|
+
"payment.error.no_dayOfMonth": "empty",
|
|
115
|
+
"payment.error.invalid_dayOfMonth": "invalid",
|
|
116
|
+
};
|
|
28
117
|
export function getFormInputs({ bitset, formMap }) {
|
|
29
118
|
// Convert bitset to binary representation
|
|
30
119
|
const binary = bitset.toString(2).padStart(Object.keys(formMap).length, "0");
|
|
@@ -48,6 +137,7 @@ const SAVE_WITHDRAWAL_SETTINGS = gql `
|
|
|
48
137
|
validationErrors {
|
|
49
138
|
field
|
|
50
139
|
message
|
|
140
|
+
code
|
|
51
141
|
}
|
|
52
142
|
}
|
|
53
143
|
}
|
|
@@ -63,6 +153,7 @@ const UPDATE_WITHDRAWAL_SETTINGS = gql `
|
|
|
63
153
|
validationErrors {
|
|
64
154
|
field
|
|
65
155
|
message
|
|
156
|
+
code
|
|
66
157
|
}
|
|
67
158
|
}
|
|
68
159
|
}
|
|
@@ -235,10 +326,13 @@ export function useBankingInfoForm(props) {
|
|
|
235
326
|
else if (!success) {
|
|
236
327
|
console.error("Validation failed: ", validationErrors);
|
|
237
328
|
const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
|
|
329
|
+
const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
|
|
330
|
+
const errorCode = API_ERROR_PATH_TO_FRONTEND[error.errorPath] || error.errorPath;
|
|
238
331
|
return {
|
|
239
332
|
...agg,
|
|
240
|
-
[
|
|
333
|
+
[formField]: {
|
|
241
334
|
type: "invalid",
|
|
335
|
+
errorCode,
|
|
242
336
|
},
|
|
243
337
|
};
|
|
244
338
|
}, {});
|
package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js
CHANGED
|
@@ -65,7 +65,7 @@ export class IndirectTaxForm {
|
|
|
65
65
|
/**
|
|
66
66
|
* @uiName Indirect tax number field label
|
|
67
67
|
*/
|
|
68
|
-
this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
68
|
+
this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
|
|
69
69
|
/**
|
|
70
70
|
* Displayed to participants registered for QST.
|
|
71
71
|
* @uiName QST number field label
|
|
@@ -104,7 +104,7 @@ export class IndirectTaxForm {
|
|
|
104
104
|
/**
|
|
105
105
|
* @uiName Missing indirect tax number error message
|
|
106
106
|
*/
|
|
107
|
-
this.indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
107
|
+
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";
|
|
108
108
|
/**
|
|
109
109
|
* Placeholder text displayed in the country search dropdown
|
|
110
110
|
* @uiName Country field placeholder text
|
|
@@ -457,7 +457,7 @@ export class IndirectTaxForm {
|
|
|
457
457
|
},
|
|
458
458
|
"attribute": "indirect-tax-number",
|
|
459
459
|
"reflect": false,
|
|
460
|
-
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
460
|
+
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}\""
|
|
461
461
|
},
|
|
462
462
|
"qstNumber": {
|
|
463
463
|
"type": "string",
|
|
@@ -631,7 +631,7 @@ export class IndirectTaxForm {
|
|
|
631
631
|
},
|
|
632
632
|
"attribute": "indirect-tax-number-error",
|
|
633
633
|
"reflect": false,
|
|
634
|
-
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
634
|
+
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required\""
|
|
635
635
|
},
|
|
636
636
|
"searchForCountryText": {
|
|
637
637
|
"type": "string",
|
|
@@ -32,6 +32,32 @@ export const CONNECT_PARTNER = gql `
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
|
+
export const COMPLETE_PARTNER = gql `
|
|
36
|
+
mutation completeImpactConnection($vars: ImpactConnectionInput!) {
|
|
37
|
+
completeImpactConnection(impactConnectionInput: $vars) {
|
|
38
|
+
success
|
|
39
|
+
validationErrors {
|
|
40
|
+
field
|
|
41
|
+
message
|
|
42
|
+
}
|
|
43
|
+
user {
|
|
44
|
+
id
|
|
45
|
+
accountId
|
|
46
|
+
impactConnection {
|
|
47
|
+
connected
|
|
48
|
+
publisher {
|
|
49
|
+
brandedSignup
|
|
50
|
+
requiredTaxDocumentType
|
|
51
|
+
currentTaxDocument {
|
|
52
|
+
type
|
|
53
|
+
status
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
35
61
|
function getOption(countries, countryCode) {
|
|
36
62
|
if (!countries)
|
|
37
63
|
return;
|
|
@@ -50,6 +76,7 @@ export function useIndirectTaxForm(props) {
|
|
|
50
76
|
const context = useParentValue(TAX_FORM_CONTEXT_NAMESPACE);
|
|
51
77
|
const [step, setStep] = useParent(TAX_CONTEXT_NAMESPACE);
|
|
52
78
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
|
|
79
|
+
const [completeImpactPartner, { loading: completeLoading, errors: completeErrors },] = useMutation(COMPLETE_PARTNER);
|
|
53
80
|
const userForm = useParentValue(USER_FORM_CONTEXT_NAMESPACE);
|
|
54
81
|
const { data: userData, refetch, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
55
82
|
const { data: _countriesRes, loading: countriesLoading } = useParentQueryValue(COUNTRIES_QUERY_NAMESPACE);
|
|
@@ -112,7 +139,7 @@ export function useIndirectTaxForm(props) {
|
|
|
112
139
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
113
140
|
};
|
|
114
141
|
async function connectPartner(formData) {
|
|
115
|
-
var _a, _b, _c, _d, _e;
|
|
142
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
116
143
|
const vars = {
|
|
117
144
|
user: {
|
|
118
145
|
id: user.id,
|
|
@@ -134,19 +161,30 @@ export function useIndirectTaxForm(props) {
|
|
|
134
161
|
additionalTaxId: formData.qstNumber,
|
|
135
162
|
withholdingTaxId: formData.subRegionTaxNumber,
|
|
136
163
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (
|
|
164
|
+
//AL: TODO completePartnerMutation might change
|
|
165
|
+
let result = null;
|
|
166
|
+
let connectionResult;
|
|
167
|
+
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) {
|
|
168
|
+
result = await completeImpactPartner({
|
|
169
|
+
vars,
|
|
170
|
+
});
|
|
171
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.completeImpactConnection;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
result = await connectImpactPartner({
|
|
175
|
+
vars,
|
|
176
|
+
});
|
|
177
|
+
connectionResult = (_d = result) === null || _d === void 0 ? void 0 : _d.createImpactConnection;
|
|
178
|
+
}
|
|
179
|
+
if (!result || ((_e = result) === null || _e === void 0 ? void 0 : _e.message))
|
|
141
180
|
throw new Error();
|
|
142
|
-
if (!(
|
|
181
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
143
182
|
// Output backend errors to console for now
|
|
144
|
-
console.error("Failed to create Impact connection: ",
|
|
183
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
145
184
|
throw new Error();
|
|
146
185
|
}
|
|
147
186
|
await refetch();
|
|
148
|
-
const resultPublisher = (
|
|
149
|
-
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
187
|
+
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;
|
|
150
188
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
151
189
|
// Fire form change event
|
|
152
190
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
@@ -212,8 +250,8 @@ export function useIndirectTaxForm(props) {
|
|
|
212
250
|
states: {
|
|
213
251
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
214
252
|
hideSteps: context.hideSteps,
|
|
215
|
-
disabled: loading || countriesLoading || connectLoading,
|
|
216
|
-
loading: loading || connectLoading || countriesLoading,
|
|
253
|
+
disabled: loading || countriesLoading || connectLoading || completeLoading,
|
|
254
|
+
loading: loading || connectLoading || countriesLoading || completeLoading,
|
|
217
255
|
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),
|
|
218
256
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
219
257
|
formState: {
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js
CHANGED
|
@@ -15,7 +15,7 @@ export class PayoutDetailsCard {
|
|
|
15
15
|
* Badge text indicating payout status
|
|
16
16
|
* @uiName Payout badge status text
|
|
17
17
|
*/
|
|
18
|
-
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
18
|
+
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
19
19
|
/**
|
|
20
20
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
21
21
|
* @uiName Payout schedule by threshold text
|
|
@@ -73,7 +73,7 @@ export class PayoutDetailsCard {
|
|
|
73
73
|
},
|
|
74
74
|
"attribute": "status-badge-text",
|
|
75
75
|
"reflect": false,
|
|
76
|
-
"defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
76
|
+
"defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }\""
|
|
77
77
|
},
|
|
78
78
|
"thresholdPayoutText": {
|
|
79
79
|
"type": "string",
|
|
@@ -176,7 +176,7 @@ export class TaxAndCashMonolith {
|
|
|
176
176
|
* @uiName Indirect tax number field label
|
|
177
177
|
* @uiGroup Step 2 Properties
|
|
178
178
|
*/
|
|
179
|
-
this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
179
|
+
this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
|
|
180
180
|
/**
|
|
181
181
|
* @uiName Province field label
|
|
182
182
|
* @uiGroup Step 2 Properties
|
|
@@ -186,7 +186,7 @@ export class TaxAndCashMonolith {
|
|
|
186
186
|
* @uiName Missing indirect tax number error message
|
|
187
187
|
* @uiGroup Step 2 Properties
|
|
188
188
|
*/
|
|
189
|
-
this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
189
|
+
this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";
|
|
190
190
|
/**
|
|
191
191
|
* Displayed to participants registered for QST.
|
|
192
192
|
* @uiName QST number field label
|
|
@@ -754,7 +754,7 @@ export class TaxAndCashMonolith {
|
|
|
754
754
|
* @uiName Payout status badge
|
|
755
755
|
* @uiGroup Dashboard Properties
|
|
756
756
|
*/
|
|
757
|
-
this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
757
|
+
this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
758
758
|
/**
|
|
759
759
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
760
760
|
* @uiName Payout schedule by threshold text
|
|
@@ -1844,7 +1844,7 @@ export class TaxAndCashMonolith {
|
|
|
1844
1844
|
},
|
|
1845
1845
|
"attribute": "step-2_indirect-tax-number",
|
|
1846
1846
|
"reflect": false,
|
|
1847
|
-
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
1847
|
+
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}\""
|
|
1848
1848
|
},
|
|
1849
1849
|
"step2_province": {
|
|
1850
1850
|
"type": "string",
|
|
@@ -1892,7 +1892,7 @@ export class TaxAndCashMonolith {
|
|
|
1892
1892
|
},
|
|
1893
1893
|
"attribute": "step-2_indirect-tax-number-error",
|
|
1894
1894
|
"reflect": false,
|
|
1895
|
-
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}
|
|
1895
|
+
"defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required\""
|
|
1896
1896
|
},
|
|
1897
1897
|
"step2_qstNumber": {
|
|
1898
1898
|
"type": "string",
|
|
@@ -4259,7 +4259,7 @@ export class TaxAndCashMonolith {
|
|
|
4259
4259
|
},
|
|
4260
4260
|
"attribute": "dashboard_status-badge-text",
|
|
4261
4261
|
"reflect": false,
|
|
4262
|
-
"defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
4262
|
+
"defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }\""
|
|
4263
4263
|
},
|
|
4264
4264
|
"dashboard_thresholdPayoutText": {
|
|
4265
4265
|
"type": "string",
|
|
@@ -8,6 +8,10 @@ function getCurrentStep(user) {
|
|
|
8
8
|
return "/1";
|
|
9
9
|
}
|
|
10
10
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, } = user.impactConnection.publisher;
|
|
11
|
+
console.log(user.impactConnection, "publisher data in useTaxAndCash to determine step new new");
|
|
12
|
+
if (user.impactConnection.connectionStatus === "STARTED") {
|
|
13
|
+
return "/1";
|
|
14
|
+
}
|
|
11
15
|
// If they do have a required document, look at current document
|
|
12
16
|
if (requiredTaxDocumentType && !currentTaxDocument) {
|
|
13
17
|
// Specific to custom CASH setting,
|
|
@@ -168,7 +168,7 @@ export class TaxAndCashDashboard {
|
|
|
168
168
|
/**
|
|
169
169
|
* @uiName Payout status badge
|
|
170
170
|
*/
|
|
171
|
-
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
171
|
+
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
172
172
|
/**
|
|
173
173
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
174
174
|
* @uiName Payout schedule by threshold text
|
|
@@ -1049,7 +1049,7 @@ export class TaxAndCashDashboard {
|
|
|
1049
1049
|
},
|
|
1050
1050
|
"attribute": "status-badge-text",
|
|
1051
1051
|
"reflect": false,
|
|
1052
|
-
"defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout}
|
|
1052
|
+
"defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }\""
|
|
1053
1053
|
},
|
|
1054
1054
|
"thresholdPayoutText": {
|
|
1055
1055
|
"type": "string",
|
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -264,7 +264,7 @@ const vanillaStyle = `
|
|
|
264
264
|
}
|
|
265
265
|
`;
|
|
266
266
|
export const UserInfoFormView = (props) => {
|
|
267
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
267
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
268
268
|
const { states, states: { formState }, callbacks, text, refs, data, } = props;
|
|
269
269
|
const { classes } = sheet;
|
|
270
270
|
const bankingCollectionText = intl.formatMessage({
|
|
@@ -287,9 +287,14 @@ export const UserInfoFormView = (props) => {
|
|
|
287
287
|
default:
|
|
288
288
|
regionLabel = text.state;
|
|
289
289
|
}
|
|
290
|
+
// when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "000000" and the phoneNumberCountryCode to "DZ"
|
|
290
291
|
function isDisabledPartnerInput(field) {
|
|
291
|
-
var _a;
|
|
292
|
-
|
|
292
|
+
var _a, _b;
|
|
293
|
+
if (((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a.phoneNumber) === "0000000" &&
|
|
294
|
+
(field === "phoneNumber" || field === "phoneNumberCountryCode")) {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
return states.isPartner && !!((_b = data.partnerData) === null || _b === void 0 ? void 0 : _b[field]);
|
|
293
298
|
}
|
|
294
299
|
function isDisabledUserInput(field) {
|
|
295
300
|
var _a;
|
|
@@ -325,14 +330,6 @@ export const UserInfoFormView = (props) => {
|
|
|
325
330
|
}, {
|
|
326
331
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
327
332
|
})))),
|
|
328
|
-
(states.isPartner || states.isUser) && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
329
|
-
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
330
|
-
h("p", { part: "alert-description" }, intl.formatMessage({
|
|
331
|
-
id: "isPartnerAlertDescription",
|
|
332
|
-
defaultMessage: text.isPartnerAlertDescription,
|
|
333
|
-
}, {
|
|
334
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
335
|
-
})))),
|
|
336
333
|
h("div", null,
|
|
337
334
|
h("div", { class: classes.InputContainer },
|
|
338
335
|
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || isDisabledUserInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
@@ -438,11 +435,6 @@ export const UserInfoFormView = (props) => {
|
|
|
438
435
|
_t.map((c) => (h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } },
|
|
439
436
|
c.currencyCode,
|
|
440
437
|
" - ",
|
|
441
|
-
c.displayName)))),
|
|
442
|
-
h("div", { class: classes.CheckboxWrapper },
|
|
443
|
-
h("sl-checkbox", { checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
444
|
-
e.target.value = e.target.checked;
|
|
445
|
-
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
446
|
-
((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
|
|
438
|
+
c.displayName))))),
|
|
447
439
|
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
448
440
|
};
|
|
@@ -5,7 +5,7 @@ import { CURRENCIES_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE
|
|
|
5
5
|
import { ADDRESS_REGIONS } from "../subregions";
|
|
6
6
|
import { objectIsFull, validTaxDocument } from "../utils";
|
|
7
7
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
8
|
-
import { CONNECT_PARTNER, } from "../sqm-indirect-tax-form/useIndirectTaxForm";
|
|
8
|
+
import { CONNECT_PARTNER, COMPLETE_PARTNER, } from "../sqm-indirect-tax-form/useIndirectTaxForm";
|
|
9
9
|
import { gql } from "graphql-request";
|
|
10
10
|
const GET_INDIRECT_TAX_COUNTRY_CODE = gql `
|
|
11
11
|
query getIndirectTaxCountryCode {
|
|
@@ -26,6 +26,7 @@ export function useUserInfoForm(props) {
|
|
|
26
26
|
const [userFormContext, setUserFormContext] = useParent(USER_FORM_CONTEXT_NAMESPACE);
|
|
27
27
|
const user = useUserIdentity();
|
|
28
28
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
|
|
29
|
+
const [completeImpactPartner, { loading: completeLoading, errors: completeErrors },] = useMutation(COMPLETE_PARTNER);
|
|
29
30
|
const { data: tenantData } = useQuery(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
30
31
|
const { data, loading, refetch, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
31
32
|
const _currencies = useParentValue(CURRENCIES_NAMESPACE);
|
|
@@ -60,8 +61,13 @@ export function useUserInfoForm(props) {
|
|
|
60
61
|
lastName: user.impactConnection.user.lastName,
|
|
61
62
|
countryCode: user.impactConnection.publisher.countryCode,
|
|
62
63
|
currency: user.impactConnection.publisher.currency,
|
|
63
|
-
phoneNumberCountryCode
|
|
64
|
-
|
|
64
|
+
// when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "000000" and the phoneNumberCountryCode to "DZ"
|
|
65
|
+
phoneNumberCountryCode: user.impactConnection.publisher.phoneNumber === "0000000"
|
|
66
|
+
? null
|
|
67
|
+
: user.impactConnection.publisher.phoneNumberCountryCode,
|
|
68
|
+
phoneNumber: user.impactConnection.publisher.phoneNumber === "0000000"
|
|
69
|
+
? null
|
|
70
|
+
: user.impactConnection.publisher.phoneNumber,
|
|
65
71
|
address: user.impactConnection.publisher.billingAddress,
|
|
66
72
|
city: user.impactConnection.publisher.billingCity,
|
|
67
73
|
state: user.impactConnection.publisher.billingState,
|
|
@@ -132,7 +138,7 @@ export function useUserInfoForm(props) {
|
|
|
132
138
|
}
|
|
133
139
|
}, [currencySearch, currencies]);
|
|
134
140
|
async function connectPartner(formData) {
|
|
135
|
-
var _a, _b, _c, _d, _e;
|
|
141
|
+
var _a, _b, _c, _d, _e, _f;
|
|
136
142
|
const vars = {
|
|
137
143
|
user: {
|
|
138
144
|
id: user.id,
|
|
@@ -149,20 +155,32 @@ export function useUserInfoForm(props) {
|
|
|
149
155
|
phoneNumber: formData.phoneNumber,
|
|
150
156
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
151
157
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
//AL: TODO completePartnerMutation might change
|
|
159
|
+
// if user already has an impact connection, call completeImpactPartner to update their information instead of connectPartner
|
|
160
|
+
const userData = data === null || data === void 0 ? void 0 : data.user;
|
|
161
|
+
let result = null;
|
|
162
|
+
let connectionResult;
|
|
163
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
164
|
+
console.log(vars, "values for completeImpactPartner");
|
|
165
|
+
result = await completeImpactPartner({
|
|
166
|
+
vars,
|
|
167
|
+
});
|
|
168
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
result = await connectImpactPartner({
|
|
172
|
+
vars,
|
|
173
|
+
});
|
|
174
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
175
|
+
}
|
|
176
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
156
177
|
throw new Error();
|
|
157
|
-
if (!(
|
|
158
|
-
|
|
159
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
160
|
-
.validationErrors);
|
|
178
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
179
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
161
180
|
throw new Error();
|
|
162
181
|
}
|
|
163
182
|
await refetch();
|
|
164
|
-
const resultPublisher = (
|
|
165
|
-
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
183
|
+
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;
|
|
166
184
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
167
185
|
// Fire form change event
|
|
168
186
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
@@ -287,9 +305,9 @@ export function useUserInfoForm(props) {
|
|
|
287
305
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
288
306
|
hideState: !hasStates,
|
|
289
307
|
hideSteps: !!context.hideSteps,
|
|
290
|
-
disabled: loading || connectLoading,
|
|
308
|
+
disabled: loading || connectLoading || completeLoading,
|
|
291
309
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
292
|
-
loading: loading || connectLoading,
|
|
310
|
+
loading: loading || connectLoading || completeLoading,
|
|
293
311
|
isPartner: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
294
312
|
isUser: !!((_j = (_h = data === null || data === void 0 ? void 0 : data.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
295
313
|
formState: {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { h, c as Host, d as getAssetPath, F as Fragment, g as getElement } from './index-38ad4957.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-39f55ec2.js';
|
|
3
3
|
import { b as browser, u as useMemo, k as useState } from './dom-context-hooks.module-50442785.js';
|
|
4
|
-
import { H, L, J, d as dist, w as wn, B, F as Fn, $ as $e, g as getEnvironmentSDK } from './index.module-
|
|
4
|
+
import { H, L, J, d as dist, w as wn, B, F as Fn, $ as $e, g as getEnvironmentSDK } from './index.module-cede12c6.js';
|
|
5
5
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
6
|
import { l as luxonLocale } from './utils-334c1e34.js';
|
|
7
7
|
import { c as createStyleSheet, j as jss, a as create } from './JSS-67b5cff8.js';
|
|
8
|
-
import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED } from './useReferralCodes-
|
|
8
|
+
import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED } from './useReferralCodes-3cde72d4.js';
|
|
9
9
|
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f750863a.js';
|
|
10
10
|
import { C as CopyTextView } from './copy-text-view-87259b11.js';
|
|
11
|
-
import { T as TextSpanView } from './sqm-text-span-view-
|
|
12
|
-
import { u as useChildElements } from './useChildElements-
|
|
11
|
+
import { T as TextSpanView } from './sqm-text-span-view-4db9e33f.js';
|
|
12
|
+
import { u as useChildElements } from './useChildElements-c26d7347.js';
|
|
13
13
|
import { l as luxon } from './luxon-1be92a8e.js';
|
|
14
14
|
import { p as pathToRegexp } from './index-ffa26b43.js';
|
|
15
15
|
import { o as optimizeCloudinaryUrl } from './imageUrl-4775f17b.js';
|
|
16
|
-
import { a as isValidColor, b as isMobile } from './utilities-
|
|
16
|
+
import { a as isValidColor, b as isMobile } from './utilities-c9e730ed.js';
|
|
17
17
|
import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-a8c708cd.js';
|
|
18
18
|
|
|
19
19
|
function BigStatView(props) {
|
|
@@ -3022,7 +3022,7 @@ function ReferralIframeView(props) {
|
|
|
3022
3022
|
const styleString = sheet.toString();
|
|
3023
3023
|
return (h("div", { class: sheet.classes.Container },
|
|
3024
3024
|
h("style", { type: "text/css" }, styleString),
|
|
3025
|
-
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}
|
|
3025
|
+
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
3026
3026
|
}
|
|
3027
3027
|
|
|
3028
3028
|
const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { d as dist } from './index.module-cede12c6.js';
|
|
2
|
+
|
|
3
|
+
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
4
|
+
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
5
|
+
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
6
|
+
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
7
|
+
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
8
|
+
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
9
|
+
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
10
|
+
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
11
|
+
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
12
|
+
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
13
|
+
const GET_USER = dist.gql `
|
|
2
14
|
query getUserTaxInfo {
|
|
3
15
|
user: viewer {
|
|
4
16
|
... on User {
|
|
@@ -27,6 +39,7 @@ import{h as e}from"./p-083180bf.js";import{i as t}from"./p-f8a09b0f.js";import{d
|
|
|
27
39
|
}
|
|
28
40
|
impactConnection {
|
|
29
41
|
connected
|
|
42
|
+
connectionStatus
|
|
30
43
|
user {
|
|
31
44
|
firstName
|
|
32
45
|
lastName
|
|
@@ -76,7 +89,8 @@ import{h as e}from"./p-083180bf.js";import{i as t}from"./p-f8a09b0f.js";import{d
|
|
|
76
89
|
}
|
|
77
90
|
}
|
|
78
91
|
}
|
|
79
|
-
|
|
92
|
+
`;
|
|
93
|
+
const GET_COUNTRIES = dist.gql `
|
|
80
94
|
query getCountries {
|
|
81
95
|
impactPayoutCountries(limit: 1000) {
|
|
82
96
|
data {
|
|
@@ -85,7 +99,8 @@ import{h as e}from"./p-083180bf.js";import{i as t}from"./p-f8a09b0f.js";import{d
|
|
|
85
99
|
}
|
|
86
100
|
}
|
|
87
101
|
}
|
|
88
|
-
|
|
102
|
+
`;
|
|
103
|
+
const GET_CURRENCIES = dist.gql `
|
|
89
104
|
query currencies($locale: RSLocale) {
|
|
90
105
|
currencies(limit: 300) {
|
|
91
106
|
data {
|
|
@@ -94,7 +109,8 @@ import{h as e}from"./p-083180bf.js";import{i as t}from"./p-f8a09b0f.js";import{d
|
|
|
94
109
|
}
|
|
95
110
|
}
|
|
96
111
|
}
|
|
97
|
-
|
|
112
|
+
`;
|
|
113
|
+
const GET_FINANCE_NETWORK_SETTINGS = dist.gql `
|
|
98
114
|
query impactFinanceNetworkSettings(
|
|
99
115
|
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
100
116
|
) {
|
|
@@ -112,4 +128,7 @@ import{h as e}from"./p-083180bf.js";import{i as t}from"./p-f8a09b0f.js";import{d
|
|
|
112
128
|
totalCount
|
|
113
129
|
}
|
|
114
130
|
}
|
|
115
|
-
|
|
131
|
+
`;
|
|
132
|
+
const FORM_STEPS = 4;
|
|
133
|
+
|
|
134
|
+
export { CURRENCIES_NAMESPACE as C, FORM_STEPS as F, GET_USER as G, SORTED_COUNTRIES_NAMESPACE as S, TAX_CONTEXT_NAMESPACE as T, USER_FORM_CONTEXT_NAMESPACE as U, TAX_FORM_CONTEXT_NAMESPACE as a, COUNTRIES_NAMESPACE as b, USER_QUERY_NAMESPACE as c, COUNTRIES_QUERY_NAMESPACE as d, GET_COUNTRIES as e, FINANCE_NETWORK_SETTINGS_NAMESPACE as f, GET_FINANCE_NETWORK_SETTINGS as g, CURRENCIES_QUERY_NAMESPACE as h, GET_CURRENCIES as i };
|