@mx-cartographer/experiences 7.4.8-alpha.mm1 → 7.4.8
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-BrOTlmeK.mjs → Account-01wOyrH1.mjs} +1 -1
- package/dist/{AccountDetailsContent-B7FqH05C.mjs → AccountDetailsContent-COMjOzwr.mjs} +8 -8
- package/dist/{AccountDetailsHeader-C8MxsxhN.mjs → AccountDetailsHeader-Cbi5G6fJ.mjs} +4 -4
- package/dist/{AccountFields-BQZ-o6Kj.mjs → AccountFields-Cd_nOWmf.mjs} +2 -2
- package/dist/{AccountListItem-aIE9WWTO.mjs → AccountListItem-DxY4cCF1.mjs} +4 -4
- package/dist/{AccountStore-DqO84Aer.mjs → AccountStore-C1zMBzHq.mjs} +2 -2
- package/dist/{Accounts-DC_A4UCa.mjs → Accounts-D7QljYas.mjs} +1 -1
- package/dist/{BudgetUtil-BmZXkL0C.mjs → BudgetUtil-Df2nII9u.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-SUgfE5GN.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +1 -1
- package/dist/{ConnectDrawer-KL8t1qSC.mjs → ConnectDrawer-CuUj16NH.mjs} +1 -1
- package/dist/{ConnectionsDrawer-DaK5uIL5.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +2 -2
- package/dist/{CurrencyInput-itK0R3wV.mjs → CurrencyInput-BFKcs-_K.mjs} +1 -1
- package/dist/{DebtsStore-DVPZbv2C.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
- package/dist/{ExportCsvAction-Cglo8Mca.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
- package/dist/{GoalStore-o4rrjGSJ.mjs → GoalStore-CrNhjvNc.mjs} +2 -2
- package/dist/{Help-BjLMsuMS.mjs → Help-BnPXM_N2.mjs} +1 -1
- package/dist/{LineChart-BQRxZF3p.mjs → LineChart-bc1D9xBE.mjs} +1 -1
- package/dist/{ListItemAction-BxTkF6Tz.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
- package/dist/{ManageIncome-rcnDYsBJ.mjs → ManageIncome-A69EUO5u.mjs} +75 -75
- package/dist/{MicroWidgetContainer-B2hO9rOG.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-98-hKFqm.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
- package/dist/{NetWorthStore-DG2X69jG.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
- package/dist/{NotificationSettings-C7FYNM7I.mjs → NotificationSettings-CNmJWVeI.mjs} +248 -250
- package/dist/{OriginalBalanceAction-C6jdS4ws.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +3 -3
- package/dist/{RecurringSettings-C81H1l38.mjs → RecurringSettings-B0uObPlD.mjs} +3 -3
- package/dist/{SpendingLegend-DqZxN_BZ.mjs → SpendingLegend-Bf-wbJvb.mjs} +2 -2
- package/dist/{TransactionDetails-BA_E5nQ-.mjs → TransactionDetails-COH0OKNG.mjs} +5 -5
- package/dist/{TransactionStore-PRlwE-TF.mjs → TransactionStore-Dz-G8Wd0.mjs} +2 -2
- package/dist/{User-Cnlegl1N.mjs → User-wXzDI4M8.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-DfPXJzbv.mjs → ViewMoreMicroCard-C0832BMe.mjs} +101 -105
- package/dist/{WidgetContainer-CaPjoWeE.mjs → WidgetContainer-6dsjtOVg.mjs} +2 -2
- package/dist/accounts/index.es.js +140 -148
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +478 -483
- package/dist/cashflow/index.es.js +362 -367
- package/dist/categories/index.es.js +1 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/index.es.js +33 -35
- package/dist/dashboard/index.es.js +88 -90
- package/dist/debts/index.es.js +342 -346
- package/dist/{exportTransactionsToCSV-DuAaI5XA.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +1 -1
- package/dist/finstrong/index.es.js +350 -352
- package/dist/goals/index.es.js +511 -518
- package/dist/help/index.es.js +9 -13
- package/dist/{hooks-ZMp65DFz.mjs → hooks-C41HAxM5.mjs} +11 -11
- package/dist/investments/index.es.js +393 -395
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +240 -245
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +285 -293
- package/dist/settings/index.es.js +249 -252
- package/dist/spending/index.es.js +126 -138
- package/dist/transactions/index.es.js +73 -77
- package/dist/trends/index.es.js +588 -601
- package/dist/{useAccountDisplayName-Cjx8YmKK.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
- package/dist/{useInsightsEnabled-B7dxpDrX.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/package.json +1 -1
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +0 -6
- package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +0 -23
|
@@ -4,7 +4,7 @@ import { observer as P } from "mobx-react-lite";
|
|
|
4
4
|
import k from "@mui/material/Stack";
|
|
5
5
|
import xe from "@mui/material/Button";
|
|
6
6
|
import Le from "@mui/material/Typography";
|
|
7
|
-
import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as
|
|
7
|
+
import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as fe } from "@mxenabled/mx-icons";
|
|
8
8
|
import { L as ke } from "./Loader-DUaFpDGv.mjs";
|
|
9
9
|
import Z from "@mui/material/Box";
|
|
10
10
|
import se from "@mui/material/IconButton";
|
|
@@ -18,15 +18,14 @@ import Ue from "@mui/material/CircularProgress";
|
|
|
18
18
|
import { makeAutoObservable as ie, runInAction as Re } from "mobx";
|
|
19
19
|
import { G as ce, a as ze, u as Ke, b as $e } from "./useCombineEvents-CRwX-qWE.mjs";
|
|
20
20
|
import { B as de } from "./BeatApi-De2IaqH2.mjs";
|
|
21
|
-
import
|
|
22
|
-
import je from "@mui/material/
|
|
23
|
-
import Xe from "@mui/material/
|
|
24
|
-
import Qe from "@mui/material/
|
|
25
|
-
import qe from "@mui/material/CardHeader";
|
|
21
|
+
import Ye from "@mui/material/Card";
|
|
22
|
+
import je from "@mui/material/CardActions";
|
|
23
|
+
import Xe from "@mui/material/CardContent";
|
|
24
|
+
import Qe from "@mui/material/CardHeader";
|
|
26
25
|
const Ee = {
|
|
27
26
|
featureVersion: "spendVsIncomeTrends"
|
|
28
27
|
};
|
|
29
|
-
class
|
|
28
|
+
class qe {
|
|
30
29
|
copyApi = new ce("/", "");
|
|
31
30
|
copyObject = {};
|
|
32
31
|
namespace = "experiences";
|
|
@@ -75,7 +74,7 @@ const oe = {
|
|
|
75
74
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
76
75
|
}, v = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
|
|
77
76
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
78
|
-
}, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ye = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"),
|
|
77
|
+
}, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ye = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), Je = () => Object.values(oe).reduce(
|
|
79
78
|
(i, o) => ({
|
|
80
79
|
...i,
|
|
81
80
|
[ge(o)]: {
|
|
@@ -86,7 +85,7 @@ const oe = {
|
|
|
86
85
|
}
|
|
87
86
|
}),
|
|
88
87
|
{}
|
|
89
|
-
),
|
|
88
|
+
), et = () => Object.values(oe).reduce(
|
|
90
89
|
(i, o) => ({
|
|
91
90
|
...i,
|
|
92
91
|
[Ie(o)]: {
|
|
@@ -97,7 +96,7 @@ const oe = {
|
|
|
97
96
|
}
|
|
98
97
|
}),
|
|
99
98
|
{}
|
|
100
|
-
),
|
|
99
|
+
), tt = () => Object.values(oe).reduce(
|
|
101
100
|
(i, o) => ({
|
|
102
101
|
...i,
|
|
103
102
|
[ye(o)]: {
|
|
@@ -197,17 +196,17 @@ const oe = {
|
|
|
197
196
|
label: D.VIEW_MORE,
|
|
198
197
|
value: v
|
|
199
198
|
},
|
|
199
|
+
...Je(),
|
|
200
200
|
...et(),
|
|
201
|
-
...tt()
|
|
202
|
-
...it()
|
|
201
|
+
...tt()
|
|
203
202
|
}, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
|
|
204
203
|
throw t;
|
|
205
|
-
}),
|
|
204
|
+
}), Ce = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
|
|
206
205
|
throw t;
|
|
207
206
|
});
|
|
208
|
-
class
|
|
207
|
+
class it {
|
|
209
208
|
onAnalyticEvent = _e;
|
|
210
|
-
onAnalyticPageView =
|
|
209
|
+
onAnalyticPageView = Ce;
|
|
211
210
|
beatApi = new de("/", "");
|
|
212
211
|
constructor() {
|
|
213
212
|
ie(this);
|
|
@@ -218,7 +217,7 @@ class ot {
|
|
|
218
217
|
throw a.status === 401 && l(), a;
|
|
219
218
|
});
|
|
220
219
|
}, this.onAnalyticPageView = (n, r) => {
|
|
221
|
-
|
|
220
|
+
Ce(n, r).then((a) => a).catch((a) => {
|
|
222
221
|
throw a.status === 401 && l(), a;
|
|
223
222
|
});
|
|
224
223
|
}, this.beatApi = new de(o, t);
|
|
@@ -230,7 +229,7 @@ class ot {
|
|
|
230
229
|
this.beatApi.updateOffer(o);
|
|
231
230
|
};
|
|
232
231
|
}
|
|
233
|
-
class
|
|
232
|
+
class ot {
|
|
234
233
|
copyStore;
|
|
235
234
|
endpoint = "/";
|
|
236
235
|
insightsMicroWidgetStore;
|
|
@@ -238,7 +237,7 @@ class lt {
|
|
|
238
237
|
token = "";
|
|
239
238
|
isInitialized = !1;
|
|
240
239
|
constructor() {
|
|
241
|
-
this.copyStore = new
|
|
240
|
+
this.copyStore = new qe(), this.insightsMicroWidgetStore = new it(), ie(this);
|
|
242
241
|
}
|
|
243
242
|
initialize = async (o, t, l) => {
|
|
244
243
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
|
|
@@ -248,7 +247,7 @@ class lt {
|
|
|
248
247
|
});
|
|
249
248
|
};
|
|
250
249
|
}
|
|
251
|
-
const U = u.createContext(null),
|
|
250
|
+
const U = u.createContext(null), lt = ({
|
|
252
251
|
onEvent: i,
|
|
253
252
|
onPageview: o,
|
|
254
253
|
store: t,
|
|
@@ -262,13 +261,13 @@ const U = u.createContext(null), nt = ({
|
|
|
262
261
|
icon: a,
|
|
263
262
|
isActiveCard: c,
|
|
264
263
|
isZeroState: h,
|
|
265
|
-
onCardClick:
|
|
264
|
+
onCardClick: C = () => {
|
|
266
265
|
},
|
|
267
266
|
showIcon: p,
|
|
268
267
|
style: d = {},
|
|
269
268
|
title: E,
|
|
270
269
|
variant: s,
|
|
271
|
-
widthOverrides:
|
|
270
|
+
widthOverrides: f
|
|
272
271
|
}, _) {
|
|
273
272
|
const R = te(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, y = s ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
|
|
274
273
|
Be,
|
|
@@ -307,7 +306,7 @@ const U = u.createContext(null), nt = ({
|
|
|
307
306
|
role: "group",
|
|
308
307
|
sx: {
|
|
309
308
|
height: "100%",
|
|
310
|
-
minWidth:
|
|
309
|
+
minWidth: f ? `${f}px` : "100%",
|
|
311
310
|
fontFamily: R.typography.fontFamily
|
|
312
311
|
},
|
|
313
312
|
children: /* @__PURE__ */ e(
|
|
@@ -316,7 +315,7 @@ const U = u.createContext(null), nt = ({
|
|
|
316
315
|
"aria-hidden": !c,
|
|
317
316
|
"aria-label": t,
|
|
318
317
|
id: "divButton",
|
|
319
|
-
onClick: () =>
|
|
318
|
+
onClick: () => C(),
|
|
320
319
|
onKeyDown: () => I(!1),
|
|
321
320
|
onKeyUp: () => I(!0),
|
|
322
321
|
ref: _,
|
|
@@ -328,7 +327,7 @@ const U = u.createContext(null), nt = ({
|
|
|
328
327
|
},
|
|
329
328
|
tabIndex: c ? 0 : -1,
|
|
330
329
|
children: /* @__PURE__ */ e(
|
|
331
|
-
|
|
330
|
+
Ye,
|
|
332
331
|
{
|
|
333
332
|
"aria-roledescription": "slide",
|
|
334
333
|
className: "mx-micro-card",
|
|
@@ -354,7 +353,7 @@ const U = u.createContext(null), nt = ({
|
|
|
354
353
|
},
|
|
355
354
|
children: [
|
|
356
355
|
/* @__PURE__ */ e(
|
|
357
|
-
|
|
356
|
+
Qe,
|
|
358
357
|
{
|
|
359
358
|
avatar: p && a,
|
|
360
359
|
subheader: h && M,
|
|
@@ -363,9 +362,9 @@ const U = u.createContext(null), nt = ({
|
|
|
363
362
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
364
363
|
}
|
|
365
364
|
),
|
|
366
|
-
/* @__PURE__ */ e(
|
|
365
|
+
/* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: !h && M }),
|
|
367
366
|
!!o && /* @__PURE__ */ e(
|
|
368
|
-
|
|
367
|
+
je,
|
|
369
368
|
{
|
|
370
369
|
sx: {
|
|
371
370
|
mt: "auto",
|
|
@@ -396,10 +395,10 @@ const U = u.createContext(null), nt = ({
|
|
|
396
395
|
)
|
|
397
396
|
}
|
|
398
397
|
);
|
|
399
|
-
}),
|
|
398
|
+
}), nt = ({ beat: i }) => {
|
|
400
399
|
const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || be.UNCATEGORIZED;
|
|
401
400
|
return /* @__PURE__ */ e(Ze, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
|
|
402
|
-
},
|
|
401
|
+
}, rt = ({ beat: i }) => {
|
|
403
402
|
const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
|
|
404
403
|
return /* @__PURE__ */ e(
|
|
405
404
|
Pe,
|
|
@@ -413,7 +412,7 @@ const U = u.createContext(null), nt = ({
|
|
|
413
412
|
}
|
|
414
413
|
}
|
|
415
414
|
);
|
|
416
|
-
},
|
|
415
|
+
}, at = ({
|
|
417
416
|
color: i = "currentColor",
|
|
418
417
|
height: o,
|
|
419
418
|
size: t = 16,
|
|
@@ -439,16 +438,16 @@ const U = u.createContext(null), nt = ({
|
|
|
439
438
|
}
|
|
440
439
|
)
|
|
441
440
|
}
|
|
442
|
-
),
|
|
441
|
+
), st = (i) => i ? i.data ? i.data.map((o) => {
|
|
443
442
|
const t = {};
|
|
444
443
|
return i.names?.map((l, n) => {
|
|
445
444
|
t[l] = o[n];
|
|
446
445
|
}), t;
|
|
447
|
-
}) : [] : [],
|
|
448
|
-
const t =
|
|
446
|
+
}) : [] : [], ct = (i, o) => {
|
|
447
|
+
const t = st(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
|
|
449
448
|
return !n.length || !r.length ? o.palette.primary.main : n[0].amount > r[0].amount ? o.palette.error.main : n[0].amount < r[0].amount ? o.palette.success.main : o.palette.primary.main;
|
|
450
|
-
},
|
|
451
|
-
const o = te(), t =
|
|
449
|
+
}, dt = ({ beat: i }) => {
|
|
450
|
+
const o = te(), t = ct(i.data_series, o);
|
|
452
451
|
return /* @__PURE__ */ e(Ve, { sx: { color: t } });
|
|
453
452
|
}, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
454
453
|
/* @__PURE__ */ e(
|
|
@@ -1231,9 +1230,9 @@ const U = u.createContext(null), nt = ({
|
|
|
1231
1230
|
}
|
|
1232
1231
|
)
|
|
1233
1232
|
] })
|
|
1234
|
-
] }),
|
|
1233
|
+
] }), Et = ({ beat: i }) => {
|
|
1235
1234
|
const { icon_type: o, icon_color: t } = i;
|
|
1236
|
-
return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(
|
|
1235
|
+
return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(rt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(dt, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
|
|
1237
1236
|
ae,
|
|
1238
1237
|
{
|
|
1239
1238
|
filled: !0,
|
|
@@ -1247,7 +1246,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1247
1246
|
if (!i)
|
|
1248
1247
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
1249
1248
|
return i.store.copyStore;
|
|
1250
|
-
},
|
|
1249
|
+
}, ht = () => {
|
|
1251
1250
|
const i = u.useContext(U);
|
|
1252
1251
|
if (!i?.store?.insightsMicroWidgetStore)
|
|
1253
1252
|
throw new Error(
|
|
@@ -1264,12 +1263,12 @@ const U = u.createContext(null), nt = ({
|
|
|
1264
1263
|
if (!i)
|
|
1265
1264
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
1266
1265
|
return { onPageview: i.onPageview };
|
|
1267
|
-
},
|
|
1266
|
+
}, ut = {
|
|
1268
1267
|
LARGE: 180,
|
|
1269
1268
|
STANDARD: 154,
|
|
1270
1269
|
XLARGE: 200,
|
|
1271
1270
|
XXLARGE: 248
|
|
1272
|
-
},
|
|
1271
|
+
}, pt = 50, Ae = 1, _t = ({
|
|
1273
1272
|
ariaLabel: i,
|
|
1274
1273
|
backgroundColor: o,
|
|
1275
1274
|
beat: t,
|
|
@@ -1279,13 +1278,13 @@ const U = u.createContext(null), nt = ({
|
|
|
1279
1278
|
isActiveCard: a,
|
|
1280
1279
|
onCardClick: c,
|
|
1281
1280
|
posthog: h,
|
|
1282
|
-
showIcon:
|
|
1281
|
+
showIcon: C,
|
|
1283
1282
|
variant: p,
|
|
1284
1283
|
widthOverrides: d
|
|
1285
1284
|
}) => {
|
|
1286
1285
|
const { ref: E, inView: s } = me({
|
|
1287
1286
|
threshold: Ae
|
|
1288
|
-
}), { cardsCopy:
|
|
1287
|
+
}), { cardsCopy: f } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = ht();
|
|
1289
1288
|
ee(() => {
|
|
1290
1289
|
s && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
|
|
1291
1290
|
...t,
|
|
@@ -1328,18 +1327,18 @@ const U = u.createContext(null), nt = ({
|
|
|
1328
1327
|
return /* @__PURE__ */ e(
|
|
1329
1328
|
j,
|
|
1330
1329
|
{
|
|
1331
|
-
actionText: t.micro_call_to_action ||
|
|
1330
|
+
actionText: t.micro_call_to_action || f.micro_card_cta,
|
|
1332
1331
|
ariaLabel: i,
|
|
1333
1332
|
backgroundColor: o,
|
|
1334
1333
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1335
1334
|
heightOverrides: n,
|
|
1336
|
-
icon: /* @__PURE__ */ e(
|
|
1335
|
+
icon: /* @__PURE__ */ e(Et, { beat: t }),
|
|
1337
1336
|
isActiveCard: a,
|
|
1338
1337
|
onCardClick: I,
|
|
1339
1338
|
posthog: h,
|
|
1340
1339
|
ref: E,
|
|
1341
1340
|
showCTAColocatedWithText: l,
|
|
1342
|
-
showIcon:
|
|
1341
|
+
showIcon: C,
|
|
1343
1342
|
title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
|
|
1344
1343
|
variant: p,
|
|
1345
1344
|
widthOverrides: d
|
|
@@ -1355,7 +1354,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1355
1354
|
shouldApplyDotAnimation: a = !1,
|
|
1356
1355
|
visibleCardsCount: c = 1
|
|
1357
1356
|
}) => {
|
|
1358
|
-
const h = Fe(), { carouselCopy:
|
|
1357
|
+
const h = Fe(), { carouselCopy: C } = V(), p = Math.floor(r) > n || i - c + 1 === 0, d = r < 0 || o - 1 === i, E = h.palette.grey[500], s = h.palette.primary.main;
|
|
1359
1358
|
return /* @__PURE__ */ g(
|
|
1360
1359
|
k,
|
|
1361
1360
|
{
|
|
@@ -1375,7 +1374,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1375
1374
|
se,
|
|
1376
1375
|
{
|
|
1377
1376
|
"aria-disabled": p,
|
|
1378
|
-
"aria-label":
|
|
1377
|
+
"aria-label": C.previous_insight_cta_aria,
|
|
1379
1378
|
disabled: p,
|
|
1380
1379
|
onClick: l,
|
|
1381
1380
|
children: /* @__PURE__ */ e(
|
|
@@ -1388,7 +1387,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1388
1387
|
)
|
|
1389
1388
|
}
|
|
1390
1389
|
),
|
|
1391
|
-
Array.from({ length: o }).map((
|
|
1390
|
+
Array.from({ length: o }).map((f, _) => {
|
|
1392
1391
|
const R = _ === i;
|
|
1393
1392
|
return /* @__PURE__ */ e(
|
|
1394
1393
|
Z,
|
|
@@ -1418,11 +1417,11 @@ const U = u.createContext(null), nt = ({
|
|
|
1418
1417
|
se,
|
|
1419
1418
|
{
|
|
1420
1419
|
"aria-disabled": d,
|
|
1421
|
-
"aria-label":
|
|
1420
|
+
"aria-label": C.next_insight_cta_aria,
|
|
1422
1421
|
disabled: d,
|
|
1423
1422
|
onClick: t,
|
|
1424
1423
|
children: /* @__PURE__ */ e(
|
|
1425
|
-
|
|
1424
|
+
fe,
|
|
1426
1425
|
{
|
|
1427
1426
|
style: {
|
|
1428
1427
|
color: d ? E : s
|
|
@@ -1434,7 +1433,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1434
1433
|
]
|
|
1435
1434
|
}
|
|
1436
1435
|
);
|
|
1437
|
-
},
|
|
1436
|
+
}, ft = ({
|
|
1438
1437
|
activeCardIndex: i,
|
|
1439
1438
|
beats: o,
|
|
1440
1439
|
cardWidth: t,
|
|
@@ -1445,7 +1444,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1445
1444
|
showIcon: c,
|
|
1446
1445
|
variant: h
|
|
1447
1446
|
}) => {
|
|
1448
|
-
const { carouselCopy:
|
|
1447
|
+
const { carouselCopy: C } = V(), p = {
|
|
1449
1448
|
showCTAColocatedWithText: l,
|
|
1450
1449
|
heightOverrides: n,
|
|
1451
1450
|
posthog: a,
|
|
@@ -1454,13 +1453,13 @@ const U = u.createContext(null), nt = ({
|
|
|
1454
1453
|
};
|
|
1455
1454
|
return /* @__PURE__ */ g(De, { children: [
|
|
1456
1455
|
o.map((d, E) => {
|
|
1457
|
-
const s = E + 1,
|
|
1458
|
-
|
|
1456
|
+
const s = E + 1, f = o.length + 1, _ = Ge(
|
|
1457
|
+
C.card_position_in_carousel_aria,
|
|
1459
1458
|
s.toString(),
|
|
1460
|
-
|
|
1459
|
+
f.toString()
|
|
1461
1460
|
), R = d.micro_title && d.micro_title.length > 0, O = d.micro_description && d.micro_description.length > 0, I = R ? d.micro_title : d.title, m = O ? d.micro_description : d.description;
|
|
1462
1461
|
return /* @__PURE__ */ e(
|
|
1463
|
-
|
|
1462
|
+
_t,
|
|
1464
1463
|
{
|
|
1465
1464
|
ariaLabel: `${_}: ${I}, ${m}`,
|
|
1466
1465
|
beat: d,
|
|
@@ -1474,7 +1473,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1474
1473
|
);
|
|
1475
1474
|
}),
|
|
1476
1475
|
/* @__PURE__ */ e(
|
|
1477
|
-
|
|
1476
|
+
At,
|
|
1478
1477
|
{
|
|
1479
1478
|
isActiveCard: i === o.length,
|
|
1480
1479
|
onCardClick: r,
|
|
@@ -1483,7 +1482,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1483
1482
|
}
|
|
1484
1483
|
)
|
|
1485
1484
|
] });
|
|
1486
|
-
},
|
|
1485
|
+
}, mt = ({
|
|
1487
1486
|
analyticsMetadata: i,
|
|
1488
1487
|
allowSingleCardPeeking: o = !1,
|
|
1489
1488
|
beats: t = [],
|
|
@@ -1493,13 +1492,13 @@ const U = u.createContext(null), nt = ({
|
|
|
1493
1492
|
posthog: a,
|
|
1494
1493
|
showCarouselControls: c,
|
|
1495
1494
|
showIcon: h,
|
|
1496
|
-
showWithMargin:
|
|
1495
|
+
showWithMargin: C = !0,
|
|
1497
1496
|
variant: p,
|
|
1498
1497
|
widthOverrides: d,
|
|
1499
1498
|
visibleCardsCount: E = 1
|
|
1500
1499
|
// Default to 1 card visible
|
|
1501
1500
|
}) => {
|
|
1502
|
-
const s = u.useRef(null),
|
|
1501
|
+
const s = u.useRef(null), f = u.useRef(null), [_, R] = u.useState(0), [O, I] = u.useState(null), [m, T] = u.useState(null), [y, M] = u.useState(null), { carouselCopy: W } = V(), { onEvent: F } = z();
|
|
1503
1502
|
u.useEffect(() => {
|
|
1504
1503
|
if (s.current && !o) {
|
|
1505
1504
|
const A = s.current.offsetWidth, b = 8;
|
|
@@ -1512,7 +1511,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1512
1511
|
M(B);
|
|
1513
1512
|
}
|
|
1514
1513
|
}, [E, s.current?.offsetWidth]), u.useEffect(() => {
|
|
1515
|
-
const A =
|
|
1514
|
+
const A = f.current?.offsetWidth;
|
|
1516
1515
|
if (typeof A == "number" && o) {
|
|
1517
1516
|
const b = (G) => {
|
|
1518
1517
|
const re = [
|
|
@@ -1526,14 +1525,14 @@ const U = u.createContext(null), nt = ({
|
|
|
1526
1525
|
};
|
|
1527
1526
|
M(b(A));
|
|
1528
1527
|
const B = () => {
|
|
1529
|
-
const G =
|
|
1528
|
+
const G = f.current?.offsetWidth;
|
|
1530
1529
|
typeof G == "number" && M(b(G));
|
|
1531
1530
|
};
|
|
1532
1531
|
return window.addEventListener("resize", B), () => {
|
|
1533
1532
|
window.removeEventListener("resize", B);
|
|
1534
1533
|
};
|
|
1535
1534
|
}
|
|
1536
|
-
}, [o,
|
|
1535
|
+
}, [o, f]);
|
|
1537
1536
|
const K = () => {
|
|
1538
1537
|
F(S.ON_CAROUSEL_FORWARD_CLICK, i), s.current && y && s.current.scrollTo({
|
|
1539
1538
|
left: _ + y + 8,
|
|
@@ -1550,7 +1549,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1550
1549
|
s.current && R(s.current.scrollLeft);
|
|
1551
1550
|
}, Q = () => {
|
|
1552
1551
|
if (!m || !O) return;
|
|
1553
|
-
m - O >
|
|
1552
|
+
m - O > pt ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1554
1553
|
}, q = (A) => {
|
|
1555
1554
|
I(A.targetTouches[0].clientX);
|
|
1556
1555
|
}, Y = (A) => {
|
|
@@ -1561,7 +1560,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1561
1560
|
{
|
|
1562
1561
|
"aria-label": W.carousel_title,
|
|
1563
1562
|
"aria-roledescription": "carousel",
|
|
1564
|
-
ref:
|
|
1563
|
+
ref: f,
|
|
1565
1564
|
role: "group/region",
|
|
1566
1565
|
sx: {
|
|
1567
1566
|
alignItems: "center",
|
|
@@ -1585,7 +1584,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1585
1584
|
gap: 8,
|
|
1586
1585
|
listStyleType: "none",
|
|
1587
1586
|
m: 0,
|
|
1588
|
-
maxWidth:
|
|
1587
|
+
maxWidth: C ? "calc(100% - 32px)" : "100%",
|
|
1589
1588
|
overflowX: "auto",
|
|
1590
1589
|
overflowY: "hidden",
|
|
1591
1590
|
p: 0,
|
|
@@ -1597,7 +1596,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1597
1596
|
}
|
|
1598
1597
|
},
|
|
1599
1598
|
children: /* @__PURE__ */ e(
|
|
1600
|
-
|
|
1599
|
+
ft,
|
|
1601
1600
|
{
|
|
1602
1601
|
activeCardIndex: w,
|
|
1603
1602
|
beats: t,
|
|
@@ -1628,7 +1627,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1628
1627
|
]
|
|
1629
1628
|
}
|
|
1630
1629
|
);
|
|
1631
|
-
},
|
|
1630
|
+
}, Rt = P(mt), gt = ({
|
|
1632
1631
|
analyticsMetadata: i,
|
|
1633
1632
|
onCardClick: o,
|
|
1634
1633
|
posthog: t,
|
|
@@ -1665,7 +1664,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1665
1664
|
/* @__PURE__ */ e(
|
|
1666
1665
|
xe,
|
|
1667
1666
|
{
|
|
1668
|
-
endIcon: /* @__PURE__ */ e(
|
|
1667
|
+
endIcon: /* @__PURE__ */ e(fe, { size: 20 }),
|
|
1669
1668
|
onClick: a,
|
|
1670
1669
|
size: "small",
|
|
1671
1670
|
sx: (c) => ({
|
|
@@ -1678,7 +1677,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1678
1677
|
]
|
|
1679
1678
|
}
|
|
1680
1679
|
) : /* @__PURE__ */ e(ke, {});
|
|
1681
|
-
},
|
|
1680
|
+
}, It = P(gt), yt = ({
|
|
1682
1681
|
heightOverrides: i,
|
|
1683
1682
|
widthOverrides: o,
|
|
1684
1683
|
children: t
|
|
@@ -1711,7 +1710,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1711
1710
|
u.useEffect(() => {
|
|
1712
1711
|
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1713
1712
|
}, []);
|
|
1714
|
-
const
|
|
1713
|
+
const C = () => {
|
|
1715
1714
|
t && t(), c(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1716
1715
|
template: "no_relevant_insights"
|
|
1717
1716
|
});
|
|
@@ -1725,7 +1724,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1725
1724
|
heightOverrides: o,
|
|
1726
1725
|
icon: /* @__PURE__ */ e(Se, {}),
|
|
1727
1726
|
isZeroState: !0,
|
|
1728
|
-
onCardClick:
|
|
1727
|
+
onCardClick: C,
|
|
1729
1728
|
posthog: l,
|
|
1730
1729
|
showIcon: n,
|
|
1731
1730
|
style: {
|
|
@@ -1737,7 +1736,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1737
1736
|
variant: r
|
|
1738
1737
|
}
|
|
1739
1738
|
);
|
|
1740
|
-
},
|
|
1739
|
+
}, Qt = P(Oe), Te = ({
|
|
1741
1740
|
ariaLabel: i,
|
|
1742
1741
|
heightOverrides: o,
|
|
1743
1742
|
onCardClick: t,
|
|
@@ -1763,7 +1762,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1763
1762
|
variant: r
|
|
1764
1763
|
}
|
|
1765
1764
|
);
|
|
1766
|
-
},
|
|
1765
|
+
}, qt = P(Te), vt = () => /* @__PURE__ */ e(
|
|
1767
1766
|
Z,
|
|
1768
1767
|
{
|
|
1769
1768
|
sx: {
|
|
@@ -1775,7 +1774,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1775
1774
|
},
|
|
1776
1775
|
children: /* @__PURE__ */ e(Ue, {})
|
|
1777
1776
|
}
|
|
1778
|
-
), N = new
|
|
1777
|
+
), N = new ot(), St = ({
|
|
1779
1778
|
allowSingleCardPeeking: i,
|
|
1780
1779
|
areBeatsLoading: o,
|
|
1781
1780
|
beats: t = [],
|
|
@@ -1788,13 +1787,13 @@ const U = u.createContext(null), nt = ({
|
|
|
1788
1787
|
},
|
|
1789
1788
|
onEvent: h = () => {
|
|
1790
1789
|
},
|
|
1791
|
-
onPageview:
|
|
1790
|
+
onPageview: C = () => {
|
|
1792
1791
|
},
|
|
1793
1792
|
posthog: p,
|
|
1794
1793
|
showBorder: d = !0,
|
|
1795
1794
|
showCarouselControls: E,
|
|
1796
1795
|
showHeader: s,
|
|
1797
|
-
showIcon:
|
|
1796
|
+
showIcon: f,
|
|
1798
1797
|
showWithMargin: _ = !0,
|
|
1799
1798
|
token: R = "",
|
|
1800
1799
|
userHasFullInsightFeedBeats: O,
|
|
@@ -1802,11 +1801,8 @@ const U = u.createContext(null), nt = ({
|
|
|
1802
1801
|
visibleCardsCount: m = 1,
|
|
1803
1802
|
widthOverrides: T
|
|
1804
1803
|
}) => {
|
|
1805
|
-
const [y, M] = J("STANDARD"), [W, F] = J(!1), [K, $] = J(!1), X = Ke([h], N), Q = $e([
|
|
1806
|
-
|
|
1807
|
-
widgetName: "InsightsMicroWidget",
|
|
1808
|
-
isLoaded: W
|
|
1809
|
-
}), u.useEffect(() => {
|
|
1804
|
+
const [y, M] = J("STANDARD"), [W, F] = J(!1), [K, $] = J(!1), X = Ke([h], N), Q = $e([C], N);
|
|
1805
|
+
u.useEffect(() => {
|
|
1810
1806
|
!N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
|
|
1811
1807
|
}, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
|
|
1812
1808
|
const w = window.innerHeight;
|
|
@@ -1819,7 +1815,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1819
1815
|
heightOverrides: r,
|
|
1820
1816
|
onCardClick: c,
|
|
1821
1817
|
posthog: p,
|
|
1822
|
-
showIcon:
|
|
1818
|
+
showIcon: f,
|
|
1823
1819
|
showWithMargin: _,
|
|
1824
1820
|
widthOverrides: T
|
|
1825
1821
|
}, Y = {
|
|
@@ -1829,12 +1825,12 @@ const U = u.createContext(null), nt = ({
|
|
|
1829
1825
|
heightOverrides: r,
|
|
1830
1826
|
onCardClick: c,
|
|
1831
1827
|
posthog: p,
|
|
1832
|
-
showIcon:
|
|
1828
|
+
showIcon: f
|
|
1833
1829
|
};
|
|
1834
|
-
return /* @__PURE__ */ e(
|
|
1835
|
-
!W && /* @__PURE__ */ e(
|
|
1830
|
+
return /* @__PURE__ */ e(lt, { onEvent: X, onPageview: Q, store: N, children: /* @__PURE__ */ g(yt, { heightOverrides: r, widthOverrides: T, children: [
|
|
1831
|
+
!W && /* @__PURE__ */ e(vt, {}),
|
|
1836
1832
|
W && s && /* @__PURE__ */ e(
|
|
1837
|
-
|
|
1833
|
+
It,
|
|
1838
1834
|
{
|
|
1839
1835
|
analyticsMetadata: Ee,
|
|
1840
1836
|
onCardClick: c,
|
|
@@ -1843,7 +1839,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1843
1839
|
}
|
|
1844
1840
|
),
|
|
1845
1841
|
W && !!t.length && /* @__PURE__ */ e(
|
|
1846
|
-
|
|
1842
|
+
Rt,
|
|
1847
1843
|
{
|
|
1848
1844
|
allowSingleCardPeeking: i,
|
|
1849
1845
|
analyticsMetadata: Ee,
|
|
@@ -1866,7 +1862,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1866
1862
|
k,
|
|
1867
1863
|
{
|
|
1868
1864
|
sx: {
|
|
1869
|
-
height: `calc(${
|
|
1865
|
+
height: `calc(${ut[y]}px - 44px)`,
|
|
1870
1866
|
width: _ ? `calc(${T}px - 32px)` : "100%"
|
|
1871
1867
|
},
|
|
1872
1868
|
children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
|
|
@@ -1875,7 +1871,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1875
1871
|
}
|
|
1876
1872
|
)
|
|
1877
1873
|
] }) });
|
|
1878
|
-
},
|
|
1874
|
+
}, Jt = P(St), Mt = ({
|
|
1879
1875
|
isActiveCard: i,
|
|
1880
1876
|
ariaLabel: o,
|
|
1881
1877
|
heightOverrides: t,
|
|
@@ -1885,7 +1881,7 @@ const U = u.createContext(null), nt = ({
|
|
|
1885
1881
|
variant: a,
|
|
1886
1882
|
widthOverrides: c
|
|
1887
1883
|
}) => {
|
|
1888
|
-
const h = te(), { ref:
|
|
1884
|
+
const h = te(), { ref: C, inView: p } = me({
|
|
1889
1885
|
threshold: Ae
|
|
1890
1886
|
}), { cardsCopy: d } = V(), { onEvent: E } = z();
|
|
1891
1887
|
ee(() => {
|
|
@@ -1905,31 +1901,31 @@ const U = u.createContext(null), nt = ({
|
|
|
1905
1901
|
ariaLabel: o,
|
|
1906
1902
|
description: d.view_more_card_description,
|
|
1907
1903
|
heightOverrides: t,
|
|
1908
|
-
icon: /* @__PURE__ */ e(
|
|
1904
|
+
icon: /* @__PURE__ */ e(at, { color: h.palette.primary.main }),
|
|
1909
1905
|
isActiveCard: i,
|
|
1910
1906
|
onCardClick: s,
|
|
1911
1907
|
posthog: n,
|
|
1912
|
-
ref:
|
|
1908
|
+
ref: C,
|
|
1913
1909
|
showIcon: r,
|
|
1914
1910
|
title: d.view_more_card_title,
|
|
1915
1911
|
variant: a,
|
|
1916
1912
|
widthOverrides: c
|
|
1917
1913
|
}
|
|
1918
1914
|
);
|
|
1919
|
-
},
|
|
1915
|
+
}, At = P(Mt);
|
|
1920
1916
|
export {
|
|
1921
|
-
|
|
1917
|
+
ot as A,
|
|
1922
1918
|
j as B,
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1919
|
+
It as C,
|
|
1920
|
+
lt as I,
|
|
1921
|
+
Rt as M,
|
|
1922
|
+
Qt as N,
|
|
1927
1923
|
Ee as T,
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1924
|
+
At as V,
|
|
1925
|
+
qt as Z,
|
|
1926
|
+
_t as a,
|
|
1927
|
+
Jt as b,
|
|
1928
|
+
at as c,
|
|
1929
|
+
dt as d,
|
|
1934
1930
|
Se as e
|
|
1935
1931
|
};
|
|
@@ -13,7 +13,7 @@ import { ChevronLeft as le } from "@mxenabled/mx-icons";
|
|
|
13
13
|
import { Icon as T, Text as X, DateRangePicker as J, H1 as Ce, H3 as de } from "@mxenabled/mxui";
|
|
14
14
|
import { u as Te } from "./useDimensions-27p2evRx.mjs";
|
|
15
15
|
import { L as Ie } from "./Loader-DUaFpDGv.mjs";
|
|
16
|
-
import { g as Ee, b as Re, u as ge, a as Ae, W as Se } from "./hooks-
|
|
16
|
+
import { g as Ee, b as Re, u as ge, a as Ae, W as Se } from "./hooks-C41HAxM5.mjs";
|
|
17
17
|
import { u as ie } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
18
18
|
import { addMonths as Q } from "date-fns/addMonths";
|
|
19
19
|
import { addDays as ue } from "date-fns/addDays";
|
|
@@ -37,7 +37,7 @@ import Ke from "@mui/material/ToggleButtonGroup";
|
|
|
37
37
|
import Ge from "@mui/material/styles/useTheme";
|
|
38
38
|
import { f as K, a as G, D as Me } from "./Dialog-BPTr3qHE.mjs";
|
|
39
39
|
import { D as We } from "./Drawer-BEtCk82g.mjs";
|
|
40
|
-
import { k as ye, l as xe } from "./ConnectDrawer-
|
|
40
|
+
import { k as ye, l as xe } from "./ConnectDrawer-CuUj16NH.mjs";
|
|
41
41
|
const ve = {
|
|
42
42
|
ACCOUNTS_CLICK_ACCOUNT: "accounts_widget_click_account",
|
|
43
43
|
ACCOUNTS_CLICK_CONNECT: "accounts_widget_click_connect_accounts",
|