@mx-cartographer/experiences 9.7.167 → 9.7.169
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 +8 -0
- package/dist/budgets/components/budgetdetails/BudgetDetails.es.js +35 -35
- package/dist/budgets/components/budgetdetails/BudgetDetails.es.js.map +1 -1
- package/dist/core/types/AppData.d.ts +1 -0
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +10 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +118 -102
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.d.ts +8 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js +140 -73
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js.map +1 -1
- package/dist/insights-v2/components/Header.es.js +4 -4
- package/dist/insights-v2/components/shared/elevation.es.js +2 -3
- package/dist/insights-v2/components/shared/elevation.es.js.map +1 -1
- package/dist/spending/components/Spending.es.js +52 -52
- package/dist/spending/components/Spending.es.js.map +1 -1
- package/dist/trends/components/CategoryDetails.es.js +36 -36
- package/dist/trends/components/CategoryDetails.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { useAppConfig as
|
|
2
|
-
import { useScreenSize as
|
|
3
|
-
import { formatCurrency as
|
|
4
|
-
import
|
|
5
|
-
import { getCategoryColor as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { useAppConfig as $, useGlobalCopyStore as A, useTransactionStore as G, useTrendsStore as R } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { useScreenSize as j } from "../../common/hooks/useScreenSize.es.js";
|
|
3
|
+
import { formatCurrency as z } from "../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import M from "../../common/components/drawer/Drawer.es.js";
|
|
5
|
+
import { getCategoryColor as B } from "../../core/utils/CategoryUtil.es.js";
|
|
6
|
+
import E from "../../transactions/components/transactionwidget/actions/ExportCsvAction.es.js";
|
|
7
|
+
import P from "../../transactions/components/shared/TransactionList.es.js";
|
|
8
|
+
import W from "../../transactions/components/shared/TransactionDetails.es.js";
|
|
9
|
+
import F from "./CategoryDetailChart.es.js";
|
|
10
10
|
import u from "react";
|
|
11
|
-
import { observer as
|
|
11
|
+
import { observer as H } from "mobx-react-lite";
|
|
12
12
|
import c from "@mui/material/Stack";
|
|
13
|
-
import { CategoryIcon as
|
|
13
|
+
import { CategoryIcon as O, Text as h } from "@mxenabled/mxui";
|
|
14
14
|
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
15
|
-
import { useTheme as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
var
|
|
21
|
-
const g =
|
|
15
|
+
import { useTheme as q } from "@mui/material/styles";
|
|
16
|
+
import J from "@mui/material/List";
|
|
17
|
+
import K from "@mui/material/ListItem";
|
|
18
|
+
import N from "@mui/material/ListItemAvatar";
|
|
19
|
+
import Q from "@mui/material/ListItemText";
|
|
20
|
+
var ut = H(() => {
|
|
21
|
+
const g = q(), { clientConfig: y, is_mobile_webview: b } = $(), { isDesktop: C, isSmallTablet: _, isTablet: x } = j(), { common: v, trends: o } = A(), { selectedCategoryData: e, selectedDateRangeMonthRange: T } = R(), { sortedTransactions: a } = G(), [m, l] = u.useState(null);
|
|
22
22
|
if (!e) return null;
|
|
23
|
-
const { guid: r, name: p, is_income: d, totalAmount:
|
|
23
|
+
const { guid: r, name: p, is_income: d, totalAmount: S } = e, L = B(r, g), w = d ? o.income_label : o.spending_label, D = `${p}, ${d ? o.monthly_income : o.monthly_spending}`, I = ` ${e.transactions.length === 1 ? o.transaction : o.transactions} (${e.transactions.length})`, s = u.useMemo(() => a.find((n) => n.guid === m), [m, a]), k = a.length > 0 && !b && !y?.transactions?.hide_export_csv && (C || x && !_), f = (n) => n.category_guid === r || n.top_level_category_guid === r;
|
|
24
24
|
return /* @__PURE__ */ i(c, {
|
|
25
25
|
sx: { alignItems: "center" },
|
|
26
26
|
children: [
|
|
@@ -32,13 +32,13 @@ var ft = F(() => {
|
|
|
32
32
|
px: 12,
|
|
33
33
|
width: "100%"
|
|
34
34
|
},
|
|
35
|
-
children: [/* @__PURE__ */ t(
|
|
35
|
+
children: [/* @__PURE__ */ t(J, {
|
|
36
36
|
sx: { px: 12 },
|
|
37
|
-
children: /* @__PURE__ */ i(
|
|
38
|
-
/* @__PURE__ */ t(
|
|
39
|
-
/* @__PURE__ */ t(
|
|
37
|
+
children: /* @__PURE__ */ i(K, { children: [
|
|
38
|
+
/* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(O, { categoryGuid: r }) }),
|
|
39
|
+
/* @__PURE__ */ t(Q, {
|
|
40
40
|
primary: p,
|
|
41
|
-
secondary:
|
|
41
|
+
secondary: T,
|
|
42
42
|
slotProps: {
|
|
43
43
|
primary: {
|
|
44
44
|
component: "div",
|
|
@@ -56,16 +56,16 @@ var ft = F(() => {
|
|
|
56
56
|
/* @__PURE__ */ t(h, {
|
|
57
57
|
component: "div",
|
|
58
58
|
variant: "h3",
|
|
59
|
-
children:
|
|
59
|
+
children: z(Math.abs(S), "0,0.00")
|
|
60
60
|
})
|
|
61
61
|
] })
|
|
62
|
-
}), /* @__PURE__ */ t(
|
|
63
|
-
chartColor:
|
|
64
|
-
chartLabel:
|
|
65
|
-
chartTitle:
|
|
62
|
+
}), /* @__PURE__ */ t(F, {
|
|
63
|
+
chartColor: L,
|
|
64
|
+
chartLabel: w,
|
|
65
|
+
chartTitle: D
|
|
66
66
|
})]
|
|
67
67
|
}),
|
|
68
|
-
/* @__PURE__ */ t(
|
|
68
|
+
/* @__PURE__ */ t(P, {
|
|
69
69
|
filter: f,
|
|
70
70
|
onClick: l,
|
|
71
71
|
scrollsWithParent: !0,
|
|
@@ -80,22 +80,22 @@ var ft = F(() => {
|
|
|
80
80
|
children: [/* @__PURE__ */ t(h, {
|
|
81
81
|
bold: !0,
|
|
82
82
|
variant: "body1",
|
|
83
|
-
children:
|
|
84
|
-
}),
|
|
83
|
+
children: I
|
|
84
|
+
}), k && /* @__PURE__ */ t(E, { filter: f })]
|
|
85
85
|
})
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */ t(
|
|
88
|
-
ariaLabelClose:
|
|
87
|
+
/* @__PURE__ */ t(M, {
|
|
88
|
+
ariaLabelClose: v.close_aria,
|
|
89
89
|
isOpen: !!s,
|
|
90
90
|
onClose: () => l(""),
|
|
91
91
|
title: o.transaction,
|
|
92
|
-
children: s && /* @__PURE__ */ t(
|
|
92
|
+
children: s && /* @__PURE__ */ t(W, { transaction: s })
|
|
93
93
|
})
|
|
94
94
|
]
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
ut as CategoryDetails
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
//# sourceMappingURL=CategoryDetails.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryDetails.es.js","names":[],"sources":["../../../src/trends/components/CategoryDetails.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemText from '@mui/material/ListItemText'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, Text } from '@mxenabled/mxui'\n\nimport {\n Drawer,\n useAppConfig,\n useGlobalCopyStore,\n useTrendsStore,\n useTransactionStore,\n useScreenSize,\n} from '../../common'\nimport { type Transaction } from '../../core'\n\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\nimport { ExportCsvAction, TransactionDetails, TransactionList } from '../../transactions'\n\nimport CategoryDetailChart from './CategoryDetailChart'\nimport { formatCurrency } from '../../core/utils/NumberFormatting'\n\nexport const CategoryDetails = observer(() => {\n const theme = useTheme()\n const { is_mobile_webview } = useAppConfig()\n const { isDesktop, isSmallTablet, isTablet } = useScreenSize()\n const { common: commonCopy, trends: copy } = useGlobalCopyStore()\n const { selectedCategoryData, selectedDateRangeMonthRange } = useTrendsStore()\n const { sortedTransactions: transactions } = useTransactionStore()\n\n const [transactionGuid, setTransactionGuid] = React.useState<string | null>(null)\n\n if (!selectedCategoryData) {\n return null\n }\n\n const { guid, name, is_income, totalAmount } = selectedCategoryData\n\n const chartColor = getCategoryColor(guid, theme)\n const chartLabel = is_income ? copy.income_label : copy.spending_label\n const chartTitle = `${name}, ${is_income ? copy.monthly_income : copy.monthly_spending}`\n const transactionCountLabel = ` ${\n selectedCategoryData.transactions.length === 1 ? copy.transaction : copy.transactions\n } (${selectedCategoryData.transactions.length})`\n\n const transaction = React.useMemo(\n () => transactions.find((t) => t.guid === transactionGuid),\n [transactionGuid, transactions],\n )\n\n const shouldShowExportButton =\n transactions.length > 0
|
|
1
|
+
{"version":3,"file":"CategoryDetails.es.js","names":[],"sources":["../../../src/trends/components/CategoryDetails.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemText from '@mui/material/ListItemText'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, Text } from '@mxenabled/mxui'\n\nimport {\n Drawer,\n useAppConfig,\n useGlobalCopyStore,\n useTrendsStore,\n useTransactionStore,\n useScreenSize,\n} from '../../common'\nimport { type Transaction } from '../../core'\n\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\nimport { ExportCsvAction, TransactionDetails, TransactionList } from '../../transactions'\n\nimport CategoryDetailChart from './CategoryDetailChart'\nimport { formatCurrency } from '../../core/utils/NumberFormatting'\n\nexport const CategoryDetails = observer(() => {\n const theme = useTheme()\n const { clientConfig, is_mobile_webview } = useAppConfig()\n const { isDesktop, isSmallTablet, isTablet } = useScreenSize()\n const { common: commonCopy, trends: copy } = useGlobalCopyStore()\n const { selectedCategoryData, selectedDateRangeMonthRange } = useTrendsStore()\n const { sortedTransactions: transactions } = useTransactionStore()\n\n const [transactionGuid, setTransactionGuid] = React.useState<string | null>(null)\n\n if (!selectedCategoryData) {\n return null\n }\n\n const { guid, name, is_income, totalAmount } = selectedCategoryData\n\n const chartColor = getCategoryColor(guid, theme)\n const chartLabel = is_income ? copy.income_label : copy.spending_label\n const chartTitle = `${name}, ${is_income ? copy.monthly_income : copy.monthly_spending}`\n const transactionCountLabel = ` ${\n selectedCategoryData.transactions.length === 1 ? copy.transaction : copy.transactions\n } (${selectedCategoryData.transactions.length})`\n\n const transaction = React.useMemo(\n () => transactions.find((t) => t.guid === transactionGuid),\n [transactionGuid, transactions],\n )\n\n const shouldShowExportButton =\n transactions.length > 0 &&\n !is_mobile_webview &&\n !clientConfig?.transactions?.hide_export_csv &&\n (isDesktop || (isTablet && !isSmallTablet))\n\n const categoryFilter = (t: Transaction) =>\n t.category_guid === guid || t.top_level_category_guid === guid\n\n return (\n <Stack sx={{ alignItems: 'center' }}>\n <Stack sx={{ bgcolor: 'background.paper', borderRadius: 0, pt: 16, px: 12, width: '100%' }}>\n <List sx={{ px: 12 }}>\n <ListItem>\n <ListItemAvatar>\n <CategoryIcon categoryGuid={guid} />\n </ListItemAvatar>\n <ListItemText\n primary={name}\n secondary={selectedDateRangeMonthRange}\n slotProps={{\n primary: { component: 'div', variant: 'h3', fontSize: 18, fontWeight: 700 },\n secondary: { component: 'div', variant: 'body2', fontSize: 13 },\n }}\n />\n <Text component=\"div\" variant=\"h3\">\n {formatCurrency(Math.abs(totalAmount), '0,0.00')}\n </Text>\n </ListItem>\n </List>\n\n <CategoryDetailChart\n chartColor={chartColor}\n chartLabel={chartLabel}\n chartTitle={chartTitle}\n />\n </Stack>\n <TransactionList\n filter={categoryFilter}\n onClick={setTransactionGuid}\n scrollsWithParent={true}\n stickyHeader={\n <Stack\n alignItems=\"center\"\n direction=\"row\"\n justifyContent=\"space-between\"\n sx={{ px: 24, py: 4 }}\n >\n <Text bold={true} variant=\"body1\">\n {transactionCountLabel}\n </Text>\n {shouldShowExportButton && <ExportCsvAction filter={categoryFilter} />}\n </Stack>\n }\n />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={Boolean(transaction)}\n onClose={() => setTransactionGuid('')}\n title={copy.transaction}\n >\n {transaction && <TransactionDetails transaction={transaction} />}\n </Drawer>\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,IAAa,KAAkB,EAAA,MAAe;AAC5C,QAAM,IAAQ,EAAS,GACjB,EAAE,cAAA,GAAc,mBAAA,EAAA,IAAsB,EAAa,GACnD,EAAE,WAAA,GAAW,eAAA,GAAe,UAAA,EAAA,IAAa,EAAc,GACvD,EAAE,QAAQ,GAAY,QAAQ,EAAA,IAAS,EAAmB,GAC1D,EAAE,sBAAA,GAAsB,6BAAA,EAAA,IAAgC,EAAe,GACvE,EAAE,oBAAoB,EAAA,IAAiB,EAAoB,GAE3D,CAAC,GAAiB,CAAA,IAAsB,EAAM,SAAwB,IAAI;AAEhF,MAAI,CAAC,EACH,QAAO;AAGT,QAAM,EAAE,MAAA,GAAM,MAAA,GAAM,WAAA,GAAW,aAAA,EAAA,IAAgB,GAEzC,IAAa,EAAiB,GAAM,CAAK,GACzC,IAAa,IAAY,EAAK,eAAe,EAAK,gBAClD,IAAa,GAAG,CAAA,KAAS,IAAY,EAAK,iBAAiB,EAAK,gBAAA,IAChE,IAAwB,IAC5B,EAAqB,aAAa,WAAW,IAAI,EAAK,cAAc,EAAK,YAAA,KACtE,EAAqB,aAAa,MAAA,KAEjC,IAAc,EAAM,QAAA,MAClB,EAAa,KAAA,CAAM,MAAM,EAA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