@saasquatch/mint-components 1.11.1-11 → 1.11.1-13

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 (44) hide show
  1. package/dist/cjs/{ShadowViewAddon-79c07eba.js → ShadowViewAddon-0747fd76.js} +1 -1
  2. package/dist/cjs/{copy-text-view-35a47e8d.js → copy-text-view-f154b584.js} +13 -7
  3. package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
  4. package/dist/cjs/sqm-pagination_3.cjs.entry.js +10 -2
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
  6. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
  7. package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
  8. package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +3 -1
  9. package/dist/collection/components/sqm-referral-code/useReferralCode.js +7 -1
  10. package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +11 -7
  11. package/dist/collection/components/sqm-share-code/sqm-share-code.js +1 -1
  12. package/dist/collection/components/sqm-share-link/sqm-share-link.js +1 -1
  13. package/dist/collection/components/views/copy-text-view.js +4 -2
  14. package/dist/esm/{ShadowViewAddon-4da4fdfb.js → ShadowViewAddon-2bc2e431.js} +1 -1
  15. package/dist/esm/{copy-text-view-3fa5df7b.js → copy-text-view-ebf0d5f9.js} +13 -7
  16. package/dist/esm/sqm-big-stat_38.entry.js +2 -2
  17. package/dist/esm/sqm-pagination_3.entry.js +10 -2
  18. package/dist/esm/sqm-stencilbook.entry.js +2 -2
  19. package/dist/esm-es5/{ShadowViewAddon-4da4fdfb.js → ShadowViewAddon-2bc2e431.js} +1 -1
  20. package/dist/esm-es5/copy-text-view-ebf0d5f9.js +1 -0
  21. package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
  22. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  23. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  24. package/dist/mint-components/mint-components.esm.js +1 -1
  25. package/dist/mint-components/{p-a0e5ce9c.system.entry.js → p-00803a58.system.entry.js} +1 -1
  26. package/dist/mint-components/{p-6f3efdb3.system.entry.js → p-1bb1d8b0.system.entry.js} +1 -1
  27. package/dist/mint-components/p-3dd34924.js +48 -0
  28. package/dist/mint-components/p-5fc8d87c.system.js +1 -1
  29. package/dist/mint-components/{p-fa88b63b.system.entry.js → p-7b5c2885.system.entry.js} +1 -1
  30. package/dist/mint-components/p-889962cf.system.js +1 -0
  31. package/dist/mint-components/p-969d9ce2.entry.js +13 -0
  32. package/dist/mint-components/{p-b15294d0.system.js → p-a9b0066e.system.js} +1 -1
  33. package/dist/mint-components/{p-f8d3cb7a.entry.js → p-b0f8491a.entry.js} +1 -1
  34. package/dist/mint-components/{p-c7d387f7.entry.js → p-c9ea2028.entry.js} +1 -1
  35. package/dist/mint-components/{p-f177d285.js → p-e6f5d724.js} +1 -1
  36. package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +3 -1
  37. package/dist/types/components/views/copy-text-view.d.ts +1 -0
  38. package/docs/docs.docx +0 -0
  39. package/grapesjs/grapesjs.js +1 -1
  40. package/package.json +1 -1
  41. package/dist/esm-es5/copy-text-view-3fa5df7b.js +0 -1
  42. package/dist/mint-components/p-1a9d1ab7.entry.js +0 -13
  43. package/dist/mint-components/p-7a974e40.system.js +0 -1
  44. package/dist/mint-components/p-f5e1e208.js +0 -48
@@ -6,7 +6,7 @@ const global = require('./global-02e50f09.js');
6
6
  const index_module = require('./index.module-df530553.js');
7
7
  const utils = require('./utils-6847bc06.js');
8
8
  const JSS = require('./JSS-8503a151.js');
9
- const copyTextView = require('./copy-text-view-35a47e8d.js');
9
+ const copyTextView = require('./copy-text-view-f154b584.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
11
  const mixins = require('./mixins-fe9d4112.js');
12
12
  const useChildElements = require('./useChildElements-e0d44916.js');
@@ -79,6 +79,8 @@ function useReferralCodes(props) {
79
79
  loading: true,
80
80
  referralCode: "",
81
81
  shareLink: "",
82
+ isCopied: false,
83
+ isUsed: false,
82
84
  email: {
83
85
  messageLink: "",
84
86
  },
@@ -90,20 +92,22 @@ function useReferralCodes(props) {
90
92
  },
91
93
  });
92
94
  stencilHooks_module.useEffect(() => {
93
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
95
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
94
96
  if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
95
97
  const data = referralData.data[0];
96
98
  setReferralCodesContext({
97
99
  referralCode: data.code,
98
- shareLink: (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.direct,
100
+ isCopied: !!data.dateCopied,
101
+ isUsed: !!data.dateUsed,
102
+ shareLink: (_d = (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.direct,
99
103
  email: {
100
- messageLink: (_e = (_d = data.shareLinkCodes) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.email,
104
+ messageLink: (_g = (_f = (_e = data.shareLinkCodes) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.email,
101
105
  },
102
106
  fbMessenger: {
103
- messageLink: (_g = (_f = data.shareLinkCodes) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.fbMessenger,
104
- shareLink: (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.fbMessenger,
107
+ messageLink: (_k = (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.fbMessenger,
108
+ shareLink: (_o = (_m = (_l = data.shareLinkCodes) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.fbMessenger,
105
109
  },
106
- whatsApp: { messageLink: (_l = (_k = data.shareLinkCodes) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.whatsApp },
110
+ whatsApp: { messageLink: (_r = (_q = (_p = data.shareLinkCodes) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.whatsApp },
107
111
  });
108
112
  }
109
113
  }, [referralData]);
@@ -209,7 +213,9 @@ function CopyTextView(props) {
209
213
  error && (index.h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
210
214
  (buttonStyle === "button-outside" || buttonStyle === "button-below") &&
211
215
  copyButton),
212
- props.showNotificationText && props.notificationText && (index.h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
216
+ props.isCopied &&
217
+ props.showNotificationText &&
218
+ props.notificationText && (index.h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
213
219
  }
214
220
 
215
221
  exports.CopyTextView = CopyTextView;
@@ -9,7 +9,7 @@ const index_module = require('./index.module-df530553.js');
9
9
  const jsonpointer = require('./jsonpointer-11327262.js');
10
10
  const utils = require('./utils-6847bc06.js');
11
11
  const JSS = require('./JSS-8503a151.js');
12
- const copyTextView = require('./copy-text-view-35a47e8d.js');
12
+ const copyTextView = require('./copy-text-view-f154b584.js');
13
13
  const cjs = require('./cjs-1066ec21.js');
14
14
  require('./mixins-fe9d4112.js');
15
15
  const reRender = require('./re-render-1976e05e.js');
@@ -20,7 +20,7 @@ const index$1 = require('./index-8c6255f5.js');
20
20
  const useRegistrationFormState = require('./useRegistrationFormState-876ed65d.js');
21
21
  const utilities = require('./utilities-cec9dd36.js');
22
22
  const AsYouType = require('./AsYouType-6788393a.js');
23
- const ShadowViewAddon = require('./ShadowViewAddon-79c07eba.js');
23
+ const ShadowViewAddon = require('./ShadowViewAddon-0747fd76.js');
24
24
  require('./sqm-portal-container-view-990a85a3.js');
25
25
 
26
26
  const BigStat = class {
@@ -7,7 +7,7 @@ const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
7
7
  const index_module = require('./index.module-df530553.js');
8
8
  const utils = require('./utils-6847bc06.js');
9
9
  const JSS = require('./JSS-8503a151.js');
10
- const copyTextView = require('./copy-text-view-35a47e8d.js');
10
+ const copyTextView = require('./copy-text-view-f154b584.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  require('./mixins-fe9d4112.js');
13
13
 
@@ -138,7 +138,13 @@ function useReferralCode(props) {
138
138
  },
139
139
  });
140
140
  }
141
- return { ...props, onClick, open, copyString: copyString };
141
+ return {
142
+ ...props,
143
+ onClick,
144
+ open,
145
+ copyString: copyString,
146
+ isCopied: contextData === null || contextData === void 0 ? void 0 : contextData.isCopied,
147
+ };
142
148
  }
143
149
 
144
150
  const ReferralCode = class {
@@ -212,6 +218,8 @@ function useDemoReferralCode(props) {
212
218
  buttonStyle: props.buttonStyle,
213
219
  notificationText: props.notificationText,
214
220
  showNotificationText: props.showNotificationText,
221
+ isCopied: props.showNotificationText,
222
+ isUsed: false,
215
223
  rewardStatus: "AVAILABLE",
216
224
  open,
217
225
  onClick: () => {
@@ -8,7 +8,7 @@ require('./global-02e50f09.js');
8
8
  const index_module = require('./index.module-df530553.js');
9
9
  require('./utils-6847bc06.js');
10
10
  const JSS = require('./JSS-8503a151.js');
11
- const copyTextView = require('./copy-text-view-35a47e8d.js');
11
+ const copyTextView = require('./copy-text-view-f154b584.js');
12
12
  require('./cjs-1066ec21.js');
13
13
  require('./mixins-fe9d4112.js');
14
14
  const GenericTableView = require('./GenericTableView-a3f48e15.js');
@@ -29,7 +29,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-fde54e35.js');
29
29
  require('./utilities-cec9dd36.js');
30
30
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-34771d2c.js');
31
31
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-c8f91506.js');
32
- const ShadowViewAddon = require('./ShadowViewAddon-79c07eba.js');
32
+ const ShadowViewAddon = require('./ShadowViewAddon-0747fd76.js');
33
33
  const sqmPortalContainerView = require('./sqm-portal-container-view-990a85a3.js');
34
34
  const sqmInvoiceTableView = require('./sqm-invoice-table-view-e3b03a00.js');
35
35
 
@@ -475,7 +475,7 @@ export class CouponCode {
475
475
  "mutable": false,
476
476
  "complexType": {
477
477
  "original": "DemoData<CouponCodeViewProps>",
478
- "resolved": "{ loading?: boolean; errorType?: \"error\" | \"warning\" | \"info\" | \"success\"; couponCodeLabel?: string; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
478
+ "resolved": "{ loading?: boolean; errorType?: \"error\" | \"warning\" | \"info\" | \"success\"; couponCodeLabel?: string; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
479
479
  "references": {
480
480
  "DemoData": {
481
481
  "location": "import",
@@ -122,7 +122,7 @@ export class LogoutCurrentUser {
122
122
  "mutable": false,
123
123
  "complexType": {
124
124
  "original": "DemoData<CopyTextViewProps>",
125
- "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
125
+ "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
126
126
  "references": {
127
127
  "DemoData": {
128
128
  "location": "import",
@@ -264,7 +264,7 @@ export class ReferralCode {
264
264
  "mutable": false,
265
265
  "complexType": {
266
266
  "original": "DemoData<CopyTextViewProps>",
267
- "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
267
+ "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
268
268
  "references": {
269
269
  "DemoData": {
270
270
  "location": "import",
@@ -302,6 +302,8 @@ function useDemoReferralCode(props) {
302
302
  buttonStyle: props.buttonStyle,
303
303
  notificationText: props.notificationText,
304
304
  showNotificationText: props.showNotificationText,
305
+ isCopied: props.showNotificationText,
306
+ isUsed: false,
305
307
  rewardStatus: "AVAILABLE",
306
308
  open,
307
309
  onClick: () => {
@@ -51,5 +51,11 @@ export function useReferralCode(props) {
51
51
  },
52
52
  });
53
53
  }
54
- return { ...props, onClick, open, copyString: copyString };
54
+ return {
55
+ ...props,
56
+ onClick,
57
+ open,
58
+ copyString: copyString,
59
+ isCopied: contextData === null || contextData === void 0 ? void 0 : contextData.isCopied,
60
+ };
55
61
  }
@@ -1,6 +1,6 @@
1
1
  import { useEngagementMedium, usePaginatedQuery, useParentState, useUserIdentity, } from "@saasquatch/component-boilerplate";
2
- import { gql } from "graphql-request";
3
2
  import { useEffect } from "@saasquatch/universal-hooks";
3
+ import { gql } from "graphql-request";
4
4
  const GET_REFERRAL_CODES = gql `
5
5
  query getCodes(
6
6
  $limit: Int!
@@ -74,6 +74,8 @@ export function useReferralCodes(props) {
74
74
  loading: true,
75
75
  referralCode: "",
76
76
  shareLink: "",
77
+ isCopied: false,
78
+ isUsed: false,
77
79
  email: {
78
80
  messageLink: "",
79
81
  },
@@ -85,20 +87,22 @@ export function useReferralCodes(props) {
85
87
  },
86
88
  });
87
89
  useEffect(() => {
88
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
90
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
89
91
  if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
90
92
  const data = referralData.data[0];
91
93
  setReferralCodesContext({
92
94
  referralCode: data.code,
93
- shareLink: (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.direct,
95
+ isCopied: !!data.dateCopied,
96
+ isUsed: !!data.dateUsed,
97
+ shareLink: (_d = (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.direct,
94
98
  email: {
95
- messageLink: (_e = (_d = data.shareLinkCodes) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.email,
99
+ messageLink: (_g = (_f = (_e = data.shareLinkCodes) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.email,
96
100
  },
97
101
  fbMessenger: {
98
- messageLink: (_g = (_f = data.shareLinkCodes) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.fbMessenger,
99
- shareLink: (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.fbMessenger,
102
+ messageLink: (_k = (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.fbMessenger,
103
+ shareLink: (_o = (_m = (_l = data.shareLinkCodes) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.fbMessenger,
100
104
  },
101
- whatsApp: { messageLink: (_l = (_k = data.shareLinkCodes) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.whatsApp },
105
+ whatsApp: { messageLink: (_r = (_q = (_p = data.shareLinkCodes) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.whatsApp },
102
106
  });
103
107
  }
104
108
  }, [referralData]);
@@ -210,7 +210,7 @@ export class ShareCode {
210
210
  "mutable": false,
211
211
  "complexType": {
212
212
  "original": "DemoData<CopyTextViewProps>",
213
- "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
213
+ "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
214
214
  "references": {
215
215
  "DemoData": {
216
216
  "location": "import",
@@ -210,7 +210,7 @@ export class ShareLink {
210
210
  "mutable": false,
211
211
  "complexType": {
212
212
  "original": "DemoData<CopyTextViewProps>",
213
- "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; onClick?: () => void; }",
213
+ "resolved": "{ loading?: boolean; copyString?: string; tooltiptext?: string; open?: boolean; copyButtonLabel?: string; disabled?: boolean; textAlign?: \"left\" | \"right\" | \"center\"; buttonStyle?: \"icon\" | \"button-outside\" | \"button-below\"; error?: boolean; errorText?: string; notificationText?: string; showNotificationText?: boolean; inputPlaceholderText?: string; dateAvailable?: string; isCopied?: boolean; onClick?: () => void; }",
214
214
  "references": {
215
215
  "DemoData": {
216
216
  "location": "import",
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { createStyleSheet } from "../../styling/JSS";
3
2
  import { HostBlock } from "../../global/mixins";
3
+ import { createStyleSheet } from "../../styling/JSS";
4
4
  const style = {
5
5
  HostBlock: HostBlock,
6
6
  inputStyle: {
@@ -86,5 +86,7 @@ export function CopyTextView(props) {
86
86
  error && (h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
87
87
  (buttonStyle === "button-outside" || buttonStyle === "button-below") &&
88
88
  copyButton),
89
- props.showNotificationText && props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
89
+ props.isCopied &&
90
+ props.showNotificationText &&
91
+ props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
90
92
  }
@@ -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, S as SET_CODE_USED, C as CopyTextView } from './copy-text-view-3fa5df7b.js';
7
+ import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_USED, C as CopyTextView } from './copy-text-view-ebf0d5f9.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';
@@ -77,6 +77,8 @@ function useReferralCodes(props) {
77
77
  loading: true,
78
78
  referralCode: "",
79
79
  shareLink: "",
80
+ isCopied: false,
81
+ isUsed: false,
80
82
  email: {
81
83
  messageLink: "",
82
84
  },
@@ -88,20 +90,22 @@ function useReferralCodes(props) {
88
90
  },
89
91
  });
90
92
  useEffect(() => {
91
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
93
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
92
94
  if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
93
95
  const data = referralData.data[0];
94
96
  setReferralCodesContext({
95
97
  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,
98
+ isCopied: !!data.dateCopied,
99
+ isUsed: !!data.dateUsed,
100
+ shareLink: (_d = (_c = (_b = data.shareLinkCodes) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.direct,
97
101
  email: {
98
- messageLink: (_e = (_d = data.shareLinkCodes) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.email,
102
+ messageLink: (_g = (_f = (_e = data.shareLinkCodes) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.email,
99
103
  },
100
104
  fbMessenger: {
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,
105
+ messageLink: (_k = (_j = (_h = data.shareLinkCodes) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.fbMessenger,
106
+ shareLink: (_o = (_m = (_l = data.shareLinkCodes) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.fbMessenger,
103
107
  },
104
- whatsApp: { messageLink: (_l = (_k = data.shareLinkCodes) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.whatsApp },
108
+ whatsApp: { messageLink: (_r = (_q = (_p = data.shareLinkCodes) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.whatsApp },
105
109
  });
106
110
  }
107
111
  }, [referralData]);
@@ -207,7 +211,9 @@ function CopyTextView(props) {
207
211
  error && (h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
208
212
  (buttonStyle === "button-outside" || buttonStyle === "button-below") &&
209
213
  copyButton),
210
- props.showNotificationText && props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
214
+ props.isCopied &&
215
+ props.showNotificationText &&
216
+ props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
211
217
  }
212
218
 
213
219
  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-3fa5df7b.js';
8
+ import { C as CopyTextView } from './copy-text-view-ebf0d5f9.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-4da4fdfb.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-2bc2e431.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, S as SET_CODE_USED, C as CopyTextView, u as useReferralCodes } from './copy-text-view-3fa5df7b.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-ebf0d5f9.js';
7
7
  import { c as cjs } from './cjs-bdfb4486.js';
8
8
  import './mixins-f60a614c.js';
9
9
 
@@ -134,7 +134,13 @@ function useReferralCode(props) {
134
134
  },
135
135
  });
136
136
  }
137
- return { ...props, onClick, open, copyString: copyString };
137
+ return {
138
+ ...props,
139
+ onClick,
140
+ open,
141
+ copyString: copyString,
142
+ isCopied: contextData === null || contextData === void 0 ? void 0 : contextData.isCopied,
143
+ };
138
144
  }
139
145
 
140
146
  const ReferralCode = class {
@@ -208,6 +214,8 @@ function useDemoReferralCode(props) {
208
214
  buttonStyle: props.buttonStyle,
209
215
  notificationText: props.notificationText,
210
216
  showNotificationText: props.showNotificationText,
217
+ isCopied: props.showNotificationText,
218
+ isUsed: false,
211
219
  rewardStatus: "AVAILABLE",
212
220
  open,
213
221
  onClick: () => {
@@ -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-3fa5df7b.js';
7
+ import { C as CopyTextView } from './copy-text-view-ebf0d5f9.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-4da4fdfb.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-2bc2e431.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