@mx-cartographer/experiences 7.0.0-alpha.mega1 → 7.0.0
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 +17 -0
- package/dist/{Account-DY6nxO7y.mjs → Account-BFol-JYA.mjs} +1 -1
- package/dist/{AccountDetailsContent-DvPs81kL.mjs → AccountDetailsContent-Do3z1FnQ.mjs} +8 -8
- package/dist/{AccountDetailsHeader-W2U7ZVm_.mjs → AccountDetailsHeader-DnEyQMpX.mjs} +12 -12
- package/dist/{AccountFields-DAVcbZy5.mjs → AccountFields-CeHZrIQe.mjs} +2 -2
- package/dist/{AccountListItem-DFlbdcmT.mjs → AccountListItem-C7JzYpqf.mjs} +3 -3
- package/dist/{AccountStore-CU7qV3vg.mjs → AccountStore-Cu3GoLh-.mjs} +1 -1
- package/dist/{Accounts-BLlrQA5m.mjs → Accounts-BuYXUMhP.mjs} +1 -1
- package/dist/{BudgetUtil-Ci1TN0J5.mjs → BudgetUtil-spowPvBM.mjs} +2 -2
- package/dist/{Category-5S6uwuXz.mjs → Category-CevNQ03n.mjs} +4 -4
- package/dist/{CategorySelectorDrawer-rHyHHYuh.mjs → CategorySelectorDrawer-Dyzb3UDU.mjs} +1 -1
- package/dist/{CategoryStore-B5EW6I1d.mjs → CategoryStore-BOyzQjQp.mjs} +2 -2
- package/dist/{CategoryUtil-DRyruNgi.mjs → CategoryUtil-BR3H5i6n.mjs} +1 -1
- package/dist/{ConnectDrawer-D9cR5phc.mjs → ConnectDrawer-WfKHsHSF.mjs} +1 -1
- package/dist/{ConnectionsDrawer-BzGqljSp.mjs → ConnectionsDrawer-Czp-E0-m.mjs} +2 -2
- package/dist/{CurrencyInput-D74cemI2.mjs → CurrencyInput-CSZjO22Z.mjs} +1 -1
- package/dist/{DebtsStore-S0l9kr0r.mjs → DebtsStore-D9holN8L.mjs} +1 -1
- package/dist/ExportCsvAction-dpvaZxbS.mjs +24 -0
- package/dist/{GoalStore-DioeeL-s.mjs → GoalStore-Drf76ell.mjs} +4 -4
- package/dist/{Help-DpYRO8oA.mjs → Help-DRUwVDvo.mjs} +1 -1
- package/dist/{LineChart-CcyX38kK.mjs → LineChart-CYiUS-px.mjs} +88 -85
- package/dist/{ListItemAction-BabpYivr.mjs → ListItemAction-BzmbPuNp.mjs} +1 -1
- package/dist/{ManageIncome-ndMuhJMG.mjs → ManageIncome-B6kmMN_z.mjs} +178 -186
- package/dist/{MicroWidgetContainer-CsvHLYKX.mjs → MicroWidgetContainer-DmYiksbT.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BoOp-A05.mjs → MiniWidgetContainer-DqKQNubH.mjs} +1 -1
- package/dist/{NetWorthStore-PD-RUe09.mjs → NetWorthStore-BK1_NbXW.mjs} +2 -2
- package/dist/{Notification-AMGWM1Al.mjs → Notification-ByMBpJ5u.mjs} +33 -22
- package/dist/{NotificationSettings-VhHuMAFU.mjs → NotificationSettings-BznqGVQ2.mjs} +35 -34
- package/dist/{OriginalBalanceAction-D39mx6uE.mjs → OriginalBalanceAction-CSu5brQE.mjs} +3 -3
- package/dist/RecurringSettings-Be1dzkMz.mjs +57 -0
- package/dist/ResponsiveButton-DZFp78fJ.mjs +45 -0
- package/dist/{SettingsStore-CE7jDVFL.mjs → SettingsStore-B4gi6oOw.mjs} +1 -1
- package/dist/{SpendingData-BkrxzHdr.mjs → SpendingData-D5vsfYKo.mjs} +5 -5
- package/dist/{Transaction-CA0FW2Ij.mjs → Transaction-CyqrHmAA.mjs} +1 -1
- package/dist/{TransactionDetails-WBHFmbxL.mjs → TransactionDetails-D4B9DSWo.mjs} +421 -417
- package/dist/{TransactionStore-CeLdmVnC.mjs → TransactionStore-DSyXtPek.mjs} +8 -8
- package/dist/TrendsStore-DR8etTL2.mjs +547 -0
- package/dist/{ViewMoreMicroCard-CAPFNz-J.mjs → ViewMoreMicroCard-BZI5VMNW.mjs} +476 -468
- package/dist/{WidgetContainer-DWCusxYI.mjs → WidgetContainer-BG-fdDOf.mjs} +110 -104
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +1 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/components/listitems/ToggleButtonListItem.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +16 -10
- package/dist/common/index.es.js +432 -469
- package/dist/dashboard/index.es.js +13 -13
- package/dist/debts/index.es.js +66 -66
- package/dist/{exportTransactionsToCSV-CmwsKl2D.mjs → exportTransactionsToCSV-BlVifaOG.mjs} +2 -2
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +32 -32
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-30y_BLwc.mjs → hooks-02T565vf.mjs} +10 -10
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +1 -0
- package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +1 -0
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +9 -9
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +25 -25
- package/dist/spending/index.es.js +13 -13
- package/dist/transactions/components/shared/TransactionList.d.ts +2 -0
- package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +5 -1
- package/dist/transactions/index.d.ts +1 -0
- package/dist/transactions/index.es.js +143 -141
- package/dist/trends/constants/TrendsWidget.d.ts +3 -0
- package/dist/trends/index.es.js +576 -635
- package/package.json +1 -1
- package/dist/RecurringSettings-D_HnMYZP.mjs +0 -57
- package/dist/TrendsStore-BHJUapXF.mjs +0 -487
- package/dist/index.d.ts +0 -0
- package/dist/trends/components/TransactionsList.d.ts +0 -7
@@ -1,30 +1,33 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
2
|
-
import
|
3
|
-
import { observer as
|
4
|
-
import
|
5
|
-
import { useTheme as
|
6
|
-
import
|
7
|
-
import
|
1
|
+
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
2
|
+
import u, { useState as ae, useEffect as ee } from "react";
|
3
|
+
import { observer as Z } from "mobx-react-lite";
|
4
|
+
import be from "@mui/material/CssBaseline";
|
5
|
+
import { useTheme as ve, ThemeProvider as Ue } from "@mui/material/styles";
|
6
|
+
import ze from "@mui/material/Link";
|
7
|
+
import K from "@mui/material/Stack";
|
8
8
|
import Ee from "@mui/material/Typography";
|
9
|
-
import { ChevronLeft as
|
10
|
-
import { L as
|
11
|
-
import
|
9
|
+
import { ChevronLeft as Ke, ChevronRight as Se } from "@mxenabled/mx-icons";
|
10
|
+
import { L as $e } from "./Loader-Dp1P2gNw.mjs";
|
11
|
+
import U from "@mui/material/Box";
|
12
12
|
import ue from "@mui/material/IconButton";
|
13
|
-
import { useInView as
|
14
|
-
import { P as
|
15
|
-
import
|
16
|
-
import {
|
17
|
-
import { css as
|
18
|
-
import { b as
|
19
|
-
import
|
20
|
-
import { makeAutoObservable as ce, runInAction as
|
21
|
-
import { G as pe, a as
|
13
|
+
import { useInView as Me } from "react-intersection-observer";
|
14
|
+
import { P as Ye, CategoryIcon as je, useTokens as Ae, MerchantLogo as Xe, Icon as J } from "@mxenabled/mxui";
|
15
|
+
import Oe from "@mui/material/styles/useTheme";
|
16
|
+
import { b as Qe } from "./Category-CevNQ03n.mjs";
|
17
|
+
import { css as qe } from "@mxenabled/cssinjs";
|
18
|
+
import { b as Je } from "./Localization-2MODESHW.mjs";
|
19
|
+
import et from "@mui/material/CircularProgress";
|
20
|
+
import { makeAutoObservable as ce, runInAction as Te } from "mobx";
|
21
|
+
import { G as pe, a as tt, u as it, b as ot } from "./useCombineEvents-DaDBSR_1.mjs";
|
22
22
|
import { B as _e } from "./BeatApi-DLu87ijw.mjs";
|
23
|
-
import
|
24
|
-
import
|
25
|
-
import
|
26
|
-
import
|
27
|
-
|
23
|
+
import rt from "@mui/material/Card";
|
24
|
+
import lt from "@mui/material/CardActions";
|
25
|
+
import nt from "@mui/material/CardContent";
|
26
|
+
import at from "@mui/material/CardHeader";
|
27
|
+
const Ce = {
|
28
|
+
featureVersion: "spendVsIncomeTrends"
|
29
|
+
};
|
30
|
+
class ct {
|
28
31
|
copyApi = new pe("/", "");
|
29
32
|
copyObject = {};
|
30
33
|
namespace = "experiences";
|
@@ -37,7 +40,7 @@ class nt {
|
|
37
40
|
};
|
38
41
|
loadCopy = async () => {
|
39
42
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
40
|
-
|
43
|
+
Te(() => {
|
41
44
|
this.copyObject = o[this.translationKey];
|
42
45
|
});
|
43
46
|
};
|
@@ -68,59 +71,59 @@ const de = {
|
|
68
71
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
69
72
|
MonthlySpendComparison: "MonthlySpendComparison",
|
70
73
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
71
|
-
},
|
74
|
+
}, S = window?.app?.clientConfig?.microwidget_instance_id || "", fe = {
|
72
75
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
73
|
-
},
|
76
|
+
}, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`, se = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), dt = () => Object.values(de).reduce(
|
74
77
|
(i, o) => ({
|
75
78
|
...i,
|
76
|
-
[
|
77
|
-
action:
|
78
|
-
category:
|
79
|
+
[We(o)]: {
|
80
|
+
action: D.MICRO_BEAT_CLICKED,
|
81
|
+
category: x.BEAT_INTERACTION,
|
79
82
|
label: se(o),
|
80
|
-
value:
|
83
|
+
value: S
|
81
84
|
}
|
82
85
|
}),
|
83
86
|
{}
|
84
|
-
),
|
87
|
+
), st = () => Object.values(de).reduce(
|
85
88
|
(i, o) => ({
|
86
89
|
...i,
|
87
|
-
[
|
88
|
-
action:
|
89
|
-
category:
|
90
|
+
[we(o)]: {
|
91
|
+
action: D.MICRO_BEAT_DISPLAYED,
|
92
|
+
category: x.BEAT_INTERACTION,
|
90
93
|
label: se(o),
|
91
|
-
value:
|
94
|
+
value: S
|
92
95
|
}
|
93
96
|
}),
|
94
97
|
{}
|
95
|
-
),
|
98
|
+
), ht = () => Object.values(de).reduce(
|
96
99
|
(i, o) => ({
|
97
100
|
...i,
|
98
|
-
[
|
99
|
-
action:
|
100
|
-
category:
|
101
|
+
[xe(o)]: {
|
102
|
+
action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
103
|
+
category: x.BEAT_INTERACTION,
|
101
104
|
label: se(o),
|
102
|
-
value:
|
105
|
+
value: S
|
103
106
|
}
|
104
107
|
}),
|
105
108
|
{}
|
106
|
-
),
|
109
|
+
), w = {
|
107
110
|
CARD: "Card",
|
108
111
|
CAROUSEL_CONTROL: "Carousel Control",
|
109
112
|
MICRO_WIDGET: "Micro Widget",
|
110
113
|
VIEW_MORE: "View More"
|
111
|
-
},
|
114
|
+
}, x = {
|
112
115
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
113
116
|
BEAT_INTERACTION: "Beat Interaction"
|
114
|
-
},
|
117
|
+
}, M = {
|
115
118
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
116
119
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
117
120
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
118
121
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
119
122
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
120
123
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
121
|
-
},
|
124
|
+
}, De = {
|
122
125
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
123
|
-
},
|
126
|
+
}, D = {
|
124
127
|
CONTROL_BACKWARD: "Control Backward",
|
125
128
|
CONTROL_FORWARD: "Control Forward",
|
126
129
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
@@ -128,92 +131,92 @@ const de = {
|
|
128
131
|
MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
|
129
132
|
SWIPE_BACKWARD: "Swipe Backward",
|
130
133
|
SWIPE_FORWARD: "Swipe Forward"
|
131
|
-
},
|
134
|
+
}, V = {
|
132
135
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
133
136
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
134
137
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
135
|
-
},
|
136
|
-
[
|
137
|
-
label:
|
138
|
-
name:
|
139
|
-
path:
|
140
|
-
value:
|
138
|
+
}, me = {
|
139
|
+
[V.MICRO_WIDGET_CAROUSEL]: {
|
140
|
+
label: w.MICRO_WIDGET,
|
141
|
+
name: V.MICRO_WIDGET_CAROUSEL,
|
142
|
+
path: fe.INSIGHTS_MICRO_WIDGET,
|
143
|
+
value: S
|
141
144
|
},
|
142
145
|
// zero state
|
143
|
-
[
|
144
|
-
label:
|
145
|
-
name:
|
146
|
-
path:
|
147
|
-
value:
|
146
|
+
[V.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
147
|
+
label: w.MICRO_WIDGET,
|
148
|
+
name: V.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
149
|
+
path: fe.INSIGHTS_MICRO_WIDGET,
|
150
|
+
value: S
|
148
151
|
},
|
149
152
|
// no relevant cards
|
150
|
-
[
|
151
|
-
label:
|
152
|
-
name:
|
153
|
+
[V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
154
|
+
label: w.MICRO_WIDGET,
|
155
|
+
name: V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
153
156
|
path: "/micro-widget",
|
154
|
-
value:
|
157
|
+
value: S
|
155
158
|
}
|
156
|
-
},
|
159
|
+
}, Re = {
|
157
160
|
// carousel control interaction events - clicks and swipes
|
158
|
-
[
|
159
|
-
action:
|
160
|
-
category:
|
161
|
-
label:
|
162
|
-
value:
|
161
|
+
[M.ON_CAROUSEL_BACK_CLICK]: {
|
162
|
+
action: D.CONTROL_BACKWARD,
|
163
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
164
|
+
label: w.CAROUSEL_CONTROL,
|
165
|
+
value: S
|
163
166
|
},
|
164
|
-
[
|
165
|
-
action:
|
166
|
-
category:
|
167
|
-
label:
|
168
|
-
value:
|
167
|
+
[M.ON_CAROUSEL_FORWARD_CLICK]: {
|
168
|
+
action: D.CONTROL_FORWARD,
|
169
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
170
|
+
label: w.CAROUSEL_CONTROL,
|
171
|
+
value: S
|
169
172
|
},
|
170
|
-
[
|
171
|
-
action:
|
172
|
-
category:
|
173
|
-
label:
|
174
|
-
value:
|
173
|
+
[M.ON_CAROUSEL_BACK_SWIPE]: {
|
174
|
+
action: D.SWIPE_BACKWARD,
|
175
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
176
|
+
label: w.CAROUSEL_CONTROL,
|
177
|
+
value: S
|
175
178
|
},
|
176
|
-
[
|
177
|
-
action:
|
178
|
-
category:
|
179
|
-
label:
|
180
|
-
value:
|
179
|
+
[M.ON_CAROUSEL_FORWARD_SWIPE]: {
|
180
|
+
action: D.SWIPE_FORWARD,
|
181
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
182
|
+
label: w.CAROUSEL_CONTROL,
|
183
|
+
value: S
|
181
184
|
},
|
182
185
|
// read more card events
|
183
|
-
[
|
184
|
-
action:
|
185
|
-
category:
|
186
|
-
label:
|
187
|
-
value:
|
186
|
+
[M.ON_VIEW_MORE_CLICKED]: {
|
187
|
+
action: D.MICRO_BEAT_CLICKED,
|
188
|
+
category: x.BEAT_INTERACTION,
|
189
|
+
label: w.VIEW_MORE,
|
190
|
+
value: S
|
188
191
|
},
|
189
|
-
[
|
190
|
-
action:
|
191
|
-
category:
|
192
|
-
label:
|
193
|
-
value:
|
192
|
+
[De.ON_VIEW_MORE_VIEWED]: {
|
193
|
+
action: D.MICRO_BEAT_DISPLAYED,
|
194
|
+
category: x.BEAT_INTERACTION,
|
195
|
+
label: w.VIEW_MORE,
|
196
|
+
value: S
|
194
197
|
},
|
195
|
-
...
|
196
|
-
...
|
197
|
-
...
|
198
|
-
},
|
198
|
+
...dt(),
|
199
|
+
...st(),
|
200
|
+
...ht()
|
201
|
+
}, ge = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
|
199
202
|
throw t;
|
200
|
-
}),
|
203
|
+
}), Ie = async (i, o) => !o || !me[i] ? null : o.sendAnalyticsPageview(me[i]).then((t) => t).catch((t) => {
|
201
204
|
throw t;
|
202
205
|
});
|
203
|
-
class
|
204
|
-
onAnalyticEvent =
|
205
|
-
onAnalyticPageView =
|
206
|
+
class Et {
|
207
|
+
onAnalyticEvent = ge;
|
208
|
+
onAnalyticPageView = Ie;
|
206
209
|
beatApi = new _e("/", "");
|
207
210
|
constructor() {
|
208
211
|
ce(this);
|
209
212
|
}
|
210
213
|
initialize = async (o, t, r) => {
|
211
214
|
this.onAnalyticEvent = (l, n) => {
|
212
|
-
|
215
|
+
ge(l, n).then((a) => a).catch((a) => {
|
213
216
|
throw a.status === 401 && r(), a;
|
214
217
|
});
|
215
218
|
}, this.onAnalyticPageView = (l, n) => {
|
216
|
-
|
219
|
+
Ie(l, n).then((a) => a).catch((a) => {
|
217
220
|
throw a.status === 401 && r(), a;
|
218
221
|
});
|
219
222
|
}, this.beatApi = new _e(o, t);
|
@@ -225,7 +228,7 @@ class st {
|
|
225
228
|
this.beatApi.updateOffer(o);
|
226
229
|
};
|
227
230
|
}
|
228
|
-
class
|
231
|
+
class ut {
|
229
232
|
copyStore;
|
230
233
|
endpoint = "/";
|
231
234
|
insightsMicroWidgetStore;
|
@@ -233,22 +236,22 @@ class ht {
|
|
233
236
|
token = "";
|
234
237
|
isInitialized = !1;
|
235
238
|
constructor() {
|
236
|
-
this.copyStore = new
|
239
|
+
this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), ce(this);
|
237
240
|
}
|
238
241
|
initialize = async (o, t, r) => {
|
239
242
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
|
240
|
-
const l = await
|
241
|
-
|
243
|
+
const l = await tt(o, t, "1.0.0", "Micro Insights Carousel");
|
244
|
+
Te(() => {
|
242
245
|
this.session = l, this.isInitialized = !0;
|
243
246
|
});
|
244
247
|
};
|
245
248
|
}
|
246
|
-
const
|
249
|
+
const $ = u.createContext(null), pt = ({
|
247
250
|
onEvent: i,
|
248
251
|
onPageview: o,
|
249
252
|
store: t,
|
250
253
|
children: r
|
251
|
-
}) => /* @__PURE__ */ e(
|
254
|
+
}) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), te = u.forwardRef(
|
252
255
|
function({
|
253
256
|
actionText: o,
|
254
257
|
ariaLabel: t,
|
@@ -256,30 +259,30 @@ const z = E.createContext(null), Et = ({
|
|
256
259
|
description: l,
|
257
260
|
heightOverrides: n,
|
258
261
|
icon: a,
|
259
|
-
isActiveCard:
|
260
|
-
isZeroState:
|
261
|
-
onCardClick:
|
262
|
+
isActiveCard: s,
|
263
|
+
isZeroState: p,
|
264
|
+
onCardClick: _ = () => {
|
262
265
|
},
|
263
266
|
showIcon: C,
|
264
267
|
style: f = {},
|
265
|
-
fontColors:
|
266
|
-
title:
|
268
|
+
fontColors: h = {},
|
269
|
+
title: m,
|
267
270
|
variant: c,
|
268
|
-
widthOverrides:
|
269
|
-
},
|
270
|
-
const [
|
271
|
-
|
271
|
+
widthOverrides: E
|
272
|
+
}, R) {
|
273
|
+
const [y, O] = u.useState(!1), { cardStyle: T, linkTextStyle: v } = f, k = c ? T : { border: "none", boxShadow: "none", ...T }, P = /* @__PURE__ */ e(
|
274
|
+
Ye,
|
272
275
|
{
|
273
276
|
className: "mx-micro-card-description",
|
274
|
-
color:
|
277
|
+
color: h.textColor ? "undefined" : "text.primary",
|
275
278
|
sx: {
|
276
279
|
display: "-webkit-box",
|
277
280
|
fontSize: 13,
|
278
281
|
letterSpacing: 0.48,
|
279
282
|
lineHeight: "20px",
|
280
283
|
overflow: "hidden",
|
281
|
-
pl:
|
282
|
-
pr:
|
284
|
+
pl: p ? 0 : 28,
|
285
|
+
pr: p ? 0 : 8,
|
283
286
|
WebkitBoxOrient: "vertical",
|
284
287
|
WebkitLineClamp: 2,
|
285
288
|
wordWrap: "break-word"
|
@@ -288,37 +291,37 @@ const z = E.createContext(null), Et = ({
|
|
288
291
|
}
|
289
292
|
);
|
290
293
|
return /* @__PURE__ */ e(
|
291
|
-
|
294
|
+
U,
|
292
295
|
{
|
293
|
-
"aria-hidden": !
|
296
|
+
"aria-hidden": !s,
|
294
297
|
"aria-label": t,
|
295
298
|
"aria-labelledby": "divButton",
|
296
299
|
"aria-roledescription": "slide",
|
297
|
-
ref:
|
300
|
+
ref: R,
|
298
301
|
role: "group",
|
299
302
|
sx: {
|
300
303
|
height: "100%",
|
301
|
-
minWidth:
|
304
|
+
minWidth: E ? `${E}px` : "100%"
|
302
305
|
},
|
303
306
|
children: /* @__PURE__ */ e(
|
304
|
-
|
307
|
+
U,
|
305
308
|
{
|
306
|
-
"aria-hidden": !
|
309
|
+
"aria-hidden": !s,
|
307
310
|
"aria-label": t,
|
308
311
|
id: "divButton",
|
309
|
-
onClick: () =>
|
310
|
-
onKeyDown: () =>
|
311
|
-
onKeyUp: () =>
|
312
|
-
ref:
|
312
|
+
onClick: () => _(),
|
313
|
+
onKeyDown: () => O(!1),
|
314
|
+
onKeyUp: () => O(!0),
|
315
|
+
ref: R,
|
313
316
|
role: "button",
|
314
317
|
sx: {
|
315
|
-
border:
|
318
|
+
border: y ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
316
319
|
borderRadius: "8px",
|
317
320
|
height: "100%"
|
318
321
|
},
|
319
|
-
tabIndex:
|
322
|
+
tabIndex: s ? 0 : -1,
|
320
323
|
children: /* @__PURE__ */ e(
|
321
|
-
|
324
|
+
rt,
|
322
325
|
{
|
323
326
|
"aria-roledescription": "slide",
|
324
327
|
className: "mx-micro-card",
|
@@ -328,15 +331,15 @@ const z = E.createContext(null), Et = ({
|
|
328
331
|
cursor: "pointer",
|
329
332
|
height: n ? "100%" : 124,
|
330
333
|
p: 16,
|
331
|
-
...
|
334
|
+
...k,
|
332
335
|
"& .MuiCardHeader-avatar": {
|
333
|
-
color:
|
336
|
+
color: h.iconColor,
|
334
337
|
mr: "8px"
|
335
338
|
}
|
336
339
|
},
|
337
340
|
variant: c,
|
338
|
-
children: /* @__PURE__ */
|
339
|
-
|
341
|
+
children: /* @__PURE__ */ g(
|
342
|
+
K,
|
340
343
|
{
|
341
344
|
sx: {
|
342
345
|
alignItems: "space-between",
|
@@ -344,33 +347,33 @@ const z = E.createContext(null), Et = ({
|
|
344
347
|
},
|
345
348
|
children: [
|
346
349
|
/* @__PURE__ */ e(
|
347
|
-
|
350
|
+
at,
|
348
351
|
{
|
349
352
|
avatar: C && a,
|
350
|
-
subheader:
|
351
|
-
sx: { color:
|
352
|
-
title:
|
353
|
+
subheader: p && P,
|
354
|
+
sx: { color: h.headerColor, p: 0 },
|
355
|
+
title: m,
|
353
356
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
354
357
|
}
|
355
358
|
),
|
356
|
-
/* @__PURE__ */ e(
|
359
|
+
/* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && P }),
|
357
360
|
!!o && /* @__PURE__ */ e(
|
358
|
-
|
361
|
+
lt,
|
359
362
|
{
|
360
363
|
sx: {
|
361
364
|
mt: "auto",
|
362
365
|
p: 0
|
363
366
|
},
|
364
367
|
children: /* @__PURE__ */ e(
|
365
|
-
|
368
|
+
U,
|
366
369
|
{
|
367
|
-
sx: (
|
368
|
-
color:
|
370
|
+
sx: (I) => ({
|
371
|
+
color: h.buttonColor ? h.buttonColor : I.palette.primary.main,
|
369
372
|
// TODO: Per Cameron the theme package in @mxenabled/mxui will be getting a big update and this will be theme.palette.primary_main
|
370
373
|
fontSize: 14,
|
371
374
|
fontWeight: "bold",
|
372
375
|
px: 28,
|
373
|
-
...
|
376
|
+
...v
|
374
377
|
}),
|
375
378
|
children: o
|
376
379
|
}
|
@@ -387,15 +390,15 @@ const z = E.createContext(null), Et = ({
|
|
387
390
|
}
|
388
391
|
);
|
389
392
|
}
|
390
|
-
),
|
391
|
-
const [o, t] = ae(
|
392
|
-
return
|
393
|
+
), _t = ({ beat: i }) => {
|
394
|
+
const [o, t] = ae(Qe.UNCATEGORIZED);
|
395
|
+
return ee(() => {
|
393
396
|
i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
|
394
|
-
}, []), /* @__PURE__ */ e(
|
395
|
-
},
|
396
|
-
const o =
|
397
|
+
}, []), /* @__PURE__ */ e(je, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
|
398
|
+
}, Ct = ({ beat: i }) => {
|
399
|
+
const o = Ae(), t = ft(o);
|
397
400
|
return /* @__PURE__ */ e(
|
398
|
-
|
401
|
+
Xe,
|
399
402
|
{
|
400
403
|
categoryGuid: i.primary_category_guid || i.category_guids && i.category_guids[0] || "",
|
401
404
|
className: t,
|
@@ -403,12 +406,12 @@ const z = E.createContext(null), Et = ({
|
|
403
406
|
size: 16
|
404
407
|
}
|
405
408
|
);
|
406
|
-
},
|
409
|
+
}, ft = (i) => qe({
|
407
410
|
marginTop: i.Spacing.XTiny,
|
408
411
|
"& .kyper-categoryicon": {
|
409
412
|
display: "flex"
|
410
413
|
}
|
411
|
-
}),
|
414
|
+
}), mt = Z(Ct), Rt = ({
|
412
415
|
color: i = "currentColor",
|
413
416
|
height: o,
|
414
417
|
size: t = 16,
|
@@ -434,18 +437,18 @@ const z = E.createContext(null), Et = ({
|
|
434
437
|
}
|
435
438
|
)
|
436
439
|
}
|
437
|
-
),
|
440
|
+
), gt = (i) => i ? i.data ? i.data.map((o) => {
|
438
441
|
const t = {};
|
439
442
|
return i.names?.map((r, l) => {
|
440
443
|
t[r] = o[l];
|
441
444
|
}), t;
|
442
|
-
}) : [] : [],
|
443
|
-
const t =
|
445
|
+
}) : [] : [], It = (i, o) => {
|
446
|
+
const t = gt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
|
444
447
|
return !l.length || !n.length ? o.Color.Primary300 : l[0].amount > n[0].amount ? o.Color.Error300 : l[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
|
445
|
-
},
|
446
|
-
const o =
|
447
|
-
return /* @__PURE__ */ e(
|
448
|
-
},
|
448
|
+
}, yt = ({ beat: i }) => {
|
449
|
+
const o = Ae(), t = It(i.data_series, o);
|
450
|
+
return /* @__PURE__ */ e(J, { name: "bar_chart", sx: { color: t } });
|
451
|
+
}, Le = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
449
452
|
/* @__PURE__ */ e(
|
450
453
|
"path",
|
451
454
|
{
|
@@ -689,7 +692,7 @@ const z = E.createContext(null), Et = ({
|
|
689
692
|
fillRule: "evenodd"
|
690
693
|
}
|
691
694
|
),
|
692
|
-
/* @__PURE__ */
|
695
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
|
693
696
|
/* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
|
694
697
|
"path",
|
695
698
|
{
|
@@ -945,10 +948,10 @@ const z = E.createContext(null), Et = ({
|
|
945
948
|
),
|
946
949
|
/* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
|
947
950
|
] }),
|
948
|
-
/* @__PURE__ */
|
951
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
|
949
952
|
/* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
|
950
953
|
/* @__PURE__ */ e("mask", { height: "30", id: "mask2_1565_98011", maskUnits: "userSpaceOnUse", width: "30", x: "0", y: "1", children: /* @__PURE__ */ e("circle", { cx: "15.0435", cy: "16.0445", fill: "#F8F9FB", r: "14.3951" }) }),
|
951
|
-
/* @__PURE__ */
|
954
|
+
/* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
|
952
955
|
/* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
|
953
956
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
|
954
957
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
|
@@ -1138,8 +1141,8 @@ const z = E.createContext(null), Et = ({
|
|
1138
1141
|
fill: "#CDD3DD"
|
1139
1142
|
}
|
1140
1143
|
),
|
1141
|
-
/* @__PURE__ */
|
1142
|
-
/* @__PURE__ */
|
1144
|
+
/* @__PURE__ */ g("defs", { children: [
|
1145
|
+
/* @__PURE__ */ g(
|
1143
1146
|
"filter",
|
1144
1147
|
{
|
1145
1148
|
colorInterpolationFilters: "sRGB",
|
@@ -1182,7 +1185,7 @@ const z = E.createContext(null), Et = ({
|
|
1182
1185
|
]
|
1183
1186
|
}
|
1184
1187
|
),
|
1185
|
-
/* @__PURE__ */
|
1188
|
+
/* @__PURE__ */ g(
|
1186
1189
|
"filter",
|
1187
1190
|
{
|
1188
1191
|
colorInterpolationFilters: "sRGB",
|
@@ -1226,10 +1229,10 @@ const z = E.createContext(null), Et = ({
|
|
1226
1229
|
}
|
1227
1230
|
)
|
1228
1231
|
] })
|
1229
|
-
] }),
|
1230
|
-
const l =
|
1231
|
-
return r === 0 ? /* @__PURE__ */ e(
|
1232
|
-
|
1232
|
+
] }), ye = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
|
1233
|
+
const l = Oe(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
|
1234
|
+
return r === 0 ? /* @__PURE__ */ e(J, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(J, { name: "campaign" }) : /* @__PURE__ */ e(
|
1235
|
+
J,
|
1233
1236
|
{
|
1234
1237
|
fill: !0,
|
1235
1238
|
name: "info",
|
@@ -1238,34 +1241,34 @@ const z = E.createContext(null), Et = ({
|
|
1238
1241
|
}
|
1239
1242
|
}
|
1240
1243
|
);
|
1241
|
-
},
|
1242
|
-
const i =
|
1244
|
+
}, H = () => {
|
1245
|
+
const i = u.useContext($);
|
1243
1246
|
if (!i)
|
1244
1247
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
1245
1248
|
return i.store.copyStore;
|
1246
|
-
},
|
1247
|
-
const i =
|
1249
|
+
}, vt = () => {
|
1250
|
+
const i = u.useContext($);
|
1248
1251
|
if (!i?.store?.insightsMicroWidgetStore)
|
1249
1252
|
throw new Error(
|
1250
1253
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
1251
1254
|
);
|
1252
1255
|
return i.store.insightsMicroWidgetStore;
|
1253
|
-
},
|
1254
|
-
const i =
|
1256
|
+
}, Y = () => {
|
1257
|
+
const i = u.useContext($);
|
1255
1258
|
if (!i)
|
1256
1259
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
1257
1260
|
return { onEvent: i.onEvent };
|
1258
|
-
},
|
1259
|
-
const i =
|
1261
|
+
}, Ne = () => {
|
1262
|
+
const i = u.useContext($);
|
1260
1263
|
if (!i)
|
1261
1264
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
1262
1265
|
return { onPageview: i.onPageview };
|
1263
|
-
},
|
1266
|
+
}, Ve = {
|
1264
1267
|
LARGE: 180,
|
1265
1268
|
STANDARD: 154,
|
1266
1269
|
XLARGE: 200,
|
1267
1270
|
XXLARGE: 248
|
1268
|
-
},
|
1271
|
+
}, St = 50, He = 1, Mt = ({
|
1269
1272
|
ariaLabel: i,
|
1270
1273
|
backgroundColor: o,
|
1271
1274
|
beat: t,
|
@@ -1273,66 +1276,66 @@ const z = E.createContext(null), Et = ({
|
|
1273
1276
|
showCTAColocatedWithText: l = !0,
|
1274
1277
|
heightOverrides: n,
|
1275
1278
|
index: a,
|
1276
|
-
isActiveCard:
|
1277
|
-
onCardClick:
|
1278
|
-
posthog:
|
1279
|
+
isActiveCard: s,
|
1280
|
+
onCardClick: p,
|
1281
|
+
posthog: _,
|
1279
1282
|
showIcon: C,
|
1280
1283
|
variant: f,
|
1281
|
-
widthOverrides:
|
1284
|
+
widthOverrides: h
|
1282
1285
|
}) => {
|
1283
|
-
const { ref:
|
1284
|
-
threshold:
|
1285
|
-
}), { cardsCopy:
|
1286
|
-
|
1287
|
-
c && (t.has_been_displayed ?
|
1286
|
+
const { ref: m, inView: c } = Me({
|
1287
|
+
threshold: He
|
1288
|
+
}), { cardsCopy: E } = H(), { onEvent: R } = Y(), { updateBeat: y, updateOffer: O } = vt();
|
1289
|
+
ee(() => {
|
1290
|
+
c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ? O({
|
1288
1291
|
...t,
|
1289
1292
|
has_been_displayed: !0
|
1290
|
-
}) :
|
1293
|
+
}) : y({
|
1291
1294
|
...t,
|
1292
1295
|
has_been_displayed: !0
|
1293
|
-
}),
|
1294
|
-
}, [c]),
|
1296
|
+
}), R(xe(t.template))));
|
1297
|
+
}, [c]), ee(() => {
|
1295
1298
|
if (c && t)
|
1296
1299
|
if (t.template === "MarketingOffer") {
|
1297
|
-
const
|
1298
|
-
|
1300
|
+
const v = t;
|
1301
|
+
_?.capture("viewed_messaging_insight", {
|
1299
1302
|
template: t.template,
|
1300
|
-
campaign_guid:
|
1301
|
-
campaign_name:
|
1303
|
+
campaign_guid: v.campaign_guid,
|
1304
|
+
campaign_name: v.pulse_campaign_name
|
1302
1305
|
});
|
1303
1306
|
} else
|
1304
|
-
|
1307
|
+
_?.capture("viewed_insight", {
|
1305
1308
|
beat_guid: t.guid,
|
1306
1309
|
template: t.template,
|
1307
1310
|
position: a
|
1308
1311
|
});
|
1309
1312
|
}, [t, a, c]);
|
1310
1313
|
const T = () => {
|
1311
|
-
if (
|
1312
|
-
const
|
1313
|
-
|
1314
|
+
if (p && p(t), R(We(t.template)), t.template === "MarketingOffer") {
|
1315
|
+
const v = t;
|
1316
|
+
_?.capture("clicked_messaging_insight", {
|
1314
1317
|
template: t.template,
|
1315
|
-
campaign_guid:
|
1316
|
-
campaign_name:
|
1318
|
+
campaign_guid: v.campaign_guid,
|
1319
|
+
campaign_name: v.pulse_campaign_name
|
1317
1320
|
});
|
1318
1321
|
} else
|
1319
|
-
|
1322
|
+
_?.capture("clicked_insight", {
|
1320
1323
|
beat_guid: t.guid,
|
1321
1324
|
template: t.template,
|
1322
1325
|
position: a
|
1323
1326
|
});
|
1324
1327
|
};
|
1325
1328
|
return /* @__PURE__ */ e(
|
1326
|
-
|
1329
|
+
te,
|
1327
1330
|
{
|
1328
|
-
actionText: t.micro_call_to_action ||
|
1331
|
+
actionText: t.micro_call_to_action || E.micro_card_cta,
|
1329
1332
|
ariaLabel: i,
|
1330
1333
|
backgroundColor: o,
|
1331
1334
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
1332
1335
|
fontColors: { buttonColor: r?.primary_300 },
|
1333
1336
|
heightOverrides: n,
|
1334
|
-
icon:
|
1335
|
-
|
1337
|
+
icon: ye && /* @__PURE__ */ e(
|
1338
|
+
ye,
|
1336
1339
|
{
|
1337
1340
|
beat: t,
|
1338
1341
|
clientColorScheme: r,
|
@@ -1340,18 +1343,18 @@ const z = E.createContext(null), Et = ({
|
|
1340
1343
|
type: t?.icon_type
|
1341
1344
|
}
|
1342
1345
|
),
|
1343
|
-
isActiveCard:
|
1346
|
+
isActiveCard: s,
|
1344
1347
|
onCardClick: T,
|
1345
|
-
posthog:
|
1346
|
-
ref:
|
1348
|
+
posthog: _,
|
1349
|
+
ref: m,
|
1347
1350
|
showCTAColocatedWithText: l,
|
1348
1351
|
showIcon: C,
|
1349
1352
|
title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
|
1350
1353
|
variant: f,
|
1351
|
-
widthOverrides:
|
1354
|
+
widthOverrides: h
|
1352
1355
|
}
|
1353
1356
|
);
|
1354
|
-
},
|
1357
|
+
}, At = ({
|
1355
1358
|
clientColorScheme: i,
|
1356
1359
|
currentBeatIndex: o,
|
1357
1360
|
numBeats: t,
|
@@ -1359,12 +1362,12 @@ const z = E.createContext(null), Et = ({
|
|
1359
1362
|
onPreviousClick: l,
|
1360
1363
|
scrollRightBoundary: n,
|
1361
1364
|
scrollX: a,
|
1362
|
-
shouldApplyNewAnimation:
|
1363
|
-
visibleCardsCount:
|
1365
|
+
shouldApplyNewAnimation: s = !1,
|
1366
|
+
visibleCardsCount: p = 1
|
1364
1367
|
}) => {
|
1365
|
-
const
|
1366
|
-
return /* @__PURE__ */
|
1367
|
-
|
1368
|
+
const _ = ve(), { carouselCopy: C } = H(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
|
1369
|
+
return /* @__PURE__ */ g(
|
1370
|
+
K,
|
1368
1371
|
{
|
1369
1372
|
direction: "row",
|
1370
1373
|
sx: {
|
@@ -1386,27 +1389,27 @@ const z = E.createContext(null), Et = ({
|
|
1386
1389
|
disabled: f,
|
1387
1390
|
onClick: l,
|
1388
1391
|
children: /* @__PURE__ */ e(
|
1389
|
-
|
1392
|
+
Ke,
|
1390
1393
|
{
|
1391
1394
|
style: {
|
1392
|
-
color: f ?
|
1395
|
+
color: f ? m : c
|
1393
1396
|
}
|
1394
1397
|
}
|
1395
1398
|
)
|
1396
1399
|
}
|
1397
1400
|
),
|
1398
|
-
Array.from({ length: t }).map((
|
1399
|
-
const
|
1401
|
+
Array.from({ length: t }).map((E, R) => {
|
1402
|
+
const y = R === o;
|
1400
1403
|
return /* @__PURE__ */ e(
|
1401
|
-
|
1404
|
+
U,
|
1402
1405
|
{
|
1403
1406
|
className: "mx-insights-micro-carousel-dots",
|
1404
1407
|
sx: {
|
1405
|
-
bgcolor:
|
1408
|
+
bgcolor: y ? c : m,
|
1406
1409
|
height: 8,
|
1407
1410
|
mr: 8,
|
1408
1411
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
1409
|
-
...
|
1412
|
+
...s ? {
|
1410
1413
|
borderRadius: "4px",
|
1411
1414
|
transformOrigin: "center",
|
1412
1415
|
transition: "all 0.5s ease-out",
|
@@ -1415,24 +1418,24 @@ const z = E.createContext(null), Et = ({
|
|
1415
1418
|
borderRadius: "50%",
|
1416
1419
|
p: 0
|
1417
1420
|
},
|
1418
|
-
width:
|
1421
|
+
width: y && s ? 24 : 8
|
1419
1422
|
}
|
1420
1423
|
},
|
1421
|
-
`carousel-button-${
|
1424
|
+
`carousel-button-${R}`
|
1422
1425
|
);
|
1423
1426
|
}),
|
1424
1427
|
/* @__PURE__ */ e(
|
1425
1428
|
ue,
|
1426
1429
|
{
|
1427
|
-
"aria-disabled":
|
1430
|
+
"aria-disabled": h,
|
1428
1431
|
"aria-label": C.next_insight_cta_aria,
|
1429
|
-
disabled:
|
1432
|
+
disabled: h,
|
1430
1433
|
onClick: r,
|
1431
1434
|
children: /* @__PURE__ */ e(
|
1432
|
-
|
1435
|
+
Se,
|
1433
1436
|
{
|
1434
1437
|
style: {
|
1435
|
-
color:
|
1438
|
+
color: h ? m : c
|
1436
1439
|
}
|
1437
1440
|
}
|
1438
1441
|
)
|
@@ -1441,118 +1444,119 @@ const z = E.createContext(null), Et = ({
|
|
1441
1444
|
]
|
1442
1445
|
}
|
1443
1446
|
);
|
1444
|
-
},
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1447
|
+
}, Ot = ({
|
1448
|
+
analyticsMetadata: i,
|
1449
|
+
allowSingleCardPeeking: o = !1,
|
1450
|
+
beats: t = [],
|
1451
|
+
clientColorScheme: r,
|
1452
|
+
showCTAColocatedWithText: l,
|
1453
|
+
heightOverrides: n,
|
1454
|
+
onCardClick: a,
|
1455
|
+
posthog: s,
|
1456
|
+
shouldApplyNewAnimation: p = !1,
|
1457
|
+
showCarouselControls: _,
|
1458
|
+
showIcon: C,
|
1459
|
+
showWithMargin: f = !0,
|
1460
|
+
variant: h,
|
1461
|
+
widthOverrides: m,
|
1462
|
+
visibleCardsCount: c = 1
|
1459
1463
|
// Default to 1 card visible
|
1460
1464
|
}) => {
|
1461
|
-
const
|
1462
|
-
|
1463
|
-
if (
|
1464
|
-
const
|
1465
|
-
let
|
1466
|
-
if (
|
1467
|
-
const
|
1468
|
-
|
1465
|
+
const E = u.useRef(null), R = u.useRef(null), [y, O] = u.useState(0), [T, v] = u.useState(null), [k, P] = u.useState(null), [I, z] = u.useState(null), [ie, G] = u.useState(p), { carouselCopy: F } = H(), { onEvent: b } = Y();
|
1466
|
+
u.useEffect(() => {
|
1467
|
+
if (E.current && !o) {
|
1468
|
+
const d = E.current.offsetWidth, A = 8;
|
1469
|
+
let N;
|
1470
|
+
if (c > 1) {
|
1471
|
+
const Q = (d - (c - 1) * A) / c / 3;
|
1472
|
+
N = (d - Q - (c - 1) * A) / c;
|
1469
1473
|
} else
|
1470
|
-
|
1471
|
-
|
1474
|
+
N = d;
|
1475
|
+
z(N);
|
1472
1476
|
}
|
1473
|
-
}, [
|
1474
|
-
const
|
1475
|
-
if (typeof
|
1476
|
-
const
|
1477
|
-
|
1478
|
-
const
|
1477
|
+
}, [c, E.current?.offsetWidth]), u.useEffect(() => {
|
1478
|
+
const d = R.current?.offsetWidth;
|
1479
|
+
if (typeof d == "number" && o) {
|
1480
|
+
const A = (B) => {
|
1481
|
+
G(!0);
|
1482
|
+
const q = [
|
1479
1483
|
{ maxWidth: 375, cardWidth: 268 },
|
1480
1484
|
{ maxWidth: 444, cardWidth: 300 },
|
1481
1485
|
{ maxWidth: 599, cardWidth: 350 },
|
1482
1486
|
{ maxWidth: 749, cardWidth: 450 },
|
1483
1487
|
{ maxWidth: 900, cardWidth: 600 }
|
1484
|
-
].find((ne) =>
|
1485
|
-
return
|
1488
|
+
].find((ne) => B <= ne.maxWidth);
|
1489
|
+
return q ? q.cardWidth : 750;
|
1486
1490
|
};
|
1487
|
-
|
1488
|
-
const
|
1489
|
-
const
|
1490
|
-
typeof
|
1491
|
+
z(A(d));
|
1492
|
+
const N = () => {
|
1493
|
+
const B = R.current?.offsetWidth;
|
1494
|
+
typeof B == "number" && z(A(B));
|
1491
1495
|
};
|
1492
|
-
return window.addEventListener("resize",
|
1493
|
-
window.removeEventListener("resize",
|
1496
|
+
return window.addEventListener("resize", N), () => {
|
1497
|
+
window.removeEventListener("resize", N);
|
1494
1498
|
};
|
1495
1499
|
}
|
1496
|
-
}, [
|
1497
|
-
const
|
1498
|
-
|
1499
|
-
left:
|
1500
|
+
}, [o, R]);
|
1501
|
+
const oe = () => {
|
1502
|
+
b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && I && E.current.scrollTo({
|
1503
|
+
left: y + I + 8,
|
1500
1504
|
top: 0,
|
1501
1505
|
behavior: "smooth"
|
1502
1506
|
});
|
1503
|
-
},
|
1504
|
-
|
1505
|
-
left: Math.max(0,
|
1507
|
+
}, re = () => {
|
1508
|
+
b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && I && E.current.scrollTo({
|
1509
|
+
left: Math.max(0, y - (I + 8)),
|
1506
1510
|
top: 0,
|
1507
1511
|
behavior: "smooth"
|
1508
1512
|
});
|
1509
|
-
},
|
1510
|
-
|
1511
|
-
},
|
1512
|
-
if (!
|
1513
|
-
|
1514
|
-
},
|
1515
|
-
|
1516
|
-
},
|
1517
|
-
|
1513
|
+
}, j = () => {
|
1514
|
+
E.current && O(E.current.scrollLeft);
|
1515
|
+
}, X = () => {
|
1516
|
+
if (!k || !T) return;
|
1517
|
+
k - T > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
|
1518
|
+
}, L = (d) => {
|
1519
|
+
v(d.targetTouches[0].clientX);
|
1520
|
+
}, Be = (d) => {
|
1521
|
+
v(null), P(d.targetTouches[0].clientX);
|
1518
1522
|
}, he = {
|
1519
|
-
clientColorScheme:
|
1520
|
-
showCTAColocatedWithText:
|
1521
|
-
heightOverrides:
|
1522
|
-
posthog:
|
1523
|
-
showIcon:
|
1524
|
-
variant:
|
1525
|
-
}, le = I ? Math.round(
|
1526
|
-
return /* @__PURE__ */
|
1527
|
-
|
1523
|
+
clientColorScheme: r,
|
1524
|
+
showCTAColocatedWithText: l,
|
1525
|
+
heightOverrides: n,
|
1526
|
+
posthog: s,
|
1527
|
+
showIcon: C,
|
1528
|
+
variant: h
|
1529
|
+
}, le = I ? Math.round(y / (I + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
|
1530
|
+
return /* @__PURE__ */ g(
|
1531
|
+
K,
|
1528
1532
|
{
|
1529
|
-
"aria-label":
|
1533
|
+
"aria-label": F.carousel_title,
|
1530
1534
|
"aria-roledescription": "carousel",
|
1531
|
-
ref:
|
1535
|
+
ref: R,
|
1532
1536
|
role: "group/region",
|
1533
1537
|
sx: {
|
1534
1538
|
alignItems: "center",
|
1535
1539
|
boxSizing: "border-box",
|
1536
|
-
height:
|
1537
|
-
width:
|
1540
|
+
height: n,
|
1541
|
+
width: m || "100%"
|
1538
1542
|
},
|
1539
1543
|
children: [
|
1540
|
-
/* @__PURE__ */
|
1541
|
-
|
1544
|
+
/* @__PURE__ */ g(
|
1545
|
+
K,
|
1542
1546
|
{
|
1543
1547
|
direction: "row",
|
1544
|
-
onScroll:
|
1545
|
-
onTouchEnd:
|
1546
|
-
onTouchMove:
|
1547
|
-
onTouchStart:
|
1548
|
-
ref:
|
1548
|
+
onScroll: j,
|
1549
|
+
onTouchEnd: X,
|
1550
|
+
onTouchMove: L,
|
1551
|
+
onTouchStart: Be,
|
1552
|
+
ref: E,
|
1549
1553
|
sx: {
|
1550
1554
|
alignItems: "center",
|
1551
|
-
height:
|
1555
|
+
height: n && "100%",
|
1552
1556
|
gap: 8,
|
1553
1557
|
listStyleType: "none",
|
1554
1558
|
m: 0,
|
1555
|
-
maxWidth:
|
1559
|
+
maxWidth: f ? "calc(100% - 32px)" : "100%",
|
1556
1560
|
overflowX: "auto",
|
1557
1561
|
overflowY: "hidden",
|
1558
1562
|
p: 0,
|
@@ -1564,31 +1568,31 @@ const z = E.createContext(null), Et = ({
|
|
1564
1568
|
}
|
1565
1569
|
},
|
1566
1570
|
children: [
|
1567
|
-
|
1568
|
-
const
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
),
|
1571
|
+
t.map((d, A) => {
|
1572
|
+
const N = A + 1, B = t.length + 1, Q = Je(
|
1573
|
+
F.card_position_in_carousel_aria,
|
1574
|
+
N.toString(),
|
1575
|
+
B.toString()
|
1576
|
+
), q = d.micro_title && d.micro_title.length > 0, ne = d.micro_description && d.micro_description.length > 0, Pe = q ? d.micro_title : d.title, Ge = ne ? d.micro_description : d.description;
|
1573
1577
|
return /* @__PURE__ */ e(
|
1574
|
-
|
1578
|
+
Mt,
|
1575
1579
|
{
|
1576
|
-
ariaLabel: `${
|
1577
|
-
beat:
|
1578
|
-
index:
|
1579
|
-
isActiveCard:
|
1580
|
-
onCardClick:
|
1580
|
+
ariaLabel: `${Q}: ${Pe}, ${Ge}`,
|
1581
|
+
beat: d,
|
1582
|
+
index: A,
|
1583
|
+
isActiveCard: A === le,
|
1584
|
+
onCardClick: a,
|
1581
1585
|
widthOverrides: I || void 0,
|
1582
1586
|
...he
|
1583
1587
|
},
|
1584
|
-
`${
|
1588
|
+
`${d.guid} ${A}`
|
1585
1589
|
);
|
1586
1590
|
}),
|
1587
1591
|
/* @__PURE__ */ e(
|
1588
|
-
|
1592
|
+
Vt,
|
1589
1593
|
{
|
1590
|
-
isActiveCard: le ===
|
1591
|
-
onCardClick:
|
1594
|
+
isActiveCard: le === t.length,
|
1595
|
+
onCardClick: a,
|
1592
1596
|
widthOverrides: I || void 0,
|
1593
1597
|
...he
|
1594
1598
|
}
|
@@ -1596,42 +1600,43 @@ const z = E.createContext(null), Et = ({
|
|
1596
1600
|
]
|
1597
1601
|
}
|
1598
1602
|
),
|
1599
|
-
|
1600
|
-
|
1603
|
+
_ && /* @__PURE__ */ e(
|
1604
|
+
At,
|
1601
1605
|
{
|
1602
|
-
clientColorScheme:
|
1603
|
-
currentBeatIndex: le +
|
1604
|
-
numBeats:
|
1605
|
-
onNextClick:
|
1606
|
-
onPreviousClick:
|
1607
|
-
scrollRightBoundary:
|
1608
|
-
scrollX:
|
1609
|
-
shouldApplyNewAnimation:
|
1610
|
-
visibleCardsCount:
|
1606
|
+
clientColorScheme: r,
|
1607
|
+
currentBeatIndex: le + c - 1,
|
1608
|
+
numBeats: t.length + 1,
|
1609
|
+
onNextClick: oe,
|
1610
|
+
onPreviousClick: re,
|
1611
|
+
scrollRightBoundary: Ze,
|
1612
|
+
scrollX: y,
|
1613
|
+
shouldApplyNewAnimation: ie,
|
1614
|
+
visibleCardsCount: c
|
1611
1615
|
}
|
1612
1616
|
)
|
1613
1617
|
]
|
1614
1618
|
}
|
1615
1619
|
);
|
1616
|
-
},
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1620
|
+
}, Tt = Z(Ot), Wt = ({
|
1621
|
+
analyticsMetadata: i,
|
1622
|
+
clientColorScheme: o,
|
1623
|
+
onCardClick: t,
|
1624
|
+
posthog: r,
|
1625
|
+
widthOverrides: l
|
1621
1626
|
}) => {
|
1622
|
-
const { carouselCopy:
|
1623
|
-
|
1627
|
+
const { carouselCopy: n } = H(), { onEvent: a } = Y(), s = () => {
|
1628
|
+
a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
|
1624
1629
|
};
|
1625
|
-
return
|
1626
|
-
|
1630
|
+
return n ? /* @__PURE__ */ g(
|
1631
|
+
K,
|
1627
1632
|
{
|
1628
1633
|
alignItems: "center",
|
1629
1634
|
direction: "row",
|
1630
1635
|
justifyContent: "space-between",
|
1631
1636
|
spacing: 2,
|
1632
1637
|
sx: {
|
1633
|
-
padding:
|
1634
|
-
width:
|
1638
|
+
padding: l ? 0 : 16,
|
1639
|
+
width: l || void 0
|
1635
1640
|
},
|
1636
1641
|
children: [
|
1637
1642
|
/* @__PURE__ */ e(
|
@@ -1643,13 +1648,13 @@ const z = E.createContext(null), Et = ({
|
|
1643
1648
|
lineHeight: "24px"
|
1644
1649
|
},
|
1645
1650
|
variant: "h3",
|
1646
|
-
children:
|
1651
|
+
children: n.carousel_title
|
1647
1652
|
}
|
1648
1653
|
),
|
1649
|
-
/* @__PURE__ */
|
1650
|
-
|
1654
|
+
/* @__PURE__ */ g(
|
1655
|
+
ze,
|
1651
1656
|
{
|
1652
|
-
onClick:
|
1657
|
+
onClick: s,
|
1653
1658
|
sx: {
|
1654
1659
|
display: "flex",
|
1655
1660
|
alignItems: "center",
|
@@ -1666,30 +1671,30 @@ const z = E.createContext(null), Et = ({
|
|
1666
1671
|
Ee,
|
1667
1672
|
{
|
1668
1673
|
sx: {
|
1669
|
-
color:
|
1674
|
+
color: o?.primary_300,
|
1670
1675
|
fontSize: 15,
|
1671
1676
|
fontWeight: 600,
|
1672
1677
|
lineHeight: "20px"
|
1673
1678
|
},
|
1674
1679
|
variant: "body1",
|
1675
|
-
children:
|
1680
|
+
children: n.view_all_insights_in_full_feed_cta_aria
|
1676
1681
|
}
|
1677
1682
|
),
|
1678
|
-
/* @__PURE__ */ e(
|
1683
|
+
/* @__PURE__ */ e(Se, { sx: { color: o?.primary_300, ml: "8px" } })
|
1679
1684
|
]
|
1680
1685
|
}
|
1681
1686
|
)
|
1682
1687
|
]
|
1683
1688
|
}
|
1684
|
-
) : /* @__PURE__ */ e(
|
1685
|
-
},
|
1689
|
+
) : /* @__PURE__ */ e($e, {});
|
1690
|
+
}, wt = Z(Wt), xt = ({
|
1686
1691
|
heightOverrides: i,
|
1687
1692
|
widthOverrides: o,
|
1688
1693
|
children: t
|
1689
1694
|
}) => {
|
1690
|
-
const { carouselCopy: r } =
|
1695
|
+
const { carouselCopy: r } = H();
|
1691
1696
|
return /* @__PURE__ */ e(
|
1692
|
-
|
1697
|
+
U,
|
1693
1698
|
{
|
1694
1699
|
"aria-label": r?.carousel_title,
|
1695
1700
|
"aria-roledescription": "carousel",
|
@@ -1703,7 +1708,7 @@ const z = E.createContext(null), Et = ({
|
|
1703
1708
|
children: t
|
1704
1709
|
}
|
1705
1710
|
);
|
1706
|
-
},
|
1711
|
+
}, ke = ({
|
1707
1712
|
ariaLabel: i,
|
1708
1713
|
carouselSize: o,
|
1709
1714
|
clientColorScheme: t,
|
@@ -1711,38 +1716,38 @@ const z = E.createContext(null), Et = ({
|
|
1711
1716
|
onCardClick: l,
|
1712
1717
|
posthog: n,
|
1713
1718
|
showIcon: a,
|
1714
|
-
showWithMargin:
|
1715
|
-
variant:
|
1716
|
-
widthOverrides:
|
1719
|
+
showWithMargin: s,
|
1720
|
+
variant: p,
|
1721
|
+
widthOverrides: _
|
1717
1722
|
}) => {
|
1718
|
-
const { cardsCopy: C } =
|
1719
|
-
|
1720
|
-
|
1723
|
+
const { cardsCopy: C } = H(), { onEvent: f } = Y(), { onPageview: h } = Ne();
|
1724
|
+
u.useEffect(() => {
|
1725
|
+
h(V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
1721
1726
|
}, []);
|
1722
|
-
const
|
1723
|
-
l && l(), f(
|
1727
|
+
const m = () => {
|
1728
|
+
l && l(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
|
1724
1729
|
template: "no_relevant_insights"
|
1725
1730
|
});
|
1726
1731
|
};
|
1727
1732
|
return /* @__PURE__ */ e(
|
1728
|
-
|
1733
|
+
te,
|
1729
1734
|
{
|
1730
1735
|
actionText: C.micro_card_cta,
|
1731
1736
|
ariaLabel: i,
|
1732
1737
|
description: C.no_relevant_insights_card_description,
|
1733
1738
|
fontColors: { buttonColor: t?.primary_300 },
|
1734
1739
|
heightOverrides: r,
|
1735
|
-
icon: /* @__PURE__ */ e(
|
1740
|
+
icon: /* @__PURE__ */ e(Le, {}),
|
1736
1741
|
isZeroState: !0,
|
1737
|
-
onCardClick:
|
1742
|
+
onCardClick: m,
|
1738
1743
|
posthog: n,
|
1739
1744
|
showIcon: a,
|
1740
1745
|
style: {
|
1741
1746
|
cardStyle: {
|
1742
1747
|
card: {
|
1743
|
-
height: `calc(${
|
1748
|
+
height: `calc(${Ve[o]}px - 44px)`,
|
1744
1749
|
m: "0 auto",
|
1745
|
-
width:
|
1750
|
+
width: s ? "calc(100% - 32px)" : "100%"
|
1746
1751
|
},
|
1747
1752
|
description: {
|
1748
1753
|
WebkitLineClamp: 4
|
@@ -1753,11 +1758,11 @@ const z = E.createContext(null), Et = ({
|
|
1753
1758
|
}
|
1754
1759
|
},
|
1755
1760
|
title: C.no_relevant_insights_card_title,
|
1756
|
-
variant:
|
1757
|
-
widthOverrides:
|
1761
|
+
variant: p,
|
1762
|
+
widthOverrides: _
|
1758
1763
|
}
|
1759
1764
|
);
|
1760
|
-
},
|
1765
|
+
}, ci = Z(ke), Fe = ({
|
1761
1766
|
ariaLabel: i,
|
1762
1767
|
carouselSize: o,
|
1763
1768
|
heightOverrides: t,
|
@@ -1765,19 +1770,19 @@ const z = E.createContext(null), Et = ({
|
|
1765
1770
|
posthog: l,
|
1766
1771
|
showIcon: n,
|
1767
1772
|
showWithMargin: a,
|
1768
|
-
variant:
|
1769
|
-
widthOverrides:
|
1773
|
+
variant: s,
|
1774
|
+
widthOverrides: p
|
1770
1775
|
}) => {
|
1771
|
-
const { onPageview:
|
1772
|
-
return
|
1773
|
-
|
1776
|
+
const { onPageview: _ } = Ne(), { zeroStateCopy: C } = H();
|
1777
|
+
return u.useEffect(() => {
|
1778
|
+
_(V.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
1774
1779
|
}, []), /* @__PURE__ */ e(
|
1775
|
-
|
1780
|
+
te,
|
1776
1781
|
{
|
1777
1782
|
ariaLabel: i,
|
1778
1783
|
description: C.carousel_zero_state_description,
|
1779
1784
|
heightOverrides: t,
|
1780
|
-
icon: /* @__PURE__ */ e(
|
1785
|
+
icon: /* @__PURE__ */ e(Le, {}),
|
1781
1786
|
isZeroState: !0,
|
1782
1787
|
onCardClick: r,
|
1783
1788
|
posthog: l,
|
@@ -1785,7 +1790,7 @@ const z = E.createContext(null), Et = ({
|
|
1785
1790
|
style: {
|
1786
1791
|
cardStyle: {
|
1787
1792
|
card: {
|
1788
|
-
height: `calc(${
|
1793
|
+
height: `calc(${Ve[o]}px - 44px)`,
|
1789
1794
|
m: "0 auto",
|
1790
1795
|
width: a ? "calc(100% - 32px)" : "100%"
|
1791
1796
|
},
|
@@ -1795,12 +1800,12 @@ const z = E.createContext(null), Et = ({
|
|
1795
1800
|
}
|
1796
1801
|
},
|
1797
1802
|
title: C.carousel_zero_state_title,
|
1798
|
-
variant:
|
1799
|
-
widthOverrides:
|
1803
|
+
variant: s,
|
1804
|
+
widthOverrides: p
|
1800
1805
|
}
|
1801
1806
|
);
|
1802
|
-
},
|
1803
|
-
|
1807
|
+
}, di = Z(Fe), Dt = () => /* @__PURE__ */ e(
|
1808
|
+
U,
|
1804
1809
|
{
|
1805
1810
|
sx: {
|
1806
1811
|
alignItems: "center",
|
@@ -1809,9 +1814,9 @@ const z = E.createContext(null), Et = ({
|
|
1809
1814
|
justifyContent: "center",
|
1810
1815
|
width: "100%"
|
1811
1816
|
},
|
1812
|
-
children: /* @__PURE__ */ e(
|
1817
|
+
children: /* @__PURE__ */ e(et, {})
|
1813
1818
|
}
|
1814
|
-
),
|
1819
|
+
), W = new ut(), Lt = ({
|
1815
1820
|
allowSingleCardPeeking: i,
|
1816
1821
|
areBeatsLoading: o,
|
1817
1822
|
beats: t = [],
|
@@ -1821,84 +1826,86 @@ const z = E.createContext(null), Et = ({
|
|
1821
1826
|
showCTAColocatedWithText: l = !0,
|
1822
1827
|
endpoint: n = "/",
|
1823
1828
|
heightOverrides: a,
|
1824
|
-
logOutUser:
|
1825
|
-
onCardClick:
|
1829
|
+
logOutUser: s,
|
1830
|
+
onCardClick: p = () => {
|
1826
1831
|
},
|
1827
|
-
onEvent:
|
1832
|
+
onEvent: _ = () => {
|
1828
1833
|
},
|
1829
1834
|
onPageview: C = () => {
|
1830
1835
|
},
|
1831
1836
|
posthog: f,
|
1832
|
-
shouldApplyNewAnimation:
|
1833
|
-
showBorder:
|
1837
|
+
shouldApplyNewAnimation: h = !1,
|
1838
|
+
showBorder: m = !0,
|
1834
1839
|
showCarouselControls: c,
|
1835
|
-
showHeader:
|
1836
|
-
showIcon:
|
1837
|
-
showWithMargin:
|
1838
|
-
token:
|
1840
|
+
showHeader: E,
|
1841
|
+
showIcon: R,
|
1842
|
+
showWithMargin: y = !0,
|
1843
|
+
token: O = "",
|
1839
1844
|
useDarkMode: T,
|
1840
|
-
userHasFullInsightFeedBeats:
|
1841
|
-
variant:
|
1842
|
-
visibleCardsCount:
|
1843
|
-
widthOverrides:
|
1845
|
+
userHasFullInsightFeedBeats: v,
|
1846
|
+
variant: k,
|
1847
|
+
visibleCardsCount: P = 1,
|
1848
|
+
widthOverrides: I
|
1844
1849
|
}) => {
|
1845
|
-
const
|
1846
|
-
|
1847
|
-
|
1848
|
-
}, [n,
|
1849
|
-
const
|
1850
|
-
|
1851
|
-
}, [window.innerHeight]),
|
1852
|
-
|
1853
|
-
}, [o,
|
1854
|
-
const
|
1850
|
+
const z = ve(), [ie, G] = ae("STANDARD"), [F, b] = ae(!1), oe = it([_], W), re = ot([C], W);
|
1851
|
+
u.useEffect(() => {
|
1852
|
+
W.isInitialized || W.initialize(n, O, s);
|
1853
|
+
}, [n, O, s, W.isInitialized]), u.useEffect(() => {
|
1854
|
+
const L = window.innerHeight;
|
1855
|
+
L < 180 ? G("STANDARD") : L >= 180 && L < 200 ? G("LARGE") : L >= 200 && L < 248 ? G("XLARGE") : L >= 248 && G("XXLARGE");
|
1856
|
+
}, [window.innerHeight]), u.useEffect(() => {
|
1857
|
+
b(!o && W.isInitialized);
|
1858
|
+
}, [o, W.isInitialized]);
|
1859
|
+
const j = {
|
1855
1860
|
showCTAColocatedWithText: l,
|
1856
1861
|
heightOverrides: a,
|
1857
|
-
onCardClick:
|
1862
|
+
onCardClick: p,
|
1858
1863
|
posthog: f,
|
1859
|
-
showIcon:
|
1860
|
-
showWithMargin:
|
1864
|
+
showIcon: R,
|
1865
|
+
showWithMargin: y,
|
1861
1866
|
useDarkMode: T,
|
1862
|
-
widthOverrides:
|
1863
|
-
},
|
1864
|
-
carouselSize:
|
1865
|
-
variant:
|
1866
|
-
|
1867
|
+
widthOverrides: I
|
1868
|
+
}, X = {
|
1869
|
+
carouselSize: ie,
|
1870
|
+
variant: k,
|
1871
|
+
...j
|
1867
1872
|
};
|
1868
1873
|
return (
|
1869
1874
|
// The Theme provider must wrap the component so that the styles don't break when imported into other applications.
|
1870
|
-
/* @__PURE__ */
|
1871
|
-
/* @__PURE__ */ e(
|
1872
|
-
/* @__PURE__ */ e(
|
1873
|
-
(o || !
|
1874
|
-
|
1875
|
-
|
1875
|
+
/* @__PURE__ */ g(Ue, { theme: z, children: [
|
1876
|
+
/* @__PURE__ */ e(be, {}),
|
1877
|
+
/* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store: W, children: /* @__PURE__ */ g(xt, { heightOverrides: a, widthOverrides: I, children: [
|
1878
|
+
(o || !W.isInitialized) && /* @__PURE__ */ e(Dt, {}),
|
1879
|
+
F && E && /* @__PURE__ */ e(
|
1880
|
+
wt,
|
1876
1881
|
{
|
1882
|
+
analyticsMetadata: Ce,
|
1877
1883
|
clientColorScheme: r,
|
1878
|
-
onCardClick:
|
1884
|
+
onCardClick: p,
|
1879
1885
|
posthog: f,
|
1880
|
-
widthOverrides:
|
1886
|
+
widthOverrides: I
|
1881
1887
|
}
|
1882
1888
|
),
|
1883
|
-
|
1884
|
-
|
1889
|
+
F && !!t.length && /* @__PURE__ */ e(
|
1890
|
+
Tt,
|
1885
1891
|
{
|
1886
1892
|
allowSingleCardPeeking: i,
|
1893
|
+
analyticsMetadata: Ce,
|
1887
1894
|
beats: t,
|
1888
1895
|
clientColorScheme: r,
|
1889
|
-
shouldApplyNewAnimation:
|
1896
|
+
shouldApplyNewAnimation: h,
|
1890
1897
|
showCarouselControls: c,
|
1891
|
-
variant:
|
1892
|
-
visibleCardsCount:
|
1893
|
-
|
1898
|
+
variant: m ? k : void 0,
|
1899
|
+
visibleCardsCount: P,
|
1900
|
+
...j
|
1894
1901
|
}
|
1895
1902
|
),
|
1896
|
-
|
1897
|
-
|
1903
|
+
F && !t.length && v && /* @__PURE__ */ e(ke, { clientColorScheme: r, ...X }),
|
1904
|
+
F && !t.length && !v && /* @__PURE__ */ e(Fe, { ...X })
|
1898
1905
|
] }) })
|
1899
1906
|
] })
|
1900
1907
|
);
|
1901
|
-
},
|
1908
|
+
}, si = Z(Lt), Nt = ({
|
1902
1909
|
isActiveCard: i,
|
1903
1910
|
ariaLabel: o,
|
1904
1911
|
clientColorScheme: t,
|
@@ -1906,54 +1913,55 @@ const z = E.createContext(null), Et = ({
|
|
1906
1913
|
onCardClick: l,
|
1907
1914
|
posthog: n,
|
1908
1915
|
showIcon: a,
|
1909
|
-
variant:
|
1910
|
-
widthOverrides:
|
1916
|
+
variant: s,
|
1917
|
+
widthOverrides: p
|
1911
1918
|
}) => {
|
1912
|
-
const
|
1913
|
-
threshold:
|
1914
|
-
}), { cardsCopy:
|
1915
|
-
|
1916
|
-
f && (
|
1919
|
+
const _ = Oe(), { ref: C, inView: f } = Me({
|
1920
|
+
threshold: He
|
1921
|
+
}), { cardsCopy: h } = H(), { onEvent: m } = Y();
|
1922
|
+
ee(() => {
|
1923
|
+
f && (m(De.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
|
1917
1924
|
template: "view_more_card"
|
1918
1925
|
}));
|
1919
1926
|
}, [f]);
|
1920
1927
|
const c = () => {
|
1921
|
-
l && l(),
|
1928
|
+
l && l(), m(M.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
|
1922
1929
|
template: "view_more_card"
|
1923
1930
|
});
|
1924
1931
|
};
|
1925
1932
|
return /* @__PURE__ */ e(
|
1926
|
-
|
1933
|
+
te,
|
1927
1934
|
{
|
1928
|
-
actionText:
|
1935
|
+
actionText: h.micro_card_cta,
|
1929
1936
|
ariaLabel: o,
|
1930
|
-
description:
|
1937
|
+
description: h.view_more_card_description,
|
1931
1938
|
fontColors: { buttonColor: t?.primary_300 },
|
1932
1939
|
heightOverrides: r,
|
1933
|
-
icon: /* @__PURE__ */ e(
|
1940
|
+
icon: /* @__PURE__ */ e(Rt, { color: t?.primary_300 ?? _.palette.primary.main }),
|
1934
1941
|
isActiveCard: i,
|
1935
1942
|
onCardClick: c,
|
1936
1943
|
posthog: n,
|
1937
1944
|
ref: C,
|
1938
1945
|
showIcon: a,
|
1939
|
-
title:
|
1940
|
-
variant:
|
1941
|
-
widthOverrides:
|
1946
|
+
title: h.view_more_card_title,
|
1947
|
+
variant: s,
|
1948
|
+
widthOverrides: p
|
1942
1949
|
}
|
1943
1950
|
);
|
1944
|
-
},
|
1951
|
+
}, Vt = Z(Nt);
|
1945
1952
|
export {
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1953
|
+
ut as A,
|
1954
|
+
Mt as B,
|
1955
|
+
wt as C,
|
1956
|
+
pt as I,
|
1957
|
+
Tt as M,
|
1958
|
+
ci as N,
|
1959
|
+
Ce as T,
|
1960
|
+
Vt as V,
|
1961
|
+
di as Z,
|
1962
|
+
te as a,
|
1963
|
+
si as b,
|
1964
|
+
Rt as c,
|
1965
|
+
yt as d,
|
1966
|
+
Le as e
|
1959
1967
|
};
|