@mx-cartographer/experiences 9.7.188 → 9.7.189
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 +5 -0
- package/dist/common/components/drawer/Header.d.ts +1 -1
- package/dist/common/components/drawer/Header.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +30 -24
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js +36 -48
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +3 -3
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.d.ts +3 -1
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js +28 -28
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +0 -1
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [9.7.189] - 11-19-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Budget Details drawer header matches Figma: back arrow, larger month, divider, no status dot, thinner bar and larger labels (WEC-2366)
|
|
4
|
+
- **FIXED** - Budget card (category and merchant) icon and bar match Figma (WEC-2366)
|
|
5
|
+
|
|
1
6
|
## [9.7.188] - 11-18-2026
|
|
2
7
|
|
|
3
8
|
- **FIXED** - Width of the cash flow and trends mini widgets in wide layouts (WELL-212)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
/** `back` (default): an arrow on the left. `close`: an X on the right, as Figma's
|
|
2
|
+
/** `back` (default): an arrow on the left. `close`: an X on the right, as Figma's Top Merchants. */
|
|
3
3
|
export type DrawerHeaderAction = 'back' | 'close';
|
|
4
4
|
interface DrawerHeaderProps {
|
|
5
5
|
action?: DrawerHeaderAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.es.js","names":[],"sources":["../../../../src/common/components/drawer/Header.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport IconButton from '@mui/material/IconButton'\n\nimport { ArrowBackIosNew, Close } from '@mxenabled/mx-icons'\n\nimport { H2 } from '@mxenabled/mxui'\n\n/** `back` (default): an arrow on the left. `close`: an X on the right, as Figma's
|
|
1
|
+
{"version":3,"file":"Header.es.js","names":[],"sources":["../../../../src/common/components/drawer/Header.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport IconButton from '@mui/material/IconButton'\n\nimport { ArrowBackIosNew, Close } from '@mxenabled/mx-icons'\n\nimport { H2 } from '@mxenabled/mxui'\n\n/** `back` (default): an arrow on the left. `close`: an X on the right, as Figma's Top Merchants. */\nexport type DrawerHeaderAction = 'back' | 'close'\n\ninterface DrawerHeaderProps {\n action?: DrawerHeaderAction\n ariaLabelClose: string\n onClose: () => void\n shouldShowBorders: boolean\n shouldShowShadow?: boolean\n title: string\n}\n\nconst DrawerHeader: React.FC<DrawerHeaderProps> = ({\n action = 'back',\n ariaLabelClose,\n onClose,\n shouldShowBorders,\n shouldShowShadow,\n title,\n}) => {\n const isBack = action === 'back'\n const button = (\n <IconButton\n aria-label={ariaLabelClose}\n autoFocus={true}\n color={isBack ? 'primary' : 'default'}\n onClick={onClose}\n >\n {isBack ? (\n <ArrowBackIosNew color=\"primary\" sx={{ fontSize: 22 }} />\n ) : (\n <Close sx={{ color: 'action.active', fontSize: 22 }} />\n )}\n </IconButton>\n )\n // Keeps the title centred opposite the button.\n const spacer = <Box width=\"44px\" />\n\n return (\n <Stack\n aria-labelledby={`${title?.replace(/\\s+/g, '-').toLowerCase()}-header-title`}\n direction=\"row\"\n sx={{\n alignItems: 'center',\n backgroundColor: 'background.paper',\n ...(shouldShowBorders && {\n borderBottom: 1,\n borderColor: 'divider',\n }),\n ...(shouldShowShadow && {\n boxShadow: '0px 2px 8px 0px #6A73811F',\n }),\n padding: '8px 8px 8px 8px',\n }}\n >\n {isBack ? button : spacer}\n <Box\n sx={{\n flexGrow: 1,\n margin: 'auto',\n textAlign: 'center',\n }}\n >\n <H2\n bold={true}\n id={`${title?.replace(/\\s+/g, '-').toLowerCase()}-header-title`}\n variant=\"body1\"\n >\n {title}\n </H2>\n </Box>\n {isBack ? spacer : button}\n </Stack>\n )\n}\n\nexport default DrawerHeader\n"],"mappings":";;;;;;;AAsBA,IAAM,IAAA,CAA6C,EACjD,QAAA,IAAS,QACT,gBAAA,GACA,SAAA,GACA,mBAAA,GACA,kBAAA,GACA,OAAA,EAAA,MACI;AACJ,QAAM,IAAS,MAAW,QACpB,IACJ,gBAAA,EAAC,GAAD;AAAA,IACE,cAAY;AAAA,IACZ,WAAW;AAAA,IACX,OAAO,IAAS,YAAY;AAAA,IAC5B,SAAS;AAAA,IAER,UAAA,IACC,gBAAA,EAAC,GAAD;AAAA,MAAiB,OAAM;AAAA,MAAU,IAAI,EAAE,UAAU,GAAG;AAAA,IAAI,CAAA,IAExD,gBAAA,EAAC,GAAD,EAAO,IAAI;AAAA,MAAE,OAAO;AAAA,MAAiB,UAAU;AAAA,IAAG,EAAI,CAAA;AAAA,EAE9C,CAAA,GAGR,IAAS,gBAAA,EAAC,GAAD,EAAK,OAAM,OAAQ,CAAA;AAElC,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,mBAAiB,GAAG,GAAO,QAAQ,QAAQ,GAAG,EAAE,YAAY,CAAA;AAAA,IAC5D,WAAU;AAAA,IACV,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,GAAI,KAAqB;AAAA,QACvB,cAAc;AAAA,QACd,aAAa;AAAA,MACf;AAAA,MACA,GAAI,KAAoB,EACtB,WAAW,4BACb;AAAA,MACA,SAAS;AAAA,IACX;AAAA,IAdF,UAAA;AAAA,MAgBG,IAAS,IAAS;AAAA,MACnB,gBAAA,EAAC,GAAD;AAAA,QACE,IAAI;AAAA,UACF,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,IAAI,GAAG,GAAO,QAAQ,QAAQ,GAAG,EAAE,YAAY,CAAA;AAAA,UAC/C,SAAQ;AAAA,UAEP,UAAA;AAAA,QACC,CAAA;AAAA,MACD,CAAA;AAAA,MACJ,IAAS,IAAS;AAAA,IACd;AAAA;AAEX"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { buildDynamicCopy as P } from "../../../core/utils/Localization.es.js";
|
|
2
2
|
import { DATE_FORMATS_INTL as se, formatDate as ae } from "../../../core/constants/DateFormats.es.js";
|
|
3
|
-
import { useBudgetsStore as ce, useCategoryStore as
|
|
3
|
+
import { useBudgetsStore as ce, useCategoryStore as de, useGlobalCopyStore as le, useGlobalStore as ue, useInsightsV2Store as me, useTransactionStore as ge } from "../../../common/context/hooks.es.js";
|
|
4
4
|
import pe from "../../../common/components/drawer/Drawer.es.js";
|
|
5
5
|
import { getLocalizedCategoryName as _e } from "../../../core/utils/CategoryUtil.es.js";
|
|
6
6
|
import { exportTransactionsToCSV as fe } from "../../../core/utils/TransactionUtils.es.js";
|
|
7
7
|
import ye from "../../../common/components/CurrencyDialog.es.js";
|
|
8
8
|
import he from "../../../transactions/components/shared/TransactionList.es.js";
|
|
9
|
-
import { budgetMonthRange as be, daysLeftInBudgetMonth as Ce, isPositiveAmount as Te, recordedActiveAtOf as ve, resolveBudgetDetailsLayout as
|
|
9
|
+
import { budgetMonthRange as be, daysLeftInBudgetMonth as Ce, isPositiveAmount as Te, recordedActiveAtOf as ve, resolveBudgetDetailsLayout as Be, resolveBudgetFacts as De } from "./layout.es.js";
|
|
10
10
|
import { ANALYTICS_EVENTS_CONFIG as b } from "../../analytics/analyticsEventsConfig.es.js";
|
|
11
11
|
import { useAnalyticsEvent as xe } from "../../analytics/useAnalyticsEvent.es.js";
|
|
12
12
|
import Se from "../../components/CategoryTile.es.js";
|
|
@@ -24,8 +24,8 @@ import k from "@mui/material/Button";
|
|
|
24
24
|
import { Icon as Ne } from "@mxenabled/mx-icons";
|
|
25
25
|
import { jsx as o, jsxs as v } from "react/jsx-runtime";
|
|
26
26
|
import Oe from "@mui/material/Box";
|
|
27
|
-
var Re = (G) => G.insights_feed?.budget_details,
|
|
28
|
-
const { emitUpdate: H } = ue(), { budgets: t, categories: Y, common: u, insights_feed: L, transactions: $ } =
|
|
27
|
+
var Re = (G) => G.insights_feed?.budget_details, lt = Me(function({ beat: n }) {
|
|
28
|
+
const { emitUpdate: H } = ue(), { budgets: t, categories: Y, common: u, insights_feed: L, transactions: $ } = le(), l = ce(), q = de(), w = ge(), m = me(), f = xe(), [r, B] = C(null), [g, y] = C(""), [s, p] = C(null), [W, I] = C(!1), D = Ie(!1), J = Le(Re), { categories: K } = q, i = De(n), M = ve(m, n), Q = be(n, M), X = ke(n)?.variant, { showPeriodLine: Z } = Be(X), N = i.categoryGuid ? K.find(({ guid: e }) => e === i.categoryGuid) : void 0, a = i.categoryGuid ? l.budgets.find(({ category_guid: e }) => e === i.categoryGuid) : void 0, c = !i.categoryGuid && i.merchantGuid ? l.getMerchantBudgetByMerchantGuid(i.merchantGuid) : void 0, O = (N && _e(N, Y)) ?? c?.merchant_name ?? n.payload?.merchant_name ?? "", R = a?.amount ?? c?.amount ?? i.budgeted ?? 0, ee = i.spent ?? a?.transaction_total ?? c?.transaction_total ?? 0, te = i.categoryGuid ? /* @__PURE__ */ o(Se, {
|
|
29
29
|
categoryGuid: i.categoryGuid,
|
|
30
30
|
size: 44,
|
|
31
31
|
tint: 0.15
|
|
@@ -33,54 +33,54 @@ var Re = (G) => G.insights_feed?.budget_details, dt = Me(function({ beat: n }) {
|
|
|
33
33
|
logo: { merchant_guid: i.merchantGuid },
|
|
34
34
|
size: 44
|
|
35
35
|
}), V = w.sortedTransactionsWithSplits, j = (e) => {
|
|
36
|
-
e === "delete" && f(b.BUDGET_DELETE_START), y(e === "edit" ? String(R) : ""),
|
|
36
|
+
e === "delete" && f(b.BUDGET_DELETE_START), y(e === "edit" ? String(R) : ""), B(e);
|
|
37
37
|
}, F = () => {
|
|
38
|
-
|
|
38
|
+
B(null), y("");
|
|
39
39
|
}, U = () => {
|
|
40
40
|
r === "delete" && f(b.BUDGET_DELETE_CANCEL), F();
|
|
41
|
-
},
|
|
41
|
+
}, d = (e) => P(e, O), x = (e) => d({
|
|
42
42
|
edit: t.error_alert_edit_merchant_budget,
|
|
43
43
|
delete: t.error_alert_delete_merchant_budget
|
|
44
44
|
}[e]), oe = async (e, _) => {
|
|
45
45
|
if (c) {
|
|
46
46
|
if (e === "delete") {
|
|
47
|
-
const { isSuccess: h } = await
|
|
47
|
+
const { isSuccess: h } = await l.deleteMerchantBudget(c.guid);
|
|
48
48
|
return {
|
|
49
49
|
ok: h,
|
|
50
|
-
success:
|
|
51
|
-
failure:
|
|
50
|
+
success: d(t.success_alert_delete_merchant_budget),
|
|
51
|
+
failure: d(t.error_alert_delete_merchant_budget)
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
const { isSuccess: E } = await
|
|
54
|
+
const { isSuccess: E } = await l.updateMerchantBudget({
|
|
55
55
|
...c,
|
|
56
56
|
amount: _
|
|
57
57
|
});
|
|
58
58
|
return {
|
|
59
59
|
ok: E,
|
|
60
|
-
success:
|
|
61
|
-
failure:
|
|
60
|
+
success: d(t.success_alert_edit_merchant_budget),
|
|
61
|
+
failure: d(t.error_alert_edit_merchant_budget)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
return e === "delete" && a ? {
|
|
65
|
-
ok: await
|
|
66
|
-
success:
|
|
65
|
+
ok: await l.deleteBudget(a.guid),
|
|
66
|
+
success: d(t.alert_budget_deleted),
|
|
67
67
|
failure: x(e)
|
|
68
68
|
} : e === "edit" && a ? {
|
|
69
|
-
ok: await
|
|
69
|
+
ok: await l.updateBudget({
|
|
70
70
|
...a,
|
|
71
71
|
amount: _
|
|
72
72
|
}),
|
|
73
|
-
success:
|
|
73
|
+
success: d(t.alert_budget_updated),
|
|
74
74
|
failure: x(e)
|
|
75
75
|
} : {
|
|
76
76
|
ok: !1,
|
|
77
77
|
success: ""
|
|
78
78
|
};
|
|
79
79
|
}, re = async () => {
|
|
80
|
-
if (
|
|
80
|
+
if (D.current || !r) return;
|
|
81
81
|
const e = Number(g);
|
|
82
82
|
if (r !== "delete" && !Te(g)) return;
|
|
83
|
-
|
|
83
|
+
D.current = !0;
|
|
84
84
|
const _ = {
|
|
85
85
|
action: r,
|
|
86
86
|
amount: g
|
|
@@ -114,7 +114,7 @@ var Re = (G) => G.insights_feed?.budget_details, dt = Me(function({ beat: n }) {
|
|
|
114
114
|
retry: _
|
|
115
115
|
});
|
|
116
116
|
} finally {
|
|
117
|
-
|
|
117
|
+
D.current = !1, F();
|
|
118
118
|
}
|
|
119
119
|
}, ie = !!(a ?? c) && /* @__PURE__ */ v(T, {
|
|
120
120
|
sx: {
|
|
@@ -156,10 +156,15 @@ var Re = (G) => G.insights_feed?.budget_details, dt = Me(function({ beat: n }) {
|
|
|
156
156
|
sx: { minHeight: "100%" },
|
|
157
157
|
children: [
|
|
158
158
|
/* @__PURE__ */ v(T, {
|
|
159
|
+
"data-testid": "budget-details-header",
|
|
159
160
|
sx: {
|
|
160
161
|
bgcolor: "background.paper",
|
|
162
|
+
borderBottom: 1,
|
|
163
|
+
borderBottomColor: "divider",
|
|
161
164
|
gap: 16,
|
|
162
|
-
|
|
165
|
+
pb: 24,
|
|
166
|
+
pt: 16,
|
|
167
|
+
px: 24
|
|
163
168
|
},
|
|
164
169
|
children: [/* @__PURE__ */ v(T, {
|
|
165
170
|
sx: {
|
|
@@ -169,7 +174,8 @@ var Re = (G) => G.insights_feed?.budget_details, dt = Me(function({ beat: n }) {
|
|
|
169
174
|
},
|
|
170
175
|
children: [/* @__PURE__ */ o(z, {
|
|
171
176
|
bold: !0,
|
|
172
|
-
|
|
177
|
+
component: "p",
|
|
178
|
+
variant: "h3",
|
|
173
179
|
children: ae(Q.start, se.MONTH_YEAR)
|
|
174
180
|
}), V.length > 0 && /* @__PURE__ */ o(k, {
|
|
175
181
|
onClick: () => fe(V, w.tags),
|
|
@@ -233,7 +239,7 @@ var Re = (G) => G.insights_feed?.budget_details, dt = Me(function({ beat: n }) {
|
|
|
233
239
|
closeAriaLabel: u.close_aria,
|
|
234
240
|
message: s?.message ?? "",
|
|
235
241
|
onActionClick: () => {
|
|
236
|
-
s?.retry && (y(s.retry.amount),
|
|
242
|
+
s?.retry && (y(s.retry.amount), B(s.retry.action), p(null));
|
|
237
243
|
},
|
|
238
244
|
onClose: () => p(null),
|
|
239
245
|
open: !!s,
|
|
@@ -243,7 +249,7 @@ var Re = (G) => G.insights_feed?.budget_details, dt = Me(function({ beat: n }) {
|
|
|
243
249
|
});
|
|
244
250
|
});
|
|
245
251
|
export {
|
|
246
|
-
|
|
252
|
+
lt as BudgetDetailsBlock,
|
|
247
253
|
Re as selectBudgetDetailsCopy
|
|
248
254
|
};
|
|
249
255
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BudgetDetailsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.tsx"],"sourcesContent":["import { useRef, useState, type ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { CurrencyDialog, Drawer } from '../../../common/components'\nimport {\n useBudgetsStore,\n useCategoryStore,\n useGlobalCopyStore,\n useGlobalStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { useOpenedCta } from '../useOpenedCta'\nimport { useRequiredCopy } from '../useRequiredCopy'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { getLocalizedCategoryName } from '../../../core/utils/CategoryUtil'\nimport type { Budget, GlobalCopy, MerchantBudget } from '../../../core'\nimport { TransactionList } from '../../../transactions'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../../analytics'\nimport CategoryTile from '../../components/CategoryTile'\nimport LogoMark from '../../components/LogoMark'\nimport StatusSnackbar from '../../components/shared/StatusSnackbar'\nimport type { ActionBlockProps } from '../../mappings/blocks'\n\nimport { BudgetSummary } from './BudgetSummary'\nimport {\n budgetMonthRange,\n daysLeftInBudgetMonth,\n isPositiveAmount,\n recordedActiveAtOf,\n resolveBudgetDetailsLayout,\n resolveBudgetFacts,\n} from './layout'\n\n// Figma's Budget Details offers Edit and Delete only: the drawer opens on an existing budget.\ntype DialogAction = 'edit' | 'delete'\n\ninterface Toast {\n message: string\n severity: 'success' | 'error'\n /** A failed write's dialog and amount, reopened by the snackbar's Try Again. */\n retry?: { action: DialogAction; amount: string }\n}\n\nexport const selectBudgetDetailsCopy = (copy: GlobalCopy) => copy.insights_feed?.budget_details\n\nexport const BudgetDetailsBlock = observer(function BudgetDetailsBlock({ beat }: ActionBlockProps) {\n const { emitUpdate } = useGlobalStore()\n const {\n budgets: budgetsCopy,\n categories: categoriesCopy,\n common: commonCopy,\n insights_feed: insightsFeedCopy,\n transactions: transactionsCopy,\n } = useGlobalCopyStore()\n const budgetsStore = useBudgetsStore()\n const categoryStore = useCategoryStore()\n const transactionStore = useTransactionStore()\n const insightsV2Store = useInsightsV2Store()\n const fireAnalyticsEvent = useAnalyticsEvent()\n const [dialog, setDialog] = useState<DialogAction | null>(null)\n const [amount, setAmount] = useState('')\n const [toast, setToast] = useState<Toast | null>(null)\n const [isTransactionDetailsOpen, setIsTransactionDetailsOpen] = useState(false)\n const inProgress = useRef(false)\n const copy = useRequiredCopy(selectBudgetDetailsCopy)\n const { categories } = categoryStore\n\n const facts = resolveBudgetFacts(beat)\n const recordedActiveAt = recordedActiveAtOf(insightsV2Store, beat)\n const dateRange = budgetMonthRange(beat, recordedActiveAt)\n const variant = useOpenedCta(beat)?.variant\n const { showPeriodLine } = resolveBudgetDetailsLayout(variant)\n\n const category = facts.categoryGuid\n ? categories.find(({ guid }) => guid === facts.categoryGuid)\n : undefined\n const budget: Budget | undefined = facts.categoryGuid\n ? budgetsStore.budgets.find(({ category_guid }) => category_guid === facts.categoryGuid)\n : undefined\n const merchantBudget: MerchantBudget | undefined =\n !facts.categoryGuid && facts.merchantGuid\n ? budgetsStore.getMerchantBudgetByMerchantGuid(facts.merchantGuid)\n : undefined\n const subject =\n (category && getLocalizedCategoryName(category, categoriesCopy)) ??\n merchantBudget?.merchant_name ??\n (beat.payload?.merchant_name as string | undefined) ??\n ''\n const limit = budget?.amount ?? merchantBudget?.amount ?? facts.budgeted ?? 0\n const spent = facts.spent ?? budget?.transaction_total ?? merchantBudget?.transaction_total ?? 0\n\n const icon = facts.categoryGuid ? (\n <CategoryTile categoryGuid={facts.categoryGuid} size={44} tint={0.15} />\n ) : (\n <LogoMark logo={{ merchant_guid: facts.merchantGuid }} size={44} />\n )\n\n const monthTransactions = transactionStore.sortedTransactionsWithSplits\n\n const openDialog = (action: DialogAction) => {\n if (action === 'delete') fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.BUDGET_DELETE_START)\n setAmount(action === 'edit' ? String(limit) : '')\n setDialog(action)\n }\n\n const closeDialog = () => {\n setDialog(null)\n setAmount('')\n }\n\n // Cancel, close icon or backdrop.\n const cancelDialog = () => {\n if (dialog === 'delete') fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.BUDGET_DELETE_CANCEL)\n closeDialog()\n }\n\n const dynamic = (key: string) => buildDynamicCopy(key, subject) as string\n\n // \"Your {subject} budget could not be …\": the subject is the copy's one variable.\n const failureFor = (action: DialogAction) =>\n dynamic(\n {\n edit: budgetsCopy.error_alert_edit_merchant_budget,\n delete: budgetsCopy.error_alert_delete_merchant_budget,\n }[action],\n )\n\n const perform = async (\n action: DialogAction,\n value: number,\n ): Promise<{ ok: boolean; success: string; failure?: string }> => {\n if (merchantBudget) {\n if (action === 'delete') {\n const { isSuccess } = await budgetsStore.deleteMerchantBudget(merchantBudget.guid)\n return {\n ok: isSuccess,\n success: dynamic(budgetsCopy.success_alert_delete_merchant_budget),\n failure: dynamic(budgetsCopy.error_alert_delete_merchant_budget),\n }\n }\n const { isSuccess } = await budgetsStore.updateMerchantBudget({\n ...merchantBudget,\n amount: value,\n })\n return {\n ok: isSuccess,\n success: dynamic(budgetsCopy.success_alert_edit_merchant_budget),\n failure: dynamic(budgetsCopy.error_alert_edit_merchant_budget),\n }\n }\n if (action === 'delete' && budget) {\n return {\n ok: await budgetsStore.deleteBudget(budget.guid),\n success: dynamic(budgetsCopy.alert_budget_deleted),\n failure: failureFor(action),\n }\n }\n if (action === 'edit' && budget) {\n return {\n ok: await budgetsStore.updateBudget({ ...budget, amount: value }),\n success: dynamic(budgetsCopy.alert_budget_updated),\n failure: failureFor(action),\n }\n }\n return { ok: false, success: '' }\n }\n\n const submit = async () => {\n if (inProgress.current || !dialog) return\n const value = Number(amount)\n if (dialog !== 'delete' && !isPositiveAmount(amount)) return\n\n inProgress.current = true\n const retry = { action: dialog, amount }\n try {\n const { ok, success, failure } = await perform(dialog, value)\n if (ok) {\n // The host re-reads the beat, so a sampled card follows the budget.\n emitUpdate({ staleBeatGuid: beat.guid })\n if (dialog === 'edit') {\n fireAnalyticsEvent({ ...ANALYTICS_EVENTS_CONFIG.BUDGET_EDIT_SAVE, value: amount })\n }\n if (dialog === 'delete') {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.BUDGET_DELETE_END)\n // No budget left: close the drawer, as pulse did; the message outlives it.\n insightsV2Store.setActionNotice(beat.guid, { message: success, severity: 'success' })\n insightsV2Store.closeActionDrawer()\n return\n }\n setToast({ message: success, severity: 'success' })\n } else {\n setToast({ message: failure ?? commonCopy.error_message, severity: 'error', retry })\n }\n } catch {\n setToast({ message: failureFor(dialog), severity: 'error', retry })\n } finally {\n inProgress.current = false\n closeDialog()\n }\n }\n\n const hasBudget = Boolean(budget ?? merchantBudget)\n\n // Figma's footer, once the budget has loaded.\n const footer = hasBudget && (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderTop: 1,\n borderTopColor: 'divider',\n bottom: 0,\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'flex-end',\n mt: 'auto',\n position: 'sticky',\n px: 24,\n py: 16,\n }}\n >\n <Button color=\"error\" onClick={() => openDialog('delete')} variant=\"outlined\">\n {budgetsCopy.details_delete_button}\n </Button>\n <Button onClick={() => openDialog('edit')} variant=\"contained\">\n {budgetsCopy.details_edit_button}\n </Button>\n </Stack>\n )\n\n const isDelete = dialog === 'delete'\n const dialogCopy = {\n edit: {\n content: budgetsCopy.edit_budget_content,\n primaryText: budgetsCopy.add_save_button,\n title: budgetsCopy.details_edit_title,\n },\n delete: {\n content: budgetsCopy.delete_description,\n primaryText: budgetsCopy.details_delete_button,\n title: budgetsCopy.delete_title,\n },\n }\n\n return (\n <Stack sx={{ minHeight: '100%' }}>\n <Stack sx={{ bgcolor: 'background.paper', gap: 16, p: 24 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text bold={true} variant=\"body1\">\n {formatDate(dateRange.start, DATE_FORMATS_INTL.MONTH_YEAR)}\n </Text>\n {monthTransactions.length > 0 && (\n <Button\n onClick={() => exportTransactionsToCSV(monthTransactions, transactionStore.tags)}\n startIcon={<Icon name=\"ios_share\" />}\n sx={{ height: 28 }}\n >\n <Text bold={true} variant=\"body2\">\n {transactionsCopy.export_csv_btn}\n </Text>\n </Button>\n )}\n </Stack>\n <BudgetSummary\n budgetsCopy={budgetsCopy}\n copy={copy}\n daysLeft={daysLeftInBudgetMonth(beat, undefined, recordedActiveAt)}\n icon={icon}\n limit={limit}\n showPeriodLine={showPeriodLine}\n spent={spent}\n />\n </Stack>\n {/* The month's transactions, always: the list shows its own zero state when there are none. */}\n <Box sx={{ bgcolor: 'background.default', flexGrow: 1 }}>\n {/* As legacy: a tapped row opens its Transaction Details over the budget. */}\n <TransactionList\n onClick={(guid) => {\n insightsV2Store.setActionContext({ transaction_guid: guid })\n setIsTransactionDetailsOpen(true)\n }}\n />\n </Box>\n {footer}\n {dialog && (\n <CurrencyDialog\n closeAriaLabel={commonCopy.close_aria}\n content={buildDynamicCopy(dialogCopy[dialog].content, <b>{subject}</b>) as ReactNode}\n handleInputChange={setAmount}\n handleModalClose={cancelDialog}\n handlePrimaryAction={() => void submit()}\n handleSecondaryAction={cancelDialog}\n inputLabel={isDelete ? undefined : budgetsCopy.add_label}\n inputValue={amount}\n isOpen={true}\n primaryColor={isDelete ? 'error' : 'primary'}\n primaryText={dialogCopy[dialog].primaryText}\n secondaryColor={isDelete ? 'inherit' : 'primary'}\n secondaryText={commonCopy.cancel_button}\n title={dialogCopy[dialog].title}\n />\n )}\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isTransactionDetailsOpen}\n onClose={() => {\n setIsTransactionDetailsOpen(false)\n // Clear only the key this nested drawer owns: the outer drawer's context must survive.\n insightsV2Store.setActionContext({ transaction_guid: undefined })\n }}\n title={insightsFeedCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n <StatusSnackbar\n actionText={toast?.retry ? insightsFeedCopy?.general?.try_again : undefined}\n closeAriaLabel={commonCopy.close_aria}\n message={toast?.message ?? ''}\n onActionClick={() => {\n if (!toast?.retry) return\n setAmount(toast.retry.amount)\n setDialog(toast.retry.action)\n setToast(null)\n }}\n onClose={() => setToast(null)}\n open={Boolean(toast)}\n severity={toast?.severity}\n />\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,IAAa,KAAA,CAA2B,MAAqB,EAAK,eAAe,gBAEpE,KAAqB,GAAS,SAA4B,EAAE,MAAA,EAAA,GAA0B;AACjG,QAAM,EAAE,YAAA,EAAA,IAAe,GAAe,GAChC,EACJ,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,eAAe,GACf,cAAc,EAAA,IACZ,GAAmB,GACjB,IAAe,GAAgB,GAC/B,IAAgB,GAAiB,GACjC,IAAmB,GAAoB,GACvC,IAAkB,GAAmB,GACrC,IAAqB,GAAkB,GACvC,CAAC,GAAQ,CAAA,IAAa,EAA8B,IAAI,GACxD,CAAC,GAAQ,CAAA,IAAa,EAAS,EAAE,GACjC,CAAC,GAAO,CAAA,IAAY,EAAuB,IAAI,GAC/C,CAAC,GAA0B,CAAA,IAA+B,EAAS,EAAK,GACxE,IAAa,GAAO,EAAK,GACzB,IAAO,GAAgB,EAAuB,GAC9C,EAAE,YAAA,EAAA,IAAe,GAEjB,IAAQ,GAAmB,CAAI,GAC/B,IAAmB,GAAmB,GAAiB,CAAI,GAC3D,IAAY,GAAiB,GAAM,CAAgB,GACnD,IAAU,GAAa,CAAI,GAAG,SAC9B,EAAE,gBAAA,EAAA,IAAmB,GAA2B,CAAO,GAEvD,IAAW,EAAM,eACnB,EAAW,KAAA,CAAM,EAAE,MAAA,EAAA,MAAW,MAAS,EAAM,YAAY,IACzD,QACE,IAA6B,EAAM,eACrC,EAAa,QAAQ,KAAA,CAAM,EAAE,eAAA,EAAA,MAAoB,MAAkB,EAAM,YAAY,IACrF,QACE,IACJ,CAAC,EAAM,gBAAgB,EAAM,eACzB,EAAa,gCAAgC,EAAM,YAAY,IAC/D,QACA,KACH,KAAY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d,UAAU,GAAO;AAAA,MAClB,CAAA;AAAA,IACI;AAAA;AAEX,CAAC"}
|
|
1
|
+
{"version":3,"file":"BudgetDetailsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.tsx"],"sourcesContent":["import { useRef, useState, type ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { CurrencyDialog, Drawer } from '../../../common/components'\nimport {\n useBudgetsStore,\n useCategoryStore,\n useGlobalCopyStore,\n useGlobalStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { useOpenedCta } from '../useOpenedCta'\nimport { useRequiredCopy } from '../useRequiredCopy'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { getLocalizedCategoryName } from '../../../core/utils/CategoryUtil'\nimport type { Budget, GlobalCopy, MerchantBudget } from '../../../core'\nimport { TransactionList } from '../../../transactions'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../../analytics'\nimport CategoryTile from '../../components/CategoryTile'\nimport LogoMark from '../../components/LogoMark'\nimport StatusSnackbar from '../../components/shared/StatusSnackbar'\nimport type { ActionBlockProps } from '../../mappings/blocks'\n\nimport { BudgetSummary } from './BudgetSummary'\nimport {\n budgetMonthRange,\n daysLeftInBudgetMonth,\n isPositiveAmount,\n recordedActiveAtOf,\n resolveBudgetDetailsLayout,\n resolveBudgetFacts,\n} from './layout'\n\n// Figma's Budget Details offers Edit and Delete only: the drawer opens on an existing budget.\ntype DialogAction = 'edit' | 'delete'\n\ninterface Toast {\n message: string\n severity: 'success' | 'error'\n /** A failed write's dialog and amount, reopened by the snackbar's Try Again. */\n retry?: { action: DialogAction; amount: string }\n}\n\nexport const selectBudgetDetailsCopy = (copy: GlobalCopy) => copy.insights_feed?.budget_details\n\nexport const BudgetDetailsBlock = observer(function BudgetDetailsBlock({ beat }: ActionBlockProps) {\n const { emitUpdate } = useGlobalStore()\n const {\n budgets: budgetsCopy,\n categories: categoriesCopy,\n common: commonCopy,\n insights_feed: insightsFeedCopy,\n transactions: transactionsCopy,\n } = useGlobalCopyStore()\n const budgetsStore = useBudgetsStore()\n const categoryStore = useCategoryStore()\n const transactionStore = useTransactionStore()\n const insightsV2Store = useInsightsV2Store()\n const fireAnalyticsEvent = useAnalyticsEvent()\n const [dialog, setDialog] = useState<DialogAction | null>(null)\n const [amount, setAmount] = useState('')\n const [toast, setToast] = useState<Toast | null>(null)\n const [isTransactionDetailsOpen, setIsTransactionDetailsOpen] = useState(false)\n const inProgress = useRef(false)\n const copy = useRequiredCopy(selectBudgetDetailsCopy)\n const { categories } = categoryStore\n\n const facts = resolveBudgetFacts(beat)\n const recordedActiveAt = recordedActiveAtOf(insightsV2Store, beat)\n const dateRange = budgetMonthRange(beat, recordedActiveAt)\n const variant = useOpenedCta(beat)?.variant\n const { showPeriodLine } = resolveBudgetDetailsLayout(variant)\n\n const category = facts.categoryGuid\n ? categories.find(({ guid }) => guid === facts.categoryGuid)\n : undefined\n const budget: Budget | undefined = facts.categoryGuid\n ? budgetsStore.budgets.find(({ category_guid }) => category_guid === facts.categoryGuid)\n : undefined\n const merchantBudget: MerchantBudget | undefined =\n !facts.categoryGuid && facts.merchantGuid\n ? budgetsStore.getMerchantBudgetByMerchantGuid(facts.merchantGuid)\n : undefined\n const subject =\n (category && getLocalizedCategoryName(category, categoriesCopy)) ??\n merchantBudget?.merchant_name ??\n (beat.payload?.merchant_name as string | undefined) ??\n ''\n const limit = budget?.amount ?? merchantBudget?.amount ?? facts.budgeted ?? 0\n const spent = facts.spent ?? budget?.transaction_total ?? merchantBudget?.transaction_total ?? 0\n\n const icon = facts.categoryGuid ? (\n <CategoryTile categoryGuid={facts.categoryGuid} size={44} tint={0.15} />\n ) : (\n <LogoMark logo={{ merchant_guid: facts.merchantGuid }} size={44} />\n )\n\n const monthTransactions = transactionStore.sortedTransactionsWithSplits\n\n const openDialog = (action: DialogAction) => {\n if (action === 'delete') fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.BUDGET_DELETE_START)\n setAmount(action === 'edit' ? String(limit) : '')\n setDialog(action)\n }\n\n const closeDialog = () => {\n setDialog(null)\n setAmount('')\n }\n\n // Cancel, close icon or backdrop.\n const cancelDialog = () => {\n if (dialog === 'delete') fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.BUDGET_DELETE_CANCEL)\n closeDialog()\n }\n\n const dynamic = (key: string) => buildDynamicCopy(key, subject) as string\n\n // \"Your {subject} budget could not be …\": the subject is the copy's one variable.\n const failureFor = (action: DialogAction) =>\n dynamic(\n {\n edit: budgetsCopy.error_alert_edit_merchant_budget,\n delete: budgetsCopy.error_alert_delete_merchant_budget,\n }[action],\n )\n\n const perform = async (\n action: DialogAction,\n value: number,\n ): Promise<{ ok: boolean; success: string; failure?: string }> => {\n if (merchantBudget) {\n if (action === 'delete') {\n const { isSuccess } = await budgetsStore.deleteMerchantBudget(merchantBudget.guid)\n return {\n ok: isSuccess,\n success: dynamic(budgetsCopy.success_alert_delete_merchant_budget),\n failure: dynamic(budgetsCopy.error_alert_delete_merchant_budget),\n }\n }\n const { isSuccess } = await budgetsStore.updateMerchantBudget({\n ...merchantBudget,\n amount: value,\n })\n return {\n ok: isSuccess,\n success: dynamic(budgetsCopy.success_alert_edit_merchant_budget),\n failure: dynamic(budgetsCopy.error_alert_edit_merchant_budget),\n }\n }\n if (action === 'delete' && budget) {\n return {\n ok: await budgetsStore.deleteBudget(budget.guid),\n success: dynamic(budgetsCopy.alert_budget_deleted),\n failure: failureFor(action),\n }\n }\n if (action === 'edit' && budget) {\n return {\n ok: await budgetsStore.updateBudget({ ...budget, amount: value }),\n success: dynamic(budgetsCopy.alert_budget_updated),\n failure: failureFor(action),\n }\n }\n return { ok: false, success: '' }\n }\n\n const submit = async () => {\n if (inProgress.current || !dialog) return\n const value = Number(amount)\n if (dialog !== 'delete' && !isPositiveAmount(amount)) return\n\n inProgress.current = true\n const retry = { action: dialog, amount }\n try {\n const { ok, success, failure } = await perform(dialog, value)\n if (ok) {\n // The host re-reads the beat, so a sampled card follows the budget.\n emitUpdate({ staleBeatGuid: beat.guid })\n if (dialog === 'edit') {\n fireAnalyticsEvent({ ...ANALYTICS_EVENTS_CONFIG.BUDGET_EDIT_SAVE, value: amount })\n }\n if (dialog === 'delete') {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.BUDGET_DELETE_END)\n // No budget left: close the drawer, as pulse did; the message outlives it.\n insightsV2Store.setActionNotice(beat.guid, { message: success, severity: 'success' })\n insightsV2Store.closeActionDrawer()\n return\n }\n setToast({ message: success, severity: 'success' })\n } else {\n setToast({ message: failure ?? commonCopy.error_message, severity: 'error', retry })\n }\n } catch {\n setToast({ message: failureFor(dialog), severity: 'error', retry })\n } finally {\n inProgress.current = false\n closeDialog()\n }\n }\n\n const hasBudget = Boolean(budget ?? merchantBudget)\n\n // Figma's footer, once the budget has loaded.\n const footer = hasBudget && (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderTop: 1,\n borderTopColor: 'divider',\n bottom: 0,\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'flex-end',\n mt: 'auto',\n position: 'sticky',\n px: 24,\n py: 16,\n }}\n >\n <Button color=\"error\" onClick={() => openDialog('delete')} variant=\"outlined\">\n {budgetsCopy.details_delete_button}\n </Button>\n <Button onClick={() => openDialog('edit')} variant=\"contained\">\n {budgetsCopy.details_edit_button}\n </Button>\n </Stack>\n )\n\n const isDelete = dialog === 'delete'\n const dialogCopy = {\n edit: {\n content: budgetsCopy.edit_budget_content,\n primaryText: budgetsCopy.add_save_button,\n title: budgetsCopy.details_edit_title,\n },\n delete: {\n content: budgetsCopy.delete_description,\n primaryText: budgetsCopy.details_delete_button,\n title: budgetsCopy.delete_title,\n },\n }\n\n return (\n <Stack sx={{ minHeight: '100%' }}>\n {/* Figma's Budgets/Details Header (15359:347621). */}\n <Stack\n data-testid=\"budget-details-header\"\n sx={{\n bgcolor: 'background.paper',\n borderBottom: 1,\n borderBottomColor: 'divider',\n gap: 16,\n pb: 24,\n pt: 16,\n px: 24,\n }}\n >\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text bold={true} component=\"p\" variant=\"h3\">\n {formatDate(dateRange.start, DATE_FORMATS_INTL.MONTH_YEAR)}\n </Text>\n {monthTransactions.length > 0 && (\n <Button\n onClick={() => exportTransactionsToCSV(monthTransactions, transactionStore.tags)}\n startIcon={<Icon name=\"ios_share\" />}\n sx={{ height: 28 }}\n >\n <Text bold={true} variant=\"body2\">\n {transactionsCopy.export_csv_btn}\n </Text>\n </Button>\n )}\n </Stack>\n <BudgetSummary\n budgetsCopy={budgetsCopy}\n copy={copy}\n daysLeft={daysLeftInBudgetMonth(beat, undefined, recordedActiveAt)}\n icon={icon}\n limit={limit}\n showPeriodLine={showPeriodLine}\n spent={spent}\n />\n </Stack>\n {/* The month's transactions, always: the list shows its own zero state when there are none. */}\n <Box sx={{ bgcolor: 'background.default', flexGrow: 1 }}>\n {/* As legacy: a tapped row opens its Transaction Details over the budget. */}\n <TransactionList\n onClick={(guid) => {\n insightsV2Store.setActionContext({ transaction_guid: guid })\n setIsTransactionDetailsOpen(true)\n }}\n />\n </Box>\n {footer}\n {dialog && (\n <CurrencyDialog\n closeAriaLabel={commonCopy.close_aria}\n content={buildDynamicCopy(dialogCopy[dialog].content, <b>{subject}</b>) as ReactNode}\n handleInputChange={setAmount}\n handleModalClose={cancelDialog}\n handlePrimaryAction={() => void submit()}\n handleSecondaryAction={cancelDialog}\n inputLabel={isDelete ? undefined : budgetsCopy.add_label}\n inputValue={amount}\n isOpen={true}\n primaryColor={isDelete ? 'error' : 'primary'}\n primaryText={dialogCopy[dialog].primaryText}\n secondaryColor={isDelete ? 'inherit' : 'primary'}\n secondaryText={commonCopy.cancel_button}\n title={dialogCopy[dialog].title}\n />\n )}\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isTransactionDetailsOpen}\n onClose={() => {\n setIsTransactionDetailsOpen(false)\n // Clear only the key this nested drawer owns: the outer drawer's context must survive.\n insightsV2Store.setActionContext({ transaction_guid: undefined })\n }}\n title={insightsFeedCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n <StatusSnackbar\n actionText={toast?.retry ? insightsFeedCopy?.general?.try_again : undefined}\n closeAriaLabel={commonCopy.close_aria}\n message={toast?.message ?? ''}\n onActionClick={() => {\n if (!toast?.retry) return\n setAmount(toast.retry.amount)\n setDialog(toast.retry.action)\n setToast(null)\n }}\n onClose={() => setToast(null)}\n open={Boolean(toast)}\n severity={toast?.severity}\n />\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,IAAa,KAAA,CAA2B,MAAqB,EAAK,eAAe,gBAEpE,KAAqB,GAAS,SAA4B,EAAE,MAAA,EAAA,GAA0B;AACjG,QAAM,EAAE,YAAA,EAAA,IAAe,GAAe,GAChC,EACJ,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,eAAe,GACf,cAAc,EAAA,IACZ,GAAmB,GACjB,IAAe,GAAgB,GAC/B,IAAgB,GAAiB,GACjC,IAAmB,GAAoB,GACvC,IAAkB,GAAmB,GACrC,IAAqB,GAAkB,GACvC,CAAC,GAAQ,CAAA,IAAa,EAA8B,IAAI,GACxD,CAAC,GAAQ,CAAA,IAAa,EAAS,EAAE,GACjC,CAAC,GAAO,CAAA,IAAY,EAAuB,IAAI,GAC/C,CAAC,GAA0B,CAAA,IAA+B,EAAS,EAAK,GACxE,IAAa,GAAO,EAAK,GACzB,IAAO,GAAgB,EAA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gB,EAAW;AAAA,QAC3B,QAAQ;AAAA,QACR,SAAA,MAAe;AACb,UAAA,EAA4B,EAAK,GAEjC,EAAgB,iBAAiB,EAAE,kBAAkB,OAAU,CAAC;AAAA,QAClE;AAAA,QACA,OAAO,EAAiB,QAAQ;AAAA,QAEhC,UAAA,gBAAA,EAAC,IAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,MAChC,CAAA;AAAA,MACR,gBAAA,EAAC,IAAD;AAAA,QACE,YAAY,GAAO,QAAQ,GAAkB,SAAS,YAAY;AAAA,QAClE,gBAAgB,EAAW;AAAA,QAC3B,SAAS,GAAO,WAAW;AAAA,QAC3B,eAAA,MAAqB;AACnB,UAAK,GAAO,UACZ,EAAU,EAAM,MAAM,MAAM,GAC5B,EAAU,EAAM,MAAM,MAAM,GAC5B,EAAS,IAAI;AAAA,QACf;AAAA,QACA,SAAA,MAAe,EAAS,IAAI;AAAA,QAC5B,MAAM,EAAQ;AAAA,QACd,UAAU,GAAO;AAAA,MAClB,CAAA;AAAA,IACI;AAAA;AAEX,CAAC"}
|
|
@@ -1,90 +1,78 @@
|
|
|
1
|
-
import { buildDynamicCopy as
|
|
2
|
-
import { CURRENCY_FORMAT as
|
|
1
|
+
import { buildDynamicCopy as p, buildPluralCopy as g } from "../../../core/utils/Localization.es.js";
|
|
2
|
+
import { CURRENCY_FORMAT as e, formatCurrency as t } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
3
|
import { calculateBudgetPercent as v, calculateBudgetTier as y, tierColor as C } from "./layout.es.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { Text as
|
|
7
|
-
import { jsx as r, jsxs as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
var E = ({ budgetsCopy: c, copy: d, daysLeft: m, icon: _, limit:
|
|
11
|
-
const s = v(
|
|
4
|
+
import S from "../../components/ComponentBlocks/StatusIndicator.es.js";
|
|
5
|
+
import i from "@mui/material/Stack";
|
|
6
|
+
import { Text as o } from "@mxenabled/mxui";
|
|
7
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
8
|
+
import x from "@mui/material/Box";
|
|
9
|
+
import B from "@mui/material/Alert";
|
|
10
|
+
var E = ({ budgetsCopy: c, copy: d, daysLeft: m, icon: _, limit: a, showPeriodLine: h = !0, spent: l }) => {
|
|
11
|
+
const s = v(l, a), f = y(s), b = C(f), u = m === void 0 ? /* @__PURE__ */ r(B, {
|
|
12
12
|
severity: "info",
|
|
13
13
|
children: d.previous_month_notice
|
|
14
|
-
}) : /* @__PURE__ */ r(
|
|
14
|
+
}) : /* @__PURE__ */ r(o, {
|
|
15
15
|
color: "text.secondary",
|
|
16
16
|
variant: "body2",
|
|
17
17
|
children: g(d.days_left_until_end_of_month_one, d.days_left_until_end_of_month, m, String(m))
|
|
18
18
|
});
|
|
19
|
-
return
|
|
19
|
+
return a <= 0 ? /* @__PURE__ */ n(i, {
|
|
20
20
|
sx: { gap: 16 },
|
|
21
|
-
children: [/* @__PURE__ */
|
|
21
|
+
children: [/* @__PURE__ */ n(i, {
|
|
22
22
|
sx: {
|
|
23
23
|
alignItems: "center",
|
|
24
24
|
flexDirection: "row",
|
|
25
25
|
gap: 12
|
|
26
26
|
},
|
|
27
|
-
children: [/* @__PURE__ */ r(
|
|
27
|
+
children: [/* @__PURE__ */ r(x, { children: _ }), /* @__PURE__ */ n(i, { children: [/* @__PURE__ */ r(o, {
|
|
28
28
|
color: "text.secondary",
|
|
29
29
|
variant: "body2",
|
|
30
30
|
children: c.spent_label
|
|
31
|
-
}), /* @__PURE__ */ r(
|
|
31
|
+
}), /* @__PURE__ */ r(o, {
|
|
32
32
|
bold: !0,
|
|
33
33
|
component: "p",
|
|
34
34
|
variant: "h2",
|
|
35
|
-
children:
|
|
35
|
+
children: t(l, e.cents)
|
|
36
36
|
})] })]
|
|
37
|
-
}),
|
|
38
|
-
}) : /* @__PURE__ */
|
|
37
|
+
}), h && u]
|
|
38
|
+
}) : /* @__PURE__ */ n(i, {
|
|
39
39
|
sx: { gap: 16 },
|
|
40
|
-
children: [/* @__PURE__ */ r(
|
|
41
|
-
"aria-label":
|
|
42
|
-
"data-tier":
|
|
40
|
+
children: [/* @__PURE__ */ r(x, {
|
|
41
|
+
"aria-label": p(d.total_out_of_limit_aria, t(l, e.cents), t(a, e.cents)),
|
|
42
|
+
"data-tier": f ?? "none",
|
|
43
43
|
role: "group",
|
|
44
|
-
children: /* @__PURE__ */ r(
|
|
45
|
-
amount: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ r(S, {
|
|
45
|
+
amount: /* @__PURE__ */ n(i, {
|
|
46
46
|
sx: {
|
|
47
47
|
alignItems: "baseline",
|
|
48
48
|
flexDirection: "row",
|
|
49
49
|
gap: 4
|
|
50
50
|
},
|
|
51
|
-
children: [/* @__PURE__ */ r(
|
|
51
|
+
children: [/* @__PURE__ */ r(o, {
|
|
52
52
|
bold: !0,
|
|
53
53
|
component: "p",
|
|
54
54
|
variant: "h2",
|
|
55
|
-
children:
|
|
56
|
-
}), /* @__PURE__ */
|
|
55
|
+
children: t(l, e.cents)
|
|
56
|
+
}), /* @__PURE__ */ n(o, {
|
|
57
57
|
color: "text.secondary",
|
|
58
58
|
variant: "body2",
|
|
59
|
-
children: ["/ ",
|
|
59
|
+
children: ["/ ", t(a, e.cents)]
|
|
60
60
|
})]
|
|
61
61
|
}),
|
|
62
|
-
|
|
63
|
-
completeColor: f,
|
|
62
|
+
completeColor: b,
|
|
64
63
|
icon: _,
|
|
65
|
-
label: /* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
gap: 6
|
|
70
|
-
},
|
|
71
|
-
children: [/* @__PURE__ */ r(p, { sx: {
|
|
72
|
-
bgcolor: f,
|
|
73
|
-
borderRadius: "50%",
|
|
74
|
-
height: 8,
|
|
75
|
-
width: 8
|
|
76
|
-
} }), /* @__PURE__ */ r(i, {
|
|
77
|
-
color: "text.secondary",
|
|
78
|
-
variant: "body2",
|
|
79
|
-
children: c.spent_label
|
|
80
|
-
})]
|
|
64
|
+
label: /* @__PURE__ */ r(o, {
|
|
65
|
+
color: "text.secondary",
|
|
66
|
+
variant: "body2",
|
|
67
|
+
children: c.spent_label
|
|
81
68
|
}),
|
|
82
|
-
|
|
69
|
+
labelVariant: "body2",
|
|
70
|
+
leftLabel: p(c.percent_spent, String(s)),
|
|
83
71
|
percentComplete: Math.min(100, s),
|
|
84
|
-
rightLabel:
|
|
72
|
+
rightLabel: p(c.balance_left, t(Math.max(0, a - l), e.cents)),
|
|
85
73
|
sx: { p: 0 }
|
|
86
74
|
})
|
|
87
|
-
}),
|
|
75
|
+
}), h && u]
|
|
88
76
|
});
|
|
89
77
|
};
|
|
90
78
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BudgetSummary.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Alert from '@mui/material/Alert'\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport type { BudgetsCopy } from '../../../core/types/localization'\nimport type { BudgetDetailsCopy } from '../../../core/types/localization/InsightsFeedCopy'\nimport StatusIndicator from '../../components/ComponentBlocks/StatusIndicator'\n\nimport { calculateBudgetPercent, calculateBudgetTier, tierColor } from './layout'\n\ninterface BudgetSummaryProps {\n budgetsCopy: BudgetsCopy\n copy: BudgetDetailsCopy\n daysLeft?: number\n icon: ReactNode\n limit: number\n /** The days-left / previous-month line under the bar (off for Figma's Budget Details insights). */\n showPeriodLine?: boolean\n spent: number\n}\n\nexport const BudgetSummary = ({\n budgetsCopy,\n copy,\n daysLeft,\n icon,\n limit,\n showPeriodLine = true,\n spent,\n}: BudgetSummaryProps) => {\n const percent = calculateBudgetPercent(spent, limit)\n const tier = calculateBudgetTier(percent)\n const color = tierColor(tier)\n const periodLine =\n daysLeft === undefined ? (\n <Alert severity=\"info\">{copy.previous_month_notice}</Alert>\n ) : (\n <Text color=\"text.secondary\" variant=\"body2\">\n {\n buildPluralCopy(\n copy.days_left_until_end_of_month_one,\n copy.days_left_until_end_of_month,\n daysLeft,\n String(daysLeft),\n ) as string\n }\n </Text>\n )\n\n if (limit <= 0) {\n return (\n <Stack sx={{ gap: 16 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n <Box>{icon}</Box>\n <Stack>\n <Text color=\"text.secondary\" variant=\"body2\">\n {budgetsCopy.spent_label}\n </Text>\n <Text bold={true} component=\"p\" variant=\"h2\">\n {formatCurrency(spent, CURRENCY_FORMAT.cents)}\n </Text>\n </Stack>\n </Stack>\n {showPeriodLine && periodLine}\n </Stack>\n )\n }\n\n return (\n <Stack sx={{ gap: 16 }}>\n <Box\n aria-label={\n buildDynamicCopy(\n copy.total_out_of_limit_aria,\n formatCurrency(spent, CURRENCY_FORMAT.cents),\n formatCurrency(limit, CURRENCY_FORMAT.cents),\n ) as string\n }\n data-tier={tier ?? 'none'}\n role=\"group\"\n >\n <StatusIndicator\n amount={\n <Stack sx={{ alignItems: 'baseline', flexDirection: 'row', gap: 4 }}>\n <Text bold={true} component=\"p\" variant=\"h2\">\n {formatCurrency(spent, CURRENCY_FORMAT.cents)}\n </Text>\n <Text color=\"text.secondary\" variant=\"body2\">\n / {formatCurrency(limit, CURRENCY_FORMAT.cents)}\n </Text>\n </Stack>\n }\n
|
|
1
|
+
{"version":3,"file":"BudgetSummary.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Alert from '@mui/material/Alert'\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport type { BudgetsCopy } from '../../../core/types/localization'\nimport type { BudgetDetailsCopy } from '../../../core/types/localization/InsightsFeedCopy'\nimport StatusIndicator from '../../components/ComponentBlocks/StatusIndicator'\n\nimport { calculateBudgetPercent, calculateBudgetTier, tierColor } from './layout'\n\ninterface BudgetSummaryProps {\n budgetsCopy: BudgetsCopy\n copy: BudgetDetailsCopy\n daysLeft?: number\n icon: ReactNode\n limit: number\n /** The days-left / previous-month line under the bar (off for Figma's Budget Details insights). */\n showPeriodLine?: boolean\n spent: number\n}\n\nexport const BudgetSummary = ({\n budgetsCopy,\n copy,\n daysLeft,\n icon,\n limit,\n showPeriodLine = true,\n spent,\n}: BudgetSummaryProps) => {\n const percent = calculateBudgetPercent(spent, limit)\n const tier = calculateBudgetTier(percent)\n const color = tierColor(tier)\n const periodLine =\n daysLeft === undefined ? (\n <Alert severity=\"info\">{copy.previous_month_notice}</Alert>\n ) : (\n <Text color=\"text.secondary\" variant=\"body2\">\n {\n buildPluralCopy(\n copy.days_left_until_end_of_month_one,\n copy.days_left_until_end_of_month,\n daysLeft,\n String(daysLeft),\n ) as string\n }\n </Text>\n )\n\n if (limit <= 0) {\n return (\n <Stack sx={{ gap: 16 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n <Box>{icon}</Box>\n <Stack>\n <Text color=\"text.secondary\" variant=\"body2\">\n {budgetsCopy.spent_label}\n </Text>\n <Text bold={true} component=\"p\" variant=\"h2\">\n {formatCurrency(spent, CURRENCY_FORMAT.cents)}\n </Text>\n </Stack>\n </Stack>\n {showPeriodLine && periodLine}\n </Stack>\n )\n }\n\n return (\n <Stack sx={{ gap: 16 }}>\n <Box\n aria-label={\n buildDynamicCopy(\n copy.total_out_of_limit_aria,\n formatCurrency(spent, CURRENCY_FORMAT.cents),\n formatCurrency(limit, CURRENCY_FORMAT.cents),\n ) as string\n }\n data-tier={tier ?? 'none'}\n role=\"group\"\n >\n <StatusIndicator\n amount={\n <Stack sx={{ alignItems: 'baseline', flexDirection: 'row', gap: 4 }}>\n <Text bold={true} component=\"p\" variant=\"h2\">\n {formatCurrency(spent, CURRENCY_FORMAT.cents)}\n </Text>\n <Text color=\"text.secondary\" variant=\"body2\">\n / {formatCurrency(limit, CURRENCY_FORMAT.cents)}\n </Text>\n </Stack>\n }\n completeColor={color}\n icon={icon}\n label={\n <Text color=\"text.secondary\" variant=\"body2\">\n {budgetsCopy.spent_label}\n </Text>\n }\n labelVariant=\"body2\"\n leftLabel={buildDynamicCopy(budgetsCopy.percent_spent, String(percent)) as string}\n percentComplete={Math.min(100, percent)}\n rightLabel={\n buildDynamicCopy(\n // Figma's \"$amount Left\"; $0.00 once over, as the Budgets drawer shows it.\n budgetsCopy.balance_left,\n formatCurrency(Math.max(0, limit - spent), CURRENCY_FORMAT.cents),\n ) as string\n }\n sx={{ p: 0 }}\n />\n </Box>\n {showPeriodLine && periodLine}\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;AA2BA,IAAa,IAAA,CAAiB,EAC5B,aAAA,GACA,MAAA,GACA,UAAA,GACA,MAAA,GACA,OAAA,GACA,gBAAA,IAAiB,IACjB,OAAA,EAAA,MACwB;AACxB,QAAM,IAAU,EAAuB,GAAO,CAAK,GAC7C,IAAO,EAAoB,CAAO,GAClC,IAAQ,EAAU,CAAI,GACtB,IACJ,MAAa,SACX,gBAAA,EAAC,GAAD;AAAA,IAAO,UAAS;AAAA,IAAQ,UAAA,EAAK;AAAA,EAA6B,CAAA,IAE1D,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAiB,SAAQ;AAAA,IAEjC,UAAA,EACE,EAAK,kCACL,EAAK,8BACL,GACA,OAAO,CAAQ,CACjB;AAAA,EAEE,CAAA;AAGV,SAAI,KAAS,IAET,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE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AC1C;AAAA,UACD,CAAA,CAAA;AAAA;QAET,eAAe;AAAA,QACT,MAAA;AAAA,QACN,OACE,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,SAAQ;AAAA,UAClC,UAAA,EAAY;AAAA,QACT,CAAA;AAAA,QAER,cAAa;AAAA,QACb,WAAW,EAAiB,EAAY,eAAe,OAAO,CAAO,CAAC;AAAA,QACtE,iBAAiB,KAAK,IAAI,KAAK,CAAO;AAAA,QACtC,YACE,EAEE,EAAY,cACZ,EAAe,KAAK,IAAI,GAAG,IAAQ,CAAK,GAAG,EAAgB,KAAK,CAClE;AAAA,QAEF,IAAI,EAAE,GAAG,EAAE;AAAA,MACZ,CAAA;AAAA,IACE,CAAA,GACJ,KAAkB,CACd;AAAA;AAEX"}
|
|
@@ -9,11 +9,11 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
9
9
|
var j = ({ payload: i }) => {
|
|
10
10
|
const { budget_percent: c, amount: n, budget_tier: m, category_guid: t, merchant_guid: s, spent_amount: u, budgeted_amount: d, localized_payload: o } = i.instance_slot_data, p = h(m), _ = t ? /* @__PURE__ */ a(y, {
|
|
11
11
|
categoryGuid: t,
|
|
12
|
-
size:
|
|
12
|
+
size: 48,
|
|
13
13
|
tint: 0.25
|
|
14
14
|
}) : /* @__PURE__ */ a(C, {
|
|
15
15
|
logo: { merchant_guid: s },
|
|
16
|
-
size:
|
|
16
|
+
size: 48
|
|
17
17
|
}), g = l(o?.spent_label || "", r(u, e.cents)), b = l(o?.budgeted_label || "", r(d, e.cents)), f = /* @__PURE__ */ a(T, {
|
|
18
18
|
bold: !0,
|
|
19
19
|
variant: "h2",
|
|
@@ -21,7 +21,7 @@ var j = ({ payload: i }) => {
|
|
|
21
21
|
});
|
|
22
22
|
return /* @__PURE__ */ a(x, {
|
|
23
23
|
amount: f,
|
|
24
|
-
borderRadius: "
|
|
24
|
+
borderRadius: "6px",
|
|
25
25
|
completeColor: p,
|
|
26
26
|
icon: _,
|
|
27
27
|
label: o?.primary_text || "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BudgetBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.tsx"],"sourcesContent":["import { Text } from '@mxenabled/mxui'\n\nimport { buildDynamicCopy } from '../../../../common'\nimport type { BudgetBlockData } from '../../../../core/types/InsightsInstanceSlotData'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport CategoryTile from '../../../components/CategoryTile'\nimport StatusIndicator from '../../../components/ComponentBlocks/StatusIndicator'\nimport LogoMark from '../../../components/LogoMark'\n\nimport type { BlockProps } from '../../types'\n\nimport { getColorByBudgetTier } from './util'\n\nexport const BudgetBlock = ({ payload }: BlockProps<BudgetBlockData>) => {\n const {\n budget_percent,\n amount,\n budget_tier,\n category_guid,\n merchant_guid,\n spent_amount,\n budgeted_amount,\n localized_payload,\n } = payload.instance_slot_data\n\n const color = getColorByBudgetTier(budget_tier)\n\n // Precomputed as a JSX element (not a component defined during render) so it\n // isn't remounted on every re-render.\n const icon = category_guid ? (\n <CategoryTile categoryGuid={category_guid} size={
|
|
1
|
+
{"version":3,"file":"BudgetBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.tsx"],"sourcesContent":["import { Text } from '@mxenabled/mxui'\n\nimport { buildDynamicCopy } from '../../../../common'\nimport type { BudgetBlockData } from '../../../../core/types/InsightsInstanceSlotData'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport CategoryTile from '../../../components/CategoryTile'\nimport StatusIndicator from '../../../components/ComponentBlocks/StatusIndicator'\nimport LogoMark from '../../../components/LogoMark'\n\nimport type { BlockProps } from '../../types'\n\nimport { getColorByBudgetTier } from './util'\n\nexport const BudgetBlock = ({ payload }: BlockProps<BudgetBlockData>) => {\n const {\n budget_percent,\n amount,\n budget_tier,\n category_guid,\n merchant_guid,\n spent_amount,\n budgeted_amount,\n localized_payload,\n } = payload.instance_slot_data\n\n const color = getColorByBudgetTier(budget_tier)\n\n // Precomputed as a JSX element (not a component defined during render) so it\n // isn't remounted on every re-render.\n const icon = category_guid ? (\n <CategoryTile categoryGuid={category_guid} size={48} tint={0.25} />\n ) : (\n <LogoMark logo={{ merchant_guid }} size={48} />\n )\n\n const block_left_footer = buildDynamicCopy(\n localized_payload?.spent_label || '',\n formatCurrency(spent_amount, CURRENCY_FORMAT.cents),\n ) as string\n\n const block_right_footer = buildDynamicCopy(\n localized_payload?.budgeted_label || '',\n formatCurrency(budgeted_amount, CURRENCY_FORMAT.cents),\n ) as string\n\n const amountToDisplay = (\n <Text bold={true} variant=\"h2\">\n {category_guid && category_guid !== null\n ? (buildDynamicCopy(\n localized_payload?.amount_left_label || '',\n formatCurrency(amount, CURRENCY_FORMAT.cents),\n ) as string)\n : formatCurrency(amount, CURRENCY_FORMAT.cents)}\n </Text>\n )\n\n return (\n <StatusIndicator\n amount={amountToDisplay}\n // Figma 4008:215163.\n borderRadius=\"6px\"\n completeColor={color}\n icon={icon}\n label={localized_payload?.primary_text || ''}\n leftLabel={block_left_footer}\n percentComplete={budget_percent}\n rightLabel={block_right_footer}\n sx={{ '& .details-container': { gap: 12 } }}\n />\n )\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,IAAA,CAAe,EAAE,SAAA,EAAA,MAA2C;AACvE,QAAM,EACJ,gBAAA,GACA,QAAA,GACA,aAAA,GACA,eAAA,GACA,eAAA,GACA,cAAA,GACA,iBAAA,GACA,mBAAA,EAAA,IACE,EAAQ,oBAEN,IAAQ,EAAqB,CAAW,GAIxC,IAAO,IACX,gBAAA,EAAC,GAAD;AAAA,IAAc,cAAc;AAAA,IAAe,MAAM;AAAA,IAAI,MAAM;AAAA,EAAO,CAAA,IAElE,gBAAA,EAAC,GAAD;AAAA,IAAU,MAAM,EAAE,eAAA,EAAc;AAAA,IAAG,MAAM;AAAA,EAAK,CAAA,GAG1C,IAAoB,EACxB,GAAmB,eAAe,IAClC,EAAe,GAAc,EAAgB,KAAK,CACpD,GAEM,IAAqB,EACzB,GAAmB,kBAAkB,IACrC,EAAe,GAAiB,EAAgB,KAAK,CACvD,GAEM,IACJ,gBAAA,EAAC,GAAD;AAAA,IAAM,MAAM;AAAA,IAAM,SAAQ;AAAA,IACvB,UAAA,KAAiB,MAAkB,OAC/B,EACC,GAAmB,qBAAqB,IACxC,EAAe,GAAQ,EAAgB,KAAK,CAC9C,IACA,EAAe,GAAQ,EAAgB,KAAK;AAAA,EAC5C,CAAA;AAGR,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,QAAQ;AAAA,IAER,cAAa;AAAA,IACb,eAAe;AAAA,IACT,MAAA;AAAA,IACN,OAAO,GAAmB,gBAAgB;AAAA,IAC1C,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,IAAI,EAAE,wBAAwB,EAAE,KAAK,GAAG,EAAE;AAAA,EAC3C,CAAA;AAEL"}
|
|
@@ -6,9 +6,11 @@ interface StatusIndicatorProps {
|
|
|
6
6
|
icon: React.ReactNode;
|
|
7
7
|
label: string | React.ReactNode;
|
|
8
8
|
leftLabel?: string;
|
|
9
|
+
/** Type of `leftLabel` / `rightLabel` under the bar (not `label`): caption on the card, body2 in the drawer. */
|
|
10
|
+
labelVariant?: 'caption' | 'body2';
|
|
9
11
|
percentComplete?: number;
|
|
10
12
|
rightLabel?: string;
|
|
11
13
|
sx?: SxProps;
|
|
12
14
|
}
|
|
13
|
-
declare const StatusIndicator: ({ amount, borderRadius, completeColor, icon, label, leftLabel, percentComplete, rightLabel, sx, }: StatusIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const StatusIndicator: ({ amount, borderRadius, completeColor, icon, label, leftLabel, labelVariant, percentComplete, rightLabel, sx, }: StatusIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
export default StatusIndicator;
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
import r from "@mui/material/Stack";
|
|
2
|
-
import { H2 as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
var
|
|
2
|
+
import { H2 as g, P as m, Text as c } from "@mxenabled/mxui";
|
|
3
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import a from "@mui/material/Box";
|
|
5
|
+
var j = ({ amount: e, borderRadius: o = "2px", completeColor: d = "success.main", icon: x, label: n, leftLabel: l, labelVariant: s = "caption", percentComplete: h = 0, rightLabel: p, sx: f }) => /* @__PURE__ */ i(r, {
|
|
6
6
|
className: "details-container",
|
|
7
7
|
sx: {
|
|
8
8
|
px: 16,
|
|
9
9
|
py: 8,
|
|
10
10
|
width: "100%",
|
|
11
11
|
gap: 16,
|
|
12
|
-
...
|
|
12
|
+
...f
|
|
13
13
|
},
|
|
14
|
-
children: [/* @__PURE__ */
|
|
14
|
+
children: [/* @__PURE__ */ i(r, {
|
|
15
15
|
sx: {
|
|
16
16
|
alignItems: "center",
|
|
17
17
|
flexDirection: "row",
|
|
18
18
|
gap: 12
|
|
19
19
|
},
|
|
20
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ t(a, { children: x }), /* @__PURE__ */ i(r, { children: [typeof n == "string" ? /* @__PURE__ */ t(m, {
|
|
21
21
|
dangerouslySetInnerHTML: { __html: n },
|
|
22
22
|
variant: "body2"
|
|
23
|
-
}) : n, typeof
|
|
24
|
-
}), /* @__PURE__ */
|
|
23
|
+
}) : n, typeof e == "string" ? /* @__PURE__ */ t(g, { children: e }) : e] })]
|
|
24
|
+
}), /* @__PURE__ */ i(r, {
|
|
25
25
|
sx: { gap: 4 },
|
|
26
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ t(r, {
|
|
27
|
+
"data-testid": "status-indicator-track",
|
|
27
28
|
sx: {
|
|
28
29
|
bgcolor: "divider",
|
|
29
30
|
borderRadius: o,
|
|
30
31
|
flexDirection: "row",
|
|
31
|
-
height:
|
|
32
|
+
height: 12,
|
|
32
33
|
width: "100%"
|
|
33
34
|
},
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}), /* @__PURE__ */ t(r, {
|
|
35
|
+
children: /* @__PURE__ */ t(a, {
|
|
36
|
+
"data-testid": "status-indicator-fill",
|
|
37
|
+
sx: {
|
|
38
|
+
bgcolor: d,
|
|
39
|
+
borderRadius: o,
|
|
40
|
+
height: 12,
|
|
41
|
+
width: `${h}%`
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
}), /* @__PURE__ */ i(r, {
|
|
45
45
|
sx: {
|
|
46
46
|
flexDirection: "row",
|
|
47
47
|
justifyContent: "space-between"
|
|
48
48
|
},
|
|
49
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ t(c, {
|
|
50
50
|
sx: { color: "text.secondary" },
|
|
51
|
-
variant:
|
|
52
|
-
children:
|
|
53
|
-
}), /* @__PURE__ */
|
|
51
|
+
variant: s,
|
|
52
|
+
children: l
|
|
53
|
+
}), /* @__PURE__ */ t(c, {
|
|
54
54
|
sx: { color: "text.secondary" },
|
|
55
|
-
variant:
|
|
55
|
+
variant: s,
|
|
56
56
|
children: p
|
|
57
57
|
})]
|
|
58
58
|
})]
|
|
59
59
|
})]
|
|
60
60
|
});
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
j as default
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
//# sourceMappingURL=StatusIndicator.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIndicator.es.js","names":[],"sources":["../../../../src/insights-v2/components/ComponentBlocks/StatusIndicator.tsx"],"sourcesContent":["import { H2, P, Text } from '@mxenabled/mxui'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\ninterface StatusIndicatorProps {\n amount: string | React.ReactNode\n borderRadius?: string\n completeColor?: string\n icon: React.ReactNode\n label: string | React.ReactNode\n leftLabel?: string\n percentComplete?: number\n rightLabel?: string\n sx?: SxProps\n}\n\nconst StatusIndicator = ({\n amount,\n borderRadius = '2px',\n completeColor = 'success.main',\n icon,\n label,\n leftLabel,\n percentComplete = 0,\n rightLabel,\n sx,\n}: StatusIndicatorProps) => {\n return (\n <Stack className=\"details-container\" sx={{ px: 16, py: 8, width: '100%', gap: 16, ...sx }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n <Box>{icon}</Box>\n <Stack>\n {typeof label === 'string' ? (\n <P dangerouslySetInnerHTML={{ __html: label }} variant={'body2'} />\n ) : (\n label\n )}\n {typeof amount === 'string' ? <H2>{amount}</H2> : amount}\n </Stack>\n </Stack>\n <Stack sx={{ gap: 4 }}>\n <Stack\n sx={{\n bgcolor: 'divider',\n borderRadius,\n flexDirection: 'row',\n height:
|
|
1
|
+
{"version":3,"file":"StatusIndicator.es.js","names":[],"sources":["../../../../src/insights-v2/components/ComponentBlocks/StatusIndicator.tsx"],"sourcesContent":["import { H2, P, Text } from '@mxenabled/mxui'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\ninterface StatusIndicatorProps {\n amount: string | React.ReactNode\n borderRadius?: string\n completeColor?: string\n icon: React.ReactNode\n label: string | React.ReactNode\n leftLabel?: string\n /** Type of `leftLabel` / `rightLabel` under the bar (not `label`): caption on the card, body2 in the drawer. */\n labelVariant?: 'caption' | 'body2'\n percentComplete?: number\n rightLabel?: string\n sx?: SxProps\n}\n\nconst StatusIndicator = ({\n amount,\n borderRadius = '2px',\n completeColor = 'success.main',\n icon,\n label,\n leftLabel,\n labelVariant = 'caption',\n percentComplete = 0,\n rightLabel,\n sx,\n}: StatusIndicatorProps) => {\n return (\n <Stack className=\"details-container\" sx={{ px: 16, py: 8, width: '100%', gap: 16, ...sx }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n <Box>{icon}</Box>\n <Stack>\n {typeof label === 'string' ? (\n <P dangerouslySetInnerHTML={{ __html: label }} variant={'body2'} />\n ) : (\n label\n )}\n {typeof amount === 'string' ? <H2>{amount}</H2> : amount}\n </Stack>\n </Stack>\n <Stack sx={{ gap: 4 }}>\n <Stack\n data-testid=\"status-indicator-track\"\n sx={{\n bgcolor: 'divider',\n borderRadius,\n flexDirection: 'row',\n height: 12,\n width: '100%',\n }}\n >\n <Box\n data-testid=\"status-indicator-fill\"\n sx={{\n bgcolor: completeColor,\n borderRadius,\n height: 12,\n width: `${percentComplete}%`,\n }}\n />\n </Stack>\n\n <Stack sx={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text sx={{ color: 'text.secondary' }} variant={labelVariant}>\n {leftLabel}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant={labelVariant}>\n {rightLabel}\n </Text>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default StatusIndicator\n"],"mappings":";;;;AAoBA,IAAM,IAAA,CAAmB,EACvB,QAAA,GACA,cAAA,IAAe,OACf,eAAA,IAAgB,gBAChB,MAAA,GACA,OAAA,GACA,WAAA,GACA,cAAA,IAAe,WACf,iBAAA,IAAkB,GAClB,YAAA,GACA,IAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EAAO,WAAU;AAAA,EAAoB,IAAI;AAAA,IAAE,IAAI;AAAA,IAAI,IAAI;AAAA,IAAG,OAAO;AAAA,IAAQ,KAAK;AAAA,IAAI,GAAG;AAAA,EAAG;AAAA,EAAxF,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,KAAK;AAAA,IAAG;AAAA,IAAjE,UAAA,CACE,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appings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GasPurchaseBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n QuarterlySummaryBlock,\n QuizBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SavingsSummaryBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WeeklySmallPurchasesBlock,\n WithdrawalBlock,\n TransactionBlock,\n GreenStatementFeeBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport {\n selectTransactionHistoryCopy,\n TransactionHistoryBlock,\n} from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport {\n RemainingCashBlock,\n selectRemainingCashCopy,\n useRemainingCashLoadState,\n} from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport {\n OverdraftBlock,\n selectOverdraftCopy,\n useOverdraftPrepare,\n} from '../actionBlocks/OverdraftBlock'\nimport {\n AccountListBlock,\n selectAccountListCopy,\n useAccountListPrepare,\n} from '../actionBlocks/AccountListBlock'\nimport {\n EmergencySavingsBlock,\n selectEmergencySavingsCopy,\n} from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n selectCreditUtilizationCopy,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n selectPayoffCalculatorCopy,\n usePayoffCalculatorLoadState,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock, selectBudgetDetailsCopy } from '../actionBlocks/BudgetDetailsBlock'\nimport { TopMerchantsBlock, selectTopMerchantsCopy } from '../actionBlocks/TopMerchantsBlock'\nimport { useBudgetDetailsPrepare } from '../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare'\nimport { getBudgetDetailsDrawerTitle } from '../actionBlocks/BudgetDetailsBlock/layout'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\nimport { HelpBlock } from '../actionBlocks/HelpBlock'\nimport {\n PayoffStrategiesBlock,\n selectPayoffStrategiesCopy,\n usePayoffStrategiesPrepare,\n} from '../actionBlocks/PayoffStrategiesBlock'\nimport { QuizMerchantBlock } from '../actionBlocks/QuizMerchantBlock'\nimport { useAccountsLoadState } from '../actionBlocks/useAccountsLoadState'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface BlockLoadState {\n ready: boolean\n failed?: boolean\n retry?: () => void\n}\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // The data the block waits for: a loader until `ready`, the error card while `failed`.\n useLoadState?: (props: ActionBlockProps) => BlockLoadState\n // Drawer title from the CTA's variant and copy; falls back to the CTA label when empty.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // The copy section a drawer block needs; the layer shows BlockErrorMessage without it.\n copy?: (copy: GlobalCopy) => unknown\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n // The drawer header's close control: 'back' (default, arrow on the left) or 'close' (X on the right).\n headerAction?: 'back' | 'close'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * Reads its imports on access, not at load: some blocks import this registry back through\n * `ActionBlockLayer`, so a value copied at load would still be `undefined`.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get useLoadState() {\n return resolve().useLoadState\n },\n get title() {\n return resolve().title\n },\n get copy() {\n return resolve().copy\n },\n get presentation() {\n return resolve().presentation\n },\n get headerAction() {\n return resolve().headerAction\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n copy: selectTransactionHistoryCopy,\n usePrepare: useTransactionHistoryPrepare,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n copy: selectRemainingCashCopy,\n usePrepare: useRecurringTransactionPrepare,\n useLoadState: useRemainingCashLoadState,\n title: (_variant, copy) => selectRemainingCashCopy(copy)?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Savings Opportunity's safety net: `safety_net_block` opens the amount-input modal.\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n copy: selectOverdraftCopy,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": the explanation, the band legend and the per-card list.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n copy: selectCreditUtilizationCopy,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => selectCreditUtilizationCopy(copy)?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n copy: selectEmergencySavingsCopy,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n copy: selectPayoffCalculatorCopy,\n usePrepare: usePayoffCalculatorPrepare,\n useLoadState: usePayoffCalculatorLoadState,\n title: (_variant, copy) => selectPayoffCalculatorCopy(copy)?.title ?? '',\n })),\n // Monthly Top Merchant Spending's Top Merchants: the month's ten ranked merchants, each opening\n // its Merchant History (Transaction History, `top_merchant` variant) in a nested drawer.\n [actionBlocksKey.TOP_MERCHANTS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TopMerchantsBlock,\n copy: selectTopMerchantsCopy,\n // Figma's Top Merchants: a close X on the right, not the back arrow.\n headerAction: 'close',\n // The nested Merchant History lists the store's transactions, so load them as it would.\n usePrepare: useTransactionHistoryPrepare,\n title: (_variant, copy) => selectTopMerchantsCopy(copy)?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n copy: selectBudgetDetailsCopy,\n // Figma's Budget Details: a close X on the right, not the back arrow.\n headerAction: 'close',\n // Loads the budget data and points the transaction store at the budget month, as pulse did.\n usePrepare: useBudgetDetailsPrepare,\n title: getBudgetDetailsDrawerTitle,\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n copy: selectAccountListCopy,\n usePrepare: useAccountListPrepare,\n useLoadState: useAccountsLoadState,\n title: (_variant, copy) => selectAccountListCopy(copy)?.title ?? '',\n })),\n // A beat's \"Learn More\": its pre-localized help title and body from the payload's\n // `drilldown_data`. The drawer title is the CTA label.\n [actionBlocksKey.HELP_ACTION_BLOCK]: liveEntry(() => ({\n Component: HelpBlock,\n usePrepare: noop,\n })),\n // Debt Payoff Strategies' \"Learn more\": Avalanche / Snowball tabs over the beat's debt accounts.\n [actionBlocksKey.PAYOFF_STRATEGIES_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffStrategiesBlock,\n copy: selectPayoffStrategiesCopy,\n usePrepare: usePayoffStrategiesPrepare,\n useLoadState: useAccountsLoadState,\n title: (_variant, copy) => selectPayoffStrategiesCopy(copy)?.debt_payoff_strategies ?? '',\n })),\n // A Monthly Top Transacted Merchant result row: that merchant's rank, totals and transactions.\n [actionBlocksKey.QUIZ_MERCHANT_ACTION_BLOCK]: liveEntry(() => ({\n Component: QuizMerchantBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, copy) => copy.insights_feed?.quiz_block?.drawer_title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n gas_purchase_block: GasPurchaseBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n quarterly_summary_block: QuarterlySummaryBlock,\n quiz_block: QuizBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_block: SavingsOpportunityBlock,\n savings_summary_block: SavingsSummaryBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n weekly_small_purchases_block: WeeklySmallPurchasesBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n green_statement_fee_block: GreenStatementFeeBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAiCjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,OAAO;AACT,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,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OAAiB;AAAA,IACpD,WAAW;AAAA,IACX,YAAY;AAAA,EACd,EAAE;AAAA,EAED,CAAA,EAAgB,8BAAA,GAAiC,EAAA,OAAiB;AAAA,IACjE,WAAW;AAAA,IACX,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,OAAA,CAAQ,GAAU,MAAS,EAA2B,CAAI,GAAG,0BAA0B;AAAA,EACzF,EAAE;AAAA,EAED,CAAA,EAAgB,0BAAA,GAA6B,EAAA,OAAiB;AAAA,IAC7D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,eAAe,YAAY,gBAAgB;AAAA,EAC7E,EAAE;AACJ,GAEa,KAAS;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,yBAAyB;AAAA,EACzB,YAAY;AAAA,EACZ,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,2BAA2B;AAC7B"}
|
|
1
|
+
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GasPurchaseBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n QuarterlySummaryBlock,\n QuizBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SavingsSummaryBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WeeklySmallPurchasesBlock,\n WithdrawalBlock,\n TransactionBlock,\n GreenStatementFeeBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport {\n selectTransactionHistoryCopy,\n TransactionHistoryBlock,\n} from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport {\n RemainingCashBlock,\n selectRemainingCashCopy,\n useRemainingCashLoadState,\n} from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport {\n OverdraftBlock,\n selectOverdraftCopy,\n useOverdraftPrepare,\n} from '../actionBlocks/OverdraftBlock'\nimport {\n AccountListBlock,\n selectAccountListCopy,\n useAccountListPrepare,\n} from '../actionBlocks/AccountListBlock'\nimport {\n EmergencySavingsBlock,\n selectEmergencySavingsCopy,\n} from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n selectCreditUtilizationCopy,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n selectPayoffCalculatorCopy,\n usePayoffCalculatorLoadState,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock, selectBudgetDetailsCopy } from '../actionBlocks/BudgetDetailsBlock'\nimport { TopMerchantsBlock, selectTopMerchantsCopy } from '../actionBlocks/TopMerchantsBlock'\nimport { useBudgetDetailsPrepare } from '../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare'\nimport { getBudgetDetailsDrawerTitle } from '../actionBlocks/BudgetDetailsBlock/layout'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\nimport { HelpBlock } from '../actionBlocks/HelpBlock'\nimport {\n PayoffStrategiesBlock,\n selectPayoffStrategiesCopy,\n usePayoffStrategiesPrepare,\n} from '../actionBlocks/PayoffStrategiesBlock'\nimport { QuizMerchantBlock } from '../actionBlocks/QuizMerchantBlock'\nimport { useAccountsLoadState } from '../actionBlocks/useAccountsLoadState'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface BlockLoadState {\n ready: boolean\n failed?: boolean\n retry?: () => void\n}\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // The data the block waits for: a loader until `ready`, the error card while `failed`.\n useLoadState?: (props: ActionBlockProps) => BlockLoadState\n // Drawer title from the CTA's variant and copy; falls back to the CTA label when empty.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // The copy section a drawer block needs; the layer shows BlockErrorMessage without it.\n copy?: (copy: GlobalCopy) => unknown\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n // The drawer header's close control: 'back' (default, arrow on the left) or 'close' (X on the right).\n headerAction?: 'back' | 'close'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * Reads its imports on access, not at load: some blocks import this registry back through\n * `ActionBlockLayer`, so a value copied at load would still be `undefined`.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get useLoadState() {\n return resolve().useLoadState\n },\n get title() {\n return resolve().title\n },\n get copy() {\n return resolve().copy\n },\n get presentation() {\n return resolve().presentation\n },\n get headerAction() {\n return resolve().headerAction\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n copy: selectTransactionHistoryCopy,\n usePrepare: useTransactionHistoryPrepare,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n copy: selectRemainingCashCopy,\n usePrepare: useRecurringTransactionPrepare,\n useLoadState: useRemainingCashLoadState,\n title: (_variant, copy) => selectRemainingCashCopy(copy)?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Savings Opportunity's safety net: `safety_net_block` opens the amount-input modal.\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n copy: selectOverdraftCopy,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": the explanation, the band legend and the per-card list.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n copy: selectCreditUtilizationCopy,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => selectCreditUtilizationCopy(copy)?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n copy: selectEmergencySavingsCopy,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n copy: selectPayoffCalculatorCopy,\n usePrepare: usePayoffCalculatorPrepare,\n useLoadState: usePayoffCalculatorLoadState,\n title: (_variant, copy) => selectPayoffCalculatorCopy(copy)?.title ?? '',\n })),\n // Monthly Top Merchant Spending's Top Merchants: the month's ten ranked merchants, each opening\n // its Merchant History (Transaction History, `top_merchant` variant) in a nested drawer.\n [actionBlocksKey.TOP_MERCHANTS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TopMerchantsBlock,\n copy: selectTopMerchantsCopy,\n // Figma's Top Merchants: a close X on the right, not the back arrow.\n headerAction: 'close',\n // The nested Merchant History lists the store's transactions, so load them as it would.\n usePrepare: useTransactionHistoryPrepare,\n title: (_variant, copy) => selectTopMerchantsCopy(copy)?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n copy: selectBudgetDetailsCopy,\n // Loads the budget data and points the transaction store at the budget month, as pulse did.\n usePrepare: useBudgetDetailsPrepare,\n title: getBudgetDetailsDrawerTitle,\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n copy: selectAccountListCopy,\n usePrepare: useAccountListPrepare,\n useLoadState: useAccountsLoadState,\n title: (_variant, copy) => selectAccountListCopy(copy)?.title ?? '',\n })),\n // A beat's \"Learn More\": its pre-localized help title and body from the payload's\n // `drilldown_data`. The drawer title is the CTA label.\n [actionBlocksKey.HELP_ACTION_BLOCK]: liveEntry(() => ({\n Component: HelpBlock,\n usePrepare: noop,\n })),\n // Debt Payoff Strategies' \"Learn more\": Avalanche / Snowball tabs over the beat's debt accounts.\n [actionBlocksKey.PAYOFF_STRATEGIES_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffStrategiesBlock,\n copy: selectPayoffStrategiesCopy,\n usePrepare: usePayoffStrategiesPrepare,\n useLoadState: useAccountsLoadState,\n title: (_variant, copy) => selectPayoffStrategiesCopy(copy)?.debt_payoff_strategies ?? '',\n })),\n // A Monthly Top Transacted Merchant result row: that merchant's rank, totals and transactions.\n [actionBlocksKey.QUIZ_MERCHANT_ACTION_BLOCK]: liveEntry(() => ({\n Component: QuizMerchantBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, copy) => copy.insights_feed?.quiz_block?.drawer_title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n gas_purchase_block: GasPurchaseBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n quarterly_summary_block: QuarterlySummaryBlock,\n quiz_block: QuizBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_block: SavingsOpportunityBlock,\n savings_summary_block: SavingsSummaryBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n weekly_small_purchases_block: WeeklySmallPurchasesBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n green_statement_fee_block: GreenStatementFeeBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAiCjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,OAAO;AACT,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AACF,IAEa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B,EAAA,OAAiB;AAAA,IAC3D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA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