@mx-cartographer/experiences 7.2.5-alpha.mm0 → 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 Se } from "@mxenabled/mx-icons";
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 Me } from "react-intersection-observer";
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
- }, S = window?.app?.clientConfig?.microwidget_instance_id || "", me = {
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: S
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: S
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: S
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
- }, M = {
119
+ }, S = {
120
120
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
121
121
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
122
122
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
@@ -142,60 +142,60 @@ const he = {
142
142
  label: T.MICRO_WIDGET,
143
143
  name: H.MICRO_WIDGET_CAROUSEL,
144
144
  path: me.INSIGHTS_MICRO_WIDGET,
145
- value: S
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: S
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: S
159
+ value: M
160
160
  }
161
161
  }, Re = {
162
162
  // carousel control interaction events - clicks and swipes
163
- [M.ON_CAROUSEL_BACK_CLICK]: {
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: S
167
+ value: M
168
168
  },
169
- [M.ON_CAROUSEL_FORWARD_CLICK]: {
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: S
173
+ value: M
174
174
  },
175
- [M.ON_CAROUSEL_BACK_SWIPE]: {
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: S
179
+ value: M
180
180
  },
181
- [M.ON_CAROUSEL_FORWARD_SWIPE]: {
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: S
185
+ value: M
186
186
  },
187
187
  // read more card events
188
- [M.ON_VIEW_MORE_CLICKED]: {
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: S
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: S
198
+ value: M
199
199
  },
200
200
  ...at(),
201
201
  ...ct(),
@@ -272,6 +272,7 @@ const $ = u.createContext(null), Et = ({
272
272
  variant: c,
273
273
  widthOverrides: E
274
274
  }, g) {
275
+ console.log("MicroInsightCard", { heightOverrides: l });
275
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
  {
@@ -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,
@@ -1292,7 +1294,8 @@ const $ = u.createContext(null), Et = ({
1292
1294
  variant: f,
1293
1295
  widthOverrides: h
1294
1296
  }) => {
1295
- const { ref: m, inView: c } = Me({
1297
+ console.log("BeatCard", { heightOverrides: l });
1298
+ const { ref: m, inView: c } = Se({
1296
1299
  threshold: Ve
1297
1300
  }), { cardsCopy: E } = k(), { onEvent: g } = Y(), { updateBeat: I, updateOffer: D } = It();
1298
1301
  oe(() => {
@@ -1363,7 +1366,7 @@ const $ = u.createContext(null), Et = ({
1363
1366
  widthOverrides: h
1364
1367
  }
1365
1368
  );
1366
- }, St = ({
1369
+ }, Mt = ({
1367
1370
  clientColorScheme: i,
1368
1371
  currentBeatIndex: o,
1369
1372
  numBeats: t,
@@ -1441,7 +1444,7 @@ const $ = u.createContext(null), Et = ({
1441
1444
  disabled: h,
1442
1445
  onClick: r,
1443
1446
  children: /* @__PURE__ */ e(
1444
- Se,
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
- }, Mt = ({
1459
+ }, St = ({
1457
1460
  analyticsMetadata: i,
1458
1461
  allowSingleCardPeeking: o = !1,
1459
1462
  beats: t = [],
@@ -1509,13 +1512,13 @@ const $ = u.createContext(null), Et = ({
1509
1512
  }
1510
1513
  }, [o, g]);
1511
1514
  const X = () => {
1512
- Z(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1515
+ Z(S.ON_CAROUSEL_FORWARD_CLICK, i), E.current && R && E.current.scrollTo({
1513
1516
  left: I + R + 8,
1514
1517
  top: 0,
1515
1518
  behavior: "smooth"
1516
1519
  });
1517
1520
  }, le = () => {
1518
- Z(M.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1521
+ Z(S.ON_CAROUSEL_BACK_CLICK, i), E.current && R && E.current.scrollTo({
1519
1522
  left: Math.max(0, I - (R + 8)),
1520
1523
  top: 0,
1521
1524
  behavior: "smooth"
@@ -1524,7 +1527,7 @@ const $ = u.createContext(null), Et = ({
1524
1527
  E.current && D(E.current.scrollLeft);
1525
1528
  }, Q = () => {
1526
1529
  if (!F || !O) return;
1527
- F - O > yt ? Z(M.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(M.ON_CAROUSEL_BACK_SWIPE, i);
1530
+ F - O > yt ? Z(S.ON_CAROUSEL_FORWARD_SWIPE, i) : Z(S.ON_CAROUSEL_BACK_SWIPE, i);
1528
1531
  }, q = (s) => {
1529
1532
  y(s.targetTouches[0].clientX);
1530
1533
  }, L = (s) => {
@@ -1542,6 +1545,7 @@ const $ = u.createContext(null), Et = ({
1542
1545
  {
1543
1546
  "aria-label": j.carousel_title,
1544
1547
  "aria-roledescription": "carousel",
1548
+ id: "MicroBeatCarousel",
1545
1549
  ref: g,
1546
1550
  role: "group/region",
1547
1551
  sx: {
@@ -1611,7 +1615,7 @@ const $ = u.createContext(null), Et = ({
1611
1615
  }
1612
1616
  ),
1613
1617
  _ && /* @__PURE__ */ e(
1614
- St,
1618
+ Mt,
1615
1619
  {
1616
1620
  clientColorScheme: r,
1617
1621
  currentBeatIndex: ae + c - 1,
@@ -1627,7 +1631,7 @@ const $ = u.createContext(null), Et = ({
1627
1631
  ]
1628
1632
  }
1629
1633
  );
1630
- }, At = G(Mt), Ot = ({
1634
+ }, At = G(St), Ot = ({
1631
1635
  analyticsMetadata: i,
1632
1636
  clientColorScheme: o,
1633
1637
  onCardClick: t,
@@ -1635,7 +1639,7 @@ const $ = u.createContext(null), Et = ({
1635
1639
  widthOverrides: n
1636
1640
  }) => {
1637
1641
  const { carouselCopy: l } = k(), { onEvent: a } = Y(), d = () => {
1638
- a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1642
+ a && (a(S.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1639
1643
  };
1640
1644
  return l ? /* @__PURE__ */ v(
1641
1645
  K,
@@ -1665,7 +1669,7 @@ const $ = u.createContext(null), Et = ({
1665
1669
  /* @__PURE__ */ e(
1666
1670
  Pe,
1667
1671
  {
1668
- endIcon: /* @__PURE__ */ e(Se, { size: 20 }),
1672
+ endIcon: /* @__PURE__ */ e(Me, { size: 20 }),
1669
1673
  onClick: d,
1670
1674
  size: "small",
1671
1675
  sx: {
@@ -1688,6 +1692,7 @@ const $ = u.createContext(null), Et = ({
1688
1692
  return /* @__PURE__ */ e(
1689
1693
  b,
1690
1694
  {
1695
+ id: "MicroWidgetContainer",
1691
1696
  "aria-label": r?.carousel_title,
1692
1697
  "aria-roledescription": "carousel",
1693
1698
  role: "group",
@@ -1717,7 +1722,7 @@ const $ = u.createContext(null), Et = ({
1717
1722
  h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1718
1723
  }, []);
1719
1724
  const m = () => {
1720
- n && n(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1725
+ n && n(), f(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1721
1726
  template: "no_relevant_insights"
1722
1727
  });
1723
1728
  };
@@ -1903,7 +1908,7 @@ const $ = u.createContext(null), Et = ({
1903
1908
  variant: d,
1904
1909
  widthOverrides: p
1905
1910
  }) => {
1906
- const _ = se(), { ref: C, inView: f } = Me({
1911
+ const _ = se(), { ref: C, inView: f } = Se({
1907
1912
  threshold: Ve
1908
1913
  }), { cardsCopy: h } = k(), { onEvent: m } = Y();
1909
1914
  oe(() => {
@@ -1912,7 +1917,7 @@ const $ = u.createContext(null), Et = ({
1912
1917
  }));
1913
1918
  }, [f]);
1914
1919
  const c = () => {
1915
- n && n(), m(M.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1920
+ n && n(), m(S.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
1916
1921
  template: "view_more_card"
1917
1922
  });
1918
1923
  };
@@ -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-BxRNJMMm.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-C5g-Jnyd.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-BxRNJMMm.mjs";
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.5-alpha.mm0",
3
+ "version": "7.2.5-alpha.mm1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",