@saasquatch/mint-components 1.11.1-0 → 1.11.1-10

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 (48) hide show
  1. package/dist/cjs/{ShadowViewAddon-2c6026c3.js → ShadowViewAddon-af975b90.js} +16 -7
  2. package/dist/cjs/{copy-text-view-a22ad7e7.js → copy-text-view-35a47e8d.js} +70 -24
  3. package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
  4. package/dist/cjs/sqm-pagination_3.cjs.entry.js +16 -2
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -3
  6. package/dist/collection/components/sqm-pagination/sqm-pagination.js +1 -0
  7. package/dist/collection/components/sqm-referral-code/useReferralCode.js +5 -1
  8. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +15 -3
  9. package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +70 -25
  10. package/dist/collection/components/sqm-share-button/useShareButton.js +13 -8
  11. package/dist/collection/components/sqm-share-link/useShareLink.js +5 -1
  12. package/dist/esm/{ShadowViewAddon-5bb2b69a.js → ShadowViewAddon-faef41b7.js} +16 -7
  13. package/dist/esm/{copy-text-view-bf55abeb.js → copy-text-view-3fa5df7b.js} +71 -26
  14. package/dist/esm/sqm-big-stat_38.entry.js +2 -2
  15. package/dist/esm/sqm-pagination_3.entry.js +16 -2
  16. package/dist/esm/sqm-stencilbook.entry.js +3 -3
  17. package/dist/esm-es5/ShadowViewAddon-faef41b7.js +1 -0
  18. package/dist/esm-es5/copy-text-view-3fa5df7b.js +1 -0
  19. package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
  20. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/mint-components/mint-components.esm.js +1 -1
  23. package/dist/mint-components/{p-73c6b26d.entry.js → p-3d6d95f0.entry.js} +1 -1
  24. package/dist/mint-components/p-56760017.entry.js +13 -0
  25. package/dist/mint-components/p-5fc8d87c.system.js +1 -1
  26. package/dist/mint-components/{p-b71c0e2d.system.entry.js → p-650f6529.system.entry.js} +1 -1
  27. package/dist/mint-components/p-7a974e40.system.js +1 -0
  28. package/dist/mint-components/{p-4856b234.system.entry.js → p-85e74fae.system.entry.js} +1 -1
  29. package/dist/mint-components/p-b80a5030.system.js +1 -0
  30. package/dist/mint-components/{p-fec0ac31.js → p-baaf39b8.js} +24 -24
  31. package/dist/mint-components/{p-b0ce005d.entry.js → p-e11adbe0.entry.js} +2 -2
  32. package/dist/mint-components/p-ee284980.system.entry.js +1 -0
  33. package/dist/mint-components/p-f5e1e208.js +48 -0
  34. package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +2 -0
  35. package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +3 -0
  36. package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +3 -14
  37. package/dist/types/components.d.ts +6 -0
  38. package/docs/docs.docx +0 -0
  39. package/docs/raisins.json +1 -1
  40. package/grapesjs/grapesjs.js +1 -1
  41. package/package.json +1 -1
  42. package/dist/esm-es5/ShadowViewAddon-5bb2b69a.js +0 -1
  43. package/dist/esm-es5/copy-text-view-bf55abeb.js +0 -1
  44. package/dist/mint-components/p-1537b6ef.system.entry.js +0 -1
  45. package/dist/mint-components/p-646d302a.system.js +0 -1
  46. package/dist/mint-components/p-6628bc0e.system.js +0 -1
  47. package/dist/mint-components/p-66aac0fb.entry.js +0 -13
  48. package/dist/mint-components/p-c37137cd.js +0 -2
@@ -4,7 +4,7 @@ import { i as intl } from './global-b89b6edc.js';
4
4
  import { d as dist, H, Q, I as In, y as yn, $ as $e, B, a as getEnvironmentSDK, L } from './index.module-f122af7b.js';
5
5
  import { l as luxonLocale } from './utils-334c1e34.js';
6
6
  import { c as createStyleSheet, j as jss, a as create } from './JSS-67b5cff8.js';
7
- import { a as REFERRAL_CODES_NAMESPACE, C as CopyTextView } from './copy-text-view-bf55abeb.js';
7
+ import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_USED, C as CopyTextView } from './copy-text-view-3fa5df7b.js';
8
8
  import { c as cjs } from './cjs-bdfb4486.js';
9
9
  import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f60a614c.js';
10
10
  import { u as useChildElements } from './useChildElements-37daf533.js';
@@ -379,11 +379,15 @@ function useShareLink(props) {
379
379
  const contextData = In(REFERRAL_CODES_NAMESPACE);
380
380
  const { data } = yn(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
381
381
  const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
382
+ const [setUsed, usedRes] = $e(SET_CODE_USED);
382
383
  const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
383
384
  // Shown during loading
384
385
  "...";
385
386
  const [open, setOpen] = useState(false);
386
387
  function onClick() {
388
+ if (contextData) {
389
+ setUsed(true);
390
+ }
387
391
  // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
388
392
  // Only if called from a user-initiated event
389
393
  navigator.clipboard.writeText(copyString);
@@ -457,7 +461,7 @@ function GenericShare(messageLink, errorText) {
457
461
  return messageLink ? window.open(messageLink) : alert(errorText);
458
462
  }
459
463
  function useShareButton(props) {
460
- var _a, _b, _c;
464
+ var _a, _b;
461
465
  const { sharetitle, sharetext, medium } = props;
462
466
  const programId = props.programId ? props.programId : H();
463
467
  const user = Q();
@@ -467,24 +471,29 @@ function useShareButton(props) {
467
471
  shareMedium: medium.toUpperCase(),
468
472
  };
469
473
  const data = In(REFERRAL_CODES_NAMESPACE);
474
+ const overrideData = data === null || data === void 0 ? void 0 : data[medium];
470
475
  // only queries if a programId is available
471
- const res = yn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || (data === null || data === void 0 ? void 0 : data[medium]) !== undefined);
472
- const directLink = ((_a = data === null || data === void 0 ? void 0 : data[medium]) === null || _a === void 0 ? void 0 : _a.shareLink) || ((_c = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.viewer) === null || _c === void 0 ? void 0 : _c.shareLink);
476
+ const res = yn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
477
+ const [setUsed, usedRes] = $e(SET_CODE_USED);
478
+ const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink);
473
479
  const environment = getEnvironmentSDK();
474
480
  const hide = (medium.toLocaleUpperCase() === "SMS" &&
475
481
  window.orientation === undefined) ||
476
482
  (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
477
483
  function onClick() {
478
- var _a, _b, _c, _d, _e, _f;
484
+ var _a, _b, _c, _d;
485
+ if (overrideData) {
486
+ setUsed(true);
487
+ }
479
488
  if (medium.toLocaleUpperCase() === "FACEBOOK" &&
480
489
  environment.type === "SquatchAndroid") {
481
- FacebookShare(directLink, ((_a = data === null || data === void 0 ? void 0 : data[medium]) === null || _a === void 0 ? void 0 : _a.messageLink) || ((_c = (_b = res.data) === null || _b === void 0 ? void 0 : _b.viewer) === null || _c === void 0 ? void 0 : _c.messageLink), props.errorText);
490
+ FacebookShare(directLink, (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink), props.errorText);
482
491
  }
483
492
  else if (medium.toLocaleUpperCase() === "DIRECT") {
484
493
  NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
485
494
  }
486
495
  else {
487
- GenericShare(((_d = data === null || data === void 0 ? void 0 : data[medium]) === null || _d === void 0 ? void 0 : _d.messageLink) || ((_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.viewer) === null || _f === void 0 ? void 0 : _f.messageLink), props.errorText);
496
+ GenericShare((overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink), props.errorText);
488
497
  }
489
498
  }
490
499
  return { ...props, loading: res.loading, onClick, hide };
@@ -1,20 +1,72 @@
1
1
  import { h } from './index-17b4da69.js';
2
2
  import { f as useEffect } from './stencil-hooks.module-ac12ca1c.js';
3
- import { d as dist, Q, k as kn, C as Cn } from './index.module-f122af7b.js';
3
+ import { d as dist, Q, k as kn, C as Cn, B } from './index.module-f122af7b.js';
4
4
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
5
5
  import { H as HostBlock } from './mixins-f60a614c.js';
6
6
 
7
- const GET_REFERRAL_CODES = dist.gql `query getReferralCodes {
8
- }`;
7
+ const GET_REFERRAL_CODES = dist.gql `
8
+ query getCodes(
9
+ $limit: Int!
10
+ $offset: Int!
11
+ $engagementMedium: UserEngagementMedium!
12
+ ) {
13
+ viewer {
14
+ ... on User {
15
+ referralCodeList(
16
+ limit: $limit
17
+ offset: $offset
18
+ filter: { fuelTank_eq: true }
19
+ ) {
20
+ data {
21
+ code
22
+ dateUsed
23
+ dateCopied
24
+ shareLinkCodes(limit: $limit, offset: $offset) {
25
+ data {
26
+ linkCode
27
+ shareLink: shortUrl(
28
+ shareMedium: DIRECT
29
+ engagementMedium: EMBED
30
+ )
31
+ email: shortUrl(
32
+ shareMedium: EMAIL
33
+ engagementMedium: $engagementMedium
34
+ )
35
+ whatsApp: shortUrl(
36
+ shareMedium: WHATSAPP
37
+ engagementMedium: $engagementMedium
38
+ )
39
+ fbMessenger: shortUrl(
40
+ shareMedium: FBMESSENGER
41
+ engagementMedium: $engagementMedium
42
+ )
43
+ }
44
+ }
45
+ }
46
+ count
47
+ totalCount
48
+ }
49
+ }
50
+ }
51
+ }
52
+ `;
9
53
  const REFERRAL_CODES_NAMESPACE = "sq:referral-codes";
10
54
  const REFERRAL_CODES_PAGINATION_CONTEXT = "sq:referral-codes-pagination";
55
+ const SET_CODE_USED = dist.gql `
56
+ mutation test {}
57
+ `;
11
58
  function useReferralCodes(props) {
12
59
  const user = Q();
60
+ const engagementMedium = B();
13
61
  console.log({ props });
14
- const { envelope: referralData, states, callbacks, } = kn(GET_REFERRAL_CODES, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodes; }, {
62
+ const { envelope: referralData, states, callbacks, } = kn(GET_REFERRAL_CODES, (data) => {
63
+ var _a;
64
+ console.log({ queryData: data });
65
+ return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodeList;
66
+ }, {
15
67
  limit: 1,
16
68
  offset: 0,
17
- }, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
69
+ }, { engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt));
18
70
  const [paginationContext, setPaginationContext] = Cn({
19
71
  namespace: REFERRAL_CODES_PAGINATION_CONTEXT,
20
72
  initialValue: { states, callbacks },
@@ -36,40 +88,33 @@ function useReferralCodes(props) {
36
88
  },
37
89
  });
38
90
  useEffect(() => {
39
- if (referralData === null || referralData === void 0 ? void 0 : referralData.data)
91
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
92
+ if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
93
+ const data = referralData.data[0];
40
94
  setReferralCodesContext({
41
- referralCode: "EXAMPLECODE",
42
- shareLink: "https://example.com",
95
+ referralCode: data.code,
96
+ shareLink: (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.direct,
43
97
  email: {
44
- messageLink: "https://example.com",
98
+ messageLink: (_e = (_d = data.shareLinkCodes) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.email,
45
99
  },
46
100
  fbMessenger: {
47
- messageLink: "https://example.com",
48
- shareLink: "https://example.com",
101
+ messageLink: (_g = (_f = data.shareLinkCodes) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.fbMessenger,
102
+ shareLink: (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.fbMessenger,
49
103
  },
50
- whatsApp: { messageLink: "https://example.com" },
104
+ whatsApp: { messageLink: (_l = (_k = data.shareLinkCodes) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.whatsApp },
51
105
  });
106
+ }
52
107
  }, [referralData]);
53
108
  useEffect(() => {
54
109
  setPaginationContext({ states, callbacks });
55
- }, [states]);
110
+ }, [states.loading]);
56
111
  console.log({ referralData, states });
57
112
  return {
58
113
  states: {
59
114
  ...states,
115
+ noCodes: (referralData === null || referralData === void 0 ? void 0 : referralData.totalCount) === 0,
60
116
  },
61
- data: {
62
- referralCode: "EXAMPLECODE",
63
- shareLink: "https://example.com",
64
- email: {
65
- messageLink: "https://example.com",
66
- },
67
- fbMessenger: {
68
- messageLink: "https://example.com",
69
- shareLink: "https://example.com",
70
- },
71
- whatsApp: { messageLink: "https://example.com" },
72
- },
117
+ data: referralCodesContext,
73
118
  callbacks: {
74
119
  // onPrev: () => callbacks.setCurrentPage(states.currentPage - 1),
75
120
  // onNext: () => callbacks.setCurrentPage(states.currentPage + 1),
@@ -165,4 +210,4 @@ function CopyTextView(props) {
165
210
  props.showNotificationText && props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
166
211
  }
167
212
 
168
- export { CopyTextView as C, REFERRAL_CODES_PAGINATION_CONTEXT as R, REFERRAL_CODES_NAMESPACE as a, useReferralCodes as u };
213
+ export { CopyTextView as C, REFERRAL_CODES_PAGINATION_CONTEXT as R, SET_CODE_USED as S, REFERRAL_CODES_NAMESPACE as a, useReferralCodes as u };
@@ -5,7 +5,7 @@ import { i as isDemo, _, d as dist, Q, H, $ as $e, y as yn, B, L, g as gn, e as
5
5
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
6
6
  import { g as getProps, a as getMissingProps, s as sanitizeUrlPath } from './utils-334c1e34.js';
7
7
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
8
- import { C as CopyTextView } from './copy-text-view-bf55abeb.js';
8
+ import { C as CopyTextView } from './copy-text-view-3fa5df7b.js';
9
9
  import { c as cjs } from './cjs-bdfb4486.js';
10
10
  import './mixins-f60a614c.js';
11
11
  import { a as useRequestRerender } from './re-render-c64289f3.js';
@@ -16,7 +16,7 @@ import { p as pathToRegexp } from './index-ffa26b43.js';
16
16
  import { R as REGISTRATION_FORM_STATE_CONTEXT, u as useRegistrationFormState } from './useRegistrationFormState-53c71782.js';
17
17
  import { i as isEmpty } from './utilities-18d10876.js';
18
18
  import { A as AsYouType } from './AsYouType-46f67d0d.js';
19
- import { b as useDemoBigStat, U as useBigStat, B as BigStatView, O as autoColorScaleCss, J as CardFeedView, C as CheckboxFieldView, K as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, V as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, i as PortalFooterView, P as PortalFrameView, e as PortalLoginView, f as PortalRegisterView, R as ReferralIframeView, W as demoRewardExchange, j as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-5bb2b69a.js';
19
+ import { b as useDemoBigStat, U as useBigStat, B as BigStatView, O as autoColorScaleCss, J as CardFeedView, C as CheckboxFieldView, K as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, V as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, i as PortalFooterView, P as PortalFrameView, e as PortalLoginView, f as PortalRegisterView, R as ReferralIframeView, W as demoRewardExchange, j as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-faef41b7.js';
20
20
  import './sqm-portal-container-view-6c582684.js';
21
21
 
22
22
  const BigStat = class {
@@ -3,7 +3,7 @@ import { n as h$1, k as useState } from './stencil-hooks.module-ac12ca1c.js';
3
3
  import { I as In, i as isDemo, d as dist, H, Q, y as yn, $ as $e, B } from './index.module-f122af7b.js';
4
4
  import { g as getProps } from './utils-334c1e34.js';
5
5
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
6
- import { R as REFERRAL_CODES_PAGINATION_CONTEXT, a as REFERRAL_CODES_NAMESPACE, C as CopyTextView, u as useReferralCodes } from './copy-text-view-bf55abeb.js';
6
+ import { R as REFERRAL_CODES_PAGINATION_CONTEXT, a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_USED, C as CopyTextView, u as useReferralCodes } from './copy-text-view-3fa5df7b.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './mixins-f60a614c.js';
9
9
 
@@ -56,6 +56,7 @@ const Pagination = class {
56
56
  const hookProps = isDemo()
57
57
  ? useDemoPagination(getProps(this))
58
58
  : usePagination();
59
+ console.log("pagination", { hookProps });
59
60
  const props = {
60
61
  currentPage: (_a = hookProps.states) === null || _a === void 0 ? void 0 : _a.currentPage,
61
62
  totalPages: (_b = hookProps.states) === null || _b === void 0 ? void 0 : _b.pageCount,
@@ -106,11 +107,15 @@ function useReferralCode(props) {
106
107
  const contextData = In(REFERRAL_CODES_NAMESPACE);
107
108
  const { data } = yn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || (contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) !== undefined);
108
109
  const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
110
+ const [setUsed, usedRes] = $e(SET_CODE_USED);
109
111
  const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode))) !== null && _b !== void 0 ? _b :
110
112
  // Shown during loading
111
113
  "...";
112
114
  const [open, setOpen] = useState(false);
113
115
  function onClick() {
116
+ if (contextData) {
117
+ setUsed(true);
118
+ }
114
119
  // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
115
120
  // Only if called from a user-initiated event
116
121
  navigator.clipboard.writeText(copyString);
@@ -276,6 +281,9 @@ function ReferralCodesView(props) {
276
281
  const ReferralCodes = class {
277
282
  constructor(hostRef) {
278
283
  registerInstance(this, hostRef);
284
+ /**
285
+ * @uiName Title Text
286
+ */
279
287
  this.titleText = "Your referral code";
280
288
  h$1(this);
281
289
  }
@@ -294,13 +302,19 @@ const ReferralCodes = class {
294
302
  const viewProps = {
295
303
  slots,
296
304
  ...props,
305
+ loading: props.states.loading,
306
+ noCodes: props.states.noCodes,
297
307
  };
298
308
  return h(ReferralCodesView, Object.assign({}, viewProps));
299
309
  }
300
310
  };
301
311
  function useDemoReferralCodes(props) {
302
312
  return cjs({
303
- titleText: "Your referral code",
313
+ titleText: props.titleText,
314
+ states: {
315
+ noCodes: false,
316
+ loading: false,
317
+ },
304
318
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
305
319
  }
306
320
 
@@ -4,7 +4,7 @@ import './global-b89b6edc.js';
4
4
  import { e as $n, S as Sn, b as setUserIdentity, d as dist, X as Xe, o as setProgramId } from './index.module-f122af7b.js';
5
5
  import './utils-334c1e34.js';
6
6
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
7
- import { C as CopyTextView } from './copy-text-view-bf55abeb.js';
7
+ import { C as CopyTextView } from './copy-text-view-3fa5df7b.js';
8
8
  import './cjs-bdfb4486.js';
9
9
  import './mixins-f60a614c.js';
10
10
  import { G as GenericTableView } from './GenericTableView-bf154727.js';
@@ -25,7 +25,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-d72dd5ac.js';
25
25
  import './utilities-18d10876.js';
26
26
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-f1454d43.js';
27
27
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-3739f523.js';
28
- import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalLoginView, f as PortalRegisterView, T as TaskCardView, g as ProgressBarView, h as PoweredByImg$1, i as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as autoColorScaleCss, Q as ShadowViewAddon } from './ShadowViewAddon-5bb2b69a.js';
28
+ import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalLoginView, f as PortalRegisterView, T as TaskCardView, g as ProgressBarView, h as PoweredByImg$1, i as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as autoColorScaleCss, Q as ShadowViewAddon } from './ShadowViewAddon-faef41b7.js';
29
29
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-6c582684.js';
30
30
  import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-09cc28d6.js';
31
31
 
@@ -15100,7 +15100,7 @@ const UseInvoiceTableCells = /*#__PURE__*/Object.freeze({
15100
15100
  InvoiceTableDemoHook: InvoiceTableDemoHook
15101
15101
  });
15102
15102
 
15103
- const scenario$E = "@author: sam\n@owner: sam\n\nFeature: Referral Codes Component\n\n A paginated display of available and used promo codes for the user to share with others\n\n @motivating\n Scenario: Promo code can be shared using various share mediums\n Given an authenticated user\n And the program has promo codes configured\n When the promo code section is loaded\n Then the promo code can be copied directly\n And the promo code can be shared using <shareMedium>\n\n Examples:\n | shareMedium |\n | DIRECT |\n | EMAIL |\n | FBMESSENGER |\n | WHATSAPP |\n\n @minutia\n Scenario: User is notified if the currently viewed promo code has been used already\n Given an authenticated user\n And the program has promo codes configured\n When the promo code section is loaded\n And the code has not been used already\n Then no notification text is displayed\n When the code is changed to one that has been used\n Then the notification text is displayed\n\n @minutia\n Scenario Outline: Share mediums can be optionally displayed\n Given an authenticated user\n And the program has promo codes configured\n And <propName> is true\n Then the <shareMedium> is hidden\n Examples:\n | propName | shareMedium |\n | hideSharelink | DIRECT |\n | hideEmail | EMAIL |\n | hideFbMessenger | FBMESSENGER |\n | hideWhatsApp | WHATSAPP |\n\n @minutia\n Scenario Outline: Number of codes is displayed in the pagination component\n Given an authenticated user\n And the program has promo codes configured\n When the promo code section is loaded\n And the user has <numCodes> available\n And the user is on <currentPage>\n Then the pagination text is <paginationText>\n Examples:\n | numCodes | currentPage | paginationText |\n | 5 | 1 | 1 of 5 |\n | 5 | 2 | 2 of 5 |\n | 5 | 3 | 3 of 5 |\n | 5 | 4 | 4 of 5 |\n | 5 | 5 | 5 of 5 |\n | 1 | 1 | 1 of 1 |\n | 0 | 0 | 0 of 0 |\n\n";
15103
+ const scenario$E = "@author: sam\n@owner: sam\n\nFeature: Referral Codes Component\n\n A paginated display of available and used promo codes for the user to share with others\n\n @motivating\n Scenario: Promo code can be shared using various share mediums\n Given an authenticated user\n And the program has promo codes configured\n When the promo code section is loaded\n Then the promo code can be copied directly\n And the promo code can be shared using <shareMedium>\n\n Examples:\n | shareMedium |\n | DIRECT |\n | EMAIL |\n | FBMESSENGER |\n | WHATSAPP |\n\n @minutia\n Scenario: User is notified if the currently viewed promo code has been used already\n Given an authenticated user\n And the program has promo codes configured\n When the promo code section is loaded\n And the code has not been used already\n Then no notification text is displayed\n When the code is changed to one that has been used\n Then the notification text is displayed\n\n @minutia\n Scenario Outline: Share buttons slots use the link from referral codes instead of the default query\n Given an authenticated user\n And the program has promo codes configured\n And a <shareMedium> button is a child of `<sqm-referral-codes>`\n Then the <shareMedium> button is shown\n And the link is <promoCode>\n Examples:\n | propName | shareMedium | promoCode |\n | hideSharelink | DIRECT | PROMOCODE1 |\n | hideEmail | EMAIL | PROMOCODE1 |\n | hideFbMessenger | FBMESSENGER | PROMOCODE1 |\n | hideWhatsApp | WHATSAPP | PROMOCODE1 |\n\n @minutia\n Scenario Outline: Number of codes is displayed in the pagination component\n Given an authenticated user\n And the program has promo codes configured\n When the promo code section is loaded\n And the user has <numCodes> available\n And the user is on <currentPage>\n Then the pagination text is <paginationText>\n Examples:\n | numCodes | currentPage | paginationText |\n | 5 | 1 | 1 of 5 |\n | 5 | 2 | 2 of 5 |\n | 5 | 3 | 3 of 5 |\n | 5 | 4 | 4 of 5 |\n | 5 | 5 | 5 of 5 |\n | 1 | 1 | 1 of 1 |\n | 0 | 0 | 0 of 0 |\n\n";
15104
15104
 
15105
15105
  const ReferralCodes_stories = {
15106
15106
  title: "Components/Referral Codes",