@mx-cartographer/experiences 7.2.15-alpha-ram17-finstrong-testing → 7.2.15-alpha-ram18-finstrong-testing
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/spending/index.es.js +31 -35
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
3
|
import { observer as D } from "mobx-react-lite";
|
|
4
4
|
import { startOfMonth as tt } from "date-fns/startOfMonth";
|
|
@@ -26,7 +26,7 @@ import { u as yt } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
|
26
26
|
import { D as J } from "../Drawer-BEtCk82g.mjs";
|
|
27
27
|
import { b as L } from "../Category-CevNQ03n.mjs";
|
|
28
28
|
import { A as Q, W as Ct } from "../WidgetContainer-6dsjtOVg.mjs";
|
|
29
|
-
const O = ({ amount: n, label: s }) => /* @__PURE__ */
|
|
29
|
+
const O = ({ amount: n, label: s }) => /* @__PURE__ */ l(S, { direction: "column", children: [
|
|
30
30
|
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: s }),
|
|
31
31
|
/* @__PURE__ */ t(y, { variant: "XSmall", children: W(n, "0,0") })
|
|
32
32
|
] }), St = () => {
|
|
@@ -34,7 +34,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
34
34
|
categories: c,
|
|
35
35
|
dateRangeCategoryTotals: r,
|
|
36
36
|
dataRangeTotalsLoaded: e,
|
|
37
|
-
loadDateRangeCategoryTotals:
|
|
37
|
+
loadDateRangeCategoryTotals: d
|
|
38
38
|
} = j(), u = a.useMemo(
|
|
39
39
|
() => [
|
|
40
40
|
n.palette.chartMono.chartMono5,
|
|
@@ -47,7 +47,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
47
47
|
[n]
|
|
48
48
|
);
|
|
49
49
|
a.useEffect(() => {
|
|
50
|
-
|
|
50
|
+
d(
|
|
51
51
|
i,
|
|
52
52
|
tt(/* @__PURE__ */ new Date()),
|
|
53
53
|
et(/* @__PURE__ */ new Date())
|
|
@@ -64,8 +64,8 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
64
64
|
}, _ = (x) => {
|
|
65
65
|
p(m === x ? "" : x);
|
|
66
66
|
};
|
|
67
|
-
return e ? /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
67
|
+
return e ? /* @__PURE__ */ l(T, { width: "100%", children: [
|
|
68
|
+
/* @__PURE__ */ l(
|
|
69
69
|
nt,
|
|
70
70
|
{
|
|
71
71
|
"aria-label": o.mini_title,
|
|
@@ -113,7 +113,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
113
113
|
hidden: h !== 0,
|
|
114
114
|
id: "spending-tabpanel",
|
|
115
115
|
role: "tabpanel",
|
|
116
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ l(S, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
117
117
|
/* @__PURE__ */ t(
|
|
118
118
|
R,
|
|
119
119
|
{
|
|
@@ -134,7 +134,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
134
134
|
hidden: h !== 1,
|
|
135
135
|
id: "income-tabpanel",
|
|
136
136
|
role: "tabpanel",
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ l(S, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
138
138
|
/* @__PURE__ */ t(
|
|
139
139
|
R,
|
|
140
140
|
{
|
|
@@ -172,10 +172,10 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
172
172
|
title: i
|
|
173
173
|
}) => {
|
|
174
174
|
const { spending: c } = w(), r = n.categoryData.find((e) => e.guid === o);
|
|
175
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ l(S, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
176
176
|
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${i} ${c.by_category}` }),
|
|
177
177
|
/* @__PURE__ */ t(B, { "aria-hidden": "true" }),
|
|
178
|
-
/* @__PURE__ */ t(Y, { children: n.categoryData.map((e) => /* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ t(Y, { children: n.categoryData.map((e) => /* @__PURE__ */ l(a.Fragment, { children: [
|
|
179
179
|
/* @__PURE__ */ t(
|
|
180
180
|
q,
|
|
181
181
|
{
|
|
@@ -184,7 +184,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
184
184
|
sx: {
|
|
185
185
|
minHeight: 44
|
|
186
186
|
},
|
|
187
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ l(
|
|
188
188
|
_t,
|
|
189
189
|
{
|
|
190
190
|
"aria-expanded": r?.guid === e.guid,
|
|
@@ -201,7 +201,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
201
201
|
width: 8
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ l(
|
|
205
205
|
S,
|
|
206
206
|
{
|
|
207
207
|
alignItems: "center",
|
|
@@ -220,8 +220,8 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
220
220
|
}
|
|
221
221
|
),
|
|
222
222
|
/* @__PURE__ */ t(B, {}),
|
|
223
|
-
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(bt, { in: r?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */
|
|
224
|
-
r?.categoryTotals?.map((
|
|
223
|
+
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(bt, { in: r?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ l(Y, { children: [
|
|
224
|
+
r?.categoryTotals?.map((d) => /* @__PURE__ */ t(
|
|
225
225
|
q,
|
|
226
226
|
{
|
|
227
227
|
sx: {
|
|
@@ -229,15 +229,15 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
229
229
|
pr: 8,
|
|
230
230
|
py: 0
|
|
231
231
|
},
|
|
232
|
-
children: /* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
|
|
232
|
+
children: /* @__PURE__ */ l(S, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
233
|
+
/* @__PURE__ */ l(y, { children: [
|
|
234
|
+
d.name,
|
|
235
235
|
" "
|
|
236
236
|
] }),
|
|
237
|
-
/* @__PURE__ */ t(y, { children: W(
|
|
237
|
+
/* @__PURE__ */ t(y, { children: W(d.amount, "0,0") })
|
|
238
238
|
] })
|
|
239
239
|
},
|
|
240
|
-
|
|
240
|
+
d.guid
|
|
241
241
|
)),
|
|
242
242
|
/* @__PURE__ */ t(B, {})
|
|
243
243
|
] }) })
|
|
@@ -251,8 +251,8 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
251
251
|
selectedId: i,
|
|
252
252
|
title: c
|
|
253
253
|
}) => {
|
|
254
|
-
const { isDesktop: r, isMobile: e } = yt(), { isLoadingCategoryTotals:
|
|
255
|
-
return /* @__PURE__ */
|
|
254
|
+
const { isDesktop: r, isMobile: e } = yt(), { isLoadingCategoryTotals: d } = j(), { spending: u } = w();
|
|
255
|
+
return /* @__PURE__ */ l(
|
|
256
256
|
S,
|
|
257
257
|
{
|
|
258
258
|
alignItems: e ? "center" : "flex-start",
|
|
@@ -262,7 +262,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
262
262
|
pt: 50,
|
|
263
263
|
px: 8,
|
|
264
264
|
children: [
|
|
265
|
-
|
|
265
|
+
d && /* @__PURE__ */ t(
|
|
266
266
|
R,
|
|
267
267
|
{
|
|
268
268
|
data: {
|
|
@@ -278,7 +278,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
278
278
|
variant: "full"
|
|
279
279
|
}
|
|
280
280
|
),
|
|
281
|
-
!
|
|
281
|
+
!d && /* @__PURE__ */ t(
|
|
282
282
|
R,
|
|
283
283
|
{
|
|
284
284
|
data: n,
|
|
@@ -302,14 +302,10 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
302
302
|
n.palette.chartMono.chartMono1,
|
|
303
303
|
n.palette.chartMono.chartMono6
|
|
304
304
|
], Lt = () => {
|
|
305
|
-
const n = mt(), { clientConfig: s } = rt(), { categories: o, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: c } = j(), { goals: r, spending: e } = w(), { displayedDateRange:
|
|
305
|
+
const n = mt(), { clientConfig: s } = rt(), { categories: o, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: c } = j(), { goals: r, spending: e } = w(), { displayedDateRange: d, selectedAccounts: u, selectedAccountGuids: m } = $(), { setFilter: p, sortedTransactions: h } = gt(), M = s?.master?.deep_link_params?.account_guids, C = s?.master?.deep_link_params?.view, [f, A] = a.useState(""), [_, x] = a.useState(C === "income" ? 1 : 0), [I, F] = a.useState(""), [st, V] = a.useState(!1);
|
|
306
306
|
a.useEffect(() => {
|
|
307
|
-
c(
|
|
308
|
-
|
|
309
|
-
l.start,
|
|
310
|
-
l.end
|
|
311
|
-
).finally();
|
|
312
|
-
}, [u, l]);
|
|
307
|
+
c(u).finally();
|
|
308
|
+
}, [u, d]);
|
|
313
309
|
const E = a.useMemo(
|
|
314
310
|
() => ot(o, r, n, i),
|
|
315
311
|
[o, i]
|
|
@@ -328,7 +324,7 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
328
324
|
}, K = (g) => {
|
|
329
325
|
const v = {
|
|
330
326
|
accounts: M || m,
|
|
331
|
-
dateRange:
|
|
327
|
+
dateRange: d
|
|
332
328
|
};
|
|
333
329
|
if (_ === 0)
|
|
334
330
|
if (g === "other") {
|
|
@@ -350,8 +346,8 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
350
346
|
});
|
|
351
347
|
V(!0);
|
|
352
348
|
};
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ l(T, { children: [
|
|
350
|
+
/* @__PURE__ */ l(nt, { onChange: ct, value: _, variant: "fullWidth", children: [
|
|
355
351
|
/* @__PURE__ */ t(
|
|
356
352
|
N,
|
|
357
353
|
{
|
|
@@ -419,9 +415,9 @@ const O = ({ amount: n, label: s }) => /* @__PURE__ */ d(S, { direction: "column
|
|
|
419
415
|
)
|
|
420
416
|
] });
|
|
421
417
|
}, At = D(Lt), It = ({ onBackClick: n, sx: s = {} }) => {
|
|
422
|
-
const { visibleAccounts: o } = it(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: r, setDisplayedDate: e, setSelectedAccounts:
|
|
418
|
+
const { visibleAccounts: o } = it(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: r, setDisplayedDate: e, setSelectedAccounts: d } = $(), { onEvent: u } = pt(), { clientConfig: m } = rt(), p = m?.master?.deep_link_params?.date_range, [h, M] = a.useState(!1);
|
|
423
419
|
a.useEffect(() => {
|
|
424
|
-
|
|
420
|
+
d(o);
|
|
425
421
|
}, [o]), a.useEffect(() => {
|
|
426
422
|
p && Array.isArray(p) && p.length === 2 ? e(p[0], p[1]) : e(tt(X()), et(X())), M(!0), u(Q.SPENDING_VIEW);
|
|
427
423
|
}, []);
|
package/package.json
CHANGED