@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.
- package/dist/cjs/{ShadowViewAddon-79c07eba.js → ShadowViewAddon-0747fd76.js} +1 -1
- package/dist/cjs/{copy-text-view-35a47e8d.js → copy-text-view-f154b584.js} +13 -7
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +10 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +3 -1
- package/dist/collection/components/sqm-referral-code/useReferralCode.js +7 -1
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +11 -7
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +1 -1
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +1 -1
- package/dist/collection/components/views/copy-text-view.js +4 -2
- package/dist/esm/{ShadowViewAddon-4da4fdfb.js → ShadowViewAddon-2bc2e431.js} +1 -1
- package/dist/esm/{copy-text-view-3fa5df7b.js → copy-text-view-ebf0d5f9.js} +13 -7
- package/dist/esm/sqm-big-stat_38.entry.js +2 -2
- package/dist/esm/sqm-pagination_3.entry.js +10 -2
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/{ShadowViewAddon-4da4fdfb.js → ShadowViewAddon-2bc2e431.js} +1 -1
- package/dist/esm-es5/copy-text-view-ebf0d5f9.js +1 -0
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-a0e5ce9c.system.entry.js → p-00803a58.system.entry.js} +1 -1
- package/dist/mint-components/{p-6f3efdb3.system.entry.js → p-1bb1d8b0.system.entry.js} +1 -1
- package/dist/mint-components/p-3dd34924.js +48 -0
- package/dist/mint-components/p-5fc8d87c.system.js +1 -1
- package/dist/mint-components/{p-fa88b63b.system.entry.js → p-7b5c2885.system.entry.js} +1 -1
- package/dist/mint-components/p-889962cf.system.js +1 -0
- package/dist/mint-components/p-969d9ce2.entry.js +13 -0
- package/dist/mint-components/{p-b15294d0.system.js → p-a9b0066e.system.js} +1 -1
- package/dist/mint-components/{p-f8d3cb7a.entry.js → p-b0f8491a.entry.js} +1 -1
- package/dist/mint-components/{p-c7d387f7.entry.js → p-c9ea2028.entry.js} +1 -1
- package/dist/mint-components/{p-f177d285.js → p-e6f5d724.js} +1 -1
- package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +3 -1
- package/dist/types/components/views/copy-text-view.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/copy-text-view-3fa5df7b.js +0 -1
- package/dist/mint-components/p-1a9d1ab7.entry.js +0 -13
- package/dist/mint-components/p-7a974e40.system.js +0 -1
- 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-
|
|
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
|
-
|
|
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: (
|
|
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: (
|
|
104
|
-
shareLink: (
|
|
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: (
|
|
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.
|
|
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-
|
|
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-
|
|
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-
|
|
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 {
|
|
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-
|
|
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-
|
|
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 {
|
|
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
|
-
|
|
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: (
|
|
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: (
|
|
99
|
-
shareLink: (
|
|
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: (
|
|
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.
|
|
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-
|
|
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
|
-
|
|
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: (
|
|
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: (
|
|
102
|
-
shareLink: (
|
|
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: (
|
|
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.
|
|
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-
|
|
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-
|
|
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-
|
|
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 {
|
|
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-
|
|
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-
|
|
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
|
|