@saasquatch/mint-components 1.5.1-3 → 1.5.2

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 (108) hide show
  1. package/CHANGELOG.md +28 -4
  2. package/dist/cjs/{ShadowViewAddon-8151e5d3.js → ShadowViewAddon-9b256c28.js} +1 -1
  3. package/dist/cjs/sqm-big-stat_34.cjs.entry.js +15 -20
  4. package/dist/cjs/sqm-empty_5.cjs.entry.js +1 -1
  5. package/dist/cjs/sqm-hero.cjs.entry.js +1 -1
  6. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +1 -1
  7. package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
  8. package/dist/cjs/sqm-portal-footer.cjs.entry.js +1 -1
  9. package/dist/cjs/sqm-portal-profile.cjs.entry.js +1 -1
  10. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +3 -4
  11. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +3 -4
  12. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  13. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
  14. package/dist/cjs/sqm-stencilbook.cjs.entry.js +4 -4
  15. package/dist/cjs/sqm-tabs.cjs.entry.js +1 -1
  16. package/dist/cjs/{utils-01dbfd4a.js → utils-8ef4fe4a.js} +9 -0
  17. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
  18. package/dist/collection/components/sqm-checkbox-field/useCheckboxField.js +2 -2
  19. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
  20. package/dist/collection/components/sqm-dropdown-field/useDropdownField.js +2 -2
  21. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -1
  22. package/dist/collection/components/sqm-name-fields/useNameFields.js +2 -2
  23. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -5
  24. package/dist/collection/components/sqm-portal-register/useValidationState.js +2 -2
  25. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +3 -4
  26. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +3 -4
  27. package/dist/collection/utils/utils.js +8 -0
  28. package/dist/esm/{ShadowViewAddon-e42c07c6.js → ShadowViewAddon-b98faaf1.js} +1 -1
  29. package/dist/esm/sqm-big-stat_34.entry.js +16 -21
  30. package/dist/esm/sqm-empty_5.entry.js +1 -1
  31. package/dist/esm/sqm-hero.entry.js +1 -1
  32. package/dist/esm/sqm-navigation-sidebar-item.entry.js +1 -1
  33. package/dist/esm/sqm-popup-container.entry.js +1 -1
  34. package/dist/esm/sqm-portal-footer.entry.js +1 -1
  35. package/dist/esm/sqm-portal-profile.entry.js +1 -1
  36. package/dist/esm/sqm-portal-reset-password.entry.js +3 -4
  37. package/dist/esm/sqm-portal-verify-email.entry.js +3 -4
  38. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  39. package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
  40. package/dist/esm/sqm-stencilbook.entry.js +4 -4
  41. package/dist/esm/sqm-tabs.entry.js +1 -1
  42. package/dist/esm/{utils-1d345130.js → utils-d7bbb0e2.js} +9 -1
  43. package/dist/esm-es5/{ShadowViewAddon-e42c07c6.js → ShadowViewAddon-b98faaf1.js} +1 -1
  44. package/dist/esm-es5/sqm-big-stat_34.entry.js +1 -1
  45. package/dist/esm-es5/sqm-empty_5.entry.js +1 -1
  46. package/dist/esm-es5/sqm-hero.entry.js +1 -1
  47. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  48. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  49. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  50. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  51. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  52. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  53. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  54. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  55. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  56. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  57. package/dist/esm-es5/{utils-1d345130.js → utils-d7bbb0e2.js} +1 -1
  58. package/dist/mint-components/mint-components.esm.js +1 -1
  59. package/dist/mint-components/p-33707867.system.entry.js +1 -0
  60. package/dist/mint-components/{p-57fc3f18.entry.js → p-342bfc16.entry.js} +1 -1
  61. package/dist/mint-components/{p-01baf2e6.entry.js → p-35a26fcd.entry.js} +1 -1
  62. package/dist/mint-components/{p-b593cb86.entry.js → p-36c073ce.entry.js} +1 -1
  63. package/dist/mint-components/p-436da6b8.system.js +1 -1
  64. package/dist/mint-components/{p-2d07b528.system.entry.js → p-50019ebe.system.entry.js} +1 -1
  65. package/dist/mint-components/p-52ca31c9.entry.js +150 -0
  66. package/dist/mint-components/{p-777b4178.system.entry.js → p-58442d48.system.entry.js} +1 -1
  67. package/dist/mint-components/{p-87a0f6ff.system.entry.js → p-67958347.system.entry.js} +1 -1
  68. package/dist/mint-components/{p-6c9bd397.system.js → p-842aa194.system.js} +1 -1
  69. package/dist/mint-components/{p-81571092.system.entry.js → p-85771eab.system.entry.js} +1 -1
  70. package/dist/mint-components/{p-9875ace8.entry.js → p-8894c616.entry.js} +1 -1
  71. package/dist/mint-components/p-8a1a1fb4.system.entry.js +1 -0
  72. package/dist/mint-components/{p-4e05c65a.js → p-9c5f124f.js} +1 -1
  73. package/dist/mint-components/p-a624b8d7.system.entry.js +1 -0
  74. package/dist/mint-components/p-a92677a0.system.js +1 -0
  75. package/dist/mint-components/{p-ddafff46.entry.js → p-b1766f84.entry.js} +1 -1
  76. package/dist/mint-components/p-b176c55c.entry.js +9 -0
  77. package/dist/mint-components/{p-510b0ce1.entry.js → p-c5f46105.entry.js} +1 -1
  78. package/dist/mint-components/{p-0db65ced.system.entry.js → p-c712f1ca.system.entry.js} +1 -1
  79. package/dist/mint-components/{p-081b8938.system.entry.js → p-d3e114bb.system.entry.js} +1 -1
  80. package/dist/mint-components/p-d4cc87d9.entry.js +1 -0
  81. package/dist/mint-components/p-d5bc4139.entry.js +1 -0
  82. package/dist/mint-components/p-e17c7323.system.entry.js +1 -0
  83. package/dist/mint-components/{p-138dcf89.system.entry.js → p-e3a7bab7.system.entry.js} +1 -1
  84. package/dist/mint-components/{p-3ab9f1ae.system.entry.js → p-e60132f2.system.entry.js} +1 -1
  85. package/dist/mint-components/{p-c888a6a8.entry.js → p-e7561cbf.entry.js} +1 -1
  86. package/dist/mint-components/{p-c94a507b.entry.js → p-f209785c.entry.js} +1 -1
  87. package/dist/mint-components/{p-2c98a3fb.system.entry.js → p-f69ecdf7.system.entry.js} +1 -1
  88. package/dist/mint-components/{p-55358561.js → p-f702ffef.js} +1 -1
  89. package/dist/mint-components/{p-47cf728e.entry.js → p-fe887951.entry.js} +1 -1
  90. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field-view.d.ts +2 -1
  91. package/dist/types/components/sqm-checkbox-field/useCheckboxField.d.ts +1 -5
  92. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field-view.d.ts +2 -1
  93. package/dist/types/components/sqm-dropdown-field/useDropdownField.d.ts +1 -5
  94. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +2 -1
  95. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -5
  96. package/dist/types/components/sqm-portal-register/useValidationState.d.ts +1 -0
  97. package/dist/types/utils/utils.d.ts +1 -0
  98. package/grapesjs/grapesjs.js +1 -1
  99. package/package.json +2 -2
  100. package/dist/mint-components/p-471ed708.system.entry.js +0 -1
  101. package/dist/mint-components/p-4ab34bd0.system.entry.js +0 -1
  102. package/dist/mint-components/p-55d9ba7f.system.entry.js +0 -1
  103. package/dist/mint-components/p-5784d5aa.entry.js +0 -150
  104. package/dist/mint-components/p-771cf678.entry.js +0 -1
  105. package/dist/mint-components/p-a0692a19.system.entry.js +0 -1
  106. package/dist/mint-components/p-bd7879fc.entry.js +0 -9
  107. package/dist/mint-components/p-c17c4a4d.entry.js +0 -1
  108. package/dist/mint-components/p-c3f300e8.system.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
2
- import { m as h, e as useEffect, o as d, k as useState, f as useRef, y, b as browser, u as useReducer } from './stencil-hooks.module-acc8a613.js';
2
+ import { m as h, e as useEffect, y, o as d, k as useState, f as useRef, b as browser, u as useReducer } from './stencil-hooks.module-acc8a613.js';
3
3
  import { i as intl } from './global-15cdf41a.js';
4
4
  import { u as useCallback } from './use-callback-7e0bfd3b.js';
5
5
  import { j as jn, P, d as dist, i as ie, b as sn, q as qe, M, r as rn, c as dn, g as $e, E as Ee, D as De, H as He, l as ln, R as Rn, A as An } from './index.module-f5e17a4e.js';
@@ -11,10 +11,10 @@ import { c as createStyleSheet } from './JSS-418cab16.js';
11
11
  import { a as useRequestRerender } from './re-render-8f0a7ab1.js';
12
12
  import { u as useChildElements } from './useChildElements-3ffd7077.js';
13
13
  import './luxon-f44215d9.js';
14
- import { g as getProps, a as getMissingProps } from './utils-1d345130.js';
14
+ import { g as getProps, s as sanitizeUrlPath, a as getMissingProps } from './utils-d7bbb0e2.js';
15
15
  import './sqm-text-span-view-020db63f.js';
16
16
  import './sqm-portal-container-view-34f26e2a.js';
17
- import { c as useDemoBigStat, J as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, K as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, M as demoRewardExchange, i as RewardExchangeView, O as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-e42c07c6.js';
17
+ import { c as useDemoBigStat, J as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, K as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, M as demoRewardExchange, i as RewardExchangeView, O as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-b98faaf1.js';
18
18
  import './sqm-portal-section-view-c8d1c727.js';
19
19
 
20
20
  const BigStat = class {
@@ -119,9 +119,15 @@ const CardFeed = class {
119
119
  }
120
120
  };
121
121
 
122
- const CONTEXT_NAME = "sq:validation-state";
122
+ const FORM_VALIDATION_CONTEXT = "sq:validation-state";
123
+ function useValidationState(formState) {
124
+ const host = P();
125
+ const [validationState, setValidationState] = y(host, FORM_VALIDATION_CONTEXT, formState);
126
+ return { validationState, setValidationState };
127
+ }
128
+
123
129
  function useCheckboxField() {
124
- const validationState = d(CONTEXT_NAME);
130
+ const validationState = d(FORM_VALIDATION_CONTEXT);
125
131
  const [checked, setChecked] = useState(false);
126
132
  return {
127
133
  states: {
@@ -251,9 +257,8 @@ const DividedLayout = class {
251
257
  }
252
258
  };
253
259
 
254
- const CONTEXT_NAME$1 = "sq:validation-state";
255
260
  function useDropdownField() {
256
- const validationState = d(CONTEXT_NAME$1);
261
+ const validationState = d(FORM_VALIDATION_CONTEXT);
257
262
  return {
258
263
  states: {
259
264
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
@@ -934,9 +939,8 @@ function useLeaderboardDemo(props) {
934
939
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
935
940
  }
936
941
 
937
- const CONTEXT_NAME$2 = "sq:validation-state";
938
942
  function useNameFields(props) {
939
- const validationState = d(CONTEXT_NAME$2);
943
+ const validationState = d(FORM_VALIDATION_CONTEXT);
940
944
  return {
941
945
  states: {
942
946
  validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
@@ -1243,10 +1247,8 @@ function usePortalLogin(props) {
1243
1247
  var _a;
1244
1248
  if ((_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token) {
1245
1249
  urlParams.delete("nextPage");
1246
- dn.push({
1247
- pathname: nextPageOverride || props.nextPage,
1248
- search: urlParams.toString() && "?" + urlParams.toString(),
1249
- });
1250
+ const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
1251
+ dn.push(url.href);
1250
1252
  }
1251
1253
  }, [(_a = data === null || data === void 0 ? void 0 : data.authenticateManagedIdentityWithEmailAndPassword) === null || _a === void 0 ? void 0 : _a.token]);
1252
1254
  useEffect(() => {
@@ -1261,7 +1263,7 @@ function usePortalLogin(props) {
1261
1263
  loading,
1262
1264
  error: errorMessage,
1263
1265
  registerPath: props.registerPath,
1264
- forgotPasswordPath: props.forgotPasswordPath
1266
+ forgotPasswordPath: props.forgotPasswordPath,
1265
1267
  },
1266
1268
  callbacks: {
1267
1269
  submit,
@@ -1343,13 +1345,6 @@ function useLoginDemo(props) {
1343
1345
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
1344
1346
  }
1345
1347
 
1346
- const CONTEXT_NAME$3 = "sq:validation-state";
1347
- function useValidationState(formState) {
1348
- const host = P();
1349
- const [validationState, setValidationState] = y(host, CONTEXT_NAME$3, formState);
1350
- return { validationState, setValidationState };
1351
- }
1352
-
1353
1348
  // This file is a workaround for a bug in web browsers' "native"
1354
1349
  // ES6 importing system which is uncapable of importing "*.json" files.
1355
1350
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
@@ -2,7 +2,7 @@ import { h, r as registerInstance, c as Host } from './index-17b4da69.js';
2
2
  import { m as h$1 } from './stencil-hooks.module-acc8a613.js';
3
3
  import './extends-c31f1eff.js';
4
4
  import { c as createStyleSheet } from './JSS-418cab16.js';
5
- import { g as getProps } from './utils-1d345130.js';
5
+ import { g as getProps } from './utils-d7bbb0e2.js';
6
6
  import { P as PortalContainerView } from './sqm-portal-container-view-34f26e2a.js';
7
7
  import { P as PortalSectionView } from './sqm-portal-section-view-c8d1c727.js';
8
8
 
@@ -3,7 +3,7 @@ import { m as h } from './stencil-hooks.module-acc8a613.js';
3
3
  import './use-callback-7e0bfd3b.js';
4
4
  import './extends-c31f1eff.js';
5
5
  import './JSS-418cab16.js';
6
- import { g as getProps } from './utils-1d345130.js';
6
+ import { g as getProps } from './utils-d7bbb0e2.js';
7
7
  import { H as HeroView } from './sqm-hero-view-99b40ec1.js';
8
8
 
9
9
  const Hero = class {
@@ -6,7 +6,7 @@ import './extends-c31f1eff.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
7
  import './mixins-59fd94b7.js';
8
8
  import './JSS-418cab16.js';
9
- import { g as getProps } from './utils-1d345130.js';
9
+ import { g as getProps } from './utils-d7bbb0e2.js';
10
10
  import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-73f753fa.js';
11
11
 
12
12
  function useNavigationSidebarItem(props) {
@@ -3,7 +3,7 @@ import { m as h$1 } from './stencil-hooks.module-acc8a613.js';
3
3
  import './use-callback-7e0bfd3b.js';
4
4
  import { R as Rn } from './index.module-f5e17a4e.js';
5
5
  import './extends-c31f1eff.js';
6
- import { g as getProps } from './utils-1d345130.js';
6
+ import { g as getProps } from './utils-d7bbb0e2.js';
7
7
 
8
8
  const PopupContainerView = (props) => {
9
9
  const { states, callbacks } = props;
@@ -5,7 +5,7 @@ import './use-callback-7e0bfd3b.js';
5
5
  import './index.module-f5e17a4e.js';
6
6
  import './extends-c31f1eff.js';
7
7
  import './JSS-418cab16.js';
8
- import { g as getProps } from './utils-1d345130.js';
8
+ import { g as getProps } from './utils-d7bbb0e2.js';
9
9
  import { P as PortalFooterView } from './sqm-portal-footer-view-d06c4b78.js';
10
10
 
11
11
  const PortalFooter = class {
@@ -6,7 +6,7 @@ import { d as dist, i as ie, b as sn, q as qe, j as jn } from './index.module-f5
6
6
  import './extends-c31f1eff.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './JSS-418cab16.js';
9
- import { g as getProps } from './utils-1d345130.js';
9
+ import { g as getProps } from './utils-d7bbb0e2.js';
10
10
  import './sqm-text-span-view-020db63f.js';
11
11
  import './sqm-portal-container-view-34f26e2a.js';
12
12
  import { P as PortalProfileView } from './sqm-portal-profile-view-28c39970.js';
@@ -7,6 +7,7 @@ import { j as jsonpointer } from './jsonpointer-388a7082.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './mixins-59fd94b7.js';
9
9
  import './JSS-418cab16.js';
10
+ import { s as sanitizeUrlPath } from './utils-d7bbb0e2.js';
10
11
  import './sqm-text-span-view-020db63f.js';
11
12
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-e0436989.js';
12
13
 
@@ -35,10 +36,8 @@ function usePortalResetPassword(props) {
35
36
  };
36
37
  const gotoNextPage = () => {
37
38
  urlParams.delete("nextPage");
38
- dn.push({
39
- pathname: nextPageOverride || props.nextPage,
40
- search: urlParams.toString() && "?" + urlParams.toString(),
41
- });
39
+ const url = sanitizeUrlPath(nextPageOverride || props.nextPage);
40
+ dn.push(url.href);
42
41
  };
43
42
  const failed = () => {
44
43
  dn.push({
@@ -6,6 +6,7 @@ import './extends-c31f1eff.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
7
  import './mixins-59fd94b7.js';
8
8
  import './JSS-418cab16.js';
9
+ import { s as sanitizeUrlPath } from './utils-d7bbb0e2.js';
9
10
  import './sqm-text-span-view-020db63f.js';
10
11
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-c489166b.js';
11
12
 
@@ -28,10 +29,8 @@ function usePortalVerifyEmail({ nextPage, failedPage }) {
28
29
  };
29
30
  const gotoNextPage = () => {
30
31
  urlParams.delete("nextPage");
31
- return dn.push({
32
- pathname: nextPageOverride || nextPage,
33
- search: urlParams.toString() && "?" + urlParams.toString(),
34
- });
32
+ const url = sanitizeUrlPath(nextPageOverride || nextPage);
33
+ dn.push(url.href);
35
34
  };
36
35
  const submit = async () => {
37
36
  if (oobCode) {
@@ -12,7 +12,7 @@ import { a as useRequestRerender, u as useRerenderListener } from './re-render-8
12
12
  import { u as useChildElements } from './useChildElements-3ffd7077.js';
13
13
  import { l as luxon } from './luxon-f44215d9.js';
14
14
  import { u as useReferralTable, t as tryMethod } from './useReferralTable-d8a7e3be.js';
15
- import { l as luxonLocale } from './utils-1d345130.js';
15
+ import { l as luxonLocale } from './utils-d7bbb0e2.js';
16
16
  import { T as TextSpanView } from './sqm-text-span-view-020db63f.js';
17
17
 
18
18
  const mockReferralData = (count = 4) => {
@@ -12,7 +12,7 @@ import { u as useRerenderListener, a as useRequestRerender } from './re-render-8
12
12
  import { u as useChildElements } from './useChildElements-3ffd7077.js';
13
13
  import { l as luxon } from './luxon-f44215d9.js';
14
14
  import { g as generateUserError } from './useReferralTable-d8a7e3be.js';
15
- import { l as luxonLocale } from './utils-1d345130.js';
15
+ import { l as luxonLocale } from './utils-d7bbb0e2.js';
16
16
 
17
17
  const mockRewardData = (count = 4) => {
18
18
  const data = [...Array(count)].map(() => getMockData());
@@ -9,7 +9,7 @@ import './mixins-59fd94b7.js';
9
9
  import { c as createStyleSheet } from './JSS-418cab16.js';
10
10
  import { G as GenericTableView } from './GenericTableView-8dc8ae86.js';
11
11
  import { l as luxon } from './luxon-f44215d9.js';
12
- import './utils-1d345130.js';
12
+ import './utils-d7bbb0e2.js';
13
13
  import './sqm-text-span-view-020db63f.js';
14
14
  import { A as AssetCardView } from './sqm-asset-card-view-68f80b85.js';
15
15
  import { H as HeroView } from './sqm-hero-view-99b40ec1.js';
@@ -23,7 +23,7 @@ import { P as PortalContainerView } from './sqm-portal-container-view-34f26e2a.j
23
23
  import { P as PortalProfileView } from './sqm-portal-profile-view-28c39970.js';
24
24
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-e0436989.js';
25
25
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-c489166b.js';
26
- import { S as ShareButtonView, L as LeaderboardView, a as ShareLinkView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as useDemoBigStat, d as StatContainerView, e as PortalChangePasswordView, f as PortalLoginView, g as PortalRegisterView, T as TaskCardView, h as ProgressBarView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, H as autoColorScaleCss, I as ShadowViewAddon } from './ShadowViewAddon-e42c07c6.js';
26
+ import { S as ShareButtonView, L as LeaderboardView, a as ShareLinkView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as useDemoBigStat, d as StatContainerView, e as PortalChangePasswordView, f as PortalLoginView, g as PortalRegisterView, T as TaskCardView, h as ProgressBarView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, H as autoColorScaleCss, I as ShadowViewAddon } from './ShadowViewAddon-b98faaf1.js';
27
27
  import { P as PortalSectionView } from './sqm-portal-section-view-c8d1c727.js';
28
28
 
29
29
  /**
@@ -4128,7 +4128,7 @@ const PortalEmailVerification = /*#__PURE__*/Object.freeze({
4128
4128
  EmailVerificationSuccess: EmailVerificationSuccess
4129
4129
  });
4130
4130
 
4131
- const scenario$7 = "@author:derek\r\n@owner:ian\r\nFeature: Reset Password\r\n\r\n Background: A user in on the password reset page\r\n Given a user who has been redirected to the password reset page\r\n\r\n @motivating\r\n Scenario: Users can reset their password\r\n Given a user has a valid oob code as a url query parameter\r\n When they enter their password twice\r\n And they click \"Update\"\r\n Then their password is updated\r\n And a banner with a success message is displayed\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n And the component <mayHave> \"failed-page\" with <value>\r\n Then they see an error message saying that their password reset code is invalid/expired\r\n When they click \"Continue\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | oobCode | mayHave | value | redirectPath |\r\n | invalid oob code | doesn't have | N/A | / |\r\n | non existant oob code | doesn't have | N/A | / |\r\n | invalid oob code | has | /login | /login |\r\n | non existant oob code | has | /login | /login |\r\n\r\n @motivating\r\n Scenario: Users must enter the same password twice to successfully reset their password\r\n Given a user has been redirected to the password reset page\r\n And they have a valid oob code as a url query parameter\r\n When they enter two different passwords into the password reset form\r\n And they click \"Update\"\r\n Then their password is not be reset\r\n And an error banner stating the input passwords must match appears\r\n And their password is not be reset\r\n When they enter the same password twice\r\n And they click \"Update\"\r\n Then a banner appears with a success message\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/activity\"";
4131
+ const scenario$7 = "@author:derek\r\n@owner:ian\r\nFeature: Reset Password\r\n\r\n Background: A user in on the password reset page\r\n Given a user who has been redirected to the password reset page\r\n\r\n @motivating\r\n Scenario: Users can reset their password\r\n Given a user has a valid oob code as a url query parameter\r\n When they enter their password twice\r\n And they click \"Update\"\r\n Then their password is updated\r\n And a banner with a success message is displayed\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n And the component <mayHave> \"failed-page\" with <value>\r\n Then they see an error message saying that their password reset code is invalid/expired\r\n When they click \"Continue\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | oobCode | mayHave | value | redirectPath |\r\n | invalid oob code | doesn't have | N/A | / |\r\n | non existant oob code | doesn't have | N/A | / |\r\n | invalid oob code | has | /login | /login |\r\n | non existant oob code | has | /login | /login |\r\n\r\n @motivating\r\n Scenario: Users must enter the same password twice to successfully reset their password\r\n Given a user has been redirected to the password reset page\r\n And they have a valid oob code as a url query parameter\r\n When they enter two different passwords into the password reset form\r\n And they click \"Update\"\r\n Then their password is not be reset\r\n And an error banner stating the input passwords must match appears\r\n And their password is not be reset\r\n When they enter the same password twice\r\n And they click \"Update\"\r\n Then a banner appears with a success message\r\n And they can log in with their new password\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has entered their password twice\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to \"/activity\"\r\n\r\n @motivating\r\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\r\n Given the component is loaded at <currentUrl>\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to <url>\r\n Examples:\r\n | currentUrl | url |\r\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\r\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\r\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\r\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\r\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\r\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\r\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\r\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\r\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\r\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\r\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\r\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\r\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\r\n\r\n @landmine\r\n Scenario Outline: Username and password are not persisted on redirects\r\n Given the component is loaded at <currentUrl>\r\n When they click \"Update\"\r\n Then their password is updated\r\n And they are redirected to <url>\r\n Examples:\r\n | currentUrl | url |\r\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |";
4132
4132
 
4133
4133
  const PortalResetPassword_stories = {
4134
4134
  title: "Components/Portal Reset Password",
@@ -4292,7 +4292,7 @@ const PortalResetPassword = /*#__PURE__*/Object.freeze({
4292
4292
  CodeValidating: CodeValidating
4293
4293
  });
4294
4294
 
4295
- const scenario$8 = "@author:derek\r\n@owner:ian\r\nFeature: Verify Email\r\n\r\n Background: A user is on the email verification page\r\n Given a user who has been redirected to the email verification page\r\n\r\n @motivating\r\n Scenario: Verifying your email takes you to the portal login page\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" appears\r\n When they click \"Continue\"\r\n Then they are redirected to login\r\n\r\n @motivating\r\n Scenario: Users are automatically redirected if they dont click \"Continue\"\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" appears\r\n When they wait 5 seconds\r\n Then they are redirected to login\r\n\r\n @motivating\r\n Scenario: Users are notified if verifying their email has failed\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email fails to be validated\r\n Then an banner is shown stating that an error occured\r\n\r\n @motivating\r\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n And the component <mayHave> \"failed-page\" with <value>\r\n Then they see an error message saying that their verification code is invalid/expired\r\n When they click \"Continue\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | oobCode | mayHave | value | redirectPath |\r\n | invalid oob code | doesn't have | N/A | / |\r\n | non existant oob code | doesn't have | N/A | / |\r\n | invalid oob code | has | /login | /login |\r\n | non existant oob code | has | /login | /login |\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to \"/activity\"\r\n\r\n @motivating\r\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\r\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\r\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to <nextPageParamValue>\r\n Examples:\r\n | mayHave | nextPageValue | nextPageParamValue |\r\n | has | /dashboard | /activity |\r\n | does not have | N/A | /activity |";
4295
+ const scenario$8 = "@author:derek\r\n@owner:ian\r\nFeature: Verify Email\r\n\r\n Background: A user is on the email verification page\r\n Given a user who has been redirected to the email verification page\r\n\r\n @motivating\r\n Scenario: Verifying your email takes you to the portal login page\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" appears\r\n When they click \"Continue\"\r\n Then they are redirected to login\r\n\r\n @motivating\r\n Scenario: Users are automatically redirected if they dont click \"Continue\"\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email is validated\r\n Then a button that says \"Continue\" appears\r\n When they wait 5 seconds\r\n Then they are redirected to login\r\n\r\n @motivating\r\n Scenario: Users are notified if verifying their email has failed\r\n Given a user has a valid oob code as a url query parameter\r\n When they click \"Verify Email\"\r\n Then the button enters a loading state\r\n When their email fails to be validated\r\n Then an banner is shown stating that an error occured\r\n\r\n @motivating\r\n Scenario Outline: Users cannot verify their email with an invalid or missing oob code\r\n Given a user has a <oobCode> as a url query parameter\r\n And the component <mayHave> \"failed-page\" with <value>\r\n Then they see an error message saying that their verification code is invalid/expired\r\n When they click \"Continue\"\r\n Then they are redirected to <redirectPath>\r\n Examples:\r\n | oobCode | mayHave | value | redirectPath |\r\n | invalid oob code | doesn't have | N/A | / |\r\n | non existant oob code | doesn't have | N/A | / |\r\n | invalid oob code | has | /login | /login |\r\n | non existant oob code | has | /login | /login |\r\n\r\n @motivating\r\n Scenario: Users are redirected to \"/\" by default\r\n Given the component does not have prop \"nextPage\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to \"/\"\r\n\r\n @motivating\r\n Scenario: Custom redirection can be configured\r\n Given the component has prop \"nextPage\" with value \"/activity\"\r\n And the users url does not contain a \"nextPage\" query parameter\r\n And a user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to \"/activity\"\r\n\r\n @motivating\r\n Scenario Outline: Users are redirected to the value of the nextPage url parameter if it exists\r\n Given the component <mayHave> prop \"nextPage\" with <nextPageValue>\r\n And the users url contains a \"nextPage\" query paramater with <nextPageParamValue>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n Then they are redirected to <nextPageParamValue>\r\n Examples:\r\n | mayHave | nextPageValue | nextPageParamValue |\r\n | has | /dashboard | /activity |\r\n | does not have | N/A | /activity |\r\n\r\n @motivating\r\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\r\n Given the component is loaded at <currentUrl>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n And they are redirected to <url>\r\n Examples:\r\n | currentUrl | url |\r\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\r\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\r\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\r\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\r\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\r\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\r\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\r\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\r\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\r\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\r\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\r\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\r\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\r\n\r\n @landmine\r\n Scenario Outline: Username and password are not persisted on redirects\r\n Given the component is loaded at <currentUrl>\r\n And the user has verified their email\r\n When they click \"Continue\"\r\n And they are redirected to <url>\r\n Examples:\r\n | currentUrl | url |\r\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |";
4296
4296
 
4297
4297
  const PortalVerifyEmail_stories = {
4298
4298
  title: "Components/Portal Verify Email",
@@ -4,7 +4,7 @@ import './use-callback-7e0bfd3b.js';
4
4
  import { P } from './index.module-f5e17a4e.js';
5
5
  import './extends-c31f1eff.js';
6
6
  import { u as useChildElements } from './useChildElements-3ffd7077.js';
7
- import { g as getProps } from './utils-1d345130.js';
7
+ import { g as getProps } from './utils-d7bbb0e2.js';
8
8
 
9
9
  const TabsView = ({ content, placement, }) => {
10
10
  // Vertical padding for top & bottom placement, horizontal for left & right.
@@ -28,6 +28,14 @@ function luxonLocale(locale) {
28
28
  const language = splitLocale[0];
29
29
  const country = splitLocale[1];
30
30
  return `${language}-${country.toUpperCase()}`;
31
+ }
32
+ function sanitizeUrlPath(path) {
33
+ const url = new URL(path, window.location.origin);
34
+ const cleanUrl = new URL(window.location.origin);
35
+ cleanUrl.pathname = url.pathname;
36
+ cleanUrl.search = url.search;
37
+ cleanUrl.hash = url.hash;
38
+ return cleanUrl;
31
39
  }
32
40
 
33
- export { getMissingProps as a, getProps as g, luxonLocale as l };
41
+ export { getMissingProps as a, getProps as g, luxonLocale as l, sanitizeUrlPath as s };