@mx-cartographer/experiences 7.11.6 → 7.11.7
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/{AccountApi-DgZ8ILj1.mjs → AccountApi-JlrX0MwM.mjs} +1 -1
- package/dist/{AccountDetailsHeader-hDo7gojQ.mjs → AccountDetailsHeader-BCi1WwkM.mjs} +2 -2
- package/dist/{AccountListItem-CjeAlrPC.mjs → AccountListItem-Ceuh5WKe.mjs} +2 -2
- package/dist/{AccountStore-DdGz1ig2.mjs → AccountStore-CSLinWGm.mjs} +2 -2
- package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-B7yMnwRX.mjs} +1 -1
- package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C3njaxFy.mjs} +1 -1
- package/dist/BudgetUtil-CTpLz9lw.mjs +101 -0
- package/dist/{CategorySelectorDrawer-zT9pFvTa.mjs → CategorySelectorDrawer-BMmxw2oY.mjs} +1 -1
- package/dist/{CategoryStore-Cg6hsxza.mjs → CategoryStore-BC1Dbefp.mjs} +1 -1
- package/dist/{Connect-Dg9HlAWv.mjs → Connect-Df7iVTcV.mjs} +1 -1
- package/dist/{ConnectDrawer-BLwcW0Oe.mjs → ConnectDrawer-CVt-8rPJ.mjs} +2 -2
- package/dist/{ConnectionsDrawer-UQTh9UEc.mjs → ConnectionsDrawer-c7HaKeRj.mjs} +2 -2
- package/dist/{CurrencyInput-PMOAH5R3.mjs → CurrencyInput-CDY0awYV.mjs} +1 -1
- package/dist/{ExportCsvAction-B5Ra5duE.mjs → ExportCsvAction-BSK-EZ4D.mjs} +3 -3
- package/dist/{Fetch-DecPFeGU.mjs → Fetch-C67go-m2.mjs} +1 -0
- package/dist/{FinstrongStore-DBSoLGSE.mjs → FinstrongStore-93XvOWQr.mjs} +1 -1
- package/dist/{GlobalAccountFilter-C8mpfudV.mjs → GlobalAccountFilter-B3v8E_rC.mjs} +1 -1
- package/dist/{GoalStore-DzOZ0je_.mjs → GoalStore-XHAvX1lP.mjs} +2 -2
- package/dist/{Help-HjHBZzI9.mjs → Help-BBxespai.mjs} +1 -1
- package/dist/{LineChart-Dlp9RAJz.mjs → LineChart-Pu3pKqtQ.mjs} +1 -1
- package/dist/{ListItemAction-BDnpuLln.mjs → ListItemAction-5YhgdUZW.mjs} +1 -1
- package/dist/{ManageIncome-C05btqU-.mjs → ManageIncome-C389-HAc.mjs} +10 -10
- package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-DeeJLKfx.mjs} +1 -1
- package/dist/{MicroWidgetContainer-jvYZ5bb6.mjs → MicroWidgetContainer-CMES42I1.mjs} +1 -1
- package/dist/{MiniWidgetContainer-B4gbUTJ2.mjs → MiniWidgetContainer-DhEx4qKi.mjs} +1 -1
- package/dist/{NetWorthStore-yV43kJro.mjs → NetWorthStore-iebGdvTb.mjs} +1 -1
- package/dist/{NotificationSettings-BYv2INpX.mjs → NotificationSettings-BSaCGB8x.mjs} +4 -4
- package/dist/{NotificationStore-DBs11ZBH.mjs → NotificationStore-CUhig4c1.mjs} +1 -1
- package/dist/{OriginalBalanceAction-CRevNVIM.mjs → OriginalBalanceAction-Bq4utJ1f.mjs} +3 -3
- package/dist/{RecurringSettings-B0SSXpiK.mjs → RecurringSettings-CLtfXCFT.mjs} +2 -2
- package/dist/{RecurringTransactionsStore-DAX5ozGz.mjs → RecurringTransactionsStore-Ce7p6L0E.mjs} +1 -1
- package/dist/{SettingsStore-BqPjOIWk.mjs → SettingsStore-tK6INBFP.mjs} +2 -2
- package/dist/{SpendingLegend-D91UDDIu.mjs → SpendingLegend-bMrPWOGJ.mjs} +1 -1
- package/dist/{Transaction-BNO5Yz-B.mjs → Transaction-BR682Yj5.mjs} +1 -1
- package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-BnjVP2x2.mjs} +1 -1
- package/dist/TransactionDetails-Cedp4OOg.mjs +1260 -0
- package/dist/{TransactionList-DrtItQUk.mjs → TransactionList-BibbhhS9.mjs} +2 -2
- package/dist/{TransactionStore-DYXYuq5s.mjs → TransactionStore-Cv-7GLPT.mjs} +4 -4
- package/dist/User-CCSM9p05.mjs +368 -0
- package/dist/{ViewMoreMicroCard-BCYgXtiG.mjs → ViewMoreMicroCard-C4QiAZz4.mjs} +3 -3
- package/dist/{WidgetContainer-BEpJCqAV.mjs → WidgetContainer-sC5KLXHI.mjs} +2 -2
- package/dist/accounts/index.es.js +14 -14
- package/dist/analytics/index.es.js +11 -11
- package/dist/budgets/api/BudgetsApi.d.ts +1 -0
- package/dist/budgets/index.es.js +25 -24
- package/dist/budgets/store/BudgetsStore.d.ts +7 -0
- package/dist/cashflow/index.es.js +9 -9
- package/dist/categories/index.es.js +2 -2
- package/dist/common/constants/ApiEndpoints.d.ts +1 -0
- package/dist/common/index.es.js +277 -253
- package/dist/common/stores/GlobalStore.d.ts +3 -1
- package/dist/common/types/Budget.d.ts +8 -0
- package/dist/common/types/localization/BudgetsCopy.d.ts +5 -0
- package/dist/common/types/localization/CommonCopy.d.ts +2 -0
- package/dist/dashboard/index.es.js +4 -4
- package/dist/debts/index.es.js +8 -8
- package/dist/{exportTransactionsToCSV-DC2YMFft.mjs → exportTransactionsToCSV-YXwmzmUp.mjs} +1 -1
- package/dist/finstrong/index.es.js +12 -12
- package/dist/goals/index.es.js +10 -10
- package/dist/help/index.es.js +4 -4
- package/dist/{hooks-0kWPTHNb.mjs → hooks-zu7yblbi.mjs} +3 -3
- package/dist/insights/index.es.js +4 -4
- package/dist/investments/index.es.js +4 -4
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +8 -8
- package/dist/notifications/index.es.js +11 -11
- package/dist/recurringtransactions/index.es.js +102 -102
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +3 -1
- package/dist/transactions/index.es.js +17 -17
- package/dist/trends/index.es.js +12 -12
- package/dist/{useAccountDisplayName-BQfelpG3.mjs → useAccountDisplayName-CxYB0Wpw.mjs} +1 -1
- package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-C6fkIgHW.mjs} +1 -1
- package/dist/{useInsightsEnabled-bDCTNOJS.mjs → useInsightsEnabled-CYLDtNYt.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-yzSfT9dS.mjs → useWidgetLoadTimer-Bmgv_UeH.mjs} +1 -1
- package/package.json +1 -1
- package/dist/BudgetUtil-C71e-szt.mjs +0 -236
- package/dist/TransactionDetails-Cym3mIjc.mjs +0 -1181
- package/dist/User-C8w4H0cj.mjs +0 -237
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { T as Sa } from "../TransactionApi-
|
|
2
|
-
import { C as Le, D as Me, M as Re, a as He, T as Pe } from "../TransactionDetails-
|
|
3
|
-
import { B as Da, b as Ia } from "../TransactionDetails-
|
|
4
|
-
import { T as E } from "../Transaction-
|
|
5
|
-
import { O as Na } from "../Transaction-
|
|
6
|
-
import { S as Z, D as Be } from "../TransactionStore-
|
|
7
|
-
import { T as Oa } from "../TransactionStore-
|
|
8
|
-
import { u as R, T as $e } from "../TransactionList-
|
|
9
|
-
import { a as La } from "../TransactionList-
|
|
10
|
-
import { e as Ve } from "../exportTransactionsToCSV-
|
|
11
|
-
import { E as Ra } from "../ExportCsvAction-
|
|
1
|
+
import { T as Sa } from "../TransactionApi-BnjVP2x2.mjs";
|
|
2
|
+
import { C as Le, D as Me, M as Re, a as He, T as Pe } from "../TransactionDetails-Cedp4OOg.mjs";
|
|
3
|
+
import { B as Da, b as Ia } from "../TransactionDetails-Cedp4OOg.mjs";
|
|
4
|
+
import { T as E } from "../Transaction-BR682Yj5.mjs";
|
|
5
|
+
import { O as Na } from "../Transaction-BR682Yj5.mjs";
|
|
6
|
+
import { S as Z, D as Be } from "../TransactionStore-Cv-7GLPT.mjs";
|
|
7
|
+
import { T as Oa } from "../TransactionStore-Cv-7GLPT.mjs";
|
|
8
|
+
import { u as R, T as $e } from "../TransactionList-BibbhhS9.mjs";
|
|
9
|
+
import { a as La } from "../TransactionList-BibbhhS9.mjs";
|
|
10
|
+
import { e as Ve } from "../exportTransactionsToCSV-YXwmzmUp.mjs";
|
|
11
|
+
import { E as Ra } from "../ExportCsvAction-BSK-EZ4D.mjs";
|
|
12
12
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
13
13
|
import m from "react";
|
|
14
14
|
import { observer as w } from "mobx-react-lite";
|
|
15
15
|
import We from "@mui/material/Paper";
|
|
16
16
|
import { DataGridPro as Ge } from "@mui/x-data-grid-pro";
|
|
17
|
-
import { h as H, u as D, b as K, d as ne, m as Fe, a as Ue, g as Ke, o as ze } from "../hooks-
|
|
17
|
+
import { h as H, u as D, b as K, d as ne, m as Fe, a as Ue, g as Ke, o as ze } from "../hooks-zu7yblbi.mjs";
|
|
18
18
|
import x from "@mui/material/Box";
|
|
19
19
|
import { useTheme as qe } from "@mui/material/styles";
|
|
20
20
|
import { Text as y, Icon as M, MerchantLogo as je, TextField as ee, P as Xe } from "@mxenabled/mxui";
|
|
@@ -29,19 +29,19 @@ import { getUnixTime as et } from "date-fns/getUnixTime";
|
|
|
29
29
|
import { startOfMonth as tt } from "date-fns/startOfMonth";
|
|
30
30
|
import { startOfToday as F } from "date-fns/startOfToday";
|
|
31
31
|
import at from "@mui/material/styles/useTheme";
|
|
32
|
-
import { C as nt } from "../ConnectDrawer-
|
|
32
|
+
import { C as nt } from "../ConnectDrawer-CVt-8rPJ.mjs";
|
|
33
33
|
import ot from "@mui/material/Divider";
|
|
34
34
|
import rt from "@mui/material/MenuItem";
|
|
35
35
|
import it from "@mui/material/RadioGroup";
|
|
36
36
|
import { ExpandMore as st } from "@mxenabled/mx-icons";
|
|
37
|
-
import { C as ct } from "../CurrencyInput-
|
|
38
|
-
import { a as lt, u as dt } from "../CategorySelectorDrawer-
|
|
37
|
+
import { C as ct } from "../CurrencyInput-CDY0awYV.mjs";
|
|
38
|
+
import { a as lt, u as dt } from "../CategorySelectorDrawer-BMmxw2oY.mjs";
|
|
39
39
|
import { b as U } from "../Localization-2MODESHW.mjs";
|
|
40
40
|
import { u as ut } from "../useAriaLive-MkYebyUR.mjs";
|
|
41
41
|
import { S as mt } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
42
42
|
import { u as _t } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
43
|
-
import { u as pt } from "../useWidgetLoadTimer-
|
|
44
|
-
import { W as gt } from "../WidgetContainer-
|
|
43
|
+
import { u as pt } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
|
|
44
|
+
import { W as gt } from "../WidgetContainer-sC5KLXHI.mjs";
|
|
45
45
|
import { A } from "../Analytics-i5h6BxR1.mjs";
|
|
46
46
|
import { S as ht } from "../SearchBox-B7km148n.mjs";
|
|
47
47
|
import { D as te } from "../Drawer-DV4NTsFg.mjs";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ import Je from "@mui/material/Card";
|
|
|
17
17
|
import et from "@mui/material/CardContent";
|
|
18
18
|
import Ne from "@mui/material/Divider";
|
|
19
19
|
import Ve from "@mui/material/Grid";
|
|
20
|
-
import { u as A, m as J, g as $, b as ye, h as ve, d as De, B as Ce, p as tt, f as Ge, a as ot } from "../hooks-
|
|
20
|
+
import { u as A, m as J, g as $, b as ye, h as ve, d as De, B as Ce, p as tt, f as Ge, a as ot } from "../hooks-zu7yblbi.mjs";
|
|
21
21
|
import { b as nt } from "../Localization-2MODESHW.mjs";
|
|
22
22
|
import { C as we } from "../CurrencyText-C-85TnUF.mjs";
|
|
23
23
|
import { C as Re, b as Fe, c as kt } from "../Category-CevNQ03n.mjs";
|
|
@@ -30,22 +30,22 @@ import Vt from "@mui/material/ToggleButton";
|
|
|
30
30
|
import Ft from "@mui/material/ToggleButtonGroup";
|
|
31
31
|
import { parseISO as it } from "date-fns/parseISO";
|
|
32
32
|
import { H as ke } from "../HeaderCell-DjuifqHJ.mjs";
|
|
33
|
-
import { T as G, b as $t } from "../ViewMoreMicroCard-
|
|
33
|
+
import { T as G, b as $t } from "../ViewMoreMicroCard-C4QiAZz4.mjs";
|
|
34
34
|
import { useGridApiContext as zt, useGridRootProps as Kt, DataGridPro as Yt } from "@mui/x-data-grid-pro";
|
|
35
35
|
import jt from "@mui/material/Badge";
|
|
36
36
|
import Ut from "@mui/material/IconButton";
|
|
37
37
|
import { A as v } from "../Analytics-i5h6BxR1.mjs";
|
|
38
|
-
import { T as lt } from "../TransactionList-
|
|
39
|
-
import { T as ct } from "../TransactionDetails-
|
|
38
|
+
import { T as lt } from "../TransactionList-BibbhhS9.mjs";
|
|
39
|
+
import { T as ct } from "../TransactionDetails-Cedp4OOg.mjs";
|
|
40
40
|
import { D as We } from "../Drawer-DV4NTsFg.mjs";
|
|
41
|
-
import { u as Ie } from "../useWidgetLoadTimer-
|
|
41
|
+
import { u as Ie } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
|
|
42
42
|
import { L as Le } from "../Loader-D3rjKx72.mjs";
|
|
43
|
-
import { W as dt } from "../WidgetContainer-
|
|
44
|
-
import { L as Be } from "../LineChart-
|
|
45
|
-
import { M as Xt } from "../MiniWidgetContainer-
|
|
43
|
+
import { W as dt } from "../WidgetContainer-sC5KLXHI.mjs";
|
|
44
|
+
import { L as Be } from "../LineChart-Pu3pKqtQ.mjs";
|
|
45
|
+
import { M as Xt } from "../MiniWidgetContainer-DhEx4qKi.mjs";
|
|
46
46
|
import { subMonths as Zt } from "date-fns";
|
|
47
47
|
import { TrendingUp as Qt, TrendingDown as qt, MultilineChart as Jt, ExpandLess as eo, ExpandMore as to, ArrowBack as oo } from "@mxenabled/mx-icons";
|
|
48
|
-
import { M as no } from "../MicroWidgetContainer-
|
|
48
|
+
import { M as no } from "../MicroWidgetContainer-CMES42I1.mjs";
|
|
49
49
|
import so from "@mui/material/Collapse";
|
|
50
50
|
import ro from "@mui/material/List";
|
|
51
51
|
import ao from "@mui/material/ListItem";
|
|
@@ -56,10 +56,10 @@ import ut from "@mui/material/styles/useTheme";
|
|
|
56
56
|
import { Stack as uo } from "@mui/material";
|
|
57
57
|
import mo from "@mui/material/Paper";
|
|
58
58
|
import { b as ho } from "../CategoryUtil-Cufq3fxg.mjs";
|
|
59
|
-
import { E as go } from "../ExportCsvAction-
|
|
60
|
-
import { u as po } from "../useInsightsEnabled-
|
|
59
|
+
import { E as go } from "../ExportCsvAction-BSK-EZ4D.mjs";
|
|
60
|
+
import { u as po } from "../useInsightsEnabled-CYLDtNYt.mjs";
|
|
61
61
|
import { E as fo } from "../EmptyState-DHAkGsjk.mjs";
|
|
62
|
-
import { C as yo } from "../ConnectDrawer-
|
|
62
|
+
import { C as yo } from "../ConnectDrawer-CVt-8rPJ.mjs";
|
|
63
63
|
const mt = ({ categoryGuid: t, topLevelCategoryGuid: s }) => {
|
|
64
64
|
const { categories: n } = A(), { getCategoryName: o } = J(), r = o(t);
|
|
65
65
|
return /* @__PURE__ */ C(x, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getUnixTime as l } from "date-fns/getUnixTime";
|
|
2
2
|
import y from "bowser";
|
|
3
|
-
import { F as u, A as r } from "./Fetch-
|
|
3
|
+
import { F as u, A as r } from "./Fetch-C67go-m2.mjs";
|
|
4
4
|
import _ from "react";
|
|
5
5
|
const g = async (o, t, n = "1.0.0", s = "Experiences") => {
|
|
6
6
|
const a = new A(o, t), { analytics_session: i } = await a.initializeAnalyticsSession(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef as r, useEffect as c } from "react";
|
|
2
|
-
import { g as l } from "./hooks-
|
|
2
|
+
import { g as l } from "./hooks-zu7yblbi.mjs";
|
|
3
3
|
let n = !0;
|
|
4
4
|
const d = ({ widgetName: i, isLoaded: u = !0 }) => {
|
|
5
5
|
const { onEvent: o } = l(), t = r(null), s = r(!1), e = r(!1);
|
package/package.json
CHANGED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { jsx as c, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { Icon as w } from "@mxenabled/mx-icons";
|
|
3
|
-
import { H3 as M, P as S } from "@mxenabled/mxui";
|
|
4
|
-
import y from "@mui/material/Button";
|
|
5
|
-
import j from "@mui/material/Dialog";
|
|
6
|
-
import N from "@mui/material/DialogActions";
|
|
7
|
-
import P from "@mui/material/DialogContent";
|
|
8
|
-
import A from "@mui/material/IconButton";
|
|
9
|
-
import F from "@mui/material/InputAdornment";
|
|
10
|
-
import C from "@mui/material/Stack";
|
|
11
|
-
import G from "@mui/material/TextField";
|
|
12
|
-
import { k as $ } from "./hooks-0kWPTHNb.mjs";
|
|
13
|
-
import { b as _ } from "./Category-CevNQ03n.mjs";
|
|
14
|
-
import { b as B } from "./Localization-2MODESHW.mjs";
|
|
15
|
-
import { f as x } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
16
|
-
const h = (o, e) => o.find((t) => t.guid === e), E = (o, e) => o.find((t) => t.guid === e), H = (o, e) => {
|
|
17
|
-
const t = o.find((r) => r.subCategories.find((i) => i.guid === e));
|
|
18
|
-
if (t)
|
|
19
|
-
return t.subCategories.find((r) => r.guid === e);
|
|
20
|
-
}, ot = (o, e) => {
|
|
21
|
-
const t = [];
|
|
22
|
-
for (const r of e) {
|
|
23
|
-
const i = h(o, r.category_guid);
|
|
24
|
-
if (!i) continue;
|
|
25
|
-
const n = i.parent_guid ?? i.guid, a = h(o, n);
|
|
26
|
-
if (!a) continue;
|
|
27
|
-
const s = {
|
|
28
|
-
amount: r.total,
|
|
29
|
-
category: i,
|
|
30
|
-
guid: i.guid,
|
|
31
|
-
subCategoryTotals: []
|
|
32
|
-
}, u = t.find((d) => d.guid === n);
|
|
33
|
-
u ? (u.amount += r.total, u.subCategoryTotals.push(s)) : t.push({
|
|
34
|
-
amount: r.total,
|
|
35
|
-
category: a,
|
|
36
|
-
guid: n,
|
|
37
|
-
subCategoryTotals: [s]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
return t;
|
|
41
|
-
}, rt = (o, e) => {
|
|
42
|
-
const t = o.find((r) => r.guid === e);
|
|
43
|
-
return t ? t.guid === _.INCOME || t.parent_guid === _.INCOME : !1;
|
|
44
|
-
}, O = ({
|
|
45
|
-
closeAriaLabel: o,
|
|
46
|
-
content: e,
|
|
47
|
-
inputLabel: t,
|
|
48
|
-
inputValue: r,
|
|
49
|
-
isOpen: i,
|
|
50
|
-
handleInputChange: n,
|
|
51
|
-
handleModalClose: a,
|
|
52
|
-
handlePrimaryAction: s,
|
|
53
|
-
handleSecondaryAction: u,
|
|
54
|
-
primaryColor: d = "primary",
|
|
55
|
-
primaryText: l,
|
|
56
|
-
secondaryColor: p = "primary",
|
|
57
|
-
secondaryText: m,
|
|
58
|
-
title: b
|
|
59
|
-
}) => {
|
|
60
|
-
const I = parseFloat(r ?? "0"), T = r !== "" && r !== "0" && !isNaN(I);
|
|
61
|
-
return /* @__PURE__ */ c(
|
|
62
|
-
j,
|
|
63
|
-
{
|
|
64
|
-
"aria-label": b,
|
|
65
|
-
"aria-labelledby": "modal-title",
|
|
66
|
-
maxWidth: "xs",
|
|
67
|
-
onClose: a,
|
|
68
|
-
open: i,
|
|
69
|
-
role: "dialog",
|
|
70
|
-
sx: { "& .MuiDialogContent-root": { p: 0 } },
|
|
71
|
-
children: /* @__PURE__ */ c(P, { children: /* @__PURE__ */ f(
|
|
72
|
-
"form",
|
|
73
|
-
{
|
|
74
|
-
onSubmit: (g) => {
|
|
75
|
-
g.preventDefault(), s();
|
|
76
|
-
},
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ f(
|
|
79
|
-
C,
|
|
80
|
-
{
|
|
81
|
-
sx: {
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
flexDirection: "row",
|
|
84
|
-
justifyContent: "space-between",
|
|
85
|
-
pb: 12,
|
|
86
|
-
pl: 24,
|
|
87
|
-
position: "relative",
|
|
88
|
-
pr: 16,
|
|
89
|
-
pt: 24
|
|
90
|
-
},
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ c(M, { id: "modal-title", children: b }),
|
|
93
|
-
/* @__PURE__ */ c(
|
|
94
|
-
A,
|
|
95
|
-
{
|
|
96
|
-
"aria-label": o,
|
|
97
|
-
onClick: a,
|
|
98
|
-
sx: { minHeight: 24, position: "absolute", right: 8, top: 18 },
|
|
99
|
-
children: /* @__PURE__ */ c(w, { name: "close", sx: { color: "action.active" } })
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ f(C, { sx: { gap: 24, px: 24 }, children: [
|
|
106
|
-
/* @__PURE__ */ c(S, { variant: "subtitle1", children: e }),
|
|
107
|
-
t && /* @__PURE__ */ c(
|
|
108
|
-
G,
|
|
109
|
-
{
|
|
110
|
-
InputProps: {
|
|
111
|
-
startAdornment: /* @__PURE__ */ c(F, { position: "start", children: "$" })
|
|
112
|
-
},
|
|
113
|
-
autoFocus: !0,
|
|
114
|
-
inputMode: "decimal",
|
|
115
|
-
inputProps: {
|
|
116
|
-
"aria-label": t,
|
|
117
|
-
noValidate: !0,
|
|
118
|
-
pattern: "[0-9]*\\.?[0-9]*"
|
|
119
|
-
},
|
|
120
|
-
label: t,
|
|
121
|
-
onChange: ({ target: { value: g } }) => {
|
|
122
|
-
/^\d*\.?\d*$/.test(g) && n?.(g);
|
|
123
|
-
},
|
|
124
|
-
type: "text",
|
|
125
|
-
value: r
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
] }),
|
|
129
|
-
/* @__PURE__ */ f(
|
|
130
|
-
N,
|
|
131
|
-
{
|
|
132
|
-
sx: {
|
|
133
|
-
justifyContent: "flex-end",
|
|
134
|
-
gap: 16,
|
|
135
|
-
p: 24,
|
|
136
|
-
">:not(style)~:not(style)": { ml: 0 }
|
|
137
|
-
},
|
|
138
|
-
children: [
|
|
139
|
-
m && /* @__PURE__ */ c(
|
|
140
|
-
y,
|
|
141
|
-
{
|
|
142
|
-
"aria-label": m,
|
|
143
|
-
color: p,
|
|
144
|
-
onClick: u,
|
|
145
|
-
children: m
|
|
146
|
-
}
|
|
147
|
-
),
|
|
148
|
-
/* @__PURE__ */ c(
|
|
149
|
-
y,
|
|
150
|
-
{
|
|
151
|
-
"aria-label": l,
|
|
152
|
-
color: d,
|
|
153
|
-
disabled: t ? !T : !1,
|
|
154
|
-
onClick: s,
|
|
155
|
-
variant: "contained",
|
|
156
|
-
children: l
|
|
157
|
-
}
|
|
158
|
-
)
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
) })
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
}, nt = O, D = (o, e) => !o && !e ? 0 : !o && e ? 101 : e / o * 100, v = (o, e) => {
|
|
168
|
-
const t = {
|
|
169
|
-
background: e.palette.success.main,
|
|
170
|
-
description: o <= 100 ? e.palette.text.secondary : e.palette.error.main,
|
|
171
|
-
text: e.palette.common.white,
|
|
172
|
-
mercury: e.palette.success.lighter
|
|
173
|
-
};
|
|
174
|
-
return o > 100 ? (t.background = e.palette.error.main, t.mercury = e.palette.error.lighter) : o > 80 && (t.background = e.palette.warning.main, t.text = e.palette.grey[900], t.mercury = e.palette.warning.lighter), t;
|
|
175
|
-
}, it = () => {
|
|
176
|
-
const { detailedBudgets: o } = $();
|
|
177
|
-
return o.map((t) => {
|
|
178
|
-
const r = t.transaction_total;
|
|
179
|
-
return t.amount - r;
|
|
180
|
-
}).reduce((t, r) => t + r, 0);
|
|
181
|
-
}, at = (o, e, t, r) => {
|
|
182
|
-
const i = [];
|
|
183
|
-
for (const n of o) {
|
|
184
|
-
const a = E(e, n.category_guid);
|
|
185
|
-
if (!a) continue;
|
|
186
|
-
const s = a.totalAmount, u = D(n.amount, s), d = n.amount - s;
|
|
187
|
-
i.push({
|
|
188
|
-
...n,
|
|
189
|
-
budgetColors: v(u, r),
|
|
190
|
-
category: a,
|
|
191
|
-
description: B(
|
|
192
|
-
d < 0 ? t.budget_remaining_over : t.budget_remaining_left,
|
|
193
|
-
x(Math.abs(d), "0,0")
|
|
194
|
-
),
|
|
195
|
-
percentage: u,
|
|
196
|
-
subBudgets: [],
|
|
197
|
-
transaction_total: s
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
for (const n of o) {
|
|
201
|
-
const a = H(e, n.category_guid);
|
|
202
|
-
if (!a) continue;
|
|
203
|
-
const s = a.currentAmount, u = i.find((p) => p.category_guid === a.parent_guid);
|
|
204
|
-
if (!u) continue;
|
|
205
|
-
const d = n.amount - s, l = D(n.amount, s);
|
|
206
|
-
u && u.subBudgets.push({
|
|
207
|
-
...n,
|
|
208
|
-
budgetColors: v(l, r),
|
|
209
|
-
category: a,
|
|
210
|
-
description: B(
|
|
211
|
-
d < 0 ? t.budget_remaining_over : t.budget_remaining_left,
|
|
212
|
-
x(Math.abs(d), "0,0")
|
|
213
|
-
),
|
|
214
|
-
percentage: l,
|
|
215
|
-
subBudgets: [],
|
|
216
|
-
transaction_total: s
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
return i;
|
|
220
|
-
}, k = (o, e) => o.find((t) => t.guid === e), st = (o, e, t) => {
|
|
221
|
-
const r = k(o, t);
|
|
222
|
-
if (r)
|
|
223
|
-
return k(r.subBudgets, e);
|
|
224
|
-
};
|
|
225
|
-
export {
|
|
226
|
-
nt as C,
|
|
227
|
-
st as a,
|
|
228
|
-
at as b,
|
|
229
|
-
E as c,
|
|
230
|
-
H as d,
|
|
231
|
-
ot as e,
|
|
232
|
-
k as f,
|
|
233
|
-
h as g,
|
|
234
|
-
rt as i,
|
|
235
|
-
it as u
|
|
236
|
-
};
|