@mx-cartographer/experiences 7.4.6-alpha.mm1 → 7.4.6-alpha.mm2
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.
|
@@ -24,7 +24,7 @@ import { f as I } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
|
24
24
|
import { D as c1 } from "../Drawer-BEtCk82g.mjs";
|
|
25
25
|
import { A as x, W as s1 } from "../WidgetContainer-DR_iRKNU.mjs";
|
|
26
26
|
import { C as a1 } from "../ConnectionsDrawer-vSEOHrUC.mjs";
|
|
27
|
-
import { u as r1 } from "../useWidgetLoadTimer-
|
|
27
|
+
import { u as r1 } from "../useWidgetLoadTimer-CY26D0n1.mjs";
|
|
28
28
|
import { u as Y } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
29
29
|
import { L as w } from "../Loader-DUaFpDGv.mjs";
|
|
30
30
|
import L1 from "@mui/material/ListItem";
|
package/dist/common/index.es.js
CHANGED
|
@@ -53,7 +53,7 @@ import { G as mo, C as _o, D as fo, W as yo, e as So, b as bo, i as wo, v as xo,
|
|
|
53
53
|
import { u as Qo } from "../useAccountDisplayName-BUtYhbqe.mjs";
|
|
54
54
|
import { u as Xo } from "../useInsightsEnabled-v_GGt72p.mjs";
|
|
55
55
|
import { u as Ko } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
56
|
-
import { u as Zo } from "../useWidgetLoadTimer-
|
|
56
|
+
import { u as Zo } from "../useWidgetLoadTimer-CY26D0n1.mjs";
|
|
57
57
|
import { makeAutoObservable as f, runInAction as p, reaction as _t, autorun as ft } from "mobx";
|
|
58
58
|
import { a as yt } from "../AccountStore-kxFbaz-K.mjs";
|
|
59
59
|
import St from "posthog-js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, 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 D 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
|
|
19
|
-
import { u as E } from "../useWidgetLoadTimer-
|
|
18
|
+
import { u as z } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
19
|
+
import { u as E } from "../useWidgetLoadTimer-CY26D0n1.mjs";
|
|
20
20
|
const N = _(() => {
|
|
21
|
-
const
|
|
21
|
+
const e = D(), {
|
|
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__ */ t(
|
|
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__ */ t(
|
|
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__ */ t(
|
|
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 ${e.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: e }) => {
|
|
60
60
|
const { common: r } = v(), i = R("(max-width: 700px)");
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ t(T, { my: 4, children: i ? /* @__PURE__ */ t(H, { id: "add-accounts", placement: "bottom", title: r.add_accounts, children: /* @__PURE__ */ t(
|
|
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: e,
|
|
70
|
+
children: /* @__PURE__ */ t(S, { name: "add", size: 24 })
|
|
71
71
|
}
|
|
72
|
-
) }) : /* @__PURE__ */
|
|
72
|
+
) }) : /* @__PURE__ */ t(
|
|
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: e,
|
|
79
|
+
startIcon: /* @__PURE__ */ t(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 [e, 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 } = z(), 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__ */ t(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__ */ t(G, { variant: i ? "H2" : "H1", children: w() }),
|
|
112
|
+
/* @__PURE__ */ t(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__ */ t(O, { handleConnectClick: () => r(!0) }),
|
|
116
|
+
/* @__PURE__ */ t(
|
|
117
117
|
j,
|
|
118
118
|
{
|
|
119
119
|
accounts: u,
|
|
@@ -132,28 +132,28 @@ const N = _(() => {
|
|
|
132
132
|
)
|
|
133
133
|
] })
|
|
134
134
|
] }) }),
|
|
135
|
-
|
|
135
|
+
e && /* @__PURE__ */ t(
|
|
136
136
|
Q,
|
|
137
137
|
{
|
|
138
138
|
onClose: () => r(!1),
|
|
139
|
-
showConnectWidget:
|
|
139
|
+
showConnectWidget: e,
|
|
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
|
-
|
|
145
|
+
var f = /* @__PURE__ */ ((e) => (e[e.Main = 0] = "Main", e[e.RightSide = 1] = "RightSide", e[e.Disabled = 2] = "Disabled", e))(f || {});
|
|
146
|
+
const J = ({ widgets: e, isLoading: r }) => {
|
|
147
|
+
const { isDesktop: i, isMobile: u } = z(), { copyStore: g } = A(), { setSelectedAccounts: b } = M(), { visibleAccounts: o } = C();
|
|
148
|
+
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
|
+
() => e.filter((n) => n.location !== f.Disabled).sort((n, w) => n.index - w.index),
|
|
156
|
+
[e]
|
|
157
157
|
), m = c.useMemo(
|
|
158
158
|
() => l.filter((n) => n.location === f.Main),
|
|
159
159
|
[l]
|
|
@@ -162,24 +162,24 @@ const J = ({ widgets: t, 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__ */ t(h, { xs: 12, children: g.isInitialized && /* @__PURE__ */ t(q, {}) }),
|
|
166
166
|
/* @__PURE__ */ a(h, { lg: 8, xs: 12, children: [
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ t(N, {}),
|
|
168
168
|
r && /* @__PURE__ */ a(s, { direction: "column", spacing: 24, children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ t(d, { height: 100, variant: "rounded", width: "100%" }),
|
|
170
|
+
/* @__PURE__ */ t(d, { height: 300, variant: "rounded", width: "100%" }),
|
|
171
|
+
/* @__PURE__ */ t(d, { height: 300, variant: "rounded", width: "100%" })
|
|
172
172
|
] }),
|
|
173
|
-
!r && /* @__PURE__ */
|
|
173
|
+
!r && /* @__PURE__ */ t(s, { direction: "column", spacing: 24, children: i ? m.map((n) => /* @__PURE__ */ t(c.Fragment, { children: n.component }, n.index)) : l.map((n) => /* @__PURE__ */ t(c.Fragment, { children: n.component }, n.index)) })
|
|
174
174
|
] }),
|
|
175
|
-
i && /* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
] }) : /* @__PURE__ */
|
|
175
|
+
i && /* @__PURE__ */ t(h, { lg: 4, children: r ? /* @__PURE__ */ a(s, { direction: "column", spacing: 24, children: [
|
|
176
|
+
/* @__PURE__ */ t(d, { height: 200, variant: "rounded", width: "100%" }),
|
|
177
|
+
/* @__PURE__ */ t(d, { height: 100, variant: "rounded", width: "100%" }),
|
|
178
|
+
/* @__PURE__ */ t(d, { height: 300, variant: "rounded", width: "100%" })
|
|
179
|
+
] }) : /* @__PURE__ */ t(s, { direction: "column", spacing: 24, children: x.map((n) => /* @__PURE__ */ t(c.Fragment, { children: n.component }, n.index)) }) })
|
|
180
180
|
] });
|
|
181
|
-
},
|
|
181
|
+
}, pt = _(J);
|
|
182
182
|
export {
|
|
183
|
-
|
|
183
|
+
pt as Dashboard,
|
|
184
184
|
f as DashboardLocation
|
|
185
185
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useRef as r, useEffect as c } from "react";
|
|
2
|
+
import { u as l } from "./hooks-DtrRa6Lb.mjs";
|
|
3
|
+
const d = ({ widgetName: n, isLoaded: o = !0 }) => {
|
|
4
|
+
const { onEvent: u } = l(), e = r(null), a = r(!1), s = r(!1);
|
|
5
|
+
if (console.log("useWidgetLoadTimer called for", n), e.current === null) {
|
|
6
|
+
e.current = Date.now();
|
|
7
|
+
const t = performance.getEntriesByType("navigation")[0];
|
|
8
|
+
s.current = t?.type === "navigate" || t?.type === "reload";
|
|
9
|
+
}
|
|
10
|
+
c(() => {
|
|
11
|
+
if (o && !a.current && e.current !== null) {
|
|
12
|
+
const t = Date.now() - e.current;
|
|
13
|
+
u("WidgetLoad", {
|
|
14
|
+
widgetName: n,
|
|
15
|
+
loadTimeMs: t,
|
|
16
|
+
loadType: s.current ? "initial" : "secondary"
|
|
17
|
+
}), a.current = !0, e.current = null;
|
|
18
|
+
}
|
|
19
|
+
}, [o, n]);
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
d as u
|
|
23
|
+
};
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useRef as r, useEffect as s } from "react";
|
|
2
|
-
import { u } from "./hooks-DtrRa6Lb.mjs";
|
|
3
|
-
const y = ({ widgetName: t, isLoaded: a = !0 }) => {
|
|
4
|
-
const { onEvent: c } = u(), e = r(null), l = r(!1), o = r(null);
|
|
5
|
-
console.log("useWidgetLoadTimer:", t), s(() => {
|
|
6
|
-
if (e.current === null) {
|
|
7
|
-
e.current = Date.now();
|
|
8
|
-
const n = performance.getEntriesByType("navigation")[0];
|
|
9
|
-
console.log("Navigation Entry:", n), o.current = n?.type === "navigate" || n?.type === "reload";
|
|
10
|
-
}
|
|
11
|
-
}, []), s(() => {
|
|
12
|
-
if (a && !l.current && e.current !== null) {
|
|
13
|
-
const n = Date.now() - e.current;
|
|
14
|
-
console.log("WidgetLoad", {
|
|
15
|
-
widgetName: t,
|
|
16
|
-
loadTimeMs: n,
|
|
17
|
-
loadType: o.current ? "initial" : "secondary"
|
|
18
|
-
}), c("WidgetLoad", {
|
|
19
|
-
widgetName: t,
|
|
20
|
-
loadTimeMs: n,
|
|
21
|
-
loadType: o.current ? "initial" : "secondary"
|
|
22
|
-
}), l.current = !0, e.current = null;
|
|
23
|
-
}
|
|
24
|
-
}, [a, t, c]);
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
y as u
|
|
28
|
-
};
|