@saasquatch/mint-components 2.1.8-2 → 2.1.9-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-d679ec76.js} +6 -6
- package/dist/cjs/{data-8c8a08f6.js → data-e83f8a41.js} +2 -2
- 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/{re-render-72a0ef45.js → re-render-69bde9ee.js} +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +401 -68
- package/dist/cjs/sqm-big-stat_45.cjs.entry.js +27 -22
- package/dist/cjs/sqm-close-button.cjs.entry.js +1 -1
- package/dist/cjs/sqm-code-verification.cjs.entry.js +3 -3
- package/dist/cjs/sqm-context-router.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +802 -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-e3faede9.js +108 -0
- package/dist/cjs/sqm-partner-info-modal.cjs.entry.js +396 -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-2b4b92da.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-639337e3.js → sqm-portal-profile-view-bfdbb98d.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-verify-email-view-424e406a.js → sqm-portal-verify-email-view-90cd89e3.js} +1 -1
- package/dist/cjs/sqm-qr-code.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +5 -5
- 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 +174 -15
- package/dist/cjs/sqm-tab.cjs.entry.js +2 -2
- package/dist/cjs/sqm-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-efa08934.js} +7 -2
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +20 -3
- 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/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +145 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +103 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +512 -0
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +232 -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-stencilbook/sqm-stencilbook.js +2 -0
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +4 -1
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +15 -1
- 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-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 +10 -1
- 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 +5 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +7 -2
- package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-d382a63e.js} +6 -6
- package/dist/esm/{data-12e6aae1.js → data-a6752028.js} +2 -2
- package/dist/esm/eventKeys-f76b6a03.js +3 -0
- package/dist/esm/{global-96c14d63.js → global-b2ee3a12.js} +3177 -3126
- package/dist/esm/{index.module-b23fdad8.js → index.module-e266b4d7.js} +153 -150
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-f30aeb6b.js → re-render-4f4bd4da.js} +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +397 -64
- package/dist/esm/sqm-big-stat_45.entry.js +27 -22
- package/dist/esm/sqm-close-button.entry.js +1 -1
- package/dist/esm/sqm-code-verification.entry.js +3 -3
- package/dist/esm/sqm-context-router.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +797 -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-00d76ba1.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-d8f76a9d.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-7f966119.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-77c231af.js +106 -0
- package/dist/esm/sqm-partner-info-modal.entry.js +392 -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-13e25037.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-a172bdcc.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +4 -4
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c1a72c4f.js} +1 -1
- package/dist/esm/sqm-qr-code.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +5 -5
- 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 -15
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-b2dd8aa1.js} +7 -2
- package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm/sqm-widget-verification.entry.js +20 -3
- package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-31ba3daf.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-1388dace.js} +2 -2
- package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-cec544ea.js} +2 -2
- package/dist/esm/{usePayoutStatus-46c0c289.js → usePayoutStatus-24145412.js} +3 -4
- package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-6d562bf8.js} +2 -2
- package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-1ca1fda0.js} +1 -1
- package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-456931fd.js} +3 -3
- package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-0cee2d21.js} +1 -1
- package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-5c6cd733.js} +1 -1
- package/dist/esm/{utilities-77b1e0cc.js → utilities-f05633da.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-d382a63e.js} +1 -1
- package/dist/esm-es5/{data-12e6aae1.js → data-a6752028.js} +1 -1
- package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
- package/dist/esm-es5/global-b2ee3a12.js +285 -0
- package/dist/esm-es5/index.module-e266b4d7.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-4f4bd4da.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 -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-00d76ba1.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-d8f76a9d.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-7f966119.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-77c231af.js +1 -0
- package/dist/esm-es5/sqm-partner-info-modal.entry.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-13e25037.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-a172bdcc.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c1a72c4f.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-b2dd8aa1.js} +1 -1
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-31ba3daf.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-1388dace.js} +1 -1
- package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-cec544ea.js} +1 -1
- package/dist/esm-es5/{usePayoutStatus-46c0c289.js → usePayoutStatus-24145412.js} +2 -2
- package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-6d562bf8.js} +1 -1
- package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-1ca1fda0.js} +1 -1
- package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-456931fd.js} +1 -1
- package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-0cee2d21.js} +1 -1
- package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-5c6cd733.js} +1 -1
- package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-f05633da.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/mint-components.system.js +1 -0
- package/dist/mint-components/{p-653db72e.entry.js → p-06ca4346.entry.js} +1 -1
- package/dist/mint-components/{p-738dce27.system.entry.js → p-07da0ddd.system.entry.js} +1 -1
- package/dist/mint-components/{p-982d1f6f.entry.js → p-07f3b868.entry.js} +2 -2
- package/dist/mint-components/{p-2d5c2bd4.system.entry.js → p-0a900fb1.system.entry.js} +1 -1
- package/dist/mint-components/{p-b66f45d1.entry.js → p-1435edd4.entry.js} +1 -1
- package/dist/mint-components/p-1775cb0c.system.js +6 -0
- package/dist/mint-components/p-1b0d7020.js +1 -0
- package/dist/mint-components/{p-c8a8d231.entry.js → p-1b7b65ef.entry.js} +2 -2
- package/dist/mint-components/p-1b9705fd.system.js +285 -0
- package/dist/mint-components/p-1d450b85.js +1 -0
- package/dist/mint-components/{p-70570e4d.system.entry.js → p-20280398.system.entry.js} +1 -1
- package/dist/mint-components/p-2085bb01.system.entry.js +1 -0
- package/dist/mint-components/{p-bab4929e.js → p-21851092.js} +1 -1
- package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-2774c704.system.entry.js} +1 -1
- package/dist/mint-components/p-28ed2ae9.js +1 -0
- package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-2ad9470d.system.entry.js} +1 -1
- package/dist/mint-components/{p-5ff7b000.entry.js → p-2c0bb139.entry.js} +1 -1
- package/dist/mint-components/{p-e5ea43b1.entry.js → p-2e2c5ec4.entry.js} +2 -2
- package/dist/mint-components/{p-642f2c89.js → p-30967f75.js} +1 -1
- package/dist/mint-components/{p-e6240c72.js → p-320b306b.js} +1 -1
- package/dist/mint-components/{p-e84b874c.js → p-33a6ab09.js} +1 -1
- package/dist/mint-components/{p-91a96e98.entry.js → p-353ab6db.entry.js} +1 -1
- package/dist/mint-components/p-35724e1c.entry.js +1 -0
- package/dist/mint-components/p-3b2ae7b9.entry.js +105 -0
- package/dist/mint-components/{p-ea03e50e.system.js → p-3dc1e209.system.js} +1 -1
- package/dist/mint-components/{p-cb0a5990.entry.js → p-44afc747.entry.js} +1 -1
- package/dist/mint-components/{p-85721089.system.js → p-452f644f.system.js} +1 -1
- package/dist/mint-components/{p-f55ecf35.system.js → p-473562fc.system.js} +1 -1
- package/dist/mint-components/{p-55676213.entry.js → p-47f594c3.entry.js} +1 -1
- package/dist/mint-components/p-4b365f1f.system.js +1 -0
- package/dist/mint-components/{p-e12754f5.system.entry.js → p-4da8028d.system.entry.js} +1 -1
- package/dist/mint-components/{p-95510f27.entry.js → p-504ed1f2.entry.js} +1 -1
- package/dist/mint-components/{p-f581aac7.js → p-5126508b.js} +1 -1
- package/dist/mint-components/{p-fc284f91.system.entry.js → p-5245e4ce.system.entry.js} +1 -1
- package/dist/mint-components/{p-f0baeed0.entry.js → p-5450693e.entry.js} +1 -1
- package/dist/mint-components/{p-f4e36adf.system.entry.js → p-55b1be64.system.entry.js} +1 -1
- package/dist/mint-components/{p-782af7ae.system.entry.js → p-5822a43f.system.entry.js} +1 -1
- package/dist/mint-components/{p-f39cf252.system.entry.js → p-5825aee6.system.entry.js} +1 -1
- package/dist/mint-components/{p-77b9cde8.system.js → p-59644ef8.system.js} +1 -1
- package/dist/mint-components/{p-f35d856a.system.js → p-5d79c8a0.system.js} +1 -1
- package/dist/mint-components/{p-e4f17c21.system.js → p-5e106c95.system.js} +1 -1
- package/dist/mint-components/{p-db0a2afd.entry.js → p-5f6d617a.entry.js} +1 -1
- package/dist/mint-components/{p-ff118a19.system.js → p-614630a8.system.js} +1 -1
- package/dist/mint-components/p-6596f0de.entry.js +9 -0
- package/dist/mint-components/{p-bc386a7b.js → p-6684e9ad.js} +1 -1
- package/dist/mint-components/{p-8583ce0c.system.js → p-695ec086.system.js} +1 -1
- package/dist/mint-components/{p-ce050888.system.js → p-6d444f3f.system.js} +1 -1
- package/dist/mint-components/{p-90833864.system.entry.js → p-6e816a17.system.entry.js} +1 -1
- package/dist/mint-components/p-6f8dde97.system.js +1 -0
- package/dist/mint-components/p-71c585b7.entry.js +1 -0
- package/dist/mint-components/{p-aefc6c4f.system.entry.js → p-7333d103.system.entry.js} +1 -1
- package/dist/mint-components/{p-8f2d03c7.entry.js → p-7528770e.entry.js} +1 -1
- package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-7767314d.system.entry.js} +1 -1
- package/dist/mint-components/p-78909fc0.system.js +1 -0
- package/dist/mint-components/{p-692e14c5.system.js → p-79854479.system.js} +1 -1
- package/dist/mint-components/{p-7161e1a6.js → p-7a7ebf08.js} +1 -1
- package/dist/mint-components/{p-25558a33.entry.js → p-7c0255ad.entry.js} +1 -1
- package/dist/mint-components/{p-5c4ba8a0.entry.js → p-80174c14.entry.js} +1 -1
- package/dist/mint-components/{p-7b59e13c.system.js → p-82905fda.system.js} +1 -1
- package/dist/mint-components/{p-80e116ec.system.entry.js → p-82be3d10.system.entry.js} +1 -1
- package/dist/mint-components/{p-172675ca.system.js → p-83277c69.system.js} +1 -1
- package/dist/mint-components/{p-09348341.entry.js → p-84866680.entry.js} +1 -1
- package/dist/mint-components/{p-c30d0049.system.entry.js → p-878bb2cf.system.entry.js} +1 -1
- package/dist/mint-components/{p-61897e72.entry.js → p-89f8ab67.entry.js} +1 -1
- package/dist/mint-components/p-8f5b316e.js +49 -0
- package/dist/mint-components/{p-5ce78407.system.entry.js → p-91c4b8d5.system.entry.js} +1 -1
- package/dist/mint-components/{p-dd368927.system.entry.js → p-93cb9438.system.entry.js} +1 -1
- package/dist/mint-components/{p-5b871e38.system.entry.js → p-96cbca52.system.entry.js} +1 -1
- package/dist/mint-components/{p-217dedde.js → p-97b8c481.js} +2 -2
- package/dist/mint-components/p-9be145c6.system.entry.js +1 -0
- package/dist/mint-components/{p-d005df28.system.entry.js → p-9c381424.system.entry.js} +1 -1
- package/dist/mint-components/{p-6c4ad51a.js → p-9f21ea69.js} +1 -1
- package/dist/mint-components/{p-0c0d4065.js → p-9fa6606e.js} +3 -3
- package/dist/mint-components/{p-d18dedd4.js → p-a03189bd.js} +1 -1
- package/dist/mint-components/p-a0667674.system.entry.js +1 -0
- package/dist/mint-components/{p-058aefe1.entry.js → p-a30f0ffd.entry.js} +1 -1
- package/dist/mint-components/p-a9855b29.system.entry.js +1 -0
- package/dist/mint-components/p-aa0b0cd6.entry.js +108 -0
- package/dist/mint-components/{p-3366b81e.js → p-ab678644.js} +2 -2
- package/dist/mint-components/{p-d997001a.js → p-ad017a39.js} +1 -1
- package/dist/mint-components/{p-205cfdcd.system.js → p-b179621d.system.js} +1 -1
- package/dist/mint-components/{p-6668f9f0.entry.js → p-b6fc53c9.entry.js} +1 -1
- package/dist/mint-components/{p-027fc3be.system.entry.js → p-b8288385.system.entry.js} +1 -1
- package/dist/mint-components/{p-013564b3.entry.js → p-b8766db9.entry.js} +1 -1
- package/dist/mint-components/{p-3bc62ca6.entry.js → p-b9652150.entry.js} +1 -1
- package/dist/mint-components/{p-e3497e0e.system.entry.js → p-bae7d6b5.system.entry.js} +1 -1
- package/dist/mint-components/{p-a4f8abad.js → p-bd804f4c.js} +1 -1
- package/dist/mint-components/{p-d4570314.entry.js → p-c2c01ab5.entry.js} +1 -1
- package/dist/mint-components/{p-036a2617.system.js → p-c756bc32.system.js} +1 -1
- package/dist/mint-components/{p-f1374258.system.entry.js → p-c8060ef5.system.entry.js} +1 -1
- package/dist/mint-components/{p-52674798.entry.js → p-cc0fe4a3.entry.js} +1 -1
- package/dist/mint-components/{p-4da5a3fe.system.entry.js → p-d2448c85.system.entry.js} +1 -1
- package/dist/mint-components/{p-5b1d2866.system.js → p-d42aba0e.system.js} +1 -1
- package/dist/mint-components/{p-3286ef38.js → p-d5375baf.js} +1 -1
- package/dist/mint-components/p-d6c1e876.system.js +1 -0
- package/dist/mint-components/{p-035d9b65.js → p-d863acaa.js} +1 -1
- package/dist/mint-components/{p-e6ace3ab.js → p-dece706f.js} +1 -1
- package/dist/mint-components/{p-ec0b649a.entry.js → p-dfb50245.entry.js} +1 -1
- package/dist/mint-components/{p-7efb8782.system.js → p-e44c816e.system.js} +1 -1
- package/dist/mint-components/{p-19c441b2.system.js → p-e4d3b7a9.system.js} +1 -1
- package/dist/mint-components/{p-b2b85238.entry.js → p-e502fd80.entry.js} +1 -1
- package/dist/mint-components/{p-e00ec007.js → p-e5e8e13e.js} +1 -1
- package/dist/mint-components/{p-7ee8f2ed.entry.js → p-e6924adb.entry.js} +3 -3
- package/dist/mint-components/{p-f8a09b0f.js → p-e7a9ce16.js} +152 -152
- package/dist/mint-components/{p-c67f8558.system.entry.js → p-e9a596d6.system.entry.js} +1 -1
- package/dist/mint-components/{p-09f7aacd.entry.js → p-ed17e1b8.entry.js} +2 -2
- package/dist/mint-components/p-ef64e6f0.entry.js +16 -0
- package/dist/mint-components/{p-d6193876.system.js → p-f3b21df2.system.js} +1 -1
- package/dist/mint-components/{p-c45a929a.system.entry.js → p-f3ddbe2f.system.entry.js} +1 -1
- package/dist/mint-components/{p-77fa2383.entry.js → p-f6fc7569.entry.js} +1 -1
- package/dist/mint-components/{p-626b31cb.system.entry.js → p-f7948b16.system.entry.js} +1 -1
- package/dist/mint-components/{p-a0c5631b.system.js → p-f84605ec.system.js} +1 -1
- package/dist/mint-components/{p-ab0ea688.system.entry.js → p-f95952a0.system.entry.js} +1 -1
- package/dist/mint-components/{p-5141769d.system.entry.js → p-fa32d8eb.system.entry.js} +1 -1
- package/dist/mint-components/{p-0d83907e.js → p-fca34d77.js} +1 -1
- package/dist/mint-components/p-fd214860.system.entry.js +1 -0
- package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-fe0eceba.system.entry.js} +1 -1
- package/dist/mint-components/sqm-partner-info-modal.entry.js +392 -0
- package/dist/mint-components/sqm-partner-info-modal.system.entry.js +1 -0
- package/dist/mint-components/sqm-widget-verification.entry.js +228 -0
- package/dist/mint-components/sqm-widget-verification.system.entry.js +1 -0
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +13 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +43 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +94 -0
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +16 -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-widget-verification/useWidgetVerification.d.ts +2 -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.d.ts +402 -10
- 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/sqm-email-verification.cjs.entry.js +0 -418
- package/dist/esm/sqm-email-verification.entry.js +0 -414
- 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/mint-components/p-02499e08.entry.js +0 -1
- package/dist/mint-components/p-0614dcbc.entry.js +0 -9
- package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
- package/dist/mint-components/p-30c1ef36.system.js +0 -1
- package/dist/mint-components/p-3adbfd0b.system.js +0 -6
- package/dist/mint-components/p-5492dd51.system.entry.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-b395470f.entry.js +0 -16
- package/dist/mint-components/p-bf545082.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-de343dd0.system.entry.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/docs/stats.json +0 -122783
|
@@ -0,0 +1,797 @@
|
|
|
1
|
+
import { h, r as registerInstance } from './index-38ad4957.js';
|
|
2
|
+
import { i as intl } from './global-b2ee3a12.js';
|
|
3
|
+
import { k as useState, f as useEffect, n as h$1 } from './dom-context-hooks.module-50442785.js';
|
|
4
|
+
import { d as dist, t as Pn, w as wn, J, $ as $e, i as isDemo, q as En, L } from './index.module-e266b4d7.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-738acfb3.js';
|
|
9
|
+
import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-77c231af.js';
|
|
10
|
+
import { S as SHOW_CODE_NAMESPACE, V as VERIFICATION_EMAIL_NAMESPACE } from './keys-406491dc.js';
|
|
11
|
+
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
12
|
+
import { u as useVerificationEmail } from './useVerificationEmail-5c6cd733.js';
|
|
13
|
+
|
|
14
|
+
const UpsertUserEmailMutation = dist.gql `
|
|
15
|
+
mutation upsertUser($userInput: UserInput!) {
|
|
16
|
+
upsertUser(userInput: $userInput) {
|
|
17
|
+
id
|
|
18
|
+
accountId
|
|
19
|
+
email
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const UserLookupQuery = dist.gql `
|
|
24
|
+
query user {
|
|
25
|
+
viewer {
|
|
26
|
+
... on User {
|
|
27
|
+
id
|
|
28
|
+
accountId
|
|
29
|
+
email
|
|
30
|
+
impactConnection {
|
|
31
|
+
user {
|
|
32
|
+
id
|
|
33
|
+
email
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
function useUpsertUserEmail() {
|
|
41
|
+
const user = J();
|
|
42
|
+
const [request, { loading: loading, data, errors }] = $e(UpsertUserEmailMutation);
|
|
43
|
+
const upsertUserEmail = async (email) => {
|
|
44
|
+
try {
|
|
45
|
+
const result = await request({
|
|
46
|
+
userInput: {
|
|
47
|
+
id: user.id,
|
|
48
|
+
accountId: user.accountId,
|
|
49
|
+
email,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
if (result instanceof Error || !result)
|
|
53
|
+
throw new Error();
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
console.error("Could not set email on user", e);
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return [
|
|
62
|
+
upsertUserEmail,
|
|
63
|
+
{
|
|
64
|
+
loading,
|
|
65
|
+
data,
|
|
66
|
+
errors,
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
function useWidgetEmailVerification(props) {
|
|
71
|
+
const [_, setShowCode] = Pn(SHOW_CODE_NAMESPACE);
|
|
72
|
+
const [email, setEmail] = Pn(VERIFICATION_EMAIL_NAMESPACE);
|
|
73
|
+
const [emailExists, setEmailExists] = useState(false);
|
|
74
|
+
const [error, setError] = useState(false);
|
|
75
|
+
const [mutationError, setMutationError] = useState(false);
|
|
76
|
+
const { initialized, send: [sendEmail, { loading: sendLoading, errors }], } = useVerificationEmail();
|
|
77
|
+
const [upsertUserEmail] = useUpsertUserEmail();
|
|
78
|
+
const [loading, setLoading] = useState(true);
|
|
79
|
+
const { data, loading: initialLoading } = wn(UserLookupQuery, {});
|
|
80
|
+
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,}))$/;
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (!(data === null || data === void 0 ? void 0 : data.viewer))
|
|
83
|
+
return;
|
|
84
|
+
setEmailExists(!!data.viewer.email);
|
|
85
|
+
}, [data]);
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (initialized)
|
|
88
|
+
setLoading(false);
|
|
89
|
+
}, [initialized]);
|
|
90
|
+
const submitEmail = async (e) => {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
if (!(data === null || data === void 0 ? void 0 : data.viewer))
|
|
93
|
+
return;
|
|
94
|
+
setLoading(true);
|
|
95
|
+
const toAddress = data.viewer.email;
|
|
96
|
+
if (!toAddress) {
|
|
97
|
+
// If no email on the user, set one
|
|
98
|
+
const formData = e.detail.formData;
|
|
99
|
+
const newEmail = formData.get("email").toString();
|
|
100
|
+
if (!emailRegex.test(newEmail)) {
|
|
101
|
+
setError(true);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const result = await upsertUserEmail(newEmail);
|
|
105
|
+
if (!result || !result.user.email)
|
|
106
|
+
setError(true);
|
|
107
|
+
}
|
|
108
|
+
// UI should not allow this call til initialisation is done
|
|
109
|
+
if (!initialized)
|
|
110
|
+
return;
|
|
111
|
+
const result = await sendEmail();
|
|
112
|
+
if (!result || !result.success)
|
|
113
|
+
setMutationError(true);
|
|
114
|
+
else {
|
|
115
|
+
// This is used to let the code verification widget know an email was already sent
|
|
116
|
+
setEmail(toAddress);
|
|
117
|
+
setShowCode(true);
|
|
118
|
+
}
|
|
119
|
+
setLoading(false);
|
|
120
|
+
};
|
|
121
|
+
return {
|
|
122
|
+
callbacks: {
|
|
123
|
+
submitEmail,
|
|
124
|
+
},
|
|
125
|
+
states: {
|
|
126
|
+
loading,
|
|
127
|
+
initialLoading: initialLoading && !initialized,
|
|
128
|
+
error,
|
|
129
|
+
email: data === null || data === void 0 ? void 0 : data.viewer.email,
|
|
130
|
+
sendCodeError: mutationError,
|
|
131
|
+
},
|
|
132
|
+
text: props.getTextProps(),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const style = {
|
|
137
|
+
Wrapper: {
|
|
138
|
+
display: "flex",
|
|
139
|
+
flexDirection: "column",
|
|
140
|
+
gap: "var(--sl-spacing-medium)",
|
|
141
|
+
marginTop: "var(--sl-spacing-medium)",
|
|
142
|
+
},
|
|
143
|
+
InputsContainer: {
|
|
144
|
+
display: "flex",
|
|
145
|
+
gap: "var(--sl-spacing-medium)",
|
|
146
|
+
position: "relative",
|
|
147
|
+
flexDirection: "column",
|
|
148
|
+
maxWidth: "320px",
|
|
149
|
+
},
|
|
150
|
+
ContinueButton: {
|
|
151
|
+
width: "100%",
|
|
152
|
+
maxWidth: "100px",
|
|
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
|
+
publisher {
|
|
431
|
+
phoneNumber
|
|
432
|
+
phoneNumberCountryCode
|
|
433
|
+
countryCode
|
|
434
|
+
currency
|
|
435
|
+
requiredTaxDocumentType
|
|
436
|
+
currentTaxDocument {
|
|
437
|
+
type
|
|
438
|
+
status
|
|
439
|
+
}
|
|
440
|
+
withdrawalSettings {
|
|
441
|
+
paymentMethod
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
`;
|
|
449
|
+
const GET_COUNTRIES = dist.gql `
|
|
450
|
+
query getCountries {
|
|
451
|
+
impactPayoutCountries(limit: 1000) {
|
|
452
|
+
data {
|
|
453
|
+
countryCode
|
|
454
|
+
displayName
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
`;
|
|
459
|
+
const GET_CURRENCIES = dist.gql `
|
|
460
|
+
query currencies($locale: RSLocale) {
|
|
461
|
+
currencies(limit: 300) {
|
|
462
|
+
data {
|
|
463
|
+
displayName(locale: $locale)
|
|
464
|
+
currencyCode
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
`;
|
|
469
|
+
const CONNECT_PARTNER = dist.gql `
|
|
470
|
+
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
471
|
+
createImpactConnection(impactConnectionInput: $vars) {
|
|
472
|
+
success
|
|
473
|
+
validationErrors {
|
|
474
|
+
field
|
|
475
|
+
message
|
|
476
|
+
}
|
|
477
|
+
user {
|
|
478
|
+
id
|
|
479
|
+
accountId
|
|
480
|
+
impactConnection {
|
|
481
|
+
connected
|
|
482
|
+
publisher {
|
|
483
|
+
brandedSignup
|
|
484
|
+
requiredTaxDocumentType
|
|
485
|
+
currentTaxDocument {
|
|
486
|
+
type
|
|
487
|
+
status
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
`;
|
|
495
|
+
const GET_BRAND_NAME = dist.gql `
|
|
496
|
+
query getTenantSettings {
|
|
497
|
+
tenantSettings {
|
|
498
|
+
companyName
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
`;
|
|
502
|
+
function usePartnerInfoModal(props) {
|
|
503
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
504
|
+
const locale = L();
|
|
505
|
+
const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {});
|
|
506
|
+
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
507
|
+
const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
|
|
508
|
+
const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
|
|
509
|
+
const { data: tenantSettingsData } = wn(GET_BRAND_NAME, {});
|
|
510
|
+
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
|
|
511
|
+
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) || "");
|
|
512
|
+
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) || "");
|
|
513
|
+
console.log(countryCode, currency, "initial country and currency state"); // TEMP
|
|
514
|
+
const [countrySearch, setCountrySearch] = useState("");
|
|
515
|
+
const [currencySearch, setCurrencySearch] = useState("");
|
|
516
|
+
const [filteredCountries, setFilteredCountries] = useState(((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || []);
|
|
517
|
+
const [filteredCurrencies, setFilteredCurrencies] = useState(((_f = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _f === void 0 ? void 0 : _f.data) || []);
|
|
518
|
+
const [error, setError] = useState("");
|
|
519
|
+
const [success, setSuccess] = useState(false);
|
|
520
|
+
const countries = ((_g = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _g === void 0 ? void 0 : _g.data) || [];
|
|
521
|
+
const currencies = ((_h = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _h === void 0 ? void 0 : _h.data) || [];
|
|
522
|
+
console.log(user, "user data from partner info query"); // TEMP
|
|
523
|
+
useEffect(() => {
|
|
524
|
+
var _a;
|
|
525
|
+
if (userData && ((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher)) {
|
|
526
|
+
setCountryCode(user.impactConnection.publisher.countryCode);
|
|
527
|
+
setCurrency(user.impactConnection.publisher.currency);
|
|
528
|
+
}
|
|
529
|
+
}, [userData]);
|
|
530
|
+
useEffect(() => {
|
|
531
|
+
if (!(countries === null || countries === void 0 ? void 0 : countries.length))
|
|
532
|
+
return;
|
|
533
|
+
if (countrySearch.trim() === "") {
|
|
534
|
+
setFilteredCountries(countries || []);
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
setFilteredCountries(countries.filter((c) => c.displayName.toLowerCase().includes(countrySearch.toLowerCase())) || []);
|
|
538
|
+
}
|
|
539
|
+
}, [countrySearch, countries]);
|
|
540
|
+
useEffect(() => {
|
|
541
|
+
if (!(currencies === null || currencies === void 0 ? void 0 : currencies.length))
|
|
542
|
+
return;
|
|
543
|
+
if (currencySearch.trim() === "") {
|
|
544
|
+
setFilteredCurrencies(currencies || []);
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
|
|
548
|
+
}
|
|
549
|
+
}, [currencySearch, currencies]);
|
|
550
|
+
const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
|
|
551
|
+
function onCountryChange(e) {
|
|
552
|
+
var _a, _b;
|
|
553
|
+
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
554
|
+
if (!value)
|
|
555
|
+
return;
|
|
556
|
+
setCountryCode(value);
|
|
557
|
+
setCurrency("");
|
|
558
|
+
setError("");
|
|
559
|
+
}
|
|
560
|
+
function onCurrencyChange(e) {
|
|
561
|
+
var _a, _b;
|
|
562
|
+
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
563
|
+
if (!value)
|
|
564
|
+
return;
|
|
565
|
+
setCurrency(value);
|
|
566
|
+
setError("");
|
|
567
|
+
}
|
|
568
|
+
async function onSubmit() {
|
|
569
|
+
var _a, _b;
|
|
570
|
+
if (!countryCode || !currency) {
|
|
571
|
+
setError(props.missingFieldsErrorText);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
setError("");
|
|
575
|
+
try {
|
|
576
|
+
const vars = {
|
|
577
|
+
user: {
|
|
578
|
+
id: user.id,
|
|
579
|
+
accountId: user.accountId,
|
|
580
|
+
},
|
|
581
|
+
firstName: user.firstName,
|
|
582
|
+
lastName: user.lastName,
|
|
583
|
+
// phoneNumber: null,
|
|
584
|
+
// phoneNumberCountryCode: null,
|
|
585
|
+
countryCode,
|
|
586
|
+
currency,
|
|
587
|
+
};
|
|
588
|
+
const result = await connectImpactPartner({ vars });
|
|
589
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
590
|
+
setError(props.networkErrorText);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const connectionResult = result
|
|
594
|
+
.createImpactConnection;
|
|
595
|
+
console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
|
|
596
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
597
|
+
const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
|
|
598
|
+
setError(validationMsg || props.networkErrorText);
|
|
599
|
+
console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
603
|
+
await refetch();
|
|
604
|
+
setSuccess(true);
|
|
605
|
+
}
|
|
606
|
+
catch (e) {
|
|
607
|
+
console.error("Partner creation error:", e);
|
|
608
|
+
setError(props.networkErrorText);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
console.log(success, "success state in partner info modal");
|
|
612
|
+
const showModal = !success &&
|
|
613
|
+
!userLoading &&
|
|
614
|
+
(!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected) || !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher));
|
|
615
|
+
console.log(showModal, "showModal condition in partner info modal"); // TEMP
|
|
616
|
+
return {
|
|
617
|
+
states: {
|
|
618
|
+
open: showModal,
|
|
619
|
+
loading: userLoading || countriesLoading || currenciesLoading,
|
|
620
|
+
submitting: connectLoading,
|
|
621
|
+
isExistingPartner: (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected) || (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher),
|
|
622
|
+
countryCode,
|
|
623
|
+
currency,
|
|
624
|
+
error,
|
|
625
|
+
success,
|
|
626
|
+
brandName: ((_j = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _j === void 0 ? void 0 : _j.companyName) || "",
|
|
627
|
+
filteredCountries: filteredCountries || [],
|
|
628
|
+
filteredCurrencies: filteredCurrencies || [],
|
|
629
|
+
},
|
|
630
|
+
callbacks: {
|
|
631
|
+
onCountryChange,
|
|
632
|
+
onCurrencyChange,
|
|
633
|
+
setCurrencySearch,
|
|
634
|
+
setCountrySearch,
|
|
635
|
+
onSubmit,
|
|
636
|
+
onClose: () => {
|
|
637
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
638
|
+
setSuccess(true);
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
text: props.getTextProps(),
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const PartnerInfoModal = class {
|
|
646
|
+
constructor(hostRef) {
|
|
647
|
+
registerInstance(this, hostRef);
|
|
648
|
+
/**
|
|
649
|
+
* Brand name shown in the modal header
|
|
650
|
+
*
|
|
651
|
+
* @uiName Brand name
|
|
652
|
+
*/
|
|
653
|
+
this.brandName = "";
|
|
654
|
+
/**
|
|
655
|
+
* Header text when user has no existing partner
|
|
656
|
+
*
|
|
657
|
+
* @uiName New partner header
|
|
658
|
+
* @uiWidget textArea
|
|
659
|
+
*/
|
|
660
|
+
this.modalHeader = "Let's get you ready for rewards";
|
|
661
|
+
/**
|
|
662
|
+
* Header text when user has an existing partner
|
|
663
|
+
*
|
|
664
|
+
* @uiName Existing partner header
|
|
665
|
+
* @uiWidget textArea
|
|
666
|
+
*/
|
|
667
|
+
this.modalHeaderExistingPartner = "We found an existing account";
|
|
668
|
+
/**
|
|
669
|
+
* Description for new partner setup
|
|
670
|
+
*
|
|
671
|
+
* @uiName New partner description
|
|
672
|
+
* @uiWidget textArea
|
|
673
|
+
*/
|
|
674
|
+
this.descriptionNewPartner = "Confirm your country and currency now to get your future rewards faster.";
|
|
675
|
+
/**
|
|
676
|
+
* Description for existing partner confirmation
|
|
677
|
+
*
|
|
678
|
+
* @uiName Existing partner description
|
|
679
|
+
* @uiWidget textArea
|
|
680
|
+
*/
|
|
681
|
+
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.";
|
|
682
|
+
/**
|
|
683
|
+
* Support description for existing partner confirmation
|
|
684
|
+
*
|
|
685
|
+
* @uiName Existing partner support description
|
|
686
|
+
* @uiWidget textArea
|
|
687
|
+
*/
|
|
688
|
+
this.supportDescriptionExistingPartner = "If this is a mistake, please contact Support or sign up for this referral program with a different email.";
|
|
689
|
+
/**
|
|
690
|
+
* @uiName Country label
|
|
691
|
+
*/
|
|
692
|
+
this.countryLabel = "Country";
|
|
693
|
+
/**
|
|
694
|
+
* @uiName Currency label
|
|
695
|
+
*/
|
|
696
|
+
this.currencyLabel = "Currency";
|
|
697
|
+
/**
|
|
698
|
+
* @uiName Submit button label
|
|
699
|
+
*/
|
|
700
|
+
this.submitButtonLabel = "Submit";
|
|
701
|
+
/**
|
|
702
|
+
* @uiName Confirm button label
|
|
703
|
+
*/
|
|
704
|
+
this.confirmButtonLabel = "Confirm";
|
|
705
|
+
/**
|
|
706
|
+
* @uiName Search country placeholder
|
|
707
|
+
*/
|
|
708
|
+
this.searchCountryPlaceholder = "Search for a country";
|
|
709
|
+
/**
|
|
710
|
+
* @uiName Search currency placeholder
|
|
711
|
+
*/
|
|
712
|
+
this.searchCurrencyPlaceholder = "Search for a currency";
|
|
713
|
+
/**
|
|
714
|
+
* @uiName Network error text
|
|
715
|
+
* @uiWidget textArea
|
|
716
|
+
*/
|
|
717
|
+
this.networkErrorText = "An error occurred. Please try again.";
|
|
718
|
+
/**
|
|
719
|
+
* @uiName Missing fields error text
|
|
720
|
+
* @uiWidget textArea
|
|
721
|
+
*/
|
|
722
|
+
this.missingFieldsErrorText = "Please select both a country and currency.";
|
|
723
|
+
h$1(this);
|
|
724
|
+
}
|
|
725
|
+
disconnectedCallback() { }
|
|
726
|
+
getTextProps() {
|
|
727
|
+
return getProps(this);
|
|
728
|
+
}
|
|
729
|
+
render() {
|
|
730
|
+
// AL: TODO add usePartnerInfoModal
|
|
731
|
+
const props = isDemo()
|
|
732
|
+
? useDemoPartnerInfoModal(this)
|
|
733
|
+
: usePartnerInfoModal(this);
|
|
734
|
+
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
function useDemoPartnerInfoModal(props) {
|
|
738
|
+
const [countryCode, setCountryCode] = useState("US");
|
|
739
|
+
const [currency, setCurrency] = useState("");
|
|
740
|
+
const [error, setError] = useState("");
|
|
741
|
+
return cjs({
|
|
742
|
+
states: {
|
|
743
|
+
brandName: "Test Brand",
|
|
744
|
+
open: true,
|
|
745
|
+
loading: false,
|
|
746
|
+
submitting: false,
|
|
747
|
+
isExistingPartner: false,
|
|
748
|
+
countryCode,
|
|
749
|
+
currency,
|
|
750
|
+
error,
|
|
751
|
+
success: false,
|
|
752
|
+
filteredCountries: [],
|
|
753
|
+
filteredCurrencies: [],
|
|
754
|
+
},
|
|
755
|
+
callbacks: {
|
|
756
|
+
onCountryChange: (e) => {
|
|
757
|
+
var _a, _b;
|
|
758
|
+
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;
|
|
759
|
+
if (value) {
|
|
760
|
+
setCountryCode(value);
|
|
761
|
+
setCurrency("");
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
onCurrencyChange: (e) => {
|
|
765
|
+
var _a, _b;
|
|
766
|
+
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;
|
|
767
|
+
if (value)
|
|
768
|
+
setCurrency(value);
|
|
769
|
+
},
|
|
770
|
+
setCountrySearch: () => { },
|
|
771
|
+
setCurrencySearch: () => { },
|
|
772
|
+
onSubmit: () => {
|
|
773
|
+
if (!countryCode || !currency) {
|
|
774
|
+
setError(props.missingFieldsErrorText);
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
setError("");
|
|
778
|
+
},
|
|
779
|
+
onClose: () => { },
|
|
780
|
+
},
|
|
781
|
+
text: {
|
|
782
|
+
modalHeader: props.modalHeader,
|
|
783
|
+
descriptionNewPartner: props.descriptionNewPartner,
|
|
784
|
+
descriptionExistingPartner: props.descriptionExistingPartner,
|
|
785
|
+
countryLabel: props.countryLabel,
|
|
786
|
+
currencyLabel: props.currencyLabel,
|
|
787
|
+
submitButtonLabel: props.submitButtonLabel,
|
|
788
|
+
confirmButtonLabel: props.confirmButtonLabel,
|
|
789
|
+
searchCountryPlaceholder: props.searchCountryPlaceholder,
|
|
790
|
+
searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
|
|
791
|
+
supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
|
|
792
|
+
modalHeaderExistingPartner: props.modalHeaderExistingPartner,
|
|
793
|
+
},
|
|
794
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export { WidgetEmailVerification as sqm_email_verification, PartnerInfoModal as sqm_partner_info_modal };
|