@saasquatch/mint-components 1.11.1-36 → 1.11.1-38
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-99091de6.js → ShadowViewAddon-2d56f3b4.js} +1 -1
- package/dist/cjs/{copy-text-view-460654ac.js → copy-text-view-29330e8a.js} +22 -31
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +2 -2
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-referral-codes/useReferralCodes.js +23 -32
- package/dist/esm/{ShadowViewAddon-aac87ae0.js → ShadowViewAddon-db086943.js} +1 -1
- package/dist/esm/{copy-text-view-1d7c8f2a.js → copy-text-view-47f83e9b.js} +23 -32
- package/dist/esm/sqm-big-stat_38.entry.js +2 -2
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/{ShadowViewAddon-aac87ae0.js → ShadowViewAddon-db086943.js} +1 -1
- package/dist/esm-es5/copy-text-view-47f83e9b.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-b057e502.system.entry.js → p-284f26ec.system.entry.js} +1 -1
- package/dist/mint-components/{p-4ed7e559.system.entry.js → p-29e0dedf.system.entry.js} +1 -1
- package/dist/mint-components/{p-b3f771d9.system.js → p-3ef97112.system.js} +1 -1
- package/dist/mint-components/p-64473f17.system.js +1 -0
- package/dist/mint-components/{p-c2274979.entry.js → p-8a50339c.entry.js} +1 -1
- package/dist/mint-components/{p-9fd6b4a2.js → p-8cd49ec4.js} +1 -1
- package/dist/mint-components/{p-652790dc.system.entry.js → p-8e84ba06.system.entry.js} +1 -1
- package/dist/mint-components/p-9ed09b3a.system.js +1 -1
- package/dist/mint-components/{p-a7cb7282.entry.js → p-b6f61a27.entry.js} +1 -1
- package/dist/mint-components/{p-3ca30ac1.entry.js → p-e91bdadf.entry.js} +1 -1
- package/dist/mint-components/p-ebd6c7e5.js +52 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/copy-text-view-1d7c8f2a.js +0 -1
- package/dist/mint-components/p-5a83aa32.js +0 -56
- package/dist/mint-components/p-d55dcd10.system.js +0 -1
|
@@ -6,7 +6,7 @@ const global = require('./global-e067aa06.js');
|
|
|
6
6
|
const index_module = require('./index.module-224d7b8d.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-29330e8a.js');
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
11
11
|
const mixins = require('./mixins-fe9d4112.js');
|
|
12
12
|
const useChildElements = require('./useChildElements-176ac928.js');
|
|
@@ -8,18 +8,14 @@ const mixins = require('./mixins-fe9d4112.js');
|
|
|
8
8
|
|
|
9
9
|
const GET_REFERRAL_CODES = index_module.dist.gql `
|
|
10
10
|
query getCodes(
|
|
11
|
+
$engagementMedium: UserEngagementMedium!
|
|
11
12
|
$limit: Int!
|
|
12
13
|
$offset: Int!
|
|
13
|
-
$
|
|
14
|
-
$programId: ID
|
|
14
|
+
$filter: ReferralCodeFilterInput
|
|
15
15
|
) {
|
|
16
16
|
viewer {
|
|
17
17
|
... on User {
|
|
18
|
-
referralCodeList(
|
|
19
|
-
limit: $limit
|
|
20
|
-
offset: $offset
|
|
21
|
-
filter: { fuelTank_eq: true, programId_eq: $programId }
|
|
22
|
-
) {
|
|
18
|
+
referralCodeList(limit: $limit, offset: $offset, filter: $filter) {
|
|
23
19
|
data {
|
|
24
20
|
code
|
|
25
21
|
dateUsed
|
|
@@ -69,24 +65,19 @@ function useReferralCodes(props) {
|
|
|
69
65
|
const user = index_module.Q();
|
|
70
66
|
const engagementMedium = index_module.B();
|
|
71
67
|
const programId = props.programId || index_module.H();
|
|
72
|
-
console.log({ props });
|
|
73
68
|
const { refresh } = index_module.ze();
|
|
74
|
-
const { envelope: referralData, states, callbacks, } = index_module.kn(GET_REFERRAL_CODES, (data) => {
|
|
75
|
-
var _a;
|
|
76
|
-
console.log({ queryData: data });
|
|
77
|
-
return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodeList;
|
|
78
|
-
}, {
|
|
69
|
+
const { envelope: referralData, states, callbacks, } = index_module.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.referralCodeList; }, {
|
|
79
70
|
limit: 1,
|
|
80
71
|
offset: 0,
|
|
81
|
-
}, {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
}, {
|
|
73
|
+
engagementMedium,
|
|
74
|
+
programId,
|
|
75
|
+
filter: {
|
|
76
|
+
fuelTank_eq: true,
|
|
77
|
+
programId_eq: programId,
|
|
78
|
+
dateUsed_exists: false,
|
|
79
|
+
},
|
|
80
|
+
}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
90
81
|
const [paginationContext, setPaginationContext] = index_module.Cn({
|
|
91
82
|
namespace: REFERRAL_CODES_PAGINATION_CONTEXT,
|
|
92
83
|
initialValue: { states, callbacks },
|
|
@@ -111,27 +102,27 @@ function useReferralCodes(props) {
|
|
|
111
102
|
},
|
|
112
103
|
});
|
|
113
104
|
stencilHooks_module.useEffect(() => {
|
|
114
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
115
|
-
if (
|
|
116
|
-
const data =
|
|
105
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
106
|
+
if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
107
|
+
const data = referralData.data[0];
|
|
117
108
|
setReferralCodesContext({
|
|
118
109
|
refresh,
|
|
119
110
|
referralCode: data.code,
|
|
120
111
|
isCopied: !!data.dateCopied,
|
|
121
112
|
isUsed: !!data.dateUsed,
|
|
122
|
-
shareLink: (
|
|
113
|
+
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,
|
|
123
114
|
email: {
|
|
124
|
-
messageLink: (
|
|
115
|
+
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,
|
|
125
116
|
},
|
|
126
117
|
fbmessenger: {
|
|
127
|
-
messageLink: (
|
|
128
|
-
shareLink: (
|
|
118
|
+
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,
|
|
119
|
+
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,
|
|
129
120
|
},
|
|
130
|
-
whatsapp: { messageLink: (
|
|
121
|
+
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 },
|
|
131
122
|
});
|
|
132
123
|
setPaginationContext({ states, callbacks });
|
|
133
124
|
}
|
|
134
|
-
}, [
|
|
125
|
+
}, [referralData]);
|
|
135
126
|
console.log({ referralData, states });
|
|
136
127
|
return {
|
|
137
128
|
states: {
|
|
@@ -9,7 +9,7 @@ const index_module = require('./index.module-224d7b8d.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-29330e8a.js');
|
|
13
13
|
const cjs = require('./cjs-1066ec21.js');
|
|
14
14
|
require('./mixins-fe9d4112.js');
|
|
15
15
|
const reRender = require('./re-render-cd2f8774.js');
|
|
@@ -20,7 +20,7 @@ const index$1 = require('./index-8c6255f5.js');
|
|
|
20
20
|
const useRegistrationFormState = require('./useRegistrationFormState-49dd9295.js');
|
|
21
21
|
const utilities = require('./utilities-719c980a.js');
|
|
22
22
|
const AsYouType = require('./AsYouType-6788393a.js');
|
|
23
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
23
|
+
const ShadowViewAddon = require('./ShadowViewAddon-2d56f3b4.js');
|
|
24
24
|
require('./sqm-portal-container-view-976bf0f5.js');
|
|
25
25
|
|
|
26
26
|
const BigStat = class {
|
|
@@ -7,7 +7,7 @@ const stencilHooks_module = require('./stencil-hooks.module-8f69ed33.js');
|
|
|
7
7
|
const index_module = require('./index.module-224d7b8d.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-29330e8a.js');
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-fe9d4112.js');
|
|
13
13
|
|
|
@@ -8,7 +8,7 @@ require('./global-e067aa06.js');
|
|
|
8
8
|
const index_module = require('./index.module-224d7b8d.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-29330e8a.js');
|
|
12
12
|
require('./cjs-1066ec21.js');
|
|
13
13
|
require('./mixins-fe9d4112.js');
|
|
14
14
|
const GenericTableView = require('./GenericTableView-bb2fcd95.js');
|
|
@@ -29,7 +29,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-7c70d7f9.js');
|
|
|
29
29
|
require('./utilities-719c980a.js');
|
|
30
30
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-1b85b8cf.js');
|
|
31
31
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-cc3c87c3.js');
|
|
32
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
32
|
+
const ShadowViewAddon = require('./ShadowViewAddon-2d56f3b4.js');
|
|
33
33
|
const sqmPortalContainerView = require('./sqm-portal-container-view-976bf0f5.js');
|
|
34
34
|
const sqmInvoiceTableView = require('./sqm-invoice-table-view-2f4f426b.js');
|
|
35
35
|
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { useEngagementMedium, usePaginatedQuery, useParentState, useProgramId, useRefreshDispatcher, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
|
-
import { useEffect
|
|
2
|
+
import { useEffect } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
4
|
const GET_REFERRAL_CODES = gql `
|
|
5
5
|
query getCodes(
|
|
6
|
+
$engagementMedium: UserEngagementMedium!
|
|
6
7
|
$limit: Int!
|
|
7
8
|
$offset: Int!
|
|
8
|
-
$
|
|
9
|
-
$programId: ID
|
|
9
|
+
$filter: ReferralCodeFilterInput
|
|
10
10
|
) {
|
|
11
11
|
viewer {
|
|
12
12
|
... on User {
|
|
13
|
-
referralCodeList(
|
|
14
|
-
limit: $limit
|
|
15
|
-
offset: $offset
|
|
16
|
-
filter: { fuelTank_eq: true, programId_eq: $programId }
|
|
17
|
-
) {
|
|
13
|
+
referralCodeList(limit: $limit, offset: $offset, filter: $filter) {
|
|
18
14
|
data {
|
|
19
15
|
code
|
|
20
16
|
dateUsed
|
|
@@ -64,24 +60,19 @@ export function useReferralCodes(props) {
|
|
|
64
60
|
const user = useUserIdentity();
|
|
65
61
|
const engagementMedium = useEngagementMedium();
|
|
66
62
|
const programId = props.programId || useProgramId();
|
|
67
|
-
console.log({ props });
|
|
68
63
|
const { refresh } = useRefreshDispatcher();
|
|
69
|
-
const { envelope: referralData, states, callbacks, } = usePaginatedQuery(GET_REFERRAL_CODES, (data) => {
|
|
70
|
-
var _a;
|
|
71
|
-
console.log({ queryData: data });
|
|
72
|
-
return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodeList;
|
|
73
|
-
}, {
|
|
64
|
+
const { envelope: referralData, states, callbacks, } = usePaginatedQuery(GET_REFERRAL_CODES, (data) => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodeList; }, {
|
|
74
65
|
limit: 1,
|
|
75
66
|
offset: 0,
|
|
76
|
-
}, {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
}, {
|
|
68
|
+
engagementMedium,
|
|
69
|
+
programId,
|
|
70
|
+
filter: {
|
|
71
|
+
fuelTank_eq: true,
|
|
72
|
+
programId_eq: programId,
|
|
73
|
+
dateUsed_exists: false,
|
|
74
|
+
},
|
|
75
|
+
}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
85
76
|
const [paginationContext, setPaginationContext] = useParentState({
|
|
86
77
|
namespace: REFERRAL_CODES_PAGINATION_CONTEXT,
|
|
87
78
|
initialValue: { states, callbacks },
|
|
@@ -106,27 +97,27 @@ export function useReferralCodes(props) {
|
|
|
106
97
|
},
|
|
107
98
|
});
|
|
108
99
|
useEffect(() => {
|
|
109
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
110
|
-
if (
|
|
111
|
-
const data =
|
|
100
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
101
|
+
if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
102
|
+
const data = referralData.data[0];
|
|
112
103
|
setReferralCodesContext({
|
|
113
104
|
refresh,
|
|
114
105
|
referralCode: data.code,
|
|
115
106
|
isCopied: !!data.dateCopied,
|
|
116
107
|
isUsed: !!data.dateUsed,
|
|
117
|
-
shareLink: (
|
|
108
|
+
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,
|
|
118
109
|
email: {
|
|
119
|
-
messageLink: (
|
|
110
|
+
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,
|
|
120
111
|
},
|
|
121
112
|
fbmessenger: {
|
|
122
|
-
messageLink: (
|
|
123
|
-
shareLink: (
|
|
113
|
+
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,
|
|
114
|
+
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,
|
|
124
115
|
},
|
|
125
|
-
whatsapp: { messageLink: (
|
|
116
|
+
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 },
|
|
126
117
|
});
|
|
127
118
|
setPaginationContext({ states, callbacks });
|
|
128
119
|
}
|
|
129
|
-
}, [
|
|
120
|
+
}, [referralData]);
|
|
130
121
|
console.log({ referralData, states });
|
|
131
122
|
return {
|
|
132
123
|
states: {
|
|
@@ -4,7 +4,7 @@ import { i as intl } from './global-701bd5b0.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-5eb0926c.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_COPIED, C as CopyTextView } from './copy-text-view-
|
|
7
|
+
import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED, C as CopyTextView } from './copy-text-view-47f83e9b.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-ebcfbc19.js';
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { h } from './index-014ddfa3.js';
|
|
2
|
-
import {
|
|
2
|
+
import { f as useEffect } from './stencil-hooks.module-576d7f01.js';
|
|
3
3
|
import { d as dist, Q, H, z as ze, k as kn, C as Cn, B } from './index.module-5eb0926c.js';
|
|
4
4
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
5
5
|
import { H as HostBlock } from './mixins-f60a614c.js';
|
|
6
6
|
|
|
7
7
|
const GET_REFERRAL_CODES = dist.gql `
|
|
8
8
|
query getCodes(
|
|
9
|
+
$engagementMedium: UserEngagementMedium!
|
|
9
10
|
$limit: Int!
|
|
10
11
|
$offset: Int!
|
|
11
|
-
$
|
|
12
|
-
$programId: ID
|
|
12
|
+
$filter: ReferralCodeFilterInput
|
|
13
13
|
) {
|
|
14
14
|
viewer {
|
|
15
15
|
... on User {
|
|
16
|
-
referralCodeList(
|
|
17
|
-
limit: $limit
|
|
18
|
-
offset: $offset
|
|
19
|
-
filter: { fuelTank_eq: true, programId_eq: $programId }
|
|
20
|
-
) {
|
|
16
|
+
referralCodeList(limit: $limit, offset: $offset, filter: $filter) {
|
|
21
17
|
data {
|
|
22
18
|
code
|
|
23
19
|
dateUsed
|
|
@@ -67,24 +63,19 @@ function useReferralCodes(props) {
|
|
|
67
63
|
const user = Q();
|
|
68
64
|
const engagementMedium = B();
|
|
69
65
|
const programId = props.programId || H();
|
|
70
|
-
console.log({ props });
|
|
71
66
|
const { refresh } = ze();
|
|
72
|
-
const { envelope: referralData, states, callbacks, } = kn(GET_REFERRAL_CODES, (data) => {
|
|
73
|
-
var _a;
|
|
74
|
-
console.log({ queryData: data });
|
|
75
|
-
return (_a = data === null || data === void 0 ? void 0 : data.viewer) === null || _a === void 0 ? void 0 : _a.referralCodeList;
|
|
76
|
-
}, {
|
|
67
|
+
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.referralCodeList; }, {
|
|
77
68
|
limit: 1,
|
|
78
69
|
offset: 0,
|
|
79
|
-
}, {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
}, {
|
|
71
|
+
engagementMedium,
|
|
72
|
+
programId,
|
|
73
|
+
filter: {
|
|
74
|
+
fuelTank_eq: true,
|
|
75
|
+
programId_eq: programId,
|
|
76
|
+
dateUsed_exists: false,
|
|
77
|
+
},
|
|
78
|
+
}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
88
79
|
const [paginationContext, setPaginationContext] = Cn({
|
|
89
80
|
namespace: REFERRAL_CODES_PAGINATION_CONTEXT,
|
|
90
81
|
initialValue: { states, callbacks },
|
|
@@ -109,27 +100,27 @@ function useReferralCodes(props) {
|
|
|
109
100
|
},
|
|
110
101
|
});
|
|
111
102
|
useEffect(() => {
|
|
112
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
113
|
-
if (
|
|
114
|
-
const data =
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
104
|
+
if ((_a = referralData === null || referralData === void 0 ? void 0 : referralData.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
105
|
+
const data = referralData.data[0];
|
|
115
106
|
setReferralCodesContext({
|
|
116
107
|
refresh,
|
|
117
108
|
referralCode: data.code,
|
|
118
109
|
isCopied: !!data.dateCopied,
|
|
119
110
|
isUsed: !!data.dateUsed,
|
|
120
|
-
shareLink: (
|
|
111
|
+
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,
|
|
121
112
|
email: {
|
|
122
|
-
messageLink: (
|
|
113
|
+
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,
|
|
123
114
|
},
|
|
124
115
|
fbmessenger: {
|
|
125
|
-
messageLink: (
|
|
126
|
-
shareLink: (
|
|
116
|
+
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,
|
|
117
|
+
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,
|
|
127
118
|
},
|
|
128
|
-
whatsapp: { messageLink: (
|
|
119
|
+
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 },
|
|
129
120
|
});
|
|
130
121
|
setPaginationContext({ states, callbacks });
|
|
131
122
|
}
|
|
132
|
-
}, [
|
|
123
|
+
}, [referralData]);
|
|
133
124
|
console.log({ referralData, states });
|
|
134
125
|
return {
|
|
135
126
|
states: {
|
|
@@ -5,7 +5,7 @@ import { i as isDemo, _, d as dist, Q, H, $ as $e, y as yn, B, L, g as gn, f 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-47f83e9b.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-b31d83d7.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-faea9402.js';
|
|
17
17
|
import { i as isEmpty } from './utilities-292b61b9.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-db086943.js';
|
|
20
20
|
import './sqm-portal-container-view-83df005d.js';
|
|
21
21
|
|
|
22
22
|
const BigStat = class {
|
|
@@ -3,7 +3,7 @@ import { n as h$1, k as useState } from './stencil-hooks.module-576d7f01.js';
|
|
|
3
3
|
import { I as In, i as isDemo, d as dist, H, Q, y as yn, $ as $e, B } from './index.module-5eb0926c.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_COPIED, 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_COPIED, C as CopyTextView, u as useReferralCodes } from './copy-text-view-47f83e9b.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-f60a614c.js';
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ import './global-701bd5b0.js';
|
|
|
4
4
|
import { f as $n, S as Sn, c as setUserIdentity, d as dist, X as Xe, p as setProgramId } from './index.module-5eb0926c.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-47f83e9b.js';
|
|
8
8
|
import './cjs-bdfb4486.js';
|
|
9
9
|
import './mixins-f60a614c.js';
|
|
10
10
|
import { G as GenericTableView } from './GenericTableView-706f5b56.js';
|
|
@@ -25,7 +25,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-847526a2.js';
|
|
|
25
25
|
import './utilities-292b61b9.js';
|
|
26
26
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-865655da.js';
|
|
27
27
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-6c60df25.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-db086943.js';
|
|
29
29
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-83df005d.js';
|
|
30
30
|
import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-7d1aa71f.js';
|
|
31
31
|
|