@mx-cartographer/experiences 7.0.21 → 7.0.22-alpha.san1
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
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [7.0.23] - 09-24-2025
|
|
2
|
+
|
|
3
|
+
- **FIXED** - New `TrendsWidget` Abbreviated Y-axis labels (e.g., $4,000 → $4k)
|
|
4
|
+
|
|
5
|
+
## [7.0.22] - 09-24-2025
|
|
6
|
+
|
|
7
|
+
- **FIXED** - `InsightsMicroWidget` now adheres to client font family
|
|
8
|
+
|
|
1
9
|
## [7.0.21] - 09-24-2025
|
|
2
10
|
|
|
3
11
|
- **FIXED** - Added an extra flag (user.email/user.phone) for the delivery methods status not updating for each notification types.
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as I } from "react/jsx-runtime";
|
|
2
2
|
import u, { useState as ae, useEffect as ee } from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as P } from "mobx-react-lite";
|
|
4
4
|
import be from "@mui/material/CssBaseline";
|
|
5
|
-
import { useTheme as
|
|
5
|
+
import { useTheme as Se, ThemeProvider as Ue } from "@mui/material/styles";
|
|
6
6
|
import ze from "@mui/material/Link";
|
|
7
7
|
import K from "@mui/material/Stack";
|
|
8
|
-
import
|
|
9
|
-
import { ChevronLeft as Ke, ChevronRight as
|
|
8
|
+
import ue from "@mui/material/Typography";
|
|
9
|
+
import { ChevronLeft as Ke, ChevronRight as Me } from "@mxenabled/mx-icons";
|
|
10
10
|
import { L as $e } from "./Loader-DUaFpDGv.mjs";
|
|
11
11
|
import U from "@mui/material/Box";
|
|
12
|
-
import
|
|
13
|
-
import { useInView as
|
|
14
|
-
import { P as Ye, CategoryIcon as je, useTokens as
|
|
15
|
-
import
|
|
12
|
+
import pe from "@mui/material/IconButton";
|
|
13
|
+
import { useInView as Ae } from "react-intersection-observer";
|
|
14
|
+
import { P as Ye, CategoryIcon as je, useTokens as Oe, MerchantLogo as Xe, Icon as J } from "@mxenabled/mxui";
|
|
15
|
+
import ce from "@mui/material/styles/useTheme";
|
|
16
16
|
import { b as Qe } from "./Category-CevNQ03n.mjs";
|
|
17
17
|
import { css as qe } from "@mxenabled/cssinjs";
|
|
18
18
|
import { b as Je } from "./Localization-2MODESHW.mjs";
|
|
19
19
|
import et from "@mui/material/CircularProgress";
|
|
20
|
-
import { makeAutoObservable as
|
|
21
|
-
import { G as
|
|
22
|
-
import { B as
|
|
20
|
+
import { makeAutoObservable as se, runInAction as Te } from "mobx";
|
|
21
|
+
import { G as _e, a as tt, u as it, b as ot } from "./useCombineEvents-DaDBSR_1.mjs";
|
|
22
|
+
import { B as Ce } from "./BeatApi-DLu87ijw.mjs";
|
|
23
23
|
import rt from "@mui/material/Card";
|
|
24
24
|
import lt from "@mui/material/CardActions";
|
|
25
25
|
import nt from "@mui/material/CardContent";
|
|
26
26
|
import at from "@mui/material/CardHeader";
|
|
27
|
-
const
|
|
27
|
+
const fe = {
|
|
28
28
|
featureVersion: "spendVsIncomeTrends"
|
|
29
29
|
};
|
|
30
30
|
class ct {
|
|
31
|
-
copyApi = new
|
|
31
|
+
copyApi = new _e("/", "");
|
|
32
32
|
copyObject = {};
|
|
33
33
|
namespace = "experiences";
|
|
34
34
|
translationKey = "micro_insights";
|
|
35
35
|
constructor() {
|
|
36
|
-
|
|
36
|
+
se(this);
|
|
37
37
|
}
|
|
38
38
|
initialize = async (o, t) => {
|
|
39
|
-
this.copyApi = new
|
|
39
|
+
this.copyApi = new _e(o, t), await this.loadCopy();
|
|
40
40
|
};
|
|
41
41
|
loadCopy = async () => {
|
|
42
42
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
@@ -71,26 +71,26 @@ const de = {
|
|
|
71
71
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
72
72
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
73
73
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
74
|
-
}, S = window?.app?.clientConfig?.microwidget_instance_id || "",
|
|
74
|
+
}, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
|
|
75
75
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
76
|
-
}, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`,
|
|
76
|
+
}, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`, he = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), st = () => Object.values(de).reduce(
|
|
77
77
|
(i, o) => ({
|
|
78
78
|
...i,
|
|
79
79
|
[We(o)]: {
|
|
80
|
-
action:
|
|
81
|
-
category:
|
|
82
|
-
label:
|
|
80
|
+
action: x.MICRO_BEAT_CLICKED,
|
|
81
|
+
category: w.BEAT_INTERACTION,
|
|
82
|
+
label: he(o),
|
|
83
83
|
value: S
|
|
84
84
|
}
|
|
85
85
|
}),
|
|
86
86
|
{}
|
|
87
|
-
),
|
|
87
|
+
), dt = () => Object.values(de).reduce(
|
|
88
88
|
(i, o) => ({
|
|
89
89
|
...i,
|
|
90
90
|
[we(o)]: {
|
|
91
|
-
action:
|
|
92
|
-
category:
|
|
93
|
-
label:
|
|
91
|
+
action: x.MICRO_BEAT_DISPLAYED,
|
|
92
|
+
category: w.BEAT_INTERACTION,
|
|
93
|
+
label: he(o),
|
|
94
94
|
value: S
|
|
95
95
|
}
|
|
96
96
|
}),
|
|
@@ -99,19 +99,19 @@ const de = {
|
|
|
99
99
|
(i, o) => ({
|
|
100
100
|
...i,
|
|
101
101
|
[xe(o)]: {
|
|
102
|
-
action:
|
|
103
|
-
category:
|
|
104
|
-
label:
|
|
102
|
+
action: x.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
103
|
+
category: w.BEAT_INTERACTION,
|
|
104
|
+
label: he(o),
|
|
105
105
|
value: S
|
|
106
106
|
}
|
|
107
107
|
}),
|
|
108
108
|
{}
|
|
109
|
-
),
|
|
109
|
+
), W = {
|
|
110
110
|
CARD: "Card",
|
|
111
111
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
112
112
|
MICRO_WIDGET: "Micro Widget",
|
|
113
113
|
VIEW_MORE: "View More"
|
|
114
|
-
},
|
|
114
|
+
}, w = {
|
|
115
115
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
116
116
|
BEAT_INTERACTION: "Beat Interaction"
|
|
117
117
|
}, M = {
|
|
@@ -123,7 +123,7 @@ const de = {
|
|
|
123
123
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
124
124
|
}, De = {
|
|
125
125
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
126
|
-
},
|
|
126
|
+
}, x = {
|
|
127
127
|
CONTROL_BACKWARD: "Control Backward",
|
|
128
128
|
CONTROL_FORWARD: "Control Forward",
|
|
129
129
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -131,95 +131,95 @@ const de = {
|
|
|
131
131
|
MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
|
|
132
132
|
SWIPE_BACKWARD: "Swipe Backward",
|
|
133
133
|
SWIPE_FORWARD: "Swipe Forward"
|
|
134
|
-
},
|
|
134
|
+
}, H = {
|
|
135
135
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
136
136
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
137
137
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
138
|
-
},
|
|
139
|
-
[
|
|
140
|
-
label:
|
|
141
|
-
name:
|
|
142
|
-
path:
|
|
138
|
+
}, Re = {
|
|
139
|
+
[H.MICRO_WIDGET_CAROUSEL]: {
|
|
140
|
+
label: W.MICRO_WIDGET,
|
|
141
|
+
name: H.MICRO_WIDGET_CAROUSEL,
|
|
142
|
+
path: me.INSIGHTS_MICRO_WIDGET,
|
|
143
143
|
value: S
|
|
144
144
|
},
|
|
145
145
|
// zero state
|
|
146
|
-
[
|
|
147
|
-
label:
|
|
148
|
-
name:
|
|
149
|
-
path:
|
|
146
|
+
[H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
147
|
+
label: W.MICRO_WIDGET,
|
|
148
|
+
name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
149
|
+
path: me.INSIGHTS_MICRO_WIDGET,
|
|
150
150
|
value: S
|
|
151
151
|
},
|
|
152
152
|
// no relevant cards
|
|
153
|
-
[
|
|
154
|
-
label:
|
|
155
|
-
name:
|
|
153
|
+
[H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
154
|
+
label: W.MICRO_WIDGET,
|
|
155
|
+
name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
156
156
|
path: "/micro-widget",
|
|
157
157
|
value: S
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, ge = {
|
|
160
160
|
// carousel control interaction events - clicks and swipes
|
|
161
161
|
[M.ON_CAROUSEL_BACK_CLICK]: {
|
|
162
|
-
action:
|
|
163
|
-
category:
|
|
164
|
-
label:
|
|
162
|
+
action: x.CONTROL_BACKWARD,
|
|
163
|
+
category: w.MICRO_WIDGET_INTERACTION,
|
|
164
|
+
label: W.CAROUSEL_CONTROL,
|
|
165
165
|
value: S
|
|
166
166
|
},
|
|
167
167
|
[M.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
168
|
-
action:
|
|
169
|
-
category:
|
|
170
|
-
label:
|
|
168
|
+
action: x.CONTROL_FORWARD,
|
|
169
|
+
category: w.MICRO_WIDGET_INTERACTION,
|
|
170
|
+
label: W.CAROUSEL_CONTROL,
|
|
171
171
|
value: S
|
|
172
172
|
},
|
|
173
173
|
[M.ON_CAROUSEL_BACK_SWIPE]: {
|
|
174
|
-
action:
|
|
175
|
-
category:
|
|
176
|
-
label:
|
|
174
|
+
action: x.SWIPE_BACKWARD,
|
|
175
|
+
category: w.MICRO_WIDGET_INTERACTION,
|
|
176
|
+
label: W.CAROUSEL_CONTROL,
|
|
177
177
|
value: S
|
|
178
178
|
},
|
|
179
179
|
[M.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
180
|
-
action:
|
|
181
|
-
category:
|
|
182
|
-
label:
|
|
180
|
+
action: x.SWIPE_FORWARD,
|
|
181
|
+
category: w.MICRO_WIDGET_INTERACTION,
|
|
182
|
+
label: W.CAROUSEL_CONTROL,
|
|
183
183
|
value: S
|
|
184
184
|
},
|
|
185
185
|
// read more card events
|
|
186
186
|
[M.ON_VIEW_MORE_CLICKED]: {
|
|
187
|
-
action:
|
|
188
|
-
category:
|
|
189
|
-
label:
|
|
187
|
+
action: x.MICRO_BEAT_CLICKED,
|
|
188
|
+
category: w.BEAT_INTERACTION,
|
|
189
|
+
label: W.VIEW_MORE,
|
|
190
190
|
value: S
|
|
191
191
|
},
|
|
192
192
|
[De.ON_VIEW_MORE_VIEWED]: {
|
|
193
|
-
action:
|
|
194
|
-
category:
|
|
195
|
-
label:
|
|
193
|
+
action: x.MICRO_BEAT_DISPLAYED,
|
|
194
|
+
category: w.BEAT_INTERACTION,
|
|
195
|
+
label: W.VIEW_MORE,
|
|
196
196
|
value: S
|
|
197
197
|
},
|
|
198
|
-
...dt(),
|
|
199
198
|
...st(),
|
|
199
|
+
...dt(),
|
|
200
200
|
...ht()
|
|
201
|
-
},
|
|
201
|
+
}, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
|
|
202
202
|
throw t;
|
|
203
|
-
}),
|
|
203
|
+
}), ye = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
|
|
204
204
|
throw t;
|
|
205
205
|
});
|
|
206
206
|
class Et {
|
|
207
|
-
onAnalyticEvent =
|
|
208
|
-
onAnalyticPageView =
|
|
209
|
-
beatApi = new
|
|
207
|
+
onAnalyticEvent = Ie;
|
|
208
|
+
onAnalyticPageView = ye;
|
|
209
|
+
beatApi = new Ce("/", "");
|
|
210
210
|
constructor() {
|
|
211
|
-
|
|
211
|
+
se(this);
|
|
212
212
|
}
|
|
213
213
|
initialize = async (o, t, r) => {
|
|
214
214
|
this.onAnalyticEvent = (l, n) => {
|
|
215
|
-
|
|
215
|
+
Ie(l, n).then((a) => a).catch((a) => {
|
|
216
216
|
throw a.status === 401 && r(), a;
|
|
217
217
|
});
|
|
218
218
|
}, this.onAnalyticPageView = (l, n) => {
|
|
219
|
-
|
|
219
|
+
ye(l, n).then((a) => a).catch((a) => {
|
|
220
220
|
throw a.status === 401 && r(), a;
|
|
221
221
|
});
|
|
222
|
-
}, this.beatApi = new
|
|
222
|
+
}, this.beatApi = new Ce(o, t);
|
|
223
223
|
};
|
|
224
224
|
updateBeat = async (o) => {
|
|
225
225
|
this.beatApi.updateBeat(o);
|
|
@@ -236,7 +236,7 @@ class ut {
|
|
|
236
236
|
token = "";
|
|
237
237
|
isInitialized = !1;
|
|
238
238
|
constructor() {
|
|
239
|
-
this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(),
|
|
239
|
+
this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), se(this);
|
|
240
240
|
}
|
|
241
241
|
initialize = async (o, t, r) => {
|
|
242
242
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
|
|
@@ -259,7 +259,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
259
259
|
description: l,
|
|
260
260
|
heightOverrides: n,
|
|
261
261
|
icon: a,
|
|
262
|
-
isActiveCard:
|
|
262
|
+
isActiveCard: d,
|
|
263
263
|
isZeroState: p,
|
|
264
264
|
onCardClick: _ = () => {
|
|
265
265
|
},
|
|
@@ -270,7 +270,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
270
270
|
variant: c,
|
|
271
271
|
widthOverrides: E
|
|
272
272
|
}, R) {
|
|
273
|
-
const
|
|
273
|
+
const y = ce(), [D, O] = u.useState(!1), { cardStyle: v, linkTextStyle: F } = f, z = c ? v : { border: "none", boxShadow: "none", ...v }, g = /* @__PURE__ */ e(
|
|
274
274
|
Ye,
|
|
275
275
|
{
|
|
276
276
|
className: "mx-micro-card-description",
|
|
@@ -287,13 +287,19 @@ const $ = u.createContext(null), pt = ({
|
|
|
287
287
|
WebkitLineClamp: 2,
|
|
288
288
|
wordWrap: "break-word"
|
|
289
289
|
},
|
|
290
|
-
children: l && /* @__PURE__ */ e(
|
|
290
|
+
children: l && /* @__PURE__ */ e(
|
|
291
|
+
"span",
|
|
292
|
+
{
|
|
293
|
+
dangerouslySetInnerHTML: { __html: l },
|
|
294
|
+
style: { fontFamily: y.typography.fontFamily }
|
|
295
|
+
}
|
|
296
|
+
)
|
|
291
297
|
}
|
|
292
298
|
);
|
|
293
299
|
return /* @__PURE__ */ e(
|
|
294
300
|
U,
|
|
295
301
|
{
|
|
296
|
-
"aria-hidden": !
|
|
302
|
+
"aria-hidden": !d,
|
|
297
303
|
"aria-label": t,
|
|
298
304
|
"aria-labelledby": "divButton",
|
|
299
305
|
"aria-roledescription": "slide",
|
|
@@ -301,12 +307,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
301
307
|
role: "group",
|
|
302
308
|
sx: {
|
|
303
309
|
height: "100%",
|
|
304
|
-
minWidth: E ? `${E}px` : "100%"
|
|
310
|
+
minWidth: E ? `${E}px` : "100%",
|
|
311
|
+
fontFamily: y.typography.fontFamily
|
|
305
312
|
},
|
|
306
313
|
children: /* @__PURE__ */ e(
|
|
307
314
|
U,
|
|
308
315
|
{
|
|
309
|
-
"aria-hidden": !
|
|
316
|
+
"aria-hidden": !d,
|
|
310
317
|
"aria-label": t,
|
|
311
318
|
id: "divButton",
|
|
312
319
|
onClick: () => _(),
|
|
@@ -315,11 +322,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
315
322
|
ref: R,
|
|
316
323
|
role: "button",
|
|
317
324
|
sx: {
|
|
318
|
-
border:
|
|
325
|
+
border: D ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
319
326
|
borderRadius: "8px",
|
|
320
327
|
height: "100%"
|
|
321
328
|
},
|
|
322
|
-
tabIndex:
|
|
329
|
+
tabIndex: d ? 0 : -1,
|
|
323
330
|
children: /* @__PURE__ */ e(
|
|
324
331
|
rt,
|
|
325
332
|
{
|
|
@@ -331,14 +338,14 @@ const $ = u.createContext(null), pt = ({
|
|
|
331
338
|
cursor: "pointer",
|
|
332
339
|
height: n ? "100%" : 124,
|
|
333
340
|
p: 16,
|
|
334
|
-
...
|
|
341
|
+
...z,
|
|
335
342
|
"& .MuiCardHeader-avatar": {
|
|
336
343
|
color: h.iconColor,
|
|
337
344
|
mr: "8px"
|
|
338
345
|
}
|
|
339
346
|
},
|
|
340
347
|
variant: c,
|
|
341
|
-
children: /* @__PURE__ */
|
|
348
|
+
children: /* @__PURE__ */ I(
|
|
342
349
|
K,
|
|
343
350
|
{
|
|
344
351
|
sx: {
|
|
@@ -350,13 +357,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
350
357
|
at,
|
|
351
358
|
{
|
|
352
359
|
avatar: C && a,
|
|
353
|
-
subheader: p &&
|
|
360
|
+
subheader: p && g,
|
|
354
361
|
sx: { color: h.headerColor, p: 0 },
|
|
355
362
|
title: m,
|
|
356
363
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
357
364
|
}
|
|
358
365
|
),
|
|
359
|
-
/* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p &&
|
|
366
|
+
/* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && g }),
|
|
360
367
|
!!o && /* @__PURE__ */ e(
|
|
361
368
|
lt,
|
|
362
369
|
{
|
|
@@ -367,13 +374,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
367
374
|
children: /* @__PURE__ */ e(
|
|
368
375
|
U,
|
|
369
376
|
{
|
|
370
|
-
sx: (
|
|
371
|
-
color: h.buttonColor ? h.buttonColor :
|
|
372
|
-
// TODO: Per Cameron the theme package in @mxenabled/mxui will be getting a big update and this will be theme.palette.primary_main
|
|
377
|
+
sx: (L) => ({
|
|
378
|
+
color: h.buttonColor ? h.buttonColor : L.palette.primary.main,
|
|
373
379
|
fontSize: 14,
|
|
374
380
|
fontWeight: "bold",
|
|
375
381
|
px: 28,
|
|
376
|
-
|
|
382
|
+
fontFamily: L.typography.fontFamily,
|
|
383
|
+
...F
|
|
377
384
|
}),
|
|
378
385
|
children: o
|
|
379
386
|
}
|
|
@@ -396,7 +403,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
396
403
|
i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
|
|
397
404
|
}, []), /* @__PURE__ */ e(je, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
|
|
398
405
|
}, Ct = ({ beat: i }) => {
|
|
399
|
-
const o =
|
|
406
|
+
const o = Oe(), t = ft(o);
|
|
400
407
|
return /* @__PURE__ */ e(
|
|
401
408
|
Xe,
|
|
402
409
|
{
|
|
@@ -411,7 +418,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
411
418
|
"& .kyper-categoryicon": {
|
|
412
419
|
display: "flex"
|
|
413
420
|
}
|
|
414
|
-
}), mt =
|
|
421
|
+
}), mt = P(Ct), Rt = ({
|
|
415
422
|
color: i = "currentColor",
|
|
416
423
|
height: o,
|
|
417
424
|
size: t = 16,
|
|
@@ -446,9 +453,9 @@ const $ = u.createContext(null), pt = ({
|
|
|
446
453
|
const t = gt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
|
|
447
454
|
return !l.length || !n.length ? o.Color.Primary300 : l[0].amount > n[0].amount ? o.Color.Error300 : l[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
|
|
448
455
|
}, yt = ({ beat: i }) => {
|
|
449
|
-
const o =
|
|
456
|
+
const o = Oe(), t = It(i.data_series, o);
|
|
450
457
|
return /* @__PURE__ */ e(J, { name: "bar_chart", sx: { color: t } });
|
|
451
|
-
}, Le = () => /* @__PURE__ */
|
|
458
|
+
}, Le = () => /* @__PURE__ */ I("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
452
459
|
/* @__PURE__ */ e(
|
|
453
460
|
"path",
|
|
454
461
|
{
|
|
@@ -692,7 +699,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
692
699
|
fillRule: "evenodd"
|
|
693
700
|
}
|
|
694
701
|
),
|
|
695
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ I("g", { filter: "url(#filter0_d_1565_98011)", children: [
|
|
696
703
|
/* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
|
|
697
704
|
"path",
|
|
698
705
|
{
|
|
@@ -948,10 +955,10 @@ const $ = u.createContext(null), pt = ({
|
|
|
948
955
|
),
|
|
949
956
|
/* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
|
|
950
957
|
] }),
|
|
951
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ I("g", { filter: "url(#filter1_d_1565_98011)", children: [
|
|
952
959
|
/* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
|
|
953
960
|
/* @__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" }) }),
|
|
954
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ I("g", { mask: "url(#mask2_1565_98011)", children: [
|
|
955
962
|
/* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
|
|
956
963
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
|
|
957
964
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
|
|
@@ -1141,8 +1148,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1141
1148
|
fill: "#CDD3DD"
|
|
1142
1149
|
}
|
|
1143
1150
|
),
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ I("defs", { children: [
|
|
1152
|
+
/* @__PURE__ */ I(
|
|
1146
1153
|
"filter",
|
|
1147
1154
|
{
|
|
1148
1155
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1185,7 +1192,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1185
1192
|
]
|
|
1186
1193
|
}
|
|
1187
1194
|
),
|
|
1188
|
-
/* @__PURE__ */
|
|
1195
|
+
/* @__PURE__ */ I(
|
|
1189
1196
|
"filter",
|
|
1190
1197
|
{
|
|
1191
1198
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1229,8 +1236,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1229
1236
|
}
|
|
1230
1237
|
)
|
|
1231
1238
|
] })
|
|
1232
|
-
] }),
|
|
1233
|
-
const l =
|
|
1239
|
+
] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
|
1240
|
+
const l = ce(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
|
|
1234
1241
|
return r === 0 ? /* @__PURE__ */ e(J, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(J, { name: "campaign" }) : /* @__PURE__ */ e(
|
|
1235
1242
|
J,
|
|
1236
1243
|
{
|
|
@@ -1241,7 +1248,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1241
1248
|
}
|
|
1242
1249
|
}
|
|
1243
1250
|
);
|
|
1244
|
-
},
|
|
1251
|
+
}, k = () => {
|
|
1245
1252
|
const i = u.useContext($);
|
|
1246
1253
|
if (!i)
|
|
1247
1254
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
@@ -1276,18 +1283,18 @@ const $ = u.createContext(null), pt = ({
|
|
|
1276
1283
|
showCTAColocatedWithText: l = !0,
|
|
1277
1284
|
heightOverrides: n,
|
|
1278
1285
|
index: a,
|
|
1279
|
-
isActiveCard:
|
|
1286
|
+
isActiveCard: d,
|
|
1280
1287
|
onCardClick: p,
|
|
1281
1288
|
posthog: _,
|
|
1282
1289
|
showIcon: C,
|
|
1283
1290
|
variant: f,
|
|
1284
1291
|
widthOverrides: h
|
|
1285
1292
|
}) => {
|
|
1286
|
-
const { ref: m, inView: c } =
|
|
1293
|
+
const { ref: m, inView: c } = Ae({
|
|
1287
1294
|
threshold: He
|
|
1288
|
-
}), { cardsCopy: E } =
|
|
1295
|
+
}), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: y, updateOffer: D } = vt();
|
|
1289
1296
|
ee(() => {
|
|
1290
|
-
c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ?
|
|
1297
|
+
c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ? D({
|
|
1291
1298
|
...t,
|
|
1292
1299
|
has_been_displayed: !0
|
|
1293
1300
|
}) : y({
|
|
@@ -1310,7 +1317,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1310
1317
|
position: a
|
|
1311
1318
|
});
|
|
1312
1319
|
}, [t, a, c]);
|
|
1313
|
-
const
|
|
1320
|
+
const O = () => {
|
|
1314
1321
|
if (p && p(t), R(We(t.template)), t.template === "MarketingOffer") {
|
|
1315
1322
|
const v = t;
|
|
1316
1323
|
_?.capture("clicked_messaging_insight", {
|
|
@@ -1334,8 +1341,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1334
1341
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1335
1342
|
fontColors: { buttonColor: r?.primary_300 },
|
|
1336
1343
|
heightOverrides: n,
|
|
1337
|
-
icon:
|
|
1338
|
-
|
|
1344
|
+
icon: ve && /* @__PURE__ */ e(
|
|
1345
|
+
ve,
|
|
1339
1346
|
{
|
|
1340
1347
|
beat: t,
|
|
1341
1348
|
clientColorScheme: r,
|
|
@@ -1343,8 +1350,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1343
1350
|
type: t?.icon_type
|
|
1344
1351
|
}
|
|
1345
1352
|
),
|
|
1346
|
-
isActiveCard:
|
|
1347
|
-
onCardClick:
|
|
1353
|
+
isActiveCard: d,
|
|
1354
|
+
onCardClick: O,
|
|
1348
1355
|
posthog: _,
|
|
1349
1356
|
ref: m,
|
|
1350
1357
|
showCTAColocatedWithText: l,
|
|
@@ -1362,11 +1369,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
1362
1369
|
onPreviousClick: l,
|
|
1363
1370
|
scrollRightBoundary: n,
|
|
1364
1371
|
scrollX: a,
|
|
1365
|
-
shouldApplyNewAnimation:
|
|
1372
|
+
shouldApplyNewAnimation: d = !1,
|
|
1366
1373
|
visibleCardsCount: p = 1
|
|
1367
1374
|
}) => {
|
|
1368
|
-
const _ =
|
|
1369
|
-
return /* @__PURE__ */
|
|
1375
|
+
const _ = Se(), { carouselCopy: C } = k(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
|
|
1376
|
+
return /* @__PURE__ */ I(
|
|
1370
1377
|
K,
|
|
1371
1378
|
{
|
|
1372
1379
|
direction: "row",
|
|
@@ -1382,7 +1389,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1382
1389
|
},
|
|
1383
1390
|
children: [
|
|
1384
1391
|
/* @__PURE__ */ e(
|
|
1385
|
-
|
|
1392
|
+
pe,
|
|
1386
1393
|
{
|
|
1387
1394
|
"aria-disabled": f,
|
|
1388
1395
|
"aria-label": C.previous_insight_cta_aria,
|
|
@@ -1409,7 +1416,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1409
1416
|
height: 8,
|
|
1410
1417
|
mr: 8,
|
|
1411
1418
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
1412
|
-
...
|
|
1419
|
+
...d ? {
|
|
1413
1420
|
borderRadius: "4px",
|
|
1414
1421
|
transformOrigin: "center",
|
|
1415
1422
|
transition: "all 0.5s ease-out",
|
|
@@ -1418,21 +1425,21 @@ const $ = u.createContext(null), pt = ({
|
|
|
1418
1425
|
borderRadius: "50%",
|
|
1419
1426
|
p: 0
|
|
1420
1427
|
},
|
|
1421
|
-
width: y &&
|
|
1428
|
+
width: y && d ? 24 : 8
|
|
1422
1429
|
}
|
|
1423
1430
|
},
|
|
1424
1431
|
`carousel-button-${R}`
|
|
1425
1432
|
);
|
|
1426
1433
|
}),
|
|
1427
1434
|
/* @__PURE__ */ e(
|
|
1428
|
-
|
|
1435
|
+
pe,
|
|
1429
1436
|
{
|
|
1430
1437
|
"aria-disabled": h,
|
|
1431
1438
|
"aria-label": C.next_insight_cta_aria,
|
|
1432
1439
|
disabled: h,
|
|
1433
1440
|
onClick: r,
|
|
1434
1441
|
children: /* @__PURE__ */ e(
|
|
1435
|
-
|
|
1442
|
+
Me,
|
|
1436
1443
|
{
|
|
1437
1444
|
style: {
|
|
1438
1445
|
color: h ? m : c
|
|
@@ -1452,7 +1459,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1452
1459
|
showCTAColocatedWithText: l,
|
|
1453
1460
|
heightOverrides: n,
|
|
1454
1461
|
onCardClick: a,
|
|
1455
|
-
posthog:
|
|
1462
|
+
posthog: d,
|
|
1456
1463
|
shouldApplyNewAnimation: p = !1,
|
|
1457
1464
|
showCarouselControls: _,
|
|
1458
1465
|
showIcon: C,
|
|
@@ -1462,22 +1469,22 @@ const $ = u.createContext(null), pt = ({
|
|
|
1462
1469
|
visibleCardsCount: c = 1
|
|
1463
1470
|
// Default to 1 card visible
|
|
1464
1471
|
}) => {
|
|
1465
|
-
const E = u.useRef(null), R = u.useRef(null), [y,
|
|
1472
|
+
const E = u.useRef(null), R = u.useRef(null), [y, D] = u.useState(0), [O, v] = u.useState(null), [F, z] = u.useState(null), [g, L] = u.useState(null), [ie, G] = u.useState(p), { carouselCopy: B } = k(), { onEvent: b } = Y();
|
|
1466
1473
|
u.useEffect(() => {
|
|
1467
1474
|
if (E.current && !o) {
|
|
1468
|
-
const
|
|
1469
|
-
let
|
|
1475
|
+
const s = E.current.offsetWidth, A = 8;
|
|
1476
|
+
let V;
|
|
1470
1477
|
if (c > 1) {
|
|
1471
|
-
const Q = (
|
|
1472
|
-
|
|
1478
|
+
const Q = (s - (c - 1) * A) / c / 3;
|
|
1479
|
+
V = (s - Q - (c - 1) * A) / c;
|
|
1473
1480
|
} else
|
|
1474
|
-
|
|
1475
|
-
|
|
1481
|
+
V = s;
|
|
1482
|
+
L(V);
|
|
1476
1483
|
}
|
|
1477
1484
|
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
|
1478
|
-
const
|
|
1479
|
-
if (typeof
|
|
1480
|
-
const A = (
|
|
1485
|
+
const s = R.current?.offsetWidth;
|
|
1486
|
+
if (typeof s == "number" && o) {
|
|
1487
|
+
const A = (Z) => {
|
|
1481
1488
|
G(!0);
|
|
1482
1489
|
const q = [
|
|
1483
1490
|
{ maxWidth: 375, cardWidth: 268 },
|
|
@@ -1485,52 +1492,52 @@ const $ = u.createContext(null), pt = ({
|
|
|
1485
1492
|
{ maxWidth: 599, cardWidth: 350 },
|
|
1486
1493
|
{ maxWidth: 749, cardWidth: 450 },
|
|
1487
1494
|
{ maxWidth: 900, cardWidth: 600 }
|
|
1488
|
-
].find((ne) =>
|
|
1495
|
+
].find((ne) => Z <= ne.maxWidth);
|
|
1489
1496
|
return q ? q.cardWidth : 750;
|
|
1490
1497
|
};
|
|
1491
|
-
|
|
1492
|
-
const
|
|
1493
|
-
const
|
|
1494
|
-
typeof
|
|
1498
|
+
L(A(s));
|
|
1499
|
+
const V = () => {
|
|
1500
|
+
const Z = R.current?.offsetWidth;
|
|
1501
|
+
typeof Z == "number" && L(A(Z));
|
|
1495
1502
|
};
|
|
1496
|
-
return window.addEventListener("resize",
|
|
1497
|
-
window.removeEventListener("resize",
|
|
1503
|
+
return window.addEventListener("resize", V), () => {
|
|
1504
|
+
window.removeEventListener("resize", V);
|
|
1498
1505
|
};
|
|
1499
1506
|
}
|
|
1500
1507
|
}, [o, R]);
|
|
1501
1508
|
const oe = () => {
|
|
1502
|
-
b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current &&
|
|
1503
|
-
left: y +
|
|
1509
|
+
b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
|
|
1510
|
+
left: y + g + 8,
|
|
1504
1511
|
top: 0,
|
|
1505
1512
|
behavior: "smooth"
|
|
1506
1513
|
});
|
|
1507
1514
|
}, re = () => {
|
|
1508
|
-
b(M.ON_CAROUSEL_BACK_CLICK, i), E.current &&
|
|
1509
|
-
left: Math.max(0, y - (
|
|
1515
|
+
b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
|
|
1516
|
+
left: Math.max(0, y - (g + 8)),
|
|
1510
1517
|
top: 0,
|
|
1511
1518
|
behavior: "smooth"
|
|
1512
1519
|
});
|
|
1513
1520
|
}, j = () => {
|
|
1514
|
-
E.current &&
|
|
1521
|
+
E.current && D(E.current.scrollLeft);
|
|
1515
1522
|
}, X = () => {
|
|
1516
|
-
if (!
|
|
1517
|
-
|
|
1518
|
-
},
|
|
1519
|
-
v(
|
|
1520
|
-
}, Be = (
|
|
1521
|
-
v(null),
|
|
1522
|
-
},
|
|
1523
|
+
if (!F || !O) return;
|
|
1524
|
+
F - O > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1525
|
+
}, N = (s) => {
|
|
1526
|
+
v(s.targetTouches[0].clientX);
|
|
1527
|
+
}, Be = (s) => {
|
|
1528
|
+
v(null), z(s.targetTouches[0].clientX);
|
|
1529
|
+
}, Ee = {
|
|
1523
1530
|
clientColorScheme: r,
|
|
1524
1531
|
showCTAColocatedWithText: l,
|
|
1525
1532
|
heightOverrides: n,
|
|
1526
|
-
posthog:
|
|
1533
|
+
posthog: d,
|
|
1527
1534
|
showIcon: C,
|
|
1528
1535
|
variant: h
|
|
1529
|
-
}, le =
|
|
1530
|
-
return /* @__PURE__ */
|
|
1536
|
+
}, le = g ? Math.round(y / (g + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
1537
|
+
return /* @__PURE__ */ I(
|
|
1531
1538
|
K,
|
|
1532
1539
|
{
|
|
1533
|
-
"aria-label":
|
|
1540
|
+
"aria-label": B.carousel_title,
|
|
1534
1541
|
"aria-roledescription": "carousel",
|
|
1535
1542
|
ref: R,
|
|
1536
1543
|
role: "group/region",
|
|
@@ -1541,13 +1548,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
1541
1548
|
width: m || "100%"
|
|
1542
1549
|
},
|
|
1543
1550
|
children: [
|
|
1544
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ I(
|
|
1545
1552
|
K,
|
|
1546
1553
|
{
|
|
1547
1554
|
direction: "row",
|
|
1548
1555
|
onScroll: j,
|
|
1549
1556
|
onTouchEnd: X,
|
|
1550
|
-
onTouchMove:
|
|
1557
|
+
onTouchMove: N,
|
|
1551
1558
|
onTouchStart: Be,
|
|
1552
1559
|
ref: E,
|
|
1553
1560
|
sx: {
|
|
@@ -1568,24 +1575,24 @@ const $ = u.createContext(null), pt = ({
|
|
|
1568
1575
|
}
|
|
1569
1576
|
},
|
|
1570
1577
|
children: [
|
|
1571
|
-
t.map((
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
), q =
|
|
1578
|
+
t.map((s, A) => {
|
|
1579
|
+
const V = A + 1, Z = t.length + 1, Q = Je(
|
|
1580
|
+
B.card_position_in_carousel_aria,
|
|
1581
|
+
V.toString(),
|
|
1582
|
+
Z.toString()
|
|
1583
|
+
), q = s.micro_title && s.micro_title.length > 0, ne = s.micro_description && s.micro_description.length > 0, Pe = q ? s.micro_title : s.title, Ge = ne ? s.micro_description : s.description;
|
|
1577
1584
|
return /* @__PURE__ */ e(
|
|
1578
1585
|
Mt,
|
|
1579
1586
|
{
|
|
1580
1587
|
ariaLabel: `${Q}: ${Pe}, ${Ge}`,
|
|
1581
|
-
beat:
|
|
1588
|
+
beat: s,
|
|
1582
1589
|
index: A,
|
|
1583
1590
|
isActiveCard: A === le,
|
|
1584
1591
|
onCardClick: a,
|
|
1585
|
-
widthOverrides:
|
|
1586
|
-
...
|
|
1592
|
+
widthOverrides: g || void 0,
|
|
1593
|
+
...Ee
|
|
1587
1594
|
},
|
|
1588
|
-
`${
|
|
1595
|
+
`${s.guid} ${A}`
|
|
1589
1596
|
);
|
|
1590
1597
|
}),
|
|
1591
1598
|
/* @__PURE__ */ e(
|
|
@@ -1593,8 +1600,8 @@ const $ = u.createContext(null), pt = ({
|
|
|
1593
1600
|
{
|
|
1594
1601
|
isActiveCard: le === t.length,
|
|
1595
1602
|
onCardClick: a,
|
|
1596
|
-
widthOverrides:
|
|
1597
|
-
...
|
|
1603
|
+
widthOverrides: g || void 0,
|
|
1604
|
+
...Ee
|
|
1598
1605
|
}
|
|
1599
1606
|
)
|
|
1600
1607
|
]
|
|
@@ -1617,17 +1624,17 @@ const $ = u.createContext(null), pt = ({
|
|
|
1617
1624
|
]
|
|
1618
1625
|
}
|
|
1619
1626
|
);
|
|
1620
|
-
}, Tt =
|
|
1627
|
+
}, Tt = P(Ot), Wt = ({
|
|
1621
1628
|
analyticsMetadata: i,
|
|
1622
1629
|
clientColorScheme: o,
|
|
1623
1630
|
onCardClick: t,
|
|
1624
1631
|
posthog: r,
|
|
1625
1632
|
widthOverrides: l
|
|
1626
1633
|
}) => {
|
|
1627
|
-
const { carouselCopy: n } =
|
|
1634
|
+
const { carouselCopy: n } = k(), { onEvent: a } = Y(), d = () => {
|
|
1628
1635
|
a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
|
|
1629
1636
|
};
|
|
1630
|
-
return n ? /* @__PURE__ */
|
|
1637
|
+
return n ? /* @__PURE__ */ I(
|
|
1631
1638
|
K,
|
|
1632
1639
|
{
|
|
1633
1640
|
alignItems: "center",
|
|
@@ -1640,7 +1647,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1640
1647
|
},
|
|
1641
1648
|
children: [
|
|
1642
1649
|
/* @__PURE__ */ e(
|
|
1643
|
-
|
|
1650
|
+
ue,
|
|
1644
1651
|
{
|
|
1645
1652
|
sx: {
|
|
1646
1653
|
fontSize: 18,
|
|
@@ -1651,10 +1658,10 @@ const $ = u.createContext(null), pt = ({
|
|
|
1651
1658
|
children: n.carousel_title
|
|
1652
1659
|
}
|
|
1653
1660
|
),
|
|
1654
|
-
/* @__PURE__ */
|
|
1661
|
+
/* @__PURE__ */ I(
|
|
1655
1662
|
ze,
|
|
1656
1663
|
{
|
|
1657
|
-
onClick:
|
|
1664
|
+
onClick: d,
|
|
1658
1665
|
sx: {
|
|
1659
1666
|
display: "flex",
|
|
1660
1667
|
alignItems: "center",
|
|
@@ -1668,7 +1675,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1668
1675
|
underline: "none",
|
|
1669
1676
|
children: [
|
|
1670
1677
|
/* @__PURE__ */ e(
|
|
1671
|
-
|
|
1678
|
+
ue,
|
|
1672
1679
|
{
|
|
1673
1680
|
sx: {
|
|
1674
1681
|
color: o?.primary_300,
|
|
@@ -1680,19 +1687,19 @@ const $ = u.createContext(null), pt = ({
|
|
|
1680
1687
|
children: n.view_all_insights_in_full_feed_cta_aria
|
|
1681
1688
|
}
|
|
1682
1689
|
),
|
|
1683
|
-
/* @__PURE__ */ e(
|
|
1690
|
+
/* @__PURE__ */ e(Me, { sx: { color: o?.primary_300, ml: "8px" } })
|
|
1684
1691
|
]
|
|
1685
1692
|
}
|
|
1686
1693
|
)
|
|
1687
1694
|
]
|
|
1688
1695
|
}
|
|
1689
1696
|
) : /* @__PURE__ */ e($e, {});
|
|
1690
|
-
}, wt =
|
|
1697
|
+
}, wt = P(Wt), xt = ({
|
|
1691
1698
|
heightOverrides: i,
|
|
1692
1699
|
widthOverrides: o,
|
|
1693
1700
|
children: t
|
|
1694
1701
|
}) => {
|
|
1695
|
-
const { carouselCopy: r } =
|
|
1702
|
+
const { carouselCopy: r } = k();
|
|
1696
1703
|
return /* @__PURE__ */ e(
|
|
1697
1704
|
U,
|
|
1698
1705
|
{
|
|
@@ -1716,13 +1723,13 @@ const $ = u.createContext(null), pt = ({
|
|
|
1716
1723
|
onCardClick: l,
|
|
1717
1724
|
posthog: n,
|
|
1718
1725
|
showIcon: a,
|
|
1719
|
-
showWithMargin:
|
|
1726
|
+
showWithMargin: d,
|
|
1720
1727
|
variant: p,
|
|
1721
1728
|
widthOverrides: _
|
|
1722
1729
|
}) => {
|
|
1723
|
-
const { cardsCopy: C } =
|
|
1730
|
+
const { cardsCopy: C } = k(), { onEvent: f } = Y(), { onPageview: h } = Ne();
|
|
1724
1731
|
u.useEffect(() => {
|
|
1725
|
-
h(
|
|
1732
|
+
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1726
1733
|
}, []);
|
|
1727
1734
|
const m = () => {
|
|
1728
1735
|
l && l(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
|
|
@@ -1747,7 +1754,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1747
1754
|
card: {
|
|
1748
1755
|
height: `calc(${Ve[o]}px - 44px)`,
|
|
1749
1756
|
m: "0 auto",
|
|
1750
|
-
width:
|
|
1757
|
+
width: d ? "calc(100% - 32px)" : "100%"
|
|
1751
1758
|
},
|
|
1752
1759
|
description: {
|
|
1753
1760
|
WebkitLineClamp: 4
|
|
@@ -1762,7 +1769,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1762
1769
|
widthOverrides: _
|
|
1763
1770
|
}
|
|
1764
1771
|
);
|
|
1765
|
-
}, ci =
|
|
1772
|
+
}, ci = P(ke), Fe = ({
|
|
1766
1773
|
ariaLabel: i,
|
|
1767
1774
|
carouselSize: o,
|
|
1768
1775
|
heightOverrides: t,
|
|
@@ -1770,12 +1777,12 @@ const $ = u.createContext(null), pt = ({
|
|
|
1770
1777
|
posthog: l,
|
|
1771
1778
|
showIcon: n,
|
|
1772
1779
|
showWithMargin: a,
|
|
1773
|
-
variant:
|
|
1780
|
+
variant: d,
|
|
1774
1781
|
widthOverrides: p
|
|
1775
1782
|
}) => {
|
|
1776
|
-
const { onPageview: _ } = Ne(), { zeroStateCopy: C } =
|
|
1783
|
+
const { onPageview: _ } = Ne(), { zeroStateCopy: C } = k();
|
|
1777
1784
|
return u.useEffect(() => {
|
|
1778
|
-
_(
|
|
1785
|
+
_(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1779
1786
|
}, []), /* @__PURE__ */ e(
|
|
1780
1787
|
te,
|
|
1781
1788
|
{
|
|
@@ -1800,11 +1807,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
1800
1807
|
}
|
|
1801
1808
|
},
|
|
1802
1809
|
title: C.carousel_zero_state_title,
|
|
1803
|
-
variant:
|
|
1810
|
+
variant: d,
|
|
1804
1811
|
widthOverrides: p
|
|
1805
1812
|
}
|
|
1806
1813
|
);
|
|
1807
|
-
},
|
|
1814
|
+
}, si = P(Fe), Dt = () => /* @__PURE__ */ e(
|
|
1808
1815
|
U,
|
|
1809
1816
|
{
|
|
1810
1817
|
sx: {
|
|
@@ -1816,7 +1823,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1816
1823
|
},
|
|
1817
1824
|
children: /* @__PURE__ */ e(et, {})
|
|
1818
1825
|
}
|
|
1819
|
-
),
|
|
1826
|
+
), T = new ut(), Lt = ({
|
|
1820
1827
|
allowSingleCardPeeking: i,
|
|
1821
1828
|
areBeatsLoading: o,
|
|
1822
1829
|
beats: t = [],
|
|
@@ -1826,7 +1833,7 @@ const $ = u.createContext(null), pt = ({
|
|
|
1826
1833
|
showCTAColocatedWithText: l = !0,
|
|
1827
1834
|
endpoint: n = "/",
|
|
1828
1835
|
heightOverrides: a,
|
|
1829
|
-
logOutUser:
|
|
1836
|
+
logOutUser: d,
|
|
1830
1837
|
onCardClick: p = () => {
|
|
1831
1838
|
},
|
|
1832
1839
|
onEvent: _ = () => {
|
|
@@ -1840,22 +1847,22 @@ const $ = u.createContext(null), pt = ({
|
|
|
1840
1847
|
showHeader: E,
|
|
1841
1848
|
showIcon: R,
|
|
1842
1849
|
showWithMargin: y = !0,
|
|
1843
|
-
token:
|
|
1844
|
-
useDarkMode:
|
|
1850
|
+
token: D = "",
|
|
1851
|
+
useDarkMode: O,
|
|
1845
1852
|
userHasFullInsightFeedBeats: v,
|
|
1846
|
-
variant:
|
|
1847
|
-
visibleCardsCount:
|
|
1848
|
-
widthOverrides:
|
|
1853
|
+
variant: F,
|
|
1854
|
+
visibleCardsCount: z = 1,
|
|
1855
|
+
widthOverrides: g
|
|
1849
1856
|
}) => {
|
|
1850
|
-
const
|
|
1857
|
+
const L = Se(), [ie, G] = ae("STANDARD"), [B, b] = ae(!1), oe = it([_], T), re = ot([C], T);
|
|
1851
1858
|
u.useEffect(() => {
|
|
1852
|
-
|
|
1853
|
-
}, [n,
|
|
1854
|
-
const
|
|
1855
|
-
|
|
1859
|
+
T.isInitialized || T.initialize(n, D, d);
|
|
1860
|
+
}, [n, D, d, T.isInitialized]), u.useEffect(() => {
|
|
1861
|
+
const N = window.innerHeight;
|
|
1862
|
+
N < 180 ? G("STANDARD") : N >= 180 && N < 200 ? G("LARGE") : N >= 200 && N < 248 ? G("XLARGE") : N >= 248 && G("XXLARGE");
|
|
1856
1863
|
}, [window.innerHeight]), u.useEffect(() => {
|
|
1857
|
-
b(!o &&
|
|
1858
|
-
}, [o,
|
|
1864
|
+
b(!o && T.isInitialized);
|
|
1865
|
+
}, [o, T.isInitialized]);
|
|
1859
1866
|
const j = {
|
|
1860
1867
|
showCTAColocatedWithText: l,
|
|
1861
1868
|
heightOverrides: a,
|
|
@@ -1863,49 +1870,49 @@ const $ = u.createContext(null), pt = ({
|
|
|
1863
1870
|
posthog: f,
|
|
1864
1871
|
showIcon: R,
|
|
1865
1872
|
showWithMargin: y,
|
|
1866
|
-
useDarkMode:
|
|
1867
|
-
widthOverrides:
|
|
1873
|
+
useDarkMode: O,
|
|
1874
|
+
widthOverrides: g
|
|
1868
1875
|
}, X = {
|
|
1869
1876
|
carouselSize: ie,
|
|
1870
|
-
variant:
|
|
1877
|
+
variant: F,
|
|
1871
1878
|
...j
|
|
1872
1879
|
};
|
|
1873
1880
|
return (
|
|
1874
1881
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
|
1875
|
-
/* @__PURE__ */
|
|
1882
|
+
/* @__PURE__ */ I(Ue, { theme: L, children: [
|
|
1876
1883
|
/* @__PURE__ */ e(be, {}),
|
|
1877
|
-
/* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store:
|
|
1878
|
-
(o || !
|
|
1879
|
-
|
|
1884
|
+
/* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store: T, children: /* @__PURE__ */ I(xt, { heightOverrides: a, widthOverrides: g, children: [
|
|
1885
|
+
(o || !T.isInitialized) && /* @__PURE__ */ e(Dt, {}),
|
|
1886
|
+
B && E && /* @__PURE__ */ e(
|
|
1880
1887
|
wt,
|
|
1881
1888
|
{
|
|
1882
|
-
analyticsMetadata:
|
|
1889
|
+
analyticsMetadata: fe,
|
|
1883
1890
|
clientColorScheme: r,
|
|
1884
1891
|
onCardClick: p,
|
|
1885
1892
|
posthog: f,
|
|
1886
|
-
widthOverrides:
|
|
1893
|
+
widthOverrides: g
|
|
1887
1894
|
}
|
|
1888
1895
|
),
|
|
1889
|
-
|
|
1896
|
+
B && !!t.length && /* @__PURE__ */ e(
|
|
1890
1897
|
Tt,
|
|
1891
1898
|
{
|
|
1892
1899
|
allowSingleCardPeeking: i,
|
|
1893
|
-
analyticsMetadata:
|
|
1900
|
+
analyticsMetadata: fe,
|
|
1894
1901
|
beats: t,
|
|
1895
1902
|
clientColorScheme: r,
|
|
1896
1903
|
shouldApplyNewAnimation: h,
|
|
1897
1904
|
showCarouselControls: c,
|
|
1898
|
-
variant: m ?
|
|
1899
|
-
visibleCardsCount:
|
|
1905
|
+
variant: m ? F : void 0,
|
|
1906
|
+
visibleCardsCount: z,
|
|
1900
1907
|
...j
|
|
1901
1908
|
}
|
|
1902
1909
|
),
|
|
1903
|
-
|
|
1904
|
-
|
|
1910
|
+
B && !t.length && v && /* @__PURE__ */ e(ke, { clientColorScheme: r, ...X }),
|
|
1911
|
+
B && !t.length && !v && /* @__PURE__ */ e(Fe, { ...X })
|
|
1905
1912
|
] }) })
|
|
1906
1913
|
] })
|
|
1907
1914
|
);
|
|
1908
|
-
},
|
|
1915
|
+
}, di = P(Lt), Nt = ({
|
|
1909
1916
|
isActiveCard: i,
|
|
1910
1917
|
ariaLabel: o,
|
|
1911
1918
|
clientColorScheme: t,
|
|
@@ -1913,12 +1920,12 @@ const $ = u.createContext(null), pt = ({
|
|
|
1913
1920
|
onCardClick: l,
|
|
1914
1921
|
posthog: n,
|
|
1915
1922
|
showIcon: a,
|
|
1916
|
-
variant:
|
|
1923
|
+
variant: d,
|
|
1917
1924
|
widthOverrides: p
|
|
1918
1925
|
}) => {
|
|
1919
|
-
const _ =
|
|
1926
|
+
const _ = ce(), { ref: C, inView: f } = Ae({
|
|
1920
1927
|
threshold: He
|
|
1921
|
-
}), { cardsCopy: h } =
|
|
1928
|
+
}), { cardsCopy: h } = k(), { onEvent: m } = Y();
|
|
1922
1929
|
ee(() => {
|
|
1923
1930
|
f && (m(De.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
|
|
1924
1931
|
template: "view_more_card"
|
|
@@ -1944,11 +1951,11 @@ const $ = u.createContext(null), pt = ({
|
|
|
1944
1951
|
ref: C,
|
|
1945
1952
|
showIcon: a,
|
|
1946
1953
|
title: h.view_more_card_title,
|
|
1947
|
-
variant:
|
|
1954
|
+
variant: d,
|
|
1948
1955
|
widthOverrides: p
|
|
1949
1956
|
}
|
|
1950
1957
|
);
|
|
1951
|
-
}, Vt =
|
|
1958
|
+
}, Vt = P(Nt);
|
|
1952
1959
|
export {
|
|
1953
1960
|
ut as A,
|
|
1954
1961
|
Mt as B,
|
|
@@ -1956,11 +1963,11 @@ export {
|
|
|
1956
1963
|
pt as I,
|
|
1957
1964
|
Tt as M,
|
|
1958
1965
|
ci as N,
|
|
1959
|
-
|
|
1966
|
+
fe as T,
|
|
1960
1967
|
Vt as V,
|
|
1961
|
-
|
|
1968
|
+
si as Z,
|
|
1962
1969
|
te as a,
|
|
1963
|
-
|
|
1970
|
+
di as b,
|
|
1964
1971
|
Rt as c,
|
|
1965
1972
|
yt as d,
|
|
1966
1973
|
Le as e
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-
|
|
1
|
+
import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-DFAY0tA8.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as AppStore,
|
|
4
4
|
e as BeatCard,
|
package/dist/trends/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ import { C as rt } from "../CurrencyText-YUhH2caW.mjs";
|
|
|
20
20
|
import { c as Me } from "../Category-CevNQ03n.mjs";
|
|
21
21
|
import { b as at } from "../Localization-2MODESHW.mjs";
|
|
22
22
|
import { H as be } from "../HeaderCell-DjuifqHJ.mjs";
|
|
23
|
-
import { T as A, b as it } from "../ViewMoreMicroCard-
|
|
23
|
+
import { T as A, b as it } from "../ViewMoreMicroCard-DFAY0tA8.mjs";
|
|
24
24
|
import { A as y, W as Ae } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
25
25
|
import { a as Re, T as ke } from "../TransactionDetails-C-z3HGTT.mjs";
|
|
26
26
|
import { D as fe } from "../Drawer-kEE73B87.mjs";
|
|
@@ -856,7 +856,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
856
856
|
showXAxisTicks: !0,
|
|
857
857
|
showYAxis: !0,
|
|
858
858
|
showYAxisTicks: !0,
|
|
859
|
-
valueFormatterString: "
|
|
859
|
+
valueFormatterString: "0a"
|
|
860
860
|
}
|
|
861
861
|
);
|
|
862
862
|
}, Jt = M(qt), en = ({ onBackClick: n, onInsightCardClick: o, sx: t }) => {
|