@mx-cartographer/experiences 9.7.188 → 9.7.190

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/common/components/drawer/Header.d.ts +1 -1
  3. package/dist/common/components/drawer/Header.es.js.map +1 -1
  4. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +30 -24
  5. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
  6. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js +36 -48
  7. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js.map +1 -1
  8. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +31 -30
  9. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
  10. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +3 -1
  11. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +11 -9
  12. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
  13. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +3 -3
  14. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
  15. package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.d.ts +3 -1
  16. package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js +28 -28
  17. package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js.map +1 -1
  18. package/dist/insights-v2/components/celebrationGradients.d.ts +5 -4
  19. package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
  20. package/dist/insights-v2/mappings/blocks.es.js +0 -1
  21. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  22. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [9.7.190] - 11-19-2026
2
+
3
+ - **FIXED** - Insights 2.0 Unified Deposit and the deposit templates: the tile's amount is bold, the payer line is a one-line caption in secondary text, and the wash matches Figma (WEC-2367)
4
+
5
+ ## [9.7.189] - 11-19-2026
6
+
7
+ - **FIXED** - Budget Details drawer header matches Figma: back arrow, larger month, divider, no status dot, thinner bar and larger labels (WEC-2366)
8
+ - **FIXED** - Budget card (category and merchant) icon and bar match Figma (WEC-2366)
9
+
1
10
  ## [9.7.188] - 11-18-2026
2
11
 
3
12
  - **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 Budget Details. */
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 Budget Details. */\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
+ {"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 le, useGlobalCopyStore as de, useGlobalStore as ue, useInsightsV2Store as me, useTransactionStore as ge } from "../../../common/context/hooks.es.js";
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 De, resolveBudgetFacts as Be } from "./layout.es.js";
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, dt = Me(function({ beat: n }) {
28
- const { emitUpdate: H } = ue(), { budgets: t, categories: Y, common: u, insights_feed: L, transactions: $ } = de(), d = ce(), q = le(), w = ge(), m = me(), f = xe(), [r, D] = C(null), [g, y] = C(""), [s, p] = C(null), [W, I] = C(!1), B = Ie(!1), J = Le(Re), { categories: K } = q, i = Be(n), M = ve(m, n), Q = be(n, M), X = ke(n)?.variant, { showPeriodLine: Z } = De(X), N = i.categoryGuid ? K.find(({ guid: e }) => e === i.categoryGuid) : void 0, a = i.categoryGuid ? d.budgets.find(({ category_guid: e }) => e === i.categoryGuid) : void 0, c = !i.categoryGuid && i.merchantGuid ? d.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, {
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) : ""), D(e);
36
+ e === "delete" && f(b.BUDGET_DELETE_START), y(e === "edit" ? String(R) : ""), B(e);
37
37
  }, F = () => {
38
- D(null), y("");
38
+ B(null), y("");
39
39
  }, U = () => {
40
40
  r === "delete" && f(b.BUDGET_DELETE_CANCEL), F();
41
- }, l = (e) => P(e, O), x = (e) => l({
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 d.deleteMerchantBudget(c.guid);
47
+ const { isSuccess: h } = await l.deleteMerchantBudget(c.guid);
48
48
  return {
49
49
  ok: h,
50
- success: l(t.success_alert_delete_merchant_budget),
51
- failure: l(t.error_alert_delete_merchant_budget)
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 d.updateMerchantBudget({
54
+ const { isSuccess: E } = await l.updateMerchantBudget({
55
55
  ...c,
56
56
  amount: _
57
57
  });
58
58
  return {
59
59
  ok: E,
60
- success: l(t.success_alert_edit_merchant_budget),
61
- failure: l(t.error_alert_edit_merchant_budget)
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 d.deleteBudget(a.guid),
66
- success: l(t.alert_budget_deleted),
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 d.updateBudget({
69
+ ok: await l.updateBudget({
70
70
  ...a,
71
71
  amount: _
72
72
  }),
73
- success: l(t.alert_budget_updated),
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 (B.current || !r) return;
80
+ if (D.current || !r) return;
81
81
  const e = Number(g);
82
82
  if (r !== "delete" && !Te(g)) return;
83
- B.current = !0;
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
- B.current = !1, F();
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
- p: 24
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
- variant: "body1",
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), D(s.retry.action), p(null));
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
- dt as BudgetDetailsBlock,
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,IAA6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B;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
+ {"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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CAAA,EAAQ;AAAA,QAChC,gBAAgB,IAAW,YAAY;AAAA,QACvC,eAAe,EAAW;AAAA,QAC1B,OAAO,EAAW,CAAA,EAAQ;AAAA,MAC3B,CAAA;AAAA,MAEH,gBAAA,EAAC,IAAD;AAAA,QACE,gBAAgB,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 h, buildPluralCopy as g } from "../../../core/utils/Localization.es.js";
2
- import { CURRENCY_FORMAT as t, formatCurrency as o } from "../../../core/utils/NumberFormatting.es.js";
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 R from "../../components/ComponentBlocks/StatusIndicator.es.js";
5
- import n from "@mui/material/Stack";
6
- import { Text as i } from "@mxenabled/mxui";
7
- import { jsx as r, jsxs as e } from "react/jsx-runtime";
8
- import p from "@mui/material/Box";
9
- import S from "@mui/material/Alert";
10
- var E = ({ budgetsCopy: c, copy: d, daysLeft: m, icon: _, limit: l, showPeriodLine: u = !0, spent: a }) => {
11
- const s = v(a, l), x = y(s), f = C(x), b = m === void 0 ? /* @__PURE__ */ r(S, {
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(i, {
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 l <= 0 ? /* @__PURE__ */ e(n, {
19
+ return a <= 0 ? /* @__PURE__ */ n(i, {
20
20
  sx: { gap: 16 },
21
- children: [/* @__PURE__ */ e(n, {
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(p, { children: _ }), /* @__PURE__ */ e(n, { children: [/* @__PURE__ */ r(i, {
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(i, {
31
+ }), /* @__PURE__ */ r(o, {
32
32
  bold: !0,
33
33
  component: "p",
34
34
  variant: "h2",
35
- children: o(a, t.cents)
35
+ children: t(l, e.cents)
36
36
  })] })]
37
- }), u && b]
38
- }) : /* @__PURE__ */ e(n, {
37
+ }), h && u]
38
+ }) : /* @__PURE__ */ n(i, {
39
39
  sx: { gap: 16 },
40
- children: [/* @__PURE__ */ r(p, {
41
- "aria-label": h(d.total_out_of_limit_aria, o(a, t.cents), o(l, t.cents)),
42
- "data-tier": x ?? "none",
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(R, {
45
- amount: /* @__PURE__ */ e(n, {
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(i, {
51
+ children: [/* @__PURE__ */ r(o, {
52
52
  bold: !0,
53
53
  component: "p",
54
54
  variant: "h2",
55
- children: o(a, t.cents)
56
- }), /* @__PURE__ */ e(i, {
55
+ children: t(l, e.cents)
56
+ }), /* @__PURE__ */ n(o, {
57
57
  color: "text.secondary",
58
58
  variant: "body2",
59
- children: ["/ ", o(l, t.cents)]
59
+ children: ["/ ", t(a, e.cents)]
60
60
  })]
61
61
  }),
62
- borderRadius: "8px",
63
- completeColor: f,
62
+ completeColor: b,
64
63
  icon: _,
65
- label: /* @__PURE__ */ e(n, {
66
- sx: {
67
- alignItems: "center",
68
- flexDirection: "row",
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
- leftLabel: h(c.percent_spent, String(s)),
69
+ labelVariant: "body2",
70
+ leftLabel: p(c.percent_spent, String(s)),
83
71
  percentComplete: Math.min(100, s),
84
- rightLabel: h(c.balance_left, o(Math.max(0, l - a), t.cents)),
72
+ rightLabel: p(c.balance_left, t(Math.max(0, a - l), e.cents)),
85
73
  sx: { p: 0 }
86
74
  })
87
- }), u && b]
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 borderRadius=\"8px\"\n completeColor={color}\n icon={icon}\n label={\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 6 }}>\n <Box sx={{ bgcolor: color, borderRadius: '50%', height: 8, width: 8 }} />\n <Text color=\"text.secondary\" variant=\"body2\">\n {budgetsCopy.spent_label}\n </Text>\n </Stack>\n }\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), CURREN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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"}
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,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D;AAAA,QACE,QACE,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,YAAY;AAAA,YAAY,eAAe;AAAA,YAAO,KAAK;AAAA,UAAE;AAAA,UAAlE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,WAAU;AAAA,YAAI,SAAQ;AAAA,YACrC,UAAA,EAAe,GAAO,EAAgB,KAAK;AAAA,UACxC,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAiB,SAAQ;AAAA,YAArC,UAAA,CAA6C,MACxC,EAAe,GAAO,EAAgB,KAAK,CAC1C;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"}
@@ -1,11 +1,11 @@
1
- import { slot as s } from "../../../../core/types/Insights.es.js";
1
+ import { slot as a } from "../../../../core/types/Insights.es.js";
2
2
  import { CURRENCY_FORMAT as T, formatCurrency as k } from "../../../../core/utils/NumberFormatting.es.js";
3
3
  import { resolveVariantConfig as j } from "../../resolveVariantConfig.es.js";
4
4
  import { asLogoRef as I, asNumber as N, asText as x } from "../../slotReaders.es.js";
5
- import { useContainerDimensions as P } from "../../../hooks/useContainerDimensions.es.js";
6
- import E from "../../../components/LogoFromGuid.es.js";
7
- import { Confetti as O } from "../../../components/shared/Confetti.es.js";
8
- import { ReactComponent as W } from "../../../components/shared/images/PaidOffCard.es.js";
5
+ import { useContainerDimensions as O } from "../../../hooks/useContainerDimensions.es.js";
6
+ import P from "../../../components/LogoFromGuid.es.js";
7
+ import { Confetti as W } from "../../../components/shared/Confetti.es.js";
8
+ import { ReactComponent as E } from "../../../components/shared/images/PaidOffCard.es.js";
9
9
  import { ReactComponent as G } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
10
10
  import { statusIconName as H } from "../../../components/statusIcon.es.js";
11
11
  import { isDetailedAccountVariant as K } from "../DetailedAccountBlock/layout.es.js";
@@ -14,26 +14,26 @@ import { HeaderComponent as U } from "./HeaderComponent.es.js";
14
14
  import { getLayoutConfig as Y } from "./layout.es.js";
15
15
  import { IconComponent as q } from "./IconComponent.es.js";
16
16
  import { useRef as J } from "react";
17
- import t from "@mui/material/Stack";
17
+ import r from "@mui/material/Stack";
18
18
  import { Text as l } from "@mxenabled/mxui";
19
19
  import { Icon as S } from "@mxenabled/mx-icons";
20
- import { jsx as o, jsxs as r } from "react/jsx-runtime";
20
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
21
21
  import { useTheme as Q } from "@mui/material/styles";
22
- import a from "@mui/material/Box";
22
+ import s from "@mui/material/Box";
23
23
  var vo = ({ payload: g }) => {
24
- const h = Q(), b = J(null), { height: w, width: R } = P(b), { instance_slot: n } = g, { variant: p, institution_guid: z, institution_name: D, icon_name: A, merchant_name: L } = n;
24
+ const h = Q(), b = J(null), { height: w, width: R } = O(b), { instance_slot: n } = g, { variant: p, institution_guid: z, institution_name: D, icon_name: L, merchant_name: A } = n;
25
25
  if (K(p)) return /* @__PURE__ */ o(M, { payload: g });
26
- const { data: i } = n, m = i !== void 0, u = m ? N(s(i, "amount")) : n.amount, v = x(s(i, "sub_text")), y = m ? v : n.sub_text, V = m ? v : n.label, c = m ? x(s(i, "header_text")) : n.header_text, d = I(s(i, "logo")) ?? I(s(i, "icon")), e = j(Y(h), p, "default", "AccountBlock");
26
+ const { data: i } = n, m = i !== void 0, u = m ? N(a(i, "amount")) : n.amount, v = x(a(i, "sub_text")), y = m ? v : n.sub_text, V = m ? v : n.label, c = m ? x(a(i, "header_text")) : n.header_text, d = I(a(i, "logo")) ?? I(a(i, "icon")), e = j(Y(h), p, "default", "AccountBlock");
27
27
  if (e?.isConfetti) {
28
28
  const f = H(d?.guid), B = {
29
- paidOffCard: /* @__PURE__ */ o(a, {
29
+ paidOffCard: /* @__PURE__ */ o(s, {
30
30
  sx: {
31
31
  flexShrink: 0,
32
32
  height: 32,
33
33
  position: "relative",
34
34
  width: 48
35
35
  },
36
- children: /* @__PURE__ */ o(W, {
36
+ children: /* @__PURE__ */ o(E, {
37
37
  "aria-hidden": !0,
38
38
  role: "presentation",
39
39
  style: {
@@ -49,7 +49,7 @@ var vo = ({ payload: g }) => {
49
49
  role: "presentation",
50
50
  width: 55
51
51
  }),
52
- logo: /* @__PURE__ */ o(a, {
52
+ logo: /* @__PURE__ */ o(s, {
53
53
  sx: {
54
54
  borderRadius: "4px",
55
55
  flexShrink: 0,
@@ -57,7 +57,7 @@ var vo = ({ payload: g }) => {
57
57
  overflow: "hidden",
58
58
  width: 48
59
59
  },
60
- children: f ? /* @__PURE__ */ o(t, {
60
+ children: f ? /* @__PURE__ */ o(r, {
61
61
  "data-icon": f,
62
62
  sx: {
63
63
  alignItems: "center",
@@ -72,13 +72,14 @@ var vo = ({ payload: g }) => {
72
72
  size: e.logo_icon_size ?? 24,
73
73
  sx: { color: "success.contrastText" }
74
74
  })
75
- }) : d?.guid ? /* @__PURE__ */ o(E, {
75
+ }) : d?.guid ? /* @__PURE__ */ o(P, {
76
76
  logo: d,
77
77
  size: 48
78
78
  }) : null
79
79
  })
80
- }[e.graphic ?? "logo"], F = x(s(i, "secondary_text")) || (L ?? D), C = e.secondarySource === "merchant" ? F : V, _ = C ? /* @__PURE__ */ o(l, {
80
+ }[e.graphic ?? "logo"], F = x(a(i, "secondary_text")) || (A ?? D), C = e.secondarySource === "merchant" ? F : V, _ = C ? /* @__PURE__ */ o(l, {
81
81
  color: e.secondaryColor,
82
+ noWrap: e.secondaryOneLine,
82
83
  variant: e.secondaryVariant,
83
84
  children: C
84
85
  }) : null, $ = u != null ? /* @__PURE__ */ o(l, {
@@ -87,7 +88,7 @@ var vo = ({ payload: g }) => {
87
88
  variant: e.amountVariant,
88
89
  children: `${e.amountPrefix ?? ""}${k(u, T.cents)}`
89
90
  }) : null;
90
- return /* @__PURE__ */ r(a, {
91
+ return /* @__PURE__ */ t(s, {
91
92
  ref: b,
92
93
  sx: {
93
94
  backgroundImage: e.gradient,
@@ -97,19 +98,19 @@ var vo = ({ payload: g }) => {
97
98
  p: 16,
98
99
  width: "100%"
99
100
  },
100
- children: [/* @__PURE__ */ o(a, {
101
+ children: [/* @__PURE__ */ o(s, {
101
102
  sx: {
102
103
  inset: 0,
103
104
  pointerEvents: "none",
104
105
  position: "absolute",
105
106
  zIndex: 1
106
107
  },
107
- children: /* @__PURE__ */ o(O, {
108
+ children: /* @__PURE__ */ o(W, {
108
109
  height: w,
109
110
  shouldRun: w > 0 && R > 0,
110
111
  width: R
111
112
  })
112
- }), /* @__PURE__ */ r(t, {
113
+ }), /* @__PURE__ */ t(r, {
113
114
  sx: {
114
115
  borderRadius: "8px",
115
116
  ...e.cardShadow && { boxShadow: h.shadows[1] },
@@ -118,7 +119,7 @@ var vo = ({ payload: g }) => {
118
119
  width: "100%",
119
120
  zIndex: 2
120
121
  },
121
- children: [e.categoryStrip && c && /* @__PURE__ */ o(a, {
122
+ children: [e.categoryStrip && c && /* @__PURE__ */ o(s, {
122
123
  sx: {
123
124
  bgcolor: "success.main",
124
125
  px: 12,
@@ -129,7 +130,7 @@ var vo = ({ payload: g }) => {
129
130
  variant: "caption",
130
131
  children: c
131
132
  })
132
- }), /* @__PURE__ */ r(t, {
133
+ }), /* @__PURE__ */ t(r, {
133
134
  sx: {
134
135
  alignItems: "center",
135
136
  bgcolor: "success.lighter",
@@ -144,13 +145,13 @@ var vo = ({ payload: g }) => {
144
145
  flexDirection: "row",
145
146
  ...e.rowSx
146
147
  },
147
- children: [/* @__PURE__ */ o(a, {
148
+ children: [/* @__PURE__ */ o(s, {
148
149
  sx: {
149
150
  display: "flex",
150
151
  flexShrink: 0
151
152
  },
152
153
  children: B
153
- }), /* @__PURE__ */ r(t, {
154
+ }), /* @__PURE__ */ t(r, {
154
155
  sx: {
155
156
  flex: "1 0 0",
156
157
  minWidth: 0
@@ -165,18 +166,18 @@ var vo = ({ payload: g }) => {
165
166
  })]
166
167
  });
167
168
  }
168
- return /* @__PURE__ */ o(t, {
169
+ return /* @__PURE__ */ o(r, {
169
170
  sx: {
170
171
  background: e.background,
171
172
  p: 16
172
173
  },
173
- children: /* @__PURE__ */ r(t, {
174
+ children: /* @__PURE__ */ t(r, {
174
175
  sx: {
175
176
  borderRadius: "8px",
176
177
  boxShadow: h.shadows[1],
177
178
  width: "100%"
178
179
  },
179
- children: [c && /* @__PURE__ */ o(U, { headerText: c }), /* @__PURE__ */ r(t, {
180
+ children: [c && /* @__PURE__ */ o(U, { headerText: c }), /* @__PURE__ */ t(r, {
180
181
  sx: {
181
182
  alignItems: "center",
182
183
  bgcolor: "background.paper",
@@ -188,16 +189,16 @@ var vo = ({ payload: g }) => {
188
189
  borderTopLeftRadius: "0",
189
190
  borderTopRightRadius: "0"
190
191
  },
191
- ...(z || A || d?.guid) && { flexDirection: "row" }
192
+ ...(z || L || d?.guid) && { flexDirection: "row" }
192
193
  },
193
194
  children: [/* @__PURE__ */ o(q, {
194
195
  logo: d,
195
196
  slot: n,
196
197
  variant: p
197
- }), /* @__PURE__ */ r(t, { children: [u != null && /* @__PURE__ */ o(l, {
198
+ }), /* @__PURE__ */ t(r, { children: [u != null && /* @__PURE__ */ o(l, {
198
199
  variant: "h2",
199
200
  children: k(u, T.cents)
200
- }), /* @__PURE__ */ r(t, {
201
+ }), /* @__PURE__ */ t(r, {
201
202
  sx: {
202
203
  gap: 8,
203
204
  flexDirection: "row",
@@ -1 +1 @@
1
- {"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload } from '../../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asNumber, asText } from '../../slotReaders'\nimport { DetailedAccountBlock, isDetailedAccountVariant } from '../DetailedAccountBlock'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const { variant, institution_guid, institution_name, icon_name, merchant_name } = instance_slot\n\n if (isDetailedAccountVariant(variant)) return <DetailedAccountBlock payload={payload} />\n\n // V1 beats send no `data`. V2 reads only `data` (no `slotOrFlat`): its stale flat fields must never show.\n const { data } = instance_slot\n const v2 = data !== undefined\n const amount = v2 ? asNumber(slot(data, 'amount')) : instance_slot.amount\n // One V2 slot; V1 named it `sub_text` on the standard tile and `label` on the confetti one.\n const v2SubText = asText(slot(data, 'sub_text'))\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const header_text = v2 ? asText(slot(data, 'header_text')) : instance_slot.header_text\n // `icon` carries the tile glyph when the beat's `logo` is kept for its compact card (charges_summary).\n const logo = asLogoRef(slot(data, 'logo')) ?? asLogoRef(slot(data, 'icon'))\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // The 58x46 SVG's card sits 14px down (its check badge overflows top-right); box it to the\n // 48x32 frame so it lines up with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 48 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={layoutConfig.logo_icon_size ?? 24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // The payer: V2's `secondary_text`, else the merchant, else the institution.\n const payer = asText(slot(data, 'secondary_text')) || (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text\n bold={!layoutConfig.amountKeepsVariantWeight}\n color=\"success.dark\"\n variant={layoutConfig.amountVariant}\n >\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, CURRENCY_FORMAT.cents)}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n ...(layoutConfig.cardShadow && { boxShadow: theme.shadows[1] }),\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n // Figma's standard tile: 16px on every side, 80px tall in the 112px slot.\n p: 16,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && (\n <Text variant=\"h2\">{formatCurrency(amount, CURRENCY_FORMAT.cents)}</Text>\n )}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,SAAA,GAAS,kBAAA,GAAkB,kBAAA,GAAkB,WAAA,GAAW,eAAA,EAAA,IAAkB;AAElF,MAAI,EAAyB,CAAO,EAAG,QAAO,gBAAA,EAAC,GAAD,EAA+B,SAAA,EAAU,C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,SAAQ;AAAA,YAClC,UAAA;AAAA,UACG,CAAA,CAEH;AAAA,QACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
1
+ {"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload } from '../../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asNumber, asText } from '../../slotReaders'\nimport { DetailedAccountBlock, isDetailedAccountVariant } from '../DetailedAccountBlock'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const { variant, institution_guid, institution_name, icon_name, merchant_name } = instance_slot\n\n if (isDetailedAccountVariant(variant)) return <DetailedAccountBlock payload={payload} />\n\n // V1 beats send no `data`. V2 reads only `data` (no `slotOrFlat`): its stale flat fields must never show.\n const { data } = instance_slot\n const v2 = data !== undefined\n const amount = v2 ? asNumber(slot(data, 'amount')) : instance_slot.amount\n // One V2 slot; V1 named it `sub_text` on the standard tile and `label` on the confetti one.\n const v2SubText = asText(slot(data, 'sub_text'))\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const header_text = v2 ? asText(slot(data, 'header_text')) : instance_slot.header_text\n // `icon` carries the tile glyph when the beat's `logo` is kept for its compact card (charges_summary).\n const logo = asLogoRef(slot(data, 'logo')) ?? asLogoRef(slot(data, 'icon'))\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // The 58x46 SVG's card sits 14px down (its check badge overflows top-right); box it to the\n // 48x32 frame so it lines up with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 48 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={layoutConfig.logo_icon_size ?? 24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // The payer: V2's `secondary_text`, else the merchant, else the institution.\n const payer = asText(slot(data, 'secondary_text')) || (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text\n color={layoutConfig.secondaryColor}\n noWrap={layoutConfig.secondaryOneLine}\n variant={layoutConfig.secondaryVariant}\n >\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text\n bold={!layoutConfig.amountKeepsVariantWeight}\n color=\"success.dark\"\n variant={layoutConfig.amountVariant}\n >\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, CURRENCY_FORMAT.cents)}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n ...(layoutConfig.cardShadow && { boxShadow: theme.shadows[1] }),\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n // Figma's standard tile: 16px on every side, 80px tall in the 112px slot.\n p: 16,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && (\n <Text variant=\"h2\">{formatCurrency(amount, CURRENCY_FORMAT.cents)}</Text>\n )}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,SAAA,GAAS,kBAAA,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YAAM,OAAM;AAAA,YAAU,MAAM;AAAA,YAAM,MAAM,EAAa;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA,GAE3E,KACC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAiB,SAAQ;AAAA,YAClC,UAAA;AAAA,UACG,CAAA,CAEH;AAAA,QACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
@@ -21,7 +21,7 @@ export interface BlockLayoutConfig {
21
21
  gradient?: string;
22
22
  /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */
23
23
  graphic?: 'paidOffCard' | 'savings' | 'logo';
24
- /** Amount typography variant — `h2` for milestones, `h3` for deposits. */
24
+ /** Amount typography variant. */
25
25
  amountVariant?: 'h2' | 'h3';
26
26
  /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */
27
27
  amountPrefix?: string;
@@ -41,6 +41,8 @@ export interface BlockLayoutConfig {
41
41
  secondaryVariant?: 'body2' | 'caption';
42
42
  /** Theme color path for the secondary line. */
43
43
  secondaryColor?: string;
44
+ /** Truncate the secondary line to one line with an ellipsis. */
45
+ secondaryOneLine?: boolean;
44
46
  }
45
47
  /** Glyph size in px on the standard icon tile (IconComponent). */
46
48
  export declare const TILE_ICON_SIZE = 30;
@@ -1,7 +1,7 @@
1
- import { CELEBRATION_GRADIENT as o, ERROR_WASH_GRADIENT as e, FEES_WASH_GRADIENT as n, WARM_LIME_ACCENT_GRADIENT as r } from "../../../components/celebrationGradients.es.js";
2
- var a = { background: e }, c = (t) => ({
1
+ import { CELEBRATION_GRADIENT as o, DIRECT_DEPOSIT_COMPLETE_GRADIENT as t, ERROR_WASH_GRADIENT as r, FEES_WASH_GRADIENT as n, WARM_LIME_ACCENT_GRADIENT as i } from "../../../components/celebrationGradients.es.js";
2
+ var a = { background: r }, s = (e) => ({
3
3
  overdraft_warning: {
4
- background: t.palette.warning.light,
4
+ background: e.palette.warning.light,
5
5
  sub_logo: "error"
6
6
  },
7
7
  low_balance_alert: a,
@@ -14,7 +14,7 @@ var a = { background: e }, c = (t) => ({
14
14
  logo_bGcolor: "error.main",
15
15
  logo_border_radius: "4px",
16
16
  logo_icon_size: 24,
17
- background: e
17
+ background: r
18
18
  },
19
19
  charges_summary: {
20
20
  category_tint: 0.25,
@@ -22,9 +22,10 @@ var a = { background: e }, c = (t) => ({
22
22
  },
23
23
  deposit_received: {
24
24
  isConfetti: !0,
25
- gradient: r,
25
+ gradient: t,
26
26
  graphic: "logo",
27
27
  amountVariant: "h2",
28
+ amountKeepsVariantWeight: !0,
28
29
  amountPrefix: "+",
29
30
  categoryStrip: !0,
30
31
  cardShadow: !0,
@@ -34,12 +35,13 @@ var a = { background: e }, c = (t) => ({
34
35
  },
35
36
  secondarySource: "merchant",
36
37
  secondaryPosition: "below",
37
- secondaryVariant: "body2",
38
- secondaryColor: "text.primary"
38
+ secondaryVariant: "caption",
39
+ secondaryColor: "text.secondary",
40
+ secondaryOneLine: !0
39
41
  },
40
42
  status_on_track: {
41
43
  isConfetti: !0,
42
- gradient: r,
44
+ gradient: i,
43
45
  graphic: "logo",
44
46
  amountVariant: "h2",
45
47
  amountKeepsVariantWeight: !0,
@@ -84,7 +86,7 @@ var a = { background: e }, c = (t) => ({
84
86
  default: {}
85
87
  });
86
88
  export {
87
- c as getLayoutConfig
89
+ s as getLayoutConfig
88
90
  };
89
91
 
90
92
  //# sourceMappingURL=layout.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n ERROR_WASH_GRADIENT,\n FEES_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n /** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */\n category_tint?: number\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** Glyph size in px for an `ICO-` logo: on the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\n logo_icon_size?: number\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Keep the variant's own weight (h2 is 700) instead of the confetti tile's semi bold. */\n amountKeepsVariantWeight?: boolean\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n}\n\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background: ERROR_WASH_GRADIENT,\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n // Monthly Credit Card Interest Summary's fees tile (ditto account_block `charges_summary`); its category\n // glyph rides in `icon`.\n charges_summary: {\n category_tint: 0.25,\n background: FEES_WASH_GRADIENT,\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n // Figma: the hero amount is h2 (23px), consistent with the other confetti tiles. Design sign-off:\n // https://mxenabled.slack.com/archives/C0C0F6V8TAQ/p1793864013010539\n amountVariant: 'h2',\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 16, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";AA0DA,IAAM,IAAsC,EAC1C,YAAY,EACd,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAAA,EACZ;AAAA,EACA,mBAAmB;AAAA,EAEnB,aAAa;AAAA,IAAE,GAAG;AAAA,IAAkB,OAAO;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IAEpB,gBAAgB;AAAA,IAChB,YAAY;AAAA,EACd;AAAA,EAGA,iBAAiB;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EAGA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IAGT,eAAe;AAAA,IACf,cAAc;AAAA,IACd,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IACjC,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n ERROR_WASH_GRADIENT,\n FEES_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n /** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */\n category_tint?: number\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** Glyph size in px for an `ICO-` logo: on the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\n logo_icon_size?: number\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Keep the variant's own weight (h2 is 700) instead of the confetti tile's semi bold. */\n amountKeepsVariantWeight?: boolean\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n /** Truncate the secondary line to one line with an ellipsis. */\n secondaryOneLine?: boolean\n}\n\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background: ERROR_WASH_GRADIENT,\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n // Monthly Credit Card Interest Summary's fees tile (ditto account_block `charges_summary`); its category\n // glyph rides in `icon`.\n charges_summary: {\n category_tint: 0.25,\n background: FEES_WASH_GRADIENT,\n },\n // Unified Deposit and its standalone deposit templates; Figma draws every state alike.\n deposit_received: {\n isConfetti: true,\n gradient: DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n secondaryOneLine: true,\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 16, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";AA6DA,IAAM,IAAsC,EAC1C,YAAY,EACd,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAAA,EACZ;AAAA,EACA,mBAAmB;AAAA,EAEnB,aAAa;AAAA,IAAE,GAAG;AAAA,IAAkB,OAAO;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IAEpB,gBAAgB;AAAA,IAChB,YAAY;AAAA,EACd;AAAA,EAGA,iBAAiB;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EAEA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,cAAc;AAAA,IACd,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IACjC,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
@@ -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: 44,
12
+ size: 48,
13
13
  tint: 0.25
14
14
  }) : /* @__PURE__ */ a(C, {
15
15
  logo: { merchant_guid: s },
16
- size: 44
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: "12px",
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={44} tint={0.25} />\n ) : (\n <LogoMark logo={{ merchant_guid }} size={44} />\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 borderRadius=\"12px\"\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,IACR,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"}
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 f, P as g, Text as c } from "@mxenabled/mxui";
3
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
4
- import s from "@mui/material/Box";
5
- var I = ({ amount: i, borderRadius: o = "2px", completeColor: a = "success.main", icon: l, label: n, leftLabel: x, percentComplete: d = 0, rightLabel: p, sx: h }) => /* @__PURE__ */ t(r, {
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
- ...h
12
+ ...f
13
13
  },
14
- children: [/* @__PURE__ */ t(r, {
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__ */ e(s, { children: l }), /* @__PURE__ */ t(r, { children: [typeof n == "string" ? /* @__PURE__ */ e(g, {
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 i == "string" ? /* @__PURE__ */ e(f, { children: i }) : i] })]
24
- }), /* @__PURE__ */ t(r, {
23
+ }) : n, typeof e == "string" ? /* @__PURE__ */ t(g, { children: e }) : e] })]
24
+ }), /* @__PURE__ */ i(r, {
25
25
  sx: { gap: 4 },
26
- children: [/* @__PURE__ */ e(r, {
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: 16,
32
+ height: 12,
32
33
  width: "100%"
33
34
  },
34
- children: /* @__PURE__ */ e(s, { sx: {
35
- alignItems: "center",
36
- display: "flex",
37
- py: 2,
38
- px: 12,
39
- bgcolor: a,
40
- borderRadius: o,
41
- height: 16,
42
- width: `${d}%`
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__ */ e(c, {
49
+ children: [/* @__PURE__ */ t(c, {
50
50
  sx: { color: "text.secondary" },
51
- variant: "caption",
52
- children: x
53
- }), /* @__PURE__ */ e(c, {
51
+ variant: s,
52
+ children: l
53
+ }), /* @__PURE__ */ t(c, {
54
54
  sx: { color: "text.secondary" },
55
- variant: "caption",
55
+ variant: s,
56
56
  children: p
57
57
  })]
58
58
  })]
59
59
  })]
60
60
  });
61
61
  export {
62
- I as default
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: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n py: 2,\n px: 12,\n bgcolor: completeColor,\n borderRadius,\n height: 16,\n width: `${percentComplete}%`,\n }}\n />\n </Stack>\n\n <Stack sx={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {leftLabel}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {rightLabel}\n </Text>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default StatusIndicator\n"],"mappings":";;;;AAkBA,IAAM,IAAA,CAAmB,EACvB,QAAA,GACA,cAAA,IAAe,OACf,eAAA,IAAgB,gBAChB,MAAA,GACA,OAAA,GACA,WAAA,GACA,iBAAA,IAAkB,GAClB,YAAA,GACA,IAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EAAO,WAAU;AAAA,EAAoB,IAAI;AAAA,IAAE,IAAI;AAA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,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QAAM,IAAI,EAAE,OAAO,iBAAiB;AAAA,QAAG,SAAQ;AAAA,QAC5C,UAAA;AAAA,MACG,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA,EACF,CAAA,CAAA"}
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,gBAAA,EAAC,GAAD,EAAA,UAAM,EAAU,CAAA,GAChB,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,OAAO,KAAU,WAChB,gBAAA,EAAC,GAAD;AAAA,MAAG,yBAAyB,EAAE,QAAQ,EAAM;AAAA,MAAG,SAAS;AAAA,IAAU,CAAA,IAElE,GAED,OAAO,KAAW,WAAW,gBAAA,EAAC,GAAD,EAAA,UAAK,EAAW,CAAA,IAAI,CAC7C,EAAA,CAAA,CACF;AAAA,EACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,KAAK,EAAE;AAAA,IAApB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,eAAY;AAAA,MACZ,IAAI;AAAA,QACF,SAAS;AAAA,QACT,cAAA;AAAA,QACA,eAAe;AAAA,QACf,QAAQ;AAAA,QACR,OAAO;AAAA,MACT;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,eAAY;AAAA,QACZ,IAAI;AAAA,UACF,SAAS;AAAA,UACT,cAAA;AAAA,UACA,QAAQ;AAAA,UACR,OAAO,GAAG,CAAA;AAAA,QACZ;AAAA,MACD,CAAA;AAAA,IACI,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,eAAe;AAAA,QAAO,gBAAgB;AAAA,MAAgB;AAAA,MAAnE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAM,IAAI,EAAE,OAAO,iBAAiB;AAAA,QAAG,SAAS;AAAA,QAC7C,UAAA;AAAA,MACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QAAM,IAAI,EAAE,OAAO,iBAAiB;AAAA,QAAG,SAAS;AAAA,QAC7C,UAAA;AAAA,MACG,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA,EACF,CAAA,CAAA"}
@@ -4,8 +4,8 @@ import { Theme } from '@mui/material/styles';
4
4
  * one source holds each gradient. The 20%–25% washes layer over `background.paper` via
5
5
  * `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` and the tile gradients are opaque and stand alone.
6
6
  *
7
- * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and deposit celebration states.
8
- * - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile.
7
+ * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and on-track states.
8
+ * - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile and the deposit tile.
9
9
  * - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.
10
10
  * - celebrateGradient(angle): Figma's Celebrate Gradient at any angle.
11
11
  * - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).
@@ -16,11 +16,12 @@ import { Theme } from '@mui/material/styles';
16
16
  */
17
17
  /**
18
18
  * Warm → lime accent wash at 20% opacity. Used as a tinted background behind
19
- * merchant categorization highlights and deposit celebration callouts.
19
+ * merchant categorization highlights and on-track states.
20
20
  */
21
21
  export declare const WARM_LIME_ACCENT_GRADIENT = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)";
22
22
  /**
23
- * Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit).
23
+ * Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit) and
24
+ * the deposit tile (Unified Deposit).
24
25
  * Figma gives it its own angle and stops, so it does not reuse WARM_LIME_ACCENT_GRADIENT.
25
26
  */
26
27
  export declare const DIRECT_DEPOSIT_COMPLETE_GRADIENT = "linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)";
@@ -1 +1 @@
1
- {"version":3,"file":"celebrationGradients.es.js","names":[],"sources":["../../../src/insights-v2/components/celebrationGradients.ts"],"sourcesContent":["import { alpha, type Theme } from '@mui/material/styles'\n\n/**\n * Decorative slot washes shared by the block layouts and the presentational components, so\n * one source holds each gradient. The 20%–25% washes layer over `background.paper` via\n * `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` and the tile gradients are opaque and stand alone.\n *\n * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and deposit celebration states.\n * - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile.\n * - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.\n * - celebrateGradient(angle): Figma's Celebrate Gradient at any angle.\n * - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).\n * - ERROR_WASH_GRADIENT: low balance, off-track status.\n * - FEES_WASH_GRADIENT: fees and interest charges.\n * - PRIMARY_TILE_GRADIENTS / SUCCESS_TILE_GRADIENTS: blue and green tiles, per theme mode.\n * - getPrimaryWashGradient(theme, angle?): pending connect / detected subscription, from the palette.\n */\n\n/**\n * Warm → lime accent wash at 20% opacity. Used as a tinted background behind\n * merchant categorization highlights and deposit celebration callouts.\n */\nexport const WARM_LIME_ACCENT_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)'\n\n/**\n * Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit).\n * Figma gives it its own angle and stops, so it does not reuse WARM_LIME_ACCENT_GRADIENT.\n */\nexport const DIRECT_DEPOSIT_COMPLETE_GRADIENT =\n 'linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)'\n\n/** Warm → pink wash behind balance/savings milestones. */\nexport const CELEBRATION_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)'\n\n/** Figma Celebrate Gradient; its angle varies per slot. */\nexport const celebrateGradient = (angleDeg: number) =>\n `linear-gradient(${angleDeg}deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)`\n\n/** Peach → pink gradient for Discovered Accounts success state. */\nexport const DISCOVERED_ACCOUNTS_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 224, 153, 1) 1.86%, rgba(255, 129, 230, 1) 101.54%)'\n\n/**\n * Warm → pink wash at 20% opacity for the account-connected success state.\n * Layer over `background.paper` (the Figma spec's `#FFF` base), not the\n * `background` shorthand — a 20% gradient over transparency renders wrong.\n */\nexport const ACCOUNT_CONNECTED_GRADIENT = celebrateGradient(200.73)\n\n/**\n * Orange → red-orange wash at 25% opacity behind a flagged charge (Unexpected Subscription\n * Payment). Figma \"Warning Gradient 1\": a bespoke two-stop blend with no palette token, so it\n * stays a literal like the other washes here rather than being derived from `palette.warning`.\n */\nexport const WARNING_WASH_GRADIENT =\n 'linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)'\n\n/** Red wash at 20%: low balance, off-track status. */\nexport const ERROR_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)'\n\n/** Red → orange wash at 20%: fees and interest charges. */\nexport const FEES_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)'\n\n/** Blue tile, per theme mode (Missing Interest Rate before the rate is added). */\nexport const PRIMARY_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)',\n dark: 'linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)',\n} as const\n\n/** Green tile, per theme mode (Missing Interest Rate once the rate is added). */\nexport const SUCCESS_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #94C9B7 0%, #12875E 100%)',\n dark: 'linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)',\n} as const\n\n/**\n * Blue slot wash behind a pending connect / detected-subscription row: `primary.light` →\n * `primary.main` at 75% over paper, built from the live palette so it follows the theme. Figma's\n * angle follows the slot's shape, so a slot passes its own.\n */\nexport const getPrimaryWashGradient = ({ palette }: Theme, angleDeg = 173) =>\n `linear-gradient(${angleDeg}deg, ${alpha(palette.primary.light, 0.75)} 46.41%, ${alpha(palette.primary.main, 0.75)} 78.14%)`\n"],"mappings":";AAsBA,IAAa,IACX,+FAMW,IACX,4FAGW,IACX,gGAGW,IAAA,CAAqB,MAChC,mBAAmB,CAAA,0EAWR,IAA6B,EAAkB,MAAM,GAOrD,IACX,0FAGW,IACX,2FAGW,IACX,4FAGW,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAGa,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAOa,IAAA,CAA0B,EAAE,SAAA,EAAA,GAAkB,IAAW,QACpE,mBAAmB,CAAA,QAAgB,EAAM,EAAQ,QAAQ,OAAO,IAAI,CAAA,YAAa,EAAM,EAAQ,QAAQ,MAAM,IAAI,CAAA"}
1
+ {"version":3,"file":"celebrationGradients.es.js","names":[],"sources":["../../../src/insights-v2/components/celebrationGradients.ts"],"sourcesContent":["import { alpha, type Theme } from '@mui/material/styles'\n\n/**\n * Decorative slot washes shared by the block layouts and the presentational components, so\n * one source holds each gradient. The 20%–25% washes layer over `background.paper` via\n * `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` and the tile gradients are opaque and stand alone.\n *\n * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and on-track states.\n * - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile and the deposit tile.\n * - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.\n * - celebrateGradient(angle): Figma's Celebrate Gradient at any angle.\n * - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).\n * - ERROR_WASH_GRADIENT: low balance, off-track status.\n * - FEES_WASH_GRADIENT: fees and interest charges.\n * - PRIMARY_TILE_GRADIENTS / SUCCESS_TILE_GRADIENTS: blue and green tiles, per theme mode.\n * - getPrimaryWashGradient(theme, angle?): pending connect / detected subscription, from the palette.\n */\n\n/**\n * Warm → lime accent wash at 20% opacity. Used as a tinted background behind\n * merchant categorization highlights and on-track states.\n */\nexport const WARM_LIME_ACCENT_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)'\n\n/**\n * Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit) and\n * the deposit tile (Unified Deposit).\n * Figma gives it its own angle and stops, so it does not reuse WARM_LIME_ACCENT_GRADIENT.\n */\nexport const DIRECT_DEPOSIT_COMPLETE_GRADIENT =\n 'linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)'\n\n/** Warm → pink wash behind balance/savings milestones. */\nexport const CELEBRATION_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)'\n\n/** Figma Celebrate Gradient; its angle varies per slot. */\nexport const celebrateGradient = (angleDeg: number) =>\n `linear-gradient(${angleDeg}deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)`\n\n/** Peach → pink gradient for Discovered Accounts success state. */\nexport const DISCOVERED_ACCOUNTS_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 224, 153, 1) 1.86%, rgba(255, 129, 230, 1) 101.54%)'\n\n/**\n * Warm → pink wash at 20% opacity for the account-connected success state.\n * Layer over `background.paper` (the Figma spec's `#FFF` base), not the\n * `background` shorthand — a 20% gradient over transparency renders wrong.\n */\nexport const ACCOUNT_CONNECTED_GRADIENT = celebrateGradient(200.73)\n\n/**\n * Orange → red-orange wash at 25% opacity behind a flagged charge (Unexpected Subscription\n * Payment). Figma \"Warning Gradient 1\": a bespoke two-stop blend with no palette token, so it\n * stays a literal like the other washes here rather than being derived from `palette.warning`.\n */\nexport const WARNING_WASH_GRADIENT =\n 'linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)'\n\n/** Red wash at 20%: low balance, off-track status. */\nexport const ERROR_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)'\n\n/** Red → orange wash at 20%: fees and interest charges. */\nexport const FEES_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)'\n\n/** Blue tile, per theme mode (Missing Interest Rate before the rate is added). */\nexport const PRIMARY_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)',\n dark: 'linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)',\n} as const\n\n/** Green tile, per theme mode (Missing Interest Rate once the rate is added). */\nexport const SUCCESS_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #94C9B7 0%, #12875E 100%)',\n dark: 'linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)',\n} as const\n\n/**\n * Blue slot wash behind a pending connect / detected-subscription row: `primary.light` →\n * `primary.main` at 75% over paper, built from the live palette so it follows the theme. Figma's\n * angle follows the slot's shape, so a slot passes its own.\n */\nexport const getPrimaryWashGradient = ({ palette }: Theme, angleDeg = 173) =>\n `linear-gradient(${angleDeg}deg, ${alpha(palette.primary.light, 0.75)} 46.41%, ${alpha(palette.primary.main, 0.75)} 78.14%)`\n"],"mappings":";AAsBA,IAAa,IACX,+FAOW,IACX,4FAGW,IACX,gGAGW,IAAA,CAAqB,MAChC,mBAAmB,CAAA,0EAWR,IAA6B,EAAkB,MAAM,GAOrD,IACX,0FAGW,IACX,2FAGW,IACX,4FAGW,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAGa,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAOa,IAAA,CAA0B,EAAE,SAAA,EAAA,GAAkB,IAAW,QACpE,mBAAmB,CAAA,QAAgB,EAAM,EAAQ,QAAQ,OAAO,IAAI,CAAA,YAAa,EAAM,EAAQ,QAAQ,MAAM,IAAI,CAAA"}
@@ -201,7 +201,6 @@ var a = (r) => {
201
201
  [o.BUDGET_DETAILS_ACTION_BLOCK]: t(() => ({
202
202
  Component: go,
203
203
  copy: yo,
204
- headerAction: "close",
205
204
  usePrepare: So,
206
205
  title: A
207
206
  })),
@@ -1 +1 @@
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 // 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,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AACF,IAEa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B,EAA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,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,MAAa;AAAA,EACf,EAAE;AAAA,EACD,CAAA,EAAgB,0BAAA,GAA6B,EAAA,OAAiB;AAAA,IAC7D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE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AA,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.188",
3
+ "version": "9.7.190",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",