@saasquatch/mint-components 1.2.1 → 1.2.2-11
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/CHANGELOG.md +32 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/{sqm-divided-layout_22.cjs.entry.js → sqm-divided-layout_24.cjs.entry.js} +3846 -88
- package/dist/cjs/sqm-hero-view-9a179fd2.js +77 -0
- package/dist/cjs/sqm-hero.cjs.entry.js +33 -0
- package/dist/cjs/{sqm-navigation-sidebar-item-view-089d0eed.js → sqm-navigation-sidebar-item-view-647457cc.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-change-password-view-8d932bce.js → sqm-portal-change-password-view-faf6ad39.js} +15 -8
- package/dist/cjs/sqm-portal-change-password.cjs.entry.js +59 -4
- package/dist/cjs/{sqm-portal-email-verification-view-d6b7b37e.js → sqm-portal-email-verification-view-626fc886.js} +3 -3
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +14 -2
- package/dist/cjs/sqm-portal-footer-view-be3adcf2.js +80 -0
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +58 -0
- package/dist/cjs/{sqm-portal-profile-view-db5658ba.js → sqm-portal-profile-view-76e3e4bb.js} +5 -5
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +25 -7
- package/dist/cjs/{sqm-portal-reset-password-view-3980aa63.js → sqm-portal-reset-password-view-b7b52d16.js} +10 -6
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +42 -4
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -1
- package/dist/collection/assets/PoweredBySaaSquatch.png +0 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/sqm-hero/sqm-hero-view.js +73 -0
- package/dist/collection/components/sqm-hero/sqm-hero.js +95 -0
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +2 -2
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +2 -2
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +15 -8
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +215 -2
- package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +11 -1
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +3 -3
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +55 -3
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -0
- package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +11 -0
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +65 -0
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +305 -0
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +5 -5
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +90 -12
- package/dist/collection/components/sqm-portal-profile/usePortalProfile.js +3 -0
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +3 -3
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +28 -2
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +10 -6
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +137 -1
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +10 -3
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +1 -1
- package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +0 -6
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +10 -0
- package/dist/collection/stories/ChangePassword.stories.js +72 -2
- package/dist/collection/stories/Hero.stories.js +98 -0
- package/dist/collection/stories/NewPortal.stories.js +19 -1
- package/dist/collection/stories/PortalEmailVerification.stories.js +8 -0
- package/dist/collection/stories/PortalFooter.stories.js +21 -0
- package/dist/collection/stories/PortalProfile.stories.js +18 -0
- package/dist/collection/stories/PortalRegister.stories.js +7 -3
- package/dist/collection/stories/PortalResetPassword.stories.js +42 -0
- package/dist/collection/stories/PortalTemplates.stories.js +143 -0
- package/dist/collection/stories/PoweredByImg.stories.js +14 -0
- package/dist/collection/stories/ProgramMenu.stories.js +39 -0
- package/dist/collection/stories/Router.stories.js +42 -6
- package/dist/collection/stories/UseBigStat.stories.js +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/{sqm-divided-layout_22.entry.js → sqm-divided-layout_24.entry.js} +3844 -88
- package/dist/esm/sqm-hero-view-5b9bbae2.js +75 -0
- package/dist/esm/sqm-hero.entry.js +29 -0
- package/dist/esm/{sqm-navigation-sidebar-item-view-a75802bb.js → sqm-navigation-sidebar-item-view-000b0afb.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
- package/dist/esm/{sqm-portal-change-password-view-8dbe1ea3.js → sqm-portal-change-password-view-24a4adf7.js} +15 -8
- package/dist/esm/sqm-portal-change-password.entry.js +59 -4
- package/dist/esm/{sqm-portal-email-verification-view-964d21fe.js → sqm-portal-email-verification-view-03495ffa.js} +3 -3
- package/dist/esm/sqm-portal-email-verification.entry.js +14 -2
- package/dist/esm/sqm-portal-footer-view-728c427c.js +77 -0
- package/dist/esm/sqm-portal-footer.entry.js +54 -0
- package/dist/esm/{sqm-portal-profile-view-2801882b.js → sqm-portal-profile-view-72e966e2.js} +5 -5
- package/dist/esm/sqm-portal-profile.entry.js +25 -7
- package/dist/esm/{sqm-portal-reset-password-view-6c1d23eb.js → sqm-portal-reset-password-view-1441849e.js} +10 -6
- package/dist/esm/sqm-portal-reset-password.entry.js +42 -4
- package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-divided-layout_24.entry.js +1 -0
- package/dist/esm-es5/sqm-hero-view-5b9bbae2.js +1 -0
- package/dist/esm-es5/sqm-hero.entry.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-000b0afb.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-change-password-view-24a4adf7.js +1 -0
- package/dist/esm-es5/sqm-portal-change-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-03495ffa.js +1 -0
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-footer-view-728c427c.js +1 -0
- package/dist/esm-es5/sqm-portal-footer.entry.js +1 -0
- package/dist/esm-es5/{sqm-portal-profile-view-2801882b.js → sqm-portal-profile-view-72e966e2.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password-view-1441849e.js +1 -0
- 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/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0747c54d.system.js +1 -1
- package/dist/mint-components/{p-1fd262be.system.js → p-1adc0488.system.js} +1 -1
- package/dist/mint-components/p-20fa60f6.system.entry.js +1 -0
- package/dist/mint-components/p-2addaaff.system.entry.js +1 -0
- package/dist/mint-components/p-3a9d8fd9.js +1 -0
- package/dist/mint-components/p-3adace56.entry.js +1 -0
- package/dist/mint-components/p-51db87f4.js +1 -0
- package/dist/mint-components/p-5442b8ad.js +1 -0
- package/dist/mint-components/p-609d6b60.system.entry.js +1 -0
- package/dist/mint-components/p-634d5bcc.entry.js +222 -0
- package/dist/mint-components/p-659298ed.system.entry.js +1 -0
- package/dist/mint-components/p-69e263e0.entry.js +1 -0
- package/dist/mint-components/p-6dfcecca.entry.js +33 -0
- package/dist/mint-components/p-70dd58a4.system.js +1 -0
- package/dist/mint-components/p-759095b4.entry.js +1 -0
- package/dist/mint-components/p-79e5f02c.entry.js +1 -0
- package/dist/mint-components/p-875d1fdc.system.entry.js +1 -0
- package/dist/mint-components/p-8a9ebc3f.system.entry.js +1 -0
- package/dist/mint-components/p-8dc6f789.js +1 -0
- package/dist/mint-components/p-a741d57c.system.js +1 -0
- package/dist/mint-components/p-b7159234.system.js +1 -0
- package/dist/mint-components/p-c196dc61.js +1 -0
- package/dist/mint-components/{p-eb944c84.system.js → p-c366f729.system.js} +1 -1
- package/dist/mint-components/p-c5c2d834.system.js +1 -0
- package/dist/mint-components/p-d24845cd.js +1 -0
- package/dist/mint-components/{p-5d46f5cc.entry.js → p-d37839f3.entry.js} +1 -1
- package/dist/mint-components/p-d441144e.js +1 -0
- package/dist/mint-components/{p-0396ec57.system.entry.js → p-d65a1cfd.system.entry.js} +1 -1
- package/dist/mint-components/p-d95dc3f1.system.js +1 -0
- package/dist/mint-components/p-dfcc1950.entry.js +1 -0
- package/dist/mint-components/p-e48cd2c5.system.entry.js +1 -0
- package/dist/mint-components/p-e6ce03b2.system.entry.js +1 -0
- package/dist/mint-components/p-fa4d1c58.entry.js +1 -0
- package/dist/types/components/sqm-hero/sqm-hero-view.d.ts +13 -0
- package/dist/types/components/sqm-hero/sqm-hero.d.ts +16 -0
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +10 -0
- package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password.d.ts +32 -0
- package/dist/types/components/sqm-portal-change-password/usePortalChangePassword.d.ts +11 -1
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +9 -1
- package/dist/types/components/sqm-portal-email-verification/usePortalEmailVerification.d.ts +2 -0
- package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +7 -0
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +16 -0
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer.d.ts +57 -0
- package/dist/types/components/sqm-portal-profile/sqm-portal-profile-view.d.ts +3 -0
- package/dist/types/components/sqm-portal-profile/sqm-portal-profile.d.ts +17 -5
- package/dist/types/components/sqm-portal-profile/usePortalProfile.d.ts +3 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +4 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password-view.d.ts +7 -0
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +24 -0
- package/dist/types/components/sqm-portal-reset-password/usePortalResetPassword.d.ts +2 -4
- package/dist/types/components.d.ts +314 -12
- package/dist/types/saasquatch.d.ts +1 -1
- package/dist/types/stories/Hero.stories.d.ts +11 -0
- package/dist/types/stories/PortalFooter.stories.d.ts +10 -0
- package/dist/types/stories/PortalTemplates.stories.d.ts +88 -0
- package/dist/types/stories/PoweredByImg.stories.d.ts +7 -0
- package/dist/types/stories/ProgramMenu.stories.d.ts +28 -0
- package/dist/types/stories/Router.stories.d.ts +24 -3
- package/dist/types/stories/UseBigStat.stories.d.ts +6 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/sqm-portal-login-view-20530cd5.js +0 -53
- package/dist/cjs/sqm-portal-login.cjs.entry.js +0 -119
- package/dist/cjs/sqm-program-menu.cjs.entry.js +0 -57
- package/dist/collection/components/sqm-program-menu/sqm-program-menu.css +0 -25
- package/dist/esm/sqm-portal-login-view-7e56a959.js +0 -51
- package/dist/esm/sqm-portal-login.entry.js +0 -115
- package/dist/esm/sqm-program-menu.entry.js +0 -53
- package/dist/esm-es5/sqm-divided-layout_22.entry.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-a75802bb.js +0 -1
- package/dist/esm-es5/sqm-portal-change-password-view-8dbe1ea3.js +0 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-964d21fe.js +0 -1
- package/dist/esm-es5/sqm-portal-login-view-7e56a959.js +0 -1
- package/dist/esm-es5/sqm-portal-login.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-reset-password-view-6c1d23eb.js +0 -1
- package/dist/esm-es5/sqm-program-menu.entry.js +0 -1
- package/dist/mint-components/p-18142b08.system.entry.js +0 -1
- package/dist/mint-components/p-2019910e.system.entry.js +0 -1
- package/dist/mint-components/p-3f40e878.js +0 -1
- package/dist/mint-components/p-42ca40ee.system.entry.js +0 -1
- package/dist/mint-components/p-4a4f97e3.system.js +0 -1
- package/dist/mint-components/p-4e298f2f.entry.js +0 -1
- package/dist/mint-components/p-4f7e972b.entry.js +0 -222
- package/dist/mint-components/p-511ee8d5.js +0 -1
- package/dist/mint-components/p-5c2d4489.entry.js +0 -33
- package/dist/mint-components/p-6dcb4084.js +0 -1
- package/dist/mint-components/p-6edab0e1.js +0 -1
- package/dist/mint-components/p-7b5f70cf.system.entry.js +0 -1
- package/dist/mint-components/p-7cf1b6bc.system.js +0 -1
- package/dist/mint-components/p-8a647b42.entry.js +0 -1
- package/dist/mint-components/p-8a9e36b0.entry.js +0 -1
- package/dist/mint-components/p-9ec68457.system.js +0 -1
- package/dist/mint-components/p-a19cb5dc.entry.js +0 -1
- package/dist/mint-components/p-ac1285f3.js +0 -1
- package/dist/mint-components/p-aca6d934.system.entry.js +0 -1
- package/dist/mint-components/p-ae8f2817.entry.js +0 -1
- package/dist/mint-components/p-bcd56164.system.entry.js +0 -1
- package/dist/mint-components/p-cccfe42a.system.js +0 -1
- package/dist/mint-components/p-d2dfc374.js +0 -1
- package/dist/mint-components/p-db23f907.system.entry.js +0 -1
- package/dist/mint-components/p-e896917e.entry.js +0 -1
- package/dist/mint-components/p-f305ea91.system.entry.js +0 -1
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-b0129cd6.js');
|
|
6
|
-
const _extends = require('./extends-0302d27d.js');
|
|
7
|
-
const index_module = require('./index.module-c7136d45.js');
|
|
8
|
-
const utils = require('./utils-008094cc.js');
|
|
9
|
-
|
|
10
|
-
const debug = _extends.browser('sq:useProgramMenu');
|
|
11
|
-
const UPDATE_PROGRAM_EVENT = 'sq:update-program-id';
|
|
12
|
-
function useProgramMenu(props) {
|
|
13
|
-
const programId = index_module.M();
|
|
14
|
-
const host = index_module.P();
|
|
15
|
-
debug({ programId, props });
|
|
16
|
-
const ref = _extends.useRef();
|
|
17
|
-
const [, rerender] = index_module.Ze();
|
|
18
|
-
_extends.useEffect(() => {
|
|
19
|
-
var _a;
|
|
20
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener('sl-select', (e) => {
|
|
21
|
-
const programId = e.detail.item.value;
|
|
22
|
-
// setProgramId(programId);
|
|
23
|
-
host.dispatchEvent(new CustomEvent(UPDATE_PROGRAM_EVENT, {
|
|
24
|
-
detail: programId,
|
|
25
|
-
bubbles: true,
|
|
26
|
-
composed: true,
|
|
27
|
-
}));
|
|
28
|
-
});
|
|
29
|
-
}, [ref.current]);
|
|
30
|
-
return {
|
|
31
|
-
data: {
|
|
32
|
-
programId,
|
|
33
|
-
},
|
|
34
|
-
callbacks: {
|
|
35
|
-
rerender,
|
|
36
|
-
},
|
|
37
|
-
ref,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const sqmProgramMenuCss = ":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";
|
|
42
|
-
|
|
43
|
-
const ProgramMenu = class {
|
|
44
|
-
constructor(hostRef) {
|
|
45
|
-
index.registerInstance(this, hostRef);
|
|
46
|
-
this.ignored = true;
|
|
47
|
-
_extends.h$1(this);
|
|
48
|
-
}
|
|
49
|
-
disconnectedCallback() { }
|
|
50
|
-
render() {
|
|
51
|
-
const { data, ref } = useProgramMenu(utils.getProps(this));
|
|
52
|
-
return (index.h(index.Host, { style: { display: "contents" } }, index.h("sl-select", { style: { paddingBottom: "var(--sl-spacing-large)" }, value: data.programId, ref: (r) => (ref.current = r) }, index.h("slot", null))));
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
ProgramMenu.style = sqmProgramMenuCss;
|
|
56
|
-
|
|
57
|
-
exports.sqm_program_menu = ProgramMenu;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:host([hidden]) {
|
|
6
|
-
display: none;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.HeaderWrapper {
|
|
10
|
-
width: 100%;
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
padding: var(--sl-spacing-small) var(--sl-spacing-large);
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: var(--sqm-header-background);
|
|
18
|
-
}
|
|
19
|
-
@media screen and (max-width: 499px) {
|
|
20
|
-
.HeaderWrapper {
|
|
21
|
-
flex-direction: row-reverse;
|
|
22
|
-
justify-content: flex-end;
|
|
23
|
-
padding: 0 var(--sl-spacing-x-small);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { h } from './index-17b4da69.js';
|
|
2
|
-
import { j as jss, c as create } from './jss-preset-default.esm-5aaab97b.js';
|
|
3
|
-
import { A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer } from './mixins-583d364a.js';
|
|
4
|
-
import { T as TextSpanView } from './sqm-text-span-view-244dee55.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: "#AAAAAA",
|
|
15
|
-
margin: "0",
|
|
16
|
-
},
|
|
17
|
-
ButtonsContainer: AuthButtonsContainer,
|
|
18
|
-
};
|
|
19
|
-
const vanillaStyle = `
|
|
20
|
-
:host {
|
|
21
|
-
margin: 0 auto;
|
|
22
|
-
width: 100%;
|
|
23
|
-
display: block;
|
|
24
|
-
}
|
|
25
|
-
:host([hidden]): {
|
|
26
|
-
display: none;
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
jss.setup(create());
|
|
30
|
-
const sheet = jss.createStyleSheet(style);
|
|
31
|
-
const styleString = sheet.toString();
|
|
32
|
-
function PortalLoginView(props) {
|
|
33
|
-
const { states, callbacks, content } = props;
|
|
34
|
-
return (h("div", { class: sheet.classes.Wrapper },
|
|
35
|
-
h("style", { type: "text/css" },
|
|
36
|
-
vanillaStyle,
|
|
37
|
-
styleString),
|
|
38
|
-
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
39
|
-
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
|
|
40
|
-
props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
41
|
-
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
42
|
-
h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
|
|
43
|
-
h("div", null,
|
|
44
|
-
h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
|
|
45
|
-
h("div", { class: sheet.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
|
|
46
|
-
h("div", { class: sheet.classes.ButtonsContainer },
|
|
47
|
-
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
|
|
48
|
-
content.secondaryButton))));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { PortalLoginView as P };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
|
-
import { k as useState, f as useEffect, m as h } from './extends-faeb047d.js';
|
|
3
|
-
import { q as qe, r as rn, j } from './index.module-7a2b1f9b.js';
|
|
4
|
-
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
5
|
-
import './jss-preset-default.esm-5aaab97b.js';
|
|
6
|
-
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
|
-
import './mixins-583d364a.js';
|
|
8
|
-
import './sqm-text-span-view-244dee55.js';
|
|
9
|
-
import { P as PortalLoginView } from './sqm-portal-login-view-7e56a959.js';
|
|
10
|
-
|
|
11
|
-
function usePortalLogin({ nextPage }) {
|
|
12
|
-
var _a, _b, _c, _d;
|
|
13
|
-
const [request, { loading, errors, data }] = qe();
|
|
14
|
-
const [error, setError] = useState("");
|
|
15
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
16
|
-
const nextPageOverride = urlParams.get("nextPage");
|
|
17
|
-
const submit = async (event) => {
|
|
18
|
-
setError("");
|
|
19
|
-
let formData = event.detail.formData;
|
|
20
|
-
formData === null || formData === void 0 ? void 0 : formData.forEach((value, key) => {
|
|
21
|
-
jsonpointer.set(formData, key, value);
|
|
22
|
-
});
|
|
23
|
-
const variables = { email: formData.email, password: formData.password };
|
|
24
|
-
await request(variables);
|
|
25
|
-
};
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
var _a;
|
|
28
|
-
if ((_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
|
|
29
|
-
urlParams.delete("nextPage");
|
|
30
|
-
rn.push({
|
|
31
|
-
pathname: nextPageOverride || nextPage,
|
|
32
|
-
search: urlParams.toString() && "?" + urlParams.toString(),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}, [(_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token]);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
var _a;
|
|
38
|
-
if ((errors === null || errors === void 0 ? void 0 : errors.message) || ((_a = errors === null || errors === void 0 ? void 0 : errors.response) === null || _a === void 0 ? void 0 : _a["error"])) {
|
|
39
|
-
setError("Network request failed.");
|
|
40
|
-
}
|
|
41
|
-
}, [errors]);
|
|
42
|
-
const errorMessage = ((_d = (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.response) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.message) || error;
|
|
43
|
-
return {
|
|
44
|
-
states: {
|
|
45
|
-
loading,
|
|
46
|
-
error: errorMessage,
|
|
47
|
-
},
|
|
48
|
-
callbacks: {
|
|
49
|
-
submit,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const PortalLogin = class {
|
|
55
|
-
constructor(hostRef) {
|
|
56
|
-
registerInstance(this, hostRef);
|
|
57
|
-
this.ignored = true;
|
|
58
|
-
/**
|
|
59
|
-
* @uiName Page navigated to after sign-in
|
|
60
|
-
*/
|
|
61
|
-
this.nextPage = "/";
|
|
62
|
-
/**
|
|
63
|
-
* @uiName Label for email field
|
|
64
|
-
*/
|
|
65
|
-
this.emailLabel = "Email";
|
|
66
|
-
/**
|
|
67
|
-
* @uiName Label for password field
|
|
68
|
-
*/
|
|
69
|
-
this.passwordLabel = "Password";
|
|
70
|
-
/**
|
|
71
|
-
* @uiName Label for submit button
|
|
72
|
-
*/
|
|
73
|
-
this.submitLabel = "Sign In";
|
|
74
|
-
/**
|
|
75
|
-
* @uiName Label for forgotten password button
|
|
76
|
-
*/
|
|
77
|
-
this.forgotPasswordLabel = "Forgot Password?";
|
|
78
|
-
/**
|
|
79
|
-
* @uiName Label for register navigation button
|
|
80
|
-
*/
|
|
81
|
-
this.registerLabel = "Register";
|
|
82
|
-
/**
|
|
83
|
-
* @uiName Heading label
|
|
84
|
-
*/
|
|
85
|
-
this.pageLabel = "Sign in to your account";
|
|
86
|
-
h(this);
|
|
87
|
-
}
|
|
88
|
-
disconnectedCallback() { }
|
|
89
|
-
render() {
|
|
90
|
-
const { states, callbacks } = j()
|
|
91
|
-
? useLoginDemo(this)
|
|
92
|
-
: usePortalLogin(this);
|
|
93
|
-
const content = {
|
|
94
|
-
forgotPasswordButton: (h$1("slot", { name: "forgotPassword" }, h$1("a", { onClick: () => rn.push("/forgotPassword") }, this.forgotPasswordLabel))),
|
|
95
|
-
secondaryButton: (h$1("slot", { name: "secondaryButton" }, h$1("sl-button", { type: "text", disabled: states.loading, onClick: () => rn.push("/register") }, this.registerLabel))),
|
|
96
|
-
emailLabel: this.emailLabel,
|
|
97
|
-
passwordLabel: this.passwordLabel,
|
|
98
|
-
submitLabel: this.submitLabel,
|
|
99
|
-
pageLabel: this.pageLabel,
|
|
100
|
-
};
|
|
101
|
-
return (h$1(PortalLoginView, { states: states, callbacks: callbacks, content: content }));
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
function useLoginDemo(props) {
|
|
105
|
-
return cjs({
|
|
106
|
-
states: { error: "", loading: false },
|
|
107
|
-
callbacks: {
|
|
108
|
-
submit: async (_event) => {
|
|
109
|
-
console.log("submit");
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export { PortalLogin as sqm_portal_login };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
|
-
import { b as browser, i as useRef, f as useEffect, m as h } from './extends-faeb047d.js';
|
|
3
|
-
import { M, P, Z as Ze } from './index.module-7a2b1f9b.js';
|
|
4
|
-
import { g as getProps } from './utils-5ce97f37.js';
|
|
5
|
-
|
|
6
|
-
const debug = browser('sq:useProgramMenu');
|
|
7
|
-
const UPDATE_PROGRAM_EVENT = 'sq:update-program-id';
|
|
8
|
-
function useProgramMenu(props) {
|
|
9
|
-
const programId = M();
|
|
10
|
-
const host = P();
|
|
11
|
-
debug({ programId, props });
|
|
12
|
-
const ref = useRef();
|
|
13
|
-
const [, rerender] = Ze();
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
var _a;
|
|
16
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener('sl-select', (e) => {
|
|
17
|
-
const programId = e.detail.item.value;
|
|
18
|
-
// setProgramId(programId);
|
|
19
|
-
host.dispatchEvent(new CustomEvent(UPDATE_PROGRAM_EVENT, {
|
|
20
|
-
detail: programId,
|
|
21
|
-
bubbles: true,
|
|
22
|
-
composed: true,
|
|
23
|
-
}));
|
|
24
|
-
});
|
|
25
|
-
}, [ref.current]);
|
|
26
|
-
return {
|
|
27
|
-
data: {
|
|
28
|
-
programId,
|
|
29
|
-
},
|
|
30
|
-
callbacks: {
|
|
31
|
-
rerender,
|
|
32
|
-
},
|
|
33
|
-
ref,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const sqmProgramMenuCss = ":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";
|
|
38
|
-
|
|
39
|
-
const ProgramMenu = class {
|
|
40
|
-
constructor(hostRef) {
|
|
41
|
-
registerInstance(this, hostRef);
|
|
42
|
-
this.ignored = true;
|
|
43
|
-
h(this);
|
|
44
|
-
}
|
|
45
|
-
disconnectedCallback() { }
|
|
46
|
-
render() {
|
|
47
|
-
const { data, ref } = useProgramMenu(getProps(this));
|
|
48
|
-
return (h$1(Host, { style: { display: "contents" } }, h$1("sl-select", { style: { paddingBottom: "var(--sl-spacing-large)" }, value: data.programId, ref: (r) => (ref.current = r) }, h$1("slot", null))));
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
ProgramMenu.style = sqmProgramMenuCss;
|
|
52
|
-
|
|
53
|
-
export { ProgramMenu as sqm_program_menu };
|