@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,12 +1,13 @@
|
|
|
1
|
-
import { formatSignedCurrency as
|
|
2
|
-
import { getLogoElevation as
|
|
1
|
+
import { formatSignedCurrency as l } from "../../../core/utils/NumberFormatting.es.js";
|
|
2
|
+
import { getLogoElevation as h } from "../../components/logoShadow.es.js";
|
|
3
|
+
import s from "../../components/InsightListRow.es.js";
|
|
3
4
|
import { createElement as b } from "react";
|
|
4
5
|
import i from "@mui/material/Stack";
|
|
5
6
|
import { Text as a } from "@mxenabled/mxui";
|
|
6
7
|
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
var
|
|
8
|
+
import u from "@mui/material/Box";
|
|
9
|
+
import x from "@mui/material/Divider";
|
|
10
|
+
var c = ({ label: t, value: o }) => /* @__PURE__ */ n(i, {
|
|
10
11
|
sx: {
|
|
11
12
|
alignItems: "center",
|
|
12
13
|
flexDirection: "row",
|
|
@@ -22,9 +23,9 @@ var h = ({ label: t, value: e }) => /* @__PURE__ */ n(i, {
|
|
|
22
23
|
bold: !0,
|
|
23
24
|
sx: { fontVariantNumeric: "tabular-nums" },
|
|
24
25
|
variant: "body1",
|
|
25
|
-
children:
|
|
26
|
+
children: o
|
|
26
27
|
})]
|
|
27
|
-
}),
|
|
28
|
+
}), f = ({ cashOnHand: t, cashOnHandLabel: o, remaining: e, upcomingExpenses: d, upcomingExpensesLabel: p }) => /* @__PURE__ */ r(i, {
|
|
28
29
|
sx: {
|
|
29
30
|
pb: 8,
|
|
30
31
|
pt: 24,
|
|
@@ -34,12 +35,12 @@ var h = ({ label: t, value: e }) => /* @__PURE__ */ n(i, {
|
|
|
34
35
|
sx: {
|
|
35
36
|
bgcolor: "background.paper",
|
|
36
37
|
borderRadius: "8px",
|
|
37
|
-
boxShadow:
|
|
38
|
+
boxShadow: h,
|
|
38
39
|
gap: 16,
|
|
39
40
|
p: 16
|
|
40
41
|
},
|
|
41
|
-
children: [
|
|
42
|
-
"aria-label": `${
|
|
42
|
+
children: [e && /* @__PURE__ */ n(i, {
|
|
43
|
+
"aria-label": `${l(e.amount)}, ${e.caption}`,
|
|
43
44
|
role: "group",
|
|
44
45
|
sx: {
|
|
45
46
|
alignItems: "center",
|
|
@@ -52,12 +53,12 @@ var h = ({ label: t, value: e }) => /* @__PURE__ */ n(i, {
|
|
|
52
53
|
bold: !0,
|
|
53
54
|
component: "p",
|
|
54
55
|
variant: "h2",
|
|
55
|
-
children:
|
|
56
|
+
children: l(e.amount)
|
|
56
57
|
}), /* @__PURE__ */ r(a, {
|
|
57
58
|
"aria-hidden": !0,
|
|
58
59
|
color: "text.secondary",
|
|
59
60
|
variant: "subtitle2",
|
|
60
|
-
children:
|
|
61
|
+
children: e.caption
|
|
61
62
|
})]
|
|
62
63
|
}), /* @__PURE__ */ n(i, {
|
|
63
64
|
sx: {
|
|
@@ -67,66 +68,19 @@ var h = ({ label: t, value: e }) => /* @__PURE__ */ n(i, {
|
|
|
67
68
|
overflow: "hidden"
|
|
68
69
|
},
|
|
69
70
|
children: [
|
|
70
|
-
/* @__PURE__ */ r(
|
|
71
|
-
label:
|
|
72
|
-
value:
|
|
71
|
+
/* @__PURE__ */ r(c, {
|
|
72
|
+
label: o,
|
|
73
|
+
value: l(t)
|
|
73
74
|
}),
|
|
74
|
-
/* @__PURE__ */ r(
|
|
75
|
-
/* @__PURE__ */ r(
|
|
76
|
-
label:
|
|
77
|
-
value:
|
|
75
|
+
/* @__PURE__ */ r(x, {}),
|
|
76
|
+
/* @__PURE__ */ r(c, {
|
|
77
|
+
label: p,
|
|
78
|
+
value: l(-d)
|
|
78
79
|
})
|
|
79
80
|
]
|
|
80
81
|
})]
|
|
81
82
|
})
|
|
82
|
-
}),
|
|
83
|
-
component: "li",
|
|
84
|
-
sx: { position: "relative" },
|
|
85
|
-
children: [/* @__PURE__ */ n(i, {
|
|
86
|
-
sx: {
|
|
87
|
-
alignItems: "center",
|
|
88
|
-
flexDirection: "row",
|
|
89
|
-
gap: 16,
|
|
90
|
-
px: 24,
|
|
91
|
-
py: 16
|
|
92
|
-
},
|
|
93
|
-
children: [/* @__PURE__ */ n(i, {
|
|
94
|
-
sx: {
|
|
95
|
-
alignItems: "center",
|
|
96
|
-
flexDirection: "row",
|
|
97
|
-
flexGrow: 1,
|
|
98
|
-
gap: 12,
|
|
99
|
-
minWidth: 0
|
|
100
|
-
},
|
|
101
|
-
children: [/* @__PURE__ */ r(p, {
|
|
102
|
-
sx: {
|
|
103
|
-
display: "flex",
|
|
104
|
-
flexShrink: 0,
|
|
105
|
-
height: 32,
|
|
106
|
-
width: 32
|
|
107
|
-
},
|
|
108
|
-
children: o
|
|
109
|
-
}), /* @__PURE__ */ r(a, {
|
|
110
|
-
truncate: !0,
|
|
111
|
-
variant: "body1",
|
|
112
|
-
children: l
|
|
113
|
-
})]
|
|
114
|
-
}), /* @__PURE__ */ r(a, {
|
|
115
|
-
bold: !0,
|
|
116
|
-
sx: {
|
|
117
|
-
flexShrink: 0,
|
|
118
|
-
fontVariantNumeric: "tabular-nums"
|
|
119
|
-
},
|
|
120
|
-
variant: "body1",
|
|
121
|
-
children: d(t)
|
|
122
|
-
})]
|
|
123
|
-
}), /* @__PURE__ */ r(s, { sx: {
|
|
124
|
-
bottom: 0,
|
|
125
|
-
left: e ? 0 : 24,
|
|
126
|
-
position: "absolute",
|
|
127
|
-
right: 0
|
|
128
|
-
} })]
|
|
129
|
-
}), m = ({ header: t, rows: e }) => /* @__PURE__ */ n(i, { children: [/* @__PURE__ */ r(p, {
|
|
83
|
+
}), m = ({ header: t, rows: o }) => /* @__PURE__ */ n(i, { children: [/* @__PURE__ */ r(u, {
|
|
130
84
|
sx: {
|
|
131
85
|
pb: 4,
|
|
132
86
|
pt: 16,
|
|
@@ -146,24 +100,24 @@ var h = ({ label: t, value: e }) => /* @__PURE__ */ n(i, {
|
|
|
146
100
|
m: 0,
|
|
147
101
|
p: 0
|
|
148
102
|
},
|
|
149
|
-
children:
|
|
150
|
-
...
|
|
151
|
-
isLast:
|
|
152
|
-
key:
|
|
103
|
+
children: o.map(({ key: e, ...d }, p) => /* @__PURE__ */ b(s, {
|
|
104
|
+
...d,
|
|
105
|
+
isLast: p === o.length - 1,
|
|
106
|
+
key: e
|
|
153
107
|
}))
|
|
154
|
-
})] }),
|
|
108
|
+
})] }), I = ({ accounts: t, expenses: o, summary: e }) => /* @__PURE__ */ n(i, {
|
|
155
109
|
sx: {
|
|
156
110
|
bgcolor: "background.default",
|
|
157
111
|
pb: 24
|
|
158
112
|
},
|
|
159
113
|
children: [
|
|
160
|
-
/* @__PURE__ */ r(
|
|
114
|
+
/* @__PURE__ */ r(f, { ...e }),
|
|
161
115
|
t.rows.length > 0 && /* @__PURE__ */ r(m, { ...t }),
|
|
162
|
-
|
|
116
|
+
o.rows.length > 0 && /* @__PURE__ */ r(m, { ...o })
|
|
163
117
|
]
|
|
164
118
|
});
|
|
165
119
|
export {
|
|
166
|
-
|
|
120
|
+
I as default
|
|
167
121
|
};
|
|
168
122
|
|
|
169
123
|
//# sourceMappingURL=RemainingCashContent.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemainingCashContent.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatSignedCurrency } from '../../../core/utils/NumberFormatting'\nimport { getLogoElevation } from '../../components/logoShadow'\n\nexport interface RemainingCashRow {\n key: string\n name: string\n amount: number\n /** The row's 32px logo: an account's institution or an expense's category. */\n leading: ReactNode\n}\n\ninterface RemainingCashSectionProps {\n header: string\n /** Already grouped and ordered, including any \"Other (#)\" row. */\n rows: RemainingCashRow[]\n}\n\ninterface RemainingCashSummaryProps {\n /** Omitted when there is no upcoming payday: a \"remaining until payday\" figure has no meaning. */\n remaining?: { amount: number; caption: string }\n cashOnHand: number\n upcomingExpenses: number\n cashOnHandLabel: string\n upcomingExpensesLabel: string\n}\n\nexport interface RemainingCashContentProps {\n summary: RemainingCashSummaryProps\n accounts: RemainingCashSectionProps\n expenses: RemainingCashSectionProps\n}\n\nconst BreakdownRow = ({ label, value }: { label: string; value: string }) => (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, minHeight: 44, px: 24 }}>\n <Text sx={{ flexGrow: 1 }} variant=\"body1\">\n {label}\n </Text>\n <Text bold={true} sx={{ fontVariantNumeric: 'tabular-nums' }} variant=\"body1\">\n {value}\n </Text>\n </Stack>\n)\n\nconst Summary = ({\n cashOnHand,\n cashOnHandLabel,\n remaining,\n upcomingExpenses,\n upcomingExpensesLabel,\n}: RemainingCashSummaryProps) => (\n <Stack sx={{ pb: 8, pt: 24, px: 24 }}>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 16,\n p: 16,\n }}\n >\n {remaining && (\n // One announcement (\"$2,350.00, Remaining until payday (7 days)\") instead of two loose text\n // nodes. The amount keeps the h2 look but is a paragraph: it is a value, not a heading.\n <Stack\n aria-label={`${formatSignedCurrency(remaining.amount)}, ${remaining.caption}`}\n role=\"group\"\n sx={{ alignItems: 'center', justifyContent: 'center', minHeight: 72, p: 12 }}\n >\n <Text aria-hidden={true} bold={true} component=\"p\" variant=\"h2\">\n {formatSignedCurrency(remaining.amount)}\n </Text>\n <Text aria-hidden={true} color=\"text.secondary\" variant=\"subtitle2\">\n {remaining.caption}\n </Text>\n </Stack>\n )}\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n }}\n >\n <BreakdownRow label={cashOnHandLabel} value={formatSignedCurrency(cashOnHand)} />\n <Divider />\n {/* Shown as a deduction (-$1,200.00) per Figma; the expense rows below show positive amounts. */}\n <BreakdownRow\n label={upcomingExpensesLabel}\n value={formatSignedCurrency(-upcomingExpenses)}\n />\n </Stack>\n </Stack>\n </Stack>\n)\n\n
|
|
1
|
+
{"version":3,"file":"RemainingCashContent.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatSignedCurrency } from '../../../core/utils/NumberFormatting'\nimport InsightListRow from '../../components/InsightListRow'\nimport { getLogoElevation } from '../../components/logoShadow'\n\nexport interface RemainingCashRow {\n key: string\n name: string\n amount: number\n /** The row's 32px logo: an account's institution or an expense's category. */\n leading: ReactNode\n}\n\ninterface RemainingCashSectionProps {\n header: string\n /** Already grouped and ordered, including any \"Other (#)\" row. */\n rows: RemainingCashRow[]\n}\n\ninterface RemainingCashSummaryProps {\n /** Omitted when there is no upcoming payday: a \"remaining until payday\" figure has no meaning. */\n remaining?: { amount: number; caption: string }\n cashOnHand: number\n upcomingExpenses: number\n cashOnHandLabel: string\n upcomingExpensesLabel: string\n}\n\nexport interface RemainingCashContentProps {\n summary: RemainingCashSummaryProps\n accounts: RemainingCashSectionProps\n expenses: RemainingCashSectionProps\n}\n\nconst BreakdownRow = ({ label, value }: { label: string; value: string }) => (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, minHeight: 44, px: 24 }}>\n <Text sx={{ flexGrow: 1 }} variant=\"body1\">\n {label}\n </Text>\n <Text bold={true} sx={{ fontVariantNumeric: 'tabular-nums' }} variant=\"body1\">\n {value}\n </Text>\n </Stack>\n)\n\nconst Summary = ({\n cashOnHand,\n cashOnHandLabel,\n remaining,\n upcomingExpenses,\n upcomingExpensesLabel,\n}: RemainingCashSummaryProps) => (\n <Stack sx={{ pb: 8, pt: 24, px: 24 }}>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 16,\n p: 16,\n }}\n >\n {remaining && (\n // One announcement (\"$2,350.00, Remaining until payday (7 days)\") instead of two loose text\n // nodes. The amount keeps the h2 look but is a paragraph: it is a value, not a heading.\n <Stack\n aria-label={`${formatSignedCurrency(remaining.amount)}, ${remaining.caption}`}\n role=\"group\"\n sx={{ alignItems: 'center', justifyContent: 'center', minHeight: 72, p: 12 }}\n >\n <Text aria-hidden={true} bold={true} component=\"p\" variant=\"h2\">\n {formatSignedCurrency(remaining.amount)}\n </Text>\n <Text aria-hidden={true} color=\"text.secondary\" variant=\"subtitle2\">\n {remaining.caption}\n </Text>\n </Stack>\n )}\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n }}\n >\n <BreakdownRow label={cashOnHandLabel} value={formatSignedCurrency(cashOnHand)} />\n <Divider />\n {/* Shown as a deduction (-$1,200.00) per Figma; the expense rows below show positive amounts. */}\n <BreakdownRow\n label={upcomingExpensesLabel}\n value={formatSignedCurrency(-upcomingExpenses)}\n />\n </Stack>\n </Stack>\n </Stack>\n)\n\n// The drawer title is the h2, so section headers are h3 and each section is a real list.\nconst Section = ({ header, rows }: RemainingCashSectionProps) => (\n <Stack>\n <Box sx={{ pb: 4, pt: 16, px: 24 }}>\n <Text bold={true} component=\"h3\" variant=\"body1\">\n {header}\n </Text>\n </Box>\n <Stack component=\"ul\" sx={{ bgcolor: 'background.paper', listStyle: 'none', m: 0, p: 0 }}>\n {rows.map(({ key, ...row }, index) => (\n <InsightListRow {...row} isLast={index === rows.length - 1} key={key} />\n ))}\n </Stack>\n </Stack>\n)\n\n/** Presentational body of the Remaining Cash drawer (Figma 9936:39163, minus the drawer header). */\nconst RemainingCashContent = ({ accounts, expenses, summary }: RemainingCashContentProps) => (\n <Stack sx={{ bgcolor: 'background.default', pb: 24 }}>\n <Summary {...summary} />\n {accounts.rows.length > 0 && <Section {...accounts} />}\n {expenses.rows.length > 0 && <Section {...expenses} />}\n </Stack>\n)\n\nexport default RemainingCashContent\n"],"mappings":"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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { RemainingCashCopy } from '../../../core';
|
|
2
3
|
/** Rows shown per section before the rest fold into an "Other (#)" row (Figma shows two). */
|
|
3
4
|
export declare const ROW_LIMIT = 2;
|
|
@@ -12,5 +13,16 @@ export interface GroupedRows<T> {
|
|
|
12
13
|
export declare const groupRows: <T extends {
|
|
13
14
|
amount: number;
|
|
14
15
|
}>(rows: T[]) => GroupedRows<T>;
|
|
16
|
+
export interface FoldableRow {
|
|
17
|
+
key: string;
|
|
18
|
+
name: string;
|
|
19
|
+
amount: number;
|
|
20
|
+
leading: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/** Top rows by amount, then one "Other (#)" row with the rest's count and total. */
|
|
23
|
+
export declare const foldOtherRows: <T extends FoldableRow>(rows: T[], otherLabel: {
|
|
24
|
+
one: string;
|
|
25
|
+
multi: string;
|
|
26
|
+
}, otherLeading: ReactNode) => (T | FoldableRow)[];
|
|
15
27
|
export declare const getCaption: (copy: RemainingCashCopy, days: number) => string;
|
|
16
28
|
export declare const getOtherLabel: (templateOne: string, templateMulti: string, count: number) => string;
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import { buildDynamicCopy as a, buildPluralCopy as i } from "../../../core/utils/Localization.es.js";
|
|
2
|
-
var
|
|
3
|
-
const
|
|
4
|
-
if (
|
|
5
|
-
const n =
|
|
2
|
+
var u = (r) => {
|
|
3
|
+
const t = [...r].sort((e, o) => o.amount - e.amount);
|
|
4
|
+
if (t.length <= 2) return { shown: t };
|
|
5
|
+
const n = t.slice(2);
|
|
6
6
|
return {
|
|
7
|
-
shown:
|
|
7
|
+
shown: t.slice(0, 2),
|
|
8
8
|
others: {
|
|
9
9
|
count: n.length,
|
|
10
10
|
total: n.reduce((e, o) => e + o.amount, 0)
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
},
|
|
13
|
+
}, m = (r, t, n) => {
|
|
14
|
+
const { others: e, shown: o } = u(r);
|
|
15
|
+
return e ? [...o, {
|
|
16
|
+
amount: e.total,
|
|
17
|
+
key: "other",
|
|
18
|
+
leading: n,
|
|
19
|
+
name: l(t.one, t.multi, e.count)
|
|
20
|
+
}] : o;
|
|
21
|
+
}, g = (r, t) => t === 1 ? r.remaining_until_payday_one : a(r.remaining_until_payday, String(t)), l = (r, t, n) => i(r, t, n, String(n));
|
|
14
22
|
export {
|
|
15
|
-
|
|
16
|
-
g as
|
|
17
|
-
l as
|
|
23
|
+
m as foldOtherRows,
|
|
24
|
+
g as getCaption,
|
|
25
|
+
l as getOtherLabel,
|
|
26
|
+
u as groupRows
|
|
18
27
|
};
|
|
19
28
|
|
|
20
29
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/layout.ts"],"sourcesContent":["import type { RemainingCashCopy } from '../../../core'\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\n\n/** Rows shown per section before the rest fold into an \"Other (#)\" row (Figma shows two). */\nexport const ROW_LIMIT = 2\n\nexport interface GroupedRows<T> {\n shown: T[]\n others?: { count: number; total: number }\n}\n\n/** Largest rows first (stable for ties), capped at `ROW_LIMIT`; the remainder as a count and total. */\nexport const groupRows = <T extends { amount: number }>(rows: T[]): GroupedRows<T> => {\n const sorted = [...rows].sort((a, b) => b.amount - a.amount)\n\n if (sorted.length <= ROW_LIMIT) return { shown: sorted }\n\n const rest = sorted.slice(ROW_LIMIT)\n\n return {\n shown: sorted.slice(0, ROW_LIMIT),\n others: { count: rest.length, total: rest.reduce((total, r) => total + r.amount, 0) },\n }\n}\n\nexport const getCaption = (copy: RemainingCashCopy, days: number): string => {\n if (days === 1) return copy.remaining_until_payday_one\n\n return buildDynamicCopy(copy.remaining_until_payday, String(days)) as string\n}\n\nexport const getOtherLabel = (templateOne: string, templateMulti: string, count: number): string =>\n buildPluralCopy(templateOne, templateMulti, count, String(count)) as string\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/layout.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport type { RemainingCashCopy } from '../../../core'\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\n\n/** Rows shown per section before the rest fold into an \"Other (#)\" row (Figma shows two). */\nexport const ROW_LIMIT = 2\n\nexport interface GroupedRows<T> {\n shown: T[]\n others?: { count: number; total: number }\n}\n\n/** Largest rows first (stable for ties), capped at `ROW_LIMIT`; the remainder as a count and total. */\nexport const groupRows = <T extends { amount: number }>(rows: T[]): GroupedRows<T> => {\n const sorted = [...rows].sort((a, b) => b.amount - a.amount)\n\n if (sorted.length <= ROW_LIMIT) return { shown: sorted }\n\n const rest = sorted.slice(ROW_LIMIT)\n\n return {\n shown: sorted.slice(0, ROW_LIMIT),\n others: { count: rest.length, total: rest.reduce((total, r) => total + r.amount, 0) },\n }\n}\n\nexport interface FoldableRow {\n key: string\n name: string\n amount: number\n leading: ReactNode\n}\n\n/** Top rows by amount, then one \"Other (#)\" row with the rest's count and total. */\nexport const foldOtherRows = <T extends FoldableRow>(\n rows: T[],\n otherLabel: { one: string; multi: string },\n otherLeading: ReactNode,\n): (T | FoldableRow)[] => {\n const { others, shown } = groupRows(rows)\n\n if (!others) return shown\n\n return [\n ...shown,\n {\n amount: others.total,\n key: 'other',\n leading: otherLeading,\n name: getOtherLabel(otherLabel.one, otherLabel.multi, others.count),\n },\n ]\n}\n\nexport const getCaption = (copy: RemainingCashCopy, days: number): string => {\n if (days === 1) return copy.remaining_until_payday_one\n\n return buildDynamicCopy(copy.remaining_until_payday, String(days)) as string\n}\n\nexport const getOtherLabel = (templateOne: string, templateMulti: string, count: number): string =>\n buildPluralCopy(templateOne, templateMulti, count, String(count)) as string\n"],"mappings":";AAcA,IAAa,IAAA,CAA2C,MAA8B;AACpF,QAAM,IAAS,CAAC,GAAG,CAAI,EAAE,KAAA,CAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;AAE3D,MAAI,EAAO,UAAA,EAAqB,QAAO,EAAE,OAAO,EAAO;AAEvD,QAAM,IAAO,EAAO,MAAA,CAAe;AAEnC,SAAO;AAAA,IACL,OAAO,EAAO,MAAM,GAAA,CAAY;AAAA,IAChC,QAAQ;AAAA,MAAE,OAAO,EAAK;AAAA,MAAQ,OAAO,EAAK,OAAA,CAAQ,GAAO,MAAM,IAAQ,EAAE,QAAQ,CAAC;AAAA,IAAE;AAAA,EACtF;AACF,GAUa,IAAA,CACX,GACA,GACA,MACwB;AACxB,QAAM,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAU,CAAI;AAExC,SAAK,IAEE,CACL,GAAG,GACH;AAAA,IACE,QAAQ,EAAO;AAAA,IACf,KAAK;AAAA,IACL,SAAS;AAAA,IACT,MAAM,EAAc,EAAW,KAAK,EAAW,OAAO,EAAO,KAAK;AAAA,EACpE,CACF,IAVoB;AAWtB,GAEa,IAAA,CAAc,GAAyB,MAC9C,MAAS,IAAU,EAAK,6BAErB,EAAiB,EAAK,wBAAwB,OAAO,CAAI,CAAC,GAGtD,IAAA,CAAiB,GAAqB,GAAuB,MACxE,EAAgB,GAAa,GAAe,GAAO,OAAO,CAAK,CAAC"}
|
|
@@ -5,8 +5,8 @@ import { fromUnixUTC as A } from "../../../core/utils/DateUtil.es.js";
|
|
|
5
5
|
import { getCategoryColor as P } from "../../../core/utils/CategoryUtil.es.js";
|
|
6
6
|
import { buildDataSeries as M } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
7
7
|
import { getLayoutConfig as I } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
8
|
+
import w from "../../components/LogoMark.es.js";
|
|
9
|
+
import { buildProjectedBillTransaction as H, calendarDateOf as Y, finiteNumberOf as m, guidListOf as N, nonEmptyStringOf as b } from "./utils.es.js";
|
|
10
10
|
import { Icon as F } from "@mxenabled/mx-icons";
|
|
11
11
|
import { jsx as c } from "react/jsx-runtime";
|
|
12
12
|
import { endOfMonth as C, fromUnixTime as x, isValid as L, parseISO as p, startOfMonth as B } from "date-fns";
|
|
@@ -28,24 +28,24 @@ var i = {
|
|
|
28
28
|
start: B(T(t)),
|
|
29
29
|
end: C(T(t))
|
|
30
30
|
}), G = (t) => t?.length ? { accounts: t } : {}, V = ({ beat: t }) => {
|
|
31
|
-
const { account_guid: e, from_date: a, to_date:
|
|
32
|
-
return typeof e != "string" || typeof a != "number" || typeof
|
|
31
|
+
const { account_guid: e, from_date: a, to_date: o } = t.insights_payload?.drilldown_data ?? {};
|
|
32
|
+
return typeof e != "string" || typeof a != "number" || typeof o != "number" || !Number.isFinite(a) || !Number.isFinite(o) || o <= a ? {
|
|
33
33
|
accounts: [],
|
|
34
34
|
custom: () => !1
|
|
35
35
|
} : {
|
|
36
36
|
accounts: [e],
|
|
37
|
-
custom: (
|
|
37
|
+
custom: (r) => !r.is_hidden && r.feed_status !== U.PENDING,
|
|
38
38
|
showSplits: !0,
|
|
39
39
|
dateRange: {
|
|
40
40
|
start: A(a),
|
|
41
|
-
end: A(
|
|
41
|
+
end: A(o - 1)
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}, W = (t) => {
|
|
45
45
|
const e = t?.drilldown_data ?? {};
|
|
46
46
|
return {
|
|
47
47
|
transaction_guids: N(e.transaction_guids),
|
|
48
|
-
date:
|
|
48
|
+
date: Y(e.due_date),
|
|
49
49
|
amount: m(e.amount),
|
|
50
50
|
category_guid: b(e.category_guid),
|
|
51
51
|
average_amount: m(e.average_amount),
|
|
@@ -54,15 +54,15 @@ var i = {
|
|
|
54
54
|
}, _ = (t) => {
|
|
55
55
|
const e = t;
|
|
56
56
|
return Array.isArray(e?.names) && Array.isArray(e?.data) ? e : void 0;
|
|
57
|
-
},
|
|
57
|
+
}, k = (t) => {
|
|
58
58
|
const e = t?.drilldown_data ?? {};
|
|
59
59
|
return {
|
|
60
60
|
account_guids: N(e.account_guids),
|
|
61
61
|
data_series: _(e.data_series),
|
|
62
62
|
average_amount: m(e.average_amount)
|
|
63
63
|
};
|
|
64
|
-
}, R = ["income", "other"],
|
|
65
|
-
const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data?.legends?.map(({ label:
|
|
64
|
+
}, R = ["income", "other"], j = (t) => {
|
|
65
|
+
const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data?.legends?.map(({ label: o }) => o);
|
|
66
66
|
return {
|
|
67
67
|
data_series: _(e.data_series),
|
|
68
68
|
average_amount: m(e.average_amount),
|
|
@@ -70,57 +70,57 @@ var i = {
|
|
|
70
70
|
sub_tab_labels: a?.length === R.length ? a : void 0
|
|
71
71
|
};
|
|
72
72
|
}, z = 2, K = (t, e) => {
|
|
73
|
-
const a = e ?? {},
|
|
74
|
-
return !
|
|
75
|
-
data_series:
|
|
76
|
-
legends:
|
|
73
|
+
const a = e ?? {}, o = _(a.series), r = Array.isArray(a.labels) ? a.labels.map(b) : [];
|
|
74
|
+
return !o || r.length !== z || !r.every((s) => !!s) ? {} : {
|
|
75
|
+
data_series: o,
|
|
76
|
+
legends: r.map((s) => ({
|
|
77
77
|
label: s,
|
|
78
78
|
value: 0
|
|
79
79
|
}))
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const a = e.transaction_history_block?.monthly_debt_to_income_tip_message,
|
|
83
|
-
if (!(!a || !
|
|
81
|
+
}, q = (t, e) => M(_(e?.series)).flatMap((a) => a.aggregated_guids ?? []), J = (t, e) => {
|
|
82
|
+
const a = e.transaction_history_block?.monthly_debt_to_income_tip_message, o = e.transaction_history_block?.monthly_debt_to_income_tip_limit;
|
|
83
|
+
if (!(!a || !o))
|
|
84
84
|
return {
|
|
85
|
-
message: h(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children:
|
|
85
|
+
message: h(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: o })),
|
|
86
86
|
onDismiss: () => t(!0)
|
|
87
87
|
};
|
|
88
|
-
},
|
|
89
|
-
const a =
|
|
88
|
+
}, Q = (t) => M(_(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), X = (t, e) => {
|
|
89
|
+
const a = H(t, e);
|
|
90
90
|
return a ? [...t, a] : t;
|
|
91
|
-
},
|
|
92
|
-
const
|
|
93
|
-
if (!
|
|
91
|
+
}, Z = (t, e, a, o) => {
|
|
92
|
+
const r = o?.merchant_name, s = o?.date;
|
|
93
|
+
if (!r || !s) return;
|
|
94
94
|
const n = e.transaction_history_block?.upcoming_bill_tip_message;
|
|
95
95
|
if (n)
|
|
96
96
|
return {
|
|
97
|
-
message: h(n, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }),
|
|
97
|
+
message: h(n, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), r, E(p(s), D.FULL_MONTH_DAY)),
|
|
98
98
|
onDismiss: () => t(!0)
|
|
99
99
|
};
|
|
100
100
|
}, v = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
|
|
101
|
-
const
|
|
101
|
+
const o = e[a], r = o?.guid, s = t.find((n) => n.guid === r)?.has_been_split;
|
|
102
102
|
return {
|
|
103
|
-
custom: (n) => n.guid ===
|
|
104
|
-
dateRange: S(
|
|
103
|
+
custom: (n) => n.guid === r,
|
|
104
|
+
dateRange: S(o?.date),
|
|
105
105
|
showSplits: !s
|
|
106
106
|
};
|
|
107
|
-
},
|
|
108
|
-
const
|
|
107
|
+
}, $ = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
|
|
108
|
+
const o = t[e], r = a.category_guid ?? o?.guid;
|
|
109
109
|
return {
|
|
110
|
-
custom: (s) => s.category_guid ===
|
|
111
|
-
dateRange: S(
|
|
110
|
+
custom: (s) => s.category_guid === r || s.top_level_category_guid === r,
|
|
111
|
+
dateRange: S(o?.date)
|
|
112
112
|
};
|
|
113
|
-
}, tt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData:
|
|
114
|
-
const
|
|
113
|
+
}, tt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: o }) => {
|
|
114
|
+
const r = t[e];
|
|
115
115
|
return {
|
|
116
116
|
custom: (s) => !!s.top_level_category_guid && a.includes(s.top_level_category_guid),
|
|
117
|
-
dateRange: S(
|
|
118
|
-
...G(
|
|
117
|
+
dateRange: S(r?.date),
|
|
118
|
+
...G(o.account_guids)
|
|
119
119
|
};
|
|
120
|
-
}, et = (t) => typeof t == "number" ? x(t) : p(t ?? ""), at = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab:
|
|
121
|
-
const s = e[a], { start: n, end: g } = S(s?.date), l = et(t.created_at), u =
|
|
120
|
+
}, et = (t) => typeof t == "number" ? x(t) : p(t ?? ""), at = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: o, instanceSlotData: r }) => {
|
|
121
|
+
const s = e[a], { start: n, end: g } = S(s?.date), l = et(t.created_at), u = r.account_guids, O = {
|
|
122
122
|
start: n,
|
|
123
|
-
end:
|
|
123
|
+
end: o && L(l) && l < g ? l : g
|
|
124
124
|
};
|
|
125
125
|
return u?.length ? {
|
|
126
126
|
dateRange: O,
|
|
@@ -131,23 +131,23 @@ var i = {
|
|
|
131
131
|
custom: () => !1
|
|
132
132
|
};
|
|
133
133
|
}, f = (t, e, a) => {
|
|
134
|
-
const
|
|
135
|
-
return !
|
|
134
|
+
const o = new Set(t), r = p(e ?? "");
|
|
135
|
+
return !o.size || !L(r) ? {
|
|
136
136
|
accounts: [],
|
|
137
137
|
custom: () => !1
|
|
138
138
|
} : {
|
|
139
|
-
custom: (s) =>
|
|
139
|
+
custom: (s) => o.has(s.guid),
|
|
140
140
|
dateRange: {
|
|
141
|
-
start: B(
|
|
142
|
-
end: C(
|
|
141
|
+
start: B(r),
|
|
142
|
+
end: C(r)
|
|
143
143
|
},
|
|
144
144
|
...G(a)
|
|
145
145
|
};
|
|
146
|
-
},
|
|
147
|
-
const
|
|
148
|
-
return f(
|
|
149
|
-
},
|
|
150
|
-
const { dataSeries: e, selectedIndex: a, subIndex:
|
|
146
|
+
}, ot = ({ beat: t, dataSeries: e, selectedIndex: a }) => f(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), y = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: o }) => {
|
|
147
|
+
const r = e[a];
|
|
148
|
+
return f(o === 1 ? r?.comparisonGuids : r?.mainGuids, r?.date, t.account_guids);
|
|
149
|
+
}, rt = ({ beat: t, dataSeries: e, subIndex: a }) => f(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), st = (t) => {
|
|
150
|
+
const { dataSeries: e, selectedIndex: a, subIndex: o, instanceSlotData: r } = t, s = e[a], n = new Set(r.income_transaction_guids), g = R[o] === "income", l = r.sub_tab_labels ? s?.aggregated_guids?.filter((u) => n.has(u) === g) : s?.aggregated_guids;
|
|
151
151
|
return f(l, s?.date);
|
|
152
152
|
}, yt = {
|
|
153
153
|
[i.TRANSACTION]: {
|
|
@@ -161,10 +161,11 @@ var i = {
|
|
|
161
161
|
return {
|
|
162
162
|
heading: e,
|
|
163
163
|
subHeadingText: a?.text || void 0,
|
|
164
|
-
icon: /* @__PURE__ */ c(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
icon: /* @__PURE__ */ c(w, {
|
|
165
|
+
logo: {
|
|
166
|
+
...a?.logo,
|
|
167
|
+
merchant_name: a?.text ?? a?.logo?.merchant_name
|
|
168
|
+
},
|
|
168
169
|
size: 16
|
|
169
170
|
})
|
|
170
171
|
};
|
|
@@ -177,7 +178,7 @@ var i = {
|
|
|
177
178
|
[i.CATEGORY_SPEND]: {
|
|
178
179
|
top: "singleBar",
|
|
179
180
|
averageFormat: "0,0",
|
|
180
|
-
filterStrategy:
|
|
181
|
+
filterStrategy: $,
|
|
181
182
|
scope: "store",
|
|
182
183
|
filterMode: "store",
|
|
183
184
|
colors: (t, e) => [d(t, e)],
|
|
@@ -201,7 +202,7 @@ var i = {
|
|
|
201
202
|
[i.ACCOUNT_BALANCE]: {
|
|
202
203
|
top: "singleBar",
|
|
203
204
|
filterStrategy: at,
|
|
204
|
-
slotData:
|
|
205
|
+
slotData: k,
|
|
205
206
|
scope: "store",
|
|
206
207
|
filterMode: "store",
|
|
207
208
|
colors: (t) => [t.palette.success.main]
|
|
@@ -213,9 +214,9 @@ var i = {
|
|
|
213
214
|
filterMode: "local",
|
|
214
215
|
colors: (t, e) => [d(t, e)],
|
|
215
216
|
slotData: W,
|
|
216
|
-
beatTransactions:
|
|
217
|
+
beatTransactions: X,
|
|
217
218
|
fetchMissingTransactions: (t) => t.insights_payload?.drilldown_data?.transaction_guids,
|
|
218
|
-
tipSection:
|
|
219
|
+
tipSection: Z
|
|
219
220
|
},
|
|
220
221
|
[i.DEPOSIT_SUMMARY]: {
|
|
221
222
|
top: "singleBar",
|
|
@@ -223,8 +224,8 @@ var i = {
|
|
|
223
224
|
scope: "store",
|
|
224
225
|
filterMode: "store",
|
|
225
226
|
colors: (t) => [t.palette.success.main],
|
|
226
|
-
slotData:
|
|
227
|
-
fetchMissingTransactions:
|
|
227
|
+
slotData: j,
|
|
228
|
+
fetchMissingTransactions: Q,
|
|
228
229
|
subTabs: ({ instanceSlotData: t }) => t.sub_tab_labels ?? []
|
|
229
230
|
},
|
|
230
231
|
[i.LOW_BALANCE]: {
|
|
@@ -237,7 +238,7 @@ var i = {
|
|
|
237
238
|
},
|
|
238
239
|
[i.SUBSCRIPTION_AGGREGATE]: {
|
|
239
240
|
top: "monthTabs",
|
|
240
|
-
filterStrategy:
|
|
241
|
+
filterStrategy: ot,
|
|
241
242
|
scope: "store",
|
|
242
243
|
filterMode: "store",
|
|
243
244
|
colors: (t) => [t.palette.primary.main]
|
|
@@ -266,14 +267,14 @@ var i = {
|
|
|
266
267
|
colors: (t) => I(t, "debt_to_income")?.color ?? [],
|
|
267
268
|
subTabAriaLabels: (t) => [void 0, t.general.income_transactions],
|
|
268
269
|
slotData: K,
|
|
269
|
-
fetchMissingTransactions:
|
|
270
|
-
tipSection:
|
|
270
|
+
fetchMissingTransactions: q,
|
|
271
|
+
tipSection: J,
|
|
271
272
|
tipAboveSubTabs: !0,
|
|
272
273
|
hideListHeader: !0
|
|
273
274
|
},
|
|
274
275
|
[i.NON_ESSENTIAL_CATEGORY]: {
|
|
275
276
|
top: "tabsOnly",
|
|
276
|
-
filterStrategy:
|
|
277
|
+
filterStrategy: rt,
|
|
277
278
|
scope: "store",
|
|
278
279
|
filterMode: "store",
|
|
279
280
|
colors: (t) => [t.palette.primary.main]
|
|
@@ -290,10 +291,10 @@ export {
|
|
|
290
291
|
bt as FALLBACK,
|
|
291
292
|
yt as layout,
|
|
292
293
|
K as resolveDebtToIncomeSlotData,
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
j as resolveDepositSummarySlotData,
|
|
295
|
+
k as resolveSavingsContributionsSlotData,
|
|
295
296
|
W as resolveUpcomingBillSlotData,
|
|
296
|
-
|
|
297
|
+
X as resolveUpcomingBillTransactions
|
|
297
298
|
};
|
|
298
299
|
|
|
299
300
|
//# sourceMappingURL=layout.es.js.map
|