@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
1
|
+
import { makeAutoObservable as d } from "mobx";
|
|
2
2
|
import { getDate as r, fromUnixTime as _, startOfMonth as m } from "date-fns";
|
|
3
|
-
import { A as
|
|
3
|
+
import { A as b } from "./Account-CMjOp7S2.mjs";
|
|
4
4
|
const E = 12, T = 100;
|
|
5
5
|
var c = /* @__PURE__ */ ((a) => (a[a.FASTEST_PAYOFF_FIRST = 1] = "FASTEST_PAYOFF_FIRST", a[a.HIGHEST_INTEREST = 2] = "HIGHEST_INTEREST", a[a.LOWEST_BALANCE = 3] = "LOWEST_BALANCE", a[a.HIGHEST_BALANCE = 4] = "HIGHEST_BALANCE", a))(c || {});
|
|
6
|
-
const
|
|
6
|
+
const p = {
|
|
7
7
|
unnamed_label: "Unnamed Debt"
|
|
8
8
|
};
|
|
9
9
|
function y(a, e) {
|
|
10
|
-
const t = a.filter((n) => n.account_type ===
|
|
11
|
-
(n) =>
|
|
12
|
-
), o = t.filter((n) => !s.some((i) => i.account.guid === n.guid)).map((n) =>
|
|
10
|
+
const t = a.filter((n) => n.account_type === b.CHECKING_LINE_OF_CREDIT ? Number(n.balance) <= 0 : n.is_excluded_from_debts !== !0), s = e.filter((n) => t.some((i) => i.guid === n.account_guid)).map(
|
|
11
|
+
(n) => l(t.find((i) => i.guid === n.account_guid), n)
|
|
12
|
+
), o = t.filter((n) => !s.some((i) => i.account.guid === n.guid)).map((n) => l(n));
|
|
13
13
|
return [...s, ...o];
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function l(a, e) {
|
|
16
16
|
const t = { account: a, goal: e, guid: a.guid };
|
|
17
17
|
if (e) {
|
|
18
18
|
const s = e.payment_due_at ? r(_(e.payment_due_at)) : 1, o = m(/* @__PURE__ */ new Date()).setDate(s);
|
|
19
19
|
t.balance = Math.abs(e.amount - e.current_amount), t.interest_rate = e.interest_rate, t.is_paid_off = e.is_complete, t.monthly_payment = e.monthly_payment, t.name = e.name, t.original_balance = e.initial_amount, t.payment_due_date = o;
|
|
20
20
|
} else {
|
|
21
21
|
const s = a.payment_due_at ? r(_(a.payment_due_at)) : 1, o = m(/* @__PURE__ */ new Date()).setDate(s), n = a.balance ?? 0, i = a.minimum_payment ?? void 0, u = a.interest_rate ?? a.apr ?? a.apy;
|
|
22
|
-
t.balance = Math.max(n, 0), t.interest_rate = u, t.is_paid_off = n === 0, t.monthly_payment = i, t.name = a?.name ??
|
|
22
|
+
t.balance = Math.max(n, 0), t.interest_rate = u, t.is_paid_off = n === 0, t.monthly_payment = i, t.name = a?.name ?? p.unnamed_label, t.original_balance = a.original_balance, t.payment_due_date = o;
|
|
23
23
|
}
|
|
24
24
|
return t.is_impossible = !1, t.priority = void 0, t.projected_payoff_date = void 0, t;
|
|
25
25
|
}
|
|
@@ -28,7 +28,7 @@ class h {
|
|
|
28
28
|
selectedDebtChartData = {};
|
|
29
29
|
selectedDebtPriority = c.LOWEST_BALANCE;
|
|
30
30
|
constructor() {
|
|
31
|
-
|
|
31
|
+
d(this);
|
|
32
32
|
}
|
|
33
33
|
get showError() {
|
|
34
34
|
const { interest_rate: e, monthly_payment: t } = this.selectedDebtChartData;
|
|
@@ -45,11 +45,11 @@ class A {
|
|
|
45
45
|
globalStore;
|
|
46
46
|
uiStore;
|
|
47
47
|
constructor(e) {
|
|
48
|
-
this.globalStore = e, this.uiStore = new h(),
|
|
48
|
+
this.globalStore = e, this.uiStore = new h(), d(this);
|
|
49
49
|
}
|
|
50
50
|
get debts() {
|
|
51
|
-
const { visibleDebtAccounts: e } = this.globalStore.accountStore, {
|
|
52
|
-
return y(
|
|
51
|
+
const { visibleDebtAccounts: e } = this.globalStore.accountStore, { selectedAccountGuids: t } = this.globalStore.globalUiStore, { debtGoals: s } = this.globalStore.goalStore, o = t.length ? e.filter((n) => t.includes(n.guid)) : e;
|
|
52
|
+
return y(o, s);
|
|
53
53
|
}
|
|
54
54
|
get totalMonthlyPayments() {
|
|
55
55
|
return this.debts.map((t) => Number(t.monthly_payment)).filter((t) => !isNaN(t)).reduce((t, s) => t + s, 0);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { intlFormat as
|
|
2
|
-
import { g as
|
|
3
|
-
import { jsx as a, jsxs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { DialogHeader as
|
|
7
|
-
const
|
|
1
|
+
import { intlFormat as M } from "date-fns/intlFormat";
|
|
2
|
+
import { g as T } from "./Localization-2MODESHW.mjs";
|
|
3
|
+
import { jsx as a, jsxs as g } from "react/jsx-runtime";
|
|
4
|
+
import u from "@mui/material/Dialog";
|
|
5
|
+
import H from "@mui/material/DialogContent";
|
|
6
|
+
import { DialogHeader as N, DialogFooter as Y } from "@mxenabled/mxui";
|
|
7
|
+
const S = "do", x = "MMM do, yyyy", b = {
|
|
8
8
|
TIME_STAMP_HOUR_MINUTE: {
|
|
9
9
|
hour: "numeric",
|
|
10
10
|
minute: "numeric"
|
|
@@ -60,34 +60,31 @@ const F = "do", L = "MMM do, yyyy", S = {
|
|
|
60
60
|
day: "numeric",
|
|
61
61
|
year: "numeric"
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, I = (i, o) => M(new Date(i), Object.assign(o), { locale: T() }), P = ({
|
|
64
64
|
className: i,
|
|
65
|
-
copy: o
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
disablePrimaryButton: e = !1,
|
|
70
|
-
isOpen: n = !1,
|
|
65
|
+
copy: o,
|
|
66
|
+
disablePrimaryButton: t = !1,
|
|
67
|
+
isOpen: e = !1,
|
|
71
68
|
onClose: r,
|
|
72
69
|
onPrimaryAction: m,
|
|
73
70
|
primaryColor: c = "primary",
|
|
74
71
|
primaryText: _ = "Confirm",
|
|
75
|
-
onSecondaryAction:
|
|
76
|
-
secondaryColor:
|
|
77
|
-
secondaryText:
|
|
72
|
+
onSecondaryAction: n,
|
|
73
|
+
secondaryColor: s = "primary",
|
|
74
|
+
secondaryText: l = "Cancel",
|
|
78
75
|
children: A,
|
|
79
76
|
...d
|
|
80
77
|
}) => {
|
|
81
|
-
const O = () => {
|
|
78
|
+
const O = o?.title ?? "", h = o?.close_aria ?? "Close", D = () => {
|
|
82
79
|
m?.(), r();
|
|
83
|
-
},
|
|
84
|
-
|
|
80
|
+
}, y = () => {
|
|
81
|
+
n && n(), r();
|
|
85
82
|
};
|
|
86
|
-
return /* @__PURE__ */ a("div", { className: `mx-cmn-dialog ${i}`, children: /* @__PURE__ */
|
|
87
|
-
|
|
83
|
+
return /* @__PURE__ */ a("div", { className: `mx-cmn-dialog ${i}`, children: /* @__PURE__ */ g(
|
|
84
|
+
u,
|
|
88
85
|
{
|
|
89
86
|
onClose: r,
|
|
90
|
-
open:
|
|
87
|
+
open: e,
|
|
91
88
|
sx: {
|
|
92
89
|
"& .MuiDialog-paperScrollPaper": {
|
|
93
90
|
backgroundColor: "background.default"
|
|
@@ -96,18 +93,18 @@ const F = "do", L = "MMM do, yyyy", S = {
|
|
|
96
93
|
},
|
|
97
94
|
...d,
|
|
98
95
|
children: [
|
|
99
|
-
/* @__PURE__ */ a(
|
|
100
|
-
/* @__PURE__ */ a(
|
|
96
|
+
/* @__PURE__ */ a(N, { copy: { title: O, close_aria: h }, onClose: r }),
|
|
97
|
+
/* @__PURE__ */ a(H, { sx: { lineHeight: 1.5 }, children: A }),
|
|
101
98
|
/* @__PURE__ */ a(
|
|
102
|
-
|
|
99
|
+
Y,
|
|
103
100
|
{
|
|
104
|
-
isPrimaryDisabled:
|
|
105
|
-
onPrimaryAction:
|
|
106
|
-
onSecondaryAction:
|
|
101
|
+
isPrimaryDisabled: t,
|
|
102
|
+
onPrimaryAction: D,
|
|
103
|
+
onSecondaryAction: y,
|
|
107
104
|
primaryColor: c,
|
|
108
105
|
primaryText: _,
|
|
109
|
-
secondaryColor:
|
|
110
|
-
secondaryText:
|
|
106
|
+
secondaryColor: s,
|
|
107
|
+
secondaryText: l
|
|
111
108
|
}
|
|
112
109
|
)
|
|
113
110
|
]
|
|
@@ -116,8 +113,8 @@ const F = "do", L = "MMM do, yyyy", S = {
|
|
|
116
113
|
};
|
|
117
114
|
export {
|
|
118
115
|
b as D,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
S as O,
|
|
117
|
+
P as a,
|
|
118
|
+
x as b,
|
|
119
|
+
I as f
|
|
123
120
|
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import s from "@mui/material/Box";
|
|
3
|
+
import h from "@mui/material/Stack";
|
|
4
|
+
import { H2 as B, Drawer as D } from "@mxenabled/mxui";
|
|
5
|
+
import b from "@mui/material/Button";
|
|
6
|
+
import v from "@mui/material/IconButton";
|
|
7
|
+
import { ArrowBack as j } from "@mxenabled/mx-icons";
|
|
8
|
+
const $ = ({
|
|
9
|
+
footerStyles: a = {},
|
|
10
|
+
hasSecondaryAction: t = !0,
|
|
11
|
+
isPrimaryDisabled: i,
|
|
12
|
+
onPrimaryAction: o,
|
|
13
|
+
onSecondaryAction: e,
|
|
14
|
+
primaryButtonProps: n = {},
|
|
15
|
+
primaryColor: c = "primary",
|
|
16
|
+
primaryText: d = "Save",
|
|
17
|
+
secondaryColor: l = "primary",
|
|
18
|
+
secondaryText: p = "Cancel"
|
|
19
|
+
}) => /* @__PURE__ */ u(
|
|
20
|
+
h,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
bgcolor: "background.paper",
|
|
24
|
+
flexDirection: "row",
|
|
25
|
+
gap: 16,
|
|
26
|
+
justifyContent: "flex-end",
|
|
27
|
+
p: 24,
|
|
28
|
+
...a
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
t && /* @__PURE__ */ r(
|
|
32
|
+
b,
|
|
33
|
+
{
|
|
34
|
+
color: l,
|
|
35
|
+
onClick: e,
|
|
36
|
+
variant: o ? "outlined" : "contained",
|
|
37
|
+
children: p
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
o && /* @__PURE__ */ r(
|
|
41
|
+
b,
|
|
42
|
+
{
|
|
43
|
+
...n,
|
|
44
|
+
color: c,
|
|
45
|
+
disabled: i,
|
|
46
|
+
onClick: o,
|
|
47
|
+
variant: "contained",
|
|
48
|
+
children: d
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
), L = ({
|
|
54
|
+
ariaLabelClose: a,
|
|
55
|
+
onClose: t,
|
|
56
|
+
shouldShowBorders: i,
|
|
57
|
+
shouldShowShadow: o,
|
|
58
|
+
title: e
|
|
59
|
+
}) => /* @__PURE__ */ u(
|
|
60
|
+
h,
|
|
61
|
+
{
|
|
62
|
+
"aria-labelledby": `${e?.replace(/\s+/g, "-").toLowerCase()}-header-title`,
|
|
63
|
+
direction: "row",
|
|
64
|
+
sx: {
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
backgroundColor: "background.paper",
|
|
67
|
+
...i && {
|
|
68
|
+
borderBottom: 1,
|
|
69
|
+
borderColor: "divider"
|
|
70
|
+
},
|
|
71
|
+
...o && {
|
|
72
|
+
boxShadow: "0px 2px 8px 0px #6A73811F"
|
|
73
|
+
},
|
|
74
|
+
padding: "8px 8px 8px 8px"
|
|
75
|
+
},
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ r(v, { "aria-label": a, color: "primary", onClick: t, children: /* @__PURE__ */ r(j, { color: "primary", sx: { fontSize: 22 } }) }),
|
|
78
|
+
/* @__PURE__ */ r(
|
|
79
|
+
s,
|
|
80
|
+
{
|
|
81
|
+
sx: {
|
|
82
|
+
flexGrow: 1,
|
|
83
|
+
margin: "auto",
|
|
84
|
+
textAlign: "center"
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ r(
|
|
87
|
+
B,
|
|
88
|
+
{
|
|
89
|
+
bold: !0,
|
|
90
|
+
id: `${e?.replace(/\s+/g, "-").toLowerCase()}-header-title`,
|
|
91
|
+
variant: "Body",
|
|
92
|
+
children: e
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ r(s, { width: "44px" })
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
), R = ({
|
|
101
|
+
ariaLabelClose: a = "Close",
|
|
102
|
+
children: t,
|
|
103
|
+
footerStyles: i = {},
|
|
104
|
+
hasSecondaryAction: o = !0,
|
|
105
|
+
id: e,
|
|
106
|
+
isOpen: n,
|
|
107
|
+
isPrimaryDisabled: c,
|
|
108
|
+
onClose: d,
|
|
109
|
+
onPrimaryAction: l,
|
|
110
|
+
onSecondaryAction: p,
|
|
111
|
+
primaryButtonProps: g,
|
|
112
|
+
primaryColor: m = "primary",
|
|
113
|
+
primaryText: w,
|
|
114
|
+
secondaryColor: f = "secondary",
|
|
115
|
+
secondaryText: k,
|
|
116
|
+
shouldShowHeaderBorders: C = !0,
|
|
117
|
+
shouldShowHeaderShadow: y = !1,
|
|
118
|
+
title: x,
|
|
119
|
+
...S
|
|
120
|
+
}) => /* @__PURE__ */ r(
|
|
121
|
+
D,
|
|
122
|
+
{
|
|
123
|
+
id: e,
|
|
124
|
+
isOpen: n,
|
|
125
|
+
onClose: d,
|
|
126
|
+
slotProps: {
|
|
127
|
+
root: {
|
|
128
|
+
role: "dialog",
|
|
129
|
+
"aria-modal": "true",
|
|
130
|
+
"aria-labelledby": `${x?.replace(/\s+/g, "-").toLowerCase()}-header-title`
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
sx: {
|
|
134
|
+
"& .MuiDrawer-paper": {
|
|
135
|
+
backgroundColor: "background.default",
|
|
136
|
+
borderRadius: 0
|
|
137
|
+
},
|
|
138
|
+
height: "100%",
|
|
139
|
+
"& .MuiToolbar-root": {
|
|
140
|
+
backgroundColor: "background.paper"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
...S,
|
|
144
|
+
children: /* @__PURE__ */ u(h, { height: "100%", justifyContent: "space-between", children: [
|
|
145
|
+
/* @__PURE__ */ r(
|
|
146
|
+
L,
|
|
147
|
+
{
|
|
148
|
+
ariaLabelClose: a,
|
|
149
|
+
onClose: d,
|
|
150
|
+
shouldShowBorders: C,
|
|
151
|
+
shouldShowShadow: y,
|
|
152
|
+
title: x
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ r(s, { height: "100%", overflow: "auto", children: t }),
|
|
156
|
+
l && /* @__PURE__ */ r(
|
|
157
|
+
$,
|
|
158
|
+
{
|
|
159
|
+
footerStyles: i,
|
|
160
|
+
hasSecondaryAction: o,
|
|
161
|
+
isPrimaryDisabled: c,
|
|
162
|
+
onPrimaryAction: l,
|
|
163
|
+
onSecondaryAction: p ?? d,
|
|
164
|
+
primaryButtonProps: g,
|
|
165
|
+
primaryColor: m,
|
|
166
|
+
primaryText: w,
|
|
167
|
+
secondaryColor: f,
|
|
168
|
+
secondaryText: k
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
] })
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
export {
|
|
175
|
+
R as D
|
|
176
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { observer as c } from "mobx-react-lite";
|
|
3
3
|
import { Icon as i } from "@mxenabled/mxui";
|
|
4
|
-
import { e as p } from "./exportTransactionsToCSV-
|
|
5
|
-
import { O as m } from "./User-
|
|
4
|
+
import { e as p } from "./exportTransactionsToCSV-BU1jTY0Q.mjs";
|
|
5
|
+
import { O as m } from "./User-CulNdZUr.mjs";
|
|
6
6
|
import { R as x } from "./ResponsiveButton-C6KH8JH4.mjs";
|
|
7
|
-
import { g as _, h as C, u as l } from "./hooks-
|
|
7
|
+
import { g as _, h as C, u as l } from "./hooks-fY_n74f7.mjs";
|
|
8
8
|
const v = ({ filter: t }) => {
|
|
9
9
|
const { onEvent: r } = _(), { tags: e, sortedTransactions: s } = C(), { transactions: n } = l(), a = () => {
|
|
10
10
|
r(m.ON_TRANSACTION_EXPORT_CSV_CLICK), p(t ? s.filter(t) : s, e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
1
|
+
import { makeAutoObservable as E, runInAction as d } from "mobx";
|
|
2
2
|
import { format as R } from "date-fns/format";
|
|
3
3
|
import { fromUnixTime as b } from "date-fns/fromUnixTime";
|
|
4
4
|
import { getUnixTime as _ } from "date-fns/getUnixTime";
|
|
@@ -23,7 +23,7 @@ import X from "@mui/material/ListItemAvatar";
|
|
|
23
23
|
import V from "@mui/material/ListItemButton";
|
|
24
24
|
import W from "@mui/material/ListItemText";
|
|
25
25
|
import { Text as y } from "@mxenabled/mxui";
|
|
26
|
-
import { f as O,
|
|
26
|
+
import { f as O, D as T } from "./Dialog-CWymUiuO.mjs";
|
|
27
27
|
import { b as j } from "./Localization-2MODESHW.mjs";
|
|
28
28
|
import { f as q } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
29
29
|
const m = {
|
|
@@ -89,7 +89,7 @@ const Mt = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor
|
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
] }) }),
|
|
92
|
-
|
|
92
|
+
/* @__PURE__ */ c(B, { sx: { color: "divider", ml: r === e.length - 1 ? 0 : 68 } })
|
|
93
93
|
] }, n.key))
|
|
94
94
|
}
|
|
95
95
|
) }), Gt = (e) => e * (180 / Math.PI), Lt = (e, t) => [
|
|
@@ -225,7 +225,7 @@ const Mt = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor
|
|
|
225
225
|
2: (e, t) => A(e, t) / 2,
|
|
226
226
|
3: A,
|
|
227
227
|
4: L
|
|
228
|
-
},
|
|
228
|
+
}, D = [
|
|
229
229
|
{ contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
|
|
230
230
|
{ contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
|
|
231
231
|
{ contributionPeriodIndex: 2, targetAmount: 1, upperLimit: 1e3 }
|
|
@@ -242,7 +242,7 @@ const Mt = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor
|
|
|
242
242
|
if (!i || !l) return a;
|
|
243
243
|
const p = i(s, n), f = l(p, s);
|
|
244
244
|
return Math.max(a / (f || 1), 1);
|
|
245
|
-
}, Jt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Qt = (e) =>
|
|
245
|
+
}, Jt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Qt = (e) => D.find((n) => e < n.upperLimit)?.targetAmount ?? tt, Zt = (e) => D.find((r) => e < r.upperLimit)?.contributionPeriodIndex ?? Z, te = (e, t) => [...e].sort((r, o) => r.year === o.year ? r.month - o.month : r.year - o.year).map((r) => ({
|
|
246
246
|
x: O(new Date(0, r.month - 1, 1), T.MONTH_SHORT),
|
|
247
247
|
y: r[t]
|
|
248
248
|
})), rt = (e) => e.sort((t, n) => t.monthly_health_score_average.month - n.monthly_health_score_average.month).map((t) => ({
|
|
@@ -286,7 +286,7 @@ class ee {
|
|
|
286
286
|
isSpendingInitialized = !1;
|
|
287
287
|
isIncomeInitialized = !1;
|
|
288
288
|
constructor(t) {
|
|
289
|
-
this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError),
|
|
289
|
+
this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError), E(this);
|
|
290
290
|
}
|
|
291
291
|
setSpendingInitialized = (t) => {
|
|
292
292
|
this.isSpendingInitialized = t;
|