@mx-cartographer/experiences 7.4.14 → 7.4.15

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.4.15] - 12-22-2025
2
+
3
+ - **FIXED** - Spending Total Amount Discrepancies wrt legacy - Bug Fixed
4
+
1
5
  ## [7.4.14] - 12-19-2025
2
6
 
3
7
  - **FIXED** - button focus styles in Dialog, MicroWidgetContainer, and MiniWidgetContainer
@@ -1,6 +1,6 @@
1
1
  import { b as _ } from "./CategoryUtil-DUM8NuGO.mjs";
2
2
  import { b as p } from "./Category-CevNQ03n.mjs";
3
- import { jsxs as y, Fragment as v, jsx as c } from "react/jsx-runtime";
3
+ import { jsxs as y, Fragment as v, jsx as m } from "react/jsx-runtime";
4
4
  import x from "react";
5
5
  import { observer as w } from "mobx-react-lite";
6
6
  import M from "@mui/material/Button";
@@ -18,26 +18,26 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
18
18
  if (!a) return o;
19
19
  const t = a.parent_guid ?? a.guid, r = i.find((s) => s.guid === t);
20
20
  if (!r) return o;
21
- const m = {
21
+ const c = {
22
22
  guid: a.guid,
23
23
  name: a.guid === t ? `${l.parent_category_totals_label_general} ${a.name}` : a.name,
24
24
  color: _(r.guid, g),
25
25
  amount: n.total
26
26
  }, e = o.find((s) => s.guid === t);
27
- return e ? (e.amount += n.total, e.categoryTotals?.push(m)) : o.push({
27
+ return e ? (e.amount += n.total, e.categoryTotals?.push(c)) : o.push({
28
28
  guid: t,
29
29
  name: r.name,
30
30
  color: _(r.guid, g),
31
- categoryTotals: [m],
31
+ categoryTotals: [c],
32
32
  amount: n.total
33
33
  }), o;
34
34
  }, []), ot = (i, l, g, d) => {
35
35
  const o = B(i, l, g, d), n = o.filter(
36
- (e) => e.guid !== p.INCOME && e.guid !== p.INVESTMENTS && e.guid !== p.TRANSFER
36
+ (e) => e.guid !== p.INCOME && e.guid !== p.INVESTMENTS && e.guid !== p.TRANSFER && e.amount > 0
37
37
  ).sort((e, s) => s.amount - e.amount), a = n.reduce(
38
38
  (e, s) => e + s.amount,
39
39
  0
40
- ), t = n.length > T ? T : n.length, r = n.slice(0, t), m = r.map((e) => ({
40
+ ), t = n.length > T ? T : n.length, r = n.slice(0, t), c = r.map((e) => ({
41
41
  id: e.guid,
42
42
  color: _(e.guid, g),
43
43
  label: e.name,
@@ -54,7 +54,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
54
54
  name: l.saving_goal_other,
55
55
  categoryTotals: e,
56
56
  amount: s
57
- }), m.push({
57
+ }), c.push({
58
58
  id: "other",
59
59
  color: g.palette.categories.others || "",
60
60
  label: l.saving_goal_other,
@@ -63,7 +63,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
63
63
  }
64
64
  return {
65
65
  categoryData: r,
66
- donutData: m,
66
+ donutData: c,
67
67
  totalAmount: a
68
68
  };
69
69
  }, nt = (i, l, g) => {
@@ -71,7 +71,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
71
71
  (t) => t.guid === p.INCOME || t.parent_guid === p.INCOME
72
72
  ), o = l.filter((t) => d.some((r) => r.guid === t.category_guid)).sort((t, r) => t.total - r.total).map((t, r) => ({
73
73
  guid: t.category_guid,
74
- name: i.find((m) => m.guid === t.category_guid)?.name,
74
+ name: i.find((c) => c.guid === t.category_guid)?.name,
75
75
  color: g[r],
76
76
  categoryTotals: [],
77
77
  amount: Math.abs(t.total)
@@ -99,7 +99,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
99
99
  totalLabel: a,
100
100
  variant: t = "mini"
101
101
  }) => {
102
- const { spending: r } = $(), m = N(), { isTablet: e } = j(), { announce: s, ariaLive: C } = O(), u = x.useMemo(
102
+ const { spending: r } = $(), c = N(), { isTablet: e } = j(), { announce: s, ariaLive: C } = O(), u = x.useMemo(
103
103
  () => o ? i.categoryData.find((b) => b.guid === o) : void 0,
104
104
  [o]
105
105
  );
@@ -109,12 +109,12 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
109
109
  s(`${u.name}: ${b}`);
110
110
  }
111
111
  }, [u, s]);
112
- const S = x.useMemo(() => i.donutData.length > 0 ? i.donutData : [{ id: "0", color: m.palette.divider, value: 100 }], [i, m]), E = () => {
112
+ const S = x.useMemo(() => i.donutData.length > 0 ? i.donutData : [{ id: "0", color: c.palette.divider, value: 100 }], [i, c]), E = () => {
113
113
  d?.(o);
114
114
  }, I = e ? 32 : 48;
115
115
  return /* @__PURE__ */ y(v, { children: [
116
116
  C,
117
- /* @__PURE__ */ c(G, { data: S, onClick: g, selectedId: o, size: n, children: /* @__PURE__ */ c(f, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ y(f, { alignItems: "center", justifyContent: "center", minHeight: n, minWidth: n, children: [
117
+ /* @__PURE__ */ m(G, { data: S, onClick: g, selectedId: o, size: n, children: /* @__PURE__ */ m(f, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ y(f, { alignItems: "center", justifyContent: "center", minHeight: n, minWidth: n, children: [
118
118
  u && /* @__PURE__ */ y(
119
119
  f,
120
120
  {
@@ -124,7 +124,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
124
124
  mt: t === "mini" ? 0 : -16,
125
125
  sx: t === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
126
126
  children: [
127
- /* @__PURE__ */ c(
127
+ /* @__PURE__ */ m(
128
128
  k,
129
129
  {
130
130
  categoryGuid: l ? p.INCOME : u.guid,
@@ -132,7 +132,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
132
132
  variant: A.Transparent
133
133
  }
134
134
  ),
135
- /* @__PURE__ */ c(
135
+ /* @__PURE__ */ m(
136
136
  h,
137
137
  {
138
138
  color: "secondary",
@@ -144,10 +144,10 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
144
144
  ]
145
145
  }
146
146
  ),
147
- !u && t === "full" && /* @__PURE__ */ c(h, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: a }),
148
- /* @__PURE__ */ c(h, { variant: t === "mini" ? "H2" : "H1", children: u ? D(u.amount, "0,0") : D(i.totalAmount, "0,0") }),
149
- !u && t === "mini" && /* @__PURE__ */ c(h, { color: "secondary", noWrap: !0, variant: "Tiny", children: a }),
150
- t === "full" && /* @__PURE__ */ c(
147
+ !u && t === "full" && /* @__PURE__ */ m(h, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: a }),
148
+ /* @__PURE__ */ m(h, { variant: t === "mini" ? "H2" : "H1", children: u ? D(u.amount, "0,0") : D(i.totalAmount, "0,0") }),
149
+ !u && t === "mini" && /* @__PURE__ */ m(h, { color: "secondary", noWrap: !0, variant: "Tiny", children: a }),
150
+ t === "full" && /* @__PURE__ */ m(
151
151
  M,
152
152
  {
153
153
  "aria-label": `View ${u?.name || ""} Transactions`,
@@ -164,7 +164,7 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
164
164
  const d = (o, n) => {
165
165
  (o.key === "Enter" || o.key === " ") && (o.preventDefault(), l(n));
166
166
  };
167
- return /* @__PURE__ */ c(f, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: i.categoryData.map((o) => /* @__PURE__ */ y(
167
+ return /* @__PURE__ */ m(f, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: i.categoryData.map((o) => /* @__PURE__ */ y(
168
168
  f,
169
169
  {
170
170
  alignItems: "center",
@@ -178,8 +178,8 @@ const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
178
178
  sx: { cursor: "pointer" },
179
179
  tabIndex: 0,
180
180
  children: [
181
- /* @__PURE__ */ c(R, { borderRadius: 4, height: 8, sx: { backgroundColor: o.color }, width: 8 }),
182
- /* @__PURE__ */ c(h, { bold: o.guid === g, variant: "XSmall", children: o.name })
181
+ /* @__PURE__ */ m(R, { borderRadius: 4, height: 8, sx: { backgroundColor: o.color }, width: 8 }),
182
+ /* @__PURE__ */ m(h, { bold: o.guid === g, variant: "XSmall", children: o.name })
183
183
  ]
184
184
  },
185
185
  o.guid
@@ -48,7 +48,7 @@ import { ResponsiveChartContainer as Zn } from "@mui/x-charts/ResponsiveChartCon
48
48
  import { useSpring as Jn, animated as at } from "@react-spring/web";
49
49
  import { startOfMonth as At } from "date-fns/startOfMonth";
50
50
  import { endOfMonth as Tt } from "date-fns/endOfMonth";
51
- import { g as eo, S as to, b as no } from "../SpendingLegend-DsNH6ziK.mjs";
51
+ import { g as eo, S as to, b as no } from "../SpendingLegend-CDO060GT.mjs";
52
52
  import { formatISO as oo } from "date-fns/formatISO";
53
53
  import { fromUnixTime as ro } from "date-fns/fromUnixTime";
54
54
  import { startOfToday as it } from "date-fns/startOfToday";
@@ -8,7 +8,7 @@ import C from "@mui/material/Stack";
8
8
  import E from "@mui/material/Tab";
9
9
  import st from "@mui/material/Tabs";
10
10
  import bt from "@mui/material/styles/useTheme";
11
- import { g as ct, a as lt, S as W, b as Q } from "../SpendingLegend-DsNH6ziK.mjs";
11
+ import { g as ct, a as lt, S as W, b as Q } from "../SpendingLegend-CDO060GT.mjs";
12
12
  import { Text as y, Icon as _t } from "@mxenabled/mxui";
13
13
  import { f as A } from "../NumberFormatting-DjTD0t3W.mjs";
14
14
  import { u as w, b as R, m as F, d as dt, a as V, h as Ct, g as yt } from "../hooks-ZMp65DFz.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.4.14",
3
+ "version": "7.4.15",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",