@saasquatch/mint-components 2.0.8 → 2.0.9
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-ae3a32c3.js → ShadowViewAddon-31199cba.js} +230 -112
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/{sqm-big-stat_47.cjs.entry.js → sqm-big-stat_49.cjs.entry.js} +552 -13
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +1 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +108 -64
- package/dist/{esm/AsYouType-46f67d0d.js → cjs/usePortalRegistrationForm-8ed0d753.js} +215 -1
- package/dist/collection/components/sqm-portal-google-login/GoogleLoginForm.stories.js +37 -0
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +2 -1
- package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +0 -25
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
- package/dist/esm/{ShadowViewAddon-78a1c35c.js → ShadowViewAddon-49bebd13.js} +234 -118
- package/dist/esm/{data-a581119a.js → data-f2f77358.js} +2 -2
- package/dist/esm/{global-58a69018.js → global-5d501632.js} +1 -1
- package/dist/esm/{index.module-c9811a48.js → index.module-234e8f5e.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-7e22fb0d.js → re-render-b56bc163.js} +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +8 -8
- package/dist/esm/{sqm-big-stat_47.entry.js → sqm-big-stat_49.entry.js} +559 -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.entry.js +3 -3
- 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-81541e40.js → sqm-lead-checkbox-field-view-e461c8d6.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
- package/dist/esm/{sqm-lead-input-field-view-d543d939.js → sqm-lead-input-field-view-9cf60eea.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-5a452423.js → sqm-navigation-sidebar-item-view-3d1b3be4.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-5fb1a99e.js → sqm-portal-email-verification-view-ec6d9b7e.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-e3aef106.js → sqm-portal-profile-view-36eae0a3.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-registration-form.entry.js +3 -4
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/sqm-portal-verify-email.entry.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 +116 -72
- 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-9a3048d9.js → sqm-user-info-form-view-0a8999d0.js} +2 -2
- package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm/sqm-widget-verification.entry.js +1 -1
- package/dist/esm/{useChildElements-3d872cef.js → useChildElements-daf489b1.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-dda1f52b.js → useInstantAccessRegistration-89e7dfc8.js} +2 -2
- package/dist/esm/{useLeadFormState-8d4b2620.js → useLeadFormState-d2f1c87d.js} +2 -2
- package/dist/esm/{usePayoutStatus-7404eb9d.js → usePayoutStatus-6be47a64.js} +1 -1
- package/dist/{cjs/AsYouType-6788393a.js → esm/usePortalRegistrationForm-fb06b600.js} +211 -2
- package/dist/esm/{useReferralCodes-c2e809cf.js → useReferralCodes-75d67509.js} +1 -1
- package/dist/esm/{useReferralTable-909ccb28.js → useReferralTable-8e0acee0.js} +3 -3
- package/dist/esm/{useRegistrationFormState-24d594ea.js → useRegistrationFormState-a9e156e6.js} +1 -1
- package/dist/esm/{useVerificationEmail-55e0e98f.js → useVerificationEmail-66b40965.js} +1 -1
- package/dist/esm/{utilities-72c07b09.js → utilities-e6f8716e.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-49bebd13.js +1 -0
- package/dist/esm-es5/{data-a581119a.js → data-f2f77358.js} +1 -1
- package/dist/esm-es5/{global-58a69018.js → global-5d501632.js} +1 -1
- package/dist/esm-es5/{index.module-c9811a48.js → index.module-234e8f5e.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-7e22fb0d.js → re-render-b56bc163.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_49.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 -1
- 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-81541e40.js → sqm-lead-checkbox-field-view-e461c8d6.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-d543d939.js → sqm-lead-input-field-view-9cf60eea.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-5a452423.js → sqm-navigation-sidebar-item-view-3d1b3be4.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-5fb1a99e.js → sqm-portal-email-verification-view-ec6d9b7e.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-e3aef106.js → sqm-portal-profile-view-36eae0a3.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.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.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-9a3048d9.js → sqm-user-info-form-view-0a8999d0.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-3d872cef.js → useChildElements-daf489b1.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-dda1f52b.js → useInstantAccessRegistration-89e7dfc8.js} +1 -1
- package/dist/esm-es5/{useLeadFormState-8d4b2620.js → useLeadFormState-d2f1c87d.js} +1 -1
- package/dist/esm-es5/{usePayoutStatus-7404eb9d.js → usePayoutStatus-6be47a64.js} +1 -1
- package/dist/esm-es5/usePortalRegistrationForm-fb06b600.js +1 -0
- package/dist/esm-es5/{useReferralCodes-c2e809cf.js → useReferralCodes-75d67509.js} +1 -1
- package/dist/esm-es5/{useReferralTable-909ccb28.js → useReferralTable-8e0acee0.js} +1 -1
- package/dist/esm-es5/{useRegistrationFormState-24d594ea.js → useRegistrationFormState-a9e156e6.js} +1 -1
- package/dist/esm-es5/{useVerificationEmail-55e0e98f.js → useVerificationEmail-66b40965.js} +1 -1
- package/dist/esm-es5/{utilities-72c07b09.js → utilities-e6f8716e.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-b00e8365.entry.js → p-01aa5c0d.entry.js} +1 -1
- package/dist/mint-components/{p-26a7051d.system.entry.js → p-04603078.system.entry.js} +1 -1
- package/dist/mint-components/{p-171310d9.system.js → p-08c49143.system.js} +1 -1
- package/dist/mint-components/{p-6076dbaf.entry.js → p-0b6b03fa.entry.js} +1 -1
- package/dist/mint-components/{p-1215518e.system.js → p-0ba04831.system.js} +1 -1
- package/dist/mint-components/{p-12e6cea7.entry.js → p-0bd7de3e.entry.js} +2 -2
- package/dist/mint-components/{p-988f236f.js → p-0e1f3ce2.js} +1 -1
- package/dist/mint-components/{p-49400aab.js → p-10ad4cec.js} +2 -2
- package/dist/mint-components/{p-9eba8408.js → p-177a4691.js} +1 -1
- package/dist/mint-components/p-1830bbfb.js +1 -0
- package/dist/mint-components/{p-5b7a896e.system.entry.js → p-234d0680.system.entry.js} +1 -1
- package/dist/mint-components/{p-a7e35f51.system.js → p-23c58c4f.system.js} +2 -2
- package/dist/mint-components/{p-17a0f310.system.js → p-23d089ee.system.js} +1 -1
- package/dist/mint-components/{p-1aa9136c.js → p-24e20ee2.js} +1 -1
- package/dist/mint-components/p-259285a8.system.entry.js +1 -0
- package/dist/mint-components/{p-40c33b6a.system.entry.js → p-26796f69.system.entry.js} +1 -1
- package/dist/mint-components/p-26fdb210.js +1 -0
- package/dist/mint-components/{p-6c82d60c.system.js → p-286aa5b9.system.js} +1 -1
- package/dist/mint-components/{p-9c79ab08.js → p-2ce4c7a3.js} +2 -2
- package/dist/mint-components/{p-4cc72a4e.system.js → p-2dcb0db6.system.js} +1 -1
- package/dist/mint-components/{p-c30ad421.js → p-323c6d02.js} +1 -1
- package/dist/mint-components/{p-720f03e2.system.js → p-33e1a29e.system.js} +1 -1
- package/dist/mint-components/{p-ba79655c.system.js → p-342921b9.system.js} +1 -1
- package/dist/mint-components/{p-a32afaaa.entry.js → p-3825831b.entry.js} +1 -1
- package/dist/mint-components/{p-2700136f.system.entry.js → p-38ed3cbd.system.entry.js} +1 -1
- package/dist/mint-components/{p-c95a437e.entry.js → p-3d02278d.entry.js} +1 -1
- package/dist/mint-components/{p-0c024cf0.system.entry.js → p-3d12a14b.system.entry.js} +1 -1
- package/dist/mint-components/{p-f5256738.system.entry.js → p-3ed269bf.system.entry.js} +1 -1
- package/dist/mint-components/{p-6a5df328.js → p-3fede0f7.js} +1 -1
- package/dist/mint-components/{p-625ca62f.entry.js → p-3ff0f231.entry.js} +1 -1
- package/dist/mint-components/{p-e1422b78.entry.js → p-4363a896.entry.js} +1 -1
- package/dist/mint-components/{p-f3613921.system.entry.js → p-476a8091.system.entry.js} +1 -1
- package/dist/mint-components/{p-7780cac1.system.entry.js → p-50eaba5b.system.entry.js} +1 -1
- package/dist/mint-components/{p-d09d3b8f.system.js → p-51e5a7da.system.js} +1 -1
- package/dist/mint-components/p-52398c8e.system.entry.js +1 -0
- package/dist/mint-components/{p-2ea3eea9.system.entry.js → p-527c0244.system.entry.js} +1 -1
- package/dist/mint-components/{p-72b914b9.system.entry.js → p-536a5aff.system.entry.js} +1 -1
- package/dist/mint-components/p-5784be79.system.entry.js +1 -0
- package/dist/mint-components/{p-e3b4e06a.system.entry.js → p-5af01051.system.entry.js} +1 -1
- package/dist/mint-components/{p-3b46fae5.entry.js → p-5d17b387.entry.js} +1 -1
- package/dist/mint-components/{p-d9780ae9.entry.js → p-5de55368.entry.js} +1 -1
- package/dist/mint-components/{p-78c754de.system.entry.js → p-612091c6.system.entry.js} +1 -1
- package/dist/mint-components/{p-c6e8086f.system.entry.js → p-62d018f0.system.entry.js} +1 -1
- package/dist/mint-components/{p-dc5bca55.entry.js → p-636a841f.entry.js} +1 -1
- package/dist/mint-components/{p-829cb9ed.system.entry.js → p-63a928e0.system.entry.js} +1 -1
- package/dist/mint-components/{p-f7e49c12.entry.js → p-65f79e43.entry.js} +1 -1
- package/dist/mint-components/{p-9d46f87f.system.entry.js → p-6a0440ed.system.entry.js} +1 -1
- package/dist/mint-components/{p-9ba07029.system.entry.js → p-702f3adb.system.entry.js} +1 -1
- package/dist/mint-components/{p-d399b343.system.entry.js → p-72321b06.system.entry.js} +1 -1
- package/dist/mint-components/p-72d6c425.system.js +1 -0
- package/dist/mint-components/{p-8afb47c5.system.entry.js → p-73aeefed.system.entry.js} +1 -1
- package/dist/mint-components/{p-0ec54f97.js → p-747479dc.js} +1 -1
- package/dist/mint-components/{p-101f0c41.entry.js → p-78fc0c3c.entry.js} +1 -1
- package/dist/mint-components/{p-71af93e3.js → p-7ab26f3d.js} +1 -1
- package/dist/mint-components/{p-0087ad39.system.js → p-825b39e0.system.js} +1 -1
- package/dist/mint-components/{p-8618e8f6.system.js → p-828d27ac.system.js} +1 -1
- package/dist/mint-components/{p-8d9fa981.system.js → p-844aaef2.system.js} +1 -1
- package/dist/mint-components/p-84911f08.system.js +1 -0
- package/dist/mint-components/{p-9491f5fb.system.entry.js → p-8752bcd1.system.entry.js} +1 -1
- package/dist/mint-components/{p-867b2baf.system.js → p-8901a533.system.js} +1 -1
- package/dist/mint-components/{p-5fbe6356.system.js → p-8bf8afb9.system.js} +1 -1
- package/dist/mint-components/{p-ac86903a.system.entry.js → p-8dda2a7f.system.entry.js} +1 -1
- package/dist/mint-components/{p-43ad51bc.entry.js → p-930f37bd.entry.js} +1 -1
- package/dist/mint-components/p-964b09f2.js +1 -0
- package/dist/mint-components/p-96749142.entry.js +273 -0
- package/dist/mint-components/{p-e174b704.system.js → p-96b16a48.system.js} +1 -1
- package/dist/mint-components/{p-ff0e1564.system.js → p-98e0a022.system.js} +1 -1
- package/dist/mint-components/{p-bf044217.js → p-9953648f.js} +1 -1
- package/dist/mint-components/p-9ad42a61.entry.js +1 -0
- package/dist/mint-components/{p-e19f0908.entry.js → p-9c4cac09.entry.js} +2 -2
- package/dist/mint-components/{p-f3c2074b.system.entry.js → p-9c80871f.system.entry.js} +1 -1
- package/dist/mint-components/{p-e8bda98a.system.entry.js → p-9d19a0f7.system.entry.js} +1 -1
- package/dist/mint-components/{p-8931d05e.entry.js → p-9da60671.entry.js} +1 -1
- package/dist/mint-components/p-9ef4172c.entry.js +1 -0
- package/dist/mint-components/p-a6e177d8.system.entry.js +1 -0
- package/dist/mint-components/{p-027c0b10.js → p-a82c8b60.js} +1 -1
- package/dist/mint-components/p-ab38b332.system.js +1 -0
- package/dist/mint-components/{p-58c79873.entry.js → p-ad550231.entry.js} +1 -1
- package/dist/mint-components/p-af123d2b.system.js +1 -0
- package/dist/mint-components/p-b08373f5.entry.js +9 -0
- package/dist/mint-components/{p-bb5d153f.system.js → p-b5559e34.system.js} +1 -1
- package/dist/mint-components/{p-dcc50d90.entry.js → p-bb476395.entry.js} +1 -1
- package/dist/mint-components/{p-bcac83f0.system.js → p-c09d2b35.system.js} +1 -1
- package/dist/mint-components/{p-deecffd0.system.entry.js → p-c16d9c80.system.entry.js} +1 -1
- package/dist/mint-components/p-c4e08253.js +13 -0
- package/dist/mint-components/{p-fcf8bdbc.system.entry.js → p-c7f34690.system.entry.js} +1 -1
- package/dist/mint-components/{p-29398c98.entry.js → p-c7f385d3.entry.js} +1 -1
- package/dist/mint-components/{p-ee92a728.system.entry.js → p-c8f2c3b8.system.entry.js} +1 -1
- package/dist/mint-components/{p-f6eae77c.js → p-cbeab288.js} +1 -1
- package/dist/mint-components/{p-a4e8eb33.entry.js → p-cbf3a928.entry.js} +1 -1
- package/dist/mint-components/{p-a974c549.js → p-cd3ba2b4.js} +1 -1
- package/dist/mint-components/p-d15947d0.js +448 -0
- package/dist/mint-components/{p-011c0990.system.entry.js → p-d170e29a.system.entry.js} +1 -1
- package/dist/mint-components/{p-7e323f2c.entry.js → p-d3f86ec6.entry.js} +1 -1
- package/dist/mint-components/p-d49de8ea.entry.js +11 -0
- package/dist/mint-components/{p-29ba2eaa.entry.js → p-d9f01878.entry.js} +1 -1
- package/dist/mint-components/{p-386ec00c.entry.js → p-de0566e1.entry.js} +1 -1
- package/dist/mint-components/{p-f5fff87e.js → p-e08b7435.js} +1 -1
- package/dist/mint-components/{p-36a1fa33.system.entry.js → p-e1a08323.system.entry.js} +1 -1
- package/dist/mint-components/{p-60ec0961.system.entry.js → p-e1a7d141.system.entry.js} +1 -1
- package/dist/mint-components/{p-a8c86cd8.system.entry.js → p-eacd3c8f.system.entry.js} +1 -1
- package/dist/mint-components/p-ebde83fc.entry.js +1 -0
- package/dist/mint-components/{p-621f3e30.entry.js → p-ec9027cf.entry.js} +1 -1
- package/dist/mint-components/{p-af69ee79.system.entry.js → p-ed7ab864.system.entry.js} +1 -1
- package/dist/mint-components/{p-088f082f.js → p-eff405e5.js} +1 -1
- package/dist/mint-components/{p-ee3a7577.entry.js → p-f08dd2a8.entry.js} +1 -1
- package/dist/mint-components/{p-0b9b1b36.system.entry.js → p-f237f96d.system.entry.js} +1 -1
- package/dist/mint-components/{p-ad3ebf4d.entry.js → p-f776cd83.entry.js} +1 -1
- package/dist/mint-components/p-f84706aa.entry.js +13 -0
- package/dist/mint-components/p-f862be0b.entry.js +1 -0
- package/dist/mint-components/{p-8de73da9.js → p-fb8927aa.js} +1 -1
- package/dist/mint-components/{p-30278955.entry.js → p-fc7d85c7.entry.js} +1 -1
- package/dist/mint-components/{p-75b8fd75.entry.js → p-fe14d2af.entry.js} +1 -1
- package/dist/types/components/sqm-portal-google-login/GoogleLoginForm.stories.d.ts +7 -0
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +0 -4
- package/dist/types/components.d.ts +0 -8
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/sqm-base-registration-form-view-69a4b615.js +0 -74
- package/dist/cjs/sqm-portal-google-login.cjs.entry.js +0 -130
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +0 -381
- package/dist/cjs/sqm-portal-login-view-bb50304c.js +0 -58
- package/dist/cjs/usePortalLogin-1c022d8d.js +0 -74
- package/dist/cjs/usePortalRegistrationForm-75b647fe.js +0 -215
- package/dist/esm/sqm-base-registration-form-view-9e97d8b4.js +0 -72
- package/dist/esm/sqm-portal-google-login.entry.js +0 -126
- package/dist/esm/sqm-portal-google-registration-form.entry.js +0 -377
- package/dist/esm/sqm-portal-login-view-7670cd86.js +0 -56
- package/dist/esm/usePortalLogin-f95bbc67.js +0 -72
- package/dist/esm/usePortalRegistrationForm-1eb3cd72.js +0 -213
- package/dist/esm-es5/AsYouType-46f67d0d.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-78a1c35c.js +0 -1
- package/dist/esm-es5/sqm-base-registration-form-view-9e97d8b4.js +0 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-google-login.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-login-view-7670cd86.js +0 -1
- package/dist/esm-es5/usePortalLogin-f95bbc67.js +0 -1
- package/dist/esm-es5/usePortalRegistrationForm-1eb3cd72.js +0 -1
- package/dist/mint-components/p-121cdc60.js +0 -1
- package/dist/mint-components/p-125a894f.js +0 -1
- package/dist/mint-components/p-1b79b186.entry.js +0 -11
- package/dist/mint-components/p-1cd0e1e9.system.js +0 -1
- package/dist/mint-components/p-20c40fdf.system.js +0 -1
- package/dist/mint-components/p-240bec23.js +0 -1
- package/dist/mint-components/p-28e23d75.system.entry.js +0 -1
- package/dist/mint-components/p-40752a0f.entry.js +0 -1
- package/dist/mint-components/p-44fc6029.js +0 -1
- package/dist/mint-components/p-513f5d80.js +0 -1
- package/dist/mint-components/p-51a6a779.js +0 -1
- package/dist/mint-components/p-537a3894.system.js +0 -1
- package/dist/mint-components/p-6559d0b2.entry.js +0 -273
- package/dist/mint-components/p-6a0ddee0.entry.js +0 -1
- package/dist/mint-components/p-74a39425.system.entry.js +0 -1
- package/dist/mint-components/p-80569911.system.js +0 -1
- package/dist/mint-components/p-92a54b0c.entry.js +0 -1
- package/dist/mint-components/p-947bacd1.system.js +0 -1
- package/dist/mint-components/p-95b6e903.entry.js +0 -1
- package/dist/mint-components/p-976ee669.js +0 -1
- package/dist/mint-components/p-97dc6863.js +0 -13
- package/dist/mint-components/p-9d362d44.system.js +0 -1
- package/dist/mint-components/p-a470e203.entry.js +0 -13
- package/dist/mint-components/p-b3510ca0.system.entry.js +0 -1
- package/dist/mint-components/p-bd093069.system.entry.js +0 -1
- package/dist/mint-components/p-cc8ca3ff.system.entry.js +0 -1
- package/dist/mint-components/p-d08bcd88.entry.js +0 -1
- package/dist/mint-components/p-d69c0a32.system.entry.js +0 -1
- package/dist/mint-components/p-d88d8ffe.entry.js +0 -1
- package/dist/mint-components/p-e115d0a2.entry.js +0 -9
- package/dist/mint-components/p-e3ee8c37.system.js +0 -1
- package/dist/mint-components/p-ee83de0e.js +0 -448
- package/dist/mint-components/p-f5820d03.system.js +0 -1
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h as h$1 } from './index-b3a06de8.js';
|
|
2
|
-
import { k as useState, n as h } from './dom-context-hooks.module-63370afd.js';
|
|
3
|
-
import { i as isDemo, j as jn } from './index.module-c9811a48.js';
|
|
4
|
-
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
5
|
-
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
|
-
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
7
|
-
import './mixins-f750863a.js';
|
|
8
|
-
import './sqm-text-span-view-4c17b8c9.js';
|
|
9
|
-
import { a as useRegistrationForm } from './useRegistrationFormState-24d594ea.js';
|
|
10
|
-
import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-9e97d8b4.js';
|
|
11
|
-
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-8bdc3804.js';
|
|
12
|
-
import './AsYouType-46f67d0d.js';
|
|
13
|
-
import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-1eb3cd72.js';
|
|
14
|
-
|
|
15
|
-
class InvalidTokenError extends Error {
|
|
16
|
-
}
|
|
17
|
-
InvalidTokenError.prototype.name = "InvalidTokenError";
|
|
18
|
-
function b64DecodeUnicode(str) {
|
|
19
|
-
return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {
|
|
20
|
-
let code = p.charCodeAt(0).toString(16).toUpperCase();
|
|
21
|
-
if (code.length < 2) {
|
|
22
|
-
code = "0" + code;
|
|
23
|
-
}
|
|
24
|
-
return "%" + code;
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
function base64UrlDecode(str) {
|
|
28
|
-
let output = str.replace(/-/g, "+").replace(/_/g, "/");
|
|
29
|
-
switch (output.length % 4) {
|
|
30
|
-
case 0:
|
|
31
|
-
break;
|
|
32
|
-
case 2:
|
|
33
|
-
output += "==";
|
|
34
|
-
break;
|
|
35
|
-
case 3:
|
|
36
|
-
output += "=";
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
throw new Error("base64 string is not of the correct length");
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
return b64DecodeUnicode(output);
|
|
43
|
-
}
|
|
44
|
-
catch (err) {
|
|
45
|
-
return atob(output);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function jwtDecode(token, options) {
|
|
49
|
-
if (typeof token !== "string") {
|
|
50
|
-
throw new InvalidTokenError("Invalid token specified: must be a string");
|
|
51
|
-
}
|
|
52
|
-
options || (options = {});
|
|
53
|
-
const pos = options.header === true ? 0 : 1;
|
|
54
|
-
const part = token.split(".")[pos];
|
|
55
|
-
if (typeof part !== "string") {
|
|
56
|
-
throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);
|
|
57
|
-
}
|
|
58
|
-
let decoded;
|
|
59
|
-
try {
|
|
60
|
-
decoded = base64UrlDecode(part);
|
|
61
|
-
}
|
|
62
|
-
catch (e) {
|
|
63
|
-
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
return JSON.parse(decoded);
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function usePortalGoogleRegistrationForm(props) {
|
|
74
|
-
const [registrationFormState, setRegistrationFormState] = useRegistrationForm();
|
|
75
|
-
const [showRegistrationForm, setShowRegistrationForm] = useState({
|
|
76
|
-
mode: "base",
|
|
77
|
-
});
|
|
78
|
-
const handleEmailSubmit = async (event) => {
|
|
79
|
-
const formControls = event.target.getFormControls();
|
|
80
|
-
let formData = {};
|
|
81
|
-
let validationErrors = {};
|
|
82
|
-
formControls.forEach((control) => {
|
|
83
|
-
if (!control.name)
|
|
84
|
-
return;
|
|
85
|
-
const key = control.name;
|
|
86
|
-
const value = control.value;
|
|
87
|
-
jsonpointer.set(formData, key, value);
|
|
88
|
-
if (control.required && !value) {
|
|
89
|
-
jsonpointer.set(validationErrors, key, props.requiredFieldErrorMessage);
|
|
90
|
-
}
|
|
91
|
-
if (typeof control.validationError === "function") {
|
|
92
|
-
const validate = control.validationError;
|
|
93
|
-
const validationError = validate({
|
|
94
|
-
control,
|
|
95
|
-
key,
|
|
96
|
-
value,
|
|
97
|
-
});
|
|
98
|
-
if (validationError)
|
|
99
|
-
jsonpointer.set(validationErrors, key, validationError);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
if (Object.keys(validationErrors).length) {
|
|
103
|
-
// early return for validation errors
|
|
104
|
-
setRegistrationFormState({
|
|
105
|
-
...registrationFormState,
|
|
106
|
-
loading: false,
|
|
107
|
-
error: "",
|
|
108
|
-
validationErrors,
|
|
109
|
-
});
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
setRegistrationFormState({
|
|
113
|
-
...registrationFormState,
|
|
114
|
-
validationErrors: {},
|
|
115
|
-
initialData: {
|
|
116
|
-
...registrationFormState === null || registrationFormState === void 0 ? void 0 : registrationFormState.initialData,
|
|
117
|
-
...formData,
|
|
118
|
-
},
|
|
119
|
-
});
|
|
120
|
-
setShowRegistrationForm({ mode: "manual" });
|
|
121
|
-
};
|
|
122
|
-
const handleGoogleInit = (event) => {
|
|
123
|
-
var _a;
|
|
124
|
-
if (!((_a = event.detail) === null || _a === void 0 ? void 0 : _a.credential))
|
|
125
|
-
return;
|
|
126
|
-
try {
|
|
127
|
-
const res = jwtDecode(event.detail.credential);
|
|
128
|
-
setRegistrationFormState({
|
|
129
|
-
...registrationFormState,
|
|
130
|
-
_googleOAuthIdToken: event.detail.credential,
|
|
131
|
-
initialData: {
|
|
132
|
-
email: res.email,
|
|
133
|
-
firstName: res.given_name,
|
|
134
|
-
lastName: res.family_name,
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
setShowRegistrationForm({ mode: "google" });
|
|
138
|
-
}
|
|
139
|
-
catch (e) {
|
|
140
|
-
console.error("Failed to decode Google Sign In credential JWT:", e);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
return {
|
|
144
|
-
registrationFormState,
|
|
145
|
-
showRegistrationForm,
|
|
146
|
-
validationErrors: registrationFormState.validationErrors,
|
|
147
|
-
handleGoogleInit,
|
|
148
|
-
handleEmailSubmit,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const PortalGoogleRegistrationForm = class {
|
|
153
|
-
constructor(hostRef) {
|
|
154
|
-
registerInstance(this, hostRef);
|
|
155
|
-
this.ignored = true;
|
|
156
|
-
/**
|
|
157
|
-
* Redirect participants to this page after they successfully register.
|
|
158
|
-
*
|
|
159
|
-
* @uiName Registration redirect
|
|
160
|
-
* @uiWidget pageSelect
|
|
161
|
-
*/
|
|
162
|
-
this.nextPage = "/";
|
|
163
|
-
/**
|
|
164
|
-
* Redirect participants to this page from their verification email
|
|
165
|
-
*
|
|
166
|
-
* @uiName Email verification redirect
|
|
167
|
-
* @uiWidget pageSelect
|
|
168
|
-
*/
|
|
169
|
-
this.redirectPath = "/verifyEmail";
|
|
170
|
-
/**
|
|
171
|
-
* @uiName Email field label
|
|
172
|
-
*/
|
|
173
|
-
this.emailLabel = "Email";
|
|
174
|
-
/**
|
|
175
|
-
* @uiName Password field label
|
|
176
|
-
*/
|
|
177
|
-
this.passwordLabel = "Password";
|
|
178
|
-
/**
|
|
179
|
-
* @uiName Submit button text
|
|
180
|
-
*/
|
|
181
|
-
this.submitLabel = "Register";
|
|
182
|
-
/**
|
|
183
|
-
* @uiName Login button text
|
|
184
|
-
*/
|
|
185
|
-
this.loginLabel = "Sign in";
|
|
186
|
-
/**
|
|
187
|
-
* @uiName Confirm password field label
|
|
188
|
-
*/
|
|
189
|
-
this.confirmPasswordLabel = "Confirm Password";
|
|
190
|
-
/**
|
|
191
|
-
* @uiName Show confirm password field
|
|
192
|
-
*/
|
|
193
|
-
this.confirmPassword = false;
|
|
194
|
-
/**
|
|
195
|
-
* @uiName Disable password validation
|
|
196
|
-
*/
|
|
197
|
-
this.disablePasswordValidation = false;
|
|
198
|
-
/**
|
|
199
|
-
* Hides the email and password fields. Note: If you hide default inputs, you must add additional input fields. They must have the input name attributes "email" and "password" for this form to succeed.
|
|
200
|
-
*
|
|
201
|
-
* @uiName Hide default fields
|
|
202
|
-
*/
|
|
203
|
-
this.hideInputs = false;
|
|
204
|
-
/**
|
|
205
|
-
* @uiName Header text
|
|
206
|
-
*/
|
|
207
|
-
this.pageLabel = "Register";
|
|
208
|
-
/**
|
|
209
|
-
* Redirect participants to this page after clicking the login button.
|
|
210
|
-
*
|
|
211
|
-
* @uiName Login redirect
|
|
212
|
-
* @uiWidget pageSelect
|
|
213
|
-
*/
|
|
214
|
-
this.loginPath = "/login";
|
|
215
|
-
/**
|
|
216
|
-
* Login Call-to-action
|
|
217
|
-
*
|
|
218
|
-
* @uiName Login CTA
|
|
219
|
-
*/
|
|
220
|
-
this.loginCTA = "Already have an account?";
|
|
221
|
-
/**
|
|
222
|
-
* The message to be displayed when a required field is not filled.
|
|
223
|
-
*
|
|
224
|
-
* @uiName Required field message
|
|
225
|
-
* @uiWidget textArea
|
|
226
|
-
*/
|
|
227
|
-
this.requiredFieldErrorMessage = "Cannot be empty";
|
|
228
|
-
/**
|
|
229
|
-
* The message to be displayed when a the form submission fails unexpectedly.
|
|
230
|
-
*
|
|
231
|
-
* @uiName Network error message
|
|
232
|
-
* @uiWidget textArea
|
|
233
|
-
*/
|
|
234
|
-
this.networkErrorMessage = "Network request failed.";
|
|
235
|
-
/**
|
|
236
|
-
* The message to be displayed when password inputs do not match.
|
|
237
|
-
*
|
|
238
|
-
* @uiName Password mismatch message
|
|
239
|
-
* @uiWidget textArea
|
|
240
|
-
*/
|
|
241
|
-
this.passwordMismatchErrorMessage = "Passwords do not match.";
|
|
242
|
-
/**
|
|
243
|
-
* The message to be displayed when the email used is invalid or blocked.
|
|
244
|
-
*
|
|
245
|
-
* @uiName Invalid email message
|
|
246
|
-
* @uiWidget textArea
|
|
247
|
-
*/
|
|
248
|
-
this.invalidEmailErrorMessage = "Must be a valid email address";
|
|
249
|
-
/**
|
|
250
|
-
* The message to be displayed when the registration form is disabled.
|
|
251
|
-
*
|
|
252
|
-
* @uiName Form disabled message
|
|
253
|
-
* @uiWidget textArea
|
|
254
|
-
*/
|
|
255
|
-
this.formDisabledErrorMessage = "The registration form is currently disabled.";
|
|
256
|
-
/**
|
|
257
|
-
* @uiName Password requirement met
|
|
258
|
-
*/
|
|
259
|
-
this.meetsRequirementsText = "Password has met all requirements";
|
|
260
|
-
/**
|
|
261
|
-
* @uiName Password requirement failed
|
|
262
|
-
*/
|
|
263
|
-
this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
|
|
264
|
-
/**
|
|
265
|
-
* @uiName Minimum length text
|
|
266
|
-
*/
|
|
267
|
-
this.minErrorText = "be a minimum of 8 characters";
|
|
268
|
-
/**
|
|
269
|
-
* @uiName Missing uppercase text
|
|
270
|
-
*/
|
|
271
|
-
this.uppercaseErrorText = "contain at least 1 uppercase character";
|
|
272
|
-
/**
|
|
273
|
-
* @uiName Missing lowercase text
|
|
274
|
-
*/
|
|
275
|
-
this.lowercaseErrorText = "contain at least 1 lowercase character";
|
|
276
|
-
/**
|
|
277
|
-
* @uiName Missing number or symbol text
|
|
278
|
-
*/
|
|
279
|
-
this.hasErrorText = "contain at least 1 number or symbol";
|
|
280
|
-
/**
|
|
281
|
-
* Can be "signup_with", "signin_with", "continue_with", or "signin"
|
|
282
|
-
*
|
|
283
|
-
* @uiName Google button text
|
|
284
|
-
*/
|
|
285
|
-
this.googleButtonText = "signup_with";
|
|
286
|
-
h(this);
|
|
287
|
-
}
|
|
288
|
-
disconnectedCallback() { }
|
|
289
|
-
render() {
|
|
290
|
-
const { states, callbacks, refs } = isDemo()
|
|
291
|
-
? useRegisterDemo(this)
|
|
292
|
-
: usePortalRegistrationForm(this);
|
|
293
|
-
const styles = {
|
|
294
|
-
LoginButton: {
|
|
295
|
-
"&::part(label)": {
|
|
296
|
-
padding: "0",
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
};
|
|
300
|
-
const sheet = createStyleSheet(styles);
|
|
301
|
-
const styleString = sheet.toString();
|
|
302
|
-
const { handleGoogleInit, handleEmailSubmit, showRegistrationForm, validationErrors, } = isDemo() ? useGoogleDemo(this) : usePortalGoogleRegistrationForm(this);
|
|
303
|
-
const content = {
|
|
304
|
-
formData: h$1("slot", { name: "formData" }),
|
|
305
|
-
googleButton: (h$1("sqm-google-sign-in", { text: this.googleButtonText, onInitComplete: handleGoogleInit })),
|
|
306
|
-
secondaryButton: (h$1("slot", { name: "secondaryButton" }, h$1("style", null, styleString), h$1("span", null, this.loginCTA, " ", h$1("sl-button", { size: "large", type: "text", disabled: states.loading, onClick: () => jn.push(states.loginPath), className: sheet.classes.LoginButton }, this.loginLabel), " "))),
|
|
307
|
-
terms: h$1("slot", { name: "terms" }),
|
|
308
|
-
emailLabel: this.emailLabel,
|
|
309
|
-
passwordLabel: this.passwordLabel,
|
|
310
|
-
submitLabel: this.submitLabel,
|
|
311
|
-
pageLabel: this.pageLabel,
|
|
312
|
-
confirmPasswordLabel: this.confirmPasswordLabel,
|
|
313
|
-
networkErrorMessage: this.networkErrorMessage,
|
|
314
|
-
passwordMismatchErrorMessage: this.passwordMismatchErrorMessage,
|
|
315
|
-
invalidEmailErrorMessage: this.invalidEmailErrorMessage,
|
|
316
|
-
formDisabledErrorMessage: this.formDisabledErrorMessage,
|
|
317
|
-
requiredFieldErrorMessage: this.requiredFieldErrorMessage,
|
|
318
|
-
meetsRequirementsText: this.meetsRequirementsText,
|
|
319
|
-
doesNotMeetRequirementsText: this.doesNotMeetRequirementsText,
|
|
320
|
-
minErrorText: this.minErrorText,
|
|
321
|
-
uppercaseErrorText: this.uppercaseErrorText,
|
|
322
|
-
lowercaseErrorText: this.lowercaseErrorText,
|
|
323
|
-
hasErrorText: this.hasErrorText,
|
|
324
|
-
};
|
|
325
|
-
if (showRegistrationForm.mode === "base") {
|
|
326
|
-
return (h$1(BaseRegistrationFormView, { states: {
|
|
327
|
-
validationErrors,
|
|
328
|
-
}, callbacks: { handleEmailSubmit }, content: content }));
|
|
329
|
-
}
|
|
330
|
-
return (h$1(PortalRegistrationFormView, { states: {
|
|
331
|
-
...states,
|
|
332
|
-
emailDisabled: true,
|
|
333
|
-
hidePasswords: showRegistrationForm.mode === "google",
|
|
334
|
-
}, callbacks: callbacks, content: content, refs: refs }));
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
function useRegisterDemo(props) {
|
|
338
|
-
return cjs({
|
|
339
|
-
states: {
|
|
340
|
-
error: "",
|
|
341
|
-
loading: false,
|
|
342
|
-
confirmPassword: props.confirmPassword,
|
|
343
|
-
hideInputs: props.hideInputs || false,
|
|
344
|
-
customPasswordField: false,
|
|
345
|
-
loginPath: "/login",
|
|
346
|
-
},
|
|
347
|
-
callbacks: {
|
|
348
|
-
handleGoogleInit: () => { },
|
|
349
|
-
setShowRegistrationForm: () => { },
|
|
350
|
-
submit: async (_event) => {
|
|
351
|
-
console.log("submit");
|
|
352
|
-
},
|
|
353
|
-
inputFunction: () => { },
|
|
354
|
-
},
|
|
355
|
-
content: {
|
|
356
|
-
pageLabel: "Register",
|
|
357
|
-
formData: null,
|
|
358
|
-
passwordField: null,
|
|
359
|
-
},
|
|
360
|
-
refs: {
|
|
361
|
-
formRef: {},
|
|
362
|
-
},
|
|
363
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
364
|
-
}
|
|
365
|
-
function useGoogleDemo(props) {
|
|
366
|
-
const [showRegistrationForm, setShowRegistrationForm] = useState({
|
|
367
|
-
mode: "base",
|
|
368
|
-
});
|
|
369
|
-
return cjs({
|
|
370
|
-
validationErrors: {},
|
|
371
|
-
handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
|
|
372
|
-
showRegistrationForm,
|
|
373
|
-
handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),
|
|
374
|
-
}, props.demoGoogleData || {}, { arrayMerge: (_, a) => a });
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
export { PortalGoogleRegistrationForm as sqm_portal_google_registration_form };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { h } from './index-b3a06de8.js';
|
|
2
|
-
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
3
|
-
import { A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer } from './mixins-f750863a.js';
|
|
4
|
-
import { T as TextSpanView } from './sqm-text-span-view-4c17b8c9.js';
|
|
5
|
-
|
|
6
|
-
const style = {
|
|
7
|
-
Wrapper: AuthWrapper,
|
|
8
|
-
Column: AuthColumn,
|
|
9
|
-
ForgotButtonContainer: {
|
|
10
|
-
display: "inline",
|
|
11
|
-
cursor: "pointer",
|
|
12
|
-
"font-size": "13px",
|
|
13
|
-
"font-weight": "600",
|
|
14
|
-
color: "var(--sqm-text-subdued)",
|
|
15
|
-
margin: "0",
|
|
16
|
-
},
|
|
17
|
-
ButtonsContainer: {
|
|
18
|
-
...AuthButtonsContainer,
|
|
19
|
-
gap: "var(--sl-spacing-medium)",
|
|
20
|
-
"& > *": {
|
|
21
|
-
margin: "0 !important",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
const vanillaStyle = `
|
|
26
|
-
:host {
|
|
27
|
-
display: block;
|
|
28
|
-
}
|
|
29
|
-
:host([hidden]): {
|
|
30
|
-
display: none;
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
const sheet = createStyleSheet(style);
|
|
34
|
-
const styleString = sheet.toString();
|
|
35
|
-
function PortalLoginView(props) {
|
|
36
|
-
const { states, callbacks, content } = props;
|
|
37
|
-
return (h("div", { class: sheet.classes.Wrapper, part: "sqm-base" },
|
|
38
|
-
h("style", { type: "text/css" },
|
|
39
|
-
vanillaStyle,
|
|
40
|
-
styleString),
|
|
41
|
-
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
42
|
-
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
|
|
43
|
-
props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
44
|
-
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
45
|
-
h("sl-input", { exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
46
|
-
h("div", null,
|
|
47
|
-
h("sl-input", { exportparts: "label: input-label, base: input-base", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
|
|
48
|
-
h("div", { class: sheet.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
|
|
49
|
-
h("div", { class: sheet.classes.ButtonsContainer },
|
|
50
|
-
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
|
|
51
|
-
content.googleButton && h("sl-menu-divider", null),
|
|
52
|
-
content.googleButton,
|
|
53
|
-
content.secondaryButton))));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { PortalLoginView as P };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { k as useState } from './dom-context-hooks.module-63370afd.js';
|
|
2
|
-
import { c as je, h as hn, j as jn } from './index.module-c9811a48.js';
|
|
3
|
-
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
4
|
-
import { s as sanitizeUrlPath } from './utils-334c1e34.js';
|
|
5
|
-
|
|
6
|
-
function usePortalLogin(props) {
|
|
7
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
8
|
-
const [request, { loading, errors, data }] = je();
|
|
9
|
-
const [loginWithGoogle, { loading: gLoading, errors: gErrors }] = hn();
|
|
10
|
-
const [error, setError] = useState("");
|
|
11
|
-
const urlParams = new URLSearchParams(jn.location.search);
|
|
12
|
-
const nextPageOverride = urlParams.get("nextPage");
|
|
13
|
-
const googleSubmit = async (e) => {
|
|
14
|
-
var _a, _b, _c, _d;
|
|
15
|
-
if (!((_a = e.detail) === null || _a === void 0 ? void 0 : _a.credential))
|
|
16
|
-
return;
|
|
17
|
-
const result = await loginWithGoogle({ idToken: e.detail.credential });
|
|
18
|
-
if (result instanceof Error) {
|
|
19
|
-
if ((result === null || result === void 0 ? void 0 : result.message) || ((_b = result === null || result === void 0 ? void 0 : result["response"]) === null || _b === void 0 ? void 0 : _b["error"]))
|
|
20
|
-
if ((_c = result === null || result === void 0 ? void 0 : result["response"]) === null || _c === void 0 ? void 0 : _c["errors"].some((error) => { var _a; return ((_a = error === null || error === void 0 ? void 0 : error["extensions"]) === null || _a === void 0 ? void 0 : _a["message"]) === "Invalid Credentials."; })) {
|
|
21
|
-
setError(props.googleUserNotRegisteredError);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
setError(props.networkErrorMessage);
|
|
25
|
-
}
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if ((_d = result.authenticateManagedIdentityWithGoogle) === null || _d === void 0 ? void 0 : _d.token) {
|
|
29
|
-
urlParams.delete("nextPage");
|
|
30
|
-
const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
31
|
-
jn.push(url.href);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const submit = async (event) => {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
setError("");
|
|
37
|
-
let formData = event.detail.formData;
|
|
38
|
-
formData === null || formData === void 0 ? void 0 : formData.forEach((value, key) => {
|
|
39
|
-
jsonpointer.set(formData, key, value);
|
|
40
|
-
});
|
|
41
|
-
const variables = { email: formData.email, password: formData.password };
|
|
42
|
-
const result = await request(variables);
|
|
43
|
-
if (result instanceof Error) {
|
|
44
|
-
if ((result === null || result === void 0 ? void 0 : result.message) || ((_a = result === null || result === void 0 ? void 0 : result["response"]) === null || _a === void 0 ? void 0 : _a["error"]))
|
|
45
|
-
setError(props.networkErrorMessage);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if ((_b = result.authenticateManagedIdentityWithEmailAndPassword) === null || _b === void 0 ? void 0 : _b.token) {
|
|
49
|
-
urlParams.delete("nextPage");
|
|
50
|
-
const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
|
|
51
|
-
jn.push(url.href);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const errorMessage = ((_d = (_c = (_b = (_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.extensions) === null || _d === void 0 ? void 0 : _d.message) || ((_g = (_f = (_e = errors === null || errors === void 0 ? void 0 : errors.response) === null || _e === void 0 ? void 0 : _e.errors) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.message) ||
|
|
55
|
-
error;
|
|
56
|
-
const googleErrorMessage = ((_l = (_k = (_j = (_h = gErrors === null || gErrors === void 0 ? void 0 : gErrors.response) === null || _h === void 0 ? void 0 : _h.errors) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.extensions) === null || _l === void 0 ? void 0 : _l.message) || ((_p = (_o = (_m = gErrors === null || gErrors === void 0 ? void 0 : gErrors.response) === null || _m === void 0 ? void 0 : _m.errors) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.message) ||
|
|
57
|
-
error;
|
|
58
|
-
return {
|
|
59
|
-
states: {
|
|
60
|
-
loading: loading || gLoading,
|
|
61
|
-
error: errorMessage || googleErrorMessage,
|
|
62
|
-
registerPath: props.registerPath,
|
|
63
|
-
forgotPasswordPath: props.forgotPasswordPath,
|
|
64
|
-
},
|
|
65
|
-
callbacks: {
|
|
66
|
-
googleSubmit,
|
|
67
|
-
submit,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { usePortalLogin as u };
|