@mx-cartographer/experiences 5.3.0-alpha.al0 → 5.3.0-alpha.al2
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/index.es.js +34 -9
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -86,7 +86,7 @@ import { differenceInDays as is } from "date-fns/differenceInDays";
|
|
|
86
86
|
import Di from "@mui/icons-material/ChevronRight";
|
|
87
87
|
import ji from "@mui/icons-material/ExpandMore";
|
|
88
88
|
import { DataGridPro as Gt } from "@mui/x-data-grid-pro";
|
|
89
|
-
import { intervalToDuration as ns, formatDuration as rs, getDate as dr, fromUnixTime as Ai, startOfMonth as Er, format as os, differenceInMonths as Is, isSameDay as as,
|
|
89
|
+
import { intervalToDuration as ns, formatDuration as rs, getDate as dr, fromUnixTime as Ai, startOfMonth as Er, format as os, differenceInMonths as Is, isSameDay as as, subDays as ss, startOfToday as cs, endOfToday as fs } from "date-fns";
|
|
90
90
|
import { getMonth as Dt } from "date-fns/getMonth";
|
|
91
91
|
import Et from "@mui/material/Alert";
|
|
92
92
|
import ri from "@mui/material/Snackbar";
|
|
@@ -1032,9 +1032,18 @@ class Pi {
|
|
|
1032
1032
|
getDateRangeCategoryTotals = async (t, i, n) => this.fetchInstance.post(`${Q.DATE_RANGE_CATEGORY_TOTALS}/from/${t}/to/${i}`, {
|
|
1033
1033
|
account_guid: n.map((r) => r.guid)
|
|
1034
1034
|
}).then((r) => r.date_range_category_totals);
|
|
1035
|
-
getMonthlyCategoryTotals = async (t, i, n) =>
|
|
1036
|
-
|
|
1037
|
-
|
|
1035
|
+
getMonthlyCategoryTotals = async (t, i, n) => {
|
|
1036
|
+
try {
|
|
1037
|
+
const r = `${Q.MONTHLY_CATEGORY_TOTALS}/from/${t}/to/${i}`;
|
|
1038
|
+
if (n) {
|
|
1039
|
+
const o = n.length === 0 ? [""] : n.map((a) => a.guid);
|
|
1040
|
+
return (await this.fetchInstance.post(r, { account_guid: o })).monthly_category_totals;
|
|
1041
|
+
} else
|
|
1042
|
+
return (await this.fetchInstance.get(r)).monthly_category_totals;
|
|
1043
|
+
} catch (r) {
|
|
1044
|
+
throw console.error("Error fetching monthly category totals:", r), r;
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1038
1047
|
removeCategory = async (t) => this.fetchInstance.delete(`${Q.CATEGORIES}/${t}`);
|
|
1039
1048
|
updateCategory = async (t) => this.fetchInstance.put(`${Q.CATEGORIES}/${t.guid}`, t).then((i) => i.category);
|
|
1040
1049
|
}
|
|
@@ -4465,7 +4474,16 @@ const sf = [
|
|
|
4465
4474
|
ON_TRANSACTION_UNSPLIT_CANCEL: "onTransactionUnsplitCancel"
|
|
4466
4475
|
}, aI = {
|
|
4467
4476
|
ASC: "ASC",
|
|
4468
|
-
DESC: "DESC"
|
|
4477
|
+
DESC: "DESC",
|
|
4478
|
+
DIRECTION: {
|
|
4479
|
+
ASC: "ascending",
|
|
4480
|
+
DESC: "descending"
|
|
4481
|
+
},
|
|
4482
|
+
ALIGN: {
|
|
4483
|
+
center: "center",
|
|
4484
|
+
left: "flex-start",
|
|
4485
|
+
right: "flex-end"
|
|
4486
|
+
}
|
|
4469
4487
|
}, ff = (A, t, i, n = []) => {
|
|
4470
4488
|
const r = t.reduce((a, c) => ({ ...a, [c.guid]: c }), {}), o = i.reduce((a, c) => ({ ...a, [c.guid]: c }), {}), I = n.reduce((a, c) => {
|
|
4471
4489
|
const { transaction_guid: f, tag_guid: d } = c;
|
|
@@ -4499,12 +4517,15 @@ const sf = [
|
|
|
4499
4517
|
ADD: "Add",
|
|
4500
4518
|
ADD_CATEGORY: "Add Category",
|
|
4501
4519
|
CHANGE_CATEGORY: "Change Category",
|
|
4520
|
+
CHANGE_DATE: "Change Date",
|
|
4502
4521
|
CLOSE: "Close",
|
|
4503
4522
|
DELETE: "Delete",
|
|
4504
4523
|
EDIT: "Edit",
|
|
4524
|
+
HIDE: "Hide",
|
|
4505
4525
|
SAVE: "Save",
|
|
4506
4526
|
SPLIT: "Split",
|
|
4507
4527
|
SELECT: "Select",
|
|
4528
|
+
UNHIDE: "Unhide",
|
|
4508
4529
|
UNSPLIT: "Unsplit"
|
|
4509
4530
|
}, lA = {
|
|
4510
4531
|
TRANSACTION_DETAILS: "Transaction Details",
|
|
@@ -4527,6 +4548,7 @@ const sf = [
|
|
|
4527
4548
|
TAG_DELETE: "Delete Tag",
|
|
4528
4549
|
TAG_EDIT: "Edit Tag",
|
|
4529
4550
|
TRANSACTION: "Transaction",
|
|
4551
|
+
TRANSACTIONS_LIST: "Transactions List",
|
|
4530
4552
|
UNHIDE_TRANSACTION: "Unhide Transaction"
|
|
4531
4553
|
}, Mr = {
|
|
4532
4554
|
// splits
|
|
@@ -4743,7 +4765,11 @@ const sf = [
|
|
|
4743
4765
|
label: vA.DELETE_TRANSACTION
|
|
4744
4766
|
}
|
|
4745
4767
|
}, df = async (A, t) => !t || !Mr[A] ? null : t.sendAnalyticEvent(Mr[A]), Rn = {
|
|
4768
|
+
FLAG: "flag",
|
|
4746
4769
|
DATE: "date",
|
|
4770
|
+
PAYEE: "payee",
|
|
4771
|
+
CATEGORY: "category",
|
|
4772
|
+
ACCOUNT: "account",
|
|
4747
4773
|
AMOUNT: "amount"
|
|
4748
4774
|
}, Ef = "uncategorized", hf = (A, t, i, n, r, o) => {
|
|
4749
4775
|
const I = lf(A, r, o), a = vf(I, i, n);
|
|
@@ -5853,7 +5879,7 @@ class sd {
|
|
|
5853
5879
|
const r = gA(QA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = gA(BA(n ?? /* @__PURE__ */ new Date()));
|
|
5854
5880
|
try {
|
|
5855
5881
|
const I = await this.api.getMonthlyCategoryTotals(r, o, t);
|
|
5856
|
-
|
|
5882
|
+
F(() => {
|
|
5857
5883
|
this.monthlyCategoryTotals = I;
|
|
5858
5884
|
});
|
|
5859
5885
|
} catch (I) {
|
|
@@ -19251,7 +19277,7 @@ const on = ({
|
|
|
19251
19277
|
const [A, t] = h.useState(""), { onEvent: i } = K(), { selectedAccount: n } = Xe(), { accounts: r } = X(), { setFilter: o, sortedTransactions: I } = PA(), a = h.useMemo(() => I.find((c) => c.guid === A), [A]);
|
|
19252
19278
|
return h.useEffect(() => {
|
|
19253
19279
|
o({
|
|
19254
|
-
dateRange: { start: cs(
|
|
19280
|
+
dateRange: { start: ss(cs(), 90), end: fs() },
|
|
19255
19281
|
accounts: [n.guid]
|
|
19256
19282
|
});
|
|
19257
19283
|
}, [n]), h.useEffect(() => i(Y.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ s(J, { children: [
|
|
@@ -21183,6 +21209,7 @@ const tr = {
|
|
|
21183
21209
|
}),
|
|
21184
21210
|
{}
|
|
21185
21211
|
), $e = {
|
|
21212
|
+
CARD: "Card",
|
|
21186
21213
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
21187
21214
|
MICRO_WIDGET: "Micro Widget",
|
|
21188
21215
|
VIEW_MORE: "View More"
|
|
@@ -23630,8 +23657,6 @@ const t7 = (A) => A.reduce((i, n) => {
|
|
|
23630
23657
|
});
|
|
23631
23658
|
h.useEffect(() => {
|
|
23632
23659
|
u(a);
|
|
23633
|
-
}, []), h.useEffect(() => {
|
|
23634
|
-
u(a);
|
|
23635
23660
|
}, [a]), h.useEffect(() => {
|
|
23636
23661
|
l && c(
|
|
23637
23662
|
v,
|