@mx-cartographer/experiences 9.7.195 → 9.7.197

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 (46) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/common/components/Select.d.ts +1 -1
  3. package/dist/common/components/Select.es.js +27 -20
  4. package/dist/common/components/Select.es.js.map +1 -1
  5. package/dist/core/types/localization/InsightsFeedCopy.d.ts +16 -0
  6. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +3 -1
  7. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js +29 -21
  8. package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js.map +1 -1
  9. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +54 -37
  10. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
  11. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.d.ts +23 -0
  12. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +352 -0
  13. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -0
  14. package/dist/insights-v2/actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js +4 -4
  15. package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +4 -4
  16. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +4 -4
  17. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +3 -1
  18. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +68 -63
  19. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +94 -91
  21. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  22. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +2 -0
  23. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +7 -5
  24. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  25. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +1 -1
  26. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +12 -7
  27. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -1
  28. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +4 -0
  29. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +7 -5
  30. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -1
  31. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +19 -0
  32. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +126 -0
  33. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -0
  34. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +59 -56
  35. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  36. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +1 -1
  37. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +22 -11
  38. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  39. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +10 -10
  40. package/dist/insights-v2/components/LogoClusterCard.es.js +9 -8
  41. package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -1
  42. package/dist/insights-v2/components/TransactionListCard.es.js +4 -4
  43. package/dist/insights-v2/components/chartblocks/BarchartV2.d.ts +9 -1
  44. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +109 -85
  45. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
  46. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [9.7.197] - 11-20-2026
2
+
3
+ - **FIXED** - Monthly Top Merchant Spending V4: rank badges are bold and the logo cascade matches Figma's stagger and overlap (WEC-2383)
4
+ - **CHANGED** - Monthly Top Merchant Spending V4 Merchant History drawer: no month tabs or Transactions / Export CSV row, as Figma; the chart bars select the month by ...
5
+
6
+ ## [9.7.196] - 11-20-2026
7
+
8
+ - **ADDED** - Step chart `milestone_progress` variant: the $100 / $500 / $1,000 goal stepper for Monthly Emergency Savings Reminder V2 (WEC-2401)
9
+ - **CHANGED** - Emergency Savings drawer draws the Insights 2.0 layout (progress card, month contribution banner, next goal estimate and calculator) from the opening CTA's drilldown_data; cards without it keep the legacy drawer (WEC-2401)
10
+ - **ADDED** - Monthly Emergency Savings Reminder V2 Storybook QA page with every state and widget (WEC-2401)
11
+
1
12
  ## [9.7.195] - 11-20-2026
2
13
 
3
14
  - **FIXED** - Credit Utilization drawer band labels, definitions, tip emphasis and card rows match the Figma drill-down (WEC-2348)
@@ -10,5 +10,5 @@ interface SelectProps extends Omit<React.ComponentProps<typeof TextField>, 'onCh
10
10
  options: SelectOption[];
11
11
  value: number | '';
12
12
  }
13
- export declare const Select: ({ label, onChange, options, value, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Select: ({ label, onChange, options, slotProps, value, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,33 +1,40 @@
1
1
  import "react";
2
- import { ExpandMore as m } from "@mxenabled/mx-icons";
3
- import { jsx as r } from "react/jsx-runtime";
4
- import i from "@mui/material/TextField";
2
+ import { ExpandMore as c } from "@mxenabled/mx-icons";
3
+ import { jsx as a } from "react/jsx-runtime";
4
+ import o from "@mui/material/TextField";
5
5
  import u from "@mui/material/MenuItem";
6
- var g = ({ label: t, onChange: a, options: l, value: n, ...o }) => /* @__PURE__ */ r(i, {
6
+ var d = (r) => /* @__PURE__ */ a(c, {
7
+ size: 20,
8
+ sx: { mr: 4 },
9
+ ...r
10
+ }), C = ({ label: r, onChange: n, options: l, slotProps: e, value: i, ...m }) => /* @__PURE__ */ a(o, {
7
11
  defaultValue: "",
8
- label: t,
9
- onChange: (e) => {
10
- a(Number(e.target.value));
12
+ label: r,
13
+ onChange: (t) => {
14
+ n(Number(t.target.value));
11
15
  },
12
16
  select: !0,
13
17
  slotProps: {
14
- inputLabel: { shrink: !0 },
15
- select: { IconComponent: (e) => /* @__PURE__ */ r(m, {
16
- size: 20,
17
- sx: { mr: 4 },
18
- ...e
19
- }) }
18
+ ...e,
19
+ inputLabel: {
20
+ shrink: !0,
21
+ ...typeof e?.inputLabel == "object" && e.inputLabel
22
+ },
23
+ select: {
24
+ IconComponent: d,
25
+ ...typeof e?.select == "object" && e.select
26
+ }
20
27
  },
21
- value: n,
28
+ value: i,
22
29
  variant: "outlined",
23
- ...o,
24
- children: l.map((e) => /* @__PURE__ */ r(u, {
25
- value: e.id,
26
- children: e.label
27
- }, e.id))
30
+ ...m,
31
+ children: l.map((t) => /* @__PURE__ */ a(u, {
32
+ value: t.id,
33
+ children: t.label
34
+ }, t.id))
28
35
  });
29
36
  export {
30
- g as Select
37
+ C as Select
31
38
  };
32
39
 
33
40
  //# sourceMappingURL=Select.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.es.js","names":[],"sources":["../../../src/common/components/Select.tsx"],"sourcesContent":["import React from 'react'\n\nimport MenuItem from '@mui/material/MenuItem'\nimport TextField from '@mui/material/TextField'\n\nimport { ExpandMore } from '@mxenabled/mx-icons'\n\nexport type SelectOption = {\n id: number\n label: string\n}\n\ninterface SelectProps extends Omit<React.ComponentProps<typeof TextField>, 'onChange'> {\n label: string\n onChange: (value: number) => void\n options: SelectOption[]\n // Allow '' for the no-selection state. MUI Select warns \"out-of-range value\"\n // when a numeric sentinel (e.g. 0) isn't among the options; '' is MUI's\n // canonical empty value.\n value: number | ''\n}\n\nexport const Select = ({ label, onChange, options, value, ...props }: SelectProps) => {\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n onChange(Number(event.target.value))\n }\n\n return (\n <TextField\n defaultValue=\"\"\n label={label}\n onChange={handleChange}\n select={true}\n slotProps={{\n inputLabel: { shrink: true },\n select: {\n IconComponent: (props: React.ComponentProps<typeof ExpandMore>) => (\n <ExpandMore size={20} sx={{ mr: 4 }} {...props} />\n ),\n },\n }}\n value={value}\n variant=\"outlined\"\n {...props}\n >\n {options.map((option) => (\n <MenuItem key={option.id} value={option.id}>\n {option.label}\n </MenuItem>\n ))}\n </TextField>\n )\n}\n"],"mappings":";;;;;AAsBA,IAAa,IAAA,CAAU,EAAE,OAAA,GAAO,UAAA,GAAU,SAAA,GAAS,OAAA,GAAO,GAAG,EAAA,MAMzD,gBAAA,EAAC,GAAD;AAAA,EACE,cAAa;AAAA,EACN,OAAA;AAAA,EACP,UARE,CAAgB,MAAkD;AACtE,IAAA,EAAS,OAAO,EAAM,OAAO,KAAK,CAAC;AAAA,EACrC;AAAA,EAOI,QAAQ;AAAA,EACR,WAAW;AAAA,IACT,YAAY,EAAE,QAAQ,GAAK;AAAA,IAC3B,QAAQ,EACN,eAAA,CAAgB,MACd,gBAAA,EAAC,GAAD;AAAA,MAAY,MAAM;AAAA,MAAI,IAAI,EAAE,IAAI,EAAE;AAAA,MAAG,GAAI;AAAA,IAAQ,CAAA,EAErD;AAAA,EACF;AAAA,EACO,OAAA;AAAA,EACP,SAAQ;AAAA,EACR,GAAI;AAAA,EAEH,UAAA,EAAQ,IAAA,CAAK,MACZ,gBAAA,EAAC,GAAD;AAAA,IAA0B,OAAO,EAAO;AAAA,IACrC,UAAA,EAAO;AAAA,EACA,GAFK,EAAO,EAEZ,CACX;AACQ,CAAA"}
1
+ {"version":3,"file":"Select.es.js","names":[],"sources":["../../../src/common/components/Select.tsx"],"sourcesContent":["import React from 'react'\n\nimport MenuItem from '@mui/material/MenuItem'\nimport TextField from '@mui/material/TextField'\n\nimport { ExpandMore } from '@mxenabled/mx-icons'\n\nexport type SelectOption = {\n id: number\n label: string\n}\n\ninterface SelectProps extends Omit<React.ComponentProps<typeof TextField>, 'onChange'> {\n label: string\n onChange: (value: number) => void\n options: SelectOption[]\n // Allow '' for the no-selection state. MUI Select warns \"out-of-range value\"\n // when a numeric sentinel (e.g. 0) isn't among the options; '' is MUI's\n // canonical empty value.\n value: number | ''\n}\n\nconst SelectIcon = (props: React.ComponentProps<typeof ExpandMore>) => (\n <ExpandMore size={20} sx={{ mr: 4 }} {...props} />\n)\n\nexport const Select = ({ label, onChange, options, slotProps, value, ...props }: SelectProps) => {\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n onChange(Number(event.target.value))\n }\n\n return (\n <TextField\n defaultValue=\"\"\n label={label}\n onChange={handleChange}\n select={true}\n slotProps={{\n ...slotProps,\n // A caller's select / inputLabel props add to the shared arrow and shrunk label, not replace them.\n inputLabel: {\n shrink: true,\n ...(typeof slotProps?.inputLabel === 'object' && slotProps.inputLabel),\n },\n select: {\n IconComponent: SelectIcon,\n ...(typeof slotProps?.select === 'object' && slotProps.select),\n },\n }}\n value={value}\n variant=\"outlined\"\n {...props}\n >\n {options.map((option) => (\n <MenuItem key={option.id} value={option.id}>\n {option.label}\n </MenuItem>\n ))}\n </TextField>\n )\n}\n"],"mappings":";;;;;AAsBA,IAAM,IAAA,CAAc,MAClB,gBAAA,EAAC,GAAD;AAAA,EAAY,MAAM;AAAA,EAAI,IAAI,EAAE,IAAI,EAAE;AAAA,EAAG,GAAI;AAAQ,CAAA,GAGtC,IAAA,CAAU,EAAE,OAAA,GAAO,UAAA,GAAU,SAAA,GAAS,WAAA,GAAW,OAAA,GAAO,GAAG,EAAA,MAMpE,gBAAA,EAAC,GAAD;AAAA,EACE,cAAa;AAAA,EACN,OAAA;AAAA,EACP,UARE,CAAgB,MAAkD;AACtE,IAAA,EAAS,OAAO,EAAM,OAAO,KAAK,CAAC;AAAA,EACrC;AAAA,EAOI,QAAQ;AAAA,EACR,WAAW;AAAA,IACT,GAAG;AAAA,IAEH,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,GAAI,OAAO,GAAW,cAAe,YAAY,EAAU;AAAA,IAC7D;AAAA,IACA,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,GAAI,OAAO,GAAW,UAAW,YAAY,EAAU;AAAA,IACzD;AAAA,EACF;AAAA,EACO,OAAA;AAAA,EACP,SAAQ;AAAA,EACR,GAAI;AAAA,EAEH,UAAA,EAAQ,IAAA,CAAK,MACZ,gBAAA,EAAC,GAAD;AAAA,IAA0B,OAAO,EAAO;AAAA,IACrC,UAAA,EAAO;AAAA,EACA,GAFK,EAAO,EAEZ,CACX;AACQ,CAAA"}
@@ -388,6 +388,22 @@ export interface EmergencySavingsCopy {
388
388
  step_one: string;
389
389
  step_two: string;
390
390
  final_step: string;
391
+ your_progress?: string;
392
+ more_to_go?: string;
393
+ saved_amount?: string;
394
+ goal_amount?: string;
395
+ contributed_this_month?: string;
396
+ increase_your_transfer?: string;
397
+ next_savings_goal?: string;
398
+ per_month?: string;
399
+ per_week?: string;
400
+ per_two_weeks?: string;
401
+ use_the_calculator?: string;
402
+ how_often_will_you_contribute?: string;
403
+ select_frequency?: string;
404
+ add_timeline?: string;
405
+ weekly?: string;
406
+ monthly?: string;
391
407
  }
392
408
  /** Labels for the Debts component block (Debt Payment Reminder). Optional until the service ships them. */
393
409
  export interface DebtsBlockCopy {
@@ -13,9 +13,11 @@ export interface CustomBarPlotV2Props {
13
13
  removeSelectedTabColorChange?: boolean;
14
14
  selectedTabIndex: number;
15
15
  style: BarStyleProps;
16
+ /** Makes the bar a focusable button that selects it on Enter / Space. Absent: no keyboard role. */
17
+ onKeyboardSelect?: (dataIndex: number) => void;
16
18
  xOrigin?: number;
17
19
  yOrigin?: number;
18
20
  skipAnimation?: boolean;
19
21
  }
20
- export declare const CustomBarPlotV2: ({ colorRange, data, dataIndex, removeSelectedTabColorChange, selectedTabIndex, style, xOrigin: _xOrigin, yOrigin: _yOrigin, skipAnimation: _skipAnimation, ...restProps }: CustomBarPlotV2Props) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const CustomBarPlotV2: ({ colorRange, data, dataIndex, removeSelectedTabColorChange, selectedTabIndex, style, onKeyboardSelect, xOrigin: _xOrigin, yOrigin: _yOrigin, skipAnimation: _skipAnimation, ...restProps }: CustomBarPlotV2Props) => import("react/jsx-runtime").JSX.Element;
21
23
  export {};
@@ -1,32 +1,40 @@
1
1
  import "react";
2
- import { jsx as a, jsxs as x } from "react/jsx-runtime";
3
- import { useTheme as p } from "@mui/material/styles";
4
- var g = (i, r) => {
5
- if (i <= 0 || r <= 0) return "";
6
- const t = Math.min(4, i / 2, r / 2);
7
- return `M${t},0 L${i - t},0 Q${i},0 ${i},${t} L${i},${r} L0,${r} L0,${t} Q0,0 ${t},0 Z`;
8
- }, _ = ({ colorRange: i, data: r, dataIndex: t, removeSelectedTabColorChange: s, selectedTabIndex: c, style: o, xOrigin: A, yOrigin: L, skipAnimation: b, ...l }) => {
9
- const h = p(), { ariaLabel: $, formattedAmount: d } = r[t], f = c === t ? "bold" : 400, n = o.x ?? 0, e = o.y ?? 0, m = o.width ?? 0, u = o.height ?? 0;
10
- return /* @__PURE__ */ x("g", {
2
+ import { jsx as h, jsxs as A } from "react/jsx-runtime";
3
+ import { useTheme as d } from "@mui/material/styles";
4
+ var y = (r, i) => {
5
+ if (r <= 0 || i <= 0) return "";
6
+ const t = Math.min(4, r / 2, i / 2);
7
+ return `M${t},0 L${r - t},0 Q${r},0 ${r},${t} L${r},${i} L0,${i} L0,${t} Q0,0 ${t},0 Z`;
8
+ }, j = ({ colorRange: r, data: i, dataIndex: t, removeSelectedTabColorChange: u, selectedTabIndex: e, style: o, onKeyboardSelect: m, xOrigin: L, yOrigin: b, skipAnimation: k, ...c }) => {
9
+ const f = d(), { ariaLabel: $, formattedAmount: p } = i[t], g = e === t ? "bold" : 400, a = o.x ?? 0, s = o.y ?? 0, l = o.width ?? 0, x = o.height ?? 0;
10
+ return /* @__PURE__ */ A("g", {
11
11
  "aria-label": $,
12
- children: [/* @__PURE__ */ a("path", {
13
- ...l,
14
- d: g(m, u),
15
- fill: i[t],
16
- transform: `translate(${n}, ${e})`
17
- }), /* @__PURE__ */ a("text", {
18
- fill: h.palette.text.primary,
12
+ ...m && {
13
+ "aria-pressed": e === t,
14
+ onKeyDown: (n) => {
15
+ n.key !== "Enter" && n.key !== " " || (n.preventDefault(), m(t));
16
+ },
17
+ role: "button",
18
+ tabIndex: 0
19
+ },
20
+ children: [/* @__PURE__ */ h("path", {
21
+ ...c,
22
+ d: y(l, x),
23
+ fill: r[t],
24
+ transform: `translate(${a}, ${s})`
25
+ }), /* @__PURE__ */ h("text", {
26
+ fill: f.palette.text.primary,
19
27
  fontSize: 11,
20
- fontWeight: s ? "bold" : f,
28
+ fontWeight: u ? "bold" : g,
21
29
  textAnchor: "middle",
22
- x: n + m / 2,
23
- y: e - 8,
24
- children: d
30
+ x: a + l / 2,
31
+ y: s - 8,
32
+ children: p
25
33
  })]
26
34
  });
27
35
  };
28
36
  export {
29
- _ as CustomBarPlotV2
37
+ j as CustomBarPlotV2
30
38
  };
31
39
 
32
40
  //# sourceMappingURL=CustomBarPlotV2.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomBarPlotV2.es.js","names":[],"sources":["../../../../../../src/insights/components/shared/Charts/BarChart/CustomBarPlotV2.tsx"],"sourcesContent":["import React from 'react'\n\nimport { useTheme } from '@mui/material/styles'\n\nimport type { BarDataProps } from '../../../../types/Charts/BarChart'\n\ninterface BarStyleProps extends React.CSSProperties {\n x?: number\n y?: number\n width?: number\n height?: number\n}\n\nexport interface CustomBarPlotV2Props {\n colorRange: string[]\n data: BarDataProps[]\n dataIndex: number\n removeSelectedTabColorChange?: boolean\n selectedTabIndex: number\n style: BarStyleProps\n // Non-DOM props forwarded by the x-charts BarPlot `bar` slot; declared so we\n // can destructure them out before spreading restProps onto <path>.\n xOrigin?: number\n yOrigin?: number\n skipAnimation?: boolean\n}\n\nconst createRoundedRectPath = (w: number, h: number) => {\n if (w <= 0 || h <= 0) return ''\n\n const r = Math.min(4, w / 2, h / 2)\n return `M${r},0 L${w - r},0 Q${w},0 ${w},${r} L${w},${h} L0,${h} L0,${r} Q0,0 ${r},0 Z`\n}\n\nexport const CustomBarPlotV2 = ({\n colorRange,\n data,\n dataIndex,\n removeSelectedTabColorChange,\n selectedTabIndex,\n style,\n // Non-DOM props forwarded by the @mui/x-charts BarPlot `bar` slot. They are\n // not valid SVG attributes, so pull them out of restProps before spreading\n // onto <path> to avoid React \"does not recognize the prop\" warnings.\n xOrigin: _xOrigin,\n yOrigin: _yOrigin,\n skipAnimation: _skipAnimation,\n ...restProps\n}: CustomBarPlotV2Props) => {\n const theme = useTheme()\n\n const { ariaLabel, formattedAmount } = data[dataIndex]\n\n const shouldAmountAmountTextBeBold = selectedTabIndex === dataIndex ? 'bold' : 400\n\n const x = style.x ?? 0\n const y = style.y ?? 0\n const width = style.width ?? 0\n const height = style.height ?? 0\n\n return (\n <g aria-label={ariaLabel}>\n <path\n {...restProps}\n d={createRoundedRectPath(width, height)}\n fill={colorRange[dataIndex]}\n transform={`translate(${x}, ${y})`}\n />\n <text\n fill={theme.palette.text.primary}\n fontSize={11}\n fontWeight={removeSelectedTabColorChange ? 'bold' : shouldAmountAmountTextBeBold}\n textAnchor=\"middle\"\n x={x + width / 2}\n y={y - 8}\n >\n {formattedAmount}\n </text>\n </g>\n )\n}\n"],"mappings":";;;AA2BA,IAAM,IAAA,CAAyB,GAAW,MAAc;AACtD,MAAI,KAAK,KAAK,KAAK,EAAG,QAAO;AAE7B,QAAM,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAClC,SAAO,IAAI,CAAA,OAAQ,IAAI,CAAA,OAAQ,CAAA,MAAO,CAAA,IAAK,CAAA,KAAM,CAAA,IAAK,CAAA,OAAQ,CAAA,OAAQ,CAAA,SAAU,CAAA;AAClF,GAEa,IAAA,CAAmB,EAC9B,YAAA,GACA,MAAA,GACA,WAAA,GACA,8BAAA,GACA,kBAAA,GACA,OAAA,GAIA,SAAS,GACT,SAAS,GACT,eAAe,GACf,GAAG,EAAA,MACuB;AAC1B,QAAM,IAAQ,EAAS,GAEjB,EAAE,WAAA,GAAW,iBAAA,EAAA,IAAoB,EAAK,CAAA,GAEtC,IAA+B,MAAqB,IAAY,SAAS,KAEzE,IAAI,EAAM,KAAK,GACf,IAAI,EAAM,KAAK,GACf,IAAQ,EAAM,SAAS,GACvB,IAAS,EAAM,UAAU;AAE/B,SACE,gBAAA,EAAC,KAAD;AAAA,IAAG,cAAY;AAAA,IAAf,UAAA,CACE,gBAAA,EAAC,QAAD;AAAA,MACE,GAAI;AAAA,MACJ,GAAG,EAAsB,GAAO,CAAM;AAAA,MACtC,MAAM,EAAW,CAAA;AAAA,MACjB,WAAW,aAAa,CAAA,KAAM,CAAA;AAAA,IAC/B,CAAA,GACD,gBAAA,EAAC,QAAD;AAAA,MACE,MAAM,EAAM,QAAQ,KAAK;AAAA,MACzB,UAAU;AAAA,MACV,YAAY,IAA+B,SAAS;AAAA,MACpD,YAAW;AAAA,MACX,GAAG,IAAI,IAAQ;AAAA,MACf,GAAG,IAAI;AAAA,MAEN,UAAA;AAAA,IACG,CAAA,CACL;AAAA;AAEP"}
1
+ {"version":3,"file":"CustomBarPlotV2.es.js","names":[],"sources":["../../../../../../src/insights/components/shared/Charts/BarChart/CustomBarPlotV2.tsx"],"sourcesContent":["import React from 'react'\n\nimport { useTheme } from '@mui/material/styles'\n\nimport type { BarDataProps } from '../../../../types/Charts/BarChart'\n\ninterface BarStyleProps extends React.CSSProperties {\n x?: number\n y?: number\n width?: number\n height?: number\n}\n\nexport interface CustomBarPlotV2Props {\n colorRange: string[]\n data: BarDataProps[]\n dataIndex: number\n removeSelectedTabColorChange?: boolean\n selectedTabIndex: number\n style: BarStyleProps\n /** Makes the bar a focusable button that selects it on Enter / Space. Absent: no keyboard role. */\n onKeyboardSelect?: (dataIndex: number) => void\n // Non-DOM props forwarded by the x-charts BarPlot `bar` slot; declared so we\n // can destructure them out before spreading restProps onto <path>.\n xOrigin?: number\n yOrigin?: number\n skipAnimation?: boolean\n}\n\nconst createRoundedRectPath = (w: number, h: number) => {\n if (w <= 0 || h <= 0) return ''\n\n const r = Math.min(4, w / 2, h / 2)\n return `M${r},0 L${w - r},0 Q${w},0 ${w},${r} L${w},${h} L0,${h} L0,${r} Q0,0 ${r},0 Z`\n}\n\nexport const CustomBarPlotV2 = ({\n colorRange,\n data,\n dataIndex,\n removeSelectedTabColorChange,\n selectedTabIndex,\n style,\n onKeyboardSelect,\n // Non-DOM props forwarded by the @mui/x-charts BarPlot `bar` slot. They are\n // not valid SVG attributes, so pull them out of restProps before spreading\n // onto <path> to avoid React \"does not recognize the prop\" warnings.\n xOrigin: _xOrigin,\n yOrigin: _yOrigin,\n skipAnimation: _skipAnimation,\n ...restProps\n}: CustomBarPlotV2Props) => {\n const theme = useTheme()\n\n const { ariaLabel, formattedAmount } = data[dataIndex]\n\n const shouldAmountAmountTextBeBold = selectedTabIndex === dataIndex ? 'bold' : 400\n\n const x = style.x ?? 0\n const y = style.y ?? 0\n const width = style.width ?? 0\n const height = style.height ?? 0\n\n const keyboardProps = onKeyboardSelect && {\n 'aria-pressed': selectedTabIndex === dataIndex,\n onKeyDown: (event: React.KeyboardEvent<SVGGElement>) => {\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n onKeyboardSelect(dataIndex)\n },\n role: 'button',\n tabIndex: 0,\n }\n\n return (\n <g aria-label={ariaLabel} {...keyboardProps}>\n <path\n {...restProps}\n d={createRoundedRectPath(width, height)}\n fill={colorRange[dataIndex]}\n transform={`translate(${x}, ${y})`}\n />\n <text\n fill={theme.palette.text.primary}\n fontSize={11}\n fontWeight={removeSelectedTabColorChange ? 'bold' : shouldAmountAmountTextBeBold}\n textAnchor=\"middle\"\n x={x + width / 2}\n y={y - 8}\n >\n {formattedAmount}\n </text>\n </g>\n )\n}\n"],"mappings":";;;AA6BA,IAAM,IAAA,CAAyB,GAAW,MAAc;AACtD,MAAI,KAAK,KAAK,KAAK,EAAG,QAAO;AAE7B,QAAM,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAClC,SAAO,IAAI,CAAA,OAAQ,IAAI,CAAA,OAAQ,CAAA,MAAO,CAAA,IAAK,CAAA,KAAM,CAAA,IAAK,CAAA,OAAQ,CAAA,OAAQ,CAAA,SAAU,CAAA;AAClF,GAEa,IAAA,CAAmB,EAC9B,YAAA,GACA,MAAA,GACA,WAAA,GACA,8BAAA,GACA,kBAAA,GACA,OAAA,GACA,kBAAA,GAIA,SAAS,GACT,SAAS,GACT,eAAe,GACf,GAAG,EAAA,MACuB;AAC1B,QAAM,IAAQ,EAAS,GAEjB,EAAE,WAAA,GAAW,iBAAA,EAAA,IAAoB,EAAK,CAAA,GAEtC,IAA+B,MAAqB,IAAY,SAAS,KAEzE,IAAI,EAAM,KAAK,GACf,IAAI,EAAM,KAAK,GACf,IAAQ,EAAM,SAAS,GACvB,IAAS,EAAM,UAAU;AAa/B,SACE,gBAAA,EAAC,KAAD;AAAA,IAAG,cAAY;AAAA,IAAW,GAZN,KAAoB;AAAA,MACxC,gBAAgB,MAAqB;AAAA,MACrC,WAAA,CAAY,MAA4C;AACtD,QAAI,EAAM,QAAQ,WAAW,EAAM,QAAQ,QAC3C,EAAM,eAAe,GACrB,EAAiB,CAAS;AAAA,MAC5B;AAAA,MACA,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,IAGE,UAAA,CACE,gBAAA,EAAC,QAAD;AAAA,MACE,GAAI;AAAA,MACJ,GAAG,EAAsB,GAAO,CAAM;AAAA,MACtC,MAAM,EAAW,CAAA;AAAA,MACjB,WAAW,aAAa,CAAA,KAAM,CAAA;AAAA,IAC/B,CAAA,GACD,gBAAA,EAAC,QAAD;AAAA,MACE,MAAM,EAAM,QAAQ,KAAK;AAAA,MACzB,UAAU;AAAA,MACV,YAAY,IAA+B,SAAS;AAAA,MACpD,YAAW;AAAA,MACX,GAAG,IAAI,IAAQ;AAAA,MACf,GAAG,IAAI;AAAA,MAEN,UAAA;AAAA,IACG,CAAA,CACL;AAAA;AAEP"}
@@ -1,16 +1,18 @@
1
- import { buildDynamicCopy as b } from "../../../core/utils/Localization.es.js";
2
- import { CURRENCY_FORMAT as s, formatCurrency as c } from "../../../core/utils/NumberFormatting.es.js";
3
- import { asNumber as v } from "../../blocks/slotReaders.es.js";
4
- import { variants as f } from "../../blocks/ChartBlocks/StepChartBlock/index.es.js";
1
+ import { buildDynamicCopy as f } from "../../../core/utils/Localization.es.js";
2
+ import { CURRENCY_FORMAT as c, formatCurrency as m } from "../../../core/utils/NumberFormatting.es.js";
3
+ import { asNumber as a } from "../../blocks/slotReaders.es.js";
4
+ import { variants as _ } from "../../blocks/ChartBlocks/StepChartBlock/index.es.js";
5
+ import { useOpenedCta as h } from "../useOpenedCta.es.js";
5
6
  import { useRequiredCopy as x } from "../useRequiredCopy.es.js";
6
- import { stepForBalance as _ } from "./layout.es.js";
7
- import { SavingsCalculator as y } from "./SavingsCalculator.es.js";
8
- import { observer as h } from "mobx-react-lite";
7
+ import { stepForBalance as y } from "./layout.es.js";
8
+ import { EmergencySavingsV2 as C, hasV2Copy as S } from "./EmergencySavingsV2.es.js";
9
+ import { SavingsCalculator as R } from "./SavingsCalculator.es.js";
10
+ import { observer as k } from "mobx-react-lite";
9
11
  import i from "@mui/material/Stack";
10
- import { Text as p } from "@mxenabled/mxui";
11
- import { jsx as o, jsxs as n } from "react/jsx-runtime";
12
- var m = ({ label: r, value: a }) => /* @__PURE__ */ n(i, {
13
- "aria-label": r,
12
+ import { Text as g } from "@mxenabled/mxui";
13
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
14
+ var d = ({ label: o, value: r }) => /* @__PURE__ */ t(i, {
15
+ "aria-label": o,
14
16
  role: "group",
15
17
  sx: {
16
18
  border: "1px solid",
@@ -20,58 +22,73 @@ var m = ({ label: r, value: a }) => /* @__PURE__ */ n(i, {
20
22
  gap: 4,
21
23
  p: 12
22
24
  },
23
- children: [/* @__PURE__ */ o(p, {
25
+ children: [/* @__PURE__ */ e(g, {
24
26
  color: "text.secondary",
25
27
  variant: "caption",
26
- children: r
27
- }), /* @__PURE__ */ o(p, {
28
+ children: o
29
+ }), /* @__PURE__ */ e(g, {
28
30
  bold: !0,
29
31
  component: "p",
30
32
  variant: "h3",
31
- children: a
33
+ children: r
32
34
  })]
33
- }), C = (r) => r.insights_feed?.emergency_savings, N = h(function({ beat: a }) {
34
- const e = x(C), t = v(a.insights_payload?.drilldown_data?.savings_account_balance) ?? 0, { goal: l, index: d, labelKey: g } = _(t), { WithText: u } = f;
35
- return /* @__PURE__ */ n(i, {
35
+ }), w = (o) => o.insights_feed?.emergency_savings, E = (o) => {
36
+ const r = a(o?.goal_amount), n = a(o?.savings_account_balance);
37
+ if (!(r === void 0 || r <= 0 || n === void 0))
38
+ return {
39
+ balance: n,
40
+ goal: r,
41
+ remaining: Math.max(0, a(o?.amount_remaining) ?? r - n),
42
+ monthlyContribution: a(o?.monthly_contribution) ?? 0,
43
+ monthContribution: a(o?.month_contribution) ?? 0
44
+ };
45
+ }, W = k(function({ beat: r }) {
46
+ const n = x(w), p = E(h(r)?.drilldown_data);
47
+ if (p && S(n)) return /* @__PURE__ */ e(C, {
48
+ copy: n,
49
+ facts: p
50
+ }, r.guid);
51
+ const l = a(r.insights_payload?.drilldown_data?.savings_account_balance) ?? 0, { goal: s, index: u, labelKey: v } = y(l), { WithText: b } = _;
52
+ return /* @__PURE__ */ t(i, {
36
53
  sx: {
37
54
  bgcolor: "background.default",
38
55
  gap: 24,
39
56
  p: 24
40
57
  },
41
- children: [/* @__PURE__ */ n(i, {
58
+ children: [/* @__PURE__ */ t(i, {
42
59
  sx: {
43
60
  bgcolor: "background.paper",
44
61
  borderRadius: "8px",
45
62
  gap: 16,
46
63
  p: 16
47
64
  },
48
- children: [/* @__PURE__ */ o(u, { slotData: {
49
- completed_steps: d,
50
- label_1: e[g].toUpperCase(),
51
- label_2: b(e.amount_in_savings, c(l, s.whole))
52
- } }), /* @__PURE__ */ n(i, {
65
+ children: [/* @__PURE__ */ e(b, { slotData: {
66
+ completed_steps: u,
67
+ label_1: n[v].toUpperCase(),
68
+ label_2: f(n.amount_in_savings, m(s, c.whole))
69
+ } }), /* @__PURE__ */ t(i, {
53
70
  sx: {
54
71
  flexDirection: "row",
55
72
  gap: 12
56
73
  },
57
- children: [/* @__PURE__ */ o(m, {
58
- label: e.total_savings_balance,
59
- value: c(t, s.cents)
60
- }), /* @__PURE__ */ o(m, {
61
- label: e.savings_goal,
62
- value: c(l, s.whole)
74
+ children: [/* @__PURE__ */ e(d, {
75
+ label: n.total_savings_balance,
76
+ value: m(l, c.cents)
77
+ }), /* @__PURE__ */ e(d, {
78
+ label: n.savings_goal,
79
+ value: m(s, c.whole)
63
80
  })]
64
81
  })]
65
- }), /* @__PURE__ */ o(y, {
66
- balance: t,
67
- copy: e,
68
- goal: l
69
- }, a.guid)]
82
+ }), /* @__PURE__ */ e(R, {
83
+ balance: l,
84
+ copy: n,
85
+ goal: s
86
+ }, r.guid)]
70
87
  });
71
88
  });
72
89
  export {
73
- N as EmergencySavingsBlock,
74
- C as selectEmergencySavingsCopy
90
+ W as EmergencySavingsBlock,
91
+ w as selectEmergencySavingsCopy
75
92
  };
76
93
 
77
94
  //# sourceMappingURL=EmergencySavingsBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmergencySavingsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { buildDynamicCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport type { GlobalCopy } from '../../../core'\nimport { variants as stepChartVariants } from '../../blocks/ChartBlocks/StepChartBlock'\nimport { asNumber } from '../../blocks/slotReaders'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { useRequiredCopy } from '../useRequiredCopy'\n\nimport { SavingsCalculator } from './SavingsCalculator'\nimport { stepForBalance } from './layout'\n\nconst AmountBox = ({ label, value }: { label: string; value: string }) => (\n <Stack\n aria-label={label}\n role=\"group\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n flex: 1,\n gap: 4,\n p: 12,\n }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} component=\"p\" variant=\"h3\">\n {value}\n </Text>\n </Stack>\n)\n\nexport const selectEmergencySavingsCopy = (copy: GlobalCopy) =>\n copy.insights_feed?.emergency_savings\n\nexport const EmergencySavingsBlock = observer(function EmergencySavingsBlock({\n beat,\n}: ActionBlockProps) {\n const copy = useRequiredCopy(selectEmergencySavingsCopy)\n\n const balance = asNumber(beat.insights_payload?.drilldown_data?.savings_account_balance) ?? 0\n const { goal, index, labelKey } = stepForBalance(balance)\n const { WithText: Stepper } = stepChartVariants\n\n return (\n <Stack sx={{ bgcolor: 'background.default', gap: 24, p: 24 }}>\n <Stack sx={{ bgcolor: 'background.paper', borderRadius: '8px', gap: 16, p: 16 }}>\n <Stepper\n slotData={{\n completed_steps: index,\n label_1: copy[labelKey].toUpperCase(),\n label_2: buildDynamicCopy(\n copy.amount_in_savings,\n formatCurrency(goal, CURRENCY_FORMAT.whole),\n ) as string,\n }}\n />\n <Stack sx={{ flexDirection: 'row', gap: 12 }}>\n <AmountBox\n label={copy.total_savings_balance}\n value={formatCurrency(balance, CURRENCY_FORMAT.cents)}\n />\n <AmountBox\n label={copy.savings_goal}\n value={formatCurrency(goal, CURRENCY_FORMAT.whole)}\n />\n </Stack>\n </Stack>\n <SavingsCalculator balance={balance} copy={copy} goal={goal} key={beat.guid} />\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;AAgBA,IAAM,IAAA,CAAa,EAAE,OAAA,GAAO,OAAA,EAAA,MAC1B,gBAAA,EAAC,GAAD;AAAA,EACE,cAAY;AAAA,EACZ,MAAK;AAAA,EACL,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,KAAK;AAAA,IACL,GAAG;AAAA,EACL;AAAA,EAVF,UAAA,CAYE,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAiB,SAAQ;AAAA,IAClC,UAAA;AAAA,EACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,IAAM,MAAM;AAAA,IAAM,WAAU;AAAA,IAAI,SAAQ;AAAA,IACrC,UAAA;AAAA,EACG,CAAA,CACD;IAGI,IAAA,CAA8B,MACzC,EAAK,eAAe,mBAET,IAAwB,EAAS,SAA+B,EAC3E,MAAA,EAAA,GACmB;AACnB,QAAM,IAAO,EAAgB,CAA0B,GAEjD,IAAU,EAAS,EAAK,kBAAkB,gBAAgB,uBAAuB,KAAK,GACtF,EAAE,MAAA,GAAM,OAAA,GAAO,UAAA,EAAA,IAAa,EAAe,CAAO,GAClD,EAAE,UAAU,EAAA,IAAY;AAE9B,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,SAAS;AAAA,MAAsB,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IAA3D,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,SAAS;AAAA,QAAoB,cAAc;AAAA,QAAO,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MAA9E,UAAA,CACE,gBAAA,EAAC,GAAD,EACE,UAAU;AAAA,QACR,iBAAiB;AAAA,QACjB,SAAS,EAAK,CAAA,EAAU,YAAY;AAAA,QACpC,SAAS,EACP,EAAK,mBACL,EAAe,GAAM,EAAgB,KAAK,CAC5C;AAAA,MACF,EACD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,eAAe;AAAA,UAAO,KAAK;AAAA,QAAG;AAAA,QAA3C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,OAAO,EAAK;AAAA,UACZ,OAAO,EAAe,GAAS,EAAgB,KAAK;AAAA,QACrD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,UACE,OAAO,EAAK;AAAA,UACZ,OAAO,EAAe,GAAM,EAAgB,KAAK;AAAA,QAClD,CAAA,CACI;AAAA,MACF,CAAA,CAAA;AAAA,IACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MAA4B,SAAA;AAAA,MAAe,MAAA;AAAA,MAAY,MAAA;AAAA,IAAuB,GAAZ,EAAK,IAAO,CACzE;AAAA;AAEX,CAAC"}
1
+ {"version":3,"file":"EmergencySavingsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { buildDynamicCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport type { GlobalCopy } from '../../../core'\nimport { variants as stepChartVariants } from '../../blocks/ChartBlocks/StepChartBlock'\nimport { asNumber } from '../../blocks/slotReaders'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { useOpenedCta } from '../useOpenedCta'\nimport { useRequiredCopy } from '../useRequiredCopy'\n\nimport { EmergencySavingsV2, hasV2Copy, type EmergencySavingsFacts } from './EmergencySavingsV2'\nimport { SavingsCalculator } from './SavingsCalculator'\nimport { stepForBalance } from './layout'\n\nconst AmountBox = ({ label, value }: { label: string; value: string }) => (\n <Stack\n aria-label={label}\n role=\"group\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n flex: 1,\n gap: 4,\n p: 12,\n }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} component=\"p\" variant=\"h3\">\n {value}\n </Text>\n </Stack>\n)\n\nexport const selectEmergencySavingsCopy = (copy: GlobalCopy) =>\n copy.insights_feed?.emergency_savings\n\n/** The V2 drawer's figures from the opening CTA, or undefined for a card without them (the legacy layout). */\nconst v2Facts = (data: Record<string, unknown> | undefined): EmergencySavingsFacts | undefined => {\n const goal = asNumber(data?.goal_amount)\n const balance = asNumber(data?.savings_account_balance)\n if (goal === undefined || goal <= 0 || balance === undefined) return undefined\n\n return {\n balance,\n goal,\n // One \"left to save\" for the card, the bar and the calculator; never negative.\n remaining: Math.max(0, asNumber(data?.amount_remaining) ?? goal - balance),\n monthlyContribution: asNumber(data?.monthly_contribution) ?? 0,\n monthContribution: asNumber(data?.month_contribution) ?? 0,\n }\n}\n\nexport const EmergencySavingsBlock = observer(function EmergencySavingsBlock({\n beat,\n}: ActionBlockProps) {\n const copy = useRequiredCopy(selectEmergencySavingsCopy)\n const facts = v2Facts(useOpenedCta(beat)?.drilldown_data)\n\n if (facts && hasV2Copy(copy))\n return <EmergencySavingsV2 copy={copy} facts={facts} key={beat.guid} />\n\n const balance = asNumber(beat.insights_payload?.drilldown_data?.savings_account_balance) ?? 0\n const { goal, index, labelKey } = stepForBalance(balance)\n const { WithText: Stepper } = stepChartVariants\n\n return (\n <Stack sx={{ bgcolor: 'background.default', gap: 24, p: 24 }}>\n <Stack sx={{ bgcolor: 'background.paper', borderRadius: '8px', gap: 16, p: 16 }}>\n <Stepper\n slotData={{\n completed_steps: index,\n label_1: copy[labelKey].toUpperCase(),\n label_2: buildDynamicCopy(\n copy.amount_in_savings,\n formatCurrency(goal, CURRENCY_FORMAT.whole),\n ) as string,\n }}\n />\n <Stack sx={{ flexDirection: 'row', gap: 12 }}>\n <AmountBox\n label={copy.total_savings_balance}\n value={formatCurrency(balance, CURRENCY_FORMAT.cents)}\n />\n <AmountBox\n label={copy.savings_goal}\n value={formatCurrency(goal, CURRENCY_FORMAT.whole)}\n />\n </Stack>\n </Stack>\n <SavingsCalculator balance={balance} copy={copy} goal={goal} key={beat.guid} />\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAM,IAAA,CAAa,EAAE,OAAA,GAAO,OAAA,EAAA,MAC1B,gBAAA,EAAC,GAAD;AAAA,EACE,cAAY;AAAA,EACZ,MAAK;AAAA,EACL,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,MAAM;AAAA,IACN,KAAK;AAAA,IACL,GAAG;AAAA,EACL;AAAA,EAVF,UAAA,CAYE,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAiB,SAAQ;AAAA,IAClC,UAAA;AAAA,EACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,IAAM,MAAM;AAAA,IAAM,WAAU;AAAA,IAAI,SAAQ;AAAA,IACrC,UAAA;AAAA,EACG,CAAA,CACD;IAGI,IAAA,CAA8B,MACzC,EAAK,eAAe,mBAGhB,IAAA,CAAW,MAAiF;AAChG,QAAM,IAAO,EAAS,GAAM,WAAW,GACjC,IAAU,EAAS,GAAM,uBAAuB;AACtD,MAAI,EAAA,MAAS,UAAa,KAAQ,KAAK,MAAY;AAEnD,WAAO;AAAA,MACL,SAAA;AAAA,MACA,MAAA;AAAA,MAEA,WAAW,KAAK,IAAI,GAAG,EAAS,GAAM,gBAAgB,KAAK,IAAO,CAAO;AAAA,MACzE,qBAAqB,EAAS,GAAM,oBAAoB,KAAK;AAAA,MAC7D,mBAAmB,EAAS,GAAM,kBAAkB,KAAK;AAAA,IAC3D;AACF,GAEa,IAAwB,EAAS,SAA+B,EAC3E,MAAA,EAAA,GACmB;AACnB,QAAM,IAAO,EAAgB,CAA0B,GACjD,IAAQ,EAAQ,EAAa,CAAI,GAAG,cAAc;AAExD,MAAI,KAAS,EAAU,CAAI,EACzB,QAAO,gBAAA,EAAC,GAAD;AAAA,IAA0B,MAAA;AAAA,IAAa,OAAA;AAAA,EAAwB,GAAZ,EAAK,IAAO;AAExE,QAAM,IAAU,EAAS,EAAK,kBAAkB,gBAAgB,uBAAuB,KAAK,GACtF,EAAE,MAAA,GAAM,OAAA,GAAO,UAAA,EAAA,IAAa,EAAe,CAAO,GAClD,EAAE,UAAU,EAAA,IAAY;AAE9B,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,SAAS;AAAA,MAAsB,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IAA3D,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,SAAS;AAAA,QAAoB,cAAc;AAAA,QAAO,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MAA9E,UAAA,CACE,gBAAA,EAAC,GAAD,EACE,UAAU;AAAA,QACR,iBAAiB;AAAA,QACjB,SAAS,EAAK,CAAA,EAAU,YAAY;AAAA,QACpC,SAAS,EACP,EAAK,mBACL,EAAe,GAAM,EAAgB,KAAK,CAC5C;AAAA,MACF,EACD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,eAAe;AAAA,UAAO,KAAK;AAAA,QAAG;AAAA,QAA3C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,OAAO,EAAK;AAAA,UACZ,OAAO,EAAe,GAAS,EAAgB,KAAK;AAAA,QACrD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,UACE,OAAO,EAAK;AAAA,UACZ,OAAO,EAAe,GAAM,EAAgB,KAAK;AAAA,QAClD,CAAA,CACI;AAAA,MACF,CAAA,CAAA;AAAA,IACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MAA4B,SAAA;AAAA,MAAe,MAAA;AAAA,MAAY,MAAA;AAAA,IAAuB,GAAZ,EAAK,IAAO,CACzE;AAAA;AAEX,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { EmergencySavingsCopy } from '../../../core';
2
+ declare const V2_COPY_KEYS: readonly ["your_progress", "more_to_go", "saved_amount", "goal_amount", "contributed_this_month", "increase_your_transfer", "next_savings_goal", "per_month", "per_week", "per_two_weeks", "use_the_calculator", "how_often_will_you_contribute", "select_frequency", "add_timeline", "weekly", "monthly"];
3
+ /** The drawer's copy with every V2 key present. */
4
+ export type EmergencySavingsV2Copy = EmergencySavingsCopy & Required<Pick<EmergencySavingsCopy, (typeof V2_COPY_KEYS)[number]>>;
5
+ /** True once mrs_content ships the V2 drawer's words; otherwise the legacy drawer opens. */
6
+ export declare const hasV2Copy: (copy: EmergencySavingsCopy) => copy is EmergencySavingsV2Copy;
7
+ /** The figures the V2 card's CTA carries (ditto monthly_emergency_savings_reminder_v2.yml). */
8
+ export interface EmergencySavingsFacts {
9
+ balance: number;
10
+ goal: number;
11
+ remaining: number;
12
+ monthlyContribution: number;
13
+ monthContribution: number;
14
+ }
15
+ interface Props {
16
+ copy: EmergencySavingsV2Copy;
17
+ facts: EmergencySavingsFacts;
18
+ }
19
+ /** The Build Emergency Savings drawer (Figma 1152:27224): progress, the month banner, the estimate and calculator. */
20
+ export declare const EmergencySavingsV2: (({ copy, facts }: Props) => import("react/jsx-runtime").JSX.Element) & {
21
+ displayName: string;
22
+ };
23
+ export {};