@mx-cartographer/experiences 7.2.5-alpha.mm1 → 7.2.5-alpha.mm3

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 Me } from "@mxenabled/mx-icons";
8
- import { L as be } from "./Loader-DUaFpDGv.mjs";
9
- import b from "@mui/material/Box";
7
+ import { ChevronLeft as be, ChevronRight as Se } from "@mxenabled/mx-icons";
8
+ import { L as Ue } from "./Loader-DUaFpDGv.mjs";
9
+ import U 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 Se } from "react-intersection-observer";
12
+ import { useInView as Me } 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
- }, M = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
76
+ }, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
77
77
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
78
78
  }, Te = (i) => `on${i}Click`, We = (i) => `on${i}View`, we = (i) => `on${i}ViewFirstTime`, Ee = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(he).reduce(
79
79
  (i, o) => ({
@@ -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: M
85
+ value: S
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: M
96
+ value: S
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: M
107
+ value: S
108
108
  }
109
109
  }),
110
110
  {}
@@ -116,14 +116,14 @@ const he = {
116
116
  }, W = {
117
117
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
118
118
  BEAT_INTERACTION: "Beat Interaction"
119
- }, S = {
119
+ }, M = {
120
120
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
121
121
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
122
122
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
123
123
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
124
124
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
125
125
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
126
- }, De = {
126
+ }, xe = {
127
127
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
128
128
  }, w = {
129
129
  CONTROL_BACKWARD: "Control Backward",
@@ -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
- }, ge = {
140
+ }, Re = {
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: M
145
+ value: S
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: M
152
+ value: S
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: M
159
+ value: S
160
160
  }
161
- }, Re = {
161
+ }, ge = {
162
162
  // carousel control interaction events - clicks and swipes
163
- [S.ON_CAROUSEL_BACK_CLICK]: {
163
+ [M.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: M
167
+ value: S
168
168
  },
169
- [S.ON_CAROUSEL_FORWARD_CLICK]: {
169
+ [M.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: M
173
+ value: S
174
174
  },
175
- [S.ON_CAROUSEL_BACK_SWIPE]: {
175
+ [M.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: M
179
+ value: S
180
180
  },
181
- [S.ON_CAROUSEL_FORWARD_SWIPE]: {
181
+ [M.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: M
185
+ value: S
186
186
  },
187
187
  // read more card events
188
- [S.ON_VIEW_MORE_CLICKED]: {
188
+ [M.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: M
192
+ value: S
193
193
  },
194
- [De.ON_VIEW_MORE_VIEWED]: {
194
+ [xe.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: M
198
+ value: S
199
199
  },
200
200
  ...at(),
201
201
  ...ct(),
202
202
  ...st()
203
- }, Ie = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
203
+ }, Ie = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticEvent(ge[i]).then((t) => t).catch((t) => {
204
204
  throw t;
205
- }), ye = async (i, o) => !o || !ge[i] ? null : o.sendAnalyticsPageview(ge[i]).then((t) => t).catch((t) => {
205
+ }), ye = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticsPageview(Re[i]).then((t) => t).catch((t) => {
206
206
  throw t;
207
207
  });
208
208
  class dt {
@@ -271,9 +271,8 @@ const $ = u.createContext(null), Et = ({
271
271
  title: m,
272
272
  variant: c,
273
273
  widthOverrides: E
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(
274
+ }, R) {
275
+ const I = se(), [x, O] = u.useState(!1), { cardStyle: y, linkTextStyle: F } = f, z = c ? y : { border: "none", boxShadow: "none", ...y }, g = /* @__PURE__ */ e(
277
276
  Ke,
278
277
  {
279
278
  className: "mx-micro-card-description",
@@ -300,13 +299,13 @@ const $ = u.createContext(null), Et = ({
300
299
  }
301
300
  );
302
301
  return /* @__PURE__ */ e(
303
- b,
302
+ U,
304
303
  {
305
304
  "aria-hidden": !d,
306
305
  "aria-label": t,
307
306
  "aria-labelledby": "divButton",
308
307
  "aria-roledescription": "slide",
309
- ref: g,
308
+ ref: R,
310
309
  role: "group",
311
310
  sx: {
312
311
  height: "100%",
@@ -314,7 +313,7 @@ const $ = u.createContext(null), Et = ({
314
313
  fontFamily: I.typography.fontFamily
315
314
  },
316
315
  children: /* @__PURE__ */ e(
317
- b,
316
+ U,
318
317
  {
319
318
  "aria-hidden": !d,
320
319
  "aria-label": t,
@@ -322,10 +321,10 @@ const $ = u.createContext(null), Et = ({
322
321
  onClick: () => _(),
323
322
  onKeyDown: () => O(!1),
324
323
  onKeyUp: () => O(!0),
325
- ref: g,
324
+ ref: R,
326
325
  role: "button",
327
326
  sx: {
328
- border: D ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
327
+ border: x ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
329
328
  borderRadius: "8px",
330
329
  height: "100%"
331
330
  },
@@ -335,10 +334,10 @@ const $ = u.createContext(null), Et = ({
335
334
  {
336
335
  "aria-roledescription": "slide",
337
336
  className: "mx-micro-card",
338
- id: "MicroInsightCard",
339
337
  role: "group",
340
338
  sx: {
341
339
  backgroundColor: r,
340
+ boxSizing: "border-box",
342
341
  cursor: "pointer",
343
342
  height: l ? "100%" : 124,
344
343
  p: 16,
@@ -361,13 +360,13 @@ const $ = u.createContext(null), Et = ({
361
360
  lt,
362
361
  {
363
362
  avatar: C && a,
364
- subheader: p && R,
363
+ subheader: p && g,
365
364
  sx: { color: h.headerColor, p: 0 },
366
365
  title: m,
367
366
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
368
367
  }
369
368
  ),
370
- /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && R }),
369
+ /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !p && g }),
371
370
  !!o && /* @__PURE__ */ e(
372
371
  ot,
373
372
  {
@@ -376,14 +375,14 @@ const $ = u.createContext(null), Et = ({
376
375
  p: 0
377
376
  },
378
377
  children: /* @__PURE__ */ e(
379
- b,
378
+ U,
380
379
  {
381
- sx: (x) => ({
382
- color: h.buttonColor ? h.buttonColor : x.palette.primary.main,
380
+ sx: (D) => ({
381
+ color: h.buttonColor ? h.buttonColor : D.palette.primary.main,
383
382
  fontSize: 14,
384
383
  fontWeight: "bold",
385
384
  px: 28,
386
- fontFamily: x.typography.fontFamily,
385
+ fontFamily: D.typography.fontFamily,
387
386
  ...F
388
387
  }),
389
388
  children: o
@@ -453,13 +452,13 @@ const $ = u.createContext(null), Et = ({
453
452
  return i.names?.map((r, n) => {
454
453
  t[r] = o[n];
455
454
  }), t;
456
- }) : [] : [], gt = (i, o) => {
455
+ }) : [] : [], Rt = (i, o) => {
457
456
  const t = mt(i), r = t.length / 2, n = t.slice(0, r), l = t.slice(r);
458
457
  return !n.length || !l.length ? o.Color.Primary300 : n[0].amount > l[0].amount ? o.Color.Error300 : n[0].amount < l[0].amount ? o.Color.Success300 : o.Color.Primary300;
459
- }, Rt = ({ beat: i }) => {
460
- const o = Ae(), t = gt(i.data_series, o);
458
+ }, gt = ({ beat: i }) => {
459
+ const o = Ae(), t = Rt(i.data_series, o);
461
460
  return /* @__PURE__ */ e(ie, { name: "bar_chart", sx: { color: t } });
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
+ }, De = () => /* @__PURE__ */ v("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
463
462
  /* @__PURE__ */ e(
464
463
  "path",
465
464
  {
@@ -1242,7 +1241,7 @@ const $ = u.createContext(null), Et = ({
1242
1241
  ] })
1243
1242
  ] }), ve = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1244
1243
  const n = se(), l = o?.primary_300 ? o.primary_300 : n.palette.primary.main;
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
+ return r === 0 ? /* @__PURE__ */ e(ie, { fill: !0, name: "error", sx: { color: t || l } }) : r === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(gt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(ie, { name: "campaign" }) : /* @__PURE__ */ e(
1246
1245
  ie,
1247
1246
  {
1248
1247
  fill: !0,
@@ -1294,18 +1293,17 @@ const $ = u.createContext(null), Et = ({
1294
1293
  variant: f,
1295
1294
  widthOverrides: h
1296
1295
  }) => {
1297
- console.log("BeatCard", { heightOverrides: l });
1298
- const { ref: m, inView: c } = Se({
1296
+ const { ref: m, inView: c } = Me({
1299
1297
  threshold: Ve
1300
- }), { cardsCopy: E } = k(), { onEvent: g } = Y(), { updateBeat: I, updateOffer: D } = It();
1298
+ }), { cardsCopy: E } = k(), { onEvent: R } = Y(), { updateBeat: I, updateOffer: x } = It();
1301
1299
  oe(() => {
1302
- c && (t.has_been_displayed ? g(We(t.template)) : (t.guid.startsWith("OFR") ? D({
1300
+ c && (t.has_been_displayed ? R(We(t.template)) : (t.guid.startsWith("OFR") ? x({
1303
1301
  ...t,
1304
1302
  has_been_displayed: !0
1305
1303
  }) : I({
1306
1304
  ...t,
1307
1305
  has_been_displayed: !0
1308
- }), g(we(t.template))));
1306
+ }), R(we(t.template))));
1309
1307
  }, [c]), oe(() => {
1310
1308
  if (c && t)
1311
1309
  if (t.template === "MarketingOffer") {
@@ -1323,7 +1321,7 @@ const $ = u.createContext(null), Et = ({
1323
1321
  });
1324
1322
  }, [t, a, c]);
1325
1323
  const O = () => {
1326
- if (p && p(t), g(Te(t.template)), t.template === "MarketingOffer") {
1324
+ if (p && p(t), R(Te(t.template)), t.template === "MarketingOffer") {
1327
1325
  const y = t;
1328
1326
  _?.capture("clicked_messaging_insight", {
1329
1327
  template: t.template,
@@ -1366,7 +1364,7 @@ const $ = u.createContext(null), Et = ({
1366
1364
  widthOverrides: h
1367
1365
  }
1368
1366
  );
1369
- }, Mt = ({
1367
+ }, St = ({
1370
1368
  clientColorScheme: i,
1371
1369
  currentBeatIndex: o,
1372
1370
  numBeats: t,
@@ -1401,7 +1399,7 @@ const $ = u.createContext(null), Et = ({
1401
1399
  disabled: f,
1402
1400
  onClick: n,
1403
1401
  children: /* @__PURE__ */ e(
1404
- Ue,
1402
+ be,
1405
1403
  {
1406
1404
  style: {
1407
1405
  color: f ? m : c
@@ -1410,10 +1408,10 @@ const $ = u.createContext(null), Et = ({
1410
1408
  )
1411
1409
  }
1412
1410
  ),
1413
- Array.from({ length: t }).map((E, g) => {
1414
- const I = g === o;
1411
+ Array.from({ length: t }).map((E, R) => {
1412
+ const I = R === o;
1415
1413
  return /* @__PURE__ */ e(
1416
- b,
1414
+ U,
1417
1415
  {
1418
1416
  className: "mx-insights-micro-carousel-dots",
1419
1417
  sx: {
@@ -1433,7 +1431,7 @@ const $ = u.createContext(null), Et = ({
1433
1431
  width: I && d ? 24 : 8
1434
1432
  }
1435
1433
  },
1436
- `carousel-button-${g}`
1434
+ `carousel-button-${R}`
1437
1435
  );
1438
1436
  }),
1439
1437
  /* @__PURE__ */ e(
@@ -1444,7 +1442,7 @@ const $ = u.createContext(null), Et = ({
1444
1442
  disabled: h,
1445
1443
  onClick: r,
1446
1444
  children: /* @__PURE__ */ e(
1447
- Me,
1445
+ Se,
1448
1446
  {
1449
1447
  style: {
1450
1448
  color: h ? m : c
@@ -1456,7 +1454,7 @@ const $ = u.createContext(null), Et = ({
1456
1454
  ]
1457
1455
  }
1458
1456
  );
1459
- }, St = ({
1457
+ }, Mt = ({
1460
1458
  analyticsMetadata: i,
1461
1459
  allowSingleCardPeeking: o = !1,
1462
1460
  beats: t = [],
@@ -1474,8 +1472,7 @@ const $ = u.createContext(null), Et = ({
1474
1472
  visibleCardsCount: c = 1
1475
1473
  // Default to 1 card visible
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
+ const E = u.useRef(null), R = u.useRef(null), [I, x] = u.useState(0), [O, y] = u.useState(null), [F, z] = u.useState(null), [g, D] = u.useState(null), [b, B] = u.useState(p), { carouselCopy: j } = k(), { onEvent: Z } = Y();
1479
1476
  u.useEffect(() => {
1480
1477
  if (E.current && !o) {
1481
1478
  const s = E.current.offsetWidth, A = 8;
@@ -1485,10 +1482,10 @@ const $ = u.createContext(null), Et = ({
1485
1482
  N = (s - J - (c - 1) * A) / c;
1486
1483
  } else
1487
1484
  N = s;
1488
- x(N);
1485
+ D(N);
1489
1486
  }
1490
1487
  }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1491
- const s = g.current?.offsetWidth;
1488
+ const s = R.current?.offsetWidth;
1492
1489
  if (typeof s == "number" && o) {
1493
1490
  const A = (P) => {
1494
1491
  B(!0);
@@ -1501,33 +1498,33 @@ const $ = u.createContext(null), Et = ({
1501
1498
  ].find((ce) => P <= ce.maxWidth);
1502
1499
  return ee ? ee.cardWidth : 750;
1503
1500
  };
1504
- x(A(s));
1501
+ D(A(s));
1505
1502
  const N = () => {
1506
- const P = g.current?.offsetWidth;
1507
- typeof P == "number" && x(A(P));
1503
+ const P = R.current?.offsetWidth;
1504
+ typeof P == "number" && D(A(P));
1508
1505
  };
1509
1506
  return window.addEventListener("resize", N), () => {
1510
1507
  window.removeEventListener("resize", N);
1511
1508
  };
1512
1509
  }
1513
- }, [o, g]);
1510
+ }, [o, R]);
1514
1511
  const X = () => {
1515
- Z(S.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1516
- left: I + R + 8,
1512
+ Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && g && E.current.scrollTo({
1513
+ left: I + g + 8,
1517
1514
  top: 0,
1518
1515
  behavior: "smooth"
1519
1516
  });
1520
1517
  }, le = () => {
1521
- Z(S.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1522
- left: Math.max(0, I - (R + 8)),
1518
+ Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && g && E.current.scrollTo({
1519
+ left: Math.max(0, I - (g + 8)),
1523
1520
  top: 0,
1524
1521
  behavior: "smooth"
1525
1522
  });
1526
1523
  }, ne = () => {
1527
- E.current && D(E.current.scrollLeft);
1524
+ E.current && x(E.current.scrollLeft);
1528
1525
  }, Q = () => {
1529
1526
  if (!F || !O) return;
1530
- F - O > yt ? Z(S.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(S.ON_CAROUSEL_BACK_SWIPE, i);
1527
+ F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
1531
1528
  }, q = (s) => {
1532
1529
  y(s.targetTouches[0].clientX);
1533
1530
  }, L = (s) => {
@@ -1539,14 +1536,13 @@ const $ = u.createContext(null), Et = ({
1539
1536
  posthog: d,
1540
1537
  showIcon: C,
1541
1538
  variant: h
1542
- }, ae = R ? Math.round(I / (R + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1539
+ }, ae = g ? Math.round(I / (g + 8)) : 0, Fe = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1543
1540
  return /* @__PURE__ */ v(
1544
1541
  K,
1545
1542
  {
1546
1543
  "aria-label": j.carousel_title,
1547
1544
  "aria-roledescription": "carousel",
1548
- id: "MicroBeatCarousel",
1549
- ref: g,
1545
+ ref: R,
1550
1546
  role: "group/region",
1551
1547
  sx: {
1552
1548
  alignItems: "center",
@@ -1596,7 +1592,7 @@ const $ = u.createContext(null), Et = ({
1596
1592
  index: A,
1597
1593
  isActiveCard: A === ae,
1598
1594
  onCardClick: a,
1599
- widthOverrides: R || void 0,
1595
+ widthOverrides: g || void 0,
1600
1596
  ...ue
1601
1597
  },
1602
1598
  `${s.guid} ${A}`
@@ -1607,7 +1603,7 @@ const $ = u.createContext(null), Et = ({
1607
1603
  {
1608
1604
  isActiveCard: ae === t.length,
1609
1605
  onCardClick: a,
1610
- widthOverrides: R || void 0,
1606
+ widthOverrides: g || void 0,
1611
1607
  ...ue
1612
1608
  }
1613
1609
  )
@@ -1615,7 +1611,7 @@ const $ = u.createContext(null), Et = ({
1615
1611
  }
1616
1612
  ),
1617
1613
  _ && /* @__PURE__ */ e(
1618
- Mt,
1614
+ St,
1619
1615
  {
1620
1616
  clientColorScheme: r,
1621
1617
  currentBeatIndex: ae + c - 1,
@@ -1624,14 +1620,14 @@ const $ = u.createContext(null), Et = ({
1624
1620
  onPreviousClick: le,
1625
1621
  scrollRightBoundary: Fe,
1626
1622
  scrollX: I,
1627
- shouldApplyNewAnimation: U,
1623
+ shouldApplyNewAnimation: b,
1628
1624
  visibleCardsCount: c
1629
1625
  }
1630
1626
  )
1631
1627
  ]
1632
1628
  }
1633
1629
  );
1634
- }, At = G(St), Ot = ({
1630
+ }, At = G(Mt), Ot = ({
1635
1631
  analyticsMetadata: i,
1636
1632
  clientColorScheme: o,
1637
1633
  onCardClick: t,
@@ -1639,7 +1635,7 @@ const $ = u.createContext(null), Et = ({
1639
1635
  widthOverrides: n
1640
1636
  }) => {
1641
1637
  const { carouselCopy: l } = k(), { onEvent: a } = Y(), d = () => {
1642
- a && (a(S.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1638
+ a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1643
1639
  };
1644
1640
  return l ? /* @__PURE__ */ v(
1645
1641
  K,
@@ -1669,7 +1665,7 @@ const $ = u.createContext(null), Et = ({
1669
1665
  /* @__PURE__ */ e(
1670
1666
  Pe,
1671
1667
  {
1672
- endIcon: /* @__PURE__ */ e(Me, { size: 20 }),
1668
+ endIcon: /* @__PURE__ */ e(Se, { size: 20 }),
1673
1669
  onClick: d,
1674
1670
  size: "small",
1675
1671
  sx: {
@@ -1681,18 +1677,16 @@ const $ = u.createContext(null), Et = ({
1681
1677
  )
1682
1678
  ]
1683
1679
  }
1684
- ) : /* @__PURE__ */ e(be, {});
1680
+ ) : /* @__PURE__ */ e(Ue, {});
1685
1681
  }, Tt = G(Ot), Wt = ({
1686
1682
  heightOverrides: i,
1687
1683
  widthOverrides: o,
1688
1684
  children: t
1689
1685
  }) => {
1690
- console.log("MicroWidgetContainer", { heightOverrides: i });
1691
1686
  const { carouselCopy: r } = k();
1692
1687
  return /* @__PURE__ */ e(
1693
- b,
1688
+ U,
1694
1689
  {
1695
- id: "MicroWidgetContainer",
1696
1690
  "aria-label": r?.carousel_title,
1697
1691
  "aria-roledescription": "carousel",
1698
1692
  role: "group",
@@ -1722,7 +1716,7 @@ const $ = u.createContext(null), Et = ({
1722
1716
  h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1723
1717
  }, []);
1724
1718
  const m = () => {
1725
- n && n(), f(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1719
+ n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1726
1720
  template: "no_relevant_insights"
1727
1721
  });
1728
1722
  };
@@ -1734,7 +1728,7 @@ const $ = u.createContext(null), Et = ({
1734
1728
  description: C.no_relevant_insights_card_description,
1735
1729
  fontColors: { buttonColor: t?.primary_300 },
1736
1730
  heightOverrides: r,
1737
- icon: /* @__PURE__ */ e(xe, {}),
1731
+ icon: /* @__PURE__ */ e(De, {}),
1738
1732
  isZeroState: !0,
1739
1733
  onCardClick: m,
1740
1734
  posthog: l,
@@ -1779,7 +1773,7 @@ const $ = u.createContext(null), Et = ({
1779
1773
  ariaLabel: i,
1780
1774
  description: C.carousel_zero_state_description,
1781
1775
  heightOverrides: t,
1782
- icon: /* @__PURE__ */ e(xe, {}),
1776
+ icon: /* @__PURE__ */ e(De, {}),
1783
1777
  isZeroState: !0,
1784
1778
  onCardClick: r,
1785
1779
  posthog: n,
@@ -1802,7 +1796,7 @@ const $ = u.createContext(null), Et = ({
1802
1796
  }
1803
1797
  );
1804
1798
  }, ni = G(ke), wt = () => /* @__PURE__ */ e(
1805
- b,
1799
+ U,
1806
1800
  {
1807
1801
  sx: {
1808
1802
  alignItems: "center",
@@ -1813,7 +1807,7 @@ const $ = u.createContext(null), Et = ({
1813
1807
  },
1814
1808
  children: /* @__PURE__ */ e(qe, {})
1815
1809
  }
1816
- ), V = new ht(), Dt = ({
1810
+ ), V = new ht(), xt = ({
1817
1811
  allowSingleCardPeeking: i,
1818
1812
  areBeatsLoading: o,
1819
1813
  beats: t = [],
@@ -1835,22 +1829,21 @@ const $ = u.createContext(null), Et = ({
1835
1829
  showBorder: m = !0,
1836
1830
  showCarouselControls: c,
1837
1831
  showHeader: E,
1838
- showIcon: g,
1832
+ showIcon: R,
1839
1833
  showWithMargin: I = !0,
1840
- token: D = "",
1834
+ token: x = "",
1841
1835
  useDarkMode: O,
1842
1836
  userHasFullInsightFeedBeats: y,
1843
1837
  variant: F,
1844
1838
  visibleCardsCount: z = 1,
1845
- widthOverrides: R
1839
+ widthOverrides: g
1846
1840
  }) => {
1847
- console.log("InsightsMicroWidget", { heightOverrides: a });
1848
- const [x, U] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
1841
+ const [D, b] = te("STANDARD"), [B, j] = te(!1), [Z, X] = te(!1), le = et([_], V), ne = tt([C], V);
1849
1842
  u.useEffect(() => {
1850
- !V.isInitialized && !Z && (V.initialize(l, D, d).catch(() => X(!1)), X(!0));
1851
- }, [l, D, d, V.isInitialized, Z]), u.useEffect(() => {
1843
+ !V.isInitialized && !Z && (V.initialize(l, x, d).catch(() => X(!1)), X(!0));
1844
+ }, [l, x, d, V.isInitialized, Z]), u.useEffect(() => {
1852
1845
  const L = window.innerHeight;
1853
- L < 180 ? U("STANDARD") : L >= 180 && L < 200 ? U("LARGE") : L >= 200 && L < 248 ? U("XLARGE") : L >= 248 && U("XXLARGE");
1846
+ L < 180 ? b("STANDARD") : L >= 180 && L < 200 ? b("LARGE") : L >= 200 && L < 248 ? b("XLARGE") : L >= 248 && b("XXLARGE");
1854
1847
  }, [window.innerHeight]), u.useEffect(() => {
1855
1848
  j(!o && V.isInitialized);
1856
1849
  }, [o, V.isInitialized]);
@@ -1859,16 +1852,16 @@ const $ = u.createContext(null), Et = ({
1859
1852
  heightOverrides: a,
1860
1853
  onCardClick: p,
1861
1854
  posthog: f,
1862
- showIcon: g,
1855
+ showIcon: R,
1863
1856
  showWithMargin: I,
1864
1857
  useDarkMode: O,
1865
- widthOverrides: R
1858
+ widthOverrides: g
1866
1859
  }, q = {
1867
- carouselSize: x,
1860
+ carouselSize: D,
1868
1861
  variant: F,
1869
1862
  ...Q
1870
1863
  };
1871
- return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: R, children: [
1864
+ return /* @__PURE__ */ e(Et, { onEvent: le, onPageview: ne, store: V, children: /* @__PURE__ */ v(Wt, { heightOverrides: a, widthOverrides: g, children: [
1872
1865
  !B && /* @__PURE__ */ e(wt, {}),
1873
1866
  B && E && /* @__PURE__ */ e(
1874
1867
  Tt,
@@ -1877,7 +1870,7 @@ const $ = u.createContext(null), Et = ({
1877
1870
  clientColorScheme: r,
1878
1871
  onCardClick: p,
1879
1872
  posthog: f,
1880
- widthOverrides: R
1873
+ widthOverrides: g
1881
1874
  }
1882
1875
  ),
1883
1876
  B && !!t.length && /* @__PURE__ */ e(
@@ -1897,7 +1890,7 @@ const $ = u.createContext(null), Et = ({
1897
1890
  B && !t.length && y && /* @__PURE__ */ e(He, { clientColorScheme: r, ...q }),
1898
1891
  B && !t.length && !y && /* @__PURE__ */ e(ke, { ...q })
1899
1892
  ] }) });
1900
- }, ai = G(Dt), xt = ({
1893
+ }, ai = G(xt), Dt = ({
1901
1894
  isActiveCard: i,
1902
1895
  ariaLabel: o,
1903
1896
  clientColorScheme: t,
@@ -1908,16 +1901,16 @@ const $ = u.createContext(null), Et = ({
1908
1901
  variant: d,
1909
1902
  widthOverrides: p
1910
1903
  }) => {
1911
- const _ = se(), { ref: C, inView: f } = Se({
1904
+ const _ = se(), { ref: C, inView: f } = Me({
1912
1905
  threshold: Ve
1913
1906
  }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1914
1907
  oe(() => {
1915
- f && (m(De.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
1908
+ f && (m(xe.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
1916
1909
  template: "view_more_card"
1917
1910
  }));
1918
1911
  }, [f]);
1919
1912
  const c = () => {
1920
- n && n(), m(S.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1913
+ n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1921
1914
  template: "view_more_card"
1922
1915
  });
1923
1916
  };
@@ -1940,7 +1933,7 @@ const $ = u.createContext(null), Et = ({
1940
1933
  widthOverrides: p
1941
1934
  }
1942
1935
  );
1943
- }, Lt = G(xt);
1936
+ }, Lt = G(Dt);
1944
1937
  export {
1945
1938
  ht as A,
1946
1939
  vt as B,
@@ -1954,6 +1947,6 @@ export {
1954
1947
  re as a,
1955
1948
  ai as b,
1956
1949
  ft as c,
1957
- Rt as d,
1958
- xe as e
1950
+ gt as d,
1951
+ De as e
1959
1952
  };
@@ -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-C5g-Jnyd.mjs";
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-SCn2wt4i.mjs";
2
2
  export {
3
3
  s as AppStore,
4
4
  e as BeatCard,
@@ -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-C5g-Jnyd.mjs";
22
+ import { T as M, b as ft } from "../ViewMoreMicroCard-SCn2wt4i.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 console.log("TrendsInsights", { containerHeight: w, heightOverrides: D }), /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
666
+ return /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
667
667
  ft,
668
668
  {
669
669
  areBeatsLoading: h.isLoading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.5-alpha.mm1",
3
+ "version": "7.2.5-alpha.mm3",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",