@mx-cartographer/experiences 7.2.3 → 7.2.5-alpha.mm0
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
|
@@ -137,7 +137,7 @@ 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,
|
|
@@ -158,7 +158,7 @@ const he = {
|
|
|
158
158
|
path: "/micro-widget",
|
|
159
159
|
value: S
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, Re = {
|
|
162
162
|
// carousel control interaction events - clicks and swipes
|
|
163
163
|
[M.ON_CAROUSEL_BACK_CLICK]: {
|
|
164
164
|
action: w.CONTROL_BACKWARD,
|
|
@@ -200,9 +200,9 @@ const he = {
|
|
|
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,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
271
271
|
title: m,
|
|
272
272
|
variant: c,
|
|
273
273
|
widthOverrides: E
|
|
274
|
-
},
|
|
275
|
-
const I = se(), [D, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y },
|
|
274
|
+
}, g) {
|
|
275
|
+
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
276
|
Ke,
|
|
277
277
|
{
|
|
278
278
|
className: "mx-micro-card-description",
|
|
@@ -305,7 +305,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
305
305
|
"aria-label": t,
|
|
306
306
|
"aria-labelledby": "divButton",
|
|
307
307
|
"aria-roledescription": "slide",
|
|
308
|
-
ref:
|
|
308
|
+
ref: g,
|
|
309
309
|
role: "group",
|
|
310
310
|
sx: {
|
|
311
311
|
height: "100%",
|
|
@@ -321,7 +321,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
321
321
|
onClick: () => _(),
|
|
322
322
|
onKeyDown: () => O(!1),
|
|
323
323
|
onKeyUp: () => O(!0),
|
|
324
|
-
ref:
|
|
324
|
+
ref: g,
|
|
325
325
|
role: "button",
|
|
326
326
|
sx: {
|
|
327
327
|
border: D ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
@@ -359,13 +359,13 @@ const $ = u.createContext(null), Et = ({
|
|
|
359
359
|
lt,
|
|
360
360
|
{
|
|
361
361
|
avatar: C && a,
|
|
362
|
-
subheader: p &&
|
|
362
|
+
subheader: p && R,
|
|
363
363
|
sx: { color: h.headerColor, p: 0 },
|
|
364
364
|
title: m,
|
|
365
365
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
366
366
|
}
|
|
367
367
|
),
|
|
368
|
-
/* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p &&
|
|
368
|
+
/* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && R }),
|
|
369
369
|
!!o && /* @__PURE__ */ e(
|
|
370
370
|
ot,
|
|
371
371
|
{
|
|
@@ -451,11 +451,11 @@ const $ = u.createContext(null), Et = ({
|
|
|
451
451
|
return i.names?.map((r, n) => {
|
|
452
452
|
t[r] = o[n];
|
|
453
453
|
}), t;
|
|
454
|
-
}) : [] : [],
|
|
454
|
+
}) : [] : [], gt = (i, o) => {
|
|
455
455
|
const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
|
|
456
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
|
-
},
|
|
458
|
-
const o = Ae(), t =
|
|
457
|
+
}, Rt = ({ beat: i }) => {
|
|
458
|
+
const o = Ae(), t = gt(i.data_series, o);
|
|
459
459
|
return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
|
|
460
460
|
}, xe = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
461
461
|
/* @__PURE__ */ e(
|
|
@@ -1240,7 +1240,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1240
1240
|
] })
|
|
1241
1241
|
] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
|
1242
1242
|
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(
|
|
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,
|
|
@@ -1294,15 +1294,15 @@ const $ = u.createContext(null), Et = ({
|
|
|
1294
1294
|
}) => {
|
|
1295
1295
|
const { ref: m, inView: c } = Me({
|
|
1296
1296
|
threshold: Ve
|
|
1297
|
-
}), { cardsCopy: E } = k(), { onEvent:
|
|
1297
|
+
}), { cardsCopy: E } = k(), { onEvent: g } = Y(), { updateBeat: I, updateOffer: D } = It();
|
|
1298
1298
|
oe(() => {
|
|
1299
|
-
c && (t.has_been_displayed ?
|
|
1299
|
+
c && (t.has_been_displayed ? g(We(t.template)) : (t.guid.startsWith("OFR") ? D({
|
|
1300
1300
|
...t,
|
|
1301
1301
|
has_been_displayed: !0
|
|
1302
1302
|
}) : I({
|
|
1303
1303
|
...t,
|
|
1304
1304
|
has_been_displayed: !0
|
|
1305
|
-
}),
|
|
1305
|
+
}), g(we(t.template))));
|
|
1306
1306
|
}, [c]), oe(() => {
|
|
1307
1307
|
if (c && t)
|
|
1308
1308
|
if (t.template === "MarketingOffer") {
|
|
@@ -1320,7 +1320,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1320
1320
|
});
|
|
1321
1321
|
}, [t, a, c]);
|
|
1322
1322
|
const O = () => {
|
|
1323
|
-
if (p && p(t),
|
|
1323
|
+
if (p && p(t), g(Te(t.template)), t.template === "MarketingOffer") {
|
|
1324
1324
|
const y = t;
|
|
1325
1325
|
_?.capture("clicked_messaging_insight", {
|
|
1326
1326
|
template: t.template,
|
|
@@ -1407,8 +1407,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1407
1407
|
)
|
|
1408
1408
|
}
|
|
1409
1409
|
),
|
|
1410
|
-
Array.from({ length: t }).map((E,
|
|
1411
|
-
const I =
|
|
1410
|
+
Array.from({ length: t }).map((E, g) => {
|
|
1411
|
+
const I = g === o;
|
|
1412
1412
|
return /* @__PURE__ */ e(
|
|
1413
1413
|
b,
|
|
1414
1414
|
{
|
|
@@ -1430,7 +1430,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1430
1430
|
width: I && d ? 24 : 8
|
|
1431
1431
|
}
|
|
1432
1432
|
},
|
|
1433
|
-
`carousel-button-${
|
|
1433
|
+
`carousel-button-${g}`
|
|
1434
1434
|
);
|
|
1435
1435
|
}),
|
|
1436
1436
|
/* @__PURE__ */ e(
|
|
@@ -1471,7 +1471,8 @@ const $ = u.createContext(null), Et = ({
|
|
|
1471
1471
|
visibleCardsCount: c = 1
|
|
1472
1472
|
// Default to 1 card visible
|
|
1473
1473
|
}) => {
|
|
1474
|
-
|
|
1474
|
+
console.log("MicroBeatCarousel", { heightOverrides: l });
|
|
1475
|
+
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
1476
|
u.useEffect(() => {
|
|
1476
1477
|
if (E.current && !o) {
|
|
1477
1478
|
const s = E.current.offsetWidth, A = 8;
|
|
@@ -1484,7 +1485,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1484
1485
|
x(N);
|
|
1485
1486
|
}
|
|
1486
1487
|
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
|
1487
|
-
const s =
|
|
1488
|
+
const s = g.current?.offsetWidth;
|
|
1488
1489
|
if (typeof s == "number" && o) {
|
|
1489
1490
|
const A = (P) => {
|
|
1490
1491
|
B(!0);
|
|
@@ -1499,23 +1500,23 @@ const $ = u.createContext(null), Et = ({
|
|
|
1499
1500
|
};
|
|
1500
1501
|
x(A(s));
|
|
1501
1502
|
const N = () => {
|
|
1502
|
-
const P =
|
|
1503
|
+
const P = g.current?.offsetWidth;
|
|
1503
1504
|
typeof P == "number" && x(A(P));
|
|
1504
1505
|
};
|
|
1505
1506
|
return window.addEventListener("resize", N), () => {
|
|
1506
1507
|
window.removeEventListener("resize", N);
|
|
1507
1508
|
};
|
|
1508
1509
|
}
|
|
1509
|
-
}, [o,
|
|
1510
|
+
}, [o, g]);
|
|
1510
1511
|
const X = () => {
|
|
1511
|
-
Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current &&
|
|
1512
|
-
left: I +
|
|
1512
|
+
Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
|
|
1513
|
+
left: I + R + 8,
|
|
1513
1514
|
top: 0,
|
|
1514
1515
|
behavior: "smooth"
|
|
1515
1516
|
});
|
|
1516
1517
|
}, le = () => {
|
|
1517
|
-
Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current &&
|
|
1518
|
-
left: Math.max(0, I - (
|
|
1518
|
+
Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
|
|
1519
|
+
left: Math.max(0, I - (R + 8)),
|
|
1519
1520
|
top: 0,
|
|
1520
1521
|
behavior: "smooth"
|
|
1521
1522
|
});
|
|
@@ -1535,13 +1536,13 @@ const $ = u.createContext(null), Et = ({
|
|
|
1535
1536
|
posthog: d,
|
|
1536
1537
|
showIcon: C,
|
|
1537
1538
|
variant: h
|
|
1538
|
-
}, ae =
|
|
1539
|
+
}, ae = R ? Math.round(I / (R + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
|
1539
1540
|
return /* @__PURE__ */ v(
|
|
1540
1541
|
K,
|
|
1541
1542
|
{
|
|
1542
1543
|
"aria-label": j.carousel_title,
|
|
1543
1544
|
"aria-roledescription": "carousel",
|
|
1544
|
-
ref:
|
|
1545
|
+
ref: g,
|
|
1545
1546
|
role: "group/region",
|
|
1546
1547
|
sx: {
|
|
1547
1548
|
alignItems: "center",
|
|
@@ -1591,7 +1592,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1591
1592
|
index: A,
|
|
1592
1593
|
isActiveCard: A === ae,
|
|
1593
1594
|
onCardClick: a,
|
|
1594
|
-
widthOverrides:
|
|
1595
|
+
widthOverrides: R || void 0,
|
|
1595
1596
|
...ue
|
|
1596
1597
|
},
|
|
1597
1598
|
`${s.guid} ${A}`
|
|
@@ -1602,7 +1603,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1602
1603
|
{
|
|
1603
1604
|
isActiveCard: ae === t.length,
|
|
1604
1605
|
onCardClick: a,
|
|
1605
|
-
widthOverrides:
|
|
1606
|
+
widthOverrides: R || void 0,
|
|
1606
1607
|
...ue
|
|
1607
1608
|
}
|
|
1608
1609
|
)
|
|
@@ -1682,6 +1683,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1682
1683
|
widthOverrides: o,
|
|
1683
1684
|
children: t
|
|
1684
1685
|
}) => {
|
|
1686
|
+
console.log("MicroWidgetContainer", { heightOverrides: i });
|
|
1685
1687
|
const { carouselCopy: r } = k();
|
|
1686
1688
|
return /* @__PURE__ */ e(
|
|
1687
1689
|
b,
|
|
@@ -1828,15 +1830,16 @@ const $ = u.createContext(null), Et = ({
|
|
|
1828
1830
|
showBorder: m = !0,
|
|
1829
1831
|
showCarouselControls: c,
|
|
1830
1832
|
showHeader: E,
|
|
1831
|
-
showIcon:
|
|
1833
|
+
showIcon: g,
|
|
1832
1834
|
showWithMargin: I = !0,
|
|
1833
1835
|
token: D = "",
|
|
1834
1836
|
useDarkMode: O,
|
|
1835
1837
|
userHasFullInsightFeedBeats: y,
|
|
1836
1838
|
variant: F,
|
|
1837
1839
|
visibleCardsCount: z = 1,
|
|
1838
|
-
widthOverrides:
|
|
1840
|
+
widthOverrides: R
|
|
1839
1841
|
}) => {
|
|
1842
|
+
console.log("InsightsMicroWidget", { heightOverrides: a });
|
|
1840
1843
|
const [x, U] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
|
|
1841
1844
|
u.useEffect(() => {
|
|
1842
1845
|
!V.isInitialized && !Z && (V.initialize(l, D, d).catch(() => X(!1)), X(!0));
|
|
@@ -1851,16 +1854,16 @@ const $ = u.createContext(null), Et = ({
|
|
|
1851
1854
|
heightOverrides: a,
|
|
1852
1855
|
onCardClick: p,
|
|
1853
1856
|
posthog: f,
|
|
1854
|
-
showIcon:
|
|
1857
|
+
showIcon: g,
|
|
1855
1858
|
showWithMargin: I,
|
|
1856
1859
|
useDarkMode: O,
|
|
1857
|
-
widthOverrides:
|
|
1860
|
+
widthOverrides: R
|
|
1858
1861
|
}, q = {
|
|
1859
1862
|
carouselSize: x,
|
|
1860
1863
|
variant: F,
|
|
1861
1864
|
...Q
|
|
1862
1865
|
};
|
|
1863
|
-
return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides:
|
|
1866
|
+
return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: R, children: [
|
|
1864
1867
|
!B && /* @__PURE__ */ e(wt, {}),
|
|
1865
1868
|
B && E && /* @__PURE__ */ e(
|
|
1866
1869
|
Tt,
|
|
@@ -1869,7 +1872,7 @@ const $ = u.createContext(null), Et = ({
|
|
|
1869
1872
|
clientColorScheme: r,
|
|
1870
1873
|
onCardClick: p,
|
|
1871
1874
|
posthog: f,
|
|
1872
|
-
widthOverrides:
|
|
1875
|
+
widthOverrides: R
|
|
1873
1876
|
}
|
|
1874
1877
|
),
|
|
1875
1878
|
B && !!t.length && /* @__PURE__ */ e(
|
|
@@ -1946,6 +1949,6 @@ export {
|
|
|
1946
1949
|
re as a,
|
|
1947
1950
|
ai as b,
|
|
1948
1951
|
ft as c,
|
|
1949
|
-
|
|
1952
|
+
Rt as d,
|
|
1950
1953
|
xe as e
|
|
1951
1954
|
};
|
|
@@ -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-BxRNJMMm.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-BxRNJMMm.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,
|