@mx-cartographer/experiences 8.1.0 → 8.1.1
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 +4 -0
- package/dist/{Account-DuOz1a27.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/{Account-BiB1F8lL.mjs → Account-CMjOp7S2.mjs} +2 -2
- package/dist/{AccountDetailsHeader-IPRH6Wja.mjs → AccountDetailsHeader-D_a0XUkL.mjs} +6 -6
- package/dist/{AccountFields-BbPSfzru.mjs → AccountFields-nrrEXd46.mjs} +30 -29
- package/dist/{AccountListItem-qpACFl6i.mjs → AccountListItem-D80egD01.mjs} +5 -5
- package/dist/{AccountStore-BeEiLNhW.mjs → AccountStore-nxHZqg1Z.mjs} +3 -3
- package/dist/{Accounts-o7ohkngR.mjs → Accounts-DX3xJE97.mjs} +1 -1
- package/dist/{Analytics-CjZ0emfs.mjs → Analytics-CxK7O19c.mjs} +2 -2
- package/dist/{BudgetUtil-CLh4xtj4.mjs → BudgetUtil-Cwvpb7xl.mjs} +46 -46
- package/dist/{CashflowStore-CeAzChyD.mjs → CashflowStore-BEi92kJg.mjs} +10 -10
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-BG04ByUx.mjs → CategorySelectorDrawer-DjeHNx71.mjs} +7 -7
- package/dist/{CategoryStore-Bp1kO9Z-.mjs → CategoryStore-CA4NTaKH.mjs} +2 -2
- package/dist/{CategoryUtil-DKRCegQv.mjs → CategoryUtil-BJOHgYKS.mjs} +3 -3
- package/dist/{Connect-eYIWqCEr.mjs → Connect-BRLh-69J.mjs} +1 -1
- package/dist/{ConnectDrawer-C0wjwcJt.mjs → ConnectDrawer-5BpU4IQU.mjs} +3 -3
- package/dist/{ConnectionsDrawer-IA7vnv1J.mjs → ConnectionsDrawer-DxpSlJN7.mjs} +3 -3
- package/dist/{CurrencyInput-BkNVHxSV.mjs → CurrencyInput-CSJ3zMgE.mjs} +18 -18
- package/dist/DateUtil-D0TO0DaZ.mjs +58 -0
- package/dist/{DebtsStore-BZqNLaqd.mjs → DebtsStore-BJlC2-yO.mjs} +1 -1
- package/dist/{Dialog-Ck34yr-d.mjs → Dialog-iLlBR8TG.mjs} +6 -6
- package/dist/{Donut-CpxJlVvJ.mjs → Donut-D7ekbgf5.mjs} +12 -12
- package/dist/{Drawer-Bbe4AMB1.mjs → Drawer-XPaLYjiO.mjs} +11 -11
- package/dist/{EmbeddedCard-j7IGx3s1.mjs → EmbeddedCard-BCcn_fK2.mjs} +193 -193
- package/dist/{ExportCsvAction-7sjz7AXQ.mjs → ExportCsvAction-BPjdEUXx.mjs} +5 -5
- package/dist/{FinstrongStore-DgyDJTEP.mjs → FinstrongStore-DYawCv1d.mjs} +54 -54
- package/dist/{GlobalAccountFilter-CmnaZDS6.mjs → GlobalAccountFilter-CZbiDwBH.mjs} +1 -1
- package/dist/{GoalStore-DcaT4fM6.mjs → GoalStore-DmqM1ZfW.mjs} +1 -1
- package/dist/{Help-B8mD4aLJ.mjs → Help-CgpJK03Q.mjs} +6 -6
- package/dist/{Help-cTsMzSQh.mjs → Help-Dfw_GHKi.mjs} +95 -98
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/{LineChart-DkD_s9NN.mjs → LineChart-jJVBE8V8.mjs} +1 -1
- package/dist/{ListItemAction-4KB7P75M.mjs → ListItemAction-Buv7tPLp.mjs} +4 -4
- package/dist/{Loader-D3rjKx72.mjs → Loader-CxeBwuPG.mjs} +5 -5
- package/dist/{ManageIncome-DwSE_a8L.mjs → ManageIncome-wgo-qbdP.mjs} +8 -8
- package/dist/MicroWidgetContainer-CEcwdfti.mjs +45 -0
- package/dist/MiniWidgetContainer-CmTGSUL5.mjs +66 -0
- package/dist/{NetWorthStore-Ba3q3VcH.mjs → NetWorthStore-BY-B_hxy.mjs} +4 -4
- package/dist/{NotificationSettings-DB-eNgSv.mjs → NotificationSettings-BFFIl-wS.mjs} +8 -8
- package/dist/{OriginalBalanceAction-AB1TGb5P.mjs → OriginalBalanceAction-C8VJZUat.mjs} +9 -9
- package/dist/{RecurringSettings-CZKeZC4m.mjs → RecurringSettings-Dn5pPRVS.mjs} +2 -2
- package/dist/{RecurringTransactions-kzlU8OFY.mjs → RecurringTransactions-DCt94TN4.mjs} +47 -47
- package/dist/{RecurringTransactionsStore-D62Dt2BF.mjs → RecurringTransactionsStore-CFJYC7lI.mjs} +1 -1
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-BNsV08Ud.mjs} +12 -12
- package/dist/{SettingsStore-Dsz1mvd3.mjs → SettingsStore-BcbuKfFO.mjs} +1 -1
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-PsRQPkmV.mjs} +5 -5
- package/dist/{SpendingData-CoZOmlZD.mjs → SpendingData-Dj85XEUp.mjs} +3 -3
- package/dist/{SpendingLegend-DljKEG69.mjs → SpendingLegend-RtFvutJ0.mjs} +4 -4
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{TransactionDetails-CN-yZkin.mjs → TransactionDetails-Cb6vauzy.mjs} +21 -21
- package/dist/{TransactionStore-6ovFO8P1.mjs → TransactionStore-BUsP-unK.mjs} +40 -57
- package/dist/{TrendsStore-DZa6cyQC.mjs → TrendsStore-bYjIGqyR.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-BsEitNRJ.mjs → ViewMoreMicroCard-C7dC9lDT.mjs} +93 -94
- package/dist/{WidgetContainer-Bc75FqK7.mjs → WidgetContainer-MhgZzIaI.mjs} +19 -19
- package/dist/accounts/index.es.js +28 -28
- package/dist/analytics/index.es.js +10 -10
- package/dist/budgets/index.es.js +18 -18
- package/dist/cashflow/index.es.js +109 -109
- package/dist/categories/index.es.js +2 -2
- package/dist/common/index.es.js +250 -250
- package/dist/core/index.es.js +64 -64
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/index.es.js +21 -21
- package/dist/{exportTransactionsToCSV-Dnd5lVq7.mjs → exportTransactionsToCSV-B2Lp7AMl.mjs} +7 -7
- package/dist/finstrong/index.es.js +21 -21
- package/dist/goals/index.es.js +16 -16
- package/dist/help/index.es.js +5 -5
- package/dist/{hooks-BxkfR-Ff.mjs → hooks-HwStH7q_.mjs} +9 -9
- package/dist/insights/index.es.js +328 -328
- package/dist/investments/index.es.js +9 -9
- package/dist/merchants/index.es.js +9 -9
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +25 -25
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +23 -23
- package/dist/settings/index.es.js +95 -95
- package/dist/spending/index.es.js +64 -64
- package/dist/transactions/index.es.js +73 -73
- package/dist/trends/index.es.js +54 -54
- package/dist/{useAccountDisplayName-DKwT1mWv.mjs → useAccountDisplayName-SrQA7K_6.mjs} +1 -1
- package/dist/{useInsightsEnabled-DL_oNyI0.mjs → useInsightsEnabled-DzvRm5Bo.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DgN1bTyu.mjs → useWidgetLoadTimer-wkBTL5xx.mjs} +1 -1
- package/package.json +20 -20
- package/dist/DateUtil-C57sqxn4.mjs +0 -54
- package/dist/MicroWidgetContainer-B_EnfvCq.mjs +0 -45
- package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +0 -66
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as N, Fragment as Se } from "react/jsx-runtime";
|
|
2
2
|
import h, { useEffect as re, useState as ne } from "react";
|
|
3
3
|
import { observer as U } from "mobx-react-lite";
|
|
4
4
|
import w from "@mui/material/Stack";
|
|
5
5
|
import ie from "@mui/material/Button";
|
|
6
6
|
import { CategoryIcon as Ge, MerchantLogo as ke, InstitutionLogo as Ue, P as me, Text as ue, H3 as ze } from "@mxenabled/mxui";
|
|
7
|
-
import { Icon as Ke, Close as Fe, ChevronLeft as
|
|
8
|
-
import { L as
|
|
9
|
-
import
|
|
7
|
+
import { Icon as Ke, Close as Fe, ChevronLeft as He, ChevronRight as Te } from "@mxenabled/mx-icons";
|
|
8
|
+
import { L as $e } from "./Loader-CxeBwuPG.mjs";
|
|
9
|
+
import $ from "@mui/material/Box";
|
|
10
10
|
import ae from "@mui/material/IconButton";
|
|
11
11
|
import { alpha as s, useTheme as j } from "@mui/material/styles";
|
|
12
12
|
import { useInView as Re } from "react-intersection-observer";
|
|
13
|
-
import { b as je } from "./Category-CevNQ03n.mjs";
|
|
14
13
|
import se from "@mui/material/styles/useTheme";
|
|
14
|
+
import { b as je } from "./Category-Ccoew_sA.mjs";
|
|
15
15
|
import { b as Ye } from "./Localization-CkQ49EKr.mjs";
|
|
16
16
|
import Xe from "@mui/material/CircularProgress";
|
|
17
17
|
import { makeAutoObservable as ce, runInAction as Oe } from "mobx";
|
|
18
|
-
import {
|
|
18
|
+
import { a as Ze, u as Qe, b as qe } from "./Analytics-CxK7O19c.mjs";
|
|
19
19
|
import { G as Ce } from "./GlobalCopyApi-DkS-2Zf_.mjs";
|
|
20
20
|
import { B as he } from "./BeatApi-C6pBa0Rb.mjs";
|
|
21
|
-
import { u as Je } from "./useWidgetLoadTimer-
|
|
21
|
+
import { u as Je } from "./useWidgetLoadTimer-wkBTL5xx.mjs";
|
|
22
22
|
import et from "@mui/material/Card";
|
|
23
23
|
import tt from "@mui/material/CardActionArea";
|
|
24
24
|
import ot from "@mui/material/Avatar";
|
|
@@ -74,7 +74,7 @@ const le = {
|
|
|
74
74
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
75
75
|
}, R = window?.app?.clientConfig?.microwidget_instance_id || "", Ee = {
|
|
76
76
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
77
|
-
}, We = (t) => `on${t}Click`, we = (t) => `on${t}View`,
|
|
77
|
+
}, We = (t) => `on${t}Click`, we = (t) => `on${t}View`, Ne = (t) => `on${t}ViewFirstTime`, de = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), rt = () => Object.values(le).reduce(
|
|
78
78
|
(t, e) => ({
|
|
79
79
|
...t,
|
|
80
80
|
[We(e)]: {
|
|
@@ -99,7 +99,7 @@ const le = {
|
|
|
99
99
|
), at = () => Object.values(le).reduce(
|
|
100
100
|
(t, e) => ({
|
|
101
101
|
...t,
|
|
102
|
-
[
|
|
102
|
+
[Ne(e)]: {
|
|
103
103
|
action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
104
104
|
category: L.BEAT_INTERACTION,
|
|
105
105
|
label: de(e),
|
|
@@ -108,7 +108,6 @@ const le = {
|
|
|
108
108
|
}),
|
|
109
109
|
{}
|
|
110
110
|
), b = {
|
|
111
|
-
CARD: "Card",
|
|
112
111
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
113
112
|
MICRO_WIDGET: "Micro Widget",
|
|
114
113
|
VIEW_MORE: "View More"
|
|
@@ -122,7 +121,7 @@ const le = {
|
|
|
122
121
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
123
122
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
124
123
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
125
|
-
},
|
|
124
|
+
}, Me = {
|
|
126
125
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
127
126
|
}, D = {
|
|
128
127
|
CONTROL_BACKWARD: "Control Backward",
|
|
@@ -190,7 +189,7 @@ const le = {
|
|
|
190
189
|
label: b.VIEW_MORE,
|
|
191
190
|
value: R
|
|
192
191
|
},
|
|
193
|
-
[
|
|
192
|
+
[Me.ON_VIEW_MORE_VIEWED]: {
|
|
194
193
|
action: D.MICRO_BEAT_DISPLAYED,
|
|
195
194
|
category: L.BEAT_INTERACTION,
|
|
196
195
|
label: b.VIEW_MORE,
|
|
@@ -255,7 +254,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
255
254
|
}) => /* @__PURE__ */ o(Y.Provider, { value: { onEvent: t, onPageview: e, store: n, children: r }, children: r }), dt = ({ beat: t }) => {
|
|
256
255
|
const { primary_category_guid: e, category_guids: n } = t, r = e || n?.[0] || je.UNCATEGORIZED;
|
|
257
256
|
return /* @__PURE__ */ o(Ge, { categoryGuid: r, size: 32, sx: { minWidth: 32 } });
|
|
258
|
-
},
|
|
257
|
+
}, c = ({
|
|
259
258
|
avatarSx: t,
|
|
260
259
|
bgColor: e,
|
|
261
260
|
name: n,
|
|
@@ -274,7 +273,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
274
273
|
variant: "rounded",
|
|
275
274
|
children: /* @__PURE__ */ o(Ke, { color: r, fill: i, name: n, size: 20, sx: l })
|
|
276
275
|
}
|
|
277
|
-
),
|
|
276
|
+
), _t = ({ beat: t }) => {
|
|
278
277
|
const { category_guids: e, merchant_guids: n, primary_category_guid: r, primary_merchant_guid: i } = t;
|
|
279
278
|
return /* @__PURE__ */ o(
|
|
280
279
|
ke,
|
|
@@ -289,27 +288,27 @@ const Y = h.createContext(null), lt = ({
|
|
|
289
288
|
}
|
|
290
289
|
}
|
|
291
290
|
);
|
|
292
|
-
},
|
|
291
|
+
}, pt = (t) => t ? t.data ? t.data.map((e) => {
|
|
293
292
|
const n = {};
|
|
294
293
|
return t.names?.map((r, i) => {
|
|
295
294
|
n[r] = e[i];
|
|
296
295
|
}), n;
|
|
297
296
|
}) : [] : [], q = "primary", be = "success", Le = "error", De = (t) => {
|
|
298
|
-
const e =
|
|
297
|
+
const e = pt(t), n = Math.floor(e.length / 2);
|
|
299
298
|
if (n === 0 || n === e.length) return q;
|
|
300
299
|
const r = e[0]?.amount, i = e[n]?.amount;
|
|
301
300
|
return r == null || i == null ? q : r > i ? Le : r < i ? be : q;
|
|
302
|
-
},
|
|
301
|
+
}, mt = (t, e) => t < e ? be : t > e ? Le : q, ut = ({ beat: t }) => {
|
|
303
302
|
const e = se(), n = De(t.data_series), r = e.palette[n].main;
|
|
304
303
|
return /* @__PURE__ */ o(c, { bgColor: s(r, 0.15), iconColor: n, name: "bar_chart" });
|
|
305
|
-
},
|
|
304
|
+
}, Ct = ({ beat: t }) => {
|
|
306
305
|
const e = se(), n = t.payload?.average_spend || 0;
|
|
307
306
|
let r = 0;
|
|
308
307
|
if (t.data_series?.data && t.data_series.data.length > 0) {
|
|
309
308
|
const a = (t.data_series.names || []).indexOf("amount");
|
|
310
309
|
a !== -1 && (r = t.data_series.data[0][a] || 0);
|
|
311
310
|
}
|
|
312
|
-
const i =
|
|
311
|
+
const i = mt(r, n);
|
|
313
312
|
return /* @__PURE__ */ o(
|
|
314
313
|
c,
|
|
315
314
|
{
|
|
@@ -318,7 +317,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
318
317
|
name: "timeline"
|
|
319
318
|
}
|
|
320
319
|
);
|
|
321
|
-
},
|
|
320
|
+
}, ht = ({ beat: t }) => {
|
|
322
321
|
const e = se(), n = De(t.data_series), r = e.palette[n].main;
|
|
323
322
|
return /* @__PURE__ */ o(
|
|
324
323
|
c,
|
|
@@ -329,11 +328,11 @@ const Y = h.createContext(null), lt = ({
|
|
|
329
328
|
name: "area_chart"
|
|
330
329
|
}
|
|
331
330
|
);
|
|
332
|
-
},
|
|
331
|
+
}, gt = ({ beat: t }) => /* @__PURE__ */ o(Ue, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), Et = {
|
|
333
332
|
0: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" }),
|
|
334
333
|
1: (t) => /* @__PURE__ */ o(dt, { beat: t }),
|
|
335
|
-
2: (t) => /* @__PURE__ */ o(
|
|
336
|
-
3: (t) => /* @__PURE__ */ o(
|
|
334
|
+
2: (t) => /* @__PURE__ */ o(_t, { beat: t }),
|
|
335
|
+
3: (t) => /* @__PURE__ */ o(ut, { beat: t }),
|
|
337
336
|
4: (t, e) => /* @__PURE__ */ o(
|
|
338
337
|
c,
|
|
339
338
|
{
|
|
@@ -366,7 +365,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
366
365
|
sx: { color: "text.primary" }
|
|
367
366
|
}
|
|
368
367
|
),
|
|
369
|
-
12: (t) => /* @__PURE__ */ o(
|
|
368
|
+
12: (t) => /* @__PURE__ */ o(ht, { beat: t }),
|
|
370
369
|
13: () => /* @__PURE__ */ o(
|
|
371
370
|
c,
|
|
372
371
|
{
|
|
@@ -435,7 +434,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
435
434
|
),
|
|
436
435
|
27: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "directions_car" }),
|
|
437
436
|
28: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "contract" }),
|
|
438
|
-
29: (t) => /* @__PURE__ */ o(
|
|
437
|
+
29: (t) => /* @__PURE__ */ o(Ct, { beat: t }),
|
|
439
438
|
30: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_month" }),
|
|
440
439
|
31: (t, e) => /* @__PURE__ */ o(
|
|
441
440
|
c,
|
|
@@ -454,16 +453,16 @@ const Y = h.createContext(null), lt = ({
|
|
|
454
453
|
name: "storefront"
|
|
455
454
|
}
|
|
456
455
|
),
|
|
457
|
-
34: (t) => /* @__PURE__ */ o(
|
|
458
|
-
},
|
|
459
|
-
const e = j(), { icon_type: n } = t, r = n != null ?
|
|
456
|
+
34: (t) => /* @__PURE__ */ o(gt, { beat: t })
|
|
457
|
+
}, It = ({ beat: t }) => {
|
|
458
|
+
const e = j(), { icon_type: n } = t, r = n != null ? Et[n] : null;
|
|
460
459
|
return r ? r(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
|
|
461
460
|
}, x = () => {
|
|
462
461
|
const t = h.useContext(Y);
|
|
463
462
|
if (!t)
|
|
464
463
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
465
464
|
return t.store.copyStore;
|
|
466
|
-
},
|
|
465
|
+
}, ft = () => {
|
|
467
466
|
const t = h.useContext(Y);
|
|
468
467
|
if (!t?.store?.insightsMicroWidgetStore)
|
|
469
468
|
throw new Error(
|
|
@@ -480,12 +479,12 @@ const Y = h.createContext(null), lt = ({
|
|
|
480
479
|
if (!t)
|
|
481
480
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
482
481
|
return { onPageview: t.onPageview };
|
|
483
|
-
},
|
|
482
|
+
}, yt = {
|
|
484
483
|
LARGE: 180,
|
|
485
484
|
STANDARD: 154,
|
|
486
485
|
XLARGE: 200,
|
|
487
486
|
XXLARGE: 248
|
|
488
|
-
},
|
|
487
|
+
}, At = 50, ve = 1, J = h.forwardRef(
|
|
489
488
|
function({
|
|
490
489
|
ariaLabel: e,
|
|
491
490
|
cardSx: n,
|
|
@@ -504,9 +503,9 @@ const Y = h.createContext(null), lt = ({
|
|
|
504
503
|
title: S,
|
|
505
504
|
variant: y,
|
|
506
505
|
widthOverrides: A,
|
|
507
|
-
...
|
|
506
|
+
...M
|
|
508
507
|
}, z) {
|
|
509
|
-
const E = !!(_ && m), v = !!(p && f), P = u ? et :
|
|
508
|
+
const E = !!(_ && m), v = !!(p && f), P = u ? et : $, T = /* @__PURE__ */ N(Se, { children: [
|
|
510
509
|
g && /* @__PURE__ */ o(
|
|
511
510
|
ae,
|
|
512
511
|
{
|
|
@@ -524,10 +523,10 @@ const Y = h.createContext(null), lt = ({
|
|
|
524
523
|
children: /* @__PURE__ */ o(Fe, {})
|
|
525
524
|
}
|
|
526
525
|
),
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ N(w, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
|
|
527
|
+
/* @__PURE__ */ N(w, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
529
528
|
l && l,
|
|
530
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ N(w, { sx: { gap: 6 }, children: [
|
|
531
530
|
/* @__PURE__ */ o(w, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(me, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: S }) }),
|
|
532
531
|
/* @__PURE__ */ o(
|
|
533
532
|
me,
|
|
@@ -549,7 +548,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
549
548
|
)
|
|
550
549
|
] })
|
|
551
550
|
] }),
|
|
552
|
-
E && /* @__PURE__ */
|
|
551
|
+
E && /* @__PURE__ */ N(
|
|
553
552
|
w,
|
|
554
553
|
{
|
|
555
554
|
sx: {
|
|
@@ -618,7 +617,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
618
617
|
},
|
|
619
618
|
tabIndex: d || !a ? -1 : 0,
|
|
620
619
|
variant: y,
|
|
621
|
-
...
|
|
620
|
+
...M,
|
|
622
621
|
children: d ? /* @__PURE__ */ o(
|
|
623
622
|
tt,
|
|
624
623
|
{
|
|
@@ -632,11 +631,11 @@ const Y = h.createContext(null), lt = ({
|
|
|
632
631
|
},
|
|
633
632
|
children: T
|
|
634
633
|
}
|
|
635
|
-
) : /* @__PURE__ */ o(
|
|
634
|
+
) : /* @__PURE__ */ o($, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: T })
|
|
636
635
|
}
|
|
637
636
|
);
|
|
638
637
|
}
|
|
639
|
-
),
|
|
638
|
+
), St = ({
|
|
640
639
|
ariaLabel: t,
|
|
641
640
|
beat: e,
|
|
642
641
|
index: n,
|
|
@@ -650,7 +649,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
650
649
|
}) => {
|
|
651
650
|
const { ref: d, inView: _ } = Re({
|
|
652
651
|
threshold: ve
|
|
653
|
-
}), { cardsCopy: p } = x(), { onEvent: m } = X(), { updateBeat: f, updateOffer: S } =
|
|
652
|
+
}), { cardsCopy: p } = x(), { onEvent: m } = X(), { updateBeat: f, updateOffer: S } = ft();
|
|
654
653
|
re(() => {
|
|
655
654
|
_ && (e.has_been_displayed ? m(we(e.template)) : (e.guid.startsWith("OFR") ? S({
|
|
656
655
|
...e,
|
|
@@ -658,7 +657,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
658
657
|
}) : f({
|
|
659
658
|
...e,
|
|
660
659
|
has_been_displayed: !0
|
|
661
|
-
}), m(
|
|
660
|
+
}), m(Ne(e.template))));
|
|
662
661
|
}, [_]), re(() => {
|
|
663
662
|
if (_ && e)
|
|
664
663
|
if (e.template === "MarketingOffer") {
|
|
@@ -701,7 +700,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
701
700
|
description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
|
|
702
701
|
hasCardEffect: !0,
|
|
703
702
|
heightOverrides: g,
|
|
704
|
-
icon: I && /* @__PURE__ */ o(
|
|
703
|
+
icon: I && /* @__PURE__ */ o(It, { beat: e }),
|
|
705
704
|
isActiveCard: r,
|
|
706
705
|
onCardClick: y,
|
|
707
706
|
onPrimaryAction: y,
|
|
@@ -712,7 +711,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
712
711
|
widthOverrides: a
|
|
713
712
|
}
|
|
714
713
|
);
|
|
715
|
-
},
|
|
714
|
+
}, Tt = ({
|
|
716
715
|
currentBeatIndex: t,
|
|
717
716
|
numBeats: e,
|
|
718
717
|
onNextClick: n,
|
|
@@ -723,7 +722,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
723
722
|
visibleCardsCount: u = 1
|
|
724
723
|
}) => {
|
|
725
724
|
const I = j(), { carouselCopy: g } = x(), d = Math.floor(l) > i || t - u + 1 === 0, _ = l < 0 || e - 1 === t, p = I.palette.grey[500], m = I.palette.primary.main;
|
|
726
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ N(
|
|
727
726
|
w,
|
|
728
727
|
{
|
|
729
728
|
direction: "row",
|
|
@@ -746,7 +745,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
746
745
|
disabled: d,
|
|
747
746
|
onClick: r,
|
|
748
747
|
children: /* @__PURE__ */ o(
|
|
749
|
-
|
|
748
|
+
He,
|
|
750
749
|
{
|
|
751
750
|
style: {
|
|
752
751
|
color: d ? p : m
|
|
@@ -758,7 +757,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
758
757
|
Array.from({ length: e }).map((f, S) => {
|
|
759
758
|
const y = S === t;
|
|
760
759
|
return /* @__PURE__ */ o(
|
|
761
|
-
|
|
760
|
+
$,
|
|
762
761
|
{
|
|
763
762
|
className: "mx-insights-micro-carousel-dots",
|
|
764
763
|
sx: {
|
|
@@ -801,7 +800,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
801
800
|
]
|
|
802
801
|
}
|
|
803
802
|
);
|
|
804
|
-
},
|
|
803
|
+
}, Rt = ({
|
|
805
804
|
activeCardIndex: t,
|
|
806
805
|
beats: e,
|
|
807
806
|
cardWidth: n,
|
|
@@ -817,17 +816,17 @@ const Y = h.createContext(null), lt = ({
|
|
|
817
816
|
showIcon: a,
|
|
818
817
|
variant: u
|
|
819
818
|
};
|
|
820
|
-
return /* @__PURE__ */
|
|
819
|
+
return /* @__PURE__ */ N(Se, { children: [
|
|
821
820
|
e.map((d, _) => {
|
|
822
821
|
const p = _ + 1, m = e.length + 1, f = Ye(
|
|
823
822
|
I?.card_position_in_carousel_aria,
|
|
824
823
|
p.toString(),
|
|
825
824
|
m.toString()
|
|
826
|
-
), S = d.micro_title && d.micro_title.length > 0, y = d.micro_description && d.micro_description.length > 0, A = S ? d.micro_title : d.title,
|
|
825
|
+
), S = d.micro_title && d.micro_title.length > 0, y = d.micro_description && d.micro_description.length > 0, A = S ? d.micro_title : d.title, M = y ? d.micro_description : d.description;
|
|
827
826
|
return /* @__PURE__ */ o(
|
|
828
|
-
|
|
827
|
+
St,
|
|
829
828
|
{
|
|
830
|
-
ariaLabel: `${f}: ${A}, ${
|
|
829
|
+
ariaLabel: `${f}: ${A}, ${M}`,
|
|
831
830
|
beat: d,
|
|
832
831
|
index: _,
|
|
833
832
|
isActiveCard: _ === t,
|
|
@@ -839,7 +838,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
839
838
|
);
|
|
840
839
|
}),
|
|
841
840
|
/* @__PURE__ */ o(
|
|
842
|
-
|
|
841
|
+
xt,
|
|
843
842
|
{
|
|
844
843
|
isActiveCard: t === e.length,
|
|
845
844
|
onCardClick: i,
|
|
@@ -848,7 +847,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
848
847
|
}
|
|
849
848
|
)
|
|
850
849
|
] });
|
|
851
|
-
},
|
|
850
|
+
}, Ot = ({
|
|
852
851
|
analyticsMetadata: t,
|
|
853
852
|
allowSingleCardPeeking: e = !1,
|
|
854
853
|
beats: n = [],
|
|
@@ -863,7 +862,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
863
862
|
visibleCardsCount: _ = 1
|
|
864
863
|
// Default to 1 card visible
|
|
865
864
|
}) => {
|
|
866
|
-
const p = h.useRef(null), m = h.useRef(null), [f, S] = h.useState(0), [y, A] = h.useState(null), [
|
|
865
|
+
const p = h.useRef(null), m = h.useRef(null), [f, S] = h.useState(0), [y, A] = h.useState(null), [M, z] = h.useState(null), [E, v] = h.useState(null), { carouselCopy: P } = x(), { onEvent: T } = X();
|
|
867
866
|
h.useEffect(() => {
|
|
868
867
|
if (p.current && !e) {
|
|
869
868
|
const W = p.current.offsetWidth, F = 8;
|
|
@@ -878,20 +877,20 @@ const Y = h.createContext(null), lt = ({
|
|
|
878
877
|
}, [_, p.current?.offsetWidth]), h.useEffect(() => {
|
|
879
878
|
const W = m.current?.offsetWidth;
|
|
880
879
|
if (typeof W == "number" && e) {
|
|
881
|
-
const F = (
|
|
880
|
+
const F = (H) => {
|
|
882
881
|
const pe = [
|
|
883
882
|
{ maxWidth: 375, cardWidth: 268 },
|
|
884
883
|
{ maxWidth: 444, cardWidth: 300 },
|
|
885
884
|
{ maxWidth: 599, cardWidth: 350 },
|
|
886
885
|
{ maxWidth: 749, cardWidth: 450 },
|
|
887
886
|
{ maxWidth: 900, cardWidth: 600 }
|
|
888
|
-
].find((Ve) =>
|
|
887
|
+
].find((Ve) => H <= Ve.maxWidth);
|
|
889
888
|
return pe ? pe.cardWidth : 750;
|
|
890
889
|
};
|
|
891
890
|
v(F(W));
|
|
892
891
|
const k = () => {
|
|
893
|
-
const
|
|
894
|
-
typeof
|
|
892
|
+
const H = m.current?.offsetWidth;
|
|
893
|
+
typeof H == "number" && v(F(H));
|
|
895
894
|
};
|
|
896
895
|
return window.addEventListener("resize", k), () => {
|
|
897
896
|
window.removeEventListener("resize", k);
|
|
@@ -913,14 +912,14 @@ const Y = h.createContext(null), lt = ({
|
|
|
913
912
|
}, Q = () => {
|
|
914
913
|
p.current && S(p.current.scrollLeft);
|
|
915
914
|
}, ee = () => {
|
|
916
|
-
if (!
|
|
917
|
-
|
|
915
|
+
if (!M || !y) return;
|
|
916
|
+
M - y > At ? T(O.ON_CAROUSEL_FORWARD_SWIPE, t) : T(O.ON_CAROUSEL_BACK_SWIPE, t);
|
|
918
917
|
}, te = (W) => {
|
|
919
918
|
A(W.targetTouches[0].clientX);
|
|
920
919
|
}, oe = (W) => {
|
|
921
920
|
A(null), z(W.targetTouches[0].clientX);
|
|
922
921
|
}, K = E ? Math.round(f / (E + 8)) : 0, B = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
|
|
923
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ N(
|
|
924
923
|
w,
|
|
925
924
|
{
|
|
926
925
|
"aria-label": P?.carousel_title,
|
|
@@ -961,7 +960,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
961
960
|
}
|
|
962
961
|
},
|
|
963
962
|
children: /* @__PURE__ */ o(
|
|
964
|
-
|
|
963
|
+
Rt,
|
|
965
964
|
{
|
|
966
965
|
activeCardIndex: K,
|
|
967
966
|
beats: n,
|
|
@@ -976,7 +975,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
976
975
|
}
|
|
977
976
|
),
|
|
978
977
|
a && /* @__PURE__ */ o(
|
|
979
|
-
|
|
978
|
+
Tt,
|
|
980
979
|
{
|
|
981
980
|
currentBeatIndex: K + _ - 1,
|
|
982
981
|
numBeats: n.length + 1,
|
|
@@ -991,7 +990,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
991
990
|
]
|
|
992
991
|
}
|
|
993
992
|
);
|
|
994
|
-
},
|
|
993
|
+
}, Wt = U(Ot), wt = ({
|
|
995
994
|
analyticsMetadata: t,
|
|
996
995
|
onCardClick: e,
|
|
997
996
|
posthog: n,
|
|
@@ -1001,7 +1000,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1001
1000
|
const { carouselCopy: l } = x(), { onEvent: a } = X(), u = () => {
|
|
1002
1001
|
a && (a(O.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
|
|
1003
1002
|
};
|
|
1004
|
-
return l ? /* @__PURE__ */
|
|
1003
|
+
return l ? /* @__PURE__ */ N(
|
|
1005
1004
|
w,
|
|
1006
1005
|
{
|
|
1007
1006
|
alignItems: "center",
|
|
@@ -1028,15 +1027,15 @@ const Y = h.createContext(null), lt = ({
|
|
|
1028
1027
|
)
|
|
1029
1028
|
]
|
|
1030
1029
|
}
|
|
1031
|
-
) : /* @__PURE__ */ o(
|
|
1032
|
-
},
|
|
1030
|
+
) : /* @__PURE__ */ o($e, {});
|
|
1031
|
+
}, Nt = U(wt), Mt = ({
|
|
1033
1032
|
heightOverrides: t,
|
|
1034
1033
|
widthOverrides: e,
|
|
1035
1034
|
children: n
|
|
1036
1035
|
}) => {
|
|
1037
1036
|
const { carouselCopy: r } = x();
|
|
1038
1037
|
return /* @__PURE__ */ o(
|
|
1039
|
-
|
|
1038
|
+
$,
|
|
1040
1039
|
{
|
|
1041
1040
|
"aria-label": r?.carousel_title,
|
|
1042
1041
|
"aria-roledescription": "carousel",
|
|
@@ -1085,7 +1084,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1085
1084
|
variant: l
|
|
1086
1085
|
}
|
|
1087
1086
|
);
|
|
1088
|
-
},
|
|
1087
|
+
}, io = U(Pe), Be = ({
|
|
1089
1088
|
ariaLabel: t,
|
|
1090
1089
|
heightOverrides: e,
|
|
1091
1090
|
onCardClick: n,
|
|
@@ -1111,8 +1110,8 @@ const Y = h.createContext(null), lt = ({
|
|
|
1111
1110
|
variant: i
|
|
1112
1111
|
}
|
|
1113
1112
|
);
|
|
1114
|
-
},
|
|
1115
|
-
|
|
1113
|
+
}, ao = U(Be), bt = () => /* @__PURE__ */ o(
|
|
1114
|
+
$,
|
|
1116
1115
|
{
|
|
1117
1116
|
sx: {
|
|
1118
1117
|
alignItems: "center",
|
|
@@ -1123,7 +1122,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1123
1122
|
},
|
|
1124
1123
|
children: /* @__PURE__ */ o(Xe, {})
|
|
1125
1124
|
}
|
|
1126
|
-
), V = new ct(),
|
|
1125
|
+
), V = new ct(), Lt = ({
|
|
1127
1126
|
allowSingleCardPeeking: t,
|
|
1128
1127
|
areBeatsLoading: e,
|
|
1129
1128
|
beats: n = [],
|
|
@@ -1146,7 +1145,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1146
1145
|
showWithMargin: S = !0,
|
|
1147
1146
|
token: y = "",
|
|
1148
1147
|
userHasFullInsightFeedBeats: A,
|
|
1149
|
-
variant:
|
|
1148
|
+
variant: M,
|
|
1150
1149
|
visibleCardsCount: z = 1,
|
|
1151
1150
|
widthOverrides: E
|
|
1152
1151
|
}) => {
|
|
@@ -1171,16 +1170,16 @@ const Y = h.createContext(null), lt = ({
|
|
|
1171
1170
|
widthOverrides: E
|
|
1172
1171
|
}, K = {
|
|
1173
1172
|
carouselSize: v,
|
|
1174
|
-
variant:
|
|
1173
|
+
variant: M,
|
|
1175
1174
|
heightOverrides: i,
|
|
1176
1175
|
onCardClick: u,
|
|
1177
1176
|
posthog: d,
|
|
1178
1177
|
showIcon: f
|
|
1179
1178
|
};
|
|
1180
|
-
return /* @__PURE__ */ o(lt, { onEvent: ee, onPageview: te, store: V, children: /* @__PURE__ */
|
|
1181
|
-
!T && /* @__PURE__ */ o(
|
|
1179
|
+
return /* @__PURE__ */ o(lt, { onEvent: ee, onPageview: te, store: V, children: /* @__PURE__ */ N(Mt, { heightOverrides: i, widthOverrides: E, children: [
|
|
1180
|
+
!T && /* @__PURE__ */ o(bt, {}),
|
|
1182
1181
|
T && m && /* @__PURE__ */ o(
|
|
1183
|
-
|
|
1182
|
+
Nt,
|
|
1184
1183
|
{
|
|
1185
1184
|
analyticsMetadata: ge,
|
|
1186
1185
|
headerSx: l,
|
|
@@ -1190,13 +1189,13 @@ const Y = h.createContext(null), lt = ({
|
|
|
1190
1189
|
}
|
|
1191
1190
|
),
|
|
1192
1191
|
T && !!n.length && /* @__PURE__ */ o(
|
|
1193
|
-
|
|
1192
|
+
Wt,
|
|
1194
1193
|
{
|
|
1195
1194
|
allowSingleCardPeeking: t,
|
|
1196
1195
|
analyticsMetadata: ge,
|
|
1197
1196
|
beats: n,
|
|
1198
1197
|
showCarouselControls: p,
|
|
1199
|
-
variant: _ ?
|
|
1198
|
+
variant: _ ? M : void 0,
|
|
1200
1199
|
visibleCardsCount: z,
|
|
1201
1200
|
...oe
|
|
1202
1201
|
}
|
|
@@ -1213,7 +1212,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1213
1212
|
w,
|
|
1214
1213
|
{
|
|
1215
1214
|
sx: {
|
|
1216
|
-
height: `calc(${
|
|
1215
|
+
height: `calc(${yt[v]}px - 44px)`,
|
|
1217
1216
|
width: S ? `calc(${E}px - 32px)` : "100%"
|
|
1218
1217
|
},
|
|
1219
1218
|
children: A ? /* @__PURE__ */ o(Pe, { ...K }) : /* @__PURE__ */ o(Be, { ...K })
|
|
@@ -1222,7 +1221,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1222
1221
|
}
|
|
1223
1222
|
)
|
|
1224
1223
|
] }) });
|
|
1225
|
-
},
|
|
1224
|
+
}, so = U(Lt), Dt = ({
|
|
1226
1225
|
ariaLabel: t,
|
|
1227
1226
|
heightOverrides: e,
|
|
1228
1227
|
isActiveCard: n,
|
|
@@ -1236,7 +1235,7 @@ const Y = h.createContext(null), lt = ({
|
|
|
1236
1235
|
threshold: ve
|
|
1237
1236
|
}), { cardsCopy: _ } = x(), { onEvent: p } = X();
|
|
1238
1237
|
re(() => {
|
|
1239
|
-
d && (p(
|
|
1238
|
+
d && (p(Me.ON_VIEW_MORE_VIEWED), i?.capture("viewed_insight", {
|
|
1240
1239
|
template: "view_more_card"
|
|
1241
1240
|
}));
|
|
1242
1241
|
}, [d]);
|
|
@@ -1267,19 +1266,19 @@ const Y = h.createContext(null), lt = ({
|
|
|
1267
1266
|
widthOverrides: l
|
|
1268
1267
|
}
|
|
1269
1268
|
);
|
|
1270
|
-
},
|
|
1269
|
+
}, xt = U(Dt);
|
|
1271
1270
|
export {
|
|
1272
1271
|
ct as A,
|
|
1273
1272
|
c as B,
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1273
|
+
Nt as C,
|
|
1274
|
+
St as I,
|
|
1275
|
+
Wt as M,
|
|
1276
|
+
io as N,
|
|
1278
1277
|
ge as T,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1278
|
+
xt as V,
|
|
1279
|
+
ao as Z,
|
|
1280
|
+
so as a,
|
|
1281
|
+
lt as b,
|
|
1282
|
+
J as c,
|
|
1283
|
+
ut as d
|
|
1285
1284
|
};
|