@mx-cartographer/experiences 9.7.128 → 9.7.130

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 (92) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/core/types/localization/InsightsFeedCopy.d.ts +11 -15
  3. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +5 -1
  4. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +78 -30
  5. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
  6. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.d.ts +26 -13
  7. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js +107 -136
  8. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js.map +1 -1
  9. package/dist/insights-v2/actionBlocks/AccountListBlock/layout.d.ts +21 -7
  10. package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js +34 -17
  11. package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js.map +1 -1
  12. package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.d.ts +3 -1
  13. package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js +10 -8
  14. package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js.map +1 -1
  15. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +46 -45
  16. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js +23 -22
  18. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/layout.es.js.map +1 -1
  19. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +26 -25
  20. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
  21. package/dist/insights-v2/actionBlocks/HelpBlock/layout.d.ts +0 -1
  22. package/dist/insights-v2/actionBlocks/HelpBlock/layout.es.js +6 -6
  23. package/dist/insights-v2/actionBlocks/HelpBlock/layout.es.js.map +1 -1
  24. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +8 -7
  25. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
  26. package/dist/insights-v2/actionBlocks/OverdraftBlock/layout.es.js +11 -13
  27. package/dist/insights-v2/actionBlocks/OverdraftBlock/layout.es.js.map +1 -1
  28. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.d.ts +10 -12
  29. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js +20 -19
  30. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js.map +1 -1
  31. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/index.d.ts +1 -1
  32. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.d.ts +3 -12
  33. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.es.js +8 -8
  34. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionBlock.es.js.map +1 -1
  35. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.d.ts +9 -0
  36. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js +27 -10
  37. package/dist/insights-v2/actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js.map +1 -1
  38. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.d.ts +1 -7
  39. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +49 -59
  40. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
  41. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js +29 -75
  42. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js.map +1 -1
  43. package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +12 -0
  44. package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +18 -9
  45. package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
  46. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +14 -13
  47. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  48. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +10 -9
  49. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js.map +1 -1
  50. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +0 -3
  51. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +30 -33
  52. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  53. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +31 -30
  54. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
  55. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +14 -14
  56. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +4 -4
  57. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +4 -4
  58. package/dist/insights-v2/blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js +4 -4
  59. package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js +11 -10
  60. package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js.map +1 -1
  61. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +5 -5
  62. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +4 -4
  63. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/EmergencySavingsAccountPicker.es.js +1 -1
  64. package/dist/insights-v2/blocks/slotReaders.d.ts +5 -0
  65. package/dist/insights-v2/blocks/slotReaders.es.js +7 -5
  66. package/dist/insights-v2/blocks/slotReaders.es.js.map +1 -1
  67. package/dist/insights-v2/components/AmountBreakdownCard.es.js +9 -8
  68. package/dist/insights-v2/components/AmountBreakdownCard.es.js.map +1 -1
  69. package/dist/insights-v2/components/InsightListRow.d.ts +31 -0
  70. package/dist/insights-v2/components/InsightListRow.es.js +111 -0
  71. package/dist/insights-v2/components/InsightListRow.es.js.map +1 -0
  72. package/dist/insights-v2/components/SubTabs.d.ts +2 -1
  73. package/dist/insights-v2/components/SubTabs.es.js +10 -10
  74. package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
  75. package/dist/insights-v2/index.es.js +12 -12
  76. package/dist/insights-v2/mappings/blocks.es.js +21 -21
  77. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -1
  78. package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +169 -120
  79. package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js.map +1 -1
  80. package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +3 -1
  81. package/dist/recurringtransactions/components/RecurringTransactionList.es.js +151 -118
  82. package/dist/recurringtransactions/components/RecurringTransactionList.es.js.map +1 -1
  83. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -6
  84. package/dist/transactions/components/shared/TransactionDetails.es.js +149 -199
  85. package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
  86. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +2 -0
  87. package/dist/transactions/components/shared/transactiondetails/Description.es.js +59 -50
  88. package/dist/transactions/components/shared/transactiondetails/Description.es.js.map +1 -1
  89. package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.d.ts +10 -0
  90. package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js +68 -0
  91. package/dist/transactions/components/shared/transactiondetails/TransactionHeaderParts.es.js.map +1 -0
  92. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import { buildDynamicCopy as x } from "../../../../core/utils/Localization.es.js";
2
2
  import { useGlobalCopyStore as y } from "../../../../common/context/hooks.es.js";
3
3
  import { formatCurrency as w } from "../../../../core/utils/NumberFormatting.es.js";
4
- import C, { isLogoGuid as _ } from "../../../components/LogoFromGuid.es.js";
5
- import { asNumber as L, slotOrFlat as h } from "../../slotReaders.es.js";
4
+ import { asNumber as C, slotOrFlat as h } from "../../slotReaders.es.js";
5
+ import _, { isLogoGuid as L } from "../../../components/LogoFromGuid.es.js";
6
6
  import f from "../../../components/LogoTile.es.js";
7
7
  import i from "@mui/material/Stack";
8
8
  import { Text as n } from "@mxenabled/mxui";
9
9
  import { Icon as R } from "@mxenabled/mx-icons";
10
10
  import { jsx as o, jsxs as l } from "react/jsx-runtime";
11
11
  var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r }) => {
12
- if (_(r.logo?.guid)) return /* @__PURE__ */ o(C, {
12
+ if (L(r.logo?.guid)) return /* @__PURE__ */ o(_, {
13
13
  logo: r.logo,
14
14
  size: d
15
15
  });
@@ -24,7 +24,7 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
24
24
  sx: { color: "text.secondary" }
25
25
  });
26
26
  }, B = ({ payload: r }) => {
27
- const e = y().insights_feed?.general, { instance_slot: c = {} } = r, m = L(h(c, "amount"));
27
+ const e = y().insights_feed?.general, { instance_slot: c = {} } = r, m = C(h(c, "amount"));
28
28
  if (m === void 0) return null;
29
29
  const p = h(c, "data_series"), t = (Array.isArray(p) ? p : []).filter(S), u = t.length > g ? t.slice(0, 5) : t, a = t.length - u.length, s = x(e?.more_merchants ?? "", `${a}`) || void 0;
30
30
  return /* @__PURE__ */ o(i, {
@@ -1,7 +1,7 @@
1
1
  import { useAccountStore as g, useInsightsV2Store as p } from "../../../../common/context/hooks.es.js";
2
+ import { asText as t } from "../../slotReaders.es.js";
2
3
  import { ANALYTICS_EVENTS_CONFIG as _ } from "../../../analytics/analyticsEventsConfig.es.js";
3
4
  import { useAnalyticsEvent as v } from "../../../analytics/useAnalyticsEvent.es.js";
4
- import { asText as t } from "../../slotReaders.es.js";
5
5
  import E from "../../../components/DesignateEmergencySavingsCard.es.js";
6
6
  import { observer as S } from "mobx-react-lite";
7
7
  import { jsx as d } from "react/jsx-runtime";
@@ -9,4 +9,9 @@ export type FlatSlotKey = Exclude<keyof InstanceSlot, 'data' | 'block' | 'varian
9
9
  export declare const slotOrFlat: (instanceSlot: InstanceSlot, key: FlatSlotKey) => unknown;
10
10
  /** A finite number, else undefined (so a card never shows a made-up value). */
11
11
  export declare const asNumber: (value: unknown) => number | undefined;
12
+ /** Any string, empty included, else undefined. */
12
13
  export declare const asText: (value: unknown) => string | undefined;
14
+ /** A string with more than whitespace, else undefined: a blank guid or label is no value. */
15
+ export declare const asNonEmptyText: (value: unknown) => string | undefined;
16
+ /** Guids, else undefined: an empty list or a blank guid names nothing to fetch or draw. */
17
+ export declare const asGuidList: (value: unknown) => string[] | undefined;
@@ -1,9 +1,11 @@
1
- import { slot as o } from "../../core/types/Insights.es.js";
2
- var m = (r, t) => o(r.data, t) ?? r[t], s = (r) => typeof r == "number" && Number.isFinite(r) ? r : void 0, a = (r) => typeof r == "string" ? r : void 0;
1
+ import { slot as i } from "../../core/types/Insights.es.js";
2
+ var d = (r, t) => i(r.data, t) ?? r[t], m = (r) => typeof r == "number" && Number.isFinite(r) ? r : void 0, p = (r) => typeof r == "string" ? r : void 0, o = (r) => typeof r == "string" && r.trim() !== "" ? r : void 0, y = (r) => Array.isArray(r) && r.length > 0 && r.every((t) => o(t) !== void 0) ? r : void 0;
3
3
  export {
4
- s as asNumber,
5
- a as asText,
6
- m as slotOrFlat
4
+ y as asGuidList,
5
+ o as asNonEmptyText,
6
+ m as asNumber,
7
+ p as asText,
8
+ d as slotOrFlat
7
9
  };
8
10
 
9
11
  //# sourceMappingURL=slotReaders.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slotReaders.es.js","names":[],"sources":["../../../src/insights-v2/blocks/slotReaders.ts"],"sourcesContent":["import { slot, type InstanceSlot } from '../../core'\n\n/** A field V1 payloads carry flat on the slot, beside `data`. */\nexport type FlatSlotKey = Exclude<keyof InstanceSlot, 'data' | 'block' | 'variant'>\n\n/**\n * `data` first, then the flat field V1 payloads carry beside it. Any non-null `data` value wins,\n * even one of the wrong kind (`data` is the truth; the caller's guard then drops it). For blocks\n * that still accept V1; a V2-only block reads `slot()` so a stale flat field never shows.\n */\nexport const slotOrFlat = (instanceSlot: InstanceSlot, key: FlatSlotKey): unknown =>\n slot(instanceSlot.data, key) ?? instanceSlot[key]\n\n/** A finite number, else undefined (so a card never shows a made-up value). */\nexport const asNumber = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) ? value : undefined\n\nexport const asText = (value: unknown): string | undefined =>\n typeof value === 'string' ? value : undefined\n"],"mappings":";AAUA,IAAa,IAAA,CAAc,GAA4B,MACrD,EAAK,EAAa,MAAM,CAAG,KAAK,EAAa,CAAA,GAGlC,IAAA,CAAY,MACvB,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,IAAI,IAAQ,QAEnD,IAAA,CAAU,MACrB,OAAO,KAAU,WAAW,IAAQ"}
1
+ {"version":3,"file":"slotReaders.es.js","names":[],"sources":["../../../src/insights-v2/blocks/slotReaders.ts"],"sourcesContent":["import { slot, type InstanceSlot } from '../../core'\n\n// Readers for untrusted payload values, in instance slots and drilldown_data: each returns the value\n// when it has the right shape, else undefined, so the caller drops it rather than drawing a guess.\n\n/** A field V1 payloads carry flat on the slot, beside `data`. */\nexport type FlatSlotKey = Exclude<keyof InstanceSlot, 'data' | 'block' | 'variant'>\n\n/**\n * `data` first, then the flat field V1 payloads carry beside it. Any non-null `data` value wins,\n * even one of the wrong kind (`data` is the truth; the caller's guard then drops it). For blocks\n * that still accept V1; a V2-only block reads `slot()` so a stale flat field never shows.\n */\nexport const slotOrFlat = (instanceSlot: InstanceSlot, key: FlatSlotKey): unknown =>\n slot(instanceSlot.data, key) ?? instanceSlot[key]\n\n/** A finite number, else undefined (so a card never shows a made-up value). */\nexport const asNumber = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) ? value : undefined\n\n/** Any string, empty included, else undefined. */\nexport const asText = (value: unknown): string | undefined =>\n typeof value === 'string' ? value : undefined\n\n/** A string with more than whitespace, else undefined: a blank guid or label is no value. */\nexport const asNonEmptyText = (value: unknown): string | undefined =>\n typeof value === 'string' && value.trim() !== '' ? value : undefined\n\n/** Guids, else undefined: an empty list or a blank guid names nothing to fetch or draw. */\nexport const asGuidList = (value: unknown): string[] | undefined =>\n Array.isArray(value) &&\n value.length > 0 &&\n value.every((item) => asNonEmptyText(item) !== undefined)\n ? (value as string[])\n : undefined\n"],"mappings":";AAaA,IAAa,IAAA,CAAc,GAA4B,MACrD,EAAK,EAAa,MAAM,CAAG,KAAK,EAAa,CAAA,GAGlC,IAAA,CAAY,MACvB,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,IAAI,IAAQ,QAGnD,IAAA,CAAU,MACrB,OAAO,KAAU,WAAW,IAAQ,QAGzB,IAAA,CAAkB,MAC7B,OAAO,KAAU,YAAY,EAAM,KAAK,MAAM,KAAK,IAAQ,QAGhD,IAAA,CAAc,MACzB,MAAM,QAAQ,CAAK,KACnB,EAAM,SAAS,KACf,EAAM,MAAA,CAAO,MAAS,EAAe,CAAI,MAAM,MAAS,IACnD,IACD"}
@@ -1,21 +1,22 @@
1
- import { useId as c } from "react";
1
+ import { getLogoElevation as c } from "./logoShadow.es.js";
2
+ import { useId as p } from "react";
2
3
  import e from "@mui/material/Stack";
3
4
  import { Text as t } from "@mxenabled/mxui";
4
5
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import p from "@mui/material/Divider";
6
- var h = ({ rows: o, total: n }) => {
7
- const a = c();
6
+ import m from "@mui/material/Divider";
7
+ var g = ({ rows: o, total: n }) => {
8
+ const a = p();
8
9
  return o.length === 0 ? null : /* @__PURE__ */ i(e, {
9
10
  sx: {
10
11
  bgcolor: "background.paper",
11
12
  borderRadius: "8px",
12
- boxShadow: 1,
13
+ boxShadow: c,
13
14
  gap: 16,
14
15
  p: 16,
15
16
  width: "100%"
16
17
  },
17
18
  children: [/* @__PURE__ */ r(e, {
18
- divider: /* @__PURE__ */ r(p, {
19
+ divider: /* @__PURE__ */ r(m, {
19
20
  "aria-hidden": !0,
20
21
  role: "presentation"
21
22
  }),
@@ -58,7 +59,7 @@ var h = ({ rows: o, total: n }) => {
58
59
  }), /* @__PURE__ */ i(e, {
59
60
  sx: {
60
61
  alignItems: "center",
61
- bgcolor: "background.default",
62
+ bgcolor: "action.hover",
62
63
  borderRadius: "8px",
63
64
  justifyContent: "center",
64
65
  minHeight: 72,
@@ -84,7 +85,7 @@ var h = ({ rows: o, total: n }) => {
84
85
  });
85
86
  };
86
87
  export {
87
- h as default
88
+ g as default
88
89
  };
89
90
 
90
91
  //# sourceMappingURL=AmountBreakdownCard.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AmountBreakdownCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AmountBreakdownCard.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nexport interface AmountBreakdownRow {\n label: ReactNode\n amount: ReactNode\n}\n\nexport interface AmountBreakdownTotal {\n amount: ReactNode\n label: ReactNode\n}\n\nexport interface AmountBreakdownCardProps {\n rows: AmountBreakdownRow[]\n total: AmountBreakdownTotal\n}\n\nconst AmountBreakdownCard = ({ rows, total }: AmountBreakdownCardProps) => {\n const totalLabelId = useId()\n\n if (rows.length === 0) return null\n\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: 1,\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <Stack\n divider={<Divider aria-hidden={true} role=\"presentation\" />}\n role=\"list\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {rows.map((row, index) => (\n <Stack\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n role=\"listitem\"\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'space-between',\n minHeight: 44,\n px: 12,\n py: 14,\n }}\n >\n <Text color=\"text.primary\" truncate={true} variant=\"body1\">\n {row.label}\n </Text>\n <Text\n bold={true}\n color=\"text.primary\"\n sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums', letterSpacing: '-0.15px' }}\n variant=\"body1\"\n >\n {row.amount}\n </Text>\n </Stack>\n ))}\n </Stack>\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.default',\n borderRadius: '8px',\n justifyContent: 'center',\n minHeight: 72,\n p: 12,\n width: '100%',\n }}\n >\n <Text\n aria-describedby={totalLabelId}\n color=\"text.primary\"\n component=\"p\"\n sx={{ fontVariantNumeric: 'tabular-nums' }}\n variant=\"h2\"\n >\n {total.amount}\n </Text>\n <Text\n color=\"text.secondary\"\n component=\"p\"\n id={totalLabelId}\n sx={{ fontWeight: 400 }}\n variant=\"subtitle2\"\n >\n {total.label}\n </Text>\n </Stack>\n </Stack>\n )\n}\n\nexport default AmountBreakdownCard\n"],"mappings":";;;;;AAsBA,IAAM,IAAA,CAAuB,EAAE,MAAA,GAAM,OAAA,EAAA,MAAsC;AACzE,QAAM,IAAe,EAAM;AAE3B,SAAI,EAAK,WAAW,IAAU,OAG5B,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,SAAS;AAAA,MACT,cAAc;AAAA,MACd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,IACT;AAAA,IARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,gBAAA,EAAC,GAAD;AAAA,QAAS,eAAa;AAAA,QAAM,MAAK;AAAA,MAAgB,CAAA;AAAA,MAC1D,MAAK;AAAA,MACL,IAAI;AAAA,QACF,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,UAAU;AAAA,QACV,OAAO;AAAA,MACT;AAAA,MAEC,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,QAGE,MAAK;AAAA,QACL,IAAI;AAAA,UACF,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,KAAK;AAAA,UACL,gBAAgB;AAAA,UAChB,WAAW;AAAA,UACX,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QAZF,UAAA,CAcE,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,UAAU;AAAA,UAAM,SAAQ;AAAA,UAChD,UAAA,EAAI;AAAA,QACD,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,OAAM;AAAA,UACN,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,oBAAoB;AAAA,YAAgB,eAAe;AAAA,UAAU;AAAA,UAClF,SAAQ;AAAA,UAEP,UAAA,EAAI;AAAA,QACD,CAAA,CACD;AAAA,MAvBA,GAAA,CAuBA,CACR;AAAA,IACI,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,WAAW;AAAA,QACX,GAAG;AAAA,QACH,OAAO;AAAA,MACT;AAAA,MATF,UAAA,CAWE,gBAAA,EAAC,GAAD;AAAA,QACE,oBAAkB;AAAA,QAClB,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI,EAAE,oBAAoB,eAAe;AAAA,QACzC,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI,EAAE,YAAY,IAAI;AAAA,QACtB,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA;AAEX"}
1
+ {"version":3,"file":"AmountBreakdownCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AmountBreakdownCard.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\nexport interface AmountBreakdownRow {\n label: ReactNode\n amount: ReactNode\n}\n\nexport interface AmountBreakdownTotal {\n amount: ReactNode\n label: ReactNode\n}\n\nexport interface AmountBreakdownCardProps {\n rows: AmountBreakdownRow[]\n total: AmountBreakdownTotal\n}\n\nconst AmountBreakdownCard = ({ rows, total }: AmountBreakdownCardProps) => {\n const totalLabelId = useId()\n\n if (rows.length === 0) return null\n\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <Stack\n divider={<Divider aria-hidden={true} role=\"presentation\" />}\n role=\"list\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {rows.map((row, index) => (\n <Stack\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n role=\"listitem\"\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'space-between',\n minHeight: 44,\n px: 12,\n py: 14,\n }}\n >\n <Text color=\"text.primary\" truncate={true} variant=\"body1\">\n {row.label}\n </Text>\n <Text\n bold={true}\n color=\"text.primary\"\n sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums', letterSpacing: '-0.15px' }}\n variant=\"body1\"\n >\n {row.amount}\n </Text>\n </Stack>\n ))}\n </Stack>\n\n <Stack\n sx={{\n alignItems: 'center',\n // A theme overlay, so the grey box (Figma) still shows on dark mode's black card.\n bgcolor: 'action.hover',\n borderRadius: '8px',\n justifyContent: 'center',\n minHeight: 72,\n p: 12,\n width: '100%',\n }}\n >\n <Text\n aria-describedby={totalLabelId}\n color=\"text.primary\"\n component=\"p\"\n sx={{ fontVariantNumeric: 'tabular-nums' }}\n variant=\"h2\"\n >\n {total.amount}\n </Text>\n <Text\n color=\"text.secondary\"\n component=\"p\"\n id={totalLabelId}\n sx={{ fontWeight: 400 }}\n variant=\"subtitle2\"\n >\n {total.label}\n </Text>\n </Stack>\n </Stack>\n )\n}\n\nexport default AmountBreakdownCard\n"],"mappings":";;;;;;AAwBA,IAAM,IAAA,CAAuB,EAAE,MAAA,GAAM,OAAA,EAAA,MAAsC;AACzE,QAAM,IAAe,EAAM;AAE3B,SAAI,EAAK,WAAW,IAAU,OAG5B,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,SAAS;AAAA,MACT,cAAc;AAAA,MACd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,IACT;AAAA,IARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,gBAAA,EAAC,GAAD;AAAA,QAAS,eAAa;AAAA,QAAM,MAAK;AAAA,MAAgB,CAAA;AAAA,MAC1D,MAAK;AAAA,MACL,IAAI;AAAA,QACF,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,UAAU;AAAA,QACV,OAAO;AAAA,MACT;AAAA,MAEC,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,QAGE,MAAK;AAAA,QACL,IAAI;AAAA,UACF,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,KAAK;AAAA,UACL,gBAAgB;AAAA,UAChB,WAAW;AAAA,UACX,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QAZF,UAAA,CAcE,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,UAAU;AAAA,UAAM,SAAQ;AAAA,UAChD,UAAA,EAAI;AAAA,QACD,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,OAAM;AAAA,UACN,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,oBAAoB;AAAA,YAAgB,eAAe;AAAA,UAAU;AAAA,UAClF,SAAQ;AAAA,UAEP,UAAA,EAAI;AAAA,QACD,CAAA,CACD;AAAA,MAvBA,GAAA,CAuBA,CACR;AAAA,IACI,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QAEZ,SAAS;AAAA,QACT,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,WAAW;AAAA,QACX,GAAG;AAAA,QACH,OAAO;AAAA,MACT;AAAA,MAVF,UAAA,CAYE,gBAAA,EAAC,GAAD;AAAA,QACE,oBAAkB;AAAA,QAClB,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI,EAAE,oBAAoB,eAAe;AAAA,QACzC,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI,EAAE,YAAY,IAAI;AAAA,QACtB,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA;AAEX"}
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+ export interface InsightListRowProps {
3
+ amount: number;
4
+ isLast: boolean;
5
+ /** The row's 32px logo or icon. */
6
+ leading: ReactNode;
7
+ name: string;
8
+ account?: {
9
+ institutionGuid: string;
10
+ name: string;
11
+ };
12
+ /** Figma: account balances are body2 (13/16); expense amounts keep body1. */
13
+ amountVariant?: 'body1' | 'body2';
14
+ /** Bold name (Account List); Remaining Cash rows use the regular weight. */
15
+ boldName?: boolean;
16
+ caption?: string;
17
+ /** Makes the row a button. */
18
+ onClick?: () => void;
19
+ subtitle?: string;
20
+ /**
21
+ * Where a non-last divider starts: under the logo (24px, the default) or under the text
22
+ * (68px = 24 padding + 32 logo + 12 gap), as the Account List Figma draws it.
23
+ */
24
+ dividerInset?: 'logo' | 'text';
25
+ }
26
+ /**
27
+ * The 64px Figma list row shared by the Remaining Cash and Account List drawers: a 32px leading slot,
28
+ * name over a subtitle or account line, amount over a caption, and a divider (inset unless last).
29
+ */
30
+ declare const InsightListRow: ({ account, amount, amountVariant, boldName, caption, dividerInset, isLast, leading, name, onClick, subtitle, }: InsightListRowProps) => import("react/jsx-runtime").JSX.Element;
31
+ export default InsightListRow;
@@ -0,0 +1,111 @@
1
+ import { formatSignedCurrency as u } from "../../core/utils/NumberFormatting.es.js";
2
+ import o from "@mui/material/Stack";
3
+ import { InstitutionLogo as g, Text as i } from "@mxenabled/mxui";
4
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
5
+ import s from "@mui/material/Box";
6
+ import v from "@mui/material/Divider";
7
+ import b from "@mui/material/ButtonBase";
8
+ var y = {
9
+ logo: 24,
10
+ text: 68
11
+ }, V = ({ account: e, amount: d, amountVariant: m = "body1", boldName: x = !1, caption: l, dividerInset: c = "logo", isLast: h, leading: f, name: p, onClick: n, subtitle: a }) => /* @__PURE__ */ r(s, {
12
+ component: "li",
13
+ sx: { position: "relative" },
14
+ children: [/* @__PURE__ */ r(o, {
15
+ component: n ? b : "div",
16
+ onClick: n,
17
+ sx: {
18
+ alignItems: "center",
19
+ flexDirection: "row",
20
+ gap: 12,
21
+ minHeight: 64,
22
+ px: 24,
23
+ py: 12,
24
+ textAlign: "left",
25
+ width: "100%",
26
+ ...n && {
27
+ "&:hover": { bgcolor: "action.hover" },
28
+ "&.Mui-focusVisible": { bgcolor: "action.focus" }
29
+ }
30
+ },
31
+ children: [
32
+ /* @__PURE__ */ t(s, {
33
+ sx: {
34
+ display: "flex",
35
+ flexShrink: 0,
36
+ height: 32,
37
+ width: 32
38
+ },
39
+ children: f
40
+ }),
41
+ /* @__PURE__ */ r(o, {
42
+ sx: {
43
+ flexGrow: 1,
44
+ minWidth: 0
45
+ },
46
+ children: [
47
+ /* @__PURE__ */ t(i, {
48
+ bold: x,
49
+ truncate: !0,
50
+ variant: "body1",
51
+ children: p
52
+ }),
53
+ a && /* @__PURE__ */ t(i, {
54
+ color: "text.primary",
55
+ variant: "caption",
56
+ children: a
57
+ }),
58
+ e && /* @__PURE__ */ r(o, {
59
+ sx: {
60
+ alignItems: "center",
61
+ flexDirection: "row",
62
+ gap: 6,
63
+ minWidth: 0
64
+ },
65
+ children: [e.institutionGuid && /* @__PURE__ */ t(g, {
66
+ alt: "",
67
+ institutionGuid: e.institutionGuid,
68
+ size: 12
69
+ }), /* @__PURE__ */ t(i, {
70
+ color: "text.secondary",
71
+ truncate: !0,
72
+ variant: "caption",
73
+ children: e.name
74
+ })]
75
+ })
76
+ ]
77
+ }),
78
+ /* @__PURE__ */ r(o, {
79
+ sx: {
80
+ alignItems: "flex-end",
81
+ flexShrink: 0
82
+ },
83
+ children: [/* @__PURE__ */ t(i, {
84
+ bold: !0,
85
+ sx: {
86
+ flexShrink: 0,
87
+ fontVariantNumeric: "tabular-nums"
88
+ },
89
+ variant: m,
90
+ children: u(d)
91
+ }), l && /* @__PURE__ */ t(i, {
92
+ bold: !0,
93
+ color: "text.secondary",
94
+ sx: { textTransform: "uppercase" },
95
+ variant: "caption",
96
+ children: l
97
+ })]
98
+ })
99
+ ]
100
+ }), /* @__PURE__ */ t(v, { sx: {
101
+ bottom: 0,
102
+ left: h ? 0 : y[c],
103
+ position: "absolute",
104
+ right: 0
105
+ } })]
106
+ });
107
+ export {
108
+ V as default
109
+ };
110
+
111
+ //# sourceMappingURL=InsightListRow.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightListRow.es.js","names":[],"sources":["../../../src/insights-v2/components/InsightListRow.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport ButtonBase from '@mui/material/ButtonBase'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport { formatSignedCurrency } from '../../core/utils/NumberFormatting'\n\nexport interface InsightListRowProps {\n amount: number\n isLast: boolean\n /** The row's 32px logo or icon. */\n leading: ReactNode\n name: string\n account?: { institutionGuid: string; name: string }\n /** Figma: account balances are body2 (13/16); expense amounts keep body1. */\n amountVariant?: 'body1' | 'body2'\n /** Bold name (Account List); Remaining Cash rows use the regular weight. */\n boldName?: boolean\n caption?: string\n /** Makes the row a button. */\n onClick?: () => void\n subtitle?: string\n /**\n * Where a non-last divider starts: under the logo (24px, the default) or under the text\n * (68px = 24 padding + 32 logo + 12 gap), as the Account List Figma draws it.\n */\n dividerInset?: 'logo' | 'text'\n}\n\nconst DIVIDER_INSET = { logo: 24, text: 68 } as const\n\n/**\n * The 64px Figma list row shared by the Remaining Cash and Account List drawers: a 32px leading slot,\n * name over a subtitle or account line, amount over a caption, and a divider (inset unless last).\n */\nconst InsightListRow = ({\n account,\n amount,\n amountVariant = 'body1',\n boldName = false,\n caption,\n dividerInset = 'logo',\n isLast,\n leading,\n name,\n onClick,\n subtitle,\n}: InsightListRowProps) => (\n <Box component=\"li\" sx={{ position: 'relative' }}>\n <Stack\n component={onClick ? ButtonBase : 'div'}\n onClick={onClick}\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 12,\n minHeight: 64,\n px: 24,\n py: 12,\n textAlign: 'left',\n width: '100%',\n ...(onClick && {\n '&:hover': { bgcolor: 'action.hover' },\n '&.Mui-focusVisible': { bgcolor: 'action.focus' },\n }),\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0, height: 32, width: 32 }}>{leading}</Box>\n <Stack sx={{ flexGrow: 1, minWidth: 0 }}>\n <Text bold={boldName} truncate={true} variant=\"body1\">\n {name}\n </Text>\n {subtitle && (\n // Figma: the \"Available Balance\" subtitle is text.primary, unlike the expense account line.\n <Text color=\"text.primary\" variant=\"caption\">\n {subtitle}\n </Text>\n )}\n {account && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 6, minWidth: 0 }}>\n {account.institutionGuid && (\n <InstitutionLogo alt=\"\" institutionGuid={account.institutionGuid} size={12} />\n )}\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {account.name}\n </Text>\n </Stack>\n )}\n </Stack>\n <Stack sx={{ alignItems: 'flex-end', flexShrink: 0 }}>\n <Text\n bold={true}\n sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums' }}\n variant={amountVariant}\n >\n {formatSignedCurrency(amount)}\n </Text>\n {caption && (\n <Text\n bold={true}\n color=\"text.secondary\"\n sx={{ textTransform: 'uppercase' }}\n variant=\"caption\"\n >\n {caption}\n </Text>\n )}\n </Stack>\n </Stack>\n <Divider\n sx={{\n bottom: 0,\n left: isLast ? 0 : DIVIDER_INSET[dividerInset],\n position: 'absolute',\n right: 0,\n }}\n />\n </Box>\n)\n\nexport default InsightListRow\n"],"mappings":";;;;;;;AAiCA,IAAM,IAAgB;AAAA,EAAE,MAAM;AAAA,EAAI,MAAM;AAAG,GAMrC,IAAA,CAAkB,EACtB,SAAA,GACA,QAAA,GACA,eAAA,IAAgB,SAChB,UAAA,IAAW,IACX,SAAA,GACA,cAAA,IAAe,QACf,QAAA,GACA,SAAA,GACA,MAAA,GACA,SAAA,GACA,UAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EAAK,WAAU;AAAA,EAAK,IAAI,EAAE,UAAU,WAAW;AAAA,EAA/C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,IAAU,IAAa;AAAA,IACzB,SAAA;AAAA,IACT,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,KAAK;AAAA,MACL,WAAW;AAAA,MACX,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,OAAO;AAAA,MACP,GAAI,KAAW;AAAA,QACb,WAAW,EAAE,SAAS,eAAe;AAAA,QACrC,sBAAsB,EAAE,SAAS,eAAe;AAAA,MAClD;AAAA,IACF;AAAA,IAhBF,UAAA;AAAA,MAkBE,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,YAAY;AAAA,UAAG,QAAQ;AAAA,UAAI,OAAO;AAAA,QAAG;AAAA,QAAI,UAAA;AAAA,MAAa,CAAA;AAAA,MAClF,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,UAAU;AAAA,UAAG,UAAU;AAAA,QAAE;AAAA,QAAtC,UAAA;AAAA,UACE,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAU,UAAU;AAAA,YAAM,SAAQ;AAAA,YAC3C,UAAA;AAAA,UACG,CAAA;AAAA,UACL,KAEC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAe,SAAQ;AAAA,YAChC,UAAA;AAAA,UACG,CAAA;AAAA,UAEP,KACC,gBAAA,EAAC,GAAD;AAAA,YAAO,IAAI;AAAA,cAAE,YAAY;AAAA,cAAU,eAAe;AAAA,cAAO,KAAK;AAAA,cAAG,UAAU;AAAA,YAAE;AAAA,YAA7E,UAAA,CACG,EAAQ,mBACP,gBAAA,EAAC,GAAD;AAAA,cAAiB,KAAI;AAAA,cAAG,iBAAiB,EAAQ;AAAA,cAAiB,MAAM;AAAA,YAAK,CAAA,GAE/E,gBAAA,EAAC,GAAD;AAAA,cAAM,OAAM;AAAA,cAAiB,UAAU;AAAA,cAAM,SAAQ;AAAA,cAClD,UAAA,EAAQ;AAAA,YACL,CAAA,CACD;AAAA;QAEJ;AAAA;MACP,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAY,YAAY;AAAA,QAAE;AAAA,QAAnD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,oBAAoB;AAAA,UAAe;AAAA,UACxD,SAAS;AAAA,UAER,UAAA,EAAqB,CAAM;AAAA,QACxB,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,OAAM;AAAA,UACN,IAAI,EAAE,eAAe,YAAY;AAAA,UACjC,SAAQ;AAAA,UAEP,UAAA;AAAA,QACG,CAAA,CAEH;AAAA;IACF;AAAA,EACP,CAAA,GAAA,gBAAA,EAAC,GAAD,EACE,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,MAAM,IAAS,IAAI,EAAc,CAAA;AAAA,IACjC,UAAU;AAAA,IACV,OAAO;AAAA,EACT,EACD,CAAA,CACE"}
@@ -8,6 +8,7 @@ export interface SubTabsProps {
8
8
  selectedIndex: number;
9
9
  onChange: (index: number) => void;
10
10
  ariaLabel?: string;
11
+ isTypeFilter?: boolean;
11
12
  }
12
13
  /** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */
13
14
  export declare const subTabPanelProps: (id: string, selectedIndex: number) => {
@@ -19,4 +20,4 @@ export declare const subTabPanelProps: (id: string, selectedIndex: number) => {
19
20
  * The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's
20
21
  * "Transactions Filtered By Type" on a change, so every drawer that uses it keeps legacy analytics.
21
22
  */
22
- export declare const SubTabs: ({ id, tabs, selectedIndex, onChange, ariaLabel }: SubTabsProps) => import("react/jsx-runtime").JSX.Element | null;
23
+ export declare const SubTabs: ({ id, tabs, selectedIndex, onChange, ariaLabel, isTypeFilter, }: SubTabsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,21 +1,21 @@
1
- import { ANALYTICS_EVENTS_CONFIG as u } from "../analytics/analyticsEventsConfig.es.js";
2
- import { useAnalyticsEvent as T } from "../analytics/useAnalyticsEvent.es.js";
1
+ import { ANALYTICS_EVENTS_CONFIG as T } from "../analytics/analyticsEventsConfig.es.js";
2
+ import { useAnalyticsEvent as f } from "../analytics/useAnalyticsEvent.es.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  import v from "@mui/material/Tab";
5
5
  import E from "@mui/material/Tabs";
6
- var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`, I = (a, l) => ({
6
+ var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`, _ = (a, l) => ({
7
7
  "aria-labelledby": i(a, l),
8
8
  id: o(a),
9
9
  role: "tabpanel"
10
- }), _ = ({ id: a, tabs: l, selectedIndex: t, onChange: b, ariaLabel: m }) => {
11
- const p = T();
10
+ }), x = ({ id: a, tabs: l, selectedIndex: t, onChange: b, ariaLabel: m, isTypeFilter: p = !0 }) => {
11
+ const s = f();
12
12
  if (!l.length) return null;
13
- const s = (r, e) => {
14
- p(u.TYPE_FILTER_SELECTED), b(e);
13
+ const u = (r, e) => {
14
+ p && s(T.TYPE_FILTER_SELECTED), b(e);
15
15
  };
16
16
  return /* @__PURE__ */ n(E, {
17
17
  "aria-label": m ?? l.map((r) => r.label).join(" / "),
18
- onChange: s,
18
+ onChange: u,
19
19
  value: t,
20
20
  variant: "fullWidth",
21
21
  children: l.map((r, e) => /* @__PURE__ */ n(v, {
@@ -31,8 +31,8 @@ var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`, I = (a, l) => ({
31
31
  });
32
32
  };
33
33
  export {
34
- _ as SubTabs,
35
- I as subTabPanelProps
34
+ x as SubTabs,
35
+ _ as subTabPanelProps
36
36
  };
37
37
 
38
38
  //# sourceMappingURL=SubTabs.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubTabs.es.js","names":[],"sources":["../../../src/insights-v2/components/SubTabs.tsx"],"sourcesContent":["import type React from 'react'\n\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\n\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\n\nexport interface SubTabItem {\n label: string\n // Screen-reader name when it differs from the visible label (legacy pulse: \"Spend transactions\").\n ariaLabel?: string\n}\n\nexport interface SubTabsProps {\n // Base id: tab N is `${id}-tab-N` and controls `${id}-panel`; render that panel with subTabPanelProps.\n id: string\n tabs: SubTabItem[]\n selectedIndex: number\n onChange: (index: number) => void\n // Tablist name; defaults to the visible labels joined (\"Spend / Income\").\n ariaLabel?: string\n}\n\nconst subTabId = (id: string, index: number) => `${id}-tab-${index}`\nconst subPanelId = (id: string) => `${id}-panel`\n\n/** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */\nexport const subTabPanelProps = (id: string, selectedIndex: number) => ({\n 'aria-labelledby': subTabId(id, selectedIndex),\n id: subPanelId(id),\n role: 'tabpanel' as const,\n})\n\n/**\n * The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's\n * \"Transactions Filtered By Type\" on a change, so every drawer that uses it keeps legacy analytics.\n */\nexport const SubTabs = ({ id, tabs, selectedIndex, onChange, ariaLabel }: SubTabsProps) => {\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n if (!tabs.length) return null\n\n // MUI only calls onChange for a different tab, never on mount (legacy parity).\n const handleChange = (_event: React.SyntheticEvent, index: number) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TYPE_FILTER_SELECTED)\n onChange(index)\n }\n\n return (\n <Tabs\n aria-label={ariaLabel ?? tabs.map((tab) => tab.label).join(' / ')}\n onChange={handleChange}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs.map((tab, index) => (\n <Tab\n aria-controls={subPanelId(id)}\n aria-label={tab.ariaLabel}\n id={subTabId(id, index)}\n key={tab.label}\n label={tab.label}\n sx={{ minWidth: 'auto', px: 0 }}\n />\n ))}\n </Tabs>\n )\n}\n"],"mappings":";;;;;AAuBA,IAAM,IAAA,CAAY,GAAY,MAAkB,GAAG,CAAA,QAAU,CAAA,IACvD,IAAA,CAAc,MAAe,GAAG,CAAA,UAGzB,IAAA,CAAoB,GAAY,OAA2B;AAAA,EACtE,mBAAmB,EAAS,GAAI,CAAa;AAAA,EAC7C,IAAI,EAAW,CAAE;AAAA,EACjB,MAAM;AACR,IAMa,IAAA,CAAW,EAAE,IAAA,GAAI,MAAA,GAAM,eAAA,GAAe,UAAA,GAAU,WAAA,EAAA,MAA8B;AACzF,QAAM,IAAqB,EAAkB;AAE7C,MAAI,CAAC,EAAK,OAAQ,QAAO;AAGzB,QAAM,IAAA,CAAgB,GAA8B,MAAkB;AACpE,IAAA,EAAmB,EAAwB,oBAAoB,GAC/D,EAAS,CAAK;AAAA,EAChB;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,cAAY,KAAa,EAAK,IAAA,CAAK,MAAQ,EAAI,KAAK,EAAE,KAAK,KAAK;AAAA,IAChE,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAQ;AAAA,IAEP,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,MACE,iBAAe,EAAW,CAAE;AAAA,MAC5B,cAAY,EAAI;AAAA,MAChB,IAAI,EAAS,GAAI,CAAK;AAAA,MAEtB,OAAO,EAAI;AAAA,MACX,IAAI;AAAA,QAAE,UAAU;AAAA,QAAQ,IAAI;AAAA,MAAE;AAAA,IAC/B,GAHM,EAAI,KAGV,CACF;AAAA,EACG,CAAA;AAEV"}
1
+ {"version":3,"file":"SubTabs.es.js","names":[],"sources":["../../../src/insights-v2/components/SubTabs.tsx"],"sourcesContent":["import type React from 'react'\n\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\n\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\n\nexport interface SubTabItem {\n label: string\n // Screen-reader name when it differs from the visible label (legacy pulse: \"Spend transactions\").\n ariaLabel?: string\n}\n\nexport interface SubTabsProps {\n // Base id: tab N is `${id}-tab-N` and controls `${id}-panel`; render that panel with subTabPanelProps.\n id: string\n tabs: SubTabItem[]\n selectedIndex: number\n onChange: (index: number) => void\n // Tablist name; defaults to the visible labels joined (\"Spend / Income\").\n ariaLabel?: string\n // False for tabs that aren't a transaction-type filter: no \"Filtered By Type\" event.\n isTypeFilter?: boolean\n}\n\nconst subTabId = (id: string, index: number) => `${id}-tab-${index}`\nconst subPanelId = (id: string) => `${id}-panel`\n\n/** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */\nexport const subTabPanelProps = (id: string, selectedIndex: number) => ({\n 'aria-labelledby': subTabId(id, selectedIndex),\n id: subPanelId(id),\n role: 'tabpanel' as const,\n})\n\n/**\n * The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's\n * \"Transactions Filtered By Type\" on a change, so every drawer that uses it keeps legacy analytics.\n */\nexport const SubTabs = ({\n id,\n tabs,\n selectedIndex,\n onChange,\n ariaLabel,\n isTypeFilter = true,\n}: SubTabsProps) => {\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n if (!tabs.length) return null\n\n // MUI only calls onChange for a different tab, never on mount (legacy parity).\n const handleChange = (_event: React.SyntheticEvent, index: number) => {\n if (isTypeFilter) fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TYPE_FILTER_SELECTED)\n onChange(index)\n }\n\n return (\n <Tabs\n aria-label={ariaLabel ?? tabs.map((tab) => tab.label).join(' / ')}\n onChange={handleChange}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs.map((tab, index) => (\n <Tab\n aria-controls={subPanelId(id)}\n aria-label={tab.ariaLabel}\n id={subTabId(id, index)}\n key={tab.label}\n label={tab.label}\n sx={{ minWidth: 'auto', px: 0 }}\n />\n ))}\n </Tabs>\n )\n}\n"],"mappings":";;;;;AAyBA,IAAM,IAAA,CAAY,GAAY,MAAkB,GAAG,CAAA,QAAU,CAAA,IACvD,IAAA,CAAc,MAAe,GAAG,CAAA,UAGzB,IAAA,CAAoB,GAAY,OAA2B;AAAA,EACtE,mBAAmB,EAAS,GAAI,CAAa;AAAA,EAC7C,IAAI,EAAW,CAAE;AAAA,EACjB,MAAM;AACR,IAMa,IAAA,CAAW,EACtB,IAAA,GACA,MAAA,GACA,eAAA,GACA,UAAA,GACA,WAAA,GACA,cAAA,IAAe,GAAA,MACG;AAClB,QAAM,IAAqB,EAAkB;AAE7C,MAAI,CAAC,EAAK,OAAQ,QAAO;AAGzB,QAAM,IAAA,CAAgB,GAA8B,MAAkB;AACpE,IAAI,KAAc,EAAmB,EAAwB,oBAAoB,GACjF,EAAS,CAAK;AAAA,EAChB;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,cAAY,KAAa,EAAK,IAAA,CAAK,MAAQ,EAAI,KAAK,EAAE,KAAK,KAAK;AAAA,IAChE,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAQ;AAAA,IAEP,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,MACE,iBAAe,EAAW,CAAE;AAAA,MAC5B,cAAY,EAAI;AAAA,MAChB,IAAI,EAAS,GAAI,CAAK;AAAA,MAEtB,OAAO,EAAI;AAAA,MACX,IAAI;AAAA,QAAE,UAAU;AAAA,QAAQ,IAAI;AAAA,MAAE;AAAA,IAC/B,GAHM,EAAI,KAGV,CACF;AAAA,EACG,CAAA;AAEV"}
@@ -57,12 +57,12 @@ import sr from "./components/ConnectionDetailDrillDown.es.js";
57
57
  import Br from "./components/SurveyModal.es.js";
58
58
  import Cr from "./components/InsightErrorCard.es.js";
59
59
  import { ErrorCard as kr } from "./components/ErrorCard.es.js";
60
- import Dr from "./components/BadgedTile.es.js";
61
- import { OverflowMenu as Ar } from "./components/OverflowMenu.es.js";
62
- import { InsightOptionsMenu as Ir } from "./components/InsightOptionsMenu.es.js";
63
- import Tr from "./components/StatusBadge.es.js";
64
- import yr from "./components/CompactInsightCard.es.js";
65
- import Rr from "./components/AmountBreakdownCard.es.js";
60
+ import Dr from "./components/AmountBreakdownCard.es.js";
61
+ import Ar from "./components/BadgedTile.es.js";
62
+ import { OverflowMenu as Ir } from "./components/OverflowMenu.es.js";
63
+ import { InsightOptionsMenu as Tr } from "./components/InsightOptionsMenu.es.js";
64
+ import yr from "./components/StatusBadge.es.js";
65
+ import Rr from "./components/CompactInsightCard.es.js";
66
66
  import { FeedbackBar as Hr } from "./components/FeedbackBar.es.js";
67
67
  import { DismissInsightDialog as Or } from "./components/DismissInsightDialog.es.js";
68
68
  import { HiddenConfirmationCard as Er } from "./components/HiddenConfirmationCard.es.js";
@@ -73,15 +73,15 @@ export {
73
73
  W as AccountBlock,
74
74
  M as AccountHeroCard,
75
75
  J as AccountSwitchBlock,
76
- Rr as AmountBreakdownCard,
76
+ Dr as AmountBreakdownCard,
77
77
  Co as AmountPill,
78
78
  e as BAR_ARIA_LABEL,
79
79
  f as BAR_CHART_VARIANTS,
80
- Dr as BadgedTile,
80
+ Ar as BadgedTile,
81
81
  D as BarchartBlock,
82
82
  Ur as BaseLayout,
83
83
  Q as BudgetBlock,
84
- yr as CompactInsightCard,
84
+ Rr as CompactInsightCard,
85
85
  sr as ConnectionDetailDrillDown,
86
86
  Y as DebtPayoffCard,
87
87
  mo as DebtsBlock,
@@ -103,7 +103,7 @@ export {
103
103
  d as HOST_ACTIONS,
104
104
  Er as HiddenConfirmationCard,
105
105
  Cr as InsightErrorCard,
106
- Ir as InsightOptionsMenu,
106
+ Tr as InsightOptionsMenu,
107
107
  $ as InsightTransactionRow,
108
108
  _r as LoadingCard,
109
109
  Bo as LogoClusterCard,
@@ -113,7 +113,7 @@ export {
113
113
  ko as MerchantHighlightCard,
114
114
  Io as NoSpendDaysBlock,
115
115
  xr as ObsolesceBanner,
116
- Ar as OverflowMenu,
116
+ Ir as OverflowMenu,
117
117
  Do as P2PLogoStack,
118
118
  yo as RepeatingTransactionBlock,
119
119
  ir as SVGImageBlock,
@@ -122,7 +122,7 @@ export {
122
122
  Eo as SavingsOpportunityBlock,
123
123
  Oo as SavingsOpportunityCard,
124
124
  _o as SavingsSummaryBlock,
125
- Tr as StatusBadge,
125
+ yr as StatusBadge,
126
126
  xo as StatusMessageCard,
127
127
  r as StatusPill,
128
128
  pr as StatusSnackbar,
@@ -48,16 +48,16 @@ import { TransactionListBlock as X } from "../actionBlocks/TransactionListBlock/
48
48
  import { RemainingCashBlock as $ } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
49
49
  import { AmountInputModalBlock as p } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
50
50
  import { OverdraftBlock as oo, useOverdraftPrepare as to } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
51
- import { AccountListBlock as ro } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
52
- import { useAccountListPrepare as eo } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
53
- import { EmergencySavingsBlock as io } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
54
- import { CreditUtilizationBlock as ao } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
55
- import { useCreditUtilizationPrepare as no } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
56
- import { PayoffCalculatorBlock as mo, usePayoffCalculatorPrepare as co } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
57
- import { BudgetDetailsBlock as lo } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
58
- import { useBudgetDetailsPrepare as po } from "../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare.es.js";
59
- import { AccountDetailsBlock as _o } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
60
- import { useAccountDetailsPrepare as so } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
51
+ import { AccountDetailsBlock as ro } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
52
+ import { useAccountDetailsPrepare as eo } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
53
+ import { AccountListBlock as io } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
54
+ import { useAccountListPrepare as ao } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
55
+ import { EmergencySavingsBlock as no } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
56
+ import { CreditUtilizationBlock as mo } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
57
+ import { useCreditUtilizationPrepare as co } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
58
+ import { PayoffCalculatorBlock as lo, usePayoffCalculatorPrepare as po } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
59
+ import { BudgetDetailsBlock as _o } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
60
+ import { useBudgetDetailsPrepare as so } from "../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare.es.js";
61
61
  var i = (e) => {
62
62
  }, t = (e) => ({
63
63
  get Component() {
@@ -156,37 +156,37 @@ var i = (e) => {
156
156
  title: (e, r, a) => a?.insights_payload?.title ?? ""
157
157
  })),
158
158
  [o.CREDIT_UTILIZATION_ACTION_BLOCK]: t(() => ({
159
- Component: ao,
160
- usePrepare: no,
159
+ Component: mo,
160
+ usePrepare: co,
161
161
  title: (e, r) => r.insights_feed?.credit_utilization?.title ?? ""
162
162
  })),
163
163
  [o.EMERGENCY_SAVINGS_ACTION_BLOCK]: t(() => ({
164
- Component: io,
164
+ Component: no,
165
165
  usePrepare: i,
166
166
  title: (e, r, a) => a?.insights_payload?.title ?? ""
167
167
  })),
168
168
  [o.PAYOFF_CALCULATOR_ACTION_BLOCK]: t(() => ({
169
- Component: mo,
170
- usePrepare: co,
169
+ Component: lo,
170
+ usePrepare: po,
171
171
  title: (e, r) => r.insights_feed?.payoff_calculator?.title ?? ""
172
172
  })),
173
173
  [o.BUDGET_DETAILS_ACTION_BLOCK]: t(() => ({
174
- Component: lo,
174
+ Component: _o,
175
175
  headerAction: "close",
176
- usePrepare: po,
176
+ usePrepare: so,
177
177
  title: (e, r, a) => {
178
178
  const n = a ? C(e, a, r) : void 0;
179
179
  return n && r.budgets?.details_type_title ? _(r.budgets.details_type_title, n) : a?.insights_payload?.title || r.budgets?.details_title || "";
180
180
  }
181
181
  })),
182
182
  [o.ACCOUNT_DETAILS_ACTION_BLOCK]: t(() => ({
183
- Component: _o,
184
- usePrepare: so,
183
+ Component: ro,
184
+ usePrepare: eo,
185
185
  title: (e, r) => r.accounts?.account_details ?? ""
186
186
  })),
187
187
  [o.ACCOUNT_LIST_ACTION_BLOCK]: t(() => ({
188
- Component: ro,
189
- usePrepare: eo,
188
+ Component: io,
189
+ usePrepare: ao,
190
190
  title: (e, r) => r.insights_feed?.account_list?.title ?? ""
191
191
  })),
192
192
  [o.HELP_ACTION_BLOCK]: t(() => ({
@@ -1,10 +1,12 @@
1
1
  import { Recurrence, RepeatingTransaction } from '../../core';
2
2
  interface RecurringTransactionDetailsProps {
3
+ /** `insights`: the Insights Expense Details design; default: the Recurring Transactions widget's view. */
4
+ layout?: 'default' | 'insights';
3
5
  onDeleted: () => void;
4
6
  recurringTransaction: RepeatingTransaction;
5
7
  selectedRecurrence: Recurrence | null;
6
8
  }
7
- export declare const RecurringTransactionDetails: (({ onDeleted, recurringTransaction, selectedRecurrence }: RecurringTransactionDetailsProps) => import("react/jsx-runtime").JSX.Element) & {
9
+ export declare const RecurringTransactionDetails: (({ layout, onDeleted, recurringTransaction, selectedRecurrence, }: RecurringTransactionDetailsProps) => import("react/jsx-runtime").JSX.Element) & {
8
10
  displayName: string;
9
11
  };
10
12
  export {};