@mx-cartographer/experiences 7.2.14-alpha.sms1 → 7.2.15-alpha.sms1
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/CHANGELOG.md +2 -2
- package/dist/{Account-B-CuHOYf.mjs → Account-vp_TAbGt.mjs} +1 -1
- package/dist/{AccountDetailsContent-DXVLAjNQ.mjs → AccountDetailsContent-Vj4LO6cx.mjs} +6 -6
- package/dist/{AccountDetailsHeader-vcy67tuH.mjs → AccountDetailsHeader-Df1JkzYi.mjs} +4 -4
- package/dist/{AccountFields-cUP-9Hm6.mjs → AccountFields-DUToRRqW.mjs} +2 -2
- package/dist/{AccountListItem-DChcf3SN.mjs → AccountListItem-CeY_WIpj.mjs} +3 -3
- package/dist/{AccountStore-D6KiXA1B.mjs → AccountStore-BkoLK9Tq.mjs} +1 -1
- package/dist/{Accounts-IeEtQjzA.mjs → Accounts-C1QxUB-e.mjs} +1 -1
- package/dist/{ConnectDrawer-DaFRU5st.mjs → ConnectDrawer-Bw5s6Dw1.mjs} +1 -0
- package/dist/{ConnectionsDrawer-DHJ7qdWL.mjs → ConnectionsDrawer-BDvVuJQf.mjs} +13 -12
- package/dist/{DebtsStore-z3VARSO6.mjs → DebtsStore-BD_XwsI7.mjs} +1 -1
- package/dist/{GoalStore-TD0BfzWX.mjs → GoalStore-DZ_Jvsa_.mjs} +1 -1
- package/dist/{ManageIncome-B5zuYyxg.mjs → ManageIncome-B9yGuahc.mjs} +2 -2
- package/dist/{NetWorthStore-B_1oulrt.mjs → NetWorthStore-D1NiDUcc.mjs} +2 -2
- package/dist/{RecurringSettings-CMwUC_rw.mjs → RecurringSettings-D9GFcsXV.mjs} +2 -2
- package/dist/{TransactionDetails-CuqEbcYg.mjs → TransactionDetails-BqCr2FTh.mjs} +42 -42
- package/dist/{TransactionStore-B4FCabkO.mjs → TransactionStore-DxPLdF3B.mjs} +31 -34
- package/dist/{ViewMoreMicroCard-iInbzbw0.mjs → ViewMoreMicroCard-SCn2wt4i.mjs} +571 -545
- package/dist/{WidgetContainer-C88Ecu2W.mjs → WidgetContainer-EbrN1oIo.mjs} +1 -1
- package/dist/accounts/index.es.js +11 -11
- package/dist/budgets/index.es.js +4 -4
- package/dist/cashflow/index.es.js +5 -5
- package/dist/common/index.es.js +11 -11
- package/dist/dashboard/index.es.js +1 -1
- package/dist/debts/index.es.js +5 -5
- package/dist/finstrong/index.es.js +4 -4
- package/dist/goals/index.es.js +7 -7
- package/dist/help/index.es.js +1 -1
- package/dist/investments/index.es.js +2 -2
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -0
- package/dist/microinsights/cards/MicroInsightCard.d.ts +7 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +2 -0
- package/dist/microinsights/carousel/CarouselHeader.d.ts +2 -1
- package/dist/microinsights/index.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +4 -0
- package/dist/networth/index.es.js +4 -4
- package/dist/recurringtransactions/index.es.js +5 -5
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +2 -2
- package/dist/transactions/index.es.js +6 -6
- package/dist/trends/index.es.js +4 -4
- package/dist/{useAccountDisplayName-BcRqfar8.mjs → useAccountDisplayName-jS05A6-6.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import u, { useState as
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ChevronLeft as
|
|
1
|
+
import { jsx as e, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import u, { useState as te, useEffect as oe } from "react";
|
|
3
|
+
import { observer as G } from "mobx-react-lite";
|
|
4
|
+
import Pe from "@mui/material/Button";
|
|
5
|
+
import K from "@mui/material/Stack";
|
|
6
|
+
import Ge from "@mui/material/Typography";
|
|
7
|
+
import { ChevronLeft as be, ChevronRight as Se } from "@mxenabled/mx-icons";
|
|
8
8
|
import { L as Ue } from "./Loader-DUaFpDGv.mjs";
|
|
9
9
|
import U from "@mui/material/Box";
|
|
10
|
-
import
|
|
11
|
-
import { useTheme as
|
|
12
|
-
import { useInView as
|
|
13
|
-
import { P as
|
|
14
|
-
import
|
|
15
|
-
import { b as
|
|
16
|
-
import { css as
|
|
17
|
-
import { b as
|
|
18
|
-
import
|
|
19
|
-
import { makeAutoObservable as
|
|
20
|
-
import { G as
|
|
21
|
-
import { B as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
10
|
+
import pe from "@mui/material/IconButton";
|
|
11
|
+
import { useTheme as ze } from "@mui/material/styles";
|
|
12
|
+
import { useInView as Me } from "react-intersection-observer";
|
|
13
|
+
import { P as Ke, CategoryIcon as $e, useTokens as Ae, MerchantLogo as Ye, Icon as ie } from "@mxenabled/mxui";
|
|
14
|
+
import se from "@mui/material/styles/useTheme";
|
|
15
|
+
import { b as je } from "./Category-CevNQ03n.mjs";
|
|
16
|
+
import { css as Xe } from "@mxenabled/cssinjs";
|
|
17
|
+
import { b as Qe } from "./Localization-2MODESHW.mjs";
|
|
18
|
+
import qe from "@mui/material/CircularProgress";
|
|
19
|
+
import { makeAutoObservable as de, runInAction as Oe } from "mobx";
|
|
20
|
+
import { G as _e, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.mjs";
|
|
21
|
+
import { B as Ce } from "./BeatApi-DhJpgCLz.mjs";
|
|
22
|
+
import it from "@mui/material/Card";
|
|
23
|
+
import ot from "@mui/material/CardActions";
|
|
24
|
+
import rt from "@mui/material/CardContent";
|
|
25
25
|
import lt from "@mui/material/CardHeader";
|
|
26
|
-
const
|
|
26
|
+
const fe = {
|
|
27
27
|
featureVersion: "spendVsIncomeTrends"
|
|
28
28
|
};
|
|
29
|
-
class
|
|
30
|
-
copyApi = new
|
|
29
|
+
class nt {
|
|
30
|
+
copyApi = new _e("/", "");
|
|
31
31
|
copyObject = {};
|
|
32
32
|
namespace = "experiences";
|
|
33
33
|
translationKey = "micro_insights";
|
|
34
34
|
constructor() {
|
|
35
|
-
|
|
35
|
+
de(this);
|
|
36
36
|
}
|
|
37
37
|
// NOTE: Not sure if this is special case, but other stores have this deprecation todo
|
|
38
38
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
39
39
|
// TODO: Remove this function
|
|
40
40
|
initialize = async (o, t) => {
|
|
41
|
-
this.copyApi = new
|
|
41
|
+
this.copyApi = new _e(o, t), await this.loadCopy();
|
|
42
42
|
};
|
|
43
43
|
loadCopy = async () => {
|
|
44
44
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
45
|
-
|
|
45
|
+
Oe(() => {
|
|
46
46
|
this.copyObject = o[this.translationKey];
|
|
47
47
|
});
|
|
48
48
|
};
|
|
@@ -56,7 +56,7 @@ class rt {
|
|
|
56
56
|
return this.copyObject.zero_state;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const he = {
|
|
60
60
|
BillAmountNotStandard: "BillAmountNotStandard",
|
|
61
61
|
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
62
62
|
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
@@ -73,59 +73,59 @@ const de = {
|
|
|
73
73
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
74
74
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
75
75
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
76
|
-
},
|
|
76
|
+
}, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
|
|
77
77
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
78
|
-
},
|
|
78
|
+
}, Te = (i) => `on${i}Click`, We = (i) => `on${i}View`, we = (i) => `on${i}ViewFirstTime`, Ee = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(he).reduce(
|
|
79
79
|
(i, o) => ({
|
|
80
80
|
...i,
|
|
81
|
-
[
|
|
82
|
-
action:
|
|
83
|
-
category:
|
|
84
|
-
label:
|
|
85
|
-
value:
|
|
81
|
+
[Te(o)]: {
|
|
82
|
+
action: w.MICRO_BEAT_CLICKED,
|
|
83
|
+
category: W.BEAT_INTERACTION,
|
|
84
|
+
label: Ee(o),
|
|
85
|
+
value: S
|
|
86
86
|
}
|
|
87
87
|
}),
|
|
88
88
|
{}
|
|
89
|
-
),
|
|
89
|
+
), ct = () => Object.values(he).reduce(
|
|
90
90
|
(i, o) => ({
|
|
91
91
|
...i,
|
|
92
|
-
[
|
|
93
|
-
action:
|
|
94
|
-
category:
|
|
95
|
-
label:
|
|
96
|
-
value:
|
|
92
|
+
[We(o)]: {
|
|
93
|
+
action: w.MICRO_BEAT_DISPLAYED,
|
|
94
|
+
category: W.BEAT_INTERACTION,
|
|
95
|
+
label: Ee(o),
|
|
96
|
+
value: S
|
|
97
97
|
}
|
|
98
98
|
}),
|
|
99
99
|
{}
|
|
100
|
-
),
|
|
100
|
+
), st = () => Object.values(he).reduce(
|
|
101
101
|
(i, o) => ({
|
|
102
102
|
...i,
|
|
103
|
-
[
|
|
104
|
-
action:
|
|
105
|
-
category:
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
103
|
+
[we(o)]: {
|
|
104
|
+
action: w.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
105
|
+
category: W.BEAT_INTERACTION,
|
|
106
|
+
label: Ee(o),
|
|
107
|
+
value: S
|
|
108
108
|
}
|
|
109
109
|
}),
|
|
110
110
|
{}
|
|
111
|
-
),
|
|
111
|
+
), T = {
|
|
112
112
|
CARD: "Card",
|
|
113
113
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
114
114
|
MICRO_WIDGET: "Micro Widget",
|
|
115
115
|
VIEW_MORE: "View More"
|
|
116
|
-
},
|
|
116
|
+
}, W = {
|
|
117
117
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
118
118
|
BEAT_INTERACTION: "Beat Interaction"
|
|
119
|
-
},
|
|
119
|
+
}, M = {
|
|
120
120
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
121
121
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
122
122
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
123
123
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
124
124
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
125
125
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
126
|
-
},
|
|
126
|
+
}, xe = {
|
|
127
127
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
128
|
-
},
|
|
128
|
+
}, w = {
|
|
129
129
|
CONTROL_BACKWARD: "Control Backward",
|
|
130
130
|
CONTROL_FORWARD: "Control Forward",
|
|
131
131
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -133,95 +133,95 @@ const de = {
|
|
|
133
133
|
MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
|
|
134
134
|
SWIPE_BACKWARD: "Swipe Backward",
|
|
135
135
|
SWIPE_FORWARD: "Swipe Forward"
|
|
136
|
-
},
|
|
136
|
+
}, H = {
|
|
137
137
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
138
138
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
139
139
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
140
|
-
},
|
|
141
|
-
[
|
|
142
|
-
label:
|
|
143
|
-
name:
|
|
144
|
-
path:
|
|
145
|
-
value:
|
|
140
|
+
}, Re = {
|
|
141
|
+
[H.MICRO_WIDGET_CAROUSEL]: {
|
|
142
|
+
label: T.MICRO_WIDGET,
|
|
143
|
+
name: H.MICRO_WIDGET_CAROUSEL,
|
|
144
|
+
path: me.INSIGHTS_MICRO_WIDGET,
|
|
145
|
+
value: S
|
|
146
146
|
},
|
|
147
147
|
// zero state
|
|
148
|
-
[
|
|
149
|
-
label:
|
|
150
|
-
name:
|
|
151
|
-
path:
|
|
152
|
-
value:
|
|
148
|
+
[H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
149
|
+
label: T.MICRO_WIDGET,
|
|
150
|
+
name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
151
|
+
path: me.INSIGHTS_MICRO_WIDGET,
|
|
152
|
+
value: S
|
|
153
153
|
},
|
|
154
154
|
// no relevant cards
|
|
155
|
-
[
|
|
156
|
-
label:
|
|
157
|
-
name:
|
|
155
|
+
[H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
156
|
+
label: T.MICRO_WIDGET,
|
|
157
|
+
name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
158
158
|
path: "/micro-widget",
|
|
159
|
-
value:
|
|
159
|
+
value: S
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, ge = {
|
|
162
162
|
// carousel control interaction events - clicks and swipes
|
|
163
|
-
[
|
|
164
|
-
action:
|
|
165
|
-
category:
|
|
166
|
-
label:
|
|
167
|
-
value:
|
|
163
|
+
[M.ON_CAROUSEL_BACK_CLICK]: {
|
|
164
|
+
action: w.CONTROL_BACKWARD,
|
|
165
|
+
category: W.MICRO_WIDGET_INTERACTION,
|
|
166
|
+
label: T.CAROUSEL_CONTROL,
|
|
167
|
+
value: S
|
|
168
168
|
},
|
|
169
|
-
[
|
|
170
|
-
action:
|
|
171
|
-
category:
|
|
172
|
-
label:
|
|
173
|
-
value:
|
|
169
|
+
[M.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
170
|
+
action: w.CONTROL_FORWARD,
|
|
171
|
+
category: W.MICRO_WIDGET_INTERACTION,
|
|
172
|
+
label: T.CAROUSEL_CONTROL,
|
|
173
|
+
value: S
|
|
174
174
|
},
|
|
175
|
-
[
|
|
176
|
-
action:
|
|
177
|
-
category:
|
|
178
|
-
label:
|
|
179
|
-
value:
|
|
175
|
+
[M.ON_CAROUSEL_BACK_SWIPE]: {
|
|
176
|
+
action: w.SWIPE_BACKWARD,
|
|
177
|
+
category: W.MICRO_WIDGET_INTERACTION,
|
|
178
|
+
label: T.CAROUSEL_CONTROL,
|
|
179
|
+
value: S
|
|
180
180
|
},
|
|
181
|
-
[
|
|
182
|
-
action:
|
|
183
|
-
category:
|
|
184
|
-
label:
|
|
185
|
-
value:
|
|
181
|
+
[M.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
182
|
+
action: w.SWIPE_FORWARD,
|
|
183
|
+
category: W.MICRO_WIDGET_INTERACTION,
|
|
184
|
+
label: T.CAROUSEL_CONTROL,
|
|
185
|
+
value: S
|
|
186
186
|
},
|
|
187
187
|
// read more card events
|
|
188
|
-
[
|
|
189
|
-
action:
|
|
190
|
-
category:
|
|
191
|
-
label:
|
|
192
|
-
value:
|
|
188
|
+
[M.ON_VIEW_MORE_CLICKED]: {
|
|
189
|
+
action: w.MICRO_BEAT_CLICKED,
|
|
190
|
+
category: W.BEAT_INTERACTION,
|
|
191
|
+
label: T.VIEW_MORE,
|
|
192
|
+
value: S
|
|
193
193
|
},
|
|
194
|
-
[
|
|
195
|
-
action:
|
|
196
|
-
category:
|
|
197
|
-
label:
|
|
198
|
-
value:
|
|
194
|
+
[xe.ON_VIEW_MORE_VIEWED]: {
|
|
195
|
+
action: w.MICRO_BEAT_DISPLAYED,
|
|
196
|
+
category: W.BEAT_INTERACTION,
|
|
197
|
+
label: T.VIEW_MORE,
|
|
198
|
+
value: S
|
|
199
199
|
},
|
|
200
|
-
...nt(),
|
|
201
200
|
...at(),
|
|
202
|
-
...ct()
|
|
203
|
-
|
|
201
|
+
...ct(),
|
|
202
|
+
...st()
|
|
203
|
+
}, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
|
|
204
204
|
throw t;
|
|
205
|
-
}),
|
|
205
|
+
}), ye = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
|
|
206
206
|
throw t;
|
|
207
207
|
});
|
|
208
|
-
class
|
|
209
|
-
onAnalyticEvent =
|
|
210
|
-
onAnalyticPageView =
|
|
211
|
-
beatApi = new
|
|
208
|
+
class dt {
|
|
209
|
+
onAnalyticEvent = Ie;
|
|
210
|
+
onAnalyticPageView = ye;
|
|
211
|
+
beatApi = new Ce("/", "");
|
|
212
212
|
constructor() {
|
|
213
|
-
|
|
213
|
+
de(this);
|
|
214
214
|
}
|
|
215
|
-
initialize = async (o, t,
|
|
216
|
-
this.onAnalyticEvent = (
|
|
217
|
-
|
|
218
|
-
throw a.status === 401 &&
|
|
215
|
+
initialize = async (o, t, r) => {
|
|
216
|
+
this.onAnalyticEvent = (n, l) => {
|
|
217
|
+
Ie(n, l).then((a) => a).catch((a) => {
|
|
218
|
+
throw a.status === 401 && r(), a;
|
|
219
219
|
});
|
|
220
|
-
}, this.onAnalyticPageView = (
|
|
221
|
-
|
|
222
|
-
throw a.status === 401 &&
|
|
220
|
+
}, this.onAnalyticPageView = (n, l) => {
|
|
221
|
+
ye(n, l).then((a) => a).catch((a) => {
|
|
222
|
+
throw a.status === 401 && r(), a;
|
|
223
223
|
});
|
|
224
|
-
}, this.beatApi = new
|
|
224
|
+
}, this.beatApi = new Ce(o, t);
|
|
225
225
|
};
|
|
226
226
|
updateBeat = async (o) => {
|
|
227
227
|
this.beatApi.updateBeat(o);
|
|
@@ -230,7 +230,7 @@ class st {
|
|
|
230
230
|
this.beatApi.updateOffer(o);
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
class
|
|
233
|
+
class ht {
|
|
234
234
|
copyStore;
|
|
235
235
|
endpoint = "/";
|
|
236
236
|
insightsMicroWidgetStore;
|
|
@@ -238,61 +238,62 @@ class dt {
|
|
|
238
238
|
token = "";
|
|
239
239
|
isInitialized = !1;
|
|
240
240
|
constructor() {
|
|
241
|
-
this.copyStore = new
|
|
241
|
+
this.copyStore = new nt(), this.insightsMicroWidgetStore = new dt(), de(this);
|
|
242
242
|
}
|
|
243
|
-
initialize = async (o, t,
|
|
244
|
-
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t,
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
this.session =
|
|
243
|
+
initialize = async (o, t, r) => {
|
|
244
|
+
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
|
|
245
|
+
const n = await Je(o, t, "1.0.0", "Micro Insights Carousel");
|
|
246
|
+
Oe(() => {
|
|
247
|
+
this.session = n, this.isInitialized = !0;
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
const
|
|
251
|
+
const $ = u.createContext(null), Et = ({
|
|
252
252
|
onEvent: i,
|
|
253
253
|
onPageview: o,
|
|
254
254
|
store: t,
|
|
255
|
-
children:
|
|
256
|
-
}) => /* @__PURE__ */ e(
|
|
255
|
+
children: r
|
|
256
|
+
}) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), re = u.forwardRef(
|
|
257
257
|
function({
|
|
258
258
|
actionText: o,
|
|
259
259
|
ariaLabel: t,
|
|
260
|
-
backgroundColor:
|
|
261
|
-
description:
|
|
262
|
-
heightOverrides:
|
|
260
|
+
backgroundColor: r,
|
|
261
|
+
description: n,
|
|
262
|
+
heightOverrides: l,
|
|
263
263
|
icon: a,
|
|
264
|
-
isActiveCard:
|
|
265
|
-
isZeroState:
|
|
264
|
+
isActiveCard: d,
|
|
265
|
+
isZeroState: p,
|
|
266
266
|
onCardClick: _ = () => {
|
|
267
267
|
},
|
|
268
|
-
showIcon:
|
|
269
|
-
style:
|
|
270
|
-
|
|
268
|
+
showIcon: C,
|
|
269
|
+
style: f = {},
|
|
270
|
+
fontColors: h = {},
|
|
271
|
+
title: m,
|
|
271
272
|
variant: c,
|
|
272
273
|
widthOverrides: E
|
|
273
|
-
},
|
|
274
|
-
const
|
|
275
|
-
|
|
274
|
+
}, R) {
|
|
275
|
+
const I = se(), [x, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, g = /* @__PURE__ */ e(
|
|
276
|
+
Ke,
|
|
276
277
|
{
|
|
277
278
|
className: "mx-micro-card-description",
|
|
278
|
-
color: "text.primary",
|
|
279
|
+
color: h.textColor ? "undefined" : "text.primary",
|
|
279
280
|
sx: {
|
|
280
281
|
display: "-webkit-box",
|
|
281
282
|
fontSize: 13,
|
|
282
283
|
letterSpacing: 0.48,
|
|
283
284
|
lineHeight: "20px",
|
|
284
285
|
overflow: "hidden",
|
|
285
|
-
pl:
|
|
286
|
-
pr:
|
|
286
|
+
pl: p ? 0 : 28,
|
|
287
|
+
pr: p ? 0 : 8,
|
|
287
288
|
WebkitBoxOrient: "vertical",
|
|
288
289
|
WebkitLineClamp: 2,
|
|
289
290
|
wordWrap: "break-word"
|
|
290
291
|
},
|
|
291
|
-
children:
|
|
292
|
+
children: n && /* @__PURE__ */ e(
|
|
292
293
|
"span",
|
|
293
294
|
{
|
|
294
|
-
dangerouslySetInnerHTML: { __html:
|
|
295
|
-
style: { fontFamily:
|
|
295
|
+
dangerouslySetInnerHTML: { __html: n },
|
|
296
|
+
style: { fontFamily: I.typography.fontFamily }
|
|
296
297
|
}
|
|
297
298
|
)
|
|
298
299
|
}
|
|
@@ -300,54 +301,55 @@ const K = u.createContext(null), ht = ({
|
|
|
300
301
|
return /* @__PURE__ */ e(
|
|
301
302
|
U,
|
|
302
303
|
{
|
|
303
|
-
"aria-hidden": !
|
|
304
|
+
"aria-hidden": !d,
|
|
304
305
|
"aria-label": t,
|
|
305
306
|
"aria-labelledby": "divButton",
|
|
306
307
|
"aria-roledescription": "slide",
|
|
307
|
-
ref:
|
|
308
|
+
ref: R,
|
|
308
309
|
role: "group",
|
|
309
310
|
sx: {
|
|
310
311
|
height: "100%",
|
|
311
312
|
minWidth: E ? `${E}px` : "100%",
|
|
312
|
-
fontFamily:
|
|
313
|
+
fontFamily: I.typography.fontFamily
|
|
313
314
|
},
|
|
314
315
|
children: /* @__PURE__ */ e(
|
|
315
316
|
U,
|
|
316
317
|
{
|
|
317
|
-
"aria-hidden": !
|
|
318
|
+
"aria-hidden": !d,
|
|
318
319
|
"aria-label": t,
|
|
319
320
|
id: "divButton",
|
|
320
321
|
onClick: () => _(),
|
|
321
|
-
onKeyDown: () =>
|
|
322
|
-
onKeyUp: () =>
|
|
323
|
-
ref:
|
|
322
|
+
onKeyDown: () => O(!1),
|
|
323
|
+
onKeyUp: () => O(!0),
|
|
324
|
+
ref: R,
|
|
324
325
|
role: "button",
|
|
325
326
|
sx: {
|
|
326
|
-
border:
|
|
327
|
+
border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
327
328
|
borderRadius: "8px",
|
|
328
329
|
height: "100%"
|
|
329
330
|
},
|
|
330
|
-
tabIndex:
|
|
331
|
+
tabIndex: d ? 0 : -1,
|
|
331
332
|
children: /* @__PURE__ */ e(
|
|
332
|
-
|
|
333
|
+
it,
|
|
333
334
|
{
|
|
334
335
|
"aria-roledescription": "slide",
|
|
335
336
|
className: "mx-micro-card",
|
|
336
337
|
role: "group",
|
|
337
338
|
sx: {
|
|
338
|
-
backgroundColor:
|
|
339
|
+
backgroundColor: r,
|
|
339
340
|
boxSizing: "border-box",
|
|
340
341
|
cursor: "pointer",
|
|
341
|
-
height:
|
|
342
|
+
height: l ? "100%" : 124,
|
|
342
343
|
p: 16,
|
|
343
|
-
...
|
|
344
|
+
...z,
|
|
344
345
|
"& .MuiCardHeader-avatar": {
|
|
346
|
+
color: h.iconColor,
|
|
345
347
|
mr: "8px"
|
|
346
348
|
}
|
|
347
349
|
},
|
|
348
350
|
variant: c,
|
|
349
|
-
children: /* @__PURE__ */
|
|
350
|
-
|
|
351
|
+
children: /* @__PURE__ */ v(
|
|
352
|
+
K,
|
|
351
353
|
{
|
|
352
354
|
sx: {
|
|
353
355
|
alignItems: "space-between",
|
|
@@ -357,16 +359,16 @@ const K = u.createContext(null), ht = ({
|
|
|
357
359
|
/* @__PURE__ */ e(
|
|
358
360
|
lt,
|
|
359
361
|
{
|
|
360
|
-
avatar:
|
|
361
|
-
subheader:
|
|
362
|
-
sx: { p: 0 },
|
|
363
|
-
title:
|
|
362
|
+
avatar: C && a,
|
|
363
|
+
subheader: p && g,
|
|
364
|
+
sx: { color: h.headerColor, p: 0 },
|
|
365
|
+
title: m,
|
|
364
366
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
365
367
|
}
|
|
366
368
|
),
|
|
367
|
-
/* @__PURE__ */ e(
|
|
369
|
+
/* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && g }),
|
|
368
370
|
!!o && /* @__PURE__ */ e(
|
|
369
|
-
|
|
371
|
+
ot,
|
|
370
372
|
{
|
|
371
373
|
sx: {
|
|
372
374
|
mt: "auto",
|
|
@@ -375,13 +377,13 @@ const K = u.createContext(null), ht = ({
|
|
|
375
377
|
children: /* @__PURE__ */ e(
|
|
376
378
|
U,
|
|
377
379
|
{
|
|
378
|
-
sx: (
|
|
379
|
-
color:
|
|
380
|
+
sx: (D) => ({
|
|
381
|
+
color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
|
|
380
382
|
fontSize: 14,
|
|
381
383
|
fontWeight: "bold",
|
|
382
384
|
px: 28,
|
|
383
|
-
fontFamily:
|
|
384
|
-
...
|
|
385
|
+
fontFamily: D.typography.fontFamily,
|
|
386
|
+
...F
|
|
385
387
|
}),
|
|
386
388
|
children: o
|
|
387
389
|
}
|
|
@@ -398,15 +400,15 @@ const K = u.createContext(null), ht = ({
|
|
|
398
400
|
}
|
|
399
401
|
);
|
|
400
402
|
}
|
|
401
|
-
),
|
|
402
|
-
const [o, t] =
|
|
403
|
-
return
|
|
403
|
+
), ut = ({ beat: i }) => {
|
|
404
|
+
const [o, t] = te(je.UNCATEGORIZED);
|
|
405
|
+
return oe(() => {
|
|
404
406
|
i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
|
|
405
|
-
}, []), /* @__PURE__ */ e(
|
|
406
|
-
},
|
|
407
|
-
const o =
|
|
407
|
+
}, []), /* @__PURE__ */ e($e, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
|
|
408
|
+
}, pt = ({ beat: i }) => {
|
|
409
|
+
const o = Ae(), t = _t(o);
|
|
408
410
|
return /* @__PURE__ */ e(
|
|
409
|
-
|
|
411
|
+
Ye,
|
|
410
412
|
{
|
|
411
413
|
categoryGuid: i.primary_category_guid || i.category_guids && i.category_guids[0] || "",
|
|
412
414
|
className: t,
|
|
@@ -414,18 +416,18 @@ const K = u.createContext(null), ht = ({
|
|
|
414
416
|
size: 16
|
|
415
417
|
}
|
|
416
418
|
);
|
|
417
|
-
},
|
|
419
|
+
}, _t = (i) => Xe({
|
|
418
420
|
marginTop: i.Spacing.XTiny,
|
|
419
421
|
"& .kyper-categoryicon": {
|
|
420
422
|
display: "flex"
|
|
421
423
|
}
|
|
422
|
-
}),
|
|
424
|
+
}), Ct = G(pt), ft = ({
|
|
423
425
|
color: i = "currentColor",
|
|
424
426
|
height: o,
|
|
425
427
|
size: t = 16,
|
|
426
|
-
styles:
|
|
427
|
-
viewBox:
|
|
428
|
-
width:
|
|
428
|
+
styles: r,
|
|
429
|
+
viewBox: n = "0 0 16 16",
|
|
430
|
+
width: l
|
|
429
431
|
}) => /* @__PURE__ */ e(
|
|
430
432
|
"svg",
|
|
431
433
|
{
|
|
@@ -433,9 +435,9 @@ const K = u.createContext(null), ht = ({
|
|
|
433
435
|
className: "kyper-icon",
|
|
434
436
|
focusable: !1,
|
|
435
437
|
height: o || t,
|
|
436
|
-
style:
|
|
437
|
-
viewBox:
|
|
438
|
-
width:
|
|
438
|
+
style: r,
|
|
439
|
+
viewBox: n,
|
|
440
|
+
width: l || t,
|
|
439
441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
440
442
|
children: /* @__PURE__ */ e(
|
|
441
443
|
"path",
|
|
@@ -445,18 +447,18 @@ const K = u.createContext(null), ht = ({
|
|
|
445
447
|
}
|
|
446
448
|
)
|
|
447
449
|
}
|
|
448
|
-
),
|
|
450
|
+
), mt = (i) => i ? i.data ? i.data.map((o) => {
|
|
449
451
|
const t = {};
|
|
450
|
-
return i.names?.map((
|
|
451
|
-
t[
|
|
452
|
+
return i.names?.map((r, n) => {
|
|
453
|
+
t[r] = o[n];
|
|
452
454
|
}), t;
|
|
453
|
-
}) : [] : [],
|
|
454
|
-
const t =
|
|
455
|
-
return !
|
|
456
|
-
},
|
|
457
|
-
const o =
|
|
458
|
-
return /* @__PURE__ */ e(
|
|
459
|
-
},
|
|
455
|
+
}) : [] : [], Rt = (i, o) => {
|
|
456
|
+
const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
|
|
457
|
+
return !n.length || !l.length ? o.Color.Primary300 : n[0].amount > l[0].amount ? o.Color.Error300 : n[0].amount < l[0].amount ? o.Color.Success300 : o.Color.Primary300;
|
|
458
|
+
}, gt = ({ beat: i }) => {
|
|
459
|
+
const o = Ae(), t = Rt(i.data_series, o);
|
|
460
|
+
return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
|
|
461
|
+
}, De = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
460
462
|
/* @__PURE__ */ e(
|
|
461
463
|
"path",
|
|
462
464
|
{
|
|
@@ -700,7 +702,7 @@ const K = u.createContext(null), ht = ({
|
|
|
700
702
|
fillRule: "evenodd"
|
|
701
703
|
}
|
|
702
704
|
),
|
|
703
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ v("g", { filter: "url(#filter0_d_1565_98011)", children: [
|
|
704
706
|
/* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
|
|
705
707
|
"path",
|
|
706
708
|
{
|
|
@@ -956,10 +958,10 @@ const K = u.createContext(null), ht = ({
|
|
|
956
958
|
),
|
|
957
959
|
/* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
|
|
958
960
|
] }),
|
|
959
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ v("g", { filter: "url(#filter1_d_1565_98011)", children: [
|
|
960
962
|
/* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
|
|
961
963
|
/* @__PURE__ */ e("mask", { height: "30", id: "mask2_1565_98011", maskUnits: "userSpaceOnUse", width: "30", x: "0", y: "1", children: /* @__PURE__ */ e("circle", { cx: "15.0435", cy: "16.0445", fill: "#F8F9FB", r: "14.3951" }) }),
|
|
962
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ v("g", { mask: "url(#mask2_1565_98011)", children: [
|
|
963
965
|
/* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
|
|
964
966
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
|
|
965
967
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
|
|
@@ -1149,8 +1151,8 @@ const K = u.createContext(null), ht = ({
|
|
|
1149
1151
|
fill: "#CDD3DD"
|
|
1150
1152
|
}
|
|
1151
1153
|
),
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
+
/* @__PURE__ */ v("defs", { children: [
|
|
1155
|
+
/* @__PURE__ */ v(
|
|
1154
1156
|
"filter",
|
|
1155
1157
|
{
|
|
1156
1158
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1193,7 +1195,7 @@ const K = u.createContext(null), ht = ({
|
|
|
1193
1195
|
]
|
|
1194
1196
|
}
|
|
1195
1197
|
),
|
|
1196
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ v(
|
|
1197
1199
|
"filter",
|
|
1198
1200
|
{
|
|
1199
1201
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1237,134 +1239,145 @@ const K = u.createContext(null), ht = ({
|
|
|
1237
1239
|
}
|
|
1238
1240
|
)
|
|
1239
1241
|
] })
|
|
1240
|
-
] }),
|
|
1241
|
-
const
|
|
1242
|
-
return
|
|
1243
|
-
|
|
1242
|
+
] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
|
1243
|
+
const n = se(), l = o?.primary_300 ? o.primary_300 : n.palette.primary.main;
|
|
1244
|
+
return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || l } }) : r === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(gt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
|
|
1245
|
+
ie,
|
|
1244
1246
|
{
|
|
1245
1247
|
fill: !0,
|
|
1246
1248
|
name: "info",
|
|
1247
1249
|
sx: {
|
|
1248
|
-
color: l
|
|
1250
|
+
color: l
|
|
1249
1251
|
}
|
|
1250
1252
|
}
|
|
1251
1253
|
);
|
|
1252
|
-
},
|
|
1253
|
-
const i = u.useContext(
|
|
1254
|
+
}, k = () => {
|
|
1255
|
+
const i = u.useContext($);
|
|
1254
1256
|
if (!i)
|
|
1255
1257
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
1256
1258
|
return i.store.copyStore;
|
|
1257
|
-
},
|
|
1258
|
-
const i = u.useContext(
|
|
1259
|
+
}, It = () => {
|
|
1260
|
+
const i = u.useContext($);
|
|
1259
1261
|
if (!i?.store?.insightsMicroWidgetStore)
|
|
1260
1262
|
throw new Error(
|
|
1261
1263
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
1262
1264
|
);
|
|
1263
1265
|
return i.store.insightsMicroWidgetStore;
|
|
1264
|
-
},
|
|
1265
|
-
const i = u.useContext(
|
|
1266
|
+
}, Y = () => {
|
|
1267
|
+
const i = u.useContext($);
|
|
1266
1268
|
if (!i)
|
|
1267
1269
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
1268
1270
|
return { onEvent: i.onEvent };
|
|
1269
|
-
},
|
|
1270
|
-
const i = u.useContext(
|
|
1271
|
+
}, Le = () => {
|
|
1272
|
+
const i = u.useContext($);
|
|
1271
1273
|
if (!i)
|
|
1272
1274
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
1273
1275
|
return { onPageview: i.onPageview };
|
|
1274
|
-
},
|
|
1276
|
+
}, Ne = {
|
|
1275
1277
|
LARGE: 180,
|
|
1276
1278
|
STANDARD: 154,
|
|
1277
1279
|
XLARGE: 200,
|
|
1278
1280
|
XXLARGE: 248
|
|
1279
|
-
},
|
|
1281
|
+
}, yt = 50, Ve = 1, vt = ({
|
|
1280
1282
|
ariaLabel: i,
|
|
1281
1283
|
backgroundColor: o,
|
|
1282
1284
|
beat: t,
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1285
|
+
clientColorScheme: r,
|
|
1286
|
+
showCTAColocatedWithText: n = !0,
|
|
1287
|
+
heightOverrides: l,
|
|
1288
|
+
index: a,
|
|
1289
|
+
isActiveCard: d,
|
|
1290
|
+
onCardClick: p,
|
|
1291
|
+
posthog: _,
|
|
1292
|
+
showIcon: C,
|
|
1293
|
+
variant: f,
|
|
1294
|
+
widthOverrides: h
|
|
1292
1295
|
}) => {
|
|
1293
|
-
const { ref:
|
|
1294
|
-
threshold:
|
|
1295
|
-
}), { cardsCopy: E } =
|
|
1296
|
-
|
|
1297
|
-
c && (t.has_been_displayed ?
|
|
1296
|
+
const { ref: m, inView: c } = Me({
|
|
1297
|
+
threshold: Ve
|
|
1298
|
+
}), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: I, updateOffer: x } = It();
|
|
1299
|
+
oe(() => {
|
|
1300
|
+
c && (t.has_been_displayed ? R(We(t.template)) : (t.guid.startsWith("OFR") ? x({
|
|
1298
1301
|
...t,
|
|
1299
1302
|
has_been_displayed: !0
|
|
1300
|
-
}) :
|
|
1303
|
+
}) : I({
|
|
1301
1304
|
...t,
|
|
1302
1305
|
has_been_displayed: !0
|
|
1303
|
-
}),
|
|
1304
|
-
}, [c]),
|
|
1306
|
+
}), R(we(t.template))));
|
|
1307
|
+
}, [c]), oe(() => {
|
|
1305
1308
|
if (c && t)
|
|
1306
1309
|
if (t.template === "MarketingOffer") {
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1310
|
+
const y = t;
|
|
1311
|
+
_?.capture("viewed_messaging_insight", {
|
|
1309
1312
|
template: t.template,
|
|
1310
|
-
campaign_guid:
|
|
1311
|
-
campaign_name:
|
|
1313
|
+
campaign_guid: y.campaign_guid,
|
|
1314
|
+
campaign_name: y.pulse_campaign_name
|
|
1312
1315
|
});
|
|
1313
1316
|
} else
|
|
1314
|
-
|
|
1317
|
+
_?.capture("viewed_insight", {
|
|
1315
1318
|
beat_guid: t.guid,
|
|
1316
1319
|
template: t.template,
|
|
1317
|
-
position:
|
|
1320
|
+
position: a
|
|
1318
1321
|
});
|
|
1319
|
-
}, [t,
|
|
1320
|
-
const
|
|
1321
|
-
if (
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1322
|
+
}, [t, a, c]);
|
|
1323
|
+
const O = () => {
|
|
1324
|
+
if (p && p(t), R(Te(t.template)), t.template === "MarketingOffer") {
|
|
1325
|
+
const y = t;
|
|
1326
|
+
_?.capture("clicked_messaging_insight", {
|
|
1324
1327
|
template: t.template,
|
|
1325
|
-
campaign_guid:
|
|
1326
|
-
campaign_name:
|
|
1328
|
+
campaign_guid: y.campaign_guid,
|
|
1329
|
+
campaign_name: y.pulse_campaign_name
|
|
1327
1330
|
});
|
|
1328
1331
|
} else
|
|
1329
|
-
|
|
1332
|
+
_?.capture("clicked_insight", {
|
|
1330
1333
|
beat_guid: t.guid,
|
|
1331
1334
|
template: t.template,
|
|
1332
|
-
position:
|
|
1335
|
+
position: a
|
|
1333
1336
|
});
|
|
1334
1337
|
};
|
|
1335
1338
|
return /* @__PURE__ */ e(
|
|
1336
|
-
|
|
1339
|
+
re,
|
|
1337
1340
|
{
|
|
1338
1341
|
actionText: t.micro_call_to_action || E.micro_card_cta,
|
|
1339
1342
|
ariaLabel: i,
|
|
1340
1343
|
backgroundColor: o,
|
|
1341
1344
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1345
|
+
fontColors: { buttonColor: r?.primary_300 },
|
|
1346
|
+
heightOverrides: l,
|
|
1347
|
+
icon: ve && /* @__PURE__ */ e(
|
|
1348
|
+
ve,
|
|
1349
|
+
{
|
|
1350
|
+
beat: t,
|
|
1351
|
+
clientColorScheme: r,
|
|
1352
|
+
color: t?.icon_color,
|
|
1353
|
+
type: t?.icon_type
|
|
1354
|
+
}
|
|
1355
|
+
),
|
|
1356
|
+
isActiveCard: d,
|
|
1357
|
+
onCardClick: O,
|
|
1358
|
+
posthog: _,
|
|
1359
|
+
ref: m,
|
|
1360
|
+
showCTAColocatedWithText: n,
|
|
1361
|
+
showIcon: C,
|
|
1350
1362
|
title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
|
|
1351
|
-
variant:
|
|
1352
|
-
widthOverrides:
|
|
1363
|
+
variant: f,
|
|
1364
|
+
widthOverrides: h
|
|
1353
1365
|
}
|
|
1354
1366
|
);
|
|
1355
|
-
},
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1367
|
+
}, St = ({
|
|
1368
|
+
clientColorScheme: i,
|
|
1369
|
+
currentBeatIndex: o,
|
|
1370
|
+
numBeats: t,
|
|
1371
|
+
onNextClick: r,
|
|
1372
|
+
onPreviousClick: n,
|
|
1373
|
+
scrollRightBoundary: l,
|
|
1374
|
+
scrollX: a,
|
|
1375
|
+
shouldApplyNewAnimation: d = !1,
|
|
1376
|
+
visibleCardsCount: p = 1
|
|
1364
1377
|
}) => {
|
|
1365
|
-
const
|
|
1366
|
-
return /* @__PURE__ */
|
|
1367
|
-
|
|
1378
|
+
const _ = ze(), { carouselCopy: C } = k(), f = Math.floor(a) > l || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
|
|
1379
|
+
return /* @__PURE__ */ v(
|
|
1380
|
+
K,
|
|
1368
1381
|
{
|
|
1369
1382
|
direction: "row",
|
|
1370
1383
|
sx: {
|
|
@@ -1379,34 +1392,34 @@ const K = u.createContext(null), ht = ({
|
|
|
1379
1392
|
},
|
|
1380
1393
|
children: [
|
|
1381
1394
|
/* @__PURE__ */ e(
|
|
1382
|
-
|
|
1395
|
+
pe,
|
|
1383
1396
|
{
|
|
1384
|
-
"aria-disabled":
|
|
1385
|
-
"aria-label":
|
|
1386
|
-
disabled:
|
|
1387
|
-
onClick:
|
|
1397
|
+
"aria-disabled": f,
|
|
1398
|
+
"aria-label": C.previous_insight_cta_aria,
|
|
1399
|
+
disabled: f,
|
|
1400
|
+
onClick: n,
|
|
1388
1401
|
children: /* @__PURE__ */ e(
|
|
1389
|
-
|
|
1402
|
+
be,
|
|
1390
1403
|
{
|
|
1391
1404
|
style: {
|
|
1392
|
-
color:
|
|
1405
|
+
color: f ? m : c
|
|
1393
1406
|
}
|
|
1394
1407
|
}
|
|
1395
1408
|
)
|
|
1396
1409
|
}
|
|
1397
1410
|
),
|
|
1398
|
-
Array.from({ length:
|
|
1399
|
-
const
|
|
1411
|
+
Array.from({ length: t }).map((E, R) => {
|
|
1412
|
+
const I = R === o;
|
|
1400
1413
|
return /* @__PURE__ */ e(
|
|
1401
1414
|
U,
|
|
1402
1415
|
{
|
|
1403
1416
|
className: "mx-insights-micro-carousel-dots",
|
|
1404
1417
|
sx: {
|
|
1405
|
-
bgcolor:
|
|
1418
|
+
bgcolor: I ? c : m,
|
|
1406
1419
|
height: 8,
|
|
1407
1420
|
mr: 8,
|
|
1408
1421
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
1409
|
-
...
|
|
1422
|
+
...d ? {
|
|
1410
1423
|
borderRadius: "4px",
|
|
1411
1424
|
transformOrigin: "center",
|
|
1412
1425
|
transition: "all 0.5s ease-out",
|
|
@@ -1415,24 +1428,24 @@ const K = u.createContext(null), ht = ({
|
|
|
1415
1428
|
borderRadius: "50%",
|
|
1416
1429
|
p: 0
|
|
1417
1430
|
},
|
|
1418
|
-
width:
|
|
1431
|
+
width: I && d ? 24 : 8
|
|
1419
1432
|
}
|
|
1420
1433
|
},
|
|
1421
|
-
`carousel-button-${
|
|
1434
|
+
`carousel-button-${R}`
|
|
1422
1435
|
);
|
|
1423
1436
|
}),
|
|
1424
1437
|
/* @__PURE__ */ e(
|
|
1425
|
-
|
|
1438
|
+
pe,
|
|
1426
1439
|
{
|
|
1427
|
-
"aria-disabled":
|
|
1428
|
-
"aria-label":
|
|
1429
|
-
disabled:
|
|
1430
|
-
onClick:
|
|
1440
|
+
"aria-disabled": h,
|
|
1441
|
+
"aria-label": C.next_insight_cta_aria,
|
|
1442
|
+
disabled: h,
|
|
1443
|
+
onClick: r,
|
|
1431
1444
|
children: /* @__PURE__ */ e(
|
|
1432
|
-
|
|
1445
|
+
Se,
|
|
1433
1446
|
{
|
|
1434
1447
|
style: {
|
|
1435
|
-
color:
|
|
1448
|
+
color: h ? m : c
|
|
1436
1449
|
}
|
|
1437
1450
|
}
|
|
1438
1451
|
)
|
|
@@ -1441,117 +1454,119 @@ const K = u.createContext(null), ht = ({
|
|
|
1441
1454
|
]
|
|
1442
1455
|
}
|
|
1443
1456
|
);
|
|
1444
|
-
},
|
|
1457
|
+
}, Mt = ({
|
|
1445
1458
|
analyticsMetadata: i,
|
|
1446
1459
|
allowSingleCardPeeking: o = !1,
|
|
1447
1460
|
beats: t = [],
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1461
|
+
clientColorScheme: r,
|
|
1462
|
+
showCTAColocatedWithText: n,
|
|
1463
|
+
heightOverrides: l,
|
|
1464
|
+
onCardClick: a,
|
|
1465
|
+
posthog: d,
|
|
1466
|
+
shouldApplyNewAnimation: p = !1,
|
|
1467
|
+
showCarouselControls: _,
|
|
1468
|
+
showIcon: C,
|
|
1469
|
+
showWithMargin: f = !0,
|
|
1470
|
+
variant: h,
|
|
1471
|
+
widthOverrides: m,
|
|
1458
1472
|
visibleCardsCount: c = 1
|
|
1459
1473
|
// Default to 1 card visible
|
|
1460
1474
|
}) => {
|
|
1461
|
-
const E = u.useRef(null),
|
|
1475
|
+
const E = u.useRef(null), R = u.useRef(null), [I, x] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [g, D] = u.useState(null), [b, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
|
|
1462
1476
|
u.useEffect(() => {
|
|
1463
1477
|
if (E.current && !o) {
|
|
1464
|
-
const
|
|
1465
|
-
let
|
|
1478
|
+
const s = E.current.offsetWidth, A = 8;
|
|
1479
|
+
let N;
|
|
1466
1480
|
if (c > 1) {
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1481
|
+
const J = (s - (c - 1) * A) / c / 3;
|
|
1482
|
+
N = (s - J - (c - 1) * A) / c;
|
|
1469
1483
|
} else
|
|
1470
|
-
|
|
1471
|
-
|
|
1484
|
+
N = s;
|
|
1485
|
+
D(N);
|
|
1472
1486
|
}
|
|
1473
1487
|
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
|
1474
|
-
const
|
|
1475
|
-
if (typeof
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1478
|
-
const
|
|
1488
|
+
const s = R.current?.offsetWidth;
|
|
1489
|
+
if (typeof s == "number" && o) {
|
|
1490
|
+
const A = (P) => {
|
|
1491
|
+
B(!0);
|
|
1492
|
+
const ee = [
|
|
1479
1493
|
{ maxWidth: 375, cardWidth: 268 },
|
|
1480
1494
|
{ maxWidth: 444, cardWidth: 300 },
|
|
1481
1495
|
{ maxWidth: 599, cardWidth: 350 },
|
|
1482
1496
|
{ maxWidth: 749, cardWidth: 450 },
|
|
1483
1497
|
{ maxWidth: 900, cardWidth: 600 }
|
|
1484
|
-
].find((
|
|
1485
|
-
return
|
|
1498
|
+
].find((ce) => P <= ce.maxWidth);
|
|
1499
|
+
return ee ? ee.cardWidth : 750;
|
|
1486
1500
|
};
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
const
|
|
1490
|
-
typeof
|
|
1501
|
+
D(A(s));
|
|
1502
|
+
const N = () => {
|
|
1503
|
+
const P = R.current?.offsetWidth;
|
|
1504
|
+
typeof P == "number" && D(A(P));
|
|
1491
1505
|
};
|
|
1492
|
-
return window.addEventListener("resize",
|
|
1493
|
-
window.removeEventListener("resize",
|
|
1506
|
+
return window.addEventListener("resize", N), () => {
|
|
1507
|
+
window.removeEventListener("resize", N);
|
|
1494
1508
|
};
|
|
1495
1509
|
}
|
|
1496
|
-
}, [o,
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
left:
|
|
1510
|
+
}, [o, R]);
|
|
1511
|
+
const X = () => {
|
|
1512
|
+
Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
|
|
1513
|
+
left: I + g + 8,
|
|
1500
1514
|
top: 0,
|
|
1501
1515
|
behavior: "smooth"
|
|
1502
1516
|
});
|
|
1503
1517
|
}, le = () => {
|
|
1504
|
-
|
|
1505
|
-
left: Math.max(0,
|
|
1518
|
+
Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
|
|
1519
|
+
left: Math.max(0, I - (g + 8)),
|
|
1506
1520
|
top: 0,
|
|
1507
1521
|
behavior: "smooth"
|
|
1508
1522
|
});
|
|
1509
|
-
},
|
|
1510
|
-
E.current &&
|
|
1511
|
-
},
|
|
1512
|
-
if (!
|
|
1513
|
-
|
|
1514
|
-
},
|
|
1515
|
-
|
|
1516
|
-
},
|
|
1517
|
-
|
|
1518
|
-
},
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1523
|
+
}, ne = () => {
|
|
1524
|
+
E.current && x(E.current.scrollLeft);
|
|
1525
|
+
}, Q = () => {
|
|
1526
|
+
if (!F || !O) return;
|
|
1527
|
+
F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1528
|
+
}, q = (s) => {
|
|
1529
|
+
y(s.targetTouches[0].clientX);
|
|
1530
|
+
}, L = (s) => {
|
|
1531
|
+
y(null), z(s.targetTouches[0].clientX);
|
|
1532
|
+
}, ue = {
|
|
1533
|
+
clientColorScheme: r,
|
|
1534
|
+
showCTAColocatedWithText: n,
|
|
1535
|
+
heightOverrides: l,
|
|
1536
|
+
posthog: d,
|
|
1537
|
+
showIcon: C,
|
|
1538
|
+
variant: h
|
|
1539
|
+
}, ae = g ? Math.round(I / (g + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
1540
|
+
return /* @__PURE__ */ v(
|
|
1541
|
+
K,
|
|
1527
1542
|
{
|
|
1528
|
-
"aria-label":
|
|
1543
|
+
"aria-label": j.carousel_title,
|
|
1529
1544
|
"aria-roledescription": "carousel",
|
|
1530
|
-
ref:
|
|
1545
|
+
ref: R,
|
|
1531
1546
|
role: "group/region",
|
|
1532
1547
|
sx: {
|
|
1533
1548
|
alignItems: "center",
|
|
1534
1549
|
boxSizing: "border-box",
|
|
1535
|
-
height:
|
|
1536
|
-
width:
|
|
1550
|
+
height: l,
|
|
1551
|
+
width: m || "100%"
|
|
1537
1552
|
},
|
|
1538
1553
|
children: [
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
|
|
1554
|
+
/* @__PURE__ */ v(
|
|
1555
|
+
K,
|
|
1541
1556
|
{
|
|
1542
1557
|
direction: "row",
|
|
1543
|
-
onScroll:
|
|
1544
|
-
onTouchEnd:
|
|
1545
|
-
onTouchMove:
|
|
1546
|
-
onTouchStart:
|
|
1558
|
+
onScroll: ne,
|
|
1559
|
+
onTouchEnd: Q,
|
|
1560
|
+
onTouchMove: q,
|
|
1561
|
+
onTouchStart: L,
|
|
1547
1562
|
ref: E,
|
|
1548
1563
|
sx: {
|
|
1549
1564
|
alignItems: "center",
|
|
1550
|
-
height:
|
|
1565
|
+
height: l && "100%",
|
|
1551
1566
|
gap: 8,
|
|
1552
1567
|
listStyleType: "none",
|
|
1553
1568
|
m: 0,
|
|
1554
|
-
maxWidth:
|
|
1569
|
+
maxWidth: f ? "calc(100% - 32px)" : "100%",
|
|
1555
1570
|
overflowX: "auto",
|
|
1556
1571
|
overflowY: "hidden",
|
|
1557
1572
|
p: 0,
|
|
@@ -1563,65 +1578,67 @@ const K = u.createContext(null), ht = ({
|
|
|
1563
1578
|
}
|
|
1564
1579
|
},
|
|
1565
1580
|
children: [
|
|
1566
|
-
t.map((
|
|
1567
|
-
const
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
),
|
|
1581
|
+
t.map((s, A) => {
|
|
1582
|
+
const N = A + 1, P = t.length + 1, J = Qe(
|
|
1583
|
+
j.card_position_in_carousel_aria,
|
|
1584
|
+
N.toString(),
|
|
1585
|
+
P.toString()
|
|
1586
|
+
), ee = s.micro_title && s.micro_title.length > 0, ce = s.micro_description && s.micro_description.length > 0, Be = ee ? s.micro_title : s.title, Ze = ce ? s.micro_description : s.description;
|
|
1572
1587
|
return /* @__PURE__ */ e(
|
|
1573
|
-
|
|
1588
|
+
vt,
|
|
1574
1589
|
{
|
|
1575
|
-
ariaLabel: `${
|
|
1576
|
-
beat:
|
|
1577
|
-
index:
|
|
1578
|
-
isActiveCard:
|
|
1579
|
-
onCardClick:
|
|
1580
|
-
widthOverrides:
|
|
1581
|
-
...
|
|
1590
|
+
ariaLabel: `${J}: ${Be}, ${Ze}`,
|
|
1591
|
+
beat: s,
|
|
1592
|
+
index: A,
|
|
1593
|
+
isActiveCard: A === ae,
|
|
1594
|
+
onCardClick: a,
|
|
1595
|
+
widthOverrides: g || void 0,
|
|
1596
|
+
...ue
|
|
1582
1597
|
},
|
|
1583
|
-
`${
|
|
1598
|
+
`${s.guid} ${A}`
|
|
1584
1599
|
);
|
|
1585
1600
|
}),
|
|
1586
1601
|
/* @__PURE__ */ e(
|
|
1587
|
-
|
|
1602
|
+
Lt,
|
|
1588
1603
|
{
|
|
1589
|
-
isActiveCard:
|
|
1590
|
-
onCardClick:
|
|
1591
|
-
widthOverrides:
|
|
1592
|
-
...
|
|
1604
|
+
isActiveCard: ae === t.length,
|
|
1605
|
+
onCardClick: a,
|
|
1606
|
+
widthOverrides: g || void 0,
|
|
1607
|
+
...ue
|
|
1593
1608
|
}
|
|
1594
1609
|
)
|
|
1595
1610
|
]
|
|
1596
1611
|
}
|
|
1597
1612
|
),
|
|
1598
|
-
|
|
1599
|
-
|
|
1613
|
+
_ && /* @__PURE__ */ e(
|
|
1614
|
+
St,
|
|
1600
1615
|
{
|
|
1601
|
-
|
|
1616
|
+
clientColorScheme: r,
|
|
1617
|
+
currentBeatIndex: ae + c - 1,
|
|
1602
1618
|
numBeats: t.length + 1,
|
|
1603
|
-
onNextClick:
|
|
1619
|
+
onNextClick: X,
|
|
1604
1620
|
onPreviousClick: le,
|
|
1605
|
-
scrollRightBoundary:
|
|
1606
|
-
scrollX:
|
|
1607
|
-
shouldApplyNewAnimation:
|
|
1621
|
+
scrollRightBoundary: Fe,
|
|
1622
|
+
scrollX: I,
|
|
1623
|
+
shouldApplyNewAnimation: b,
|
|
1608
1624
|
visibleCardsCount: c
|
|
1609
1625
|
}
|
|
1610
1626
|
)
|
|
1611
1627
|
]
|
|
1612
1628
|
}
|
|
1613
1629
|
);
|
|
1614
|
-
},
|
|
1630
|
+
}, At = G(Mt), Ot = ({
|
|
1615
1631
|
analyticsMetadata: i,
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1632
|
+
clientColorScheme: o,
|
|
1633
|
+
onCardClick: t,
|
|
1634
|
+
posthog: r,
|
|
1635
|
+
widthOverrides: n
|
|
1619
1636
|
}) => {
|
|
1620
|
-
const { carouselCopy:
|
|
1621
|
-
|
|
1637
|
+
const { carouselCopy: l } = k(), { onEvent: a } = Y(), d = () => {
|
|
1638
|
+
a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
|
|
1622
1639
|
};
|
|
1623
|
-
return
|
|
1624
|
-
|
|
1640
|
+
return l ? /* @__PURE__ */ v(
|
|
1641
|
+
K,
|
|
1625
1642
|
{
|
|
1626
1643
|
alignItems: "center",
|
|
1627
1644
|
direction: "row",
|
|
@@ -1629,47 +1646,48 @@ const K = u.createContext(null), ht = ({
|
|
|
1629
1646
|
spacing: 2,
|
|
1630
1647
|
sx: {
|
|
1631
1648
|
padding: 16,
|
|
1632
|
-
width:
|
|
1649
|
+
width: n || void 0
|
|
1633
1650
|
},
|
|
1634
1651
|
children: [
|
|
1635
1652
|
/* @__PURE__ */ e(
|
|
1636
|
-
|
|
1653
|
+
Ge,
|
|
1637
1654
|
{
|
|
1638
1655
|
sx: {
|
|
1656
|
+
color: o?.primary_300,
|
|
1639
1657
|
fontSize: 18,
|
|
1640
1658
|
fontWeight: 700,
|
|
1641
1659
|
lineHeight: "24px"
|
|
1642
1660
|
},
|
|
1643
1661
|
variant: "h3",
|
|
1644
|
-
children:
|
|
1662
|
+
children: l.carousel_title
|
|
1645
1663
|
}
|
|
1646
1664
|
),
|
|
1647
1665
|
/* @__PURE__ */ e(
|
|
1648
|
-
|
|
1666
|
+
Pe,
|
|
1649
1667
|
{
|
|
1650
|
-
endIcon: /* @__PURE__ */ e(
|
|
1651
|
-
onClick:
|
|
1668
|
+
endIcon: /* @__PURE__ */ e(Se, { size: 20 }),
|
|
1669
|
+
onClick: d,
|
|
1652
1670
|
size: "small",
|
|
1653
|
-
sx:
|
|
1654
|
-
color:
|
|
1655
|
-
}
|
|
1671
|
+
sx: {
|
|
1672
|
+
color: o?.primary_300
|
|
1673
|
+
},
|
|
1656
1674
|
variant: "text",
|
|
1657
|
-
children:
|
|
1675
|
+
children: l.view_all_insights_in_full_feed_cta_aria
|
|
1658
1676
|
}
|
|
1659
1677
|
)
|
|
1660
1678
|
]
|
|
1661
1679
|
}
|
|
1662
1680
|
) : /* @__PURE__ */ e(Ue, {});
|
|
1663
|
-
},
|
|
1681
|
+
}, Tt = G(Ot), Wt = ({
|
|
1664
1682
|
heightOverrides: i,
|
|
1665
1683
|
widthOverrides: o,
|
|
1666
1684
|
children: t
|
|
1667
1685
|
}) => {
|
|
1668
|
-
const { carouselCopy:
|
|
1686
|
+
const { carouselCopy: r } = k();
|
|
1669
1687
|
return /* @__PURE__ */ e(
|
|
1670
1688
|
U,
|
|
1671
1689
|
{
|
|
1672
|
-
"aria-label":
|
|
1690
|
+
"aria-label": r?.carousel_title,
|
|
1673
1691
|
"aria-roledescription": "carousel",
|
|
1674
1692
|
role: "group",
|
|
1675
1693
|
sx: {
|
|
@@ -1681,44 +1699,46 @@ const K = u.createContext(null), ht = ({
|
|
|
1681
1699
|
children: t
|
|
1682
1700
|
}
|
|
1683
1701
|
);
|
|
1684
|
-
},
|
|
1702
|
+
}, He = ({
|
|
1685
1703
|
ariaLabel: i,
|
|
1686
1704
|
carouselSize: o,
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1705
|
+
clientColorScheme: t,
|
|
1706
|
+
heightOverrides: r,
|
|
1707
|
+
onCardClick: n,
|
|
1708
|
+
posthog: l,
|
|
1709
|
+
showIcon: a,
|
|
1710
|
+
showWithMargin: d,
|
|
1711
|
+
variant: p,
|
|
1712
|
+
widthOverrides: _
|
|
1694
1713
|
}) => {
|
|
1695
|
-
const { cardsCopy:
|
|
1714
|
+
const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Le();
|
|
1696
1715
|
u.useEffect(() => {
|
|
1697
|
-
|
|
1716
|
+
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1698
1717
|
}, []);
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1718
|
+
const m = () => {
|
|
1719
|
+
n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1701
1720
|
template: "no_relevant_insights"
|
|
1702
1721
|
});
|
|
1703
1722
|
};
|
|
1704
1723
|
return /* @__PURE__ */ e(
|
|
1705
|
-
|
|
1724
|
+
re,
|
|
1706
1725
|
{
|
|
1707
|
-
actionText:
|
|
1726
|
+
actionText: C.micro_card_cta,
|
|
1708
1727
|
ariaLabel: i,
|
|
1709
|
-
description:
|
|
1710
|
-
|
|
1711
|
-
|
|
1728
|
+
description: C.no_relevant_insights_card_description,
|
|
1729
|
+
fontColors: { buttonColor: t?.primary_300 },
|
|
1730
|
+
heightOverrides: r,
|
|
1731
|
+
icon: /* @__PURE__ */ e(De, {}),
|
|
1712
1732
|
isZeroState: !0,
|
|
1713
|
-
onCardClick:
|
|
1714
|
-
posthog:
|
|
1715
|
-
showIcon:
|
|
1733
|
+
onCardClick: m,
|
|
1734
|
+
posthog: l,
|
|
1735
|
+
showIcon: a,
|
|
1716
1736
|
style: {
|
|
1717
1737
|
cardStyle: {
|
|
1718
1738
|
card: {
|
|
1719
|
-
height: `calc(${
|
|
1739
|
+
height: `calc(${Ne[o]}px - 44px)`,
|
|
1720
1740
|
m: "0 auto",
|
|
1721
|
-
width:
|
|
1741
|
+
width: d ? "calc(100% - 32px)" : "100%"
|
|
1722
1742
|
},
|
|
1723
1743
|
description: {
|
|
1724
1744
|
WebkitLineClamp: 4
|
|
@@ -1728,40 +1748,40 @@ const K = u.createContext(null), ht = ({
|
|
|
1728
1748
|
ml: 48
|
|
1729
1749
|
}
|
|
1730
1750
|
},
|
|
1731
|
-
title:
|
|
1732
|
-
variant:
|
|
1733
|
-
widthOverrides:
|
|
1751
|
+
title: C.no_relevant_insights_card_title,
|
|
1752
|
+
variant: p,
|
|
1753
|
+
widthOverrides: _
|
|
1734
1754
|
}
|
|
1735
1755
|
);
|
|
1736
|
-
}, li =
|
|
1756
|
+
}, li = G(He), ke = ({
|
|
1737
1757
|
ariaLabel: i,
|
|
1738
1758
|
carouselSize: o,
|
|
1739
1759
|
heightOverrides: t,
|
|
1740
|
-
onCardClick:
|
|
1741
|
-
posthog:
|
|
1742
|
-
showIcon:
|
|
1760
|
+
onCardClick: r,
|
|
1761
|
+
posthog: n,
|
|
1762
|
+
showIcon: l,
|
|
1743
1763
|
showWithMargin: a,
|
|
1744
|
-
variant:
|
|
1745
|
-
widthOverrides:
|
|
1764
|
+
variant: d,
|
|
1765
|
+
widthOverrides: p
|
|
1746
1766
|
}) => {
|
|
1747
|
-
const { onPageview: _ } =
|
|
1767
|
+
const { onPageview: _ } = Le(), { zeroStateCopy: C } = k();
|
|
1748
1768
|
return u.useEffect(() => {
|
|
1749
|
-
_(
|
|
1769
|
+
_(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1750
1770
|
}, []), /* @__PURE__ */ e(
|
|
1751
|
-
|
|
1771
|
+
re,
|
|
1752
1772
|
{
|
|
1753
1773
|
ariaLabel: i,
|
|
1754
|
-
description:
|
|
1774
|
+
description: C.carousel_zero_state_description,
|
|
1755
1775
|
heightOverrides: t,
|
|
1756
|
-
icon: /* @__PURE__ */ e(
|
|
1776
|
+
icon: /* @__PURE__ */ e(De, {}),
|
|
1757
1777
|
isZeroState: !0,
|
|
1758
|
-
onCardClick:
|
|
1759
|
-
posthog:
|
|
1760
|
-
showIcon:
|
|
1778
|
+
onCardClick: r,
|
|
1779
|
+
posthog: n,
|
|
1780
|
+
showIcon: l,
|
|
1761
1781
|
style: {
|
|
1762
1782
|
cardStyle: {
|
|
1763
1783
|
card: {
|
|
1764
|
-
height: `calc(${
|
|
1784
|
+
height: `calc(${Ne[o]}px - 44px)`,
|
|
1765
1785
|
m: "0 auto",
|
|
1766
1786
|
width: a ? "calc(100% - 32px)" : "100%"
|
|
1767
1787
|
},
|
|
@@ -1770,12 +1790,12 @@ const K = u.createContext(null), ht = ({
|
|
|
1770
1790
|
}
|
|
1771
1791
|
}
|
|
1772
1792
|
},
|
|
1773
|
-
title:
|
|
1774
|
-
variant:
|
|
1775
|
-
widthOverrides:
|
|
1793
|
+
title: C.carousel_zero_state_title,
|
|
1794
|
+
variant: d,
|
|
1795
|
+
widthOverrides: p
|
|
1776
1796
|
}
|
|
1777
1797
|
);
|
|
1778
|
-
},
|
|
1798
|
+
}, ni = G(ke), wt = () => /* @__PURE__ */ e(
|
|
1779
1799
|
U,
|
|
1780
1800
|
{
|
|
1781
1801
|
sx: {
|
|
@@ -1785,142 +1805,148 @@ const K = u.createContext(null), ht = ({
|
|
|
1785
1805
|
justifyContent: "center",
|
|
1786
1806
|
width: "100%"
|
|
1787
1807
|
},
|
|
1788
|
-
children: /* @__PURE__ */ e(
|
|
1808
|
+
children: /* @__PURE__ */ e(qe, {})
|
|
1789
1809
|
}
|
|
1790
|
-
),
|
|
1810
|
+
), V = new ht(), xt = ({
|
|
1791
1811
|
allowSingleCardPeeking: i,
|
|
1792
1812
|
areBeatsLoading: o,
|
|
1793
1813
|
beats: t = [],
|
|
1794
1814
|
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1815
|
+
clientColorScheme: r,
|
|
1816
|
+
// Allows certain icons, view all and read more button to reflect the clients color scheme. Currently only supports primary_300
|
|
1817
|
+
showCTAColocatedWithText: n = !0,
|
|
1818
|
+
endpoint: l = "/",
|
|
1819
|
+
heightOverrides: a,
|
|
1820
|
+
logOutUser: d,
|
|
1821
|
+
onCardClick: p = () => {
|
|
1800
1822
|
},
|
|
1801
|
-
onEvent:
|
|
1823
|
+
onEvent: _ = () => {
|
|
1802
1824
|
},
|
|
1803
|
-
onPageview:
|
|
1825
|
+
onPageview: C = () => {
|
|
1804
1826
|
},
|
|
1805
|
-
posthog:
|
|
1806
|
-
shouldApplyNewAnimation:
|
|
1807
|
-
showBorder:
|
|
1827
|
+
posthog: f,
|
|
1828
|
+
shouldApplyNewAnimation: h = !1,
|
|
1829
|
+
showBorder: m = !0,
|
|
1808
1830
|
showCarouselControls: c,
|
|
1809
1831
|
showHeader: E,
|
|
1810
|
-
showIcon:
|
|
1811
|
-
showWithMargin:
|
|
1812
|
-
token:
|
|
1813
|
-
useDarkMode:
|
|
1814
|
-
userHasFullInsightFeedBeats:
|
|
1815
|
-
variant:
|
|
1816
|
-
visibleCardsCount:
|
|
1817
|
-
widthOverrides:
|
|
1832
|
+
showIcon: R,
|
|
1833
|
+
showWithMargin: I = !0,
|
|
1834
|
+
token: x = "",
|
|
1835
|
+
useDarkMode: O,
|
|
1836
|
+
userHasFullInsightFeedBeats: y,
|
|
1837
|
+
variant: F,
|
|
1838
|
+
visibleCardsCount: z = 1,
|
|
1839
|
+
widthOverrides: g
|
|
1818
1840
|
}) => {
|
|
1819
|
-
const [
|
|
1841
|
+
const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
|
|
1820
1842
|
u.useEffect(() => {
|
|
1821
|
-
!
|
|
1822
|
-
}, [
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1843
|
+
!V.isInitialized && !Z && (V.initialize(l, x, d).catch(() => X(!1)), X(!0));
|
|
1844
|
+
}, [l, x, d, V.isInitialized, Z]), u.useEffect(() => {
|
|
1845
|
+
const L = window.innerHeight;
|
|
1846
|
+
L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
|
|
1825
1847
|
}, [window.innerHeight]), u.useEffect(() => {
|
|
1826
|
-
|
|
1827
|
-
}, [o,
|
|
1828
|
-
const
|
|
1829
|
-
showCTAColocatedWithText:
|
|
1830
|
-
heightOverrides:
|
|
1831
|
-
onCardClick:
|
|
1832
|
-
posthog:
|
|
1833
|
-
showIcon:
|
|
1834
|
-
showWithMargin:
|
|
1835
|
-
useDarkMode:
|
|
1836
|
-
widthOverrides:
|
|
1837
|
-
},
|
|
1838
|
-
carouselSize:
|
|
1839
|
-
variant:
|
|
1840
|
-
...
|
|
1848
|
+
j(!o && V.isInitialized);
|
|
1849
|
+
}, [o, V.isInitialized]);
|
|
1850
|
+
const Q = {
|
|
1851
|
+
showCTAColocatedWithText: n,
|
|
1852
|
+
heightOverrides: a,
|
|
1853
|
+
onCardClick: p,
|
|
1854
|
+
posthog: f,
|
|
1855
|
+
showIcon: R,
|
|
1856
|
+
showWithMargin: I,
|
|
1857
|
+
useDarkMode: O,
|
|
1858
|
+
widthOverrides: g
|
|
1859
|
+
}, q = {
|
|
1860
|
+
carouselSize: D,
|
|
1861
|
+
variant: F,
|
|
1862
|
+
...Q
|
|
1841
1863
|
};
|
|
1842
|
-
return /* @__PURE__ */ e(
|
|
1843
|
-
!
|
|
1844
|
-
|
|
1845
|
-
|
|
1864
|
+
return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: g, children: [
|
|
1865
|
+
!B && /* @__PURE__ */ e(wt, {}),
|
|
1866
|
+
B && E && /* @__PURE__ */ e(
|
|
1867
|
+
Tt,
|
|
1846
1868
|
{
|
|
1847
|
-
analyticsMetadata:
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1869
|
+
analyticsMetadata: fe,
|
|
1870
|
+
clientColorScheme: r,
|
|
1871
|
+
onCardClick: p,
|
|
1872
|
+
posthog: f,
|
|
1873
|
+
widthOverrides: g
|
|
1851
1874
|
}
|
|
1852
1875
|
),
|
|
1853
|
-
|
|
1854
|
-
|
|
1876
|
+
B && !!t.length && /* @__PURE__ */ e(
|
|
1877
|
+
At,
|
|
1855
1878
|
{
|
|
1856
1879
|
allowSingleCardPeeking: i,
|
|
1857
|
-
analyticsMetadata:
|
|
1880
|
+
analyticsMetadata: fe,
|
|
1858
1881
|
beats: t,
|
|
1859
|
-
|
|
1882
|
+
clientColorScheme: r,
|
|
1883
|
+
shouldApplyNewAnimation: h,
|
|
1860
1884
|
showCarouselControls: c,
|
|
1861
|
-
variant:
|
|
1862
|
-
visibleCardsCount:
|
|
1863
|
-
...
|
|
1885
|
+
variant: m ? F : void 0,
|
|
1886
|
+
visibleCardsCount: z,
|
|
1887
|
+
...Q
|
|
1864
1888
|
}
|
|
1865
1889
|
),
|
|
1866
|
-
|
|
1867
|
-
|
|
1890
|
+
B && !t.length && y && /* @__PURE__ */ e(He, { clientColorScheme: r, ...q }),
|
|
1891
|
+
B && !t.length && !y && /* @__PURE__ */ e(ke, { ...q })
|
|
1868
1892
|
] }) });
|
|
1869
|
-
},
|
|
1893
|
+
}, ai = G(xt), Dt = ({
|
|
1870
1894
|
isActiveCard: i,
|
|
1871
1895
|
ariaLabel: o,
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1896
|
+
clientColorScheme: t,
|
|
1897
|
+
heightOverrides: r,
|
|
1898
|
+
onCardClick: n,
|
|
1899
|
+
posthog: l,
|
|
1900
|
+
showIcon: a,
|
|
1901
|
+
variant: d,
|
|
1902
|
+
widthOverrides: p
|
|
1878
1903
|
}) => {
|
|
1879
|
-
const
|
|
1880
|
-
threshold:
|
|
1881
|
-
}), { cardsCopy:
|
|
1882
|
-
|
|
1883
|
-
|
|
1904
|
+
const _ = se(), { ref: C, inView: f } = Me({
|
|
1905
|
+
threshold: Ve
|
|
1906
|
+
}), { cardsCopy: h } = k(), { onEvent: m } = Y();
|
|
1907
|
+
oe(() => {
|
|
1908
|
+
f && (m(xe.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
|
|
1884
1909
|
template: "view_more_card"
|
|
1885
1910
|
}));
|
|
1886
|
-
}, [
|
|
1911
|
+
}, [f]);
|
|
1887
1912
|
const c = () => {
|
|
1888
|
-
|
|
1913
|
+
n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
|
|
1889
1914
|
template: "view_more_card"
|
|
1890
1915
|
});
|
|
1891
1916
|
};
|
|
1892
1917
|
return /* @__PURE__ */ e(
|
|
1893
|
-
|
|
1918
|
+
re,
|
|
1894
1919
|
{
|
|
1895
|
-
actionText:
|
|
1920
|
+
actionText: h.micro_card_cta,
|
|
1896
1921
|
ariaLabel: o,
|
|
1897
|
-
description:
|
|
1898
|
-
|
|
1899
|
-
|
|
1922
|
+
description: h.view_more_card_description,
|
|
1923
|
+
fontColors: { buttonColor: t?.primary_300 },
|
|
1924
|
+
heightOverrides: r,
|
|
1925
|
+
icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
|
|
1900
1926
|
isActiveCard: i,
|
|
1901
1927
|
onCardClick: c,
|
|
1902
|
-
posthog:
|
|
1903
|
-
ref:
|
|
1904
|
-
showIcon:
|
|
1905
|
-
title:
|
|
1906
|
-
variant:
|
|
1907
|
-
widthOverrides:
|
|
1928
|
+
posthog: l,
|
|
1929
|
+
ref: C,
|
|
1930
|
+
showIcon: a,
|
|
1931
|
+
title: h.view_more_card_title,
|
|
1932
|
+
variant: d,
|
|
1933
|
+
widthOverrides: p
|
|
1908
1934
|
}
|
|
1909
1935
|
);
|
|
1910
|
-
},
|
|
1936
|
+
}, Lt = G(Dt);
|
|
1911
1937
|
export {
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1938
|
+
ht as A,
|
|
1939
|
+
vt as B,
|
|
1940
|
+
Tt as C,
|
|
1941
|
+
Et as I,
|
|
1942
|
+
At as M,
|
|
1917
1943
|
li as N,
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1944
|
+
fe as T,
|
|
1945
|
+
Lt as V,
|
|
1946
|
+
ni as Z,
|
|
1947
|
+
re as a,
|
|
1948
|
+
ai as b,
|
|
1949
|
+
ft as c,
|
|
1950
|
+
gt as d,
|
|
1951
|
+
De as e
|
|
1926
1952
|
};
|