@mx-cartographer/experiences 7.2.15-alpha-ram3-finstromg-testing → 7.2.15-alpha-ram5-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/{CategoryStore-CKS21I3F.mjs → CategoryStore-2mI6CCiD.mjs} +7 -7
- package/dist/{SpendingLegend-Dnwcmcda.mjs → SpendingLegend-CopEyF2t.mjs} +28 -28
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +2 -2
- package/dist/finstrong/index.es.js +205 -203
- package/dist/spending/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { startOfMonth as h } from "date-fns/startOfMonth";
|
|
|
5
5
|
import { endOfMonth as d } from "date-fns/endOfMonth";
|
|
6
6
|
import { a as T, g as m } from "./CategoryUtil-DUM8NuGO.mjs";
|
|
7
7
|
import { F as p, A as i } from "./Fetch-87LIQbEA.mjs";
|
|
8
|
-
import { b as f, c as
|
|
8
|
+
import { b as f, c as S } from "./Category-CevNQ03n.mjs";
|
|
9
9
|
class y {
|
|
10
10
|
fetchInstance;
|
|
11
11
|
constructor(t, e, o) {
|
|
@@ -31,7 +31,7 @@ class y {
|
|
|
31
31
|
removeCategory = async (t) => this.fetchInstance.delete(`${i.CATEGORIES}/${t}`);
|
|
32
32
|
updateCategory = async (t) => this.fetchInstance.put(`${i.CATEGORIES}/${t.guid}`, t).then((e) => e.category);
|
|
33
33
|
}
|
|
34
|
-
class
|
|
34
|
+
class w {
|
|
35
35
|
expandedGuid = null;
|
|
36
36
|
selectedGuid = null;
|
|
37
37
|
searchValue = "";
|
|
@@ -54,7 +54,7 @@ class S {
|
|
|
54
54
|
onSelect = (t) => this.savedOnSelect(t);
|
|
55
55
|
setOnSelect = (t) => this.savedOnSelect = t;
|
|
56
56
|
}
|
|
57
|
-
class
|
|
57
|
+
class A {
|
|
58
58
|
globalStore;
|
|
59
59
|
uiStore;
|
|
60
60
|
api = new y("/", "");
|
|
@@ -65,7 +65,7 @@ class G {
|
|
|
65
65
|
isLoadingCategoryTotals = !1;
|
|
66
66
|
monthlyTotalsLoaded = !1;
|
|
67
67
|
constructor(t) {
|
|
68
|
-
this.globalStore = t, this.uiStore = new
|
|
68
|
+
this.globalStore = t, this.uiStore = new w(), this.api = new y(t.endpoint, t.sessionToken, t.onError), u(this);
|
|
69
69
|
}
|
|
70
70
|
get detailedCategories() {
|
|
71
71
|
return T(
|
|
@@ -120,7 +120,7 @@ class G {
|
|
|
120
120
|
r(o),
|
|
121
121
|
t
|
|
122
122
|
);
|
|
123
|
-
console.log(e, o, "start date", "enddate"), console.log(a, "totals"), l(() => {
|
|
123
|
+
console.log(e, o, "start date", "enddate"), console.log(JSON.parse(JSON.stringify(a)), "totals"), l(() => {
|
|
124
124
|
this.dateRangeCategoryTotals = a, this.setIsLoadingCategoryTotals(!1), this.dataRangeTotalsLoaded = !0;
|
|
125
125
|
});
|
|
126
126
|
} catch (a) {
|
|
@@ -175,9 +175,9 @@ class G {
|
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
// TODO: Remove this after refactoring Trends components to use detailedCategories
|
|
178
|
-
getCategoryName = (t) => this.categories.find((o) => o.guid === t)?.name ??
|
|
178
|
+
getCategoryName = (t) => this.categories.find((o) => o.guid === t)?.name ?? S[t];
|
|
179
179
|
}
|
|
180
180
|
export {
|
|
181
|
-
|
|
181
|
+
A as C,
|
|
182
182
|
y as a
|
|
183
183
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { b as S } from "./CategoryUtil-DUM8NuGO.mjs";
|
|
2
2
|
import { b as p } from "./Category-CevNQ03n.mjs";
|
|
3
|
-
import { jsxs as y, Fragment as
|
|
3
|
+
import { jsxs as y, Fragment as O, jsx as d } from "react/jsx-runtime";
|
|
4
4
|
import x from "react";
|
|
5
|
-
import { observer as
|
|
6
|
-
import
|
|
7
|
-
import { CategoryIcon as
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
10
|
-
import { useTheme as
|
|
11
|
-
import { D as
|
|
5
|
+
import { observer as I } from "mobx-react-lite";
|
|
6
|
+
import h from "@mui/material/Stack";
|
|
7
|
+
import { CategoryIcon as v, CategoryIconVariants as w, Text as f } from "@mxenabled/mxui";
|
|
8
|
+
import { u as M } from "./useAriaLive-B3_pRUio.mjs";
|
|
9
|
+
import k from "@mui/material/Button";
|
|
10
|
+
import { useTheme as G } from "@mui/material";
|
|
11
|
+
import { D as A } from "./Donut-oaQFlbit.mjs";
|
|
12
12
|
import { u as j } from "./hooks-C41HAxM5.mjs";
|
|
13
13
|
import { u as R } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
14
14
|
import { f as D } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
@@ -35,7 +35,7 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
35
35
|
}
|
|
36
36
|
return s;
|
|
37
37
|
}, []), to = (r, l, g, s) => {
|
|
38
|
-
console.log(s, "daterangecategorytotals"), console.log(r, "categories");
|
|
38
|
+
console.log(JSON.parse(JSON.stringify(s)), "daterangecategorytotals"), console.log(JSON.parse(JSON.stringify(r)), "categories");
|
|
39
39
|
const t = B(r, g, s), n = t.filter(
|
|
40
40
|
(e) => e.guid !== p.INCOME && e.guid !== p.INVESTMENTS && e.guid !== p.TRANSFER
|
|
41
41
|
).sort((e, m) => m.amount - e.amount), u = n.reduce(
|
|
@@ -103,7 +103,7 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
103
103
|
totalLabel: u,
|
|
104
104
|
variant: o = "mini"
|
|
105
105
|
}) => {
|
|
106
|
-
const { spending: a } = j(), c =
|
|
106
|
+
const { spending: a } = j(), c = G(), { isTablet: e } = R(), { announce: m, ariaLive: C } = M(), i = x.useMemo(
|
|
107
107
|
() => t ? r.categoryData.find((b) => b.guid === t) : void 0,
|
|
108
108
|
[t]
|
|
109
109
|
);
|
|
@@ -113,14 +113,14 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
113
113
|
m(`${i.name}: ${b}`);
|
|
114
114
|
}
|
|
115
115
|
}, [i, m]);
|
|
116
|
-
const _ = x.useMemo(() => r.donutData.length > 0 ? r.donutData : [{ id: "0", color: c.palette.divider, value: 100 }], [r, c]),
|
|
116
|
+
const _ = x.useMemo(() => r.donutData.length > 0 ? r.donutData : [{ id: "0", color: c.palette.divider, value: 100 }], [r, c]), N = () => {
|
|
117
117
|
s?.(t);
|
|
118
|
-
},
|
|
119
|
-
return /* @__PURE__ */ y(
|
|
118
|
+
}, E = e ? 32 : 48;
|
|
119
|
+
return /* @__PURE__ */ y(O, { children: [
|
|
120
120
|
C,
|
|
121
|
-
/* @__PURE__ */ d(
|
|
121
|
+
/* @__PURE__ */ d(A, { data: _, onClick: g, selectedId: t, size: n, children: /* @__PURE__ */ d(h, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ y(h, { alignItems: "center", justifyContent: "center", minHeight: n, minWidth: n, children: [
|
|
122
122
|
i && /* @__PURE__ */ y(
|
|
123
|
-
|
|
123
|
+
h,
|
|
124
124
|
{
|
|
125
125
|
alignItems: "center",
|
|
126
126
|
gap: o === "mini" ? 0 : 8,
|
|
@@ -129,15 +129,15 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
129
129
|
sx: o === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ d(
|
|
132
|
-
|
|
132
|
+
v,
|
|
133
133
|
{
|
|
134
134
|
categoryGuid: l ? p.INCOME : i.guid,
|
|
135
|
-
size: o === "mini" ? 24 :
|
|
136
|
-
variant:
|
|
135
|
+
size: o === "mini" ? 24 : E,
|
|
136
|
+
variant: w.Transparent
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
139
|
/* @__PURE__ */ d(
|
|
140
|
-
|
|
140
|
+
f,
|
|
141
141
|
{
|
|
142
142
|
color: "secondary",
|
|
143
143
|
noWrap: !0,
|
|
@@ -148,15 +148,15 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
!i && o === "full" && /* @__PURE__ */ d(
|
|
152
|
-
/* @__PURE__ */ d(
|
|
153
|
-
!i && o === "mini" && /* @__PURE__ */ d(
|
|
151
|
+
!i && o === "full" && /* @__PURE__ */ d(f, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: u }),
|
|
152
|
+
/* @__PURE__ */ d(f, { variant: o === "mini" ? "H2" : "H1", children: i ? D(i.amount, "0,0") : D(r.totalAmount, "0,0") }),
|
|
153
|
+
!i && o === "mini" && /* @__PURE__ */ d(f, { color: "secondary", noWrap: !0, variant: "Tiny", children: u }),
|
|
154
154
|
o === "full" && /* @__PURE__ */ d(
|
|
155
|
-
|
|
155
|
+
k,
|
|
156
156
|
{
|
|
157
157
|
"aria-label": `View ${i?.name || ""} Transactions`,
|
|
158
158
|
disabled: r.categoryData.length === 0,
|
|
159
|
-
onClick:
|
|
159
|
+
onClick: N,
|
|
160
160
|
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
161
161
|
variant: "text",
|
|
162
162
|
children: a.view_transactions
|
|
@@ -164,12 +164,12 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
164
164
|
)
|
|
165
165
|
] }) }) })
|
|
166
166
|
] });
|
|
167
|
-
}, eo =
|
|
167
|
+
}, eo = I(H), ro = ({ data: r, onSelected: l, selectedId: g }) => {
|
|
168
168
|
const s = (t, n) => {
|
|
169
169
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), l(n));
|
|
170
170
|
};
|
|
171
|
-
return /* @__PURE__ */ d(
|
|
172
|
-
|
|
171
|
+
return /* @__PURE__ */ d(h, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: r.categoryData.map((t) => /* @__PURE__ */ y(
|
|
172
|
+
h,
|
|
173
173
|
{
|
|
174
174
|
alignItems: "center",
|
|
175
175
|
"aria-label": t.name,
|
|
@@ -183,7 +183,7 @@ const T = 5, B = (r, l, g) => g.reduce((s, t) => {
|
|
|
183
183
|
tabIndex: 0,
|
|
184
184
|
children: [
|
|
185
185
|
/* @__PURE__ */ d($, { borderRadius: 4, height: 8, sx: { backgroundColor: t.color }, width: 8 }),
|
|
186
|
-
/* @__PURE__ */ d(
|
|
186
|
+
/* @__PURE__ */ d(f, { bold: t.guid === g, variant: "XSmall", children: t.name })
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
189
|
t.guid
|
package/dist/common/index.es.js
CHANGED
|
@@ -2,8 +2,8 @@ import { G as k } from "../useCombineEvents-BUDIR1ba.mjs";
|
|
|
2
2
|
import { A as ss, a as rs, u as os, b as as } from "../useCombineEvents-BUDIR1ba.mjs";
|
|
3
3
|
import { F as S, A as h } from "../Fetch-87LIQbEA.mjs";
|
|
4
4
|
import { B as is } from "../BeatApi-DhJpgCLz.mjs";
|
|
5
|
-
import { C as et } from "../CategoryStore-
|
|
6
|
-
import { a as ds } from "../CategoryStore-
|
|
5
|
+
import { C as et } from "../CategoryStore-2mI6CCiD.mjs";
|
|
6
|
+
import { a as ds } from "../CategoryStore-2mI6CCiD.mjs";
|
|
7
7
|
import { N as st } from "../NotificationStore-C6PH6MKm.mjs";
|
|
8
8
|
import { a as us } from "../NotificationStore-C6PH6MKm.mjs";
|
|
9
9
|
import { T as rt } from "../User-wXzDI4M8.mjs";
|