@saasquatch/mint-components 1.15.0-117 → 1.15.0-118

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 (63) hide show
  1. package/dist/cjs/{ShadowViewAddon-f1bd9b26.js → ShadowViewAddon-8fed996f.js} +1 -1
  2. package/dist/cjs/sqm-big-stat_43.cjs.entry.js +2 -2
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  4. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +1 -1
  5. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +1 -1
  6. package/dist/esm/{ShadowViewAddon-c0600f22.js → ShadowViewAddon-928bfc1a.js} +1 -1
  7. package/dist/esm/sqm-big-stat_43.entry.js +2 -2
  8. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  9. package/dist/esm-es5/{ShadowViewAddon-c0600f22.js → ShadowViewAddon-928bfc1a.js} +1 -1
  10. package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
  11. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  12. package/dist/mint-components/mint-components.esm.js +1 -1
  13. package/dist/mint-components/{p-ed69dc98.system.entry.js → p-10507209.system.entry.js} +1 -1
  14. package/dist/mint-components/{p-be770d69.system.entry.js → p-3f1f78c0.system.entry.js} +1 -1
  15. package/dist/mint-components/{p-f9f67437.entry.js → p-56a5e3b2.entry.js} +1 -1
  16. package/dist/mint-components/{p-bdc86ee3.system.js → p-84a5b46a.system.js} +1 -1
  17. package/dist/mint-components/{p-1276830a.entry.js → p-a0c8162d.entry.js} +2 -2
  18. package/dist/mint-components/p-a89baf7b.system.js +1 -1
  19. package/dist/mint-components/{p-6b904749.js → p-d278519f.js} +1 -1
  20. package/docs/docs.docx +0 -0
  21. package/package.json +1 -1
  22. package/dist/cjs/RewardExchangeListData-a787ce54.js +0 -1144
  23. package/dist/cjs/copy-text-view-f0313f78.js +0 -121
  24. package/dist/cjs/sqm-coupon-code-view-a869384e.js +0 -35
  25. package/dist/cjs/sqm-coupon-code.cjs.entry.js +0 -285
  26. package/dist/cjs/sqm-referral-code.cjs.entry.js +0 -177
  27. package/dist/cjs/sqm-reward-exchange-list.cjs.entry.js +0 -1018
  28. package/dist/cjs/sqm-share-code.cjs.entry.js +0 -147
  29. package/dist/cjs/sqm-share-link.cjs.entry.js +0 -102
  30. package/dist/esm/RewardExchangeListData-11c043e3.js +0 -1122
  31. package/dist/esm/copy-text-view-3129fb22.js +0 -119
  32. package/dist/esm/sqm-coupon-code-view-af016712.js +0 -33
  33. package/dist/esm/sqm-coupon-code.entry.js +0 -281
  34. package/dist/esm/sqm-referral-code.entry.js +0 -173
  35. package/dist/esm/sqm-reward-exchange-list.entry.js +0 -1014
  36. package/dist/esm/sqm-share-code.entry.js +0 -143
  37. package/dist/esm/sqm-share-link.entry.js +0 -98
  38. package/dist/esm-es5/RewardExchangeListData-11c043e3.js +0 -1
  39. package/dist/esm-es5/copy-text-view-3129fb22.js +0 -1
  40. package/dist/esm-es5/sqm-coupon-code-view-af016712.js +0 -1
  41. package/dist/esm-es5/sqm-coupon-code.entry.js +0 -1
  42. package/dist/esm-es5/sqm-referral-code.entry.js +0 -1
  43. package/dist/esm-es5/sqm-reward-exchange-list.entry.js +0 -1
  44. package/dist/esm-es5/sqm-share-code.entry.js +0 -1
  45. package/dist/esm-es5/sqm-share-link.entry.js +0 -1
  46. package/dist/mint-components/RewardExchangeListData-11c043e3.js +0 -1122
  47. package/dist/mint-components/RewardExchangeListData-546ffbb9.system.js +0 -1
  48. package/dist/mint-components/copy-text-view-3129fb22.js +0 -119
  49. package/dist/mint-components/copy-text-view-33cac657.system.js +0 -1
  50. package/dist/mint-components/sqm-coupon-code-view-40fd8d8b.system.js +0 -1
  51. package/dist/mint-components/sqm-coupon-code-view-af016712.js +0 -33
  52. package/dist/mint-components/sqm-coupon-code.entry.js +0 -281
  53. package/dist/mint-components/sqm-coupon-code.system.entry.js +0 -1
  54. package/dist/mint-components/sqm-referral-code.entry.js +0 -173
  55. package/dist/mint-components/sqm-referral-code.system.entry.js +0 -1
  56. package/dist/mint-components/sqm-reward-exchange-list.entry.js +0 -1014
  57. package/dist/mint-components/sqm-reward-exchange-list.system.entry.js +0 -1
  58. package/dist/mint-components/sqm-share-code.entry.js +0 -143
  59. package/dist/mint-components/sqm-share-code.system.entry.js +0 -1
  60. package/dist/mint-components/sqm-share-link.entry.js +0 -98
  61. package/dist/mint-components/sqm-share-link.system.entry.js +0 -1
  62. package/dist/mint-components/sqm-stencilbook.entry.js +0 -20330
  63. package/dist/mint-components/sqm-stencilbook.system.entry.js +0 -1
@@ -1,147 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ad175903.js');
6
- const domContextHooks_module = require('./dom-context-hooks.module-baf97805.js');
7
- const index_module = require('./index.module-0ec494e5.js');
8
- require('./jss-preset-default.esm-b48f0c33.js');
9
- require('./JSS-518e9b4d.js');
10
- require('./mixins-f51b04f1.js');
11
- const utils = require('./utils-ebe923b6.js');
12
- const cjs = require('./cjs-2bf512b9.js');
13
- const copyTextView = require('./copy-text-view-f0313f78.js');
14
-
15
- const MessageLinkQuery = index_module.dist.gql `
16
- query ($programId: ID) {
17
- user: viewer {
18
- ... on User {
19
- referralCode(programId: $programId)
20
- }
21
- }
22
- }
23
- `;
24
- const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
25
- mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
26
- createUserAnalyticsEvent(eventMeta: $eventMeta)
27
- }
28
- `;
29
- function useShareCode(props) {
30
- var _a, _b;
31
- const { programId = index_module.H() } = props;
32
- const user = index_module.J();
33
- const engagementMedium = index_module.B();
34
- const { data } = index_module.wn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
35
- const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
36
- const copyString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode) !== null && _b !== void 0 ? _b :
37
- // Shown during loading
38
- "...";
39
- const [open, setOpen] = domContextHooks_module.useState(false);
40
- function onClick() {
41
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
42
- // Only if called from a user-initiated event
43
- navigator.clipboard.writeText(copyString);
44
- setOpen(true);
45
- setTimeout(() => setOpen(false), props.tooltiplifespan);
46
- sendLoadEvent({
47
- eventMeta: {
48
- programId,
49
- id: user === null || user === void 0 ? void 0 : user.id,
50
- accountId: user === null || user === void 0 ? void 0 : user.accountId,
51
- type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
52
- meta: {
53
- engagementMedium,
54
- shareMedium: "DIRECT",
55
- },
56
- },
57
- });
58
- }
59
- return { ...props, onClick, open, copyString: copyString };
60
- }
61
-
62
- const ShareCode = class {
63
- constructor(hostRef) {
64
- index.registerInstance(this, hostRef);
65
- /**
66
- * Shown inside a tooltip after someone has successfully copied the link to their clipboard
67
- *
68
- * @uiName Tooltip text
69
- */
70
- this.tooltiptext = "Copied to Clipboard";
71
- /**
72
- * The number of milliseconds that the tooltip appears for
73
- *
74
- * @uiName Tooltip lifespan
75
- */
76
- this.tooltiplifespan = 1000;
77
- /**
78
- * Change the text alignment
79
- *
80
- * @uiName Share code alignment
81
- * @uiType string
82
- * @uiEnum ["left", "center", "right"]
83
- * @uiEnumNames ["Left", "Center", "Right"]
84
- * @uiGroup Style
85
- */
86
- this.textAlign = "left";
87
- /**
88
- * @uiName Copy button label
89
- */
90
- this.copyButtonLabel = "Copy Code";
91
- /**
92
- * Set the copy button style and placement
93
- *
94
- * @uiName Style
95
- * @uiType string
96
- * @uiEnum ["icon", "button-outside", "button-below"]
97
- * @uiEnumNames ["Icon", "Button outside", "Button below"]
98
- * @uiGroup Style
99
- */
100
- this.buttonStyle = "icon";
101
- /**
102
- * The type of the button that is used (primary or secondary).
103
- * @uiName Button Type
104
- * @uiType string
105
- * @uiEnum ["primary", "secondary"]
106
- * @uiEnumNames ["Primary", "Secondary"]
107
- * @uiGroup Style
108
- */
109
- this.buttonType = "primary";
110
- domContextHooks_module.h$1(this);
111
- }
112
- disconnectedCallback() { }
113
- render() {
114
- const thisProps = utils.getProps(this);
115
- const props = index_module.isDemo()
116
- ? useDemoShareCode(thisProps)
117
- : useShareCode(thisProps);
118
- return index.h(copyTextView.CopyTextView, Object.assign({}, props));
119
- }
120
- };
121
- function useDemoShareCode(props) {
122
- const [open, setOpen] = domContextHooks_module.useState(false);
123
- const copyString = "SHARECODE001";
124
- return cjs.cjs({
125
- copyString: copyString,
126
- tooltiptext: props.tooltiptext,
127
- textAlign: props.textAlign,
128
- copyButtonLabel: props.copyButtonLabel,
129
- buttonStyle: props.buttonStyle,
130
- backgroundColor: props.backgroundColor,
131
- textColor: props.textColor,
132
- borderRadius: props.borderRadius,
133
- borderColor: props.borderColor,
134
- buttonType: props.buttonType,
135
- rewardStatus: "AVAILABLE",
136
- open,
137
- onClick: () => {
138
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
139
- // Only if called from a user-initiated event
140
- navigator.clipboard.writeText(copyString);
141
- setOpen(true);
142
- setTimeout(() => setOpen(false), props.tooltiplifespan);
143
- },
144
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
145
- }
146
-
147
- exports.sqm_share_code = ShareCode;
@@ -1,102 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ad175903.js');
6
- const domContextHooks_module = require('./dom-context-hooks.module-baf97805.js');
7
- const index_module = require('./index.module-0ec494e5.js');
8
- require('./jss-preset-default.esm-b48f0c33.js');
9
- require('./JSS-518e9b4d.js');
10
- require('./mixins-f51b04f1.js');
11
- const utils = require('./utils-ebe923b6.js');
12
- const cjs = require('./cjs-2bf512b9.js');
13
- require('./useReferralCodes-bb07449a.js');
14
- const copyTextView = require('./copy-text-view-f0313f78.js');
15
- const useShareLink = require('./useShareLink-ce1c14bd.js');
16
-
17
- const ShareLink = class {
18
- constructor(hostRef) {
19
- index.registerInstance(this, hostRef);
20
- /**
21
- * Shown inside a tooltip after someone has successfully copied the link to their clipboard
22
- *
23
- * @uiName Tooltip text
24
- */
25
- this.tooltiptext = "Copied to Clipboard";
26
- /**
27
- * The number of milliseconds that the tooltip appears for
28
- *
29
- * @uiName Tooltip lifespan
30
- */
31
- this.tooltiplifespan = 1000;
32
- /**
33
- * Change the text alignment
34
- *
35
- * @uiName Share link alignment
36
- * @uiType string
37
- * @uiEnum ["left", "center", "right"]
38
- * @uiEnumNames ["Left", "Center", "Right"]
39
- * @uiGroup Style
40
- */
41
- this.textAlign = "left";
42
- /**
43
- * @uiName Copy button label
44
- */
45
- this.copyButtonLabel = "Copy Link";
46
- /**
47
- * The type of the button that is used (primary or secondary).
48
- * @uiName Button Type
49
- * @uiType string
50
- * @uiEnum ["primary", "secondary"]
51
- * @uiEnumNames ["Primary", "Secondary"]
52
- * @uiGroup Style
53
- */
54
- this.buttonType = "primary";
55
- /**
56
- * Set the copy button style and placement
57
- *
58
- * @uiName Button style
59
- * @uiType string
60
- * @uiEnum ["icon", "button-outside", "button-below"]
61
- * @uiEnumNames ["Icon", "Button outside", "Button below"]
62
- * @uiGroup Style
63
- */
64
- this.buttonStyle = "icon";
65
- domContextHooks_module.h$1(this);
66
- }
67
- disconnectedCallback() { }
68
- render() {
69
- const thisProps = utils.getProps(this);
70
- const props = index_module.isDemo()
71
- ? useDemoShareLink(thisProps)
72
- : useShareLink.useShareLink(thisProps);
73
- return index.h(copyTextView.CopyTextView, Object.assign({}, props));
74
- }
75
- };
76
- function useDemoShareLink(props) {
77
- const [open, setOpen] = domContextHooks_module.useState(false);
78
- const copyString = "https://www.example.com/sharelink/abc";
79
- return cjs.cjs({
80
- copyString: copyString,
81
- tooltiptext: props.tooltiptext,
82
- textAlign: props.textAlign,
83
- buttonStyle: props.buttonStyle,
84
- backgroundColor: props.backgroundColor,
85
- textColor: props.textColor,
86
- borderRadius: props.borderRadius,
87
- buttonType: props.buttonType,
88
- copyButtonLabel: props.copyButtonLabel,
89
- borderColor: props.borderColor,
90
- rewardStatus: "AVAILABLE",
91
- open,
92
- onClick: () => {
93
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
94
- // Only if called from a user-initiated event
95
- navigator.clipboard.writeText(copyString);
96
- setOpen(true);
97
- setTimeout(() => setOpen(false), props.tooltiplifespan);
98
- },
99
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
100
- }
101
-
102
- exports.sqm_share_link = ShareLink;