@mx-cartographer/experiences 8.1.10 → 8.2.0-alpha.bb0
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-CMjOp7S2.mjs → Account-BTOmbrEK.mjs} +5 -5
- package/dist/{Account-BIKn4XEZ.mjs → Account-DC2d-cjn.mjs} +1 -1
- package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-IDZ6GTT0.mjs} +10 -10
- package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-BRAl-Hro.mjs} +6 -6
- package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-B8koowMf.mjs} +7 -7
- package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-Bc-SndzX.mjs} +1 -1
- package/dist/{Analytics-CxK7O19c.mjs → Analytics-vgPYa2Zt.mjs} +1 -1
- package/dist/AnalyticsApi-DwgSyZ6m.mjs +102 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
- package/dist/BudgetUtil-CGchXaek.mjs +74 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
- package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-nHEBR24E.mjs} +2 -2
- package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
- package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
- package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
- package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
- package/dist/CurrencyDialog-C7r7JqVu.mjs +371 -0
- package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-BUd8mAcE.mjs} +15 -16
- package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-Dd3NxFYY.mjs} +1 -1
- package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-BSktnUw6.mjs} +6 -7
- package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bdm-ZxFw.mjs} +1 -1
- package/dist/DebtUtils-DPn1cXKG.mjs +153 -0
- package/dist/EmbeddedCard-CAY_HJjE.mjs +856 -0
- package/dist/Error-Dogaw2jO.mjs +84 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
- package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-DzeJOb_g.mjs} +6 -5
- package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
- package/dist/GlobalCopyApi-C75qVBk6.mjs +30 -0
- package/dist/GoalsUtil-B-Z6fq_t.mjs +107 -0
- package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
- package/dist/{Help-C_CM4gpK.mjs → Help-HoxJgoVt.mjs} +68 -67
- package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
- package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-DNynWPGz.mjs} +2 -2
- package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
- package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
- package/dist/Localization-Li21_krp.mjs +37 -0
- package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-C_FjST7B.mjs} +24 -24
- package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
- package/dist/NetWorthUtils-CyVz9bUn.mjs +95 -0
- package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-B8pH9TOv.mjs} +13 -13
- package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
- package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting-Dnk0YyfZ.mjs} +1 -1
- package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-BEBuqeS1.mjs} +4 -4
- package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-eQb1AS5x.mjs} +9 -9
- package/dist/RecurringTransactionsUtil-DbMNqEu_.mjs +253 -0
- package/dist/Select-BZRUpOib.mjs +51 -0
- package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
- package/dist/Sizes-DISGrlUg.mjs +6 -0
- package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-CktOElG1.mjs} +6 -6
- package/dist/{SpendingLegend-DLElSvH0.mjs → SpendingLegend-CM5L_1Ka.mjs} +4 -4
- package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-BP-sFltN.mjs} +33 -33
- package/dist/TransactionUtils-CvJW9wDu.mjs +234 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
- package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-DWOpU5L8.mjs} +28 -30
- package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-CAgbD0ZS.mjs} +3 -3
- package/dist/accounts/hooks/useUiStore.d.ts +6 -1
- package/dist/accounts/index.d.ts +0 -1
- package/dist/accounts/index.es.js +52 -54
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +18 -18
- package/dist/cashflow/context/hooks.d.ts +15 -1
- package/dist/cashflow/index.d.ts +0 -1
- package/dist/cashflow/index.es.js +28 -31
- package/dist/categories/context/hooks.d.ts +19 -1
- package/dist/categories/index.d.ts +0 -1
- package/dist/categories/index.es.js +4 -6
- package/dist/common/constants/ScheduledPayment.d.ts +1 -1
- package/dist/common/constants/index.d.ts +0 -3
- package/dist/common/context/GlobalDataProvider.d.ts +1 -1
- package/dist/common/context/hooks.d.ts +21 -21
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +203 -961
- package/dist/common/utils/AccountFilter.d.ts +1 -1
- package/dist/common/utils/index.d.ts +0 -4
- package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
- package/dist/core/constants/Transaction.d.ts +10 -0
- package/dist/core/constants/index.d.ts +2 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.es.js +3060 -88
- package/dist/{accounts → core}/stores/AccountStore.d.ts +14 -4
- package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
- package/dist/{common → core}/stores/AppDataStore.d.ts +4 -5
- package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
- package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +3 -4
- package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
- package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -4
- package/dist/{common → core}/stores/ConnectStore.d.ts +2 -2
- package/dist/core/stores/DebtsStore.d.ts +22 -0
- package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +4 -4
- package/dist/{common → core}/stores/GlobalCopyStore.d.ts +2 -2
- package/dist/{common → core}/stores/GlobalStore.d.ts +2 -25
- package/dist/{common → core}/stores/GlobalUiStore.d.ts +3 -3
- package/dist/{goals → core}/stores/GoalStore.d.ts +3 -3
- package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -6
- package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -4
- package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -3
- package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -4
- package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -3
- package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -3
- package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -5
- package/dist/{transactions → core}/stores/TransactionStore.d.ts +27 -6
- package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -5
- package/dist/{common → core}/stores/UserStore.d.ts +2 -2
- package/dist/core/stores/index.d.ts +24 -0
- package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
- package/dist/core/types/Offer.d.ts +32 -0
- package/dist/core/types/index.d.ts +3 -1
- package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +1 -1
- package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
- package/dist/{budgets → core}/utils/BudgetUtil.d.ts +2 -2
- package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
- package/dist/core/utils/DebtUtils.d.ts +31 -0
- package/dist/core/utils/FinstrongUtils.d.ts +7 -0
- package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
- package/dist/core/utils/HelpUtil.d.ts +3 -0
- package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
- package/dist/core/utils/Localization.d.ts +2 -0
- package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
- package/dist/{notifications → core}/utils/NotificationUtils.d.ts +1 -1
- package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
- package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +1 -1
- package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
- package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
- package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
- package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +1 -1
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/dashboard/index.es.js +4 -4
- package/dist/debts/components/DebtsChart.d.ts +1 -1
- package/dist/debts/components/DebtsTable.d.ts +1 -1
- package/dist/debts/components/SnowballCard.d.ts +1 -1
- package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
- package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
- package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
- package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
- package/dist/debts/index.d.ts +0 -1
- package/dist/debts/index.es.js +568 -691
- package/dist/debts/utils/DebtsTable.d.ts +1 -1
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/finstrong/index.d.ts +0 -1
- package/dist/finstrong/index.es.js +1565 -1342
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -7
- package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
- package/dist/goals/index.d.ts +0 -1
- package/dist/goals/index.es.js +71 -73
- package/dist/help/index.es.js +4 -4
- package/dist/help/utils/index.d.ts +0 -1
- package/dist/{hooks-RzCoiTd0.mjs → hooks-BaO_gOI6.mjs} +17 -17
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/index.es.js +52 -54
- package/dist/investments/components/AnalysisDetails.d.ts +1 -1
- package/dist/investments/index.es.js +6 -6
- package/dist/merchants/index.d.ts +0 -1
- package/dist/merchants/index.es.js +12 -14
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -33
- package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
- package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -1
- package/dist/networth/components/NetWorthListItem.d.ts +1 -1
- package/dist/networth/components/NetWorthSummary.d.ts +1 -1
- package/dist/networth/index.d.ts +0 -4
- package/dist/networth/index.es.js +232 -237
- package/dist/notifications/index.d.ts +0 -2
- package/dist/notifications/index.es.js +23 -26
- package/dist/recurringtransactions/index.d.ts +0 -1
- package/dist/recurringtransactions/index.es.js +67 -71
- package/dist/settings/index.d.ts +0 -1
- package/dist/settings/index.es.js +11 -13
- package/dist/spending/index.es.js +10 -10
- package/dist/transactions/context/hooks.d.ts +1 -1
- package/dist/transactions/index.d.ts +0 -4
- package/dist/transactions/index.es.js +102 -109
- package/dist/trends/index.d.ts +0 -1
- package/dist/trends/index.es.js +67 -68
- package/dist/trends/utils/shared.d.ts +1 -1
- package/dist/{useAccountDisplayName-pliH6hz0.mjs → useAccountDisplayName-CFa_MrS6.mjs} +1 -1
- package/dist/{useInsightsEnabled-CzJoG8xi.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-BZjr-BiE.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
- package/package.json +1 -1
- package/dist/AccountApi-WEM2M9tg.mjs +0 -19
- package/dist/AccountStore-CGrjC2Oe.mjs +0 -253
- package/dist/ApiEndpoints-C5IA97i7.mjs +0 -118
- package/dist/BeatApi-C6pBa0Rb.mjs +0 -21
- package/dist/BeatStore-C7-PIhpB.mjs +0 -163
- package/dist/BudgetUtil-H9igoNVm.mjs +0 -479
- package/dist/CashflowStore-BEi92kJg.mjs +0 -91
- package/dist/CategoryApi-CogDFScz.mjs +0 -29
- package/dist/CategoryStore-CA4NTaKH.mjs +0 -160
- package/dist/CategoryUtil-BJOHgYKS.mjs +0 -80
- package/dist/DebtsStore-BJlC2-yO.mjs +0 -63
- package/dist/EmbeddedCard-B9JoBaan.mjs +0 -811
- package/dist/FinstrongApi-FpmsS_sy.mjs +0 -19
- package/dist/FinstrongStore-DYawCv1d.mjs +0 -435
- package/dist/GlobalCopyApi-DkS-2Zf_.mjs +0 -41
- package/dist/Goal-MFBpoOIC.mjs +0 -29
- package/dist/GoalStore-BBAEbf43.mjs +0 -395
- package/dist/Localization-C_HZg9tJ.mjs +0 -15
- package/dist/Localization-CkQ49EKr.mjs +0 -26
- package/dist/MerchantApi-D8ahYxiG.mjs +0 -15
- package/dist/MerchantStore-CyZTv-BM.mjs +0 -26
- package/dist/NetWorthStore-BY-B_hxy.mjs +0 -168
- package/dist/NotificationApi-DF0obHoR.mjs +0 -20
- package/dist/NotificationStore-DlAM5Ue0.mjs +0 -69
- package/dist/RecurringTransactions-DCt94TN4.mjs +0 -297
- package/dist/RecurringTransactionsStore-CFJYC7lI.mjs +0 -264
- package/dist/RepeatingTransaction-D2gmBTd0.mjs +0 -7
- package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +0 -17
- package/dist/SettingsApi-D9d7SLhB.mjs +0 -22
- package/dist/SettingsStore-BcbuKfFO.mjs +0 -250
- package/dist/Transaction-Cn5_iFm0.mjs +0 -5
- package/dist/TransactionApi-CLG2eSNe.mjs +0 -86
- package/dist/TransactionStore-amPYxHnA.mjs +0 -710
- package/dist/TrendsStore-bYjIGqyR.mjs +0 -183
- package/dist/WidgetApi-C0BA2cFX.mjs +0 -102
- package/dist/accounts/stores/UiStore.d.ts +0 -10
- package/dist/accounts/utils/index.d.ts +0 -1
- package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
- package/dist/categories/stores/UiStore.d.ts +0 -20
- package/dist/common/stores/index.d.ts +0 -3
- package/dist/common/utils/Categories.d.ts +0 -6
- package/dist/common/utils/Localization.d.ts +0 -3
- package/dist/debts/store/DebtsStore.d.ts +0 -10
- package/dist/debts/store/DebtsUiStore.d.ts +0 -13
- package/dist/debts/utils/DebtStore.d.ts +0 -4
- package/dist/debts/utils/DebtsWidget.d.ts +0 -20
- package/dist/debts/utils/shared.d.ts +0 -12
- package/dist/exportTransactionsToCSV-CSvbZrvL.mjs +0 -133
- package/dist/help/constants/index.d.ts +0 -1
- package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
- package/dist/transactions/analytics.d.ts +0 -3
- package/dist/transactions/constants/Transaction.d.ts +0 -2
- package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
- package/dist/transactions/stores/UiStore.d.ts +0 -25
- package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
- package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
- /package/dist/{common → core}/constants/Category.d.ts +0 -0
- /package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
- /package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
- /package/dist/{help → core}/constants/Help.d.ts +0 -0
- /package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
- /package/dist/{common → core}/constants/Numbers.d.ts +0 -0
- /package/dist/{common → core}/constants/Table.d.ts +0 -0
- /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
|
@@ -10,34 +10,34 @@ import ce from "@mui/material/ListItem";
|
|
|
10
10
|
import de from "@mui/material/ListItemAvatar";
|
|
11
11
|
import le from "@mui/material/ListItemButton";
|
|
12
12
|
import _e from "@mui/material/ListItemText";
|
|
13
|
-
import {
|
|
13
|
+
import { F as l, g as H, R as L, a as X } from "./RecurringTransactionsUtil-DbMNqEu_.mjs";
|
|
14
14
|
import { subDays as Z } from "date-fns/subDays";
|
|
15
|
-
import { startOfToday as
|
|
15
|
+
import { startOfToday as E } from "date-fns/startOfToday";
|
|
16
16
|
import { endOfMonth as ue } from "date-fns/endOfMonth";
|
|
17
17
|
import { parseISO as me } from "date-fns/parseISO";
|
|
18
18
|
import J from "@mui/material/Button";
|
|
19
19
|
import { Delete as pe, Add as ye, ReceiptLong as he } from "@mxenabled/mx-icons";
|
|
20
|
-
import { T as V, u as fe, S as ge, a as Ce } from "./EmbeddedCard-
|
|
21
|
-
import { T as be } from "./TransactionDetails-
|
|
20
|
+
import { T as V, u as fe, S as ge, a as Ce } from "./EmbeddedCard-CAY_HJjE.mjs";
|
|
21
|
+
import { T as be } from "./TransactionDetails-BP-sFltN.mjs";
|
|
22
22
|
import { addYears as j } from "date-fns/addYears";
|
|
23
23
|
import { getDayOfYear as xe } from "date-fns/getDayOfYear";
|
|
24
24
|
import { setDayOfYear as Se } from "date-fns/setDayOfYear";
|
|
25
25
|
import { AdapterDateFns as ve } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
26
26
|
import { DatePicker as De } from "@mui/x-date-pickers";
|
|
27
27
|
import { LocalizationProvider as we } from "@mui/x-date-pickers/LocalizationProvider";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
28
|
+
import { b as Ae, f as ee } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
29
|
+
import { u as w, i as Y, g as P, b as Ie, h as te, C as Re } from "./hooks-BaO_gOI6.mjs";
|
|
30
|
+
import { S as M, D as z } from "./Select-BZRUpOib.mjs";
|
|
31
31
|
import { D as N } from "./Drawer-XPaLYjiO.mjs";
|
|
32
32
|
import { A as O } from "./Analytics-CzGzz_sE.mjs";
|
|
33
|
-
import { f as
|
|
33
|
+
import { f as Ee, D as Le } from "./DateFormats-BSktnUw6.mjs";
|
|
34
34
|
import { D as Oe } from "./Dialog-iLlBR8TG.mjs";
|
|
35
35
|
import { formatISO as Te } from "date-fns/formatISO";
|
|
36
36
|
import { fromUnixTime as ke } from "date-fns/fromUnixTime";
|
|
37
37
|
import { S as Ne } from "./SearchBox-CwDgvWVJ.mjs";
|
|
38
|
-
import { i as Me } from "./DateUtil-
|
|
39
|
-
import {
|
|
40
|
-
import { T as ne } from "./
|
|
38
|
+
import { i as Me } from "./DateUtil-Bdm-ZxFw.mjs";
|
|
39
|
+
import { C as q } from "./Category-DEKZGLYe.mjs";
|
|
40
|
+
import { T as ne } from "./TransactionUtils-CvJW9wDu.mjs";
|
|
41
41
|
const re = ({
|
|
42
42
|
frequency: n,
|
|
43
43
|
firstDay: t,
|
|
@@ -68,10 +68,10 @@ const re = ({
|
|
|
68
68
|
{ id: 6, label: r.weekday_saturday }
|
|
69
69
|
], h = [...Array(31).keys()].map((b) => ({
|
|
70
70
|
id: b + 1,
|
|
71
|
-
label:
|
|
71
|
+
label: Ae(b + 1)
|
|
72
72
|
}));
|
|
73
73
|
h[30].label += ` (${r.last_day_of_month})`;
|
|
74
|
-
const g = h.slice(0, 15), v = h.slice(14), C = n === l.EveryWeek || n === l.EveryOtherWeek, f = n === l.TwiceAMonth || n === l.EveryMonth || n === l.EveryOtherMonth || n === l.EveryQuarter || n === l.EveryOtherQuarter, A = Se(
|
|
74
|
+
const g = h.slice(0, 15), v = h.slice(14), C = n === l.EveryWeek || n === l.EveryOtherWeek, f = n === l.TwiceAMonth || n === l.EveryMonth || n === l.EveryOtherMonth || n === l.EveryQuarter || n === l.EveryOtherQuarter, A = Se(E(), t), y = A < E() ? j(A, 1) : A, D = (b) => {
|
|
75
75
|
b && s(xe(b));
|
|
76
76
|
};
|
|
77
77
|
return /* @__PURE__ */ c(p, { gap: 24, sx: { m: 24 }, children: [
|
|
@@ -116,8 +116,8 @@ const re = ({
|
|
|
116
116
|
{
|
|
117
117
|
disablePast: !0,
|
|
118
118
|
label: r.next_payment_date,
|
|
119
|
-
maxDate: Z(j(
|
|
120
|
-
minDate:
|
|
119
|
+
maxDate: Z(j(E(), 1), 1),
|
|
120
|
+
minDate: E(),
|
|
121
121
|
onChange: D,
|
|
122
122
|
value: y
|
|
123
123
|
}
|
|
@@ -168,11 +168,11 @@ const re = ({
|
|
|
168
168
|
] });
|
|
169
169
|
}), Ge = I(
|
|
170
170
|
({ onDeleted: n, recurringTransaction: t }) => {
|
|
171
|
-
const { recurring: o } = w(), { selectedAccountGuids: i } =
|
|
171
|
+
const { recurring: o } = w(), { selectedAccountGuids: i } = Ie(), { onEvent: s } = P(), { deleteRepeatingTransaction: d } = Y(), { setFilter: r, transactions: a } = te(), { amount: m, description: h, merchant_guid: g } = t, [v, C] = _.useState(!1), [f, A] = _.useState("");
|
|
172
172
|
_.useEffect(() => {
|
|
173
173
|
r({
|
|
174
174
|
accounts: i,
|
|
175
|
-
dateRange: { start: Z(
|
|
175
|
+
dateRange: { start: Z(E(), 90), end: ue(E()) },
|
|
176
176
|
custom: (u) => u.repeating_transaction_guid === t.guid
|
|
177
177
|
});
|
|
178
178
|
}, [t]);
|
|
@@ -198,9 +198,9 @@ const re = ({
|
|
|
198
198
|
/* @__PURE__ */ e(S, { bold: !0, variant: "body1", children: h }),
|
|
199
199
|
/* @__PURE__ */ c(G, { color: D ? "success.main" : "text.primary", sx: { my: 4 }, variant: "h1", children: [
|
|
200
200
|
D ? "+" : "",
|
|
201
|
-
|
|
201
|
+
ee(m, "0,0.00")
|
|
202
202
|
] }),
|
|
203
|
-
/* @__PURE__ */ e(S, { color: "text.secondary", variant: "body2", children: `${o.next_payment_date}: ${
|
|
203
|
+
/* @__PURE__ */ e(S, { color: "text.secondary", variant: "body2", children: `${o.next_payment_date}: ${Ee(
|
|
204
204
|
X(
|
|
205
205
|
t.recurrence_type,
|
|
206
206
|
me(t.predicted_occurs_on),
|
|
@@ -315,7 +315,7 @@ const re = ({
|
|
|
315
315
|
variant: "body1",
|
|
316
316
|
children: [
|
|
317
317
|
a ? "+" : "",
|
|
318
|
-
|
|
318
|
+
ee(t.amount, "0,0.00")
|
|
319
319
|
]
|
|
320
320
|
}
|
|
321
321
|
),
|
|
@@ -427,7 +427,7 @@ const re = ({
|
|
|
427
427
|
label: t,
|
|
428
428
|
onAddRecurringTransaction: o = () => null
|
|
429
429
|
}) => {
|
|
430
|
-
const { recurring: i } = w(), { filter: s, setFilter: d, transactions: r } =
|
|
430
|
+
const { recurring: i } = w(), { filter: s, setFilter: d, transactions: r } = te(), { addRepeatingTransaction: a } = Y(), { user: m } = Re(), [h, g] = _.useState(!1), [v, C] = _.useState(""), [f, A] = _.useState(l.EveryMonth), [y, D] = _.useState(1), [b, U] = _.useState(15), u = _.useMemo(
|
|
431
431
|
() => r.find((x) => x.guid === v),
|
|
432
432
|
[v, r]
|
|
433
433
|
), ae = () => {
|
|
@@ -438,7 +438,7 @@ const re = ({
|
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
440
|
o();
|
|
441
|
-
const x = X(f, ke(u.date), y),
|
|
441
|
+
const x = X(f, ke(u.date), y), R = {
|
|
442
442
|
account_guid: u.account_guid,
|
|
443
443
|
amount: u.amount,
|
|
444
444
|
created_by: 0,
|
|
@@ -453,7 +453,7 @@ const re = ({
|
|
|
453
453
|
transaction_type: u.transaction_type,
|
|
454
454
|
user_guid: m.guid
|
|
455
455
|
};
|
|
456
|
-
await a(
|
|
456
|
+
await a(R, u), K();
|
|
457
457
|
}, K = () => {
|
|
458
458
|
C(""), g(!1);
|
|
459
459
|
};
|
|
@@ -473,7 +473,7 @@ const re = ({
|
|
|
473
473
|
onSearch: (x) => {
|
|
474
474
|
d({
|
|
475
475
|
...s,
|
|
476
|
-
custom: (
|
|
476
|
+
custom: (R) => n ? x ? qe(R, x) : W(R) : x ? ze(R, x) : B(R)
|
|
477
477
|
});
|
|
478
478
|
},
|
|
479
479
|
onSelected: (x) => C(x)
|
|
@@ -6,7 +6,7 @@ import g from "@mui/material/CardHeader";
|
|
|
6
6
|
import { H3 as u, P as v } from "@mxenabled/mxui";
|
|
7
7
|
import { ChevronRight as W } from "@mxenabled/mx-icons";
|
|
8
8
|
import { u as w } from "./useDimensions-CeDR9V8N.mjs";
|
|
9
|
-
import { W as H } from "./hooks-
|
|
9
|
+
import { W as H } from "./hooks-BaO_gOI6.mjs";
|
|
10
10
|
const D = ({
|
|
11
11
|
children: i,
|
|
12
12
|
className: o,
|
|
@@ -8,7 +8,7 @@ import H from "@mui/material/IconButton";
|
|
|
8
8
|
import { Icon as I, ChevronRight as W } from "@mxenabled/mx-icons";
|
|
9
9
|
import { H3 as y, Text as B, P as j } from "@mxenabled/mxui";
|
|
10
10
|
import { u as w } from "./useDimensions-CeDR9V8N.mjs";
|
|
11
|
-
import { W as M } from "./hooks-
|
|
11
|
+
import { W as M } from "./hooks-BaO_gOI6.mjs";
|
|
12
12
|
const J = ({
|
|
13
13
|
children: a,
|
|
14
14
|
className: m = "mx-cmn-mini-widget",
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { format as b } from "date-fns/format";
|
|
2
|
+
import { fromUnixTime as y } from "date-fns/fromUnixTime";
|
|
3
|
+
import { startOfMonth as _ } from "date-fns/startOfMonth";
|
|
4
|
+
import { subMonths as A } from "date-fns/subMonths";
|
|
5
|
+
import { a as h } from "./AccountUtils-Bc-SndzX.mjs";
|
|
6
|
+
import { c as M, d as T, a as N } from "./Account-BTOmbrEK.mjs";
|
|
7
|
+
const f = 13, W = (e, s) => e.filter((n) => {
|
|
8
|
+
const { is_closed: i, is_deleted: r, is_hidden: t, is_manual: o } = n;
|
|
9
|
+
return i || r || t ? !1 : o || !n.guid ? !0 : s.some((c) => e.some((g) => c.guid === g.member_guid));
|
|
10
|
+
}), G = (e, s) => [...e, ...s], R = (e) => {
|
|
11
|
+
if (e && e.length > 0)
|
|
12
|
+
return e[e.length - 1];
|
|
13
|
+
}, U = (e, s) => e.year_month - s.year_month, L = () => Array.from({ length: f }, (e, s) => Math.floor(_(A(/* @__PURE__ */ new Date(), s)).getTime() / 1e3)).sort(), j = (e, s, n) => !e.length || !s.length ? [] : L().reduceRight((r, t) => {
|
|
14
|
+
const o = s.filter(
|
|
15
|
+
({ year_month: a }) => a === parseInt(b(y(t), "yyyyMM"))
|
|
16
|
+
), c = e.map((a) => {
|
|
17
|
+
const l = o.find((u) => u.account_guid === a.guid), m = {
|
|
18
|
+
change: 0,
|
|
19
|
+
guid: a.guid,
|
|
20
|
+
name: a.name,
|
|
21
|
+
type: a.account_type,
|
|
22
|
+
balance: 0
|
|
23
|
+
};
|
|
24
|
+
if (!l && r.length === 0 && !a.balance) return m;
|
|
25
|
+
if (!l && r.length === 0)
|
|
26
|
+
return {
|
|
27
|
+
...m,
|
|
28
|
+
value: h(a) ? -(a.balance ?? 0) : a.balance ?? 0
|
|
29
|
+
};
|
|
30
|
+
if (!l) {
|
|
31
|
+
const u = r[0].accounts.find((p) => p.guid === a.guid);
|
|
32
|
+
return u || m;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
change: l.transaction_total,
|
|
36
|
+
guid: a.guid,
|
|
37
|
+
name: a.name,
|
|
38
|
+
type: a.account_type,
|
|
39
|
+
value: l.balance
|
|
40
|
+
};
|
|
41
|
+
}), { y: g, change: d } = c.reduce(
|
|
42
|
+
(a, l) => ({
|
|
43
|
+
y: a.y + (l.value || 0),
|
|
44
|
+
change: a.change + (l.change || 0)
|
|
45
|
+
}),
|
|
46
|
+
{ y: 0, change: 0 }
|
|
47
|
+
);
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
accounts: c,
|
|
51
|
+
x: t,
|
|
52
|
+
y: g,
|
|
53
|
+
change: d
|
|
54
|
+
},
|
|
55
|
+
...r
|
|
56
|
+
];
|
|
57
|
+
}, []).slice(f - n), w = (e) => {
|
|
58
|
+
const s = [], n = [];
|
|
59
|
+
let i = 0, r = 0;
|
|
60
|
+
return e?.accounts.forEach((t) => {
|
|
61
|
+
t.change > 0 && (s.push({ accountName: t.name, gain: t.change }), i += t.change), t.change < 0 && (n.push({ accountName: t.name, loss: t.change }), r += t.change);
|
|
62
|
+
}), { netWorth: e, gains: s, losses: n, totalGains: i, totalLosses: r };
|
|
63
|
+
}, x = (e) => {
|
|
64
|
+
const s = [], n = [];
|
|
65
|
+
let i = 0, r = 0;
|
|
66
|
+
return e.forEach((t) => {
|
|
67
|
+
if (h(t)) {
|
|
68
|
+
const o = t.balance ?? 0;
|
|
69
|
+
n.push({ accountName: t.name, accountType: t.account_type, balance: o }), r += o;
|
|
70
|
+
} else {
|
|
71
|
+
const o = t.balance ?? 0;
|
|
72
|
+
s.push({ accountName: t.name, accountType: t.account_type, balance: o }), i += o;
|
|
73
|
+
}
|
|
74
|
+
}), { assets: s, liabilities: n, totalAssets: i, totalLiabilities: r };
|
|
75
|
+
}, z = (e) => {
|
|
76
|
+
const s = e.reduce((n, i) => {
|
|
77
|
+
const r = i.accountType;
|
|
78
|
+
return n[r] || (n[r] = []), n[r].push(i), n;
|
|
79
|
+
}, {});
|
|
80
|
+
return Object.entries(s).map(([n, i]) => ({
|
|
81
|
+
icon: T[+n] || N[+n],
|
|
82
|
+
name: M[+n],
|
|
83
|
+
accounts: i
|
|
84
|
+
}));
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
R as a,
|
|
88
|
+
j as b,
|
|
89
|
+
w as c,
|
|
90
|
+
x as d,
|
|
91
|
+
G as e,
|
|
92
|
+
W as f,
|
|
93
|
+
z as g,
|
|
94
|
+
U as s
|
|
95
|
+
};
|
|
@@ -14,13 +14,13 @@ import { startOfMonth as oe } from "date-fns/startOfMonth";
|
|
|
14
14
|
import { DateCalendar as se } from "@mui/x-date-pickers/DateCalendar";
|
|
15
15
|
import { LocalizationProvider as ae } from "@mui/x-date-pickers/LocalizationProvider";
|
|
16
16
|
import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
17
|
+
import { b as le, f as re } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
18
|
+
import { b as de } from "./Localization-Li21_krp.mjs";
|
|
19
|
+
import { u as k, A as T, C as A, d as J, g as me, a as q, b as he } from "./hooks-BaO_gOI6.mjs";
|
|
20
|
+
import { A as ue, N as b } from "./Notification-DTNYSd8P.mjs";
|
|
21
21
|
import { T as R, a as D } from "./ToggleListItem-BLu_fWA2.mjs";
|
|
22
22
|
import { D as B } from "./Dialog-iLlBR8TG.mjs";
|
|
23
|
-
import { C as _e } from "./CurrencyInput-
|
|
23
|
+
import { C as _e } from "./CurrencyInput-BUd8mAcE.mjs";
|
|
24
24
|
import { u as pe } from "./useScreenSize-CeFhWTt_.mjs";
|
|
25
25
|
import { D as K } from "./Drawer-XPaLYjiO.mjs";
|
|
26
26
|
import fe from "@mui/material/Collapse";
|
|
@@ -31,8 +31,8 @@ import j from "@mui/material/Button";
|
|
|
31
31
|
import U from "@mui/material/TextField";
|
|
32
32
|
import { u as be } from "./useDimensions-CeDR9V8N.mjs";
|
|
33
33
|
import Q from "@mui/material/styles/useTheme";
|
|
34
|
-
import { u as xe } from "./useInsightsEnabled-
|
|
35
|
-
import { u as Ce } from "./useWidgetLoadTimer-
|
|
34
|
+
import { u as xe } from "./useInsightsEnabled-DaNLPmUU.mjs";
|
|
35
|
+
import { u as Ce } from "./useWidgetLoadTimer-CJb-RELP.mjs";
|
|
36
36
|
import { L as ve } from "./Loader-CxeBwuPG.mjs";
|
|
37
37
|
const Te = C(() => {
|
|
38
38
|
const { common: n, settings: t } = k(), { sendEmailVerification: s } = T(), { user: l } = A(), i = Q(), [r, a] = p.useState(!1), o = () => {
|
|
@@ -175,12 +175,12 @@ const Te = C(() => {
|
|
|
175
175
|
] });
|
|
176
176
|
}), ke = C(
|
|
177
177
|
({ onProfileUpdated: n, profile: t }) => {
|
|
178
|
-
const { common: s, recurring: l, settings: i } = k(), { updateAccount: r } = J(), a = t.notification_type ===
|
|
178
|
+
const { common: s, recurring: l, settings: i } = k(), { updateAccount: r } = J(), a = t.notification_type === ue.DebtPaymentReminder, [o, u] = p.useState(!1), [d, f] = p.useState(t.threshold || 0), [_, y] = p.useState(
|
|
179
179
|
t.account?.day_payment_is_due || 0
|
|
180
|
-
), m = t.account?.name || t.account?.feed_name || "", g = t.account?.day_payment_is_due ?
|
|
180
|
+
), m = t.account?.name || t.account?.feed_name || "", g = t.account?.day_payment_is_due ? de(
|
|
181
181
|
i.notification_debt_payment_date,
|
|
182
|
-
|
|
183
|
-
) : i.notification_debt_payment_zero_state, P = a ? g :
|
|
182
|
+
le(t.account?.day_payment_is_due)
|
|
183
|
+
) : i.notification_debt_payment_zero_state, P = a ? g : re(t.threshold ?? 0, "0,0"), I = async () => {
|
|
184
184
|
a && t.account ? await r({ ...t.account, day_payment_is_due: _ }) : n({ ...t, threshold: d });
|
|
185
185
|
};
|
|
186
186
|
return /* @__PURE__ */ c(h, { children: [
|
|
@@ -449,7 +449,7 @@ const Te = C(() => {
|
|
|
449
449
|
const { budgetProfiles: n } = T();
|
|
450
450
|
return /* @__PURE__ */ e(h, { children: n.map((t) => /* @__PURE__ */ e(X, { profile: t }, t.guid)) });
|
|
451
451
|
}), Se = C(() => {
|
|
452
|
-
const { onEvent: n } =
|
|
452
|
+
const { onEvent: n } = me(), { settings: t } = k(), {
|
|
453
453
|
clientCommunicationProfile: s,
|
|
454
454
|
updateUserCommunicationProfile: l,
|
|
455
455
|
userCommunicationsProfile: i
|
|
@@ -602,7 +602,7 @@ const Te = C(() => {
|
|
|
602
602
|
showPersonalDetails: t = !1,
|
|
603
603
|
view: s
|
|
604
604
|
}) => {
|
|
605
|
-
const { config: l } = q(), { settings: i } = k(), { isInitialized: r } =
|
|
605
|
+
const { config: l } = q(), { settings: i } = k(), { isInitialized: r } = he(), { isAccountDataLoaded: a, loadAccountData: o } = J(), { clientCommunicationProfile: u, loadNotificationProfiles: d } = T(), f = xe(), [_, y] = p.useState(!1), [m, g] = p.useState(
|
|
606
606
|
void 0
|
|
607
607
|
);
|
|
608
608
|
if (n.length > 0 && f && n.push(b.Insights), Ce({
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { fromUnixTime as n, isSameDay as a } from "date-fns";
|
|
2
|
+
import { I as c } from "./Notification-DTNYSd8P.mjs";
|
|
3
|
+
let o = null;
|
|
4
|
+
const u = () => (o || (o = new Set(
|
|
5
|
+
Object.values(c).filter(
|
|
6
|
+
(e) => typeof e == "number"
|
|
7
|
+
)
|
|
8
|
+
)), o), _ = (e, t) => {
|
|
9
|
+
const i = n(t[e].delivered_at), r = n(t[e - 1]?.delivered_at);
|
|
10
|
+
return !a(i, r);
|
|
11
|
+
};
|
|
12
|
+
function m(e) {
|
|
13
|
+
const i = Math.floor(Date.now() / 1e3);
|
|
14
|
+
return e.filter((r) => {
|
|
15
|
+
const s = r.delivered_at;
|
|
16
|
+
return i - s <= 2592e3;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
m as f,
|
|
21
|
+
u as g,
|
|
22
|
+
_ as s
|
|
23
|
+
};
|
|
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import _ from "react";
|
|
3
3
|
import { observer as p } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/TextField";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { C as f } from "./CurrencyInput-
|
|
5
|
+
import { a as T, f as S } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
6
|
+
import { u as y, k as h } from "./hooks-BaO_gOI6.mjs";
|
|
7
|
+
import { L as b } from "./ListItemAction-DGjHxNDJ.mjs";
|
|
8
|
+
import { C as f } from "./CurrencyInput-BUd8mAcE.mjs";
|
|
9
9
|
const F = p(({ goal: e }) => {
|
|
10
10
|
const { goals: n } = y(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = h(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
|
|
11
11
|
const a = { ...e, interest_rate: t };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
1
|
+
import { jsx as e, Fragment as x, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import u from "react";
|
|
3
3
|
import { observer as h } from "mobx-react-lite";
|
|
4
4
|
import c from "@mui/material/Box";
|
|
5
5
|
import p from "@mui/material/Tab";
|
|
6
|
-
import
|
|
6
|
+
import R from "@mui/material/Tabs";
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
|
-
import
|
|
8
|
+
import b from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-
|
|
11
|
-
import { u as _, i as A, g as f } from "./hooks-
|
|
12
|
-
import {
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-C_FjST7B.mjs";
|
|
11
|
+
import { u as _, i as A, g as f } from "./hooks-BaO_gOI6.mjs";
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactionsUtil-DbMNqEu_.mjs";
|
|
13
13
|
import { A as m } from "./Analytics-CzGzz_sE.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
15
|
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
@@ -21,7 +21,7 @@ const I = h(() => {
|
|
|
21
21
|
}, i = n.filter(
|
|
22
22
|
(r) => r.repeating_transaction_type !== y.Income && (r.transactions.length > 0 || r.recurrence_type === N.EveryYear)
|
|
23
23
|
);
|
|
24
|
-
return /* @__PURE__ */ e(
|
|
24
|
+
return /* @__PURE__ */ e(x, { children: i.length !== 0 ? /* @__PURE__ */ t(
|
|
25
25
|
T,
|
|
26
26
|
{
|
|
27
27
|
sx: {
|
|
@@ -29,7 +29,7 @@ const I = h(() => {
|
|
|
29
29
|
maxHeight: "calc(100vh - 109px)"
|
|
30
30
|
},
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(
|
|
32
|
+
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(b, { sx: { bgcolor: "background.paper" }, children: i.map((r, s) => /* @__PURE__ */ t(u.Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ e(C, { onClick: l, repeatingTransaction: r }),
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
35
|
d,
|
|
@@ -62,7 +62,7 @@ const I = h(() => {
|
|
|
62
62
|
const [n, a] = u.useState(g), { onEvent: l } = f(), { recurring: o } = _();
|
|
63
63
|
return /* @__PURE__ */ t(c, { bgcolor: "background.default", height: "100%", children: [
|
|
64
64
|
/* @__PURE__ */ t(
|
|
65
|
-
|
|
65
|
+
R,
|
|
66
66
|
{
|
|
67
67
|
onChange: (r, s) => {
|
|
68
68
|
a(s), l(
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { addDays as W } from "date-fns/addDays";
|
|
2
|
+
import { addMonths as l } from "date-fns/addMonths";
|
|
3
|
+
import { addQuarters as Q } from "date-fns/addQuarters";
|
|
4
|
+
import { addWeeks as M } from "date-fns/addWeeks";
|
|
5
|
+
import { addYears as B } from "date-fns/addYears";
|
|
6
|
+
import { formatISO as I } from "date-fns/formatISO";
|
|
7
|
+
import { fromUnixTime as U } from "date-fns/fromUnixTime";
|
|
8
|
+
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
9
|
+
import { isAfter as f } from "date-fns/isAfter";
|
|
10
|
+
import { isBefore as i } from "date-fns/isBefore";
|
|
11
|
+
import { isSameDay as G } from "date-fns/isSameDay";
|
|
12
|
+
import { lastDayOfMonth as P } from "date-fns/lastDayOfMonth";
|
|
13
|
+
import { nextDay as p } from "date-fns/nextDay";
|
|
14
|
+
import { parseISO as S } from "date-fns/parseISO";
|
|
15
|
+
import { setDate as D } from "date-fns/setDate";
|
|
16
|
+
import { setDay as L } from "date-fns/setDay";
|
|
17
|
+
import { setDayOfYear as Y } from "date-fns/setDayOfYear";
|
|
18
|
+
import { startOfToday as O } from "date-fns/startOfToday";
|
|
19
|
+
import { subDays as g } from "date-fns/subDays";
|
|
20
|
+
import { subMonths as $ } from "date-fns/subMonths";
|
|
21
|
+
import { subQuarters as A } from "date-fns/subQuarters";
|
|
22
|
+
import { subWeeks as K } from "date-fns/subWeeks";
|
|
23
|
+
import { subYears as C } from "date-fns/subYears";
|
|
24
|
+
import { g as H, a as j, b as z, c as J, d as V, e as X, h as Z } from "./DateUtil-Bdm-ZxFw.mjs";
|
|
25
|
+
import { b as w } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
26
|
+
import { b as h } from "./Localization-Li21_krp.mjs";
|
|
27
|
+
import { f as x, D as E } from "./DateFormats-BSktnUw6.mjs";
|
|
28
|
+
var n = /* @__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))(n || {}), _ = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(_ || {}), b = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(b || {}), N = /* @__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))(N || {});
|
|
29
|
+
const F = (e) => {
|
|
30
|
+
if (!e) return "";
|
|
31
|
+
let o = e.user_name || e.feed_name || "";
|
|
32
|
+
return e.account_number && (o = `${o} *${e.account_number}`), o;
|
|
33
|
+
}, q = (e, o) => {
|
|
34
|
+
const r = [], s = e.recurrence_type === n.EveryYear, t = e.transactions.find(
|
|
35
|
+
(d) => d.repeating_transaction_guid === e.guid
|
|
36
|
+
);
|
|
37
|
+
if (!s && !t) return [];
|
|
38
|
+
const a = S(e.predicted_occurs_on), u = {
|
|
39
|
+
accountGuid: e.account?.guid || "",
|
|
40
|
+
amount: e.amount,
|
|
41
|
+
categoryGuid: t?.category_guid || "",
|
|
42
|
+
expectedDate: a,
|
|
43
|
+
frequency: e.recurrence_type,
|
|
44
|
+
institutionGuid: e.account?.institution_guid || "",
|
|
45
|
+
institutionName: F(e.account),
|
|
46
|
+
merchantGuid: e.merchant_guid,
|
|
47
|
+
name: e.description,
|
|
48
|
+
recurrenceDay: e.recurrence_day,
|
|
49
|
+
repeatingTransactionGuid: e.guid,
|
|
50
|
+
secondRecurrenceDay: e.second_recurrence_day,
|
|
51
|
+
status: _.Upcoming,
|
|
52
|
+
type: e.repeating_transaction_type === N.Income ? b.Income : b.Expense,
|
|
53
|
+
transaction: void 0
|
|
54
|
+
}, c = o.start, m = o.end;
|
|
55
|
+
switch (e.recurrence_type) {
|
|
56
|
+
case n.EveryWeek:
|
|
57
|
+
r.push(...R(u, c, m));
|
|
58
|
+
break;
|
|
59
|
+
case n.EveryOtherWeek:
|
|
60
|
+
r.push(...T(u, c, m));
|
|
61
|
+
break;
|
|
62
|
+
case n.TwiceAMonth:
|
|
63
|
+
r.push(...ee(u, c, m));
|
|
64
|
+
break;
|
|
65
|
+
case n.EveryMonth:
|
|
66
|
+
r.push(...te(u, c, m));
|
|
67
|
+
break;
|
|
68
|
+
case n.EveryOtherMonth:
|
|
69
|
+
r.push(...re(u, c, m));
|
|
70
|
+
break;
|
|
71
|
+
case n.EveryQuarter:
|
|
72
|
+
r.push(...se(u, c, m));
|
|
73
|
+
break;
|
|
74
|
+
case n.EveryOtherQuarter:
|
|
75
|
+
r.push(...oe(u, c, m));
|
|
76
|
+
break;
|
|
77
|
+
case n.EveryYear:
|
|
78
|
+
r.push(...ae(u, c, m));
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
for (const d of r) {
|
|
82
|
+
const v = e.transactions.find(
|
|
83
|
+
(k) => k.repeating_transaction_guid === e.guid && k.date > y(g(d.expectedDate, 5)) && k.date < y(W(d.expectedDate, 5))
|
|
84
|
+
);
|
|
85
|
+
v ? (d.transaction = v, d.status = _.Paid, d.occurredOnDate = U(v.date)) : i(d.expectedDate, g(O(), 3)) && (d.status = _.Missed);
|
|
86
|
+
}
|
|
87
|
+
return r;
|
|
88
|
+
}, R = (e, o, r) => {
|
|
89
|
+
const s = [];
|
|
90
|
+
let t = p(o, e.recurrenceDay);
|
|
91
|
+
for (; i(t, r); )
|
|
92
|
+
s.push({ ...e, expectedDate: t }), t = p(t, e.recurrenceDay);
|
|
93
|
+
return s;
|
|
94
|
+
}, T = (e, o, r) => {
|
|
95
|
+
const s = [];
|
|
96
|
+
let t = e.expectedDate;
|
|
97
|
+
if (i(t, o))
|
|
98
|
+
for (; i(t, o); )
|
|
99
|
+
t = M(t, 2);
|
|
100
|
+
else {
|
|
101
|
+
for (; f(t, o) || G(t, o); )
|
|
102
|
+
t = K(t, 2);
|
|
103
|
+
t = M(t, 2);
|
|
104
|
+
}
|
|
105
|
+
for (; i(t, r); )
|
|
106
|
+
s.push({ ...e, expectedDate: t }), t = W(t, 14);
|
|
107
|
+
return s;
|
|
108
|
+
}, ee = (e, o, r) => {
|
|
109
|
+
const s = [];
|
|
110
|
+
let t = D(o, e.recurrenceDay);
|
|
111
|
+
for (; i(t, r); )
|
|
112
|
+
s.push({ ...e, expectedDate: t }), t = l(t, 1);
|
|
113
|
+
let a = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? D(o, e.secondRecurrenceDay) : P(o);
|
|
114
|
+
for (; i(a, r); )
|
|
115
|
+
s.push({ ...e, expectedDate: a }), a = l(a, 1);
|
|
116
|
+
return s;
|
|
117
|
+
}, te = (e, o, r) => {
|
|
118
|
+
const s = [];
|
|
119
|
+
let t = D(o, e.recurrenceDay);
|
|
120
|
+
for (s.push({ ...e, expectedDate: t }), t = l(t, 1); i(t, r); )
|
|
121
|
+
s.push({ ...e, expectedDate: t }), t = l(t, 1);
|
|
122
|
+
return s;
|
|
123
|
+
}, re = (e, o, r) => {
|
|
124
|
+
const s = [], t = e.expectedDate;
|
|
125
|
+
let a = i(t, r) ? t : $(t, 2);
|
|
126
|
+
for (; i(a, r); )
|
|
127
|
+
f(a, o) && s.push({ ...e, expectedDate: a }), a = l(a, 2);
|
|
128
|
+
return s;
|
|
129
|
+
}, se = (e, o, r) => {
|
|
130
|
+
const s = [], t = e.expectedDate;
|
|
131
|
+
let a = i(t, r) ? t : A(t, 1);
|
|
132
|
+
for (; i(a, r); )
|
|
133
|
+
f(a, o) && s.push({ ...e, expectedDate: a }), a = Q(a, 1);
|
|
134
|
+
return s;
|
|
135
|
+
}, oe = (e, o, r) => {
|
|
136
|
+
const s = [], t = e.expectedDate;
|
|
137
|
+
let a = i(t, r) ? t : A(t, 2);
|
|
138
|
+
for (; i(a, r); )
|
|
139
|
+
f(a, o) && s.push({ ...e, expectedDate: a }), a = Q(a, 2);
|
|
140
|
+
return s;
|
|
141
|
+
}, ae = (e, o, r) => {
|
|
142
|
+
const s = [], t = e.expectedDate;
|
|
143
|
+
let a = i(t, r) ? t : C(t, 1);
|
|
144
|
+
for (; i(a, r); )
|
|
145
|
+
f(a, o) && s.push({ ...e, expectedDate: a }), a = B(a, 1);
|
|
146
|
+
return s;
|
|
147
|
+
}, Be = (e, o) => {
|
|
148
|
+
const r = [];
|
|
149
|
+
for (const s of e) {
|
|
150
|
+
const t = q(s, o);
|
|
151
|
+
r.push(...t);
|
|
152
|
+
}
|
|
153
|
+
return r.sort(
|
|
154
|
+
(s, t) => y(s.occurredOnDate || s.expectedDate) - y(t.occurredOnDate || t.expectedDate)
|
|
155
|
+
);
|
|
156
|
+
}, Ie = (e, o, r) => {
|
|
157
|
+
const s = [];
|
|
158
|
+
for (const t of o) {
|
|
159
|
+
const a = r.filter(
|
|
160
|
+
(u) => u.repeating_transaction_guid === t.guid
|
|
161
|
+
);
|
|
162
|
+
r.length > 0 && s.push({
|
|
163
|
+
...t,
|
|
164
|
+
account: e.find((u) => u.guid === t.account_guid),
|
|
165
|
+
transactions: a
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return s;
|
|
169
|
+
}, Ue = (e) => e.reduce((o, r) => {
|
|
170
|
+
const s = I(r.expectedDate, { representation: "date" }), t = o.find(
|
|
171
|
+
(a) => a.date.toString() === r.expectedDate.toString()
|
|
172
|
+
);
|
|
173
|
+
return t ? t.recurrences.push(r) : o.push({
|
|
174
|
+
date: r.expectedDate,
|
|
175
|
+
id: `date-${s}`,
|
|
176
|
+
recurrences: [r]
|
|
177
|
+
}), o;
|
|
178
|
+
}, []), Ge = (e, o, r) => {
|
|
179
|
+
const s = p(O(), o.recurrence_day), t = Y(O(), o.recurrence_day), a = w(o.recurrence_day), u = o.second_recurrence_day ? w(o.second_recurrence_day) : "";
|
|
180
|
+
let c = r ? h(e.monthly_ordinal, a) : e.monthly;
|
|
181
|
+
switch (o.recurrence_type) {
|
|
182
|
+
case n.EveryQuarter:
|
|
183
|
+
c = r ? h(e.quarterly_ordinal, a) : e.quarterly;
|
|
184
|
+
break;
|
|
185
|
+
case n.EveryWeek:
|
|
186
|
+
c = r ? h(
|
|
187
|
+
e.weekly_ordinal,
|
|
188
|
+
x(s, E.DAY_OF_WEEK)
|
|
189
|
+
) : e.weekly;
|
|
190
|
+
break;
|
|
191
|
+
case n.EveryYear:
|
|
192
|
+
c = r ? h(
|
|
193
|
+
e.anually_ordinal,
|
|
194
|
+
x(t, E.MONTH_DAY)
|
|
195
|
+
) : e.anually;
|
|
196
|
+
break;
|
|
197
|
+
case n.EveryOtherWeek:
|
|
198
|
+
c = r ? h(
|
|
199
|
+
e.every_other_week_ordinal,
|
|
200
|
+
x(s, E.DAY_OF_WEEK)
|
|
201
|
+
) : e.every_other_week;
|
|
202
|
+
break;
|
|
203
|
+
case n.EveryOtherMonth:
|
|
204
|
+
c = r ? h(e.every_other_month_ordinal, a) : e.every_other_month;
|
|
205
|
+
break;
|
|
206
|
+
case n.EveryOtherQuarter:
|
|
207
|
+
c = r ? h(e.every_other_quarter_ordinal, a) : e.every_other_quarter;
|
|
208
|
+
break;
|
|
209
|
+
case n.TwiceAMonth:
|
|
210
|
+
c = r ? h(e.twice_a_month_ordinal, a, u) : e.twice_a_month;
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
return c;
|
|
214
|
+
}, Pe = (e, o, r) => {
|
|
215
|
+
let s = o;
|
|
216
|
+
r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? s = L(o, r) : e === n.EveryYear ? s = Y(o, r) : s = D(o, r));
|
|
217
|
+
let t = s;
|
|
218
|
+
switch (e) {
|
|
219
|
+
case n.EveryWeek:
|
|
220
|
+
t = Z(s);
|
|
221
|
+
break;
|
|
222
|
+
case n.EveryOtherWeek:
|
|
223
|
+
t = X(s);
|
|
224
|
+
break;
|
|
225
|
+
case n.EveryMonth:
|
|
226
|
+
t = V(s);
|
|
227
|
+
break;
|
|
228
|
+
case n.EveryOtherMonth:
|
|
229
|
+
t = J(s);
|
|
230
|
+
break;
|
|
231
|
+
case n.EveryQuarter:
|
|
232
|
+
t = z(s);
|
|
233
|
+
break;
|
|
234
|
+
case n.EveryOtherQuarter:
|
|
235
|
+
t = j(s);
|
|
236
|
+
break;
|
|
237
|
+
case n.EveryYear:
|
|
238
|
+
t = H(s);
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
return t;
|
|
242
|
+
};
|
|
243
|
+
export {
|
|
244
|
+
n as F,
|
|
245
|
+
N as R,
|
|
246
|
+
Pe as a,
|
|
247
|
+
b,
|
|
248
|
+
_ as c,
|
|
249
|
+
Ue as d,
|
|
250
|
+
Ie as e,
|
|
251
|
+
Be as f,
|
|
252
|
+
Ge as g
|
|
253
|
+
};
|