@mx-cartographer/experiences 9.7.6 → 9.7.8

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 (33) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/core/types/Insights.d.ts +1 -0
  3. package/dist/core/types/Insights.es.js.map +1 -1
  4. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +101 -92
  5. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
  6. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js +1 -1
  7. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js.map +1 -1
  8. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +1 -1
  9. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
  10. package/dist/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js +1 -1
  11. package/dist/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js.map +1 -1
  12. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.d.ts +6 -0
  13. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js +37 -0
  14. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js.map +1 -0
  15. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/index.d.ts +3 -0
  16. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/weekStrip.d.ts +25 -0
  17. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/weekStrip.es.js +35 -0
  18. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/weekStrip.es.js.map +1 -0
  19. package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js +4 -4
  20. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -1
  21. package/dist/insights-v2/components/UpcomingBillCard.d.ts +1 -10
  22. package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -1
  23. package/dist/insights-v2/index.es.js +26 -25
  24. package/dist/insights-v2/mappings/blocks.es.js +30 -29
  25. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  26. package/package.json +1 -1
  27. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.d.ts +0 -53
  28. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js +0 -79
  29. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js.map +0 -1
  30. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/index.d.ts +0 -1
  31. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/layout.d.ts +0 -13
  32. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/layout.es.js +0 -6
  33. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/layout.es.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ import { slot as s } from "../../../../core/types/Insights.es.js";
2
+ import { formatCurrency as g } from "../../../../core/utils/NumberFormatting.es.js";
3
+ import p, { isLogoGuid as f } from "../../../components/LogoFromGuid.es.js";
4
+ import { buildUnhighlightedCurrentWeek as h, buildWeekStrip as _, parseDueDate as x } from "./weekStrip.es.js";
5
+ import b from "../../../components/UpcomingBillCard.es.js";
6
+ import k from "@mui/material/Stack";
7
+ import { Icon as y } from "@mxenabled/mx-icons";
8
+ import { jsx as t } from "react/jsx-runtime";
9
+ var U = ({ payload: u }) => {
10
+ const { instance_slot: o } = u, { data: e } = o, r = (d) => s(e, d) ?? o[d], a = r("merchant_name") ?? "", i = r("amount"), n = r("due_date"), m = s(e, "logo") ?? (o.merchant_guid ? {
11
+ alt: a,
12
+ fallback_guid: o.category_guid,
13
+ guid: o.merchant_guid
14
+ } : void 0), c = n ? x(n) : null, l = c ? _(c) : h();
15
+ return /* @__PURE__ */ t(k, {
16
+ sx: { px: 16 },
17
+ children: /* @__PURE__ */ t(b, {
18
+ amount: typeof i == "number" ? g(i, "0,0.00") : "",
19
+ days: l,
20
+ logo: f(m?.guid) ? /* @__PURE__ */ t(p, {
21
+ logo: m,
22
+ size: 24
23
+ }) : /* @__PURE__ */ t(y, {
24
+ "aria-hidden": !0,
25
+ name: "receipt_long",
26
+ size: 24,
27
+ sx: { color: "text.secondary" }
28
+ }),
29
+ merchantName: a
30
+ })
31
+ });
32
+ };
33
+ export {
34
+ U as default
35
+ };
36
+
37
+ //# sourceMappingURL=RepeatingTransactionBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RepeatingTransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type InstanceSlot, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport LogoFromGuid, { isLogoGuid } from '../../../components/LogoFromGuid'\nimport UpcomingBillCard from '../../../components/UpcomingBillCard'\n\nimport { buildUnhighlightedCurrentWeek, buildWeekStrip, parseDueDate } from './weekStrip'\n\ninterface RepeatingTransactionBlockProps {\n payload: InsightsPayload\n}\n\nconst RepeatingTransactionBlock = ({ payload }: RepeatingTransactionBlockProps) => {\n const { instance_slot } = payload\n const { data } = instance_slot\n const field = <K extends keyof InstanceSlot>(key: K) =>\n slot<InstanceSlot[K]>(data, key) ?? instance_slot[key]\n\n const merchantName = field('merchant_name') ?? ''\n const amount = field('amount')\n const dueDate = field('due_date')\n const logo =\n slot<LogoRef>(data, 'logo') ??\n (instance_slot.merchant_guid\n ? {\n alt: merchantName,\n fallback_guid: instance_slot.category_guid,\n guid: instance_slot.merchant_guid,\n }\n : undefined)\n\n const parsed = dueDate ? parseDueDate(dueDate) : null\n const days = parsed ? buildWeekStrip(parsed) : buildUnhighlightedCurrentWeek()\n\n return (\n <Stack sx={{ px: 16 }}>\n <UpcomingBillCard\n amount={typeof amount === 'number' ? formatCurrency(amount, '0,0.00') : ''}\n days={days}\n logo={\n isLogoGuid(logo?.guid) ? (\n <LogoFromGuid logo={logo} size={24} />\n ) : (\n <Icon\n aria-hidden={true}\n name=\"receipt_long\"\n size={24}\n sx={{ color: 'text.secondary' }}\n />\n )\n }\n merchantName={merchantName}\n />\n </Stack>\n )\n}\n\nexport default RepeatingTransactionBlock\n"],"mappings":";;;;;;;;AAgBA,IAAM,IAAA,CAA6B,EAAE,SAAA,EAAA,MAA8C;AACjF,QAAM,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,MAAA,EAAA,IAAS,GACX,IAAA,CAAuC,MAC3C,EAAsB,GAAM,CAAG,KAAK,EAAc,CAAA,GAE9C,IAAe,EAAM,eAAe,KAAK,IACzC,IAAS,EAAM,QAAQ,GACvB,IAAU,EAAM,UAAU,GAC1B,IACJ,EAAc,GAAM,MAAM,MACzB,EAAc,gBACX;AAAA,IACE,KAAK;AAAA,IACL,eAAe,EAAc;AAAA,IAC7B,MAAM,EAAc;AAAA,EACtB,IACA,SAEA,IAAS,IAAU,EAAa,CAAO,IAAI,MAC3C,IAAO,IAAS,EAAe,CAAM,IAAI,EAA8B;AAE7E,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,IAAI,GAAG;AAAA,IAClB,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,QAAQ,OAAO,KAAW,WAAW,EAAe,GAAQ,QAAQ,IAAI;AAAA,MAClE,MAAA;AAAA,MACN,MACE,EAAW,GAAM,IAAI,IACnB,gBAAA,EAAC,GAAD;AAAA,QAAoB,MAAA;AAAA,QAAM,MAAM;AAAA,MAAK,CAAA,IAErC,gBAAA,EAAC,GAAD;AAAA,QACE,eAAa;AAAA,QACb,MAAK;AAAA,QACL,MAAM;AAAA,QACN,IAAI,EAAE,OAAO,iBAAiB;AAAA,MAC/B,CAAA;AAAA,MAGS,cAAA;AAAA,IACf,CAAA;AAAA,EACI,CAAA;AAEX"}
@@ -0,0 +1,3 @@
1
+ export { default as RepeatingTransactionBlock } from './RepeatingTransactionBlock';
2
+ /** @deprecated `upcoming_bill_block` is an alias of `RepeatingTransactionBlock`. */
3
+ export { default as UpcomingBillBlock } from './RepeatingTransactionBlock';
@@ -0,0 +1,25 @@
1
+ import { UpcomingBillDay } from '../../../components/UpcomingBillCard';
2
+ /**
3
+ * Parse an ISO `YYYY-MM-DD` into a local-time Date, dodging the UTC-midnight parse
4
+ * that `new Date('2025-10-30')` performs (which drifts a day in negative offsets).
5
+ * Any other string shape (full ISO datetime) falls through to the native parser.
6
+ *
7
+ * Returns `null` for anything that doesn't resolve to a valid Date — including a
8
+ * `YYYY-MM-DD`-shaped string whose year/month/day segments produce `Invalid Date`
9
+ * (e.g. `'2026-13-40'`) and arbitrary strings the native parser rejects. Callers
10
+ * must handle `null` so a bad backend value cannot propagate `NaN` into the UI
11
+ * via `getDay()` and render `NaN` day numbers.
12
+ */
13
+ export declare const parseDueDate: (iso: string) => Date | null;
14
+ /**
15
+ * Build the Sun→Sat week around a due date with the due day marked `highlighted`.
16
+ * Column index is the local day-of-week (0=Sun..6=Sat) so the strip always lines up
17
+ * under the weekday labels regardless of which weekday the bill lands on.
18
+ */
19
+ export declare const buildWeekStrip: (dueDate: Date) => UpcomingBillDay[];
20
+ /**
21
+ * Build the current Sun→Sat week with NO cell highlighted. Used as the degraded
22
+ * strip when `due_date` is missing or unparseable — the card still renders
23
+ * (merchant row with name + amount) but the strip has no "due day" callout.
24
+ */
25
+ export declare const buildUnhighlightedCurrentWeek: () => UpcomingBillDay[];
@@ -0,0 +1,35 @@
1
+ var l = [
2
+ "Sun",
3
+ "Mon",
4
+ "Tue",
5
+ "Wed",
6
+ "Thu",
7
+ "Fri",
8
+ "Sat"
9
+ ], s = (e) => {
10
+ const r = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
11
+ if (r) {
12
+ const [a, D, n] = r.slice(1).map(Number), t = new Date(a, D - 1, n);
13
+ return t.getFullYear() === a && t.getMonth() === D - 1 && t.getDate() === n ? t : null;
14
+ }
15
+ const u = new Date(e);
16
+ return Number.isNaN(u.getTime()) ? null : u;
17
+ }, g = (e, r) => {
18
+ const u = e.getDay(), a = new Date(e);
19
+ return a.setDate(e.getDate() - u), l.map((D, n) => {
20
+ const t = new Date(a);
21
+ t.setDate(a.getDate() + n);
22
+ const d = {
23
+ label: D,
24
+ date: String(t.getDate())
25
+ };
26
+ return n === r && (d.highlighted = !0), d;
27
+ });
28
+ }, i = (e) => g(e, e.getDay()), c = () => g(/* @__PURE__ */ new Date());
29
+ export {
30
+ c as buildUnhighlightedCurrentWeek,
31
+ i as buildWeekStrip,
32
+ s as parseDueDate
33
+ };
34
+
35
+ //# sourceMappingURL=weekStrip.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weekStrip.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/weekStrip.ts"],"sourcesContent":["import type { UpcomingBillDay } from '../../../components/UpcomingBillCard'\n\nconst DAY_LABELS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as const\n\n/**\n * Parse an ISO `YYYY-MM-DD` into a local-time Date, dodging the UTC-midnight parse\n * that `new Date('2025-10-30')` performs (which drifts a day in negative offsets).\n * Any other string shape (full ISO datetime) falls through to the native parser.\n *\n * Returns `null` for anything that doesn't resolve to a valid Date — including a\n * `YYYY-MM-DD`-shaped string whose year/month/day segments produce `Invalid Date`\n * (e.g. `'2026-13-40'`) and arbitrary strings the native parser rejects. Callers\n * must handle `null` so a bad backend value cannot propagate `NaN` into the UI\n * via `getDay()` and render `NaN` day numbers.\n */\nexport const parseDueDate = (iso: string): Date | null => {\n const dateOnly = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(iso)\n if (dateOnly) {\n const [y, m, d] = dateOnly.slice(1).map(Number)\n const parsed = new Date(y, m - 1, d)\n const roundTrips =\n parsed.getFullYear() === y && parsed.getMonth() === m - 1 && parsed.getDate() === d\n return roundTrips ? parsed : null\n }\n const parsed = new Date(iso)\n return Number.isNaN(parsed.getTime()) ? null : parsed\n}\n\nconst weekOf = (base: Date, highlightedIndex?: number): UpcomingBillDay[] => {\n const dow = base.getDay()\n const sunday = new Date(base)\n sunday.setDate(base.getDate() - dow)\n\n return DAY_LABELS.map((label, idx): UpcomingBillDay => {\n const cell = new Date(sunday)\n cell.setDate(sunday.getDate() + idx)\n const day: UpcomingBillDay = { label, date: String(cell.getDate()) }\n if (idx === highlightedIndex) day.highlighted = true\n return day\n })\n}\n\n/**\n * Build the Sun→Sat week around a due date with the due day marked `highlighted`.\n * Column index is the local day-of-week (0=Sun..6=Sat) so the strip always lines up\n * under the weekday labels regardless of which weekday the bill lands on.\n */\nexport const buildWeekStrip = (dueDate: Date): UpcomingBillDay[] =>\n weekOf(dueDate, dueDate.getDay())\n\n/**\n * Build the current Sun→Sat week with NO cell highlighted. Used as the degraded\n * strip when `due_date` is missing or unparseable — the card still renders\n * (merchant row with name + amount) but the strip has no \"due day\" callout.\n */\nexport const buildUnhighlightedCurrentWeek = (): UpcomingBillDay[] => weekOf(new Date())\n"],"mappings":"AAEA,IAAM,IAAa;AAAA,EAAC;AAAA,EAAO;AAAA,EAAO;AAAA,EAAO;AAAA,EAAO;AAAA,EAAO;AAAA,EAAO;AAAK,GAatD,IAAA,CAAgB,MAA6B;AACxD,QAAM,IAAW,4BAA4B,KAAK,CAAG;AACrD,MAAI,GAAU;AACZ,UAAM,CAAC,GAAG,GAAG,CAAA,IAAK,EAAS,MAAM,CAAC,EAAE,IAAI,MAAM,GACxC,IAAS,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC;AAGnC,WADE,EAAO,YAAY,MAAM,KAAK,EAAO,SAAS,MAAM,IAAI,KAAK,EAAO,QAAQ,MAAM,IAChE,IAAS;AAAA,EAC/B;AACA,QAAM,IAAS,IAAI,KAAK,CAAG;AAC3B,SAAO,OAAO,MAAM,EAAO,QAAQ,CAAC,IAAI,OAAO;AACjD,GAEM,IAAA,CAAU,GAAY,MAAiD;AAC3E,QAAM,IAAM,EAAK,OAAO,GAClB,IAAS,IAAI,KAAK,CAAI;AAC5B,SAAA,EAAO,QAAQ,EAAK,QAAQ,IAAI,CAAG,GAE5B,EAAW,IAAA,CAAK,GAAO,MAAyB;AACrD,UAAM,IAAO,IAAI,KAAK,CAAM;AAC5B,IAAA,EAAK,QAAQ,EAAO,QAAQ,IAAI,CAAG;AACnC,UAAM,IAAuB;AAAA,MAAE,OAAA;AAAA,MAAO,MAAM,OAAO,EAAK,QAAQ,CAAC;AAAA,IAAE;AACnE,WAAI,MAAQ,MAAkB,EAAI,cAAc,KACzC;AAAA,EACT,CAAC;AACH,GAOa,IAAA,CAAkB,MAC7B,EAAO,GAAS,EAAQ,OAAO,CAAC,GAOrB,IAAA,MAAyD,EAAO,oBAAI,KAAK,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { formatCurrency as m } from "../../../../core/utils/NumberFormatting.es.js";
2
- import { createVariantBlock as p } from "../../createVariantBlock.es.js";
3
- import l from "../../../components/SavingsOpportunityCard.es.js";
2
+ import p from "../../../components/SavingsOpportunityCard.es.js";
3
+ import { createVariantBlock as l } from "../../createVariantBlock.es.js";
4
4
  import { savingsOpportunityVariant as c } from "./layout.es.js";
5
5
  import v from "@mui/material/Stack";
6
6
  import { jsx as o } from "react/jsx-runtime";
@@ -8,7 +8,7 @@ var u = (r) => {
8
8
  const { instance_slot: t } = r, { amount: a, label: i, slot: s } = t, e = s ?? !0;
9
9
  return /* @__PURE__ */ o(v, {
10
10
  sx: { px: 16 },
11
- children: /* @__PURE__ */ o(l, {
11
+ children: /* @__PURE__ */ o(p, {
12
12
  amount: m(a ?? 0, "0,0.00"),
13
13
  label: i ?? "",
14
14
  slot: e
@@ -21,7 +21,7 @@ var u = (r) => {
21
21
  payload: r,
22
22
  variant: a
23
23
  });
24
- }, f = p({
24
+ }, f = l({
25
25
  variants: Object.fromEntries(Object.values(c).map((r) => [r, n])),
26
26
  fallback: n,
27
27
  name: "SavingsOpportunityBlock"
@@ -3,9 +3,9 @@ export * from './AccountSwitchBlock';
3
3
  export * from './DirectDepositBlock';
4
4
  export * from './BudgetBlock';
5
5
  export * from './DebtsBlock';
6
+ export * from './RepeatingTransactionBlock';
6
7
  export * from './SaveExtraBlock';
7
8
  export * from './SavingsOpportunityBlock';
8
9
  export * from './TransactionBlock';
9
- export * from './UpcomingBillBlock';
10
10
  export * from './UpcomingSubscriptionBlock';
11
11
  export * from './WithdrawalBlock';
@@ -9,16 +9,7 @@ export interface UpcomingBillDay {
9
9
  highlighted?: boolean;
10
10
  }
11
11
  export interface UpcomingBillCardProps {
12
- /** The seven days of the week strip (exactly 7 items, one for each day). The due day should have `highlighted`. */
13
- days: [
14
- UpcomingBillDay,
15
- UpcomingBillDay,
16
- UpcomingBillDay,
17
- UpcomingBillDay,
18
- UpcomingBillDay,
19
- UpcomingBillDay,
20
- UpcomingBillDay
21
- ];
12
+ days: UpcomingBillDay[];
22
13
  /** Merchant logo/icon (24x24), rendered left of the merchant name. */
23
14
  logo: ReactNode;
24
15
  /** Merchant name, e.g. "Power Plus". */
@@ -1 +1 @@
1
- {"version":3,"file":"UpcomingBillCard.es.js","names":[],"sources":["../../../src/insights-v2/components/UpcomingBillCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nexport interface UpcomingBillDay {\n /** Day-of-week label, e.g. \"Sun\". */\n label: string\n /** Day-of-month number, e.g. \"26\". */\n date: string\n /** Whether this is the highlighted due day (blue label + filled date cell). */\n highlighted?: boolean\n}\n\nexport interface UpcomingBillCardProps {\n /** The seven days of the week strip (exactly 7 items, one for each day). The due day should have `highlighted`. */\n days: [\n UpcomingBillDay,\n UpcomingBillDay,\n UpcomingBillDay,\n UpcomingBillDay,\n UpcomingBillDay,\n UpcomingBillDay,\n UpcomingBillDay,\n ]\n /** Merchant logo/icon (24x24), rendered left of the merchant name. */\n logo: ReactNode\n /** Merchant name, e.g. \"Power Plus\". */\n merchantName: string\n /** Bill amount, formatted (e.g. \"$75.00\"). */\n amount: string\n /** Custom aria-label for the highlighted due date cell (accessibility). Pass a localized string from copy/GlobalCopyStore; defaults to English \"bill due\" if not provided. */\n highlightedAriaLabel?: string\n sx?: SxProps<Theme>\n}\n\n/**\n * Upcoming Bill content: a seven-day week strip with the due day highlighted\n * (blue label + filled blue date cell) above a tinted bill row (merchant logo,\n * name, and amount).\n *\n * Figma: Upcoming Bill Content (Full variant). Scope is the Content section\n * only.\n */\nconst UpcomingBillCard = ({\n amount,\n days,\n highlightedAriaLabel,\n logo,\n merchantName,\n sx,\n}: UpcomingBillCardProps) => {\n return (\n <Box\n sx={{\n bgcolor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 2,\n p: 12,\n ...sx,\n }}\n >\n <Stack sx={{ gap: 12 }}>\n {/* Week strip: labels row + date-cells row, aligned into 7 columns */}\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: 'repeat(7, 1fr)',\n rowGap: '2px',\n }}\n >\n {days.map((day) => (\n <Text\n bold={day.highlighted === true}\n color={day.highlighted === true ? 'primary.main' : 'text.secondary'}\n key={`label-${day.label}-${day.date}`}\n sx={{ textAlign: 'center' }}\n variant=\"caption\"\n >\n {day.label}\n </Text>\n ))}\n {days.map((day) => (\n <Box\n aria-current={day.highlighted === true ? 'date' : undefined}\n aria-label={\n day.highlighted === true\n ? (highlightedAriaLabel ?? `${day.label} ${day.date}, bill due`)\n : undefined\n }\n key={`date-${day.label}-${day.date}`}\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: 36,\n justifyContent: 'center',\n justifySelf: 'center',\n width: 36,\n ...(day.highlighted === true && {\n bgcolor: 'primary.main',\n borderRadius: '4px',\n }),\n }}\n >\n <Text\n color={day.highlighted === true ? 'primary.contrastText' : 'text.secondary'}\n variant=\"body1\"\n >\n {day.date}\n </Text>\n </Box>\n ))}\n </Box>\n\n {/* Bill row */}\n <Stack\n sx={{\n alignItems: 'center',\n // Figma fill: primary.main at 15% opacity (a translucent overlay),\n // with a solid primary.main 1px border.\n backgroundColor: (theme) => alpha(theme.palette.primary.main, 0.15),\n border: '1px solid',\n borderColor: 'primary.main',\n borderRadius: '4px',\n flexDirection: 'row',\n gap: 12,\n justifyContent: 'space-between',\n px: 12,\n py: 10,\n }}\n >\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8, minWidth: 0 }}>\n <Box sx={{ flexShrink: 0, height: 24, width: 24 }}>{logo}</Box>\n <Text color=\"text.primary\" truncate={true} variant=\"subtitle2\">\n {merchantName}\n </Text>\n </Stack>\n <Text color=\"text.primary\" sx={{ flexShrink: 0, fontWeight: 600 }} variant=\"subtitle2\">\n {amount}\n </Text>\n </Stack>\n </Stack>\n </Box>\n )\n}\n\nexport default UpcomingBillCard\n"],"mappings":";;;;;AA+CA,IAAM,IAAA,CAAoB,EACxB,QAAA,GACA,MAAA,GACA,sBAAA,GACA,MAAA,GACA,cAAA,GACA,IAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,KAAK,GAAG;AAAA,IAArB,UAAA,CAEE,gBAAA,EAAC,GAAD;AAAA,MACE,I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;AAAA,QAChB,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MAdF,UAAA,CAgBE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,eAAe;AAAA,UAAO,KAAK;AAAA,UAAG,UAAU;AAAA,QAAE;AAAA,QAA7E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UAAK,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,QAAQ;AAAA,YAAI,OAAO;AAAA,UAAG;AAAA,UAAI,UAAA;AAAA,QAAU,CAAA,GAC9D,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,UAAU;AAAA,UAAM,SAAQ;AAAA,UAChD,UAAA;AAAA,QACG,CAAA,CACD;AAAA,MACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAe,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,YAAY;AAAA,QAAI;AAAA,QAAG,SAAQ;AAAA,QACxE,UAAA;AAAA,MACG,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA;AACJ,CAAA"}
1
+ {"version":3,"file":"UpcomingBillCard.es.js","names":[],"sources":["../../../src/insights-v2/components/UpcomingBillCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nexport interface UpcomingBillDay {\n /** Day-of-week label, e.g. \"Sun\". */\n label: string\n /** Day-of-month number, e.g. \"26\". */\n date: string\n /** Whether this is the highlighted due day (blue label + filled date cell). */\n highlighted?: boolean\n}\n\nexport interface UpcomingBillCardProps {\n days: UpcomingBillDay[]\n /** Merchant logo/icon (24x24), rendered left of the merchant name. */\n logo: ReactNode\n /** Merchant name, e.g. \"Power Plus\". */\n merchantName: string\n /** Bill amount, formatted (e.g. \"$75.00\"). */\n amount: string\n /** Custom aria-label for the highlighted due date cell (accessibility). Pass a localized string from copy/GlobalCopyStore; defaults to English \"bill due\" if not provided. */\n highlightedAriaLabel?: string\n sx?: SxProps<Theme>\n}\n\n/**\n * Upcoming Bill content: a seven-day week strip with the due day highlighted\n * (blue label + filled blue date cell) above a tinted bill row (merchant logo,\n * name, and amount).\n *\n * Figma: Upcoming Bill Content (Full variant). Scope is the Content section\n * only.\n */\nconst UpcomingBillCard = ({\n amount,\n days,\n highlightedAriaLabel,\n logo,\n merchantName,\n sx,\n}: UpcomingBillCardProps) => {\n return (\n <Box\n sx={{\n bgcolor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 2,\n p: 12,\n ...sx,\n }}\n >\n <Stack sx={{ gap: 12 }}>\n {/* Week strip: labels row + date-cells row, aligned into 7 columns */}\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: 'repeat(7, 1fr)',\n rowGap: '2px',\n }}\n >\n {days.map((day) => (\n <Text\n bold={day.highlighted === true}\n color={day.highlighted === true ? 'primary.main' : 'text.secondary'}\n key={`label-${day.label}-${day.date}`}\n sx={{ textAlign: 'center' }}\n variant=\"caption\"\n >\n {day.label}\n </Text>\n ))}\n {days.map((day) => (\n <Box\n aria-current={day.highlighted === true ? 'date' : undefined}\n aria-label={\n day.highlighted === true\n ? (highlightedAriaLabel ?? `${day.label} ${day.date}, bill due`)\n : undefined\n }\n key={`date-${day.label}-${day.date}`}\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: 36,\n justifyContent: 'center',\n justifySelf: 'center',\n width: 36,\n ...(day.highlighted === true && {\n bgcolor: 'primary.main',\n borderRadius: '4px',\n }),\n }}\n >\n <Text\n color={day.highlighted === true ? 'primary.contrastText' : 'text.secondary'}\n variant=\"body1\"\n >\n {day.date}\n </Text>\n </Box>\n ))}\n </Box>\n\n {/* Bill row */}\n <Stack\n sx={{\n alignItems: 'center',\n // Figma fill: primary.main at 15% opacity (a translucent overlay),\n // with a solid primary.main 1px border.\n backgroundColor: (theme) => alpha(theme.palette.primary.main, 0.15),\n border: '1px solid',\n borderColor: 'primary.main',\n borderRadius: '4px',\n flexDirection: 'row',\n gap: 12,\n justifyContent: 'space-between',\n px: 12,\n py: 10,\n }}\n >\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8, minWidth: 0 }}>\n <Box sx={{ flexShrink: 0, height: 24, width: 24 }}>{logo}</Box>\n <Text color=\"text.primary\" truncate={true} variant=\"subtitle2\">\n {merchantName}\n </Text>\n </Stack>\n <Text color=\"text.primary\" sx={{ flexShrink: 0, fontWeight: 600 }} variant=\"subtitle2\">\n {amount}\n </Text>\n </Stack>\n </Stack>\n </Box>\n )\n}\n\nexport default UpcomingBillCard\n"],"mappings":";;;;;AAsCA,IAAM,IAAA,CAAoB,EACxB,QAAA,GACA,MAAA,GACA,sBAAA,GACA,MAAA,GACA,cAAA,GACA,IAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,KAAK,GAAG;AAAA,IAArB,UAAA,CAEE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,qBAAqB;AAAA,QACrB,QAAQ;AAAA,MACV;AAAA,MALF,UAAA,CAOG,EAAK,IAAA,CAAK,MACT,gBAAA,EAAC,GAAD;AAAA,QACE,MAAM,EAAI,gBAAgB;AAAA,QAC1B,OAAO,EAAI,gBAAgB,KAAO,iBAAiB;AAAA,QAEnD,IAAI,EAAE,WAAW,SAAS;AAAA,QAC1B,SAAQ;AAAA,QAEP,UAAA,EAAI;AAAA,MACD,GALC,SAAS,EAAI,KAAA,IAAS,EAAI,IAAA,EAK3B,CACP,GACA,EAAK,IAAA,CA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GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,UAAU;AAAA,UAAM,SAAQ;AAAA,UAChD,UAAA;AAAA,QACG,CAAA,CACD;AAAA,MACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAe,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,YAAY;AAAA,QAAI;AAAA,QAAG,SAAQ;AAAA,QACxE,UAAA;AAAA,MACG,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA;AACJ,CAAA"}
@@ -3,14 +3,14 @@ import { resolveInsightRender as m } from "./resolveInsightRender.es.js";
3
3
  import { useBeatActions as a } from "./beatActions.es.js";
4
4
  import { BAR_ARIA_LABEL as f, BAR_CHART_VARIANTS as e, barChartVariant as n, buildChartData as c, buildDataSeries as l } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
5
5
  import { HOST_ACTIONS as d } from "./ctaActions/hostActions.es.js";
6
- import { useBeatCtaActions as C, useCtaHandler as g } from "./ctaActions/useCtaAction.es.js";
6
+ import { useBeatCtaActions as g, useCtaHandler as C } from "./ctaActions/useCtaAction.es.js";
7
7
  import { BarchartBlock as k } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
8
8
  import { DoubleBarChartBlock as h } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
9
9
  import A from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
10
10
  import L from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
11
- import T from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
12
- import H from "./components/AccountHeroCard.es.js";
13
- import R from "./components/DirectDepositCard.es.js";
11
+ import I from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
12
+ import R from "./components/AccountHeroCard.es.js";
13
+ import O from "./components/DirectDepositCard.es.js";
14
14
  import y, { isLogoGuid as E } from "./components/LogoFromGuid.es.js";
15
15
  import P from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
16
16
  import F from "./components/TransferLogoCard.es.js";
@@ -20,23 +20,23 @@ import { BudgetBlock as W } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlo
20
20
  import q from "./components/DebtPayoffCard.es.js";
21
21
  import J from "./components/InsightTransactionRow.es.js";
22
22
  import Q from "./components/TransactionListCard.es.js";
23
- import Y from "./components/UpcomingBillCard.es.js";
24
- import $ from "./blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js";
25
- import ro from "./blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
23
+ import Y from "./blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
24
+ import $ from "./components/UpcomingBillCard.es.js";
25
+ import ro from "./blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
26
26
  import mo from "./components/SaveAnExtraCard.es.js";
27
27
  import ao from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
28
28
  import fo from "./components/SavingsOpportunityCard.es.js";
29
29
  import no from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
30
30
  import { transactionBlockVariant as lo } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
31
31
  import { TransactionBlock as Bo } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
32
- import go from "./components/AmountPill.es.js";
32
+ import Co from "./components/AmountPill.es.js";
33
33
  import ko from "./components/SubscriptionHeroCard.es.js";
34
34
  import ho from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
35
35
  import Ao from "./components/WithdrawalCard.es.js";
36
36
  import Lo from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
37
- import { SVGImageBlock as To } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
38
- import Ho from "./components/shared/StatusSnackbar.es.js";
39
- import Ro from "./components/FeedbackDialog.es.js";
37
+ import { SVGImageBlock as Io } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
38
+ import Ro from "./components/shared/StatusSnackbar.es.js";
39
+ import Oo from "./components/FeedbackDialog.es.js";
40
40
  import yo from "./components/FeedbackModal.es.js";
41
41
  import Mo from "./components/ConnectionDetailDrillDown.es.js";
42
42
  import _o from "./components/SurveyModal.es.js";
@@ -56,14 +56,14 @@ import { ObsolesceBanner as er } from "./components/ObsolesceBanner.es.js";
56
56
  import cr from "./components/BaseLayout.es.js";
57
57
  import sr from "./components/StatusMessageCard.es.js";
58
58
  import Br from "./components/LogoTile.es.js";
59
- import gr from "./components/LogoClusterCard.es.js";
59
+ import Cr from "./components/LogoClusterCard.es.js";
60
60
  import kr from "./components/MerchantHighlightCard.es.js";
61
61
  import hr from "./components/P2PLogoStack.es.js";
62
62
  export {
63
63
  P as AccountBlock,
64
- H as AccountHeroCard,
64
+ R as AccountHeroCard,
65
65
  x as AccountSwitchBlock,
66
- go as AmountPill,
66
+ Co as AmountPill,
67
67
  f as BAR_ARIA_LABEL,
68
68
  e as BAR_CHART_VARIANTS,
69
69
  No as BadgedTile,
@@ -73,17 +73,17 @@ export {
73
73
  Xo as CompactInsightCard,
74
74
  Mo as ConnectionDetailDrillDown,
75
75
  q as DebtPayoffCard,
76
- ro as DebtsBlock,
76
+ Y as DebtsBlock,
77
77
  Zo as DesignateEmergencySavingsCard,
78
78
  U as DirectDepositBlock,
79
- R as DirectDepositCard,
79
+ O as DirectDepositCard,
80
80
  tr as DismissInsightDialog,
81
81
  L as DonutChartBlock,
82
82
  h as DoubleBarChartBlock,
83
- T as DoubleProgressBarBlock,
83
+ I as DoubleProgressBarBlock,
84
84
  Go as ErrorCard,
85
85
  or as FeedbackBar,
86
- Ro as FeedbackDialog,
86
+ Oo as FeedbackDialog,
87
87
  yo as FeedbackModal,
88
88
  d as HOST_ACTIONS,
89
89
  ir as HiddenConfirmationCard,
@@ -91,14 +91,15 @@ export {
91
91
  zo as InsightOptionsMenu,
92
92
  J as InsightTransactionRow,
93
93
  pr as LoadingCard,
94
- gr as LogoClusterCard,
94
+ Cr as LogoClusterCard,
95
95
  y as LogoFromGuid,
96
96
  Br as LogoTile,
97
97
  kr as MerchantHighlightCard,
98
98
  er as ObsolesceBanner,
99
99
  jo as OverflowMenu,
100
100
  hr as P2PLogoStack,
101
- To as SVGImageBlock,
101
+ ro as RepeatingTransactionBlock,
102
+ Io as SVGImageBlock,
102
103
  mo as SaveAnExtraCard,
103
104
  ao as SaveExtraBlock,
104
105
  no as SavingsOpportunityBlock,
@@ -106,15 +107,15 @@ export {
106
107
  Ko as StatusBadge,
107
108
  sr as StatusMessageCard,
108
109
  r as StatusPill,
109
- Ho as StatusSnackbar,
110
+ Ro as StatusSnackbar,
110
111
  A as StepChartBlock,
111
112
  ko as SubscriptionHeroCard,
112
113
  _o as SurveyModal,
113
114
  Bo as TransactionBlock,
114
115
  Q as TransactionListCard,
115
116
  F as TransferLogoCard,
116
- $ as UpcomingBillBlock,
117
- Y as UpcomingBillCard,
117
+ ro as UpcomingBillBlock,
118
+ $ as UpcomingBillCard,
118
119
  ho as UpcomingSubscriptionBlock,
119
120
  Lo as WithdrawalBlock,
120
121
  Ao as WithdrawalCard,
@@ -125,6 +126,6 @@ export {
125
126
  m as resolveInsightRender,
126
127
  lo as transactionBlockVariant,
127
128
  a as useBeatActions,
128
- C as useBeatCtaActions,
129
- g as useCtaHandler
129
+ g as useBeatCtaActions,
130
+ C as useCtaHandler
130
131
  };
@@ -1,17 +1,17 @@
1
- import { ContactSupportActionBlock as m } from "../actionBlocks/ContactSupportActionBlock.es.js";
1
+ import { ContactSupportActionBlock as p } from "../actionBlocks/ContactSupportActionBlock.es.js";
2
2
  import { hasDrawerBlock as W } from "./hasDrawerBlock.es.js";
3
3
  import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
4
- import { BarchartBlock as p } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
5
- import { DoubleBarChartBlock as l } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
6
- import _ from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
7
- import s from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
8
- import C from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
9
- import k from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
10
- import B from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
11
- import u from "../blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
12
- import { BudgetBlock as T } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
13
- import A from "../blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js";
4
+ import { BarchartBlock as l } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
5
+ import { DoubleBarChartBlock as _ } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
6
+ import s from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
7
+ import C from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
8
+ import k from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
9
+ import B from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
10
+ import u from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
11
+ import T from "../blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
12
+ import { BudgetBlock as A } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
14
13
  import O from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
14
+ import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
15
15
  import f from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
16
16
  import b from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
17
17
  import { TransactionBlock as N } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
@@ -28,9 +28,9 @@ import { getMakeTransferDrawerTitle as E } from "../actionBlocks/MakeTransferAct
28
28
  import { MakeTransferActionBlockLayer as K } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
29
29
  import { getDrawerHeaderTitle as v } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
30
30
  import { TransactionDetailsBlock as M } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
31
- import { useTransactionDetailsPrepare as n } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
31
+ import { useTransactionDetailsPrepare as a } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
32
32
  import { TransactionHistoryBlock as w } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
33
- import { useRecurringTransactionPrepare as a } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
33
+ import { useRecurringTransactionPrepare as c } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
34
34
  import { RecurringTransactionBlock as y } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
35
35
  import { TransactionListBlock as U } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
36
36
  import { RemainingCashBlock as H } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
@@ -67,21 +67,21 @@ var e = (t) => {
67
67
  })),
68
68
  [o.TRANSACTION_DETAILS_ACTION_BLOCK]: r(() => ({
69
69
  Component: M,
70
- usePrepare: n,
70
+ usePrepare: a,
71
71
  title: () => "Transaction Details"
72
72
  })),
73
73
  [o.RECURRING_TRANSACTION_ACTION_BLOCK]: r(() => ({
74
74
  Component: y,
75
- usePrepare: a,
75
+ usePrepare: c,
76
76
  title: (t, i) => i.recurring?.expense_details ?? ""
77
77
  })),
78
78
  [o.REMAINING_CASH_ACTION_BLOCK]: r(() => ({
79
79
  Component: H,
80
- usePrepare: a,
80
+ usePrepare: c,
81
81
  title: (t, i) => i.insights_feed?.remaining_cash?.title ?? ""
82
82
  })),
83
83
  [o.CONTACT_SUPPORT_ACTION_BLOCK]: r(() => ({
84
- Component: m,
84
+ Component: p,
85
85
  usePrepare: e,
86
86
  title: (t, i) => i.help?.request_support ?? ""
87
87
  })),
@@ -106,8 +106,8 @@ var e = (t) => {
106
106
  })),
107
107
  [o.TRANSACTION_LIST_ACTION_BLOCK]: r(() => ({
108
108
  Component: U,
109
- usePrepare: n,
110
- title: (t, i, c) => c?.insights_payload?.title ?? ""
109
+ usePrepare: a,
110
+ title: (t, i, m) => m?.insights_payload?.title ?? ""
111
111
  })),
112
112
  [o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: r(() => ({
113
113
  Component: x,
@@ -115,21 +115,22 @@ var e = (t) => {
115
115
  usePrepare: e
116
116
  }))
117
117
  }, Po = {
118
- account_block: k,
119
- account_switch_block: B,
120
- direct_deposit_block: u,
121
- bar_chart_block: p,
122
- budget_block: T,
118
+ account_block: B,
119
+ account_switch_block: u,
120
+ direct_deposit_block: T,
121
+ bar_chart_block: l,
122
+ budget_block: A,
123
123
  debts_block: O,
124
- donut_chart_block: s,
125
- double_bar_chart_block: l,
126
- double_progress_bar_block: C,
124
+ donut_chart_block: C,
125
+ double_bar_chart_block: _,
126
+ double_progress_bar_block: k,
127
127
  image_block: d,
128
+ repeating_transaction_block: n,
128
129
  save_extra_block: f,
129
130
  savings_opportunity_block: b,
130
- step_chart_block: _,
131
+ step_chart_block: s,
131
132
  svg_image_block: L,
132
- upcoming_bill_block: A,
133
+ upcoming_bill_block: n,
133
134
  upcoming_subscription_block: g,
134
135
  withdrawal_block: I,
135
136
  transaction_block: N
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n DirectDepositBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingBillBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\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 { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\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 ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\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 * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\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 usePrepare: noop,\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 usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.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 [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\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} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DirectDepositBlock,\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 image_block: ImageBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: UpcomingBillBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GA0BjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI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.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n DirectDepositBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\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 { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\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 ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\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 * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\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 usePrepare: noop,\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 usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.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 [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\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} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DirectDepositBlock,\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 image_block: ImageBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAM,IAAA,CAAQ,MAAwB;AA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AAA,EAC7B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.6",
3
+ "version": "9.7.8",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,53 +0,0 @@
1
- import { InsightsPayload } from '../../../../core';
2
- import { UpcomingBillDay } from '../../../components/UpcomingBillCard';
3
- interface UpcomingBillBlockProps {
4
- payload: InsightsPayload;
5
- beatGuid?: string;
6
- }
7
- type SevenDays = [
8
- UpcomingBillDay,
9
- UpcomingBillDay,
10
- UpcomingBillDay,
11
- UpcomingBillDay,
12
- UpcomingBillDay,
13
- UpcomingBillDay,
14
- UpcomingBillDay
15
- ];
16
- /**
17
- * Parse an ISO `YYYY-MM-DD` into a local-time Date, dodging the UTC-midnight parse
18
- * that `new Date('2025-10-30')` performs (which drifts a day in negative offsets).
19
- * Any other string shape (full ISO datetime) falls through to the native parser.
20
- *
21
- * Returns `null` for anything that doesn't resolve to a valid Date — including a
22
- * `YYYY-MM-DD`-shaped string whose year/month/day segments produce `Invalid Date`
23
- * (e.g. `'2026-13-40'`) and arbitrary strings the native parser rejects. Callers
24
- * must handle `null` so a bad backend value cannot propagate `NaN` into the UI
25
- * via `getDay()` and render `NaN` day numbers.
26
- */
27
- export declare const parseDueDate: (iso: string) => Date | null;
28
- /**
29
- * Build the Sun→Sat week around a due date with the due day marked `highlighted`.
30
- * Column index is the local day-of-week (0=Sun..6=Sat) so the strip always lines up
31
- * under the weekday labels regardless of which weekday the bill lands on.
32
- */
33
- export declare const buildWeekStrip: (dueDate: Date) => SevenDays;
34
- /**
35
- * Upcoming Bill component block (Figma: "Full | Upcoming Bill"). Reads `due_date`,
36
- * `amount` and merchant facts off `instance_slot` (V2 flat shape — no
37
- * `instance_slot_data`), derives the Sun→Sat week around the due date, and renders
38
- * the shared `UpcomingBillCard`.
39
- *
40
- * Wrapped in `createVariantBlock` from day one so an added design branch is a new
41
- * registry entry, not a rewrite of dispatch logic. Today only
42
- * `projected_bill_payment` is defined; an unknown variant degrades to it.
43
- *
44
- * Degraded-date rendering: if `due_date` is missing or doesn't parse to a valid
45
- * Date (e.g. `'2026-13-40'`, `''`, an unparseable arbitrary string), the card
46
- * still renders — merchant row + amount — but with a neutral current-week strip
47
- * (no highlighted cell). `UpcomingBillCard` requires a 7-tuple `days` prop so we
48
- * cannot omit the strip without modifying the shared component; the "no highlighted
49
- * cell" fallback keeps the useful info visible without pretending today is the
50
- * due day.
51
- */
52
- declare const UpcomingBillBlock: ({ payload, beatGuid }: UpcomingBillBlockProps) => import("react/jsx-runtime").JSX.Element;
53
- export default UpcomingBillBlock;