@mx-cartographer/experiences 7.2.4 → 7.2.5-alpha.mm1
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.
|
@@ -4,12 +4,12 @@ import { observer as G } from "mobx-react-lite";
|
|
|
4
4
|
import Pe from "@mui/material/Button";
|
|
5
5
|
import K from "@mui/material/Stack";
|
|
6
6
|
import Ge from "@mui/material/Typography";
|
|
7
|
-
import { ChevronLeft as Ue, ChevronRight as
|
|
7
|
+
import { ChevronLeft as Ue, ChevronRight as Me } from "@mxenabled/mx-icons";
|
|
8
8
|
import { L as be } from "./Loader-DUaFpDGv.mjs";
|
|
9
9
|
import b from "@mui/material/Box";
|
|
10
10
|
import pe from "@mui/material/IconButton";
|
|
11
11
|
import { useTheme as ze } from "@mui/material/styles";
|
|
12
|
-
import { useInView as
|
|
12
|
+
import { useInView as Se } from "react-intersection-observer";
|
|
13
13
|
import { P as Ke, CategoryIcon as $e, useTokens as Ae, MerchantLogo as Ye, Icon as ie } from "@mxenabled/mxui";
|
|
14
14
|
import se from "@mui/material/styles/useTheme";
|
|
15
15
|
import { b as je } from "./Category-CevNQ03n.mjs";
|
|
@@ -73,7 +73,7 @@ const he = {
|
|
|
73
73
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
74
74
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
75
75
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
76
|
-
},
|
|
76
|
+
}, M = 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) => ({
|
|
@@ -82,7 +82,7 @@ const he = {
|
|
|
82
82
|
action: w.MICRO_BEAT_CLICKED,
|
|
83
83
|
category: W.BEAT_INTERACTION,
|
|
84
84
|
label: Ee(o),
|
|
85
|
-
value:
|
|
85
|
+
value: M
|
|
86
86
|
}
|
|
87
87
|
}),
|
|
88
88
|
{}
|
|
@@ -93,7 +93,7 @@ const he = {
|
|
|
93
93
|
action: w.MICRO_BEAT_DISPLAYED,
|
|
94
94
|
category: W.BEAT_INTERACTION,
|
|
95
95
|
label: Ee(o),
|
|
96
|
-
value:
|
|
96
|
+
value: M
|
|
97
97
|
}
|
|
98
98
|
}),
|
|
99
99
|
{}
|
|
@@ -104,7 +104,7 @@ const he = {
|
|
|
104
104
|
action: w.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
105
105
|
category: W.BEAT_INTERACTION,
|
|
106
106
|
label: Ee(o),
|
|
107
|
-
value:
|
|
107
|
+
value: M
|
|
108
108
|
}
|
|
109
109
|
}),
|
|
110
110
|
{}
|
|
@@ -116,7 +116,7 @@ const he = {
|
|
|
116
116
|
}, W = {
|
|
117
117
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
118
118
|
BEAT_INTERACTION: "Beat Interaction"
|
|
119
|
-
},
|
|
119
|
+
}, S = {
|
|
120
120
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
121
121
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
122
122
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
@@ -137,72 +137,72 @@ const he = {
|
|
|
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
|
-
},
|
|
140
|
+
}, ge = {
|
|
141
141
|
[H.MICRO_WIDGET_CAROUSEL]: {
|
|
142
142
|
label: T.MICRO_WIDGET,
|
|
143
143
|
name: H.MICRO_WIDGET_CAROUSEL,
|
|
144
144
|
path: me.INSIGHTS_MICRO_WIDGET,
|
|
145
|
-
value:
|
|
145
|
+
value: M
|
|
146
146
|
},
|
|
147
147
|
// zero state
|
|
148
148
|
[H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
149
149
|
label: T.MICRO_WIDGET,
|
|
150
150
|
name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
151
151
|
path: me.INSIGHTS_MICRO_WIDGET,
|
|
152
|
-
value:
|
|
152
|
+
value: M
|
|
153
153
|
},
|
|
154
154
|
// no relevant cards
|
|
155
155
|
[H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
156
156
|
label: T.MICRO_WIDGET,
|
|
157
157
|
name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
158
158
|
path: "/micro-widget",
|
|
159
|
-
value:
|
|
159
|
+
value: M
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, Re = {
|
|
162
162
|
// carousel control interaction events - clicks and swipes
|
|
163
|
-
[
|
|
163
|
+
[S.ON_CAROUSEL_BACK_CLICK]: {
|
|
164
164
|
action: w.CONTROL_BACKWARD,
|
|
165
165
|
category: W.MICRO_WIDGET_INTERACTION,
|
|
166
166
|
label: T.CAROUSEL_CONTROL,
|
|
167
|
-
value:
|
|
167
|
+
value: M
|
|
168
168
|
},
|
|
169
|
-
[
|
|
169
|
+
[S.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
170
170
|
action: w.CONTROL_FORWARD,
|
|
171
171
|
category: W.MICRO_WIDGET_INTERACTION,
|
|
172
172
|
label: T.CAROUSEL_CONTROL,
|
|
173
|
-
value:
|
|
173
|
+
value: M
|
|
174
174
|
},
|
|
175
|
-
[
|
|
175
|
+
[S.ON_CAROUSEL_BACK_SWIPE]: {
|
|
176
176
|
action: w.SWIPE_BACKWARD,
|
|
177
177
|
category: W.MICRO_WIDGET_INTERACTION,
|
|
178
178
|
label: T.CAROUSEL_CONTROL,
|
|
179
|
-
value:
|
|
179
|
+
value: M
|
|
180
180
|
},
|
|
181
|
-
[
|
|
181
|
+
[S.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
182
182
|
action: w.SWIPE_FORWARD,
|
|
183
183
|
category: W.MICRO_WIDGET_INTERACTION,
|
|
184
184
|
label: T.CAROUSEL_CONTROL,
|
|
185
|
-
value:
|
|
185
|
+
value: M
|
|
186
186
|
},
|
|
187
187
|
// read more card events
|
|
188
|
-
[
|
|
188
|
+
[S.ON_VIEW_MORE_CLICKED]: {
|
|
189
189
|
action: w.MICRO_BEAT_CLICKED,
|
|
190
190
|
category: W.BEAT_INTERACTION,
|
|
191
191
|
label: T.VIEW_MORE,
|
|
192
|
-
value:
|
|
192
|
+
value: M
|
|
193
193
|
},
|
|
194
194
|
[De.ON_VIEW_MORE_VIEWED]: {
|
|
195
195
|
action: w.MICRO_BEAT_DISPLAYED,
|
|
196
196
|
category: W.BEAT_INTERACTION,
|
|
197
197
|
label: T.VIEW_MORE,
|
|
198
|
-
value:
|
|
198
|
+
value: M
|
|
199
199
|
},
|
|
200
200
|
...at(),
|
|
201
201
|
...ct(),
|
|
202
202
|
...st()
|
|
203
|
-
}, Ie = async (i, o) => !o || !
|
|
203
|
+
}, Ie = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
|
|
204
204
|
throw t;
|
|
205
|
-
}), ye = async (i, o) => !o || !
|
|
205
|
+
}), ye = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticsPageview(ge[i]).then((t) => t).catch((t) => {
|
|
206
206
|
throw t;
|
|
207
207
|
});
|
|
208
208
|
class dt {
|
|
@@ -271,8 +271,9 @@ const $ = u.createContext(null), Et = ({
|
|
|
271
271
|
title: m,
|
|
272
272
|
variant: c,
|
|
273
273
|
widthOverrides: E
|
|
274
|
-
},
|
|
275
|
-
|
|
274
|
+
}, g) {
|
|
275
|
+
console.log("MicroInsightCard", { heightOverrides: l });
|
|
276
|
+
const I = se(), [D, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, R = /* @__PURE__ */ e(
|
|
276
277
|
Ke,
|
|
277
278
|
{
|
|
278
279
|
className: "mx-micro-card-description",
|
|
@@ -305,7 +306,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
305
306
|
"aria-label": t,
|
|
306
307
|
"aria-labelledby": "divButton",
|
|
307
308
|
"aria-roledescription": "slide",
|
|
308
|
-
ref:
|
|
309
|
+
ref: g,
|
|
309
310
|
role: "group",
|
|
310
311
|
sx: {
|
|
311
312
|
height: "100%",
|
|
@@ -321,7 +322,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
321
322
|
onClick: () => _(),
|
|
322
323
|
onKeyDown: () => O(!1),
|
|
323
324
|
onKeyUp: () => O(!0),
|
|
324
|
-
ref:
|
|
325
|
+
ref: g,
|
|
325
326
|
role: "button",
|
|
326
327
|
sx: {
|
|
327
328
|
border: D ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
@@ -334,6 +335,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
334
335
|
{
|
|
335
336
|
"aria-roledescription": "slide",
|
|
336
337
|
className: "mx-micro-card",
|
|
338
|
+
id: "MicroInsightCard",
|
|
337
339
|
role: "group",
|
|
338
340
|
sx: {
|
|
339
341
|
backgroundColor: r,
|
|
@@ -359,13 +361,13 @@ const $ = u.createContext(null), Et = ({
|
|
|
359
361
|
lt,
|
|
360
362
|
{
|
|
361
363
|
avatar: C && a,
|
|
362
|
-
subheader: p &&
|
|
364
|
+
subheader: p && R,
|
|
363
365
|
sx: { color: h.headerColor, p: 0 },
|
|
364
366
|
title: m,
|
|
365
367
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
366
368
|
}
|
|
367
369
|
),
|
|
368
|
-
/* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p &&
|
|
370
|
+
/* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && R }),
|
|
369
371
|
!!o && /* @__PURE__ */ e(
|
|
370
372
|
ot,
|
|
371
373
|
{
|
|
@@ -451,11 +453,11 @@ const $ = u.createContext(null), Et = ({
|
|
|
451
453
|
return i.names?.map((r, n) => {
|
|
452
454
|
t[r] = o[n];
|
|
453
455
|
}), t;
|
|
454
|
-
}) : [] : [],
|
|
456
|
+
}) : [] : [], gt = (i, o) => {
|
|
455
457
|
const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
|
|
456
458
|
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;
|
|
457
|
-
},
|
|
458
|
-
const o = Ae(), t =
|
|
459
|
+
}, Rt = ({ beat: i }) => {
|
|
460
|
+
const o = Ae(), t = gt(i.data_series, o);
|
|
459
461
|
return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
|
|
460
462
|
}, xe = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
461
463
|
/* @__PURE__ */ e(
|
|
@@ -1240,7 +1242,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1240
1242
|
] })
|
|
1241
1243
|
] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
|
1242
1244
|
const n = se(), l = o?.primary_300 ? o.primary_300 : n.palette.primary.main;
|
|
1243
|
-
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(
|
|
1245
|
+
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(Rt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
|
|
1244
1246
|
ie,
|
|
1245
1247
|
{
|
|
1246
1248
|
fill: !0,
|
|
@@ -1292,17 +1294,18 @@ const $ = u.createContext(null), Et = ({
|
|
|
1292
1294
|
variant: f,
|
|
1293
1295
|
widthOverrides: h
|
|
1294
1296
|
}) => {
|
|
1295
|
-
|
|
1297
|
+
console.log("BeatCard", { heightOverrides: l });
|
|
1298
|
+
const { ref: m, inView: c } = Se({
|
|
1296
1299
|
threshold: Ve
|
|
1297
|
-
}), { cardsCopy: E } = k(), { onEvent:
|
|
1300
|
+
}), { cardsCopy: E } = k(), { onEvent: g } = Y(), { updateBeat: I, updateOffer: D } = It();
|
|
1298
1301
|
oe(() => {
|
|
1299
|
-
c && (t.has_been_displayed ?
|
|
1302
|
+
c && (t.has_been_displayed ? g(We(t.template)) : (t.guid.startsWith("OFR") ? D({
|
|
1300
1303
|
...t,
|
|
1301
1304
|
has_been_displayed: !0
|
|
1302
1305
|
}) : I({
|
|
1303
1306
|
...t,
|
|
1304
1307
|
has_been_displayed: !0
|
|
1305
|
-
}),
|
|
1308
|
+
}), g(we(t.template))));
|
|
1306
1309
|
}, [c]), oe(() => {
|
|
1307
1310
|
if (c && t)
|
|
1308
1311
|
if (t.template === "MarketingOffer") {
|
|
@@ -1320,7 +1323,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1320
1323
|
});
|
|
1321
1324
|
}, [t, a, c]);
|
|
1322
1325
|
const O = () => {
|
|
1323
|
-
if (p && p(t),
|
|
1326
|
+
if (p && p(t), g(Te(t.template)), t.template === "MarketingOffer") {
|
|
1324
1327
|
const y = t;
|
|
1325
1328
|
_?.capture("clicked_messaging_insight", {
|
|
1326
1329
|
template: t.template,
|
|
@@ -1363,7 +1366,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1363
1366
|
widthOverrides: h
|
|
1364
1367
|
}
|
|
1365
1368
|
);
|
|
1366
|
-
},
|
|
1369
|
+
}, Mt = ({
|
|
1367
1370
|
clientColorScheme: i,
|
|
1368
1371
|
currentBeatIndex: o,
|
|
1369
1372
|
numBeats: t,
|
|
@@ -1407,8 +1410,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1407
1410
|
)
|
|
1408
1411
|
}
|
|
1409
1412
|
),
|
|
1410
|
-
Array.from({ length: t }).map((E,
|
|
1411
|
-
const I =
|
|
1413
|
+
Array.from({ length: t }).map((E, g) => {
|
|
1414
|
+
const I = g === o;
|
|
1412
1415
|
return /* @__PURE__ */ e(
|
|
1413
1416
|
b,
|
|
1414
1417
|
{
|
|
@@ -1430,7 +1433,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1430
1433
|
width: I && d ? 24 : 8
|
|
1431
1434
|
}
|
|
1432
1435
|
},
|
|
1433
|
-
`carousel-button-${
|
|
1436
|
+
`carousel-button-${g}`
|
|
1434
1437
|
);
|
|
1435
1438
|
}),
|
|
1436
1439
|
/* @__PURE__ */ e(
|
|
@@ -1441,7 +1444,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1441
1444
|
disabled: h,
|
|
1442
1445
|
onClick: r,
|
|
1443
1446
|
children: /* @__PURE__ */ e(
|
|
1444
|
-
|
|
1447
|
+
Me,
|
|
1445
1448
|
{
|
|
1446
1449
|
style: {
|
|
1447
1450
|
color: h ? m : c
|
|
@@ -1453,7 +1456,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1453
1456
|
]
|
|
1454
1457
|
}
|
|
1455
1458
|
);
|
|
1456
|
-
},
|
|
1459
|
+
}, St = ({
|
|
1457
1460
|
analyticsMetadata: i,
|
|
1458
1461
|
allowSingleCardPeeking: o = !1,
|
|
1459
1462
|
beats: t = [],
|
|
@@ -1471,7 +1474,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1471
1474
|
visibleCardsCount: c = 1
|
|
1472
1475
|
// Default to 1 card visible
|
|
1473
1476
|
}) => {
|
|
1474
|
-
|
|
1477
|
+
console.log("MicroBeatCarousel", { heightOverrides: l });
|
|
1478
|
+
const E = u.useRef(null), g = u.useRef(null), [I, D] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [R, x] = u.useState(null), [U, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
|
|
1475
1479
|
u.useEffect(() => {
|
|
1476
1480
|
if (E.current && !o) {
|
|
1477
1481
|
const s = E.current.offsetWidth, A = 8;
|
|
@@ -1484,7 +1488,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1484
1488
|
x(N);
|
|
1485
1489
|
}
|
|
1486
1490
|
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
|
1487
|
-
const s =
|
|
1491
|
+
const s = g.current?.offsetWidth;
|
|
1488
1492
|
if (typeof s == "number" && o) {
|
|
1489
1493
|
const A = (P) => {
|
|
1490
1494
|
B(!0);
|
|
@@ -1499,23 +1503,23 @@ const $ = u.createContext(null), Et = ({
|
|
|
1499
1503
|
};
|
|
1500
1504
|
x(A(s));
|
|
1501
1505
|
const N = () => {
|
|
1502
|
-
const P =
|
|
1506
|
+
const P = g.current?.offsetWidth;
|
|
1503
1507
|
typeof P == "number" && x(A(P));
|
|
1504
1508
|
};
|
|
1505
1509
|
return window.addEventListener("resize", N), () => {
|
|
1506
1510
|
window.removeEventListener("resize", N);
|
|
1507
1511
|
};
|
|
1508
1512
|
}
|
|
1509
|
-
}, [o,
|
|
1513
|
+
}, [o, g]);
|
|
1510
1514
|
const X = () => {
|
|
1511
|
-
Z(
|
|
1512
|
-
left: I +
|
|
1515
|
+
Z(S.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
|
|
1516
|
+
left: I + R + 8,
|
|
1513
1517
|
top: 0,
|
|
1514
1518
|
behavior: "smooth"
|
|
1515
1519
|
});
|
|
1516
1520
|
}, le = () => {
|
|
1517
|
-
Z(
|
|
1518
|
-
left: Math.max(0, I - (
|
|
1521
|
+
Z(S.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
|
|
1522
|
+
left: Math.max(0, I - (R + 8)),
|
|
1519
1523
|
top: 0,
|
|
1520
1524
|
behavior: "smooth"
|
|
1521
1525
|
});
|
|
@@ -1523,7 +1527,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1523
1527
|
E.current && D(E.current.scrollLeft);
|
|
1524
1528
|
}, Q = () => {
|
|
1525
1529
|
if (!F || !O) return;
|
|
1526
|
-
F - O > yt ? Z(
|
|
1530
|
+
F - O > yt ? Z(S.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(S.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1527
1531
|
}, q = (s) => {
|
|
1528
1532
|
y(s.targetTouches[0].clientX);
|
|
1529
1533
|
}, L = (s) => {
|
|
@@ -1535,13 +1539,14 @@ const $ = u.createContext(null), Et = ({
|
|
|
1535
1539
|
posthog: d,
|
|
1536
1540
|
showIcon: C,
|
|
1537
1541
|
variant: h
|
|
1538
|
-
}, ae =
|
|
1542
|
+
}, ae = R ? Math.round(I / (R + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
1539
1543
|
return /* @__PURE__ */ v(
|
|
1540
1544
|
K,
|
|
1541
1545
|
{
|
|
1542
1546
|
"aria-label": j.carousel_title,
|
|
1543
1547
|
"aria-roledescription": "carousel",
|
|
1544
|
-
|
|
1548
|
+
id: "MicroBeatCarousel",
|
|
1549
|
+
ref: g,
|
|
1545
1550
|
role: "group/region",
|
|
1546
1551
|
sx: {
|
|
1547
1552
|
alignItems: "center",
|
|
@@ -1591,7 +1596,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1591
1596
|
index: A,
|
|
1592
1597
|
isActiveCard: A === ae,
|
|
1593
1598
|
onCardClick: a,
|
|
1594
|
-
widthOverrides:
|
|
1599
|
+
widthOverrides: R || void 0,
|
|
1595
1600
|
...ue
|
|
1596
1601
|
},
|
|
1597
1602
|
`${s.guid} ${A}`
|
|
@@ -1602,7 +1607,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1602
1607
|
{
|
|
1603
1608
|
isActiveCard: ae === t.length,
|
|
1604
1609
|
onCardClick: a,
|
|
1605
|
-
widthOverrides:
|
|
1610
|
+
widthOverrides: R || void 0,
|
|
1606
1611
|
...ue
|
|
1607
1612
|
}
|
|
1608
1613
|
)
|
|
@@ -1610,7 +1615,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1610
1615
|
}
|
|
1611
1616
|
),
|
|
1612
1617
|
_ && /* @__PURE__ */ e(
|
|
1613
|
-
|
|
1618
|
+
Mt,
|
|
1614
1619
|
{
|
|
1615
1620
|
clientColorScheme: r,
|
|
1616
1621
|
currentBeatIndex: ae + c - 1,
|
|
@@ -1626,7 +1631,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1626
1631
|
]
|
|
1627
1632
|
}
|
|
1628
1633
|
);
|
|
1629
|
-
}, At = G(
|
|
1634
|
+
}, At = G(St), Ot = ({
|
|
1630
1635
|
analyticsMetadata: i,
|
|
1631
1636
|
clientColorScheme: o,
|
|
1632
1637
|
onCardClick: t,
|
|
@@ -1634,7 +1639,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1634
1639
|
widthOverrides: n
|
|
1635
1640
|
}) => {
|
|
1636
1641
|
const { carouselCopy: l } = k(), { onEvent: a } = Y(), d = () => {
|
|
1637
|
-
a && (a(
|
|
1642
|
+
a && (a(S.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
|
|
1638
1643
|
};
|
|
1639
1644
|
return l ? /* @__PURE__ */ v(
|
|
1640
1645
|
K,
|
|
@@ -1664,7 +1669,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1664
1669
|
/* @__PURE__ */ e(
|
|
1665
1670
|
Pe,
|
|
1666
1671
|
{
|
|
1667
|
-
endIcon: /* @__PURE__ */ e(
|
|
1672
|
+
endIcon: /* @__PURE__ */ e(Me, { size: 20 }),
|
|
1668
1673
|
onClick: d,
|
|
1669
1674
|
size: "small",
|
|
1670
1675
|
sx: {
|
|
@@ -1682,10 +1687,12 @@ const $ = u.createContext(null), Et = ({
|
|
|
1682
1687
|
widthOverrides: o,
|
|
1683
1688
|
children: t
|
|
1684
1689
|
}) => {
|
|
1690
|
+
console.log("MicroWidgetContainer", { heightOverrides: i });
|
|
1685
1691
|
const { carouselCopy: r } = k();
|
|
1686
1692
|
return /* @__PURE__ */ e(
|
|
1687
1693
|
b,
|
|
1688
1694
|
{
|
|
1695
|
+
id: "MicroWidgetContainer",
|
|
1689
1696
|
"aria-label": r?.carousel_title,
|
|
1690
1697
|
"aria-roledescription": "carousel",
|
|
1691
1698
|
role: "group",
|
|
@@ -1715,7 +1722,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1715
1722
|
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1716
1723
|
}, []);
|
|
1717
1724
|
const m = () => {
|
|
1718
|
-
n && n(), f(
|
|
1725
|
+
n && n(), f(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1719
1726
|
template: "no_relevant_insights"
|
|
1720
1727
|
});
|
|
1721
1728
|
};
|
|
@@ -1828,15 +1835,16 @@ const $ = u.createContext(null), Et = ({
|
|
|
1828
1835
|
showBorder: m = !0,
|
|
1829
1836
|
showCarouselControls: c,
|
|
1830
1837
|
showHeader: E,
|
|
1831
|
-
showIcon:
|
|
1838
|
+
showIcon: g,
|
|
1832
1839
|
showWithMargin: I = !0,
|
|
1833
1840
|
token: D = "",
|
|
1834
1841
|
useDarkMode: O,
|
|
1835
1842
|
userHasFullInsightFeedBeats: y,
|
|
1836
1843
|
variant: F,
|
|
1837
1844
|
visibleCardsCount: z = 1,
|
|
1838
|
-
widthOverrides:
|
|
1845
|
+
widthOverrides: R
|
|
1839
1846
|
}) => {
|
|
1847
|
+
console.log("InsightsMicroWidget", { heightOverrides: a });
|
|
1840
1848
|
const [x, U] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
|
|
1841
1849
|
u.useEffect(() => {
|
|
1842
1850
|
!V.isInitialized && !Z && (V.initialize(l, D, d).catch(() => X(!1)), X(!0));
|
|
@@ -1851,16 +1859,16 @@ const $ = u.createContext(null), Et = ({
|
|
|
1851
1859
|
heightOverrides: a,
|
|
1852
1860
|
onCardClick: p,
|
|
1853
1861
|
posthog: f,
|
|
1854
|
-
showIcon:
|
|
1862
|
+
showIcon: g,
|
|
1855
1863
|
showWithMargin: I,
|
|
1856
1864
|
useDarkMode: O,
|
|
1857
|
-
widthOverrides:
|
|
1865
|
+
widthOverrides: R
|
|
1858
1866
|
}, q = {
|
|
1859
1867
|
carouselSize: x,
|
|
1860
1868
|
variant: F,
|
|
1861
1869
|
...Q
|
|
1862
1870
|
};
|
|
1863
|
-
return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides:
|
|
1871
|
+
return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: R, children: [
|
|
1864
1872
|
!B && /* @__PURE__ */ e(wt, {}),
|
|
1865
1873
|
B && E && /* @__PURE__ */ e(
|
|
1866
1874
|
Tt,
|
|
@@ -1869,7 +1877,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1869
1877
|
clientColorScheme: r,
|
|
1870
1878
|
onCardClick: p,
|
|
1871
1879
|
posthog: f,
|
|
1872
|
-
widthOverrides:
|
|
1880
|
+
widthOverrides: R
|
|
1873
1881
|
}
|
|
1874
1882
|
),
|
|
1875
1883
|
B && !!t.length && /* @__PURE__ */ e(
|
|
@@ -1900,7 +1908,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1900
1908
|
variant: d,
|
|
1901
1909
|
widthOverrides: p
|
|
1902
1910
|
}) => {
|
|
1903
|
-
const _ = se(), { ref: C, inView: f } =
|
|
1911
|
+
const _ = se(), { ref: C, inView: f } = Se({
|
|
1904
1912
|
threshold: Ve
|
|
1905
1913
|
}), { cardsCopy: h } = k(), { onEvent: m } = Y();
|
|
1906
1914
|
oe(() => {
|
|
@@ -1909,7 +1917,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1909
1917
|
}));
|
|
1910
1918
|
}, [f]);
|
|
1911
1919
|
const c = () => {
|
|
1912
|
-
n && n(), m(
|
|
1920
|
+
n && n(), m(S.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
|
|
1913
1921
|
template: "view_more_card"
|
|
1914
1922
|
});
|
|
1915
1923
|
};
|
|
@@ -1946,6 +1954,6 @@ export {
|
|
|
1946
1954
|
re as a,
|
|
1947
1955
|
ai as b,
|
|
1948
1956
|
ft as c,
|
|
1949
|
-
|
|
1957
|
+
Rt as d,
|
|
1950
1958
|
xe as e
|
|
1951
1959
|
};
|
|
@@ -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-C5g-Jnyd.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as AppStore,
|
|
4
4
|
e as BeatCard,
|
package/dist/trends/index.es.js
CHANGED
|
@@ -19,7 +19,7 @@ import { DataGridPro as mt } from "@mui/x-data-grid-pro";
|
|
|
19
19
|
import { C as pt } from "../CurrencyText-kyC1aseI.mjs";
|
|
20
20
|
import { b as Ct } from "../Localization-2MODESHW.mjs";
|
|
21
21
|
import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
|
|
22
|
-
import { T as M, b as ft } from "../ViewMoreMicroCard-
|
|
22
|
+
import { T as M, b as ft } from "../ViewMoreMicroCard-C5g-Jnyd.mjs";
|
|
23
23
|
import { A as _, W as ke } from "../WidgetContainer-C88Ecu2W.mjs";
|
|
24
24
|
import { c as Tt } from "../Category-CevNQ03n.mjs";
|
|
25
25
|
import { a as Ne, T as He } from "../TransactionDetails-BWffqew4.mjs";
|
|
@@ -663,7 +663,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
663
663
|
const n = Ht(), { onEvent: s } = H(), { isMobile: r, isDesktop: l, isLargeDesktop: d } = $(), { beatStore: h, endpoint: c, sessionToken: u } = Te(), f = n.palette.mode === "dark", g = l || d, T = g || r ? 1 : 2, m = () => null, a = (R) => {
|
|
664
664
|
o?.(R), s(_.TRENDS_CLICK_INSIGHT, M);
|
|
665
665
|
}, y = g ? 200 : 170, p = g ? 170 : 124, E = g ? 56 : 0, w = t.length > 0 ? y + E : p, D = g && t.length > 0 ? y : void 0;
|
|
666
|
-
return /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
|
|
666
|
+
return console.log("TrendsInsights", { containerHeight: w, heightOverrides: D }), /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
|
|
667
667
|
ft,
|
|
668
668
|
{
|
|
669
669
|
areBeatsLoading: h.isLoading,
|