@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.1
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 +80 -0
- package/README.md +10 -10
- package/dist/Account-DR7Plrqy.mjs +119 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/AccountDetailsDrawer-C1hhmlmI.mjs +922 -0
- package/dist/AccountDetailsDrawer-C1hhmlmI.mjs.map +1 -0
- package/dist/AccountDetailsHeader-BliEZhz7.mjs +230 -0
- package/dist/AccountDetailsHeader-BliEZhz7.mjs.map +1 -0
- package/dist/AccountUtils-Cbh8r9cP.mjs +29 -0
- package/dist/AccountUtils-Cbh8r9cP.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +54 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +140 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +302 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +43 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +75 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +67 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +89 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +85 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +85 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +300 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/Help-aERwhajy.mjs +3210 -0
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +40 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +613 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +22 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +39 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/ManageIncome-Be9WHv-s.mjs +906 -0
- package/dist/ManageIncome-Be9WHv-s.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-Dj7CgAg2.mjs +96 -0
- package/dist/NetWorthUtils-Dj7CgAg2.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +8 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/RecurringSettings-kRqAViNn.mjs +89 -0
- package/dist/RecurringSettings-kRqAViNn.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +62 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +49 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +7 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +54 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +31 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-BjnNCO5a.mjs +3121 -0
- package/dist/UserStore-BjnNCO5a.mjs.map +1 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +784 -12
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +140 -155
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1267 -1317
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/context/hooks.d.ts +7 -6
- package/dist/cashflow/index.es.js +944 -1076
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +5 -4
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +310 -101
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +105 -80
- package/dist/core/index.es.js.map +1 -0
- package/dist/core/stores/CashflowStore.d.ts +8 -7
- package/dist/core/stores/RecurringTransactionsStore.d.ts +53 -1
- package/dist/core/stores/TransactionStore.d.ts +1 -0
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/core/utils/AccountUtils.d.ts +8 -0
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +142 -185
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +1273 -1384
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +3473 -3367
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +984 -1103
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +26 -3
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +78 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
- package/dist/insights/index.es.js +4871 -93
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1523 -1533
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +65 -75
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +826 -15
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +504 -550
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +162 -169
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +1012 -10
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +892 -13
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +457 -400
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +604 -10
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +1408 -1268
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +36 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +37 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +30 -30
- package/dist/Analytics-BKzTPees.mjs +0 -61
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
- package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
- package/dist/Loader-BlVzRtUd.mjs +0 -73
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
- package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
- package/dist/accounts-DkyAiLpg.mjs +0 -15632
- package/dist/core-BexP5oiV.mjs +0 -4047
- package/dist/help-CctDYrAH.mjs +0 -2308
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
- package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
- package/dist/settings-ZMHe439l.mjs +0 -1526
|
@@ -1,175 +1,190 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as ve } from "../MiniWidgetContainer-COwnjfy7.mjs";
|
|
7
|
-
import { i as le, n as k, r as de, t as Q } from "../SpendingLegend-D15ixlQ1.mjs";
|
|
8
|
-
import d from "react";
|
|
9
|
-
import { observer as A } from "mobx-react-lite";
|
|
10
|
-
import C from "@mui/material/Stack";
|
|
11
|
-
import { Icon as Me, Text as T } from "@mxenabled/mxui";
|
|
12
|
-
import { endOfMonth as ce } from "date-fns/endOfMonth";
|
|
13
|
-
import { startOfMonth as ge } from "date-fns/startOfMonth";
|
|
14
|
-
import { startOfToday as X } from "date-fns/startOfToday";
|
|
15
|
-
import xe from "@mui/material/Button";
|
|
16
|
-
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
17
|
-
import { useTheme as De } from "@mui/material/styles";
|
|
1
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { observer as I } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as it } from "date-fns/endOfMonth";
|
|
18
6
|
import L from "@mui/material/Box";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { useTheme as
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
7
|
+
import y from "@mui/material/Stack";
|
|
8
|
+
import $ from "@mui/material/Tab";
|
|
9
|
+
import rt from "@mui/material/Tabs";
|
|
10
|
+
import { useTheme as _t } from "@mui/material/styles";
|
|
11
|
+
import { g as st, a as lt, S as B, b as q } from "../SpendingLegend-CxvNOg3c.mjs";
|
|
12
|
+
import { Text as T, Icon as bt } from "@mxenabled/mxui";
|
|
13
|
+
import { f as k } from "../NumberFormatting--XMeeBfr.mjs";
|
|
14
|
+
import { u as A, l as R, c as ct, a as P, i as H, g as dt, f as yt } from "../hooks-97sNJ_lf.mjs";
|
|
15
|
+
import { u as gt } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
16
|
+
import { L as pt } from "../Loader-CxeBwuPG.mjs";
|
|
17
|
+
import { M as Ct } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
18
|
+
import { startOfToday as J } from "date-fns/startOfToday";
|
|
19
|
+
import St from "@mui/material/Button";
|
|
20
|
+
import { useTheme as Tt } from "@mui/material";
|
|
21
|
+
import { e as Mt } from "../TransactionUtils-BphBJBbU.mjs";
|
|
22
|
+
import { T as Dt } from "../EmbeddedCard-DH8vQ3qN.mjs";
|
|
23
|
+
import { T as xt } from "../TransactionDetails-roZ5xLq8.mjs";
|
|
24
|
+
import vt from "@mui/material/Collapse";
|
|
25
|
+
import wt from "@mui/material/Divider";
|
|
26
|
+
import Q from "@mui/material/List";
|
|
27
|
+
import X from "@mui/material/ListItem";
|
|
28
|
+
import Z from "@mui/material/ListItemButton";
|
|
29
|
+
import { u as Lt } from "../useScreenSize-mWpmnh5w.mjs";
|
|
30
|
+
import { D as tt } from "../Drawer-DsnW2o0v.mjs";
|
|
31
|
+
import { C as w } from "../Category-DEKZGLYe.mjs";
|
|
32
|
+
import { parseISO as et } from "date-fns/parseISO";
|
|
33
|
+
import { A as nt } from "../Analytics-WeZYytR0.mjs";
|
|
34
|
+
import { W as It } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
35
|
+
const G = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y, { direction: "column", children: [
|
|
36
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: d }),
|
|
37
|
+
/* @__PURE__ */ t(T, { variant: "caption", children: k(n, o === "mini" ? "0,0" : "0,0.00") })
|
|
38
|
+
] }), At = () => {
|
|
39
|
+
const n = _t(), { goals: d, spending: o } = A(), { categories: a, dateRangeCategoryTotals: i } = R(), g = c.useMemo(
|
|
40
|
+
() => [
|
|
41
|
+
n.palette.chartMono.chartMono5,
|
|
42
|
+
n.palette.chartMono.chartMono4,
|
|
43
|
+
n.palette.chartMono.chartMono3,
|
|
44
|
+
n.palette.chartMono.chartMono2,
|
|
45
|
+
n.palette.chartMono.chartMono1,
|
|
46
|
+
n.palette.chartMono.chartMono6
|
|
47
|
+
],
|
|
48
|
+
[n]
|
|
49
|
+
), [e, r] = c.useState(""), [s, b] = c.useState(0), u = c.useMemo(
|
|
50
|
+
() => st(a, d, n, i),
|
|
51
|
+
[a, i]
|
|
52
|
+
), h = c.useMemo(
|
|
53
|
+
() => lt(a, i, g),
|
|
54
|
+
[a, i, g]
|
|
55
|
+
), M = (_, D) => {
|
|
56
|
+
b(D), r("");
|
|
57
|
+
}, f = (_) => {
|
|
58
|
+
r(e === _ ? "" : _);
|
|
55
59
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"aria-label":
|
|
61
|
-
onChange:
|
|
60
|
+
return /* @__PURE__ */ p(L, { width: "100%", children: [
|
|
61
|
+
/* @__PURE__ */ p(
|
|
62
|
+
rt,
|
|
63
|
+
{
|
|
64
|
+
"aria-label": o.mini_title,
|
|
65
|
+
onChange: M,
|
|
62
66
|
sx: { touchAction: "manipulation" },
|
|
63
67
|
value: s,
|
|
64
68
|
variant: "fullWidth",
|
|
65
|
-
children: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ t(
|
|
71
|
+
$,
|
|
72
|
+
{
|
|
73
|
+
"aria-controls": "spending-tabpanel",
|
|
74
|
+
id: "spending-tab",
|
|
75
|
+
label: /* @__PURE__ */ t(
|
|
76
|
+
G,
|
|
77
|
+
{
|
|
78
|
+
amount: u.totalAmount,
|
|
79
|
+
label: o.spend_tab_title,
|
|
80
|
+
variant: "mini"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
tabIndex: s === 0 ? 0 : -1
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ t(
|
|
87
|
+
$,
|
|
88
|
+
{
|
|
89
|
+
"aria-controls": "income-tabpanel",
|
|
90
|
+
id: "income-tab",
|
|
91
|
+
label: /* @__PURE__ */ t(
|
|
92
|
+
G,
|
|
93
|
+
{
|
|
94
|
+
amount: h.totalAmount,
|
|
95
|
+
label: o.income_tab_title,
|
|
96
|
+
variant: "mini"
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
tabIndex: s === 1 ? 0 : -1
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ t(
|
|
106
|
+
L,
|
|
107
|
+
{
|
|
86
108
|
"aria-labelledby": "spending-tab",
|
|
87
109
|
hidden: s !== 0,
|
|
88
110
|
id: "spending-tabpanel",
|
|
89
111
|
role: "tabpanel",
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/* @__PURE__ */ e(L, {
|
|
112
|
+
children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
113
|
+
/* @__PURE__ */ t(
|
|
114
|
+
B,
|
|
115
|
+
{
|
|
116
|
+
data: u,
|
|
117
|
+
onSelected: f,
|
|
118
|
+
selectedId: e,
|
|
119
|
+
totalLabel: o.total_spending
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ t(q, { data: u, onSelected: f, selectedId: e })
|
|
123
|
+
] })
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ t(
|
|
127
|
+
L,
|
|
128
|
+
{
|
|
108
129
|
"aria-labelledby": "income-tab",
|
|
109
130
|
hidden: s !== 1,
|
|
110
131
|
id: "income-tabpanel",
|
|
111
132
|
role: "tabpanel",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
132
|
-
}, Ee = A(Ae), Re = ({ onPrimaryCtaClick: a, sx: g = {} }) => {
|
|
133
|
-
const { isAccountDataLoaded: n, loadAccountData: o } = re(), { dateRangeTotalsLoaded: i, categoriesLoaded: p, loadCategories: t, loadDateRangeCategoryTotals: r } = W(), { spending: s } = I(), { isInitialized: y, selectedAccounts: c } = P();
|
|
134
|
-
return oe({
|
|
133
|
+
children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
134
|
+
/* @__PURE__ */ t(
|
|
135
|
+
B,
|
|
136
|
+
{
|
|
137
|
+
data: h,
|
|
138
|
+
isIncome: !0,
|
|
139
|
+
onSelected: f,
|
|
140
|
+
selectedId: e,
|
|
141
|
+
totalLabel: o.total_income
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ t(q, { data: h, onSelected: f, selectedId: e })
|
|
145
|
+
] })
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
] });
|
|
149
|
+
}, Et = I(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
|
|
150
|
+
const { isAccountDataLoaded: o, loadAccountData: a } = ct(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = R(), { spending: s } = A(), { isInitialized: b, selectedAccounts: u } = P();
|
|
151
|
+
return gt({
|
|
135
152
|
widgetName: "SpendingMiniWidget",
|
|
136
153
|
isLoaded: i
|
|
137
|
-
}),
|
|
138
|
-
|
|
139
|
-
}, []),
|
|
140
|
-
r(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"aria-labelledby": "spending-list-title",
|
|
172
|
-
children: a.categoryData.map((t) => /* @__PURE__ */ u(d.Fragment, { children: [/* @__PURE__ */ e(te, {
|
|
154
|
+
}), c.useEffect(() => {
|
|
155
|
+
o || a().finally(), g || e().finally();
|
|
156
|
+
}, []), c.useEffect(() => {
|
|
157
|
+
r(
|
|
158
|
+
u,
|
|
159
|
+
at(/* @__PURE__ */ new Date()),
|
|
160
|
+
it(/* @__PURE__ */ new Date())
|
|
161
|
+
).finally();
|
|
162
|
+
}, [u]), b ? /* @__PURE__ */ t(
|
|
163
|
+
Ct,
|
|
164
|
+
{
|
|
165
|
+
className: "mx-exp-spending-miniwidget",
|
|
166
|
+
onPrimaryCtaClick: n,
|
|
167
|
+
primaryCtaLabel: s.primary_cta,
|
|
168
|
+
primaryCtaLabelAria: s.primary_cta_aria,
|
|
169
|
+
sx: { height: "100%", ...d },
|
|
170
|
+
title: s.mini_title,
|
|
171
|
+
children: /* @__PURE__ */ t(Et, {})
|
|
172
|
+
}
|
|
173
|
+
) : /* @__PURE__ */ t(pt, {});
|
|
174
|
+
}, Ce = I(Wt), Rt = ({
|
|
175
|
+
data: n,
|
|
176
|
+
onSelected: d,
|
|
177
|
+
selectedId: o = "",
|
|
178
|
+
title: a
|
|
179
|
+
}) => {
|
|
180
|
+
const { spending: i } = A(), g = n.categoryData.find((e) => e.guid === o);
|
|
181
|
+
return /* @__PURE__ */ p(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
182
|
+
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${a} ${i.by_category}` }),
|
|
183
|
+
/* @__PURE__ */ t(wt, { "aria-hidden": "true" }),
|
|
184
|
+
/* @__PURE__ */ t(Q, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ p(c.Fragment, { children: [
|
|
185
|
+
/* @__PURE__ */ t(
|
|
186
|
+
X,
|
|
187
|
+
{
|
|
173
188
|
disableGutters: !0,
|
|
174
189
|
disablePadding: !0,
|
|
175
190
|
sx: {
|
|
@@ -177,260 +192,302 @@ var G = ({ amount: a, label: g, variant: n = "full" }) => /* @__PURE__ */ u(C, {
|
|
|
177
192
|
borderColor: "divider",
|
|
178
193
|
minHeight: 44
|
|
179
194
|
},
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
px: 8,
|
|
187
|
-
|
|
195
|
+
children: /* @__PURE__ */ p(
|
|
196
|
+
Z,
|
|
197
|
+
{
|
|
198
|
+
"aria-expanded": g?.guid === e.guid,
|
|
199
|
+
id: `spending-list-category-${e.guid}`,
|
|
200
|
+
onClick: () => d(e.guid),
|
|
201
|
+
sx: { minHeight: 44, px: 8, py: 0 },
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ t(
|
|
204
|
+
L,
|
|
205
|
+
{
|
|
206
|
+
"aria-hidden": "true",
|
|
207
|
+
borderRadius: 4,
|
|
208
|
+
flexShrink: 0,
|
|
209
|
+
height: 8,
|
|
210
|
+
role: "presentation",
|
|
211
|
+
sx: { backgroundColor: e.color, mr: 8 },
|
|
212
|
+
width: 8
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ p(
|
|
216
|
+
y,
|
|
217
|
+
{
|
|
218
|
+
alignItems: "center",
|
|
219
|
+
direction: "row",
|
|
220
|
+
justifyContent: "space-between",
|
|
221
|
+
width: "100%",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ t(T, { bold: o === e.guid, children: e.name }),
|
|
224
|
+
/* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children: k(e.amount, "0,0.00") })
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(vt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ t(Q, { sx: { borderBottom: 1, borderColor: "divider" }, children: g?.categoryTotals?.map((r) => /* @__PURE__ */ t(
|
|
234
|
+
X,
|
|
235
|
+
{
|
|
236
|
+
sx: {
|
|
237
|
+
pl: 12,
|
|
238
|
+
py: 0
|
|
239
|
+
},
|
|
240
|
+
children: /* @__PURE__ */ t(
|
|
241
|
+
Z,
|
|
242
|
+
{
|
|
243
|
+
id: `spending-list-subcategory-${r.guid}`,
|
|
244
|
+
onClick: () => d(r.guid, !0),
|
|
245
|
+
sx: { minHeight: 44, px: 8, py: 0 },
|
|
246
|
+
children: /* @__PURE__ */ p(y, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
247
|
+
/* @__PURE__ */ p(T, { children: [
|
|
248
|
+
r.name,
|
|
249
|
+
" "
|
|
250
|
+
] }),
|
|
251
|
+
/* @__PURE__ */ t(T, { children: k(r.amount, "0,0.00") })
|
|
252
|
+
] })
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
},
|
|
256
|
+
r.guid
|
|
257
|
+
)) }) })
|
|
258
|
+
] }, e.guid)) }),
|
|
259
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${k(n.totalAmount, "0,0.00")}` })
|
|
260
|
+
] });
|
|
261
|
+
}, Nt = I(Rt), Ot = ({
|
|
262
|
+
data: n,
|
|
263
|
+
onSelected: d,
|
|
264
|
+
onViewTransactions: o,
|
|
265
|
+
selectedId: a,
|
|
266
|
+
title: i
|
|
267
|
+
}) => {
|
|
268
|
+
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = R(), { spending: s } = A();
|
|
269
|
+
return /* @__PURE__ */ p(
|
|
270
|
+
y,
|
|
271
|
+
{
|
|
272
|
+
alignItems: e ? "center" : "flex-start",
|
|
273
|
+
direction: e ? "column" : "row",
|
|
274
|
+
gap: { xs: 16, md: 64, xl: 100 },
|
|
275
|
+
justifyContent: "center",
|
|
276
|
+
pt: 50,
|
|
277
|
+
px: 8,
|
|
278
|
+
children: [
|
|
279
|
+
r && /* @__PURE__ */ t(
|
|
280
|
+
B,
|
|
281
|
+
{
|
|
282
|
+
data: {
|
|
283
|
+
categoryData: [],
|
|
284
|
+
donutData: [],
|
|
285
|
+
totalAmount: 0
|
|
188
286
|
},
|
|
189
|
-
|
|
190
|
-
"aria-hidden": "true",
|
|
191
|
-
borderRadius: 4,
|
|
192
|
-
flexShrink: 0,
|
|
193
|
-
height: 8,
|
|
194
|
-
role: "presentation",
|
|
195
|
-
sx: {
|
|
196
|
-
backgroundColor: t.color,
|
|
197
|
-
mr: 8
|
|
198
|
-
},
|
|
199
|
-
width: 8
|
|
200
|
-
}), /* @__PURE__ */ u(C, {
|
|
201
|
-
alignItems: "center",
|
|
202
|
-
direction: "row",
|
|
203
|
-
justifyContent: "space-between",
|
|
204
|
-
width: "100%",
|
|
205
|
-
children: [/* @__PURE__ */ e(T, {
|
|
206
|
-
bold: n === t.guid,
|
|
207
|
-
children: t.name
|
|
208
|
-
}), /* @__PURE__ */ e(T, {
|
|
209
|
-
bold: n === t.guid,
|
|
210
|
-
variant: "body1",
|
|
211
|
-
children: $(t.amount, "0,0.00")
|
|
212
|
-
})]
|
|
213
|
-
})]
|
|
214
|
-
})
|
|
215
|
-
}), t.categoryTotals && t.categoryTotals.length > 0 && /* @__PURE__ */ e(Ie, {
|
|
216
|
-
in: p?.guid === t.guid,
|
|
217
|
-
unmountOnExit: !0,
|
|
218
|
-
children: /* @__PURE__ */ e(ee, {
|
|
219
|
-
sx: {
|
|
220
|
-
borderBottom: 1,
|
|
221
|
-
borderColor: "divider"
|
|
287
|
+
onSelected: () => {
|
|
222
288
|
},
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}),
|
|
285
|
-
!r && /* @__PURE__ */ e(k, {
|
|
286
|
-
data: a,
|
|
287
|
-
onSelected: (c) => {
|
|
288
|
-
g(c), setTimeout(() => document.getElementById(`spending-list-category-${c}`)?.focus(), 0);
|
|
289
|
-
},
|
|
290
|
-
onViewTransactions: n,
|
|
291
|
-
selectedId: o,
|
|
292
|
-
size: p ? 400 : 300,
|
|
293
|
-
totalLabel: s.total_amount,
|
|
294
|
-
variant: "full"
|
|
295
|
-
}),
|
|
296
|
-
/* @__PURE__ */ e(Ne, {
|
|
297
|
-
data: a,
|
|
298
|
-
onSelected: g,
|
|
299
|
-
selectedId: o,
|
|
300
|
-
title: i
|
|
301
|
-
})
|
|
302
|
-
]
|
|
303
|
-
});
|
|
304
|
-
}, ne = A(Oe), $e = (a) => [
|
|
305
|
-
a.palette.chartMono.chartMono5,
|
|
306
|
-
a.palette.chartMono.chartMono4,
|
|
307
|
-
a.palette.chartMono.chartMono3,
|
|
308
|
-
a.palette.chartMono.chartMono2,
|
|
309
|
-
a.palette.chartMono.chartMono1,
|
|
310
|
-
a.palette.chartMono.chartMono6
|
|
311
|
-
], ke = () => {
|
|
312
|
-
const a = we(), { is_mobile_webview: g } = H(), { clientConfig: n } = H(), { categories: o, dateRangeCategoryTotals: i } = W(), { goals: p, spending: t, transactions: r } = I(), { displayedDateRange: s, selectedAccountGuids: y } = P(), { setFilter: c, sortedTransactions: b, sortedTransactionsWithSplits: v, tags: m } = ie(), h = n?.master?.deep_link_params?.account_guids, M = n?.master?.deep_link_params?.view, [x, N] = d.useState(""), [D, S] = d.useState(M === "income" ? 1 : 0), [E, R] = d.useState(""), [O, j] = d.useState(!1), V = d.useMemo(() => le(o, p, a, i), [o, i]), J = d.useMemo(() => de(o, i, $e(a)), [o, i]), z = d.useMemo(() => b.find((l) => l.guid === E), [E, b]), ue = (l, _) => {
|
|
313
|
-
S(_), N("");
|
|
314
|
-
}, K = (l, _ = !1) => {
|
|
315
|
-
_ ? me(l) : N(x === l || l === "0" ? "" : l);
|
|
316
|
-
}, me = (l) => {
|
|
317
|
-
c({
|
|
318
|
-
accounts: h || y,
|
|
319
|
-
dateRange: s,
|
|
320
|
-
custom: (_) => x === "other" ? _.top_level_category_guid === l : _.category_guid === l,
|
|
289
|
+
selectedId: "",
|
|
290
|
+
size: g ? 400 : 300,
|
|
291
|
+
totalLabel: "Loading ...",
|
|
292
|
+
variant: "full"
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
!r && /* @__PURE__ */ t(
|
|
296
|
+
B,
|
|
297
|
+
{
|
|
298
|
+
data: n,
|
|
299
|
+
onSelected: (h) => {
|
|
300
|
+
d(h), setTimeout(() => document.getElementById(`spending-list-category-${h}`)?.focus(), 0);
|
|
301
|
+
},
|
|
302
|
+
onViewTransactions: o,
|
|
303
|
+
selectedId: a,
|
|
304
|
+
size: g ? 400 : 300,
|
|
305
|
+
totalLabel: s.total_amount,
|
|
306
|
+
variant: "full"
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
/* @__PURE__ */ t(Nt, { data: n, onSelected: d, selectedId: a, title: i })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}, ot = I(Ot), kt = (n) => [
|
|
314
|
+
n.palette.chartMono.chartMono5,
|
|
315
|
+
n.palette.chartMono.chartMono4,
|
|
316
|
+
n.palette.chartMono.chartMono3,
|
|
317
|
+
n.palette.chartMono.chartMono2,
|
|
318
|
+
n.palette.chartMono.chartMono1,
|
|
319
|
+
n.palette.chartMono.chartMono6
|
|
320
|
+
], $t = () => {
|
|
321
|
+
const n = Tt(), { is_mobile_webview: d } = H(), { clientConfig: o } = H(), { categories: a, dateRangeCategoryTotals: i } = R(), {
|
|
322
|
+
goals: g,
|
|
323
|
+
spending: e,
|
|
324
|
+
transactions: r
|
|
325
|
+
} = A(), { displayedDateRange: s, selectedAccountGuids: b } = P(), {
|
|
326
|
+
setFilter: u,
|
|
327
|
+
sortedTransactions: h,
|
|
328
|
+
sortedTransactionsWithSplits: M,
|
|
329
|
+
tags: f
|
|
330
|
+
} = dt(), _ = o?.master?.deep_link_params?.account_guids, D = o?.master?.deep_link_params?.view, [x, N] = c.useState(""), [v, C] = c.useState(D === "income" ? 1 : 0), [E, W] = c.useState(""), [O, j] = c.useState(!1), F = c.useMemo(
|
|
331
|
+
() => st(a, g, n, i),
|
|
332
|
+
[a, i]
|
|
333
|
+
), K = c.useMemo(
|
|
334
|
+
() => lt(a, i, kt(n)),
|
|
335
|
+
[a, i]
|
|
336
|
+
), V = c.useMemo(
|
|
337
|
+
() => h.find((l) => l.guid === E),
|
|
338
|
+
[E, h]
|
|
339
|
+
), ut = (l, S) => {
|
|
340
|
+
C(S), N("");
|
|
341
|
+
}, U = (l, S = !1) => {
|
|
342
|
+
S ? mt(l) : N(x === l || l === "0" ? "" : l);
|
|
343
|
+
}, mt = (l) => {
|
|
344
|
+
u({
|
|
345
|
+
...{
|
|
346
|
+
accounts: _ || b,
|
|
347
|
+
dateRange: s
|
|
348
|
+
},
|
|
349
|
+
custom: (m) => x === "other" ? m.top_level_category_guid === l : m.category_guid === l,
|
|
321
350
|
showSplits: !0
|
|
322
351
|
}), j(!0);
|
|
323
|
-
},
|
|
324
|
-
const
|
|
325
|
-
accounts:
|
|
352
|
+
}, Y = (l) => {
|
|
353
|
+
const S = {
|
|
354
|
+
accounts: _ || b,
|
|
326
355
|
dateRange: s
|
|
327
356
|
};
|
|
328
|
-
if (
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
357
|
+
if (v === 0)
|
|
358
|
+
if (l === "other") {
|
|
359
|
+
const m = F.categoryData.find((z) => z.guid === "other");
|
|
360
|
+
u({
|
|
361
|
+
...S,
|
|
362
|
+
custom: (z) => !!m?.categoryTotals?.find((ft) => ft.guid === z.top_level_category_guid)
|
|
363
|
+
});
|
|
364
|
+
} else
|
|
365
|
+
u({
|
|
366
|
+
...S,
|
|
367
|
+
custom: (m) => l ? m.top_level_category_guid === l : m.top_level_category_guid !== w.INCOME && m.category_guid !== w.INCOME && m.top_level_category_guid !== w.INVESTMENTS && m.top_level_category_guid !== w.TRANSFER,
|
|
368
|
+
showSplits: !!l
|
|
369
|
+
});
|
|
370
|
+
else
|
|
371
|
+
u({
|
|
372
|
+
...S,
|
|
373
|
+
custom: (m) => l ? m.category_guid === l : m.category_guid === w.INCOME || m.top_level_category_guid === w.INCOME
|
|
333
374
|
});
|
|
334
|
-
} else c({
|
|
335
|
-
..._,
|
|
336
|
-
custom: (f) => l ? f.top_level_category_guid === l : f.top_level_category_guid !== w.INCOME && f.category_guid !== w.INCOME && f.top_level_category_guid !== w.INVESTMENTS && f.top_level_category_guid !== w.TRANSFER,
|
|
337
|
-
showSplits: !!l
|
|
338
|
-
});
|
|
339
|
-
else c({
|
|
340
|
-
..._,
|
|
341
|
-
custom: (f) => l ? f.category_guid === l : f.category_guid === w.INCOME || f.top_level_category_guid === w.INCOME
|
|
342
|
-
});
|
|
343
375
|
j(!0);
|
|
344
|
-
},
|
|
345
|
-
|
|
376
|
+
}, ht = () => {
|
|
377
|
+
Mt(M, f);
|
|
346
378
|
};
|
|
347
|
-
return /* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
379
|
+
return /* @__PURE__ */ p(L, { children: [
|
|
380
|
+
/* @__PURE__ */ p(rt, { onChange: ut, value: v, variant: "fullWidth", children: [
|
|
381
|
+
/* @__PURE__ */ t(
|
|
382
|
+
$,
|
|
383
|
+
{
|
|
384
|
+
label: /* @__PURE__ */ t(
|
|
385
|
+
G,
|
|
386
|
+
{
|
|
387
|
+
amount: F.totalAmount,
|
|
388
|
+
label: e.spend_tab_title
|
|
389
|
+
}
|
|
390
|
+
)
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ t(
|
|
394
|
+
$,
|
|
395
|
+
{
|
|
396
|
+
label: /* @__PURE__ */ t(
|
|
397
|
+
G,
|
|
398
|
+
{
|
|
399
|
+
amount: K.totalAmount,
|
|
400
|
+
label: e.income_tab_title
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
}
|
|
404
|
+
)
|
|
405
|
+
] }),
|
|
406
|
+
v === 0 && /* @__PURE__ */ t(
|
|
407
|
+
ot,
|
|
408
|
+
{
|
|
409
|
+
data: F,
|
|
410
|
+
onSelected: U,
|
|
411
|
+
onViewTransactions: Y,
|
|
412
|
+
selectedId: x,
|
|
413
|
+
title: e.spend_tab_title
|
|
414
|
+
}
|
|
415
|
+
),
|
|
416
|
+
v === 1 && /* @__PURE__ */ t(
|
|
417
|
+
ot,
|
|
418
|
+
{
|
|
419
|
+
data: K,
|
|
420
|
+
onSelected: U,
|
|
421
|
+
onViewTransactions: Y,
|
|
422
|
+
selectedId: x,
|
|
423
|
+
title: e.income_tab_title
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
/* @__PURE__ */ t(
|
|
427
|
+
tt,
|
|
428
|
+
{
|
|
429
|
+
ariaLabelClose: e.close_drawer_aria,
|
|
430
|
+
isOpen: O,
|
|
431
|
+
onClose: () => j(!1),
|
|
432
|
+
title: e.transactions_drawer_title,
|
|
433
|
+
children: /* @__PURE__ */ p(y, { children: [
|
|
434
|
+
!d && h.length > 0 && /* @__PURE__ */ t(y, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
435
|
+
St,
|
|
436
|
+
{
|
|
437
|
+
onClick: ht,
|
|
438
|
+
startIcon: /* @__PURE__ */ t(bt, { name: "ios_share" }),
|
|
439
|
+
variant: "text",
|
|
440
|
+
children: r.export_csv_btn
|
|
441
|
+
}
|
|
442
|
+
) }),
|
|
443
|
+
/* @__PURE__ */ t(Dt, { onClick: W })
|
|
444
|
+
] })
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
/* @__PURE__ */ t(
|
|
448
|
+
tt,
|
|
449
|
+
{
|
|
450
|
+
ariaLabelClose: e.close_drawer_aria,
|
|
451
|
+
isOpen: !!V,
|
|
452
|
+
onClose: () => W(""),
|
|
453
|
+
title: e.transaction_details_drawer_title,
|
|
454
|
+
children: V && /* @__PURE__ */ t(xt, { transaction: V })
|
|
455
|
+
}
|
|
456
|
+
)
|
|
401
457
|
] });
|
|
402
|
-
},
|
|
403
|
-
const { isAccountDataLoaded:
|
|
404
|
-
|
|
458
|
+
}, Bt = I($t), Gt = ({ onBackClick: n, onMenuClick: d, sx: o = {} }) => {
|
|
459
|
+
const { isAccountDataLoaded: a, loadAccountData: i } = ct(), { categoriesLoaded: g, dateRangeTotalsLoaded: e, loadCategories: r, loadDateRangeCategoryTotals: s } = R(), { isTransactionDataLoaded: b, loadTransactionData: u } = dt(), { spending: h } = A(), { displayedDateRange: M, isInitialized: f, setDisplayedDate: _, selectedAccounts: D } = P(), { onEvent: x } = yt(), { clientConfig: N } = H();
|
|
460
|
+
gt({
|
|
405
461
|
widgetName: "SpendingWidget",
|
|
406
|
-
isLoaded:
|
|
407
|
-
}),
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
}, []),
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
]);
|
|
417
|
-
const
|
|
418
|
-
|
|
462
|
+
isLoaded: e
|
|
463
|
+
}), c.useEffect(() => {
|
|
464
|
+
const C = N?.master?.deep_link_params, E = C?.date_range ? [et(C.date_range.from), et(C.date_range.to)] : [at(J()), it(J())], W = E[0], O = E[1];
|
|
465
|
+
_(W, O), a || i().finally(), g || r().finally(), b || u().finally(), f && s(D, W, O).finally(), x(nt.SPENDING_VIEW);
|
|
466
|
+
}, []), c.useEffect(() => {
|
|
467
|
+
f && s(
|
|
468
|
+
D,
|
|
469
|
+
M.start,
|
|
470
|
+
M.end
|
|
471
|
+
).finally();
|
|
472
|
+
}, [M, f, D]);
|
|
473
|
+
const v = (C) => {
|
|
474
|
+
_(C[0], C[1]);
|
|
419
475
|
};
|
|
420
|
-
return
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
children: /* @__PURE__ */
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
},
|
|
476
|
+
return f ? /* @__PURE__ */ t(
|
|
477
|
+
It,
|
|
478
|
+
{
|
|
479
|
+
calendarActions: { onRangeChanged: v },
|
|
480
|
+
onAccountsFilterClick: () => x(nt.SPENDING_CLICK_FILTER),
|
|
481
|
+
onBackClick: n,
|
|
482
|
+
onMenuClick: d,
|
|
483
|
+
sx: o,
|
|
484
|
+
title: h.title,
|
|
485
|
+
children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
|
|
486
|
+
}
|
|
487
|
+
) : /* @__PURE__ */ t(pt, {});
|
|
488
|
+
}, Se = I(Gt);
|
|
433
489
|
export {
|
|
434
|
-
|
|
435
|
-
|
|
490
|
+
Ce as SpendingMiniWidget,
|
|
491
|
+
Se as SpendingWidget
|
|
436
492
|
};
|
|
493
|
+
//# sourceMappingURL=index.es.js.map
|