@mx-cartographer/experiences 7.7.0 → 7.7.1-alpha.san1

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.
@@ -3,14 +3,13 @@ import h, { useEffect as ie, useState as oe } from "react";
3
3
  import { observer as U } from "mobx-react-lite";
4
4
  import N from "@mui/material/Stack";
5
5
  import ne from "@mui/material/Button";
6
- import be from "@mui/material/Typography";
7
- import { Icon as Pe, Close as Be, ChevronLeft as Ve, ChevronRight as fe } from "@mxenabled/mx-icons";
8
- import { L as Ge } from "./Loader-DUaFpDGv.mjs";
6
+ import { CategoryIcon as be, MerchantLogo as Pe, P as _e, Text as ue, H3 as Be } from "@mxenabled/mxui";
7
+ import { Icon as Ve, Close as Ge, ChevronLeft as ke, ChevronRight as Te } from "@mxenabled/mx-icons";
8
+ import { L as ze } from "./Loader-DUaFpDGv.mjs";
9
9
  import Q from "@mui/material/Box";
10
10
  import re from "@mui/material/IconButton";
11
- import { alpha as T, useTheme as H } from "@mui/material/styles";
12
- import { useInView as Te } from "react-intersection-observer";
13
- import { CategoryIcon as ke, MerchantLogo as ze, P as _e, Text as ue } from "@mxenabled/mxui";
11
+ import { alpha as f, useTheme as H } from "@mui/material/styles";
12
+ import { useInView as fe } from "react-intersection-observer";
14
13
  import { b as Ue } from "./Category-CevNQ03n.mjs";
15
14
  import Ke from "@mui/material/styles/useTheme";
16
15
  import { b as Fe } from "./Localization-2MODESHW.mjs";
@@ -72,27 +71,27 @@ const se = {
72
71
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
73
72
  MonthlySpendComparison: "MonthlySpendComparison",
74
73
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
75
- }, y = window?.app?.clientConfig?.microwidget_instance_id || "", Ce = {
74
+ }, O = window?.app?.clientConfig?.microwidget_instance_id || "", Ce = {
76
75
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
77
- }, ye = (t) => `on${t}Click`, Oe = (t) => `on${t}View`, We = (t) => `on${t}ViewFirstTime`, ce = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), et = () => Object.values(se).reduce(
76
+ }, Oe = (t) => `on${t}Click`, ye = (t) => `on${t}View`, We = (t) => `on${t}ViewFirstTime`, ce = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), et = () => Object.values(se).reduce(
78
77
  (t, e) => ({
79
78
  ...t,
80
- [ye(e)]: {
79
+ [Oe(e)]: {
81
80
  action: B.MICRO_BEAT_CLICKED,
82
81
  category: P.BEAT_INTERACTION,
83
82
  label: ce(e),
84
- value: y
83
+ value: O
85
84
  }
86
85
  }),
87
86
  {}
88
87
  ), tt = () => Object.values(se).reduce(
89
88
  (t, e) => ({
90
89
  ...t,
91
- [Oe(e)]: {
90
+ [ye(e)]: {
92
91
  action: B.MICRO_BEAT_DISPLAYED,
93
92
  category: P.BEAT_INTERACTION,
94
93
  label: ce(e),
95
- value: y
94
+ value: O
96
95
  }
97
96
  }),
98
97
  {}
@@ -103,7 +102,7 @@ const se = {
103
102
  action: B.MICRO_BEAT_DISPLAYED_FIRST_TIME,
104
103
  category: P.BEAT_INTERACTION,
105
104
  label: ce(e),
106
- value: y
105
+ value: O
107
106
  }
108
107
  }),
109
108
  {}
@@ -115,7 +114,7 @@ const se = {
115
114
  }, P = {
116
115
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
117
116
  BEAT_INTERACTION: "Beat Interaction"
118
- }, O = {
117
+ }, y = {
119
118
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
120
119
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
121
120
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
@@ -136,72 +135,72 @@ const se = {
136
135
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
137
136
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
138
137
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
139
- }, ge = {
138
+ }, Ee = {
140
139
  [k.MICRO_WIDGET_CAROUSEL]: {
141
140
  label: b.MICRO_WIDGET,
142
141
  name: k.MICRO_WIDGET_CAROUSEL,
143
142
  path: Ce.INSIGHTS_MICRO_WIDGET,
144
- value: y
143
+ value: O
145
144
  },
146
145
  // zero state
147
146
  [k.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
148
147
  label: b.MICRO_WIDGET,
149
148
  name: k.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
150
149
  path: Ce.INSIGHTS_MICRO_WIDGET,
151
- value: y
150
+ value: O
152
151
  },
153
152
  // no relevant cards
154
153
  [k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
155
154
  label: b.MICRO_WIDGET,
156
155
  name: k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
157
156
  path: "/micro-widget",
158
- value: y
157
+ value: O
159
158
  }
160
- }, Ee = {
159
+ }, ge = {
161
160
  // carousel control interaction events - clicks and swipes
162
- [O.ON_CAROUSEL_BACK_CLICK]: {
161
+ [y.ON_CAROUSEL_BACK_CLICK]: {
163
162
  action: B.CONTROL_BACKWARD,
164
163
  category: P.MICRO_WIDGET_INTERACTION,
165
164
  label: b.CAROUSEL_CONTROL,
166
- value: y
165
+ value: O
167
166
  },
168
- [O.ON_CAROUSEL_FORWARD_CLICK]: {
167
+ [y.ON_CAROUSEL_FORWARD_CLICK]: {
169
168
  action: B.CONTROL_FORWARD,
170
169
  category: P.MICRO_WIDGET_INTERACTION,
171
170
  label: b.CAROUSEL_CONTROL,
172
- value: y
171
+ value: O
173
172
  },
174
- [O.ON_CAROUSEL_BACK_SWIPE]: {
173
+ [y.ON_CAROUSEL_BACK_SWIPE]: {
175
174
  action: B.SWIPE_BACKWARD,
176
175
  category: P.MICRO_WIDGET_INTERACTION,
177
176
  label: b.CAROUSEL_CONTROL,
178
- value: y
177
+ value: O
179
178
  },
180
- [O.ON_CAROUSEL_FORWARD_SWIPE]: {
179
+ [y.ON_CAROUSEL_FORWARD_SWIPE]: {
181
180
  action: B.SWIPE_FORWARD,
182
181
  category: P.MICRO_WIDGET_INTERACTION,
183
182
  label: b.CAROUSEL_CONTROL,
184
- value: y
183
+ value: O
185
184
  },
186
185
  // read more card events
187
- [O.ON_VIEW_MORE_CLICKED]: {
186
+ [y.ON_VIEW_MORE_CLICKED]: {
188
187
  action: B.MICRO_BEAT_CLICKED,
189
188
  category: P.BEAT_INTERACTION,
190
189
  label: b.VIEW_MORE,
191
- value: y
190
+ value: O
192
191
  },
193
192
  [Ne.ON_VIEW_MORE_VIEWED]: {
194
193
  action: B.MICRO_BEAT_DISPLAYED,
195
194
  category: P.BEAT_INTERACTION,
196
195
  label: b.VIEW_MORE,
197
- value: y
196
+ value: O
198
197
  },
199
198
  ...et(),
200
199
  ...tt(),
201
200
  ...ot()
202
- }, Ie = async (t, e) => !e || !Ee[t] ? null : e.sendAnalyticEvent(Ee[t]).then((o) => o).catch((o) => {
201
+ }, Ie = async (t, e) => !e || !ge[t] ? null : e.sendAnalyticEvent(ge[t]).then((o) => o).catch((o) => {
203
202
  throw o;
204
- }), Ae = async (t, e) => !e || !ge[t] ? null : e.sendAnalyticsPageview(ge[t]).then((o) => o).catch((o) => {
203
+ }), Ae = async (t, e) => !e || !Ee[t] ? null : e.sendAnalyticsPageview(Ee[t]).then((o) => o).catch((o) => {
205
204
  throw o;
206
205
  });
207
206
  class it {
@@ -254,12 +253,8 @@ const $ = h.createContext(null), rt = ({
254
253
  children: n
255
254
  }) => /* @__PURE__ */ i($.Provider, { value: { onEvent: t, onPageview: e, store: o, children: n }, children: n }), at = ({ beat: t }) => {
256
255
  const { primary_category_guid: e, category_guids: o } = t, n = e || o?.[0] || Ue.UNCATEGORIZED;
257
- return /* @__PURE__ */ i(ke, { categoryGuid: n, size: 32, sx: { minWidth: 32 } });
258
- }, R = ({
259
- bgColor: t,
260
- name: e,
261
- iconColor: o = "primary"
262
- }) => /* @__PURE__ */ i(
256
+ return /* @__PURE__ */ i(be, { categoryGuid: n, size: 32, sx: { minWidth: 32 } });
257
+ }, R = ({ bgColor: t, name: e, iconColor: o = "primary" }) => /* @__PURE__ */ i(
263
258
  qe,
264
259
  {
265
260
  sx: {
@@ -268,12 +263,12 @@ const $ = h.createContext(null), rt = ({
268
263
  height: 32
269
264
  },
270
265
  variant: "rounded",
271
- children: /* @__PURE__ */ i(Pe, { color: o, fill: !0, name: e, size: 20 })
266
+ children: /* @__PURE__ */ i(Ve, { color: o, fill: !0, name: e, size: 20 })
272
267
  }
273
268
  ), st = ({ beat: t }) => {
274
269
  const { category_guids: e, merchant_guids: o, primary_category_guid: n, primary_merchant_guid: r } = t;
275
270
  return /* @__PURE__ */ i(
276
- ze,
271
+ Pe,
277
272
  {
278
273
  categoryGuid: n || e && e[0] || "",
279
274
  merchantGuid: r || o[0],
@@ -295,36 +290,36 @@ const $ = h.createContext(null), rt = ({
295
290
  return !n.length || !r.length ? "primary" : n[0].amount > r[0].amount ? "error" : n[0].amount < r[0].amount ? "success" : "primary";
296
291
  }, dt = ({ beat: t }) => {
297
292
  const e = Ke(), o = lt(t.data_series), n = e.palette[o].main;
298
- return /* @__PURE__ */ i(R, { bgColor: T(n, 0.15), iconColor: o, name: "bar_chart" });
293
+ return /* @__PURE__ */ i(R, { bgColor: f(n, 0.15), iconColor: o, name: "bar_chart" });
299
294
  }, _t = {
300
- 0: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "error" }),
295
+ 0: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "error" }),
301
296
  1: (t) => /* @__PURE__ */ i(at, { beat: t }),
302
297
  2: (t) => /* @__PURE__ */ i(st, { beat: t }),
303
298
  3: (t) => /* @__PURE__ */ i(dt, { beat: t }),
304
299
  4: (t, e) => /* @__PURE__ */ i(
305
300
  R,
306
301
  {
307
- bgColor: T(e.palette.secondary.main, 0.15),
302
+ bgColor: f(e.palette.secondary.main, 0.15),
308
303
  iconColor: "secondary",
309
304
  name: "info"
310
305
  }
311
306
  ),
312
- 5: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "campaign" }),
307
+ 5: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "campaign" }),
313
308
  // TODO: Waiting for the backend to accommodate icon types 6, 7, 8, and 9
314
309
  6: (t, e) => /* @__PURE__ */ i(
315
310
  R,
316
311
  {
317
- bgColor: T(e.palette.success.main, 0.15),
312
+ bgColor: f(e.palette.success.main, 0.15),
318
313
  iconColor: "success",
319
314
  name: "check_circle"
320
315
  }
321
316
  ),
322
- 7: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "today" }),
323
- 8: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "calendar_clock" }),
324
- 9: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "celebration" })
317
+ 7: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "today" }),
318
+ 8: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "calendar_clock" }),
319
+ 9: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "celebration" })
325
320
  }, ut = ({ beat: t }) => {
326
321
  const e = H(), { icon_type: o } = t, n = o != null ? _t[o] : null;
327
- return n ? n(t, e) : /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "error" });
322
+ return n ? n(t, e) : /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "error" });
328
323
  }, D = () => {
329
324
  const t = h.useContext($);
330
325
  if (!t)
@@ -360,34 +355,34 @@ const $ = h.createContext(null), rt = ({
360
355
  icon: r,
361
356
  isActiveCard: s,
362
357
  hasCardEffect: a = !1,
363
- heightOverrides: _,
358
+ heightOverrides: p,
364
359
  onClose: C,
365
360
  onCardClick: m,
366
- onPrimaryAction: p,
361
+ onPrimaryAction: u,
367
362
  onSecondaryAction: c,
368
363
  primaryActionText: d,
369
364
  secondaryActionText: l,
370
365
  title: I,
371
- variant: g,
372
- widthOverrides: E,
366
+ variant: E,
367
+ widthOverrides: g,
373
368
  ...A
374
369
  }, v) {
375
- const { cardsCopy: V } = D(), S = !!(p && d), f = !!(c && l), M = a ? Ze : Q, w = /* @__PURE__ */ L(Se, { children: [
370
+ const { cardsCopy: V } = D(), S = !!(u && d), T = !!(c && l), M = a ? Ze : Q, w = /* @__PURE__ */ L(Se, { children: [
376
371
  C && /* @__PURE__ */ i(
377
372
  re,
378
373
  {
379
374
  "aria-label": V.close,
380
- onClick: (u) => {
381
- u.stopPropagation(), C?.();
375
+ onClick: (_) => {
376
+ _.stopPropagation(), C?.();
382
377
  },
383
- onMouseDown: (u) => {
384
- u.stopPropagation();
378
+ onMouseDown: (_) => {
379
+ _.stopPropagation();
385
380
  },
386
- onTouchStart: (u) => {
387
- u.stopPropagation();
381
+ onTouchStart: (_) => {
382
+ _.stopPropagation();
388
383
  },
389
384
  sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
390
- children: /* @__PURE__ */ i(Be, {})
385
+ children: /* @__PURE__ */ i(Ge, {})
391
386
  }
392
387
  ),
393
388
  /* @__PURE__ */ L(N, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
@@ -425,14 +420,14 @@ const $ = h.createContext(null), rt = ({
425
420
  S && /* @__PURE__ */ i(
426
421
  ne,
427
422
  {
428
- onClick: (u) => {
429
- u.stopPropagation(), p?.();
423
+ onClick: (_) => {
424
+ _.stopPropagation(), u?.();
430
425
  },
431
- onMouseDown: (u) => {
432
- u.stopPropagation();
426
+ onMouseDown: (_) => {
427
+ _.stopPropagation();
433
428
  },
434
- onTouchStart: (u) => {
435
- u.stopPropagation();
429
+ onTouchStart: (_) => {
430
+ _.stopPropagation();
436
431
  },
437
432
  size: "small",
438
433
  sx: { px: r ? 8 : 0 },
@@ -440,17 +435,17 @@ const $ = h.createContext(null), rt = ({
440
435
  children: /* @__PURE__ */ i(ue, { bold: !0, variant: "body2", children: d })
441
436
  }
442
437
  ),
443
- f && /* @__PURE__ */ i(
438
+ T && /* @__PURE__ */ i(
444
439
  ne,
445
440
  {
446
- onClick: (u) => {
447
- u.stopPropagation(), c?.();
441
+ onClick: (_) => {
442
+ _.stopPropagation(), c?.();
448
443
  },
449
- onMouseDown: (u) => {
450
- u.stopPropagation();
444
+ onMouseDown: (_) => {
445
+ _.stopPropagation();
451
446
  },
452
- onTouchStart: (u) => {
453
- u.stopPropagation();
447
+ onTouchStart: (_) => {
448
+ _.stopPropagation();
454
449
  },
455
450
  size: "small",
456
451
  sx: { px: 8 },
@@ -472,13 +467,13 @@ const $ = h.createContext(null), rt = ({
472
467
  role: "group",
473
468
  sx: {
474
469
  backgroundColor: "background.paper",
475
- height: _ ? "100%" : 124,
476
- minWidth: E ? `${E}px` : "100%",
470
+ height: p ? "100%" : 124,
471
+ minWidth: g ? `${g}px` : "100%",
477
472
  position: "relative",
478
473
  ...o
479
474
  },
480
475
  tabIndex: m || !s ? -1 : 0,
481
- variant: g,
476
+ variant: E,
482
477
  ...A,
483
478
  children: m ? /* @__PURE__ */ i(
484
479
  Qe,
@@ -488,7 +483,7 @@ const $ = h.createContext(null), rt = ({
488
483
  pb: 8,
489
484
  pt: 16,
490
485
  px: 16,
491
- height: _ ? "100%" : 124
486
+ height: p ? "100%" : 124
492
487
  },
493
488
  children: w
494
489
  }
@@ -496,7 +491,7 @@ const $ = h.createContext(null), rt = ({
496
491
  }
497
492
  );
498
493
  }
499
- ), q = Ct, gt = ({
494
+ ), q = Ct, Et = ({
500
495
  ariaLabel: t,
501
496
  beat: e,
502
497
  index: o,
@@ -504,15 +499,15 @@ const $ = h.createContext(null), rt = ({
504
499
  onCardClick: r,
505
500
  posthog: s,
506
501
  widthOverrides: a,
507
- variant: _,
502
+ variant: p,
508
503
  showIcon: C,
509
504
  heightOverrides: m
510
505
  }) => {
511
- const { ref: p, inView: c } = Te({
506
+ const { ref: u, inView: c } = fe({
512
507
  threshold: we
513
- }), { cardsCopy: d } = D(), { onEvent: l } = j(), { updateBeat: I, updateOffer: g } = pt();
508
+ }), { cardsCopy: d } = D(), { onEvent: l } = j(), { updateBeat: I, updateOffer: E } = pt();
514
509
  ie(() => {
515
- c && (e.has_been_displayed ? l(Oe(e.template)) : (e.guid.startsWith("OFR") ? g({
510
+ c && (e.has_been_displayed ? l(ye(e.template)) : (e.guid.startsWith("OFR") ? E({
516
511
  ...e,
517
512
  has_been_displayed: !0
518
513
  }) : I({
@@ -535,8 +530,8 @@ const $ = h.createContext(null), rt = ({
535
530
  position: o
536
531
  });
537
532
  }, [e, o, c]);
538
- const E = () => {
539
- if (r && r(e), l(ye(e.template)), e.template === "MarketingOffer") {
533
+ const g = () => {
534
+ if (r && r(e), l(Oe(e.template)), e.template === "MarketingOffer") {
540
535
  const A = e;
541
536
  s?.capture("clicked_messaging_insight", {
542
537
  template: e.template,
@@ -563,16 +558,16 @@ const $ = h.createContext(null), rt = ({
563
558
  heightOverrides: m,
564
559
  icon: C && /* @__PURE__ */ i(ut, { beat: e }),
565
560
  isActiveCard: n,
566
- onCardClick: E,
567
- onPrimaryAction: E,
561
+ onCardClick: g,
562
+ onPrimaryAction: g,
568
563
  primaryActionText: e.micro_call_to_action || d.micro_card_cta,
569
- ref: p,
564
+ ref: u,
570
565
  title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
571
- variant: _,
566
+ variant: p,
572
567
  widthOverrides: a
573
568
  }
574
569
  );
575
- }, Et = ({
570
+ }, gt = ({
576
571
  currentBeatIndex: t,
577
572
  numBeats: e,
578
573
  onNextClick: o,
@@ -580,9 +575,9 @@ const $ = h.createContext(null), rt = ({
580
575
  scrollRightBoundary: r,
581
576
  scrollX: s,
582
577
  shouldApplyDotAnimation: a = !1,
583
- visibleCardsCount: _ = 1
578
+ visibleCardsCount: p = 1
584
579
  }) => {
585
- const C = H(), { carouselCopy: m } = D(), p = Math.floor(s) > r || t - _ + 1 === 0, c = s < 0 || e - 1 === t, d = C.palette.grey[500], l = C.palette.primary.main;
580
+ const C = H(), { carouselCopy: m } = D(), u = Math.floor(s) > r || t - p + 1 === 0, c = s < 0 || e - 1 === t, d = C.palette.grey[500], l = C.palette.primary.main;
586
581
  return /* @__PURE__ */ L(
587
582
  N,
588
583
  {
@@ -601,28 +596,28 @@ const $ = h.createContext(null), rt = ({
601
596
  /* @__PURE__ */ i(
602
597
  re,
603
598
  {
604
- "aria-disabled": p,
599
+ "aria-disabled": u,
605
600
  "aria-label": m.previous_insight_cta_aria,
606
- disabled: p,
601
+ disabled: u,
607
602
  onClick: n,
608
603
  children: /* @__PURE__ */ i(
609
- Ve,
604
+ ke,
610
605
  {
611
606
  style: {
612
- color: p ? d : l
607
+ color: u ? d : l
613
608
  }
614
609
  }
615
610
  )
616
611
  }
617
612
  ),
618
- Array.from({ length: e }).map((I, g) => {
619
- const E = g === t;
613
+ Array.from({ length: e }).map((I, E) => {
614
+ const g = E === t;
620
615
  return /* @__PURE__ */ i(
621
616
  Q,
622
617
  {
623
618
  className: "mx-insights-micro-carousel-dots",
624
619
  sx: {
625
- bgcolor: E ? l : d,
620
+ bgcolor: g ? l : d,
626
621
  height: 8,
627
622
  mr: 8,
628
623
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
@@ -635,10 +630,10 @@ const $ = h.createContext(null), rt = ({
635
630
  borderRadius: "50%",
636
631
  p: 0
637
632
  },
638
- width: E && a ? 24 : 8
633
+ width: g && a ? 24 : 8
639
634
  }
640
635
  },
641
- `carousel-button-${g}`
636
+ `carousel-button-${E}`
642
637
  );
643
638
  }),
644
639
  /* @__PURE__ */ i(
@@ -649,7 +644,7 @@ const $ = h.createContext(null), rt = ({
649
644
  disabled: c,
650
645
  onClick: o,
651
646
  children: /* @__PURE__ */ i(
652
- fe,
647
+ Te,
653
648
  {
654
649
  style: {
655
650
  color: c ? d : l
@@ -669,33 +664,33 @@ const $ = h.createContext(null), rt = ({
669
664
  heightOverrides: r,
670
665
  onCardClick: s,
671
666
  posthog: a,
672
- showIcon: _,
667
+ showIcon: p,
673
668
  variant: C
674
669
  }) => {
675
- const { carouselCopy: m } = D(), p = {
670
+ const { carouselCopy: m } = D(), u = {
676
671
  showCTAColocatedWithText: n,
677
672
  heightOverrides: r,
678
673
  posthog: a,
679
- showIcon: _,
674
+ showIcon: p,
680
675
  variant: C
681
676
  };
682
677
  return /* @__PURE__ */ L(Se, { children: [
683
678
  e.map((c, d) => {
684
- const l = d + 1, I = e.length + 1, g = Fe(
679
+ const l = d + 1, I = e.length + 1, E = Fe(
685
680
  m.card_position_in_carousel_aria,
686
681
  l.toString(),
687
682
  I.toString()
688
- ), E = c.micro_title && c.micro_title.length > 0, A = c.micro_description && c.micro_description.length > 0, v = E ? c.micro_title : c.title, V = A ? c.micro_description : c.description;
683
+ ), g = c.micro_title && c.micro_title.length > 0, A = c.micro_description && c.micro_description.length > 0, v = g ? c.micro_title : c.title, V = A ? c.micro_description : c.description;
689
684
  return /* @__PURE__ */ i(
690
- gt,
685
+ Et,
691
686
  {
692
- ariaLabel: `${g}: ${v}, ${V}`,
687
+ ariaLabel: `${E}: ${v}, ${V}`,
693
688
  beat: c,
694
689
  index: d,
695
690
  isActiveCard: d === t,
696
691
  onCardClick: s,
697
692
  widthOverrides: o || void 0,
698
- ...p
693
+ ...u
699
694
  },
700
695
  `${c.guid} ${d}`
701
696
  );
@@ -706,7 +701,7 @@ const $ = h.createContext(null), rt = ({
706
701
  isActiveCard: t === e.length,
707
702
  onCardClick: s,
708
703
  widthOverrides: o || void 0,
709
- ...p
704
+ ...u
710
705
  }
711
706
  )
712
707
  ] });
@@ -718,15 +713,15 @@ const $ = h.createContext(null), rt = ({
718
713
  heightOverrides: r,
719
714
  onCardClick: s,
720
715
  posthog: a,
721
- showCarouselControls: _,
716
+ showCarouselControls: p,
722
717
  showIcon: C,
723
718
  showWithMargin: m = !0,
724
- variant: p,
719
+ variant: u,
725
720
  widthOverrides: c,
726
721
  visibleCardsCount: d = 1
727
722
  // Default to 1 card visible
728
723
  }) => {
729
- const l = h.useRef(null), I = h.useRef(null), [g, E] = h.useState(0), [A, v] = h.useState(null), [V, S] = h.useState(null), [f, M] = h.useState(null), { carouselCopy: w } = D(), { onEvent: u } = j();
724
+ const l = h.useRef(null), I = h.useRef(null), [E, g] = h.useState(0), [A, v] = h.useState(null), [V, S] = h.useState(null), [T, M] = h.useState(null), { carouselCopy: w } = D(), { onEvent: _ } = j();
730
725
  h.useEffect(() => {
731
726
  if (l.current && !e) {
732
727
  const W = l.current.offsetWidth, K = 8;
@@ -762,27 +757,27 @@ const $ = h.createContext(null), rt = ({
762
757
  }
763
758
  }, [e, I]);
764
759
  const Y = () => {
765
- u(O.ON_CAROUSEL_FORWARD_CLICK, t), l.current && f && l.current.scrollTo({
766
- left: g + f + 8,
760
+ _(y.ON_CAROUSEL_FORWARD_CLICK, t), l.current && T && l.current.scrollTo({
761
+ left: E + T + 8,
767
762
  top: 0,
768
763
  behavior: "smooth"
769
764
  });
770
765
  }, X = () => {
771
- u(O.ON_CAROUSEL_BACK_CLICK, t), l.current && f && l.current.scrollTo({
772
- left: Math.max(0, g - (f + 8)),
766
+ _(y.ON_CAROUSEL_BACK_CLICK, t), l.current && T && l.current.scrollTo({
767
+ left: Math.max(0, E - (T + 8)),
773
768
  top: 0,
774
769
  behavior: "smooth"
775
770
  });
776
771
  }, J = () => {
777
- l.current && E(l.current.scrollLeft);
772
+ l.current && g(l.current.scrollLeft);
778
773
  }, ee = () => {
779
774
  if (!V || !A) return;
780
- V - A > mt ? u(O.ON_CAROUSEL_FORWARD_SWIPE, t) : u(O.ON_CAROUSEL_BACK_SWIPE, t);
775
+ V - A > mt ? _(y.ON_CAROUSEL_FORWARD_SWIPE, t) : _(y.ON_CAROUSEL_BACK_SWIPE, t);
781
776
  }, te = (W) => {
782
777
  v(W.targetTouches[0].clientX);
783
778
  }, Z = (W) => {
784
779
  v(null), S(W.targetTouches[0].clientX);
785
- }, x = f ? Math.round(g / (f + 8)) : 0, ve = l.current ? l.current.scrollWidth - l.current.offsetWidth : 0;
780
+ }, x = T ? Math.round(E / (T + 8)) : 0, ve = l.current ? l.current.scrollWidth - l.current.offsetWidth : 0;
786
781
  return /* @__PURE__ */ L(
787
782
  N,
788
783
  {
@@ -828,26 +823,26 @@ const $ = h.createContext(null), rt = ({
828
823
  {
829
824
  activeCardIndex: x,
830
825
  beats: o,
831
- cardWidth: f,
826
+ cardWidth: T,
832
827
  heightOverrides: r,
833
828
  onCardClick: s,
834
829
  posthog: a,
835
830
  showCTAColocatedWithText: n,
836
831
  showIcon: C,
837
- variant: p
832
+ variant: u
838
833
  }
839
834
  )
840
835
  }
841
836
  ),
842
- _ && /* @__PURE__ */ i(
843
- Et,
837
+ p && /* @__PURE__ */ i(
838
+ gt,
844
839
  {
845
840
  currentBeatIndex: x + d - 1,
846
841
  numBeats: o.length + 1,
847
842
  onNextClick: Y,
848
843
  onPreviousClick: X,
849
844
  scrollRightBoundary: ve,
850
- scrollX: g,
845
+ scrollX: E,
851
846
  shouldApplyDotAnimation: e,
852
847
  visibleCardsCount: d
853
848
  }
@@ -855,14 +850,14 @@ const $ = h.createContext(null), rt = ({
855
850
  ]
856
851
  }
857
852
  );
858
- }, St = U(At), ft = ({
853
+ }, St = U(At), Tt = ({
859
854
  analyticsMetadata: t,
860
855
  onCardClick: e,
861
856
  posthog: o,
862
857
  widthOverrides: n
863
858
  }) => {
864
859
  const { carouselCopy: r } = D(), { onEvent: s } = j(), a = () => {
865
- s && (s(O.ON_VIEW_MORE_CLICKED, t), e(), o?.capture("clicked_view_more"));
860
+ s && (s(y.ON_VIEW_MORE_CLICKED, t), e(), o?.capture("clicked_view_more"));
866
861
  };
867
862
  return r ? /* @__PURE__ */ L(
868
863
  N,
@@ -872,40 +867,26 @@ const $ = h.createContext(null), rt = ({
872
867
  justifyContent: "space-between",
873
868
  spacing: 2,
874
869
  sx: {
875
- padding: 16,
870
+ p: 16,
871
+ pb: 8,
876
872
  width: n || void 0
877
873
  },
878
874
  children: [
879
- /* @__PURE__ */ i(
880
- be,
881
- {
882
- sx: (_) => ({
883
- color: _.palette.primary.main,
884
- fontSize: 18,
885
- fontWeight: 700,
886
- lineHeight: "24px"
887
- }),
888
- variant: "h3",
889
- children: r.carousel_title
890
- }
891
- ),
875
+ /* @__PURE__ */ i(Be, { children: r.carousel_title }),
892
876
  /* @__PURE__ */ i(
893
877
  ne,
894
878
  {
895
- endIcon: /* @__PURE__ */ i(fe, { size: 20 }),
879
+ endIcon: /* @__PURE__ */ i(Te, { size: 20 }),
896
880
  onClick: a,
897
881
  size: "small",
898
- sx: (_) => ({
899
- color: _.palette.primary.main
900
- }),
901
882
  variant: "text",
902
883
  children: r.view_all_insights_in_full_feed_cta_aria
903
884
  }
904
885
  )
905
886
  ]
906
887
  }
907
- ) : /* @__PURE__ */ i(Ge, {});
908
- }, Tt = U(ft), Rt = ({
888
+ ) : /* @__PURE__ */ i(ze, {});
889
+ }, ft = U(Tt), Rt = ({
909
890
  heightOverrides: t,
910
891
  widthOverrides: e,
911
892
  children: o
@@ -934,12 +915,12 @@ const $ = h.createContext(null), rt = ({
934
915
  showIcon: r,
935
916
  variant: s
936
917
  }) => {
937
- const { cardsCopy: a } = D(), _ = H(), { onEvent: C } = j(), { onPageview: m } = Me();
918
+ const { cardsCopy: a } = D(), p = H(), { onEvent: C } = j(), { onPageview: m } = Me();
938
919
  h.useEffect(() => {
939
920
  m(k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
940
921
  }, []);
941
- const p = () => {
942
- o && o(), C(O.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
922
+ const u = () => {
923
+ o && o(), C(y.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
943
924
  template: "no_relevant_insights"
944
925
  });
945
926
  };
@@ -953,22 +934,22 @@ const $ = h.createContext(null), rt = ({
953
934
  description: a.no_relevant_insights_card_description,
954
935
  hasCardEffect: !0,
955
936
  heightOverrides: e,
956
- icon: r && /* @__PURE__ */ i(R, { bgColor: T(_.palette.primary.main, 0.15), name: "lightbulb" }),
957
- onCardClick: p,
958
- onPrimaryAction: p,
937
+ icon: r && /* @__PURE__ */ i(R, { bgColor: f(p.palette.primary.main, 0.15), name: "lightbulb" }),
938
+ onCardClick: u,
939
+ onPrimaryAction: u,
959
940
  primaryActionText: a.micro_card_cta,
960
941
  title: a.no_relevant_insights_card_title,
961
942
  variant: s
962
943
  }
963
944
  );
964
- }, Jt = U(Le), De = ({
945
+ }, qt = U(Le), De = ({
965
946
  ariaLabel: t,
966
947
  heightOverrides: e,
967
948
  onCardClick: o,
968
949
  showIcon: n,
969
950
  variant: r
970
951
  }) => {
971
- const { onPageview: s } = Me(), { zeroStateCopy: a } = D(), _ = H();
952
+ const { onPageview: s } = Me(), { zeroStateCopy: a } = D(), p = H();
972
953
  return h.useEffect(() => {
973
954
  s(k.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
974
955
  }, []), /* @__PURE__ */ i(
@@ -981,13 +962,13 @@ const $ = h.createContext(null), rt = ({
981
962
  description: a.carousel_zero_state_description,
982
963
  hasCardEffect: !0,
983
964
  heightOverrides: e,
984
- icon: n && /* @__PURE__ */ i(R, { bgColor: T(_.palette.primary.main, 0.15), name: "lightbulb" }),
965
+ icon: n && /* @__PURE__ */ i(R, { bgColor: f(p.palette.primary.main, 0.15), name: "lightbulb" }),
985
966
  onCardClick: o,
986
967
  title: a.carousel_zero_state_title,
987
968
  variant: r
988
969
  }
989
970
  );
990
- }, eo = U(De), yt = () => /* @__PURE__ */ i(
971
+ }, Jt = U(De), Ot = () => /* @__PURE__ */ i(
991
972
  Q,
992
973
  {
993
974
  sx: {
@@ -999,7 +980,7 @@ const $ = h.createContext(null), rt = ({
999
980
  },
1000
981
  children: /* @__PURE__ */ i(He, {})
1001
982
  }
1002
- ), G = new nt(), Ot = ({
983
+ ), G = new nt(), yt = ({
1003
984
  allowSingleCardPeeking: t,
1004
985
  areBeatsLoading: e,
1005
986
  beats: o = [],
@@ -1008,61 +989,61 @@ const $ = h.createContext(null), rt = ({
1008
989
  endpoint: r = "/",
1009
990
  heightOverrides: s,
1010
991
  logOutUser: a,
1011
- onCardClick: _ = () => {
992
+ onCardClick: p = () => {
1012
993
  },
1013
994
  onEvent: C = () => {
1014
995
  },
1015
996
  onPageview: m = () => {
1016
997
  },
1017
- posthog: p,
998
+ posthog: u,
1018
999
  showBorder: c = !0,
1019
1000
  showCarouselControls: d,
1020
1001
  showHeader: l,
1021
1002
  showIcon: I,
1022
- showWithMargin: g = !0,
1023
- token: E = "",
1003
+ showWithMargin: E = !0,
1004
+ token: g = "",
1024
1005
  userHasFullInsightFeedBeats: A,
1025
1006
  variant: v,
1026
1007
  visibleCardsCount: V = 1,
1027
1008
  widthOverrides: S
1028
1009
  }) => {
1029
- const [f, M] = oe("STANDARD"), [w, u] = oe(!1), [Y, X] = oe(!1), J = je([C], G), ee = Ye([m], G);
1010
+ const [T, M] = oe("STANDARD"), [w, _] = oe(!1), [Y, X] = oe(!1), J = je([C], G), ee = Ye([m], G);
1030
1011
  Xe({
1031
1012
  widgetName: "InsightsMicroWidget",
1032
1013
  isLoaded: w
1033
1014
  }), h.useEffect(() => {
1034
- !G.isInitialized && !Y && (G.initialize(r, E, a).catch(() => X(!1)), X(!0));
1035
- }, [r, E, a, G.isInitialized, Y]), h.useEffect(() => {
1015
+ !G.isInitialized && !Y && (G.initialize(r, g, a).catch(() => X(!1)), X(!0));
1016
+ }, [r, g, a, G.isInitialized, Y]), h.useEffect(() => {
1036
1017
  const x = window.innerHeight;
1037
1018
  x < 180 ? M("STANDARD") : x >= 180 && x < 200 ? M("LARGE") : x >= 200 && x < 248 ? M("XLARGE") : x >= 248 && M("XXLARGE");
1038
1019
  }, [window.innerHeight]), h.useEffect(() => {
1039
- u(!e && G.isInitialized);
1020
+ _(!e && G.isInitialized);
1040
1021
  }, [e, G.isInitialized]);
1041
1022
  const te = {
1042
1023
  showCTAColocatedWithText: n,
1043
1024
  heightOverrides: s,
1044
- onCardClick: _,
1045
- posthog: p,
1025
+ onCardClick: p,
1026
+ posthog: u,
1046
1027
  showIcon: I,
1047
- showWithMargin: g,
1028
+ showWithMargin: E,
1048
1029
  widthOverrides: S
1049
1030
  }, Z = {
1050
- carouselSize: f,
1031
+ carouselSize: T,
1051
1032
  variant: v,
1052
1033
  showCTAColocatedWithText: n,
1053
1034
  heightOverrides: s,
1054
- onCardClick: _,
1055
- posthog: p,
1035
+ onCardClick: p,
1036
+ posthog: u,
1056
1037
  showIcon: I
1057
1038
  };
1058
1039
  return /* @__PURE__ */ i(rt, { onEvent: J, onPageview: ee, store: G, children: /* @__PURE__ */ L(Rt, { heightOverrides: s, widthOverrides: S, children: [
1059
- !w && /* @__PURE__ */ i(yt, {}),
1040
+ !w && /* @__PURE__ */ i(Ot, {}),
1060
1041
  w && l && /* @__PURE__ */ i(
1061
- Tt,
1042
+ ft,
1062
1043
  {
1063
1044
  analyticsMetadata: me,
1064
- onCardClick: _,
1065
- posthog: p,
1045
+ onCardClick: p,
1046
+ posthog: u,
1066
1047
  widthOverrides: S
1067
1048
  }
1068
1049
  ),
@@ -1090,8 +1071,8 @@ const $ = h.createContext(null), rt = ({
1090
1071
  N,
1091
1072
  {
1092
1073
  sx: {
1093
- height: `calc(${ht[f]}px - 44px)`,
1094
- width: g ? `calc(${S}px - 32px)` : "100%"
1074
+ height: `calc(${ht[T]}px - 44px)`,
1075
+ width: E ? `calc(${S}px - 32px)` : "100%"
1095
1076
  },
1096
1077
  children: A ? /* @__PURE__ */ i(Le, { ...Z }) : /* @__PURE__ */ i(De, { ...Z })
1097
1078
  }
@@ -1099,7 +1080,7 @@ const $ = h.createContext(null), rt = ({
1099
1080
  }
1100
1081
  )
1101
1082
  ] }) });
1102
- }, to = U(Ot), Wt = ({
1083
+ }, eo = U(yt), Wt = ({
1103
1084
  ariaLabel: t,
1104
1085
  heightOverrides: e,
1105
1086
  isActiveCard: o,
@@ -1107,18 +1088,18 @@ const $ = h.createContext(null), rt = ({
1107
1088
  posthog: r,
1108
1089
  widthOverrides: s,
1109
1090
  showIcon: a,
1110
- variant: _
1091
+ variant: p
1111
1092
  }) => {
1112
- const C = H(), { ref: m, inView: p } = Te({
1093
+ const C = H(), { ref: m, inView: u } = fe({
1113
1094
  threshold: we
1114
1095
  }), { cardsCopy: c } = D(), { onEvent: d } = j();
1115
1096
  ie(() => {
1116
- p && (d(Ne.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1097
+ u && (d(Ne.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1117
1098
  template: "view_more_card"
1118
1099
  }));
1119
- }, [p]);
1100
+ }, [u]);
1120
1101
  const l = () => {
1121
- n && n(), d(O.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1102
+ n && n(), d(y.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1122
1103
  template: "view_more_card"
1123
1104
  });
1124
1105
  };
@@ -1133,29 +1114,29 @@ const $ = h.createContext(null), rt = ({
1133
1114
  description: c.view_more_card_description,
1134
1115
  hasCardEffect: !0,
1135
1116
  heightOverrides: e,
1136
- icon: a && /* @__PURE__ */ i(R, { bgColor: T(C.palette.primary.main, 0.15), name: "show_chart" }),
1117
+ icon: a && /* @__PURE__ */ i(R, { bgColor: f(C.palette.primary.main, 0.15), name: "show_chart" }),
1137
1118
  isActiveCard: o,
1138
1119
  onCardClick: l,
1139
1120
  onPrimaryAction: l,
1140
1121
  primaryActionText: c.micro_card_cta,
1141
1122
  ref: m,
1142
1123
  title: c.view_more_card_title,
1143
- variant: _,
1124
+ variant: p,
1144
1125
  widthOverrides: s
1145
1126
  }
1146
1127
  );
1147
1128
  }, Nt = U(Wt);
1148
1129
  export {
1149
1130
  nt as A,
1150
- Tt as C,
1131
+ ft as C,
1151
1132
  rt as I,
1152
1133
  St as M,
1153
- Jt as N,
1134
+ qt as N,
1154
1135
  me as T,
1155
1136
  Nt as V,
1156
- eo as Z,
1157
- gt as a,
1158
- to as b,
1137
+ Jt as Z,
1138
+ Et as a,
1139
+ eo as b,
1159
1140
  dt as c,
1160
1141
  q as d
1161
1142
  };
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { Icon } from '@mxenabled/mx-icons';
3
- declare const BeatMaterialIcon: ({ bgColor, name, iconColor, }: {
3
+ interface BeatMaterialIconProps {
4
4
  bgColor?: string;
5
5
  name: string;
6
- iconColor?: React.ComponentProps<typeof Icon>["color"];
7
- }) => import("react/jsx-runtime").JSX.Element;
6
+ iconColor?: React.ComponentProps<typeof Icon>['color'];
7
+ }
8
+ export declare const BeatMaterialIcon: ({ bgColor, name, iconColor }: BeatMaterialIconProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export default BeatMaterialIcon;
@@ -1,5 +1,5 @@
1
1
  export { BeatCategoryIcon } from './BeatCategoryIcon';
2
- export { default as BeatMaterialIcon } from './BeatMaterialIcon';
2
+ export { BeatMaterialIcon } from './BeatMaterialIcon';
3
3
  export { default as BeatMerchantLogo } from './BeatMerchantLogo';
4
4
  export { ChartFilledIcon } from './ChartFilledIcon';
5
5
  export { MonthlySpendComparisonIcon } from './MonthlySpendComparisonIcon';
@@ -1,4 +1,4 @@
1
- import { A as u, C as s, a as c, b as v, I as C, M as R, d as H, c as M, N as F, V, Z as k } from "../ViewMoreMicroCard-CL1_NwLt.mjs";
1
+ import { A as u, C as s, a as c, b as v, I as C, M as R, d as H, c as M, N as F, V, Z as k } from "../ViewMoreMicroCard-DSLtQ92j.mjs";
2
2
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
3
3
  const a = ({
4
4
  color: i = "currentColor",
@@ -29,7 +29,7 @@ import { c as Et, i as Dt, d as Mt, e as At, b as tt, g as ot, f as Pe } from ".
29
29
  import Rt from "@mui/material/ToggleButton";
30
30
  import kt from "@mui/material/ToggleButtonGroup";
31
31
  import { DataGridPro as Ht } from "@mui/x-data-grid-pro";
32
- import { T as V, b as Nt } from "../ViewMoreMicroCard-CL1_NwLt.mjs";
32
+ import { T as V, b as Nt } from "../ViewMoreMicroCard-DSLtQ92j.mjs";
33
33
  import { parseISO as nt } from "date-fns/parseISO";
34
34
  import { H as Re } from "../HeaderCell-DjuifqHJ.mjs";
35
35
  import { A as w, W as st } from "../WidgetContainer-RACapQsn.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.7.0",
3
+ "version": "7.7.1-alpha.san1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",