@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4
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 +128 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
- package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
- package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
- package/dist/AccountListItem-wgmlex-_.mjs +90 -0
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
- package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
- package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
- package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-BF40nbsH.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
- package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/LineChart-C1PxNf7P.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
- package/dist/Loader-Ckqi9Rx6.mjs +21 -0
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
- package/dist/SearchBox-B7km148n.mjs +39 -0
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
- package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
- package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +228 -199
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +459 -462
- package/dist/cashflow/index.es.js +419 -428
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +413 -674
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/stores/GlobalUiStore.d.ts +3 -2
- package/dist/common/types/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +1 -3
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +1 -2
- package/dist/debts/index.es.js +673 -665
- package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- 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/FinancialStrengthGraph.d.ts +7 -1
- 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 +17 -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/DialScoreCard.d.ts +7 -1
- 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/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3175 -1067
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +580 -570
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +537 -536
- package/dist/merchants/index.es.js +9 -9
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +3 -3
- package/dist/microinsights/index.es.js +7 -7
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/components/NetWorthChange.d.ts +3 -1
- package/dist/networth/index.es.js +262 -254
- package/dist/notifications/index.es.js +90 -91
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +586 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +371 -365
- package/dist/spending/index.es.js +267 -419
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +231 -226
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +988 -612
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
- package/package.json +51 -56
- package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/AccountListItem-JFMZROh7.mjs +0 -90
- package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/Loader-DUaFpDGv.mjs +0 -24
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/hooks/usePrevious.d.ts +0 -2
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs}
RENAMED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { makeAutoObservable as R, runInAction as
|
|
1
|
+
import { makeAutoObservable as R, runInAction as c } from "mobx";
|
|
2
2
|
import { endOfMonth as f } from "date-fns/endOfMonth";
|
|
3
|
-
import { isAfter as
|
|
4
|
-
import { isBefore as
|
|
5
|
-
import { isSameDay as
|
|
6
|
-
import { isWithinInterval as
|
|
7
|
-
import { startOfMonth as
|
|
3
|
+
import { isAfter as g } from "date-fns/isAfter";
|
|
4
|
+
import { isBefore as S } from "date-fns/isBefore";
|
|
5
|
+
import { isSameDay as p } from "date-fns/isSameDay";
|
|
6
|
+
import { isWithinInterval as T } from "date-fns/isWithinInterval";
|
|
7
|
+
import { startOfMonth as y } from "date-fns/startOfMonth";
|
|
8
8
|
import { startOfToday as i } from "date-fns/startOfToday";
|
|
9
|
-
import { subDays as
|
|
10
|
-
import { F as x, A as
|
|
11
|
-
import { a as u, b as
|
|
12
|
-
var
|
|
13
|
-
const
|
|
9
|
+
import { subDays as I } from "date-fns/subDays";
|
|
10
|
+
import { F as x, A as o } from "./Fetch-DecPFeGU.mjs";
|
|
11
|
+
import { a as u, b as A, c as r, d } from "./RecurringTransactions-CxcSL1dY.mjs";
|
|
12
|
+
var E = /* @__PURE__ */ ((a) => (a.Small = "small", a.Medium = "medium", a.Large = "large", a))(E || {});
|
|
13
|
+
const G = 44;
|
|
14
14
|
class h {
|
|
15
15
|
fetchInstance;
|
|
16
|
-
constructor(
|
|
17
|
-
this.fetchInstance = new x(
|
|
16
|
+
constructor(t, e, n) {
|
|
17
|
+
this.fetchInstance = new x(t, e, void 0, n);
|
|
18
18
|
}
|
|
19
|
-
addRepeatingTransaction = async (
|
|
20
|
-
getRepeatingTransactions = async () => this.fetchInstance.get(
|
|
21
|
-
updateRepeatingTransaction = async (
|
|
22
|
-
`${
|
|
23
|
-
|
|
24
|
-
).then((
|
|
25
|
-
deleteRepeatingTransaction = async (
|
|
19
|
+
addRepeatingTransaction = async (t) => this.fetchInstance.post(o.REPEATING_TRANSACTIONS, t).then((e) => e.repeating_transaction);
|
|
20
|
+
getRepeatingTransactions = async () => this.fetchInstance.get(o.REPEATING_TRANSACTIONS).then((t) => t.repeating_transactions);
|
|
21
|
+
updateRepeatingTransaction = async (t) => this.fetchInstance.put(
|
|
22
|
+
`${o.REPEATING_TRANSACTIONS}/${t.guid}`,
|
|
23
|
+
t
|
|
24
|
+
).then((e) => e.repeating_transaction);
|
|
25
|
+
deleteRepeatingTransaction = async (t) => this.fetchInstance.delete(`${o.REPEATING_TRANSACTIONS}/${t}`).then((e) => e);
|
|
26
26
|
}
|
|
27
|
-
const l = (
|
|
28
|
-
class
|
|
27
|
+
const l = (a, t) => T(t.expectedDate, a), s = (a, t) => a + t.amount;
|
|
28
|
+
class U {
|
|
29
29
|
globalStore;
|
|
30
30
|
api = new h("/", "");
|
|
31
31
|
repeatingTransactions = [];
|
|
32
32
|
isDataLoaded = !1;
|
|
33
33
|
selectedDay;
|
|
34
|
-
dateRange = { start:
|
|
35
|
-
constructor(
|
|
36
|
-
this.globalStore =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
dateRange = { start: y(i()), end: f(i()) };
|
|
35
|
+
constructor(t) {
|
|
36
|
+
this.globalStore = t, this.api = new h(
|
|
37
|
+
t.endpoint,
|
|
38
|
+
t.sessionToken,
|
|
39
|
+
t.onError
|
|
40
40
|
), R(this);
|
|
41
41
|
}
|
|
42
42
|
get detailedRepeatingTransactions() {
|
|
@@ -50,15 +50,15 @@ class C {
|
|
|
50
50
|
* Returns all recurrences built from repeating transactions and filtered by accounts.
|
|
51
51
|
*/
|
|
52
52
|
get recurrences() {
|
|
53
|
-
const
|
|
54
|
-
return
|
|
53
|
+
const t = this.globalStore.accountStore.visibleAccounts;
|
|
54
|
+
return A(this.detailedRepeatingTransactions, this.dateRange).filter((e) => t.some((n) => n.guid === e.accountGuid && !n.is_excluded_from_accounts)).filter((e) => T(e.expectedDate, this.dateRange));
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Returns all recurrences that have occurred in the past, including those that are paid or missed
|
|
58
58
|
*/
|
|
59
59
|
get pastRecurrences() {
|
|
60
60
|
return this.recurrences.filter(
|
|
61
|
-
(
|
|
61
|
+
(t) => t.status === r.Paid || t.status === r.Missed
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -67,7 +67,7 @@ class C {
|
|
|
67
67
|
*/
|
|
68
68
|
get upcomingRecurrences() {
|
|
69
69
|
return this.recurrences.filter(
|
|
70
|
-
(
|
|
70
|
+
(t) => g(t.expectedDate, I(i(), 3)) && S(t.expectedDate, this.dateRange.end) && t.status === r.Upcoming
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
@@ -75,7 +75,7 @@ class C {
|
|
|
75
75
|
*/
|
|
76
76
|
get expenses() {
|
|
77
77
|
return this.recurrences.filter(
|
|
78
|
-
(
|
|
78
|
+
(t) => t.type === d.Expense
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
@@ -83,7 +83,7 @@ class C {
|
|
|
83
83
|
*/
|
|
84
84
|
get upcomingExpenses() {
|
|
85
85
|
return this.expenses.filter(
|
|
86
|
-
(
|
|
86
|
+
(t) => t.status === r.Upcoming
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
@@ -91,7 +91,7 @@ class C {
|
|
|
91
91
|
*/
|
|
92
92
|
get income() {
|
|
93
93
|
return this.recurrences.filter(
|
|
94
|
-
(
|
|
94
|
+
(t) => t.type === d.Income
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
@@ -99,18 +99,18 @@ class C {
|
|
|
99
99
|
*/
|
|
100
100
|
get upcomingIncome() {
|
|
101
101
|
return this.income.filter(
|
|
102
|
-
(
|
|
102
|
+
(t) => t.status === r.Upcoming
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
get nextIncomeRecurrence() {
|
|
106
|
-
return this.upcomingIncome.find((
|
|
106
|
+
return this.upcomingIncome.find((t) => g(t.expectedDate, i()));
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* Returns the expense recurrences for the current month.
|
|
110
110
|
*/
|
|
111
111
|
get currentMonthExpenses() {
|
|
112
112
|
return this.expenses.filter(
|
|
113
|
-
(
|
|
113
|
+
(t) => l(this.dateRange, t)
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
@@ -118,7 +118,7 @@ class C {
|
|
|
118
118
|
*/
|
|
119
119
|
get currentMonthIncome() {
|
|
120
120
|
return this.income.filter(
|
|
121
|
-
(
|
|
121
|
+
(t) => l(this.dateRange, t)
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
@@ -131,19 +131,19 @@ class C {
|
|
|
131
131
|
* Calculates the total amount of all paid expenses for the current month.
|
|
132
132
|
*/
|
|
133
133
|
get paidExpenseTotal() {
|
|
134
|
-
return this.currentMonthExpenses.filter((
|
|
134
|
+
return this.currentMonthExpenses.filter((t) => t.status === r.Paid).reduce(s, 0);
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* Calculates the total amount of all missed expenses for the current month.
|
|
138
138
|
*/
|
|
139
139
|
get missedExpenseTotal() {
|
|
140
|
-
return this.currentMonthExpenses.filter((
|
|
140
|
+
return this.currentMonthExpenses.filter((t) => t.status === r.Missed).reduce(s, 0);
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Calculates the total amount of all upcoming expenses for the current month.
|
|
144
144
|
*/
|
|
145
145
|
get upcomingExpenseTotal() {
|
|
146
|
-
return this.currentMonthExpenses.filter((
|
|
146
|
+
return this.currentMonthExpenses.filter((t) => t.status === r.Upcoming).reduce(s, 0);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Calculates the total amount of all income for the current month.
|
|
@@ -155,46 +155,53 @@ class C {
|
|
|
155
155
|
* Calculates the total amount of all paid income for the current month.
|
|
156
156
|
*/
|
|
157
157
|
get paidIncomeTotal() {
|
|
158
|
-
return this.currentMonthIncome.filter((
|
|
158
|
+
return this.currentMonthIncome.filter((t) => t.status === r.Paid).reduce(s, 0);
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
161
|
* Calculates the total amount of all upcoming income for the current month.
|
|
162
162
|
*/
|
|
163
163
|
get upcomingIncomeTotal() {
|
|
164
|
-
return this.currentMonthIncome.filter((
|
|
164
|
+
return this.currentMonthIncome.filter((t) => t.status === r.Upcoming).reduce(s, 0);
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
167
|
* Get the recurrences for the currently selected day.
|
|
168
168
|
*/
|
|
169
169
|
get selectedDayRecurrences() {
|
|
170
170
|
return this.selectedDay && this.recurrences.filter(
|
|
171
|
-
(
|
|
171
|
+
(t) => this.selectedDay && p(t.occurredOnDate || t.expectedDate, this.selectedDay)
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
setRepeatingTransactions = (
|
|
175
|
-
this.repeatingTransactions =
|
|
174
|
+
setRepeatingTransactions = (t) => {
|
|
175
|
+
this.repeatingTransactions = t, this.isDataLoaded = !0;
|
|
176
176
|
};
|
|
177
177
|
/**
|
|
178
178
|
* Set the date range for filtering recurrences.
|
|
179
179
|
* @param dateRange - The date range to set.
|
|
180
180
|
*/
|
|
181
|
-
setDateRange = (
|
|
181
|
+
setDateRange = (t) => this.dateRange = t;
|
|
182
182
|
/**
|
|
183
183
|
* Set the currently selected day.
|
|
184
184
|
* @param day - The day to select.
|
|
185
185
|
*/
|
|
186
|
-
setSelectedDay = (
|
|
187
|
-
this.selectedDay = this.selectedDay &&
|
|
186
|
+
setSelectedDay = (t) => {
|
|
187
|
+
this.selectedDay = this.selectedDay && p(t, this.selectedDay) ? void 0 : t;
|
|
188
|
+
};
|
|
189
|
+
loadRepeatingTransactionData = async () => {
|
|
190
|
+
await Promise.all([
|
|
191
|
+
this.globalStore.accountStore.loadAccountData(),
|
|
192
|
+
this.globalStore.categoryStore.loadCategories(),
|
|
193
|
+
this.globalStore.transactionStore.loadTransactionData()
|
|
194
|
+
]), await this.loadRepeatingTransactions();
|
|
188
195
|
};
|
|
189
196
|
/**
|
|
190
197
|
* Load repeating transactions and augment them with additional data.
|
|
191
198
|
*/
|
|
192
199
|
loadRepeatingTransactions = async () => {
|
|
193
200
|
try {
|
|
194
|
-
const
|
|
195
|
-
this.setRepeatingTransactions(
|
|
196
|
-
} catch (
|
|
197
|
-
console.error(`Error occurred while getting repeating transactions: ${
|
|
201
|
+
const t = await this.api.getRepeatingTransactions();
|
|
202
|
+
this.setRepeatingTransactions(t);
|
|
203
|
+
} catch (t) {
|
|
204
|
+
console.error(`Error occurred while getting repeating transactions: ${t}`);
|
|
198
205
|
}
|
|
199
206
|
};
|
|
200
207
|
/**
|
|
@@ -202,13 +209,13 @@ class C {
|
|
|
202
209
|
* @param repeatingTransaction - The repeating transaction to add.
|
|
203
210
|
* @param transaction - The transaction associated with the repeating transaction.
|
|
204
211
|
*/
|
|
205
|
-
addRepeatingTransaction = async (
|
|
212
|
+
addRepeatingTransaction = async (t, e) => {
|
|
206
213
|
try {
|
|
207
|
-
const n = await this.api.addRepeatingTransaction(
|
|
214
|
+
const n = await this.api.addRepeatingTransaction(t);
|
|
208
215
|
await this.globalStore.transactionStore.updateTransaction({
|
|
209
|
-
...
|
|
216
|
+
...e,
|
|
210
217
|
repeating_transaction_guid: n.guid
|
|
211
|
-
}),
|
|
218
|
+
}), c(() => {
|
|
212
219
|
this.repeatingTransactions = [
|
|
213
220
|
...this.repeatingTransactions,
|
|
214
221
|
...u(
|
|
@@ -226,45 +233,45 @@ class C {
|
|
|
226
233
|
* Delete a repeating transaction by its GUID.
|
|
227
234
|
* @param guid - The GUID of the repeating transaction to delete.
|
|
228
235
|
*/
|
|
229
|
-
deleteRepeatingTransaction = async (
|
|
236
|
+
deleteRepeatingTransaction = async (t) => {
|
|
230
237
|
try {
|
|
231
|
-
await this.api.deleteRepeatingTransaction(
|
|
238
|
+
await this.api.deleteRepeatingTransaction(t), c(() => {
|
|
232
239
|
this.repeatingTransactions = [
|
|
233
|
-
...this.repeatingTransactions.filter((
|
|
240
|
+
...this.repeatingTransactions.filter((e) => e.guid !== t)
|
|
234
241
|
];
|
|
235
242
|
});
|
|
236
|
-
} catch (
|
|
237
|
-
console.error(`Error occurred while deleting repeating transaction: ${
|
|
243
|
+
} catch (e) {
|
|
244
|
+
console.error(`Error occurred while deleting repeating transaction: ${e}`);
|
|
238
245
|
}
|
|
239
246
|
};
|
|
240
247
|
/**
|
|
241
248
|
* Update an existing repeating transaction.
|
|
242
249
|
* @param transaction - The repeating transaction to update.
|
|
243
250
|
*/
|
|
244
|
-
updateRepeatingTransaction = async (
|
|
251
|
+
updateRepeatingTransaction = async (t) => {
|
|
245
252
|
try {
|
|
246
|
-
const
|
|
247
|
-
(
|
|
253
|
+
const e = await this.api.updateRepeatingTransaction(t), n = this.repeatingTransactions.findIndex(
|
|
254
|
+
(m) => m.guid === e.guid
|
|
248
255
|
);
|
|
249
256
|
if (n < 0) return;
|
|
250
|
-
|
|
257
|
+
c(() => {
|
|
251
258
|
this.repeatingTransactions = [
|
|
252
259
|
...this.repeatingTransactions.slice(0, n),
|
|
253
260
|
...u(
|
|
254
261
|
this.globalStore.accountStore.visibleAccounts,
|
|
255
|
-
[
|
|
262
|
+
[e],
|
|
256
263
|
this.globalStore.transactionStore.transactions
|
|
257
264
|
),
|
|
258
265
|
...this.repeatingTransactions.slice(n + 1)
|
|
259
266
|
];
|
|
260
267
|
});
|
|
261
|
-
} catch (
|
|
262
|
-
console.error(`Error occurred while updating repeating transaction: ${
|
|
268
|
+
} catch (e) {
|
|
269
|
+
console.error(`Error occurred while updating repeating transaction: ${e}`);
|
|
263
270
|
}
|
|
264
271
|
};
|
|
265
272
|
}
|
|
266
273
|
export {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
U as R,
|
|
275
|
+
E as S,
|
|
276
|
+
G as T
|
|
270
277
|
};
|
|
@@ -3,16 +3,16 @@ import p from "react";
|
|
|
3
3
|
import d from "@mui/material/Button";
|
|
4
4
|
import a from "@mui/material/IconButton";
|
|
5
5
|
import c from "@mui/material/Tooltip";
|
|
6
|
-
import f from "@mui/material/styles
|
|
7
|
-
const
|
|
6
|
+
import { useTheme as f } from "@mui/material/styles";
|
|
7
|
+
const B = ({
|
|
8
8
|
icon: e,
|
|
9
9
|
label: i,
|
|
10
10
|
onClick: o,
|
|
11
11
|
placement: s = "bottom",
|
|
12
|
-
tooltipText:
|
|
12
|
+
tooltipText: r,
|
|
13
13
|
variant: l = "text"
|
|
14
14
|
}) => {
|
|
15
|
-
const
|
|
15
|
+
const n = f();
|
|
16
16
|
return /* @__PURE__ */ m(p.Fragment, { children: [
|
|
17
17
|
/* @__PURE__ */ t(
|
|
18
18
|
d,
|
|
@@ -20,10 +20,10 @@ const u = ({
|
|
|
20
20
|
onClick: o,
|
|
21
21
|
startIcon: e,
|
|
22
22
|
sx: {
|
|
23
|
-
[
|
|
24
|
-
[
|
|
23
|
+
[n.breakpoints.down("lg")]: { display: "none" },
|
|
24
|
+
[n.breakpoints.up("lg")]: { display: "inline-flex" }
|
|
25
25
|
},
|
|
26
|
-
title:
|
|
26
|
+
title: r,
|
|
27
27
|
variant: l,
|
|
28
28
|
children: i
|
|
29
29
|
}
|
|
@@ -34,12 +34,12 @@ const u = ({
|
|
|
34
34
|
describeChild: !0,
|
|
35
35
|
placement: s,
|
|
36
36
|
sx: { display: { xs: "inline-flex", lg: "none" } },
|
|
37
|
-
title:
|
|
37
|
+
title: r,
|
|
38
38
|
children: /* @__PURE__ */ t(a, { onClick: o, children: e })
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
] });
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
B as R
|
|
45
45
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { observer as i } from "mobx-react-lite";
|
|
3
|
+
import s from "@mui/material/Box";
|
|
4
|
+
import p from "@mui/material/IconButton";
|
|
5
|
+
import n from "@mui/material/InputAdornment";
|
|
6
|
+
import { TextField as d, Icon as a } from "@mxenabled/mxui";
|
|
7
|
+
const h = ({
|
|
8
|
+
ariaLabel: c = "Search",
|
|
9
|
+
cancelAriaLabel: t = "Cancel Search",
|
|
10
|
+
onChange: o,
|
|
11
|
+
placeholder: l = "Search",
|
|
12
|
+
searchValue: e
|
|
13
|
+
}) => /* @__PURE__ */ r(s, { className: "mx-cmn-search-box", px: 24, py: 16, children: /* @__PURE__ */ r(
|
|
14
|
+
d,
|
|
15
|
+
{
|
|
16
|
+
InputProps: {
|
|
17
|
+
startAdornment: /* @__PURE__ */ r(n, { position: "start", children: /* @__PURE__ */ r(a, { color: "disabled", name: "search", size: 26 }) }),
|
|
18
|
+
endAdornment: /* @__PURE__ */ r(n, { position: "end", sx: { p: 0 }, children: e ? /* @__PURE__ */ r(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
"aria-label": t,
|
|
22
|
+
className: "mx-cat-cancel-search-button",
|
|
23
|
+
color: "primary",
|
|
24
|
+
onClick: () => o(""),
|
|
25
|
+
children: /* @__PURE__ */ r(a, { name: "cancel", size: 24 })
|
|
26
|
+
}
|
|
27
|
+
) : null })
|
|
28
|
+
},
|
|
29
|
+
"aria-label": c,
|
|
30
|
+
name: "search",
|
|
31
|
+
onChange: (m) => o(m.target.value),
|
|
32
|
+
placeholder: l,
|
|
33
|
+
sx: { bgcolor: "background.paper", width: "100%" },
|
|
34
|
+
value: e
|
|
35
|
+
}
|
|
36
|
+
) }), g = i(h);
|
|
37
|
+
export {
|
|
38
|
+
g as S
|
|
39
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeAutoObservable as N, runInAction as l } from "mobx";
|
|
2
|
-
import { F as D, A as r } from "./Fetch-
|
|
3
|
-
import {
|
|
4
|
-
import { T as m } from "./TransactionApi-
|
|
2
|
+
import { F as D, A as r } from "./Fetch-DecPFeGU.mjs";
|
|
3
|
+
import { I as i, A as n, B as f } from "./ToggleListItem-ciFTiqRS.mjs";
|
|
4
|
+
import { T as m } from "./TransactionApi-CjBoLleL.mjs";
|
|
5
5
|
class y {
|
|
6
6
|
fetchInstance;
|
|
7
7
|
constructor(e, t, o) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import l from "@mui/material/Box";
|
|
3
|
-
import D from "@mui/material/styles
|
|
4
|
-
const p = 48,
|
|
3
|
+
import { useTheme as D } from "@mui/material/styles";
|
|
4
|
+
const p = 48, d = 4, y = ({
|
|
5
5
|
color: m = "",
|
|
6
6
|
percent: r = 0,
|
|
7
7
|
size: t = p,
|
|
8
|
-
strokeWidth: s =
|
|
8
|
+
strokeWidth: s = d,
|
|
9
9
|
children: i,
|
|
10
10
|
backgroundStrokeColor: c
|
|
11
11
|
}) => {
|
|
@@ -61,9 +61,9 @@ const p = 48, u = 4, S = ({
|
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
}
|
|
64
|
+
};
|
|
65
65
|
export {
|
|
66
66
|
p as D,
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
y as S,
|
|
68
|
+
d as a
|
|
69
69
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t from "@mui/material/Stack";
|
|
3
|
+
import i from "@mui/material/Skeleton";
|
|
4
|
+
const g = ({ sx: e = {}, variant: h = "list" }) => /* @__PURE__ */ d(t, { sx: [...Array.isArray(e) ? e : [e]], children: [
|
|
5
|
+
h === "list" && /* @__PURE__ */ d(t, { gap: 24, children: [
|
|
6
|
+
/* @__PURE__ */ r(i, { height: 25, variant: "rounded", width: 150 }),
|
|
7
|
+
/* @__PURE__ */ r(i, { height: 50, variant: "rounded" }),
|
|
8
|
+
/* @__PURE__ */ r(i, { height: 50, variant: "rounded" }),
|
|
9
|
+
/* @__PURE__ */ r(i, { height: 50, variant: "rounded" })
|
|
10
|
+
] }),
|
|
11
|
+
h === "card" && /* @__PURE__ */ d(t, { gap: 24, children: [
|
|
12
|
+
/* @__PURE__ */ r(i, { height: 50, variant: "rounded" }),
|
|
13
|
+
/* @__PURE__ */ d(t, { direction: "row", gap: 24, children: [
|
|
14
|
+
/* @__PURE__ */ r(i, { height: 300, variant: "rounded", width: "20%" }),
|
|
15
|
+
/* @__PURE__ */ r(i, { height: 300, variant: "rounded", width: "80%" })
|
|
16
|
+
] })
|
|
17
|
+
] }),
|
|
18
|
+
h === "dashboard" && /* @__PURE__ */ d(t, { gap: 24, children: [
|
|
19
|
+
/* @__PURE__ */ r(i, { height: 75, variant: "rounded" }),
|
|
20
|
+
/* @__PURE__ */ d(t, { gap: 24, children: [
|
|
21
|
+
/* @__PURE__ */ d(t, { direction: "row", gap: 24, children: [
|
|
22
|
+
/* @__PURE__ */ r(i, { height: 250, variant: "rounded", width: "75%" }),
|
|
23
|
+
/* @__PURE__ */ r(i, { height: 250, variant: "rounded", width: "25%" })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ d(t, { direction: "row", gap: 24, children: [
|
|
26
|
+
/* @__PURE__ */ r(i, { height: 250, variant: "rounded", width: "75%" }),
|
|
27
|
+
/* @__PURE__ */ r(i, { height: 250, variant: "rounded", width: "25%" })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ d(t, { direction: "row", gap: 24, children: [
|
|
30
|
+
/* @__PURE__ */ r(i, { height: 250, variant: "rounded", width: "75%" }),
|
|
31
|
+
/* @__PURE__ */ r(i, { height: 250, variant: "rounded", width: "25%" })
|
|
32
|
+
] })
|
|
33
|
+
] })
|
|
34
|
+
] })
|
|
35
|
+
] });
|
|
36
|
+
export {
|
|
37
|
+
g as S
|
|
38
|
+
};
|
|
@@ -3,41 +3,41 @@ import { isBefore as d } from "date-fns/isBefore";
|
|
|
3
3
|
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
|
-
import { b as n, P as l } from "./Category-
|
|
7
|
-
import { f as m,
|
|
6
|
+
import { b as n, P as l } from "./Category-Ccoew_sA.mjs";
|
|
7
|
+
import { f as m, a as T } from "./Dialog-CDV0kKxj.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
|
};
|
|
@@ -46,8 +46,8 @@ export {
|
|
|
46
46
|
x as b,
|
|
47
47
|
f as c,
|
|
48
48
|
w as d,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
i as e,
|
|
50
|
+
C as f,
|
|
51
51
|
b as g,
|
|
52
52
|
H as h,
|
|
53
53
|
h as i,
|