@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.0
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 +71 -0
- package/dist/{Account-Bxw0_4FU.mjs → Account-YwUMFz93.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-BgCST7mK.mjs} +8 -8
- package/dist/AccountDetailsHeader-jAFWoHj7.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-DPxMPBF0.mjs} +2 -2
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-D6rWAreC.mjs} +8 -8
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-B5E98oM1.mjs} +100 -74
- package/dist/Accounts-UIlYCmHb.mjs +9 -0
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-CXvenbdN.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Buy70Y3V.mjs} +21 -19
- package/dist/CategoryStore-BEdFs69_.mjs +183 -0
- package/dist/CategoryUtil-BR3H5i6n.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-CbxHKlRv.mjs} +10 -10
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-C6kanU7I.mjs} +4 -4
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-lSC7oPDg.mjs} +1 -1
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-DgIcphe_.mjs} +1 -1
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DZ10CbWd.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CL7t5lBL.mjs} +1 -1
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-CAlmSu4U.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-hi9I9EYP.mjs} +1 -1
- package/dist/{LineChart-D4GI7nVh.mjs → LineChart-eK4IQImU.mjs} +2 -2
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BmL5buOf.mjs} +1 -1
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-Cypo9qY4.mjs} +66 -65
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-CFdMGJKg.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdgBvpga.mjs} +1 -1
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-CxqIxAgN.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-DxytNHlN.mjs} +240 -237
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-V6FEoIDe.mjs} +3 -3
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-iIupYxJW.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-ej39mgA6.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BiwCzScZ.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/{TransactionDetails-oP1eSuiS.mjs → TransactionDetails-BUoNbsu-.mjs} +402 -367
- package/dist/TransactionStore-C1oyQCZK.mjs +677 -0
- package/dist/TrendsStore-5PvDT_o6.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-Bj34_i8g.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-lihSDk2J.mjs} +517 -493
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BnTgAfQn.mjs} +2 -2
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +241 -203
- package/dist/accounts/stores/AccountStore.d.ts +22 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +500 -507
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +384 -382
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/charts/index.d.ts +0 -2
- package/dist/common/index.es.js +391 -376
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +10 -4
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +506 -498
- package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-B8qpk5MU.mjs} +14 -13
- package/dist/finstrong/index.es.js +417 -415
- package/dist/goals/index.es.js +559 -557
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-D6XlXHf4.mjs → hooks-Cy8JnjCg.mjs} +2 -2
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +437 -435
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +0 -1
- package/dist/networth/index.es.js +176 -174
- package/dist/notifications/index.es.js +23 -23
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +175 -173
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +285 -279
- package/dist/spending/index.es.js +282 -281
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/index.es.js +63 -64
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/index.es.js +948 -583
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-D6sQsNNQ.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-BxytCjq5.mjs} +1 -1
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import S from "@mui/material/ListItem";
|
|
4
|
+
import R from "@mui/material/ListItemButton";
|
|
5
|
+
import f from "@mui/material/ListItemIcon";
|
|
6
|
+
import A from "@mui/material/ListItemText";
|
|
7
|
+
import h from "@mui/material/Stack";
|
|
8
|
+
import { Text as y } from "@mxenabled/mxui";
|
|
9
|
+
import { makeAutoObservable as N } from "mobx";
|
|
10
|
+
import { addSeconds as v } from "date-fns/addSeconds";
|
|
11
|
+
import { differenceInCalendarMonths as w } from "date-fns/differenceInCalendarMonths";
|
|
12
|
+
import { endOfMonth as D } from "date-fns/endOfMonth";
|
|
13
|
+
import { subMonths as I } from "date-fns/subMonths";
|
|
14
|
+
import { b as E, C as _, c as O } from "./Category-CevNQ03n.mjs";
|
|
15
|
+
import { f as L, D as T } from "./Dialog-CWW597AF.mjs";
|
|
16
|
+
const at = ({
|
|
17
|
+
onClick: e,
|
|
18
|
+
leftIcon: t,
|
|
19
|
+
rightIcon: o,
|
|
20
|
+
title: r,
|
|
21
|
+
subtitle: a,
|
|
22
|
+
rightContent: n,
|
|
23
|
+
titleBold: s = !0,
|
|
24
|
+
rightContentBold: m = !0
|
|
25
|
+
}) => {
|
|
26
|
+
const c = /* @__PURE__ */ d(x.Fragment, { children: [
|
|
27
|
+
t && /* @__PURE__ */ l(f, { sx: { ml: 0 }, children: t }),
|
|
28
|
+
/* @__PURE__ */ l(A, { children: /* @__PURE__ */ d(
|
|
29
|
+
h,
|
|
30
|
+
{
|
|
31
|
+
sx: {
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
flexDirection: "row",
|
|
34
|
+
marginLeft: 12
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ d(h, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
38
|
+
/* @__PURE__ */ l(y, { bold: s, variant: "body1", children: r }),
|
|
39
|
+
a && /* @__PURE__ */ l(y, { variant: "caption", children: a })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ d(h, { sx: { flexDirection: "row", alignItems: "center", gap: 1 }, children: [
|
|
42
|
+
n && /* @__PURE__ */ l(y, { bold: m, display: "flex", variant: "body1", children: n }),
|
|
43
|
+
o && /* @__PURE__ */ l(f, { children: o })
|
|
44
|
+
] })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] });
|
|
49
|
+
return /* @__PURE__ */ l(S, { sx: { bgcolor: "background.paper" }, children: e ? /* @__PURE__ */ l(
|
|
50
|
+
R,
|
|
51
|
+
{
|
|
52
|
+
onClick: e,
|
|
53
|
+
sx: {
|
|
54
|
+
py: 14
|
|
55
|
+
},
|
|
56
|
+
children: c
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ l(
|
|
59
|
+
h,
|
|
60
|
+
{
|
|
61
|
+
sx: {
|
|
62
|
+
py: 14,
|
|
63
|
+
px: 24,
|
|
64
|
+
width: "100%",
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
alignItems: "center"
|
|
67
|
+
},
|
|
68
|
+
children: c
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
}, W = (e) => _[e] ?? _.default, F = (e) => O[e];
|
|
72
|
+
function G(e, t) {
|
|
73
|
+
const o = [], r = new Date(e);
|
|
74
|
+
for (; r <= t; ) {
|
|
75
|
+
const a = r.getFullYear(), n = String(r.getMonth() + 1).padStart(2, "0");
|
|
76
|
+
o.push(+`${a}${n}`), r.setMonth(r.getMonth() + 1);
|
|
77
|
+
}
|
|
78
|
+
return o;
|
|
79
|
+
}
|
|
80
|
+
const $ = (e) => e.reduce((o, r) => {
|
|
81
|
+
const a = {
|
|
82
|
+
top_level_category_guid: r.top_level_category_guid,
|
|
83
|
+
category_guid: r.category_guid,
|
|
84
|
+
amount: r.total,
|
|
85
|
+
year_month: r.year_month
|
|
86
|
+
}, { top_level_category_guid: n, category_guid: s } = a;
|
|
87
|
+
return o[s] || (o[s] = []), o[s].push(a), n !== s && (o[n] || (o[n] = []), o[n].push(a)), o;
|
|
88
|
+
}, {}), nt = (e, t, o) => {
|
|
89
|
+
const r = $(e), a = G(t, o);
|
|
90
|
+
return Object.entries(r).map(([s, m]) => {
|
|
91
|
+
const c = m[0].top_level_category_guid, b = a.map((i) => {
|
|
92
|
+
const g = m.filter((p) => p.year_month === i).reduce((p, M) => p + Math.abs(M.amount), 0), u = Number(String(i).slice(0, 4)), C = Number(String(i).slice(4));
|
|
93
|
+
return { x: new Date(u, C - 1), y: g };
|
|
94
|
+
}).sort((i, g) => i.x.getTime() - g.x.getTime());
|
|
95
|
+
return {
|
|
96
|
+
top_level_category_guid: c,
|
|
97
|
+
category_guid: s,
|
|
98
|
+
category_name: F(s),
|
|
99
|
+
category_color: W(c),
|
|
100
|
+
dataset: b
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}, st = (e, t) => {
|
|
104
|
+
const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e, r = typeof t == "string" ? parseFloat(t.replace(/[^0-9.-]+/g, "")) : t;
|
|
105
|
+
return (o || 0) - (r || 0);
|
|
106
|
+
}, j = (e, t) => {
|
|
107
|
+
const o = e.subCategories.filter((n) => n.currentAmount !== 0), r = e.totalMonthlyAmounts.slice(-t), a = (n) => n.substring(0, 3) + " " + n.slice(-4);
|
|
108
|
+
return r.map((n) => {
|
|
109
|
+
const s = a(n.label), m = o.map((i) => {
|
|
110
|
+
const g = i.monthlyAmounts.slice(-t).find((u) => a(u.label) === s);
|
|
111
|
+
return {
|
|
112
|
+
label: i.name,
|
|
113
|
+
amount: Math.abs(g?.amount || 0),
|
|
114
|
+
header: s
|
|
115
|
+
};
|
|
116
|
+
}), c = e.monthlyAmounts.slice(-t).find((i) => a(i.label) === s);
|
|
117
|
+
return [{
|
|
118
|
+
label: e.name,
|
|
119
|
+
amount: Math.abs(c?.amount || 0),
|
|
120
|
+
header: s
|
|
121
|
+
}, ...m].sort((i, g) => g.amount - i.amount);
|
|
122
|
+
});
|
|
123
|
+
}, k = (e, t) => {
|
|
124
|
+
const o = e ? e.totalMonthlyAmounts.slice(-t).map((a) => ({
|
|
125
|
+
x: a.label.substring(0, 3),
|
|
126
|
+
y: Math.abs(a.amount)
|
|
127
|
+
})) : [], r = e ? j(e, t) : [];
|
|
128
|
+
return { monthlyAmounts: o, tooltipLabels: r };
|
|
129
|
+
}, H = (e) => e.slice().filter(
|
|
130
|
+
(t) => t.totalAmount !== 0 && t.isTransfer === !1 && t.guid !== E.INVESTMENTS
|
|
131
|
+
).sort((t, o) => Math.abs(o.totalAmount) - Math.abs(t.totalAmount));
|
|
132
|
+
class it {
|
|
133
|
+
globalStore;
|
|
134
|
+
selectedCategoryData = null;
|
|
135
|
+
selectedDateRange;
|
|
136
|
+
visibleListLength = 5;
|
|
137
|
+
constructor(t) {
|
|
138
|
+
this.globalStore = t, this.selectedDateRange = {
|
|
139
|
+
start: v(D(I(/* @__PURE__ */ new Date(), 6)), 1),
|
|
140
|
+
end: D(/* @__PURE__ */ new Date())
|
|
141
|
+
}, N(this);
|
|
142
|
+
}
|
|
143
|
+
setSelectedCategoryData = (t) => {
|
|
144
|
+
this.selectedCategoryData = t;
|
|
145
|
+
};
|
|
146
|
+
setSelectedDateRange = (t) => {
|
|
147
|
+
this.selectedDateRange = t;
|
|
148
|
+
};
|
|
149
|
+
setVisibleListLength = (t) => {
|
|
150
|
+
this.visibleListLength = t;
|
|
151
|
+
};
|
|
152
|
+
get sortedDetailedCategoriesWithTransactions() {
|
|
153
|
+
return H(
|
|
154
|
+
this.globalStore.categoryStore.detailedCategoriesWithTransactions
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
get selectedDateRangeMonthCount() {
|
|
158
|
+
return w(this.selectedDateRange.end, this.selectedDateRange.start) + 1;
|
|
159
|
+
}
|
|
160
|
+
get selectedDateRangeMonthRange() {
|
|
161
|
+
const t = L(this.selectedDateRange.start, T.MONTH_LONG), o = L(this.selectedDateRange.end, T.MONTH_LONG);
|
|
162
|
+
return `${t} - ${o}`;
|
|
163
|
+
}
|
|
164
|
+
get visibleCategories() {
|
|
165
|
+
return this.sortedDetailedCategoriesWithTransactions.slice(0, this.visibleListLength);
|
|
166
|
+
}
|
|
167
|
+
get collapsedCategories() {
|
|
168
|
+
return this.sortedDetailedCategoriesWithTransactions.slice(this.visibleListLength);
|
|
169
|
+
}
|
|
170
|
+
get categoryDetailsChartData() {
|
|
171
|
+
return k(
|
|
172
|
+
this.selectedCategoryData,
|
|
173
|
+
this.selectedDateRangeMonthCount
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
at as L,
|
|
179
|
+
it as T,
|
|
180
|
+
st as a,
|
|
181
|
+
nt as g
|
|
182
|
+
};
|
|
@@ -22,7 +22,7 @@ import { isWithinInterval as Q } from "date-fns/isWithinInterval";
|
|
|
22
22
|
import nn from "@mui/material/styles/useTheme";
|
|
23
23
|
import k from "@mui/material/ListItem";
|
|
24
24
|
import an from "@mui/material/ListItemButton";
|
|
25
|
-
import { g as tn } from "./hooks-
|
|
25
|
+
import { g as tn } from "./hooks-Cy8JnjCg.mjs";
|
|
26
26
|
var on = /* @__PURE__ */ ((n) => (n[n.CREDIT = 1] = "CREDIT", n[n.DEBIT = 2] = "DEBIT", n))(on || {}), en = /* @__PURE__ */ ((n) => (n[n.POSTED = 1] = "POSTED", n[n.PENDING = 2] = "PENDING", n))(en || {});
|
|
27
27
|
const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
|
|
28
28
|
const c = v(), l = cn(c);
|