@mx-cartographer/experiences 3.7.0-alpha.al14 → 3.7.0-alpha.al15
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
CHANGED
|
@@ -68,7 +68,7 @@ import Zo from "@mui/material/Radio";
|
|
|
68
68
|
import Te from "@mui/material/Avatar";
|
|
69
69
|
import PA from "@mui/material/ListItemAvatar";
|
|
70
70
|
import oe from "@mui/material/ListItemIcon";
|
|
71
|
-
import { makeAutoObservable as bA, runInAction as
|
|
71
|
+
import { makeAutoObservable as bA, runInAction as Y, observable as $o } from "mobx";
|
|
72
72
|
import { differenceInDays as As } from "date-fns/differenceInDays";
|
|
73
73
|
import { getMonth as We } from "date-fns/getMonth";
|
|
74
74
|
import { useVirtualizer as Yr } from "@tanstack/react-virtual";
|
|
@@ -2793,7 +2793,7 @@ const vc = ({
|
|
|
2793
2793
|
if (!e)
|
|
2794
2794
|
throw new Error(`${A}() must be used within the GlobalDataContext`);
|
|
2795
2795
|
return e;
|
|
2796
|
-
}, DA = () => KA("useAccountStore").globalStore.accountStore, nn = () => KA("useBudgetsStore").globalStore.budgetsStore, ia = () => KA("useCashflowStore").globalStore.cashflowStore, xA = () => KA("useCategoryStore").globalStore.categoryStore, pi = () => KA("useConnectStore").globalStore.connectStore, an = () => KA("useGlobalStore").globalStore, vA = () => KA("useGlobalUiStore").globalStore.globalUiStore, W = () => KA("globalCopyStore").globalStore.copyStore.copy, _c = () => KA("useMerchantStore").globalStore.merchantStore, Hc = () => KA("useNetWorthStore").globalStore.netWorthStore, yi = () => KA("useNotificationStore").globalStore.notificationStore, kA = () => KA("useRecurringActivityStore").globalStore.recurringActivityStore, uA = () => KA("useTransactionStore").globalStore.transactionStore, rn = () => KA("useUserStore").globalStore.userStore,
|
|
2796
|
+
}, DA = () => KA("useAccountStore").globalStore.accountStore, nn = () => KA("useBudgetsStore").globalStore.budgetsStore, ia = () => KA("useCashflowStore").globalStore.cashflowStore, xA = () => KA("useCategoryStore").globalStore.categoryStore, pi = () => KA("useConnectStore").globalStore.connectStore, an = () => KA("useGlobalStore").globalStore, vA = () => KA("useGlobalUiStore").globalStore.globalUiStore, W = () => KA("globalCopyStore").globalStore.copyStore.copy, _c = () => KA("useMerchantStore").globalStore.merchantStore, Hc = () => KA("useNetWorthStore").globalStore.netWorthStore, yi = () => KA("useNotificationStore").globalStore.notificationStore, kA = () => KA("useRecurringActivityStore").globalStore.recurringActivityStore, uA = () => KA("useTransactionStore").globalStore.transactionStore, rn = () => KA("useUserStore").globalStore.userStore, V = () => ({ onEvent: KA().onEvent }), T7 = () => ({ onPageView: KA().onPageView }), zc = (A = "useWidgetContainerContext") => {
|
|
2797
2797
|
const e = g.useContext(vi);
|
|
2798
2798
|
if (!e)
|
|
2799
2799
|
throw new Error(`${A}() must be used within the WidgetContainerContext`);
|
|
@@ -2876,7 +2876,7 @@ const qe = ({
|
|
|
2876
2876
|
sx: d = {},
|
|
2877
2877
|
title: h = ""
|
|
2878
2878
|
}) => {
|
|
2879
|
-
const [C, { height: f, width: v }] = Ei(), { onEvent: m } =
|
|
2879
|
+
const [C, { height: f, width: v }] = Ei(), { onEvent: m } = V(), { isDesktop: E, isMobile: L, isTablet: b } = jA(), { displayedDateRange: w, selectedAccountGuids: I, setSelectedAccountGuids: D } = vA(), { common: O } = W(), k = () => {
|
|
2880
2880
|
c && (c(), m(J.WIDGET_BACK_CLICK));
|
|
2881
2881
|
}, $ = {
|
|
2882
2882
|
accountFilterOptionsCopy: {
|
|
@@ -3298,7 +3298,7 @@ const qe = ({
|
|
|
3298
3298
|
onClick: n,
|
|
3299
3299
|
sx: a = {}
|
|
3300
3300
|
}) => {
|
|
3301
|
-
const { onEvent: r } =
|
|
3301
|
+
const { onEvent: r } = V();
|
|
3302
3302
|
return n ? /* @__PURE__ */ t(U, { sx: { bgcolor: "background.paper", ...a }, children: /* @__PURE__ */ t(
|
|
3303
3303
|
dA,
|
|
3304
3304
|
{
|
|
@@ -3326,14 +3326,14 @@ class Qc {
|
|
|
3326
3326
|
bA(this);
|
|
3327
3327
|
}
|
|
3328
3328
|
initialize = async (e, n) => {
|
|
3329
|
-
this.api = new Qt(e, n), await this.getCopy(this.featureNamespace),
|
|
3329
|
+
this.api = new Qt(e, n), await this.getCopy(this.featureNamespace), Y(() => {
|
|
3330
3330
|
this.isInitialized = !0;
|
|
3331
3331
|
});
|
|
3332
3332
|
};
|
|
3333
3333
|
getCopy = async (e, n = "") => {
|
|
3334
3334
|
try {
|
|
3335
3335
|
const a = await this.api.getGlobalCopy(e, n);
|
|
3336
|
-
|
|
3336
|
+
Y(() => {
|
|
3337
3337
|
this.copy = a[e];
|
|
3338
3338
|
});
|
|
3339
3339
|
} catch (a) {
|
|
@@ -3352,7 +3352,7 @@ class Fc {
|
|
|
3352
3352
|
};
|
|
3353
3353
|
loadBeats = async () => {
|
|
3354
3354
|
const e = await this.api.getBeats();
|
|
3355
|
-
|
|
3355
|
+
Y(() => {
|
|
3356
3356
|
this.beats = e;
|
|
3357
3357
|
});
|
|
3358
3358
|
};
|
|
@@ -3379,7 +3379,7 @@ class Uc {
|
|
|
3379
3379
|
loadBudgets = async () => {
|
|
3380
3380
|
try {
|
|
3381
3381
|
const e = await this.api.getBudgets();
|
|
3382
|
-
|
|
3382
|
+
Y(() => {
|
|
3383
3383
|
this.budgets = e.filter(
|
|
3384
3384
|
(n) => n.category_guid !== p.INCOME && n.category_guid !== p.TRANSFER
|
|
3385
3385
|
);
|
|
@@ -4149,7 +4149,7 @@ class cl {
|
|
|
4149
4149
|
};
|
|
4150
4150
|
addTransaction = async (e) => {
|
|
4151
4151
|
const n = await this.api.addTransaction(e);
|
|
4152
|
-
n &&
|
|
4152
|
+
n && Y(
|
|
4153
4153
|
() => this.transactions = this.augmentTransactions([n, ...this.transactions])
|
|
4154
4154
|
);
|
|
4155
4155
|
};
|
|
@@ -4161,19 +4161,19 @@ class cl {
|
|
|
4161
4161
|
);
|
|
4162
4162
|
loadAssociatedBeats = async (e) => {
|
|
4163
4163
|
const n = e ? Un(e, { representation: "date" }) : void 0, a = await this.beatApi.getBeatsWithAssociatedTransaction(n);
|
|
4164
|
-
|
|
4164
|
+
Y(() => this.associatedBeats = a);
|
|
4165
4165
|
};
|
|
4166
4166
|
loadTags = async () => {
|
|
4167
4167
|
const e = await this.api.getTags();
|
|
4168
|
-
|
|
4168
|
+
Y(() => this.tags = e);
|
|
4169
4169
|
};
|
|
4170
4170
|
loadTaggings = async () => {
|
|
4171
4171
|
const e = await this.api.getTaggings();
|
|
4172
|
-
|
|
4172
|
+
Y(() => this.taggings = e);
|
|
4173
4173
|
};
|
|
4174
4174
|
loadTransactionRules = async () => {
|
|
4175
4175
|
const e = await this.api.getTransactionRules();
|
|
4176
|
-
|
|
4176
|
+
Y(() => this.transactionRules = e);
|
|
4177
4177
|
};
|
|
4178
4178
|
loadTransactions = async (e = this.cachedStartDate, n = Qe()) => {
|
|
4179
4179
|
this.setIsLoading(!0), this.transactions = [];
|
|
@@ -4182,7 +4182,7 @@ class cl {
|
|
|
4182
4182
|
CA(e),
|
|
4183
4183
|
CA(n)
|
|
4184
4184
|
);
|
|
4185
|
-
|
|
4185
|
+
Y(() => {
|
|
4186
4186
|
this.transactions = this.augmentTransactions(a);
|
|
4187
4187
|
});
|
|
4188
4188
|
} catch (a) {
|
|
@@ -4208,7 +4208,7 @@ class cl {
|
|
|
4208
4208
|
const n = this.transactions.findIndex((a) => a.guid === e);
|
|
4209
4209
|
if (n >= 0) {
|
|
4210
4210
|
const a = [...this.transactions];
|
|
4211
|
-
a.splice(n, 1),
|
|
4211
|
+
a.splice(n, 1), Y(() => this.transactions = a);
|
|
4212
4212
|
}
|
|
4213
4213
|
};
|
|
4214
4214
|
setFilter = (e) => {
|
|
@@ -4227,7 +4227,7 @@ class cl {
|
|
|
4227
4227
|
r.push(s);
|
|
4228
4228
|
}
|
|
4229
4229
|
const i = this.transactions.findIndex((o) => o.guid === e.guid);
|
|
4230
|
-
i >= 0 &&
|
|
4230
|
+
i >= 0 && Y(
|
|
4231
4231
|
() => this.transactions = this.augmentTransactions([
|
|
4232
4232
|
...this.transactions.slice(0, i),
|
|
4233
4233
|
a,
|
|
@@ -4245,7 +4245,7 @@ class cl {
|
|
|
4245
4245
|
s >= 0 && a.splice(s, 1);
|
|
4246
4246
|
});
|
|
4247
4247
|
const r = a.findIndex((o) => o.guid === e), i = a[r];
|
|
4248
|
-
i.has_been_split = !1, r >= 0 &&
|
|
4248
|
+
i.has_been_split = !1, r >= 0 && Y(
|
|
4249
4249
|
() => this.transactions = [
|
|
4250
4250
|
...a.slice(0, r),
|
|
4251
4251
|
i,
|
|
@@ -4269,7 +4269,7 @@ class cl {
|
|
|
4269
4269
|
};
|
|
4270
4270
|
updateTransaction = async (e) => {
|
|
4271
4271
|
const n = await this.api.updateTransaction(e), a = this.transactions.findIndex((r) => r.guid === e.guid);
|
|
4272
|
-
a >= 0 &&
|
|
4272
|
+
a >= 0 && Y(
|
|
4273
4273
|
() => this.transactions = this.augmentTransactions([
|
|
4274
4274
|
...this.transactions.slice(0, a),
|
|
4275
4275
|
n,
|
|
@@ -4379,7 +4379,7 @@ const WA = () => {
|
|
|
4379
4379
|
width: o = "100%",
|
|
4380
4380
|
zeroState: s = /* @__PURE__ */ t(ul, {})
|
|
4381
4381
|
}) => {
|
|
4382
|
-
const { isLoading: c, sortedTransactions: l } = uA(), { setShowInsights: d, toggleSplit: h } = WA(), { onEvent: C } =
|
|
4382
|
+
const { isLoading: c, sortedTransactions: l } = uA(), { setShowInsights: d, toggleSplit: h } = WA(), { onEvent: C } = V(), f = (E) => {
|
|
4383
4383
|
const L = l.find((b) => b.guid === E);
|
|
4384
4384
|
if (L?.has_been_split) {
|
|
4385
4385
|
h(L.guid);
|
|
@@ -4647,7 +4647,7 @@ const Il = ({
|
|
|
4647
4647
|
}
|
|
4648
4648
|
);
|
|
4649
4649
|
}, ha = x(Il), Dl = ({ parentCategory: A }) => {
|
|
4650
|
-
const [e, n] = g.useState(!1), { addCategory: a } = xA(), { categories: r } = W(), { onEvent: i } =
|
|
4650
|
+
const [e, n] = g.useState(!1), { addCategory: a } = xA(), { categories: r } = W(), { onEvent: i } = V(), { setShouldDisableDrawerScroll: o } = Fe(), s = async (d) => {
|
|
4651
4651
|
await a(d.trim(), A.guid), i(ne.ON_SUBCATEGORY_ADDED), n(!1);
|
|
4652
4652
|
}, c = async () => {
|
|
4653
4653
|
i(ne.ON_SUBCATEGORY_ADD_CLICK), o(!0), n(!0);
|
|
@@ -4677,7 +4677,7 @@ const Il = ({
|
|
|
4677
4677
|
subCategory: e,
|
|
4678
4678
|
showRename: n
|
|
4679
4679
|
}) => {
|
|
4680
|
-
const { updateCategory: a } = xA(), { onEvent: r } =
|
|
4680
|
+
const { updateCategory: a } = xA(), { onEvent: r } = V(), i = async (s) => {
|
|
4681
4681
|
await a({ ...e, name: s }), r(ne.ON_SUBCATEGORY_SAVED), A(!1);
|
|
4682
4682
|
}, o = () => {
|
|
4683
4683
|
A(!1), r(ne.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
|
|
@@ -4698,7 +4698,7 @@ const Il = ({
|
|
|
4698
4698
|
setShowDelete: n,
|
|
4699
4699
|
subCategory: a
|
|
4700
4700
|
}) => {
|
|
4701
|
-
const { onEvent: r } =
|
|
4701
|
+
const { onEvent: r } = V(), { removeCategory: i } = xA(), o = () => {
|
|
4702
4702
|
n(!1), r(ne.ON_SUBCATEGORY_DELETE_CLICK);
|
|
4703
4703
|
}, s = async () => {
|
|
4704
4704
|
r(ne.ON_SUBCATEGORY_DELETED), await i(a.guid), n(!1);
|
|
@@ -4722,7 +4722,7 @@ const Il = ({
|
|
|
4722
4722
|
showSelected: o,
|
|
4723
4723
|
unselectable: s,
|
|
4724
4724
|
unselectableText: c
|
|
4725
|
-
} = Fe(), { categories: l } = W(), { onEvent: d } =
|
|
4725
|
+
} = Fe(), { categories: l } = W(), { onEvent: d } = V(), [h, C] = g.useState(!1), [f, v] = g.useState(!1), m = !!e.revision, E = e.guid === a, L = !s.some((w) => w === e.guid);
|
|
4726
4726
|
return /* @__PURE__ */ u(
|
|
4727
4727
|
U,
|
|
4728
4728
|
{
|
|
@@ -4823,7 +4823,7 @@ const Il = ({
|
|
|
4823
4823
|
}
|
|
4824
4824
|
);
|
|
4825
4825
|
}, zl = x(Hl), ql = ({ category: A, subCategories: e }) => {
|
|
4826
|
-
const { expandedGuid: n, searchValue: a, setExpandedGuid: r } = Fe(), { onEvent: i } =
|
|
4826
|
+
const { expandedGuid: n, searchValue: a, setExpandedGuid: r } = Fe(), { onEvent: i } = V(), o = A.guid === n, s = () => {
|
|
4827
4827
|
const c = A.guid !== n ? A.guid : null;
|
|
4828
4828
|
r(c), i(c ? ne.ON_CATEGORY_EXPANDED : ne.ON_CATEGORY_COLLAPSED);
|
|
4829
4829
|
};
|
|
@@ -5027,7 +5027,7 @@ class Wl {
|
|
|
5027
5027
|
loadCategories = async () => {
|
|
5028
5028
|
try {
|
|
5029
5029
|
const e = await this.api.getCategories(), { default_categories: n } = this.globalStore.copyStore.copy.categories;
|
|
5030
|
-
|
|
5030
|
+
Y(() => {
|
|
5031
5031
|
this.categories = e.map((a) => ({
|
|
5032
5032
|
...a,
|
|
5033
5033
|
name: n[a.guid] ? n[a.guid].replace(/&/g, "&") : a.name
|
|
@@ -5045,7 +5045,7 @@ class Wl {
|
|
|
5045
5045
|
CA(a),
|
|
5046
5046
|
e
|
|
5047
5047
|
);
|
|
5048
|
-
|
|
5048
|
+
Y(() => {
|
|
5049
5049
|
this.dateRangeCategoryTotals = r, this.detailedCategories = this.augmentCategories(), this.setIsLoadingCategoryTotals(!1);
|
|
5050
5050
|
});
|
|
5051
5051
|
} catch (r) {
|
|
@@ -5056,7 +5056,7 @@ class Wl {
|
|
|
5056
5056
|
const r = CA(LA(n ?? ye(/* @__PURE__ */ new Date(), 5))), i = CA(OA(a ?? /* @__PURE__ */ new Date()));
|
|
5057
5057
|
try {
|
|
5058
5058
|
const o = await this.api.getMonthlyCategoryTotals(r, i, e);
|
|
5059
|
-
|
|
5059
|
+
Y(() => {
|
|
5060
5060
|
this.monthlyCategoryTotals = o, this.detailedCategories = this.augmentCategories();
|
|
5061
5061
|
});
|
|
5062
5062
|
} catch (o) {
|
|
@@ -5082,7 +5082,7 @@ class Wl {
|
|
|
5082
5082
|
};
|
|
5083
5083
|
}
|
|
5084
5084
|
const Si = ({ transaction: A }) => {
|
|
5085
|
-
const { addOrUpdateTransactionRule: e, updateTransaction: n } = uA(), { categories: a } = xA(), { onEvent: r } =
|
|
5085
|
+
const { addOrUpdateTransactionRule: e, updateTransaction: n } = uA(), { categories: a } = xA(), { onEvent: r } = V(), { setShouldDisableDrawerScroll: i, updateManualTransaction: o } = WA(), { transactions: s } = W(), [c, l] = g.useState(!1), [d, h] = g.useState(""), C = async (E) => {
|
|
5086
5086
|
await n({ ...A, category_guid: d }), E && await e(d, A), h(""), r(J.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
5087
5087
|
transaction_guid: A.guid
|
|
5088
5088
|
});
|
|
@@ -5167,7 +5167,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5167
5167
|
)
|
|
5168
5168
|
] });
|
|
5169
5169
|
}, bi = ({ transaction: A }) => {
|
|
5170
|
-
const e = SA(), { onEvent: n } =
|
|
5170
|
+
const e = SA(), { onEvent: n } = V(), { updateTransaction: a } = uA(), { updateManualTransaction: r } = WA(), { common: i, transactions: o } = W(), [s, c] = g.useState(!1), [l, d] = g.useState(A.date), h = (f) => {
|
|
5171
5171
|
d(CA(f));
|
|
5172
5172
|
}, C = async () => {
|
|
5173
5173
|
if (A.is_manual && !A.guid) {
|
|
@@ -5224,7 +5224,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5224
5224
|
)
|
|
5225
5225
|
] });
|
|
5226
5226
|
}, Yl = ({ transaction: A }) => {
|
|
5227
|
-
const { onEvent: e } =
|
|
5227
|
+
const { onEvent: e } = V(), { removeTransaction: n } = uA(), { setShouldDisableDrawerScroll: a } = WA(), { common: r, transactions: i } = W(), [o, s] = g.useState(!1), c = async () => {
|
|
5228
5228
|
await n(A.guid), e(M.ON_TRANSACTION_DELETE_DELETED);
|
|
5229
5229
|
};
|
|
5230
5230
|
return /* @__PURE__ */ u(S, { className: "mx-txn-delete", children: [
|
|
@@ -5264,7 +5264,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5264
5264
|
)
|
|
5265
5265
|
] });
|
|
5266
5266
|
}, Vl = ({ transaction: A }) => {
|
|
5267
|
-
const { onEvent: e } =
|
|
5267
|
+
const { onEvent: e } = V(), { updateTransaction: n } = uA(), { setShouldDisableDrawerScroll: a } = WA(), { common: r, transactions: i } = W(), [o, s] = g.useState(!1), c = async () => {
|
|
5268
5268
|
await n({ ...A, merchant_guid: "" }), e(J.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
5269
5269
|
transaction_guid: A.guid
|
|
5270
5270
|
});
|
|
@@ -5304,7 +5304,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5304
5304
|
)
|
|
5305
5305
|
] });
|
|
5306
5306
|
}, Jl = ({ transaction: A }) => {
|
|
5307
|
-
const { onEvent: e } =
|
|
5307
|
+
const { onEvent: e } = V(), { updateTransaction: n } = uA(), { setShouldDisableDrawerScroll: a } = WA(), { common: r, transactions: i } = W(), [o, s] = g.useState(!1), c = A.is_hidden, l = async () => {
|
|
5308
5308
|
await n({ ...A, is_hidden: !A.is_hidden }), e(
|
|
5309
5309
|
c ? M.ON_TRANSACTION_UNHIDDEN : M.ON_TRANSACTION_HIDDEN
|
|
5310
5310
|
);
|
|
@@ -5393,7 +5393,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5393
5393
|
] })
|
|
5394
5394
|
] });
|
|
5395
5395
|
}, Di = ({ transaction: A }) => {
|
|
5396
|
-
const { onEvent: e } =
|
|
5396
|
+
const { onEvent: e } = V(), { updateTransaction: n } = uA(), { updateManualTransaction: a } = WA(), { common: r, transactions: i } = W(), [o, s] = g.useState(!1), [c, l] = g.useState("");
|
|
5397
5397
|
g.useEffect(() => {
|
|
5398
5398
|
o && l(A.memo ? A.memo : "");
|
|
5399
5399
|
}, [o]);
|
|
@@ -5460,7 +5460,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5460
5460
|
onUpdateAmount: a,
|
|
5461
5461
|
split: r
|
|
5462
5462
|
}) => {
|
|
5463
|
-
const i = SA(), { onEvent: o } =
|
|
5463
|
+
const i = SA(), { onEvent: o } = V(), { transactions: s } = W(), [c, l] = g.useState(`${r.amount}`), [d, h] = g.useState(!1), C = A === 0, f = (v) => {
|
|
5464
5464
|
isNaN(Number(v)) || (l(v), a(A, Number(v)));
|
|
5465
5465
|
};
|
|
5466
5466
|
return /* @__PURE__ */ u(
|
|
@@ -5562,7 +5562,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5562
5562
|
splits: r,
|
|
5563
5563
|
transaction: i
|
|
5564
5564
|
}) => {
|
|
5565
|
-
const o = SA(), { transactions: s } = W(), { onEvent: c } =
|
|
5565
|
+
const o = SA(), { transactions: s } = W(), { onEvent: c } = V(), [l, d] = g.useState("");
|
|
5566
5566
|
return g.useEffect(() => {
|
|
5567
5567
|
d(r.length <= 1 ? s.split_transaction_errors_min_splits : ""), d(
|
|
5568
5568
|
r[0].amount < 0 ? H(
|
|
@@ -5607,7 +5607,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5607
5607
|
) })
|
|
5608
5608
|
] });
|
|
5609
5609
|
}, Ad = ({ transaction: A }) => {
|
|
5610
|
-
const { onEvent: e } =
|
|
5610
|
+
const { onEvent: e } = V(), { splitTransaction: n, unSplitTransaction: a } = uA(), { common: r, transactions: i } = W(), { setShouldDisableDrawerScroll: o } = WA(), { categories: s } = xA(), c = {
|
|
5611
5611
|
...A,
|
|
5612
5612
|
amount: A.amount - 1,
|
|
5613
5613
|
guid: "",
|
|
@@ -5727,7 +5727,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5727
5727
|
)
|
|
5728
5728
|
] });
|
|
5729
5729
|
}, ed = () => {
|
|
5730
|
-
const A = fA(), { onEvent: e } =
|
|
5730
|
+
const A = fA(), { onEvent: e } = V(), { addTag: n } = uA(), { transactions: a } = W(), [r, i] = g.useState(!1), [o, s] = g.useState(""), [c, l] = g.useState(""), d = g.useRef(null);
|
|
5731
5731
|
g.useEffect(() => {
|
|
5732
5732
|
r && d?.current?.focus();
|
|
5733
5733
|
}, [r]);
|
|
@@ -5814,7 +5814,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5814
5814
|
}
|
|
5815
5815
|
) });
|
|
5816
5816
|
}, nd = ({ onTagChecked: A, selectedTags: e, tag: n }) => {
|
|
5817
|
-
const { onEvent: a } =
|
|
5817
|
+
const { onEvent: a } = V(), { removeTag: r, updateTag: i } = uA(), { common: o, transactions: s } = W(), [c, l] = g.useState(!1), [d, h] = g.useState(!1), [C, f] = g.useState(""), [v, m] = g.useState(""), E = async () => {
|
|
5818
5818
|
a(M.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), n && await i({ ...n, name: C }), l(!1);
|
|
5819
5819
|
}, L = async () => {
|
|
5820
5820
|
a(M.ON_TRANSACTION_TAGS_TAG_DELETED), await r(n.guid), h(!1);
|
|
@@ -5926,7 +5926,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5926
5926
|
] }, o.guid)) }) })
|
|
5927
5927
|
] });
|
|
5928
5928
|
}, rd = x(ad), id = ({ transaction: A }) => {
|
|
5929
|
-
const { onEvent: e } =
|
|
5929
|
+
const { onEvent: e } = V(), { tags: n, updateTaggings: a, updateTransaction: r } = uA(), { common: i, transactions: o } = W(), { updateManualTransaction: s } = WA(), [c, l] = g.useState(!1), [d, h] = g.useState(A.tags);
|
|
5930
5930
|
g.useEffect(() => {
|
|
5931
5931
|
h(A.tags);
|
|
5932
5932
|
}, [c, A]);
|
|
@@ -5981,7 +5981,7 @@ const Si = ({ transaction: A }) => {
|
|
|
5981
5981
|
)
|
|
5982
5982
|
] });
|
|
5983
5983
|
}, Oi = x(id), od = ({ transaction: A }) => {
|
|
5984
|
-
const { updateTransaction: e } = uA(), { common: n, transactions: a } = W(), { onEvent: r } =
|
|
5984
|
+
const { updateTransaction: e } = uA(), { common: n, transactions: a } = W(), { onEvent: r } = V(), [i, o] = g.useState(!1), [s, c] = g.useState(""), l = g.useRef(null);
|
|
5985
5985
|
g.useEffect(() => {
|
|
5986
5986
|
i && (c(A.description), l?.current?.focus());
|
|
5987
5987
|
}, [i]);
|
|
@@ -6032,7 +6032,7 @@ const Si = ({ transaction: A }) => {
|
|
|
6032
6032
|
)
|
|
6033
6033
|
] }) });
|
|
6034
6034
|
}, sd = ({ transaction: A }) => {
|
|
6035
|
-
const { updateTransaction: e } = uA(), { transactions: n } = W(), { onEvent: a } =
|
|
6035
|
+
const { updateTransaction: e } = uA(), { transactions: n } = W(), { onEvent: a } = V(), r = fA(), i = async () => {
|
|
6036
6036
|
a(J.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: A.guid }), await e({ ...A, is_flagged: !A.is_flagged });
|
|
6037
6037
|
};
|
|
6038
6038
|
return /* @__PURE__ */ t("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ t(
|
|
@@ -6068,7 +6068,7 @@ const Si = ({ transaction: A }) => {
|
|
|
6068
6068
|
topActions: e = Vc,
|
|
6069
6069
|
transaction: n
|
|
6070
6070
|
}) => {
|
|
6071
|
-
const a = SA(), r = n?.number && n.number.length > 4, { onEvent: i } =
|
|
6071
|
+
const a = SA(), r = n?.number && n.number.length > 4, { onEvent: i } = V();
|
|
6072
6072
|
return g.useEffect(
|
|
6073
6073
|
() => i(J.TRANSACTION_DETAILS_VIEW, { transaction_guid: n.guid }),
|
|
6074
6074
|
[]
|
|
@@ -6389,7 +6389,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
6389
6389
|
setSearchValue: d,
|
|
6390
6390
|
setShowInsights: h,
|
|
6391
6391
|
updateManualTransaction: C
|
|
6392
|
-
} = WA(), { addTransaction: f, filter: v, setFilter: m, tags: E, transactions: L, updateTransaction: b } = uA(), { common: w, transactions: I } = W(), { userProfile: D } = rn(), { onEvent: O } =
|
|
6392
|
+
} = WA(), { addTransaction: f, filter: v, setFilter: m, tags: E, transactions: L, updateTransaction: b } = uA(), { common: w, transactions: I } = W(), { userProfile: D } = rn(), { onEvent: O } = V(), {
|
|
6393
6393
|
displayedDateRange: k,
|
|
6394
6394
|
isInitialized: $,
|
|
6395
6395
|
selectedAccountGuids: B,
|
|
@@ -6620,7 +6620,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
6620
6620
|
frequency_every_year: "Yearly",
|
|
6621
6621
|
frequency_title: "Select payment frequency"
|
|
6622
6622
|
}, Td = ({ activity: A }) => {
|
|
6623
|
-
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = kA(), { onEvent: i } =
|
|
6623
|
+
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = kA(), { onEvent: i } = V(), [o, s] = g.useState(!1), c = A.activityType === EA.Income, l = [
|
|
6624
6624
|
{ id: _.EveryWeek, label: le.frequency_every_week },
|
|
6625
6625
|
{ id: _.EveryOtherWeek, label: le.frequency_every_other_week },
|
|
6626
6626
|
{ id: _.EveryMonth, label: le.frequency_every_month },
|
|
@@ -6689,7 +6689,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
6689
6689
|
activity_payment_date: "Next payment date",
|
|
6690
6690
|
close_drawer_aria: "Close"
|
|
6691
6691
|
}, Sd = ({ activity: A }) => {
|
|
6692
|
-
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = kA(), { onEvent: i } =
|
|
6692
|
+
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = kA(), { onEvent: i } = V(), [o, s] = g.useState(!1), [c, l] = g.useState(A.expectedDate), d = A.activityType === EA.Income, h = () => {
|
|
6693
6693
|
l(A.expectedDate), s(!0), i(
|
|
6694
6694
|
d ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
|
6695
6695
|
{
|
|
@@ -6747,7 +6747,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
6747
6747
|
close_drawer_aria: "Close",
|
|
6748
6748
|
transaction_details_drawer_title: "Transaction Details"
|
|
6749
6749
|
}, Id = ({ activity: A, onDeleted: e }) => {
|
|
6750
|
-
const { categories: n } = xA(), { deleteCashflowSequence: a, deleteScheduledPayment: r, paidActivities: i } = kA(), { filter: o, setFilter: s, transactions: c } = uA(), { selectedAccountGuids: l } = vA(), { onEvent: d } =
|
|
6750
|
+
const { categories: n } = xA(), { deleteCashflowSequence: a, deleteScheduledPayment: r, paidActivities: i } = kA(), { filter: o, setFilter: s, transactions: c } = uA(), { selectedAccountGuids: l } = vA(), { onEvent: d } = V(), [h, C] = g.useState(!1), [f, v] = g.useState(""), m = n.find((I) => I.guid === A.categoryGuid), E = A.activityType === EA.Income, L = g.useMemo(
|
|
6751
6751
|
() => c.find((I) => I.guid === f),
|
|
6752
6752
|
[f]
|
|
6753
6753
|
);
|
|
@@ -7319,7 +7319,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
7319
7319
|
scheduledPaymentGuid: a.guid
|
|
7320
7320
|
};
|
|
7321
7321
|
}), zd = () => {
|
|
7322
|
-
const { scheduledPayments: A } = kA(), { transactions: e } = uA(), { selectedAccounts: n } = vA(), { onEvent: a } =
|
|
7322
|
+
const { scheduledPayments: A } = kA(), { transactions: e } = uA(), { selectedAccounts: n } = vA(), { onEvent: a } = V(), r = Hd(n, A, e), i = (s) => {
|
|
7323
7323
|
a(J.RECURRING_ACTIVITY_CLICK_EXPENSE, {
|
|
7324
7324
|
transaction_guid: s.transactionGuid
|
|
7325
7325
|
});
|
|
@@ -7516,7 +7516,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
7516
7516
|
sequenceGuid: i.guid
|
|
7517
7517
|
};
|
|
7518
7518
|
}), Xd = () => {
|
|
7519
|
-
const { selectedAccounts: A } = vA(), { cashflowEvents: e, cashflowSequences: n, projectedEvents: a } = kA(), { transactions: r } = uA(), { onEvent: i } =
|
|
7519
|
+
const { selectedAccounts: A } = vA(), { cashflowEvents: e, cashflowSequences: n, projectedEvents: a } = kA(), { transactions: r } = uA(), { onEvent: i } = V(), o = Gd(
|
|
7520
7520
|
A,
|
|
7521
7521
|
e,
|
|
7522
7522
|
a,
|
|
@@ -7537,7 +7537,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
7537
7537
|
/* @__PURE__ */ t(zi, { isIncome: !0, label: kd.manage_income_add, onAddActivity: c })
|
|
7538
7538
|
] });
|
|
7539
7539
|
}, qi = x(Xd), Bi = () => {
|
|
7540
|
-
const [A, e] = g.useState(0), { onEvent: n } =
|
|
7540
|
+
const [A, e] = g.useState(0), { onEvent: n } = V();
|
|
7541
7541
|
return /* @__PURE__ */ u(S, { bgcolor: "background.default", height: "100%", children: [
|
|
7542
7542
|
/* @__PURE__ */ u(
|
|
7543
7543
|
rt,
|
|
@@ -7649,7 +7649,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
7649
7649
|
]
|
|
7650
7650
|
}
|
|
7651
7651
|
), lr = 58, jd = () => {
|
|
7652
|
-
const A = fA(), { onEvent: e } =
|
|
7652
|
+
const A = fA(), { onEvent: e } = V(), { selectedDay: n } = kA(), [a, r] = g.useState(
|
|
7653
7653
|
za(/* @__PURE__ */ new Date()) * st + lr
|
|
7654
7654
|
), i = (s) => {
|
|
7655
7655
|
r(za(s) * st + lr), e(J.RECURRING_ACTIVITY_CLICK_CALENDAR_RIGHT);
|
|
@@ -7820,7 +7820,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
7820
7820
|
selectedDayActivities: i,
|
|
7821
7821
|
setSelectedDay: o,
|
|
7822
7822
|
upcomingActivities: s
|
|
7823
|
-
} = kA(), [c, l] = g.useState(0), { onEvent: d } =
|
|
7823
|
+
} = kA(), [c, l] = g.useState(0), { onEvent: d } = V(), h = e.filter(wn), C = a.filter(wn), f = n.filter(wn), v = h.filter(Rt).reduce(lt, 0), m = C.filter(Rt).reduce(lt, 0), E = f.filter(Rt).reduce(lt, 0), L = h.filter(Rt).length, b = h.filter(En).reduce(lt, 0), w = C.filter(En).reduce(lt, 0), I = h.filter(En).length, D = ($, B) => {
|
|
7824
7824
|
l(B);
|
|
7825
7825
|
}, O = ($) => {
|
|
7826
7826
|
d(J.RECURRING_ACTIVITY_CLICK_UPCOMING, {
|
|
@@ -7906,7 +7906,7 @@ const ir = "connect_widget", or = "connections_widget", vd = {
|
|
|
7906
7906
|
recurring_activity_title: "Recurring Transactions",
|
|
7907
7907
|
recurring_activity_settings: "Settings"
|
|
7908
7908
|
}, Jd = ({ onBackClick: A, sx: e = {} }) => {
|
|
7909
|
-
const { accounts: n } = DA(), { isInitialized: a, selectedAccountGuids: r, setSelectedAccounts: i } = vA(), { setFilter: o } = uA(), { isLoading: s } = kA(), { onEvent: c } =
|
|
7909
|
+
const { accounts: n } = DA(), { isInitialized: a, selectedAccountGuids: r, setSelectedAccounts: i } = vA(), { setFilter: o } = uA(), { isLoading: s } = kA(), { onEvent: c } = V();
|
|
7910
7910
|
g.useEffect(() => {
|
|
7911
7911
|
i(n);
|
|
7912
7912
|
}, [n]), g.useEffect(() => {
|
|
@@ -8057,7 +8057,7 @@ class eu {
|
|
|
8057
8057
|
addCashflowEvent = async (e) => {
|
|
8058
8058
|
try {
|
|
8059
8059
|
const n = await this.cashflowApi.addCashflowEvent(e);
|
|
8060
|
-
|
|
8060
|
+
Y(() => {
|
|
8061
8061
|
this.cashflowEvents = [...this.cashflowEvents, n];
|
|
8062
8062
|
});
|
|
8063
8063
|
} catch (n) {
|
|
@@ -8078,7 +8078,7 @@ class eu {
|
|
|
8078
8078
|
await this.globalStore.transactionStore.updateTransaction({
|
|
8079
8079
|
...n,
|
|
8080
8080
|
scheduled_payment_guid: a.guid
|
|
8081
|
-
}),
|
|
8081
|
+
}), Y(() => {
|
|
8082
8082
|
this.scheduledPayments = [...this.scheduledPayments, a];
|
|
8083
8083
|
});
|
|
8084
8084
|
} catch (a) {
|
|
@@ -8094,7 +8094,7 @@ class eu {
|
|
|
8094
8094
|
};
|
|
8095
8095
|
deleteScheduledPayment = async (e) => {
|
|
8096
8096
|
try {
|
|
8097
|
-
await this.api.deleteScheduledPayment(e),
|
|
8097
|
+
await this.api.deleteScheduledPayment(e), Y(() => {
|
|
8098
8098
|
const n = this.scheduledPayments.findIndex((a) => a.guid === e);
|
|
8099
8099
|
n >= 0 && this.scheduledPayments.splice(n, 1);
|
|
8100
8100
|
});
|
|
@@ -8104,7 +8104,7 @@ class eu {
|
|
|
8104
8104
|
};
|
|
8105
8105
|
loadActivity = () => {
|
|
8106
8106
|
this.isLoading = !0, Promise.all([this.loadExpenseActivity(), this.loadIncomeActivity()]).finally(
|
|
8107
|
-
() =>
|
|
8107
|
+
() => Y(() => {
|
|
8108
8108
|
this.isLoading = !1;
|
|
8109
8109
|
})
|
|
8110
8110
|
);
|
|
@@ -8117,7 +8117,7 @@ class eu {
|
|
|
8117
8117
|
};
|
|
8118
8118
|
loadCashflowSequences = async () => {
|
|
8119
8119
|
const e = await this.cashflowApi.getCashflowSequences();
|
|
8120
|
-
|
|
8120
|
+
Y(() => {
|
|
8121
8121
|
this.cashflowSequences = e.filter(
|
|
8122
8122
|
(n) => n.transaction_type === UA.CREDIT
|
|
8123
8123
|
);
|
|
@@ -8129,7 +8129,7 @@ class eu {
|
|
|
8129
8129
|
LA(Z()),
|
|
8130
8130
|
ge(Z(), 30)
|
|
8131
8131
|
);
|
|
8132
|
-
|
|
8132
|
+
Y(() => {
|
|
8133
8133
|
this.projectedEvents = e.filter(
|
|
8134
8134
|
(n) => n.transaction_type === UA.CREDIT
|
|
8135
8135
|
);
|
|
@@ -8144,7 +8144,7 @@ class eu {
|
|
|
8144
8144
|
ie(Z(), 90),
|
|
8145
8145
|
OA(Z())
|
|
8146
8146
|
);
|
|
8147
|
-
|
|
8147
|
+
Y(() => {
|
|
8148
8148
|
this.cashflowEvents = e.filter(
|
|
8149
8149
|
(n) => n.transaction_type === UA.CREDIT
|
|
8150
8150
|
);
|
|
@@ -8156,7 +8156,7 @@ class eu {
|
|
|
8156
8156
|
loadScheduledPayments = async () => {
|
|
8157
8157
|
try {
|
|
8158
8158
|
const e = await this.api.getScheduledPayments();
|
|
8159
|
-
|
|
8159
|
+
Y(() => {
|
|
8160
8160
|
this.scheduledPayments = e;
|
|
8161
8161
|
});
|
|
8162
8162
|
} catch (e) {
|
|
@@ -8190,7 +8190,7 @@ class eu {
|
|
|
8190
8190
|
try {
|
|
8191
8191
|
const n = await this.api.updateScheduledPayment(e), a = this.scheduledPayments.findIndex((r) => r.guid === e.guid);
|
|
8192
8192
|
if (a < 0) return;
|
|
8193
|
-
|
|
8193
|
+
Y(() => {
|
|
8194
8194
|
this.scheduledPayments = [
|
|
8195
8195
|
...this.scheduledPayments.slice(0, a),
|
|
8196
8196
|
n,
|
|
@@ -8728,7 +8728,7 @@ const uu = ({ activity: A }) => /* @__PURE__ */ u(aA, { children: [
|
|
|
8728
8728
|
}
|
|
8729
8729
|
);
|
|
8730
8730
|
}, vu = x(fu), mu = () => {
|
|
8731
|
-
const { cashflow: A } = W(), { isDesktop: e } = jA(), { onEvent: n } =
|
|
8731
|
+
const { cashflow: A } = W(), { isDesktop: e } = jA(), { onEvent: n } = V(), [a, r] = g.useState(0), i = (o, s) => {
|
|
8732
8732
|
r(s);
|
|
8733
8733
|
};
|
|
8734
8734
|
return g.useEffect(() => {
|
|
@@ -9172,7 +9172,7 @@ const uu = ({ activity: A }) => /* @__PURE__ */ u(aA, { children: [
|
|
|
9172
9172
|
setSelectedAccounts: r,
|
|
9173
9173
|
shouldDisableNextDate: i,
|
|
9174
9174
|
shouldDisablePrevDate: o
|
|
9175
|
-
} = vA(), { onEvent: s } =
|
|
9175
|
+
} = vA(), { onEvent: s } = V(), { cashAccounts: c } = DA(), { setFilter: l } = uA(), { userProfile: d } = rn(), { dateRange: h, setSelectedCashAccounts: C } = ot(), { cashflow: f } = W(), [v, m] = g.useState(!1);
|
|
9176
9176
|
return g.useEffect(() => {
|
|
9177
9177
|
r(c);
|
|
9178
9178
|
}, [c]), g.useEffect(() => {
|
|
@@ -9429,13 +9429,13 @@ class Bu {
|
|
|
9429
9429
|
loadMerchants = async (e = "") => {
|
|
9430
9430
|
this.isLoading = !0;
|
|
9431
9431
|
const n = await this.api.getMerchants([e]);
|
|
9432
|
-
|
|
9432
|
+
Y(() => {
|
|
9433
9433
|
this.merchants = n, this.isLoading = !1;
|
|
9434
9434
|
});
|
|
9435
9435
|
};
|
|
9436
9436
|
loadMerchantByGuid = async (e) => {
|
|
9437
9437
|
const n = await this.api.getMerchantByGuid(e);
|
|
9438
|
-
|
|
9438
|
+
Y(() => this.merchant = n);
|
|
9439
9439
|
};
|
|
9440
9440
|
}
|
|
9441
9441
|
const R7 = (A) => {
|
|
@@ -9482,7 +9482,7 @@ class ku {
|
|
|
9482
9482
|
try {
|
|
9483
9483
|
this.isLoading = !0;
|
|
9484
9484
|
const e = await this.api.getNotifications();
|
|
9485
|
-
|
|
9485
|
+
Y(() => {
|
|
9486
9486
|
this.notifications = e, this.recentNotifications = Ku(e), this.isLoading = !1;
|
|
9487
9487
|
});
|
|
9488
9488
|
} catch (e) {
|
|
@@ -9579,7 +9579,7 @@ class Wu {
|
|
|
9579
9579
|
loadUserProfile = async () => {
|
|
9580
9580
|
try {
|
|
9581
9581
|
const e = await this.api.getUserProfile();
|
|
9582
|
-
|
|
9582
|
+
Y(() => {
|
|
9583
9583
|
this.userProfile = e;
|
|
9584
9584
|
});
|
|
9585
9585
|
} catch (e) {
|
|
@@ -9589,7 +9589,7 @@ class Wu {
|
|
|
9589
9589
|
updateUserProfile = async (e) => {
|
|
9590
9590
|
try {
|
|
9591
9591
|
const n = await this.api.updateUserProfile(e);
|
|
9592
|
-
|
|
9592
|
+
Y(() => {
|
|
9593
9593
|
this.userProfile = n;
|
|
9594
9594
|
});
|
|
9595
9595
|
} catch (n) {
|
|
@@ -9911,7 +9911,7 @@ class Tr {
|
|
|
9911
9911
|
};
|
|
9912
9912
|
getAccounts = async () => this.fetchInstance.get(N.ACCOUNTS).then((e) => e.accounts).catch((e) => e);
|
|
9913
9913
|
getMembers = async () => this.fetchInstance.get(N.MEMBERS).then((e) => e.members).catch((e) => e);
|
|
9914
|
-
getMonthlyAccountBalances = async (e) => this.fetchInstance.get(`${N.ACCOUNTS}/${e.guid}/monthly_account_balances`).then((n) => (console.log(n), n
|
|
9914
|
+
getMonthlyAccountBalances = async (e) => this.fetchInstance.get(`${N.ACCOUNTS}/${e.guid}/monthly_account_balances`).then((n) => (console.log(n), n)).catch((n) => n);
|
|
9915
9915
|
getNetWorthChartData = async () => wr.map((n) => ({ x: this.formatMonth(n.x), y: n.y }));
|
|
9916
9916
|
getNetWorthMonthlyList = async () => wr;
|
|
9917
9917
|
}
|
|
@@ -9925,22 +9925,30 @@ class Yu {
|
|
|
9925
9925
|
this.globalStore = e, bA(this);
|
|
9926
9926
|
}
|
|
9927
9927
|
initialize = async (e, n) => {
|
|
9928
|
-
this.api = new Tr(e, n), await this.
|
|
9928
|
+
this.api = new Tr(e, n), await this.loadNetWorthData();
|
|
9929
9929
|
};
|
|
9930
9930
|
/*eslint-disable no-console*/
|
|
9931
|
-
|
|
9931
|
+
loadNetWorthData = async () => {
|
|
9932
9932
|
try {
|
|
9933
|
-
const e = await this.api.getAccounts(), n = e.map((
|
|
9934
|
-
console.log(n)
|
|
9935
|
-
const a = await this.api.getNetWorthMonthlyList(), r = await this.api.getNetWorthChartData();
|
|
9936
|
-
V(() => {
|
|
9933
|
+
const e = await this.api.getAccounts(), n = e.map((a) => this.api.getMonthlyAccountBalances(a));
|
|
9934
|
+
console.log(Promise.all(n)), Y(() => {
|
|
9937
9935
|
this.netWorthData = {
|
|
9938
9936
|
accounts: e,
|
|
9939
9937
|
monthlyAccountBalances: n
|
|
9940
|
-
}
|
|
9938
|
+
};
|
|
9941
9939
|
});
|
|
9942
9940
|
} catch (e) {
|
|
9943
|
-
console.error(`Error occured while loading net worth: ${e}`);
|
|
9941
|
+
console.error(`Error occured while loading net worth data: ${e}`);
|
|
9942
|
+
}
|
|
9943
|
+
};
|
|
9944
|
+
loadChartData = async () => {
|
|
9945
|
+
try {
|
|
9946
|
+
const e = await this.api.getNetWorthMonthlyList(), n = await this.api.getNetWorthChartData();
|
|
9947
|
+
Y(() => {
|
|
9948
|
+
this.netWorthMonthlyList = e, this.netWorthChartData = n;
|
|
9949
|
+
});
|
|
9950
|
+
} catch (e) {
|
|
9951
|
+
console.error(`Error occured while loading chart data: ${e}`);
|
|
9944
9952
|
}
|
|
9945
9953
|
};
|
|
9946
9954
|
}
|
|
@@ -10024,7 +10032,7 @@ const Ln = ({
|
|
|
10024
10032
|
this_will_set_the_balance_of_your_account: "This will set the balance of your _1{account_name} account to $0.00, and keep any past transaction history. This can be undone by marking the account as open.",
|
|
10025
10033
|
unhide_account: "Unhide Account"
|
|
10026
10034
|
}, Ju = () => {
|
|
10027
|
-
const [A, e] = g.useState(!1), [n, a] = g.useState(!1), [r, i] = g.useState(!1), [o, s] = g.useState({}), { selectedAccount: c } = se(), { mergeAccounts: l, updateAccount: d } = DA(), h = Vu(), { onEvent: C } =
|
|
10035
|
+
const [A, e] = g.useState(!1), [n, a] = g.useState(!1), [r, i] = g.useState(!1), [o, s] = g.useState({}), { selectedAccount: c } = se(), { mergeAccounts: l, updateAccount: d } = DA(), h = Vu(), { onEvent: C } = V(), f = (m) => {
|
|
10028
10036
|
d({
|
|
10029
10037
|
...c,
|
|
10030
10038
|
...m
|
|
@@ -10464,7 +10472,7 @@ const Ln = ({
|
|
|
10464
10472
|
}
|
|
10465
10473
|
);
|
|
10466
10474
|
}, e1 = x(A1), t1 = () => {
|
|
10467
|
-
const A = window.app?.config, { onEvent: e } =
|
|
10475
|
+
const A = window.app?.config, { onEvent: e } = V(), { selectedAccount: n } = se(), a = cu(n), r = n.member_is_managed_by_user || !n.member_is_managed_by_user && A.enable_renaming_home_accounts, [i, o] = g.useState(!1), [s, c] = g.useState(a[0]), l = a.filter(
|
|
10468
10476
|
(d) => r || n[d.name] || n[d.name] === 0
|
|
10469
10477
|
);
|
|
10470
10478
|
return /* @__PURE__ */ u(aA, { children: [
|
|
@@ -10506,7 +10514,7 @@ const Ln = ({
|
|
|
10506
10514
|
)
|
|
10507
10515
|
] });
|
|
10508
10516
|
}, n1 = x(t1), a1 = () => {
|
|
10509
|
-
const { onEvent: A } =
|
|
10517
|
+
const { onEvent: A } = V();
|
|
10510
10518
|
return g.useEffect(() => A(J.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ u(oA, { children: [
|
|
10511
10519
|
/* @__PURE__ */ t(n1, {}),
|
|
10512
10520
|
/* @__PURE__ */ t($u, {}),
|
|
@@ -10572,7 +10580,7 @@ const Ln = ({
|
|
|
10572
10580
|
aria_close: "Close",
|
|
10573
10581
|
transaction_drawer_title: "Transaction Details"
|
|
10574
10582
|
}, c1 = () => {
|
|
10575
|
-
const [A, e] = g.useState(""), { onEvent: n } =
|
|
10583
|
+
const [A, e] = g.useState(""), { onEvent: n } = V(), { selectedAccount: a } = se(), { setFilter: r, sortedTransactions: i } = uA(), o = g.useMemo(() => i.find((s) => s.guid === A), [A]);
|
|
10576
10584
|
return g.useEffect(() => {
|
|
10577
10585
|
r({
|
|
10578
10586
|
dateRange: { start: ts(ns(), 90), end: as() },
|
|
@@ -10760,7 +10768,7 @@ const Ln = ({
|
|
|
10760
10768
|
}, I1 = (A) => ({
|
|
10761
10769
|
list_aria: `${A[0]} accounts`
|
|
10762
10770
|
}), D1 = () => {
|
|
10763
|
-
const [A, e] = g.useState(""), { selectedAccounts: n } = vA(), { setSelectedAccount: a, setSelectedMember: r } = se(), { members: i } = DA(), { onEvent: o } =
|
|
10771
|
+
const [A, e] = g.useState(""), { selectedAccounts: n } = vA(), { setSelectedAccount: a, setSelectedMember: r } = se(), { members: i } = DA(), { onEvent: o } = V(), s = [...new Set(n.map((l) => l.account_type))], c = n.find((l) => A === l.guid);
|
|
10764
10772
|
return g.useEffect(() => {
|
|
10765
10773
|
if (c) {
|
|
10766
10774
|
a(c);
|
|
@@ -10882,7 +10890,7 @@ const Ln = ({
|
|
|
10882
10890
|
sync_accounts: "Sync Accounts",
|
|
10883
10891
|
no_accounts: "No accounts available"
|
|
10884
10892
|
}, N1 = ({ onBackClick: A, sx: e = {} }) => {
|
|
10885
|
-
const [n, a] = g.useState(!1), [r, i] = g.useState(!1), { accounts: o, refreshMembers: s } = DA(), { setSelectedAccounts: c, selectedAccountGuids: l } = vA(), { isDesktop: d } = jA(), { onEvent: h } =
|
|
10893
|
+
const [n, a] = g.useState(!1), [r, i] = g.useState(!1), { accounts: o, refreshMembers: s } = DA(), { setSelectedAccounts: c, selectedAccountGuids: l } = vA(), { isDesktop: d } = jA(), { onEvent: h } = V();
|
|
10886
10894
|
g.useEffect(() => {
|
|
10887
10895
|
c(o);
|
|
10888
10896
|
}, [o]);
|
|
@@ -11484,7 +11492,7 @@ class z1 {
|
|
|
11484
11492
|
addAccount = async (e) => {
|
|
11485
11493
|
try {
|
|
11486
11494
|
const n = await this.api.createAccount(e);
|
|
11487
|
-
|
|
11495
|
+
Y(() => {
|
|
11488
11496
|
this.accounts = [...this.accounts, n];
|
|
11489
11497
|
});
|
|
11490
11498
|
} catch (n) {
|
|
@@ -11512,7 +11520,7 @@ class z1 {
|
|
|
11512
11520
|
await this.loadMembers();
|
|
11513
11521
|
try {
|
|
11514
11522
|
const e = await this.api.getAccounts();
|
|
11515
|
-
|
|
11523
|
+
Y(() => {
|
|
11516
11524
|
this.accounts = this.sortAccounts(this.augmentAccounts(e));
|
|
11517
11525
|
});
|
|
11518
11526
|
} catch (e) {
|
|
@@ -11522,7 +11530,7 @@ class z1 {
|
|
|
11522
11530
|
loadInstitutions = async () => {
|
|
11523
11531
|
try {
|
|
11524
11532
|
const e = await this.api.getInstitutions();
|
|
11525
|
-
|
|
11533
|
+
Y(() => {
|
|
11526
11534
|
this.institutions = e;
|
|
11527
11535
|
});
|
|
11528
11536
|
} catch (e) {
|
|
@@ -11532,7 +11540,7 @@ class z1 {
|
|
|
11532
11540
|
loadMembers = async () => {
|
|
11533
11541
|
try {
|
|
11534
11542
|
const e = await this.api.getMembers();
|
|
11535
|
-
|
|
11543
|
+
Y(() => {
|
|
11536
11544
|
this.members = e;
|
|
11537
11545
|
});
|
|
11538
11546
|
} catch (e) {
|
|
@@ -11542,7 +11550,7 @@ class z1 {
|
|
|
11542
11550
|
mergeAccounts = async (e) => {
|
|
11543
11551
|
try {
|
|
11544
11552
|
const n = await this.api.mergeAccounts(e), a = n[Object.keys(n)[0]];
|
|
11545
|
-
|
|
11553
|
+
Y(() => {
|
|
11546
11554
|
const r = this.accounts.findIndex((o) => o.guid === e[1]);
|
|
11547
11555
|
this.accounts.splice(r, 1);
|
|
11548
11556
|
const i = this.accounts.findIndex((o) => o.guid === e[0]);
|
|
@@ -11565,7 +11573,7 @@ class z1 {
|
|
|
11565
11573
|
};
|
|
11566
11574
|
removeAccount = async (e) => {
|
|
11567
11575
|
try {
|
|
11568
|
-
await this.api.deleteAccount(e),
|
|
11576
|
+
await this.api.deleteAccount(e), Y(() => {
|
|
11569
11577
|
const n = this.accounts.findIndex((a) => a.guid === e);
|
|
11570
11578
|
this.accounts.splice(n, 1);
|
|
11571
11579
|
});
|
|
@@ -11576,7 +11584,7 @@ class z1 {
|
|
|
11576
11584
|
updateAccount = async (e) => {
|
|
11577
11585
|
try {
|
|
11578
11586
|
const n = await this.api.updateAccount(e);
|
|
11579
|
-
|
|
11587
|
+
Y(() => {
|
|
11580
11588
|
const a = this.accounts.findIndex(
|
|
11581
11589
|
(r) => r.guid === n.guid
|
|
11582
11590
|
);
|
|
@@ -12771,7 +12779,7 @@ class ph {
|
|
|
12771
12779
|
};
|
|
12772
12780
|
loadCopy = async () => {
|
|
12773
12781
|
const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
12774
|
-
|
|
12782
|
+
Y(() => {
|
|
12775
12783
|
this.copyObject = e[this.translationKey];
|
|
12776
12784
|
});
|
|
12777
12785
|
};
|
|
@@ -12952,7 +12960,7 @@ class bh {
|
|
|
12952
12960
|
bA(this), this.copyStore = new ph(), this.insightsMicroWidgetStore = new Sh();
|
|
12953
12961
|
}
|
|
12954
12962
|
initialize = async (e, n) => {
|
|
12955
|
-
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n), this.session = await zs(e, n, "1.0.0", "Micro Insights Carousel"),
|
|
12963
|
+
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n), this.session = await zs(e, n, "1.0.0", "Micro Insights Carousel"), Y(() => {
|
|
12956
12964
|
this.isInitialized = !0;
|
|
12957
12965
|
});
|
|
12958
12966
|
};
|
|
@@ -15078,7 +15086,7 @@ const Dt = g.createContext(null), Ih = ({
|
|
|
15078
15086
|
}, p3 = x(m3), y3 = {
|
|
15079
15087
|
title: "Spending"
|
|
15080
15088
|
}, E3 = ({ onBackClick: A, sx: e = {} }) => {
|
|
15081
|
-
const { accounts: n } = DA(), { isInitialized: a, setDisplayedDate: r, setSelectedAccounts: i } = vA(), { onEvent: o } =
|
|
15089
|
+
const { accounts: n } = DA(), { isInitialized: a, setDisplayedDate: r, setSelectedAccounts: i } = vA(), { onEvent: o } = V(), [s, c] = g.useState(!1);
|
|
15082
15090
|
g.useEffect(() => {
|
|
15083
15091
|
i(n);
|
|
15084
15092
|
}, [n]), g.useEffect(() => {
|
|
@@ -15554,7 +15562,7 @@ export {
|
|
|
15554
15562
|
Fe as useCategoryUiStore,
|
|
15555
15563
|
ec as useCombineEvents,
|
|
15556
15564
|
tc as useCombinePageviews,
|
|
15557
|
-
|
|
15565
|
+
V as useEvent,
|
|
15558
15566
|
Vu as useGetMergeableAccounts,
|
|
15559
15567
|
W as useGlobalCopyStore,
|
|
15560
15568
|
an as useGlobalStore,
|