@mx-cartographer/experiences 7.4.6-alpha.mm0 → 7.4.6-alpha.mm1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/index.es.js +42 -42
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
3
|
import { observer as _ } from "mobx-react-lite";
|
|
4
4
|
import h from "@mui/material/Unstable_Grid2";
|
|
5
5
|
import d from "@mui/material/Skeleton";
|
|
6
6
|
import s from "@mui/material/Stack";
|
|
7
|
-
import
|
|
7
|
+
import z from "@mui/material/styles/useTheme";
|
|
8
8
|
import { g as A, a as v, e as C, c as M, b as k } from "../hooks-DtrRa6Lb.mjs";
|
|
9
9
|
import B from "@mui/material/Paper";
|
|
10
10
|
import { Icon as S, H1 as G, P as F } from "@mxenabled/mxui";
|
|
@@ -15,15 +15,15 @@ import $ from "@mui/material/IconButton";
|
|
|
15
15
|
import H from "@mui/material/Tooltip";
|
|
16
16
|
import R from "@mui/material/useMediaQuery";
|
|
17
17
|
import { k as j, l as Q } from "../ConnectDrawer-g2IXvoSS.mjs";
|
|
18
|
-
import { u as
|
|
18
|
+
import { u as D } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
19
19
|
import { u as E } from "../useWidgetLoadTimer-C4tYP28Y.mjs";
|
|
20
20
|
const N = _(() => {
|
|
21
|
-
const
|
|
21
|
+
const t = z(), {
|
|
22
22
|
appDataStore: { banner: r, loadBanner: i, user: u }
|
|
23
23
|
} = A();
|
|
24
24
|
return c.useEffect(() => {
|
|
25
25
|
i().finally();
|
|
26
|
-
}, [u]), r?.image_url ? /* @__PURE__ */
|
|
26
|
+
}, [u]), r?.image_url ? /* @__PURE__ */ e(
|
|
27
27
|
s,
|
|
28
28
|
{
|
|
29
29
|
sx: {
|
|
@@ -31,7 +31,7 @@ const N = _(() => {
|
|
|
31
31
|
width: "100%",
|
|
32
32
|
mb: 24
|
|
33
33
|
},
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ e(
|
|
35
35
|
"a",
|
|
36
36
|
{
|
|
37
37
|
href: r?.redirect_url,
|
|
@@ -40,7 +40,7 @@ const N = _(() => {
|
|
|
40
40
|
width: "100%"
|
|
41
41
|
},
|
|
42
42
|
target: "_blank",
|
|
43
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ e(
|
|
44
44
|
"img",
|
|
45
45
|
{
|
|
46
46
|
alt: "",
|
|
@@ -48,7 +48,7 @@ const N = _(() => {
|
|
|
48
48
|
style: {
|
|
49
49
|
width: "100%",
|
|
50
50
|
height: "auto",
|
|
51
|
-
border: `1px solid ${
|
|
51
|
+
border: `1px solid ${t.palette.grey[300]}`
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
)
|
|
@@ -56,9 +56,9 @@ const N = _(() => {
|
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
58
|
) : null;
|
|
59
|
-
}), P = ({ handleConnectClick:
|
|
59
|
+
}), P = ({ handleConnectClick: t }) => {
|
|
60
60
|
const { common: r } = v(), i = R("(max-width: 700px)");
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ e(T, { my: 4, children: i ? /* @__PURE__ */ e(H, { id: "add-accounts", placement: "bottom", title: r.add_accounts, children: /* @__PURE__ */ e(
|
|
62
62
|
$,
|
|
63
63
|
{
|
|
64
64
|
"aria-controls": "add_accounts",
|
|
@@ -66,17 +66,17 @@ const N = _(() => {
|
|
|
66
66
|
"aria-haspopup": !0,
|
|
67
67
|
"aria-label": r.add_accounts,
|
|
68
68
|
color: "primary",
|
|
69
|
-
onClick:
|
|
70
|
-
children: /* @__PURE__ */
|
|
69
|
+
onClick: t,
|
|
70
|
+
children: /* @__PURE__ */ e(S, { name: "add", size: 24 })
|
|
71
71
|
}
|
|
72
|
-
) }) : /* @__PURE__ */
|
|
72
|
+
) }) : /* @__PURE__ */ e(
|
|
73
73
|
I,
|
|
74
74
|
{
|
|
75
75
|
"aria-controls": "add_accounts",
|
|
76
76
|
"aria-haspopup": !0,
|
|
77
77
|
"aria-label": r.add_accounts,
|
|
78
|
-
onClick:
|
|
79
|
-
startIcon: /* @__PURE__ */
|
|
78
|
+
onClick: t,
|
|
79
|
+
startIcon: /* @__PURE__ */ e(S, { name: "add", size: 24 }),
|
|
80
80
|
sx: {
|
|
81
81
|
p: 12,
|
|
82
82
|
whiteSpace: "nowrap",
|
|
@@ -87,7 +87,7 @@ const N = _(() => {
|
|
|
87
87
|
}
|
|
88
88
|
) });
|
|
89
89
|
}, O = _(P), U = () => {
|
|
90
|
-
const [
|
|
90
|
+
const [t, r] = c.useState(!1), i = W("(max-width:320px)"), { visibleAccounts: u } = C(), { selectedAccountGuids: g, setSelectedAccountGuids: b } = M(), { common: o, connect: l } = v(), { config: m } = k(), { isMobile: x } = D(), n = {
|
|
91
91
|
accountFilterOptionsCopy: {
|
|
92
92
|
accountTypeAccounts: o.account_filter.account_type_accounts,
|
|
93
93
|
cancelButton: o.cancel_button,
|
|
@@ -106,14 +106,14 @@ const N = _(() => {
|
|
|
106
106
|
return p > 1 && p < 12 ? o.good_morning : p >= 12 && p < 18 ? o.good_afternoon : o.good_evening;
|
|
107
107
|
};
|
|
108
108
|
return /* @__PURE__ */ a(c.Fragment, { children: [
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ e(B, { sx: { gap: 12, mb: x ? 24 : 0, p: 24 }, children: /* @__PURE__ */ a(s, { alignItems: "center", flexDirection: "row", justifyContent: "space-between", children: [
|
|
110
110
|
/* @__PURE__ */ a(s, { children: [
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ e(G, { variant: i ? "H2" : "H1", children: w() }),
|
|
112
|
+
/* @__PURE__ */ e(F, { color: "text.secondary", children: o.heres_your_spending_overview })
|
|
113
113
|
] }),
|
|
114
114
|
/* @__PURE__ */ a(s, { flexDirection: "row", children: [
|
|
115
|
-
m.show_connections_widget_in_master && /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
115
|
+
m.show_connections_widget_in_master && /* @__PURE__ */ e(O, { handleConnectClick: () => r(!0) }),
|
|
116
|
+
/* @__PURE__ */ e(
|
|
117
117
|
j,
|
|
118
118
|
{
|
|
119
119
|
accounts: u,
|
|
@@ -132,28 +132,28 @@ const N = _(() => {
|
|
|
132
132
|
)
|
|
133
133
|
] })
|
|
134
134
|
] }) }),
|
|
135
|
-
|
|
135
|
+
t && /* @__PURE__ */ e(
|
|
136
136
|
Q,
|
|
137
137
|
{
|
|
138
138
|
onClose: () => r(!1),
|
|
139
|
-
showConnectWidget:
|
|
139
|
+
showConnectWidget: t,
|
|
140
140
|
title: l.mini_title
|
|
141
141
|
}
|
|
142
142
|
)
|
|
143
143
|
] });
|
|
144
144
|
}, q = _(U);
|
|
145
|
-
var f = /* @__PURE__ */ ((
|
|
146
|
-
const J = ({ widgets:
|
|
147
|
-
const { isDesktop: i, isMobile: u } =
|
|
148
|
-
c.useEffect(() => {
|
|
145
|
+
var f = /* @__PURE__ */ ((t) => (t[t.Main = 0] = "Main", t[t.RightSide = 1] = "RightSide", t[t.Disabled = 2] = "Disabled", t))(f || {});
|
|
146
|
+
const J = ({ widgets: t, isLoading: r }) => {
|
|
147
|
+
const { isDesktop: i, isMobile: u } = D(), { copyStore: g } = A(), { setSelectedAccounts: b } = M(), { visibleAccounts: o } = C();
|
|
148
|
+
console.log("Dashboard render"), c.useEffect(() => {
|
|
149
149
|
b(o);
|
|
150
150
|
}, [o]), E({
|
|
151
151
|
widgetName: "Dashboard",
|
|
152
152
|
isLoaded: !r
|
|
153
153
|
});
|
|
154
154
|
const l = c.useMemo(
|
|
155
|
-
() =>
|
|
156
|
-
[
|
|
155
|
+
() => t.filter((n) => n.location !== f.Disabled).sort((n, w) => n.index - w.index),
|
|
156
|
+
[t]
|
|
157
157
|
), m = c.useMemo(
|
|
158
158
|
() => l.filter((n) => n.location === f.Main),
|
|
159
159
|
[l]
|
|
@@ -162,24 +162,24 @@ const J = ({ widgets: e, isLoading: r }) => {
|
|
|
162
162
|
[l]
|
|
163
163
|
);
|
|
164
164
|
return /* @__PURE__ */ a(h, { container: !0, spacing: u ? 0 : 24, sx: { overflow: "scroll" }, children: [
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ e(h, { xs: 12, children: g.isInitialized && /* @__PURE__ */ e(q, {}) }),
|
|
166
166
|
/* @__PURE__ */ a(h, { lg: 8, xs: 12, children: [
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ e(N, {}),
|
|
168
168
|
r && /* @__PURE__ */ a(s, { direction: "column", spacing: 24, children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ e(d, { height: 100, variant: "rounded", width: "100%" }),
|
|
170
|
+
/* @__PURE__ */ e(d, { height: 300, variant: "rounded", width: "100%" }),
|
|
171
|
+
/* @__PURE__ */ e(d, { height: 300, variant: "rounded", width: "100%" })
|
|
172
172
|
] }),
|
|
173
|
-
!r && /* @__PURE__ */
|
|
173
|
+
!r && /* @__PURE__ */ e(s, { direction: "column", spacing: 24, children: i ? m.map((n) => /* @__PURE__ */ e(c.Fragment, { children: n.component }, n.index)) : l.map((n) => /* @__PURE__ */ e(c.Fragment, { children: n.component }, n.index)) })
|
|
174
174
|
] }),
|
|
175
|
-
i && /* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
] }) : /* @__PURE__ */
|
|
175
|
+
i && /* @__PURE__ */ e(h, { lg: 4, children: r ? /* @__PURE__ */ a(s, { direction: "column", spacing: 24, children: [
|
|
176
|
+
/* @__PURE__ */ e(d, { height: 200, variant: "rounded", width: "100%" }),
|
|
177
|
+
/* @__PURE__ */ e(d, { height: 100, variant: "rounded", width: "100%" }),
|
|
178
|
+
/* @__PURE__ */ e(d, { height: 300, variant: "rounded", width: "100%" })
|
|
179
|
+
] }) : /* @__PURE__ */ e(s, { direction: "column", spacing: 24, children: x.map((n) => /* @__PURE__ */ e(c.Fragment, { children: n.component }, n.index)) }) })
|
|
180
180
|
] });
|
|
181
|
-
},
|
|
181
|
+
}, pe = _(J);
|
|
182
182
|
export {
|
|
183
|
-
|
|
183
|
+
pe as Dashboard,
|
|
184
184
|
f as DashboardLocation
|
|
185
185
|
};
|