@mx-cartographer/experiences 7.0.66 → 7.1.0
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
|
@@ -11,12 +11,12 @@ import _e from "@mui/material/IconButton";
|
|
|
11
11
|
import { useTheme as ze } from "@mui/material/styles";
|
|
12
12
|
import { useInView as Ae } from "react-intersection-observer";
|
|
13
13
|
import { P as Ke, CategoryIcon as $e, useTokens as Oe, MerchantLogo as Ye, Icon as ie } from "@mxenabled/mxui";
|
|
14
|
-
import
|
|
14
|
+
import de from "@mui/material/styles/useTheme";
|
|
15
15
|
import { b as je } from "./Category-CevNQ03n.mjs";
|
|
16
16
|
import { css as Xe } from "@mxenabled/cssinjs";
|
|
17
17
|
import { b as Qe } from "./Localization-2MODESHW.mjs";
|
|
18
18
|
import qe from "@mui/material/CircularProgress";
|
|
19
|
-
import { makeAutoObservable as
|
|
19
|
+
import { makeAutoObservable as se, runInAction as Te } from "mobx";
|
|
20
20
|
import { G as Ce, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.mjs";
|
|
21
21
|
import { B as fe } from "./BeatApi-DhJpgCLz.mjs";
|
|
22
22
|
import it from "@mui/material/Card";
|
|
@@ -32,7 +32,7 @@ class nt {
|
|
|
32
32
|
namespace = "experiences";
|
|
33
33
|
translationKey = "micro_insights";
|
|
34
34
|
constructor() {
|
|
35
|
-
|
|
35
|
+
se(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
|
|
@@ -97,7 +97,7 @@ const he = {
|
|
|
97
97
|
}
|
|
98
98
|
}),
|
|
99
99
|
{}
|
|
100
|
-
),
|
|
100
|
+
), dt = () => Object.values(he).reduce(
|
|
101
101
|
(i, o) => ({
|
|
102
102
|
...i,
|
|
103
103
|
[xe(o)]: {
|
|
@@ -199,26 +199,26 @@ const he = {
|
|
|
199
199
|
},
|
|
200
200
|
...at(),
|
|
201
201
|
...ct(),
|
|
202
|
-
...
|
|
202
|
+
...dt()
|
|
203
203
|
}, ye = async (i, o) => !o || !Ie[i] ? null : o.sendAnalyticEvent(Ie[i]).then((t) => t).catch((t) => {
|
|
204
204
|
throw t;
|
|
205
205
|
}), ve = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
|
|
206
206
|
throw t;
|
|
207
207
|
});
|
|
208
|
-
class
|
|
208
|
+
class st {
|
|
209
209
|
onAnalyticEvent = ye;
|
|
210
210
|
onAnalyticPageView = ve;
|
|
211
211
|
beatApi = new fe("/", "");
|
|
212
212
|
constructor() {
|
|
213
|
-
|
|
213
|
+
se(this);
|
|
214
214
|
}
|
|
215
215
|
initialize = async (o, t, r) => {
|
|
216
|
-
this.onAnalyticEvent = (
|
|
217
|
-
ye(
|
|
216
|
+
this.onAnalyticEvent = (n, l) => {
|
|
217
|
+
ye(n, l).then((a) => a).catch((a) => {
|
|
218
218
|
throw a.status === 401 && r(), a;
|
|
219
219
|
});
|
|
220
|
-
}, this.onAnalyticPageView = (
|
|
221
|
-
ve(
|
|
220
|
+
}, this.onAnalyticPageView = (n, l) => {
|
|
221
|
+
ve(n, l).then((a) => a).catch((a) => {
|
|
222
222
|
throw a.status === 401 && r(), a;
|
|
223
223
|
});
|
|
224
224
|
}, this.beatApi = new fe(o, t);
|
|
@@ -238,13 +238,13 @@ class ht {
|
|
|
238
238
|
token = "";
|
|
239
239
|
isInitialized = !1;
|
|
240
240
|
constructor() {
|
|
241
|
-
this.copyStore = new nt(), this.insightsMicroWidgetStore = new
|
|
241
|
+
this.copyStore = new nt(), this.insightsMicroWidgetStore = new st(), se(this);
|
|
242
242
|
}
|
|
243
243
|
initialize = async (o, t, r) => {
|
|
244
244
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
|
|
245
|
-
const
|
|
245
|
+
const n = await Je(o, t, "1.0.0", "Micro Insights Carousel");
|
|
246
246
|
Te(() => {
|
|
247
|
-
this.session =
|
|
247
|
+
this.session = n, this.isInitialized = !0;
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
250
|
}
|
|
@@ -258,10 +258,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
258
258
|
actionText: o,
|
|
259
259
|
ariaLabel: t,
|
|
260
260
|
backgroundColor: r,
|
|
261
|
-
description:
|
|
262
|
-
heightOverrides:
|
|
261
|
+
description: n,
|
|
262
|
+
heightOverrides: l,
|
|
263
263
|
icon: a,
|
|
264
|
-
isActiveCard:
|
|
264
|
+
isActiveCard: s,
|
|
265
265
|
isZeroState: p,
|
|
266
266
|
onCardClick: _ = () => {
|
|
267
267
|
},
|
|
@@ -272,7 +272,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
272
272
|
variant: c,
|
|
273
273
|
widthOverrides: E
|
|
274
274
|
}, g) {
|
|
275
|
-
const I =
|
|
275
|
+
const I = de(), [x, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, R = /* @__PURE__ */ e(
|
|
276
276
|
Ke,
|
|
277
277
|
{
|
|
278
278
|
className: "mx-micro-card-description",
|
|
@@ -289,10 +289,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
289
289
|
WebkitLineClamp: 2,
|
|
290
290
|
wordWrap: "break-word"
|
|
291
291
|
},
|
|
292
|
-
children:
|
|
292
|
+
children: n && /* @__PURE__ */ e(
|
|
293
293
|
"span",
|
|
294
294
|
{
|
|
295
|
-
dangerouslySetInnerHTML: { __html:
|
|
295
|
+
dangerouslySetInnerHTML: { __html: n },
|
|
296
296
|
style: { fontFamily: I.typography.fontFamily }
|
|
297
297
|
}
|
|
298
298
|
)
|
|
@@ -301,7 +301,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
301
301
|
return /* @__PURE__ */ e(
|
|
302
302
|
U,
|
|
303
303
|
{
|
|
304
|
-
"aria-hidden": !
|
|
304
|
+
"aria-hidden": !s,
|
|
305
305
|
"aria-label": t,
|
|
306
306
|
"aria-labelledby": "divButton",
|
|
307
307
|
"aria-roledescription": "slide",
|
|
@@ -315,7 +315,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
315
315
|
children: /* @__PURE__ */ e(
|
|
316
316
|
U,
|
|
317
317
|
{
|
|
318
|
-
"aria-hidden": !
|
|
318
|
+
"aria-hidden": !s,
|
|
319
319
|
"aria-label": t,
|
|
320
320
|
id: "divButton",
|
|
321
321
|
onClick: () => _(),
|
|
@@ -328,7 +328,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
328
328
|
borderRadius: "8px",
|
|
329
329
|
height: "100%"
|
|
330
330
|
},
|
|
331
|
-
tabIndex:
|
|
331
|
+
tabIndex: s ? 0 : -1,
|
|
332
332
|
children: /* @__PURE__ */ e(
|
|
333
333
|
it,
|
|
334
334
|
{
|
|
@@ -338,7 +338,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
338
338
|
sx: {
|
|
339
339
|
backgroundColor: r,
|
|
340
340
|
cursor: "pointer",
|
|
341
|
-
height:
|
|
341
|
+
height: l ? "100%" : 124,
|
|
342
342
|
p: 16,
|
|
343
343
|
...z,
|
|
344
344
|
"& .MuiCardHeader-avatar": {
|
|
@@ -425,8 +425,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
425
425
|
height: o,
|
|
426
426
|
size: t = 16,
|
|
427
427
|
styles: r,
|
|
428
|
-
viewBox:
|
|
429
|
-
width:
|
|
428
|
+
viewBox: n = "0 0 16 16",
|
|
429
|
+
width: l
|
|
430
430
|
}) => /* @__PURE__ */ e(
|
|
431
431
|
"svg",
|
|
432
432
|
{
|
|
@@ -435,8 +435,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
435
435
|
focusable: !1,
|
|
436
436
|
height: o || t,
|
|
437
437
|
style: r,
|
|
438
|
-
viewBox:
|
|
439
|
-
width:
|
|
438
|
+
viewBox: n,
|
|
439
|
+
width: l || t,
|
|
440
440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
441
441
|
children: /* @__PURE__ */ e(
|
|
442
442
|
"path",
|
|
@@ -448,12 +448,12 @@ const $ = u.createContext(null), Et = ({
|
|
|
448
448
|
}
|
|
449
449
|
), mt = (i) => i ? i.data ? i.data.map((o) => {
|
|
450
450
|
const t = {};
|
|
451
|
-
return i.names?.map((r,
|
|
452
|
-
t[r] = o[
|
|
451
|
+
return i.names?.map((r, n) => {
|
|
452
|
+
t[r] = o[n];
|
|
453
453
|
}), t;
|
|
454
454
|
}) : [] : [], gt = (i, o) => {
|
|
455
|
-
const t = mt(i), r = t.length / 2,
|
|
456
|
-
return !
|
|
455
|
+
const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
|
|
456
|
+
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
457
|
}, Rt = ({ beat: i }) => {
|
|
458
458
|
const o = Oe(), t = gt(i.data_series, o);
|
|
459
459
|
return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
|
|
@@ -1239,14 +1239,14 @@ const $ = u.createContext(null), Et = ({
|
|
|
1239
1239
|
)
|
|
1240
1240
|
] })
|
|
1241
1241
|
] }), Se = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
|
1242
|
-
const
|
|
1243
|
-
return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t ||
|
|
1242
|
+
const n = de(), 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(Rt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
|
|
1244
1244
|
ie,
|
|
1245
1245
|
{
|
|
1246
1246
|
fill: !0,
|
|
1247
1247
|
name: "info",
|
|
1248
1248
|
sx: {
|
|
1249
|
-
color:
|
|
1249
|
+
color: l
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
1252
|
);
|
|
@@ -1282,10 +1282,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
1282
1282
|
backgroundColor: o,
|
|
1283
1283
|
beat: t,
|
|
1284
1284
|
clientColorScheme: r,
|
|
1285
|
-
showCTAColocatedWithText:
|
|
1286
|
-
heightOverrides:
|
|
1285
|
+
showCTAColocatedWithText: n = !0,
|
|
1286
|
+
heightOverrides: l,
|
|
1287
1287
|
index: a,
|
|
1288
|
-
isActiveCard:
|
|
1288
|
+
isActiveCard: s,
|
|
1289
1289
|
onCardClick: p,
|
|
1290
1290
|
posthog: _,
|
|
1291
1291
|
showIcon: C,
|
|
@@ -1342,7 +1342,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1342
1342
|
backgroundColor: o,
|
|
1343
1343
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1344
1344
|
fontColors: { buttonColor: r?.primary_300 },
|
|
1345
|
-
heightOverrides:
|
|
1345
|
+
heightOverrides: l,
|
|
1346
1346
|
icon: Se && /* @__PURE__ */ e(
|
|
1347
1347
|
Se,
|
|
1348
1348
|
{
|
|
@@ -1352,11 +1352,11 @@ const $ = u.createContext(null), Et = ({
|
|
|
1352
1352
|
type: t?.icon_type
|
|
1353
1353
|
}
|
|
1354
1354
|
),
|
|
1355
|
-
isActiveCard:
|
|
1355
|
+
isActiveCard: s,
|
|
1356
1356
|
onCardClick: O,
|
|
1357
1357
|
posthog: _,
|
|
1358
1358
|
ref: m,
|
|
1359
|
-
showCTAColocatedWithText:
|
|
1359
|
+
showCTAColocatedWithText: n,
|
|
1360
1360
|
showIcon: C,
|
|
1361
1361
|
title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
|
|
1362
1362
|
variant: f,
|
|
@@ -1368,13 +1368,13 @@ const $ = u.createContext(null), Et = ({
|
|
|
1368
1368
|
currentBeatIndex: o,
|
|
1369
1369
|
numBeats: t,
|
|
1370
1370
|
onNextClick: r,
|
|
1371
|
-
onPreviousClick:
|
|
1372
|
-
scrollRightBoundary:
|
|
1371
|
+
onPreviousClick: n,
|
|
1372
|
+
scrollRightBoundary: l,
|
|
1373
1373
|
scrollX: a,
|
|
1374
|
-
shouldApplyNewAnimation:
|
|
1374
|
+
shouldApplyNewAnimation: s = !1,
|
|
1375
1375
|
visibleCardsCount: p = 1
|
|
1376
1376
|
}) => {
|
|
1377
|
-
const _ = ze(), { carouselCopy: C } = k(), f = Math.floor(a) >
|
|
1377
|
+
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;
|
|
1378
1378
|
return /* @__PURE__ */ v(
|
|
1379
1379
|
K,
|
|
1380
1380
|
{
|
|
@@ -1396,7 +1396,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1396
1396
|
"aria-disabled": f,
|
|
1397
1397
|
"aria-label": C.previous_insight_cta_aria,
|
|
1398
1398
|
disabled: f,
|
|
1399
|
-
onClick:
|
|
1399
|
+
onClick: n,
|
|
1400
1400
|
children: /* @__PURE__ */ e(
|
|
1401
1401
|
be,
|
|
1402
1402
|
{
|
|
@@ -1418,7 +1418,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1418
1418
|
height: 8,
|
|
1419
1419
|
mr: 8,
|
|
1420
1420
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
1421
|
-
...
|
|
1421
|
+
...s ? {
|
|
1422
1422
|
borderRadius: "4px",
|
|
1423
1423
|
transformOrigin: "center",
|
|
1424
1424
|
transition: "all 0.5s ease-out",
|
|
@@ -1427,7 +1427,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1427
1427
|
borderRadius: "50%",
|
|
1428
1428
|
p: 0
|
|
1429
1429
|
},
|
|
1430
|
-
width: I &&
|
|
1430
|
+
width: I && s ? 24 : 8
|
|
1431
1431
|
}
|
|
1432
1432
|
},
|
|
1433
1433
|
`carousel-button-${g}`
|
|
@@ -1458,10 +1458,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
1458
1458
|
allowSingleCardPeeking: o = !1,
|
|
1459
1459
|
beats: t = [],
|
|
1460
1460
|
clientColorScheme: r,
|
|
1461
|
-
showCTAColocatedWithText:
|
|
1462
|
-
heightOverrides:
|
|
1461
|
+
showCTAColocatedWithText: n,
|
|
1462
|
+
heightOverrides: l,
|
|
1463
1463
|
onCardClick: a,
|
|
1464
|
-
posthog:
|
|
1464
|
+
posthog: s,
|
|
1465
1465
|
shouldApplyNewAnimation: p = !1,
|
|
1466
1466
|
showCarouselControls: _,
|
|
1467
1467
|
showIcon: C,
|
|
@@ -1474,18 +1474,18 @@ const $ = u.createContext(null), Et = ({
|
|
|
1474
1474
|
const E = u.useRef(null), g = u.useRef(null), [I, x] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [R, D] = u.useState(null), [b, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
|
|
1475
1475
|
u.useEffect(() => {
|
|
1476
1476
|
if (E.current && !o) {
|
|
1477
|
-
const
|
|
1477
|
+
const d = E.current.offsetWidth, A = 8;
|
|
1478
1478
|
let N;
|
|
1479
1479
|
if (c > 1) {
|
|
1480
|
-
const J = (
|
|
1481
|
-
N = (
|
|
1480
|
+
const J = (d - (c - 1) * A) / c / 3;
|
|
1481
|
+
N = (d - J - (c - 1) * A) / c;
|
|
1482
1482
|
} else
|
|
1483
|
-
N =
|
|
1483
|
+
N = d;
|
|
1484
1484
|
D(N);
|
|
1485
1485
|
}
|
|
1486
1486
|
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
|
1487
|
-
const
|
|
1488
|
-
if (typeof
|
|
1487
|
+
const d = g.current?.offsetWidth;
|
|
1488
|
+
if (typeof d == "number" && o) {
|
|
1489
1489
|
const A = (P) => {
|
|
1490
1490
|
B(!0);
|
|
1491
1491
|
const ee = [
|
|
@@ -1497,7 +1497,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1497
1497
|
].find((ce) => P <= ce.maxWidth);
|
|
1498
1498
|
return ee ? ee.cardWidth : 750;
|
|
1499
1499
|
};
|
|
1500
|
-
D(A(
|
|
1500
|
+
D(A(d));
|
|
1501
1501
|
const N = () => {
|
|
1502
1502
|
const P = g.current?.offsetWidth;
|
|
1503
1503
|
typeof P == "number" && D(A(P));
|
|
@@ -1524,15 +1524,15 @@ const $ = u.createContext(null), Et = ({
|
|
|
1524
1524
|
}, Q = () => {
|
|
1525
1525
|
if (!F || !O) return;
|
|
1526
1526
|
F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1527
|
-
}, q = (
|
|
1528
|
-
y(
|
|
1529
|
-
}, L = (
|
|
1530
|
-
y(null), z(
|
|
1527
|
+
}, q = (d) => {
|
|
1528
|
+
y(d.targetTouches[0].clientX);
|
|
1529
|
+
}, L = (d) => {
|
|
1530
|
+
y(null), z(d.targetTouches[0].clientX);
|
|
1531
1531
|
}, ue = {
|
|
1532
1532
|
clientColorScheme: r,
|
|
1533
|
-
showCTAColocatedWithText:
|
|
1534
|
-
heightOverrides:
|
|
1535
|
-
posthog:
|
|
1533
|
+
showCTAColocatedWithText: n,
|
|
1534
|
+
heightOverrides: l,
|
|
1535
|
+
posthog: s,
|
|
1536
1536
|
showIcon: C,
|
|
1537
1537
|
variant: h
|
|
1538
1538
|
}, ae = R ? Math.round(I / (R + 8)) : 0, Be = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
@@ -1546,7 +1546,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1546
1546
|
sx: {
|
|
1547
1547
|
alignItems: "center",
|
|
1548
1548
|
boxSizing: "border-box",
|
|
1549
|
-
height:
|
|
1549
|
+
height: l,
|
|
1550
1550
|
width: m || "100%"
|
|
1551
1551
|
},
|
|
1552
1552
|
children: [
|
|
@@ -1561,7 +1561,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1561
1561
|
ref: E,
|
|
1562
1562
|
sx: {
|
|
1563
1563
|
alignItems: "center",
|
|
1564
|
-
height:
|
|
1564
|
+
height: l && "100%",
|
|
1565
1565
|
gap: 8,
|
|
1566
1566
|
listStyleType: "none",
|
|
1567
1567
|
m: 0,
|
|
@@ -1577,24 +1577,24 @@ const $ = u.createContext(null), Et = ({
|
|
|
1577
1577
|
}
|
|
1578
1578
|
},
|
|
1579
1579
|
children: [
|
|
1580
|
-
t.map((
|
|
1580
|
+
t.map((d, A) => {
|
|
1581
1581
|
const N = A + 1, P = t.length + 1, J = Qe(
|
|
1582
1582
|
j.card_position_in_carousel_aria,
|
|
1583
1583
|
N.toString(),
|
|
1584
1584
|
P.toString()
|
|
1585
|
-
), ee =
|
|
1585
|
+
), ee = d.micro_title && d.micro_title.length > 0, ce = d.micro_description && d.micro_description.length > 0, Ze = ee ? d.micro_title : d.title, Pe = ce ? d.micro_description : d.description;
|
|
1586
1586
|
return /* @__PURE__ */ e(
|
|
1587
1587
|
vt,
|
|
1588
1588
|
{
|
|
1589
1589
|
ariaLabel: `${J}: ${Ze}, ${Pe}`,
|
|
1590
|
-
beat:
|
|
1590
|
+
beat: d,
|
|
1591
1591
|
index: A,
|
|
1592
1592
|
isActiveCard: A === ae,
|
|
1593
1593
|
onCardClick: a,
|
|
1594
1594
|
widthOverrides: R || void 0,
|
|
1595
1595
|
...ue
|
|
1596
1596
|
},
|
|
1597
|
-
`${
|
|
1597
|
+
`${d.guid} ${A}`
|
|
1598
1598
|
);
|
|
1599
1599
|
}),
|
|
1600
1600
|
/* @__PURE__ */ e(
|
|
@@ -1631,12 +1631,12 @@ const $ = u.createContext(null), Et = ({
|
|
|
1631
1631
|
clientColorScheme: o,
|
|
1632
1632
|
onCardClick: t,
|
|
1633
1633
|
posthog: r,
|
|
1634
|
-
widthOverrides:
|
|
1634
|
+
widthOverrides: n
|
|
1635
1635
|
}) => {
|
|
1636
|
-
const { carouselCopy:
|
|
1636
|
+
const { carouselCopy: l } = k(), { onEvent: a } = Y(), s = () => {
|
|
1637
1637
|
a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
|
|
1638
1638
|
};
|
|
1639
|
-
return
|
|
1639
|
+
return l ? /* @__PURE__ */ v(
|
|
1640
1640
|
K,
|
|
1641
1641
|
{
|
|
1642
1642
|
alignItems: "center",
|
|
@@ -1644,8 +1644,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1644
1644
|
justifyContent: "space-between",
|
|
1645
1645
|
spacing: 2,
|
|
1646
1646
|
sx: {
|
|
1647
|
-
padding:
|
|
1648
|
-
width:
|
|
1647
|
+
padding: 16,
|
|
1648
|
+
width: n || void 0
|
|
1649
1649
|
},
|
|
1650
1650
|
children: [
|
|
1651
1651
|
/* @__PURE__ */ e(
|
|
@@ -1657,13 +1657,13 @@ const $ = u.createContext(null), Et = ({
|
|
|
1657
1657
|
lineHeight: "24px"
|
|
1658
1658
|
},
|
|
1659
1659
|
variant: "h3",
|
|
1660
|
-
children:
|
|
1660
|
+
children: l.carousel_title
|
|
1661
1661
|
}
|
|
1662
1662
|
),
|
|
1663
1663
|
/* @__PURE__ */ v(
|
|
1664
1664
|
Ge,
|
|
1665
1665
|
{
|
|
1666
|
-
onClick:
|
|
1666
|
+
onClick: s,
|
|
1667
1667
|
sx: {
|
|
1668
1668
|
display: "flex",
|
|
1669
1669
|
alignItems: "center",
|
|
@@ -1686,7 +1686,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1686
1686
|
lineHeight: "20px"
|
|
1687
1687
|
},
|
|
1688
1688
|
variant: "body1",
|
|
1689
|
-
children:
|
|
1689
|
+
children: l.view_all_insights_in_full_feed_cta_aria
|
|
1690
1690
|
}
|
|
1691
1691
|
),
|
|
1692
1692
|
/* @__PURE__ */ e(Me, { sx: { color: o?.primary_300, ml: "8px" } })
|
|
@@ -1722,10 +1722,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
1722
1722
|
carouselSize: o,
|
|
1723
1723
|
clientColorScheme: t,
|
|
1724
1724
|
heightOverrides: r,
|
|
1725
|
-
onCardClick:
|
|
1726
|
-
posthog:
|
|
1725
|
+
onCardClick: n,
|
|
1726
|
+
posthog: l,
|
|
1727
1727
|
showIcon: a,
|
|
1728
|
-
showWithMargin:
|
|
1728
|
+
showWithMargin: s,
|
|
1729
1729
|
variant: p,
|
|
1730
1730
|
widthOverrides: _
|
|
1731
1731
|
}) => {
|
|
@@ -1734,7 +1734,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1734
1734
|
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1735
1735
|
}, []);
|
|
1736
1736
|
const m = () => {
|
|
1737
|
-
|
|
1737
|
+
n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1738
1738
|
template: "no_relevant_insights"
|
|
1739
1739
|
});
|
|
1740
1740
|
};
|
|
@@ -1749,14 +1749,14 @@ const $ = u.createContext(null), Et = ({
|
|
|
1749
1749
|
icon: /* @__PURE__ */ e(Le, {}),
|
|
1750
1750
|
isZeroState: !0,
|
|
1751
1751
|
onCardClick: m,
|
|
1752
|
-
posthog:
|
|
1752
|
+
posthog: l,
|
|
1753
1753
|
showIcon: a,
|
|
1754
1754
|
style: {
|
|
1755
1755
|
cardStyle: {
|
|
1756
1756
|
card: {
|
|
1757
1757
|
height: `calc(${Ve[o]}px - 44px)`,
|
|
1758
1758
|
m: "0 auto",
|
|
1759
|
-
width:
|
|
1759
|
+
width: s ? "calc(100% - 32px)" : "100%"
|
|
1760
1760
|
},
|
|
1761
1761
|
description: {
|
|
1762
1762
|
WebkitLineClamp: 4
|
|
@@ -1776,10 +1776,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
1776
1776
|
carouselSize: o,
|
|
1777
1777
|
heightOverrides: t,
|
|
1778
1778
|
onCardClick: r,
|
|
1779
|
-
posthog:
|
|
1780
|
-
showIcon:
|
|
1779
|
+
posthog: n,
|
|
1780
|
+
showIcon: l,
|
|
1781
1781
|
showWithMargin: a,
|
|
1782
|
-
variant:
|
|
1782
|
+
variant: s,
|
|
1783
1783
|
widthOverrides: p
|
|
1784
1784
|
}) => {
|
|
1785
1785
|
const { onPageview: _ } = Ne(), { zeroStateCopy: C } = k();
|
|
@@ -1794,8 +1794,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1794
1794
|
icon: /* @__PURE__ */ e(Le, {}),
|
|
1795
1795
|
isZeroState: !0,
|
|
1796
1796
|
onCardClick: r,
|
|
1797
|
-
posthog:
|
|
1798
|
-
showIcon:
|
|
1797
|
+
posthog: n,
|
|
1798
|
+
showIcon: l,
|
|
1799
1799
|
style: {
|
|
1800
1800
|
cardStyle: {
|
|
1801
1801
|
card: {
|
|
@@ -1809,7 +1809,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1809
1809
|
}
|
|
1810
1810
|
},
|
|
1811
1811
|
title: C.carousel_zero_state_title,
|
|
1812
|
-
variant:
|
|
1812
|
+
variant: s,
|
|
1813
1813
|
widthOverrides: p
|
|
1814
1814
|
}
|
|
1815
1815
|
);
|
|
@@ -1832,10 +1832,10 @@ const $ = u.createContext(null), Et = ({
|
|
|
1832
1832
|
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1833
1833
|
clientColorScheme: r,
|
|
1834
1834
|
// Allows certain icons, view all and read more button to reflect the clients color scheme. Currently only supports primary_300
|
|
1835
|
-
showCTAColocatedWithText:
|
|
1836
|
-
endpoint:
|
|
1835
|
+
showCTAColocatedWithText: n = !0,
|
|
1836
|
+
endpoint: l = "/",
|
|
1837
1837
|
heightOverrides: a,
|
|
1838
|
-
logOutUser:
|
|
1838
|
+
logOutUser: s,
|
|
1839
1839
|
onCardClick: p = () => {
|
|
1840
1840
|
},
|
|
1841
1841
|
onEvent: _ = () => {
|
|
@@ -1858,15 +1858,15 @@ const $ = u.createContext(null), Et = ({
|
|
|
1858
1858
|
}) => {
|
|
1859
1859
|
const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
|
|
1860
1860
|
u.useEffect(() => {
|
|
1861
|
-
!V.isInitialized && !Z && (V.initialize(
|
|
1862
|
-
}, [
|
|
1861
|
+
!V.isInitialized && !Z && (V.initialize(l, x, s).catch(() => X(!1)), X(!0));
|
|
1862
|
+
}, [l, x, s, V.isInitialized, Z]), u.useEffect(() => {
|
|
1863
1863
|
const L = window.innerHeight;
|
|
1864
1864
|
L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
|
|
1865
1865
|
}, [window.innerHeight]), u.useEffect(() => {
|
|
1866
1866
|
j(!o && V.isInitialized);
|
|
1867
1867
|
}, [o, V.isInitialized]);
|
|
1868
1868
|
const Q = {
|
|
1869
|
-
showCTAColocatedWithText:
|
|
1869
|
+
showCTAColocatedWithText: n,
|
|
1870
1870
|
heightOverrides: a,
|
|
1871
1871
|
onCardClick: p,
|
|
1872
1872
|
posthog: f,
|
|
@@ -1913,22 +1913,22 @@ const $ = u.createContext(null), Et = ({
|
|
|
1913
1913
|
ariaLabel: o,
|
|
1914
1914
|
clientColorScheme: t,
|
|
1915
1915
|
heightOverrides: r,
|
|
1916
|
-
onCardClick:
|
|
1917
|
-
posthog:
|
|
1916
|
+
onCardClick: n,
|
|
1917
|
+
posthog: l,
|
|
1918
1918
|
showIcon: a,
|
|
1919
|
-
variant:
|
|
1919
|
+
variant: s,
|
|
1920
1920
|
widthOverrides: p
|
|
1921
1921
|
}) => {
|
|
1922
|
-
const _ =
|
|
1922
|
+
const _ = de(), { ref: C, inView: f } = Ae({
|
|
1923
1923
|
threshold: He
|
|
1924
1924
|
}), { cardsCopy: h } = k(), { onEvent: m } = Y();
|
|
1925
1925
|
oe(() => {
|
|
1926
|
-
f && (m(De.ON_VIEW_MORE_VIEWED),
|
|
1926
|
+
f && (m(De.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
|
|
1927
1927
|
template: "view_more_card"
|
|
1928
1928
|
}));
|
|
1929
1929
|
}, [f]);
|
|
1930
1930
|
const c = () => {
|
|
1931
|
-
|
|
1931
|
+
n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
|
|
1932
1932
|
template: "view_more_card"
|
|
1933
1933
|
});
|
|
1934
1934
|
};
|
|
@@ -1943,11 +1943,11 @@ const $ = u.createContext(null), Et = ({
|
|
|
1943
1943
|
icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? _.palette.primary.main }),
|
|
1944
1944
|
isActiveCard: i,
|
|
1945
1945
|
onCardClick: c,
|
|
1946
|
-
posthog:
|
|
1946
|
+
posthog: l,
|
|
1947
1947
|
ref: C,
|
|
1948
1948
|
showIcon: a,
|
|
1949
1949
|
title: h.view_more_card_title,
|
|
1950
|
-
variant:
|
|
1950
|
+
variant: s,
|
|
1951
1951
|
widthOverrides: p
|
|
1952
1952
|
}
|
|
1953
1953
|
);
|
|
@@ -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-DTtQNV3D.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 ut } from "@mui/x-data-grid-pro";
|
|
|
19
19
|
import { C as gt } from "../CurrencyText-kyC1aseI.mjs";
|
|
20
20
|
import { b as mt } from "../Localization-2MODESHW.mjs";
|
|
21
21
|
import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
|
|
22
|
-
import { T as A, b as pt } from "../ViewMoreMicroCard-
|
|
22
|
+
import { T as A, b as pt } from "../ViewMoreMicroCard-DTtQNV3D.mjs";
|
|
23
23
|
import { A as y, W as ke } from "../WidgetContainer-B8MRJ5Y1.mjs";
|
|
24
24
|
import { c as Ct } from "../Category-CevNQ03n.mjs";
|
|
25
25
|
import { a as Ne, T as He } from "../TransactionDetails-B2Z5S7FM.mjs";
|