@mx-cartographer/experiences 6.26.0-alpha.sms7 → 6.26.1-alpha.mega1
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 +31 -1
- package/dist/AccountStore-DkL93tXL.mjs +317 -0
- package/dist/AccountStore-DkL93tXL.mjs.map +1 -0
- package/dist/BudgetUtil-CVqAdv-j.mjs +187 -0
- package/dist/BudgetUtil-CVqAdv-j.mjs.map +1 -0
- package/dist/CashflowStore-gPEEBiXo.mjs +53 -0
- package/dist/CashflowStore-gPEEBiXo.mjs.map +1 -0
- package/dist/CategoryStore-m7oieLzP.mjs +260 -0
- package/dist/CategoryStore-m7oieLzP.mjs.map +1 -0
- package/dist/ConnectMiniWidget-CQWafYtQ.mjs +22966 -0
- package/dist/ConnectMiniWidget-CQWafYtQ.mjs.map +1 -0
- package/dist/DebtsStore-cUhIgJx6.mjs +145 -0
- package/dist/DebtsStore-cUhIgJx6.mjs.map +1 -0
- package/dist/Donut-CGNFni9y.mjs +58 -0
- package/dist/Donut-CGNFni9y.mjs.map +1 -0
- package/dist/FinstrongStore-BDG7l0nI.mjs +183 -0
- package/dist/FinstrongStore-BDG7l0nI.mjs.map +1 -0
- package/dist/GoalStore-o2waGeyf.mjs +293 -0
- package/dist/GoalStore-o2waGeyf.mjs.map +1 -0
- package/dist/Loader-CwdK8lfx.mjs +147 -0
- package/dist/Loader-CwdK8lfx.mjs.map +1 -0
- package/dist/MerchantStore-Cck9IGIH.mjs +125 -0
- package/dist/MerchantStore-Cck9IGIH.mjs.map +1 -0
- package/dist/NetWorthStore-D5eUfGQt.mjs +66 -0
- package/dist/NetWorthStore-D5eUfGQt.mjs.map +1 -0
- package/dist/NotificationStore-DCxw8W7u.mjs +141 -0
- package/dist/NotificationStore-DCxw8W7u.mjs.map +1 -0
- package/dist/RecurringTransactionsStore-Bijrgllq.mjs +337 -0
- package/dist/RecurringTransactionsStore-Bijrgllq.mjs.map +1 -0
- package/dist/SettingsStore-BhOYgUOa.mjs +352 -0
- package/dist/SettingsStore-BhOYgUOa.mjs.map +1 -0
- package/dist/TransactionApi-Dnbyi1JL.mjs +175 -0
- package/dist/TransactionApi-Dnbyi1JL.mjs.map +1 -0
- package/dist/TransactionStore-CiEtt5XJ.mjs +417 -0
- package/dist/TransactionStore-CiEtt5XJ.mjs.map +1 -0
- package/dist/TrendsStore-Idq3QfoA.mjs +131 -0
- package/dist/TrendsStore-Idq3QfoA.mjs.map +1 -0
- package/dist/accounts/index.es.js +18 -0
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +170 -0
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1116 -0
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/index.es.js +118 -0
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +10 -0
- package/dist/categories/index.es.js.map +1 -0
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/components/charts/StackedLineChart.d.ts +2 -2
- package/dist/common/components/charts/stackedlinechart/CustomLegend.d.ts +1 -0
- package/dist/common/context/hooks.d.ts +13 -13
- package/dist/common/index.es.js +1549 -0
- package/dist/common/index.es.js.map +1 -0
- package/dist/common/types/AppData.d.ts +2 -0
- package/dist/common/types/Category.d.ts +2 -8
- package/dist/common/types/index.d.ts +1 -1
- package/dist/dashboard/index.es.js +257 -0
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +9 -0
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +11 -0
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +9 -0
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/help/index.es.js +6 -0
- package/dist/help/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1694 -0
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +7 -0
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +21 -0
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +11 -0
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +116 -0
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/index.es.js +14 -0
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +112 -0
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +632 -0
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/index.es.js +19 -0
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/components/CategoriesList.d.ts +5 -5
- package/dist/trends/components/CategoriesListItem.d.ts +7 -4
- package/dist/trends/components/CategoryDetailChart.d.ts +5 -1
- package/dist/trends/index.es.js +10 -0
- package/dist/trends/index.es.js.map +1 -0
- package/dist/trends/stores/TrendsStore.d.ts +11 -16
- package/package.json +91 -3
- package/dist/index.d.ts +0 -22
- package/dist/index.es.js +0 -29873
- package/dist/index.es.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../src/spending/utils/SpendingData.ts","../../src/spending/components/SpendingTabLabel.tsx","../../src/spending/components/SpendingDonut.tsx","../../src/spending/components/SpendingLegend.tsx","../../src/spending/components/MiniSpendingChart.tsx","../../src/spending/SpendingMiniWidget.tsx","../../src/spending/components/SpendingList.tsx","../../src/spending/components/SpendingChart.tsx","../../src/spending/components/Spending.tsx","../../src/spending/SpendingWidget.tsx"],"sourcesContent":["import { Theme } from '@mui/material'\n\nimport {\n Category,\n CategoryGuids,\n DateRangeCategoryTotals,\n DonutData,\n GoalsCopy,\n} from '../../common'\n\nimport { getCategoryColor } from '../../categories/util/CategoryUtil'\n\nconst TOP_CATEGORY_LENGTH = 5\n\nexport interface CategoryTotal {\n guid: string\n name: string\n color: string\n categoryTotals?: CategoryTotal[]\n amount: number\n}\n\nexport interface SpendingData {\n categoryData: CategoryTotal[]\n donutData: DonutData[]\n totalAmount: number\n}\n\n/**\n * Rolls all categories up into parent categories and return an array of CategoryTotal items.\n * @param categories - Array of all categories\n * @param theme - The current theme to use for colors\n * @param totals - And array of type DateRangeCategoryTotals\n */\nconst getTotalsByParentCategory = (\n categories: Category[],\n theme: Theme,\n totals: DateRangeCategoryTotals[],\n): CategoryTotal[] => {\n // Iterate over the category data from BE and roll up all categories into parent categories\n // acc is the accumulated category totals of type CategoryTotal that is initialized as an empty []\n // curr is the current DateRangeCategoryTotal\n return totals.reduce((acc, curr) => {\n if (curr.total > 0) {\n // Find category and if it doesn't exist, return acc\n const category = categories.find((c) => c.guid === curr.category_guid)\n if (!category) return acc\n\n // Find parent category and if it doesn't exist, return acc\n const parentGuid = category.parent_guid ?? category.guid\n const parentCategory = categories.find((c) => c.guid === parentGuid)\n if (!parentCategory) return acc\n\n const categoryTotal = {\n guid: category.guid,\n name: category.guid === parentGuid ? `General ${category.name}` : category.name,\n color: getCategoryColor(parentCategory.guid, theme),\n amount: curr.total,\n }\n\n // If parent category has already been added to acc then find it and add the current total,\n // otherwise add the parent category to acc.\n const parentCategoryTotal = acc.find((ct) => ct.guid === parentGuid)\n if (parentCategoryTotal) {\n parentCategoryTotal.amount += curr.total\n parentCategoryTotal.categoryTotals?.push(categoryTotal)\n } else {\n acc.push({\n guid: parentGuid,\n name: parentCategory.name,\n color: getCategoryColor(parentCategory.guid, theme),\n categoryTotals: [categoryTotal],\n amount: curr.total,\n })\n }\n }\n\n return acc\n }, [] as CategoryTotal[])\n}\n\n/**\n * Returns an object of type SpendingData containing a subset of category totals related to spending\n * Excludes Income and Transfers\n *\n * @param categories - Array of all categories\n * @param copy - Localized copy\n * @param theme - The current theme to use for colors\n * @param totals - And array of type DateRangeCategoryTotals\n */\nexport const getSpendingData = (\n categories: Category[],\n copy: GoalsCopy, // TODO: Replace after `Other` is added to SpendingCopy\n theme: Theme,\n totals: DateRangeCategoryTotals[],\n): SpendingData => {\n const parentCategoryTotals = getTotalsByParentCategory(categories, theme, totals)\n\n // Filter out Income and Transfers from spending totals\n // Sort in decending order by amount\n const spendingTotals = parentCategoryTotals\n .filter(\n (ct) =>\n ct.guid !== CategoryGuids.INCOME &&\n ct.guid !== CategoryGuids.INVESTMENTS &&\n ct.guid !== CategoryGuids.TRANSFER,\n )\n .sort((cat1, cat2) => cat2.amount - cat1.amount)\n\n // Calculate the total spend\n const totalAmount = spendingTotals.reduce(\n (acc: number, total: CategoryTotal) => acc + total.amount,\n 0,\n )\n\n // Find the number of top categories to include\n const length =\n spendingTotals.length > TOP_CATEGORY_LENGTH ? TOP_CATEGORY_LENGTH : spendingTotals.length\n\n // Only include the top categories\n const categoryData = spendingTotals.slice(0, length)\n\n // Map the category data to donut data\n const donutData = categoryData.map((categoryTotal) => ({\n id: categoryTotal.guid,\n color: getCategoryColor(categoryTotal.guid, theme),\n label: categoryTotal.name,\n value: (categoryTotal.amount / totalAmount) * 100,\n }))\n\n // If there additional categories outside of the top categories, combine them into an Other category\n if (spendingTotals.length > 5) {\n const otherCategories = spendingTotals.slice(TOP_CATEGORY_LENGTH, parentCategoryTotals.length)\n const otherTotal = otherCategories.reduce(\n (acc: number, total: CategoryTotal) => acc + total.amount,\n 0,\n )\n categoryData.push({\n guid: 'other',\n color: theme.palette.categories.others || '',\n name: copy.saving_goal_other,\n categoryTotals: otherCategories,\n amount: otherTotal,\n })\n\n donutData.push({\n id: 'other',\n color: theme.palette.categories.others || '',\n label: copy.saving_goal_other,\n value: (otherTotal / totalAmount) * 100,\n })\n }\n\n // Return an object of type SpendingData\n return {\n categoryData,\n donutData,\n totalAmount,\n }\n}\n\n/**\n * Returns an object of type SpendingData containing a subset of category totals related to income\n * Only includes Income subcategories\n *\n * @param categories - Array of all categories\n * @param monthlyTotals - And array of type DateRangeCategoryTotals\n * @param colors - An array of color strings to use for income colors\n */\nexport const getIncomeData = (\n categories: Category[],\n monthlyTotals: DateRangeCategoryTotals[],\n colors: string[],\n): SpendingData => {\n // Get all income subcategories\n const incomeCategories = categories.filter(\n (category) =>\n category.guid === CategoryGuids.INCOME || category.parent_guid === CategoryGuids.INCOME,\n )\n\n // Filter, sort & map DateRangeCategoryTotals to CategoryTotal objects\n // The filter return only subcategories with a parent category of Income\n // The sort is in acending order due to amounts being negative\n const incomeTotals: CategoryTotal[] = monthlyTotals\n .filter((total) => incomeCategories.some((category) => category.guid === total.category_guid))\n .sort((total1, total2) => total1.total - total2.total)\n .map((total, index) => {\n return {\n guid: total.category_guid,\n name: categories.find((cat) => cat.guid === total.category_guid)?.name,\n color: colors[index],\n categoryTotals: [],\n amount: Math.abs(total.total),\n }\n }) as CategoryTotal[]\n\n // Calculates the total income amount\n const totalAmount = incomeTotals.reduce(\n (acc: number, total: CategoryTotal) => acc + total.amount,\n 0,\n )\n\n // Maps the income totals to donut data\n const donutData = incomeTotals.map((incomeTotal) => ({\n id: incomeTotal.guid,\n color: incomeTotal.color,\n label: incomeTotal.name,\n value: (incomeTotal.amount / totalAmount) * 100,\n }))\n\n // Return an object of type SpendingData\n return {\n categoryData: incomeTotals,\n donutData,\n totalAmount,\n }\n}\n","import React from 'react'\n\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatCurrency } from '../../common'\n\ninterface SpendingTabLabelProps {\n amount: number\n label: string\n}\n\nconst SpendingTabLabel: React.FC<SpendingTabLabelProps> = ({ amount, label }) => {\n return (\n <Stack direction=\"column\">\n <Text bold={true} sx={{ textTransform: 'none' }} variant=\"Body\">\n {label}\n </Text>\n <Text variant=\"XSmall\">{formatCurrency(amount, '0,0')}</Text>\n </Stack>\n )\n}\n\nexport default SpendingTabLabel\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { CategoryIcon, CategoryIconVariants, Text } from '@mxenabled/mxui'\n\nimport {\n CategoryGuids,\n Donut,\n formatCurrency,\n useGlobalCopyStore,\n useScreenSize,\n} from '../../common'\n\nimport type { SpendingData } from '../utils/SpendingData'\nimport Button from '@mui/material/Button'\nimport { useTheme } from '@mui/material'\n\ninterface SpendingDonutProps {\n data: SpendingData\n isIncome?: boolean\n onSelected: (id: string) => void\n onViewTransactions?: (id: string) => void\n selectedId: string\n size?: number\n totalLabel: string\n variant?: 'mini' | 'full'\n}\n\nconst SpendingDonut: React.FC<SpendingDonutProps> = ({\n data,\n isIncome = false,\n onSelected,\n onViewTransactions,\n selectedId,\n size = 150,\n totalLabel,\n variant = 'mini',\n}) => {\n const { spending: spendingCopy } = useGlobalCopyStore()\n const theme = useTheme()\n const { isTablet } = useScreenSize()\n\n const selectedCategory = React.useMemo(\n () => (selectedId ? data.categoryData.find((cd) => cd.guid === selectedId) : undefined),\n [selectedId],\n )\n\n const donutData = React.useMemo(() => {\n if (data.donutData.length > 0) return data.donutData\n\n // Empty Donut zero state\n return [{ id: '0', color: theme.palette.divider, value: 100 }]\n }, [data, theme])\n\n const handleViewTransactions = () => {\n onViewTransactions?.(selectedId)\n }\n\n const iconSize = isTablet ? 32 : 48\n\n return (\n <Donut data={donutData} onClick={onSelected} selectedId={selectedId} size={size}>\n <Stack alignItems=\"center\" height=\"100%\" justifyContent=\"center\" width=\"100%\">\n <Stack alignItems=\"center\" justifyContent=\"center\" minHeight={size} minWidth={size}>\n {selectedCategory && (\n <Stack\n alignItems=\"center\"\n gap={variant === 'mini' ? 0 : 8}\n mb={variant === 'mini' ? 0 : 8}\n mt={variant === 'mini' ? 0 : -16}\n sx={\n variant === 'mini'\n ? { gap: 0, mb: 0 }\n : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }\n }\n >\n <CategoryIcon\n categoryGuid={isIncome ? CategoryGuids.INCOME : selectedCategory.guid}\n size={variant === 'mini' ? 24 : iconSize}\n variant={CategoryIconVariants.Transparent}\n />\n <Text color=\"secondary\" noWrap={true} variant={variant === 'mini' ? 'Tiny' : 'Body'}>\n {selectedCategory ? selectedCategory.name : totalLabel}\n </Text>\n </Stack>\n )}\n\n {!selectedCategory && variant === 'full' && (\n <Text bold={true} color=\"secondary\" sx={{ mb: { xs: 4, xl: 8 } }}>\n {totalLabel}\n </Text>\n )}\n\n <Text variant={variant === 'mini' ? 'H2' : 'H1'}>\n {selectedCategory\n ? formatCurrency(selectedCategory.amount, '0,0')\n : formatCurrency(data.totalAmount, '0,0')}\n </Text>\n\n {!selectedCategory && variant === 'mini' && (\n <Text color=\"secondary\" noWrap={true} variant=\"Tiny\">\n {totalLabel}\n </Text>\n )}\n\n {variant === 'full' && (\n <Button\n aria-label={`View ${selectedCategory?.name || ''} Transactions`}\n disabled={data.categoryData.length === 0}\n onClick={handleViewTransactions}\n sx={{ mt: { xl: 4, xs: 0 }, zIndex: 1 }}\n variant=\"text\"\n >\n {spendingCopy.view_transactions}\n </Button>\n )}\n </Stack>\n </Stack>\n </Donut>\n )\n}\n\nexport default observer(SpendingDonut)\n","import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport type { SpendingData } from '../utils/SpendingData'\n\ninterface SpendingLegendProps {\n data: SpendingData\n onSelected: (id: string) => void\n selectedId: string\n}\n\nconst SpendingLegend: React.FC<SpendingLegendProps> = ({ data, onSelected, selectedId }) => {\n return (\n <Stack gap={8} height=\"100%\" justifyContent=\"center\" my=\"auto\">\n {data.categoryData.map((item) => (\n <Stack\n alignItems=\"center\"\n aria-label={item.name}\n aria-selected={item.guid === selectedId}\n direction=\"row\"\n gap={8}\n key={item.guid}\n onClick={() => onSelected(item.guid)}\n role=\"button\"\n sx={{ cursor: 'pointer' }}\n >\n <Box borderRadius={4} height={8} sx={{ backgroundColor: item.color }} width={8} />\n <Text bold={item.guid === selectedId} variant=\"XSmall\">\n {item.name}\n </Text>\n </Stack>\n ))}\n </Stack>\n )\n}\n\nexport default SpendingLegend\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { endOfMonth } from 'date-fns/endOfMonth'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport useTheme from '@mui/material/styles/useTheme'\n\nimport { Loader, useCategoryStore, useGlobalCopyStore, useGlobalUiStore } from '../../common'\nimport { getIncomeData, getSpendingData } from '../utils/SpendingData'\n\nimport SpendingTabLabel from './SpendingTabLabel'\nimport SpendingDonut from './SpendingDonut'\nimport SpendingLegend from './SpendingLegend'\n\nconst MiniSpendingChart = () => {\n const theme = useTheme()\n const { goals: goalsCopy, spending: spendingCopy } = useGlobalCopyStore()\n const { selectedAccounts } = useGlobalUiStore()\n const {\n categories,\n dateRangeCategoryTotals,\n dataRangeTotalsLoaded,\n loadDateRangeCategoryTotals,\n } = useCategoryStore()\n\n const incomeColors = React.useMemo(\n () => [\n theme.palette.chartMono.chartMono5,\n theme.palette.chartMono.chartMono4,\n theme.palette.chartMono.chartMono3,\n theme.palette.chartMono.chartMono2,\n theme.palette.chartMono.chartMono1,\n theme.palette.chartMono.chartMono6,\n ],\n [theme],\n ) as string[]\n\n React.useEffect(() => {\n loadDateRangeCategoryTotals(\n selectedAccounts,\n startOfMonth(new Date()),\n endOfMonth(new Date()),\n ).finally()\n }, [selectedAccounts])\n\n const [selectedId, setSelectedId] = React.useState('')\n const [selectedTab, setSelectedTab] = React.useState(0)\n\n const spendingData = React.useMemo(\n () => getSpendingData(categories, goalsCopy, theme, dateRangeCategoryTotals),\n [categories, dateRangeCategoryTotals],\n )\n\n const incomeData = React.useMemo(\n () => getIncomeData(categories, dateRangeCategoryTotals, incomeColors),\n [categories, dateRangeCategoryTotals, incomeColors],\n )\n\n const handleTabChange = (_event: React.SyntheticEvent, newValue: number) => {\n setSelectedTab(newValue)\n setSelectedId('')\n }\n\n const handleSelected = (id: string) => {\n setSelectedId(selectedId === id ? '' : id)\n }\n\n if (!dataRangeTotalsLoaded) {\n return <Loader height={250} />\n }\n\n return (\n <Box width=\"100%\">\n <Tabs onChange={handleTabChange} value={selectedTab} variant=\"fullWidth\">\n <Tab\n label={\n <SpendingTabLabel\n amount={spendingData.totalAmount}\n label={spendingCopy.spend_tab_title}\n />\n }\n />\n <Tab\n label={\n <SpendingTabLabel\n amount={incomeData.totalAmount}\n label={spendingCopy.income_tab_title}\n />\n }\n />\n </Tabs>\n {selectedTab === 0 && (\n <Box>\n <Stack direction=\"row\" gap={16} justifyContent={'center'} p={24}>\n <SpendingDonut\n data={spendingData}\n onSelected={handleSelected}\n selectedId={selectedId}\n totalLabel={spendingCopy.total_spending}\n />\n\n <SpendingLegend\n data={spendingData}\n onSelected={handleSelected}\n selectedId={selectedId}\n />\n </Stack>\n </Box>\n )}\n {selectedTab === 1 && (\n <Box>\n <Stack direction=\"row\" gap={16} justifyContent={'center'} p={24}>\n <SpendingDonut\n data={incomeData}\n isIncome={true}\n onSelected={handleSelected}\n selectedId={selectedId}\n totalLabel={spendingCopy.total_income}\n />\n\n <SpendingLegend data={incomeData} onSelected={handleSelected} selectedId={selectedId} />\n </Stack>\n </Box>\n )}\n </Box>\n )\n}\n\nexport default observer(MiniSpendingChart)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Loader,\n MiniWidgetContainer,\n MiniWidgetProps,\n useAccountStore,\n useGlobalCopyStore,\n useGlobalUiStore,\n} from '../common'\n\nimport MiniSpendingChart from './components/MiniSpendingChart'\n\nconst SpendingMiniWidget: React.FC<MiniWidgetProps> = ({ onPrimaryCtaClick, sx = {} }) => {\n const { visibleAccounts: accounts } = useAccountStore()\n const { spending: spendingCopy } = useGlobalCopyStore()\n const { isCopyLoaded, isInitialized, setSelectedAccounts } = useGlobalUiStore()\n\n // TODO: Optimize by avoiding setting this on each widget individually.\n React.useEffect(() => {\n setSelectedAccounts(accounts)\n }, [accounts])\n\n if (!isCopyLoaded || !isInitialized) {\n return <Loader />\n }\n\n return (\n <MiniWidgetContainer\n className=\"mx-exp-spending-miniwidget\"\n onPrimaryCtaClick={onPrimaryCtaClick}\n primaryCtaLabel={spendingCopy.primary_cta}\n sx={sx}\n title={spendingCopy.mini_title}\n >\n <MiniSpendingChart />\n </MiniWidgetContainer>\n )\n}\n\nexport default observer(SpendingMiniWidget)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Collapse from '@mui/material/Collapse'\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatCurrency, useGlobalCopyStore } from '../../common'\nimport { SpendingData } from '../utils/SpendingData'\nimport ListItemButton from '@mui/material/ListItemButton'\n\ninterface SpendingListProps {\n data: SpendingData\n onSelected: (id: string) => void\n selectedId?: string\n title: string\n}\n\nconst SpendingList: React.FC<SpendingListProps> = ({\n data,\n onSelected,\n selectedId = '',\n title,\n}) => {\n const { spending: spendingCopy } = useGlobalCopyStore()\n const selectedCategory = data.categoryData.find((parent) => parent.guid === selectedId)\n\n return (\n <Stack direction=\"column\" justifyContent=\"center\" maxWidth={400} minWidth={275} width=\"100%\">\n <Text bold={true} sx={{ py: 12 }}>\n {`${title} ${spendingCopy.by_category}`}\n </Text>\n\n <Divider aria-hidden=\"true\" />\n\n <List>\n {data.categoryData.map((item) => (\n <React.Fragment key={item.guid}>\n <ListItem\n disableGutters={true}\n disablePadding={true}\n sx={{\n minHeight: 44,\n }}\n >\n <ListItemButton\n aria-expanded={Boolean(selectedCategory?.guid === item.guid)}\n onClick={() => onSelected(item.guid)}\n sx={{ minHeight: 44, px: 8, py: 0 }}\n >\n <Box\n borderRadius={4}\n flexShrink={0}\n height={8}\n sx={{ backgroundColor: item.color, mr: 8 }}\n width={8}\n />\n <Stack\n alignItems=\"center\"\n direction=\"row\"\n justifyContent=\"space-between\"\n width=\"100%\"\n >\n <Text bold={selectedId === item.guid}>{item.name}</Text>\n <Text bold={selectedId === item.guid} variant=\"Body\">\n {formatCurrency(item.amount, '0,0')}\n </Text>\n </Stack>\n </ListItemButton>\n </ListItem>\n\n <Divider />\n\n {item.categoryTotals && item.categoryTotals.length > 0 && (\n <Collapse in={Boolean(selectedCategory?.guid === item.guid)} unmountOnExit={true}>\n <List>\n {selectedCategory?.categoryTotals?.map((subItem) => (\n <ListItem\n key={subItem.guid}\n sx={{\n pl: 24,\n pr: 8,\n py: 0,\n }}\n >\n <Stack direction=\"row\" justifyContent=\"space-between\" width=\"100%\">\n <Text>{subItem.name} </Text>\n <Text>{formatCurrency(subItem.amount, '0,0')}</Text>\n </Stack>\n </ListItem>\n ))}\n <Divider />\n </List>\n </Collapse>\n )}\n </React.Fragment>\n ))}\n </List>\n\n <Text bold={true} sx={{ mt: 12, pr: 8, textAlign: 'right' }}>\n {`${spendingCopy.total}: ${formatCurrency(data.totalAmount, '0,0')}`}\n </Text>\n </Stack>\n )\n}\n\nexport default observer(SpendingList)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { useCategoryStore, useGlobalCopyStore, useScreenSize } from '../../common'\n\nimport { SpendingData } from '../utils/SpendingData'\nimport SpendingDonut from './SpendingDonut'\nimport SpendingList from './SpendingList'\n\ninterface SpendingChartProps {\n data: SpendingData\n title: string\n onSelected: (id: string) => void\n onViewTransactions: (id: string) => void\n selectedId: string\n}\n\nconst SpendingChart: React.FC<SpendingChartProps> = ({\n data,\n onSelected,\n onViewTransactions,\n selectedId,\n title,\n}) => {\n const { isDesktop, isMobile } = useScreenSize()\n const { isLoadingCategoryTotals } = useCategoryStore()\n const { spending: spendingCopy } = useGlobalCopyStore()\n\n const loadingDonut = (\n <SpendingDonut\n data={{\n categoryData: [],\n donutData: [],\n totalAmount: 0,\n }}\n onSelected={() => {}}\n selectedId={''}\n size={isDesktop ? 400 : 300}\n totalLabel={'Loading ...'}\n variant=\"full\"\n />\n )\n\n return (\n <Stack\n alignItems={isMobile ? 'center' : 'flex-start'}\n direction={isMobile ? 'column' : 'row'}\n gap={{ xs: 16, md: 64, xl: 100 }}\n justifyContent=\"center\"\n pt={50}\n px={8}\n >\n {isLoadingCategoryTotals && loadingDonut}\n {/* Not using a ternary here because it doesn't show the animation */}\n {!isLoadingCategoryTotals && (\n <SpendingDonut\n data={data}\n onSelected={onSelected}\n onViewTransactions={onViewTransactions}\n selectedId={selectedId}\n size={isDesktop ? 400 : 300}\n totalLabel={spendingCopy.total_amount}\n variant=\"full\"\n />\n )}\n\n <SpendingList data={data} onSelected={onSelected} selectedId={selectedId} title={title} />\n </Stack>\n )\n}\n\nexport default observer(SpendingChart)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport { useTheme } from '@mui/material'\nimport type { Theme } from '@mui/system'\n\nimport {\n CategoryGuids,\n Drawer,\n Transaction,\n useAppConfig,\n useCategoryStore,\n useGlobalCopyStore,\n useGlobalUiStore,\n useTransactionStore,\n} from '../../common'\n\nimport { TransactionDetails, TransactionList } from '../../transactions'\nimport { getIncomeData, getSpendingData } from '../utils/SpendingData'\nimport SpendingChart from './SpendingChart'\nimport SpendingTabLabel from './SpendingTabLabel'\n\nconst getIncomeColors = (theme: Theme) => {\n return [\n theme.palette.chartMono.chartMono5,\n theme.palette.chartMono.chartMono4,\n theme.palette.chartMono.chartMono3,\n theme.palette.chartMono.chartMono2,\n theme.palette.chartMono.chartMono1,\n theme.palette.chartMono.chartMono6,\n ]\n}\n\nconst Spending = () => {\n const theme = useTheme()\n\n const { clientConfig } = useAppConfig()\n const { categories, dateRangeCategoryTotals, loadDateRangeCategoryTotals } = useCategoryStore()\n const { goals: goalsCopy, spending: spendingCopy } = useGlobalCopyStore()\n const { displayedDateRange, selectedAccounts, selectedAccountGuids } = useGlobalUiStore()\n const { setFilter, sortedTransactions: transactions } = useTransactionStore()\n\n const accountGuids = clientConfig?.master?.deep_link_params?.account_guids\n const view = clientConfig?.master?.deep_link_params?.view\n\n const [selectedId, setSelectedId] = React.useState('')\n const [selectedTab, setSelectedTab] = React.useState(view === 'income' ? 1 : 0)\n const [transactionGuid, setTransactionGuid] = React.useState('')\n const [transactionsOpen, setTransactionsOpen] = React.useState(false)\n\n React.useEffect(() => {\n loadDateRangeCategoryTotals(\n selectedAccounts,\n displayedDateRange.start,\n displayedDateRange.end,\n ).finally()\n }, [selectedAccounts, displayedDateRange])\n\n const spendingData = React.useMemo(\n () => getSpendingData(categories, goalsCopy, theme, dateRangeCategoryTotals),\n [categories, dateRangeCategoryTotals],\n )\n\n const incomeData = React.useMemo(\n () => getIncomeData(categories, dateRangeCategoryTotals, getIncomeColors(theme)),\n [categories, dateRangeCategoryTotals],\n )\n\n const transaction = React.useMemo(\n () => transactions.find((t) => t.guid === transactionGuid),\n [transactionGuid, transactions],\n )\n\n const handleTabChange = (_event: React.SyntheticEvent, newValue: number) => {\n setSelectedTab(newValue)\n setSelectedId('')\n }\n\n const handleSelected = (id: string) => {\n setSelectedId(selectedId === id || id === '0' ? '' : id)\n }\n\n const handleViewTransactions = (id: string) => {\n const transactionFilter = {\n accounts: accountGuids ? accountGuids : selectedAccountGuids,\n dateRange: displayedDateRange,\n }\n\n if (selectedTab === 0) {\n // Spending\n if (id === 'other') {\n const other = spendingData.categoryData.find((c) => c.guid === 'other')\n setFilter({\n ...transactionFilter,\n custom: (t: Transaction) =>\n Boolean(other?.categoryTotals?.find((ct) => ct.guid === t.top_level_category_guid)),\n })\n } else {\n setFilter({\n ...transactionFilter,\n custom: (t: Transaction) =>\n id\n ? t.top_level_category_guid === id\n : t.top_level_category_guid !== CategoryGuids.INCOME &&\n t.top_level_category_guid !== CategoryGuids.INVESTMENTS &&\n t.top_level_category_guid !== CategoryGuids.TRANSFER,\n })\n }\n } else {\n // Income\n setFilter({\n ...transactionFilter,\n custom: (t: Transaction) =>\n id\n ? t.category_guid === id\n : t.category_guid === CategoryGuids.INCOME ||\n t.top_level_category_guid === CategoryGuids.INCOME,\n })\n }\n\n setTransactionsOpen(true)\n }\n\n return (\n <Box>\n <Tabs onChange={handleTabChange} value={selectedTab} variant=\"fullWidth\">\n <Tab\n label={\n <SpendingTabLabel\n amount={spendingData.totalAmount}\n label={spendingCopy.spend_tab_title}\n />\n }\n />\n <Tab\n label={\n <SpendingTabLabel\n amount={incomeData.totalAmount}\n label={spendingCopy.income_tab_title}\n />\n }\n />\n </Tabs>\n {selectedTab === 0 && (\n <SpendingChart\n data={spendingData}\n onSelected={handleSelected}\n onViewTransactions={handleViewTransactions}\n selectedId={selectedId}\n title={spendingCopy.spend_tab_title}\n />\n )}\n {selectedTab === 1 && (\n <SpendingChart\n data={incomeData}\n onSelected={handleSelected}\n onViewTransactions={handleViewTransactions}\n selectedId={selectedId}\n title={spendingCopy.income_tab_title}\n />\n )}\n <Drawer\n ariaLabelClose={spendingCopy.close_drawer_aria}\n isOpen={transactionsOpen}\n onClose={() => setTransactionsOpen(false)}\n title={spendingCopy.transactions_drawer_title}\n >\n <TransactionList onClick={setTransactionGuid} />\n </Drawer>\n <Drawer\n ariaLabelClose={spendingCopy.close_drawer_aria}\n isOpen={Boolean(transaction)}\n onClose={() => setTransactionGuid('')}\n title={spendingCopy.transaction_details_drawer_title}\n >\n {transaction && <TransactionDetails transaction={transaction} />}\n </Drawer>\n </Box>\n )\n}\n\nexport default observer(Spending)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\nimport { endOfMonth } from 'date-fns/endOfMonth'\n\nimport Box from '@mui/material/Box'\n\nimport type { DateRange } from '@mui/x-date-pickers-pro'\n\nimport {\n Loader,\n useAccountStore,\n useGlobalUiStore,\n WidgetContainer,\n useEvent,\n ANALYTICS_EVENTS,\n useGlobalCopyStore,\n useAppConfig,\n} from '../common'\n\nimport type { WidgetProps } from '../common'\n\nimport Spending from './components/Spending'\n\ninterface RSpendingWidgetProps extends WidgetProps {\n onBackClick?: () => void\n}\n\nconst SpendingWidget: React.FC<RSpendingWidgetProps> = ({ onBackClick, sx = {} }) => {\n const { visibleAccounts: accounts } = useAccountStore()\n const { spending: spendingCopy } = useGlobalCopyStore()\n const { isCopyLoaded, isInitialized, setDisplayedDate, setSelectedAccounts } = useGlobalUiStore()\n const { onEvent } = useEvent()\n\n const { clientConfig } = useAppConfig()\n\n const date_range = clientConfig?.master?.deep_link_params?.date_range\n\n const [isWidgetInitialized, setIsWidgetInitialized] = React.useState(false)\n\n React.useEffect(() => {\n setSelectedAccounts(accounts)\n }, [accounts])\n\n React.useEffect(() => {\n if (date_range && Array.isArray(date_range) && date_range.length === 2) {\n setDisplayedDate(date_range[0] as Date, date_range[1] as Date)\n } else {\n setDisplayedDate(startOfMonth(startOfToday()), endOfMonth(startOfToday()))\n }\n setIsWidgetInitialized(true)\n onEvent(ANALYTICS_EVENTS.SPENDING_VIEW)\n }, [])\n\n const handleDateChanged = (range: DateRange<Date>) => {\n setDisplayedDate(range[0] as Date, range[1] as Date)\n }\n\n if (!isCopyLoaded || !isInitialized || !isWidgetInitialized) {\n return <Loader />\n }\n\n return (\n <WidgetContainer\n accountOptions={accounts}\n calendarActions={{ onRangeChanged: handleDateChanged }}\n onAccountsFilterClick={() => onEvent(ANALYTICS_EVENTS.SPENDING_CLICK_FILTER)}\n onBackClick={onBackClick}\n sx={sx}\n title={spendingCopy.title}\n >\n <Box height=\"calc(100dvh - 150px)\" overflow=\"scroll\" width=\"100%\">\n <Spending />\n </Box>\n </WidgetContainer>\n )\n}\n\nexport default observer(SpendingWidget)\n"],"names":["TOP_CATEGORY_LENGTH","getTotalsByParentCategory","categories","theme","totals","acc","curr","category","c","parentGuid","parentCategory","categoryTotal","getCategoryColor","parentCategoryTotal","ct","getSpendingData","copy","parentCategoryTotals","spendingTotals","CategoryGuids","cat1","cat2","totalAmount","total","length","categoryData","donutData","otherCategories","otherTotal","getIncomeData","monthlyTotals","colors","incomeCategories","incomeTotals","total1","total2","index","cat","incomeTotal","SpendingTabLabel","amount","label","jsxs","Stack","jsx","Text","formatCurrency","SpendingDonut","data","isIncome","onSelected","onViewTransactions","selectedId","size","totalLabel","variant","spendingCopy","useGlobalCopyStore","useTheme","isTablet","useScreenSize","selectedCategory","React","cd","handleViewTransactions","iconSize","Donut","CategoryIcon","CategoryIconVariants","Button","SpendingDonut$1","observer","SpendingLegend","item","Box","MiniSpendingChart","goalsCopy","selectedAccounts","useGlobalUiStore","dateRangeCategoryTotals","dataRangeTotalsLoaded","loadDateRangeCategoryTotals","useCategoryStore","incomeColors","startOfMonth","endOfMonth","setSelectedId","selectedTab","setSelectedTab","spendingData","incomeData","handleTabChange","_event","newValue","handleSelected","id","Tabs","Tab","Loader","MiniSpendingChart$1","SpendingMiniWidget","onPrimaryCtaClick","sx","accounts","useAccountStore","isCopyLoaded","isInitialized","setSelectedAccounts","MiniWidgetContainer","SpendingMiniWidget$1","SpendingList","title","parent","Divider","List","ListItem","ListItemButton","Collapse","subItem","SpendingList$1","SpendingChart","isDesktop","isMobile","isLoadingCategoryTotals","SpendingChart$1","getIncomeColors","Spending","clientConfig","useAppConfig","displayedDateRange","selectedAccountGuids","setFilter","transactions","useTransactionStore","accountGuids","view","transactionGuid","setTransactionGuid","transactionsOpen","setTransactionsOpen","transaction","t","transactionFilter","other","Drawer","TransactionList","TransactionDetails","Spending$1","SpendingWidget","onBackClick","setDisplayedDate","onEvent","useEvent","date_range","isWidgetInitialized","setIsWidgetInitialized","startOfToday","ANALYTICS_EVENTS","handleDateChanged","range","WidgetContainer","SpendingWidget$1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAsB,GAsBtBC,KAA4B,CAChCC,GACAC,GACAC,MAKOA,EAAO,OAAO,CAACC,GAAKC,MAAS;AAC9B,MAAAA,EAAK,QAAQ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AAuB,EAAI,GAC3BJ,EAAQM,EAAiB,aAAa;AAAA,EACxC,GAAG,CAAE,CAAA;AAEC,QAAAC,IAAoB,CAACC,MAA2B;AACpD,IAAAT,EAAiBS,EAAM,CAAC,GAAWA,EAAM,CAAC,CAAS;AAAA,EAAA;AAGrD,SAAI,CAACtD,KAAgB,CAACC,KAAiB,CAACgD,sBAC9BxD,GAAO,CAAA,CAAA,IAIf,gBAAAtD;AAAA,IAACoH;AAAA,IAAA;AAAA,MACC,gBAAgBzD;AAAA,MAChB,iBAAiB,EAAE,gBAAgBuD,EAAkB;AAAA,MACrD,uBAAuB,MAAMP,EAAQM,EAAiB,qBAAqB;AAAA,MAC3E,aAAAR;AAAA,MACA,IAAA/C;AAAA,MACA,OAAO9C,EAAa;AAAA,MAEpB,UAAA,gBAAAZ,EAAC8B,GAAI,EAAA,QAAO,wBAAuB,UAAS,UAAS,OAAM,QACzD,UAAC,gBAAA9B,EAAAkF,IAAA,CAAA,CAAS,EACZ,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEemC,KAAA1F,EAAS6E,EAAc;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { T as o } from "../TransactionApi-Dnbyi1JL.mjs";
|
|
2
|
+
import { a8 as n, $ as r, a1 as T, a0 as i, a7 as c, a5 as e, a4 as A, a6 as p, a9 as S, a3 as d, a2 as m } from "../ConnectMiniWidget-CQWafYtQ.mjs";
|
|
3
|
+
import { T as f } from "../TransactionStore-CiEtt5XJ.mjs";
|
|
4
|
+
export {
|
|
5
|
+
n as AddAccountModal,
|
|
6
|
+
r as BottomActions,
|
|
7
|
+
T as TRANSACTION_EVENTS,
|
|
8
|
+
i as TopActions,
|
|
9
|
+
o as TransactionApi,
|
|
10
|
+
c as TransactionDetails,
|
|
11
|
+
e as TransactionList,
|
|
12
|
+
A as TransactionRow,
|
|
13
|
+
f as TransactionStore,
|
|
14
|
+
p as TransactionTable,
|
|
15
|
+
S as TransactionWidget,
|
|
16
|
+
d as exportTransactionsToCSV,
|
|
17
|
+
m as useTransactionsUiStore
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CategoryListItem, Transaction } from '../../common';
|
|
1
|
+
import { DetailedCategory } from '../../common';
|
|
3
2
|
interface CategoriesListProps {
|
|
4
|
-
|
|
5
|
-
transactions: Transaction[];
|
|
3
|
+
onCategoryClick: (data: DetailedCategory) => void;
|
|
6
4
|
}
|
|
7
|
-
declare const CategoriesList:
|
|
5
|
+
declare const CategoriesList: (({ onCategoryClick }: CategoriesListProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
8
|
export default CategoriesList;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface CategoriesListItemProps extends CategoryListItem {
|
|
1
|
+
import { DetailedCategory } from '../../common';
|
|
2
|
+
interface CategoriesListItemProps extends DetailedCategory {
|
|
4
3
|
onClick?: () => void;
|
|
4
|
+
isLastItem?: boolean;
|
|
5
|
+
showDivider?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const CategoriesListItem:
|
|
7
|
+
declare const CategoriesListItem: (({ totalAmount, guid, name, transactions, onClick, isLastItem, showDivider, }: CategoriesListItemProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
7
10
|
export default CategoriesListItem;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface CategoryDetailChartProps {
|
|
2
|
+
chartColor: string;
|
|
3
|
+
chartLabel: string;
|
|
4
|
+
}
|
|
5
|
+
declare const CategoryDetailChart: (({ chartLabel, chartColor }: CategoryDetailChartProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
6
|
displayName: string;
|
|
3
7
|
};
|
|
4
8
|
export default CategoryDetailChart;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { aa as a, ac as d, ab as s, ad as i } from "../ConnectMiniWidget-CQWafYtQ.mjs";
|
|
2
|
+
import { T as n } from "../TrendsStore-Idq3QfoA.mjs";
|
|
3
|
+
export {
|
|
4
|
+
a as TrendsFullWidget,
|
|
5
|
+
d as TrendsMicroWidget,
|
|
6
|
+
s as TrendsMiniWidget,
|
|
7
|
+
n as TrendsStore,
|
|
8
|
+
i as TrendsWidget
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DateRange, DetailedCategory, GlobalStore } from '../../common';
|
|
2
|
+
import { LineChartDataset } from '../../common/components/charts/LineChart';
|
|
2
3
|
export declare class TrendsStore {
|
|
3
4
|
globalStore: GlobalStore;
|
|
4
|
-
selectedCategoryData:
|
|
5
|
+
selectedCategoryData: DetailedCategory | null;
|
|
5
6
|
selectedDateRange: DateRange;
|
|
6
7
|
constructor(globalStore: GlobalStore);
|
|
7
|
-
setSelectedCategoryData: (category:
|
|
8
|
+
setSelectedCategoryData: (category: DetailedCategory | null) => void;
|
|
8
9
|
setSelectedDateRange: (dateRange: DateRange) => void;
|
|
9
|
-
sortCategoriesList: () => {
|
|
10
|
-
guid: string;
|
|
11
|
-
name: string;
|
|
12
|
-
amount: number;
|
|
13
|
-
}[];
|
|
14
|
-
get detailedCategories(): DetailedCategory[];
|
|
15
10
|
get selectedDateRangeMonthRange(): string;
|
|
16
|
-
get
|
|
17
|
-
get
|
|
18
|
-
get
|
|
19
|
-
get
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
11
|
+
get selectedDateRangeMonthCount(): number;
|
|
12
|
+
get sortedDetailedCategories(): DetailedCategory[];
|
|
13
|
+
get visibleCategories(): DetailedCategory[];
|
|
14
|
+
get collapsedCategories(): DetailedCategory[];
|
|
15
|
+
get categoryDetailsChartData(): {
|
|
16
|
+
monthlyAmounts: LineChartDataset;
|
|
17
|
+
};
|
|
23
18
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-cartographer/experiences",
|
|
3
|
-
"version": "6.26.
|
|
3
|
+
"version": "6.26.1-alpha.mega1",
|
|
4
4
|
"description": "Library containing experience widgets",
|
|
5
|
-
"main": "dist/index.es.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
5
|
"author": "MX",
|
|
8
6
|
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./accounts": {
|
|
9
|
+
"types": "./dist/accounts/index.d.ts",
|
|
10
|
+
"import": "./dist/accounts/index.es.js"
|
|
11
|
+
},
|
|
12
|
+
"./analytics": {
|
|
13
|
+
"types": "./dist/analytics/index.d.ts",
|
|
14
|
+
"import": "./dist/analytics/index.es.js"
|
|
15
|
+
},
|
|
16
|
+
"./budgets": {
|
|
17
|
+
"types": "./dist/budgets/index.d.ts",
|
|
18
|
+
"import": "./dist/budgets/index.es.js"
|
|
19
|
+
},
|
|
20
|
+
"./cashflow": {
|
|
21
|
+
"types": "./dist/cashflow/index.d.ts",
|
|
22
|
+
"import": "./dist/cashflow/index.es.js"
|
|
23
|
+
},
|
|
24
|
+
"./categories": {
|
|
25
|
+
"types": "./dist/categories/index.d.ts",
|
|
26
|
+
"import": "./dist/categories/index.es.js"
|
|
27
|
+
},
|
|
28
|
+
"./common": {
|
|
29
|
+
"types": "./dist/common/index.d.ts",
|
|
30
|
+
"import": "./dist/common/index.es.js"
|
|
31
|
+
},
|
|
32
|
+
"./dashboard": {
|
|
33
|
+
"types": "./dist/dashboard/index.d.ts",
|
|
34
|
+
"import": "./dist/dashboard/index.es.js"
|
|
35
|
+
},
|
|
36
|
+
"./debts": {
|
|
37
|
+
"types": "./dist/debts/index.d.ts",
|
|
38
|
+
"import": "./dist/debts/index.es.js"
|
|
39
|
+
},
|
|
40
|
+
"./finstrong": {
|
|
41
|
+
"types": "./dist/finstrong/index.d.ts",
|
|
42
|
+
"import": "./dist/finstrong/index.es.js"
|
|
43
|
+
},
|
|
44
|
+
"./goals": {
|
|
45
|
+
"types": "./dist/goals/index.d.ts",
|
|
46
|
+
"import": "./dist/goals/index.es.js"
|
|
47
|
+
},
|
|
48
|
+
"./help": {
|
|
49
|
+
"types": "./dist/help/index.d.ts",
|
|
50
|
+
"import": "./dist/help/index.es.js"
|
|
51
|
+
},
|
|
52
|
+
"./insights": {
|
|
53
|
+
"types": "./dist/insights/index.d.ts",
|
|
54
|
+
"import": "./dist/insights/index.es.js"
|
|
55
|
+
},
|
|
56
|
+
"./investments": {
|
|
57
|
+
"types": "./dist/investments/index.d.ts",
|
|
58
|
+
"import": "./dist/investments/index.es.js"
|
|
59
|
+
},
|
|
60
|
+
"./merchants": {
|
|
61
|
+
"types": "./dist/merchants/index.d.ts",
|
|
62
|
+
"import": "./dist/merchants/index.es.js"
|
|
63
|
+
},
|
|
64
|
+
"./microinsights": {
|
|
65
|
+
"types": "./dist/microinsights/index.d.ts",
|
|
66
|
+
"import": "./dist/microinsights/index.es.js"
|
|
67
|
+
},
|
|
68
|
+
"./networth": {
|
|
69
|
+
"types": "./dist/networth/index.d.ts",
|
|
70
|
+
"import": "./dist/networth/index.es.js"
|
|
71
|
+
},
|
|
72
|
+
"./notifications": {
|
|
73
|
+
"types": "./dist/notifications/index.d.ts",
|
|
74
|
+
"import": "./dist/notifications/index.es.js"
|
|
75
|
+
},
|
|
76
|
+
"./recurringtransactions": {
|
|
77
|
+
"types": "./dist/recurringtransactions/index.d.ts",
|
|
78
|
+
"import": "./dist/recurringtransactions/index.es.js"
|
|
79
|
+
},
|
|
80
|
+
"./settings": {
|
|
81
|
+
"types": "./dist/settings/index.d.ts",
|
|
82
|
+
"import": "./dist/settings/index.es.js"
|
|
83
|
+
},
|
|
84
|
+
"./spending": {
|
|
85
|
+
"types": "./dist/spending/index.d.ts",
|
|
86
|
+
"import": "./dist/spending/index.es.js"
|
|
87
|
+
},
|
|
88
|
+
"./transactions": {
|
|
89
|
+
"types": "./dist/transactions/index.d.ts",
|
|
90
|
+
"import": "./dist/transactions/index.es.js"
|
|
91
|
+
},
|
|
92
|
+
"./trends": {
|
|
93
|
+
"types": "./dist/trends/index.d.ts",
|
|
94
|
+
"import": "./dist/trends/index.es.js"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
9
97
|
"publishConfig": {
|
|
10
98
|
"access": "public"
|
|
11
99
|
},
|
package/dist/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from './accounts';
|
|
2
|
-
export * from './analytics';
|
|
3
|
-
export * from './budgets';
|
|
4
|
-
export * from './cashflow';
|
|
5
|
-
export * from './categories';
|
|
6
|
-
export * from './common';
|
|
7
|
-
export * from './dashboard';
|
|
8
|
-
export * from './debts';
|
|
9
|
-
export * from './finstrong';
|
|
10
|
-
export * from './goals';
|
|
11
|
-
export * from './help';
|
|
12
|
-
export * from './investments';
|
|
13
|
-
export * from './merchants';
|
|
14
|
-
export * from './microinsights';
|
|
15
|
-
export * from './networth';
|
|
16
|
-
export * from './notifications';
|
|
17
|
-
export * from './recurringtransactions';
|
|
18
|
-
export * from './spending';
|
|
19
|
-
export * from './settings';
|
|
20
|
-
export * from './transactions';
|
|
21
|
-
export * from './trends';
|
|
22
|
-
export * from './finstrong';
|