@mx-cartographer/experiences 9.2.7 → 9.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,7 @@ import it from "@mui/material/ListItem";
42
42
  import lt from "@mui/material/Popover";
43
43
  import { u as st } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
44
44
  import { L as ct } from "../Loader-CxeBwuPG.mjs";
45
- import { W as dt } from "../WidgetContainer-DvKtBdhn.mjs";
45
+ import { W as dt } from "../WidgetContainer-eosXfD5G.mjs";
46
46
  import { E as pt } from "../EmptyState-CJUDc3kD.mjs";
47
47
  import { C as ut } from "../ConnectDrawer-CW4LA3H3.mjs";
48
48
  function ht(r, n, o = 0) {
@@ -78,7 +78,7 @@ import So from "@mui/material/Accordion";
78
78
  import vo from "@mui/material/AccordionDetails";
79
79
  import wo from "@mui/material/AccordionSummary";
80
80
  import { u as ko } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
81
- import { W as Mo } from "../WidgetContainer-DvKtBdhn.mjs";
81
+ import { W as Mo } from "../WidgetContainer-eosXfD5G.mjs";
82
82
  const Ae = {
83
83
  creditScore: {
84
84
  poor: 600,
@@ -50,7 +50,7 @@ import { D as pt } from "../Dialog-Bvd2n8hz.mjs";
50
50
  import { u as Me } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
51
51
  import { A as $ } from "../Analytics-D-jdcL72.mjs";
52
52
  import { L as Le } from "../Loader-CxeBwuPG.mjs";
53
- import { W as ht } from "../WidgetContainer-DvKtBdhn.mjs";
53
+ import { W as ht } from "../WidgetContainer-eosXfD5G.mjs";
54
54
  import { E as bt } from "../EmptyState-CJUDc3kD.mjs";
55
55
  import ft from "@mui/material/Box";
56
56
  import { useTheme as gt } from "@mui/material/styles";
@@ -4,7 +4,7 @@ import { H as s } from "../Help-D4sOpItq.mjs";
4
4
  import { a } from "../hooks-97sNJ_lf.mjs";
5
5
  import { u as p } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
6
6
  import { L as d } from "../Loader-CxeBwuPG.mjs";
7
- import { W as f } from "../WidgetContainer-DvKtBdhn.mjs";
7
+ import { W as f } from "../WidgetContainer-eosXfD5G.mjs";
8
8
  const L = m(({ onBackClick: e, onMenuClick: i, sx: t }) => {
9
9
  const { isInitialized: o } = a();
10
10
  return p({
@@ -38,7 +38,7 @@ import { DataGridPro as $e } from "@mui/x-data-grid-pro";
38
38
  import { Stack as Pe } from "@mui/material";
39
39
  import { L as De } from "../Loader-CxeBwuPG.mjs";
40
40
  import { u as qe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
41
- import { W as Ke } from "../WidgetContainer-DvKtBdhn.mjs";
41
+ import { W as Ke } from "../WidgetContainer-eosXfD5G.mjs";
42
42
  import { c as Ye } from "../Account-DR7Plrqy.mjs";
43
43
  import { E as Qe } from "../EmptyState-CJUDc3kD.mjs";
44
44
  const me = ({ sx: t = {} }) => {
@@ -32,7 +32,7 @@ import xe from "@mui/material/Collapse";
32
32
  import K from "@mui/material/ListItemIcon";
33
33
  import { g as U } from "../NetWorthUtils-Dj7CgAg2.mjs";
34
34
  import { D as V } from "../Drawer-DsnW2o0v.mjs";
35
- import { W as ge } from "../WidgetContainer-DvKtBdhn.mjs";
35
+ import { W as ge } from "../WidgetContainer-eosXfD5G.mjs";
36
36
  import { E as ye } from "../EmptyState-CJUDc3kD.mjs";
37
37
  const Ce = ({ amount: t, copy: s, trendValue: i }) => {
38
38
  const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
@@ -58,7 +58,7 @@ import { D as ie } from "../Drawer-DsnW2o0v.mjs";
58
58
  import { S as Ae } from "../SkeletonLoader-BaNboJjD.mjs";
59
59
  import { u as oe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
60
60
  import { L as ae } from "../Loader-CxeBwuPG.mjs";
61
- import { W as Rt } from "../WidgetContainer-DvKtBdhn.mjs";
61
+ import { W as Rt } from "../WidgetContainer-eosXfD5G.mjs";
62
62
  import { M as Tt } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
63
63
  import { u as _t } from "../useDimensions-CeDR9V8N.mjs";
64
64
  import { M as Dt } from "../MicroWidgetContainer-B2NnKBgW.mjs";
@@ -42,7 +42,7 @@ import { ChevronRight as Le, ChevronLeft as Be } from "@mxenabled/mx-icons";
42
42
  import { D as He } from "../Drawer-DsnW2o0v.mjs";
43
43
  import { u as ne } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
44
44
  import { H as Oe } from "../Help-D4sOpItq.mjs";
45
- import { W as q } from "../WidgetContainer-DvKtBdhn.mjs";
45
+ import { W as q } from "../WidgetContainer-eosXfD5G.mjs";
46
46
  const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
47
47
  const i = L(), { common: o, settings: n } = k(), { isDesktop: u, isMobile: s, isSmallMobile: a, isTablet: l } = F(t), { config: b } = G(), { updateUser: _ } = E(), { user: d } = Ce(), [h, w] = m.useState({
48
48
  first_name: d.first_name,
@@ -31,7 +31,7 @@ import { D as tt } from "../Drawer-DsnW2o0v.mjs";
31
31
  import { C as I } from "../Category-DEKZGLYe.mjs";
32
32
  import { parseISO as et } from "date-fns/parseISO";
33
33
  import { A as nt } from "../Analytics-D-jdcL72.mjs";
34
- import { W as It } from "../WidgetContainer-DvKtBdhn.mjs";
34
+ import { W as It } from "../WidgetContainer-eosXfD5G.mjs";
35
35
  const V = ({ amount: n, label: s, variant: o = "full" }) => /* @__PURE__ */ p(S, { direction: "column", children: [
36
36
  /* @__PURE__ */ t(D, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: s }),
37
37
  /* @__PURE__ */ t(D, { variant: "caption", children: B(n, o === "mini" ? "0,0" : "0,0.00") })
@@ -37,7 +37,7 @@ import { u as ut } from "../useAriaLive-MkYebyUR.mjs";
37
37
  import { S as mt } from "../SkeletonLoader-BaNboJjD.mjs";
38
38
  import { u as _t } from "../useScreenSize-mWpmnh5w.mjs";
39
39
  import { u as pt } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
40
- import { W as gt } from "../WidgetContainer-DvKtBdhn.mjs";
40
+ import { W as gt } from "../WidgetContainer-eosXfD5G.mjs";
41
41
  import { S as ht } from "../SearchBox-Cpgu_gdO.mjs";
42
42
  import { D as te } from "../Drawer-DsnW2o0v.mjs";
43
43
  const ft = (t) => /* @__PURE__ */ m(y, { tabIndex: t.tabIndex, variant: "body2", children: [
@@ -39,7 +39,7 @@ import { T as dt } from "../TransactionDetails-CLc7oeHT.mjs";
39
39
  import { D as Pe } from "../Drawer-DsnW2o0v.mjs";
40
40
  import { u as Ie } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
41
41
  import { L as Le } from "../Loader-CxeBwuPG.mjs";
42
- import { W as ut } from "../WidgetContainer-DvKtBdhn.mjs";
42
+ import { W as ut } from "../WidgetContainer-eosXfD5G.mjs";
43
43
  import { L as Ve } from "../LineChart-CUfiH86G.mjs";
44
44
  import { M as Zt } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
45
45
  import { subMonths as Qt } from "date-fns";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.2.7",
3
+ "version": "9.2.8",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,487 +0,0 @@
1
- import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
- import p from "react";
3
- import { observer as ie } from "mobx-react-lite";
4
- import z from "@mui/material/Button";
5
- import pe from "@mui/material/Card";
6
- import he from "@mui/material/CardContent";
7
- import ge from "@mui/material/Divider";
8
- import $ from "@mui/material/IconButton";
9
- import fe from "@mui/material/Paper";
10
- import Y from "@mui/material/Stack";
11
- import { ChevronLeft as be } from "@mxenabled/mx-icons";
12
- import { Icon as x, Text as F, DateRangePicker as Z } from "@mxenabled/mxui";
13
- import { u as J } from "./useDimensions-CeDR9V8N.mjs";
14
- import { G as _e } from "./GlobalAccountFilter-z4N1ElqC.mjs";
15
- import { a as se, u as le, f as Re, i as Ce, W as xe } from "./hooks-97sNJ_lf.mjs";
16
- import { addMonths as ee } from "date-fns/addMonths";
17
- import { addDays as De } from "date-fns/addDays";
18
- import { addYears as te } from "date-fns/addYears";
19
- import { differenceInCalendarDays as ke } from "date-fns/differenceInCalendarDays";
20
- import { endOfDay as ye } from "date-fns/endOfDay";
21
- import { endOfMonth as H } from "date-fns/endOfMonth";
22
- import { endOfToday as ae } from "date-fns/endOfToday";
23
- import { endOfYear as Te } from "date-fns/endOfYear";
24
- import { startOfMonth as ve } from "date-fns/startOfMonth";
25
- import { startOfToday as Me } from "date-fns/startOfToday";
26
- import { startOfYear as Pe } from "date-fns/startOfYear";
27
- import { subMonths as K } from "date-fns/subMonths";
28
- import { subDays as Se } from "date-fns/subDays";
29
- import { subYears as re } from "date-fns/subYears";
30
- import oe from "@mui/material/Box";
31
- import Ee from "@mui/material/ButtonGroup";
32
- import Ye from "@mui/material/Tab";
33
- import Le from "@mui/material/Tabs";
34
- import Ae from "@mui/material/ToggleButton";
35
- import we from "@mui/material/ToggleButtonGroup";
36
- import { useTheme as Be } from "@mui/material/styles";
37
- import { u as Ne } from "./useAriaLive-MkYebyUR.mjs";
38
- import { D as Oe } from "./Dialog-Bvd2n8hz.mjs";
39
- import { D as Ie } from "./Drawer-DsnW2o0v.mjs";
40
- import { u as de } from "./useScreenSize-mWpmnh5w.mjs";
41
- import { f as M, D as P } from "./DateFormats-HudZ3Bjs.mjs";
42
- import { L as We } from "./Loader-CxeBwuPG.mjs";
43
- import Ge from "@mui/material/useMediaQuery";
44
- import { A as ne } from "./Analytics-D-jdcL72.mjs";
45
- const He = (n) => {
46
- const { isDesktop: d, isMobile: a, isSmallTablet: m, isTablet: r } = de(n), s = Ge("(min-width:900px)"), _ = 24;
47
- let l = 48, D = 32, g = 0, c = "h1", R = !1;
48
- const o = a || m;
49
- r && !m ? (l = 24, D = 24, c = "h2") : o && (l = 8, D = 10, g = 10, c = "h3", R = !0);
50
- const S = {
51
- pb: o ? 12 : 0,
52
- ...o && {
53
- px: l,
54
- "& .mx-cmn-date-range-selector": { m: 0, width: "100%" },
55
- "& .mx-cmn-date-range-selector > .MuiBox-root": { display: "flex", justifyContent: "center" },
56
- "& .MuiButtonGroup-root": { width: "100%" },
57
- "& .MuiButtonGroup-middleButton": { flex: 1 },
58
- "& .MuiToggleButtonGroup-root": { width: "100%", justifyContent: "center" }
59
- }
60
- };
61
- return {
62
- actionsFlex: o ? 0 : 1,
63
- containerSquareCorners: R,
64
- headerHeadingLevel: c,
65
- headerPaddingBottom: g,
66
- headerPaddingTop: D,
67
- headerPaddingX: l,
68
- iconSize: _,
69
- isCompact: o,
70
- isDesktop: d,
71
- isViewportAbove900: s,
72
- slotSx: S
73
- };
74
- }, ze = ({
75
- calendarActions: n,
76
- color: d = "primary",
77
- copy: a,
78
- range: m = [ve(Me()), H(ae())],
79
- shouldShrinkToIcon: r = !0,
80
- variant: s = "outlined"
81
- }) => {
82
- const _ = Be(), { isMobile: l } = de(), { announce: D, ariaLive: g } = Ne(), [c, R] = p.useState(m), [o, S] = p.useState(a.dateRangePickerCopy.dateRangeThisMonth), [C, L] = p.useState(c), [E, k] = p.useState(!1), [j, A] = p.useState(!0), [y, w] = p.useState(6), B = {
83
- buttons: [
84
- { ariaLabel: "3 Months", label: "3M", value: 3 },
85
- { ariaLabel: "6 Months", label: "6M", value: 6 },
86
- { ariaLabel: "9 Months", label: "9M", value: 9 },
87
- { ariaLabel: "1 Year", label: "1Y", value: 12 }
88
- ],
89
- tabs: [
90
- { label: "3 Months", value: 3 },
91
- { label: "6 Months", value: 6 },
92
- { label: "9 Months", value: 9 },
93
- { label: "1 Year", value: 12 }
94
- ]
95
- };
96
- p.useEffect(() => {
97
- R(m), L(m);
98
- }, [m]), p.useEffect(() => {
99
- (s === "timeframebuttons" || s === "timeframetabs") && n.onRangeChanged(V());
100
- }, [y]);
101
- const V = () => {
102
- const t = H(ae());
103
- return [H(K(t, y)), t];
104
- }, N = (t) => {
105
- const [i, u] = c, f = t === "previous";
106
- let b;
107
- if (o === a.dateRangePickerCopy.dateRangeThisMonth || o === a.dateRangePickerCopy.dateRangeLastMonth)
108
- b = [
109
- f ? K(i, 1) : ee(i, 1),
110
- H(f ? K(u, 1) : ee(u, 1))
111
- ];
112
- else if (o === a.dateRangePickerCopy.dateRangeYTD || o === a.dateRangePickerCopy.dateRangeLastYear) {
113
- const T = Pe(i), v = Te(i);
114
- b = [
115
- f ? re(T, 1) : te(T, 1),
116
- f ? re(v, 1) : te(v, 1)
117
- ];
118
- } else {
119
- const T = ke(u, i), v = f ? Se : De;
120
- b = [v(i, T), v(u, T)];
121
- }
122
- R(b), n.onRangeChanged(b);
123
- }, O = () => {
124
- R(C), A(
125
- o === a.dateRangePickerCopy.dateRangeThisMonth || o === a.dateRangePickerCopy.dateRangeLastMonth
126
- ), n.onRangeChanged(C);
127
- }, I = (t, i) => {
128
- t[1] = t[1] ?? t[0];
129
- const u = [t[0], t[1] ? ye(t[1]) : t[1]], f = M(u[0], P.MONTH_DAY_YEAR), b = M(u[1], P.MONTH_DAY_YEAR);
130
- L(u), S(i), D(`${a.dateRangeEditTitle}: ${f} - ${b}`);
131
- }, W = (t) => {
132
- w(t), n.onTimeframeClick?.(t);
133
- };
134
- return /* @__PURE__ */ h(oe, { className: "mx-cmn-date-range-selector", m: 4, children: [
135
- /* @__PURE__ */ h(
136
- oe,
137
- {
138
- sx: {
139
- [_.breakpoints.down("sm")]: {
140
- display: r ? "none" : "flex",
141
- justifyContent: "center"
142
- },
143
- [_.breakpoints.up("sm")]: { display: "inline-flex" }
144
- },
145
- children: [
146
- s === "readonly" && /* @__PURE__ */ h(Y, { alignItems: "center", direction: "row", gap: 8, children: [
147
- /* @__PURE__ */ e(x, { name: "calendar_month", size: 24 }),
148
- /* @__PURE__ */ e(F, { bold: !0, children: M(C[0], P.MONTH_DAY) }),
149
- /* @__PURE__ */ e(x, { name: "remove" }),
150
- /* @__PURE__ */ e(F, { bold: !0, children: M(C[1], P.MONTH_DAY_YEAR) })
151
- ] }),
152
- s !== "readonly" && s !== "timeframebuttons" && s !== "timeframetabs" && /* @__PURE__ */ h(
153
- Ee,
154
- {
155
- color: d,
156
- sx: {
157
- "& .MuiButtonGroup-grouped": {
158
- padding: l ? 0 : 12
159
- },
160
- "& .MuiButtonGroup-middleButton": {
161
- px: 24
162
- },
163
- height: 44
164
- },
165
- variant: s,
166
- children: [
167
- /* @__PURE__ */ e(
168
- z,
169
- {
170
- "aria-disabled": n.shouldDisablePrevious,
171
- "aria-label": a.dateRangePreviousAria,
172
- color: n.shouldDisablePrevious ? "secondary" : "primary",
173
- onClick: () => n.shouldDisablePrevious ? null : N("previous"),
174
- children: /* @__PURE__ */ e(x, { name: "chevron_left", size: 20 })
175
- }
176
- ),
177
- /* @__PURE__ */ e(
178
- z,
179
- {
180
- "aria-disabled": n.shouldDisablePicker,
181
- color: d,
182
- onClick: () => n.shouldDisablePicker ? null : k(!0),
183
- startIcon: /* @__PURE__ */ e(x, { name: "calendar_month", size: 20 }),
184
- sx: {
185
- p: l ? 0 : 8
186
- },
187
- children: j ? M(c[0], P.MONTH_YEAR) : /* @__PURE__ */ h("span", { children: [
188
- M(c[0], P.MONTH_DAY_YEAR),
189
- " -",
190
- " ",
191
- M(c[1], P.MONTH_DAY_YEAR)
192
- ] })
193
- }
194
- ),
195
- /* @__PURE__ */ e(
196
- z,
197
- {
198
- "aria-disabled": n.shouldDisableNext,
199
- "aria-label": a.dateRangeNextAria,
200
- color: n.shouldDisableNext ? "secondary" : "primary",
201
- onClick: () => n.shouldDisableNext ? null : N("next"),
202
- children: /* @__PURE__ */ e(x, { name: "chevron_right", size: 20 })
203
- }
204
- )
205
- ]
206
- }
207
- ),
208
- s === "timeframebuttons" && /* @__PURE__ */ e(
209
- we,
210
- {
211
- "aria-label": a.dateRangeEditTitle,
212
- color: d,
213
- exclusive: !0,
214
- orientation: "horizontal",
215
- value: y,
216
- children: B.buttons.map((t) => /* @__PURE__ */ e(
217
- Ae,
218
- {
219
- "aria-label": t.ariaLabel,
220
- onClick: () => W(t.value),
221
- sx: { width: 56 },
222
- value: t.value,
223
- children: t.label
224
- },
225
- t.label
226
- ))
227
- }
228
- ),
229
- s === "timeframetabs" && /* @__PURE__ */ e(
230
- Le,
231
- {
232
- indicatorColor: "primary",
233
- onChange: (t, i) => W(i),
234
- textColor: "primary",
235
- value: y,
236
- variant: "fullWidth",
237
- children: B.tabs.map((t) => /* @__PURE__ */ e(
238
- Ye,
239
- {
240
- label: /* @__PURE__ */ e(F, { bold: !0, variant: "body1", children: t.label }),
241
- sx: { minWidth: 80 },
242
- value: t.value
243
- },
244
- t.label
245
- ))
246
- }
247
- )
248
- ]
249
- }
250
- ),
251
- E && l && /* @__PURE__ */ h(
252
- Ie,
253
- {
254
- ariaLabelClose: a.dateRangeCloseAria,
255
- isOpen: E,
256
- onClose: () => k(!1),
257
- onPrimaryAction: () => {
258
- O(), k(!1);
259
- },
260
- primaryText: a.dateRangeEditApply,
261
- title: a.dateRangeEditTitle,
262
- children: [
263
- g,
264
- /* @__PURE__ */ e(
265
- Z,
266
- {
267
- copy: a.dateRangePickerCopy,
268
- dateRange: C,
269
- onRangeChanged: I,
270
- selectedShortcut: o,
271
- sx: { p: 0 }
272
- }
273
- )
274
- ]
275
- }
276
- ),
277
- E && !l && /* @__PURE__ */ h(
278
- Oe,
279
- {
280
- copy: { title: a.dateRangeEditTitle },
281
- isOpen: !0,
282
- maxWidth: "sm",
283
- onClose: () => k(!1),
284
- onPrimaryAction: () => O(),
285
- primaryText: a.dateRangeEditApply,
286
- sx: {
287
- "& .MuiDialogContent-root": {
288
- padding: 0
289
- },
290
- "& .MuiDialog-paper": {
291
- minWidth: "max-content"
292
- }
293
- },
294
- children: [
295
- g,
296
- /* @__PURE__ */ e(
297
- Z,
298
- {
299
- copy: a.dateRangePickerCopy,
300
- dateRange: C,
301
- onRangeChanged: I,
302
- selectedShortcut: o,
303
- sx: {
304
- pt: 0,
305
- "& .MuiPickersLayout-toolbar": {
306
- gridColumn: "1/4"
307
- }
308
- }
309
- }
310
- )
311
- ]
312
- }
313
- )
314
- ] });
315
- }, Fe = ie(
316
- ({ calendarActions: n, dateRange: d, dateRangeVariant: a }) => {
317
- const { displayedDateRange: m } = se(), { common: r } = le(), s = {
318
- dateRangePickerCopy: {
319
- dateRangeFrom: r.date_range_picker.from,
320
- dateRangeTo: r.date_range_picker.to,
321
- dateRangeCustom: r.date_range_picker.custom,
322
- dateRangeSelectARange: r.date_range_picker.select_range,
323
- dateRangeThisMonth: r.date_range_picker.this_month,
324
- dateRangeLastMonth: r.date_range_picker.last_month,
325
- dateRangeLast30Days: r.date_range_picker.last_30_days,
326
- dateRangeLast90Days: r.date_range_picker.last_90_days,
327
- dateRangeYTD: r.date_range_picker.ytd,
328
- dateRangeLastYear: r.date_range_picker.last_year,
329
- dateRangeSelect: r.date_range_picker.select
330
- },
331
- dateRangeEditApply: r.date_range_picker.edit_apply,
332
- dateRangeEditTitle: r.date_range_picker.edit_title,
333
- dateRangeNextAria: r.date_range_picker.next_aria,
334
- dateRangePreviousAria: r.date_range_picker.previous_aria
335
- }, _ = d ? d.start : m.start, l = d ? d.end : m.end;
336
- return /* @__PURE__ */ e(
337
- ze,
338
- {
339
- calendarActions: n,
340
- copy: s,
341
- range: [_, l],
342
- shouldShrinkToIcon: !1,
343
- variant: a
344
- }
345
- );
346
- }
347
- ), wt = ie(
348
- ({
349
- actions: n,
350
- allowedAccountTypes: d,
351
- calendarActions: a,
352
- children: m,
353
- className: r = "mx-cmn-widget",
354
- dateRange: s,
355
- dateRangeVariant: _,
356
- hasDivider: l = !1,
357
- onAccountsFilterClick: D,
358
- onBackClick: g,
359
- onMenuClick: c,
360
- showAccountFilter: R = !0,
361
- slotComponent: o,
362
- sx: S = {},
363
- title: C = ""
364
- }) => {
365
- const [L, { height: E, width: k }] = J(), [j, { height: A, width: y }] = J(), { onEvent: w } = Re(), {
366
- actionsFlex: B,
367
- containerSquareCorners: V,
368
- headerHeadingLevel: N,
369
- headerPaddingBottom: O,
370
- headerPaddingTop: I,
371
- headerPaddingX: W,
372
- iconSize: t,
373
- isCompact: i,
374
- isDesktop: u,
375
- isViewportAbove900: f,
376
- slotSx: b
377
- } = He(k), { isCopyLoaded: T } = se(), { common: v } = le(), {
378
- config: { display_widget_headings: me }
379
- } = Ce(), ce = () => {
380
- g && (g(), w(ne.WIDGET_BACK_CLICK));
381
- };
382
- if (p.useEffect(() => {
383
- w(ne.WIDGET_SIZE_CHANGED, {
384
- height: A,
385
- width: y
386
- });
387
- }, [A, y]), !T)
388
- return /* @__PURE__ */ e(We, {});
389
- const ue = () => c && i && !f ? /* @__PURE__ */ e($, { color: "primary", onClick: c, sx: { p: 10 }, children: /* @__PURE__ */ e(x, { name: "menu_open", size: t, sx: { transform: "rotate(180deg)" } }) }) : g ? /* @__PURE__ */ e(
390
- $,
391
- {
392
- "aria-label": v.back_to_dashboard,
393
- color: "primary",
394
- onClick: ce,
395
- sx: { p: 10 },
396
- children: /* @__PURE__ */ e(be, { size: 24 })
397
- }
398
- ) : null, X = a && /* @__PURE__ */ e(Y, { alignItems: "center", sx: b, children: /* @__PURE__ */ e(
399
- Fe,
400
- {
401
- calendarActions: a,
402
- dateRange: s,
403
- dateRangeVariant: _
404
- }
405
- ) });
406
- return /* @__PURE__ */ e(
407
- fe,
408
- {
409
- className: r,
410
- elevation: 1,
411
- ref: L,
412
- square: V,
413
- sx: {
414
- borderBottomLeftRadius: 0,
415
- borderBottomRightRadius: 0,
416
- margin: 0,
417
- overflowY: "auto",
418
- height: "100%",
419
- ...S
420
- },
421
- children: /* @__PURE__ */ h(pe, { children: [
422
- /* @__PURE__ */ h(
423
- Y,
424
- {
425
- alignItems: "center",
426
- alignSelf: "stretch",
427
- direction: "row",
428
- justifyContent: "space-between",
429
- sx: {
430
- pb: O,
431
- pt: I,
432
- px: W
433
- },
434
- children: [
435
- ue(),
436
- /* @__PURE__ */ e(Y, { alignItems: "flex-start", minWidth: 0, sx: { flex: 1 }, children: me && /* @__PURE__ */ e(F, { sx: { width: "100%" }, truncate: !0, variant: N, children: C }) }),
437
- !i && (o || X),
438
- /* @__PURE__ */ h(
439
- Y,
440
- {
441
- alignItems: "center",
442
- direction: "row",
443
- justifyContent: "flex-end",
444
- sx: { flex: B, flexShrink: 0 },
445
- children: [
446
- R && /* @__PURE__ */ e(
447
- _e,
448
- {
449
- allowedAccountTypes: d,
450
- isDesktop: u,
451
- onAccountFilterClick: D
452
- }
453
- ),
454
- n?.map((q) => {
455
- if (p.isValidElement(q))
456
- return p.cloneElement(q, { isDesktop: u });
457
- const { iconName: G, onClick: Q, label: U } = q;
458
- return u ? /* @__PURE__ */ e(
459
- z,
460
- {
461
- onClick: Q,
462
- startIcon: /* @__PURE__ */ e(x, { name: G, size: t }),
463
- children: U
464
- },
465
- G
466
- ) : /* @__PURE__ */ e($, { "aria-label": U, color: "primary", onClick: Q, children: /* @__PURE__ */ e(x, { name: G, size: t }) }, G);
467
- })
468
- ]
469
- }
470
- )
471
- ]
472
- }
473
- ),
474
- i && (o || X),
475
- i && l && /* @__PURE__ */ e(ge, {}),
476
- /* @__PURE__ */ e(he, { ref: j, sx: { p: 0 }, children: /* @__PURE__ */ e(xe, { availableHeight: E, availableWidth: k, children: m }) })
477
- ] })
478
- }
479
- );
480
- }
481
- );
482
- export {
483
- ze as D,
484
- wt as W,
485
- He as u
486
- };
487
- //# sourceMappingURL=WidgetContainer-DvKtBdhn.mjs.map