@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms2
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/dist/{Account-B4CDD-zq.mjs → Account-Cp30A3ad.mjs} +1 -1
- package/dist/AccountDetailsContent-C1HumFnW.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-NMx79DGs.mjs} +17 -17
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-CW6cIthP.mjs} +8 -8
- package/dist/AccountListItem-DxmAs98Z.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-hIs-yA6W.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DUHkUyK4.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-CIDAPPPT.mjs} +30 -30
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-naOtJcwo.mjs} +22 -15
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqDAA_5I.mjs} +26 -26
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-Dn1MlqLz.mjs} +60 -61
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-CSo6AFkG.mjs} +2 -2
- package/dist/CurrencyInput-BrGvhgVK.mjs +85 -0
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-hi1cqrRk.mjs} +3 -3
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-Dqe5EqvA.mjs} +6 -6
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-CQ1grpwo.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-dKZOZ2hM.mjs} +3 -3
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-CFeAJloA.mjs} +3 -3
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-i4OasOO-.mjs} +176 -158
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/Loader-BSWSYqvn.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-D_qVX5dN.mjs} +44 -44
- package/dist/{MiniWidgetContainer-CKzf_Ira.mjs → MiniWidgetContainer-D7MkHG15.mjs} +12 -12
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-8FFC1Bs0.mjs} +2 -2
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-BsWiYD94.mjs} +67 -67
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-62e0mU_3.mjs} +7 -7
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-RfZ8Wuhh.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-Bhx56aA3.mjs} +76 -76
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-D3EOKZ2B.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-C6KH8JH4.mjs} +1 -1
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-PsRQPkmV.mjs} +1 -1
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CZzDb-7d.mjs} +10 -10
- package/dist/TransactionDetails-Duv1X9ec.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-DgLrYW4C.mjs} +3 -3
- package/dist/{User-BklmOUSd.mjs → User-DqNX2GAK.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-CH9E-jOx.mjs} +178 -177
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-B1Jzb4XA.mjs} +6 -6
- package/dist/accounts/index.es.js +45 -45
- package/dist/analytics/index.es.js +22 -22
- package/dist/budgets/index.es.js +266 -265
- package/dist/cashflow/index.es.js +155 -154
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +659 -394
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +438 -438
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-BFpuIAXW.mjs} +1 -1
- package/dist/finstrong/index.es.js +113 -113
- package/dist/goals/index.es.js +379 -385
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +3 -3
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +16 -16
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +185 -191
- package/dist/notifications/index.es.js +29 -29
- package/dist/recurringtransactions/index.es.js +82 -82
- package/dist/settings/index.es.js +254 -254
- package/dist/spending/index.es.js +43 -43
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +150 -149
- package/dist/trends/index.es.js +297 -296
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-usSZCQ7I.mjs} +1 -1
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/package.json +30 -30
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { jsx as e, jsxs as g, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
-
import u, { useEffect as
|
|
2
|
+
import u, { useEffect as ee, useState as J } from "react";
|
|
3
3
|
import { observer as P } from "mobx-react-lite";
|
|
4
4
|
import k from "@mui/material/Stack";
|
|
5
5
|
import De from "@mui/material/Button";
|
|
6
6
|
import Le from "@mui/material/Typography";
|
|
7
7
|
import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as Ce } from "@mxenabled/mx-icons";
|
|
8
|
-
import { L as ke } from "./Loader-
|
|
8
|
+
import { L as ke } from "./Loader-BSWSYqvn.mjs";
|
|
9
9
|
import Z from "@mui/material/Box";
|
|
10
|
-
import
|
|
11
|
-
import { useTheme as
|
|
10
|
+
import se from "@mui/material/IconButton";
|
|
11
|
+
import { useTheme as Fe } from "@mui/material/styles";
|
|
12
12
|
import { useInView as me } from "react-intersection-observer";
|
|
13
|
-
import { P as
|
|
14
|
-
import { b as
|
|
15
|
-
import
|
|
16
|
-
import Ge from "
|
|
13
|
+
import { P as Be, CategoryIcon as Ze, MerchantLogo as Pe } from "@mxenabled/mxui";
|
|
14
|
+
import { b as be } from "./Category-Ccoew_sA.mjs";
|
|
15
|
+
import te from "@mui/material/styles/useTheme";
|
|
16
|
+
import { b as Ge } from "./Localization-2MODESHW.mjs";
|
|
17
|
+
import Ue from "@mui/material/CircularProgress";
|
|
17
18
|
import { makeAutoObservable as ie, runInAction as Re } from "mobx";
|
|
18
|
-
import { G as
|
|
19
|
+
import { G as ce, a as ze, u as Ke, b as $e } from "./useCombineEvents-CRwX-qWE.mjs";
|
|
19
20
|
import { B as de } from "./BeatApi-De2IaqH2.mjs";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
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";
|
|
24
25
|
const Ee = {
|
|
25
26
|
featureVersion: "spendVsIncomeTrends"
|
|
26
27
|
};
|
|
27
|
-
class
|
|
28
|
-
copyApi = new
|
|
28
|
+
class qe {
|
|
29
|
+
copyApi = new ce("/", "");
|
|
29
30
|
copyObject = {};
|
|
30
31
|
namespace = "experiences";
|
|
31
32
|
translationKey = "micro_insights";
|
|
@@ -36,7 +37,7 @@ class Qe {
|
|
|
36
37
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
37
38
|
// TODO: Remove this function
|
|
38
39
|
initialize = async (o, t) => {
|
|
39
|
-
this.copyApi = new
|
|
40
|
+
this.copyApi = new ce(o, t), await this.loadCopy();
|
|
40
41
|
};
|
|
41
42
|
loadCopy = async () => {
|
|
42
43
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
@@ -71,38 +72,38 @@ const oe = {
|
|
|
71
72
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
72
73
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
73
74
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
74
|
-
},
|
|
75
|
+
}, v = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
|
|
75
76
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
76
|
-
}, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`,
|
|
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(
|
|
77
78
|
(i, o) => ({
|
|
78
79
|
...i,
|
|
79
80
|
[ge(o)]: {
|
|
80
81
|
action: L.MICRO_BEAT_CLICKED,
|
|
81
82
|
category: D.BEAT_INTERACTION,
|
|
82
83
|
label: le(o),
|
|
83
|
-
value:
|
|
84
|
+
value: v
|
|
84
85
|
}
|
|
85
86
|
}),
|
|
86
87
|
{}
|
|
87
|
-
),
|
|
88
|
+
), et = () => Object.values(oe).reduce(
|
|
88
89
|
(i, o) => ({
|
|
89
90
|
...i,
|
|
90
91
|
[Ie(o)]: {
|
|
91
92
|
action: L.MICRO_BEAT_DISPLAYED,
|
|
92
93
|
category: D.BEAT_INTERACTION,
|
|
93
94
|
label: le(o),
|
|
94
|
-
value:
|
|
95
|
+
value: v
|
|
95
96
|
}
|
|
96
97
|
}),
|
|
97
98
|
{}
|
|
98
|
-
),
|
|
99
|
+
), tt = () => Object.values(oe).reduce(
|
|
99
100
|
(i, o) => ({
|
|
100
101
|
...i,
|
|
101
|
-
[
|
|
102
|
+
[ye(o)]: {
|
|
102
103
|
action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
103
104
|
category: D.BEAT_INTERACTION,
|
|
104
105
|
label: le(o),
|
|
105
|
-
value:
|
|
106
|
+
value: v
|
|
106
107
|
}
|
|
107
108
|
}),
|
|
108
109
|
{}
|
|
@@ -120,7 +121,7 @@ const oe = {
|
|
|
120
121
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
121
122
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
122
123
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
123
|
-
},
|
|
124
|
+
}, ve = {
|
|
124
125
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
125
126
|
}, L = {
|
|
126
127
|
CONTROL_BACKWARD: "Control Backward",
|
|
@@ -139,21 +140,21 @@ const oe = {
|
|
|
139
140
|
label: x.MICRO_WIDGET,
|
|
140
141
|
name: H.MICRO_WIDGET_CAROUSEL,
|
|
141
142
|
path: he.INSIGHTS_MICRO_WIDGET,
|
|
142
|
-
value:
|
|
143
|
+
value: v
|
|
143
144
|
},
|
|
144
145
|
// zero state
|
|
145
146
|
[H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
146
147
|
label: x.MICRO_WIDGET,
|
|
147
148
|
name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
148
149
|
path: he.INSIGHTS_MICRO_WIDGET,
|
|
149
|
-
value:
|
|
150
|
+
value: v
|
|
150
151
|
},
|
|
151
152
|
// no relevant cards
|
|
152
153
|
[H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
153
154
|
label: x.MICRO_WIDGET,
|
|
154
155
|
name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
155
156
|
path: "/micro-widget",
|
|
156
|
-
value:
|
|
157
|
+
value: v
|
|
157
158
|
}
|
|
158
159
|
}, pe = {
|
|
159
160
|
// carousel control interaction events - clicks and swipes
|
|
@@ -161,48 +162,48 @@ const oe = {
|
|
|
161
162
|
action: L.CONTROL_BACKWARD,
|
|
162
163
|
category: D.MICRO_WIDGET_INTERACTION,
|
|
163
164
|
label: x.CAROUSEL_CONTROL,
|
|
164
|
-
value:
|
|
165
|
+
value: v
|
|
165
166
|
},
|
|
166
167
|
[S.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
167
168
|
action: L.CONTROL_FORWARD,
|
|
168
169
|
category: D.MICRO_WIDGET_INTERACTION,
|
|
169
170
|
label: x.CAROUSEL_CONTROL,
|
|
170
|
-
value:
|
|
171
|
+
value: v
|
|
171
172
|
},
|
|
172
173
|
[S.ON_CAROUSEL_BACK_SWIPE]: {
|
|
173
174
|
action: L.SWIPE_BACKWARD,
|
|
174
175
|
category: D.MICRO_WIDGET_INTERACTION,
|
|
175
176
|
label: x.CAROUSEL_CONTROL,
|
|
176
|
-
value:
|
|
177
|
+
value: v
|
|
177
178
|
},
|
|
178
179
|
[S.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
179
180
|
action: L.SWIPE_FORWARD,
|
|
180
181
|
category: D.MICRO_WIDGET_INTERACTION,
|
|
181
182
|
label: x.CAROUSEL_CONTROL,
|
|
182
|
-
value:
|
|
183
|
+
value: v
|
|
183
184
|
},
|
|
184
185
|
// read more card events
|
|
185
186
|
[S.ON_VIEW_MORE_CLICKED]: {
|
|
186
187
|
action: L.MICRO_BEAT_CLICKED,
|
|
187
188
|
category: D.BEAT_INTERACTION,
|
|
188
189
|
label: x.VIEW_MORE,
|
|
189
|
-
value:
|
|
190
|
+
value: v
|
|
190
191
|
},
|
|
191
|
-
[
|
|
192
|
+
[ve.ON_VIEW_MORE_VIEWED]: {
|
|
192
193
|
action: L.MICRO_BEAT_DISPLAYED,
|
|
193
194
|
category: D.BEAT_INTERACTION,
|
|
194
195
|
label: x.VIEW_MORE,
|
|
195
|
-
value:
|
|
196
|
+
value: v
|
|
196
197
|
},
|
|
197
|
-
...qe(),
|
|
198
198
|
...Je(),
|
|
199
|
-
...et()
|
|
199
|
+
...et(),
|
|
200
|
+
...tt()
|
|
200
201
|
}, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
|
|
201
202
|
throw t;
|
|
202
203
|
}), fe = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
|
|
203
204
|
throw t;
|
|
204
205
|
});
|
|
205
|
-
class
|
|
206
|
+
class it {
|
|
206
207
|
onAnalyticEvent = _e;
|
|
207
208
|
onAnalyticPageView = fe;
|
|
208
209
|
beatApi = new de("/", "");
|
|
@@ -227,7 +228,7 @@ class tt {
|
|
|
227
228
|
this.beatApi.updateOffer(o);
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
|
-
class
|
|
231
|
+
class ot {
|
|
231
232
|
copyStore;
|
|
232
233
|
endpoint = "/";
|
|
233
234
|
insightsMicroWidgetStore;
|
|
@@ -235,40 +236,40 @@ class it {
|
|
|
235
236
|
token = "";
|
|
236
237
|
isInitialized = !1;
|
|
237
238
|
constructor() {
|
|
238
|
-
this.copyStore = new
|
|
239
|
+
this.copyStore = new qe(), this.insightsMicroWidgetStore = new it(), ie(this);
|
|
239
240
|
}
|
|
240
241
|
initialize = async (o, t, l) => {
|
|
241
242
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
|
|
242
|
-
const n = await
|
|
243
|
+
const n = await ze(o, t, "1.0.0", "Micro Insights Carousel");
|
|
243
244
|
Re(() => {
|
|
244
245
|
this.session = n, this.isInitialized = !0;
|
|
245
246
|
});
|
|
246
247
|
};
|
|
247
248
|
}
|
|
248
|
-
const U = u.createContext(null),
|
|
249
|
+
const U = u.createContext(null), lt = ({
|
|
249
250
|
onEvent: i,
|
|
250
251
|
onPageview: o,
|
|
251
252
|
store: t,
|
|
252
253
|
children: l
|
|
253
|
-
}) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }),
|
|
254
|
+
}) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), j = u.forwardRef(function({
|
|
254
255
|
actionText: o,
|
|
255
256
|
ariaLabel: t,
|
|
256
257
|
backgroundColor: l,
|
|
257
258
|
description: n,
|
|
258
259
|
heightOverrides: r,
|
|
259
260
|
icon: a,
|
|
260
|
-
isActiveCard:
|
|
261
|
+
isActiveCard: c,
|
|
261
262
|
isZeroState: h,
|
|
262
263
|
onCardClick: f = () => {
|
|
263
264
|
},
|
|
264
265
|
showIcon: p,
|
|
265
266
|
style: d = {},
|
|
266
267
|
title: E,
|
|
267
|
-
variant:
|
|
268
|
+
variant: s,
|
|
268
269
|
widthOverrides: C
|
|
269
270
|
}, _) {
|
|
270
|
-
const R =
|
|
271
|
-
|
|
271
|
+
const R = te(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, y = s ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
|
|
272
|
+
Be,
|
|
272
273
|
{
|
|
273
274
|
className: "mx-micro-card-description",
|
|
274
275
|
color: "text.primary",
|
|
@@ -296,7 +297,7 @@ const U = u.createContext(null), ot = ({
|
|
|
296
297
|
return /* @__PURE__ */ e(
|
|
297
298
|
Z,
|
|
298
299
|
{
|
|
299
|
-
"aria-hidden": !
|
|
300
|
+
"aria-hidden": !c,
|
|
300
301
|
"aria-label": t,
|
|
301
302
|
"aria-labelledby": "divButton",
|
|
302
303
|
"aria-roledescription": "slide",
|
|
@@ -310,7 +311,7 @@ const U = u.createContext(null), ot = ({
|
|
|
310
311
|
children: /* @__PURE__ */ e(
|
|
311
312
|
Z,
|
|
312
313
|
{
|
|
313
|
-
"aria-hidden": !
|
|
314
|
+
"aria-hidden": !c,
|
|
314
315
|
"aria-label": t,
|
|
315
316
|
id: "divButton",
|
|
316
317
|
onClick: () => f(),
|
|
@@ -323,9 +324,9 @@ const U = u.createContext(null), ot = ({
|
|
|
323
324
|
borderRadius: "8px",
|
|
324
325
|
height: "100%"
|
|
325
326
|
},
|
|
326
|
-
tabIndex:
|
|
327
|
+
tabIndex: c ? 0 : -1,
|
|
327
328
|
children: /* @__PURE__ */ e(
|
|
328
|
-
|
|
329
|
+
Ye,
|
|
329
330
|
{
|
|
330
331
|
"aria-roledescription": "slide",
|
|
331
332
|
className: "mx-micro-card",
|
|
@@ -336,12 +337,12 @@ const U = u.createContext(null), ot = ({
|
|
|
336
337
|
cursor: "pointer",
|
|
337
338
|
height: r ? "100%" : 124,
|
|
338
339
|
p: 16,
|
|
339
|
-
...
|
|
340
|
+
...y,
|
|
340
341
|
"& .MuiCardHeader-avatar": {
|
|
341
342
|
mr: "8px"
|
|
342
343
|
}
|
|
343
344
|
},
|
|
344
|
-
variant:
|
|
345
|
+
variant: s,
|
|
345
346
|
children: /* @__PURE__ */ g(
|
|
346
347
|
k,
|
|
347
348
|
{
|
|
@@ -351,7 +352,7 @@ const U = u.createContext(null), ot = ({
|
|
|
351
352
|
},
|
|
352
353
|
children: [
|
|
353
354
|
/* @__PURE__ */ e(
|
|
354
|
-
|
|
355
|
+
Qe,
|
|
355
356
|
{
|
|
356
357
|
avatar: p && a,
|
|
357
358
|
subheader: h && M,
|
|
@@ -360,9 +361,9 @@ const U = u.createContext(null), ot = ({
|
|
|
360
361
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
361
362
|
}
|
|
362
363
|
),
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
+
/* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: !h && M }),
|
|
364
365
|
!!o && /* @__PURE__ */ e(
|
|
365
|
-
|
|
366
|
+
je,
|
|
366
367
|
{
|
|
367
368
|
sx: {
|
|
368
369
|
mt: "auto",
|
|
@@ -393,13 +394,13 @@ const U = u.createContext(null), ot = ({
|
|
|
393
394
|
)
|
|
394
395
|
}
|
|
395
396
|
);
|
|
396
|
-
}),
|
|
397
|
-
const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] ||
|
|
398
|
-
return /* @__PURE__ */ e(
|
|
399
|
-
},
|
|
397
|
+
}), nt = ({ beat: i }) => {
|
|
398
|
+
const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || be.UNCATEGORIZED;
|
|
399
|
+
return /* @__PURE__ */ e(Ze, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
|
|
400
|
+
}, rt = ({ beat: i }) => {
|
|
400
401
|
const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
|
|
401
402
|
return /* @__PURE__ */ e(
|
|
402
|
-
|
|
403
|
+
Pe,
|
|
403
404
|
{
|
|
404
405
|
categoryGuid: l || o && o[0] || "",
|
|
405
406
|
merchantGuid: n || t[0],
|
|
@@ -410,7 +411,7 @@ const U = u.createContext(null), ot = ({
|
|
|
410
411
|
}
|
|
411
412
|
}
|
|
412
413
|
);
|
|
413
|
-
},
|
|
414
|
+
}, at = ({
|
|
414
415
|
color: i = "currentColor",
|
|
415
416
|
height: o,
|
|
416
417
|
size: t = 16,
|
|
@@ -436,16 +437,16 @@ const U = u.createContext(null), ot = ({
|
|
|
436
437
|
}
|
|
437
438
|
)
|
|
438
439
|
}
|
|
439
|
-
),
|
|
440
|
+
), st = (i) => i ? i.data ? i.data.map((o) => {
|
|
440
441
|
const t = {};
|
|
441
442
|
return i.names?.map((l, n) => {
|
|
442
443
|
t[l] = o[n];
|
|
443
444
|
}), t;
|
|
444
445
|
}) : [] : [], ct = (i, o) => {
|
|
445
|
-
const t =
|
|
446
|
+
const t = st(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
|
|
446
447
|
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;
|
|
447
|
-
},
|
|
448
|
-
const o =
|
|
448
|
+
}, dt = ({ beat: i }) => {
|
|
449
|
+
const o = te(), t = ct(i.data_series, o);
|
|
449
450
|
return /* @__PURE__ */ e(Ve, { sx: { color: t } });
|
|
450
451
|
}, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
451
452
|
/* @__PURE__ */ e(
|
|
@@ -1228,9 +1229,9 @@ const U = u.createContext(null), ot = ({
|
|
|
1228
1229
|
}
|
|
1229
1230
|
)
|
|
1230
1231
|
] })
|
|
1231
|
-
] }),
|
|
1232
|
+
] }), Et = ({ beat: i }) => {
|
|
1232
1233
|
const { icon_type: o, icon_color: t } = i;
|
|
1233
|
-
return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(
|
|
1234
|
+
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(
|
|
1234
1235
|
ae,
|
|
1235
1236
|
{
|
|
1236
1237
|
filled: !0,
|
|
@@ -1244,7 +1245,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1244
1245
|
if (!i)
|
|
1245
1246
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
1246
1247
|
return i.store.copyStore;
|
|
1247
|
-
},
|
|
1248
|
+
}, ht = () => {
|
|
1248
1249
|
const i = u.useContext(U);
|
|
1249
1250
|
if (!i?.store?.insightsMicroWidgetStore)
|
|
1250
1251
|
throw new Error(
|
|
@@ -1261,12 +1262,12 @@ const U = u.createContext(null), ot = ({
|
|
|
1261
1262
|
if (!i)
|
|
1262
1263
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
1263
1264
|
return { onPageview: i.onPageview };
|
|
1264
|
-
},
|
|
1265
|
+
}, ut = {
|
|
1265
1266
|
LARGE: 180,
|
|
1266
1267
|
STANDARD: 154,
|
|
1267
1268
|
XLARGE: 200,
|
|
1268
1269
|
XXLARGE: 248
|
|
1269
|
-
},
|
|
1270
|
+
}, pt = 50, Ae = 1, _t = ({
|
|
1270
1271
|
ariaLabel: i,
|
|
1271
1272
|
backgroundColor: o,
|
|
1272
1273
|
beat: t,
|
|
@@ -1274,25 +1275,25 @@ const U = u.createContext(null), ot = ({
|
|
|
1274
1275
|
heightOverrides: n,
|
|
1275
1276
|
index: r,
|
|
1276
1277
|
isActiveCard: a,
|
|
1277
|
-
onCardClick:
|
|
1278
|
+
onCardClick: c,
|
|
1278
1279
|
posthog: h,
|
|
1279
1280
|
showIcon: f,
|
|
1280
1281
|
variant: p,
|
|
1281
1282
|
widthOverrides: d
|
|
1282
1283
|
}) => {
|
|
1283
|
-
const { ref: E, inView:
|
|
1284
|
+
const { ref: E, inView: s } = me({
|
|
1284
1285
|
threshold: Ae
|
|
1285
|
-
}), { cardsCopy: C } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } =
|
|
1286
|
-
|
|
1287
|
-
|
|
1286
|
+
}), { cardsCopy: C } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = ht();
|
|
1287
|
+
ee(() => {
|
|
1288
|
+
s && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
|
|
1288
1289
|
...t,
|
|
1289
1290
|
has_been_displayed: !0
|
|
1290
1291
|
}) : R({
|
|
1291
1292
|
...t,
|
|
1292
1293
|
has_been_displayed: !0
|
|
1293
|
-
}), _(
|
|
1294
|
-
}, [
|
|
1295
|
-
if (
|
|
1294
|
+
}), _(ye(t.template))));
|
|
1295
|
+
}, [s]), ee(() => {
|
|
1296
|
+
if (s && t)
|
|
1296
1297
|
if (t.template === "MarketingOffer") {
|
|
1297
1298
|
const m = t;
|
|
1298
1299
|
h?.capture("viewed_messaging_insight", {
|
|
@@ -1306,9 +1307,9 @@ const U = u.createContext(null), ot = ({
|
|
|
1306
1307
|
template: t.template,
|
|
1307
1308
|
position: r
|
|
1308
1309
|
});
|
|
1309
|
-
}, [t, r,
|
|
1310
|
+
}, [t, r, s]);
|
|
1310
1311
|
const I = () => {
|
|
1311
|
-
if (
|
|
1312
|
+
if (c && c(t), _(ge(t.template)), t.template === "MarketingOffer") {
|
|
1312
1313
|
const m = t;
|
|
1313
1314
|
h?.capture("clicked_messaging_insight", {
|
|
1314
1315
|
template: t.template,
|
|
@@ -1323,14 +1324,14 @@ const U = u.createContext(null), ot = ({
|
|
|
1323
1324
|
});
|
|
1324
1325
|
};
|
|
1325
1326
|
return /* @__PURE__ */ e(
|
|
1326
|
-
|
|
1327
|
+
j,
|
|
1327
1328
|
{
|
|
1328
1329
|
actionText: t.micro_call_to_action || C.micro_card_cta,
|
|
1329
1330
|
ariaLabel: i,
|
|
1330
1331
|
backgroundColor: o,
|
|
1331
1332
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1332
1333
|
heightOverrides: n,
|
|
1333
|
-
icon: /* @__PURE__ */ e(
|
|
1334
|
+
icon: /* @__PURE__ */ e(Et, { beat: t }),
|
|
1334
1335
|
isActiveCard: a,
|
|
1335
1336
|
onCardClick: I,
|
|
1336
1337
|
posthog: h,
|
|
@@ -1342,7 +1343,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1342
1343
|
widthOverrides: d
|
|
1343
1344
|
}
|
|
1344
1345
|
);
|
|
1345
|
-
},
|
|
1346
|
+
}, ft = ({
|
|
1346
1347
|
currentBeatIndex: i,
|
|
1347
1348
|
numBeats: o,
|
|
1348
1349
|
onNextClick: t,
|
|
@@ -1350,9 +1351,9 @@ const U = u.createContext(null), ot = ({
|
|
|
1350
1351
|
scrollRightBoundary: n,
|
|
1351
1352
|
scrollX: r,
|
|
1352
1353
|
shouldApplyDotAnimation: a = !1,
|
|
1353
|
-
visibleCardsCount:
|
|
1354
|
+
visibleCardsCount: c = 1
|
|
1354
1355
|
}) => {
|
|
1355
|
-
const h =
|
|
1356
|
+
const h = Fe(), { carouselCopy: f } = 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;
|
|
1356
1357
|
return /* @__PURE__ */ g(
|
|
1357
1358
|
k,
|
|
1358
1359
|
{
|
|
@@ -1369,7 +1370,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1369
1370
|
},
|
|
1370
1371
|
children: [
|
|
1371
1372
|
/* @__PURE__ */ e(
|
|
1372
|
-
|
|
1373
|
+
se,
|
|
1373
1374
|
{
|
|
1374
1375
|
"aria-disabled": p,
|
|
1375
1376
|
"aria-label": f.previous_insight_cta_aria,
|
|
@@ -1378,8 +1379,8 @@ const U = u.createContext(null), ot = ({
|
|
|
1378
1379
|
children: /* @__PURE__ */ e(
|
|
1379
1380
|
He,
|
|
1380
1381
|
{
|
|
1381
|
-
|
|
1382
|
-
color: p ? E :
|
|
1382
|
+
style: {
|
|
1383
|
+
color: p ? E : s
|
|
1383
1384
|
}
|
|
1384
1385
|
}
|
|
1385
1386
|
)
|
|
@@ -1392,7 +1393,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1392
1393
|
{
|
|
1393
1394
|
className: "mx-insights-micro-carousel-dots",
|
|
1394
1395
|
sx: {
|
|
1395
|
-
bgcolor: R ?
|
|
1396
|
+
bgcolor: R ? s : E,
|
|
1396
1397
|
height: 8,
|
|
1397
1398
|
mr: 8,
|
|
1398
1399
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
@@ -1412,7 +1413,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1412
1413
|
);
|
|
1413
1414
|
}),
|
|
1414
1415
|
/* @__PURE__ */ e(
|
|
1415
|
-
|
|
1416
|
+
se,
|
|
1416
1417
|
{
|
|
1417
1418
|
"aria-disabled": d,
|
|
1418
1419
|
"aria-label": f.next_insight_cta_aria,
|
|
@@ -1421,8 +1422,8 @@ const U = u.createContext(null), ot = ({
|
|
|
1421
1422
|
children: /* @__PURE__ */ e(
|
|
1422
1423
|
Ce,
|
|
1423
1424
|
{
|
|
1424
|
-
|
|
1425
|
-
color: d ? E :
|
|
1425
|
+
style: {
|
|
1426
|
+
color: d ? E : s
|
|
1426
1427
|
}
|
|
1427
1428
|
}
|
|
1428
1429
|
)
|
|
@@ -1431,7 +1432,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1431
1432
|
]
|
|
1432
1433
|
}
|
|
1433
1434
|
);
|
|
1434
|
-
},
|
|
1435
|
+
}, Ct = ({
|
|
1435
1436
|
activeCardIndex: i,
|
|
1436
1437
|
beats: o,
|
|
1437
1438
|
cardWidth: t,
|
|
@@ -1439,25 +1440,25 @@ const U = u.createContext(null), ot = ({
|
|
|
1439
1440
|
heightOverrides: n,
|
|
1440
1441
|
onCardClick: r,
|
|
1441
1442
|
posthog: a,
|
|
1442
|
-
showIcon:
|
|
1443
|
+
showIcon: c,
|
|
1443
1444
|
variant: h
|
|
1444
1445
|
}) => {
|
|
1445
1446
|
const { carouselCopy: f } = V(), p = {
|
|
1446
1447
|
showCTAColocatedWithText: l,
|
|
1447
1448
|
heightOverrides: n,
|
|
1448
1449
|
posthog: a,
|
|
1449
|
-
showIcon:
|
|
1450
|
+
showIcon: c,
|
|
1450
1451
|
variant: h
|
|
1451
1452
|
};
|
|
1452
1453
|
return /* @__PURE__ */ g(xe, { children: [
|
|
1453
1454
|
o.map((d, E) => {
|
|
1454
|
-
const
|
|
1455
|
+
const s = E + 1, C = o.length + 1, _ = Ge(
|
|
1455
1456
|
f.card_position_in_carousel_aria,
|
|
1456
|
-
|
|
1457
|
+
s.toString(),
|
|
1457
1458
|
C.toString()
|
|
1458
1459
|
), 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;
|
|
1459
1460
|
return /* @__PURE__ */ e(
|
|
1460
|
-
|
|
1461
|
+
_t,
|
|
1461
1462
|
{
|
|
1462
1463
|
ariaLabel: `${_}: ${I}, ${m}`,
|
|
1463
1464
|
beat: d,
|
|
@@ -1471,7 +1472,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1471
1472
|
);
|
|
1472
1473
|
}),
|
|
1473
1474
|
/* @__PURE__ */ e(
|
|
1474
|
-
|
|
1475
|
+
At,
|
|
1475
1476
|
{
|
|
1476
1477
|
isActiveCard: i === o.length,
|
|
1477
1478
|
onCardClick: r,
|
|
@@ -1480,7 +1481,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1480
1481
|
}
|
|
1481
1482
|
)
|
|
1482
1483
|
] });
|
|
1483
|
-
},
|
|
1484
|
+
}, mt = ({
|
|
1484
1485
|
analyticsMetadata: i,
|
|
1485
1486
|
allowSingleCardPeeking: o = !1,
|
|
1486
1487
|
beats: t = [],
|
|
@@ -1488,7 +1489,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1488
1489
|
heightOverrides: n,
|
|
1489
1490
|
onCardClick: r,
|
|
1490
1491
|
posthog: a,
|
|
1491
|
-
showCarouselControls:
|
|
1492
|
+
showCarouselControls: c,
|
|
1492
1493
|
showIcon: h,
|
|
1493
1494
|
showWithMargin: f = !0,
|
|
1494
1495
|
variant: p,
|
|
@@ -1496,10 +1497,10 @@ const U = u.createContext(null), ot = ({
|
|
|
1496
1497
|
visibleCardsCount: E = 1
|
|
1497
1498
|
// Default to 1 card visible
|
|
1498
1499
|
}) => {
|
|
1499
|
-
const
|
|
1500
|
+
const s = u.useRef(null), C = 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();
|
|
1500
1501
|
u.useEffect(() => {
|
|
1501
|
-
if (
|
|
1502
|
-
const A =
|
|
1502
|
+
if (s.current && !o) {
|
|
1503
|
+
const A = s.current.offsetWidth, b = 8;
|
|
1503
1504
|
let B;
|
|
1504
1505
|
if (E > 1) {
|
|
1505
1506
|
const ne = (A - (E - 1) * b) / E / 3;
|
|
@@ -1508,7 +1509,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1508
1509
|
B = A;
|
|
1509
1510
|
M(B);
|
|
1510
1511
|
}
|
|
1511
|
-
}, [E,
|
|
1512
|
+
}, [E, s.current?.offsetWidth]), u.useEffect(() => {
|
|
1512
1513
|
const A = C.current?.offsetWidth;
|
|
1513
1514
|
if (typeof A == "number" && o) {
|
|
1514
1515
|
const b = (G) => {
|
|
@@ -1532,27 +1533,27 @@ const U = u.createContext(null), ot = ({
|
|
|
1532
1533
|
}
|
|
1533
1534
|
}, [o, C]);
|
|
1534
1535
|
const K = () => {
|
|
1535
|
-
F(S.ON_CAROUSEL_FORWARD_CLICK, i),
|
|
1536
|
-
left: _ +
|
|
1536
|
+
F(S.ON_CAROUSEL_FORWARD_CLICK, i), s.current && y && s.current.scrollTo({
|
|
1537
|
+
left: _ + y + 8,
|
|
1537
1538
|
top: 0,
|
|
1538
1539
|
behavior: "smooth"
|
|
1539
1540
|
});
|
|
1540
1541
|
}, $ = () => {
|
|
1541
|
-
F(S.ON_CAROUSEL_BACK_CLICK, i),
|
|
1542
|
-
left: Math.max(0, _ - (
|
|
1542
|
+
F(S.ON_CAROUSEL_BACK_CLICK, i), s.current && y && s.current.scrollTo({
|
|
1543
|
+
left: Math.max(0, _ - (y + 8)),
|
|
1543
1544
|
top: 0,
|
|
1544
1545
|
behavior: "smooth"
|
|
1545
1546
|
});
|
|
1547
|
+
}, X = () => {
|
|
1548
|
+
s.current && R(s.current.scrollLeft);
|
|
1546
1549
|
}, Q = () => {
|
|
1547
|
-
c.current && R(c.current.scrollLeft);
|
|
1548
|
-
}, q = () => {
|
|
1549
1550
|
if (!m || !O) return;
|
|
1550
|
-
m - O >
|
|
1551
|
-
},
|
|
1551
|
+
m - O > pt ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1552
|
+
}, q = (A) => {
|
|
1552
1553
|
I(A.targetTouches[0].clientX);
|
|
1553
1554
|
}, Y = (A) => {
|
|
1554
1555
|
I(null), T(A.targetTouches[0].clientX);
|
|
1555
|
-
}, w =
|
|
1556
|
+
}, w = y ? Math.round(_ / (y + 8)) : 0, We = s.current ? s.current.scrollWidth - s.current.offsetWidth : 0;
|
|
1556
1557
|
return /* @__PURE__ */ g(
|
|
1557
1558
|
k,
|
|
1558
1559
|
{
|
|
@@ -1571,11 +1572,11 @@ const U = u.createContext(null), ot = ({
|
|
|
1571
1572
|
k,
|
|
1572
1573
|
{
|
|
1573
1574
|
direction: "row",
|
|
1574
|
-
onScroll:
|
|
1575
|
-
onTouchEnd:
|
|
1576
|
-
onTouchMove:
|
|
1575
|
+
onScroll: X,
|
|
1576
|
+
onTouchEnd: Q,
|
|
1577
|
+
onTouchMove: q,
|
|
1577
1578
|
onTouchStart: Y,
|
|
1578
|
-
ref:
|
|
1579
|
+
ref: s,
|
|
1579
1580
|
sx: {
|
|
1580
1581
|
alignItems: "center",
|
|
1581
1582
|
height: n && "100%",
|
|
@@ -1594,11 +1595,11 @@ const U = u.createContext(null), ot = ({
|
|
|
1594
1595
|
}
|
|
1595
1596
|
},
|
|
1596
1597
|
children: /* @__PURE__ */ e(
|
|
1597
|
-
|
|
1598
|
+
Ct,
|
|
1598
1599
|
{
|
|
1599
1600
|
activeCardIndex: w,
|
|
1600
1601
|
beats: t,
|
|
1601
|
-
cardWidth:
|
|
1602
|
+
cardWidth: y,
|
|
1602
1603
|
heightOverrides: n,
|
|
1603
1604
|
onCardClick: r,
|
|
1604
1605
|
posthog: a,
|
|
@@ -1609,8 +1610,8 @@ const U = u.createContext(null), ot = ({
|
|
|
1609
1610
|
)
|
|
1610
1611
|
}
|
|
1611
1612
|
),
|
|
1612
|
-
|
|
1613
|
-
|
|
1613
|
+
c && /* @__PURE__ */ e(
|
|
1614
|
+
ft,
|
|
1614
1615
|
{
|
|
1615
1616
|
currentBeatIndex: w + E - 1,
|
|
1616
1617
|
numBeats: t.length + 1,
|
|
@@ -1625,7 +1626,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1625
1626
|
]
|
|
1626
1627
|
}
|
|
1627
1628
|
);
|
|
1628
|
-
},
|
|
1629
|
+
}, Rt = P(mt), gt = ({
|
|
1629
1630
|
analyticsMetadata: i,
|
|
1630
1631
|
onCardClick: o,
|
|
1631
1632
|
posthog: t,
|
|
@@ -1649,8 +1650,8 @@ const U = u.createContext(null), ot = ({
|
|
|
1649
1650
|
/* @__PURE__ */ e(
|
|
1650
1651
|
Le,
|
|
1651
1652
|
{
|
|
1652
|
-
sx: (
|
|
1653
|
-
color:
|
|
1653
|
+
sx: (c) => ({
|
|
1654
|
+
color: c.palette.primary.main,
|
|
1654
1655
|
fontSize: 18,
|
|
1655
1656
|
fontWeight: 700,
|
|
1656
1657
|
lineHeight: "24px"
|
|
@@ -1665,8 +1666,8 @@ const U = u.createContext(null), ot = ({
|
|
|
1665
1666
|
endIcon: /* @__PURE__ */ e(Ce, { size: 20 }),
|
|
1666
1667
|
onClick: a,
|
|
1667
1668
|
size: "small",
|
|
1668
|
-
sx: (
|
|
1669
|
-
color:
|
|
1669
|
+
sx: (c) => ({
|
|
1670
|
+
color: c.palette.primary.main
|
|
1670
1671
|
}),
|
|
1671
1672
|
variant: "text",
|
|
1672
1673
|
children: n.view_all_insights_in_full_feed_cta_aria
|
|
@@ -1675,7 +1676,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1675
1676
|
]
|
|
1676
1677
|
}
|
|
1677
1678
|
) : /* @__PURE__ */ e(ke, {});
|
|
1678
|
-
},
|
|
1679
|
+
}, It = P(gt), yt = ({
|
|
1679
1680
|
heightOverrides: i,
|
|
1680
1681
|
widthOverrides: o,
|
|
1681
1682
|
children: t
|
|
@@ -1704,17 +1705,17 @@ const U = u.createContext(null), ot = ({
|
|
|
1704
1705
|
showIcon: n,
|
|
1705
1706
|
variant: r
|
|
1706
1707
|
}) => {
|
|
1707
|
-
const { cardsCopy: a } = V(), { onEvent:
|
|
1708
|
+
const { cardsCopy: a } = V(), { onEvent: c } = z(), { onPageview: h } = Me();
|
|
1708
1709
|
u.useEffect(() => {
|
|
1709
1710
|
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1710
1711
|
}, []);
|
|
1711
1712
|
const f = () => {
|
|
1712
|
-
t && t(),
|
|
1713
|
+
t && t(), c(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1713
1714
|
template: "no_relevant_insights"
|
|
1714
1715
|
});
|
|
1715
1716
|
};
|
|
1716
1717
|
return /* @__PURE__ */ e(
|
|
1717
|
-
|
|
1718
|
+
j,
|
|
1718
1719
|
{
|
|
1719
1720
|
actionText: a.micro_card_cta,
|
|
1720
1721
|
ariaLabel: i,
|
|
@@ -1734,7 +1735,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1734
1735
|
variant: r
|
|
1735
1736
|
}
|
|
1736
1737
|
);
|
|
1737
|
-
},
|
|
1738
|
+
}, Qt = P(Oe), Te = ({
|
|
1738
1739
|
ariaLabel: i,
|
|
1739
1740
|
heightOverrides: o,
|
|
1740
1741
|
onCardClick: t,
|
|
@@ -1742,25 +1743,25 @@ const U = u.createContext(null), ot = ({
|
|
|
1742
1743
|
showIcon: n,
|
|
1743
1744
|
variant: r
|
|
1744
1745
|
}) => {
|
|
1745
|
-
const { onPageview: a } = Me(), { zeroStateCopy:
|
|
1746
|
+
const { onPageview: a } = Me(), { zeroStateCopy: c } = V();
|
|
1746
1747
|
return u.useEffect(() => {
|
|
1747
1748
|
a(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1748
1749
|
}, []), /* @__PURE__ */ e(
|
|
1749
|
-
|
|
1750
|
+
j,
|
|
1750
1751
|
{
|
|
1751
1752
|
ariaLabel: i,
|
|
1752
|
-
description:
|
|
1753
|
+
description: c.carousel_zero_state_description,
|
|
1753
1754
|
heightOverrides: o,
|
|
1754
1755
|
icon: /* @__PURE__ */ e(Se, {}),
|
|
1755
1756
|
isZeroState: !0,
|
|
1756
1757
|
onCardClick: t,
|
|
1757
1758
|
posthog: l,
|
|
1758
1759
|
showIcon: n,
|
|
1759
|
-
title:
|
|
1760
|
+
title: c.carousel_zero_state_title,
|
|
1760
1761
|
variant: r
|
|
1761
1762
|
}
|
|
1762
1763
|
);
|
|
1763
|
-
},
|
|
1764
|
+
}, qt = P(Te), vt = () => /* @__PURE__ */ e(
|
|
1764
1765
|
Z,
|
|
1765
1766
|
{
|
|
1766
1767
|
sx: {
|
|
@@ -1770,9 +1771,9 @@ const U = u.createContext(null), ot = ({
|
|
|
1770
1771
|
justifyContent: "center",
|
|
1771
1772
|
width: "100%"
|
|
1772
1773
|
},
|
|
1773
|
-
children: /* @__PURE__ */ e(
|
|
1774
|
+
children: /* @__PURE__ */ e(Ue, {})
|
|
1774
1775
|
}
|
|
1775
|
-
), N = new
|
|
1776
|
+
), N = new ot(), St = ({
|
|
1776
1777
|
allowSingleCardPeeking: i,
|
|
1777
1778
|
areBeatsLoading: o,
|
|
1778
1779
|
beats: t = [],
|
|
@@ -1781,7 +1782,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1781
1782
|
endpoint: n = "/",
|
|
1782
1783
|
heightOverrides: r,
|
|
1783
1784
|
logOutUser: a,
|
|
1784
|
-
onCardClick:
|
|
1785
|
+
onCardClick: c = () => {
|
|
1785
1786
|
},
|
|
1786
1787
|
onEvent: h = () => {
|
|
1787
1788
|
},
|
|
@@ -1790,7 +1791,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1790
1791
|
posthog: p,
|
|
1791
1792
|
showBorder: d = !0,
|
|
1792
1793
|
showCarouselControls: E,
|
|
1793
|
-
showHeader:
|
|
1794
|
+
showHeader: s,
|
|
1794
1795
|
showIcon: C,
|
|
1795
1796
|
showWithMargin: _ = !0,
|
|
1796
1797
|
token: R = "",
|
|
@@ -1799,7 +1800,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1799
1800
|
visibleCardsCount: m = 1,
|
|
1800
1801
|
widthOverrides: T
|
|
1801
1802
|
}) => {
|
|
1802
|
-
const [
|
|
1803
|
+
const [y, M] = J("STANDARD"), [W, F] = J(!1), [K, $] = J(!1), X = Ke([h], N), Q = $e([f], N);
|
|
1803
1804
|
u.useEffect(() => {
|
|
1804
1805
|
!N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
|
|
1805
1806
|
}, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
|
|
@@ -1808,36 +1809,36 @@ const U = u.createContext(null), ot = ({
|
|
|
1808
1809
|
}, [window.innerHeight]), u.useEffect(() => {
|
|
1809
1810
|
F(!o && N.isInitialized);
|
|
1810
1811
|
}, [o, N.isInitialized]);
|
|
1811
|
-
const
|
|
1812
|
+
const q = {
|
|
1812
1813
|
showCTAColocatedWithText: l,
|
|
1813
1814
|
heightOverrides: r,
|
|
1814
|
-
onCardClick:
|
|
1815
|
+
onCardClick: c,
|
|
1815
1816
|
posthog: p,
|
|
1816
1817
|
showIcon: C,
|
|
1817
1818
|
showWithMargin: _,
|
|
1818
1819
|
widthOverrides: T
|
|
1819
1820
|
}, Y = {
|
|
1820
|
-
carouselSize:
|
|
1821
|
+
carouselSize: y,
|
|
1821
1822
|
variant: I,
|
|
1822
1823
|
showCTAColocatedWithText: l,
|
|
1823
1824
|
heightOverrides: r,
|
|
1824
|
-
onCardClick:
|
|
1825
|
+
onCardClick: c,
|
|
1825
1826
|
posthog: p,
|
|
1826
1827
|
showIcon: C
|
|
1827
1828
|
};
|
|
1828
|
-
return /* @__PURE__ */ e(
|
|
1829
|
+
return /* @__PURE__ */ e(lt, { onEvent: X, onPageview: Q, store: N, children: /* @__PURE__ */ g(yt, { heightOverrides: r, widthOverrides: T, children: [
|
|
1829
1830
|
!W && /* @__PURE__ */ e(vt, {}),
|
|
1830
|
-
W &&
|
|
1831
|
-
|
|
1831
|
+
W && s && /* @__PURE__ */ e(
|
|
1832
|
+
It,
|
|
1832
1833
|
{
|
|
1833
1834
|
analyticsMetadata: Ee,
|
|
1834
|
-
onCardClick:
|
|
1835
|
+
onCardClick: c,
|
|
1835
1836
|
posthog: p,
|
|
1836
1837
|
widthOverrides: T
|
|
1837
1838
|
}
|
|
1838
1839
|
),
|
|
1839
1840
|
W && !!t.length && /* @__PURE__ */ e(
|
|
1840
|
-
|
|
1841
|
+
Rt,
|
|
1841
1842
|
{
|
|
1842
1843
|
allowSingleCardPeeking: i,
|
|
1843
1844
|
analyticsMetadata: Ee,
|
|
@@ -1845,7 +1846,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1845
1846
|
showCarouselControls: E,
|
|
1846
1847
|
variant: d ? I : void 0,
|
|
1847
1848
|
visibleCardsCount: m,
|
|
1848
|
-
...
|
|
1849
|
+
...q
|
|
1849
1850
|
}
|
|
1850
1851
|
),
|
|
1851
1852
|
W && !t.length && /* @__PURE__ */ e(
|
|
@@ -1860,7 +1861,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1860
1861
|
k,
|
|
1861
1862
|
{
|
|
1862
1863
|
sx: {
|
|
1863
|
-
height: `calc(${
|
|
1864
|
+
height: `calc(${ut[y]}px - 44px)`,
|
|
1864
1865
|
width: _ ? `calc(${T}px - 32px)` : "100%"
|
|
1865
1866
|
},
|
|
1866
1867
|
children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
|
|
@@ -1869,7 +1870,7 @@ const U = u.createContext(null), ot = ({
|
|
|
1869
1870
|
}
|
|
1870
1871
|
)
|
|
1871
1872
|
] }) });
|
|
1872
|
-
},
|
|
1873
|
+
}, Jt = P(St), Mt = ({
|
|
1873
1874
|
isActiveCard: i,
|
|
1874
1875
|
ariaLabel: o,
|
|
1875
1876
|
heightOverrides: t,
|
|
@@ -1877,53 +1878,53 @@ const U = u.createContext(null), ot = ({
|
|
|
1877
1878
|
posthog: n,
|
|
1878
1879
|
showIcon: r,
|
|
1879
1880
|
variant: a,
|
|
1880
|
-
widthOverrides:
|
|
1881
|
+
widthOverrides: c
|
|
1881
1882
|
}) => {
|
|
1882
|
-
const h =
|
|
1883
|
+
const h = te(), { ref: f, inView: p } = me({
|
|
1883
1884
|
threshold: Ae
|
|
1884
1885
|
}), { cardsCopy: d } = V(), { onEvent: E } = z();
|
|
1885
|
-
|
|
1886
|
-
p && (E(
|
|
1886
|
+
ee(() => {
|
|
1887
|
+
p && (E(ve.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
|
|
1887
1888
|
template: "view_more_card"
|
|
1888
1889
|
}));
|
|
1889
1890
|
}, [p]);
|
|
1890
|
-
const
|
|
1891
|
+
const s = () => {
|
|
1891
1892
|
l && l(), E(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
|
|
1892
1893
|
template: "view_more_card"
|
|
1893
1894
|
});
|
|
1894
1895
|
};
|
|
1895
1896
|
return /* @__PURE__ */ e(
|
|
1896
|
-
|
|
1897
|
+
j,
|
|
1897
1898
|
{
|
|
1898
1899
|
actionText: d.micro_card_cta,
|
|
1899
1900
|
ariaLabel: o,
|
|
1900
1901
|
description: d.view_more_card_description,
|
|
1901
1902
|
heightOverrides: t,
|
|
1902
|
-
icon: /* @__PURE__ */ e(
|
|
1903
|
+
icon: /* @__PURE__ */ e(at, { color: h.palette.primary.main }),
|
|
1903
1904
|
isActiveCard: i,
|
|
1904
|
-
onCardClick:
|
|
1905
|
+
onCardClick: s,
|
|
1905
1906
|
posthog: n,
|
|
1906
1907
|
ref: f,
|
|
1907
1908
|
showIcon: r,
|
|
1908
1909
|
title: d.view_more_card_title,
|
|
1909
1910
|
variant: a,
|
|
1910
|
-
widthOverrides:
|
|
1911
|
+
widthOverrides: c
|
|
1911
1912
|
}
|
|
1912
1913
|
);
|
|
1913
|
-
},
|
|
1914
|
+
}, At = P(Mt);
|
|
1914
1915
|
export {
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1916
|
+
ot as A,
|
|
1917
|
+
j as B,
|
|
1918
|
+
It as C,
|
|
1919
|
+
lt as I,
|
|
1920
|
+
Rt as M,
|
|
1921
|
+
Qt as N,
|
|
1921
1922
|
Ee as T,
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1923
|
+
At as V,
|
|
1924
|
+
qt as Z,
|
|
1925
|
+
_t as a,
|
|
1926
|
+
Jt as b,
|
|
1927
|
+
at as c,
|
|
1928
|
+
dt as d,
|
|
1928
1929
|
Se as e
|
|
1929
1930
|
};
|