@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.
Files changed (200) hide show
  1. package/CHANGELOG.md +32 -9
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/{sqm-divided-layout_22.cjs.entry.js → sqm-divided-layout_24.cjs.entry.js} +3846 -88
  5. package/dist/cjs/sqm-hero-view-9a179fd2.js +77 -0
  6. package/dist/cjs/sqm-hero.cjs.entry.js +33 -0
  7. package/dist/cjs/{sqm-navigation-sidebar-item-view-089d0eed.js → sqm-navigation-sidebar-item-view-647457cc.js} +2 -2
  8. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +3 -3
  9. package/dist/cjs/{sqm-portal-change-password-view-8d932bce.js → sqm-portal-change-password-view-faf6ad39.js} +15 -8
  10. package/dist/cjs/sqm-portal-change-password.cjs.entry.js +59 -4
  11. package/dist/cjs/{sqm-portal-email-verification-view-d6b7b37e.js → sqm-portal-email-verification-view-626fc886.js} +3 -3
  12. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +14 -2
  13. package/dist/cjs/sqm-portal-footer-view-be3adcf2.js +80 -0
  14. package/dist/cjs/sqm-portal-footer.cjs.entry.js +58 -0
  15. package/dist/cjs/{sqm-portal-profile-view-db5658ba.js → sqm-portal-profile-view-76e3e4bb.js} +5 -5
  16. package/dist/cjs/sqm-portal-profile.cjs.entry.js +25 -7
  17. package/dist/cjs/{sqm-portal-reset-password-view-3980aa63.js → sqm-portal-reset-password-view-b7b52d16.js} +10 -6
  18. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +42 -4
  19. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -1
  20. package/dist/collection/assets/PoweredBySaaSquatch.png +0 -0
  21. package/dist/collection/collection-manifest.json +2 -0
  22. package/dist/collection/components/sqm-hero/sqm-hero-view.js +73 -0
  23. package/dist/collection/components/sqm-hero/sqm-hero.js +95 -0
  24. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +2 -2
  25. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +2 -2
  26. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +15 -8
  27. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +215 -2
  28. package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +11 -1
  29. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +3 -3
  30. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +55 -3
  31. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -0
  32. package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +11 -0
  33. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +65 -0
  34. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +305 -0
  35. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +5 -5
  36. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +90 -12
  37. package/dist/collection/components/sqm-portal-profile/usePortalProfile.js +3 -0
  38. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +3 -3
  39. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +28 -2
  40. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +10 -6
  41. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +137 -1
  42. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +10 -3
  43. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +1 -1
  44. package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +0 -6
  45. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +10 -0
  46. package/dist/collection/stories/ChangePassword.stories.js +72 -2
  47. package/dist/collection/stories/Hero.stories.js +98 -0
  48. package/dist/collection/stories/NewPortal.stories.js +19 -1
  49. package/dist/collection/stories/PortalEmailVerification.stories.js +8 -0
  50. package/dist/collection/stories/PortalFooter.stories.js +21 -0
  51. package/dist/collection/stories/PortalProfile.stories.js +18 -0
  52. package/dist/collection/stories/PortalRegister.stories.js +7 -3
  53. package/dist/collection/stories/PortalResetPassword.stories.js +42 -0
  54. package/dist/collection/stories/PortalTemplates.stories.js +143 -0
  55. package/dist/collection/stories/PoweredByImg.stories.js +14 -0
  56. package/dist/collection/stories/ProgramMenu.stories.js +39 -0
  57. package/dist/collection/stories/Router.stories.js +42 -6
  58. package/dist/collection/stories/UseBigStat.stories.js +1 -0
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/mint-components.js +1 -1
  61. package/dist/esm/{sqm-divided-layout_22.entry.js → sqm-divided-layout_24.entry.js} +3844 -88
  62. package/dist/esm/sqm-hero-view-5b9bbae2.js +75 -0
  63. package/dist/esm/sqm-hero.entry.js +29 -0
  64. package/dist/esm/{sqm-navigation-sidebar-item-view-a75802bb.js → sqm-navigation-sidebar-item-view-000b0afb.js} +2 -2
  65. package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
  66. package/dist/esm/{sqm-portal-change-password-view-8dbe1ea3.js → sqm-portal-change-password-view-24a4adf7.js} +15 -8
  67. package/dist/esm/sqm-portal-change-password.entry.js +59 -4
  68. package/dist/esm/{sqm-portal-email-verification-view-964d21fe.js → sqm-portal-email-verification-view-03495ffa.js} +3 -3
  69. package/dist/esm/sqm-portal-email-verification.entry.js +14 -2
  70. package/dist/esm/sqm-portal-footer-view-728c427c.js +77 -0
  71. package/dist/esm/sqm-portal-footer.entry.js +54 -0
  72. package/dist/esm/{sqm-portal-profile-view-2801882b.js → sqm-portal-profile-view-72e966e2.js} +5 -5
  73. package/dist/esm/sqm-portal-profile.entry.js +25 -7
  74. package/dist/esm/{sqm-portal-reset-password-view-6c1d23eb.js → sqm-portal-reset-password-view-1441849e.js} +10 -6
  75. package/dist/esm/sqm-portal-reset-password.entry.js +42 -4
  76. package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
  77. package/dist/esm-es5/loader.js +1 -1
  78. package/dist/esm-es5/mint-components.js +1 -1
  79. package/dist/esm-es5/sqm-divided-layout_24.entry.js +1 -0
  80. package/dist/esm-es5/sqm-hero-view-5b9bbae2.js +1 -0
  81. package/dist/esm-es5/sqm-hero.entry.js +1 -0
  82. package/dist/esm-es5/sqm-navigation-sidebar-item-view-000b0afb.js +1 -0
  83. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  84. package/dist/esm-es5/sqm-portal-change-password-view-24a4adf7.js +1 -0
  85. package/dist/esm-es5/sqm-portal-change-password.entry.js +1 -1
  86. package/dist/esm-es5/sqm-portal-email-verification-view-03495ffa.js +1 -0
  87. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  88. package/dist/esm-es5/sqm-portal-footer-view-728c427c.js +1 -0
  89. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -0
  90. package/dist/esm-es5/{sqm-portal-profile-view-2801882b.js → sqm-portal-profile-view-72e966e2.js} +1 -1
  91. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  92. package/dist/esm-es5/sqm-portal-reset-password-view-1441849e.js +1 -0
  93. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  94. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  95. package/dist/mint-components/mint-components.esm.js +1 -1
  96. package/dist/mint-components/p-0747c54d.system.js +1 -1
  97. package/dist/mint-components/{p-1fd262be.system.js → p-1adc0488.system.js} +1 -1
  98. package/dist/mint-components/p-20fa60f6.system.entry.js +1 -0
  99. package/dist/mint-components/p-2addaaff.system.entry.js +1 -0
  100. package/dist/mint-components/p-3a9d8fd9.js +1 -0
  101. package/dist/mint-components/p-3adace56.entry.js +1 -0
  102. package/dist/mint-components/p-51db87f4.js +1 -0
  103. package/dist/mint-components/p-5442b8ad.js +1 -0
  104. package/dist/mint-components/p-609d6b60.system.entry.js +1 -0
  105. package/dist/mint-components/p-634d5bcc.entry.js +222 -0
  106. package/dist/mint-components/p-659298ed.system.entry.js +1 -0
  107. package/dist/mint-components/p-69e263e0.entry.js +1 -0
  108. package/dist/mint-components/p-6dfcecca.entry.js +33 -0
  109. package/dist/mint-components/p-70dd58a4.system.js +1 -0
  110. package/dist/mint-components/p-759095b4.entry.js +1 -0
  111. package/dist/mint-components/p-79e5f02c.entry.js +1 -0
  112. package/dist/mint-components/p-875d1fdc.system.entry.js +1 -0
  113. package/dist/mint-components/p-8a9ebc3f.system.entry.js +1 -0
  114. package/dist/mint-components/p-8dc6f789.js +1 -0
  115. package/dist/mint-components/p-a741d57c.system.js +1 -0
  116. package/dist/mint-components/p-b7159234.system.js +1 -0
  117. package/dist/mint-components/p-c196dc61.js +1 -0
  118. package/dist/mint-components/{p-eb944c84.system.js → p-c366f729.system.js} +1 -1
  119. package/dist/mint-components/p-c5c2d834.system.js +1 -0
  120. package/dist/mint-components/p-d24845cd.js +1 -0
  121. package/dist/mint-components/{p-5d46f5cc.entry.js → p-d37839f3.entry.js} +1 -1
  122. package/dist/mint-components/p-d441144e.js +1 -0
  123. package/dist/mint-components/{p-0396ec57.system.entry.js → p-d65a1cfd.system.entry.js} +1 -1
  124. package/dist/mint-components/p-d95dc3f1.system.js +1 -0
  125. package/dist/mint-components/p-dfcc1950.entry.js +1 -0
  126. package/dist/mint-components/p-e48cd2c5.system.entry.js +1 -0
  127. package/dist/mint-components/p-e6ce03b2.system.entry.js +1 -0
  128. package/dist/mint-components/p-fa4d1c58.entry.js +1 -0
  129. package/dist/types/components/sqm-hero/sqm-hero-view.d.ts +13 -0
  130. package/dist/types/components/sqm-hero/sqm-hero.d.ts +16 -0
  131. package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +10 -0
  132. package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password.d.ts +32 -0
  133. package/dist/types/components/sqm-portal-change-password/usePortalChangePassword.d.ts +11 -1
  134. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification-view.d.ts +2 -0
  135. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +9 -1
  136. package/dist/types/components/sqm-portal-email-verification/usePortalEmailVerification.d.ts +2 -0
  137. package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +7 -0
  138. package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +16 -0
  139. package/dist/types/components/sqm-portal-footer/sqm-portal-footer.d.ts +57 -0
  140. package/dist/types/components/sqm-portal-profile/sqm-portal-profile-view.d.ts +3 -0
  141. package/dist/types/components/sqm-portal-profile/sqm-portal-profile.d.ts +17 -5
  142. package/dist/types/components/sqm-portal-profile/usePortalProfile.d.ts +3 -0
  143. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +1 -0
  144. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +4 -0
  145. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password-view.d.ts +7 -0
  146. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +24 -0
  147. package/dist/types/components/sqm-portal-reset-password/usePortalResetPassword.d.ts +2 -4
  148. package/dist/types/components.d.ts +314 -12
  149. package/dist/types/saasquatch.d.ts +1 -1
  150. package/dist/types/stories/Hero.stories.d.ts +11 -0
  151. package/dist/types/stories/PortalFooter.stories.d.ts +10 -0
  152. package/dist/types/stories/PortalTemplates.stories.d.ts +88 -0
  153. package/dist/types/stories/PoweredByImg.stories.d.ts +7 -0
  154. package/dist/types/stories/ProgramMenu.stories.d.ts +28 -0
  155. package/dist/types/stories/Router.stories.d.ts +24 -3
  156. package/dist/types/stories/UseBigStat.stories.d.ts +6 -0
  157. package/dist/types/stories/templates.d.ts +4 -0
  158. package/grapesjs/grapesjs.js +1 -1
  159. package/package.json +2 -1
  160. package/dist/cjs/sqm-portal-login-view-20530cd5.js +0 -53
  161. package/dist/cjs/sqm-portal-login.cjs.entry.js +0 -119
  162. package/dist/cjs/sqm-program-menu.cjs.entry.js +0 -57
  163. package/dist/collection/components/sqm-program-menu/sqm-program-menu.css +0 -25
  164. package/dist/esm/sqm-portal-login-view-7e56a959.js +0 -51
  165. package/dist/esm/sqm-portal-login.entry.js +0 -115
  166. package/dist/esm/sqm-program-menu.entry.js +0 -53
  167. package/dist/esm-es5/sqm-divided-layout_22.entry.js +0 -1
  168. package/dist/esm-es5/sqm-navigation-sidebar-item-view-a75802bb.js +0 -1
  169. package/dist/esm-es5/sqm-portal-change-password-view-8dbe1ea3.js +0 -1
  170. package/dist/esm-es5/sqm-portal-email-verification-view-964d21fe.js +0 -1
  171. package/dist/esm-es5/sqm-portal-login-view-7e56a959.js +0 -1
  172. package/dist/esm-es5/sqm-portal-login.entry.js +0 -1
  173. package/dist/esm-es5/sqm-portal-reset-password-view-6c1d23eb.js +0 -1
  174. package/dist/esm-es5/sqm-program-menu.entry.js +0 -1
  175. package/dist/mint-components/p-18142b08.system.entry.js +0 -1
  176. package/dist/mint-components/p-2019910e.system.entry.js +0 -1
  177. package/dist/mint-components/p-3f40e878.js +0 -1
  178. package/dist/mint-components/p-42ca40ee.system.entry.js +0 -1
  179. package/dist/mint-components/p-4a4f97e3.system.js +0 -1
  180. package/dist/mint-components/p-4e298f2f.entry.js +0 -1
  181. package/dist/mint-components/p-4f7e972b.entry.js +0 -222
  182. package/dist/mint-components/p-511ee8d5.js +0 -1
  183. package/dist/mint-components/p-5c2d4489.entry.js +0 -33
  184. package/dist/mint-components/p-6dcb4084.js +0 -1
  185. package/dist/mint-components/p-6edab0e1.js +0 -1
  186. package/dist/mint-components/p-7b5f70cf.system.entry.js +0 -1
  187. package/dist/mint-components/p-7cf1b6bc.system.js +0 -1
  188. package/dist/mint-components/p-8a647b42.entry.js +0 -1
  189. package/dist/mint-components/p-8a9e36b0.entry.js +0 -1
  190. package/dist/mint-components/p-9ec68457.system.js +0 -1
  191. package/dist/mint-components/p-a19cb5dc.entry.js +0 -1
  192. package/dist/mint-components/p-ac1285f3.js +0 -1
  193. package/dist/mint-components/p-aca6d934.system.entry.js +0 -1
  194. package/dist/mint-components/p-ae8f2817.entry.js +0 -1
  195. package/dist/mint-components/p-bcd56164.system.entry.js +0 -1
  196. package/dist/mint-components/p-cccfe42a.system.js +0 -1
  197. package/dist/mint-components/p-d2dfc374.js +0 -1
  198. package/dist/mint-components/p-db23f907.system.entry.js +0 -1
  199. package/dist/mint-components/p-e896917e.entry.js +0 -1
  200. package/dist/mint-components/p-f305ea91.system.entry.js +0 -1
@@ -46,11 +46,11 @@ function PortalResetPasswordView(props) {
46
46
  if (states.reset) {
47
47
  return (index.h("div", { class: `${sheet.classes.Wrapper} ${sheet.classes.Column}` },
48
48
  index.h("style", { type: "text/css" }, styleString),
49
- index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, "Reset your password"),
49
+ index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, states.content.resetPasswordHeader),
50
50
  index.h("sqm-form-message", { class: sheet.classes.CodeSuccess, exportparts: "success-icon" },
51
51
  index.h("div", { part: "successalert-text" }, "Your password has been reset and you are being redirected. If you are not redirected, please click Continue.")),
52
52
  index.h("div", null,
53
- index.h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.gotoNextPage, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, "Continue"))));
53
+ index.h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.gotoNextPage, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, states.content.continueButtonText))));
54
54
  }
55
55
  if (states.oobCodeValidating) {
56
56
  return index.h("div", null);
@@ -61,20 +61,24 @@ function PortalResetPasswordView(props) {
61
61
  index.h("sqm-form-message", { class: sheet.classes.CodeError, type: "error", exportparts: "erroralert-icon" },
62
62
  index.h("div", { part: "erroralert-text" }, "The password reset code is invalid or has expired, please try again.")),
63
63
  index.h("div", null,
64
- index.h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.failed, exportparts: "base: primarybutton-base", type: "primary" }, "Continue"))));
64
+ index.h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.failed, exportparts: "base: primarybutton-base", type: "primary" }, states.content.continueButtonText))));
65
65
  }
66
66
  return (index.h("div", { class: sheet.classes.Wrapper },
67
67
  index.h("style", { type: "text/css" },
68
68
  vanillaStyle,
69
69
  styleString),
70
- index.h(sqmTextSpanView.TextSpanView, { type: "h2" }, states.reset ? "Password Reset" : "Reset your password"),
70
+ index.h(sqmTextSpanView.TextSpanView, { type: "h2" }, states.reset
71
+ ? states.content.passwordResetHeader
72
+ : states.content.resetPasswordHeader),
71
73
  index.h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
72
74
  props.states.error && (index.h("sqm-form-message", { type: "error", class: sheet.classes.Banner, exportparts: "erroralert-icon" },
73
75
  index.h("div", { part: "erroralert-text" }, props.states.error))),
74
76
  !states.reset && (index.h("sqm-password-field", { demoData: states.passwordDemoData })),
75
- !states.reset && states.confirmPassword && (index.h("sl-input", { exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: "Confirm Password", disabled: states.loading, required: true })),
77
+ !states.reset && states.confirmPassword && (index.h("sl-input", { exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, disabled: states.loading, required: true })),
76
78
  index.h("div", { class: sheet.classes.ButtonsContainer },
77
- index.h("sl-button", { class: sheet.classes.ContinueButton, submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, states.reset ? "Continue" : "Reset Password")))));
79
+ index.h("sl-button", { class: sheet.classes.ContinueButton, submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, states.reset
80
+ ? states.content.continueButtonText
81
+ : states.content.resetPasswordButtonText)))));
78
82
  }
79
83
 
80
84
  exports.PortalResetPasswordView = PortalResetPasswordView;
@@ -10,9 +10,9 @@ require('./jss-preset-default.esm-6304d24f.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
11
  require('./mixins-232c94a0.js');
12
12
  require('./sqm-text-span-view-b5ae787b.js');
13
- const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-3980aa63.js');
13
+ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-b7b52d16.js');
14
14
 
15
- function usePortalResetPassword({ nextPage, confirmPassword, }) {
15
+ function usePortalResetPassword(props) {
16
16
  var _a, _b, _c, _d, _e, _f;
17
17
  const [reset, setReset] = _extends.useState(false);
18
18
  const [error, setError] = _extends.useState("");
@@ -38,7 +38,7 @@ function usePortalResetPassword({ nextPage, confirmPassword, }) {
38
38
  const gotoNextPage = () => {
39
39
  urlParams.delete("nextPage");
40
40
  index_module.rn.push({
41
- pathname: nextPageOverride || nextPage,
41
+ pathname: nextPageOverride || props.nextPage,
42
42
  search: urlParams.toString() && "?" + urlParams.toString(),
43
43
  });
44
44
  };
@@ -70,10 +70,17 @@ function usePortalResetPassword({ nextPage, confirmPassword, }) {
70
70
  states: {
71
71
  loading: resetPasswordState.loading,
72
72
  reset,
73
- confirmPassword,
73
+ confirmPassword: props.confirmPassword,
74
74
  error: ((_e = (_d = (_c = (_b = resetPasswordState.errors) === null || _b === void 0 ? void 0 : _b.response) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.message) || error,
75
75
  oobCodeValidating: verifyPasswordResetCodeState.loading,
76
76
  oobCodeValid: (_f = verifyPasswordResetCodeState.data) === null || _f === void 0 ? void 0 : _f.verifyManagedIdentityPasswordResetCode.success,
77
+ content: {
78
+ passwordResetHeader: props.passwordResetHeader,
79
+ resetPasswordHeader: props.resetPasswordHeader,
80
+ continueButtonText: props.continueButtonText,
81
+ resetPasswordButtonText: props.resetPasswordButtonText,
82
+ confirmPasswordFieldLabel: props.confirmPasswordFieldLabel,
83
+ },
77
84
  },
78
85
  callbacks: { submit, failed, gotoNextPage },
79
86
  };
@@ -91,6 +98,30 @@ const PortalResetPassword = class {
91
98
  * @uiName Show confirm password
92
99
  */
93
100
  this.confirmPassword = false;
101
+ /**
102
+ * @uiName Password reset header text
103
+ */
104
+ this.resetPasswordHeader = "Reset your password";
105
+ /**
106
+ * Displayed after a successful password reset
107
+ *
108
+ * @uiName Password reset header text
109
+ */
110
+ this.passwordResetHeader = "Password reset";
111
+ /**
112
+ * @uiName Password reset button text
113
+ */
114
+ this.resetPasswordButtonText = "Reset Password";
115
+ /**
116
+ * Displayed after a successful password reset
117
+ *
118
+ * @uiName Continue button text
119
+ */
120
+ this.continueButtonText = "Continue";
121
+ /**
122
+ * @uiName Confirm password field label
123
+ */
124
+ this.confirmPasswordFieldLabel = "Confirm Password";
94
125
  _extends.h$1(this);
95
126
  }
96
127
  disconnectedCallback() { }
@@ -110,6 +141,13 @@ function usePortalResetPasswordDemo(props) {
110
141
  confirmPassword: true,
111
142
  oobCodeValidating: false,
112
143
  oobCodeValid: true,
144
+ content: {
145
+ passwordResetHeader: "Password reset",
146
+ resetPasswordHeader: "Reset your password",
147
+ continueButtonText: "Continue",
148
+ resetPasswordButtonText: "Reset Password",
149
+ confirmPasswordFieldLabel: "Confirm Password",
150
+ },
113
151
  },
114
152
  callbacks: {
115
153
  submit: async (_event) => {
@@ -104,7 +104,7 @@ const PortalVerifyEmail = class {
104
104
  };
105
105
  function usePortalVerifyEmailDemo(props) {
106
106
  return cjs.cjs({
107
- states: { error: "", loading: false, verified: false },
107
+ states: { error: "", loading: false, verified: true },
108
108
  data: {
109
109
  oobCode: "code",
110
110
  },
@@ -8,6 +8,7 @@
8
8
  "./components/sqm-edit-profile/sqm-edit-profile.js",
9
9
  "./components/sqm-form-message/sqm-form-message.js",
10
10
  "./components/sqm-graphql-client-provider/sqm-graphql-client-provider.js",
11
+ "./components/sqm-hero/sqm-hero.js",
11
12
  "./components/sqm-hook-story-container/sqm-hook-story-container.js",
12
13
  "./components/sqm-leaderboard/sqm-leaderboard.js",
13
14
  "./components/sqm-leaderboard-rank/sqm-leaderboard-rank.js",
@@ -18,6 +19,7 @@
18
19
  "./components/sqm-portal-change-password/sqm-portal-change-password.js",
19
20
  "./components/sqm-portal-container/sqm-portal-container.js",
20
21
  "./components/sqm-portal-email-verification/sqm-portal-email-verification.js",
22
+ "./components/sqm-portal-footer/sqm-portal-footer.js",
21
23
  "./components/sqm-portal-forgot-password/sqm-portal-forgot-password.js",
22
24
  "./components/sqm-portal-frame/sqm-portal-frame.js",
23
25
  "./components/sqm-portal-login/sqm-portal-login.js",
@@ -0,0 +1,73 @@
1
+ import { h } from "@stencil/core";
2
+ import jss from "jss";
3
+ import preset from "jss-preset-default";
4
+ export function HeroView(props) {
5
+ const { states, content } = props;
6
+ const isValidColor = (teststr) => {
7
+ return CSS.supports(`(color: ${teststr})`);
8
+ };
9
+ const parseBackground = (provided_bg) => {
10
+ if (provided_bg) {
11
+ if (isValidColor(provided_bg)) {
12
+ return provided_bg;
13
+ }
14
+ else {
15
+ return `url(${provided_bg})`;
16
+ }
17
+ }
18
+ else {
19
+ return "";
20
+ }
21
+ };
22
+ const column = {
23
+ display: "flex",
24
+ flexDirection: "column",
25
+ alignItems: "center",
26
+ justifyContent: "center",
27
+ minHeight: "100%",
28
+ };
29
+ const style = {
30
+ TwoColumnContainer: {
31
+ display: "flex",
32
+ flexWrap: states.wrapDirection,
33
+ "& > div": { flex: "1", minWidth: "300px" },
34
+ },
35
+ ColumnWrapper: {
36
+ ...column,
37
+ },
38
+ SingleColumnContainer: {
39
+ ...column,
40
+ },
41
+ Container: {
42
+ width: "100%",
43
+ flex: 1,
44
+ ...column,
45
+ alignItems: "unset",
46
+ background: `no-repeat center/cover ${parseBackground(states.background)}`,
47
+ },
48
+ };
49
+ jss.setup(preset());
50
+ const sheet = jss.createStyleSheet(style);
51
+ const styleString = sheet.toString();
52
+ const vanillaStyle = `
53
+ :host{
54
+ height: 100%;
55
+ display: contents;
56
+ }
57
+ sqm-hero{
58
+ height: 100%;
59
+ display: contents;
60
+ }
61
+ img{
62
+ max-width: 100%;
63
+ height: auto;
64
+ }
65
+ `;
66
+ return (h("div", { class: sheet.classes.Container },
67
+ h("style", { type: "text/css" },
68
+ vanillaStyle,
69
+ styleString),
70
+ states.columns == 2 ? (h("div", { class: sheet.classes.TwoColumnContainer },
71
+ h("div", { class: sheet.classes.ColumnWrapper }, content.primaryColumn),
72
+ h("div", { class: sheet.classes.ColumnWrapper }, content.secondaryColumn))) : (h("div", { class: sheet.classes.SingleColumnContainer }, content.primaryColumn))));
73
+ }
@@ -0,0 +1,95 @@
1
+ import { Component, h, Prop } from "@stencil/core";
2
+ import { withHooks } from "@saasquatch/stencil-hooks";
3
+ import { HeroView } from "./sqm-hero-view";
4
+ import { getProps } from "../../utils/utils";
5
+ /**
6
+ * The hero container
7
+ *
8
+ * @uiName Hero Layout
9
+ */
10
+ export class Hero {
11
+ constructor() {
12
+ /** @uiName Number of columns in the layout */
13
+ this.columns = 1;
14
+ /** @uiName Wrap direction */
15
+ this.wrapDirection = "wrap";
16
+ withHooks(this);
17
+ }
18
+ disconnectedCallback() { }
19
+ render() {
20
+ const props = {
21
+ states: { ...getProps(this) },
22
+ content: {
23
+ primaryColumn: h("slot", null),
24
+ secondaryColumn: h("slot", { name: "secondary-column" }),
25
+ },
26
+ };
27
+ return h(HeroView, Object.assign({}, props));
28
+ }
29
+ static get is() { return "sqm-hero"; }
30
+ static get encapsulation() { return "shadow"; }
31
+ static get properties() { return {
32
+ "columns": {
33
+ "type": "number",
34
+ "mutable": false,
35
+ "complexType": {
36
+ "original": "1 | 2",
37
+ "resolved": "1 | 2",
38
+ "references": {}
39
+ },
40
+ "required": false,
41
+ "optional": false,
42
+ "docs": {
43
+ "tags": [{
44
+ "text": "Number of columns in the layout",
45
+ "name": "uiName"
46
+ }],
47
+ "text": ""
48
+ },
49
+ "attribute": "columns",
50
+ "reflect": false,
51
+ "defaultValue": "1"
52
+ },
53
+ "background": {
54
+ "type": "string",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "string",
58
+ "resolved": "string",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": true,
63
+ "docs": {
64
+ "tags": [{
65
+ "text": "Background image or color",
66
+ "name": "uiName"
67
+ }],
68
+ "text": ""
69
+ },
70
+ "attribute": "background",
71
+ "reflect": false
72
+ },
73
+ "wrapDirection": {
74
+ "type": "string",
75
+ "mutable": false,
76
+ "complexType": {
77
+ "original": "\"wrap\" | \"wrap-reverse\"",
78
+ "resolved": "\"wrap\" | \"wrap-reverse\"",
79
+ "references": {}
80
+ },
81
+ "required": false,
82
+ "optional": false,
83
+ "docs": {
84
+ "tags": [{
85
+ "text": "Wrap direction",
86
+ "name": "uiName"
87
+ }],
88
+ "text": ""
89
+ },
90
+ "attribute": "wrap-direction",
91
+ "reflect": false,
92
+ "defaultValue": "\"wrap\""
93
+ }
94
+ }; }
95
+ }
@@ -8,7 +8,7 @@ export function NavigationSidebarItemView(props) {
8
8
  const style = {
9
9
  ItemContainer: {
10
10
  display: "flex",
11
- "background-color": `${states.active ? "#eaeaea" : "#ffffff"}`,
11
+ "background-color": `${states.active ? "var(--sl-color-gray-200)" : "var(--sl-color-white)"}`,
12
12
  "border-radius": "8px",
13
13
  padding: "8px",
14
14
  "text-decoration": "none",
@@ -17,7 +17,7 @@ export function NavigationSidebarItemView(props) {
17
17
  ...gap({ direction: "row", size: "var(--sl-font-size-small)" }),
18
18
  "&:hover": {
19
19
  cursor: "pointer",
20
- background: states.active ? "#dddddd" : "#f7f7f7",
20
+ background: states.active ? "var(--sl-color-gray-300)" : "var(--sl-color-gray-50)",
21
21
  },
22
22
  },
23
23
  Label: {
@@ -120,8 +120,8 @@ function useSidebarItemDemo(props) {
120
120
  active: false,
121
121
  },
122
122
  data: {
123
- label: "Dashboard",
124
- icon: "house",
123
+ label: props.label || "Dashboard",
124
+ icon: props.icon || "house",
125
125
  },
126
126
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
127
127
  }
@@ -35,6 +35,13 @@ export function PortalChangePasswordView(props) {
35
35
  width: "25%",
36
36
  margin: "var(--sl-spacing-large) auto",
37
37
  },
38
+ PasswordField: {
39
+ marginBottom: "var(--sl-spacing-large) !important",
40
+ display: "block",
41
+ },
42
+ ChangePasswordButton: {
43
+ paddingTop: "var(--sl-spacing-x-large)",
44
+ },
38
45
  };
39
46
  jss.setup(preset());
40
47
  const sheet = jss.createStyleSheet(style);
@@ -45,25 +52,25 @@ export function PortalChangePasswordView(props) {
45
52
  h(PortalSectionView, Object.assign({}, {
46
53
  labelMargin: "x-large",
47
54
  padding: "none",
48
- label: (h(TextSpanView, Object.assign({}, { type: "h2" }), "Change password")),
55
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
49
56
  content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
50
57
  states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
51
58
  h("div", { part: "erroralert-text" }, states.error))),
52
59
  states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
53
- h("div", { part: "successalert-text" }, "Your password has been updated."))),
60
+ h("div", { part: "successalert-text" }, states.content.successMessage))),
54
61
  h("sl-form", { "onSl-submit": callbacks.submit },
55
62
  h("div", { class: sheet.classes.InputContainer },
56
- h("sqm-password-field", null),
57
- h("sl-input", { name: "/confirmPassword", label: "Confirm new password", required: true, togglePassword: true, disabled: states.loading, type: "password" })),
63
+ h("sqm-password-field", { class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel }),
64
+ h("sl-input", { name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
58
65
  h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
59
- h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, "Cancel"),
60
- h("sl-button", { type: "default", submit: true, loading: states.loading }, "Change Password"))))),
66
+ h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "default", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
67
+ h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
61
68
  }))),
62
69
  h(PortalSectionView, Object.assign({}, {
63
70
  labelMargin: "x-large",
64
71
  padding: "xxx-large",
65
- label: h(TextSpanView, Object.assign({}, { type: "h2" }), "Password"),
66
- content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, "Change your password...")),
72
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
73
+ content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
67
74
  }),
68
75
  h("style", { type: "text/css" }, styleString))));
69
76
  }
@@ -10,6 +10,38 @@ import deepmerge from "deepmerge";
10
10
  export class PortalChangePassword {
11
11
  constructor() {
12
12
  this.ignored = true;
13
+ /**
14
+ * @uiName Change password modal header
15
+ */
16
+ this.modalChangePasswordHeader = "Change Password";
17
+ /**
18
+ * @uiName Modal cancel password change button text
19
+ */
20
+ this.cancelText = "Cancel";
21
+ /**
22
+ * @uiName Modal change password button text
23
+ */
24
+ this.changePasswordButtonText = "Change Password";
25
+ /**
26
+ * @uiName Password input field label
27
+ */
28
+ this.passwordFieldLabel = "Password";
29
+ /**
30
+ * @uiName Password confirmation input field label
31
+ */
32
+ this.confirmPasswordFieldLabel = "Confirm new password";
33
+ /**
34
+ * @uiName Successful password change message
35
+ */
36
+ this.successMessage = "Your password has been updated.";
37
+ /**
38
+ * @uiName Portal change password section header
39
+ */
40
+ this.portalChangePasswordHeader = "Password";
41
+ /**
42
+ * @uiName Portal change password button text
43
+ */
44
+ this.portalChangePasswordButtonText = "Change your password...";
13
45
  withHooks(this);
14
46
  }
15
47
  disconnectedCallback() { }
@@ -22,12 +54,180 @@ export class PortalChangePassword {
22
54
  static get is() { return "sqm-portal-change-password"; }
23
55
  static get encapsulation() { return "shadow"; }
24
56
  static get properties() { return {
57
+ "modalChangePasswordHeader": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "string",
62
+ "resolved": "string",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": false,
67
+ "docs": {
68
+ "tags": [{
69
+ "text": "Change password modal header",
70
+ "name": "uiName"
71
+ }],
72
+ "text": ""
73
+ },
74
+ "attribute": "modal-change-password-header",
75
+ "reflect": false,
76
+ "defaultValue": "\"Change Password\""
77
+ },
78
+ "cancelText": {
79
+ "type": "string",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "string",
83
+ "resolved": "string",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [{
90
+ "text": "Modal cancel password change button text",
91
+ "name": "uiName"
92
+ }],
93
+ "text": ""
94
+ },
95
+ "attribute": "cancel-text",
96
+ "reflect": false,
97
+ "defaultValue": "\"Cancel\""
98
+ },
99
+ "changePasswordButtonText": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [{
111
+ "text": "Modal change password button text",
112
+ "name": "uiName"
113
+ }],
114
+ "text": ""
115
+ },
116
+ "attribute": "change-password-button-text",
117
+ "reflect": false,
118
+ "defaultValue": "\"Change Password\""
119
+ },
120
+ "passwordFieldLabel": {
121
+ "type": "string",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "string",
125
+ "resolved": "string",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": false,
130
+ "docs": {
131
+ "tags": [{
132
+ "text": "Password input field label",
133
+ "name": "uiName"
134
+ }],
135
+ "text": ""
136
+ },
137
+ "attribute": "password-field-label",
138
+ "reflect": false,
139
+ "defaultValue": "\"Password\""
140
+ },
141
+ "confirmPasswordFieldLabel": {
142
+ "type": "string",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "string",
146
+ "resolved": "string",
147
+ "references": {}
148
+ },
149
+ "required": false,
150
+ "optional": false,
151
+ "docs": {
152
+ "tags": [{
153
+ "text": "Password confirmation input field label",
154
+ "name": "uiName"
155
+ }],
156
+ "text": ""
157
+ },
158
+ "attribute": "confirm-password-field-label",
159
+ "reflect": false,
160
+ "defaultValue": "\"Confirm new password\""
161
+ },
162
+ "successMessage": {
163
+ "type": "string",
164
+ "mutable": false,
165
+ "complexType": {
166
+ "original": "string",
167
+ "resolved": "string",
168
+ "references": {}
169
+ },
170
+ "required": false,
171
+ "optional": false,
172
+ "docs": {
173
+ "tags": [{
174
+ "text": "Successful password change message",
175
+ "name": "uiName"
176
+ }],
177
+ "text": ""
178
+ },
179
+ "attribute": "success-message",
180
+ "reflect": false,
181
+ "defaultValue": "\"Your password has been updated.\""
182
+ },
183
+ "portalChangePasswordHeader": {
184
+ "type": "string",
185
+ "mutable": false,
186
+ "complexType": {
187
+ "original": "string",
188
+ "resolved": "string",
189
+ "references": {}
190
+ },
191
+ "required": false,
192
+ "optional": false,
193
+ "docs": {
194
+ "tags": [{
195
+ "text": "Portal change password section header",
196
+ "name": "uiName"
197
+ }],
198
+ "text": ""
199
+ },
200
+ "attribute": "portal-change-password-header",
201
+ "reflect": false,
202
+ "defaultValue": "\"Password\""
203
+ },
204
+ "portalChangePasswordButtonText": {
205
+ "type": "string",
206
+ "mutable": false,
207
+ "complexType": {
208
+ "original": "string",
209
+ "resolved": "string",
210
+ "references": {}
211
+ },
212
+ "required": false,
213
+ "optional": false,
214
+ "docs": {
215
+ "tags": [{
216
+ "text": "Portal change password button text",
217
+ "name": "uiName"
218
+ }],
219
+ "text": ""
220
+ },
221
+ "attribute": "portal-change-password-button-text",
222
+ "reflect": false,
223
+ "defaultValue": "\"Change your password...\""
224
+ },
25
225
  "demoData": {
26
226
  "type": "unknown",
27
227
  "mutable": false,
28
228
  "complexType": {
29
229
  "original": "DemoData<PortalChangePasswordViewProps>",
30
- "resolved": "{ states?: { open: boolean; error: string; loading: boolean; success: boolean; }; }",
230
+ "resolved": "{ states?: { open: boolean; error: string; loading: boolean; success: boolean; content: { modalChangePasswordHeader: string; cancelText: string; changePasswordButtonText: string; passwordFieldLabel: string; confirmPasswordFieldLabel: string; successMessage: string; portalChangePasswordHeader: string; portalChangePasswordButtonText: string; }; }; }",
31
231
  "references": {
32
232
  "DemoData": {
33
233
  "location": "import",
@@ -59,7 +259,20 @@ export class PortalChangePassword {
59
259
  }
60
260
  function usePortalChangePasswordDemo(props) {
61
261
  return deepmerge({
62
- states: { open: true, error: "" },
262
+ states: {
263
+ open: true,
264
+ error: "",
265
+ content: {
266
+ modalChangePasswordHeader: "Change Password",
267
+ cancelText: "Cancel",
268
+ changePasswordButtonText: "Change Password",
269
+ passwordFieldLabel: "Password",
270
+ confirmPasswordFieldLabel: "Confirm new password",
271
+ successMessage: "Your password has been updated.",
272
+ portalChangePasswordHeader: "Password",
273
+ portalChangePasswordButtonText: "Change your password...",
274
+ },
275
+ },
63
276
  callbacks: {
64
277
  setOpen: (o) => console.log(o),
65
278
  submit: (e) => console.log("Submit", e),
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useState } from "@saasquatch/universal-hooks";
2
2
  import jsonpointer from "jsonpointer";
3
3
  import { useChangePasswordMutation, useUserIdentity, } from "@saasquatch/component-boilerplate";
4
- export function usePortalChangePassword(_props) {
4
+ export function usePortalChangePassword(props) {
5
5
  var _a, _b, _c, _d;
6
6
  const [request, { loading, errors, data }] = useChangePasswordMutation();
7
7
  const [open, setOpen] = useState(false);
@@ -41,6 +41,16 @@ export function usePortalChangePassword(_props) {
41
41
  loading,
42
42
  success,
43
43
  error: error || ((_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),
44
+ content: {
45
+ modalChangePasswordHeader: props.modalChangePasswordHeader,
46
+ cancelText: props.cancelText,
47
+ changePasswordButtonText: props.changePasswordButtonText,
48
+ passwordFieldLabel: props.passwordFieldLabel,
49
+ confirmPasswordFieldLabel: props.confirmPasswordFieldLabel,
50
+ successMessage: props.successMessage,
51
+ portalChangePasswordHeader: props.portalChangePasswordHeader,
52
+ portalChangePasswordButtonText: props.changePasswordButtonText,
53
+ },
44
54
  },
45
55
  data: {},
46
56
  callbacks: {