@mx-cartographer/experiences 8.0.19 → 8.0.20
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 +8 -4
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-B7zfcad7.mjs} +1 -1
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-DZpOoZQa.mjs} +1 -1
- package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-CmnaZDS6.mjs} +27 -27
- package/dist/{Help-DBAosGjO.mjs → Help-BkmSY96v.mjs} +1 -1
- package/dist/{ManageIncome-CvfRTf-j.mjs → ManageIncome-BJ7c7plg.mjs} +1 -1
- package/dist/{NotificationSettings-D7VqsrZy.mjs → NotificationSettings-DBT37CVB.mjs} +1 -1
- package/dist/{RecurringSettings-DJIUgK5A.mjs → RecurringSettings-DnD0AqWa.mjs} +1 -1
- package/dist/{SpendingLegend-BCnXkPCD.mjs → SpendingLegend-CypdabwS.mjs} +1 -1
- package/dist/{TransactionDetails-KklNHa-s.mjs → TransactionDetails-D6XZakc-.mjs} +1 -1
- package/dist/WidgetContainer-DYKMArWw.mjs +468 -0
- package/dist/accounts/index.es.js +95 -93
- package/dist/budgets/index.es.js +448 -444
- package/dist/cashflow/index.es.js +233 -231
- package/dist/common/components/GlobalAccountFilter.d.ts +2 -1
- package/dist/common/components/WidgetContainer.d.ts +2 -1
- package/dist/common/components/WidgetDateRangeSelector.d.ts +12 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetHeaderStyles.d.ts +32 -0
- package/dist/common/index.es.js +133 -132
- package/dist/core/types/Widgets.d.ts +1 -0
- package/dist/dashboard/index.es.js +3 -3
- package/dist/debts/components/actions/DebtsPriorityAction.d.ts +2 -1
- package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
- package/dist/debts/index.es.js +589 -587
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/index.es.js +737 -745
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/index.es.js +439 -438
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/index.es.js +21 -12
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/index.es.js +418 -417
- package/dist/networth/index.es.js +265 -278
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +235 -232
- package/dist/settings/SettingsWidget.d.ts +1 -1
- package/dist/settings/index.es.js +283 -282
- package/dist/spending/index.es.js +109 -108
- package/dist/transactions/index.es.js +280 -277
- package/dist/trends/index.es.js +622 -615
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-CUcpY7aJ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/WidgetContainer-D-pbSa7L.mjs +0 -441
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import h from "react";
|
|
3
|
+
import { observer as re } from "mobx-react-lite";
|
|
4
|
+
import z from "@mui/material/Button";
|
|
5
|
+
import se from "@mui/material/Card";
|
|
6
|
+
import le from "@mui/material/CardContent";
|
|
7
|
+
import de from "@mui/material/Divider";
|
|
8
|
+
import K from "@mui/material/IconButton";
|
|
9
|
+
import me from "@mui/material/Paper";
|
|
10
|
+
import A from "@mui/material/Stack";
|
|
11
|
+
import { ChevronLeft as ce } from "@mxenabled/mx-icons";
|
|
12
|
+
import { Icon as D, Text as G, DateRangePicker as J } from "@mxenabled/mxui";
|
|
13
|
+
import { u as ue } from "./useDimensions-CeDR9V8N.mjs";
|
|
14
|
+
import { G as pe } from "./GlobalAccountFilter-CmnaZDS6.mjs";
|
|
15
|
+
import { b as oe, u as ne, g as ge, a as he, W as fe } from "./hooks-BxkfR-Ff.mjs";
|
|
16
|
+
import { addMonths as Q } from "date-fns/addMonths";
|
|
17
|
+
import { addDays as be } from "date-fns/addDays";
|
|
18
|
+
import { addYears as Z } from "date-fns/addYears";
|
|
19
|
+
import { differenceInCalendarDays as Re } from "date-fns/differenceInCalendarDays";
|
|
20
|
+
import { endOfDay as _e } from "date-fns/endOfDay";
|
|
21
|
+
import { endOfMonth as w } from "date-fns/endOfMonth";
|
|
22
|
+
import { endOfToday as ee } from "date-fns/endOfToday";
|
|
23
|
+
import { endOfYear as Ce } from "date-fns/endOfYear";
|
|
24
|
+
import { startOfMonth as xe } from "date-fns/startOfMonth";
|
|
25
|
+
import { startOfToday as De } from "date-fns/startOfToday";
|
|
26
|
+
import { startOfYear as ke } from "date-fns/startOfYear";
|
|
27
|
+
import { subMonths as V } from "date-fns/subMonths";
|
|
28
|
+
import { subDays as ye } from "date-fns/subDays";
|
|
29
|
+
import { subYears as te } from "date-fns/subYears";
|
|
30
|
+
import ae from "@mui/material/Box";
|
|
31
|
+
import Te from "@mui/material/ButtonGroup";
|
|
32
|
+
import Me from "@mui/material/Tab";
|
|
33
|
+
import ve from "@mui/material/Tabs";
|
|
34
|
+
import Pe from "@mui/material/ToggleButton";
|
|
35
|
+
import Se from "@mui/material/ToggleButtonGroup";
|
|
36
|
+
import Le from "@mui/material/styles/useTheme";
|
|
37
|
+
import { u as Ye } from "./useAriaLive-MkYebyUR.mjs";
|
|
38
|
+
import { D as Ee } from "./Dialog-Ck34yr-d.mjs";
|
|
39
|
+
import { D as Ae } from "./Drawer-Bbe4AMB1.mjs";
|
|
40
|
+
import { u as ie } from "./useScreenSize-CUcpY7aJ.mjs";
|
|
41
|
+
import { f as M, D as v } from "./DateFormats-BMpMrZpW.mjs";
|
|
42
|
+
import { L as Be } from "./Loader-D3rjKx72.mjs";
|
|
43
|
+
import { A as Oe } from "./Analytics-0Xm_BjHU.mjs";
|
|
44
|
+
const Ne = (o) => {
|
|
45
|
+
const { isDesktop: d, isMobile: a, isSmallTablet: m, isTablet: r } = ie(o), n = 24;
|
|
46
|
+
let u = 48, c = 32, P = 0, p = "h1";
|
|
47
|
+
const s = a || m;
|
|
48
|
+
let _ = !1;
|
|
49
|
+
r && !m ? (u = 24, c = 24, p = "h2") : s && (u = 8, c = 10, P = 10, p = "h3", _ = !0);
|
|
50
|
+
const i = {
|
|
51
|
+
pb: s ? 12 : 0,
|
|
52
|
+
...s && {
|
|
53
|
+
px: u,
|
|
54
|
+
"& .mx-cmn-date-range-selector": { m: 0, width: "100%" },
|
|
55
|
+
"& .mx-cmn-date-range-selector > .MuiBox-root": { display: "flex" },
|
|
56
|
+
"& .MuiButtonGroup-root": { width: "100%" },
|
|
57
|
+
"& .MuiButtonGroup-middleButton": { flex: 1 },
|
|
58
|
+
"& .MuiToggleButtonGroup-root": { width: "100%", justifyContent: "center" }
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
actionsFlex: s ? 0 : 1,
|
|
63
|
+
containerSquareCorners: _,
|
|
64
|
+
headerHeadingLevel: p,
|
|
65
|
+
headerPaddingBottom: P,
|
|
66
|
+
headerPaddingTop: c,
|
|
67
|
+
headerPaddingX: u,
|
|
68
|
+
iconSize: n,
|
|
69
|
+
isCompact: s,
|
|
70
|
+
isDesktop: d,
|
|
71
|
+
slotSx: i
|
|
72
|
+
};
|
|
73
|
+
}, Ie = ({
|
|
74
|
+
calendarActions: o,
|
|
75
|
+
color: d = "primary",
|
|
76
|
+
copy: a,
|
|
77
|
+
range: m = [xe(De()), w(ee())],
|
|
78
|
+
shouldShrinkToIcon: r = !0,
|
|
79
|
+
variant: n = "outlined"
|
|
80
|
+
}) => {
|
|
81
|
+
const u = Le(), { isMobile: c } = ie(), { announce: P, ariaLive: p } = Ye(), [s, _] = h.useState(m), [i, F] = h.useState(a.dateRangePickerCopy.dateRangeThisMonth), [C, B] = h.useState(s), [E, k] = h.useState(!1), [H, W] = h.useState(!0), [S, j] = h.useState(6), O = {
|
|
82
|
+
buttons: [
|
|
83
|
+
{ ariaLabel: "3 Months", label: "3M", value: 3 },
|
|
84
|
+
{ ariaLabel: "6 Months", label: "6M", value: 6 },
|
|
85
|
+
{ ariaLabel: "9 Months", label: "9M", value: 9 },
|
|
86
|
+
{ ariaLabel: "1 Year", label: "1Y", value: 12 }
|
|
87
|
+
],
|
|
88
|
+
tabs: [
|
|
89
|
+
{ label: "3 Months", value: 3 },
|
|
90
|
+
{ label: "6 Months", value: 6 },
|
|
91
|
+
{ label: "9 Months", value: 9 },
|
|
92
|
+
{ label: "1 Year", value: 12 }
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
h.useEffect(() => {
|
|
96
|
+
_(m), B(m);
|
|
97
|
+
}, [m]), h.useEffect(() => {
|
|
98
|
+
(n === "timeframebuttons" || n === "timeframetabs") && o.onRangeChanged($());
|
|
99
|
+
}, [S]);
|
|
100
|
+
const $ = () => {
|
|
101
|
+
const t = w(ee());
|
|
102
|
+
return [w(V(t, S)), t];
|
|
103
|
+
}, N = (t) => {
|
|
104
|
+
const [l, g] = s, b = t === "previous";
|
|
105
|
+
let R;
|
|
106
|
+
if (i === a.dateRangePickerCopy.dateRangeThisMonth || i === a.dateRangePickerCopy.dateRangeLastMonth)
|
|
107
|
+
R = [
|
|
108
|
+
b ? V(l, 1) : Q(l, 1),
|
|
109
|
+
w(b ? V(g, 1) : Q(g, 1))
|
|
110
|
+
];
|
|
111
|
+
else if (i === a.dateRangePickerCopy.dateRangeYTD || i === a.dateRangePickerCopy.dateRangeLastYear) {
|
|
112
|
+
const T = ke(l), x = Ce(l);
|
|
113
|
+
R = [
|
|
114
|
+
b ? te(T, 1) : Z(T, 1),
|
|
115
|
+
b ? te(x, 1) : Z(x, 1)
|
|
116
|
+
];
|
|
117
|
+
} else {
|
|
118
|
+
const T = Re(g, l), x = b ? ye : be;
|
|
119
|
+
R = [x(l, T), x(g, T)];
|
|
120
|
+
}
|
|
121
|
+
_(R), o.onRangeChanged(R);
|
|
122
|
+
}, L = () => {
|
|
123
|
+
_(C), W(
|
|
124
|
+
i === a.dateRangePickerCopy.dateRangeThisMonth || i === a.dateRangePickerCopy.dateRangeLastMonth
|
|
125
|
+
), o.onRangeChanged(C);
|
|
126
|
+
}, y = (t, l) => {
|
|
127
|
+
t[1] = t[1] ?? t[0];
|
|
128
|
+
const g = [t[0], t[1] ? _e(t[1]) : t[1]], b = M(g[0], v.MONTH_DAY_YEAR), R = M(g[1], v.MONTH_DAY_YEAR);
|
|
129
|
+
B(g), F(l), P(`${a.dateRangePickerCopy}: ${b} - ${R}`);
|
|
130
|
+
}, Y = (t) => {
|
|
131
|
+
j(t);
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ f(ae, { className: "mx-cmn-date-range-selector", m: 4, children: [
|
|
134
|
+
/* @__PURE__ */ f(
|
|
135
|
+
ae,
|
|
136
|
+
{
|
|
137
|
+
sx: {
|
|
138
|
+
[u.breakpoints.down("sm")]: {
|
|
139
|
+
display: r ? "none" : "flex",
|
|
140
|
+
justifyContent: "center"
|
|
141
|
+
},
|
|
142
|
+
[u.breakpoints.up("sm")]: { display: "inline-flex" }
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
n === "readonly" && /* @__PURE__ */ f(A, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
146
|
+
/* @__PURE__ */ e(D, { name: "calendar_month", size: 24 }),
|
|
147
|
+
/* @__PURE__ */ e(G, { bold: !0, children: M(C[0], v.MONTH_DAY) }),
|
|
148
|
+
/* @__PURE__ */ e(D, { name: "remove" }),
|
|
149
|
+
/* @__PURE__ */ e(G, { bold: !0, children: M(C[1], v.MONTH_DAY_YEAR) })
|
|
150
|
+
] }),
|
|
151
|
+
n !== "readonly" && n !== "timeframebuttons" && n !== "timeframetabs" && /* @__PURE__ */ f(
|
|
152
|
+
Te,
|
|
153
|
+
{
|
|
154
|
+
color: d,
|
|
155
|
+
sx: {
|
|
156
|
+
"& .MuiButtonGroup-grouped": {
|
|
157
|
+
padding: c ? 0 : 12
|
|
158
|
+
},
|
|
159
|
+
"& .MuiButtonGroup-middleButton": {
|
|
160
|
+
px: 24
|
|
161
|
+
},
|
|
162
|
+
height: 44
|
|
163
|
+
},
|
|
164
|
+
variant: n,
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
z,
|
|
168
|
+
{
|
|
169
|
+
"aria-disabled": o.shouldDisablePrevious,
|
|
170
|
+
"aria-label": a.dateRangePreviousAria,
|
|
171
|
+
color: o.shouldDisablePrevious ? "secondary" : "primary",
|
|
172
|
+
onClick: () => o.shouldDisablePrevious ? null : N("previous"),
|
|
173
|
+
children: /* @__PURE__ */ e(D, { name: "chevron_left", size: 20 })
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
z,
|
|
178
|
+
{
|
|
179
|
+
"aria-disabled": o.shouldDisablePicker,
|
|
180
|
+
color: d,
|
|
181
|
+
onClick: () => o.shouldDisablePicker ? null : k(!0),
|
|
182
|
+
startIcon: /* @__PURE__ */ e(D, { name: "calendar_month", size: 20 }),
|
|
183
|
+
sx: {
|
|
184
|
+
p: c ? 0 : 8
|
|
185
|
+
},
|
|
186
|
+
children: H ? M(s[0], v.MONTH_YEAR) : /* @__PURE__ */ f("span", { children: [
|
|
187
|
+
M(s[0], v.MONTH_DAY_YEAR),
|
|
188
|
+
" -",
|
|
189
|
+
" ",
|
|
190
|
+
M(s[1], v.MONTH_DAY_YEAR)
|
|
191
|
+
] })
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ e(
|
|
195
|
+
z,
|
|
196
|
+
{
|
|
197
|
+
"aria-disabled": o.shouldDisableNext,
|
|
198
|
+
"aria-label": a.dateRangeNextAria,
|
|
199
|
+
color: o.shouldDisableNext ? "secondary" : "primary",
|
|
200
|
+
onClick: () => o.shouldDisableNext ? null : N("next"),
|
|
201
|
+
children: /* @__PURE__ */ e(D, { name: "chevron_right", size: 20 })
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
n === "timeframebuttons" && /* @__PURE__ */ e(
|
|
208
|
+
Se,
|
|
209
|
+
{
|
|
210
|
+
"aria-label": a.dateRangeEditTitle,
|
|
211
|
+
color: d,
|
|
212
|
+
exclusive: !0,
|
|
213
|
+
orientation: "horizontal",
|
|
214
|
+
value: S,
|
|
215
|
+
children: O.buttons.map((t) => /* @__PURE__ */ e(
|
|
216
|
+
Pe,
|
|
217
|
+
{
|
|
218
|
+
"aria-label": t.ariaLabel,
|
|
219
|
+
onClick: () => Y(t.value),
|
|
220
|
+
sx: { width: 56 },
|
|
221
|
+
value: t.value,
|
|
222
|
+
children: t.label
|
|
223
|
+
},
|
|
224
|
+
t.label
|
|
225
|
+
))
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
n === "timeframetabs" && /* @__PURE__ */ e(
|
|
229
|
+
ve,
|
|
230
|
+
{
|
|
231
|
+
indicatorColor: "primary",
|
|
232
|
+
onChange: (t, l) => Y(l),
|
|
233
|
+
textColor: "primary",
|
|
234
|
+
value: S,
|
|
235
|
+
variant: "fullWidth",
|
|
236
|
+
children: O.tabs.map((t) => /* @__PURE__ */ e(
|
|
237
|
+
Me,
|
|
238
|
+
{
|
|
239
|
+
label: /* @__PURE__ */ e(G, { bold: !0, variant: "body1", children: t.label }),
|
|
240
|
+
sx: { minWidth: 80 },
|
|
241
|
+
value: t.value
|
|
242
|
+
},
|
|
243
|
+
t.label
|
|
244
|
+
))
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
E && c && /* @__PURE__ */ f(
|
|
251
|
+
Ae,
|
|
252
|
+
{
|
|
253
|
+
ariaLabelClose: a.dateRangeCloseAria,
|
|
254
|
+
isOpen: E,
|
|
255
|
+
onClose: () => k(!1),
|
|
256
|
+
onPrimaryAction: () => {
|
|
257
|
+
L(), k(!1);
|
|
258
|
+
},
|
|
259
|
+
primaryText: a.dateRangeEditApply,
|
|
260
|
+
title: a.dateRangeEditTitle,
|
|
261
|
+
children: [
|
|
262
|
+
p,
|
|
263
|
+
/* @__PURE__ */ e(
|
|
264
|
+
J,
|
|
265
|
+
{
|
|
266
|
+
copy: a.dateRangePickerCopy,
|
|
267
|
+
dateRange: C,
|
|
268
|
+
onRangeChanged: y,
|
|
269
|
+
selectedShortcut: i,
|
|
270
|
+
sx: { p: 0 }
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
]
|
|
274
|
+
}
|
|
275
|
+
),
|
|
276
|
+
E && !c && /* @__PURE__ */ f(
|
|
277
|
+
Ee,
|
|
278
|
+
{
|
|
279
|
+
copy: { title: a.dateRangeEditTitle },
|
|
280
|
+
isOpen: !0,
|
|
281
|
+
onClose: () => k(!1),
|
|
282
|
+
onPrimaryAction: () => L(),
|
|
283
|
+
primaryText: a.dateRangeEditApply,
|
|
284
|
+
sx: {
|
|
285
|
+
"& .MuiDialogContent-root": {
|
|
286
|
+
padding: 0
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
children: [
|
|
290
|
+
p,
|
|
291
|
+
/* @__PURE__ */ e(
|
|
292
|
+
J,
|
|
293
|
+
{
|
|
294
|
+
copy: a.dateRangePickerCopy,
|
|
295
|
+
dateRange: C,
|
|
296
|
+
onRangeChanged: y,
|
|
297
|
+
selectedShortcut: i,
|
|
298
|
+
sx: {
|
|
299
|
+
pt: 0,
|
|
300
|
+
"& .MuiPickersLayout-toolbar": {
|
|
301
|
+
gridColumn: "1/4"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
] });
|
|
310
|
+
}, we = Ie, ze = re(
|
|
311
|
+
({ calendarActions: o, dateRange: d, dateRangeVariant: a }) => {
|
|
312
|
+
const { displayedDateRange: m } = oe(), { common: r } = ne(), n = {
|
|
313
|
+
dateRangePickerCopy: {
|
|
314
|
+
dateRangeFrom: r.date_range_picker.from,
|
|
315
|
+
dateRangeTo: r.date_range_picker.to,
|
|
316
|
+
dateRangeCustom: r.date_range_picker.custom,
|
|
317
|
+
dateRangeSelectARange: r.date_range_picker.select_range,
|
|
318
|
+
dateRangeThisMonth: r.date_range_picker.this_month,
|
|
319
|
+
dateRangeLastMonth: r.date_range_picker.last_month,
|
|
320
|
+
dateRangeLast30Days: r.date_range_picker.last_30_days,
|
|
321
|
+
dateRangeLast90Days: r.date_range_picker.last_90_days,
|
|
322
|
+
dateRangeYTD: r.date_range_picker.ytd,
|
|
323
|
+
dateRangeLastYear: r.date_range_picker.last_year,
|
|
324
|
+
dateRangeSelect: r.date_range_picker.select
|
|
325
|
+
},
|
|
326
|
+
dateRangeEditApply: r.date_range_picker.edit_apply,
|
|
327
|
+
dateRangeEditTitle: r.date_range_picker.edit_title,
|
|
328
|
+
dateRangeNextAria: r.date_range_picker.next_aria,
|
|
329
|
+
dateRangePreviousAria: r.date_range_picker.previous_aria
|
|
330
|
+
}, u = d ? d.start : m.start, c = d ? d.end : m.end;
|
|
331
|
+
return /* @__PURE__ */ e(
|
|
332
|
+
we,
|
|
333
|
+
{
|
|
334
|
+
calendarActions: o,
|
|
335
|
+
copy: n,
|
|
336
|
+
range: [u, c],
|
|
337
|
+
shouldShrinkToIcon: !1,
|
|
338
|
+
variant: a
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
), St = re(
|
|
343
|
+
({
|
|
344
|
+
actions: o,
|
|
345
|
+
allowedAccountTypes: d,
|
|
346
|
+
calendarActions: a,
|
|
347
|
+
children: m,
|
|
348
|
+
className: r = "mx-cmn-widget",
|
|
349
|
+
dateRange: n,
|
|
350
|
+
dateRangeVariant: u,
|
|
351
|
+
hasDivider: c = !1,
|
|
352
|
+
onAccountsFilterClick: P,
|
|
353
|
+
onBackClick: p,
|
|
354
|
+
onMenuClick: s,
|
|
355
|
+
showAccountFilter: _ = !0,
|
|
356
|
+
slotComponent: i,
|
|
357
|
+
sx: F = {},
|
|
358
|
+
title: C = ""
|
|
359
|
+
}) => {
|
|
360
|
+
const [B, { height: E, width: k }] = ue(), { onEvent: H } = ge(), {
|
|
361
|
+
actionsFlex: W,
|
|
362
|
+
containerSquareCorners: S,
|
|
363
|
+
headerHeadingLevel: j,
|
|
364
|
+
headerPaddingBottom: O,
|
|
365
|
+
headerPaddingTop: $,
|
|
366
|
+
headerPaddingX: N,
|
|
367
|
+
iconSize: L,
|
|
368
|
+
isCompact: y,
|
|
369
|
+
isDesktop: Y,
|
|
370
|
+
slotSx: t
|
|
371
|
+
} = Ne(k), { isCopyLoaded: l } = oe(), { common: g } = ne(), {
|
|
372
|
+
config: { display_widget_headings: b }
|
|
373
|
+
} = he(), R = () => {
|
|
374
|
+
p && (p(), H(Oe.WIDGET_BACK_CLICK));
|
|
375
|
+
};
|
|
376
|
+
if (!l)
|
|
377
|
+
return /* @__PURE__ */ e(Be, {});
|
|
378
|
+
const T = () => y && s ? /* @__PURE__ */ e(K, { color: "primary", onClick: s, sx: { p: 10 }, children: /* @__PURE__ */ e(D, { name: "menu_open", size: L, sx: { transform: "rotate(180deg)" } }) }) : p ? /* @__PURE__ */ e(
|
|
379
|
+
K,
|
|
380
|
+
{
|
|
381
|
+
"aria-label": g.back_to_dashboard,
|
|
382
|
+
color: "primary",
|
|
383
|
+
onClick: R,
|
|
384
|
+
sx: { p: 10 },
|
|
385
|
+
children: /* @__PURE__ */ e(ce, { size: 24 })
|
|
386
|
+
}
|
|
387
|
+
) : null, x = a && /* @__PURE__ */ e(A, { alignItems: "center", sx: t, children: /* @__PURE__ */ e(
|
|
388
|
+
ze,
|
|
389
|
+
{
|
|
390
|
+
calendarActions: a,
|
|
391
|
+
dateRange: n,
|
|
392
|
+
dateRangeVariant: u
|
|
393
|
+
}
|
|
394
|
+
) });
|
|
395
|
+
return /* @__PURE__ */ e(
|
|
396
|
+
me,
|
|
397
|
+
{
|
|
398
|
+
className: r,
|
|
399
|
+
elevation: 1,
|
|
400
|
+
ref: B,
|
|
401
|
+
square: S,
|
|
402
|
+
sx: { borderBottomLeftRadius: 0, borderBottomRightRadius: 0, margin: 0, ...F },
|
|
403
|
+
children: /* @__PURE__ */ f(se, { children: [
|
|
404
|
+
/* @__PURE__ */ f(
|
|
405
|
+
A,
|
|
406
|
+
{
|
|
407
|
+
alignItems: "center",
|
|
408
|
+
alignSelf: "stretch",
|
|
409
|
+
direction: "row",
|
|
410
|
+
justifyContent: "space-between",
|
|
411
|
+
sx: {
|
|
412
|
+
pb: O,
|
|
413
|
+
pt: $,
|
|
414
|
+
px: N
|
|
415
|
+
},
|
|
416
|
+
children: [
|
|
417
|
+
T(),
|
|
418
|
+
/* @__PURE__ */ e(A, { alignItems: "flex-start", minWidth: 0, sx: { flex: 1 }, children: b && /* @__PURE__ */ e(G, { sx: { width: "100%" }, truncate: !0, variant: j, children: C }) }),
|
|
419
|
+
!y && (i || x),
|
|
420
|
+
/* @__PURE__ */ f(
|
|
421
|
+
A,
|
|
422
|
+
{
|
|
423
|
+
alignItems: "center",
|
|
424
|
+
direction: "row",
|
|
425
|
+
justifyContent: "flex-end",
|
|
426
|
+
sx: { flex: W, flexShrink: 0 },
|
|
427
|
+
children: [
|
|
428
|
+
_ && /* @__PURE__ */ e(
|
|
429
|
+
pe,
|
|
430
|
+
{
|
|
431
|
+
allowedAccountTypes: d,
|
|
432
|
+
isDesktop: Y,
|
|
433
|
+
onAccountFilterClick: P
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
o?.map((q) => {
|
|
437
|
+
if (h.isValidElement(q))
|
|
438
|
+
return h.cloneElement(q, { isDesktop: Y });
|
|
439
|
+
const { iconName: I, onClick: X, label: U } = q;
|
|
440
|
+
return Y ? /* @__PURE__ */ e(
|
|
441
|
+
z,
|
|
442
|
+
{
|
|
443
|
+
onClick: X,
|
|
444
|
+
startIcon: /* @__PURE__ */ e(D, { name: I, size: L }),
|
|
445
|
+
children: U
|
|
446
|
+
},
|
|
447
|
+
I
|
|
448
|
+
) : /* @__PURE__ */ e(K, { "aria-label": U, color: "primary", onClick: X, children: /* @__PURE__ */ e(D, { name: I, size: L }) }, I);
|
|
449
|
+
})
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
)
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
),
|
|
456
|
+
y && (i || x),
|
|
457
|
+
y && c && /* @__PURE__ */ e(de, {}),
|
|
458
|
+
/* @__PURE__ */ e(le, { children: /* @__PURE__ */ e(fe, { availableHeight: E, availableWidth: k, children: m }) })
|
|
459
|
+
] })
|
|
460
|
+
}
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
);
|
|
464
|
+
export {
|
|
465
|
+
we as D,
|
|
466
|
+
St as W,
|
|
467
|
+
Ne as u
|
|
468
|
+
};
|