@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as r, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import p from "@mui/material/Avatar";
|
|
3
|
+
import s from "@mui/material/ListItem";
|
|
4
|
+
import c from "@mui/material/ListItemAvatar";
|
|
5
|
+
import h from "@mui/material/ListItemButton";
|
|
6
|
+
import u from "@mui/material/ListItemIcon";
|
|
7
|
+
import f from "@mui/material/ListItemText";
|
|
8
|
+
import { Icon as l } from "@mxenabled/mxui";
|
|
9
|
+
import g from "@mui/material/MenuItem";
|
|
10
|
+
import x from "@mui/material/TextField";
|
|
11
|
+
import { ExpandMore as y } from "@mxenabled/mx-icons";
|
|
12
|
+
const D = ({ iconName: a, label: n, onClick: t, value: i }) => {
|
|
13
|
+
const o = /* @__PURE__ */ m(d, { children: [
|
|
14
|
+
/* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(p, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ r(l, { name: a, sx: { color: "text.primary" } }) }) }),
|
|
15
|
+
/* @__PURE__ */ r(
|
|
16
|
+
f,
|
|
17
|
+
{
|
|
18
|
+
primary: n,
|
|
19
|
+
primaryTypographyProps: { variant: "caption" },
|
|
20
|
+
secondary: i,
|
|
21
|
+
secondaryTypographyProps: { color: "text.default", variant: "body1", fontWeight: 600 }
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] });
|
|
25
|
+
return t ? /* @__PURE__ */ r(s, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ m(h, { onClick: t, children: [
|
|
26
|
+
o,
|
|
27
|
+
/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(l, { name: "chevron_right", size: 24 }) })
|
|
28
|
+
] }) }) : /* @__PURE__ */ r(s, { disableGutters: !1, disablePadding: !1, children: o });
|
|
29
|
+
}, F = ({ label: a, onChange: n, options: t, value: i, ...o }) => /* @__PURE__ */ r(
|
|
30
|
+
x,
|
|
31
|
+
{
|
|
32
|
+
InputLabelProps: { shrink: !0 },
|
|
33
|
+
SelectProps: {
|
|
34
|
+
IconComponent: (e) => /* @__PURE__ */ r(y, { size: 20, sx: { mr: 4 }, ...e })
|
|
35
|
+
},
|
|
36
|
+
defaultValue: 0,
|
|
37
|
+
label: a,
|
|
38
|
+
onChange: (e) => {
|
|
39
|
+
n(Number(e.target.value));
|
|
40
|
+
},
|
|
41
|
+
select: !0,
|
|
42
|
+
value: i,
|
|
43
|
+
variant: "outlined",
|
|
44
|
+
...o,
|
|
45
|
+
children: t.map((e) => /* @__PURE__ */ r(g, { value: e.id, children: e.label }, e.id))
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
export {
|
|
49
|
+
D,
|
|
50
|
+
F as S
|
|
51
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c from "@mui/material/Box";
|
|
3
|
+
import n from "@mui/material/FormControlLabel";
|
|
4
|
+
import s from "@mui/material/Radio";
|
|
5
|
+
import d from "@mui/material/styles/useTheme";
|
|
6
|
+
import b from "@mui/material/Tooltip";
|
|
7
|
+
const C = ({
|
|
8
|
+
checked: r = !1,
|
|
9
|
+
label: t,
|
|
10
|
+
sx: l = {},
|
|
11
|
+
tooltip: i = "",
|
|
12
|
+
value: a
|
|
13
|
+
}) => {
|
|
14
|
+
const o = d(), p = o.palette.mode === "light" ? o.palette.grey[400] : o.palette.grey[700], m = r ? o.palette.action.active : p;
|
|
15
|
+
return /* @__PURE__ */ e(
|
|
16
|
+
c,
|
|
17
|
+
{
|
|
18
|
+
bgcolor: "background.paper",
|
|
19
|
+
border: `${r ? 3 : 1}px solid`,
|
|
20
|
+
borderColor: m,
|
|
21
|
+
borderRadius: 2,
|
|
22
|
+
mt: -2,
|
|
23
|
+
mx: 8,
|
|
24
|
+
pr: 8,
|
|
25
|
+
py: 4,
|
|
26
|
+
sx: { "&:hover": { borderColor: o.palette.action.active }, ...l },
|
|
27
|
+
children: /* @__PURE__ */ e(b, { title: i, children: /* @__PURE__ */ e(
|
|
28
|
+
n,
|
|
29
|
+
{
|
|
30
|
+
control: /* @__PURE__ */ e(
|
|
31
|
+
s,
|
|
32
|
+
{
|
|
33
|
+
disableRipple: !0,
|
|
34
|
+
sx: { "&.Mui-checked": { color: o.palette.action.active } }
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
label: t,
|
|
38
|
+
labelPlacement: "start",
|
|
39
|
+
sx: { ml: 0, pl: 8 },
|
|
40
|
+
value: a
|
|
41
|
+
}
|
|
42
|
+
) })
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
C as S
|
|
48
|
+
};
|
|
@@ -3,8 +3,8 @@ 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 {
|
|
7
|
-
import { f as m, D as T } from "./DateFormats-
|
|
6
|
+
import { C as a, P as l } from "./Category-DEKZGLYe.mjs";
|
|
7
|
+
import { f as m, D as T } from "./DateFormats-BSktnUw6.mjs";
|
|
8
8
|
const i = (e) => (e.top_level_category_guid === a.INCOME || e.category_guid === a.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 === a.TRANSFER || e.category_guid === a.TRANSFER, h = (e) => e.top_level_category_guid === a.INVESTMENTS || e.category_guid === a.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
10
|
const o = (e - r) / r;
|
|
@@ -19,10 +19,10 @@ const i = (e) => (e.top_level_category_guid === a.INCOME || e.category_guid ===
|
|
|
19
19
|
y: e.filter((n) => n.year === t.getFullYear() && n.month === t.getMonth() + 1).reduce((n, c) => n + c.total, 0)
|
|
20
20
|
}), t = u(t, 1);
|
|
21
21
|
return o;
|
|
22
|
-
},
|
|
22
|
+
}, A = (e, r) => {
|
|
23
23
|
const o = e.filter(i);
|
|
24
24
|
return g(o, r).map((t) => ({ ...t, y: Math.abs(t.y) }));
|
|
25
|
-
},
|
|
25
|
+
}, b = (e, r) => {
|
|
26
26
|
const o = e.filter(p);
|
|
27
27
|
return g(o, r).map((t) => ({ ...t, y: Math.abs(t.y) }));
|
|
28
28
|
}, x = (e, r) => {
|
|
@@ -42,12 +42,12 @@ const i = (e) => (e.top_level_category_guid === a.INCOME || e.category_guid ===
|
|
|
42
42
|
return r;
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
b as a,
|
|
46
46
|
x as b,
|
|
47
47
|
w as c,
|
|
48
48
|
C as d,
|
|
49
49
|
H as e,
|
|
50
50
|
F as f,
|
|
51
|
-
|
|
51
|
+
A as g,
|
|
52
52
|
i
|
|
53
53
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { g as _ } from "./TransactionUtils-CvJW9wDu.mjs";
|
|
2
|
+
import { C as p } from "./Category-DEKZGLYe.mjs";
|
|
3
3
|
import { jsxs as f, Fragment as N, jsx as d } from "react/jsx-runtime";
|
|
4
4
|
import T from "react";
|
|
5
5
|
import { observer as k } from "mobx-react-lite";
|
|
@@ -10,9 +10,9 @@ import { useTheme as M } from "@mui/material/styles";
|
|
|
10
10
|
import { CategoryIcon as G, CategoryIconVariants as O, Text as y, P as $ } from "@mxenabled/mxui";
|
|
11
11
|
import { D as j } from "./Donut-SzzfZDHF.mjs";
|
|
12
12
|
import { u as R } from "./useAriaLive-MkYebyUR.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { f as b } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
14
|
+
import { u as v } from "./hooks-BaO_gOI6.mjs";
|
|
14
15
|
import { u as V } from "./useScreenSize-CeFhWTt_.mjs";
|
|
15
|
-
import { f as b } from "./NumberFormatting-CyrvFgfd.mjs";
|
|
16
16
|
const D = 5, B = (i, l, g, m) => m.reduce((o, n) => {
|
|
17
17
|
const a = i.find((s) => s.guid === n.category_guid);
|
|
18
18
|
if (!a) return o;
|
|
@@ -14,39 +14,39 @@ import { endOfMonth as Be } from "date-fns/endOfMonth";
|
|
|
14
14
|
import { getUnixTime as Ie } from "date-fns/getUnixTime";
|
|
15
15
|
import { isBefore as je } from "date-fns/isBefore";
|
|
16
16
|
import { startOfMonth as De } from "date-fns/startOfMonth";
|
|
17
|
-
import {
|
|
17
|
+
import { a as qe, i as Qe } from "./BudgetUtil-CGchXaek.mjs";
|
|
18
18
|
import me from "@mui/material/Button";
|
|
19
|
-
import
|
|
19
|
+
import Xe from "@mui/material/FormGroup";
|
|
20
20
|
import ue from "@mui/material/IconButton";
|
|
21
21
|
import $e from "@mui/material/TextField";
|
|
22
22
|
import { u as xe } from "./useAriaLive-MkYebyUR.mjs";
|
|
23
|
-
import { O as C } from "./
|
|
24
|
-
import { u as O, h as R,
|
|
23
|
+
import { b as Ze, T as Je, u as re, O as C, c as et, d as tt, E as at, C as rt } from "./EmbeddedCard-CAY_HJjE.mjs";
|
|
24
|
+
import { u as O, h as R, o as nt, d as ot, l as we, g as G, b as it, C as st } from "./hooks-BaO_gOI6.mjs";
|
|
25
25
|
import { A as Y } from "./Analytics-CzGzz_sE.mjs";
|
|
26
|
-
import
|
|
27
|
-
import { ChevronRight as Ke, Icon as P, Delete as fe, Cancel as Se, Search as
|
|
26
|
+
import lt from "@mui/material/ToggleButton";
|
|
27
|
+
import { ChevronRight as Ke, Icon as P, Delete as fe, Cancel as Se, Search as ct, Edit as dt, Flag as ut } from "@mxenabled/mx-icons";
|
|
28
28
|
import { fromUnixTime as ve } from "date-fns/fromUnixTime";
|
|
29
29
|
import j from "@mui/material/Avatar";
|
|
30
30
|
import U from "@mui/material/ListItem";
|
|
31
31
|
import q from "@mui/material/ListItemAvatar";
|
|
32
32
|
import z from "@mui/material/ListItemText";
|
|
33
|
-
import { f as Me, D as Re } from "./DateFormats-
|
|
34
|
-
import { BarChart as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { b as E } from "./Localization-CkQ49EKr.mjs";
|
|
33
|
+
import { f as Me, D as Re } from "./DateFormats-BSktnUw6.mjs";
|
|
34
|
+
import { BarChart as mt } from "@mui/x-charts";
|
|
35
|
+
import { f as V } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
36
|
+
import { b as E } from "./Localization-Li21_krp.mjs";
|
|
37
|
+
import { L as _t } from "./Loader-CxeBwuPG.mjs";
|
|
39
38
|
import Q from "@mui/material/ListItemButton";
|
|
40
39
|
import X from "@mui/material/ListItemIcon";
|
|
41
|
-
import { b as Fe } from "./CategorySelectorDrawer-
|
|
40
|
+
import { b as Fe } from "./CategorySelectorDrawer-nHEBR24E.mjs";
|
|
42
41
|
import { D as ae } from "./Dialog-iLlBR8TG.mjs";
|
|
43
42
|
import { D as _e } from "./Drawer-XPaLYjiO.mjs";
|
|
43
|
+
import { b as pt, C as gt, a as ht } from "./CurrencyDialog-C7r7JqVu.mjs";
|
|
44
44
|
import yt from "@mui/material/styles/useTheme";
|
|
45
45
|
import Pe from "@mui/material/InputAdornment";
|
|
46
46
|
import Tt from "@mui/material/Checkbox";
|
|
47
|
-
import { j as bt } from "./DateUtil-
|
|
47
|
+
import { j as bt } from "./DateUtil-Bdm-ZxFw.mjs";
|
|
48
48
|
import Ne from "@mui/material/Grid";
|
|
49
|
-
import { C as Ct } from "./CurrencyInput-
|
|
49
|
+
import { C as Ct } from "./CurrencyInput-BUd8mAcE.mjs";
|
|
50
50
|
import ft from "@mui/material/Switch";
|
|
51
51
|
var de = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(de || {}), ie = /* @__PURE__ */ ((t) => (t[t.MerchantBudget = 0] = "MerchantBudget", t[t.SplitTransaction = 1] = "SplitTransaction", t[t.HideTransaction = 2] = "HideTransaction", t[t.MerchantLogo = 3] = "MerchantLogo", t))(ie || {});
|
|
52
52
|
const St = [
|
|
@@ -99,7 +99,7 @@ const St = [
|
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
101
|
/* @__PURE__ */ e(
|
|
102
|
-
|
|
102
|
+
Ze,
|
|
103
103
|
{
|
|
104
104
|
amount: /* @__PURE__ */ m(L, { sx: { alignItems: "baseline", flexDirection: "row", gap: 4 }, children: [
|
|
105
105
|
/* @__PURE__ */ e(We, { children: V(s, "0,0.00") }),
|
|
@@ -179,7 +179,7 @@ const St = [
|
|
|
179
179
|
totalTransaction: d
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
|
-
/* @__PURE__ */ e(
|
|
182
|
+
/* @__PURE__ */ e(Je, {}),
|
|
183
183
|
o?.()
|
|
184
184
|
]
|
|
185
185
|
}
|
|
@@ -194,7 +194,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
194
194
|
getMerchantBudgetByMerchantGuid: I,
|
|
195
195
|
alert: M,
|
|
196
196
|
setAlert: B
|
|
197
|
-
} =
|
|
197
|
+
} = nt(), { setFilter: k } = R(), { accounts: f } = ot(), x = u.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: y, common: Z } = O(), { announce: se, ariaLive: le } = xe(), [te, $] = l.useState(!1), b = t?.merchant_guid ? I(t.merchant_guid) : void 0, K = () => {
|
|
198
198
|
d(r), s(null), n("");
|
|
199
199
|
}, ne = () => {
|
|
200
200
|
b ? $(!0) : s(
|
|
@@ -329,7 +329,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
329
329
|
}
|
|
330
330
|
),
|
|
331
331
|
r && /* @__PURE__ */ e(
|
|
332
|
-
|
|
332
|
+
pt,
|
|
333
333
|
{
|
|
334
334
|
closeAriaLabel: Z.close_aria,
|
|
335
335
|
content: F[r].content,
|
|
@@ -474,7 +474,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
474
474
|
secondaryText: n.cancel_button,
|
|
475
475
|
title: o.date_edit_title,
|
|
476
476
|
children: /* @__PURE__ */ e(L, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
|
|
477
|
-
|
|
477
|
+
gt,
|
|
478
478
|
{
|
|
479
479
|
beginDate: ve(d),
|
|
480
480
|
copy: {
|
|
@@ -483,7 +483,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
483
483
|
today: n.date_range_picker.today
|
|
484
484
|
},
|
|
485
485
|
onDateSelected: p,
|
|
486
|
-
selectionType:
|
|
486
|
+
selectionType: ht.Single
|
|
487
487
|
}
|
|
488
488
|
) })
|
|
489
489
|
}
|
|
@@ -1068,7 +1068,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1068
1068
|
Le,
|
|
1069
1069
|
{
|
|
1070
1070
|
InputProps: {
|
|
1071
|
-
startAdornment: /* @__PURE__ */ e(Pe, { position: "start", children: /* @__PURE__ */ e(
|
|
1071
|
+
startAdornment: /* @__PURE__ */ e(Pe, { position: "start", children: /* @__PURE__ */ e(ct, { color: "disabled" }) }),
|
|
1072
1072
|
endAdornment: /* @__PURE__ */ e(Pe, { position: "end", sx: { padding: 0 }, children: r ? n : null })
|
|
1073
1073
|
},
|
|
1074
1074
|
"aria-label": s.search_aria,
|
|
@@ -1106,7 +1106,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1106
1106
|
"aria-label": `Edit ${s.name} tag`,
|
|
1107
1107
|
color: "secondary",
|
|
1108
1108
|
onClick: f,
|
|
1109
|
-
children: /* @__PURE__ */ e(
|
|
1109
|
+
children: /* @__PURE__ */ e(dt, { color: "secondary" })
|
|
1110
1110
|
}
|
|
1111
1111
|
),
|
|
1112
1112
|
/* @__PURE__ */ e(
|
|
@@ -1268,7 +1268,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1268
1268
|
};
|
|
1269
1269
|
return /* @__PURE__ */ m(W, { className: "mx-txn-transaction-description", children: [
|
|
1270
1270
|
_,
|
|
1271
|
-
c ? /* @__PURE__ */ m(
|
|
1271
|
+
c ? /* @__PURE__ */ m(Xe, { row: !0, children: [
|
|
1272
1272
|
/* @__PURE__ */ e(
|
|
1273
1273
|
$e,
|
|
1274
1274
|
{
|
|
@@ -1320,7 +1320,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1320
1320
|
a(Y.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
|
|
1321
1321
|
};
|
|
1322
1322
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1323
|
-
|
|
1323
|
+
lt,
|
|
1324
1324
|
{
|
|
1325
1325
|
"aria-label": s.flag_btn_aria,
|
|
1326
1326
|
"aria-pressed": t.is_flagged,
|
|
@@ -1344,7 +1344,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
},
|
|
1346
1346
|
value: "flagged",
|
|
1347
|
-
children: /* @__PURE__ */ e(
|
|
1347
|
+
children: /* @__PURE__ */ e(ut, { color: "inherit" })
|
|
1348
1348
|
}
|
|
1349
1349
|
) });
|
|
1350
1350
|
}, ra = w(aa), ge = (t, r, s, a = !0, n = "inset") => a ? /* @__PURE__ */ m(l.Fragment, { children: [
|
|
@@ -1434,7 +1434,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1434
1434
|
height: a
|
|
1435
1435
|
},
|
|
1436
1436
|
children: /* @__PURE__ */ e(
|
|
1437
|
-
|
|
1437
|
+
mt,
|
|
1438
1438
|
{
|
|
1439
1439
|
axisHighlight: {
|
|
1440
1440
|
x: "none",
|
|
@@ -1495,7 +1495,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1495
1495
|
if (r)
|
|
1496
1496
|
switch (r.template) {
|
|
1497
1497
|
case sa.BILL_AMOUNT_NOT_STANDARD: {
|
|
1498
|
-
const s = r.data_series ?
|
|
1498
|
+
const s = r.data_series ? et(r.data_series) : [], a = tt(s, r.payload?.merchant_name);
|
|
1499
1499
|
return {
|
|
1500
1500
|
instanceSlot: /* @__PURE__ */ e(
|
|
1501
1501
|
ia,
|
|
@@ -1519,7 +1519,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1519
1519
|
topActions: s = St,
|
|
1520
1520
|
transaction: a
|
|
1521
1521
|
}) => {
|
|
1522
|
-
const { onEvent: n } = G(), { isCopyLoaded: o } =
|
|
1522
|
+
const { onEvent: n } = G(), { isCopyLoaded: o } = it(), { userFeatures: i } = st(), { accounts: _, common: c, insights_feed: d } = O(), { detailedCategories: u } = we(), {
|
|
1523
1523
|
alert: p,
|
|
1524
1524
|
associatedBeats: g,
|
|
1525
1525
|
detailedTransactions: h,
|
|
@@ -1557,8 +1557,8 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1557
1557
|
return h.filter((ce) => ce.date >= Ie(J) && ce.date <= Ie(pe) && ce.guid === T);
|
|
1558
1558
|
}, [K, b, h, x]);
|
|
1559
1559
|
if (!o)
|
|
1560
|
-
return /* @__PURE__ */ e(
|
|
1561
|
-
const v =
|
|
1560
|
+
return /* @__PURE__ */ e(_t, {});
|
|
1561
|
+
const v = Qe(i, "MX_TXN_DETAILS_VIEW_ONLY"), S = le.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1562
1562
|
return /* @__PURE__ */ m(W, { className: "mx-txn-transaction-details", width: "100%", children: [
|
|
1563
1563
|
a && /* @__PURE__ */ m(L, { children: [
|
|
1564
1564
|
/* @__PURE__ */ m(L, { gap: 12, p: 24, children: [
|
|
@@ -1579,7 +1579,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1579
1579
|
!v && r && /* @__PURE__ */ e(ra, { transaction: a })
|
|
1580
1580
|
] }),
|
|
1581
1581
|
b?.instanceSlot && /* @__PURE__ */ e(
|
|
1582
|
-
|
|
1582
|
+
at,
|
|
1583
1583
|
{
|
|
1584
1584
|
callToAction: b.callToAction,
|
|
1585
1585
|
description: E(
|
|
@@ -1634,7 +1634,7 @@ const Dt = w(({ transaction: t }) => {
|
|
|
1634
1634
|
] })
|
|
1635
1635
|
] }),
|
|
1636
1636
|
$ && b && /* @__PURE__ */ e(
|
|
1637
|
-
|
|
1637
|
+
rt,
|
|
1638
1638
|
{
|
|
1639
1639
|
ariaLabel: Me(
|
|
1640
1640
|
b?.dataSeries[K]?.date,
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { format as h } from "date-fns/format";
|
|
2
|
+
import { startOfMonth as M } from "date-fns/startOfMonth";
|
|
3
|
+
import { startOfToday as N } from "date-fns/startOfToday";
|
|
4
|
+
import { subMonths as L } from "date-fns/subMonths";
|
|
5
|
+
import { CategoryIconList as P } from "@mxenabled/mxui";
|
|
6
|
+
import { c as U, a as G, C as S, b as w } from "./Category-DEKZGLYe.mjs";
|
|
7
|
+
import { f as _, D as m, O as H } from "./DateFormats-BSktnUw6.mjs";
|
|
8
|
+
import { endOfToday as B } from "date-fns/endOfToday";
|
|
9
|
+
import { fromUnixTime as I } from "date-fns/fromUnixTime";
|
|
10
|
+
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
11
|
+
import { f as F } from "./NumberFormatting-Dnk0YyfZ.mjs";
|
|
12
|
+
var A = /* @__PURE__ */ ((e) => (e[e.CREDIT = 1] = "CREDIT", e[e.DEBIT = 2] = "DEBIT", e))(A || {}), C = /* @__PURE__ */ ((e) => (e[e.POSTED = 1] = "POSTED", e[e.PENDING = 2] = "PENDING", e))(C || {});
|
|
13
|
+
const j = 3, D = 12, ue = (e, t, n, o) => e.filter((r) => !r.parent_guid).map(
|
|
14
|
+
(r) => v(
|
|
15
|
+
r,
|
|
16
|
+
t,
|
|
17
|
+
n,
|
|
18
|
+
o,
|
|
19
|
+
e.filter((d) => d.parent_guid === r.guid)
|
|
20
|
+
)
|
|
21
|
+
), ce = (e, t) => {
|
|
22
|
+
const n = P.find((o) => o.guid === e);
|
|
23
|
+
return n ? t.palette.categories[n.colorName] || "" : t.palette.categories.uncategorized || "";
|
|
24
|
+
}, v = (e, t, n, o, r = []) => {
|
|
25
|
+
const d = e.guid, i = e.parent_guid || d, a = d === i, s = n.find((f) => f.category_guid === d)?.total || 0, u = b(
|
|
26
|
+
o.filter((f) => f.category_guid === d)
|
|
27
|
+
), g = b(
|
|
28
|
+
o.filter(
|
|
29
|
+
(f) => f.category_guid === d || f.top_level_category_guid === d
|
|
30
|
+
)
|
|
31
|
+
), c = r.map(
|
|
32
|
+
(f) => v(f, t, n, o)
|
|
33
|
+
), p = c.reduce(
|
|
34
|
+
(f, R) => f + R.currentAmount,
|
|
35
|
+
s
|
|
36
|
+
), T = t.default_categories[e.guid] ? t.default_categories[e.guid].replace(/&/g, "&") : e.name;
|
|
37
|
+
return {
|
|
38
|
+
...e,
|
|
39
|
+
currentAmount: s,
|
|
40
|
+
averageAmount: E(u),
|
|
41
|
+
color: G[i],
|
|
42
|
+
icon: U[i],
|
|
43
|
+
isTransfer: i === S.TRANSFER,
|
|
44
|
+
monthlyAmounts: u,
|
|
45
|
+
name: T,
|
|
46
|
+
subCategories: c,
|
|
47
|
+
totalAmount: a ? p : 0,
|
|
48
|
+
totalAverageAmount: E(g),
|
|
49
|
+
totalMonthlyAmounts: a ? g : []
|
|
50
|
+
};
|
|
51
|
+
}, le = (e, t) => e.map((n) => {
|
|
52
|
+
const o = t.filter(
|
|
53
|
+
(r) => r.category_guid === n.guid || r.top_level_category_guid === n.guid
|
|
54
|
+
);
|
|
55
|
+
return {
|
|
56
|
+
...n,
|
|
57
|
+
transactions: o
|
|
58
|
+
};
|
|
59
|
+
}), E = (e, t = j) => {
|
|
60
|
+
const n = t > history.length ? history.length : t;
|
|
61
|
+
return Math.ceil(
|
|
62
|
+
Math.max(
|
|
63
|
+
0,
|
|
64
|
+
e.slice(-n).reduce((o, r) => o + r.amount, 0) / n
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
}, b = (e) => {
|
|
68
|
+
const t = [], n = N();
|
|
69
|
+
for (let o = 0; o <= D; o++) {
|
|
70
|
+
const r = M(L(n, D - o)), i = e.filter(
|
|
71
|
+
(a) => a.year_month === Number(h(r, "yyyyMM"))
|
|
72
|
+
).reduce((a, s) => a + s.total, 0);
|
|
73
|
+
t.push({
|
|
74
|
+
amount: i,
|
|
75
|
+
isoDate: h(r, "yyyy-MM-dd"),
|
|
76
|
+
label: _(r, m.MONTH_YEAR)
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return t;
|
|
80
|
+
}, ge = (e, t) => e.find((n) => n.guid === t), fe = (e, t) => {
|
|
81
|
+
const n = e.find((o) => o.subCategories.find((r) => r.guid === t));
|
|
82
|
+
if (n)
|
|
83
|
+
return n.subCategories.find((o) => o.guid === t);
|
|
84
|
+
}, Y = {
|
|
85
|
+
ASC: "ASC",
|
|
86
|
+
DESC: "DESC"
|
|
87
|
+
}, _e = {
|
|
88
|
+
account_guid: "",
|
|
89
|
+
amount: 0,
|
|
90
|
+
currency_code: "",
|
|
91
|
+
date: 0,
|
|
92
|
+
description: "",
|
|
93
|
+
duplicate: !1,
|
|
94
|
+
feed_description: "",
|
|
95
|
+
feed_status: C.POSTED,
|
|
96
|
+
feed_transaction_date: 0,
|
|
97
|
+
has_been_split: !1,
|
|
98
|
+
has_been_viewed: !1,
|
|
99
|
+
is_cleared: !1,
|
|
100
|
+
is_flagged: !1,
|
|
101
|
+
is_hidden: !1,
|
|
102
|
+
is_manual: !0,
|
|
103
|
+
is_personal: !0,
|
|
104
|
+
is_reimbursable: !1,
|
|
105
|
+
is_subscription: !1,
|
|
106
|
+
is_void: !1,
|
|
107
|
+
revision: 1,
|
|
108
|
+
transaction_type: A.DEBIT,
|
|
109
|
+
user_guid: "",
|
|
110
|
+
is_duplicate: !1,
|
|
111
|
+
feed_transacted_at: 0,
|
|
112
|
+
guid: "",
|
|
113
|
+
memo: void 0,
|
|
114
|
+
tags: []
|
|
115
|
+
}, O = {
|
|
116
|
+
DATE: "date",
|
|
117
|
+
AMOUNT: "amount"
|
|
118
|
+
}, me = (e, t, n, o = []) => {
|
|
119
|
+
const r = t.reduce((a, s) => ({ ...a, [s.guid]: s }), {}), d = n.reduce((a, s) => ({ ...a, [s.guid]: s }), {}), i = o.reduce((a, s) => {
|
|
120
|
+
const { transaction_guid: u, tag_guid: g } = s;
|
|
121
|
+
if (!a[u])
|
|
122
|
+
return {
|
|
123
|
+
...a,
|
|
124
|
+
[u]: [g]
|
|
125
|
+
};
|
|
126
|
+
const c = [...a[u], g];
|
|
127
|
+
return {
|
|
128
|
+
...a,
|
|
129
|
+
[u]: c
|
|
130
|
+
};
|
|
131
|
+
}, {});
|
|
132
|
+
return e.map((a) => {
|
|
133
|
+
const s = r[a.account_guid], u = a.category_guid ? d[a.category_guid] : null, g = i[a.guid] ?? [];
|
|
134
|
+
return {
|
|
135
|
+
...a,
|
|
136
|
+
account: s?.user_name || "Unknown",
|
|
137
|
+
accountIsClosed: s?.is_closed,
|
|
138
|
+
accountIsHidden: s?.is_hidden,
|
|
139
|
+
category: u?.name || "Uncategorized",
|
|
140
|
+
isIncome: a.top_level_category_guid === S.INCOME,
|
|
141
|
+
isPending: a.feed_status === C.PENDING,
|
|
142
|
+
number: s?.account_number || "",
|
|
143
|
+
payee: a.description,
|
|
144
|
+
tags: g
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
}, x = "uncategorized", pe = (e, t, n, o, r, d) => {
|
|
148
|
+
const i = k(e, r, d), a = V(i, n, o);
|
|
149
|
+
return t.forEach((s) => {
|
|
150
|
+
const u = a.findIndex((c) => c.guid === s), g = d.filter((c) => c.parent_guid === s);
|
|
151
|
+
a.splice(u + 1, 0, ...g);
|
|
152
|
+
}), a;
|
|
153
|
+
}, k = (e, t, n) => {
|
|
154
|
+
const {
|
|
155
|
+
accounts: o = [],
|
|
156
|
+
dateRange: r = { start: M(N()), end: B() },
|
|
157
|
+
custom: d = () => !0,
|
|
158
|
+
searchTerm: i = "",
|
|
159
|
+
showSplits: a = !1
|
|
160
|
+
} = e;
|
|
161
|
+
return n.filter((s) => a ? !s.has_been_split : !s.parent_guid).filter((s) => !!o.find((u) => u === s.account_guid)).filter((s) => s.date >= y(r.start) && s.date <= y(r.end)).filter(d).filter((s) => {
|
|
162
|
+
if (i === x && s.has_been_split)
|
|
163
|
+
return !1;
|
|
164
|
+
if (/^spl/i.test(i) && (s.has_been_split || s.parent_guid))
|
|
165
|
+
return !0;
|
|
166
|
+
const g = s.tags.some(
|
|
167
|
+
(p) => l(i, t.find((T) => T.guid === p)?.name)
|
|
168
|
+
), c = I(s.date);
|
|
169
|
+
return l(i, s.payee) || l(i, s.feed_description) || l(i, s.category) || l(i, _(c, m.MONTH)) || l(i, _(c, m.DAY)) || l(i, _(c, m.FULL_MONTH_DAY)) || l(i, _(c, m.MONTH_DAY_YEAR)) || l(i, h(c, H)) || l(i, s.account) || l(i, F(s.amount, "0,0.00")) || l(i, s.memo) || g;
|
|
170
|
+
});
|
|
171
|
+
}, V = (e, t, n) => [...e].sort((o, r) => {
|
|
172
|
+
const d = t, i = (o[d] || "") > (r[d] || "");
|
|
173
|
+
let a = i ? -1 : 1, s = i ? 1 : -1;
|
|
174
|
+
return (t === O.DATE || t === O.AMOUNT) && (a = i ? 1 : -1, s = i ? -1 : 1), n === Y.ASC ? a : s;
|
|
175
|
+
}), l = (e, t) => {
|
|
176
|
+
const n = e.toLowerCase().split(" "), o = t?.toString().toLowerCase() ?? "";
|
|
177
|
+
return n.every((r) => o.indexOf(r) > -1);
|
|
178
|
+
};
|
|
179
|
+
function z(e) {
|
|
180
|
+
return new Set(
|
|
181
|
+
e.filter((t) => t.parent_guid !== void 0).map((t) => t.parent_guid)
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
function W(e) {
|
|
185
|
+
return e.reduce((t, n) => (n.parent_guid && (t[n.parent_guid] || (t[n.parent_guid] = []), t[n.parent_guid].push(n)), t), {});
|
|
186
|
+
}
|
|
187
|
+
function Te(e, t) {
|
|
188
|
+
const n = z(t), o = W(t), r = /* @__PURE__ */ new Set(), d = [];
|
|
189
|
+
for (const i of e)
|
|
190
|
+
n.has(i.guid) ? (o[i.guid] ?? []).slice().sort((s, u) => Math.abs(u.amount) - Math.abs(s.amount)).forEach((s) => {
|
|
191
|
+
r.has(s.guid) || (d.push(s), r.add(s.guid));
|
|
192
|
+
}) : r.has(i.guid) || (d.push(i), r.add(i.guid));
|
|
193
|
+
return d;
|
|
194
|
+
}
|
|
195
|
+
const he = (e, t) => {
|
|
196
|
+
const n = q($(e, t)), o = new Blob([n], { type: "text/csv;charset=utf-8;" }), r = document.createElement("a");
|
|
197
|
+
r.href = URL.createObjectURL(o), r.setAttribute("download", "transactions.csv"), document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(r.href);
|
|
198
|
+
}, $ = (e, t) => e.map((n) => ({
|
|
199
|
+
Date: _(I(n.date), m.YEAR_MONTH_DAY),
|
|
200
|
+
Description: J(n),
|
|
201
|
+
"Original Description": n.feed_description,
|
|
202
|
+
Amount: `${n.amount}`,
|
|
203
|
+
Type: n.transaction_type === A.CREDIT ? "Credit" : "Debit",
|
|
204
|
+
"Parent Category": w[n.top_level_category_guid || ""],
|
|
205
|
+
Category: n.category,
|
|
206
|
+
Account: n.account,
|
|
207
|
+
Tags: K(n, t),
|
|
208
|
+
Memo: n.memo,
|
|
209
|
+
Pending: n.isPending ? "TRUE" : "FALSE"
|
|
210
|
+
})), Z = (e) => e ? /[,"\n\r]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e : "", q = (e) => {
|
|
211
|
+
const t = Object.keys(e[0]).join(",").concat(`\r
|
|
212
|
+
`), n = e.map((o) => Object.values(o).map(Z).join(",")).join(`\r
|
|
213
|
+
`);
|
|
214
|
+
return t + n;
|
|
215
|
+
}, J = (e) => {
|
|
216
|
+
let t = e.parent_guid ? "Split: " : "";
|
|
217
|
+
return t += e.is_hidden ? "(Excluded) " : "", t += e.description, t;
|
|
218
|
+
}, K = (e, t) => e.tags.map((n) => t.filter((r) => r.guid === n)[0]?.name ?? "").join(" ");
|
|
219
|
+
export {
|
|
220
|
+
O as C,
|
|
221
|
+
_e as D,
|
|
222
|
+
A as T,
|
|
223
|
+
fe as a,
|
|
224
|
+
ue as b,
|
|
225
|
+
le as c,
|
|
226
|
+
Y as d,
|
|
227
|
+
he as e,
|
|
228
|
+
ge as f,
|
|
229
|
+
ce as g,
|
|
230
|
+
me as h,
|
|
231
|
+
Te as i,
|
|
232
|
+
C as j,
|
|
233
|
+
pe as s
|
|
234
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { C as b, a as p, b as d } from "./Category-DEKZGLYe.mjs";
|
|
2
|
+
const _ = (e) => p[e] ?? p.default, f = (e) => d[e];
|
|
3
|
+
function C(e, t) {
|
|
4
|
+
const o = [], a = new Date(e);
|
|
5
|
+
for (; a <= t; ) {
|
|
6
|
+
const r = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0");
|
|
7
|
+
o.push(+`${r}${n}`), a.setMonth(a.getMonth() + 1);
|
|
8
|
+
}
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
const M = (e) => e.reduce((t, o) => {
|
|
12
|
+
const a = {
|
|
13
|
+
top_level_category_guid: o.top_level_category_guid,
|
|
14
|
+
category_guid: o.category_guid,
|
|
15
|
+
amount: o.total,
|
|
16
|
+
year_month: o.year_month
|
|
17
|
+
}, { top_level_category_guid: r, category_guid: n } = a;
|
|
18
|
+
return t[n] || (t[n] = []), t[n].push(a), r !== n && (t[r] || (t[r] = []), t[r].push(a)), t;
|
|
19
|
+
}, {}), E = (e, t, o) => {
|
|
20
|
+
const a = M(e), r = C(t, o);
|
|
21
|
+
return Object.entries(a).map(([n, c]) => {
|
|
22
|
+
const i = c[0].top_level_category_guid, g = r.map((l) => {
|
|
23
|
+
const s = c.filter((y) => y.year_month === l).reduce((y, h) => y + Math.abs(h.amount), 0), u = Number(String(l).slice(0, 4)), m = Number(String(l).slice(4));
|
|
24
|
+
return { x: new Date(u, m - 1), y: s };
|
|
25
|
+
}).sort((l, s) => l.x.getTime() - s.x.getTime());
|
|
26
|
+
return {
|
|
27
|
+
top_level_category_guid: i,
|
|
28
|
+
category_guid: n,
|
|
29
|
+
category_name: f(n),
|
|
30
|
+
category_color: _(i),
|
|
31
|
+
dataset: g
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}, N = (e, t) => {
|
|
35
|
+
const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e, a = typeof t == "string" ? parseFloat(t.replace(/[^0-9.-]+/g, "")) : t;
|
|
36
|
+
return (o || 0) - (a || 0);
|
|
37
|
+
}, x = (e, t) => e.indexOf("General") >= 0 ? 1 : e.localeCompare(t), T = (e, t) => {
|
|
38
|
+
const o = e.subCategories.filter((n) => n.currentAmount !== 0), a = e.totalMonthlyAmounts.slice(-t), r = (n) => n.substring(0, 3) + " " + n.slice(-4);
|
|
39
|
+
return a.map((n) => {
|
|
40
|
+
const c = r(n.label), i = o.map((s) => {
|
|
41
|
+
const u = s.monthlyAmounts.slice(-t).find((m) => r(m.label) === c);
|
|
42
|
+
return {
|
|
43
|
+
label: s.name,
|
|
44
|
+
amount: Math.abs(u?.amount || 0),
|
|
45
|
+
header: c
|
|
46
|
+
};
|
|
47
|
+
}), g = e.monthlyAmounts.slice(-t).find((s) => r(s.label) === c);
|
|
48
|
+
return [{
|
|
49
|
+
label: e.name,
|
|
50
|
+
amount: Math.abs(g?.amount || 0),
|
|
51
|
+
header: c
|
|
52
|
+
}, ...i].sort((s, u) => u.amount - s.amount);
|
|
53
|
+
});
|
|
54
|
+
}, D = (e, t) => {
|
|
55
|
+
const o = e ? e.totalMonthlyAmounts.slice(-t).map((r) => ({
|
|
56
|
+
x: r.label.substring(0, 3),
|
|
57
|
+
y: Math.abs(r.amount)
|
|
58
|
+
})) : [], a = e ? T(e, t) : [];
|
|
59
|
+
return { monthlyAmounts: o, tooltipLabels: a };
|
|
60
|
+
}, L = (e) => e.slice().filter(
|
|
61
|
+
(t) => t.totalAmount !== 0 && !t.isTransfer && t.guid !== b.INVESTMENTS
|
|
62
|
+
).sort((t, o) => Math.abs(o.totalAmount) - Math.abs(t.totalAmount));
|
|
63
|
+
export {
|
|
64
|
+
N as a,
|
|
65
|
+
D as b,
|
|
66
|
+
x as c,
|
|
67
|
+
L as f,
|
|
68
|
+
E as g
|
|
69
|
+
};
|