@mx-cartographer/experiences 9.0.16 → 9.0.17-alpha
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 -5
- package/dist/Account-DR7Plrqy.mjs +1 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/{AccountDetailsDrawer-BuxLfuIm.mjs → AccountDetailsDrawer-CZPeLsCq.mjs} +4 -3
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs.map +1 -0
- package/dist/{AccountDetailsHeader-ByGNPZpO.mjs → AccountDetailsHeader-BvbCUQSS.mjs} +3 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs.map +1 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs +1 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +1 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +1 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +1 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +1 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +1 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +1 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/{EmbeddedCard-BxgB26dd.mjs → EmbeddedCard-DH8vQ3qN.mjs} +184 -181
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +1 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/{ExportCsvAction-BV69DnpC.mjs → ExportCsvAction-C9KWH3Az.mjs} +2 -1
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +1 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/{Help-BMCejaQr.mjs → Help-aERwhajy.mjs} +3 -2
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +1 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +1 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +1 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/{ManageIncome-BadwsHRL.mjs → ManageIncome-Dcsnnz86.mjs} +9 -8
- package/dist/ManageIncome-Dcsnnz86.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs +1 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +1 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/{RecurringSettings-CGZiV-Ie.mjs → RecurringSettings-D8hBbXV_.mjs} +2 -1
- package/dist/RecurringSettings-D8hBbXV_.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +1 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +1 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +1 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +1 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/{TransactionDetails-DQ_eE7M4.mjs → TransactionDetails-roZ5xLq8.mjs} +2 -1
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-C1fdL3Iu.mjs +1 -0
- package/dist/UserStore-C1fdL3Iu.mjs.map +1 -0
- package/dist/{ViewMoreMicroCard-fnwE0hqd.mjs → ViewMoreMicroCard-Dxghxphh.mjs} +352 -355
- package/dist/ViewMoreMicroCard-Dxghxphh.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/index.es.js +5 -4
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +1 -0
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +4 -3
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/index.es.js +5 -4
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +1 -0
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/index.es.js +2 -1
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +1 -0
- package/dist/core/index.es.js.map +1 -0
- package/dist/dashboard/index.es.js +1 -0
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +64 -63
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +6 -5
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +1 -0
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +2 -1
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +1 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/index.es.js +3 -2
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1 -0
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +1 -0
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +2 -1
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +1 -0
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +1 -0
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/index.es.js +152 -138
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +2 -1
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +3 -2
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +6 -5
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +5 -4
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +6 -6
- package/dist/ListItemWrapper-BHIbqx7E.mjs +0 -42
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
1
|
+
import { jsx as o, jsxs as w, Fragment as Te } from "react/jsx-runtime";
|
|
2
|
+
import I, { useEffect as re, useState as ie } from "react";
|
|
3
|
+
import { observer as U } from "mobx-react-lite";
|
|
4
4
|
import k from "@mui/material/Stack";
|
|
5
|
-
import
|
|
6
|
-
import { CategoryIcon as
|
|
7
|
-
import { Close as
|
|
8
|
-
import { L as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
5
|
+
import ke from "@mui/material/Button";
|
|
6
|
+
import { CategoryIcon as Ue, MerchantLogo as ze, InstitutionLogo as Ke, P as pe, Text as me, H3 as Fe } from "@mxenabled/mxui";
|
|
7
|
+
import { Close as He, ChevronLeft as $e, ChevronRight as Re } from "@mxenabled/mx-icons";
|
|
8
|
+
import { L as je } from "./Loader-CxeBwuPG.mjs";
|
|
9
|
+
import ae from "@mui/material/Box";
|
|
10
|
+
import ue from "@mui/material/IconButton";
|
|
11
11
|
import { useTheme as P, alpha as s } from "@mui/material/styles";
|
|
12
|
-
import { useInView as
|
|
12
|
+
import { useInView as Oe } from "react-intersection-observer";
|
|
13
13
|
import { B as c } from "./BeatMaterialIcon-1KOfRZrA.mjs";
|
|
14
|
-
import { C as
|
|
15
|
-
import { b as
|
|
16
|
-
import
|
|
17
|
-
import { makeAutoObservable as
|
|
18
|
-
import { a as
|
|
19
|
-
import { G as
|
|
20
|
-
import { u as
|
|
21
|
-
import { Card as
|
|
22
|
-
class
|
|
23
|
-
copyApi = new
|
|
14
|
+
import { C as Ye } from "./Category-DEKZGLYe.mjs";
|
|
15
|
+
import { b as Xe } from "./Localization-DnoVyBNK.mjs";
|
|
16
|
+
import Ze from "@mui/material/CircularProgress";
|
|
17
|
+
import { makeAutoObservable as se, runInAction as We } from "mobx";
|
|
18
|
+
import { a as Qe, u as qe, b as Je } from "./Analytics-CkYXKvco.mjs";
|
|
19
|
+
import { G as Ce, B as he } from "./GlobalCopyApi-wcnDUzMV.mjs";
|
|
20
|
+
import { u as et } from "./useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
21
|
+
import { Card as tt, CardActionArea as ot, Box as nt, IconButton as it, Stack as F, Button as ge } from "@mui/material";
|
|
22
|
+
class rt {
|
|
23
|
+
copyApi = new Ce("/", "");
|
|
24
24
|
copyObject = {};
|
|
25
25
|
namespace = "experiences";
|
|
26
26
|
translationKey = "micro_insights";
|
|
27
27
|
constructor() {
|
|
28
|
-
|
|
28
|
+
se(this);
|
|
29
29
|
}
|
|
30
30
|
// NOTE: Not sure if this is special case, but other stores have this deprecation todo
|
|
31
31
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
32
32
|
// TODO: Remove this function
|
|
33
33
|
initialize = async (e, n) => {
|
|
34
|
-
this.copyApi = new
|
|
34
|
+
this.copyApi = new Ce(e, n), await this.loadCopy();
|
|
35
35
|
};
|
|
36
36
|
loadCopy = async () => {
|
|
37
37
|
const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
38
|
-
|
|
38
|
+
We(() => {
|
|
39
39
|
this.copyObject = e[this.translationKey];
|
|
40
40
|
});
|
|
41
41
|
};
|
|
@@ -49,7 +49,7 @@ class dt {
|
|
|
49
49
|
return this.copyObject.zero_state;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const ce = {
|
|
53
53
|
BillAmountNotStandard: "BillAmountNotStandard",
|
|
54
54
|
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
55
55
|
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
@@ -66,42 +66,42 @@ const pe = {
|
|
|
66
66
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
67
67
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
68
68
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
69
|
-
}, O = window?.app?.clientConfig?.microwidget_instance_id || "",
|
|
69
|
+
}, O = window?.app?.clientConfig?.microwidget_instance_id || "", Ie = {
|
|
70
70
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
71
|
-
},
|
|
71
|
+
}, Ne = (t) => `on${t}Click`, we = (t) => `on${t}View`, Me = (t) => `on${t}ViewFirstTime`, le = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(ce).reduce(
|
|
72
72
|
(t, e) => ({
|
|
73
73
|
...t,
|
|
74
|
-
[
|
|
75
|
-
action:
|
|
74
|
+
[Ne(e)]: {
|
|
75
|
+
action: v.MICRO_BEAT_CLICKED,
|
|
76
76
|
category: b.BEAT_INTERACTION,
|
|
77
|
-
label:
|
|
77
|
+
label: le(e),
|
|
78
78
|
value: O
|
|
79
79
|
}
|
|
80
80
|
}),
|
|
81
81
|
{}
|
|
82
|
-
),
|
|
82
|
+
), st = () => Object.values(ce).reduce(
|
|
83
83
|
(t, e) => ({
|
|
84
84
|
...t,
|
|
85
|
-
[
|
|
86
|
-
action:
|
|
85
|
+
[we(e)]: {
|
|
86
|
+
action: v.MICRO_BEAT_DISPLAYED,
|
|
87
87
|
category: b.BEAT_INTERACTION,
|
|
88
|
-
label:
|
|
88
|
+
label: le(e),
|
|
89
89
|
value: O
|
|
90
90
|
}
|
|
91
91
|
}),
|
|
92
92
|
{}
|
|
93
|
-
),
|
|
93
|
+
), ct = () => Object.values(ce).reduce(
|
|
94
94
|
(t, e) => ({
|
|
95
95
|
...t,
|
|
96
|
-
[
|
|
97
|
-
action:
|
|
96
|
+
[Me(e)]: {
|
|
97
|
+
action: v.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
98
98
|
category: b.BEAT_INTERACTION,
|
|
99
|
-
label:
|
|
99
|
+
label: le(e),
|
|
100
100
|
value: O
|
|
101
101
|
}
|
|
102
102
|
}),
|
|
103
103
|
{}
|
|
104
|
-
),
|
|
104
|
+
), L = {
|
|
105
105
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
106
106
|
MICRO_WIDGET: "Micro Widget",
|
|
107
107
|
VIEW_MORE: "View More"
|
|
@@ -115,9 +115,9 @@ const pe = {
|
|
|
115
115
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
116
116
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
117
117
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
118
|
-
},
|
|
118
|
+
}, Le = {
|
|
119
119
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
120
|
-
},
|
|
120
|
+
}, v = {
|
|
121
121
|
CONTROL_BACKWARD: "Control Backward",
|
|
122
122
|
CONTROL_FORWARD: "Control Forward",
|
|
123
123
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -129,91 +129,91 @@ const pe = {
|
|
|
129
129
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
130
130
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
131
131
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
132
|
-
},
|
|
132
|
+
}, Ee = {
|
|
133
133
|
[B.MICRO_WIDGET_CAROUSEL]: {
|
|
134
|
-
label:
|
|
134
|
+
label: L.MICRO_WIDGET,
|
|
135
135
|
name: B.MICRO_WIDGET_CAROUSEL,
|
|
136
|
-
path:
|
|
136
|
+
path: Ie.INSIGHTS_MICRO_WIDGET,
|
|
137
137
|
value: O
|
|
138
138
|
},
|
|
139
139
|
// zero state
|
|
140
140
|
[B.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
141
|
-
label:
|
|
141
|
+
label: L.MICRO_WIDGET,
|
|
142
142
|
name: B.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
143
|
-
path:
|
|
143
|
+
path: Ie.INSIGHTS_MICRO_WIDGET,
|
|
144
144
|
value: O
|
|
145
145
|
},
|
|
146
146
|
// no relevant cards
|
|
147
147
|
[B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
148
|
-
label:
|
|
148
|
+
label: L.MICRO_WIDGET,
|
|
149
149
|
name: B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
150
150
|
path: "/micro-widget",
|
|
151
151
|
value: O
|
|
152
152
|
}
|
|
153
|
-
},
|
|
153
|
+
}, fe = {
|
|
154
154
|
// carousel control interaction events - clicks and swipes
|
|
155
155
|
[W.ON_CAROUSEL_BACK_CLICK]: {
|
|
156
|
-
action:
|
|
156
|
+
action: v.CONTROL_BACKWARD,
|
|
157
157
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
158
|
-
label:
|
|
158
|
+
label: L.CAROUSEL_CONTROL,
|
|
159
159
|
value: O
|
|
160
160
|
},
|
|
161
161
|
[W.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
162
|
-
action:
|
|
162
|
+
action: v.CONTROL_FORWARD,
|
|
163
163
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
164
|
-
label:
|
|
164
|
+
label: L.CAROUSEL_CONTROL,
|
|
165
165
|
value: O
|
|
166
166
|
},
|
|
167
167
|
[W.ON_CAROUSEL_BACK_SWIPE]: {
|
|
168
|
-
action:
|
|
168
|
+
action: v.SWIPE_BACKWARD,
|
|
169
169
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
170
|
-
label:
|
|
170
|
+
label: L.CAROUSEL_CONTROL,
|
|
171
171
|
value: O
|
|
172
172
|
},
|
|
173
173
|
[W.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
174
|
-
action:
|
|
174
|
+
action: v.SWIPE_FORWARD,
|
|
175
175
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
176
|
-
label:
|
|
176
|
+
label: L.CAROUSEL_CONTROL,
|
|
177
177
|
value: O
|
|
178
178
|
},
|
|
179
179
|
// read more card events
|
|
180
180
|
[W.ON_VIEW_MORE_CLICKED]: {
|
|
181
|
-
action:
|
|
181
|
+
action: v.MICRO_BEAT_CLICKED,
|
|
182
182
|
category: b.BEAT_INTERACTION,
|
|
183
|
-
label:
|
|
183
|
+
label: L.VIEW_MORE,
|
|
184
184
|
value: O
|
|
185
185
|
},
|
|
186
|
-
[
|
|
187
|
-
action:
|
|
186
|
+
[Le.ON_VIEW_MORE_VIEWED]: {
|
|
187
|
+
action: v.MICRO_BEAT_DISPLAYED,
|
|
188
188
|
category: b.BEAT_INTERACTION,
|
|
189
|
-
label:
|
|
189
|
+
label: L.VIEW_MORE,
|
|
190
190
|
value: O
|
|
191
191
|
},
|
|
192
|
-
...
|
|
193
|
-
...
|
|
194
|
-
...
|
|
195
|
-
},
|
|
192
|
+
...at(),
|
|
193
|
+
...st(),
|
|
194
|
+
...ct()
|
|
195
|
+
}, ye = async (t, e) => !e || !fe[t] ? null : e.sendAnalyticEvent(fe[t]).then((n) => n).catch((n) => {
|
|
196
196
|
throw n;
|
|
197
|
-
}),
|
|
197
|
+
}), Ae = async (t, e) => !e || !Ee[t] ? null : e.sendAnalyticsPageview(Ee[t]).then((n) => n).catch((n) => {
|
|
198
198
|
throw n;
|
|
199
199
|
});
|
|
200
|
-
class
|
|
201
|
-
onAnalyticEvent =
|
|
202
|
-
onAnalyticPageView =
|
|
203
|
-
beatApi = new
|
|
200
|
+
class lt {
|
|
201
|
+
onAnalyticEvent = ye;
|
|
202
|
+
onAnalyticPageView = Ae;
|
|
203
|
+
beatApi = new he("/", "");
|
|
204
204
|
constructor() {
|
|
205
|
-
|
|
205
|
+
se(this);
|
|
206
206
|
}
|
|
207
207
|
initialize = async (e, n, i) => {
|
|
208
208
|
this.onAnalyticEvent = (a, l) => {
|
|
209
|
-
|
|
209
|
+
ye(a, l).then((r) => r).catch((r) => {
|
|
210
210
|
throw r.status === 401 && i(), r;
|
|
211
211
|
});
|
|
212
212
|
}, this.onAnalyticPageView = (a, l) => {
|
|
213
|
-
|
|
213
|
+
Ae(a, l).then((r) => r).catch((r) => {
|
|
214
214
|
throw r.status === 401 && i(), r;
|
|
215
215
|
});
|
|
216
|
-
}, this.beatApi = new
|
|
216
|
+
}, this.beatApi = new he(e, n);
|
|
217
217
|
};
|
|
218
218
|
updateBeat = async (e) => {
|
|
219
219
|
this.beatApi.updateBeat(e);
|
|
@@ -222,7 +222,7 @@ class ut {
|
|
|
222
222
|
this.beatApi.updateOffer(e);
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
class
|
|
225
|
+
class dt {
|
|
226
226
|
copyStore;
|
|
227
227
|
endpoint = "/";
|
|
228
228
|
insightsMicroWidgetStore;
|
|
@@ -230,28 +230,28 @@ class Ct {
|
|
|
230
230
|
token = "";
|
|
231
231
|
isInitialized = !1;
|
|
232
232
|
constructor() {
|
|
233
|
-
this.copyStore = new
|
|
233
|
+
this.copyStore = new rt(), this.insightsMicroWidgetStore = new lt(), se(this);
|
|
234
234
|
}
|
|
235
235
|
initialize = async (e, n, i) => {
|
|
236
236
|
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n, i);
|
|
237
|
-
const a = await
|
|
238
|
-
|
|
237
|
+
const a = await Qe(e, n, "1.0.0", "Micro Insights Carousel");
|
|
238
|
+
We(() => {
|
|
239
239
|
this.session = a, this.isInitialized = !0;
|
|
240
240
|
});
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const H = I.createContext(null), _t = ({
|
|
244
244
|
onEvent: t,
|
|
245
245
|
onPageview: e,
|
|
246
246
|
store: n,
|
|
247
247
|
children: i
|
|
248
|
-
}) => /* @__PURE__ */ o(
|
|
249
|
-
const { primary_category_guid: e, category_guids: n } = t, i = e || n?.[0] ||
|
|
250
|
-
return /* @__PURE__ */ o(
|
|
251
|
-
},
|
|
248
|
+
}) => /* @__PURE__ */ o(H.Provider, { value: { onEvent: t, onPageview: e, store: n, children: i }, children: i }), pt = ({ beat: t }) => {
|
|
249
|
+
const { primary_category_guid: e, category_guids: n } = t, i = e || n?.[0] || Ye.UNCATEGORIZED;
|
|
250
|
+
return /* @__PURE__ */ o(Ue, { categoryGuid: i, size: 32, sx: { minWidth: 32 } });
|
|
251
|
+
}, mt = ({ beat: t }) => {
|
|
252
252
|
const { category_guids: e, merchant_guids: n, primary_category_guid: i, primary_merchant_guid: a } = t;
|
|
253
253
|
return /* @__PURE__ */ o(
|
|
254
|
-
|
|
254
|
+
ze,
|
|
255
255
|
{
|
|
256
256
|
categoryGuid: i || e && e[0] || "",
|
|
257
257
|
merchantGuid: a || n[0],
|
|
@@ -263,27 +263,27 @@ const F = E.createContext(null), ht = ({
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
);
|
|
266
|
-
},
|
|
266
|
+
}, ut = (t) => t ? t.data ? t.data.map((e) => {
|
|
267
267
|
const n = {};
|
|
268
268
|
return t.names?.map((i, a) => {
|
|
269
269
|
n[i] = e[a];
|
|
270
270
|
}), n;
|
|
271
|
-
}) : [] : [], q = "primary",
|
|
272
|
-
const e =
|
|
271
|
+
}) : [] : [], q = "primary", be = "success", ve = "error", De = (t) => {
|
|
272
|
+
const e = ut(t), n = Math.floor(e.length / 2);
|
|
273
273
|
if (n === 0 || n === e.length) return q;
|
|
274
274
|
const i = e[0]?.amount, a = e[n]?.amount;
|
|
275
|
-
return i == null || a == null ? q : i > a ?
|
|
276
|
-
},
|
|
277
|
-
const e = P(), n =
|
|
275
|
+
return i == null || a == null ? q : i > a ? ve : i < a ? be : q;
|
|
276
|
+
}, Ct = (t, e) => t < e ? be : t > e ? ve : q, ht = ({ beat: t }) => {
|
|
277
|
+
const e = P(), n = De(t.data_series), i = e.palette[n].main;
|
|
278
278
|
return /* @__PURE__ */ o(c, { bgColor: s(i, 0.15), iconColor: n, name: "bar_chart" });
|
|
279
|
-
},
|
|
279
|
+
}, gt = ({ beat: t }) => {
|
|
280
280
|
const e = P(), n = t.payload?.average_spend || 0;
|
|
281
281
|
let i = 0;
|
|
282
282
|
if (t.data_series?.data && t.data_series.data.length > 0) {
|
|
283
283
|
const r = (t.data_series.names || []).indexOf("amount");
|
|
284
284
|
r !== -1 && (i = t.data_series.data[0][r] || 0);
|
|
285
285
|
}
|
|
286
|
-
const a =
|
|
286
|
+
const a = Ct(i, n);
|
|
287
287
|
return /* @__PURE__ */ o(
|
|
288
288
|
c,
|
|
289
289
|
{
|
|
@@ -292,8 +292,8 @@ const F = E.createContext(null), ht = ({
|
|
|
292
292
|
name: "timeline"
|
|
293
293
|
}
|
|
294
294
|
);
|
|
295
|
-
},
|
|
296
|
-
const e = P(), n =
|
|
295
|
+
}, It = ({ beat: t }) => {
|
|
296
|
+
const e = P(), n = De(t.data_series), i = e.palette[n].main;
|
|
297
297
|
return /* @__PURE__ */ o(
|
|
298
298
|
c,
|
|
299
299
|
{
|
|
@@ -303,11 +303,11 @@ const F = E.createContext(null), ht = ({
|
|
|
303
303
|
name: "area_chart"
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
|
-
},
|
|
306
|
+
}, Et = ({ beat: t }) => /* @__PURE__ */ o(Ke, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), ft = {
|
|
307
307
|
0: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" }),
|
|
308
|
-
1: (t) => /* @__PURE__ */ o(
|
|
309
|
-
2: (t) => /* @__PURE__ */ o(
|
|
310
|
-
3: (t) => /* @__PURE__ */ o(
|
|
308
|
+
1: (t) => /* @__PURE__ */ o(pt, { beat: t }),
|
|
309
|
+
2: (t) => /* @__PURE__ */ o(mt, { beat: t }),
|
|
310
|
+
3: (t) => /* @__PURE__ */ o(ht, { beat: t }),
|
|
311
311
|
4: (t, e) => /* @__PURE__ */ o(
|
|
312
312
|
c,
|
|
313
313
|
{
|
|
@@ -340,7 +340,7 @@ const F = E.createContext(null), ht = ({
|
|
|
340
340
|
sx: { color: "text.primary" }
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
|
-
12: (t) => /* @__PURE__ */ o(
|
|
343
|
+
12: (t) => /* @__PURE__ */ o(It, { beat: t }),
|
|
344
344
|
13: () => /* @__PURE__ */ o(
|
|
345
345
|
c,
|
|
346
346
|
{
|
|
@@ -421,7 +421,7 @@ const F = E.createContext(null), ht = ({
|
|
|
421
421
|
),
|
|
422
422
|
27: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "directions_car" }),
|
|
423
423
|
28: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "contract" }),
|
|
424
|
-
29: (t) => /* @__PURE__ */ o(
|
|
424
|
+
29: (t) => /* @__PURE__ */ o(gt, { beat: t }),
|
|
425
425
|
30: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_month" }),
|
|
426
426
|
31: (t, e) => /* @__PURE__ */ o(
|
|
427
427
|
c,
|
|
@@ -440,38 +440,38 @@ const F = E.createContext(null), ht = ({
|
|
|
440
440
|
name: "storefront"
|
|
441
441
|
}
|
|
442
442
|
),
|
|
443
|
-
34: (t) => /* @__PURE__ */ o(
|
|
444
|
-
},
|
|
445
|
-
const e = P(), { icon_type: n } = t, i = n != null ?
|
|
443
|
+
34: (t) => /* @__PURE__ */ o(Et, { beat: t })
|
|
444
|
+
}, yt = ({ beat: t }) => {
|
|
445
|
+
const e = P(), { icon_type: n } = t, i = n != null ? ft[n] : null;
|
|
446
446
|
return i ? i(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
|
|
447
|
-
},
|
|
448
|
-
const t =
|
|
447
|
+
}, D = () => {
|
|
448
|
+
const t = I.useContext(H);
|
|
449
449
|
if (!t)
|
|
450
450
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
451
451
|
return t.store.copyStore;
|
|
452
|
-
},
|
|
453
|
-
const t =
|
|
452
|
+
}, At = () => {
|
|
453
|
+
const t = I.useContext(H);
|
|
454
454
|
if (!t?.store?.insightsMicroWidgetStore)
|
|
455
455
|
throw new Error(
|
|
456
456
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
457
457
|
);
|
|
458
458
|
return t.store.insightsMicroWidgetStore;
|
|
459
|
-
},
|
|
460
|
-
const t =
|
|
459
|
+
}, $ = () => {
|
|
460
|
+
const t = I.useContext(H);
|
|
461
461
|
if (!t)
|
|
462
462
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
463
463
|
return { onEvent: t.onEvent };
|
|
464
|
-
},
|
|
465
|
-
const t =
|
|
464
|
+
}, xe = () => {
|
|
465
|
+
const t = I.useContext(H);
|
|
466
466
|
if (!t)
|
|
467
467
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
468
468
|
return { onPageview: t.onPageview };
|
|
469
|
-
},
|
|
469
|
+
}, St = {
|
|
470
470
|
LARGE: 180,
|
|
471
471
|
STANDARD: 154,
|
|
472
472
|
XLARGE: 200,
|
|
473
473
|
XXLARGE: 248
|
|
474
|
-
},
|
|
474
|
+
}, Tt = 50, Be = 1, J = I.forwardRef(
|
|
475
475
|
function({
|
|
476
476
|
ariaLabel: e,
|
|
477
477
|
closeAriaLabel: n,
|
|
@@ -479,43 +479,43 @@ const F = E.createContext(null), ht = ({
|
|
|
479
479
|
elevation: a,
|
|
480
480
|
icon: l,
|
|
481
481
|
isActiveCard: r,
|
|
482
|
-
heightOverrides:
|
|
482
|
+
heightOverrides: u,
|
|
483
483
|
onClose: C,
|
|
484
|
-
onCardClick:
|
|
485
|
-
onPrimaryAction:
|
|
484
|
+
onCardClick: E,
|
|
485
|
+
onPrimaryAction: h,
|
|
486
486
|
onSecondaryAction: d,
|
|
487
487
|
primaryActionText: _,
|
|
488
488
|
secondaryActionText: p,
|
|
489
|
-
title:
|
|
489
|
+
title: g,
|
|
490
490
|
variant: y,
|
|
491
491
|
widthOverrides: S,
|
|
492
|
-
...
|
|
492
|
+
...N
|
|
493
493
|
}, T) {
|
|
494
|
-
const
|
|
494
|
+
const A = !!(h && _), R = /* @__PURE__ */ w(Te, { children: [
|
|
495
495
|
C && /* @__PURE__ */ o(
|
|
496
|
-
|
|
496
|
+
it,
|
|
497
497
|
{
|
|
498
498
|
"aria-label": n,
|
|
499
|
-
onClick: (
|
|
500
|
-
|
|
499
|
+
onClick: (m) => {
|
|
500
|
+
m.stopPropagation(), C?.();
|
|
501
501
|
},
|
|
502
|
-
onMouseDown: (
|
|
503
|
-
|
|
502
|
+
onMouseDown: (m) => {
|
|
503
|
+
m.stopPropagation();
|
|
504
504
|
},
|
|
505
|
-
onTouchStart: (
|
|
506
|
-
|
|
505
|
+
onTouchStart: (m) => {
|
|
506
|
+
m.stopPropagation();
|
|
507
507
|
},
|
|
508
508
|
sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
|
|
509
|
-
children: /* @__PURE__ */ o(
|
|
509
|
+
children: /* @__PURE__ */ o(He, {})
|
|
510
510
|
}
|
|
511
511
|
),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ w(F, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
|
|
513
|
+
/* @__PURE__ */ w(F, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
514
514
|
l && l,
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
-
/* @__PURE__ */ o(
|
|
515
|
+
/* @__PURE__ */ w(F, { sx: { gap: 6 }, children: [
|
|
516
|
+
/* @__PURE__ */ o(F, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(pe, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: g }) }),
|
|
517
517
|
/* @__PURE__ */ o(
|
|
518
|
-
|
|
518
|
+
pe,
|
|
519
519
|
{
|
|
520
520
|
dangerouslySetInnerHTML: { __html: i },
|
|
521
521
|
sx: {
|
|
@@ -523,7 +523,7 @@ const F = E.createContext(null), ht = ({
|
|
|
523
523
|
overflow: "hidden",
|
|
524
524
|
textOverflow: "ellipsis",
|
|
525
525
|
WebkitBoxOrient: "vertical",
|
|
526
|
-
WebkitLineClamp:
|
|
526
|
+
WebkitLineClamp: A ? 2 : 3,
|
|
527
527
|
"& .bold-copy": {
|
|
528
528
|
fontWeight: "bold",
|
|
529
529
|
fontFamily: "inherit"
|
|
@@ -534,8 +534,8 @@ const F = E.createContext(null), ht = ({
|
|
|
534
534
|
)
|
|
535
535
|
] })
|
|
536
536
|
] }),
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
A && /* @__PURE__ */ w(
|
|
538
|
+
F,
|
|
539
539
|
{
|
|
540
540
|
sx: {
|
|
541
541
|
alignItems: "center",
|
|
@@ -545,40 +545,40 @@ const F = E.createContext(null), ht = ({
|
|
|
545
545
|
pl: l ? 36 : 0
|
|
546
546
|
},
|
|
547
547
|
children: [
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
A && /* @__PURE__ */ o(
|
|
549
|
+
ge,
|
|
550
550
|
{
|
|
551
|
-
onClick: (
|
|
552
|
-
|
|
551
|
+
onClick: (m) => {
|
|
552
|
+
m.stopPropagation(), h?.();
|
|
553
553
|
},
|
|
554
|
-
onMouseDown: (
|
|
555
|
-
|
|
554
|
+
onMouseDown: (m) => {
|
|
555
|
+
m.stopPropagation();
|
|
556
556
|
},
|
|
557
|
-
onTouchStart: (
|
|
558
|
-
|
|
557
|
+
onTouchStart: (m) => {
|
|
558
|
+
m.stopPropagation();
|
|
559
559
|
},
|
|
560
560
|
size: "small",
|
|
561
561
|
sx: { px: 8, ml: l ? 0 : -8 },
|
|
562
562
|
variant: "text",
|
|
563
|
-
children: /* @__PURE__ */ o(
|
|
563
|
+
children: /* @__PURE__ */ o(me, { bold: !0, variant: "body2", children: _ })
|
|
564
564
|
}
|
|
565
565
|
),
|
|
566
566
|
!!(d && p) && /* @__PURE__ */ o(
|
|
567
|
-
|
|
567
|
+
ge,
|
|
568
568
|
{
|
|
569
|
-
onClick: (
|
|
570
|
-
|
|
569
|
+
onClick: (m) => {
|
|
570
|
+
m.stopPropagation(), d?.();
|
|
571
571
|
},
|
|
572
|
-
onMouseDown: (
|
|
573
|
-
|
|
572
|
+
onMouseDown: (m) => {
|
|
573
|
+
m.stopPropagation();
|
|
574
574
|
},
|
|
575
|
-
onTouchStart: (
|
|
576
|
-
|
|
575
|
+
onTouchStart: (m) => {
|
|
576
|
+
m.stopPropagation();
|
|
577
577
|
},
|
|
578
578
|
size: "small",
|
|
579
579
|
sx: { px: 8 },
|
|
580
580
|
variant: "text",
|
|
581
|
-
children: /* @__PURE__ */ o(
|
|
581
|
+
children: /* @__PURE__ */ o(me, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: p })
|
|
582
582
|
}
|
|
583
583
|
)
|
|
584
584
|
]
|
|
@@ -587,7 +587,7 @@ const F = E.createContext(null), ht = ({
|
|
|
587
587
|
] })
|
|
588
588
|
] });
|
|
589
589
|
return /* @__PURE__ */ o(
|
|
590
|
-
|
|
590
|
+
tt,
|
|
591
591
|
{
|
|
592
592
|
"aria-hidden": !r,
|
|
593
593
|
"aria-label": e,
|
|
@@ -596,20 +596,20 @@ const F = E.createContext(null), ht = ({
|
|
|
596
596
|
role: "group",
|
|
597
597
|
sx: {
|
|
598
598
|
backgroundColor: "background.paper",
|
|
599
|
-
height:
|
|
599
|
+
height: u ? "100%" : 120,
|
|
600
600
|
minWidth: S ? `${S}px` : "100%",
|
|
601
601
|
position: "relative",
|
|
602
602
|
my: 1,
|
|
603
603
|
borderRadius: 2
|
|
604
604
|
},
|
|
605
|
-
tabIndex:
|
|
605
|
+
tabIndex: E || !r ? -1 : 0,
|
|
606
606
|
variant: y,
|
|
607
|
-
...
|
|
608
|
-
children:
|
|
609
|
-
|
|
607
|
+
...N,
|
|
608
|
+
children: E ? /* @__PURE__ */ o(
|
|
609
|
+
ot,
|
|
610
610
|
{
|
|
611
611
|
component: "div",
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: E,
|
|
613
613
|
sx: {
|
|
614
614
|
pb: 8,
|
|
615
615
|
pt: 16,
|
|
@@ -618,11 +618,11 @@ const F = E.createContext(null), ht = ({
|
|
|
618
618
|
},
|
|
619
619
|
children: R
|
|
620
620
|
}
|
|
621
|
-
) : /* @__PURE__ */ o(
|
|
621
|
+
) : /* @__PURE__ */ o(nt, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: R })
|
|
622
622
|
}
|
|
623
623
|
);
|
|
624
624
|
}
|
|
625
|
-
),
|
|
625
|
+
), Rt = ({
|
|
626
626
|
ariaLabel: t,
|
|
627
627
|
beat: e,
|
|
628
628
|
elevation: n,
|
|
@@ -630,23 +630,23 @@ const F = E.createContext(null), ht = ({
|
|
|
630
630
|
isActiveCard: a,
|
|
631
631
|
onCardClick: l,
|
|
632
632
|
posthog: r,
|
|
633
|
-
widthOverrides:
|
|
633
|
+
widthOverrides: u,
|
|
634
634
|
variant: C,
|
|
635
|
-
showIcon:
|
|
636
|
-
heightOverrides:
|
|
635
|
+
showIcon: E,
|
|
636
|
+
heightOverrides: h
|
|
637
637
|
}) => {
|
|
638
|
-
const { ref: d, inView: _ } =
|
|
639
|
-
threshold:
|
|
640
|
-
}), { cardsCopy: p } =
|
|
641
|
-
|
|
642
|
-
_ && (e.has_been_displayed ?
|
|
638
|
+
const { ref: d, inView: _ } = Oe({
|
|
639
|
+
threshold: Be
|
|
640
|
+
}), { cardsCopy: p } = D(), { onEvent: g } = $(), { updateBeat: y, updateOffer: S } = At();
|
|
641
|
+
re(() => {
|
|
642
|
+
_ && (e.has_been_displayed ? g(we(e.template)) : (e.guid.startsWith("OFR") ? S({
|
|
643
643
|
...e,
|
|
644
644
|
has_been_displayed: !0
|
|
645
645
|
}) : y({
|
|
646
646
|
...e,
|
|
647
647
|
has_been_displayed: !0
|
|
648
|
-
}),
|
|
649
|
-
}, [_]),
|
|
648
|
+
}), g(Me(e.template))));
|
|
649
|
+
}, [_]), re(() => {
|
|
650
650
|
if (_ && e)
|
|
651
651
|
if (e.template === "MarketingOffer") {
|
|
652
652
|
const T = e;
|
|
@@ -662,8 +662,8 @@ const F = E.createContext(null), ht = ({
|
|
|
662
662
|
position: i
|
|
663
663
|
});
|
|
664
664
|
}, [e, i, _]);
|
|
665
|
-
const
|
|
666
|
-
if (l && l(e),
|
|
665
|
+
const N = () => {
|
|
666
|
+
if (l && l(e), g(Ne(e.template)), e.template === "MarketingOffer") {
|
|
667
667
|
const T = e;
|
|
668
668
|
r?.capture("clicked_messaging_insight", {
|
|
669
669
|
template: e.template,
|
|
@@ -684,19 +684,19 @@ const F = E.createContext(null), ht = ({
|
|
|
684
684
|
ariaLabel: t,
|
|
685
685
|
description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
|
|
686
686
|
elevation: n,
|
|
687
|
-
heightOverrides:
|
|
688
|
-
icon:
|
|
687
|
+
heightOverrides: h,
|
|
688
|
+
icon: E && /* @__PURE__ */ o(yt, { beat: e }),
|
|
689
689
|
isActiveCard: a,
|
|
690
|
-
onCardClick:
|
|
691
|
-
onPrimaryAction:
|
|
690
|
+
onCardClick: N,
|
|
691
|
+
onPrimaryAction: N,
|
|
692
692
|
primaryActionText: e.micro_call_to_action || p?.micro_card_cta,
|
|
693
693
|
ref: d,
|
|
694
694
|
title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
|
|
695
695
|
variant: C,
|
|
696
|
-
widthOverrides:
|
|
696
|
+
widthOverrides: u
|
|
697
697
|
}
|
|
698
698
|
);
|
|
699
|
-
},
|
|
699
|
+
}, Ot = ({
|
|
700
700
|
currentBeatIndex: t,
|
|
701
701
|
numBeats: e,
|
|
702
702
|
onNextClick: n,
|
|
@@ -704,10 +704,10 @@ const F = E.createContext(null), ht = ({
|
|
|
704
704
|
scrollRightBoundary: a,
|
|
705
705
|
scrollX: l,
|
|
706
706
|
shouldApplyDotAnimation: r = !1,
|
|
707
|
-
visibleCardsCount:
|
|
707
|
+
visibleCardsCount: u = 1
|
|
708
708
|
}) => {
|
|
709
|
-
const C = P(), { carouselCopy:
|
|
710
|
-
return /* @__PURE__ */
|
|
709
|
+
const C = P(), { carouselCopy: E } = D(), h = Math.floor(l) > a || t - u + 1 === 0, d = l < 0 || e - 1 === t, _ = C.palette.grey[500], p = C.palette.primary.main;
|
|
710
|
+
return /* @__PURE__ */ w(
|
|
711
711
|
k,
|
|
712
712
|
{
|
|
713
713
|
direction: "row",
|
|
@@ -723,26 +723,26 @@ const F = E.createContext(null), ht = ({
|
|
|
723
723
|
},
|
|
724
724
|
children: [
|
|
725
725
|
/* @__PURE__ */ o(
|
|
726
|
-
|
|
726
|
+
ue,
|
|
727
727
|
{
|
|
728
|
-
"aria-disabled":
|
|
729
|
-
"aria-label":
|
|
730
|
-
disabled:
|
|
728
|
+
"aria-disabled": h,
|
|
729
|
+
"aria-label": E?.previous_insight_cta_aria,
|
|
730
|
+
disabled: h,
|
|
731
731
|
onClick: i,
|
|
732
732
|
children: /* @__PURE__ */ o(
|
|
733
|
-
|
|
733
|
+
$e,
|
|
734
734
|
{
|
|
735
735
|
sx: {
|
|
736
|
-
color:
|
|
736
|
+
color: h ? _ : p
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
)
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
Array.from({ length: e }).map((
|
|
742
|
+
Array.from({ length: e }).map((g, y) => {
|
|
743
743
|
const S = y === t;
|
|
744
744
|
return /* @__PURE__ */ o(
|
|
745
|
-
|
|
745
|
+
ae,
|
|
746
746
|
{
|
|
747
747
|
className: "mx-insights-micro-carousel-dots",
|
|
748
748
|
sx: {
|
|
@@ -766,14 +766,14 @@ const F = E.createContext(null), ht = ({
|
|
|
766
766
|
);
|
|
767
767
|
}),
|
|
768
768
|
/* @__PURE__ */ o(
|
|
769
|
-
|
|
769
|
+
ue,
|
|
770
770
|
{
|
|
771
771
|
"aria-disabled": d,
|
|
772
|
-
"aria-label":
|
|
772
|
+
"aria-label": E?.next_insight_cta_aria,
|
|
773
773
|
disabled: d,
|
|
774
774
|
onClick: n,
|
|
775
775
|
children: /* @__PURE__ */ o(
|
|
776
|
-
|
|
776
|
+
Re,
|
|
777
777
|
{
|
|
778
778
|
sx: {
|
|
779
779
|
color: d ? _ : p
|
|
@@ -785,7 +785,7 @@ const F = E.createContext(null), ht = ({
|
|
|
785
785
|
]
|
|
786
786
|
}
|
|
787
787
|
);
|
|
788
|
-
},
|
|
788
|
+
}, Wt = ({
|
|
789
789
|
activeCardIndex: t,
|
|
790
790
|
beats: e,
|
|
791
791
|
cardWidth: n,
|
|
@@ -793,48 +793,48 @@ const F = E.createContext(null), ht = ({
|
|
|
793
793
|
heightOverrides: a,
|
|
794
794
|
onCardClick: l,
|
|
795
795
|
posthog: r,
|
|
796
|
-
showIcon:
|
|
796
|
+
showIcon: u,
|
|
797
797
|
variant: C
|
|
798
798
|
}) => {
|
|
799
|
-
const { carouselCopy:
|
|
799
|
+
const { carouselCopy: E } = D(), h = {
|
|
800
800
|
elevation: i,
|
|
801
801
|
heightOverrides: a,
|
|
802
802
|
posthog: r,
|
|
803
|
-
showIcon:
|
|
803
|
+
showIcon: u,
|
|
804
804
|
variant: C
|
|
805
805
|
};
|
|
806
|
-
return /* @__PURE__ */
|
|
806
|
+
return /* @__PURE__ */ w(Te, { children: [
|
|
807
807
|
e.map((d, _) => {
|
|
808
|
-
const p = _ + 1,
|
|
809
|
-
|
|
808
|
+
const p = _ + 1, g = e.length + 1, y = Xe(
|
|
809
|
+
E?.card_position_in_carousel_aria,
|
|
810
810
|
p.toString(),
|
|
811
|
-
|
|
812
|
-
), S = d.micro_title && d.micro_title.length > 0,
|
|
811
|
+
g.toString()
|
|
812
|
+
), S = d.micro_title && d.micro_title.length > 0, N = d.micro_description && d.micro_description.length > 0, T = S ? d.micro_title : d.title, A = N ? d.micro_description : d.description;
|
|
813
813
|
return /* @__PURE__ */ o(
|
|
814
|
-
|
|
814
|
+
Rt,
|
|
815
815
|
{
|
|
816
|
-
ariaLabel: `${y}: ${T}, ${
|
|
816
|
+
ariaLabel: `${y}: ${T}, ${A}`,
|
|
817
817
|
beat: d,
|
|
818
818
|
index: _,
|
|
819
819
|
isActiveCard: _ === t,
|
|
820
820
|
onCardClick: l,
|
|
821
821
|
widthOverrides: n || void 0,
|
|
822
|
-
...
|
|
822
|
+
...h
|
|
823
823
|
},
|
|
824
824
|
`${d.guid} ${_}`
|
|
825
825
|
);
|
|
826
826
|
}),
|
|
827
827
|
/* @__PURE__ */ o(
|
|
828
|
-
|
|
828
|
+
Bt,
|
|
829
829
|
{
|
|
830
830
|
isActiveCard: t === e.length,
|
|
831
831
|
onCardClick: l,
|
|
832
832
|
widthOverrides: n || void 0,
|
|
833
|
-
...
|
|
833
|
+
...h
|
|
834
834
|
}
|
|
835
835
|
)
|
|
836
836
|
] });
|
|
837
|
-
},
|
|
837
|
+
}, Nt = ({
|
|
838
838
|
analyticsMetadata: t,
|
|
839
839
|
allowSingleCardPeeking: e,
|
|
840
840
|
beats: n = [],
|
|
@@ -842,53 +842,49 @@ const F = E.createContext(null), ht = ({
|
|
|
842
842
|
heightOverrides: a,
|
|
843
843
|
onCardClick: l,
|
|
844
844
|
posthog: r,
|
|
845
|
-
showCarouselControls:
|
|
845
|
+
showCarouselControls: u,
|
|
846
846
|
showIcon: C,
|
|
847
|
-
showWithMargin:
|
|
848
|
-
variant:
|
|
847
|
+
showWithMargin: E = !0,
|
|
848
|
+
variant: h,
|
|
849
849
|
widthOverrides: d,
|
|
850
850
|
visibleCardsCount: _ = 1
|
|
851
851
|
// Default to 1 card visible
|
|
852
852
|
}) => {
|
|
853
|
-
const p =
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
853
|
+
const p = I.useRef(null), g = I.useRef(null), [y, S] = I.useState(0), [N, T] = I.useState(null), [A, ee] = I.useState(null), [R, m] = I.useState(null), { carouselCopy: j } = D(), { onEvent: M } = $();
|
|
854
|
+
I.useEffect(() => {
|
|
855
|
+
if (p.current && !e) {
|
|
856
|
+
const f = p.current.offsetWidth, z = 8;
|
|
857
|
+
let G;
|
|
858
|
+
if (_ > 1) {
|
|
859
|
+
const de = (f - (_ - 1) * z) / _ / 3;
|
|
860
|
+
G = (f - de - (_ - 1) * z) / _;
|
|
861
|
+
} else
|
|
862
|
+
G = f;
|
|
863
|
+
m(G);
|
|
864
|
+
}
|
|
865
|
+
}, [_, p.current?.offsetWidth]), I.useEffect(() => {
|
|
866
|
+
const f = g.current?.offsetWidth;
|
|
867
|
+
if (typeof f == "number" && e) {
|
|
868
|
+
const z = (K) => {
|
|
869
|
+
const _e = [
|
|
862
870
|
{ maxWidth: 375, cardWidth: 268 },
|
|
863
871
|
{ maxWidth: 444, cardWidth: 300 },
|
|
864
872
|
{ maxWidth: 599, cardWidth: 350 },
|
|
865
873
|
{ maxWidth: 749, cardWidth: 450 },
|
|
866
874
|
{ maxWidth: 900, cardWidth: 600 }
|
|
867
|
-
].find((
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
A();
|
|
881
|
-
const ue = () => A();
|
|
882
|
-
let ie = null;
|
|
883
|
-
return typeof ResizeObserver < "u" && I.current ? (ie = new ResizeObserver((re) => {
|
|
884
|
-
const G = re[0];
|
|
885
|
-
if (!G) return;
|
|
886
|
-
const U = G.borderBoxSize?.[0]?.inlineSize ?? G.contentRect.width;
|
|
887
|
-
A(U);
|
|
888
|
-
}), ie.observe(I.current)) : window.addEventListener("resize", ue), () => {
|
|
889
|
-
window.removeEventListener("resize", ue), ie?.disconnect();
|
|
890
|
-
};
|
|
891
|
-
}, [e, _, h]);
|
|
875
|
+
].find((Ge) => K <= Ge.maxWidth);
|
|
876
|
+
return _e ? _e.cardWidth : 750;
|
|
877
|
+
};
|
|
878
|
+
m(z(f));
|
|
879
|
+
const G = () => {
|
|
880
|
+
const K = g.current?.offsetWidth;
|
|
881
|
+
typeof K == "number" && m(z(K));
|
|
882
|
+
};
|
|
883
|
+
return window.addEventListener("resize", G), () => {
|
|
884
|
+
window.removeEventListener("resize", G);
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
}, [e, g]);
|
|
892
888
|
const V = () => {
|
|
893
889
|
M(W.ON_CAROUSEL_FORWARD_CLICK, t), p.current && R && p.current.scrollTo({
|
|
894
890
|
left: y + R + 8,
|
|
@@ -901,22 +897,22 @@ const F = E.createContext(null), ht = ({
|
|
|
901
897
|
top: 0,
|
|
902
898
|
behavior: "smooth"
|
|
903
899
|
});
|
|
904
|
-
}, j = () => {
|
|
905
|
-
p.current && S(p.current.scrollLeft);
|
|
906
900
|
}, Y = () => {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
},
|
|
912
|
-
T(
|
|
913
|
-
},
|
|
914
|
-
|
|
901
|
+
p.current && S(p.current.scrollLeft);
|
|
902
|
+
}, X = () => {
|
|
903
|
+
if (!A || !N) return;
|
|
904
|
+
A - N > Tt ? M(W.ON_CAROUSEL_FORWARD_SWIPE, t) : M(W.ON_CAROUSEL_BACK_SWIPE, t);
|
|
905
|
+
}, oe = (f) => {
|
|
906
|
+
T(f.targetTouches[0].clientX);
|
|
907
|
+
}, ne = (f) => {
|
|
908
|
+
T(null), ee(f.targetTouches[0].clientX);
|
|
909
|
+
}, Z = R ? Math.round(y / (R + 8)) : 0, Q = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
|
|
910
|
+
return /* @__PURE__ */ w(
|
|
915
911
|
k,
|
|
916
912
|
{
|
|
917
|
-
"aria-label":
|
|
913
|
+
"aria-label": j?.carousel_title,
|
|
918
914
|
"aria-roledescription": "carousel",
|
|
919
|
-
ref:
|
|
915
|
+
ref: g,
|
|
920
916
|
role: "region",
|
|
921
917
|
sx: {
|
|
922
918
|
alignItems: "center",
|
|
@@ -929,8 +925,8 @@ const F = E.createContext(null), ht = ({
|
|
|
929
925
|
k,
|
|
930
926
|
{
|
|
931
927
|
direction: "row",
|
|
932
|
-
onScroll:
|
|
933
|
-
onTouchEnd:
|
|
928
|
+
onScroll: Y,
|
|
929
|
+
onTouchEnd: X,
|
|
934
930
|
onTouchMove: oe,
|
|
935
931
|
onTouchStart: ne,
|
|
936
932
|
ref: p,
|
|
@@ -940,7 +936,7 @@ const F = E.createContext(null), ht = ({
|
|
|
940
936
|
gap: 8,
|
|
941
937
|
listStyleType: "none",
|
|
942
938
|
m: 0,
|
|
943
|
-
maxWidth:
|
|
939
|
+
maxWidth: E ? "calc(100% - 32px)" : "100%",
|
|
944
940
|
overflowX: "auto",
|
|
945
941
|
overflowY: "hidden",
|
|
946
942
|
p: 0,
|
|
@@ -952,9 +948,9 @@ const F = E.createContext(null), ht = ({
|
|
|
952
948
|
}
|
|
953
949
|
},
|
|
954
950
|
children: /* @__PURE__ */ o(
|
|
955
|
-
|
|
951
|
+
Wt,
|
|
956
952
|
{
|
|
957
|
-
activeCardIndex:
|
|
953
|
+
activeCardIndex: Z,
|
|
958
954
|
beats: n,
|
|
959
955
|
cardWidth: R,
|
|
960
956
|
elevation: i,
|
|
@@ -962,19 +958,19 @@ const F = E.createContext(null), ht = ({
|
|
|
962
958
|
onCardClick: l,
|
|
963
959
|
posthog: r,
|
|
964
960
|
showIcon: C,
|
|
965
|
-
variant:
|
|
961
|
+
variant: h
|
|
966
962
|
}
|
|
967
963
|
)
|
|
968
964
|
}
|
|
969
965
|
),
|
|
970
|
-
|
|
971
|
-
|
|
966
|
+
u && /* @__PURE__ */ o(
|
|
967
|
+
Ot,
|
|
972
968
|
{
|
|
973
|
-
currentBeatIndex:
|
|
969
|
+
currentBeatIndex: Z + _ - 1,
|
|
974
970
|
numBeats: n.length + 1,
|
|
975
971
|
onNextClick: V,
|
|
976
972
|
onPreviousClick: te,
|
|
977
|
-
scrollRightBoundary:
|
|
973
|
+
scrollRightBoundary: Q,
|
|
978
974
|
scrollX: y,
|
|
979
975
|
shouldApplyDotAnimation: e,
|
|
980
976
|
visibleCardsCount: _
|
|
@@ -983,17 +979,17 @@ const F = E.createContext(null), ht = ({
|
|
|
983
979
|
]
|
|
984
980
|
}
|
|
985
981
|
);
|
|
986
|
-
},
|
|
982
|
+
}, wt = U(Nt), Mt = ({
|
|
987
983
|
analyticsMetadata: t,
|
|
988
984
|
onCardClick: e,
|
|
989
985
|
posthog: n,
|
|
990
986
|
widthOverrides: i,
|
|
991
987
|
headerSx: a
|
|
992
988
|
}) => {
|
|
993
|
-
const { carouselCopy: l } =
|
|
989
|
+
const { carouselCopy: l } = D(), { onEvent: r } = $(), u = () => {
|
|
994
990
|
r && (r(W.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
|
|
995
991
|
};
|
|
996
|
-
return l ? /* @__PURE__ */
|
|
992
|
+
return l ? /* @__PURE__ */ w(
|
|
997
993
|
k,
|
|
998
994
|
{
|
|
999
995
|
alignItems: "center",
|
|
@@ -1007,12 +1003,12 @@ const F = E.createContext(null), ht = ({
|
|
|
1007
1003
|
...a
|
|
1008
1004
|
},
|
|
1009
1005
|
children: [
|
|
1010
|
-
/* @__PURE__ */ o(
|
|
1006
|
+
/* @__PURE__ */ o(Fe, { children: l.carousel_title }),
|
|
1011
1007
|
/* @__PURE__ */ o(
|
|
1012
|
-
|
|
1008
|
+
ke,
|
|
1013
1009
|
{
|
|
1014
|
-
endIcon: /* @__PURE__ */ o(
|
|
1015
|
-
onClick:
|
|
1010
|
+
endIcon: /* @__PURE__ */ o(Re, { size: 20 }),
|
|
1011
|
+
onClick: u,
|
|
1016
1012
|
size: "small",
|
|
1017
1013
|
variant: "text",
|
|
1018
1014
|
children: l.view_all_insights_in_full_feed_cta_aria
|
|
@@ -1020,15 +1016,15 @@ const F = E.createContext(null), ht = ({
|
|
|
1020
1016
|
)
|
|
1021
1017
|
]
|
|
1022
1018
|
}
|
|
1023
|
-
) : /* @__PURE__ */ o(
|
|
1024
|
-
},
|
|
1019
|
+
) : /* @__PURE__ */ o(je, {});
|
|
1020
|
+
}, Lt = U(Mt), bt = ({
|
|
1025
1021
|
heightOverrides: t,
|
|
1026
1022
|
widthOverrides: e,
|
|
1027
1023
|
children: n
|
|
1028
1024
|
}) => {
|
|
1029
|
-
const { carouselCopy: i } =
|
|
1025
|
+
const { carouselCopy: i } = D();
|
|
1030
1026
|
return /* @__PURE__ */ o(
|
|
1031
|
-
|
|
1027
|
+
ae,
|
|
1032
1028
|
{
|
|
1033
1029
|
"aria-label": i?.carousel_title,
|
|
1034
1030
|
"aria-roledescription": "carousel",
|
|
@@ -1042,7 +1038,7 @@ const F = E.createContext(null), ht = ({
|
|
|
1042
1038
|
children: n
|
|
1043
1039
|
}
|
|
1044
1040
|
);
|
|
1045
|
-
},
|
|
1041
|
+
}, Pe = ({
|
|
1046
1042
|
ariaLabel: t,
|
|
1047
1043
|
elevation: e,
|
|
1048
1044
|
heightOverrides: n,
|
|
@@ -1051,12 +1047,12 @@ const F = E.createContext(null), ht = ({
|
|
|
1051
1047
|
showIcon: l,
|
|
1052
1048
|
variant: r
|
|
1053
1049
|
}) => {
|
|
1054
|
-
const { cardsCopy:
|
|
1055
|
-
|
|
1056
|
-
|
|
1050
|
+
const { cardsCopy: u } = D(), C = P(), { onEvent: E } = $(), { onPageview: h } = xe();
|
|
1051
|
+
I.useEffect(() => {
|
|
1052
|
+
h(B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1057
1053
|
}, []);
|
|
1058
1054
|
const d = () => {
|
|
1059
|
-
i && i(),
|
|
1055
|
+
i && i(), E(W.ON_NO_RELEVANT_INSIGHTS_CLICKED), a?.capture("clicked_insight", {
|
|
1060
1056
|
template: "no_relevant_insights"
|
|
1061
1057
|
});
|
|
1062
1058
|
};
|
|
@@ -1064,18 +1060,18 @@ const F = E.createContext(null), ht = ({
|
|
|
1064
1060
|
J,
|
|
1065
1061
|
{
|
|
1066
1062
|
ariaLabel: t,
|
|
1067
|
-
description:
|
|
1063
|
+
description: u.no_relevant_insights_card_description,
|
|
1068
1064
|
elevation: e,
|
|
1069
1065
|
heightOverrides: n,
|
|
1070
1066
|
icon: l && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1071
1067
|
onCardClick: d,
|
|
1072
1068
|
onPrimaryAction: d,
|
|
1073
|
-
primaryActionText:
|
|
1074
|
-
title:
|
|
1069
|
+
primaryActionText: u.micro_card_cta,
|
|
1070
|
+
title: u.no_relevant_insights_card_title,
|
|
1075
1071
|
variant: r
|
|
1076
1072
|
}
|
|
1077
1073
|
);
|
|
1078
|
-
},
|
|
1074
|
+
}, io = U(Pe), Ve = ({
|
|
1079
1075
|
ariaLabel: t,
|
|
1080
1076
|
elevation: e,
|
|
1081
1077
|
heightOverrides: n,
|
|
@@ -1083,24 +1079,24 @@ const F = E.createContext(null), ht = ({
|
|
|
1083
1079
|
showIcon: a,
|
|
1084
1080
|
variant: l
|
|
1085
1081
|
}) => {
|
|
1086
|
-
const { onPageview: r } =
|
|
1087
|
-
return
|
|
1082
|
+
const { onPageview: r } = xe(), { zeroStateCopy: u } = D(), C = P();
|
|
1083
|
+
return I.useEffect(() => {
|
|
1088
1084
|
r(B.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1089
1085
|
}, []), /* @__PURE__ */ o(
|
|
1090
1086
|
J,
|
|
1091
1087
|
{
|
|
1092
1088
|
ariaLabel: t,
|
|
1093
|
-
description:
|
|
1089
|
+
description: u.carousel_zero_state_description,
|
|
1094
1090
|
elevation: e,
|
|
1095
1091
|
heightOverrides: n,
|
|
1096
1092
|
icon: a && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1097
1093
|
onCardClick: i,
|
|
1098
|
-
title:
|
|
1094
|
+
title: u.carousel_zero_state_title,
|
|
1099
1095
|
variant: l
|
|
1100
1096
|
}
|
|
1101
1097
|
);
|
|
1102
|
-
},
|
|
1103
|
-
|
|
1098
|
+
}, ro = U(Ve), vt = () => /* @__PURE__ */ o(
|
|
1099
|
+
ae,
|
|
1104
1100
|
{
|
|
1105
1101
|
sx: {
|
|
1106
1102
|
alignItems: "center",
|
|
@@ -1109,11 +1105,11 @@ const F = E.createContext(null), ht = ({
|
|
|
1109
1105
|
justifyContent: "center",
|
|
1110
1106
|
width: "100%"
|
|
1111
1107
|
},
|
|
1112
|
-
children: /* @__PURE__ */ o(
|
|
1108
|
+
children: /* @__PURE__ */ o(Ze, {})
|
|
1113
1109
|
}
|
|
1114
|
-
),
|
|
1110
|
+
), Se = {
|
|
1115
1111
|
featureVersion: "spendVsIncomeTrends"
|
|
1116
|
-
},
|
|
1112
|
+
}, x = new dt(), Dt = ({
|
|
1117
1113
|
allowSingleCardPeeking: t = !0,
|
|
1118
1114
|
areBeatsLoading: e = !1,
|
|
1119
1115
|
beats: n = [],
|
|
@@ -1122,80 +1118,80 @@ const F = E.createContext(null), ht = ({
|
|
|
1122
1118
|
endpoint: a = "/",
|
|
1123
1119
|
headerSx: l,
|
|
1124
1120
|
heightOverrides: r,
|
|
1125
|
-
logOutUser:
|
|
1121
|
+
logOutUser: u = () => {
|
|
1126
1122
|
},
|
|
1127
1123
|
onCardClick: C = () => {
|
|
1128
1124
|
},
|
|
1129
|
-
onEvent:
|
|
1125
|
+
onEvent: E = () => {
|
|
1130
1126
|
},
|
|
1131
|
-
onPageview:
|
|
1127
|
+
onPageview: h = () => {
|
|
1132
1128
|
},
|
|
1133
1129
|
posthog: d,
|
|
1134
1130
|
showCarouselControls: _,
|
|
1135
1131
|
showHeader: p,
|
|
1136
|
-
showIcon:
|
|
1132
|
+
showIcon: g,
|
|
1137
1133
|
showWithMargin: y = !0,
|
|
1138
1134
|
token: S = "",
|
|
1139
|
-
userHasFullInsightFeedBeats:
|
|
1135
|
+
userHasFullInsightFeedBeats: N,
|
|
1140
1136
|
visibleCardsCount: T = 1,
|
|
1141
|
-
widthOverrides:
|
|
1137
|
+
widthOverrides: A
|
|
1142
1138
|
}) => {
|
|
1143
1139
|
const R = (() => {
|
|
1144
1140
|
if (i === "border") return "outlined";
|
|
1145
1141
|
if (i === "elevation 1") return "elevation";
|
|
1146
1142
|
if (i !== "flat")
|
|
1147
1143
|
return "elevation";
|
|
1148
|
-
})(),
|
|
1149
|
-
|
|
1144
|
+
})(), m = i === "flat" ? 0 : 1, [j, M] = ie("STANDARD"), [V, te] = ie(!1), [Y, X] = ie(!1), oe = qe([E], x), ne = Je([h], x);
|
|
1145
|
+
et({
|
|
1150
1146
|
widgetName: "InsightsMicroWidget",
|
|
1151
1147
|
isLoaded: V
|
|
1152
|
-
}),
|
|
1153
|
-
!
|
|
1154
|
-
}, [a, S,
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
}, [window.innerHeight]),
|
|
1158
|
-
te(!e &&
|
|
1159
|
-
}, [e,
|
|
1160
|
-
const
|
|
1148
|
+
}), I.useEffect(() => {
|
|
1149
|
+
!x.isInitialized && !Y && (x.initialize(a, S, u).catch(() => X(!1)), X(!0));
|
|
1150
|
+
}, [a, S, u, x.isInitialized, Y]), I.useEffect(() => {
|
|
1151
|
+
const f = window.innerHeight;
|
|
1152
|
+
f < 180 ? M("STANDARD") : f >= 180 && f < 200 ? M("LARGE") : f >= 200 && f < 248 ? M("XLARGE") : f >= 248 && M("XXLARGE");
|
|
1153
|
+
}, [window.innerHeight]), I.useEffect(() => {
|
|
1154
|
+
te(!e && x.isInitialized);
|
|
1155
|
+
}, [e, x.isInitialized]);
|
|
1156
|
+
const Z = {
|
|
1161
1157
|
heightOverrides: r,
|
|
1162
1158
|
onCardClick: C,
|
|
1163
1159
|
posthog: d,
|
|
1164
|
-
showIcon:
|
|
1160
|
+
showIcon: g,
|
|
1165
1161
|
showWithMargin: y,
|
|
1166
|
-
widthOverrides:
|
|
1167
|
-
},
|
|
1168
|
-
carouselSize:
|
|
1169
|
-
elevation:
|
|
1162
|
+
widthOverrides: A
|
|
1163
|
+
}, Q = {
|
|
1164
|
+
carouselSize: j,
|
|
1165
|
+
elevation: m,
|
|
1170
1166
|
variant: R,
|
|
1171
1167
|
heightOverrides: r,
|
|
1172
1168
|
onCardClick: C,
|
|
1173
1169
|
posthog: d,
|
|
1174
|
-
showIcon:
|
|
1170
|
+
showIcon: g
|
|
1175
1171
|
};
|
|
1176
|
-
return /* @__PURE__ */ o(
|
|
1177
|
-
!V && /* @__PURE__ */ o(
|
|
1172
|
+
return /* @__PURE__ */ o(_t, { onEvent: oe, onPageview: ne, store: x, children: /* @__PURE__ */ w(bt, { heightOverrides: r, widthOverrides: A, children: [
|
|
1173
|
+
!V && /* @__PURE__ */ o(vt, {}),
|
|
1178
1174
|
V && p && /* @__PURE__ */ o(
|
|
1179
|
-
|
|
1175
|
+
Lt,
|
|
1180
1176
|
{
|
|
1181
|
-
analyticsMetadata:
|
|
1177
|
+
analyticsMetadata: Se,
|
|
1182
1178
|
headerSx: l,
|
|
1183
1179
|
onCardClick: C,
|
|
1184
1180
|
posthog: d,
|
|
1185
|
-
widthOverrides:
|
|
1181
|
+
widthOverrides: A
|
|
1186
1182
|
}
|
|
1187
1183
|
),
|
|
1188
1184
|
V && !!n.length && /* @__PURE__ */ o(
|
|
1189
|
-
|
|
1185
|
+
wt,
|
|
1190
1186
|
{
|
|
1191
1187
|
allowSingleCardPeeking: t,
|
|
1192
|
-
analyticsMetadata:
|
|
1188
|
+
analyticsMetadata: Se,
|
|
1193
1189
|
beats: n,
|
|
1194
|
-
elevation:
|
|
1190
|
+
elevation: m,
|
|
1195
1191
|
showCarouselControls: _,
|
|
1196
1192
|
variant: R,
|
|
1197
1193
|
visibleCardsCount: T,
|
|
1198
|
-
...
|
|
1194
|
+
...Z
|
|
1199
1195
|
}
|
|
1200
1196
|
),
|
|
1201
1197
|
V && !n.length && /* @__PURE__ */ o(
|
|
@@ -1204,22 +1200,22 @@ const F = E.createContext(null), ht = ({
|
|
|
1204
1200
|
sx: {
|
|
1205
1201
|
alignItems: "center",
|
|
1206
1202
|
height: r,
|
|
1207
|
-
width:
|
|
1203
|
+
width: A || "100%"
|
|
1208
1204
|
},
|
|
1209
1205
|
children: /* @__PURE__ */ o(
|
|
1210
1206
|
k,
|
|
1211
1207
|
{
|
|
1212
1208
|
sx: {
|
|
1213
|
-
height: `calc(${
|
|
1214
|
-
width: y ? `calc(${
|
|
1209
|
+
height: `calc(${St[j]}px - 44px)`,
|
|
1210
|
+
width: y ? `calc(${A}px - 32px)` : "100%"
|
|
1215
1211
|
},
|
|
1216
|
-
children:
|
|
1212
|
+
children: N ? /* @__PURE__ */ o(Pe, { ...Q }) : /* @__PURE__ */ o(Ve, { ...Q })
|
|
1217
1213
|
}
|
|
1218
1214
|
)
|
|
1219
1215
|
}
|
|
1220
1216
|
)
|
|
1221
1217
|
] }) });
|
|
1222
|
-
},
|
|
1218
|
+
}, ao = U(Dt), xt = ({
|
|
1223
1219
|
ariaLabel: t,
|
|
1224
1220
|
elevation: e,
|
|
1225
1221
|
heightOverrides: n,
|
|
@@ -1227,18 +1223,18 @@ const F = E.createContext(null), ht = ({
|
|
|
1227
1223
|
onCardClick: a,
|
|
1228
1224
|
posthog: l,
|
|
1229
1225
|
widthOverrides: r,
|
|
1230
|
-
showIcon:
|
|
1226
|
+
showIcon: u,
|
|
1231
1227
|
variant: C
|
|
1232
1228
|
}) => {
|
|
1233
|
-
const
|
|
1234
|
-
threshold:
|
|
1235
|
-
}), { cardsCopy: _ } =
|
|
1236
|
-
|
|
1237
|
-
d && (p(
|
|
1229
|
+
const E = P(), { ref: h, inView: d } = Oe({
|
|
1230
|
+
threshold: Be
|
|
1231
|
+
}), { cardsCopy: _ } = D(), { onEvent: p } = $();
|
|
1232
|
+
re(() => {
|
|
1233
|
+
d && (p(Le.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
|
|
1238
1234
|
template: "view_more_card"
|
|
1239
1235
|
}));
|
|
1240
1236
|
}, [d]);
|
|
1241
|
-
const
|
|
1237
|
+
const g = () => {
|
|
1242
1238
|
a && a(), p(W.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
|
|
1243
1239
|
template: "view_more_card"
|
|
1244
1240
|
});
|
|
@@ -1251,29 +1247,30 @@ const F = E.createContext(null), ht = ({
|
|
|
1251
1247
|
description: _?.view_more_card_description,
|
|
1252
1248
|
elevation: e,
|
|
1253
1249
|
heightOverrides: n,
|
|
1254
|
-
icon:
|
|
1250
|
+
icon: u && /* @__PURE__ */ o(c, { bgColor: s(E.palette.primary.main, 0.15), name: "show_chart" }),
|
|
1255
1251
|
isActiveCard: i,
|
|
1256
|
-
onCardClick:
|
|
1257
|
-
onPrimaryAction:
|
|
1252
|
+
onCardClick: g,
|
|
1253
|
+
onPrimaryAction: g,
|
|
1258
1254
|
primaryActionText: _?.micro_card_cta,
|
|
1259
|
-
ref:
|
|
1255
|
+
ref: h,
|
|
1260
1256
|
title: _?.view_more_card_title,
|
|
1261
1257
|
variant: C,
|
|
1262
1258
|
widthOverrides: r
|
|
1263
1259
|
}
|
|
1264
1260
|
);
|
|
1265
|
-
},
|
|
1261
|
+
}, Bt = U(xt);
|
|
1266
1262
|
export {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1263
|
+
dt as A,
|
|
1264
|
+
Lt as C,
|
|
1265
|
+
Rt as I,
|
|
1266
|
+
wt as M,
|
|
1267
|
+
io as N,
|
|
1268
|
+
Se as T,
|
|
1269
|
+
Bt as V,
|
|
1270
|
+
ro as Z,
|
|
1271
|
+
ao as a,
|
|
1272
|
+
_t as b,
|
|
1277
1273
|
J as c,
|
|
1278
|
-
|
|
1274
|
+
ht as d
|
|
1279
1275
|
};
|
|
1276
|
+
//# sourceMappingURL=ViewMoreMicroCard-Dxghxphh.mjs.map
|