@saasquatch/mint-components 2.1.9-20 → 2.1.9-22
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-2b3f51be.js → ShadowViewAddon-cd349587.js} +410 -24
- package/dist/cjs/{data-6b5095f8.js → data-8c8a08f6.js} +91 -2
- package/dist/cjs/extractProps-e9c55ba8.js +35 -0
- package/dist/cjs/{global-0f8b1267.js → global-b7b1b8fe.js} +3126 -3177
- package/dist/cjs/{index.module-42d413d9.js → index.module-f8c8495f.js} +149 -154
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/{re-render-69bde9ee.js → re-render-72a0ef45.js} +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +99 -484
- package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +230 -426
- package/dist/cjs/sqm-close-button.cjs.entry.js +1 -1
- package/dist/cjs/sqm-code-verification.cjs.entry.js +8 -7
- package/dist/cjs/sqm-context-router.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +418 -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-d90f8941.js → sqm-lead-checkbox-field-view-0af2a157.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-lead-input-field-view-818d9e9a.js → sqm-lead-input-field-view-0cd7ebdb.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-20693e59.js → sqm-navigation-sidebar-item-view-49b152dd.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-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-60f8e0a7.js → sqm-portal-email-verification-view-abb773a7.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 +8 -8
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-2bfd7afd.js → sqm-portal-profile-view-3515e1e5.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-fd48f1d3.js → sqm-portal-registration-form-view-a45f7a52.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-d90d77f9.js → sqm-portal-reset-password-view-a767b044.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-verify-email-view-b31638f8.js → sqm-portal-verify-email-view-717d0633.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 +208 -251
- 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-8a32dd8c.js → sqm-text-span-view-b9e10f5d.js} +1 -1
- package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-user-info-form-view-db47a968.js → sqm-user-info-form-view-53306f6e.js} +34 -32
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +214 -0
- package/dist/cjs/{useChildElements-89bc50a9.js → useChildElements-041127d7.js} +1 -1
- package/dist/cjs/{useInstantAccessRegistration-651aa95b.js → useInstantAccessRegistration-2398df36.js} +2 -2
- package/dist/cjs/{useLeadFormState-76d3b511.js → useLeadFormState-b4c2ab5b.js} +2 -2
- package/dist/cjs/{usePayoutStatus-cf050a03.js → usePayoutStatus-0192fccd.js} +6 -4
- package/dist/cjs/{usePortalRegistrationForm-31822dc4.js → usePortalRegistrationForm-23ee2d62.js} +2 -2
- package/dist/cjs/{useReferralCodes-89c2b972.js → useReferralCodes-0f7948af.js} +1 -1
- package/dist/cjs/{useReferralTable-d3ddfd05.js → useReferralTable-6e9de0d5.js} +3 -3
- package/dist/cjs/{useRegistrationFormState-a223f597.js → useRegistrationFormState-4fe5b770.js} +1 -1
- package/dist/cjs/{useVerificationEmail-994bc32f.js → useVerificationEmail-5d19aa99.js} +1 -1
- package/dist/cjs/{utilities-096934ea.js → utilities-fcdb9504.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +1 -0
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +1 -1
- package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
- 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 +27 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +132 -11
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +192 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +685 -27
- package/dist/collection/components/sqm-share-link/useShareLink.js +210 -14
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -4
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +4 -3
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +2 -0
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +11 -510
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +5 -20
- package/dist/collection/components/tax-and-cash/data.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
- 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 +11 -49
- 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 +0 -4
- 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 +10 -7
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +16 -34
- package/dist/esm/{ShadowViewAddon-78b791d2.js → ShadowViewAddon-ec5f917e.js} +411 -26
- package/dist/esm/{data-33c16dff.js → data-12e6aae1.js} +85 -3
- package/dist/esm/extractProps-54064fb0.js +32 -0
- package/dist/esm/{global-39f55ec2.js → global-96c14d63.js} +3126 -3177
- package/dist/esm/{index.module-cede12c6.js → index.module-b23fdad8.js} +150 -153
- package/dist/esm/{keys-db1897ae.js → keys-406491dc.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-7a0c7976.js → re-render-f30aeb6b.js} +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +89 -474
- package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +225 -420
- package/dist/esm/sqm-close-button.entry.js +1 -1
- package/dist/esm/sqm-code-verification.entry.js +9 -8
- package/dist/esm/sqm-context-router.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +414 -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-7cee2b4e.js → sqm-lead-checkbox-field-view-7928db07.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
- package/dist/esm/{sqm-lead-input-field-view-11a4f9a9.js → sqm-lead-input-field-view-d1b91650.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-48e7e0d3.js → sqm-navigation-sidebar-item-view-b3beac5a.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-password-field.entry.js +2 -2
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-33f5c108.js → sqm-portal-email-verification-view-04528277.js} +2 -2
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +8 -8
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-88fd6a93.js → sqm-portal-profile-view-b5ea620f.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-9bf30b56.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-f8d1689c.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
- package/dist/esm/{sqm-portal-verify-email-view-0b70c1b1.js → sqm-portal-verify-email-view-c61536b7.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 +174 -217
- 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-4db9e33f.js → sqm-text-span-view-72f43dff.js} +1 -1
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm/{sqm-user-info-form-view-712cd51b.js → sqm-user-info-form-view-19d81a2b.js} +12 -10
- package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
- package/dist/esm/sqm-widget-verification.entry.js +210 -0
- package/dist/esm/{useChildElements-c26d7347.js → useChildElements-9bccfb72.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-e2392f42.js → useInstantAccessRegistration-69fefed0.js} +2 -2
- package/dist/esm/{useLeadFormState-9099c8d4.js → useLeadFormState-dd4e8b08.js} +2 -2
- package/dist/esm/{usePayoutStatus-fa504d49.js → usePayoutStatus-46c0c289.js} +4 -3
- package/dist/esm/{usePortalRegistrationForm-5844032a.js → usePortalRegistrationForm-62de6fb1.js} +2 -2
- package/dist/esm/{useReferralCodes-3cde72d4.js → useReferralCodes-52ca720f.js} +1 -1
- package/dist/esm/{useReferralTable-35e6d4c1.js → useReferralTable-92af4133.js} +3 -3
- package/dist/esm/{useRegistrationFormState-1813bdef.js → useRegistrationFormState-2c090c38.js} +1 -1
- package/dist/esm/{useVerificationEmail-cb3d51e3.js → useVerificationEmail-c13c3b51.js} +1 -1
- package/dist/esm/{utilities-c9e730ed.js → utilities-77b1e0cc.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-ec5f917e.js +1 -0
- package/dist/esm-es5/data-12e6aae1.js +1 -0
- package/dist/esm-es5/extractProps-54064fb0.js +1 -0
- package/dist/esm-es5/global-96c14d63.js +271 -0
- package/dist/esm-es5/index.module-b23fdad8.js +1 -0
- package/dist/esm-es5/{keys-db1897ae.js → keys-406491dc.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-7a0c7976.js → re-render-f30aeb6b.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -0
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.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-7cee2b4e.js → sqm-lead-checkbox-field-view-7928db07.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-11a4f9a9.js → sqm-lead-input-field-view-d1b91650.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-48e7e0d3.js → sqm-navigation-sidebar-item-view-b3beac5a.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-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-33f5c108.js → sqm-portal-email-verification-view-04528277.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-88fd6a93.js → sqm-portal-profile-view-b5ea620f.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-9bf30b56.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-f8d1689c.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-0b70c1b1.js → sqm-portal-verify-email-view-c61536b7.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-4db9e33f.js → sqm-text-span-view-72f43dff.js} +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +1 -0
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +1 -0
- package/dist/esm-es5/{useChildElements-c26d7347.js → useChildElements-9bccfb72.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-e2392f42.js → useInstantAccessRegistration-69fefed0.js} +1 -1
- package/dist/esm-es5/{useLeadFormState-9099c8d4.js → useLeadFormState-dd4e8b08.js} +1 -1
- package/dist/esm-es5/{usePayoutStatus-fa504d49.js → usePayoutStatus-46c0c289.js} +2 -2
- package/dist/esm-es5/{usePortalRegistrationForm-5844032a.js → usePortalRegistrationForm-62de6fb1.js} +1 -1
- package/dist/esm-es5/{useReferralCodes-3cde72d4.js → useReferralCodes-52ca720f.js} +1 -1
- package/dist/esm-es5/{useReferralTable-35e6d4c1.js → useReferralTable-92af4133.js} +1 -1
- package/dist/esm-es5/{useRegistrationFormState-1813bdef.js → useRegistrationFormState-2c090c38.js} +1 -1
- package/dist/esm-es5/{useVerificationEmail-cb3d51e3.js → useVerificationEmail-c13c3b51.js} +1 -1
- package/dist/esm-es5/{utilities-c9e730ed.js → utilities-77b1e0cc.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-d01949f7.system.entry.js → p-00b235c5.system.entry.js} +1 -1
- package/dist/mint-components/{p-62212b9a.entry.js → p-013564b3.entry.js} +1 -1
- package/dist/mint-components/p-02499e08.entry.js +1 -0
- package/dist/mint-components/{p-998c989a.system.entry.js → p-027fc3be.system.entry.js} +1 -1
- package/dist/mint-components/{p-32d078a3.js → p-035d9b65.js} +1 -1
- package/dist/mint-components/{p-e4dbca9a.system.js → p-036a2617.system.js} +1 -1
- package/dist/mint-components/p-0382993f.system.entry.js +1 -0
- package/dist/mint-components/{p-886fb141.entry.js → p-058aefe1.entry.js} +1 -1
- package/dist/mint-components/p-0706cf9e.system.entry.js +1 -0
- package/dist/mint-components/p-0797a946.js +1 -0
- package/dist/mint-components/{p-f11d29fd.entry.js → p-09348341.entry.js} +1 -1
- package/dist/mint-components/{p-991f60fc.entry.js → p-09f7aacd.entry.js} +2 -2
- package/dist/mint-components/{p-8ecc8875.js → p-0c0d4065.js} +5 -6
- package/dist/mint-components/{p-8f9c1387.js → p-0d83907e.js} +1 -1
- package/dist/mint-components/p-1021a49f.system.entry.js +1 -0
- package/dist/mint-components/{p-2d3a12f2.entry.js → p-13292317.entry.js} +2 -2
- package/dist/mint-components/{p-731c4d33.entry.js → p-13d1b10d.entry.js} +1 -1
- package/dist/mint-components/{p-a86ce218.system.js → p-172675ca.system.js} +1 -1
- package/dist/mint-components/{p-d355336b.system.js → p-19c441b2.system.js} +1 -1
- package/dist/mint-components/{p-1d49dddc.entry.js → p-1d92c169.entry.js} +1 -1
- package/dist/mint-components/{p-86381dc7.system.js → p-205cfdcd.system.js} +1 -1
- package/dist/mint-components/{p-4723526d.js → p-2668335b.js} +1 -1
- package/dist/mint-components/{p-45475cf9.system.entry.js → p-2b4af8e8.system.entry.js} +1 -1
- package/dist/mint-components/{p-e9e05970.system.entry.js → p-2d5c2bd4.system.entry.js} +1 -1
- package/dist/mint-components/p-30c1ef36.system.js +1 -0
- package/dist/mint-components/{p-bcadd021.js → p-3286ef38.js} +1 -1
- package/dist/mint-components/{p-0d75a207.js → p-3366b81e.js} +2 -2
- package/dist/mint-components/p-38c7775a.js +1 -0
- package/dist/mint-components/p-39126430.system.entry.js +1 -0
- package/dist/mint-components/p-3adbfd0b.system.js +6 -0
- package/dist/mint-components/p-3af3e2c1.entry.js +25 -0
- package/dist/mint-components/{p-160828b4.entry.js → p-3bc62ca6.entry.js} +1 -1
- package/dist/mint-components/{p-9d6984e7.entry.js → p-40bad95a.entry.js} +2 -2
- package/dist/mint-components/{p-00463c83.system.js → p-43c31fd5.system.js} +1 -1
- package/dist/mint-components/p-468dd5dd.entry.js +273 -0
- package/dist/mint-components/p-4da5a3fe.system.entry.js +1 -0
- package/dist/mint-components/{p-608da224.entry.js → p-52674798.entry.js} +1 -1
- package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
- package/dist/mint-components/p-57dd28bd.system.js +1 -0
- package/dist/mint-components/{p-c84a2512.system.js → p-5b1d2866.system.js} +1 -1
- package/dist/mint-components/p-5b66d206.system.js +1 -0
- package/dist/mint-components/{p-5c9d030a.system.entry.js → p-5b871e38.system.entry.js} +1 -1
- package/dist/mint-components/p-5bc5c61e.entry.js +1 -0
- package/dist/mint-components/{p-b5fed7c6.entry.js → p-5c4ba8a0.entry.js} +1 -1
- package/dist/mint-components/{p-fb4ab5ba.system.entry.js → p-5ce78407.system.entry.js} +1 -1
- package/dist/mint-components/{p-9c1b0c8b.entry.js → p-61897e72.entry.js} +1 -1
- package/dist/mint-components/{p-52748a87.system.entry.js → p-626b31cb.system.entry.js} +1 -1
- package/dist/mint-components/{p-092db51a.js → p-642f2c89.js} +1 -1
- package/dist/mint-components/{p-f4a57aed.entry.js → p-653db72e.entry.js} +1 -1
- package/dist/mint-components/{p-88c9cc1b.entry.js → p-6668f9f0.entry.js} +1 -1
- package/dist/mint-components/{p-f368f04a.system.js → p-686dd5eb.system.js} +1 -1
- package/dist/mint-components/p-6c4ad51a.js +1 -0
- package/dist/mint-components/p-7265bbcb.system.js +271 -0
- package/dist/mint-components/p-738dce27.system.entry.js +1 -0
- package/dist/mint-components/{p-379cb9f1.system.js → p-7562cd98.system.js} +1 -1
- package/dist/mint-components/{p-7547180f.system.js → p-77b9cde8.system.js} +1 -1
- package/dist/mint-components/{p-96e4e6a4.entry.js → p-77fa2383.entry.js} +1 -1
- package/dist/mint-components/{p-d5a1c979.system.entry.js → p-782af7ae.system.entry.js} +1 -1
- package/dist/mint-components/{p-55627a5c.entry.js → p-7939e4af.entry.js} +1 -1
- package/dist/mint-components/{p-9b33e2a7.system.js → p-7b59e13c.system.js} +1 -1
- package/dist/mint-components/p-7efb8782.system.js +1 -0
- package/dist/mint-components/{p-60085f20.system.entry.js → p-80e116ec.system.entry.js} +1 -1
- package/dist/mint-components/{p-370e0d75.js → p-832aea99.js} +1 -1
- package/dist/mint-components/{p-36395228.system.js → p-85721089.system.js} +1 -1
- package/dist/mint-components/{p-28e0062c.system.js → p-8583ce0c.system.js} +1 -1
- package/dist/mint-components/{p-71561bb2.system.entry.js → p-8899ff38.system.entry.js} +1 -1
- package/dist/mint-components/p-892797eb.system.entry.js +1 -0
- package/dist/mint-components/{p-567a5ded.js → p-8962e023.js} +1 -1
- package/dist/mint-components/{p-3461a8cb.entry.js → p-8f2d03c7.entry.js} +1 -1
- package/dist/mint-components/{p-357040e6.system.entry.js → p-90833864.system.entry.js} +1 -1
- package/dist/mint-components/p-91a96e98.entry.js +1 -0
- package/dist/mint-components/{p-7a08d288.system.entry.js → p-9390586b.system.entry.js} +1 -1
- package/dist/mint-components/{p-0c43b6ff.entry.js → p-95510f27.entry.js} +1 -1
- package/dist/mint-components/{p-9e43f1eb.entry.js → p-982d1f6f.entry.js} +2 -2
- package/dist/mint-components/{p-77117f6c.system.js → p-a0c5631b.system.js} +1 -1
- package/dist/mint-components/{p-df88dcaa.system.js → p-a4825ec2.system.js} +1 -1
- package/dist/mint-components/{p-095b7128.js → p-a4f8abad.js} +1 -1
- package/dist/mint-components/{p-21e7079a.system.entry.js → p-a96c9bbb.system.entry.js} +1 -1
- package/dist/mint-components/{p-dbdb2a46.system.entry.js → p-aefc6c4f.system.entry.js} +1 -1
- package/dist/mint-components/{p-86a70151.entry.js → p-b2b85238.entry.js} +1 -1
- package/dist/mint-components/p-b395470f.entry.js +16 -0
- package/dist/mint-components/{p-45e2a83a.js → p-b3ad957c.js} +1 -1
- package/dist/mint-components/{p-1b0cbbae.entry.js → p-b66f45d1.entry.js} +1 -1
- package/dist/mint-components/{p-691d34f1.system.entry.js → p-b96e90a2.system.entry.js} +1 -1
- package/dist/mint-components/{p-3c88d2ed.js → p-bab4929e.js} +2 -2
- package/dist/mint-components/p-bba16a46.system.entry.js +1 -0
- package/dist/mint-components/{p-3c555674.js → p-bc386a7b.js} +1 -1
- package/dist/mint-components/{p-a7f72a66.js → p-bee4af5d.js} +1 -1
- package/dist/mint-components/{p-16deb1a9.system.entry.js → p-c30d0049.system.entry.js} +1 -1
- package/dist/mint-components/p-c459bea0.js +499 -0
- package/dist/mint-components/{p-62e1c8b2.system.entry.js → p-c45a929a.system.entry.js} +1 -1
- package/dist/mint-components/{p-50d959bd.js → p-c813ec64.js} +1 -1
- package/dist/mint-components/{p-5dc9e95b.entry.js → p-c8a8d231.entry.js} +2 -2
- package/dist/mint-components/{p-9bd53e4d.system.entry.js → p-c8bcbf8b.system.entry.js} +1 -1
- package/dist/mint-components/p-ca098be1.system.js +1 -0
- package/dist/mint-components/p-ce394b99.entry.js +9 -0
- package/dist/mint-components/{p-95aaf35a.system.entry.js → p-d005df28.system.entry.js} +1 -1
- package/dist/mint-components/p-d0993bb9.js +1 -0
- package/dist/mint-components/{p-7e36a1ff.js → p-d18dedd4.js} +1 -1
- package/dist/mint-components/{p-e1292288.system.entry.js → p-d3b1ab20.system.entry.js} +1 -1
- package/dist/mint-components/p-d4f332a7.entry.js +106 -0
- package/dist/mint-components/{p-6b1a6b0c.system.js → p-d55c50af.system.js} +1 -1
- package/dist/mint-components/{p-b1b8e629.system.js → p-d6193876.system.js} +1 -1
- package/dist/mint-components/{p-37658fec.entry.js → p-db0a2afd.entry.js} +1 -1
- package/dist/mint-components/p-de0d6fd7.js +49 -0
- package/dist/mint-components/{p-ce11858c.js → p-e00ec007.js} +1 -1
- package/dist/mint-components/{p-b5c0bad5.system.entry.js → p-e12754f5.system.entry.js} +1 -1
- package/dist/mint-components/{p-3218bb1d.entry.js → p-e506bf7f.entry.js} +1 -1
- package/dist/mint-components/p-e55aafe9.system.js +1 -0
- package/dist/mint-components/{p-f972e5c9.entry.js → p-e5ea43b1.entry.js} +2 -2
- package/dist/mint-components/{p-8474aa63.js → p-e6240c72.js} +1 -1
- package/dist/mint-components/{p-857a2d77.js → p-e84b874c.js} +1 -1
- package/dist/mint-components/p-ea03e50e.system.js +1 -0
- package/dist/mint-components/{p-3181e54a.entry.js → p-ec0b649a.entry.js} +1 -1
- package/dist/mint-components/{p-2f4d8ab8.system.entry.js → p-f1374258.system.entry.js} +1 -1
- package/dist/mint-components/{p-6194855b.system.entry.js → p-f39cf252.system.entry.js} +1 -1
- package/dist/mint-components/{p-c8e45671.system.entry.js → p-f4e36adf.system.entry.js} +1 -1
- package/dist/mint-components/{p-140e6a15.system.js → p-f55ecf35.system.js} +1 -1
- package/dist/mint-components/{p-3c333076.js → p-f581aac7.js} +1 -1
- package/dist/mint-components/{p-19293c16.entry.js → p-f6528f8a.entry.js} +1 -1
- package/dist/mint-components/{p-247cfbdc.system.entry.js → p-f7ca4cc4.system.entry.js} +1 -1
- package/dist/mint-components/{p-0fec43e8.system.js → p-f8026ed6.system.js} +1 -1
- package/dist/mint-components/{p-438f6702.js → p-f8a09b0f.js} +152 -152
- package/dist/mint-components/{p-3756d0d1.system.entry.js → p-fc284f91.system.entry.js} +1 -1
- package/dist/mint-components/{p-6a4496b3.system.entry.js → p-fe1d3cf8.system.entry.js} +1 -1
- package/dist/mint-components/p-fe70e20c.entry.js +1 -0
- package/dist/mint-components/p-ff118a19.system.js +1 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +9 -0
- package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +37 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +140 -2
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +27 -4
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +0 -78
- package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -2
- package/dist/types/components/tax-and-cash/data.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -7
- package/dist/types/components.d.ts +261 -584
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/docs/stats.json +122783 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/eventKeys-7af4df4d.js +0 -5
- package/dist/cjs/parseStates-d1effc19.js +0 -16
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +0 -854
- package/dist/cjs/sqm-partner-info-modal-view-d5c997e6.js +0 -117
- package/dist/cjs/utils-a8e0bd9b.js +0 -93
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -142
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -111
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -581
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -269
- package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +0 -16
- package/dist/esm/eventKeys-f76b6a03.js +0 -3
- package/dist/esm/parseStates-ed75e224.js +0 -14
- package/dist/esm/sqm-email-verification_2.entry.js +0 -849
- package/dist/esm/sqm-partner-info-modal-view-08b7c5f6.js +0 -114
- package/dist/esm/utils-8267d3d8.js +0 -85
- package/dist/esm-es5/ShadowViewAddon-78b791d2.js +0 -1
- package/dist/esm-es5/data-33c16dff.js +0 -1
- package/dist/esm-es5/eventKeys-f76b6a03.js +0 -1
- package/dist/esm-es5/global-39f55ec2.js +0 -285
- package/dist/esm-es5/index.module-cede12c6.js +0 -1
- package/dist/esm-es5/parseStates-ed75e224.js +0 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-08b7c5f6.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-712cd51b.js +0 -1
- package/dist/esm-es5/utils-8267d3d8.js +0 -1
- package/dist/mint-components/p-037c1a4f.system.entry.js +0 -1
- package/dist/mint-components/p-0553e659.js +0 -463
- package/dist/mint-components/p-0a126d1b.system.entry.js +0 -1
- package/dist/mint-components/p-0dc17c6a.entry.js +0 -9
- package/dist/mint-components/p-115dfc03.system.js +0 -1
- package/dist/mint-components/p-13f3a647.js +0 -1
- package/dist/mint-components/p-1b7dfd6f.system.entry.js +0 -1
- package/dist/mint-components/p-1c413a06.system.js +0 -1
- package/dist/mint-components/p-28ed2ae9.js +0 -1
- package/dist/mint-components/p-28fe7357.system.entry.js +0 -1
- package/dist/mint-components/p-38dc2f60.entry.js +0 -1
- package/dist/mint-components/p-39840341.js +0 -1
- package/dist/mint-components/p-45e72bed.system.entry.js +0 -1
- package/dist/mint-components/p-5e26014d.system.js +0 -1
- package/dist/mint-components/p-63c299f1.system.js +0 -1
- package/dist/mint-components/p-64041ee1.entry.js +0 -291
- package/dist/mint-components/p-64f56cc9.system.js +0 -285
- package/dist/mint-components/p-6f8dde97.system.js +0 -1
- package/dist/mint-components/p-70e34ae1.system.js +0 -6
- package/dist/mint-components/p-7d5956ec.system.entry.js +0 -1
- package/dist/mint-components/p-842f45b9.js +0 -1
- package/dist/mint-components/p-8b258a3e.system.js +0 -1
- package/dist/mint-components/p-8e1acd9a.system.js +0 -1
- package/dist/mint-components/p-91a00693.entry.js +0 -122
- package/dist/mint-components/p-996eb820.entry.js +0 -1
- package/dist/mint-components/p-a8891ebd.js +0 -1
- package/dist/mint-components/p-a8ecdc44.system.js +0 -1
- package/dist/mint-components/p-b077d478.js +0 -1
- package/dist/mint-components/p-b2a99637.system.js +0 -1
- package/dist/mint-components/p-b2bde2f5.entry.js +0 -1
- package/dist/mint-components/p-b451970a.system.entry.js +0 -1
- package/dist/mint-components/p-c7535e70.system.entry.js +0 -1
- package/dist/mint-components/p-d20188db.js +0 -1
- package/dist/mint-components/p-d6714617.entry.js +0 -1
- package/dist/mint-components/p-da6c5d98.system.js +0 -1
- package/dist/mint-components/p-e95402dc.js +0 -49
- package/dist/mint-components/p-ee0f1cf1.system.js +0 -1
- package/dist/mint-components/p-fc783749.entry.js +0 -133
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -12
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -44
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -106
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -17
- package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +0 -8
- package/shoelace/assets/icons/twitter-x.svg +0 -4
|
@@ -1,849 +0,0 @@
|
|
|
1
|
-
import { h, r as registerInstance } from './index-38ad4957.js';
|
|
2
|
-
import { i as intl } from './global-39f55ec2.js';
|
|
3
|
-
import { k as useState, f as useEffect, n as h$1, u as useMemo } from './dom-context-hooks.module-50442785.js';
|
|
4
|
-
import { d as dist, t as Pn, w as wn, J, $ as $e, i as isDemo, r as En, L } from './index.module-cede12c6.js';
|
|
5
|
-
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
|
-
import { g as getProps } from './utils-334c1e34.js';
|
|
7
|
-
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
8
|
-
import { T as TextSpanView } from './sqm-text-span-view-4db9e33f.js';
|
|
9
|
-
import { g as GET_FINANCE_NETWORK_SETTINGS } from './data-33c16dff.js';
|
|
10
|
-
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-08b7c5f6.js';
|
|
11
|
-
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-db1897ae.js';
|
|
12
|
-
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
13
|
-
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
14
|
-
import { u as useVerificationEmail } from './useVerificationEmail-cb3d51e3.js';
|
|
15
|
-
|
|
16
|
-
const UpsertUserEmailMutation = dist.gql `
|
|
17
|
-
mutation upsertUser($userInput: UserInput!) {
|
|
18
|
-
upsertUser(userInput: $userInput) {
|
|
19
|
-
id
|
|
20
|
-
accountId
|
|
21
|
-
email
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
const UserLookupQuery = dist.gql `
|
|
26
|
-
query user {
|
|
27
|
-
viewer {
|
|
28
|
-
... on User {
|
|
29
|
-
id
|
|
30
|
-
accountId
|
|
31
|
-
email
|
|
32
|
-
impactConnection {
|
|
33
|
-
user {
|
|
34
|
-
id
|
|
35
|
-
email
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
function useUpsertUserEmail() {
|
|
43
|
-
const user = J();
|
|
44
|
-
const [request, { loading: loading, data, errors }] = $e(UpsertUserEmailMutation);
|
|
45
|
-
const upsertUserEmail = async (email) => {
|
|
46
|
-
try {
|
|
47
|
-
const result = await request({
|
|
48
|
-
userInput: {
|
|
49
|
-
id: user.id,
|
|
50
|
-
accountId: user.accountId,
|
|
51
|
-
email,
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
if (result instanceof Error || !result)
|
|
55
|
-
throw new Error();
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
|
-
catch (e) {
|
|
59
|
-
console.error("Could not set email on user", e);
|
|
60
|
-
return undefined;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return [
|
|
64
|
-
upsertUserEmail,
|
|
65
|
-
{
|
|
66
|
-
loading,
|
|
67
|
-
data,
|
|
68
|
-
errors,
|
|
69
|
-
},
|
|
70
|
-
];
|
|
71
|
-
}
|
|
72
|
-
function useWidgetEmailVerification(props) {
|
|
73
|
-
const [_, setShowCode] = Pn(SHOW_CODE_NAMESPACE);
|
|
74
|
-
const [email, setEmail] = Pn(VERIFICATION_EMAIL_NAMESPACE);
|
|
75
|
-
const [emailExists, setEmailExists] = useState(false);
|
|
76
|
-
const [error, setError] = useState(false);
|
|
77
|
-
const [mutationError, setMutationError] = useState(false);
|
|
78
|
-
const { initialized, send: [sendEmail, { loading: sendLoading, errors }], } = useVerificationEmail();
|
|
79
|
-
const [upsertUserEmail] = useUpsertUserEmail();
|
|
80
|
-
const [loading, setLoading] = useState(true);
|
|
81
|
-
const { data, loading: initialLoading } = wn(UserLookupQuery, {});
|
|
82
|
-
const emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (!(data === null || data === void 0 ? void 0 : data.viewer))
|
|
85
|
-
return;
|
|
86
|
-
setEmailExists(!!data.viewer.email);
|
|
87
|
-
}, [data]);
|
|
88
|
-
useEffect(() => {
|
|
89
|
-
if (initialized)
|
|
90
|
-
setLoading(false);
|
|
91
|
-
}, [initialized]);
|
|
92
|
-
const submitEmail = async (e) => {
|
|
93
|
-
e.preventDefault();
|
|
94
|
-
if (!(data === null || data === void 0 ? void 0 : data.viewer))
|
|
95
|
-
return;
|
|
96
|
-
setLoading(true);
|
|
97
|
-
const toAddress = data.viewer.email;
|
|
98
|
-
if (!toAddress) {
|
|
99
|
-
// If no email on the user, set one
|
|
100
|
-
const formData = e.detail.formData;
|
|
101
|
-
const newEmail = formData.get("email").toString();
|
|
102
|
-
if (!emailRegex.test(newEmail)) {
|
|
103
|
-
setError(true);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const result = await upsertUserEmail(newEmail);
|
|
107
|
-
if (!result || !result.user.email)
|
|
108
|
-
setError(true);
|
|
109
|
-
}
|
|
110
|
-
// UI should not allow this call til initialisation is done
|
|
111
|
-
if (!initialized)
|
|
112
|
-
return;
|
|
113
|
-
const result = await sendEmail();
|
|
114
|
-
if (!result || !result.success)
|
|
115
|
-
setMutationError(true);
|
|
116
|
-
else {
|
|
117
|
-
// This is used to let the code verification widget know an email was already sent
|
|
118
|
-
setEmail(toAddress);
|
|
119
|
-
setShowCode(true);
|
|
120
|
-
}
|
|
121
|
-
setLoading(false);
|
|
122
|
-
};
|
|
123
|
-
return {
|
|
124
|
-
callbacks: {
|
|
125
|
-
submitEmail,
|
|
126
|
-
},
|
|
127
|
-
states: {
|
|
128
|
-
loading,
|
|
129
|
-
initialLoading: initialLoading && !initialized,
|
|
130
|
-
error,
|
|
131
|
-
email: data === null || data === void 0 ? void 0 : data.viewer.email,
|
|
132
|
-
sendCodeError: mutationError,
|
|
133
|
-
},
|
|
134
|
-
text: props.getTextProps(),
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const style = {
|
|
139
|
-
Wrapper: {
|
|
140
|
-
display: "flex",
|
|
141
|
-
flexDirection: "column",
|
|
142
|
-
gap: "var(--sl-spacing-medium)",
|
|
143
|
-
marginTop: "var(--sl-spacing-medium)",
|
|
144
|
-
},
|
|
145
|
-
InputsContainer: {
|
|
146
|
-
display: "flex",
|
|
147
|
-
gap: "var(--sl-spacing-medium)",
|
|
148
|
-
position: "relative",
|
|
149
|
-
flexDirection: "column",
|
|
150
|
-
},
|
|
151
|
-
ContinueButton: {
|
|
152
|
-
width: "100%",
|
|
153
|
-
},
|
|
154
|
-
SkeletonOne: {
|
|
155
|
-
width: "50%",
|
|
156
|
-
height: "16px",
|
|
157
|
-
},
|
|
158
|
-
SkeletonTwo: {
|
|
159
|
-
width: "30%",
|
|
160
|
-
height: "34px",
|
|
161
|
-
},
|
|
162
|
-
SkeletonThree: {
|
|
163
|
-
width: "15%",
|
|
164
|
-
height: "24px",
|
|
165
|
-
},
|
|
166
|
-
ErrorInput: {
|
|
167
|
-
"&::part(base)": {
|
|
168
|
-
border: "var(--sqm-border-thickness) solid var(--sqm-danger-color-border)",
|
|
169
|
-
borderRadius: "var(--sqm-input-border-radius)",
|
|
170
|
-
},
|
|
171
|
-
"&::part(help-text)": {
|
|
172
|
-
color: "var(--sqm-danger-color-text)",
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
const vanillaStyle = `
|
|
177
|
-
:host {
|
|
178
|
-
display: block;
|
|
179
|
-
}
|
|
180
|
-
:host([hidden]): {
|
|
181
|
-
display: none;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
a {
|
|
185
|
-
color: inherit;
|
|
186
|
-
text-decoration: underline;
|
|
187
|
-
cursor: pointer;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
*::part(primarybutton-base),
|
|
191
|
-
sl-button[type="primary"]::part(base) {
|
|
192
|
-
font-family: var(--sqm-primary-font);
|
|
193
|
-
width: 100%;
|
|
194
|
-
background-color: var(--sqm-primary-button-background);
|
|
195
|
-
color: var(--sqm-primary-button-color);
|
|
196
|
-
border-color: var(--sqm-primary-button-color-border);
|
|
197
|
-
border-radius: var(--sqm-primary-button-radius);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
*::part(primarybutton-base):hover,
|
|
201
|
-
sl-button[type="primary"]::part(base):hover{
|
|
202
|
-
background-color: var(--sqm-primary-button-background-hover);
|
|
203
|
-
border-color: var(--sqm-primary-button-border-color-hover);
|
|
204
|
-
color: var(--sqm-primary-button-color-hover);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
*::part(primarybutton-base):focus,
|
|
209
|
-
sl-button[type="primary"]::part(base):focus {
|
|
210
|
-
box-shadow: none;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
*::part(secondarybutton-base),
|
|
214
|
-
sl-button[type="secondary"]::part(base) {
|
|
215
|
-
font-family: var(--sqm-primary-font);
|
|
216
|
-
background-color: var(--sqm-secondary-button-background);
|
|
217
|
-
color: var(--sqm-secondary-button-color);
|
|
218
|
-
border-color: var(--sqm-secondary-button-color-border);
|
|
219
|
-
border-radius: var(--sqm-secondary-button-radius);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
*::part(secondarybutton-base):hover,
|
|
223
|
-
sl-button[type="secondary"]::part(base):hover {
|
|
224
|
-
background-color: var(--sqm-secondary-button-background-hover);
|
|
225
|
-
color: var(--sqm-secondary-button-color-hover);
|
|
226
|
-
border-color: var(--sqm-secondary-button-border-color-hover);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
*::part(input-label), *::part(select-label), *::part(textarea-label){
|
|
230
|
-
font-family: var(--sqm-primary-font);
|
|
231
|
-
font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
|
|
232
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
233
|
-
color: var(--sqm-input-label-color, var(--sqm-text), black);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
*::part(input-base), *::part(select-base), *::part(textarea-base){
|
|
237
|
-
font-family: var(--sqm-primary-font);
|
|
238
|
-
background-color: var(--sqm-input-background, #fff);
|
|
239
|
-
border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
|
|
240
|
-
color: var(--sqm-input-color, white);
|
|
241
|
-
border-width: var(--sqm-border-thickness, 1px);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
*::part(input-base):hover, *::part(select-base):hover, *::part(textarea-base):hover{
|
|
245
|
-
border-color: var(--sqm-border-color-hover);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
*::part(input-base):focus, *::part(select-base):focus, *::part(textarea-base):focus{
|
|
249
|
-
border-color: var(--sqm-border-color-focus);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
sqm-name-fields::part(input-base) {
|
|
253
|
-
font-family: var(--sqm-primary-font);
|
|
254
|
-
background-color: var(--sqm-input-background, #fff);
|
|
255
|
-
border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
|
|
256
|
-
color: var(--sqm-input-color, white);
|
|
257
|
-
border-width: var(--sqm-border-thickness, 1px);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
sl-input::part(base):focus,
|
|
261
|
-
sl-select::part(form-control-wrapper):focus,
|
|
262
|
-
sl-textarea::part(textarea-label):focus {
|
|
263
|
-
border-color: var(--sqm-border-color-focus);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
*::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
|
|
267
|
-
background: var(--sqm-input-disabled-background, #f5f5f5);
|
|
268
|
-
color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
*::part(input):-webkit-autofill {
|
|
272
|
-
box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
|
|
273
|
-
-webkit-text-fill-color: var(--sqm-input-color, white) !important;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
*::part(input):-webkit-autofill:hover {
|
|
277
|
-
box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
|
|
278
|
-
-webkit-text-fill-color: var(--sqm-input-color, white) !important;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
*::part(input):-webkit-autofill:focus {
|
|
282
|
-
box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;
|
|
283
|
-
-webkit-text-fill-color: var(--sqm-input-color, white) !important;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
*::part(input)::placeholder,
|
|
287
|
-
*::part(select)::placeholder,
|
|
288
|
-
*::part(textarea)::placeholder {
|
|
289
|
-
font-family: var(--sqm-primary-font);
|
|
290
|
-
color: var(--sqm-text-subdued);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
*::part(input)::-webkit-input-placeholder,
|
|
294
|
-
*::part(select)::-webkit-input-placeholder,
|
|
295
|
-
*::part(textarea)::-webkit-input-placeholder {
|
|
296
|
-
font-family: var(--sqm-primary-font);
|
|
297
|
-
color: var(--sqm-text-subdued);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
*::part(input)::-moz-placeholder,
|
|
301
|
-
*::part(select)::-moz-placeholder,
|
|
302
|
-
*::part(textarea)::-moz-placeholder {
|
|
303
|
-
font-family: var(--sqm-primary-font);
|
|
304
|
-
opacity: 1; /* Firefox adds an opacity to placeholders by default */
|
|
305
|
-
color: var(--sqm-text-subdued);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
*::part(input)::-ms-input-placeholder,
|
|
309
|
-
*::part(select)::-ms-input-placeholder,
|
|
310
|
-
*::part(textarea)::-ms-input-placeholder {
|
|
311
|
-
font-family: var(--sqm-primary-font);
|
|
312
|
-
color: var(--sqm-text-subdued);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
`;
|
|
317
|
-
const sheet = createStyleSheet(style);
|
|
318
|
-
const styleString = sheet.toString();
|
|
319
|
-
function WidgetEmailVerificationView(props) {
|
|
320
|
-
const { states, callbacks, text } = props;
|
|
321
|
-
const renderLoadingSkeleton = () => {
|
|
322
|
-
return (h("div", { class: sheet.classes.Wrapper },
|
|
323
|
-
h("sqm-skeleton", { height: "16px", width: "50%" }),
|
|
324
|
-
h("sqm-skeleton", { height: "16px", width: "50%" }),
|
|
325
|
-
h("sqm-skeleton", { height: "16px", width: "50%" }),
|
|
326
|
-
h("sqm-skeleton", { height: "34px", width: "30%" }),
|
|
327
|
-
h("sqm-skeleton", { height: "24px", width: "15%" }),
|
|
328
|
-
h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: true, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)));
|
|
329
|
-
};
|
|
330
|
-
return (h("div", { part: "sqm-base" },
|
|
331
|
-
h("style", { type: "text/css" },
|
|
332
|
-
vanillaStyle,
|
|
333
|
-
styleString),
|
|
334
|
-
states.sendCodeError && (h("sqm-form-message", { type: "error" },
|
|
335
|
-
h("p", { part: "alert-title" }, text.sendCodeErrorHeader),
|
|
336
|
-
intl.formatMessage({
|
|
337
|
-
id: "sendCodeErrorDescription",
|
|
338
|
-
defaultMessage: text.sendCodeErrorDescription,
|
|
339
|
-
}, {
|
|
340
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
341
|
-
}))),
|
|
342
|
-
states.initialLoading ? (renderLoadingSkeleton()) : (h("div", { class: sheet.classes.Wrapper },
|
|
343
|
-
h(TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
|
|
344
|
-
h("sl-form", { "onSl-submit": callbacks.submitEmail },
|
|
345
|
-
h("div", { class: sheet.classes.InputsContainer },
|
|
346
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email || "", type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
|
|
347
|
-
? {
|
|
348
|
-
class: sheet.classes.ErrorInput,
|
|
349
|
-
helpText: text.emailValidationErrorText,
|
|
350
|
-
}
|
|
351
|
-
: {}))),
|
|
352
|
-
h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)))))));
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
const WidgetEmailVerification = class {
|
|
356
|
-
constructor(hostRef) {
|
|
357
|
-
registerInstance(this, hostRef);
|
|
358
|
-
/**
|
|
359
|
-
* @uiName Verify email widget header text
|
|
360
|
-
*/
|
|
361
|
-
this.verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
|
|
362
|
-
/**
|
|
363
|
-
* @uiName Send code to email alert header
|
|
364
|
-
*/
|
|
365
|
-
this.sendCodeErrorHeader = "There was an error sending your code";
|
|
366
|
-
/**
|
|
367
|
-
* @uiName Support link text
|
|
368
|
-
*/
|
|
369
|
-
this.supportLink = "support team";
|
|
370
|
-
/**
|
|
371
|
-
* @uiName Send code to email alert description
|
|
372
|
-
*/
|
|
373
|
-
this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program {supportLink}.";
|
|
374
|
-
/**
|
|
375
|
-
* @uiName Email input label
|
|
376
|
-
*/
|
|
377
|
-
this.emailLabel = "Email";
|
|
378
|
-
/**
|
|
379
|
-
* @uiName Send code button text
|
|
380
|
-
*/
|
|
381
|
-
this.sendCodeText = "Send code";
|
|
382
|
-
/**
|
|
383
|
-
* @uiName Send code button text
|
|
384
|
-
*/
|
|
385
|
-
this.emailValidationErrorText = "Please enter a valid email";
|
|
386
|
-
h$1(this);
|
|
387
|
-
}
|
|
388
|
-
disconnectedCallback() { }
|
|
389
|
-
getTextProps() {
|
|
390
|
-
return getProps(this);
|
|
391
|
-
}
|
|
392
|
-
render() {
|
|
393
|
-
const props = isDemo()
|
|
394
|
-
? useDemoWidgetEmailVerification(this)
|
|
395
|
-
: useWidgetEmailVerification(this);
|
|
396
|
-
return h(WidgetEmailVerificationView, Object.assign({}, props));
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
function useDemoWidgetEmailVerification(props) {
|
|
400
|
-
const setShowCode = En(SHOW_CODE_NAMESPACE);
|
|
401
|
-
return cjs({
|
|
402
|
-
states: {
|
|
403
|
-
error: true,
|
|
404
|
-
initialLoading: false,
|
|
405
|
-
loading: false,
|
|
406
|
-
email: "test@example.com",
|
|
407
|
-
sendCodeError: true,
|
|
408
|
-
},
|
|
409
|
-
callbacks: {
|
|
410
|
-
submitEmail: async () => setShowCode(true),
|
|
411
|
-
},
|
|
412
|
-
text: props.getTextProps(),
|
|
413
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// new field under impactConnection:{ resolvedByEmail: boolean } - determines if connection came from managed identity
|
|
417
|
-
const GET_USER_PARTNER_INFO = dist.gql `
|
|
418
|
-
query getUserPartnerInfo {
|
|
419
|
-
user: viewer {
|
|
420
|
-
... on User {
|
|
421
|
-
id
|
|
422
|
-
accountId
|
|
423
|
-
firstName
|
|
424
|
-
lastName
|
|
425
|
-
email
|
|
426
|
-
countryCode
|
|
427
|
-
customFields
|
|
428
|
-
impactConnection {
|
|
429
|
-
connected
|
|
430
|
-
connectionStatus
|
|
431
|
-
publisher {
|
|
432
|
-
id
|
|
433
|
-
countryCode
|
|
434
|
-
currency
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
`;
|
|
441
|
-
const GET_COUNTRIES = dist.gql `
|
|
442
|
-
query getCountries {
|
|
443
|
-
impactPayoutCountries(limit: 1000) {
|
|
444
|
-
data {
|
|
445
|
-
countryCode
|
|
446
|
-
displayName
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
`;
|
|
451
|
-
const GET_CURRENCIES = dist.gql `
|
|
452
|
-
query currencies($locale: RSLocale) {
|
|
453
|
-
currencies(limit: 300) {
|
|
454
|
-
data {
|
|
455
|
-
displayName(locale: $locale)
|
|
456
|
-
currencyCode
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
`;
|
|
461
|
-
const CONNECT_PARTNER = dist.gql `
|
|
462
|
-
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
463
|
-
createImpactConnection(impactConnectionInput: $vars) {
|
|
464
|
-
success
|
|
465
|
-
validationErrors {
|
|
466
|
-
field
|
|
467
|
-
message
|
|
468
|
-
}
|
|
469
|
-
user {
|
|
470
|
-
id
|
|
471
|
-
accountId
|
|
472
|
-
impactConnection {
|
|
473
|
-
connected
|
|
474
|
-
publisher {
|
|
475
|
-
brandedSignup
|
|
476
|
-
requiredTaxDocumentType
|
|
477
|
-
currentTaxDocument {
|
|
478
|
-
type
|
|
479
|
-
status
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
`;
|
|
487
|
-
const START_IMPACT_CONNECTION = dist.gql `
|
|
488
|
-
mutation startImpactConnection($vars: ImpactConnectionInput!) {
|
|
489
|
-
startImpactConnection(impactConnectionInput: $vars) {
|
|
490
|
-
success
|
|
491
|
-
validationErrors {
|
|
492
|
-
field
|
|
493
|
-
message
|
|
494
|
-
}
|
|
495
|
-
user {
|
|
496
|
-
id
|
|
497
|
-
accountId
|
|
498
|
-
impactConnection {
|
|
499
|
-
connected
|
|
500
|
-
publisher {
|
|
501
|
-
brandedSignup
|
|
502
|
-
requiredTaxDocumentType
|
|
503
|
-
currentTaxDocument {
|
|
504
|
-
type
|
|
505
|
-
status
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
`;
|
|
513
|
-
const GET_BRAND_NAME = dist.gql `
|
|
514
|
-
query getTenantSettings {
|
|
515
|
-
tenantSettings {
|
|
516
|
-
companyName
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
`;
|
|
520
|
-
function usePartnerInfoModal(props) {
|
|
521
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
522
|
-
const locale = L();
|
|
523
|
-
const setVerificationContext = En(VERIFICATION_PARENT_NAMESPACE);
|
|
524
|
-
const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {});
|
|
525
|
-
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
526
|
-
const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
|
|
527
|
-
const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
|
|
528
|
-
const { data: tenantSettingsData } = wn(GET_BRAND_NAME, {});
|
|
529
|
-
const { data: financeNetworkData } = wn(GET_FINANCE_NETWORK_SETTINGS, {
|
|
530
|
-
variables: { filter: {} },
|
|
531
|
-
});
|
|
532
|
-
const [startImpactConnection, { loading: connectLoading, errors: connectErrors },] = $e(START_IMPACT_CONNECTION);
|
|
533
|
-
// No pre-filled country, use locale to determine countryCode instead
|
|
534
|
-
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
535
|
-
locale.replace(/^.*_/, ""));
|
|
536
|
-
const [currency, setCurrency] = useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
|
|
537
|
-
const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
|
|
538
|
-
// copied from useTaxAndCash for displaying currencies based on country - could be in helper?
|
|
539
|
-
const currencies = useMemo(() => {
|
|
540
|
-
var _a, _b;
|
|
541
|
-
const allValidCurrencies = (_b = (_a = financeNetworkData === null || financeNetworkData === void 0 ? void 0 : financeNetworkData.impactFinanceNetworkSettings) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.reduce((agg, settings) => {
|
|
542
|
-
var _a, _b;
|
|
543
|
-
const currency = (_b = (_a = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((c) => c.currencyCode === settings.currency);
|
|
544
|
-
if (!currency)
|
|
545
|
-
return agg;
|
|
546
|
-
if (agg.find((c) => c.currencyCode === settings.currency))
|
|
547
|
-
return agg;
|
|
548
|
-
if (countryCode && settings.countryCode !== countryCode)
|
|
549
|
-
return agg;
|
|
550
|
-
return [...agg, currency];
|
|
551
|
-
}, []);
|
|
552
|
-
return (allValidCurrencies || []).sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
553
|
-
}, [financeNetworkData, currenciesData, countryCode]);
|
|
554
|
-
const [countrySearch, setCountrySearch] = useState("");
|
|
555
|
-
const [currencySearch, setCurrencySearch] = useState("");
|
|
556
|
-
const [filteredCountries, setFilteredCountries] = useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
|
|
557
|
-
const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
|
|
558
|
-
console.log(userData, "userData partner info modal");
|
|
559
|
-
const [error, setError] = useState("");
|
|
560
|
-
const [success, setSuccess] = useState(false);
|
|
561
|
-
useEffect(() => {
|
|
562
|
-
var _a;
|
|
563
|
-
const publisher = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
|
|
564
|
-
if (!userData || !publisher)
|
|
565
|
-
return;
|
|
566
|
-
setCountryCode(publisher.countryCode);
|
|
567
|
-
setCurrency(publisher.currency);
|
|
568
|
-
}, [userData, user]);
|
|
569
|
-
useEffect(() => {
|
|
570
|
-
if (!(countries === null || countries === void 0 ? void 0 : countries.length))
|
|
571
|
-
return;
|
|
572
|
-
if (countrySearch.trim() === "") {
|
|
573
|
-
setFilteredCountries(countries || []);
|
|
574
|
-
}
|
|
575
|
-
else {
|
|
576
|
-
setFilteredCountries(countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase())) || []);
|
|
577
|
-
}
|
|
578
|
-
}, [countrySearch, countries]);
|
|
579
|
-
useEffect(() => {
|
|
580
|
-
if (!(currencies === null || currencies === void 0 ? void 0 : currencies.length))
|
|
581
|
-
return;
|
|
582
|
-
if (currencySearch.trim() === "") {
|
|
583
|
-
setFilteredCurrencies(currencies || []);
|
|
584
|
-
}
|
|
585
|
-
else {
|
|
586
|
-
setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
|
|
587
|
-
}
|
|
588
|
-
}, [currencySearch, currencies]);
|
|
589
|
-
const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
|
|
590
|
-
function onCountryChange(e) {
|
|
591
|
-
var _a, _b;
|
|
592
|
-
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
593
|
-
if (!value)
|
|
594
|
-
return;
|
|
595
|
-
setCountryCode(value);
|
|
596
|
-
setCurrency("");
|
|
597
|
-
setError("");
|
|
598
|
-
}
|
|
599
|
-
function onCurrencyChange(e) {
|
|
600
|
-
var _a, _b;
|
|
601
|
-
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
602
|
-
if (!value)
|
|
603
|
-
return;
|
|
604
|
-
setCurrency(value);
|
|
605
|
-
setError("");
|
|
606
|
-
}
|
|
607
|
-
async function onSubmit() {
|
|
608
|
-
var _a, _b;
|
|
609
|
-
if (!countryCode || !currency) {
|
|
610
|
-
setError(props.missingFieldsErrorText);
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
setError("");
|
|
614
|
-
try {
|
|
615
|
-
const vars = {
|
|
616
|
-
user: {
|
|
617
|
-
id: user.id,
|
|
618
|
-
accountId: user.accountId,
|
|
619
|
-
},
|
|
620
|
-
firstName: user.firstName,
|
|
621
|
-
lastName: user.lastName,
|
|
622
|
-
// phoneNumber: null,
|
|
623
|
-
// phoneNumberCountryCode: null,
|
|
624
|
-
countryCode,
|
|
625
|
-
currency,
|
|
626
|
-
};
|
|
627
|
-
const result = await startImpactConnection({ vars });
|
|
628
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
629
|
-
setError(props.networkErrorText);
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
const connectionResult = result
|
|
633
|
-
.startImpactConnection;
|
|
634
|
-
console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
|
|
635
|
-
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
636
|
-
const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
|
|
637
|
-
setError(validationMsg || props.networkErrorText);
|
|
638
|
-
console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
639
|
-
return;
|
|
640
|
-
}
|
|
641
|
-
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
642
|
-
await refetch();
|
|
643
|
-
setSuccess(true);
|
|
644
|
-
setVerificationContext(true);
|
|
645
|
-
}
|
|
646
|
-
catch (e) {
|
|
647
|
-
console.error("Partner creation error:", e);
|
|
648
|
-
setError(props.networkErrorText);
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
const showModal = !success &&
|
|
652
|
-
!userLoading &&
|
|
653
|
-
(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
|
|
654
|
-
return {
|
|
655
|
-
states: {
|
|
656
|
-
open: showModal,
|
|
657
|
-
loading: userLoading || countriesLoading || currenciesLoading,
|
|
658
|
-
submitting: connectLoading,
|
|
659
|
-
isExistingPartner: impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher,
|
|
660
|
-
countryCode,
|
|
661
|
-
currency,
|
|
662
|
-
error,
|
|
663
|
-
success,
|
|
664
|
-
brandName: ((_g = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _g === void 0 ? void 0 : _g.companyName) || "",
|
|
665
|
-
filteredCountries: filteredCountries || [],
|
|
666
|
-
filteredCurrencies: filteredCurrencies || [],
|
|
667
|
-
},
|
|
668
|
-
callbacks: {
|
|
669
|
-
onCountryChange,
|
|
670
|
-
onCurrencyChange,
|
|
671
|
-
setCurrencySearch,
|
|
672
|
-
setCountrySearch,
|
|
673
|
-
onSubmit,
|
|
674
|
-
onClose: () => setSuccess(true),
|
|
675
|
-
},
|
|
676
|
-
text: props.getTextProps(),
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
const PartnerInfoModal = class {
|
|
681
|
-
constructor(hostRef) {
|
|
682
|
-
registerInstance(this, hostRef);
|
|
683
|
-
/**
|
|
684
|
-
* Brand name shown in the modal header
|
|
685
|
-
*
|
|
686
|
-
* @uiName Brand name
|
|
687
|
-
*/
|
|
688
|
-
this.brandName = "";
|
|
689
|
-
/**
|
|
690
|
-
* Header text when user has no existing partner
|
|
691
|
-
*
|
|
692
|
-
* @uiName New partner header
|
|
693
|
-
* @uiWidget textArea
|
|
694
|
-
*/
|
|
695
|
-
this.modalHeader = "Let's get you ready for rewards";
|
|
696
|
-
/**
|
|
697
|
-
* Header text when user has an existing partner
|
|
698
|
-
*
|
|
699
|
-
* @uiName Existing partner header
|
|
700
|
-
* @uiWidget textArea
|
|
701
|
-
*/
|
|
702
|
-
this.modalHeaderExistingPartner = "We found an existing account";
|
|
703
|
-
/**
|
|
704
|
-
* Description for new partner setup
|
|
705
|
-
*
|
|
706
|
-
* @uiName New partner description
|
|
707
|
-
* @uiWidget textArea
|
|
708
|
-
*/
|
|
709
|
-
this.descriptionNewPartner = "Confirm your country and currency now to get your future rewards faster.";
|
|
710
|
-
/**
|
|
711
|
-
* Description for existing partner confirmation
|
|
712
|
-
*
|
|
713
|
-
* @uiName Existing partner description
|
|
714
|
-
* @uiWidget textArea
|
|
715
|
-
*/
|
|
716
|
-
this.descriptionExistingPartner = "We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.";
|
|
717
|
-
/**
|
|
718
|
-
* Support description for existing partner confirmation
|
|
719
|
-
*
|
|
720
|
-
* @uiName Existing partner support description
|
|
721
|
-
* @uiWidget textArea
|
|
722
|
-
*/
|
|
723
|
-
this.supportDescriptionExistingPartner = "If this is a mistake, please contact Support or sign up for this referral program with a different email.";
|
|
724
|
-
/**
|
|
725
|
-
* @uiName Country label
|
|
726
|
-
*/
|
|
727
|
-
this.countryLabel = "Country";
|
|
728
|
-
/**
|
|
729
|
-
* @uiName Currency label
|
|
730
|
-
*/
|
|
731
|
-
this.currencyLabel = "Currency";
|
|
732
|
-
/**
|
|
733
|
-
* @uiName Submit button label
|
|
734
|
-
*/
|
|
735
|
-
this.submitButtonLabel = "Submit";
|
|
736
|
-
/**
|
|
737
|
-
* @uiName Confirm button label
|
|
738
|
-
*/
|
|
739
|
-
this.confirmButtonLabel = "Confirm";
|
|
740
|
-
/**
|
|
741
|
-
* @uiName Search country placeholder
|
|
742
|
-
*/
|
|
743
|
-
this.searchCountryPlaceholder = "Search for a country";
|
|
744
|
-
/**
|
|
745
|
-
* @uiName Search currency placeholder
|
|
746
|
-
*/
|
|
747
|
-
this.searchCurrencyPlaceholder = "Search for a currency";
|
|
748
|
-
/**
|
|
749
|
-
* @uiName Network error text
|
|
750
|
-
* @uiWidget textArea
|
|
751
|
-
*/
|
|
752
|
-
this.networkErrorText = "An error occurred. Please try again.";
|
|
753
|
-
/**
|
|
754
|
-
* @uiName Missing fields error text
|
|
755
|
-
* @uiWidget textArea
|
|
756
|
-
*/
|
|
757
|
-
this.missingFieldsErrorText = "Please select both a country and currency.";
|
|
758
|
-
/**
|
|
759
|
-
* Used to render in another modal.
|
|
760
|
-
* @undocumented
|
|
761
|
-
*/
|
|
762
|
-
this.inModal = false;
|
|
763
|
-
/**
|
|
764
|
-
* @undocumented
|
|
765
|
-
* @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
|
|
766
|
-
* @componentState { "title": "Existing partner", "props": { "states": { "open": true, "isExistingPartner": true, "countryCode": "US", "currency": "USD" } } }
|
|
767
|
-
* @componentState { "title": "Connected (hidden)", "props": { "states": { "open": false } } }
|
|
768
|
-
*/
|
|
769
|
-
this.stateController = "{}";
|
|
770
|
-
h$1(this);
|
|
771
|
-
}
|
|
772
|
-
disconnectedCallback() { }
|
|
773
|
-
getTextProps() {
|
|
774
|
-
return getProps(this);
|
|
775
|
-
}
|
|
776
|
-
render() {
|
|
777
|
-
const props = isDemo()
|
|
778
|
-
? useDemoPartnerInfoModal(this)
|
|
779
|
-
: usePartnerInfoModal(this);
|
|
780
|
-
if (this.inModal) {
|
|
781
|
-
return h(PartnerInfoModalContentView, Object.assign({}, props));
|
|
782
|
-
}
|
|
783
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
784
|
-
}
|
|
785
|
-
};
|
|
786
|
-
function useDemoPartnerInfoModal(props) {
|
|
787
|
-
const [countryCode, setCountryCode] = useState("US");
|
|
788
|
-
const [currency, setCurrency] = useState("");
|
|
789
|
-
const [error, setError] = useState("");
|
|
790
|
-
const parsed = parseStates(props.stateController);
|
|
791
|
-
const stateOverride = (parsed === null || parsed === void 0 ? void 0 : parsed["sqm-partner-info-modal"]) || parsed || {};
|
|
792
|
-
// @ts-ignore
|
|
793
|
-
return cjs({
|
|
794
|
-
states: {
|
|
795
|
-
brandName: "Test Brand",
|
|
796
|
-
open: true,
|
|
797
|
-
loading: false,
|
|
798
|
-
submitting: false,
|
|
799
|
-
isExistingPartner: false,
|
|
800
|
-
countryCode,
|
|
801
|
-
currency,
|
|
802
|
-
error,
|
|
803
|
-
success: false,
|
|
804
|
-
filteredCountries: [],
|
|
805
|
-
filteredCurrencies: [],
|
|
806
|
-
},
|
|
807
|
-
callbacks: {
|
|
808
|
-
onCountryChange: (e) => {
|
|
809
|
-
var _a, _b;
|
|
810
|
-
const value = (_b = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
811
|
-
if (value) {
|
|
812
|
-
setCountryCode(value);
|
|
813
|
-
setCurrency("");
|
|
814
|
-
}
|
|
815
|
-
},
|
|
816
|
-
onCurrencyChange: (e) => {
|
|
817
|
-
var _a, _b;
|
|
818
|
-
const value = (_b = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
819
|
-
if (value)
|
|
820
|
-
setCurrency(value);
|
|
821
|
-
},
|
|
822
|
-
setCountrySearch: () => { },
|
|
823
|
-
setCurrencySearch: () => { },
|
|
824
|
-
onSubmit: () => {
|
|
825
|
-
if (!countryCode || !currency) {
|
|
826
|
-
setError(props.missingFieldsErrorText);
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
829
|
-
setError("");
|
|
830
|
-
},
|
|
831
|
-
onClose: () => { },
|
|
832
|
-
},
|
|
833
|
-
text: {
|
|
834
|
-
modalHeader: props.modalHeader,
|
|
835
|
-
descriptionNewPartner: props.descriptionNewPartner,
|
|
836
|
-
descriptionExistingPartner: props.descriptionExistingPartner,
|
|
837
|
-
countryLabel: props.countryLabel,
|
|
838
|
-
currencyLabel: props.currencyLabel,
|
|
839
|
-
submitButtonLabel: props.submitButtonLabel,
|
|
840
|
-
confirmButtonLabel: props.confirmButtonLabel,
|
|
841
|
-
searchCountryPlaceholder: props.searchCountryPlaceholder,
|
|
842
|
-
searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
|
|
843
|
-
supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
|
|
844
|
-
modalHeaderExistingPartner: props.modalHeaderExistingPartner,
|
|
845
|
-
},
|
|
846
|
-
}, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
export { WidgetEmailVerification as sqm_email_verification, PartnerInfoModal as sqm_partner_info_modal };
|