@mx-cartographer/experiences 7.2.11 → 7.2.12-alpha-ram1-finstrong-testing
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 +4 -0
- package/dist/{Account-B-CuHOYf.mjs → Account-CBQnFO6w.mjs} +1 -1
- package/dist/{AccountDetailsContent-DfzPOeMI.mjs → AccountDetailsContent-BkurfGCr.mjs} +48 -44
- package/dist/{AccountDetailsHeader-vcy67tuH.mjs → AccountDetailsHeader-CaIoP_2Q.mjs} +8 -8
- package/dist/{AccountFields-cUP-9Hm6.mjs → AccountFields-CLbLAhLf.mjs} +5 -5
- package/dist/{AccountListItem-DChcf3SN.mjs → AccountListItem-CPm3572e.mjs} +4 -4
- package/dist/{AccountStore-D6KiXA1B.mjs → AccountStore-DttEGFeu.mjs} +40 -29
- package/dist/{Accounts-IeEtQjzA.mjs → Accounts-B5Yr0e_o.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-wjoNuj7B.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-ZO9N26Kx.mjs} +3 -3
- package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-C1IfDPCE.mjs} +1 -1
- package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
- package/dist/{ConnectDrawer-DaFRU5st.mjs → ConnectDrawer-FyY0AWYQ.mjs} +2 -2
- package/dist/{ConnectionsDrawer-DHJ7qdWL.mjs → ConnectionsDrawer-Cd_rztVC.mjs} +3 -3
- package/dist/CurrencyInput-xH-hqry9.mjs +85 -0
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
- package/dist/{DebtsStore-z3VARSO6.mjs → DebtsStore-DB5U2WMC.mjs} +1 -1
- package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
- package/dist/Drawer-BEtCk82g.mjs +163 -0
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DlGZfm4y.mjs} +3 -3
- package/dist/FinstrongStore-CJBV4K5Y.mjs +432 -0
- package/dist/{GoalStore-TD0BfzWX.mjs → GoalStore-deVLYr7n.mjs} +3 -3
- package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
- package/dist/{LineChart-D4GI7nVh.mjs → LineChart-Ct9DNmhS.mjs} +209 -181
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
- package/dist/{ManageIncome-D3n1EWxe.mjs → ManageIncome-CqNstpx_.mjs} +63 -61
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
- package/dist/{NetWorthStore-B_1oulrt.mjs → NetWorthStore-CUz0bwVm.mjs} +2 -2
- package/dist/{NotificationSettings-BRm_EJZV.mjs → NotificationSettings-BKKuULAd.mjs} +5 -5
- package/dist/{OriginalBalanceAction-CAaVbVMO.mjs → OriginalBalanceAction-CCmnsd7y.mjs} +3 -3
- package/dist/{RecurringSettings-C28GrQcP.mjs → RecurringSettings-DfAMEAuh.mjs} +4 -4
- package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
- package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
- package/dist/SpendingLegend-squvjEhu.mjs +170 -0
- package/dist/{TransactionDetails-BWffqew4.mjs → TransactionDetails-CabNHK_I.mjs} +12 -12
- package/dist/{TransactionStore-DxPLdF3B.mjs → TransactionStore-DvOEbOzL.mjs} +3 -3
- package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-BVNxGsE4.mjs} +14 -14
- package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
- package/dist/{WidgetContainer-C88Ecu2W.mjs → WidgetContainer-GoNq8wwm.mjs} +4 -4
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/index.es.js +14 -14
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +12 -12
- package/dist/cashflow/index.es.js +44 -44
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/charts/LineChart.d.ts +8 -2
- package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/index.es.js +33 -33
- package/dist/common/types/Finstrong.d.ts +50 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +58 -1
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +11 -11
- package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-hrNpJ77n.mjs} +2 -2
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +11 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/TransactionList.d.ts +15 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +8 -0
- package/dist/finstrong/index.es.js +3119 -1044
- package/dist/finstrong/stores/FinstrongStore.d.ts +9 -1
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +14 -14
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/investments/index.es.js +4 -4
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +34 -34
- package/dist/notifications/index.es.js +4 -4
- package/dist/recurringtransactions/index.es.js +13 -13
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +222 -373
- package/dist/transactions/index.es.js +15 -15
- package/dist/trends/index.es.js +94 -94
- package/dist/{useAccountDisplayName-BcRqfar8.mjs → useAccountDisplayName-B5O6hQ1B.mjs} +2 -2
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/package.json +1 -1
- package/dist/CurrencyInput-CsCy7uaS.mjs +0 -83
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
|
@@ -17,7 +17,7 @@ import { formatISO as H } from "date-fns/formatISO";
|
|
|
17
17
|
import { fromUnixTime as V } from "date-fns/fromUnixTime";
|
|
18
18
|
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
19
19
|
import { isAfter as h } from "date-fns/isAfter";
|
|
20
|
-
import { isBefore as
|
|
20
|
+
import { isBefore as u } from "date-fns/isBefore";
|
|
21
21
|
import { isSameDay as X } from "date-fns/isSameDay";
|
|
22
22
|
import { nextDay as E } from "date-fns/nextDay";
|
|
23
23
|
import { parseISO as J } from "date-fns/parseISO";
|
|
@@ -29,9 +29,9 @@ import { subQuarters as N } from "date-fns/subQuarters";
|
|
|
29
29
|
import { subYears as T } from "date-fns/subYears";
|
|
30
30
|
import { lastDayOfMonth as q } from "date-fns/lastDayOfMonth";
|
|
31
31
|
import { setDayOfYear as F } from "date-fns/setDayOfYear";
|
|
32
|
-
import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-
|
|
32
|
+
import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-CBdcsyuk.mjs";
|
|
33
33
|
import { b as W } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
34
|
-
import { f as v,
|
|
34
|
+
import { f as v, a as k } from "./Dialog-BPTr3qHE.mjs";
|
|
35
35
|
import { b as l } from "./Localization-2MODESHW.mjs";
|
|
36
36
|
var s = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(s || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), O = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(O || {}), Y = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(Y || {});
|
|
37
37
|
const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
@@ -51,22 +51,23 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
51
51
|
o,
|
|
52
52
|
/* @__PURE__ */ d(C, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
|
|
53
53
|
] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: o });
|
|
54
|
-
}, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n }) => /* @__PURE__ */ d(
|
|
54
|
+
}, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n, ...o }) => /* @__PURE__ */ d(
|
|
55
55
|
j,
|
|
56
56
|
{
|
|
57
57
|
InputLabelProps: { shrink: !0 },
|
|
58
58
|
SelectProps: {
|
|
59
|
-
IconComponent: (
|
|
59
|
+
IconComponent: (c) => /* @__PURE__ */ d(z, { size: 20, sx: { mr: 4 }, ...c })
|
|
60
60
|
},
|
|
61
61
|
defaultValue: 0,
|
|
62
62
|
label: e,
|
|
63
|
-
onChange: (
|
|
64
|
-
a(Number(
|
|
63
|
+
onChange: (c) => {
|
|
64
|
+
a(Number(c.target.value));
|
|
65
65
|
},
|
|
66
66
|
select: !0,
|
|
67
67
|
value: n,
|
|
68
68
|
variant: "outlined",
|
|
69
|
-
|
|
69
|
+
...o,
|
|
70
|
+
children: t.map((c) => /* @__PURE__ */ d($, { value: c.id, children: c.label }, c.id))
|
|
70
71
|
}
|
|
71
72
|
), ce = (e) => {
|
|
72
73
|
if (!e) return "";
|
|
@@ -93,93 +94,93 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
93
94
|
status: p.Upcoming,
|
|
94
95
|
type: e.repeating_transaction_type === Y.Income ? O.Income : O.Expense,
|
|
95
96
|
transaction: void 0
|
|
96
|
-
},
|
|
97
|
+
}, c = a.start, i = a.end;
|
|
97
98
|
switch (e.recurrence_type) {
|
|
98
99
|
case s.EveryWeek:
|
|
99
|
-
t.push(...ue(r,
|
|
100
|
+
t.push(...ue(r, c, i));
|
|
100
101
|
break;
|
|
101
102
|
case s.EveryOtherWeek:
|
|
102
|
-
t.push(...de(r,
|
|
103
|
+
t.push(...de(r, c, i));
|
|
103
104
|
break;
|
|
104
105
|
case s.TwiceAMonth:
|
|
105
|
-
t.push(...me(r,
|
|
106
|
+
t.push(...me(r, c, i));
|
|
106
107
|
break;
|
|
107
108
|
case s.EveryMonth:
|
|
108
|
-
t.push(...le(r,
|
|
109
|
+
t.push(...le(r, c, i));
|
|
109
110
|
break;
|
|
110
111
|
case s.EveryOtherMonth:
|
|
111
|
-
t.push(...he(r,
|
|
112
|
+
t.push(...he(r, c, i));
|
|
112
113
|
break;
|
|
113
114
|
case s.EveryQuarter:
|
|
114
|
-
t.push(...fe(r,
|
|
115
|
+
t.push(...fe(r, c, i));
|
|
115
116
|
break;
|
|
116
117
|
case s.EveryOtherQuarter:
|
|
117
|
-
t.push(...pe(r,
|
|
118
|
+
t.push(...pe(r, c, i));
|
|
118
119
|
break;
|
|
119
120
|
case s.EveryYear:
|
|
120
|
-
t.push(...ye(r,
|
|
121
|
+
t.push(...ye(r, c, i));
|
|
121
122
|
break;
|
|
122
123
|
}
|
|
123
124
|
for (const m of t) {
|
|
124
125
|
const _ = e.transactions.find(
|
|
125
126
|
(x) => x.repeating_transaction_guid === e.guid && x.date > y(D(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
|
|
126
127
|
);
|
|
127
|
-
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) :
|
|
128
|
+
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) : u(m.expectedDate, D(b(), 3)) && (m.status = p.Missed);
|
|
128
129
|
}
|
|
129
130
|
return t;
|
|
130
131
|
}, ue = (e, a, t) => {
|
|
131
132
|
const n = [];
|
|
132
133
|
let o = E(a, e.recurrenceDay);
|
|
133
|
-
for (;
|
|
134
|
+
for (; u(o, t); )
|
|
134
135
|
n.push({ ...e, expectedDate: o }), o = E(o, e.recurrenceDay);
|
|
135
136
|
return n;
|
|
136
137
|
}, de = (e, a, t) => {
|
|
137
138
|
const n = [], o = e.expectedDate;
|
|
138
|
-
if (
|
|
139
|
+
if (u(o, t)) {
|
|
139
140
|
let r = D(o, 14);
|
|
140
141
|
for (; h(r, a) || X(r, a); )
|
|
141
142
|
n.push({ ...e, expectedDate: r }), r = D(r, 14);
|
|
142
|
-
for (r = o; h(r, a) &&
|
|
143
|
+
for (r = o; h(r, a) && u(r, t); )
|
|
143
144
|
n.push({ ...e, expectedDate: r }), r = Q(r, 14);
|
|
144
145
|
}
|
|
145
146
|
return n;
|
|
146
147
|
}, me = (e, a, t) => {
|
|
147
148
|
const n = [];
|
|
148
149
|
let o = g(a, e.recurrenceDay);
|
|
149
|
-
for (;
|
|
150
|
+
for (; u(o, t); )
|
|
150
151
|
n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
151
152
|
let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) : q(a);
|
|
152
|
-
for (;
|
|
153
|
+
for (; u(r, t); )
|
|
153
154
|
n.push({ ...e, expectedDate: r }), r = f(r, 1);
|
|
154
155
|
return n;
|
|
155
156
|
}, le = (e, a, t) => {
|
|
156
157
|
const n = [];
|
|
157
158
|
let o = g(a, e.recurrenceDay);
|
|
158
|
-
for (n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
159
|
+
for (n.push({ ...e, expectedDate: o }), o = f(o, 1); u(o, t); )
|
|
159
160
|
n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
160
161
|
return n;
|
|
161
162
|
}, he = (e, a, t) => {
|
|
162
163
|
const n = [], o = e.expectedDate;
|
|
163
|
-
let r =
|
|
164
|
-
for (;
|
|
164
|
+
let r = u(o, t) ? o : Z(o, 2);
|
|
165
|
+
for (; u(r, t); )
|
|
165
166
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = f(r, 2);
|
|
166
167
|
return n;
|
|
167
168
|
}, fe = (e, a, t) => {
|
|
168
169
|
const n = [], o = e.expectedDate;
|
|
169
|
-
let r =
|
|
170
|
-
for (;
|
|
170
|
+
let r = u(o, t) ? o : N(o, 1);
|
|
171
|
+
for (; u(r, t); )
|
|
171
172
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 1);
|
|
172
173
|
return n;
|
|
173
174
|
}, pe = (e, a, t) => {
|
|
174
175
|
const n = [], o = e.expectedDate;
|
|
175
|
-
let r =
|
|
176
|
-
for (;
|
|
176
|
+
let r = u(o, t) ? o : N(o, 2);
|
|
177
|
+
for (; u(r, t); )
|
|
177
178
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 2);
|
|
178
179
|
return n;
|
|
179
180
|
}, ye = (e, a, t) => {
|
|
180
181
|
const n = [], o = e.expectedDate;
|
|
181
|
-
let r =
|
|
182
|
-
for (;
|
|
182
|
+
let r = u(o, t) ? o : T(o, 1);
|
|
183
|
+
for (; u(r, t); )
|
|
183
184
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = K(r, 1);
|
|
184
185
|
return n;
|
|
185
186
|
}, et = (e, a) => {
|
|
@@ -195,11 +196,11 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
195
196
|
const n = [];
|
|
196
197
|
for (const o of a) {
|
|
197
198
|
const r = t.filter(
|
|
198
|
-
(
|
|
199
|
+
(c) => c.repeating_transaction_guid === o.guid
|
|
199
200
|
);
|
|
200
201
|
t.length > 0 && n.push({
|
|
201
202
|
...o,
|
|
202
|
-
account: e.find((
|
|
203
|
+
account: e.find((c) => c.guid === o.account_guid),
|
|
203
204
|
transactions: r
|
|
204
205
|
});
|
|
205
206
|
}
|
|
@@ -214,41 +215,41 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
214
215
|
recurrences: [t]
|
|
215
216
|
}), a;
|
|
216
217
|
}, []), ot = (e, a, t) => {
|
|
217
|
-
const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day),
|
|
218
|
-
let
|
|
218
|
+
const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day), c = a.second_recurrence_day ? W(a.second_recurrence_day) : "";
|
|
219
|
+
let i = t ? l(e.monthly_ordinal, r) : e.monthly;
|
|
219
220
|
switch (a.recurrence_type) {
|
|
220
221
|
case s.EveryQuarter:
|
|
221
|
-
|
|
222
|
+
i = t ? l(e.quarterly_ordinal, r) : e.quarterly;
|
|
222
223
|
break;
|
|
223
224
|
case s.EveryWeek:
|
|
224
|
-
|
|
225
|
+
i = t ? l(
|
|
225
226
|
e.weekly_ordinal,
|
|
226
227
|
v(n, k.DAY_OF_WEEK)
|
|
227
228
|
) : e.weekly;
|
|
228
229
|
break;
|
|
229
230
|
case s.EveryYear:
|
|
230
|
-
|
|
231
|
+
i = t ? l(
|
|
231
232
|
e.anually_ordinal,
|
|
232
233
|
v(o, k.MONTH_DAY)
|
|
233
234
|
) : e.anually;
|
|
234
235
|
break;
|
|
235
236
|
case s.EveryOtherWeek:
|
|
236
|
-
|
|
237
|
+
i = t ? l(
|
|
237
238
|
e.every_other_week_ordinal,
|
|
238
239
|
v(n, k.DAY_OF_WEEK)
|
|
239
240
|
) : e.every_other_week;
|
|
240
241
|
break;
|
|
241
242
|
case s.EveryOtherMonth:
|
|
242
|
-
|
|
243
|
+
i = t ? l(e.every_other_month_ordinal, r) : e.every_other_month;
|
|
243
244
|
break;
|
|
244
245
|
case s.EveryOtherQuarter:
|
|
245
|
-
|
|
246
|
+
i = t ? l(e.every_other_quarter_ordinal, r) : e.every_other_quarter;
|
|
246
247
|
break;
|
|
247
248
|
case s.TwiceAMonth:
|
|
248
|
-
|
|
249
|
+
i = t ? l(e.twice_a_month_ordinal, r, c) : e.twice_a_month;
|
|
249
250
|
break;
|
|
250
251
|
}
|
|
251
|
-
return
|
|
252
|
+
return i;
|
|
252
253
|
}, at = (e, a) => {
|
|
253
254
|
let t = a;
|
|
254
255
|
switch (e) {
|
package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs}
RENAMED
|
@@ -8,7 +8,7 @@ import { startOfMonth as S } from "date-fns/startOfMonth";
|
|
|
8
8
|
import { startOfToday as c } from "date-fns/startOfToday";
|
|
9
9
|
import { subDays as y } from "date-fns/subDays";
|
|
10
10
|
import { F as x, A as o } from "./Fetch-87LIQbEA.mjs";
|
|
11
|
-
import { b as E, a, c as d, d as u } from "./RecurringTransactions-
|
|
11
|
+
import { b as E, a, c as d, d as u } from "./RecurringTransactions-CngsRZ3K.mjs";
|
|
12
12
|
var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
|
|
13
13
|
const U = 44;
|
|
14
14
|
class h {
|
|
@@ -4,40 +4,40 @@ import { startOfMonth as _ } from "date-fns/startOfMonth";
|
|
|
4
4
|
import { subMonths as y } from "date-fns/subMonths";
|
|
5
5
|
import { endOfMonth as M } from "date-fns/endOfMonth";
|
|
6
6
|
import { b as n, P as l } from "./Category-CevNQ03n.mjs";
|
|
7
|
-
import { f as m,
|
|
7
|
+
import { f as m, a as T } from "./Dialog-BPTr3qHE.mjs";
|
|
8
8
|
const i = (e) => (e.top_level_category_guid === n.INCOME || e.category_guid === n.INCOME) && !h(e), C = (e) => !i(e) && !f(e), p = (e) => l.includes(e.top_level_category_guid) || l.includes(e.category_guid), f = (e) => e.top_level_category_guid === n.TRANSFER || e.category_guid === n.TRANSFER, h = (e) => e.top_level_category_guid === n.INVESTMENTS || e.category_guid === n.INVESTMENTS, N = (e) => !i(e) && !p(e) && !f(e) && !h(e), w = (e) => e.filter((r) => r.category_guid === r.top_level_category_guid), F = (e, r) => {
|
|
9
9
|
if (r === 0) return 0;
|
|
10
|
-
const
|
|
11
|
-
return isNaN(
|
|
10
|
+
const a = (e - r) / r;
|
|
11
|
+
return isNaN(a) ? 0 : a;
|
|
12
12
|
}, g = (e, r) => {
|
|
13
|
-
const
|
|
13
|
+
const a = [];
|
|
14
14
|
let t = _(r?.start ?? y(/* @__PURE__ */ new Date(), 5));
|
|
15
15
|
const s = r?.end ?? /* @__PURE__ */ new Date();
|
|
16
16
|
for (; d(t, s); )
|
|
17
|
-
|
|
17
|
+
a.push({
|
|
18
18
|
x: m(t, T.MONTH_SHORT),
|
|
19
|
-
y: e.filter((
|
|
19
|
+
y: e.filter((o) => o.year === t.getFullYear() && o.month === t.getMonth() + 1).reduce((o, c) => o + c.total, 0)
|
|
20
20
|
}), t = u(t, 1);
|
|
21
|
-
return
|
|
21
|
+
return a;
|
|
22
22
|
}, b = (e, r) => {
|
|
23
|
-
const
|
|
24
|
-
return g(
|
|
23
|
+
const a = e.filter(i);
|
|
24
|
+
return g(a, r).map((t) => ({ ...t, y: Math.abs(t.y) }));
|
|
25
25
|
}, A = (e, r) => {
|
|
26
|
-
const
|
|
27
|
-
return g(
|
|
26
|
+
const a = e.filter(p);
|
|
27
|
+
return g(a, r).map((t) => ({ ...t, y: Math.abs(t.y) }));
|
|
28
28
|
}, x = (e, r) => {
|
|
29
|
-
const
|
|
30
|
-
return g(
|
|
29
|
+
const a = e.filter(N);
|
|
30
|
+
return g(a, r);
|
|
31
31
|
}, H = (e) => {
|
|
32
|
-
const r = [],
|
|
33
|
-
(
|
|
32
|
+
const r = [], a = e.filter(
|
|
33
|
+
(o) => o.top_level_category_guid !== n.INCOME && o.top_level_category_guid !== n.TRANSFER && o.total > 0
|
|
34
34
|
);
|
|
35
35
|
let t = _(y(/* @__PURE__ */ new Date(), 5));
|
|
36
36
|
const s = M(/* @__PURE__ */ new Date());
|
|
37
37
|
for (; d(t, s); )
|
|
38
38
|
r.push({
|
|
39
39
|
x: m(t, T.MONTH_SHORT),
|
|
40
|
-
y:
|
|
40
|
+
y: a.filter((o) => o.year === t.getFullYear() && o.month === t.getMonth() + 1).reduce((o, c) => o + c.total, 0)
|
|
41
41
|
}), t = u(t, 1);
|
|
42
42
|
return r;
|
|
43
43
|
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { b } from "./CategoryUtil-DUM8NuGO.mjs";
|
|
2
|
+
import { b as m } from "./Category-CevNQ03n.mjs";
|
|
3
|
+
import { jsx as d, jsxs as x } from "react/jsx-runtime";
|
|
4
|
+
import T from "react";
|
|
5
|
+
import { observer as E } from "mobx-react-lite";
|
|
6
|
+
import h from "@mui/material/Stack";
|
|
7
|
+
import { CategoryIcon as I, CategoryIconVariants as M, Text as p } from "@mxenabled/mxui";
|
|
8
|
+
import N from "@mui/material/Button";
|
|
9
|
+
import { useTheme as v } from "@mui/material";
|
|
10
|
+
import { D as G } from "./Donut-1UMNcG67.mjs";
|
|
11
|
+
import { u as w } from "./hooks-C41HAxM5.mjs";
|
|
12
|
+
import { u as O } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
13
|
+
import { f as D } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
14
|
+
import j from "@mui/material/Box";
|
|
15
|
+
const C = 5, k = (a, l, g) => g.reduce((e, r) => {
|
|
16
|
+
if (r.total > 0) {
|
|
17
|
+
const n = a.find((o) => o.guid === r.category_guid);
|
|
18
|
+
if (!n) return e;
|
|
19
|
+
const u = n.parent_guid ?? n.guid, t = a.find((o) => o.guid === u);
|
|
20
|
+
if (!t) return e;
|
|
21
|
+
const i = {
|
|
22
|
+
guid: n.guid,
|
|
23
|
+
name: n.guid === u ? `General ${n.name}` : n.name,
|
|
24
|
+
color: b(t.guid, l),
|
|
25
|
+
amount: r.total
|
|
26
|
+
}, c = e.find((o) => o.guid === u);
|
|
27
|
+
c ? (c.amount += r.total, c.categoryTotals?.push(i)) : e.push({
|
|
28
|
+
guid: u,
|
|
29
|
+
name: t.name,
|
|
30
|
+
color: b(t.guid, l),
|
|
31
|
+
categoryTotals: [i],
|
|
32
|
+
amount: r.total
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return e;
|
|
36
|
+
}, []), L = (a, l, g, e) => {
|
|
37
|
+
const r = k(a, g, e), n = r.filter(
|
|
38
|
+
(o) => o.guid !== m.INCOME && o.guid !== m.INVESTMENTS && o.guid !== m.TRANSFER
|
|
39
|
+
).sort((o, s) => s.amount - o.amount), u = n.reduce(
|
|
40
|
+
(o, s) => o + s.amount,
|
|
41
|
+
0
|
|
42
|
+
), t = n.length > C ? C : n.length, i = n.slice(0, t), c = i.map((o) => ({
|
|
43
|
+
id: o.guid,
|
|
44
|
+
color: b(o.guid, g),
|
|
45
|
+
label: o.name,
|
|
46
|
+
value: o.amount / u * 100
|
|
47
|
+
}));
|
|
48
|
+
if (n.length > 5) {
|
|
49
|
+
const o = n.slice(C, r.length), s = o.reduce(
|
|
50
|
+
(f, y) => f + y.amount,
|
|
51
|
+
0
|
|
52
|
+
);
|
|
53
|
+
i.push({
|
|
54
|
+
guid: "other",
|
|
55
|
+
color: g.palette.categories.others || "",
|
|
56
|
+
name: l.saving_goal_other,
|
|
57
|
+
categoryTotals: o,
|
|
58
|
+
amount: s
|
|
59
|
+
}), c.push({
|
|
60
|
+
id: "other",
|
|
61
|
+
color: g.palette.categories.others || "",
|
|
62
|
+
label: l.saving_goal_other,
|
|
63
|
+
value: s / u * 100
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
categoryData: i,
|
|
68
|
+
donutData: c,
|
|
69
|
+
totalAmount: u
|
|
70
|
+
};
|
|
71
|
+
}, Q = (a, l, g) => {
|
|
72
|
+
const e = a.filter(
|
|
73
|
+
(t) => t.guid === m.INCOME || t.parent_guid === m.INCOME
|
|
74
|
+
), r = l.filter((t) => e.some((i) => i.guid === t.category_guid)).sort((t, i) => t.total - i.total).map((t, i) => ({
|
|
75
|
+
guid: t.category_guid,
|
|
76
|
+
name: a.find((c) => c.guid === t.category_guid)?.name,
|
|
77
|
+
color: g[i],
|
|
78
|
+
categoryTotals: [],
|
|
79
|
+
amount: Math.abs(t.total)
|
|
80
|
+
})), n = r.reduce(
|
|
81
|
+
(t, i) => t + i.amount,
|
|
82
|
+
0
|
|
83
|
+
), u = r.map((t) => ({
|
|
84
|
+
id: t.guid,
|
|
85
|
+
color: t.color,
|
|
86
|
+
label: t.name,
|
|
87
|
+
value: t.amount / n * 100
|
|
88
|
+
}));
|
|
89
|
+
return {
|
|
90
|
+
categoryData: r,
|
|
91
|
+
donutData: u,
|
|
92
|
+
totalAmount: n
|
|
93
|
+
};
|
|
94
|
+
}, A = ({
|
|
95
|
+
data: a,
|
|
96
|
+
isIncome: l = !1,
|
|
97
|
+
onSelected: g,
|
|
98
|
+
onViewTransactions: e,
|
|
99
|
+
selectedId: r,
|
|
100
|
+
size: n = 150,
|
|
101
|
+
totalLabel: u,
|
|
102
|
+
variant: t = "mini"
|
|
103
|
+
}) => {
|
|
104
|
+
const { spending: i } = w(), c = v(), { isTablet: o } = O(), s = T.useMemo(
|
|
105
|
+
() => r ? a.categoryData.find((_) => _.guid === r) : void 0,
|
|
106
|
+
[r]
|
|
107
|
+
), f = T.useMemo(() => a.donutData.length > 0 ? a.donutData : [{ id: "0", color: c.palette.divider, value: 100 }], [a, c]), y = () => {
|
|
108
|
+
e?.(r);
|
|
109
|
+
}, S = o ? 32 : 48;
|
|
110
|
+
return /* @__PURE__ */ d(G, { data: f, onClick: g, selectedId: r, size: n, children: /* @__PURE__ */ d(h, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ x(h, { alignItems: "center", justifyContent: "center", minHeight: n, minWidth: n, children: [
|
|
111
|
+
s && /* @__PURE__ */ x(
|
|
112
|
+
h,
|
|
113
|
+
{
|
|
114
|
+
alignItems: "center",
|
|
115
|
+
gap: t === "mini" ? 0 : 8,
|
|
116
|
+
mb: t === "mini" ? 0 : 8,
|
|
117
|
+
mt: t === "mini" ? 0 : -16,
|
|
118
|
+
sx: t === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ d(
|
|
121
|
+
I,
|
|
122
|
+
{
|
|
123
|
+
categoryGuid: l ? m.INCOME : s.guid,
|
|
124
|
+
size: t === "mini" ? 24 : S,
|
|
125
|
+
variant: M.Transparent
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ d(p, { color: "secondary", noWrap: !0, variant: t === "mini" ? "Tiny" : "Body", children: s ? s.name : u })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
!s && t === "full" && /* @__PURE__ */ d(p, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: u }),
|
|
133
|
+
/* @__PURE__ */ d(p, { variant: t === "mini" ? "H2" : "H1", children: s ? D(s.amount, "0,0") : D(a.totalAmount, "0,0") }),
|
|
134
|
+
!s && t === "mini" && /* @__PURE__ */ d(p, { color: "secondary", noWrap: !0, variant: "Tiny", children: u }),
|
|
135
|
+
t === "full" && /* @__PURE__ */ d(
|
|
136
|
+
N,
|
|
137
|
+
{
|
|
138
|
+
"aria-label": `View ${s?.name || ""} Transactions`,
|
|
139
|
+
disabled: a.categoryData.length === 0,
|
|
140
|
+
onClick: y,
|
|
141
|
+
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
142
|
+
variant: "text",
|
|
143
|
+
children: i.view_transactions
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] }) }) });
|
|
147
|
+
}, U = E(A), Z = ({ data: a, onSelected: l, selectedId: g }) => /* @__PURE__ */ d(h, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: a.categoryData.map((e) => /* @__PURE__ */ x(
|
|
148
|
+
h,
|
|
149
|
+
{
|
|
150
|
+
alignItems: "center",
|
|
151
|
+
"aria-label": e.name,
|
|
152
|
+
"aria-selected": e.guid === g,
|
|
153
|
+
direction: "row",
|
|
154
|
+
gap: 8,
|
|
155
|
+
onClick: () => l(e.guid),
|
|
156
|
+
role: "button",
|
|
157
|
+
sx: { cursor: "pointer" },
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ d(j, { borderRadius: 4, height: 8, sx: { backgroundColor: e.color }, width: 8 }),
|
|
160
|
+
/* @__PURE__ */ d(p, { bold: e.guid === g, variant: "XSmall", children: e.name })
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
e.guid
|
|
164
|
+
)) });
|
|
165
|
+
export {
|
|
166
|
+
U as S,
|
|
167
|
+
Q as a,
|
|
168
|
+
Z as b,
|
|
169
|
+
L as g
|
|
170
|
+
};
|
|
@@ -9,15 +9,15 @@ import { MerchantLogo as pe, Icon as S, Text as T, useTokens as ee, CategoryIcon
|
|
|
9
9
|
import B from "@mui/material/ListItemAvatar";
|
|
10
10
|
import M from "@mui/material/ListItemText";
|
|
11
11
|
import f from "@mui/material/Stack";
|
|
12
|
-
import { T as Pe, L as Ge, O as h, C as Me, b as Ke, i as $e } from "./User-
|
|
13
|
-
import { G as Be, h as v, u as A, g as L, m as xe, b as Fe, p as He } from "./hooks-
|
|
12
|
+
import { T as Pe, L as Ge, O as h, C as Me, b as Ke, i as $e } from "./User-wXzDI4M8.mjs";
|
|
13
|
+
import { G as Be, h as v, u as A, g as L, m as xe, b as Fe, p as He } from "./hooks-C41HAxM5.mjs";
|
|
14
14
|
import { f as te } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
15
15
|
import { Receipt as ze, Delete as oe, ChevronRight as Ue, Cancel as ie, Search as Xe, Edit as Ve, Flag as We } from "@mxenabled/mx-icons";
|
|
16
16
|
import { fromUnixTime as W } from "date-fns/fromUnixTime";
|
|
17
17
|
import { isSameDay as Ne } from "date-fns/isSameDay";
|
|
18
|
-
import { h as Ye } from "./DateUtil-
|
|
18
|
+
import { h as Ye } from "./DateUtil-CBdcsyuk.mjs";
|
|
19
19
|
import { L as Ie } from "./Loader-DUaFpDGv.mjs";
|
|
20
|
-
import { A as P } from "./WidgetContainer-
|
|
20
|
+
import { A as P } from "./WidgetContainer-GoNq8wwm.mjs";
|
|
21
21
|
import ne from "@mui/material/Paper";
|
|
22
22
|
import ce from "@mui/material/Button";
|
|
23
23
|
import je from "@mui/material/FormGroup";
|
|
@@ -27,17 +27,17 @@ import qe from "@mui/material/ToggleButton";
|
|
|
27
27
|
import ve from "@mui/material/styles/useTheme";
|
|
28
28
|
import z from "@mui/material/Avatar";
|
|
29
29
|
import F from "@mui/material/ListItem";
|
|
30
|
-
import {
|
|
30
|
+
import { D as V, f as Ee, a as Oe } from "./Dialog-BPTr3qHE.mjs";
|
|
31
31
|
import U from "@mui/material/ListItemButton";
|
|
32
32
|
import X from "@mui/material/ListItemIcon";
|
|
33
|
-
import { a as we } from "./CategorySelectorDrawer-
|
|
33
|
+
import { a as we } from "./CategorySelectorDrawer-ZO9N26Kx.mjs";
|
|
34
34
|
import { b as se } from "./Localization-2MODESHW.mjs";
|
|
35
35
|
import { getUnixTime as Ze } from "date-fns/getUnixTime";
|
|
36
|
-
import { D as de } from "./Drawer-
|
|
36
|
+
import { D as de } from "./Drawer-BEtCk82g.mjs";
|
|
37
37
|
import ye from "@mui/material/InputAdornment";
|
|
38
38
|
import Je from "@mui/material/Checkbox";
|
|
39
39
|
import ge from "@mui/material/Grid";
|
|
40
|
-
import { C as Qe } from "./CurrencyInput-
|
|
40
|
+
import { C as Qe } from "./CurrencyInput-xH-hqry9.mjs";
|
|
41
41
|
import et from "@mui/material/Switch";
|
|
42
42
|
var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), re = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(re || {});
|
|
43
43
|
const tt = [
|
|
@@ -649,10 +649,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
649
649
|
Qe,
|
|
650
650
|
{
|
|
651
651
|
amount: i,
|
|
652
|
-
|
|
653
|
-
inputProps: {
|
|
654
|
-
noValidate: !0
|
|
655
|
-
},
|
|
652
|
+
ariaLabel: d.split_transaction_edit_split_amount,
|
|
656
653
|
name: "split-amount-input",
|
|
657
654
|
setAmount: x,
|
|
658
655
|
sx: {
|
|
@@ -1329,9 +1326,12 @@ export {
|
|
|
1329
1326
|
bt as M,
|
|
1330
1327
|
lt as S,
|
|
1331
1328
|
Ra as T,
|
|
1329
|
+
dt as Z,
|
|
1332
1330
|
ka as a,
|
|
1333
1331
|
st as b,
|
|
1334
1332
|
Kt as c,
|
|
1335
1333
|
q as d,
|
|
1334
|
+
_t as h,
|
|
1335
|
+
Se as s,
|
|
1336
1336
|
G as u
|
|
1337
1337
|
};
|
|
@@ -13,12 +13,12 @@ import { isBefore as Y } from "date-fns/isBefore";
|
|
|
13
13
|
import { startOfMonth as R } from "date-fns/startOfMonth";
|
|
14
14
|
import { startOfToday as b } from "date-fns/startOfToday";
|
|
15
15
|
import { subDays as F } from "date-fns/subDays";
|
|
16
|
-
import { O as n, a as G, T as w } from "./User-
|
|
16
|
+
import { O as n, a as G, T as w } from "./User-wXzDI4M8.mjs";
|
|
17
17
|
import { T as p } from "./TransactionApi-B3Tksf7L.mjs";
|
|
18
18
|
import { b as W } from "./Category-CevNQ03n.mjs";
|
|
19
|
-
import { f as z } from "./exportTransactionsToCSV-
|
|
19
|
+
import { f as z } from "./exportTransactionsToCSV-hrNpJ77n.mjs";
|
|
20
20
|
import { format as k } from "date-fns/format";
|
|
21
|
-
import { f as g,
|
|
21
|
+
import { f as g, a as O, O as $ } from "./Dialog-BPTr3qHE.mjs";
|
|
22
22
|
import { endOfMonth as X } from "date-fns/endOfMonth";
|
|
23
23
|
import { B as f } from "./BeatApi-DhJpgCLz.mjs";
|
|
24
24
|
const j = ({
|
|
@@ -8,17 +8,17 @@ import { u as K } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
|
8
8
|
import { u as _t } from "./useDimensions-27p2evRx.mjs";
|
|
9
9
|
import { observer as Mt } from "mobx-react-lite";
|
|
10
10
|
import Tt from "@mui/material/Card";
|
|
11
|
-
import
|
|
11
|
+
import At from "@mui/material/CardContent";
|
|
12
12
|
import P from "@mui/material/Divider";
|
|
13
13
|
import X from "@mui/material/Grid";
|
|
14
|
-
import { CategoryIcon as
|
|
15
|
-
import { u as Lt, m as Q } from "./hooks-
|
|
14
|
+
import { CategoryIcon as Dt, Text as S } from "@mxenabled/mxui";
|
|
15
|
+
import { u as Lt, m as Q } from "./hooks-C41HAxM5.mjs";
|
|
16
16
|
import { b as Rt } from "./Localization-2MODESHW.mjs";
|
|
17
17
|
import { C as O } from "./CurrencyText-kyC1aseI.mjs";
|
|
18
18
|
import { useTheme as wt, Card as Ht, CardContent as It, Box as kt } from "@mui/material";
|
|
19
|
-
import { f as R,
|
|
19
|
+
import { f as R, a as w } from "./Dialog-BPTr3qHE.mjs";
|
|
20
20
|
import Et from "@mui/material/Button";
|
|
21
|
-
import { C as
|
|
21
|
+
import { C as D, b as Gt, c as Nt } from "./Category-CevNQ03n.mjs";
|
|
22
22
|
import { f as V } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
23
23
|
import Bt from "@mui/material/ListItem";
|
|
24
24
|
import Ot from "@mui/material/ListItemButton";
|
|
@@ -38,7 +38,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
38
38
|
"aria-label": Rt(o.category_icon_label_aria, n),
|
|
39
39
|
mb: 4,
|
|
40
40
|
role: "img",
|
|
41
|
-
children: /* @__PURE__ */ s(
|
|
41
|
+
children: /* @__PURE__ */ s(Dt, { categoryGuid: e })
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
44
|
/* @__PURE__ */ s(S, { variant: "Body", children: n })
|
|
@@ -71,7 +71,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
71
71
|
width: 250,
|
|
72
72
|
pointerEvents: "none"
|
|
73
73
|
},
|
|
74
|
-
children: /* @__PURE__ */ f(
|
|
74
|
+
children: /* @__PURE__ */ f(At, { children: [
|
|
75
75
|
/* @__PURE__ */ f(L, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
76
76
|
/* @__PURE__ */ s(U, { categoryGuid: r, topLevelCategoryGuid: e }),
|
|
77
77
|
/* @__PURE__ */ s(S, { variant: "Small", children: `${o.length}-month total` }),
|
|
@@ -127,7 +127,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
127
127
|
ref: a,
|
|
128
128
|
sx: r,
|
|
129
129
|
children: e.map(({ guid: g, top_level_guid: C }) => {
|
|
130
|
-
const d = o === g, u =
|
|
130
|
+
const d = o === g, u = D[g], x = D[C], y = u ?? x ?? D.default, b = y + "33";
|
|
131
131
|
return /* @__PURE__ */ f(
|
|
132
132
|
Et,
|
|
133
133
|
{
|
|
@@ -186,7 +186,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
186
186
|
hoveredAreaData: null,
|
|
187
187
|
isAreaHovered: !1,
|
|
188
188
|
cursorPos: { x: 0, y: 0 }
|
|
189
|
-
}), { hoveredSeriesId:
|
|
189
|
+
}), { hoveredSeriesId: A, hoveredAreaData: $, isAreaHovered: tt, cursorPos: I } = Z, W = tt && A && $, j = !W, G = [...n, ...i], et = G[0]?.dataset.length ?? 0, N = G.flatMap((t) => t.dataset.map((c) => c.x)), ot = G.flatMap((t) => t.dataset.map((c) => c.y)), rt = n[0]?.dataset?.map(
|
|
190
190
|
(t, c) => n.reduce((m, _) => m + _.dataset[c]?.y || 0, 0)
|
|
191
191
|
) ?? [0], at = Math.max(...rt), nt = Math.max(
|
|
192
192
|
...i.flatMap((t) => t.dataset.map((c) => c.y))
|
|
@@ -232,7 +232,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
232
232
|
}, dt = (t) => {
|
|
233
233
|
a?.(t ?? "");
|
|
234
234
|
}, ut = () => {
|
|
235
|
-
const t = E(String(
|
|
235
|
+
const t = E(String(A)).guid;
|
|
236
236
|
t && a?.(t);
|
|
237
237
|
}, mt = (t) => {
|
|
238
238
|
const c = String(t?.seriesId), m = E(c).guid, _ = Y.find((B) => B.id === c), pt = _ && t?.dataIndex !== void 0, yt = _ && t?.dataIndex === void 0;
|
|
@@ -331,10 +331,10 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
333
|
slots: {
|
|
334
|
-
itemContent: (t) => j &&
|
|
334
|
+
itemContent: (t) => j && A ? /* @__PURE__ */ s(
|
|
335
335
|
Vt,
|
|
336
336
|
{
|
|
337
|
-
categoryGuids: E(
|
|
337
|
+
categoryGuids: E(A),
|
|
338
338
|
xData: N,
|
|
339
339
|
...t
|
|
340
340
|
}
|
|
@@ -375,7 +375,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
375
375
|
W && /* @__PURE__ */ s(
|
|
376
376
|
Xt,
|
|
377
377
|
{
|
|
378
|
-
categoryGuids: E(
|
|
378
|
+
categoryGuids: E(A),
|
|
379
379
|
chartContainerRef: x,
|
|
380
380
|
cursorPosition: I,
|
|
381
381
|
hoveredAreaData: $.map((t) => ({
|
|
@@ -444,7 +444,7 @@ const U = ({ categoryGuid: r, topLevelCategoryGuid: e }) => {
|
|
|
444
444
|
children: g
|
|
445
445
|
}
|
|
446
446
|
) });
|
|
447
|
-
}, qt = (r) =>
|
|
447
|
+
}, qt = (r) => D[r] ?? D.default, Jt = (r) => Nt[r];
|
|
448
448
|
function Kt(r, e) {
|
|
449
449
|
const o = [], a = new Date(r);
|
|
450
450
|
for (; a <= e; ) {
|