@mx-cartographer/experiences 9.7.127 → 9.7.129
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 +10 -0
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +11 -15
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +5 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +77 -30
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.d.ts +26 -13
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js +107 -136
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.d.ts +21 -7
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js +34 -17
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.d.ts +3 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js +10 -8
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +101 -105
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.d.ts +10 -12
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js +20 -19
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.d.ts +3 -12
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.es.js +8 -8
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.d.ts +9 -0
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js +27 -10
- package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.d.ts +1 -7
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +54 -63
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js +29 -75
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +12 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +18 -9
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +66 -65
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +24 -30
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +84 -101
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/components/AmountBreakdownCard.es.js +9 -8
- package/dist/insights-v2/components/AmountBreakdownCard.es.js.map +1 -1
- package/dist/insights-v2/components/CategoryTile.d.ts +14 -0
- package/dist/insights-v2/components/CategoryTile.es.js +28 -0
- package/dist/insights-v2/components/CategoryTile.es.js.map +1 -0
- package/dist/insights-v2/components/InsightListRow.d.ts +31 -0
- package/dist/insights-v2/components/InsightListRow.es.js +111 -0
- package/dist/insights-v2/components/InsightListRow.es.js.map +1 -0
- package/dist/insights-v2/components/LogoMark.d.ts +3 -3
- package/dist/insights-v2/components/LogoMark.es.js +11 -10
- package/dist/insights-v2/components/LogoMark.es.js.map +1 -1
- package/dist/insights-v2/components/SubTabs.d.ts +2 -1
- package/dist/insights-v2/components/SubTabs.es.js +10 -10
- package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +12 -12
- package/dist/insights-v2/mappings/blocks.es.js +21 -21
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +169 -120
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +3 -1
- package/dist/recurringtransactions/components/RecurringTransactionList.es.js +151 -118
- package/dist/recurringtransactions/components/RecurringTransactionList.es.js.map +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -6
- package/dist/transactions/components/shared/TransactionDetails.es.js +149 -199
- package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/Description.d.ts +2 -0
- package/dist/transactions/components/shared/transactiondetails/Description.es.js +59 -50
- package/dist/transactions/components/shared/transactiondetails/Description.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.d.ts +10 -0
- package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js +68 -0
- package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getLogoElevation as c } from "./logoShadow.es.js";
|
|
2
|
+
import { useId as p } from "react";
|
|
2
3
|
import e from "@mui/material/Stack";
|
|
3
4
|
import { Text as t } from "@mxenabled/mxui";
|
|
4
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
6
|
-
var
|
|
7
|
-
const a =
|
|
6
|
+
import m from "@mui/material/Divider";
|
|
7
|
+
var g = ({ rows: o, total: n }) => {
|
|
8
|
+
const a = p();
|
|
8
9
|
return o.length === 0 ? null : /* @__PURE__ */ i(e, {
|
|
9
10
|
sx: {
|
|
10
11
|
bgcolor: "background.paper",
|
|
11
12
|
borderRadius: "8px",
|
|
12
|
-
boxShadow:
|
|
13
|
+
boxShadow: c,
|
|
13
14
|
gap: 16,
|
|
14
15
|
p: 16,
|
|
15
16
|
width: "100%"
|
|
16
17
|
},
|
|
17
18
|
children: [/* @__PURE__ */ r(e, {
|
|
18
|
-
divider: /* @__PURE__ */ r(
|
|
19
|
+
divider: /* @__PURE__ */ r(m, {
|
|
19
20
|
"aria-hidden": !0,
|
|
20
21
|
role: "presentation"
|
|
21
22
|
}),
|
|
@@ -58,7 +59,7 @@ var h = ({ rows: o, total: n }) => {
|
|
|
58
59
|
}), /* @__PURE__ */ i(e, {
|
|
59
60
|
sx: {
|
|
60
61
|
alignItems: "center",
|
|
61
|
-
bgcolor: "
|
|
62
|
+
bgcolor: "action.hover",
|
|
62
63
|
borderRadius: "8px",
|
|
63
64
|
justifyContent: "center",
|
|
64
65
|
minHeight: 72,
|
|
@@ -84,7 +85,7 @@ var h = ({ rows: o, total: n }) => {
|
|
|
84
85
|
});
|
|
85
86
|
};
|
|
86
87
|
export {
|
|
87
|
-
|
|
88
|
+
g as default
|
|
88
89
|
};
|
|
89
90
|
|
|
90
91
|
//# sourceMappingURL=AmountBreakdownCard.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountBreakdownCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AmountBreakdownCard.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nexport interface AmountBreakdownRow {\n label: ReactNode\n amount: ReactNode\n}\n\nexport interface AmountBreakdownTotal {\n amount: ReactNode\n label: ReactNode\n}\n\nexport interface AmountBreakdownCardProps {\n rows: AmountBreakdownRow[]\n total: AmountBreakdownTotal\n}\n\nconst AmountBreakdownCard = ({ rows, total }: AmountBreakdownCardProps) => {\n const totalLabelId = useId()\n\n if (rows.length === 0) return null\n\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow:
|
|
1
|
+
{"version":3,"file":"AmountBreakdownCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AmountBreakdownCard.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\nexport interface AmountBreakdownRow {\n label: ReactNode\n amount: ReactNode\n}\n\nexport interface AmountBreakdownTotal {\n amount: ReactNode\n label: ReactNode\n}\n\nexport interface AmountBreakdownCardProps {\n rows: AmountBreakdownRow[]\n total: AmountBreakdownTotal\n}\n\nconst AmountBreakdownCard = ({ rows, total }: AmountBreakdownCardProps) => {\n const totalLabelId = useId()\n\n if (rows.length === 0) return null\n\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <Stack\n divider={<Divider aria-hidden={true} role=\"presentation\" />}\n role=\"list\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {rows.map((row, index) => (\n <Stack\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n role=\"listitem\"\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'space-between',\n minHeight: 44,\n px: 12,\n py: 14,\n }}\n >\n <Text color=\"text.primary\" truncate={true} variant=\"body1\">\n {row.label}\n </Text>\n <Text\n bold={true}\n color=\"text.primary\"\n sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums', letterSpacing: '-0.15px' }}\n variant=\"body1\"\n >\n {row.amount}\n </Text>\n </Stack>\n ))}\n </Stack>\n\n <Stack\n sx={{\n alignItems: 'center',\n // A theme overlay, so the grey box (Figma) still shows on dark mode's black card.\n bgcolor: 'action.hover',\n borderRadius: '8px',\n justifyContent: 'center',\n minHeight: 72,\n p: 12,\n width: '100%',\n }}\n >\n <Text\n aria-describedby={totalLabelId}\n color=\"text.primary\"\n component=\"p\"\n sx={{ fontVariantNumeric: 'tabular-nums' }}\n variant=\"h2\"\n >\n {total.amount}\n </Text>\n <Text\n color=\"text.secondary\"\n component=\"p\"\n id={totalLabelId}\n sx={{ fontWeight: 400 }}\n variant=\"subtitle2\"\n >\n {total.label}\n </Text>\n </Stack>\n </Stack>\n )\n}\n\nexport default AmountBreakdownCard\n"],"mappings":";;;;;;AAwBA,IAAM,IAAA,CAAuB,EAAE,MAAA,GAAM,OAAA,EAAA,MAAsC;AACzE,QAAM,IAAe,EAAM;AAE3B,SAAI,EAAK,WAAW,IAAU,OAG5B,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,SAAS;AAAA,MACT,cAAc;AAAA,MACd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,IACT;AAAA,IARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,gBAAA,EAAC,GAAD;AAAA,QAAS,eAAa;AAAA,QAAM,MAAK;AAAA,MAAgB,CAAA;AAAA,MAC1D,MAAK;AAAA,MACL,IAAI;AAAA,QACF,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,UAAU;AAAA,QACV,OAAO;AAAA,MACT;AAAA,MAEC,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,QAGE,MAAK;AAAA,QACL,IAAI;AAAA,UACF,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,KAAK;AAAA,UACL,gBAAgB;AAAA,UAChB,WAAW;AAAA,UACX,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QAZF,UAAA,CAcE,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,UAAU;AAAA,UAAM,SAAQ;AAAA,UAChD,UAAA,EAAI;AAAA,QACD,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,OAAM;AAAA,UACN,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,oBAAoB;AAAA,YAAgB,eAAe;AAAA,UAAU;AAAA,UAClF,SAAQ;AAAA,UAEP,UAAA,EAAI;AAAA,QACD,CAAA,CACD;AAAA,MAvBA,GAAA,CAuBA,CACR;AAAA,IACI,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QAEZ,SAAS;AAAA,QACT,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,WAAW;AAAA,QACX,GAAG;AAAA,QACH,OAAO;AAAA,MACT;AAAA,MAVF,UAAA,CAYE,gBAAA,EAAC,GAAD;AAAA,QACE,oBAAkB;AAAA,QAClB,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI,EAAE,oBAAoB,eAAe;AAAA,QACzC,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI,EAAE,YAAY,IAAI;AAAA,QACtB,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA;AAEX"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface CategoryTileProps {
|
|
2
|
+
categoryGuid: string;
|
|
3
|
+
size: number;
|
|
4
|
+
/** Opacity of the category colour behind the glyph, with a category-colour border; none = mxui's tile. */
|
|
5
|
+
tint?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A category's icon tile. The guid walks up to its top-level parent first: `CategoryIcon` and
|
|
9
|
+
* `getCategoryColor` only know those, and draw a sub-category as Uncategorized.
|
|
10
|
+
*/
|
|
11
|
+
declare const CategoryTile: (({ categoryGuid, size, tint }: CategoryTileProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export default CategoryTile;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useCategoryStore as p } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { getCategoryColor as s } from "../../core/utils/CategoryUtil.es.js";
|
|
3
|
+
import { observer as d } from "mobx-react-lite";
|
|
4
|
+
import { CategoryIcon as l } from "@mxenabled/mxui";
|
|
5
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
6
|
+
import { alpha as c, useTheme as g } from "@mui/material/styles";
|
|
7
|
+
import f from "@mui/material/Box";
|
|
8
|
+
var b = d(({ categoryGuid: i, size: m, tint: r }) => {
|
|
9
|
+
const a = g(), o = p().getTopLevelCategoryGuid(i), e = s(o, a);
|
|
10
|
+
return /* @__PURE__ */ t(f, {
|
|
11
|
+
"data-testid": `category-icon-${o}`,
|
|
12
|
+
sx: { display: "flex" },
|
|
13
|
+
children: /* @__PURE__ */ t(l, {
|
|
14
|
+
categoryGuid: o,
|
|
15
|
+
size: m,
|
|
16
|
+
sx: r === void 0 ? void 0 : {
|
|
17
|
+
bgcolor: c(e, r),
|
|
18
|
+
border: `1px solid ${e}`,
|
|
19
|
+
color: "text.primary"
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
b as default
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=CategoryTile.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryTile.es.js","names":[],"sources":["../../../src/insights-v2/components/CategoryTile.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon } from '@mxenabled/mxui'\n\nimport { useCategoryStore } from '../../common'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\n\ninterface CategoryTileProps {\n categoryGuid: string\n size: number\n /** Opacity of the category colour behind the glyph, with a category-colour border; none = mxui's tile. */\n tint?: number\n}\n\n/**\n * A category's icon tile. The guid walks up to its top-level parent first: `CategoryIcon` and\n * `getCategoryColor` only know those, and draw a sub-category as Uncategorized.\n */\nconst CategoryTile = observer(({ categoryGuid, size, tint }: CategoryTileProps) => {\n const theme = useTheme()\n const guid = useCategoryStore().getTopLevelCategoryGuid(categoryGuid)\n const color = getCategoryColor(guid, theme)\n\n return (\n <Box data-testid={`category-icon-${guid}`} sx={{ display: 'flex' }}>\n <CategoryIcon\n categoryGuid={guid}\n size={size}\n sx={\n tint === undefined\n ? undefined\n : { bgcolor: alpha(color, tint), border: `1px solid ${color}`, color: 'text.primary' }\n }\n />\n </Box>\n )\n})\n\nexport default CategoryTile\n"],"mappings":";;;;;;;AAqBA,IAAM,IAAe,EAAA,CAAU,EAAE,cAAA,GAAc,MAAA,GAAM,MAAA,EAAA,MAA8B;AACjF,QAAM,IAAQ,EAAS,GACjB,IAAO,EAAiB,EAAE,wBAAwB,CAAY,GAC9D,IAAQ,EAAiB,GAAM,CAAK;AAE1C,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,eAAa,iBAAiB,CAAA;AAAA,IAAQ,IAAI,EAAE,SAAS,OAAO;AAAA,IAC/D,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,cAAc;AAAA,MACR,MAAA;AAAA,MACN,IACE,MAAS,SACL,SACA;AAAA,QAAE,SAAS,EAAM,GAAO,CAAI;AAAA,QAAG,QAAQ,aAAa,CAAA;AAAA,QAAS,OAAO;AAAA,MAAe;AAAA,IAE1F,CAAA;AAAA,EACE,CAAA;AAET,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface InsightListRowProps {
|
|
3
|
+
amount: number;
|
|
4
|
+
isLast: boolean;
|
|
5
|
+
/** The row's 32px logo or icon. */
|
|
6
|
+
leading: ReactNode;
|
|
7
|
+
name: string;
|
|
8
|
+
account?: {
|
|
9
|
+
institutionGuid: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
/** Figma: account balances are body2 (13/16); expense amounts keep body1. */
|
|
13
|
+
amountVariant?: 'body1' | 'body2';
|
|
14
|
+
/** Bold name (Account List); Remaining Cash rows use the regular weight. */
|
|
15
|
+
boldName?: boolean;
|
|
16
|
+
caption?: string;
|
|
17
|
+
/** Makes the row a button. */
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
subtitle?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Where a non-last divider starts: under the logo (24px, the default) or under the text
|
|
22
|
+
* (68px = 24 padding + 32 logo + 12 gap), as the Account List Figma draws it.
|
|
23
|
+
*/
|
|
24
|
+
dividerInset?: 'logo' | 'text';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The 64px Figma list row shared by the Remaining Cash and Account List drawers: a 32px leading slot,
|
|
28
|
+
* name over a subtitle or account line, amount over a caption, and a divider (inset unless last).
|
|
29
|
+
*/
|
|
30
|
+
declare const InsightListRow: ({ account, amount, amountVariant, boldName, caption, dividerInset, isLast, leading, name, onClick, subtitle, }: InsightListRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default InsightListRow;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { formatSignedCurrency as u } from "../../core/utils/NumberFormatting.es.js";
|
|
2
|
+
import o from "@mui/material/Stack";
|
|
3
|
+
import { InstitutionLogo as g, Text as i } from "@mxenabled/mxui";
|
|
4
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import s from "@mui/material/Box";
|
|
6
|
+
import v from "@mui/material/Divider";
|
|
7
|
+
import b from "@mui/material/ButtonBase";
|
|
8
|
+
var y = {
|
|
9
|
+
logo: 24,
|
|
10
|
+
text: 68
|
|
11
|
+
}, V = ({ account: e, amount: d, amountVariant: m = "body1", boldName: x = !1, caption: l, dividerInset: c = "logo", isLast: h, leading: f, name: p, onClick: n, subtitle: a }) => /* @__PURE__ */ r(s, {
|
|
12
|
+
component: "li",
|
|
13
|
+
sx: { position: "relative" },
|
|
14
|
+
children: [/* @__PURE__ */ r(o, {
|
|
15
|
+
component: n ? b : "div",
|
|
16
|
+
onClick: n,
|
|
17
|
+
sx: {
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
gap: 12,
|
|
21
|
+
minHeight: 64,
|
|
22
|
+
px: 24,
|
|
23
|
+
py: 12,
|
|
24
|
+
textAlign: "left",
|
|
25
|
+
width: "100%",
|
|
26
|
+
...n && {
|
|
27
|
+
"&:hover": { bgcolor: "action.hover" },
|
|
28
|
+
"&.Mui-focusVisible": { bgcolor: "action.focus" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ t(s, {
|
|
33
|
+
sx: {
|
|
34
|
+
display: "flex",
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
height: 32,
|
|
37
|
+
width: 32
|
|
38
|
+
},
|
|
39
|
+
children: f
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ r(o, {
|
|
42
|
+
sx: {
|
|
43
|
+
flexGrow: 1,
|
|
44
|
+
minWidth: 0
|
|
45
|
+
},
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ t(i, {
|
|
48
|
+
bold: x,
|
|
49
|
+
truncate: !0,
|
|
50
|
+
variant: "body1",
|
|
51
|
+
children: p
|
|
52
|
+
}),
|
|
53
|
+
a && /* @__PURE__ */ t(i, {
|
|
54
|
+
color: "text.primary",
|
|
55
|
+
variant: "caption",
|
|
56
|
+
children: a
|
|
57
|
+
}),
|
|
58
|
+
e && /* @__PURE__ */ r(o, {
|
|
59
|
+
sx: {
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
flexDirection: "row",
|
|
62
|
+
gap: 6,
|
|
63
|
+
minWidth: 0
|
|
64
|
+
},
|
|
65
|
+
children: [e.institutionGuid && /* @__PURE__ */ t(g, {
|
|
66
|
+
alt: "",
|
|
67
|
+
institutionGuid: e.institutionGuid,
|
|
68
|
+
size: 12
|
|
69
|
+
}), /* @__PURE__ */ t(i, {
|
|
70
|
+
color: "text.secondary",
|
|
71
|
+
truncate: !0,
|
|
72
|
+
variant: "caption",
|
|
73
|
+
children: e.name
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ r(o, {
|
|
79
|
+
sx: {
|
|
80
|
+
alignItems: "flex-end",
|
|
81
|
+
flexShrink: 0
|
|
82
|
+
},
|
|
83
|
+
children: [/* @__PURE__ */ t(i, {
|
|
84
|
+
bold: !0,
|
|
85
|
+
sx: {
|
|
86
|
+
flexShrink: 0,
|
|
87
|
+
fontVariantNumeric: "tabular-nums"
|
|
88
|
+
},
|
|
89
|
+
variant: m,
|
|
90
|
+
children: u(d)
|
|
91
|
+
}), l && /* @__PURE__ */ t(i, {
|
|
92
|
+
bold: !0,
|
|
93
|
+
color: "text.secondary",
|
|
94
|
+
sx: { textTransform: "uppercase" },
|
|
95
|
+
variant: "caption",
|
|
96
|
+
children: l
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}), /* @__PURE__ */ t(v, { sx: {
|
|
101
|
+
bottom: 0,
|
|
102
|
+
left: h ? 0 : y[c],
|
|
103
|
+
position: "absolute",
|
|
104
|
+
right: 0
|
|
105
|
+
} })]
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
V as default
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=InsightListRow.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightListRow.es.js","names":[],"sources":["../../../src/insights-v2/components/InsightListRow.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport ButtonBase from '@mui/material/ButtonBase'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport { formatSignedCurrency } from '../../core/utils/NumberFormatting'\n\nexport interface InsightListRowProps {\n amount: number\n isLast: boolean\n /** The row's 32px logo or icon. */\n leading: ReactNode\n name: string\n account?: { institutionGuid: string; name: string }\n /** Figma: account balances are body2 (13/16); expense amounts keep body1. */\n amountVariant?: 'body1' | 'body2'\n /** Bold name (Account List); Remaining Cash rows use the regular weight. */\n boldName?: boolean\n caption?: string\n /** Makes the row a button. */\n onClick?: () => void\n subtitle?: string\n /**\n * Where a non-last divider starts: under the logo (24px, the default) or under the text\n * (68px = 24 padding + 32 logo + 12 gap), as the Account List Figma draws it.\n */\n dividerInset?: 'logo' | 'text'\n}\n\nconst DIVIDER_INSET = { logo: 24, text: 68 } as const\n\n/**\n * The 64px Figma list row shared by the Remaining Cash and Account List drawers: a 32px leading slot,\n * name over a subtitle or account line, amount over a caption, and a divider (inset unless last).\n */\nconst InsightListRow = ({\n account,\n amount,\n amountVariant = 'body1',\n boldName = false,\n caption,\n dividerInset = 'logo',\n isLast,\n leading,\n name,\n onClick,\n subtitle,\n}: InsightListRowProps) => (\n <Box component=\"li\" sx={{ position: 'relative' }}>\n <Stack\n component={onClick ? ButtonBase : 'div'}\n onClick={onClick}\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 12,\n minHeight: 64,\n px: 24,\n py: 12,\n textAlign: 'left',\n width: '100%',\n ...(onClick && {\n '&:hover': { bgcolor: 'action.hover' },\n '&.Mui-focusVisible': { bgcolor: 'action.focus' },\n }),\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0, height: 32, width: 32 }}>{leading}</Box>\n <Stack sx={{ flexGrow: 1, minWidth: 0 }}>\n <Text bold={boldName} truncate={true} variant=\"body1\">\n {name}\n </Text>\n {subtitle && (\n // Figma: the \"Available Balance\" subtitle is text.primary, unlike the expense account line.\n <Text color=\"text.primary\" variant=\"caption\">\n {subtitle}\n </Text>\n )}\n {account && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 6, minWidth: 0 }}>\n {account.institutionGuid && (\n <InstitutionLogo alt=\"\" institutionGuid={account.institutionGuid} size={12} />\n )}\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {account.name}\n </Text>\n </Stack>\n )}\n </Stack>\n <Stack sx={{ alignItems: 'flex-end', flexShrink: 0 }}>\n <Text\n bold={true}\n sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums' }}\n variant={amountVariant}\n >\n {formatSignedCurrency(amount)}\n </Text>\n {caption && (\n <Text\n bold={true}\n color=\"text.secondary\"\n sx={{ textTransform: 'uppercase' }}\n variant=\"caption\"\n >\n {caption}\n </Text>\n )}\n </Stack>\n </Stack>\n <Divider\n sx={{\n bottom: 0,\n left: isLast ? 0 : DIVIDER_INSET[dividerInset],\n position: 'absolute',\n right: 0,\n }}\n />\n </Box>\n)\n\nexport default InsightListRow\n"],"mappings":";;;;;;;AAiCA,IAAM,IAAgB;AAAA,EAAE,MAAM;AAAA,EAAI,MAAM;AAAG,GAMrC,IAAA,CAAkB,EACtB,SAAA,GACA,QAAA,GACA,eAAA,IAAgB,SAChB,UAAA,IAAW,IACX,SAAA,GACA,cAAA,IAAe,QACf,QAAA,GACA,SAAA,GACA,MAAA,GACA,SAAA,GACA,UAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EAAK,WAAU;AAAA,EAAK,IAAI,EAAE,UAAU,WAAW;AAAA,EAA/C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,IAAU,IAAa;AAAA,IACzB,SAAA;AAAA,IACT,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,KAAK;AAAA,MACL,WAAW;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,OAAO;AAAA,MACP,GAAI,KAAW;AAAA,QACb,WAAW,EAAE,SAAS,eAAe;AAAA,QACrC,sBAAsB,EAAE,SAAS,eAAe;AAAA,MAClD;AAAA,IACF;AAAA,IAhBF,UAAA;AAAA,MAkBE,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,YAAY;AAAA,UAAG,QAAQ;AAAA,UAAI,OAAO;AAAA,QAAG;AAAA,QAAI,UAAA;AAAA,MAAa,CAAA;AAAA,MAClF,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,UAAU;AAAA,UAAG,UAAU;AAAA,QAAE;AAAA,QAAtC,UAAA;AAAA,UACE,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAU,UAAU;AAAA,YAAM,SAAQ;AAAA,YAC3C,UAAA;AAAA,UACG,CAAA;AAAA,UACL,KAEC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAe,SAAQ;AAAA,YAChC,UAAA;AAAA,UACG,CAAA;AAAA,UAEP,KACC,gBAAA,EAAC,GAAD;AAAA,YAAO,IAAI;AAAA,cAAE,YAAY;AAAA,cAAU,eAAe;AAAA,cAAO,KAAK;AAAA,cAAG,UAAU;AAAA,YAAE;AAAA,YAA7E,UAAA,CACG,EAAQ,mBACP,gBAAA,EAAC,GAAD;AAAA,cAAiB,KAAI;AAAA,cAAG,iBAAiB,EAAQ;AAAA,cAAiB,MAAM;AAAA,YAAK,CAAA,GAE/E,gBAAA,EAAC,GAAD;AAAA,cAAM,OAAM;AAAA,cAAiB,UAAU;AAAA,cAAM,SAAQ;AAAA,cAClD,UAAA,EAAQ;AAAA,YACL,CAAA,CACD;AAAA;QAEJ;AAAA;MACP,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAY,YAAY;AAAA,QAAE;AAAA,QAAnD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,oBAAoB;AAAA,UAAe;AAAA,UACxD,SAAS;AAAA,UAER,UAAA,EAAqB,CAAM;AAAA,QACxB,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,OAAM;AAAA,UACN,IAAI,EAAE,eAAe,YAAY;AAAA,UACjC,SAAQ;AAAA,UAEP,UAAA;AAAA,QACG,CAAA,CAEH;AAAA;IACF;AAAA,EACP,CAAA,GAAA,gBAAA,EAAC,GAAD,EACE,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,MAAM,IAAS,IAAI,EAAc,CAAA;AAAA,IACjC,UAAU;AAAA,IACV,OAAO;AAAA,EACT,EACD,CAAA,CACE"}
|
|
@@ -9,9 +9,9 @@ interface LogoMarkProps {
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const isKnownIcon: (name: string) => boolean;
|
|
11
11
|
/**
|
|
12
|
-
* A resolved `Logo` as its mxui component.
|
|
13
|
-
* `
|
|
14
|
-
*
|
|
12
|
+
* A resolved `Logo` as its mxui component. A merchant's fallback category walks up to its top-level
|
|
13
|
+
* parent as `CategoryTile` does, since mxui only knows those. Reads the category store, so it renders
|
|
14
|
+
* inside the app's providers.
|
|
15
15
|
*/
|
|
16
16
|
declare const LogoMark: (({ logo, size }: LogoMarkProps) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
17
17
|
displayName: string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { useCategoryStore as e } from "../../common/context/hooks.es.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import o from "./CategoryTile.es.js";
|
|
3
|
+
import { observer as a } from "mobx-react-lite";
|
|
4
|
+
import { InstitutionLogo as u, MerchantLogo as m } from "@mxenabled/mxui";
|
|
5
|
+
import { Icon as c, IconList as f } from "@mxenabled/mx-icons";
|
|
5
6
|
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
7
|
+
var s = (r) => Object.hasOwn(f, r) ? !0 : (console.warn(`[LogoMark] "${r}" names no mx-icons icon — rendering nothing.`), !1), h = a(({ logo: r, size: t }) => {
|
|
7
8
|
const { getTopLevelCategoryGuid: i } = e();
|
|
8
|
-
return r.logo_name ?
|
|
9
|
+
return r.logo_name ? s(r.logo_name) ? /* @__PURE__ */ n(c, {
|
|
9
10
|
fill: r.logo_fill,
|
|
10
11
|
name: r.logo_name,
|
|
11
12
|
size: t,
|
|
12
13
|
sx: { color: r.logo_color }
|
|
13
|
-
}) : null : r.merchant_guid ? /* @__PURE__ */ n(
|
|
14
|
+
}) : null : r.merchant_guid ? /* @__PURE__ */ n(m, {
|
|
14
15
|
alt: r.merchant_name ?? "",
|
|
15
16
|
categoryGuid: r.category_guid ? i(r.category_guid) : "",
|
|
16
17
|
merchantGuid: r.merchant_guid,
|
|
@@ -19,14 +20,14 @@ var d = (r) => Object.hasOwn(s, r) ? !0 : (console.warn(`[LogoMark] "${r}" names
|
|
|
19
20
|
alt: r.institution_name ?? "",
|
|
20
21
|
institutionGuid: r.institution_guid,
|
|
21
22
|
size: t
|
|
22
|
-
}) : r.category_guid ? /* @__PURE__ */ n(
|
|
23
|
-
categoryGuid:
|
|
23
|
+
}) : r.category_guid ? /* @__PURE__ */ n(o, {
|
|
24
|
+
categoryGuid: r.category_guid,
|
|
24
25
|
size: t
|
|
25
26
|
}) : null;
|
|
26
27
|
});
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
h as default,
|
|
30
|
+
s as isKnownIcon
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
//# sourceMappingURL=LogoMark.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogoMark.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoMark.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport { Icon, IconList } from '@mxenabled/mx-icons'\nimport {
|
|
1
|
+
{"version":3,"file":"LogoMark.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoMark.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport { Icon, IconList } from '@mxenabled/mx-icons'\nimport { InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\n\nimport { useCategoryStore } from '../../common'\nimport type { Logo } from '../../core'\n\nimport CategoryTile from './CategoryTile'\n\ninterface LogoMarkProps {\n logo: Logo\n size: number\n}\n\n/**\n * Whether mx-icons draws `name` (own keys only, so `constructor` is rejected). An unknown name would\n * draw an empty box, so it is logged and the caller draws nothing.\n */\nexport const isKnownIcon = (name: string): boolean => {\n if (Object.hasOwn(IconList, name)) return true\n\n console.warn(`[LogoMark] \"${name}\" names no mx-icons icon — rendering nothing.`)\n return false\n}\n\n/**\n * A resolved `Logo` as its mxui component. A merchant's fallback category walks up to its top-level\n * parent as `CategoryTile` does, since mxui only knows those. Reads the category store, so it renders\n * inside the app's providers.\n */\nconst LogoMark = observer(({ logo, size }: LogoMarkProps) => {\n const { getTopLevelCategoryGuid } = useCategoryStore()\n\n if (logo.logo_name) {\n if (!isKnownIcon(logo.logo_name)) return null\n\n return (\n <Icon\n fill={logo.logo_fill}\n name={logo.logo_name}\n size={size}\n sx={{ color: logo.logo_color }}\n />\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? getTopLevelCategoryGuid(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={size}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={size}\n />\n )\n }\n\n if (logo.category_guid) {\n return <CategoryTile categoryGuid={logo.category_guid} size={size} />\n }\n\n return null\n})\n\nexport default LogoMark\n"],"mappings":";;;;;;AAmBA,IAAa,IAAA,CAAe,MACtB,OAAO,OAAO,GAAU,CAAI,IAAU,MAE1C,QAAQ,KAAK,eAAe,CAAA,+CAAmD,GACxE,KAQH,IAAW,EAAA,CAAU,EAAE,MAAA,GAAM,MAAA,EAAA,MAA0B;AAC3D,QAAM,EAAE,yBAAA,EAAA,IAA4B,EAAiB;AAErD,SAAI,EAAK,YACF,EAAY,EAAK,SAAS,IAG7B,gBAAA,EAAC,GAAD;AAAA,IACE,MAAM,EAAK;AAAA,IACX,MAAM,EAAK;AAAA,IACL,MAAA;AAAA,IACN,IAAI,EAAE,OAAO,EAAK,WAAW;AAAA,EAC9B,CAAA,IARsC,OAYvC,EAAK,gBAEL,gBAAA,EAAC,GAAD;AAAA,IACE,KAAK,EAAK,iBAAiB;AAAA,IAC3B,cAAc,EAAK,gBAAgB,EAAwB,EAAK,aAAa,IAAI;AAAA,IACjF,cAAc,EAAK;AAAA,IACb,MAAA;AAAA,EACP,CAAA,IAID,EAAK,mBAEL,gBAAA,EAAC,GAAD;AAAA,IACE,KAAK,EAAK,oBAAoB;AAAA,IAC9B,iBAAiB,EAAK;AAAA,IAChB,MAAA;AAAA,EACP,CAAA,IAID,EAAK,gBACA,gBAAA,EAAC,GAAD;AAAA,IAAc,cAAc,EAAK;AAAA,IAAqB,MAAA;AAAA,EAAO,CAAA,IAG/D;AACT,CAAC"}
|
|
@@ -8,6 +8,7 @@ export interface SubTabsProps {
|
|
|
8
8
|
selectedIndex: number;
|
|
9
9
|
onChange: (index: number) => void;
|
|
10
10
|
ariaLabel?: string;
|
|
11
|
+
isTypeFilter?: boolean;
|
|
11
12
|
}
|
|
12
13
|
/** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */
|
|
13
14
|
export declare const subTabPanelProps: (id: string, selectedIndex: number) => {
|
|
@@ -19,4 +20,4 @@ export declare const subTabPanelProps: (id: string, selectedIndex: number) => {
|
|
|
19
20
|
* The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's
|
|
20
21
|
* "Transactions Filtered By Type" on a change, so every drawer that uses it keeps legacy analytics.
|
|
21
22
|
*/
|
|
22
|
-
export declare const SubTabs: ({ id, tabs, selectedIndex, onChange, ariaLabel }: SubTabsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export declare const SubTabs: ({ id, tabs, selectedIndex, onChange, ariaLabel, isTypeFilter, }: SubTabsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ANALYTICS_EVENTS_CONFIG as
|
|
2
|
-
import { useAnalyticsEvent as
|
|
1
|
+
import { ANALYTICS_EVENTS_CONFIG as T } from "../analytics/analyticsEventsConfig.es.js";
|
|
2
|
+
import { useAnalyticsEvent as f } from "../analytics/useAnalyticsEvent.es.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
import v from "@mui/material/Tab";
|
|
5
5
|
import E from "@mui/material/Tabs";
|
|
6
|
-
var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`,
|
|
6
|
+
var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`, _ = (a, l) => ({
|
|
7
7
|
"aria-labelledby": i(a, l),
|
|
8
8
|
id: o(a),
|
|
9
9
|
role: "tabpanel"
|
|
10
|
-
}),
|
|
11
|
-
const
|
|
10
|
+
}), x = ({ id: a, tabs: l, selectedIndex: t, onChange: b, ariaLabel: m, isTypeFilter: p = !0 }) => {
|
|
11
|
+
const s = f();
|
|
12
12
|
if (!l.length) return null;
|
|
13
|
-
const
|
|
14
|
-
p(
|
|
13
|
+
const u = (r, e) => {
|
|
14
|
+
p && s(T.TYPE_FILTER_SELECTED), b(e);
|
|
15
15
|
};
|
|
16
16
|
return /* @__PURE__ */ n(E, {
|
|
17
17
|
"aria-label": m ?? l.map((r) => r.label).join(" / "),
|
|
18
|
-
onChange:
|
|
18
|
+
onChange: u,
|
|
19
19
|
value: t,
|
|
20
20
|
variant: "fullWidth",
|
|
21
21
|
children: l.map((r, e) => /* @__PURE__ */ n(v, {
|
|
@@ -31,8 +31,8 @@ var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`, I = (a, l) => ({
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
x as SubTabs,
|
|
35
|
+
_ as subTabPanelProps
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
//# sourceMappingURL=SubTabs.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubTabs.es.js","names":[],"sources":["../../../src/insights-v2/components/SubTabs.tsx"],"sourcesContent":["import type React from 'react'\n\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\n\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\n\nexport interface SubTabItem {\n label: string\n // Screen-reader name when it differs from the visible label (legacy pulse: \"Spend transactions\").\n ariaLabel?: string\n}\n\nexport interface SubTabsProps {\n // Base id: tab N is `${id}-tab-N` and controls `${id}-panel`; render that panel with subTabPanelProps.\n id: string\n tabs: SubTabItem[]\n selectedIndex: number\n onChange: (index: number) => void\n // Tablist name; defaults to the visible labels joined (\"Spend / Income\").\n ariaLabel?: string\n}\n\nconst subTabId = (id: string, index: number) => `${id}-tab-${index}`\nconst subPanelId = (id: string) => `${id}-panel`\n\n/** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */\nexport const subTabPanelProps = (id: string, selectedIndex: number) => ({\n 'aria-labelledby': subTabId(id, selectedIndex),\n id: subPanelId(id),\n role: 'tabpanel' as const,\n})\n\n/**\n * The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's\n * \"Transactions Filtered By Type\" on a change, so every drawer that uses it keeps legacy analytics.\n */\nexport const SubTabs = ({
|
|
1
|
+
{"version":3,"file":"SubTabs.es.js","names":[],"sources":["../../../src/insights-v2/components/SubTabs.tsx"],"sourcesContent":["import type React from 'react'\n\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\n\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\n\nexport interface SubTabItem {\n label: string\n // Screen-reader name when it differs from the visible label (legacy pulse: \"Spend transactions\").\n ariaLabel?: string\n}\n\nexport interface SubTabsProps {\n // Base id: tab N is `${id}-tab-N` and controls `${id}-panel`; render that panel with subTabPanelProps.\n id: string\n tabs: SubTabItem[]\n selectedIndex: number\n onChange: (index: number) => void\n // Tablist name; defaults to the visible labels joined (\"Spend / Income\").\n ariaLabel?: string\n // False for tabs that aren't a transaction-type filter: no \"Filtered By Type\" event.\n isTypeFilter?: boolean\n}\n\nconst subTabId = (id: string, index: number) => `${id}-tab-${index}`\nconst subPanelId = (id: string) => `${id}-panel`\n\n/** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */\nexport const subTabPanelProps = (id: string, selectedIndex: number) => ({\n 'aria-labelledby': subTabId(id, selectedIndex),\n id: subPanelId(id),\n role: 'tabpanel' as const,\n})\n\n/**\n * The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's\n * \"Transactions Filtered By Type\" on a change, so every drawer that uses it keeps legacy analytics.\n */\nexport const SubTabs = ({\n id,\n tabs,\n selectedIndex,\n onChange,\n ariaLabel,\n isTypeFilter = true,\n}: SubTabsProps) => {\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n if (!tabs.length) return null\n\n // MUI only calls onChange for a different tab, never on mount (legacy parity).\n const handleChange = (_event: React.SyntheticEvent, index: number) => {\n if (isTypeFilter) fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TYPE_FILTER_SELECTED)\n onChange(index)\n }\n\n return (\n <Tabs\n aria-label={ariaLabel ?? tabs.map((tab) => tab.label).join(' / ')}\n onChange={handleChange}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs.map((tab, index) => (\n <Tab\n aria-controls={subPanelId(id)}\n aria-label={tab.ariaLabel}\n id={subTabId(id, index)}\n key={tab.label}\n label={tab.label}\n sx={{ minWidth: 'auto', px: 0 }}\n />\n ))}\n </Tabs>\n )\n}\n"],"mappings":";;;;;AAyBA,IAAM,IAAA,CAAY,GAAY,MAAkB,GAAG,CAAA,QAAU,CAAA,IACvD,IAAA,CAAc,MAAe,GAAG,CAAA,UAGzB,IAAA,CAAoB,GAAY,OAA2B;AAAA,EACtE,mBAAmB,EAAS,GAAI,CAAa;AAAA,EAC7C,IAAI,EAAW,CAAE;AAAA,EACjB,MAAM;AACR,IAMa,IAAA,CAAW,EACtB,IAAA,GACA,MAAA,GACA,eAAA,GACA,UAAA,GACA,WAAA,GACA,cAAA,IAAe,GAAA,MACG;AAClB,QAAM,IAAqB,EAAkB;AAE7C,MAAI,CAAC,EAAK,OAAQ,QAAO;AAGzB,QAAM,IAAA,CAAgB,GAA8B,MAAkB;AACpE,IAAI,KAAc,EAAmB,EAAwB,oBAAoB,GACjF,EAAS,CAAK;AAAA,EAChB;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,cAAY,KAAa,EAAK,IAAA,CAAK,MAAQ,EAAI,KAAK,EAAE,KAAK,KAAK;AAAA,IAChE,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAQ;AAAA,IAEP,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,MACE,iBAAe,EAAW,CAAE;AAAA,MAC5B,cAAY,EAAI;AAAA,MAChB,IAAI,EAAS,GAAI,CAAK;AAAA,MAEtB,OAAO,EAAI;AAAA,MACX,IAAI;AAAA,QAAE,UAAU;AAAA,QAAQ,IAAI;AAAA,MAAE;AAAA,IAC/B,GAHM,EAAI,KAGV,CACF;AAAA,EACG,CAAA;AAEV"}
|
|
@@ -57,12 +57,12 @@ import sr from "./components/ConnectionDetailDrillDown.es.js";
|
|
|
57
57
|
import Br from "./components/SurveyModal.es.js";
|
|
58
58
|
import Cr from "./components/InsightErrorCard.es.js";
|
|
59
59
|
import { ErrorCard as kr } from "./components/ErrorCard.es.js";
|
|
60
|
-
import Dr from "./components/
|
|
61
|
-
import
|
|
62
|
-
import {
|
|
63
|
-
import Tr from "./components/
|
|
64
|
-
import yr from "./components/
|
|
65
|
-
import Rr from "./components/
|
|
60
|
+
import Dr from "./components/AmountBreakdownCard.es.js";
|
|
61
|
+
import Ar from "./components/BadgedTile.es.js";
|
|
62
|
+
import { OverflowMenu as Ir } from "./components/OverflowMenu.es.js";
|
|
63
|
+
import { InsightOptionsMenu as Tr } from "./components/InsightOptionsMenu.es.js";
|
|
64
|
+
import yr from "./components/StatusBadge.es.js";
|
|
65
|
+
import Rr from "./components/CompactInsightCard.es.js";
|
|
66
66
|
import { FeedbackBar as Hr } from "./components/FeedbackBar.es.js";
|
|
67
67
|
import { DismissInsightDialog as Or } from "./components/DismissInsightDialog.es.js";
|
|
68
68
|
import { HiddenConfirmationCard as Er } from "./components/HiddenConfirmationCard.es.js";
|
|
@@ -73,15 +73,15 @@ export {
|
|
|
73
73
|
W as AccountBlock,
|
|
74
74
|
M as AccountHeroCard,
|
|
75
75
|
J as AccountSwitchBlock,
|
|
76
|
-
|
|
76
|
+
Dr as AmountBreakdownCard,
|
|
77
77
|
Co as AmountPill,
|
|
78
78
|
e as BAR_ARIA_LABEL,
|
|
79
79
|
f as BAR_CHART_VARIANTS,
|
|
80
|
-
|
|
80
|
+
Ar as BadgedTile,
|
|
81
81
|
D as BarchartBlock,
|
|
82
82
|
Ur as BaseLayout,
|
|
83
83
|
Q as BudgetBlock,
|
|
84
|
-
|
|
84
|
+
Rr as CompactInsightCard,
|
|
85
85
|
sr as ConnectionDetailDrillDown,
|
|
86
86
|
Y as DebtPayoffCard,
|
|
87
87
|
mo as DebtsBlock,
|
|
@@ -103,7 +103,7 @@ export {
|
|
|
103
103
|
d as HOST_ACTIONS,
|
|
104
104
|
Er as HiddenConfirmationCard,
|
|
105
105
|
Cr as InsightErrorCard,
|
|
106
|
-
|
|
106
|
+
Tr as InsightOptionsMenu,
|
|
107
107
|
$ as InsightTransactionRow,
|
|
108
108
|
_r as LoadingCard,
|
|
109
109
|
Bo as LogoClusterCard,
|
|
@@ -113,7 +113,7 @@ export {
|
|
|
113
113
|
ko as MerchantHighlightCard,
|
|
114
114
|
Io as NoSpendDaysBlock,
|
|
115
115
|
xr as ObsolesceBanner,
|
|
116
|
-
|
|
116
|
+
Ir as OverflowMenu,
|
|
117
117
|
Do as P2PLogoStack,
|
|
118
118
|
yo as RepeatingTransactionBlock,
|
|
119
119
|
ir as SVGImageBlock,
|
|
@@ -122,7 +122,7 @@ export {
|
|
|
122
122
|
Eo as SavingsOpportunityBlock,
|
|
123
123
|
Oo as SavingsOpportunityCard,
|
|
124
124
|
_o as SavingsSummaryBlock,
|
|
125
|
-
|
|
125
|
+
yr as StatusBadge,
|
|
126
126
|
xo as StatusMessageCard,
|
|
127
127
|
r as StatusPill,
|
|
128
128
|
pr as StatusSnackbar,
|
|
@@ -48,16 +48,16 @@ import { TransactionListBlock as X } from "../actionBlocks/TransactionListBlock/
|
|
|
48
48
|
import { RemainingCashBlock as $ } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
49
49
|
import { AmountInputModalBlock as p } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
50
50
|
import { OverdraftBlock as oo, useOverdraftPrepare as to } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
51
|
+
import { AccountDetailsBlock as ro } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
|
|
52
|
+
import { useAccountDetailsPrepare as eo } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
|
|
53
|
+
import { AccountListBlock as io } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
|
|
54
|
+
import { useAccountListPrepare as ao } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
|
|
55
|
+
import { EmergencySavingsBlock as no } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
|
|
56
|
+
import { CreditUtilizationBlock as mo } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
|
|
57
|
+
import { useCreditUtilizationPrepare as co } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
|
|
58
|
+
import { PayoffCalculatorBlock as lo, usePayoffCalculatorPrepare as po } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
|
|
59
|
+
import { BudgetDetailsBlock as _o } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
|
|
60
|
+
import { useBudgetDetailsPrepare as so } from "../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare.es.js";
|
|
61
61
|
var i = (e) => {
|
|
62
62
|
}, t = (e) => ({
|
|
63
63
|
get Component() {
|
|
@@ -156,37 +156,37 @@ var i = (e) => {
|
|
|
156
156
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
157
157
|
})),
|
|
158
158
|
[o.CREDIT_UTILIZATION_ACTION_BLOCK]: t(() => ({
|
|
159
|
-
Component:
|
|
160
|
-
usePrepare:
|
|
159
|
+
Component: mo,
|
|
160
|
+
usePrepare: co,
|
|
161
161
|
title: (e, r) => r.insights_feed?.credit_utilization?.title ?? ""
|
|
162
162
|
})),
|
|
163
163
|
[o.EMERGENCY_SAVINGS_ACTION_BLOCK]: t(() => ({
|
|
164
|
-
Component:
|
|
164
|
+
Component: no,
|
|
165
165
|
usePrepare: i,
|
|
166
166
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
167
167
|
})),
|
|
168
168
|
[o.PAYOFF_CALCULATOR_ACTION_BLOCK]: t(() => ({
|
|
169
|
-
Component:
|
|
170
|
-
usePrepare:
|
|
169
|
+
Component: lo,
|
|
170
|
+
usePrepare: po,
|
|
171
171
|
title: (e, r) => r.insights_feed?.payoff_calculator?.title ?? ""
|
|
172
172
|
})),
|
|
173
173
|
[o.BUDGET_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
174
|
-
Component:
|
|
174
|
+
Component: _o,
|
|
175
175
|
headerAction: "close",
|
|
176
|
-
usePrepare:
|
|
176
|
+
usePrepare: so,
|
|
177
177
|
title: (e, r, a) => {
|
|
178
178
|
const n = a ? C(e, a, r) : void 0;
|
|
179
179
|
return n && r.budgets?.details_type_title ? _(r.budgets.details_type_title, n) : a?.insights_payload?.title || r.budgets?.details_title || "";
|
|
180
180
|
}
|
|
181
181
|
})),
|
|
182
182
|
[o.ACCOUNT_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
183
|
-
Component:
|
|
184
|
-
usePrepare:
|
|
183
|
+
Component: ro,
|
|
184
|
+
usePrepare: eo,
|
|
185
185
|
title: (e, r) => r.accounts?.account_details ?? ""
|
|
186
186
|
})),
|
|
187
187
|
[o.ACCOUNT_LIST_ACTION_BLOCK]: t(() => ({
|
|
188
|
-
Component:
|
|
189
|
-
usePrepare:
|
|
188
|
+
Component: io,
|
|
189
|
+
usePrepare: ao,
|
|
190
190
|
title: (e, r) => r.insights_feed?.account_list?.title ?? ""
|
|
191
191
|
})),
|
|
192
192
|
[o.HELP_ACTION_BLOCK]: t(() => ({
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Recurrence, RepeatingTransaction } from '../../core';
|
|
2
2
|
interface RecurringTransactionDetailsProps {
|
|
3
|
+
/** `insights`: the Insights Expense Details design; default: the Recurring Transactions widget's view. */
|
|
4
|
+
layout?: 'default' | 'insights';
|
|
3
5
|
onDeleted: () => void;
|
|
4
6
|
recurringTransaction: RepeatingTransaction;
|
|
5
7
|
selectedRecurrence: Recurrence | null;
|
|
6
8
|
}
|
|
7
|
-
export declare const RecurringTransactionDetails: (({ onDeleted, recurringTransaction, selectedRecurrence }: RecurringTransactionDetailsProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
|
+
export declare const RecurringTransactionDetails: (({ layout, onDeleted, recurringTransaction, selectedRecurrence, }: RecurringTransactionDetailsProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
10
|
displayName: string;
|
|
9
11
|
};
|
|
10
12
|
export {};
|