@mx-cartographer/experiences 7.7.1 → 7.7.2

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
@@ -1,3 +1,7 @@
1
+ ## [7.7.2] - 01-28-2026
2
+
3
+ - **UPDATED** - `MicroInsights` CardHeader Style
4
+
1
5
  ## [7.7.1] - 01-27-2026
2
6
 
3
7
  - **FIXED** - Remove usage of h1 markup while maintaining H1 styles
@@ -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)]: {
81
- action: B.MICRO_BEAT_CLICKED,
82
- category: P.BEAT_INTERACTION,
79
+ [Oe(e)]: {
80
+ action: P.MICRO_BEAT_CLICKED,
81
+ category: b.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)]: {
92
- action: B.MICRO_BEAT_DISPLAYED,
93
- category: P.BEAT_INTERACTION,
90
+ [ye(e)]: {
91
+ action: P.MICRO_BEAT_DISPLAYED,
92
+ category: b.BEAT_INTERACTION,
94
93
  label: ce(e),
95
- value: y
94
+ value: O
96
95
  }
97
96
  }),
98
97
  {}
@@ -100,22 +99,22 @@ const se = {
100
99
  (t, e) => ({
101
100
  ...t,
102
101
  [We(e)]: {
103
- action: B.MICRO_BEAT_DISPLAYED_FIRST_TIME,
104
- category: P.BEAT_INTERACTION,
102
+ action: P.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
+ category: b.BEAT_INTERACTION,
105
104
  label: ce(e),
106
- value: y
105
+ value: O
107
106
  }
108
107
  }),
109
108
  {}
110
- ), b = {
109
+ ), x = {
111
110
  CARD: "Card",
112
111
  CAROUSEL_CONTROL: "Carousel Control",
113
112
  MICRO_WIDGET: "Micro Widget",
114
113
  VIEW_MORE: "View More"
115
- }, P = {
114
+ }, b = {
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",
@@ -124,7 +123,7 @@ const se = {
124
123
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
125
124
  }, Ne = {
126
125
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
127
- }, B = {
126
+ }, P = {
128
127
  CONTROL_BACKWARD: "Control Backward",
129
128
  CONTROL_FORWARD: "Control Forward",
130
129
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -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
- label: b.MICRO_WIDGET,
140
+ label: x.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
- label: b.MICRO_WIDGET,
147
+ label: x.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
- label: b.MICRO_WIDGET,
154
+ label: x.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]: {
163
- action: B.CONTROL_BACKWARD,
164
- category: P.MICRO_WIDGET_INTERACTION,
165
- label: b.CAROUSEL_CONTROL,
166
- value: y
161
+ [y.ON_CAROUSEL_BACK_CLICK]: {
162
+ action: P.CONTROL_BACKWARD,
163
+ category: b.MICRO_WIDGET_INTERACTION,
164
+ label: x.CAROUSEL_CONTROL,
165
+ value: O
167
166
  },
168
- [O.ON_CAROUSEL_FORWARD_CLICK]: {
169
- action: B.CONTROL_FORWARD,
170
- category: P.MICRO_WIDGET_INTERACTION,
171
- label: b.CAROUSEL_CONTROL,
172
- value: y
167
+ [y.ON_CAROUSEL_FORWARD_CLICK]: {
168
+ action: P.CONTROL_FORWARD,
169
+ category: b.MICRO_WIDGET_INTERACTION,
170
+ label: x.CAROUSEL_CONTROL,
171
+ value: O
173
172
  },
174
- [O.ON_CAROUSEL_BACK_SWIPE]: {
175
- action: B.SWIPE_BACKWARD,
176
- category: P.MICRO_WIDGET_INTERACTION,
177
- label: b.CAROUSEL_CONTROL,
178
- value: y
173
+ [y.ON_CAROUSEL_BACK_SWIPE]: {
174
+ action: P.SWIPE_BACKWARD,
175
+ category: b.MICRO_WIDGET_INTERACTION,
176
+ label: x.CAROUSEL_CONTROL,
177
+ value: O
179
178
  },
180
- [O.ON_CAROUSEL_FORWARD_SWIPE]: {
181
- action: B.SWIPE_FORWARD,
182
- category: P.MICRO_WIDGET_INTERACTION,
183
- label: b.CAROUSEL_CONTROL,
184
- value: y
179
+ [y.ON_CAROUSEL_FORWARD_SWIPE]: {
180
+ action: P.SWIPE_FORWARD,
181
+ category: b.MICRO_WIDGET_INTERACTION,
182
+ label: x.CAROUSEL_CONTROL,
183
+ value: O
185
184
  },
186
185
  // read more card events
187
- [O.ON_VIEW_MORE_CLICKED]: {
188
- action: B.MICRO_BEAT_CLICKED,
189
- category: P.BEAT_INTERACTION,
190
- label: b.VIEW_MORE,
191
- value: y
186
+ [y.ON_VIEW_MORE_CLICKED]: {
187
+ action: P.MICRO_BEAT_CLICKED,
188
+ category: b.BEAT_INTERACTION,
189
+ label: x.VIEW_MORE,
190
+ value: O
192
191
  },
193
192
  [Ne.ON_VIEW_MORE_VIEWED]: {
194
- action: B.MICRO_BEAT_DISPLAYED,
195
- category: P.BEAT_INTERACTION,
196
- label: b.VIEW_MORE,
197
- value: y
193
+ action: P.MICRO_BEAT_DISPLAYED,
194
+ category: b.BEAT_INTERACTION,
195
+ label: x.VIEW_MORE,
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 {
@@ -212,13 +211,13 @@ class it {
212
211
  ae(this);
213
212
  }
214
213
  initialize = async (e, o, n) => {
215
- this.onAnalyticEvent = (r, s) => {
216
- Ie(r, s).then((a) => a).catch((a) => {
217
- throw a.status === 401 && n(), a;
214
+ this.onAnalyticEvent = (r, a) => {
215
+ Ie(r, a).then((s) => s).catch((s) => {
216
+ throw s.status === 401 && n(), s;
218
217
  });
219
- }, this.onAnalyticPageView = (r, s) => {
220
- Ae(r, s).then((a) => a).catch((a) => {
221
- throw a.status === 401 && n(), a;
218
+ }, this.onAnalyticPageView = (r, a) => {
219
+ Ae(r, a).then((s) => s).catch((s) => {
220
+ throw s.status === 401 && n(), s;
222
221
  });
223
222
  }, this.beatApi = new he(e, o);
224
223
  };
@@ -254,7 +253,7 @@ 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 } });
256
+ return /* @__PURE__ */ i(be, { categoryGuid: n, size: 32, sx: { minWidth: 32 } });
258
257
  }, R = ({
259
258
  bgColor: t,
260
259
  name: e,
@@ -268,12 +267,12 @@ const $ = h.createContext(null), rt = ({
268
267
  height: 32
269
268
  },
270
269
  variant: "rounded",
271
- children: /* @__PURE__ */ i(Pe, { color: o, fill: !0, name: e, size: 20 })
270
+ children: /* @__PURE__ */ i(Ve, { color: o, fill: !0, name: e, size: 20 })
272
271
  }
273
272
  ), st = ({ beat: t }) => {
274
273
  const { category_guids: e, merchant_guids: o, primary_category_guid: n, primary_merchant_guid: r } = t;
275
274
  return /* @__PURE__ */ i(
276
- ze,
275
+ Pe,
277
276
  {
278
277
  categoryGuid: n || e && e[0] || "",
279
278
  merchantGuid: r || o[0],
@@ -295,37 +294,37 @@ const $ = h.createContext(null), rt = ({
295
294
  return !n.length || !r.length ? "primary" : n[0].amount > r[0].amount ? "error" : n[0].amount < r[0].amount ? "success" : "primary";
296
295
  }, dt = ({ beat: t }) => {
297
296
  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" });
297
+ return /* @__PURE__ */ i(R, { bgColor: f(n, 0.15), iconColor: o, name: "bar_chart" });
299
298
  }, _t = {
300
- 0: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "error" }),
299
+ 0: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "error" }),
301
300
  1: (t) => /* @__PURE__ */ i(at, { beat: t }),
302
301
  2: (t) => /* @__PURE__ */ i(st, { beat: t }),
303
302
  3: (t) => /* @__PURE__ */ i(dt, { beat: t }),
304
303
  4: (t, e) => /* @__PURE__ */ i(
305
304
  R,
306
305
  {
307
- bgColor: T(e.palette.secondary.main, 0.15),
306
+ bgColor: f(e.palette.secondary.main, 0.15),
308
307
  iconColor: "secondary",
309
308
  name: "info"
310
309
  }
311
310
  ),
312
- 5: (t, e) => /* @__PURE__ */ i(R, { bgColor: T(e.palette.primary.main, 0.15), name: "campaign" }),
311
+ 5: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "campaign" }),
313
312
  // TODO: Waiting for the backend to accommodate icon types 6, 7, 8, and 9
314
313
  6: (t, e) => /* @__PURE__ */ i(
315
314
  R,
316
315
  {
317
- bgColor: T(e.palette.success.main, 0.15),
316
+ bgColor: f(e.palette.success.main, 0.15),
318
317
  iconColor: "success",
319
318
  name: "check_circle"
320
319
  }
321
320
  ),
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" })
321
+ 7: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "today" }),
322
+ 8: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "calendar_clock" }),
323
+ 9: (t, e) => /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "celebration" })
325
324
  }, ut = ({ beat: t }) => {
326
325
  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" });
328
- }, D = () => {
326
+ return n ? n(t, e) : /* @__PURE__ */ i(R, { bgColor: f(e.palette.primary.main, 0.15), name: "error" });
327
+ }, B = () => {
329
328
  const t = h.useContext($);
330
329
  if (!t)
331
330
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
@@ -356,27 +355,28 @@ const $ = h.createContext(null), rt = ({
356
355
  function({
357
356
  ariaLabel: e,
358
357
  cardSx: o,
359
- description: n,
360
- icon: r,
358
+ closeAriaLabel: n,
359
+ description: r,
360
+ icon: a,
361
361
  isActiveCard: s,
362
- hasCardEffect: a = !1,
363
- heightOverrides: _,
362
+ hasCardEffect: p = !1,
363
+ heightOverrides: m,
364
364
  onClose: C,
365
- onCardClick: m,
366
- onPrimaryAction: p,
367
- onSecondaryAction: c,
368
- primaryActionText: d,
369
- secondaryActionText: l,
370
- title: I,
371
- variant: g,
372
- widthOverrides: E,
373
- ...A
374
- }, v) {
375
- const { cardsCopy: V } = D(), S = !!(p && d), f = !!(c && l), M = a ? Ze : Q, w = /* @__PURE__ */ L(Se, { children: [
365
+ onCardClick: _,
366
+ onPrimaryAction: c,
367
+ onSecondaryAction: d,
368
+ primaryActionText: l,
369
+ secondaryActionText: g,
370
+ title: E,
371
+ variant: A,
372
+ widthOverrides: I,
373
+ ...D
374
+ }, V) {
375
+ const S = !!(c && l), T = !!(d && g), M = p ? Ze : Q, w = /* @__PURE__ */ L(Se, { children: [
376
376
  C && /* @__PURE__ */ i(
377
377
  re,
378
378
  {
379
- "aria-label": V.close,
379
+ "aria-label": n,
380
380
  onClick: (u) => {
381
381
  u.stopPropagation(), C?.();
382
382
  },
@@ -387,18 +387,18 @@ const $ = h.createContext(null), rt = ({
387
387
  u.stopPropagation();
388
388
  },
389
389
  sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
390
- children: /* @__PURE__ */ i(Be, {})
390
+ children: /* @__PURE__ */ i(Ge, {})
391
391
  }
392
392
  ),
393
393
  /* @__PURE__ */ L(N, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
394
394
  /* @__PURE__ */ L(N, { sx: { flexDirection: "row", gap: 12 }, children: [
395
- r && r,
395
+ a && a,
396
396
  /* @__PURE__ */ L(N, { sx: { gap: 6 }, children: [
397
- /* @__PURE__ */ i(N, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ i(_e, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: I }) }),
397
+ /* @__PURE__ */ i(N, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ i(_e, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: E }) }),
398
398
  /* @__PURE__ */ i(
399
399
  _e,
400
400
  {
401
- dangerouslySetInnerHTML: { __html: n },
401
+ dangerouslySetInnerHTML: { __html: r },
402
402
  sx: {
403
403
  display: "-webkit-box",
404
404
  overflow: "hidden",
@@ -419,14 +419,14 @@ const $ = h.createContext(null), rt = ({
419
419
  flexDirection: "row",
420
420
  height: 28,
421
421
  pb: 4,
422
- pl: r ? 36 : 0
422
+ pl: a ? 36 : 0
423
423
  },
424
424
  children: [
425
425
  S && /* @__PURE__ */ i(
426
426
  ne,
427
427
  {
428
428
  onClick: (u) => {
429
- u.stopPropagation(), p?.();
429
+ u.stopPropagation(), c?.();
430
430
  },
431
431
  onMouseDown: (u) => {
432
432
  u.stopPropagation();
@@ -435,16 +435,16 @@ const $ = h.createContext(null), rt = ({
435
435
  u.stopPropagation();
436
436
  },
437
437
  size: "small",
438
- sx: { px: r ? 8 : 0 },
438
+ sx: { px: a ? 8 : 0 },
439
439
  variant: "text",
440
- children: /* @__PURE__ */ i(ue, { bold: !0, variant: "body2", children: d })
440
+ children: /* @__PURE__ */ i(ue, { bold: !0, variant: "body2", children: l })
441
441
  }
442
442
  ),
443
- f && /* @__PURE__ */ i(
443
+ T && /* @__PURE__ */ i(
444
444
  ne,
445
445
  {
446
446
  onClick: (u) => {
447
- u.stopPropagation(), c?.();
447
+ u.stopPropagation(), d?.();
448
448
  },
449
449
  onMouseDown: (u) => {
450
450
  u.stopPropagation();
@@ -455,7 +455,7 @@ const $ = h.createContext(null), rt = ({
455
455
  size: "small",
456
456
  sx: { px: 8 },
457
457
  variant: "text",
458
- children: /* @__PURE__ */ i(ue, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: l })
458
+ children: /* @__PURE__ */ i(ue, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: g })
459
459
  }
460
460
  )
461
461
  ]
@@ -468,27 +468,27 @@ const $ = h.createContext(null), rt = ({
468
468
  {
469
469
  "aria-hidden": !s,
470
470
  "aria-label": e,
471
- ref: v,
471
+ ref: V,
472
472
  role: "group",
473
473
  sx: {
474
474
  backgroundColor: "background.paper",
475
- height: _ ? "100%" : 124,
476
- minWidth: E ? `${E}px` : "100%",
475
+ height: m ? "100%" : 124,
476
+ minWidth: I ? `${I}px` : "100%",
477
477
  position: "relative",
478
478
  ...o
479
479
  },
480
- tabIndex: m || !s ? -1 : 0,
481
- variant: g,
482
- ...A,
483
- children: m ? /* @__PURE__ */ i(
480
+ tabIndex: _ || !s ? -1 : 0,
481
+ variant: A,
482
+ ...D,
483
+ children: _ ? /* @__PURE__ */ i(
484
484
  Qe,
485
485
  {
486
- onClick: m,
486
+ onClick: _,
487
487
  sx: {
488
488
  pb: 8,
489
489
  pt: 16,
490
490
  px: 16,
491
- height: _ ? "100%" : 124
491
+ height: m ? "100%" : 124
492
492
  },
493
493
  children: w
494
494
  }
@@ -496,55 +496,55 @@ const $ = h.createContext(null), rt = ({
496
496
  }
497
497
  );
498
498
  }
499
- ), q = Ct, gt = ({
499
+ ), q = Ct, Et = ({
500
500
  ariaLabel: t,
501
501
  beat: e,
502
502
  index: o,
503
503
  isActiveCard: n,
504
504
  onCardClick: r,
505
- posthog: s,
506
- widthOverrides: a,
507
- variant: _,
508
- showIcon: C,
509
- heightOverrides: m
505
+ posthog: a,
506
+ widthOverrides: s,
507
+ variant: p,
508
+ showIcon: m,
509
+ heightOverrides: C
510
510
  }) => {
511
- const { ref: p, inView: c } = Te({
511
+ const { ref: _, inView: c } = fe({
512
512
  threshold: we
513
- }), { cardsCopy: d } = D(), { onEvent: l } = j(), { updateBeat: I, updateOffer: g } = pt();
513
+ }), { cardsCopy: d } = B(), { onEvent: l } = j(), { updateBeat: g, updateOffer: E } = pt();
514
514
  ie(() => {
515
- c && (e.has_been_displayed ? l(Oe(e.template)) : (e.guid.startsWith("OFR") ? g({
515
+ c && (e.has_been_displayed ? l(ye(e.template)) : (e.guid.startsWith("OFR") ? E({
516
516
  ...e,
517
517
  has_been_displayed: !0
518
- }) : I({
518
+ }) : g({
519
519
  ...e,
520
520
  has_been_displayed: !0
521
521
  }), l(We(e.template))));
522
522
  }, [c]), ie(() => {
523
523
  if (c && e)
524
524
  if (e.template === "MarketingOffer") {
525
- const A = e;
526
- s?.capture("viewed_messaging_insight", {
525
+ const I = e;
526
+ a?.capture("viewed_messaging_insight", {
527
527
  template: e.template,
528
- campaign_guid: A.campaign_guid,
529
- campaign_name: A.pulse_campaign_name
528
+ campaign_guid: I.campaign_guid,
529
+ campaign_name: I.pulse_campaign_name
530
530
  });
531
531
  } else
532
- s?.capture("viewed_insight", {
532
+ a?.capture("viewed_insight", {
533
533
  beat_guid: e.guid,
534
534
  template: e.template,
535
535
  position: o
536
536
  });
537
537
  }, [e, o, c]);
538
- const E = () => {
539
- if (r && r(e), l(ye(e.template)), e.template === "MarketingOffer") {
540
- const A = e;
541
- s?.capture("clicked_messaging_insight", {
538
+ const A = () => {
539
+ if (r && r(e), l(Oe(e.template)), e.template === "MarketingOffer") {
540
+ const I = e;
541
+ a?.capture("clicked_messaging_insight", {
542
542
  template: e.template,
543
- campaign_guid: A.campaign_guid,
544
- campaign_name: A.pulse_campaign_name
543
+ campaign_guid: I.campaign_guid,
544
+ campaign_name: I.pulse_campaign_name
545
545
  });
546
546
  } else
547
- s?.capture("clicked_insight", {
547
+ a?.capture("clicked_insight", {
548
548
  beat_guid: e.guid,
549
549
  template: e.template,
550
550
  position: o
@@ -560,29 +560,29 @@ const $ = h.createContext(null), rt = ({
560
560
  },
561
561
  description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
562
562
  hasCardEffect: !0,
563
- heightOverrides: m,
564
- icon: C && /* @__PURE__ */ i(ut, { beat: e }),
563
+ heightOverrides: C,
564
+ icon: m && /* @__PURE__ */ i(ut, { beat: e }),
565
565
  isActiveCard: n,
566
- onCardClick: E,
567
- onPrimaryAction: E,
566
+ onCardClick: A,
567
+ onPrimaryAction: A,
568
568
  primaryActionText: e.micro_call_to_action || d.micro_card_cta,
569
- ref: p,
569
+ ref: _,
570
570
  title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
571
- variant: _,
572
- widthOverrides: a
571
+ variant: p,
572
+ widthOverrides: s
573
573
  }
574
574
  );
575
- }, Et = ({
575
+ }, gt = ({
576
576
  currentBeatIndex: t,
577
577
  numBeats: e,
578
578
  onNextClick: o,
579
579
  onPreviousClick: n,
580
580
  scrollRightBoundary: r,
581
- scrollX: s,
582
- shouldApplyDotAnimation: a = !1,
583
- visibleCardsCount: _ = 1
581
+ scrollX: a,
582
+ shouldApplyDotAnimation: s = !1,
583
+ visibleCardsCount: p = 1
584
584
  }) => {
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;
585
+ const m = H(), { carouselCopy: C } = B(), _ = Math.floor(a) > r || t - p + 1 === 0, c = a < 0 || e - 1 === t, d = m.palette.grey[500], l = m.palette.primary.main;
586
586
  return /* @__PURE__ */ L(
587
587
  N,
588
588
  {
@@ -601,32 +601,32 @@ const $ = h.createContext(null), rt = ({
601
601
  /* @__PURE__ */ i(
602
602
  re,
603
603
  {
604
- "aria-disabled": p,
605
- "aria-label": m.previous_insight_cta_aria,
606
- disabled: p,
604
+ "aria-disabled": _,
605
+ "aria-label": C.previous_insight_cta_aria,
606
+ disabled: _,
607
607
  onClick: n,
608
608
  children: /* @__PURE__ */ i(
609
- Ve,
609
+ ke,
610
610
  {
611
611
  style: {
612
- color: p ? d : l
612
+ color: _ ? d : l
613
613
  }
614
614
  }
615
615
  )
616
616
  }
617
617
  ),
618
- Array.from({ length: e }).map((I, g) => {
619
- const E = g === t;
618
+ Array.from({ length: e }).map((g, E) => {
619
+ const A = E === t;
620
620
  return /* @__PURE__ */ i(
621
621
  Q,
622
622
  {
623
623
  className: "mx-insights-micro-carousel-dots",
624
624
  sx: {
625
- bgcolor: E ? l : d,
625
+ bgcolor: A ? l : d,
626
626
  height: 8,
627
627
  mr: 8,
628
628
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
629
- ...a ? {
629
+ ...s ? {
630
630
  borderRadius: "4px",
631
631
  transformOrigin: "center",
632
632
  transition: "all 0.5s ease-out",
@@ -635,21 +635,21 @@ const $ = h.createContext(null), rt = ({
635
635
  borderRadius: "50%",
636
636
  p: 0
637
637
  },
638
- width: E && a ? 24 : 8
638
+ width: A && s ? 24 : 8
639
639
  }
640
640
  },
641
- `carousel-button-${g}`
641
+ `carousel-button-${E}`
642
642
  );
643
643
  }),
644
644
  /* @__PURE__ */ i(
645
645
  re,
646
646
  {
647
647
  "aria-disabled": c,
648
- "aria-label": m.next_insight_cta_aria,
648
+ "aria-label": C.next_insight_cta_aria,
649
649
  disabled: c,
650
650
  onClick: o,
651
651
  children: /* @__PURE__ */ i(
652
- fe,
652
+ Te,
653
653
  {
654
654
  style: {
655
655
  color: c ? d : l
@@ -667,35 +667,35 @@ const $ = h.createContext(null), rt = ({
667
667
  cardWidth: o,
668
668
  showCTAColocatedWithText: n,
669
669
  heightOverrides: r,
670
- onCardClick: s,
671
- posthog: a,
672
- showIcon: _,
673
- variant: C
670
+ onCardClick: a,
671
+ posthog: s,
672
+ showIcon: p,
673
+ variant: m
674
674
  }) => {
675
- const { carouselCopy: m } = D(), p = {
675
+ const { carouselCopy: C } = B(), _ = {
676
676
  showCTAColocatedWithText: n,
677
677
  heightOverrides: r,
678
- posthog: a,
679
- showIcon: _,
680
- variant: C
678
+ posthog: s,
679
+ showIcon: p,
680
+ variant: m
681
681
  };
682
682
  return /* @__PURE__ */ L(Se, { children: [
683
683
  e.map((c, d) => {
684
- const l = d + 1, I = e.length + 1, g = Fe(
685
- m.card_position_in_carousel_aria,
684
+ const l = d + 1, g = e.length + 1, E = Fe(
685
+ C.card_position_in_carousel_aria,
686
686
  l.toString(),
687
- 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;
687
+ g.toString()
688
+ ), A = c.micro_title && c.micro_title.length > 0, I = c.micro_description && c.micro_description.length > 0, D = A ? c.micro_title : c.title, V = I ? c.micro_description : c.description;
689
689
  return /* @__PURE__ */ i(
690
- gt,
690
+ Et,
691
691
  {
692
- ariaLabel: `${g}: ${v}, ${V}`,
692
+ ariaLabel: `${E}: ${D}, ${V}`,
693
693
  beat: c,
694
694
  index: d,
695
695
  isActiveCard: d === t,
696
- onCardClick: s,
696
+ onCardClick: a,
697
697
  widthOverrides: o || void 0,
698
- ...p
698
+ ..._
699
699
  },
700
700
  `${c.guid} ${d}`
701
701
  );
@@ -704,9 +704,9 @@ const $ = h.createContext(null), rt = ({
704
704
  Nt,
705
705
  {
706
706
  isActiveCard: t === e.length,
707
- onCardClick: s,
707
+ onCardClick: a,
708
708
  widthOverrides: o || void 0,
709
- ...p
709
+ ..._
710
710
  }
711
711
  )
712
712
  ] });
@@ -716,17 +716,17 @@ const $ = h.createContext(null), rt = ({
716
716
  beats: o = [],
717
717
  showCTAColocatedWithText: n,
718
718
  heightOverrides: r,
719
- onCardClick: s,
720
- posthog: a,
721
- showCarouselControls: _,
722
- showIcon: C,
723
- showWithMargin: m = !0,
724
- variant: p,
719
+ onCardClick: a,
720
+ posthog: s,
721
+ showCarouselControls: p,
722
+ showIcon: m,
723
+ showWithMargin: C = !0,
724
+ variant: _,
725
725
  widthOverrides: c,
726
726
  visibleCardsCount: d = 1
727
727
  // Default to 1 card visible
728
728
  }) => {
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();
729
+ const l = h.useRef(null), g = h.useRef(null), [E, A] = h.useState(0), [I, D] = h.useState(null), [V, S] = h.useState(null), [T, M] = h.useState(null), { carouselCopy: w } = B(), { onEvent: u } = j();
730
730
  h.useEffect(() => {
731
731
  if (l.current && !e) {
732
732
  const W = l.current.offsetWidth, K = 8;
@@ -739,7 +739,7 @@ const $ = h.createContext(null), rt = ({
739
739
  M(z);
740
740
  }
741
741
  }, [d, l.current?.offsetWidth]), h.useEffect(() => {
742
- const W = I.current?.offsetWidth;
742
+ const W = g.current?.offsetWidth;
743
743
  if (typeof W == "number" && e) {
744
744
  const K = (F) => {
745
745
  const de = [
@@ -753,42 +753,42 @@ const $ = h.createContext(null), rt = ({
753
753
  };
754
754
  M(K(W));
755
755
  const z = () => {
756
- const F = I.current?.offsetWidth;
756
+ const F = g.current?.offsetWidth;
757
757
  typeof F == "number" && M(K(F));
758
758
  };
759
759
  return window.addEventListener("resize", z), () => {
760
760
  window.removeEventListener("resize", z);
761
761
  };
762
762
  }
763
- }, [e, I]);
763
+ }, [e, g]);
764
764
  const Y = () => {
765
- u(O.ON_CAROUSEL_FORWARD_CLICK, t), l.current && f && l.current.scrollTo({
766
- left: g + f + 8,
765
+ u(y.ON_CAROUSEL_FORWARD_CLICK, t), l.current && T && l.current.scrollTo({
766
+ left: E + T + 8,
767
767
  top: 0,
768
768
  behavior: "smooth"
769
769
  });
770
770
  }, X = () => {
771
- u(O.ON_CAROUSEL_BACK_CLICK, t), l.current && f && l.current.scrollTo({
772
- left: Math.max(0, g - (f + 8)),
771
+ u(y.ON_CAROUSEL_BACK_CLICK, t), l.current && T && l.current.scrollTo({
772
+ left: Math.max(0, E - (T + 8)),
773
773
  top: 0,
774
774
  behavior: "smooth"
775
775
  });
776
776
  }, J = () => {
777
- l.current && E(l.current.scrollLeft);
777
+ l.current && A(l.current.scrollLeft);
778
778
  }, ee = () => {
779
- if (!V || !A) return;
780
- V - A > mt ? u(O.ON_CAROUSEL_FORWARD_SWIPE, t) : u(O.ON_CAROUSEL_BACK_SWIPE, t);
779
+ if (!V || !I) return;
780
+ V - I > mt ? u(y.ON_CAROUSEL_FORWARD_SWIPE, t) : u(y.ON_CAROUSEL_BACK_SWIPE, t);
781
781
  }, te = (W) => {
782
- v(W.targetTouches[0].clientX);
782
+ D(W.targetTouches[0].clientX);
783
783
  }, Z = (W) => {
784
- 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;
784
+ D(null), S(W.targetTouches[0].clientX);
785
+ }, v = T ? Math.round(E / (T + 8)) : 0, ve = l.current ? l.current.scrollWidth - l.current.offsetWidth : 0;
786
786
  return /* @__PURE__ */ L(
787
787
  N,
788
788
  {
789
789
  "aria-label": w.carousel_title,
790
790
  "aria-roledescription": "carousel",
791
- ref: I,
791
+ ref: g,
792
792
  role: "group/region",
793
793
  sx: {
794
794
  alignItems: "center",
@@ -812,7 +812,7 @@ const $ = h.createContext(null), rt = ({
812
812
  gap: 8,
813
813
  listStyleType: "none",
814
814
  m: 0,
815
- maxWidth: m ? "calc(100% - 32px)" : "100%",
815
+ maxWidth: C ? "calc(100% - 32px)" : "100%",
816
816
  overflowX: "auto",
817
817
  overflowY: "hidden",
818
818
  p: 0,
@@ -826,28 +826,28 @@ const $ = h.createContext(null), rt = ({
826
826
  children: /* @__PURE__ */ i(
827
827
  It,
828
828
  {
829
- activeCardIndex: x,
829
+ activeCardIndex: v,
830
830
  beats: o,
831
- cardWidth: f,
831
+ cardWidth: T,
832
832
  heightOverrides: r,
833
- onCardClick: s,
834
- posthog: a,
833
+ onCardClick: a,
834
+ posthog: s,
835
835
  showCTAColocatedWithText: n,
836
- showIcon: C,
837
- variant: p
836
+ showIcon: m,
837
+ variant: _
838
838
  }
839
839
  )
840
840
  }
841
841
  ),
842
- _ && /* @__PURE__ */ i(
843
- Et,
842
+ p && /* @__PURE__ */ i(
843
+ gt,
844
844
  {
845
- currentBeatIndex: x + d - 1,
845
+ currentBeatIndex: v + d - 1,
846
846
  numBeats: o.length + 1,
847
847
  onNextClick: Y,
848
848
  onPreviousClick: X,
849
849
  scrollRightBoundary: ve,
850
- scrollX: g,
850
+ scrollX: E,
851
851
  shouldApplyDotAnimation: e,
852
852
  visibleCardsCount: d
853
853
  }
@@ -855,14 +855,14 @@ const $ = h.createContext(null), rt = ({
855
855
  ]
856
856
  }
857
857
  );
858
- }, St = U(At), ft = ({
858
+ }, St = U(At), Tt = ({
859
859
  analyticsMetadata: t,
860
860
  onCardClick: e,
861
861
  posthog: o,
862
862
  widthOverrides: n
863
863
  }) => {
864
- const { carouselCopy: r } = D(), { onEvent: s } = j(), a = () => {
865
- s && (s(O.ON_VIEW_MORE_CLICKED, t), e(), o?.capture("clicked_view_more"));
864
+ const { carouselCopy: r } = B(), { onEvent: a } = j(), s = () => {
865
+ a && (a(y.ON_VIEW_MORE_CLICKED, t), e(), o?.capture("clicked_view_more"));
866
866
  };
867
867
  return r ? /* @__PURE__ */ L(
868
868
  N,
@@ -872,45 +872,31 @@ const $ = h.createContext(null), rt = ({
872
872
  justifyContent: "space-between",
873
873
  spacing: 2,
874
874
  sx: {
875
- padding: 16,
875
+ p: 16,
876
+ pb: 8,
876
877
  width: n || void 0
877
878
  },
878
879
  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
- ),
880
+ /* @__PURE__ */ i(Be, { children: r.carousel_title }),
892
881
  /* @__PURE__ */ i(
893
882
  ne,
894
883
  {
895
- endIcon: /* @__PURE__ */ i(fe, { size: 20 }),
896
- onClick: a,
884
+ endIcon: /* @__PURE__ */ i(Te, { size: 20 }),
885
+ onClick: s,
897
886
  size: "small",
898
- sx: (_) => ({
899
- color: _.palette.primary.main
900
- }),
901
887
  variant: "text",
902
888
  children: r.view_all_insights_in_full_feed_cta_aria
903
889
  }
904
890
  )
905
891
  ]
906
892
  }
907
- ) : /* @__PURE__ */ i(Ge, {});
908
- }, Tt = U(ft), Rt = ({
893
+ ) : /* @__PURE__ */ i(ze, {});
894
+ }, ft = U(Tt), Rt = ({
909
895
  heightOverrides: t,
910
896
  widthOverrides: e,
911
897
  children: o
912
898
  }) => {
913
- const { carouselCopy: n } = D();
899
+ const { carouselCopy: n } = B();
914
900
  return /* @__PURE__ */ i(
915
901
  Q,
916
902
  {
@@ -932,14 +918,14 @@ const $ = h.createContext(null), rt = ({
932
918
  onCardClick: o,
933
919
  posthog: n,
934
920
  showIcon: r,
935
- variant: s
921
+ variant: a
936
922
  }) => {
937
- const { cardsCopy: a } = D(), _ = H(), { onEvent: C } = j(), { onPageview: m } = Me();
923
+ const { cardsCopy: s } = B(), p = H(), { onEvent: m } = j(), { onPageview: C } = Me();
938
924
  h.useEffect(() => {
939
- m(k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
925
+ C(k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
940
926
  }, []);
941
- const p = () => {
942
- o && o(), C(O.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
927
+ const _ = () => {
928
+ o && o(), m(y.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
943
929
  template: "no_relevant_insights"
944
930
  });
945
931
  };
@@ -950,27 +936,27 @@ const $ = h.createContext(null), rt = ({
950
936
  cardSx: {
951
937
  borderRadius: 2
952
938
  },
953
- description: a.no_relevant_insights_card_description,
939
+ description: s.no_relevant_insights_card_description,
954
940
  hasCardEffect: !0,
955
941
  heightOverrides: e,
956
- icon: r && /* @__PURE__ */ i(R, { bgColor: T(_.palette.primary.main, 0.15), name: "lightbulb" }),
957
- onCardClick: p,
958
- onPrimaryAction: p,
959
- primaryActionText: a.micro_card_cta,
960
- title: a.no_relevant_insights_card_title,
961
- variant: s
942
+ icon: r && /* @__PURE__ */ i(R, { bgColor: f(p.palette.primary.main, 0.15), name: "lightbulb" }),
943
+ onCardClick: _,
944
+ onPrimaryAction: _,
945
+ primaryActionText: s.micro_card_cta,
946
+ title: s.no_relevant_insights_card_title,
947
+ variant: a
962
948
  }
963
949
  );
964
- }, Jt = U(Le), De = ({
950
+ }, qt = U(Le), De = ({
965
951
  ariaLabel: t,
966
952
  heightOverrides: e,
967
953
  onCardClick: o,
968
954
  showIcon: n,
969
955
  variant: r
970
956
  }) => {
971
- const { onPageview: s } = Me(), { zeroStateCopy: a } = D(), _ = H();
957
+ const { onPageview: a } = Me(), { zeroStateCopy: s } = B(), p = H();
972
958
  return h.useEffect(() => {
973
- s(k.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
959
+ a(k.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
974
960
  }, []), /* @__PURE__ */ i(
975
961
  q,
976
962
  {
@@ -978,16 +964,16 @@ const $ = h.createContext(null), rt = ({
978
964
  cardSx: {
979
965
  borderRadius: 2
980
966
  },
981
- description: a.carousel_zero_state_description,
967
+ description: s.carousel_zero_state_description,
982
968
  hasCardEffect: !0,
983
969
  heightOverrides: e,
984
- icon: n && /* @__PURE__ */ i(R, { bgColor: T(_.palette.primary.main, 0.15), name: "lightbulb" }),
970
+ icon: n && /* @__PURE__ */ i(R, { bgColor: f(p.palette.primary.main, 0.15), name: "lightbulb" }),
985
971
  onCardClick: o,
986
- title: a.carousel_zero_state_title,
972
+ title: s.carousel_zero_state_title,
987
973
  variant: r
988
974
  }
989
975
  );
990
- }, eo = U(De), yt = () => /* @__PURE__ */ i(
976
+ }, Jt = U(De), Ot = () => /* @__PURE__ */ i(
991
977
  Q,
992
978
  {
993
979
  sx: {
@@ -999,70 +985,70 @@ const $ = h.createContext(null), rt = ({
999
985
  },
1000
986
  children: /* @__PURE__ */ i(He, {})
1001
987
  }
1002
- ), G = new nt(), Ot = ({
988
+ ), G = new nt(), yt = ({
1003
989
  allowSingleCardPeeking: t,
1004
990
  areBeatsLoading: e,
1005
991
  beats: o = [],
1006
992
  // This also determines the length of the carousel controls (beat.length + 1)
1007
993
  showCTAColocatedWithText: n = !0,
1008
994
  endpoint: r = "/",
1009
- heightOverrides: s,
1010
- logOutUser: a,
1011
- onCardClick: _ = () => {
995
+ heightOverrides: a,
996
+ logOutUser: s,
997
+ onCardClick: p = () => {
1012
998
  },
1013
- onEvent: C = () => {
999
+ onEvent: m = () => {
1014
1000
  },
1015
- onPageview: m = () => {
1001
+ onPageview: C = () => {
1016
1002
  },
1017
- posthog: p,
1003
+ posthog: _,
1018
1004
  showBorder: c = !0,
1019
1005
  showCarouselControls: d,
1020
1006
  showHeader: l,
1021
- showIcon: I,
1022
- showWithMargin: g = !0,
1023
- token: E = "",
1024
- userHasFullInsightFeedBeats: A,
1025
- variant: v,
1007
+ showIcon: g,
1008
+ showWithMargin: E = !0,
1009
+ token: A = "",
1010
+ userHasFullInsightFeedBeats: I,
1011
+ variant: D,
1026
1012
  visibleCardsCount: V = 1,
1027
1013
  widthOverrides: S
1028
1014
  }) => {
1029
- const [f, M] = oe("STANDARD"), [w, u] = oe(!1), [Y, X] = oe(!1), J = je([C], G), ee = Ye([m], G);
1015
+ const [T, M] = oe("STANDARD"), [w, u] = oe(!1), [Y, X] = oe(!1), J = je([m], G), ee = Ye([C], G);
1030
1016
  Xe({
1031
1017
  widgetName: "InsightsMicroWidget",
1032
1018
  isLoaded: w
1033
1019
  }), 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(() => {
1036
- const x = window.innerHeight;
1037
- x < 180 ? M("STANDARD") : x >= 180 && x < 200 ? M("LARGE") : x >= 200 && x < 248 ? M("XLARGE") : x >= 248 && M("XXLARGE");
1020
+ !G.isInitialized && !Y && (G.initialize(r, A, s).catch(() => X(!1)), X(!0));
1021
+ }, [r, A, s, G.isInitialized, Y]), h.useEffect(() => {
1022
+ const v = window.innerHeight;
1023
+ v < 180 ? M("STANDARD") : v >= 180 && v < 200 ? M("LARGE") : v >= 200 && v < 248 ? M("XLARGE") : v >= 248 && M("XXLARGE");
1038
1024
  }, [window.innerHeight]), h.useEffect(() => {
1039
1025
  u(!e && G.isInitialized);
1040
1026
  }, [e, G.isInitialized]);
1041
1027
  const te = {
1042
1028
  showCTAColocatedWithText: n,
1043
- heightOverrides: s,
1044
- onCardClick: _,
1045
- posthog: p,
1046
- showIcon: I,
1047
- showWithMargin: g,
1029
+ heightOverrides: a,
1030
+ onCardClick: p,
1031
+ posthog: _,
1032
+ showIcon: g,
1033
+ showWithMargin: E,
1048
1034
  widthOverrides: S
1049
1035
  }, Z = {
1050
- carouselSize: f,
1051
- variant: v,
1036
+ carouselSize: T,
1037
+ variant: D,
1052
1038
  showCTAColocatedWithText: n,
1053
- heightOverrides: s,
1054
- onCardClick: _,
1055
- posthog: p,
1056
- showIcon: I
1039
+ heightOverrides: a,
1040
+ onCardClick: p,
1041
+ posthog: _,
1042
+ showIcon: g
1057
1043
  };
1058
- return /* @__PURE__ */ i(rt, { onEvent: J, onPageview: ee, store: G, children: /* @__PURE__ */ L(Rt, { heightOverrides: s, widthOverrides: S, children: [
1059
- !w && /* @__PURE__ */ i(yt, {}),
1044
+ return /* @__PURE__ */ i(rt, { onEvent: J, onPageview: ee, store: G, children: /* @__PURE__ */ L(Rt, { heightOverrides: a, widthOverrides: S, children: [
1045
+ !w && /* @__PURE__ */ i(Ot, {}),
1060
1046
  w && l && /* @__PURE__ */ i(
1061
- Tt,
1047
+ ft,
1062
1048
  {
1063
1049
  analyticsMetadata: me,
1064
- onCardClick: _,
1065
- posthog: p,
1050
+ onCardClick: p,
1051
+ posthog: _,
1066
1052
  widthOverrides: S
1067
1053
  }
1068
1054
  ),
@@ -1073,7 +1059,7 @@ const $ = h.createContext(null), rt = ({
1073
1059
  analyticsMetadata: me,
1074
1060
  beats: o,
1075
1061
  showCarouselControls: d,
1076
- variant: c ? v : void 0,
1062
+ variant: c ? D : void 0,
1077
1063
  visibleCardsCount: V,
1078
1064
  ...te
1079
1065
  }
@@ -1083,42 +1069,42 @@ const $ = h.createContext(null), rt = ({
1083
1069
  {
1084
1070
  sx: {
1085
1071
  alignItems: "center",
1086
- height: s,
1072
+ height: a,
1087
1073
  width: S || "100%"
1088
1074
  },
1089
1075
  children: /* @__PURE__ */ i(
1090
1076
  N,
1091
1077
  {
1092
1078
  sx: {
1093
- height: `calc(${ht[f]}px - 44px)`,
1094
- width: g ? `calc(${S}px - 32px)` : "100%"
1079
+ height: `calc(${ht[T]}px - 44px)`,
1080
+ width: E ? `calc(${S}px - 32px)` : "100%"
1095
1081
  },
1096
- children: A ? /* @__PURE__ */ i(Le, { ...Z }) : /* @__PURE__ */ i(De, { ...Z })
1082
+ children: I ? /* @__PURE__ */ i(Le, { ...Z }) : /* @__PURE__ */ i(De, { ...Z })
1097
1083
  }
1098
1084
  )
1099
1085
  }
1100
1086
  )
1101
1087
  ] }) });
1102
- }, to = U(Ot), Wt = ({
1088
+ }, eo = U(yt), Wt = ({
1103
1089
  ariaLabel: t,
1104
1090
  heightOverrides: e,
1105
1091
  isActiveCard: o,
1106
1092
  onCardClick: n,
1107
1093
  posthog: r,
1108
- widthOverrides: s,
1109
- showIcon: a,
1110
- variant: _
1094
+ widthOverrides: a,
1095
+ showIcon: s,
1096
+ variant: p
1111
1097
  }) => {
1112
- const C = H(), { ref: m, inView: p } = Te({
1098
+ const m = H(), { ref: C, inView: _ } = fe({
1113
1099
  threshold: we
1114
- }), { cardsCopy: c } = D(), { onEvent: d } = j();
1100
+ }), { cardsCopy: c } = B(), { onEvent: d } = j();
1115
1101
  ie(() => {
1116
- p && (d(Ne.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1102
+ _ && (d(Ne.ON_VIEW_MORE_VIEWED), r?.capture("viewed_insight", {
1117
1103
  template: "view_more_card"
1118
1104
  }));
1119
- }, [p]);
1105
+ }, [_]);
1120
1106
  const l = () => {
1121
- n && n(), d(O.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1107
+ n && n(), d(y.ON_VIEW_MORE_CLICKED), r?.capture("clicked_insight", {
1122
1108
  template: "view_more_card"
1123
1109
  });
1124
1110
  };
@@ -1133,29 +1119,29 @@ const $ = h.createContext(null), rt = ({
1133
1119
  description: c.view_more_card_description,
1134
1120
  hasCardEffect: !0,
1135
1121
  heightOverrides: e,
1136
- icon: a && /* @__PURE__ */ i(R, { bgColor: T(C.palette.primary.main, 0.15), name: "show_chart" }),
1122
+ icon: s && /* @__PURE__ */ i(R, { bgColor: f(m.palette.primary.main, 0.15), name: "show_chart" }),
1137
1123
  isActiveCard: o,
1138
1124
  onCardClick: l,
1139
1125
  onPrimaryAction: l,
1140
1126
  primaryActionText: c.micro_card_cta,
1141
- ref: m,
1127
+ ref: C,
1142
1128
  title: c.view_more_card_title,
1143
- variant: _,
1144
- widthOverrides: s
1129
+ variant: p,
1130
+ widthOverrides: a
1145
1131
  }
1146
1132
  );
1147
1133
  }, Nt = U(Wt);
1148
1134
  export {
1149
1135
  nt as A,
1150
- Tt as C,
1136
+ ft as C,
1151
1137
  rt as I,
1152
1138
  St as M,
1153
- Jt as N,
1139
+ qt as N,
1154
1140
  me as T,
1155
1141
  Nt as V,
1156
- eo as Z,
1157
- gt as a,
1158
- to as b,
1142
+ Jt as Z,
1143
+ Et as a,
1144
+ eo as b,
1159
1145
  dt as c,
1160
1146
  q as d
1161
1147
  };
@@ -3,6 +3,7 @@ import { SxProps } from '@mui/material/styles';
3
3
  interface MicroCardTemplateProps {
4
4
  ariaLabel?: string;
5
5
  cardSx?: SxProps;
6
+ closeAriaLabel?: string;
6
7
  description: string;
7
8
  icon?: React.ReactNode;
8
9
  isActiveCard?: boolean;
@@ -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-qXK-0-Rl.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-qXK-0-Rl.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-CrK6tyHr.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.7.1",
3
+ "version": "7.7.2",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",