@saasquatch/mint-components 1.6.2-2 → 1.6.2-5
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/{esm/useValidationState-adb2b066.js → cjs/AsYouType-6788393a.js} +2 -10
- package/dist/cjs/{ShadowViewAddon-aa14c0c4.js → ShadowViewAddon-33ae7c4f.js} +13 -6
- package/dist/cjs/{global-5e3deef1.js → global-b3587dc9.js} +1 -1
- package/dist/cjs/{index.module-ffe1aa35.js → index.module-ff45cbf1.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mint-components.cjs.js +3 -3
- package/dist/cjs/{re-render-8fee17a9.js → re-render-e5491a50.js} +1 -1
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat_35.cjs.entry.js +19 -16
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-navigation-sidebar-item-view-9820193d.js → sqm-navigation-sidebar-item-view-e8f500f9.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/sqm-password-field.cjs.entry.js +13 -7
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-57fbd19b.js → sqm-portal-email-verification-view-dd27bba3.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-footer-view-eb757378.js → sqm-portal-footer-view-93f8ec0e.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-7cb535a8.js → sqm-portal-profile-view-f9104d25.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-registration-form.cjs.entry.js +77 -23
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -2
- package/dist/cjs/sqm-qa-tabs.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 +11 -8
- package/dist/cjs/sqm-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{useChildElements-a7a7b921.js → useChildElements-658fefa1.js} +1 -1
- package/dist/cjs/{useReferralTable-7e18f12e.js → useReferralTable-ae05b785.js} +3 -3
- package/dist/cjs/useRegistrationFormState-793a7958.js +23 -0
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +9 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -1
- package/dist/collection/components/sqm-name-fields/useNameFields.js +3 -0
- package/dist/collection/components/sqm-password-field/PasswordField.stories.js +3 -0
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +7 -4
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +1 -0
- package/dist/collection/components/sqm-password-field/usePasswordField.js +5 -2
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +16 -9
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +28 -1
- package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +53 -11
- package/dist/collection/components/sqm-portal-registration-form/useRegistrationFormState.js +8 -0
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +0 -1
- package/dist/{cjs/useValidationState-63f00763.js → esm/AsYouType-46f67d0d.js} +1 -15
- package/dist/esm/{ShadowViewAddon-3626a92b.js → ShadowViewAddon-7d94f9d6.js} +13 -6
- package/dist/esm/{global-0842e0e4.js → global-1e714a4d.js} +1 -1
- package/dist/esm/{index.module-96470dcf.js → index.module-9cd4623b.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-f444e556.js → re-render-d1b2a0de.js} +1 -1
- package/dist/esm/sqm-asset-card.entry.js +1 -1
- package/dist/esm/sqm-big-stat_35.entry.js +13 -10
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/{sqm-navigation-sidebar-item-view-fb10e0c2.js → sqm-navigation-sidebar-item-view-7e6199c2.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-password-field.entry.js +13 -7
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-f6daf315.js → sqm-portal-email-verification-view-ba08318b.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
- package/dist/esm/{sqm-portal-footer-view-42db3277.js → sqm-portal-footer-view-9bfd61b4.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-dd2774b2.js → sqm-portal-profile-view-0f8dd14f.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 +75 -21
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +1 -2
- package/dist/esm/sqm-qa-tabs.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 +11 -8
- package/dist/esm/sqm-tabs.entry.js +2 -2
- package/dist/esm/{useChildElements-756c6a81.js → useChildElements-e1a1d3d1.js} +1 -1
- package/dist/esm/{useReferralTable-0a8ee3b7.js → useReferralTable-68c0823f.js} +3 -3
- package/dist/esm/useRegistrationFormState-699c3e59.js +18 -0
- package/dist/esm-es5/AsYouType-46f67d0d.js +1 -0
- package/dist/esm-es5/{ShadowViewAddon-3626a92b.js → ShadowViewAddon-7d94f9d6.js} +1 -1
- package/dist/esm-es5/{global-0842e0e4.js → global-1e714a4d.js} +1 -1
- package/dist/esm-es5/{index.module-96470dcf.js → index.module-9cd4623b.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-f444e556.js → re-render-d1b2a0de.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-fb10e0c2.js → sqm-navigation-sidebar-item-view-7e6199c2.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.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-f6daf315.js → sqm-portal-email-verification-view-ba08318b.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-42db3277.js → sqm-portal-footer-view-9bfd61b4.js} +1 -1
- package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-dd2774b2.js → sqm-portal-profile-view-0f8dd14f.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-qa-tabs.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-tabs.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-756c6a81.js → useChildElements-e1a1d3d1.js} +1 -1
- package/dist/esm-es5/{useReferralTable-0a8ee3b7.js → useReferralTable-68c0823f.js} +1 -1
- package/dist/esm-es5/useRegistrationFormState-699c3e59.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-33a8d572.entry.js → p-02e2eab4.entry.js} +1 -1
- package/dist/mint-components/{p-b5bfb818.system.js → p-07b33645.system.js} +1 -1
- package/dist/mint-components/{p-5d80f75a.entry.js → p-08401205.entry.js} +2 -2
- package/dist/mint-components/p-08fc37fd.system.entry.js +1 -0
- package/dist/mint-components/{p-3364ee29.system.entry.js → p-10fb0aae.system.entry.js} +1 -1
- package/dist/mint-components/{p-42994d5d.entry.js → p-1127f297.entry.js} +1 -1
- package/dist/mint-components/p-121cdc60.js +1 -0
- package/dist/mint-components/{p-7dff3e29.entry.js → p-17aae439.entry.js} +1 -1
- package/dist/mint-components/{p-5e6890eb.system.entry.js → p-190e24e4.system.entry.js} +1 -1
- package/dist/mint-components/{p-42133e0b.entry.js → p-1ea13deb.entry.js} +12 -12
- package/dist/mint-components/p-1fed6a09.entry.js +1 -0
- package/dist/mint-components/p-273b5c53.system.entry.js +1 -0
- package/dist/mint-components/{p-95f70cb1.js → p-2920efe6.js} +1 -1
- package/dist/mint-components/p-2ce5d3da.js +1 -0
- package/dist/mint-components/p-2d2f7abb.system.entry.js +1 -0
- package/dist/mint-components/{p-99830904.system.entry.js → p-2de1fadb.system.entry.js} +1 -1
- package/dist/mint-components/{p-80981da1.entry.js → p-32f481cb.entry.js} +1 -1
- package/dist/mint-components/{p-b1441d8e.system.entry.js → p-33910ee5.system.entry.js} +1 -1
- package/dist/mint-components/{p-61eeea9e.entry.js → p-36d50757.entry.js} +1 -1
- package/dist/mint-components/{p-e8acccb5.system.js → p-3fddd002.system.js} +1 -1
- package/dist/mint-components/{p-5a7f7362.system.js → p-40c4165b.system.js} +1 -1
- package/dist/mint-components/{p-2b2ed97b.entry.js → p-4f10205f.entry.js} +1 -1
- package/dist/mint-components/{p-c2aecbd1.js → p-4f965abe.js} +2 -2
- package/dist/mint-components/{p-ffe8c6ce.system.entry.js → p-4fdd8b02.system.entry.js} +1 -1
- package/dist/mint-components/{p-2ec62a9b.system.entry.js → p-5337c953.system.entry.js} +1 -1
- package/dist/mint-components/p-56bf2c06.system.js +1 -0
- package/dist/mint-components/p-5c347c93.system.entry.js +1 -0
- package/dist/mint-components/{p-57b7a680.entry.js → p-5c7c925e.entry.js} +1 -1
- package/dist/mint-components/{p-d5e12393.system.entry.js → p-5d7de7cd.system.entry.js} +1 -1
- package/dist/mint-components/p-5ef24d6c.system.entry.js +1 -0
- package/dist/mint-components/p-69871506.js +1 -0
- package/dist/mint-components/{p-958d913e.js → p-6c05b2d3.js} +1 -1
- package/dist/mint-components/{p-f9056e14.system.js → p-7536759d.system.js} +1 -1
- package/dist/mint-components/{p-f2bd9120.system.entry.js → p-75e425fa.system.entry.js} +1 -1
- package/dist/mint-components/{p-19dfb893.system.entry.js → p-771b778b.system.entry.js} +1 -1
- package/dist/mint-components/{p-092d030a.system.js → p-78c568dc.system.js} +1 -1
- package/dist/mint-components/{p-8390e33e.system.entry.js → p-7eb9955b.system.entry.js} +1 -1
- package/dist/mint-components/{p-09551f97.entry.js → p-91cde020.entry.js} +1 -1
- package/dist/mint-components/p-92e8b7b5.entry.js +1 -0
- package/dist/mint-components/p-9d362d44.system.js +1 -0
- package/dist/mint-components/{p-b02064c4.system.js → p-9dd68a9c.system.js} +1 -1
- package/dist/mint-components/{p-4a0ef2d3.entry.js → p-a16556fd.entry.js} +1 -1
- package/dist/mint-components/{p-bf298e68.js → p-a63204e2.js} +1 -1
- package/dist/mint-components/{p-ea1b0e1c.js → p-a6bfbb4e.js} +2 -2
- package/dist/mint-components/{p-e6eedd9e.js → p-a750f034.js} +1 -1
- package/dist/mint-components/p-a963e9d5.entry.js +9 -0
- package/dist/mint-components/p-ab7ae098.system.js +1 -0
- package/dist/mint-components/{p-19266514.js → p-abc426c4.js} +1 -1
- package/dist/mint-components/p-abffc249.entry.js +13 -0
- package/dist/mint-components/p-ad67b111.system.entry.js +1 -0
- package/dist/mint-components/{p-380c3d58.system.entry.js → p-b5faa04d.system.entry.js} +1 -1
- package/dist/mint-components/{p-51dd860c.system.entry.js → p-b7fc1ee1.system.entry.js} +1 -1
- package/dist/mint-components/p-b96505f5.entry.js +1 -0
- package/dist/mint-components/{p-49e61dc4.entry.js → p-ba09e62f.entry.js} +1 -1
- package/dist/mint-components/{p-0b838d31.entry.js → p-c911a062.entry.js} +1 -1
- package/dist/mint-components/{p-3c7b3831.entry.js → p-cbb61c41.entry.js} +1 -1
- package/dist/mint-components/{p-5da081c3.entry.js → p-cdf2914a.entry.js} +1 -1
- package/dist/mint-components/{p-8c1348dc.system.js → p-ce5a3693.system.js} +1 -1
- package/dist/mint-components/{p-577299fe.system.entry.js → p-cf279181.system.entry.js} +1 -1
- package/dist/mint-components/{p-1b962e50.system.js → p-d1712ae1.system.js} +1 -1
- package/dist/mint-components/p-de4f0622.entry.js +1 -0
- package/dist/mint-components/{p-2c4da197.entry.js → p-e28f4762.entry.js} +1 -1
- package/dist/mint-components/{p-8dfe5873.system.entry.js → p-e9fa325e.system.entry.js} +1 -1
- package/dist/mint-components/p-ec18b601.system.js +1 -0
- package/dist/mint-components/{p-d1e6d105.system.entry.js → p-ecf7bfc7.system.entry.js} +1 -1
- package/dist/mint-components/{p-bd32d6f4.js → p-ee0c06b3.js} +1 -1
- package/dist/mint-components/{p-23485cfe.system.js → p-efbc0ee0.system.js} +1 -1
- package/dist/mint-components/p-fc8800c0.js +1 -0
- package/dist/mint-components/{p-1bd5cd35.system.entry.js → p-fdc7e95e.system.entry.js} +1 -1
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +2 -0
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +2 -0
- package/dist/types/components/sqm-password-field/sqm-password-field-view.d.ts +2 -0
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +2 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +6 -0
- package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +2 -0
- package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +23 -0
- package/dist/types/components.d.ts +10 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/useValidationState-adb2b066.js +0 -1
- package/dist/mint-components/p-0777ac5b.entry.js +0 -9
- package/dist/mint-components/p-0b7ec490.entry.js +0 -1
- package/dist/mint-components/p-14e28fcc.entry.js +0 -1
- package/dist/mint-components/p-1ff7ee8a.entry.js +0 -1
- package/dist/mint-components/p-22b45a04.system.entry.js +0 -1
- package/dist/mint-components/p-27aac88b.system.entry.js +0 -1
- package/dist/mint-components/p-27ed7b95.js +0 -1
- package/dist/mint-components/p-2809a9c7.system.entry.js +0 -1
- package/dist/mint-components/p-42d3eb3e.system.js +0 -1
- package/dist/mint-components/p-5660e578.system.js +0 -1
- package/dist/mint-components/p-90bd03bb.entry.js +0 -1
- package/dist/mint-components/p-9bb39058.system.entry.js +0 -1
- package/dist/mint-components/p-9ef39196.system.entry.js +0 -1
- package/dist/mint-components/p-a4fa8ba2.system.js +0 -1
- package/dist/mint-components/p-a9d7eb10.js +0 -1
- package/dist/mint-components/p-b17b4a61.system.entry.js +0 -1
- package/dist/mint-components/p-c8e8aab7.js +0 -1
- package/dist/mint-components/p-daf8de5c.entry.js +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { m as h, e as useEffect, i as useState, o as d, j as useRef, b as browser, u as useReducer } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
4
4
|
import { u as useCallback } from './use-callback-69ec5c5c.js';
|
|
5
|
-
import { L, P, d as dist, a as ae, w as wn,
|
|
5
|
+
import { L, P, d as dist, a as ae, w as wn, $ as $e, M, O, p as pn, I as In, T as Te, V as Ve, g as He, Z as Ze, F as Fn, J } from './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
8
8
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
9
9
|
import './mixins-f60a614c.js';
|
|
10
10
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
11
|
-
import { a as useRequestRerender } from './re-render-
|
|
12
|
-
import { u as useChildElements } from './useChildElements-
|
|
11
|
+
import { a as useRequestRerender } from './re-render-d1b2a0de.js';
|
|
12
|
+
import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
|
|
13
13
|
import './luxon-38ca2169.js';
|
|
14
14
|
import { g as getProps, a as getMissingProps, s as sanitizeUrlPath } from './utils-334c1e34.js';
|
|
15
15
|
import './sqm-text-span-view-0ba1484d.js';
|
|
16
16
|
import './sqm-portal-container-view-ca454627.js';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { A as AsYouType } from './AsYouType-46f67d0d.js';
|
|
18
|
+
import { F as FORM_VALIDATION_CONTEXT, R as REGISTRATION_FORM_STATE_CONTEXT, a as useValidationState } from './useRegistrationFormState-699c3e59.js';
|
|
19
|
+
import { c as useDemoBigStat, K as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, I as InputFieldView, M as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, O as demoRewardExchange, i as RewardExchangeView, Q as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-7d94f9d6.js';
|
|
19
20
|
import './sqm-portal-section-view-6c249c74.js';
|
|
20
21
|
|
|
21
22
|
const BigStat = class {
|
|
@@ -423,7 +424,7 @@ function useEditProfile(props) {
|
|
|
423
424
|
const [userData, setUserData] = useState(undefined);
|
|
424
425
|
const [formState, setFormState] = useState(defaultFormState);
|
|
425
426
|
const userDataResponse = wn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
|
|
426
|
-
const [upsertUser, upsertUserResponse] =
|
|
427
|
+
const [upsertUser, upsertUserResponse] = $e(UPSERT_USER);
|
|
427
428
|
useEffect(() => {
|
|
428
429
|
if ((upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading) || !showEdit)
|
|
429
430
|
return;
|
|
@@ -1101,10 +1102,12 @@ function useLeaderboardDemo(props) {
|
|
|
1101
1102
|
}
|
|
1102
1103
|
|
|
1103
1104
|
function useNameFields(props) {
|
|
1105
|
+
const registrationFormState = d(REGISTRATION_FORM_STATE_CONTEXT);
|
|
1104
1106
|
const validationState = d(FORM_VALIDATION_CONTEXT);
|
|
1105
1107
|
return {
|
|
1106
1108
|
states: {
|
|
1107
1109
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
1110
|
+
registrationFormState,
|
|
1108
1111
|
content: {
|
|
1109
1112
|
lastNameLabel: props.lastNameLabel,
|
|
1110
1113
|
firstNameLabel: props.firstNameLabel,
|
|
@@ -2739,7 +2742,7 @@ function useRewardExchangeList(props) {
|
|
|
2739
2742
|
const [open, setOpen] = useState(false);
|
|
2740
2743
|
const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
|
|
2741
2744
|
const user = ae();
|
|
2742
|
-
const [exchange, { data: exchangeResponse, loading: exchangeLoading, errors },] =
|
|
2745
|
+
const [exchange, { data: exchangeResponse, loading: exchangeLoading, errors },] = $e(EXCHANGE);
|
|
2743
2746
|
const { data, loading, refetch, errors: queryError, } = wn(GET_EXCHANGE_LIST, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
2744
2747
|
useEffect(() => {
|
|
2745
2748
|
var _a, _b;
|
|
@@ -3323,7 +3326,7 @@ function useShareCode(props) {
|
|
|
3323
3326
|
const user = ae();
|
|
3324
3327
|
const engagementMedium = J();
|
|
3325
3328
|
const { data } = wn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
3326
|
-
const [sendLoadEvent] =
|
|
3329
|
+
const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
|
|
3327
3330
|
const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode) !== null && _b !== void 0 ? _b :
|
|
3328
3331
|
// Shown during loading
|
|
3329
3332
|
"...";
|
|
@@ -3493,7 +3496,7 @@ const SEND_EVENT = dist.gql `
|
|
|
3493
3496
|
function useTaskCard(props) {
|
|
3494
3497
|
const user = ae();
|
|
3495
3498
|
const locale = O();
|
|
3496
|
-
const [sendUserEvent, { data, loading: loadingEvent }] =
|
|
3499
|
+
const [sendUserEvent, { data, loading: loadingEvent }] = $e(SEND_EVENT);
|
|
3497
3500
|
const { refresh } = Ze();
|
|
3498
3501
|
useEffect(() => {
|
|
3499
3502
|
if (data) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { n as m, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { r as re, U, D as De, b as Ee } from './index.module-
|
|
4
|
+
import { r as re, U, D as De, b as Ee } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
|
|
7
7
|
async function useGraphQLClientProvider({ domain }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
4
4
|
import './use-callback-69ec5c5c.js';
|
|
5
|
-
import { d as dist, M, a as ae, w as wn, L } from './index.module-
|
|
5
|
+
import { d as dist, M, a as ae, w as wn, L } from './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-10657658.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { F as Fn, L } from './index.module-
|
|
4
|
+
import { F as Fn, L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import './mixins-f60a614c.js';
|
|
8
8
|
import './JSS-f00f9536.js';
|
|
9
9
|
import { g as getProps } from './utils-334c1e34.js';
|
|
10
|
-
import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-
|
|
10
|
+
import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-7e6199c2.js';
|
|
11
11
|
|
|
12
12
|
function useNavigationSidebarItem(props) {
|
|
13
13
|
const currentPage = Fn();
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { h, r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { o as d, i as useState, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { L } from './index.module-
|
|
4
|
+
import { L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import { E as ErrorStyles } from './mixins-f60a614c.js';
|
|
8
8
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
9
|
+
import { F as FORM_VALIDATION_CONTEXT, R as REGISTRATION_FORM_STATE_CONTEXT } from './useRegistrationFormState-699c3e59.js';
|
|
9
10
|
|
|
10
11
|
var constants = {
|
|
11
12
|
error: {
|
|
@@ -483,27 +484,30 @@ const vanillaStyle = `
|
|
|
483
484
|
const sheet$1 = createStyleSheet(style$1);
|
|
484
485
|
const styleString$1 = sheet$1.toString();
|
|
485
486
|
function PortalResetPasswordView(props) {
|
|
486
|
-
var _a, _b;
|
|
487
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
487
488
|
const { states, callbacks } = props;
|
|
488
489
|
return (h("div", { class: sheet$1.classes.InputContainer },
|
|
489
490
|
h("style", { type: "text/css" },
|
|
490
491
|
vanillaStyle,
|
|
491
492
|
styleString$1),
|
|
492
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, validationError: ({ value }) => {
|
|
493
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
|
|
493
494
|
if (!value) {
|
|
494
495
|
return "Cannot be empty";
|
|
495
496
|
}
|
|
496
|
-
} }, (((
|
|
497
|
+
} }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.password) ? {
|
|
498
|
+
value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.password,
|
|
499
|
+
}
|
|
500
|
+
: {}), (((_g = states.validationErrors) === null || _g === void 0 ? void 0 : _g.password) ? {
|
|
497
501
|
class: sheet$1.classes.ErrorStyle,
|
|
498
|
-
helpText: ((
|
|
502
|
+
helpText: ((_h = states.validationErrors) === null || _h === void 0 ? void 0 : _h.password) || "Cannot be empty",
|
|
499
503
|
}
|
|
500
504
|
: []), { onInput: (input) => states.enableValidation && callbacks.onInput(input) })),
|
|
501
505
|
states.dynamicValidation));
|
|
502
506
|
}
|
|
503
507
|
|
|
504
|
-
const CONTEXT_NAME = "sq:validation-state";
|
|
505
508
|
function usePasswordField(props) {
|
|
506
|
-
const validationState = d(
|
|
509
|
+
const validationState = d(FORM_VALIDATION_CONTEXT);
|
|
510
|
+
const registrationFormState = d(REGISTRATION_FORM_STATE_CONTEXT);
|
|
507
511
|
const [dynamicValidation, setDynamicValidation] = useState("");
|
|
508
512
|
function onInput(input) {
|
|
509
513
|
const validation = validateNewPassword(input.target.value);
|
|
@@ -513,6 +517,7 @@ function usePasswordField(props) {
|
|
|
513
517
|
states: {
|
|
514
518
|
enableValidation: props.enableValidation,
|
|
515
519
|
dynamicValidation,
|
|
520
|
+
registrationFormState,
|
|
516
521
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
517
522
|
content: {
|
|
518
523
|
fieldLabel: props.fieldLabel,
|
|
@@ -567,6 +572,7 @@ function usePasswordFieldDemo(props) {
|
|
|
567
572
|
enableValidation: true,
|
|
568
573
|
dynamicValidation,
|
|
569
574
|
validationErrors: ((_f = (_e = props === null || props === void 0 ? void 0 : props.demoData) === null || _e === void 0 ? void 0 : _e.states) === null || _f === void 0 ? void 0 : _f.validationErrors) || {},
|
|
575
|
+
registrationFormState: {},
|
|
570
576
|
content: {
|
|
571
577
|
fieldLabel: "Password",
|
|
572
578
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, c as Host, r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { m as h$1 } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { J } from './index.module-
|
|
4
|
+
import { J } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { g as getProps } from './utils-334c1e34.js';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-17b4da69.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
3
3
|
import { A as AuthWrapper, a as AuthColumn } from './mixins-f60a614c.js';
|
|
4
4
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
5
5
|
import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-1e714a4d.js';
|
|
4
4
|
import './use-callback-69ec5c5c.js';
|
|
5
|
-
import { v as vn, a as ae, L } from './index.module-
|
|
5
|
+
import { v as vn, a as ae, L } from './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-f60a614c.js';
|
|
9
9
|
import './JSS-f00f9536.js';
|
|
10
10
|
import './sqm-text-span-view-0ba1484d.js';
|
|
11
|
-
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-
|
|
11
|
+
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-ba08318b.js';
|
|
12
12
|
|
|
13
13
|
function usePortalEmailVerification(props) {
|
|
14
14
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-17b4da69.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
3
3
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
4
4
|
|
|
5
5
|
function PoweredByImg({ color = "#A6A6A6", width = 190, height = 29, }) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-1e714a4d.js';
|
|
4
4
|
import './use-callback-69ec5c5c.js';
|
|
5
|
-
import './index.module-
|
|
5
|
+
import './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import './JSS-f00f9536.js';
|
|
8
8
|
import { g as getProps } from './utils-334c1e34.js';
|
|
9
|
-
import { P as PortalFooterView } from './sqm-portal-footer-view-
|
|
9
|
+
import { P as PortalFooterView } from './sqm-portal-footer-view-9bfd61b4.js';
|
|
10
10
|
|
|
11
11
|
const PortalFooter = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { f as fn, L, I as In } from './index.module-
|
|
4
|
+
import { f as fn, L, I as In } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { t as te, I as In, L } from './index.module-
|
|
4
|
+
import { t as te, I as In, L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
|
|
7
7
|
function usePortalLogout({ nextPage }) {
|
package/dist/esm/{sqm-portal-profile-view-dd2774b2.js → sqm-portal-profile-view-0f8dd14f.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-17b4da69.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
3
3
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
4
4
|
import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
|
|
5
5
|
import { P as PortalContainerView } from './sqm-portal-container-view-ca454627.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-1e714a4d.js';
|
|
4
4
|
import './use-callback-69ec5c5c.js';
|
|
5
|
-
import { d as dist, a as ae, w as wn,
|
|
5
|
+
import { d as dist, a as ae, w as wn, $ as $e, L } from './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './JSS-f00f9536.js';
|
|
9
9
|
import { g as getProps } from './utils-334c1e34.js';
|
|
10
10
|
import './sqm-text-span-view-0ba1484d.js';
|
|
11
11
|
import './sqm-portal-container-view-ca454627.js';
|
|
12
|
-
import { P as PortalProfileView } from './sqm-portal-profile-view-
|
|
12
|
+
import { P as PortalProfileView } from './sqm-portal-profile-view-0f8dd14f.js';
|
|
13
13
|
|
|
14
14
|
const GET_USER = dist.gql `
|
|
15
15
|
query {
|
|
@@ -60,7 +60,7 @@ function usePortalProfile(props) {
|
|
|
60
60
|
const [userData, setUserData] = useState(undefined);
|
|
61
61
|
const [formState, setFormState] = useState(defaultFormState);
|
|
62
62
|
const userDataResponse = wn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
|
|
63
|
-
const [upsertUser, upsertUserResponse] =
|
|
63
|
+
const [upsertUser, upsertUserResponse] = $e(UPSERT_USER);
|
|
64
64
|
useEffect(() => {
|
|
65
65
|
if (upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading)
|
|
66
66
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { a as ae, F as Fn, I as In, L } from './index.module-
|
|
4
|
+
import { a as ae, F as Fn, I as In, L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
|
|
7
7
|
function usePortalProtectedRoute({ requireEmailVerification, redirectTo, redirectToUnverified, }) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { h, r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { j as useRef, e as useEffect, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import { u as useCallback } from './use-callback-69ec5c5c.js';
|
|
4
|
-
import { W as We, I as In, L } from './index.module-
|
|
4
|
+
import { d as dist, W as We, w as wn, I as In, L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import { A as AuthWrapper, a as AuthColumn, H as HostBlock, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f60a614c.js';
|
|
9
9
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
10
10
|
import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
|
|
11
|
-
import {
|
|
11
|
+
import { A as AsYouType } from './AsYouType-46f67d0d.js';
|
|
12
|
+
import { u as useRegistrationFormState, a as useValidationState } from './useRegistrationFormState-699c3e59.js';
|
|
12
13
|
|
|
13
14
|
const style = {
|
|
14
15
|
Wrapper: { ...AuthWrapper, "max-width": "600px" },
|
|
@@ -39,7 +40,7 @@ sqm-portal-register {
|
|
|
39
40
|
const sheet = createStyleSheet(style);
|
|
40
41
|
const styleString = sheet.toString();
|
|
41
42
|
function PortalRegistrationFormView(props) {
|
|
42
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
43
44
|
const { states, refs, callbacks, content } = props;
|
|
44
45
|
if (states.error) {
|
|
45
46
|
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
@@ -50,10 +51,11 @@ function PortalRegistrationFormView(props) {
|
|
|
50
51
|
styleString),
|
|
51
52
|
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
52
53
|
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
53
|
-
states.
|
|
54
|
-
h("div", { part: "erroralert-text" },
|
|
54
|
+
((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.disabled) ? (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
55
|
+
h("div", { part: "erroralert-text" }, states.registrationFormState.disabledMessage))) : (states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
56
|
+
h("div", { part: "erroralert-text" }, props.states.error)))),
|
|
55
57
|
content.formData,
|
|
56
|
-
!states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
|
|
58
|
+
!states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), required: true, validationError: ({ value }) => {
|
|
57
59
|
if (!value) {
|
|
58
60
|
return "Cannot be empty";
|
|
59
61
|
}
|
|
@@ -61,40 +63,78 @@ function PortalRegistrationFormView(props) {
|
|
|
61
63
|
if (!value.includes("@")) {
|
|
62
64
|
return "Must be a valid email address";
|
|
63
65
|
}
|
|
64
|
-
} }, (((
|
|
66
|
+
} }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.email) ? {
|
|
67
|
+
value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.email,
|
|
68
|
+
}
|
|
69
|
+
: {}), (((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.email) ? {
|
|
65
70
|
class: sheet.classes.ErrorStyle,
|
|
66
|
-
helpText: ((
|
|
71
|
+
helpText: ((_k = (_j = states.validationState) === null || _j === void 0 ? void 0 : _j.validationErrors) === null || _k === void 0 ? void 0 : _k.email) ||
|
|
67
72
|
"Cannot be empty",
|
|
68
73
|
}
|
|
69
74
|
: [])))),
|
|
70
75
|
!states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
|
|
71
76
|
content.passwordField,
|
|
72
|
-
!states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((
|
|
77
|
+
!states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_m = (_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.initialData) === null || _m === void 0 ? void 0 : _m.confirmPassword) ? {
|
|
78
|
+
value: (_p = (_o = states.registrationFormState) === null || _o === void 0 ? void 0 : _o.initialData) === null || _p === void 0 ? void 0 : _p.confirmPassword,
|
|
79
|
+
}
|
|
80
|
+
: {}), (((_r = (_q = states.validationState) === null || _q === void 0 ? void 0 : _q.validationErrors) === null || _r === void 0 ? void 0 : _r.confirmPassword) ? {
|
|
73
81
|
class: sheet.classes.ErrorStyle,
|
|
74
|
-
helpText: ((
|
|
82
|
+
helpText: ((_t = (_s = states.validationState) === null || _s === void 0 ? void 0 : _s.validationErrors) === null || _t === void 0 ? void 0 : _t.confirmPassword) ||
|
|
75
83
|
"Cannot be empty",
|
|
76
84
|
}
|
|
77
85
|
: [])))),
|
|
78
86
|
content.terms,
|
|
79
87
|
h("div", { class: sheet.classes.ButtonsContainer },
|
|
80
|
-
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
88
|
+
h("sl-button", { submit: true, loading: states.loading, disabled: (_u = states.registrationFormState) === null || _u === void 0 ? void 0 : _u.disabled, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
81
89
|
content.secondaryButton))));
|
|
82
90
|
}
|
|
83
91
|
|
|
92
|
+
const RegistrationFormQuery = dist.gql `
|
|
93
|
+
query RegistrationFormQuery($key: String!) {
|
|
94
|
+
form(key: $key) {
|
|
95
|
+
key
|
|
96
|
+
type
|
|
97
|
+
initialData {
|
|
98
|
+
initialData
|
|
99
|
+
isEnabled
|
|
100
|
+
isEnabledErrorMessage
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`;
|
|
84
105
|
function usePortalRegistrationForm(props) {
|
|
85
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
106
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
86
107
|
const formRef = useRef(null);
|
|
108
|
+
const { registrationFormState, setRegistrationFormState } = useRegistrationFormState({});
|
|
87
109
|
const { validationState, setValidationState } = useValidationState({});
|
|
88
110
|
const [request, { loading, errors, data, formError }] = We();
|
|
111
|
+
const queryResponse = wn(RegistrationFormQuery, { key: props.formKey });
|
|
112
|
+
const formLoading = loading || queryResponse.loading;
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
var _a, _b, _c;
|
|
115
|
+
const initialData = (_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData.initialData;
|
|
116
|
+
const disabled = ((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false;
|
|
117
|
+
const disabledMessage = ((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
|
|
118
|
+
"The registration form is currently disabled.";
|
|
119
|
+
const formState = {
|
|
120
|
+
loading: formLoading,
|
|
121
|
+
disabled,
|
|
122
|
+
disabledMessage,
|
|
123
|
+
initialData,
|
|
124
|
+
};
|
|
125
|
+
setRegistrationFormState(formState);
|
|
126
|
+
}, [(_a = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _a === void 0 ? void 0 : _a.form.initialData, formLoading]);
|
|
89
127
|
const submit = async (event) => {
|
|
90
128
|
let formControls = event.target.getFormControls();
|
|
91
129
|
let formData = {};
|
|
92
130
|
let validationErrors = {};
|
|
93
131
|
formControls === null || formControls === void 0 ? void 0 : formControls.forEach((control) => {
|
|
132
|
+
console.log({ control }, control.name);
|
|
94
133
|
if (!control.name)
|
|
95
134
|
return;
|
|
96
135
|
const key = control.name;
|
|
97
136
|
const value = control.value;
|
|
137
|
+
// control.value = initialData[key] || control.value;
|
|
98
138
|
jsonpointer.set(formData, key, value);
|
|
99
139
|
// required validation
|
|
100
140
|
if (control.required && !value) {
|
|
@@ -124,13 +164,15 @@ function usePortalRegistrationForm(props) {
|
|
|
124
164
|
delete formData.email;
|
|
125
165
|
delete formData.password;
|
|
126
166
|
delete formData.confirmPassword;
|
|
127
|
-
formData = { ...formData };
|
|
128
167
|
const redirectPath = props.redirectPath;
|
|
129
168
|
const variables = {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
169
|
+
key: props.formKey,
|
|
170
|
+
formData: {
|
|
171
|
+
email,
|
|
172
|
+
password,
|
|
173
|
+
redirectPath,
|
|
174
|
+
...formData,
|
|
175
|
+
},
|
|
134
176
|
};
|
|
135
177
|
try {
|
|
136
178
|
await request(variables);
|
|
@@ -167,21 +209,27 @@ function usePortalRegistrationForm(props) {
|
|
|
167
209
|
};
|
|
168
210
|
}, [formRef.current]);
|
|
169
211
|
let errorMessage = "";
|
|
170
|
-
if ((
|
|
212
|
+
if (((_b = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _b === void 0 ? void 0 : _b.form.initialData.isEnabled) === false) {
|
|
213
|
+
errorMessage =
|
|
214
|
+
((_c = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.data) === null || _c === void 0 ? void 0 : _c.form.initialData.isEnabledErrorMessage) ||
|
|
215
|
+
"The registration form is disabled";
|
|
216
|
+
}
|
|
217
|
+
else if ((_d = errors === null || errors === void 0 ? void 0 : errors.response) === null || _d === void 0 ? void 0 : _d["error"]) {
|
|
171
218
|
errorMessage = "Network request failed";
|
|
172
219
|
}
|
|
173
|
-
else if ((errors === null || errors === void 0 ? void 0 : errors.message) && !((
|
|
220
|
+
else if ((errors === null || errors === void 0 ? void 0 : errors.message) && !((_e = errors === null || errors === void 0 ? void 0 : errors.response) === null || _e === void 0 ? void 0 : _e.errors.length)) {
|
|
174
221
|
errorMessage = "Network request failed";
|
|
175
222
|
}
|
|
176
223
|
else {
|
|
177
224
|
errorMessage =
|
|
178
|
-
formError || ((_f = (
|
|
225
|
+
formError || ((_j = (_h = (_g = (_f = queryResponse === null || queryResponse === void 0 ? void 0 : queryResponse.errors) === null || _f === void 0 ? void 0 : _f.response) === null || _g === void 0 ? void 0 : _g.errors) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.message) || ((_o = (_m = (_l = (_k = errors === null || errors === void 0 ? void 0 : errors.response) === null || _k === void 0 ? void 0 : _k.errors) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.extensions) === null || _o === void 0 ? void 0 : _o.message) || ((_r = (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.response) === null || _p === void 0 ? void 0 : _p.errors) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.message) || (validationState === null || validationState === void 0 ? void 0 : validationState.error);
|
|
179
226
|
}
|
|
180
227
|
return {
|
|
181
228
|
states: {
|
|
182
|
-
loading,
|
|
229
|
+
loading: loading || queryResponse.loading,
|
|
183
230
|
error: errorMessage,
|
|
184
231
|
validationState,
|
|
232
|
+
registrationFormState,
|
|
185
233
|
confirmPassword: props.confirmPassword,
|
|
186
234
|
hideInputs: props.hideInputs,
|
|
187
235
|
loginPath: props.loginPath,
|
|
@@ -260,6 +308,12 @@ const PortalRegistrationForm = class {
|
|
|
260
308
|
* @uiName Login Path
|
|
261
309
|
*/
|
|
262
310
|
this.loginPath = "/login";
|
|
311
|
+
/**
|
|
312
|
+
* Microsite Registration Form Key
|
|
313
|
+
*
|
|
314
|
+
* @uiName Form Key
|
|
315
|
+
*/
|
|
316
|
+
this.formKey = "microsite-registration-form";
|
|
263
317
|
h$1(this);
|
|
264
318
|
}
|
|
265
319
|
disconnectedCallback() { }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { K as Ke, G as Ge, I as In, L } from './index.module-
|
|
4
|
+
import { K as Ke, G as Ge, I as In, L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { i as useState, e as useEffect, m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { a as ae, c as dn, I as In, L } from './index.module-
|
|
4
|
+
import { a as ae, c as dn, I as In, L } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import './mixins-f60a614c.js';
|
|
@@ -20,7 +20,6 @@ function usePortalVerifyEmail({ nextPage, failedPage }) {
|
|
|
20
20
|
const urlParams = new URLSearchParams(window.location.search);
|
|
21
21
|
const oobCode = urlParams.get("oobCode");
|
|
22
22
|
const nextPageOverride = urlParams.get("nextPage");
|
|
23
|
-
urlParams.delete("oobCode");
|
|
24
23
|
const failed = () => {
|
|
25
24
|
return In.push({
|
|
26
25
|
pathname: failedPage,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, c as Host, r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { l, k as useMemo, e as useEffect, m as h$1 } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import { P } from './index.module-
|
|
4
|
+
import { P } from './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
|
-
import { u as useChildElements } from './useChildElements-
|
|
6
|
+
import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
|
|
7
7
|
import { g as getProps } from './utils-334c1e34.js';
|
|
8
8
|
|
|
9
9
|
const TabsView = ({ content, placement, }) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, g as getElement, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { m as h, u as useReducer, k as useMemo, e as useEffect } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
4
4
|
import './use-callback-69ec5c5c.js';
|
|
5
|
-
import { L } from './index.module-
|
|
5
|
+
import { L } from './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-f60a614c.js';
|
|
9
9
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
10
10
|
import { G as GenericTableView } from './GenericTableView-59c5d47c.js';
|
|
11
|
-
import { a as useRequestRerender, u as useRerenderListener } from './re-render-
|
|
12
|
-
import { u as useChildElements } from './useChildElements-
|
|
11
|
+
import { a as useRequestRerender, u as useRerenderListener } from './re-render-d1b2a0de.js';
|
|
12
|
+
import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
|
|
13
13
|
import { l as luxon } from './luxon-38ca2169.js';
|
|
14
|
-
import { u as useReferralTable, t as tryMethod } from './useReferralTable-
|
|
14
|
+
import { u as useReferralTable, t as tryMethod } from './useReferralTable-68c0823f.js';
|
|
15
15
|
import { l as luxonLocale } from './utils-334c1e34.js';
|
|
16
16
|
import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
|
|
17
17
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-66fea7dc.js';
|
|
3
3
|
import './use-callback-69ec5c5c.js';
|
|
4
|
-
import './index.module-
|
|
4
|
+
import './index.module-9cd4623b.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
|
-
import { a as useRequestRerender } from './re-render-
|
|
6
|
+
import { a as useRequestRerender } from './re-render-d1b2a0de.js';
|
|
7
7
|
|
|
8
8
|
const RewardTableCustomerNoteColumn = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { b as browser, u as useReducer, e as useEffect, m as h$1, k as useMemo } from './stencil-hooks.module-66fea7dc.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-1e714a4d.js';
|
|
4
4
|
import './use-callback-69ec5c5c.js';
|
|
5
|
-
import { d as dist, a as ae, M, O, q as qn, L } from './index.module-
|
|
5
|
+
import { d as dist, a as ae, M, O, q as qn, L } from './index.module-9cd4623b.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-f60a614c.js';
|
|
9
9
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
10
10
|
import { G as GenericTableView } from './GenericTableView-59c5d47c.js';
|
|
11
|
-
import { u as useRerenderListener, a as useRequestRerender } from './re-render-
|
|
12
|
-
import { u as useChildElements } from './useChildElements-
|
|
11
|
+
import { u as useRerenderListener, a as useRequestRerender } from './re-render-d1b2a0de.js';
|
|
12
|
+
import { u as useChildElements } from './useChildElements-e1a1d3d1.js';
|
|
13
13
|
import { l as luxon } from './luxon-38ca2169.js';
|
|
14
|
-
import { g as generateUserError } from './useReferralTable-
|
|
14
|
+
import { g as generateUserError } from './useReferralTable-68c0823f.js';
|
|
15
15
|
import { l as luxonLocale } from './utils-334c1e34.js';
|
|
16
16
|
|
|
17
17
|
const mockRewardData = (count = 4) => {
|