@mx-cartographer/experiences 9.7.58 → 9.7.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [9.7.60] - 10-28-2026
2
+
3
+ - **CHANGED** - Simplified the Insights 2.0 Transaction List summary drawer (WEC-2138, follow-up to MEW2-3379): dropped the `useMemo` around `readSummary` in `TransactionListBlock` (now a plain call). The pill count comes from the CTA's `drilldown_data.count` (pluralized via `buildPluralCopy`), falling back to the named guid count; `transaction_count` / `transaction_count_one` stay optional with an English default until the localized-content service ships them. The summary card is now **Replenish Savings only** and its tile shows the `savings` icon
4
+ - **FIXED** - Weekly New Merchants (MEW2-3379) no longer opens the Replenish Savings summary card: its "View Transactions" CTA now opens the Transaction List drawer as a plain date-grouped list (CTA variant `standard`, not `summary_header`)
5
+
6
+ ## [9.7.59] - 10-28-2026
7
+
8
+ - **ADDED** - Deposit banner deep-link support (MEW-3904): `Banner` handles `deep_link_type` `DIRECT_DEPOSIT` (1) alongside `CONNECT`, rendering an in-app button that records the click and posts a new `atomicTransact` host message for the host to open the deposit flow. Adds `ACTIONABLE_INTEGRATION_TYPE` / `ACTIONABLE_INTEGRATION_SOURCES`; inert until longbow surfaces `deep_link_type` (MEW-3904)
9
+
1
10
  ## [9.7.58] - 10-28-2026
2
11
 
3
12
  - **CHANGED** - `merchant_block` adds the `highlight`, `single_subscription`, `multiple_subscription` and `multiple_badged` variants, matches the rest to Figma, and removes `single_large`, `single_error` and `multiple_error` (MEW2-3372)
@@ -10,7 +19,6 @@
10
19
  - **FIXED** - The Upcoming Bill drawer draws a bar for each paid bill even when it is older than the transaction store's 90-day window: the block's open-time prepare hook fetches the paid bills the store lacks by guid (new `TransactionStore.loadTransactionsByGuids`, over `TransactionApi.getTransactionsByGuids`), as pulse's `BeatShell` loads a legacy beat's transactions. A drilldown registry entry opts in with the new `fetchMissingTransactions(beat)` function, which returns the guids from wherever its beat keeps them (`upcoming_bill`: `drilldown_data.transaction_guids`, narrowed with `guidListOf`), and the fetch runs after the 90-day window load so that load cannot replace the older bills. A bar's date is the bill's UTC calendar day, so it no longer names the day before the row's date west of UTC (WEC-1962)
11
20
  - **ADDED** - Drilldown registry entries take an optional `beatTransactions` resolver, alongside `slotData`, that builds the drawer's transactions from the beat's own. Upcoming Bill's (`resolveUpcomingBillTransactions`) appends the projected bill (`buildProjectedBillTransaction`, on `PROJECTED_BILL_GUID`) last, so the bars (`buildUpcomingBillSeries`) and the projected tab's row read one list; the block (`splitProjectedTransaction`) keeps it out of the list and the CSV export and hands it to `TransactionDrillDown` as the projected row only when the selected tab's filter matches it (WEC-1962)
12
21
  - **ADDED** - Upcoming Bill fixture (`UpcomingBillPayload.json`, the full envelope in tupac's shape; `miniBeats` derives the mini with its own guid) and the `InsightsV2/Insights/UpcomingBill` story: full and mini cards and the open "View Details" drawer (WEC-1962)
13
-
14
22
  ## [9.7.56] - 10-27-2026
15
23
 
16
24
  - **ADDED** - Monthly Non-Essential Category Summary's "View more" drawer on Insights 2.0 (MEW2-3375): the `transaction_history_block` `non_essential_category_summary` row, a tabs-only drawer (no chart, no month tabs) with one side tab per `series` row (Non-essential / Essential) that lists that side's `aggregated_guids` within its month. Fixtures (`mock/BlockBeatsData/NonEssentialCategorySummary*.ts`), drawer stories, contract test and the block doc
@@ -1,47 +1,50 @@
1
- import { useEvent as f, useGlobalCopyStore as g, useGlobalStore as C } from "../context/hooks.es.js";
2
- import { ANALYTICS_EVENTS as s } from "../constants/Analytics.es.js";
3
- import { CONNECT_WIDGET_SOURCES as b, DEEP_LINK_TYPE as y } from "../constants/Connect.es.js";
4
- import E from "./ConnectDrawer.es.js";
1
+ import { useEvent as N, useGlobalCopyStore as y, useGlobalStore as T, useHostMessage as b } from "../context/hooks.es.js";
2
+ import { ANALYTICS_EVENTS as p } from "../constants/Analytics.es.js";
3
+ import { ACTIONABLE_INTEGRATION_SOURCES as k, ACTIONABLE_INTEGRATION_TYPE as I, CONNECT_WIDGET_SOURCES as h, DEEP_LINK_TYPE as _ } from "../constants/Connect.es.js";
4
+ import S from "./ConnectDrawer.es.js";
5
5
  import t from "react";
6
- import { observer as h } from "mobx-react-lite";
7
- import k from "@mui/material/Stack";
8
- import { jsx as r, jsxs as N } from "react/jsx-runtime";
9
- import { useTheme as S } from "@mui/material/styles";
10
- var P = h(() => {
11
- const d = S(), { appDataStore: { banner: e, loadBanner: p, markBannerClicked: m, user: u } } = C(), { onEvent: n } = f(), { connect: _ } = g(), [o, i] = t.useState(!1);
6
+ import { observer as A } from "mobx-react-lite";
7
+ import B from "@mui/material/Stack";
8
+ import { jsx as r, jsxs as R } from "react/jsx-runtime";
9
+ import { useTheme as O } from "@mui/material/styles";
10
+ var j = A(() => {
11
+ const u = O(), { appDataStore: { banner: e, loadBanner: m, markBannerClicked: n, user: f } } = T(), { onEvent: o } = N(), { sendHostMessage: E } = b(), { connect: g } = y(), [i, l] = t.useState(!1);
12
12
  if (t.useEffect(() => {
13
- p();
14
- }, [u]), t.useEffect(() => {
15
- e?.image_url && n(s.BANNER_VIEW, {
13
+ m();
14
+ }, [f]), t.useEffect(() => {
15
+ e?.image_url && o(p.BANNER_VIEW, {
16
16
  banner_guid: e.guid,
17
17
  deep_link_type: e.deep_link_type
18
18
  });
19
19
  }, [e?.guid, e?.image_url]), !e?.image_url) return null;
20
- const l = e.deep_link_type === y.CONNECT, a = () => {
21
- n(s.BANNER_CLICK, {
20
+ const s = e.deep_link_type === _.CONNECT, a = e.deep_link_type === _.DIRECT_DEPOSIT, C = s || a, c = () => {
21
+ o(p.BANNER_CLICK, {
22
22
  banner_guid: e.guid,
23
23
  deep_link_type: e.deep_link_type
24
- }), l && (e.guid && m(e.guid), i(!0));
25
- }, c = /* @__PURE__ */ r("img", {
24
+ }), s ? (e.guid && n(e.guid), l(!0)) : a && (e.guid && n(e.guid), E("atomicTransact", {
25
+ integration_type: I.DIRECT_DEPOSIT,
26
+ source: k.BANNER
27
+ }));
28
+ }, d = /* @__PURE__ */ r("img", {
26
29
  alt: "",
27
30
  referrerPolicy: "no-referrer",
28
31
  src: e.image_url,
29
32
  style: {
30
33
  width: "100%",
31
34
  height: "auto",
32
- border: `1px solid ${d.palette.grey[300]}`,
35
+ border: `1px solid ${u.palette.grey[300]}`,
33
36
  display: "block"
34
37
  }
35
38
  });
36
- return /* @__PURE__ */ N(t.Fragment, { children: [/* @__PURE__ */ r(k, {
39
+ return /* @__PURE__ */ R(t.Fragment, { children: [/* @__PURE__ */ r(B, {
37
40
  sx: {
38
41
  alignItems: "center",
39
42
  width: "100%",
40
43
  mb: 24
41
44
  },
42
- children: l ? /* @__PURE__ */ r("button", {
45
+ children: C ? /* @__PURE__ */ r("button", {
43
46
  "aria-label": "Banner",
44
- onClick: a,
47
+ onClick: c,
45
48
  style: {
46
49
  background: "none",
47
50
  border: "none",
@@ -51,11 +54,11 @@ var P = h(() => {
51
54
  width: "100%"
52
55
  },
53
56
  type: "button",
54
- children: c
57
+ children: d
55
58
  }) : /* @__PURE__ */ r("a", {
56
59
  "aria-label": "Banner",
57
60
  href: e.redirect_url,
58
- onClick: a,
61
+ onClick: c,
59
62
  referrerPolicy: "no-referrer",
60
63
  rel: "noopener noreferrer",
61
64
  style: {
@@ -63,17 +66,17 @@ var P = h(() => {
63
66
  width: "100%"
64
67
  },
65
68
  target: "_blank",
66
- children: c
69
+ children: d
67
70
  })
68
- }), o && /* @__PURE__ */ r(E, {
69
- onClose: () => i(!1),
70
- showConnectWidget: o,
71
- source: b.BANNER,
72
- title: _?.mini_title ?? ""
71
+ }), i && /* @__PURE__ */ r(S, {
72
+ onClose: () => l(!1),
73
+ showConnectWidget: i,
74
+ source: h.BANNER,
75
+ title: g?.mini_title ?? ""
73
76
  })] });
74
77
  });
75
78
  export {
76
- P as Banner
79
+ j as Banner
77
80
  };
78
81
 
79
82
  //# sourceMappingURL=Banner.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.es.js","names":[],"sources":["../../../src/common/components/Banner.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { useTheme } from '@mui/material/styles'\nimport Stack from '@mui/material/Stack'\n\nimport ConnectDrawer from './ConnectDrawer'\nimport { useGlobalCopyStore, useGlobalStore } from '..'\nimport { useEvent } from '../context/hooks'\nimport { ANALYTICS_EVENTS, CONNECT_WIDGET_SOURCES, DEEP_LINK_TYPE } from '../constants'\n\nexport const Banner = observer(() => {\n const theme = useTheme()\n const {\n appDataStore: { banner, loadBanner, markBannerClicked, user },\n } = useGlobalStore()\n const { onEvent } = useEvent()\n const { connect: connectCopy } = useGlobalCopyStore()\n const [showConnectWidget, setShowConnectWidget] = React.useState(false)\n\n React.useEffect(() => {\n void loadBanner()\n }, [user])\n\n React.useEffect(() => {\n if (banner?.image_url) {\n onEvent(ANALYTICS_EVENTS.BANNER_VIEW, {\n banner_guid: banner.guid,\n deep_link_type: banner.deep_link_type,\n })\n }\n }, [banner?.guid, banner?.image_url])\n\n if (!banner?.image_url) {\n return null\n }\n\n const isConnect = banner.deep_link_type === DEEP_LINK_TYPE.CONNECT\n\n const handleClick = () => {\n onEvent(ANALYTICS_EVENTS.BANNER_CLICK, {\n banner_guid: banner.guid,\n deep_link_type: banner.deep_link_type,\n })\n\n if (isConnect) {\n // Record the click server-side (see AppDataStore.markBannerClicked).\n if (banner.guid) markBannerClicked(banner.guid)\n setShowConnectWidget(true)\n }\n }\n\n const image = (\n <img\n alt=\"\"\n referrerPolicy=\"no-referrer\"\n src={banner.image_url}\n style={{\n width: '100%',\n height: 'auto',\n border: `1px solid ${theme.palette.grey['300']}`,\n display: 'block',\n }}\n />\n )\n\n return (\n <React.Fragment>\n <Stack\n sx={{\n alignItems: 'center',\n width: '100%',\n mb: 24,\n }}\n >\n {isConnect ? (\n // Connect opens the drawer in-app, so render a button with no href/target:\n // there is no external destination to middle-click or open in a new tab,\n // so every interaction is forced through onClick.\n <button\n aria-label=\"Banner\"\n onClick={handleClick}\n style={{\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'block',\n padding: 0,\n width: '100%',\n }}\n type=\"button\"\n >\n {image}\n </button>\n ) : (\n // Every other type (incl. today's API, which omits deep_link_type) is a\n // real external link, keeping native middle-click / open-in-new-tab.\n <a\n aria-label=\"Banner\"\n href={banner.redirect_url}\n onClick={handleClick}\n referrerPolicy=\"no-referrer\"\n rel=\"noopener noreferrer\"\n style={{ display: 'block', width: '100%' }}\n target=\"_blank\"\n >\n {image}\n </a>\n )}\n </Stack>\n {showConnectWidget && (\n <ConnectDrawer\n onClose={() => setShowConnectWidget(false)}\n showConnectWidget={showConnectWidget}\n source={CONNECT_WIDGET_SOURCES.BANNER}\n title={connectCopy?.mini_title ?? ''}\n />\n )}\n </React.Fragment>\n )\n})\n"],"mappings":";;;;;;;;;AAWA,IAAa,IAAS,EAAA,MAAe;AACnC,QAAM,IAAQ,EAAS,GACjB,EACJ,cAAc,EAAE,QAAA,GAAQ,YAAA,GAAY,mBAAA,GAAmB,MAAA,EAAA,EAAA,IACrD,EAAe,GACb,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,SAAS,EAAA,IAAgB,EAAmB,GAC9C,CAAC,GAAmB,CAAA,IAAwB,EAAM,SAAS,EAAK;AAetE,MAbA,EAAM,UAAA,MAAgB;AACpB,IAAA,EAAgB;AAAA,EAClB,GAAG,CAAC,CAAI,CAAC,GAET,EAAM,UAAA,MAAgB;AACpB,IAAI,GAAQ,aACV,EAAQ,EAAiB,aAAa;AAAA,MACpC,aAAa,EAAO;AAAA,MACpB,gBAAgB,EAAO;AAAA,IACzB,CAAC;AAAA,EAEL,GAAG,CAAC,GAAQ,MAAM,GAAQ,SAAS,CAAC,GAEhC,CAAC,GAAQ,UACX,QAAO;AAGT,QAAM,IAAY,EAAO,mBAAmB,EAAe,SAErD,IAAA,MAAoB;AACxB,IAAA,EAAQ,EAAiB,cAAc;AAAA,MACrC,aAAa,EAAO;AAAA,MACpB,gBAAgB,EAAO;AAAA,IACzB,CAAC,GAEG,MAEE,EAAO,QAAM,EAAkB,EAAO,IAAI,GAC9C,EAAqB,EAAI;AAAA,EAE7B,GAEM,IACJ,gBAAA,EAAC,OAAD;AAAA,IACE,KAAI;AAAA,IACJ,gBAAe;AAAA,IACf,KAAK,EAAO;AAAA,IACZ,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ,aAAa,EAAM,QAAQ,KAAK,GAAA,CAAA;AAAA,MACxC,SAAS;AAAA,IACX;AAAA,EACD,CAAA;AAGH,SACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,IAAI;AAAA,IACN;AAAA,IAEC,UAAA,IAIC,gBAAA,EAAC,UAAD;AAAA,MACE,cAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,MACA,MAAK;AAAA,MAEJ,UAAA;AAAA,IACK,CAAA,IAIR,gBAAA,EAAC,KAAD;AAAA,MACE,cAAW;AAAA,MACX,MAAM,EAAO;AAAA,MACb,SAAS;AAAA,MACT,gBAAe;AAAA,MACf,KAAI;AAAA,MACJ,OAAO;AAAA,QAAE,SAAS;AAAA,QAAS,OAAO;AAAA,MAAO;AAAA,MACzC,QAAO;AAAA,MAEN,UAAA;AAAA,IACA,CAAA;AAAA,EAEA,CAAA,GACN,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,SAAA,MAAe,EAAqB,EAAK;AAAA,IACtB,mBAAA;AAAA,IACnB,QAAQ,EAAuB;AAAA,IAC/B,OAAO,GAAa,cAAc;AAAA,EACnC,CAAA,CAEW,EAAA,CAAA;AAEpB,CAAC"}
1
+ {"version":3,"file":"Banner.es.js","names":[],"sources":["../../../src/common/components/Banner.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { useTheme } from '@mui/material/styles'\nimport Stack from '@mui/material/Stack'\n\nimport ConnectDrawer from './ConnectDrawer'\nimport { useGlobalCopyStore, useGlobalStore } from '..'\nimport { useEvent, useHostMessage } from '../context/hooks'\nimport {\n ACTIONABLE_INTEGRATION_SOURCES,\n ACTIONABLE_INTEGRATION_TYPE,\n ANALYTICS_EVENTS,\n CONNECT_WIDGET_SOURCES,\n DEEP_LINK_TYPE,\n} from '../constants'\n\nexport const Banner = observer(() => {\n const theme = useTheme()\n const {\n appDataStore: { banner, loadBanner, markBannerClicked, user },\n } = useGlobalStore()\n const { onEvent } = useEvent()\n const { sendHostMessage } = useHostMessage()\n const { connect: connectCopy } = useGlobalCopyStore()\n const [showConnectWidget, setShowConnectWidget] = React.useState(false)\n\n React.useEffect(() => {\n void loadBanner()\n }, [user])\n\n React.useEffect(() => {\n if (banner?.image_url) {\n onEvent(ANALYTICS_EVENTS.BANNER_VIEW, {\n banner_guid: banner.guid,\n deep_link_type: banner.deep_link_type,\n })\n }\n }, [banner?.guid, banner?.image_url])\n\n if (!banner?.image_url) {\n return null\n }\n\n const isConnect = banner.deep_link_type === DEEP_LINK_TYPE.CONNECT\n const isDeposit = banner.deep_link_type === DEEP_LINK_TYPE.DIRECT_DEPOSIT\n // Both deep-link types act in-app (no external destination), so they render a\n // button rather than an anchor.\n const isInApp = isConnect || isDeposit\n\n const handleClick = () => {\n onEvent(ANALYTICS_EVENTS.BANNER_CLICK, {\n banner_guid: banner.guid,\n deep_link_type: banner.deep_link_type,\n })\n\n // Deep-link paths skip `redirect_url`, so record the click server-side here\n // (see AppDataStore.markBannerClicked).\n if (isConnect) {\n if (banner.guid) markBannerClicked(banner.guid)\n setShowConnectWidget(true)\n } else if (isDeposit) {\n if (banner.guid) markBannerClicked(banner.guid)\n // The dialog is a host construct, so ask the host to run the flow rather\n // than opening it here.\n sendHostMessage('atomicTransact', {\n integration_type: ACTIONABLE_INTEGRATION_TYPE.DIRECT_DEPOSIT,\n source: ACTIONABLE_INTEGRATION_SOURCES.BANNER,\n })\n }\n }\n\n const image = (\n <img\n alt=\"\"\n referrerPolicy=\"no-referrer\"\n src={banner.image_url}\n style={{\n width: '100%',\n height: 'auto',\n border: `1px solid ${theme.palette.grey['300']}`,\n display: 'block',\n }}\n />\n )\n\n return (\n <React.Fragment>\n <Stack\n sx={{\n alignItems: 'center',\n width: '100%',\n mb: 24,\n }}\n >\n {isInApp ? (\n // In-app deep links (Connect drawer, deposit dialog) have no external\n // destination to middle-click or open in a new tab, so render a button\n // with no href/target and force every interaction through onClick.\n <button\n aria-label=\"Banner\"\n onClick={handleClick}\n style={{\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'block',\n padding: 0,\n width: '100%',\n }}\n type=\"button\"\n >\n {image}\n </button>\n ) : (\n // Every other type (incl. today's API, which omits deep_link_type) is a\n // real external link, keeping native middle-click / open-in-new-tab.\n <a\n aria-label=\"Banner\"\n href={banner.redirect_url}\n onClick={handleClick}\n referrerPolicy=\"no-referrer\"\n rel=\"noopener noreferrer\"\n style={{ display: 'block', width: '100%' }}\n target=\"_blank\"\n >\n {image}\n </a>\n )}\n </Stack>\n {showConnectWidget && (\n <ConnectDrawer\n onClose={() => setShowConnectWidget(false)}\n showConnectWidget={showConnectWidget}\n source={CONNECT_WIDGET_SOURCES.BANNER}\n title={connectCopy?.mini_title ?? ''}\n />\n )}\n </React.Fragment>\n )\n})\n"],"mappings":";;;;;;;;;AAiBA,IAAa,IAAS,EAAA,MAAe;AACnC,QAAM,IAAQ,EAAS,GACjB,EACJ,cAAc,EAAE,QAAA,GAAQ,YAAA,GAAY,mBAAA,GAAmB,MAAA,EAAA,EAAA,IACrD,EAAe,GACb,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,iBAAA,EAAA,IAAoB,EAAe,GACrC,EAAE,SAAS,EAAA,IAAgB,EAAmB,GAC9C,CAAC,GAAmB,CAAA,IAAwB,EAAM,SAAS,EAAK;AAetE,MAbA,EAAM,UAAA,MAAgB;AACpB,IAAA,EAAgB;AAAA,EAClB,GAAG,CAAC,CAAI,CAAC,GAET,EAAM,UAAA,MAAgB;AACpB,IAAI,GAAQ,aACV,EAAQ,EAAiB,aAAa;AAAA,MACpC,aAAa,EAAO;AAAA,MACpB,gBAAgB,EAAO;AAAA,IACzB,CAAC;AAAA,EAEL,GAAG,CAAC,GAAQ,MAAM,GAAQ,SAAS,CAAC,GAEhC,CAAC,GAAQ,UACX,QAAO;AAGT,QAAM,IAAY,EAAO,mBAAmB,EAAe,SACrD,IAAY,EAAO,mBAAmB,EAAe,gBAGrD,IAAU,KAAa,GAEvB,IAAA,MAAoB;AACxB,IAAA,EAAQ,EAAiB,cAAc;AAAA,MACrC,aAAa,EAAO;AAAA,MACpB,gBAAgB,EAAO;AAAA,IACzB,CAAC,GAIG,KACE,EAAO,QAAM,EAAkB,EAAO,IAAI,GAC9C,EAAqB,EAAI,KAChB,MACL,EAAO,QAAM,EAAkB,EAAO,IAAI,GAG9C,EAAgB,kBAAkB;AAAA,MAChC,kBAAkB,EAA4B;AAAA,MAC9C,QAAQ,EAA+B;AAAA,IACzC,CAAC;AAAA,EAEL,GAEM,IACJ,gBAAA,EAAC,OAAD;AAAA,IACE,KAAI;AAAA,IACJ,gBAAe;AAAA,IACf,KAAK,EAAO;AAAA,IACZ,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ,aAAa,EAAM,QAAQ,KAAK,GAAA,CAAA;AAAA,MACxC,SAAS;AAAA,IACX;AAAA,EACD,CAAA;AAGH,SACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,IAAI;AAAA,IACN;AAAA,IAEC,UAAA,IAIC,gBAAA,EAAC,UAAD;AAAA,MACE,cAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,MACA,MAAK;AAAA,MAEJ,UAAA;AAAA,IACK,CAAA,IAIR,gBAAA,EAAC,KAAD;AAAA,MACE,cAAW;AAAA,MACX,MAAM,EAAO;AAAA,MACb,SAAS;AAAA,MACT,gBAAe;AAAA,MACf,KAAI;AAAA,MACJ,OAAO;AAAA,QAAE,SAAS;AAAA,QAAS,OAAO;AAAA,MAAO;AAAA,MACzC,QAAO;AAAA,MAEN,UAAA;AAAA,IACA,CAAA;AAAA,EAEA,CAAA,GACN,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,SAAA,MAAe,EAAqB,EAAK;AAAA,IACtB,mBAAA;AAAA,IACnB,QAAQ,EAAuB;AAAA,IAC/B,OAAO,GAAa,cAAc;AAAA,EACnC,CAAA,CAEW,EAAA,CAAA;AAEpB,CAAC"}
@@ -5,8 +5,15 @@ export declare enum MemberConnectionStatus {
5
5
  Error = "error"
6
6
  }
7
7
  export declare const DEEP_LINK_TYPE: {
8
+ readonly DIRECT_DEPOSIT: 1;
8
9
  readonly CONNECT: 2;
9
10
  };
11
+ export declare const ACTIONABLE_INTEGRATION_TYPE: {
12
+ readonly DIRECT_DEPOSIT: "direct-deposit";
13
+ };
14
+ export declare const ACTIONABLE_INTEGRATION_SOURCES: {
15
+ readonly BANNER: "deposit_banner";
16
+ };
10
17
  export declare const CONNECT_WIDGET_SOURCES: {
11
18
  readonly BANNER: "banner";
12
19
  };
@@ -1,12 +1,17 @@
1
- var E = "connect_widget", N = "connections_widget", _ = /* @__PURE__ */ (function(r) {
2
- return r.Loading = "loading", r.Error = "error", r;
3
- })({}), n = { CONNECT: 2 }, C = { BANNER: "banner" };
1
+ var N = "connect_widget", T = "connections_widget", r = /* @__PURE__ */ (function(E) {
2
+ return E.Loading = "loading", E.Error = "error", E;
3
+ })({}), I = {
4
+ DIRECT_DEPOSIT: 1,
5
+ CONNECT: 2
6
+ }, _ = { DIRECT_DEPOSIT: "direct-deposit" }, C = { BANNER: "deposit_banner" }, O = { BANNER: "banner" };
4
7
  export {
5
- N as CONNECTIONS_WIDGET_ID,
6
- E as CONNECT_WIDGET_ID,
7
- C as CONNECT_WIDGET_SOURCES,
8
- n as DEEP_LINK_TYPE,
9
- _ as MemberConnectionStatus
8
+ C as ACTIONABLE_INTEGRATION_SOURCES,
9
+ _ as ACTIONABLE_INTEGRATION_TYPE,
10
+ T as CONNECTIONS_WIDGET_ID,
11
+ N as CONNECT_WIDGET_ID,
12
+ O as CONNECT_WIDGET_SOURCES,
13
+ I as DEEP_LINK_TYPE,
14
+ r as MemberConnectionStatus
10
15
  };
11
16
 
12
17
  //# sourceMappingURL=Connect.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Connect.es.js","names":[],"sources":["../../../src/common/constants/Connect.ts"],"sourcesContent":["export const CONNECT_WIDGET_ID = 'connect_widget'\nexport const CONNECTIONS_WIDGET_ID = 'connections_widget'\n\n// Connection state shared by the foundational `common` layer (ConnectDrawer /\n// ConnectStatus) and the accounts widget. Lives in `common` so `common` does not\n// have to depend on `accounts` (which created a common->accounts layering\n// violation and blocked per-widget code splitting).\nexport enum MemberConnectionStatus {\n Loading = 'loading',\n Error = 'error',\n}\n\n// In-app destination advertised by a banner ad (`Banner.deep_link_type`). Value\n// matches bullseye's DeepLinkType enum (CONNECT_WIDGET = 2). Longbow does not\n// surface it in the banner response yet, so until it does every banner falls\n// back to its external `redirect_url` and this path stays inert.\nexport const DEEP_LINK_TYPE = {\n CONNECT: 2,\n} as const\n\n// Entry point a ConnectDrawer was opened from, sent as `source` on the\n// connect-widget lifecycle events. Call sites with no source emit no events.\nexport const CONNECT_WIDGET_SOURCES = {\n BANNER: 'banner',\n} as const\n\nexport type ConnectWidgetSource =\n (typeof CONNECT_WIDGET_SOURCES)[keyof typeof CONNECT_WIDGET_SOURCES]\n"],"mappings":"AAAA,IAAa,IAAoB,kBACpB,IAAwB,sBAMzB,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,UAAA,WACA,EAAA,QAAA;AACF,GAAA,CAAA,CAAA,GAMa,IAAiB,EAC5B,SAAS,EACX,GAIa,IAAyB,EACpC,QAAQ,SACV"}
1
+ {"version":3,"file":"Connect.es.js","names":[],"sources":["../../../src/common/constants/Connect.ts"],"sourcesContent":["export const CONNECT_WIDGET_ID = 'connect_widget'\nexport const CONNECTIONS_WIDGET_ID = 'connections_widget'\n\n// Connection state shared by the foundational `common` layer (ConnectDrawer /\n// ConnectStatus) and the accounts widget. Lives in `common` so `common` does not\n// have to depend on `accounts` (which created a common->accounts layering\n// violation and blocked per-widget code splitting).\nexport enum MemberConnectionStatus {\n Loading = 'loading',\n Error = 'error',\n}\n\n// In-app destination advertised by a banner ad (`Banner.deep_link_type`). Values\n// match bullseye's DeepLinkType enum (DIRECT_DEPOSIT_FLOW = 1, CONNECT_WIDGET = 2).\n// Longbow does not surface deep_link_type in the banner response yet, so until it\n// does every banner falls back to its external `redirect_url` and these paths stay\n// inert.\nexport const DEEP_LINK_TYPE = {\n DIRECT_DEPOSIT: 1,\n CONNECT: 2,\n} as const\n\n// Launch target for the host-run actionable-integration (Atomic) flow, sent as\n// `integration_type` on the `atomicTransact` host message. The deployed widget\n// only supports deposit today.\nexport const ACTIONABLE_INTEGRATION_TYPE = {\n DIRECT_DEPOSIT: 'direct-deposit',\n} as const\n\n// Entry point for the actionable-integration flow, sent as `source` so the host\n// can attribute its deposit funnel (mirrors CONNECT_WIDGET_SOURCES).\nexport const ACTIONABLE_INTEGRATION_SOURCES = {\n BANNER: 'deposit_banner',\n} as const\n\n// Entry point a ConnectDrawer was opened from, sent as `source` on the\n// connect-widget lifecycle events. Call sites with no source emit no events.\nexport const CONNECT_WIDGET_SOURCES = {\n BANNER: 'banner',\n} as const\n\nexport type ConnectWidgetSource =\n (typeof CONNECT_WIDGET_SOURCES)[keyof typeof CONNECT_WIDGET_SOURCES]\n"],"mappings":"AAAA,IAAa,IAAoB,kBACpB,IAAwB,sBAMzB,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,UAAA,WACA,EAAA,QAAA;AACF,GAAA,CAAA,CAAA,GAOa,IAAiB;AAAA,EAC5B,gBAAgB;AAAA,EAChB,SAAS;AACX,GAKa,IAA8B,EACzC,gBAAgB,iBAClB,GAIa,IAAiC,EAC5C,QAAQ,iBACV,GAIa,IAAyB,EACpC,QAAQ,SACV"}
@@ -1,5 +1,5 @@
1
1
  export { ANALYTICS_EVENTS } from './Analytics';
2
- export { CONNECT_WIDGET_ID, CONNECT_WIDGET_SOURCES, CONNECTIONS_WIDGET_ID, DEEP_LINK_TYPE, MemberConnectionStatus, } from './Connect';
2
+ export { ACTIONABLE_INTEGRATION_SOURCES, ACTIONABLE_INTEGRATION_TYPE, CONNECT_WIDGET_ID, CONNECT_WIDGET_SOURCES, CONNECTIONS_WIDGET_ID, DEEP_LINK_TYPE, MemberConnectionStatus, } from './Connect';
3
3
  export type { ConnectWidgetSource } from './Connect';
4
4
  export { INCOME_ACCOUNT_TYPES, PAYMENT_ACCOUNT_TYPES, SPENDING_ACCOUNT_TYPES } from './Account';
5
5
  export { RECURRENCE_COPY } from './ScheduledPayment';
@@ -3,156 +3,158 @@ import i, { CalendarSelectionTypes as m } from "./components/calendar/Calendar.e
3
3
  import a from "./components/charts/StatusBar.es.js";
4
4
  import p from "./components/charts/Donut.es.js";
5
5
  import u from "./hooks/useAccountDisplayName.es.js";
6
- import { useCombineEvents as C, useCombinePageviews as S } from "./hooks/useCombineEvents.es.js";
7
- import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
8
- import { WidgetContainerContext as d, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
9
- import { useAccountStore as I, useActionContext as N, useAgreementStore as P, useAppConfig as A, useBudgetsStore as y, useCashflowStore as O, useCategoryStore as b, useDebtStore as W, useError as L, useEvent as G, useFinstrongStore as R, useGlobalCopyStore as U, useGlobalStore as v, useGlobalUiStore as B, useGoalStore as h, useHelpStore as w, useHoldingStore as x, useHostMessage as M, useInsightsV2Store as Y, useLoad as H, useMerchantStore as F, useNetWorthStore as V, useNotificationStore as z, usePageView as Z, useRecurringTransactionsStore as K, useSettingsStore as k, useTransactionStore as q, useTrendsStore as X, useUserStore as j, useWidgetContainerProvider as J } from "./context/hooks.es.js";
6
+ import { useCombineEvents as l, useCombinePageviews as S } from "./hooks/useCombineEvents.es.js";
7
+ import { GlobalDataContext as g, GlobalDataProvider as E } from "./context/GlobalDataProvider.es.js";
8
+ import { WidgetContainerContext as d, WidgetContainerProvider as _ } from "./context/WidgetContainerProvider.es.js";
9
+ import { useAccountStore as N, useActionContext as D, useAgreementStore as A, useAppConfig as O, useBudgetsStore as P, useCashflowStore as y, useCategoryStore as L, useDebtStore as b, useError as G, useEvent as R, useFinstrongStore as W, useGlobalCopyStore as U, useGlobalStore as B, useGlobalUiStore as v, useGoalStore as Y, useHelpStore as h, useHoldingStore as w, useHostMessage as x, useInsightsV2Store as M, useLoad as H, useMerchantStore as F, useNetWorthStore as V, useNotificationStore as z, usePageView as Z, useRecurringTransactionsStore as K, useSettingsStore as k, useTransactionStore as q, useTrendsStore as X, useUserStore as j, useWidgetContainerProvider as J } from "./context/hooks.es.js";
10
10
  import { useInsightsEnabled as $ } from "./hooks/useInsightsEnabled.es.js";
11
11
  import { useScreenSize as ro } from "./hooks/useScreenSize.es.js";
12
12
  import eo from "./hooks/usePrevious.es.js";
13
13
  import { formatCurrency as mo, formatOrdinal as no, formatPercentage as ao, generateEqualIntervals as so, getCurrencyCodes as po, getPluralRules as fo } from "../core/utils/NumberFormatting.es.js";
14
- import { useRepeatingTransactionEligibility as lo } from "./hooks/useRepeatingTransactionEligibility.es.js";
14
+ import { useRepeatingTransactionEligibility as Co } from "./hooks/useRepeatingTransactionEligibility.es.js";
15
15
  import { useWidgetHeaderStyles as So } from "./hooks/useWidgetHeaderStyles.es.js";
16
- import { useWidgetLoadTimer as co } from "./hooks/useWidgetLoadTimer.es.js";
17
- import { VISUALLY_HIDDEN_SX as Eo } from "./constants/Styles.es.js";
18
- import _o from "./components/dialog/Dialog.es.js";
19
- import No from "./components/drawer/Drawer.es.js";
20
- import Ao from "./components/daterangeselector/DateRangeSelector.es.js";
21
- import { ANALYTICS_EVENTS as Oo } from "./constants/Analytics.es.js";
22
- import { CONNECTIONS_WIDGET_ID as Wo, CONNECT_WIDGET_ID as Lo, CONNECT_WIDGET_SOURCES as Go, DEEP_LINK_TYPE as Ro, MemberConnectionStatus as Uo } from "./constants/Connect.es.js";
23
- import { GlobalStore as Bo } from "../core/stores/GlobalStore.es.js";
24
- import { INCOME_ACCOUNT_TYPES as wo, PAYMENT_ACCOUNT_TYPES as xo, SPENDING_ACCOUNT_TYPES as Mo } from "./constants/Account.es.js";
25
- import { RECURRENCE_COPY as Ho } from "./constants/ScheduledPayment.es.js";
26
- import { LOADING_STATUS as Vo } from "./constants/SpendingPlan.es.js";
27
- import { DEFAULT_DONUT_SIZE as Zo, DEFAULT_STROKE_WIDTH as Ko } from "./constants/Donut.es.js";
28
- import { Sizes as qo, TOUCH_TARGET as Xo } from "./constants/Sizes.es.js";
29
- import Jo from "./components/donuts/MultiSegmentDonut.es.js";
30
- import $o from "./components/donuts/SingleSegmentDonut.es.js";
31
- import rr from "./components/ErrorBoundary.es.js";
32
- import er from "./components/Error.es.js";
33
- import mr from "./components/MicroWidgetContainer.es.js";
34
- import ar from "./components/MiniWidgetContainer.es.js";
35
- import { GlobalAccountFilter as pr } from "./components/GlobalAccountFilter.es.js";
36
- import ur from "./components/Loader.es.js";
37
- import { WidgetContainer as Cr } from "./components/WidgetContainer.es.js";
38
- import gr from "./components/ConnectWidgetPanel.es.js";
39
- import Tr from "./components/ConnectDrawer.es.js";
40
- import dr from "./components/CurrencyDialog.es.js";
41
- import _r from "./components/CurrencyInput.es.js";
42
- import Nr from "./components/ResponsiveButton.es.js";
43
- import Ar from "./components/SearchBox.es.js";
44
- import Or from "./components/SelectionBox.es.js";
45
- import Wr from "./components/TabContentContainer.es.js";
46
- import Gr from "./components/IconBacking.es.js";
47
- import Ur from "./components/DataRow.es.js";
48
- import Br from "./components/ZeroState.es.js";
49
- import wr from "./components/InformationTooltip.es.js";
50
- import { ConnectCard as Mr } from "./components/ConnectCard.es.js";
51
- import { CurrencyText as Hr } from "./components/CurrencyText.es.js";
52
- import { EmptyState as Vr } from "./components/EmptyState.es.js";
53
- import { ListItemAction as Zr } from "./components/ListItemAction.es.js";
54
- import { ListItemRow as kr } from "./components/ListItemRow.es.js";
55
- import { ListItemWrapper as Xr } from "./components/ListItemWrapper.es.js";
56
- import { Select as Jr } from "./components/Select.es.js";
57
- import { ToggleButtonListItem as $r } from "./components/listitems/ToggleButtonListItem.es.js";
58
- import { ToggleListItem as rt } from "./components/listitems/ToggleListItem.es.js";
59
- import { analyticsSession as et } from "./utils/Analytics.es.js";
60
- import { getClientComponentOverrides as mt, getClientCustomizations as nt, getClientPaletteOptions as at, getClientTheme as st } from "./utils/Theme.es.js";
16
+ import { useWidgetLoadTimer as go } from "./hooks/useWidgetLoadTimer.es.js";
17
+ import { VISUALLY_HIDDEN_SX as co } from "./constants/Styles.es.js";
18
+ import Io from "./components/dialog/Dialog.es.js";
19
+ import Do from "./components/drawer/Drawer.es.js";
20
+ import Oo from "./components/daterangeselector/DateRangeSelector.es.js";
21
+ import { ANALYTICS_EVENTS as yo } from "./constants/Analytics.es.js";
22
+ import { ACTIONABLE_INTEGRATION_SOURCES as bo, ACTIONABLE_INTEGRATION_TYPE as Go, CONNECTIONS_WIDGET_ID as Ro, CONNECT_WIDGET_ID as Wo, CONNECT_WIDGET_SOURCES as Uo, DEEP_LINK_TYPE as Bo, MemberConnectionStatus as vo } from "./constants/Connect.es.js";
23
+ import { GlobalStore as ho } from "../core/stores/GlobalStore.es.js";
24
+ import { INCOME_ACCOUNT_TYPES as xo, PAYMENT_ACCOUNT_TYPES as Mo, SPENDING_ACCOUNT_TYPES as Ho } from "./constants/Account.es.js";
25
+ import { RECURRENCE_COPY as Vo } from "./constants/ScheduledPayment.es.js";
26
+ import { LOADING_STATUS as Zo } from "./constants/SpendingPlan.es.js";
27
+ import { DEFAULT_DONUT_SIZE as ko, DEFAULT_STROKE_WIDTH as qo } from "./constants/Donut.es.js";
28
+ import { Sizes as jo, TOUCH_TARGET as Jo } from "./constants/Sizes.es.js";
29
+ import $o from "./components/donuts/MultiSegmentDonut.es.js";
30
+ import rr from "./components/donuts/SingleSegmentDonut.es.js";
31
+ import er from "./components/ErrorBoundary.es.js";
32
+ import mr from "./components/Error.es.js";
33
+ import ar from "./components/MicroWidgetContainer.es.js";
34
+ import pr from "./components/MiniWidgetContainer.es.js";
35
+ import { GlobalAccountFilter as ur } from "./components/GlobalAccountFilter.es.js";
36
+ import lr from "./components/Loader.es.js";
37
+ import { WidgetContainer as Tr } from "./components/WidgetContainer.es.js";
38
+ import Er from "./components/ConnectWidgetPanel.es.js";
39
+ import dr from "./components/ConnectDrawer.es.js";
40
+ import Ir from "./components/CurrencyDialog.es.js";
41
+ import Dr from "./components/CurrencyInput.es.js";
42
+ import Or from "./components/ResponsiveButton.es.js";
43
+ import yr from "./components/SearchBox.es.js";
44
+ import br from "./components/SelectionBox.es.js";
45
+ import Rr from "./components/TabContentContainer.es.js";
46
+ import Ur from "./components/IconBacking.es.js";
47
+ import vr from "./components/DataRow.es.js";
48
+ import hr from "./components/ZeroState.es.js";
49
+ import xr from "./components/InformationTooltip.es.js";
50
+ import { ConnectCard as Hr } from "./components/ConnectCard.es.js";
51
+ import { CurrencyText as Vr } from "./components/CurrencyText.es.js";
52
+ import { EmptyState as Zr } from "./components/EmptyState.es.js";
53
+ import { ListItemAction as kr } from "./components/ListItemAction.es.js";
54
+ import { ListItemRow as Xr } from "./components/ListItemRow.es.js";
55
+ import { ListItemWrapper as Jr } from "./components/ListItemWrapper.es.js";
56
+ import { Select as $r } from "./components/Select.es.js";
57
+ import { ToggleButtonListItem as rt } from "./components/listitems/ToggleButtonListItem.es.js";
58
+ import { ToggleListItem as et } from "./components/listitems/ToggleListItem.es.js";
59
+ import { analyticsSession as mt } from "./utils/Analytics.es.js";
60
+ import { getClientComponentOverrides as at, getClientCustomizations as st, getClientPaletteOptions as pt, getClientTheme as ft } from "./utils/Theme.es.js";
61
61
  export {
62
- Oo as ANALYTICS_EVENTS,
63
- Wo as CONNECTIONS_WIDGET_ID,
64
- Lo as CONNECT_WIDGET_ID,
65
- Go as CONNECT_WIDGET_SOURCES,
62
+ bo as ACTIONABLE_INTEGRATION_SOURCES,
63
+ Go as ACTIONABLE_INTEGRATION_TYPE,
64
+ yo as ANALYTICS_EVENTS,
65
+ Ro as CONNECTIONS_WIDGET_ID,
66
+ Wo as CONNECT_WIDGET_ID,
67
+ Uo as CONNECT_WIDGET_SOURCES,
66
68
  i as Calendar,
67
69
  m as CalendarSelectionTypes,
68
- Mr as ConnectCard,
69
- Tr as ConnectDrawer,
70
- gr as ConnectWidgetPanel,
71
- dr as CurrencyDialog,
72
- _r as CurrencyInput,
73
- Hr as CurrencyText,
74
- Ro as DEEP_LINK_TYPE,
75
- Zo as DEFAULT_DONUT_SIZE,
76
- Ko as DEFAULT_STROKE_WIDTH,
77
- Ur as DataRow,
78
- Ao as DateRangeSelector,
79
- _o as Dialog,
70
+ Hr as ConnectCard,
71
+ dr as ConnectDrawer,
72
+ Er as ConnectWidgetPanel,
73
+ Ir as CurrencyDialog,
74
+ Dr as CurrencyInput,
75
+ Vr as CurrencyText,
76
+ Bo as DEEP_LINK_TYPE,
77
+ ko as DEFAULT_DONUT_SIZE,
78
+ qo as DEFAULT_STROKE_WIDTH,
79
+ vr as DataRow,
80
+ Oo as DateRangeSelector,
81
+ Io as Dialog,
80
82
  p as Donut,
81
- No as Drawer,
82
- Vr as EmptyState,
83
- er as Error,
84
- rr as ErrorBoundary,
85
- pr as GlobalAccountFilter,
86
- c as GlobalDataContext,
87
- T as GlobalDataProvider,
88
- Bo as GlobalStore,
89
- wo as INCOME_ACCOUNT_TYPES,
90
- Gr as IconBacking,
91
- wr as InformationTooltip,
92
- Vo as LOADING_STATUS,
93
- Zr as ListItemAction,
94
- kr as ListItemRow,
95
- Xr as ListItemWrapper,
96
- ur as Loader,
97
- Uo as MemberConnectionStatus,
98
- mr as MicroWidgetContainer,
99
- ar as MiniWidgetContainer,
100
- Jo as MultiSegmentDonut,
101
- xo as PAYMENT_ACCOUNT_TYPES,
102
- Ho as RECURRENCE_COPY,
103
- Nr as ResponsiveButton,
104
- Mo as SPENDING_ACCOUNT_TYPES,
105
- Ar as SearchBox,
106
- Jr as Select,
107
- Or as SelectionBox,
108
- $o as SingleSegmentDonut,
109
- qo as Sizes,
83
+ Do as Drawer,
84
+ Zr as EmptyState,
85
+ mr as Error,
86
+ er as ErrorBoundary,
87
+ ur as GlobalAccountFilter,
88
+ g as GlobalDataContext,
89
+ E as GlobalDataProvider,
90
+ ho as GlobalStore,
91
+ xo as INCOME_ACCOUNT_TYPES,
92
+ Ur as IconBacking,
93
+ xr as InformationTooltip,
94
+ Zo as LOADING_STATUS,
95
+ kr as ListItemAction,
96
+ Xr as ListItemRow,
97
+ Jr as ListItemWrapper,
98
+ lr as Loader,
99
+ vo as MemberConnectionStatus,
100
+ ar as MicroWidgetContainer,
101
+ pr as MiniWidgetContainer,
102
+ $o as MultiSegmentDonut,
103
+ Mo as PAYMENT_ACCOUNT_TYPES,
104
+ Vo as RECURRENCE_COPY,
105
+ Or as ResponsiveButton,
106
+ Ho as SPENDING_ACCOUNT_TYPES,
107
+ yr as SearchBox,
108
+ $r as Select,
109
+ br as SelectionBox,
110
+ rr as SingleSegmentDonut,
111
+ jo as Sizes,
110
112
  a as StatusBar,
111
- Xo as TOUCH_TARGET,
112
- Wr as TabContentContainer,
113
- $r as ToggleButtonListItem,
114
- rt as ToggleListItem,
115
- Eo as VISUALLY_HIDDEN_SX,
116
- Cr as WidgetContainer,
113
+ Jo as TOUCH_TARGET,
114
+ Rr as TabContentContainer,
115
+ rt as ToggleButtonListItem,
116
+ et as ToggleListItem,
117
+ co as VISUALLY_HIDDEN_SX,
118
+ Tr as WidgetContainer,
117
119
  d as WidgetContainerContext,
118
- D as WidgetContainerProvider,
119
- Br as ZeroState,
120
- et as analyticsSession,
120
+ _ as WidgetContainerProvider,
121
+ hr as ZeroState,
122
+ mt as analyticsSession,
121
123
  r as buildDynamicCopy,
122
124
  t as buildPluralCopy,
123
125
  mo as formatCurrency,
124
126
  no as formatOrdinal,
125
127
  ao as formatPercentage,
126
128
  so as generateEqualIntervals,
127
- mt as getClientComponentOverrides,
128
- nt as getClientCustomizations,
129
- at as getClientPaletteOptions,
130
- st as getClientTheme,
129
+ at as getClientComponentOverrides,
130
+ st as getClientCustomizations,
131
+ pt as getClientPaletteOptions,
132
+ ft as getClientTheme,
131
133
  po as getCurrencyCodes,
132
134
  fo as getPluralRules,
133
135
  u as useAccountDisplayName,
134
- I as useAccountStore,
135
- N as useActionContext,
136
- P as useAgreementStore,
137
- A as useAppConfig,
138
- y as useBudgetsStore,
139
- O as useCashflowStore,
140
- b as useCategoryStore,
141
- C as useCombineEvents,
136
+ N as useAccountStore,
137
+ D as useActionContext,
138
+ A as useAgreementStore,
139
+ O as useAppConfig,
140
+ P as useBudgetsStore,
141
+ y as useCashflowStore,
142
+ L as useCategoryStore,
143
+ l as useCombineEvents,
142
144
  S as useCombinePageviews,
143
- W as useDebtStore,
144
- L as useError,
145
- G as useEvent,
146
- R as useFinstrongStore,
145
+ b as useDebtStore,
146
+ G as useError,
147
+ R as useEvent,
148
+ W as useFinstrongStore,
147
149
  U as useGlobalCopyStore,
148
- v as useGlobalStore,
149
- B as useGlobalUiStore,
150
- h as useGoalStore,
151
- w as useHelpStore,
152
- x as useHoldingStore,
153
- M as useHostMessage,
150
+ B as useGlobalStore,
151
+ v as useGlobalUiStore,
152
+ Y as useGoalStore,
153
+ h as useHelpStore,
154
+ w as useHoldingStore,
155
+ x as useHostMessage,
154
156
  $ as useInsightsEnabled,
155
- Y as useInsightsV2Store,
157
+ M as useInsightsV2Store,
156
158
  H as useLoad,
157
159
  F as useMerchantStore,
158
160
  V as useNetWorthStore,
@@ -160,7 +162,7 @@ export {
160
162
  Z as usePageView,
161
163
  eo as usePrevious,
162
164
  K as useRecurringTransactionsStore,
163
- lo as useRepeatingTransactionEligibility,
165
+ Co as useRepeatingTransactionEligibility,
164
166
  ro as useScreenSize,
165
167
  k as useSettingsStore,
166
168
  q as useTransactionStore,
@@ -168,5 +170,5 @@ export {
168
170
  j as useUserStore,
169
171
  J as useWidgetContainerProvider,
170
172
  So as useWidgetHeaderStyles,
171
- co as useWidgetLoadTimer
173
+ go as useWidgetLoadTimer
172
174
  };
@@ -9,6 +9,10 @@ export interface HostMessageMetadata {
9
9
  height: number;
10
10
  width: number;
11
11
  };
12
+ atomicTransact: {
13
+ integration_type: string;
14
+ source: string;
15
+ };
12
16
  }
13
17
  export type HostMessage = keyof HostMessageMetadata;
14
18
  export type GlobalHostMessageHandler = <E extends HostMessage>(event: E, metadata: HostMessageMetadata[E]) => void;
@@ -1,52 +1,47 @@
1
- import { useGlobalCopyStore as w, useInsightsV2Store as S, useTransactionStore as D } from "../../../common/context/hooks.es.js";
2
- import k from "../../../common/components/drawer/Drawer.es.js";
3
- import B from "../../../transactions/components/shared/TransactionList.es.js";
4
- import { selectTransactionsByGuids as L } from "../../CommonUtils.es.js";
5
- import { getDynamicCtaBasedOnTriggers as O } from "../util.es.js";
6
- import { TransactionDetailsBlock as x } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
7
- import { readSummary as A } from "./layout.es.js";
8
- import { TransactionListSummaryCard as j } from "./TransactionListSummaryCard.es.js";
9
- import g from "react";
10
- import { observer as G } from "mobx-react-lite";
11
- import { Fragment as F, jsx as a, jsxs as I } from "react/jsx-runtime";
12
- var R = (o) => Array.isArray(o) && o.every((t) => typeof t == "string"), $ = (o) => {
1
+ import { useGlobalCopyStore as S, useInsightsV2Store as D, useTransactionStore as k } from "../../../common/context/hooks.es.js";
2
+ import B from "../../../common/components/drawer/Drawer.es.js";
3
+ import L from "../../../transactions/components/shared/TransactionList.es.js";
4
+ import { selectTransactionsByGuids as O } from "../../CommonUtils.es.js";
5
+ import { getDynamicCtaBasedOnTriggers as x } from "../util.es.js";
6
+ import { TransactionDetailsBlock as A } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
7
+ import { readSummary as j } from "./layout.es.js";
8
+ import { TransactionListSummaryCard as G } from "./TransactionListSummaryCard.es.js";
9
+ import F from "react";
10
+ import { observer as I } from "mobx-react-lite";
11
+ import { Fragment as R, jsx as a, jsxs as $ } from "react/jsx-runtime";
12
+ var b = (o) => Array.isArray(o) && o.every((t) => typeof t == "string"), z = (o) => {
13
13
  const t = o.insights_payload?.drilldown_data, i = o.insights_payload?.instance_slot_data ?? {}, [n, s] = t && Object.hasOwn(t, "transaction_guids") ? ["drilldown_data", t.transaction_guids] : ["instance_slot_data", i.transaction_guids];
14
14
  if (s != null) {
15
- if (R(s)) return s;
15
+ if (b(s)) return s;
16
16
  console.warn(`[TransactionListBlock] ${n}.transaction_guids is not a list of guids — listing no transactions.`);
17
17
  }
18
- }, Q = G(function({ beat: t }) {
19
- const { common: i, insights_feed: n } = w(), { actionDrawer: s, setActionContext: c } = S(), _ = D(), [p, l] = g.useState(!1), r = $(t), f = L(_.detailedTransactions, r), { primary_cta: d, secondary_cta: m, in_description_cta: u, is_zero_state: y } = t.insights_payload ?? {}, e = g.useMemo(() => A(O(s, d, m, u)), [
20
- s,
21
- d,
22
- m,
23
- u
24
- ]), h = e !== void 0 && !y && (r?.length ?? 0) > 0, C = (v) => {
25
- c({ transaction_guid: v }), l(!0);
26
- }, T = () => {
18
+ }, W = I(function({ beat: t }) {
19
+ const { common: i, insights_feed: n } = S(), { actionDrawer: s, setActionContext: c } = D(), d = k(), [m, l] = F.useState(!1), r = z(t), u = O(d.detailedTransactions, r), { primary_cta: g, secondary_cta: _, in_description_cta: p, is_zero_state: f } = t.insights_payload ?? {}, y = x(s, g, _, p), e = j(y), h = e?.count ?? r?.length ?? 0, C = e !== void 0 && !f && (r?.length ?? 0) > 0, T = (w) => {
20
+ c({ transaction_guid: w }), l(!0);
21
+ }, v = () => {
27
22
  l(!1), c({ transaction_guid: void 0 });
28
23
  };
29
- return /* @__PURE__ */ I(F, { children: [
30
- h && /* @__PURE__ */ a(j, {
24
+ return /* @__PURE__ */ $(R, { children: [
25
+ C && /* @__PURE__ */ a(G, {
31
26
  copy: n.general,
32
- count: e.count ?? r?.length ?? 0,
27
+ count: h,
33
28
  summary: e
34
29
  }),
35
- /* @__PURE__ */ a(B, {
36
- onClick: C,
37
- transaction: f
30
+ /* @__PURE__ */ a(L, {
31
+ onClick: T,
32
+ transaction: u
38
33
  }),
39
- /* @__PURE__ */ a(k, {
34
+ /* @__PURE__ */ a(B, {
40
35
  ariaLabelClose: i.close_aria,
41
- isOpen: p,
42
- onClose: T,
36
+ isOpen: m,
37
+ onClose: v,
43
38
  title: n.general.transaction_details_title,
44
- children: /* @__PURE__ */ a(x, { beat: t })
39
+ children: /* @__PURE__ */ a(A, { beat: t })
45
40
  })
46
41
  ] });
47
42
  });
48
43
  export {
49
- Q as TransactionListBlock
44
+ W as TransactionListBlock
50
45
  };
51
46
 
52
47
  //# sourceMappingURL=TransactionListBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n useGlobalCopyStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Beat } from '../../../core'\nimport type { InsightsInstanceSlotData } from '../../../core/types/InsightsInstanceSlotData'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { TransactionList } from '../../../transactions'\nimport { selectTransactionsByGuids } from '../../CommonUtils'\nimport { getDynamicCtaBasedOnTriggers } from '../util'\nimport { readSummary } from './layout'\nimport { TransactionListSummaryCard } from './TransactionListSummaryCard'\n\nconst isStringArray = (value: unknown): value is string[] =>\n Array.isArray(value) && value.every((item) => typeof item === 'string')\n\n/**\n * The guids the drawer lists. V2 envelopes send them on `drilldown_data`, V1 on\n * `instance_slot_data`, which is read only when the V2 key is absent. The payload is untrusted, so\n * a present but malformed list fails closed (no rows, and a warning) rather than showing the other\n * source's rows; a non-array would otherwise reach new Set() inside selectTransactionsByGuids and\n * match per-character.\n */\nconst resolveTransactionGuids = (beat: Beat): string[] | undefined => {\n const drilldown = beat.insights_payload?.drilldown_data\n const slotData = (beat.insights_payload?.instance_slot_data ?? {}) as InsightsInstanceSlotData\n const [source, value]: [string, unknown] =\n drilldown && Object.hasOwn(drilldown, 'transaction_guids')\n ? ['drilldown_data', drilldown.transaction_guids]\n : ['instance_slot_data', slotData.transaction_guids]\n\n if (value == null) return undefined\n if (isStringArray(value)) return value\n\n console.warn(\n `[TransactionListBlock] ${source}.transaction_guids is not a list of guids — listing no transactions.`,\n )\n return undefined\n}\n\nexport interface TransactionListBlockProps {\n beat: Beat\n}\n\n/**\n * Opens a date-grouped list of the transactions a beat points at. Tapping a row stacks\n * the Transaction Details drawer over the list.\n *\n * ActionBlockLayer owns the outer Drawer (title, close button, copy-loaded gate).\n */\nexport const TransactionListBlock = observer(function TransactionListBlock({\n beat,\n}: TransactionListBlockProps) {\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n const transactionStore = useTransactionStore()\n\n const [isDetailsOpen, setIsDetailsOpen] = React.useState(false)\n\n const guids = resolveTransactionGuids(beat)\n const transactions = selectTransactionsByGuids(transactionStore.detailedTransactions, guids)\n\n // Summary figures live on the clicked CTA's `drilldown_data`, so resolve which CTA opened this\n // drawer. `readSummary` fails closed (no finite `amount` -> undefined), so a plain list renders no\n // card; it is memoized so a bad payload warns once per opening, not per render. A zero-state\n // envelope, or one naming no transactions, has no figures to head.\n const { primary_cta, secondary_cta, in_description_cta, is_zero_state } =\n beat.insights_payload ?? {}\n const summary = React.useMemo(\n () =>\n readSummary(\n getDynamicCtaBasedOnTriggers(actionDrawer, primary_cta, secondary_cta, in_description_cta),\n ),\n [actionDrawer, primary_cta, secondary_cta, in_description_cta],\n )\n const showSummary = summary !== undefined && !is_zero_state && (guids?.length ?? 0) > 0\n\n const handleRowClick = (guid: string) => {\n setActionContext({ transaction_guid: guid })\n setIsDetailsOpen(true)\n }\n\n const handleDetailsClose = () => {\n setIsDetailsOpen(false)\n // Clear only the key this nested drawer owns — same convention as TransactionHistoryBlock.\n // `setActionContext` merges, so an explicit `{}` would be a no-op; naming the key keeps the\n // outer drawer's own context intact.\n setActionContext({ transaction_guid: undefined })\n }\n\n return (\n <>\n {showSummary && (\n <TransactionListSummaryCard\n copy={insightsCopy.general}\n // Prefer the payload count, else the beat's guid list length (stable), avoiding a\n // \"0 transactions\" flash before the store resolves the rows.\n count={summary.count ?? guids?.length ?? 0}\n summary={summary}\n />\n )}\n <TransactionList onClick={handleRowClick} transaction={transactions} />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isDetailsOpen}\n onClose={handleDetailsClose}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;AAmBA,IAAM,IAAA,CAAiB,MACrB,MAAM,QAAQ,CAAK,KAAK,EAAM,MAAA,CAAO,MAAS,OAAO,KAAS,QAAQ,GASlE,IAAA,CAA2B,MAAqC;AACpE,QAAM,IAAY,EAAK,kBAAkB,gBACnC,IAAY,EAAK,kBAAkB,sBAAsB,CAAC,GAC1D,CAAC,GAAQ,CAAA,IACb,KAAa,OAAO,OAAO,GAAW,mBAAmB,IACrD,CAAC,kBAAkB,EAAU,iBAAiB,IAC9C,CAAC,sBAAsB,EAAS,iBAAiB;AAEvD,MAAI,KAAS,MACb;AAAA,QAAI,EAAc,CAAK,EAAG,QAAO;AAEjC,YAAQ,KACN,0BAA0B,CAAA,sEAC5B;AAAA;AAEF,GAYa,IAAuB,EAAS,SAA8B,EACzE,MAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GACzE,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAmB,GACxD,IAAmB,EAAoB,GAEvC,CAAC,GAAe,CAAA,IAAoB,EAAM,SAAS,EAAK,GAExD,IAAQ,EAAwB,CAAI,GACpC,IAAe,EAA0B,EAAiB,sBAAsB,CAAK,GAMrF,EAAE,aAAA,GAAa,eAAA,GAAe,oBAAA,GAAoB,eAAA,EAAA,IACtD,EAAK,oBAAoB,CAAC,GACtB,IAAU,EAAM,QAAA,MAElB,EACE,EAA6B,GAAc,GAAa,GAAe,CAAkB,CAC3F,GACF;AAAA,IAAC;AAAA,IAAc;AAAA,IAAa;AAAA,IAAe;AAAA,EAAkB,CAC/D,GACM,IAAc,MAAY,UAAa,CAAC,MAAkB,GAAO,UAAU,KAAK,GAEhF,IAAA,CAAkB,MAAiB;AACvC,IAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAAiB,EAAI;AAAA,EACvB,GAEM,IAAA,MAA2B;AAC/B,IAAA,EAAiB,EAAK,GAItB,EAAiB,EAAE,kBAAkB,OAAU,CAAC;AAAA,EAClD;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACG,KACC,gBAAA,EAAC,GAAD;AAAA,MACE,MAAM,EAAa;AAAA,MAGnB,OAAO,EAAQ,SAAS,GAAO,UAAU;AAAA,MAChC,SAAA;AAAA,IACV,CAAA;AAAA,IAEH,gBAAA,EAAC,GAAD;AAAA,MAAiB,SAAS;AAAA,MAAgB,aAAa;AAAA,IAAe,CAAA;AAAA,IACtE,gBAAA,EAAC,GAAD;AAAA,MACE,gBAAgB,EAAW;AAAA,MAC3B,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,OAAO,EAAa,QAAQ;AAAA,MAE5B,UAAA,gBAAA,EAAC,GAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,IAChC,CAAA;AAAA,EACR,EAAA,CAAA;AAEN,CAAC"}
1
+ {"version":3,"file":"TransactionListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n useGlobalCopyStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Beat } from '../../../core'\nimport type { InsightsInstanceSlotData } from '../../../core/types/InsightsInstanceSlotData'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { TransactionList } from '../../../transactions'\nimport { selectTransactionsByGuids } from '../../CommonUtils'\nimport { getDynamicCtaBasedOnTriggers } from '../util'\nimport { readSummary } from './layout'\nimport { TransactionListSummaryCard } from './TransactionListSummaryCard'\n\nconst isStringArray = (value: unknown): value is string[] =>\n Array.isArray(value) && value.every((item) => typeof item === 'string')\n\n/**\n * The guids the drawer lists. V2 envelopes send them on `drilldown_data`, V1 on\n * `instance_slot_data`, which is read only when the V2 key is absent. The payload is untrusted, so\n * a present but malformed list fails closed (no rows, and a warning) rather than showing the other\n * source's rows; a non-array would otherwise reach new Set() inside selectTransactionsByGuids and\n * match per-character.\n */\nconst resolveTransactionGuids = (beat: Beat): string[] | undefined => {\n const drilldown = beat.insights_payload?.drilldown_data\n const slotData = (beat.insights_payload?.instance_slot_data ?? {}) as InsightsInstanceSlotData\n const [source, value]: [string, unknown] =\n drilldown && Object.hasOwn(drilldown, 'transaction_guids')\n ? ['drilldown_data', drilldown.transaction_guids]\n : ['instance_slot_data', slotData.transaction_guids]\n\n if (value == null) return undefined\n if (isStringArray(value)) return value\n\n console.warn(\n `[TransactionListBlock] ${source}.transaction_guids is not a list of guids — listing no transactions.`,\n )\n return undefined\n}\n\nexport interface TransactionListBlockProps {\n beat: Beat\n}\n\n/**\n * Opens a date-grouped list of the transactions a beat points at. Tapping a row stacks\n * the Transaction Details drawer over the list.\n *\n * ActionBlockLayer owns the outer Drawer (title, close button, copy-loaded gate).\n */\nexport const TransactionListBlock = observer(function TransactionListBlock({\n beat,\n}: TransactionListBlockProps) {\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n const transactionStore = useTransactionStore()\n\n const [isDetailsOpen, setIsDetailsOpen] = React.useState(false)\n\n const guids = resolveTransactionGuids(beat)\n const transactions = selectTransactionsByGuids(transactionStore.detailedTransactions, guids)\n\n // Summary figures live on the clicked CTA's `drilldown_data`, so resolve which CTA opened this\n // drawer. `readSummary` fails closed (no finite `amount` -> undefined), so a plain list renders no\n // card. A zero-state envelope, or one naming no transactions, has no figures to head.\n const { primary_cta, secondary_cta, in_description_cta, is_zero_state } =\n beat.insights_payload ?? {}\n const currentCta = getDynamicCtaBasedOnTriggers(\n actionDrawer,\n primary_cta,\n secondary_cta,\n in_description_cta,\n )\n const summary = readSummary(currentCta)\n // Count comes from the CTA's `drilldown_data`; fall back to the named guid count so the pill never\n // flashes \"0 transactions\" if the payload omits it.\n const count = summary?.count ?? guids?.length ?? 0\n const showSummary = summary !== undefined && !is_zero_state && (guids?.length ?? 0) > 0\n\n const handleRowClick = (guid: string) => {\n setActionContext({ transaction_guid: guid })\n setIsDetailsOpen(true)\n }\n\n const handleDetailsClose = () => {\n setIsDetailsOpen(false)\n // Clear only the key this nested drawer owns — same convention as TransactionHistoryBlock.\n // `setActionContext` merges, so an explicit `{}` would be a no-op; naming the key keeps the\n // outer drawer's own context intact.\n setActionContext({ transaction_guid: undefined })\n }\n\n return (\n <>\n {showSummary && (\n <TransactionListSummaryCard copy={insightsCopy.general} count={count} summary={summary} />\n )}\n <TransactionList onClick={handleRowClick} transaction={transactions} />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isDetailsOpen}\n onClose={handleDetailsClose}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;AAmBA,IAAM,IAAA,CAAiB,MACrB,MAAM,QAAQ,CAAK,KAAK,EAAM,MAAA,CAAO,MAAS,OAAO,KAAS,QAAQ,GASlE,IAAA,CAA2B,MAAqC;AACpE,QAAM,IAAY,EAAK,kBAAkB,gBACnC,IAAY,EAAK,kBAAkB,sBAAsB,CAAC,GAC1D,CAAC,GAAQ,CAAA,IACb,KAAa,OAAO,OAAO,GAAW,mBAAmB,IACrD,CAAC,kBAAkB,EAAU,iBAAiB,IAC9C,CAAC,sBAAsB,EAAS,iBAAiB;AAEvD,MAAI,KAAS,MACb;AAAA,QAAI,EAAc,CAAK,EAAG,QAAO;AAEjC,YAAQ,KACN,0BAA0B,CAAA,sEAC5B;AAAA;AAEF,GAYa,IAAuB,EAAS,SAA8B,EACzE,MAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GACzE,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAmB,GACxD,IAAmB,EAAoB,GAEvC,CAAC,GAAe,CAAA,IAAoB,EAAM,SAAS,EAAK,GAExD,IAAQ,EAAwB,CAAI,GACpC,IAAe,EAA0B,EAAiB,sBAAsB,CAAK,GAKrF,EAAE,aAAA,GAAa,eAAA,GAAe,oBAAA,GAAoB,eAAA,EAAA,IACtD,EAAK,oBAAoB,CAAC,GACtB,IAAa,EACjB,GACA,GACA,GACA,CACF,GACM,IAAU,EAAY,CAAU,GAGhC,IAAQ,GAAS,SAAS,GAAO,UAAU,GAC3C,IAAc,MAAY,UAAa,CAAC,MAAkB,GAAO,UAAU,KAAK,GAEhF,IAAA,CAAkB,MAAiB;AACvC,IAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAAiB,EAAI;AAAA,EACvB,GAEM,IAAA,MAA2B;AAC/B,IAAA,EAAiB,EAAK,GAItB,EAAiB,EAAE,kBAAkB,OAAU,CAAC;AAAA,EAClD;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACG,KACC,gBAAA,EAAC,GAAD;AAAA,MAA4B,MAAM,EAAa;AAAA,MAAgB,OAAA;AAAA,MAAgB,SAAA;AAAA,IAAU,CAAA;AAAA,IAE3F,gBAAA,EAAC,GAAD;AAAA,MAAiB,SAAS;AAAA,MAAgB,aAAa;AAAA,IAAe,CAAA;AAAA,IACtE,gBAAA,EAAC,GAAD;AAAA,MACE,gBAAgB,EAAW;AAAA,MAC3B,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,OAAO,EAAa,QAAQ;AAAA,MAE5B,UAAA,gBAAA,EAAC,GAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,IAChC,CAAA;AAAA,EACR,EAAA,CAAA;AAEN,CAAC"}
@@ -2,8 +2,9 @@ import { InsightsFeedCopy } from '../../../core/types/localization';
2
2
  import { TransactionListSummary } from './layout';
3
3
  export interface TransactionListSummaryCardProps {
4
4
  summary: TransactionListSummary;
5
- /** Rendered in the pill; the block passes the resolved row count. */
5
+ /** Pill count: the CTA's `drilldown_data.count`, else the number of guids the beat names. */
6
6
  count: number;
7
+ /** Only the two pill-copy keys the card reads. */
7
8
  copy: Pick<InsightsFeedCopy['general'], 'transaction_count' | 'transaction_count_one'>;
8
9
  }
9
10
  /**
@@ -11,8 +12,8 @@ export interface TransactionListSummaryCardProps {
11
12
  * range, the headline amount, and a `{count} transactions` pill. Driven by the beat's summary
12
13
  * figures (see `readSummary` in layout.ts). Theme-aware tokens keep it correct in dark mode.
13
14
  *
14
- * Figma: Drilldown | Replenish Savings ("Savings Withdrawal"). The card is shared by every beat on
15
- * the `summary_header` variant, so the tile carries a neutral receipt rather than that beat's icon.
15
+ * Figma: Drilldown | Replenish Savings ("Savings Withdrawal"). Currently only Replenish Savings
16
+ * declares the `summary_header` variant, so the tile carries its `savings` icon.
16
17
  */
17
18
  export declare const TransactionListSummaryCard: ({ summary, count, copy, }: TransactionListSummaryCardProps) => import("react/jsx-runtime").JSX.Element;
18
19
  export default TransactionListSummaryCard;
@@ -2,21 +2,21 @@ import { buildPluralCopy as d } from "../../../core/utils/Localization.es.js";
2
2
  import { DATE_FORMATS_INTL as s, formatDate as f } from "../../../core/constants/DateFormats.es.js";
3
3
  import { formatCurrency as x } from "../../../core/utils/NumberFormatting.es.js";
4
4
  import { getLogoElevation as h } from "../../components/logoShadow.es.js";
5
- import e from "@mui/material/Stack";
6
- import { Text as n } from "@mxenabled/mxui";
5
+ import n from "@mui/material/Stack";
6
+ import { Text as e } from "@mxenabled/mxui";
7
7
  import { Icon as u } from "@mxenabled/mx-icons";
8
8
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
9
9
  import { alpha as l } from "@mui/material/styles";
10
10
  import c from "@mui/material/Box";
11
- var g = "_1{count} transactions", _ = "_1{count} transaction", b = (o, a) => [o, a].filter((t) => t !== void 0).map((t) => f(t, s.MONTH_DAY)).join(" – "), L = ({ summary: o, count: a, copy: t }) => {
12
- const m = b(o.startDate, o.endDate);
11
+ var g = "_1{count} transactions", _ = "_1{count} transaction", b = (t, a) => [t, a].filter((o) => o !== void 0).map((o) => f(o, s.MONTH_DAY)).join(" – "), L = ({ summary: t, count: a, copy: o }) => {
12
+ const m = b(t.startDate, t.endDate);
13
13
  return /* @__PURE__ */ r(c, {
14
14
  sx: {
15
15
  px: 24,
16
16
  pt: 24,
17
17
  pb: 12
18
18
  },
19
- children: /* @__PURE__ */ p(e, {
19
+ children: /* @__PURE__ */ p(n, {
20
20
  sx: {
21
21
  bgcolor: "background.paper",
22
22
  borderRadius: "8px",
@@ -24,7 +24,7 @@ var g = "_1{count} transactions", _ = "_1{count} transaction", b = (o, a) => [o,
24
24
  gap: 11,
25
25
  p: 16
26
26
  },
27
- children: [/* @__PURE__ */ p(e, {
27
+ children: [/* @__PURE__ */ p(n, {
28
28
  sx: {
29
29
  alignItems: "center",
30
30
  flexDirection: "row",
@@ -44,18 +44,18 @@ var g = "_1{count} transactions", _ = "_1{count} transaction", b = (o, a) => [o,
44
44
  children: /* @__PURE__ */ r(u, {
45
45
  "aria-hidden": !0,
46
46
  fill: !0,
47
- name: "receipt",
47
+ name: "savings",
48
48
  size: 32
49
49
  })
50
- }), /* @__PURE__ */ p(e, { children: [m && /* @__PURE__ */ r(n, {
50
+ }), /* @__PURE__ */ p(n, { children: [m && /* @__PURE__ */ r(e, {
51
51
  color: "text.secondary",
52
52
  variant: "caption",
53
53
  children: m
54
- }), /* @__PURE__ */ r(n, {
54
+ }), /* @__PURE__ */ r(e, {
55
55
  bold: !0,
56
56
  component: "p",
57
57
  variant: "h1",
58
- children: x(o.amount, "0,0.00")
58
+ children: x(t.amount, "0,0.00")
59
59
  })] })]
60
60
  }), /* @__PURE__ */ r(c, {
61
61
  sx: {
@@ -64,10 +64,10 @@ var g = "_1{count} transactions", _ = "_1{count} transaction", b = (o, a) => [o,
64
64
  px: 12,
65
65
  py: 2
66
66
  },
67
- children: /* @__PURE__ */ r(n, {
67
+ children: /* @__PURE__ */ r(e, {
68
68
  color: "primary.dark",
69
69
  variant: "caption",
70
- children: d(t.transaction_count_one ?? _, t.transaction_count ?? g, a, String(a))
70
+ children: d(o.transaction_count_one ?? _, o.transaction_count ?? g, a, String(a))
71
71
  })
72
72
  })]
73
73
  })
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionListSummaryCard.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport type { InsightsFeedCopy } from '../../../core/types/localization'\nimport { buildPluralCopy } from '../../../core/utils/Localization'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { getLogoElevation } from '../../components/logoShadow'\n\nimport type { TransactionListSummary } from './layout'\n\nexport interface TransactionListSummaryCardProps {\n summary: TransactionListSummary\n /** Rendered in the pill; the block passes the resolved row count. */\n count: number\n copy: Pick<InsightsFeedCopy['general'], 'transaction_count' | 'transaction_count_one'>\n}\n\n// Until the localized-content service ships the pill copy.\nconst DEFAULT_COUNT_COPY = '_1{count} transactions'\nconst DEFAULT_COUNT_ONE_COPY = '_1{count} transaction'\n\n// Endpoints are already validated `Date`s from `readSummary` (invalid/junk omitted there).\nconst formatRange = (start?: Date, end?: Date): string =>\n [start, end]\n .filter((d): d is Date => d !== undefined)\n .map((d) => formatDate(d, DATE_FORMATS_INTL.MONTH_DAY))\n .join(' – ')\n\n/**\n * Summary header for the Transaction List drawer: a white card with a themed icon tile, the date\n * range, the headline amount, and a `{count} transactions` pill. Driven by the beat's summary\n * figures (see `readSummary` in layout.ts). Theme-aware tokens keep it correct in dark mode.\n *\n * Figma: Drilldown | Replenish Savings (\"Savings Withdrawal\"). The card is shared by every beat on\n * the `summary_header` variant, so the tile carries a neutral receipt rather than that beat's icon.\n */\nexport const TransactionListSummaryCard = ({\n summary,\n count,\n copy,\n}: TransactionListSummaryCardProps) => {\n const dateRange = formatRange(summary.startDate, summary.endDate)\n\n return (\n <Box sx={{ px: 24, pt: 24, pb: 12 }}>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 11,\n p: 16,\n }}\n >\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n <Box\n sx={{\n alignItems: 'center',\n bgcolor: (theme) => alpha(theme.palette.primary.main, 0.15),\n borderRadius: '4px',\n color: 'primary.main',\n display: 'flex',\n height: 56,\n justifyContent: 'center',\n width: 56,\n }}\n >\n <Icon aria-hidden={true} fill={true} name=\"receipt\" size={32} />\n </Box>\n <Stack>\n {dateRange && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {dateRange}\n </Text>\n )}\n <Text bold={true} component=\"p\" variant=\"h1\">\n {formatCurrency(summary.amount, '0,0.00')}\n </Text>\n </Stack>\n </Stack>\n\n <Box\n sx={{\n bgcolor: (theme) => alpha(theme.palette.primary.main, 0.15),\n borderRadius: '999px',\n px: 12,\n py: 2,\n }}\n >\n <Text color=\"primary.dark\" variant=\"caption\">\n {\n buildPluralCopy(\n copy.transaction_count_one ?? DEFAULT_COUNT_ONE_COPY,\n copy.transaction_count ?? DEFAULT_COUNT_COPY,\n count,\n String(count),\n ) as string\n }\n </Text>\n </Box>\n </Stack>\n </Box>\n )\n}\n\nexport default TransactionListSummaryCard\n"],"mappings":";;;;;;;;;;AAuBA,IAAM,IAAqB,0BACrB,IAAyB,yBAGzB,IAAA,CAAe,GAAc,MACjC,CAAC,GAAO,CAAG,EACR,OAAA,CAAQ,MAAiB,MAAM,MAAS,EACxC,IAAA,CAAK,MAAM,EAAW,GAAG,EAAkB,SAAS,CAAC,EACrD,KAAK,KAAK,GAUF,IAAA,CAA8B,EACzC,SAAA,GACA,OAAA,GACA,MAAA,EAAA,MACqC;AACrC,QAAM,IAAY,EAAY,EAAQ,WAAW,EAAQ,OAAO;AAEhE,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,IAAI;AAAA,MAAE,IAAI;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IAChC,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,cAAc;AAAA,QACd,WAAW;AAAA,QACX,KAAK;AAAA,QACL,GAAG;AAAA,MACL;AAAA,MAPF,UAAA,CASE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,eAAe;AAAA,UAAO,KAAK;AAAA,QAAG;AAAA,QAAjE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,IAAI;AAAA,YACF,YAAY;AAAA,YACZ,SAAA,CAAU,MAAU,EAAM,EAAM,QAAQ,QAAQ,MAAM,IAAI;AAAA,YAC1D,cAAc;AAAA,YACd,OAAO;AAAA,YACP,SAAS;AAAA,YACT,QAAQ;AAAA,YACR,gBAAgB;AAAA,YAChB,OAAO;AAAA,UACT;AAAA,UAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,eAAa;AAAA,YAAM,MAAM;AAAA,YAAM,MAAK;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA;AAAA,QAC5D,CAAA,GACL,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,SAAQ;AAAA,UAClC,UAAA;AAAA,QACG,CAAA,GAER,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAM,WAAU;AAAA,UAAI,SAAQ;AAAA,UACrC,UAAA,EAAe,EAAQ,QAAQ,QAAQ;AAAA,QACpC,CAAA,CACD,EAAA,CAAA,CACF;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QACE,IAAI;AAAA,UACF,SAAA,CAAU,MAAU,EAAM,EAAM,QAAQ,QAAQ,MAAM,IAAI;AAAA,UAC1D,cAAc;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,SAAQ;AAAA,UAE/B,UAAA,EACE,EAAK,yBAAyB,GAC9B,EAAK,qBAAqB,GAC1B,GACA,OAAO,CAAK,CACd;AAAA,QAEE,CAAA;AAAA,MACH,CAAA,CACA;AAAA;EACJ,CAAA;AAET"}
1
+ {"version":3,"file":"TransactionListSummaryCard.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport type { InsightsFeedCopy } from '../../../core/types/localization'\nimport { buildPluralCopy } from '../../../core/utils/Localization'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { getLogoElevation } from '../../components/logoShadow'\n\nimport type { TransactionListSummary } from './layout'\n\nexport interface TransactionListSummaryCardProps {\n summary: TransactionListSummary\n /** Pill count: the CTA's `drilldown_data.count`, else the number of guids the beat names. */\n count: number\n /** Only the two pill-copy keys the card reads. */\n copy: Pick<InsightsFeedCopy['general'], 'transaction_count' | 'transaction_count_one'>\n}\n\n// English default until the localized-content service ships the pill copy in every locale.\nconst DEFAULT_COUNT_COPY = '_1{count} transactions'\nconst DEFAULT_COUNT_ONE_COPY = '_1{count} transaction'\n\n// Endpoints are already validated `Date`s from `readSummary` (invalid/junk omitted there).\nconst formatRange = (start?: Date, end?: Date): string =>\n [start, end]\n .filter((d): d is Date => d !== undefined)\n .map((d) => formatDate(d, DATE_FORMATS_INTL.MONTH_DAY))\n .join(' – ')\n\n/**\n * Summary header for the Transaction List drawer: a white card with a themed icon tile, the date\n * range, the headline amount, and a `{count} transactions` pill. Driven by the beat's summary\n * figures (see `readSummary` in layout.ts). Theme-aware tokens keep it correct in dark mode.\n *\n * Figma: Drilldown | Replenish Savings (\"Savings Withdrawal\"). Currently only Replenish Savings\n * declares the `summary_header` variant, so the tile carries its `savings` icon.\n */\nexport const TransactionListSummaryCard = ({\n summary,\n count,\n copy,\n}: TransactionListSummaryCardProps) => {\n const dateRange = formatRange(summary.startDate, summary.endDate)\n\n return (\n <Box sx={{ px: 24, pt: 24, pb: 12 }}>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 11,\n p: 16,\n }}\n >\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n <Box\n sx={{\n alignItems: 'center',\n bgcolor: (theme) => alpha(theme.palette.primary.main, 0.15),\n borderRadius: '4px',\n color: 'primary.main',\n display: 'flex',\n height: 56,\n justifyContent: 'center',\n width: 56,\n }}\n >\n <Icon aria-hidden={true} fill={true} name=\"savings\" size={32} />\n </Box>\n <Stack>\n {dateRange && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {dateRange}\n </Text>\n )}\n <Text bold={true} component=\"p\" variant=\"h1\">\n {formatCurrency(summary.amount, '0,0.00')}\n </Text>\n </Stack>\n </Stack>\n\n <Box\n sx={{\n bgcolor: (theme) => alpha(theme.palette.primary.main, 0.15),\n borderRadius: '999px',\n px: 12,\n py: 2,\n }}\n >\n <Text color=\"primary.dark\" variant=\"caption\">\n {\n buildPluralCopy(\n copy.transaction_count_one ?? DEFAULT_COUNT_ONE_COPY,\n copy.transaction_count ?? DEFAULT_COUNT_COPY,\n count,\n String(count),\n ) as string\n }\n </Text>\n </Box>\n </Stack>\n </Box>\n )\n}\n\nexport default TransactionListSummaryCard\n"],"mappings":";;;;;;;;;;AAwBA,IAAM,IAAqB,0BACrB,IAAyB,yBAGzB,IAAA,CAAe,GAAc,MACjC,CAAC,GAAO,CAAG,EACR,OAAA,CAAQ,MAAiB,MAAM,MAAS,EACxC,IAAA,CAAK,MAAM,EAAW,GAAG,EAAkB,SAAS,CAAC,EACrD,KAAK,KAAK,GAUF,IAAA,CAA8B,EACzC,SAAA,GACA,OAAA,GACA,MAAA,EAAA,MACqC;AACrC,QAAM,IAAY,EAAY,EAAQ,WAAW,EAAQ,OAAO;AAEhE,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,IAAI;AAAA,MAAE,IAAI;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IAChC,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,cAAc;AAAA,QACd,WAAW;AAAA,QACX,KAAK;AAAA,QACL,GAAG;AAAA,MACL;AAAA,MAPF,UAAA,CASE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,eAAe;AAAA,UAAO,KAAK;AAAA,QAAG;AAAA,QAAjE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,IAAI;AAAA,YACF,YAAY;AAAA,YACZ,SAAA,CAAU,MAAU,EAAM,EAAM,QAAQ,QAAQ,MAAM,IAAI;AAAA,YAC1D,cAAc;AAAA,YACd,OAAO;AAAA,YACP,SAAS;AAAA,YACT,QAAQ;AAAA,YACR,gBAAgB;AAAA,YAChB,OAAO;AAAA,UACT;AAAA,UAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,eAAa;AAAA,YAAM,MAAM;AAAA,YAAM,MAAK;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA;AAAA,QAC5D,CAAA,GACL,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,SAAQ;AAAA,UAClC,UAAA;AAAA,QACG,CAAA,GAER,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAM,WAAU;AAAA,UAAI,SAAQ;AAAA,UACrC,UAAA,EAAe,EAAQ,QAAQ,QAAQ;AAAA,QACpC,CAAA,CACD,EAAA,CAAA,CACF;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QACE,IAAI;AAAA,UACF,SAAA,CAAU,MAAU,EAAM,EAAM,QAAQ,QAAQ,MAAM,IAAI;AAAA,UAC1D,cAAc;AAAA,UACd,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,SAAQ;AAAA,UAE/B,UAAA,EACE,EAAK,yBAAyB,GAC9B,EAAK,qBAAqB,GAC1B,GACA,OAAO,CAAK,CACd;AAAA,QAEE,CAAA;AAAA,MACH,CAAA,CACA;AAAA;EACJ,CAAA;AAET"}
@@ -3,9 +3,9 @@ type DrilldownCta = PrimaryCTA | SecondaryCTA | InDescriptionCTA;
3
3
  /** The CTA variant that opens the summary-header drilldown. */
4
4
  export declare const SUMMARY_HEADER_VARIANT = "summary_header";
5
5
  /**
6
- * Drawer title: the beat's own localized title, whatever the variant. A variant names a layout the
7
- * drawer shares between beats (Replenish Savings' "Savings Withdrawal" and Weekly New Merchants'
8
- * "Purchases for review" both open `summary_header`), so no variant carries one beat's title.
6
+ * Drawer title: the beat's own localized title, whatever the variant. The drawer is shared across
7
+ * beats (Replenish Savings' "Savings Withdrawal" summary-header drawer, Weekly New Merchants' plain
8
+ * "Purchases for review" list), so the title comes from the beat, not the variant.
9
9
  */
10
10
  export declare const getTransactionListDrawerTitle: (_variant: string | null | undefined, _copy: GlobalCopy, beat?: Beat) => string;
11
11
  export interface TransactionListSummary {
@@ -15,7 +15,7 @@ export interface TransactionListSummary {
15
15
  * missing or unparseable (so the drawer never crashes on an Invalid Date). */
16
16
  startDate?: Date;
17
17
  endDate?: Date;
18
- /** Transaction count for the pill; the block falls back to the resolved rows' length. */
18
+ /** Number of transactions for the pill, from the CTA's `drilldown_data.count`. */
19
19
  count?: number;
20
20
  }
21
21
  /**
@@ -27,7 +27,7 @@ export interface TransactionListSummary {
27
27
  * `formatDate` (which throws on an Invalid Date).
28
28
  *
29
29
  * `drilldown_data` fields: `amount` (number), `start_date`/`end_date` (unix seconds|ms or ISO),
30
- * `count` (number).
30
+ * `count` (number of transactions).
31
31
  */
32
32
  export declare const readSummary: (cta: DrilldownCta | undefined) => TransactionListSummary | undefined;
33
33
  export {};
@@ -1,37 +1,39 @@
1
- import { parseISO as i } from "date-fns/parseISO";
2
- var _ = "summary_header", c = (t, e, r) => r?.insights_payload?.title || "", a = (t) => typeof t == "number" && Number.isFinite(t) ? t : void 0, s = Date.UTC(2e3, 0, 1), d = Date.UTC(2100, 0, 1), m = (t) => typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : void 0, o = (t, e) => {
1
+ import { parseISO as s } from "date-fns/parseISO";
2
+ var c = "summary_header", p = (t, r, e) => e?.insights_payload?.title || "", m = (t) => typeof t == "number" && Number.isFinite(t) ? t : void 0, f = (t) => typeof t == "number" && Number.isInteger(t) && t > 0 ? t : void 0, _ = Date.UTC(2e3, 0, 1), u = Date.UTC(2100, 0, 1), i = /* @__PURE__ */ new WeakSet(), d = (t, r) => {
3
+ i.has(t) || (i.add(t), console.warn(r));
4
+ }, o = (t, r, e) => {
3
5
  if (t == null || t === "") return;
4
- let r;
5
- if (typeof t == "number" && Number.isFinite(t)) r = t < 1e12 ? t * 1e3 : t;
6
+ let a;
7
+ if (typeof t == "number" && Number.isFinite(t)) a = t < 1e12 ? t * 1e3 : t;
6
8
  else if (typeof t == "string") {
7
- const n = i(t).getTime();
8
- r = Number.isNaN(n) ? void 0 : n;
9
+ const n = s(t).getTime();
10
+ a = Number.isNaN(n) ? void 0 : n;
9
11
  }
10
- if (r === void 0 || r < s || r > d) {
11
- console.warn(`[TransactionListBlock] drilldown_data.${e} is unparseable or out of range (${typeof t})`);
12
+ if (a === void 0 || a < _ || a > u) {
13
+ d(e, `[TransactionListBlock] drilldown_data.${r} is unparseable or out of range (${typeof t})`);
12
14
  return;
13
15
  }
14
- return new Date(r);
15
- }, u = (t) => {
16
+ return new Date(a);
17
+ }, b = (t) => {
16
18
  if (t?.variant !== "summary_header") return;
17
- const e = t?.drilldown_data;
18
- if (!e) return;
19
- const r = a(e.amount);
20
- if (r === void 0) {
21
- Object.keys(e).length > 0 && console.warn("[TransactionListBlock] drilldown_data has no finite `amount` — no summary header.");
19
+ const r = t?.drilldown_data;
20
+ if (!r) return;
21
+ const e = m(r.amount);
22
+ if (e === void 0) {
23
+ Object.keys(r).length > 0 && d(r, "[TransactionListBlock] drilldown_data has no finite `amount` — no summary header.");
22
24
  return;
23
25
  }
24
26
  return {
25
- amount: r,
26
- startDate: o(e.start_date, "start_date"),
27
- endDate: o(e.end_date, "end_date"),
28
- count: m(e.count)
27
+ amount: e,
28
+ startDate: o(r.start_date, "start_date", r),
29
+ endDate: o(r.end_date, "end_date", r),
30
+ count: f(r.count)
29
31
  };
30
32
  };
31
33
  export {
32
- _ as SUMMARY_HEADER_VARIANT,
33
- c as getTransactionListDrawerTitle,
34
- u as readSummary
34
+ c as SUMMARY_HEADER_VARIANT,
35
+ p as getTransactionListDrawerTitle,
36
+ b as readSummary
35
37
  };
36
38
 
37
39
  //# sourceMappingURL=layout.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/layout.ts"],"sourcesContent":["import { parseISO } from 'date-fns/parseISO'\n\nimport type { Beat, GlobalCopy, InDescriptionCTA, PrimaryCTA, SecondaryCTA } from '../../../core'\n\ntype DrilldownCta = PrimaryCTA | SecondaryCTA | InDescriptionCTA\n\n/** The CTA variant that opens the summary-header drilldown. */\nexport const SUMMARY_HEADER_VARIANT = 'summary_header'\n\n/**\n * Drawer title: the beat's own localized title, whatever the variant. A variant names a layout the\n * drawer shares between beats (Replenish Savings' \"Savings Withdrawal\" and Weekly New Merchants'\n * \"Purchases for review\" both open `summary_header`), so no variant carries one beat's title.\n */\nexport const getTransactionListDrawerTitle = (\n _variant: string | null | undefined,\n _copy: GlobalCopy,\n beat?: Beat,\n): string => beat?.insights_payload?.title || ''\n\nexport interface TransactionListSummary {\n /** Headline figure (e.g. total withdrawn). */\n amount: number\n /** Validated range endpoints; rendered as `{start} – {end}`. Omitted when the payload value is\n * missing or unparseable (so the drawer never crashes on an Invalid Date). */\n startDate?: Date\n endDate?: Date\n /** Transaction count for the pill; the block falls back to the resolved rows' length. */\n count?: number\n}\n\nconst toFiniteNumber = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) ? value : undefined\n\n// Sane epoch window so a bad/typo payload can't render a far-past/future date.\nconst EPOCH_MIN = Date.UTC(2000, 0, 1)\nconst EPOCH_MAX = Date.UTC(2100, 0, 1)\n\n/**\n * Parse a payload date value to a validated `Date`, or `undefined`. Accepts unix seconds or\n * milliseconds (auto-detected) and ISO strings. Fails closed (no throw): an unparseable or\n * out-of-range value returns undefined and warns, so `formatDate`/`intlFormat` never sees an Invalid\n * Date (which throws `RangeError` and takes down the whole drawer render).\n */\nconst toCount = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isInteger(value) && value >= 0 ? value : undefined\n\nconst toDate = (value: unknown, field: string): Date | undefined => {\n // Missing/empty is a normal \"no range\" case — return quietly, don't warn.\n if (value === undefined || value === null || value === '') return undefined\n\n let ms: number | undefined\n if (typeof value === 'number' && Number.isFinite(value)) {\n // < 1e12 is treated as seconds (1e12 ms is year 33658). Trade-off: genuine ms timestamps from\n // ~2000-2001 would be misread as seconds and fall outside the window below (dropped, not shown).\n ms = value < 1e12 ? value * 1000 : value\n } else if (typeof value === 'string') {\n const parsed = parseISO(value).getTime()\n ms = Number.isNaN(parsed) ? undefined : parsed\n }\n\n if (ms === undefined || ms < EPOCH_MIN || ms > EPOCH_MAX) {\n console.warn(\n `[TransactionListBlock] drilldown_data.${field} is unparseable or out of range (${typeof value})`,\n )\n return undefined\n }\n return new Date(ms)\n}\n\n/**\n * Summary-header figures for the drawer, read from the clicked CTA's `drilldown_data` (the backend\n * hangs a drilldown's own data off the CTA that opens it). Fails closed throughout: only the\n * `summary_header` variant renders a header (so figures from a different CTA that `getDynamicCta…`\n * fell back to can't be misattributed), then without a finite `amount` there is still no header, and\n * each date is validated to a real `Date` or dropped — an unparseable value never reaches\n * `formatDate` (which throws on an Invalid Date).\n *\n * `drilldown_data` fields: `amount` (number), `start_date`/`end_date` (unix seconds|ms or ISO),\n * `count` (number).\n */\nexport const readSummary = (cta: DrilldownCta | undefined): TransactionListSummary | undefined => {\n // Defense-in-depth on financial figures: only the summary-header variant shows the card.\n if (cta?.variant !== SUMMARY_HEADER_VARIANT) return undefined\n\n const source = cta?.drilldown_data\n if (!source) return undefined\n\n const amount = toFiniteNumber(source.amount)\n if (amount === undefined) {\n // `drilldown_data` present but no usable amount -> surface the likely contract drift (field\n // rename) instead of a silently missing header.\n if (Object.keys(source).length > 0) {\n console.warn(\n '[TransactionListBlock] drilldown_data has no finite `amount` — no summary header.',\n )\n }\n return undefined\n }\n\n return {\n amount,\n startDate: toDate(source.start_date, 'start_date'),\n endDate: toDate(source.end_date, 'end_date'),\n count: toCount(source.count),\n }\n}\n"],"mappings":";AAOA,IAAa,IAAyB,kBAOzB,IAAA,CACX,GACA,GACA,MACW,GAAM,kBAAkB,SAAS,IAaxC,IAAA,CAAkB,MACtB,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,IAAI,IAAQ,QAG1D,IAAY,KAAK,IAAI,KAAM,GAAG,CAAC,GAC/B,IAAY,KAAK,IAAI,MAAM,GAAG,CAAC,GAQ/B,IAAA,CAAW,MACf,OAAO,KAAU,YAAY,OAAO,UAAU,CAAK,KAAK,KAAS,IAAI,IAAQ,QAEzE,IAAA,CAAU,GAAgB,MAAoC;AAElE,MAA2B,KAAU,QAAQ,MAAU,GAAI;AAE3D,MAAI;AACJ,MAAI,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,EAGpD,CAAA,IAAK,IAAQ,OAAO,IAAQ,MAAO;AAAA,WAC1B,OAAO,KAAU,UAAU;AACpC,UAAM,IAAS,EAAS,CAAK,EAAE,QAAQ;AACvC,IAAA,IAAK,OAAO,MAAM,CAAM,IAAI,SAAY;AAAA,EAC1C;AAEA,MAAI,MAAO,UAAa,IAAK,KAAa,IAAK,GAAW;AACxD,YAAQ,KACN,yCAAyC,CAAA,oCAAyC,OAAO,CAAA,GAC3F;AACA;AAAA,EACF;AACA,SAAO,IAAI,KAAK,CAAE;AACpB,GAaa,IAAA,CAAe,MAAsE;AAEhG,MAAI,GAAK,YAAA,iBAAoC;AAE7C,QAAM,IAAS,GAAK;AACpB,MAAI,CAAC,EAAQ;AAEb,QAAM,IAAS,EAAe,EAAO,MAAM;AAC3C,MAAI,MAAW,QAAW;AAGxB,IAAI,OAAO,KAAK,CAAM,EAAE,SAAS,KAC/B,QAAQ,KACN,mFACF;AAEF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,QAAA;AAAA,IACA,WAAW,EAAO,EAAO,YAAY,YAAY;AAAA,IACjD,SAAS,EAAO,EAAO,UAAU,UAAU;AAAA,IAC3C,OAAO,EAAQ,EAAO,KAAK;AAAA,EAC7B;AACF"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionListBlock/layout.ts"],"sourcesContent":["import { parseISO } from 'date-fns/parseISO'\n\nimport type { Beat, GlobalCopy, InDescriptionCTA, PrimaryCTA, SecondaryCTA } from '../../../core'\n\ntype DrilldownCta = PrimaryCTA | SecondaryCTA | InDescriptionCTA\n\n/** The CTA variant that opens the summary-header drilldown. */\nexport const SUMMARY_HEADER_VARIANT = 'summary_header'\n\n/**\n * Drawer title: the beat's own localized title, whatever the variant. The drawer is shared across\n * beats (Replenish Savings' \"Savings Withdrawal\" summary-header drawer, Weekly New Merchants' plain\n * \"Purchases for review\" list), so the title comes from the beat, not the variant.\n */\nexport const getTransactionListDrawerTitle = (\n _variant: string | null | undefined,\n _copy: GlobalCopy,\n beat?: Beat,\n): string => beat?.insights_payload?.title || ''\n\nexport interface TransactionListSummary {\n /** Headline figure (e.g. total withdrawn). */\n amount: number\n /** Validated range endpoints; rendered as `{start} – {end}`. Omitted when the payload value is\n * missing or unparseable (so the drawer never crashes on an Invalid Date). */\n startDate?: Date\n endDate?: Date\n /** Number of transactions for the pill, from the CTA's `drilldown_data.count`. */\n count?: number\n}\n\nconst toFiniteNumber = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isFinite(value) ? value : undefined\n\n// `> 0`: the card only shows with >= 1 guid, so a `count` of 0 is dropped and falls back to the\n// guid count rather than rendering \"0 transactions\".\nconst toCount = (value: unknown): number | undefined =>\n typeof value === 'number' && Number.isInteger(value) && value > 0 ? value : undefined\n\n// Sane epoch window so a bad/typo payload can't render a far-past/future date.\nconst EPOCH_MIN = Date.UTC(2000, 0, 1)\nconst EPOCH_MAX = Date.UTC(2100, 0, 1)\n\n// `readSummary` runs on every observer re-render (no `useMemo` by design), so warn at most once per\n// distinct payload object instead of on every render. Keyed on the `drilldown_data` object, which is\n// a stable reference across re-renders of the same beat.\nconst warnedPayloads = new WeakSet<object>()\nconst warnOncePerPayload = (source: object, message: string): void => {\n if (warnedPayloads.has(source)) return\n warnedPayloads.add(source)\n console.warn(message)\n}\n\n/**\n * Parse a payload date value to a validated `Date`, or `undefined`. Accepts unix seconds or\n * milliseconds (auto-detected) and ISO strings. Fails closed (no throw): an unparseable or\n * out-of-range value returns undefined and warns, so `formatDate`/`intlFormat` never sees an Invalid\n * Date (which throws `RangeError` and takes down the whole drawer render).\n */\nconst toDate = (value: unknown, field: string, source: object): Date | undefined => {\n // Missing/empty is a normal \"no range\" case — return quietly, don't warn.\n if (value === undefined || value === null || value === '') return undefined\n\n let ms: number | undefined\n if (typeof value === 'number' && Number.isFinite(value)) {\n // < 1e12 is treated as seconds (1e12 ms is year 33658). Trade-off: genuine ms timestamps from\n // ~2000-2001 would be misread as seconds and fall outside the window below (dropped, not shown).\n ms = value < 1e12 ? value * 1000 : value\n } else if (typeof value === 'string') {\n const parsed = parseISO(value).getTime()\n ms = Number.isNaN(parsed) ? undefined : parsed\n }\n\n if (ms === undefined || ms < EPOCH_MIN || ms > EPOCH_MAX) {\n warnOncePerPayload(\n source,\n `[TransactionListBlock] drilldown_data.${field} is unparseable or out of range (${typeof value})`,\n )\n return undefined\n }\n return new Date(ms)\n}\n\n/**\n * Summary-header figures for the drawer, read from the clicked CTA's `drilldown_data` (the backend\n * hangs a drilldown's own data off the CTA that opens it). Fails closed throughout: only the\n * `summary_header` variant renders a header (so figures from a different CTA that `getDynamicCta…`\n * fell back to can't be misattributed), then without a finite `amount` there is still no header, and\n * each date is validated to a real `Date` or dropped — an unparseable value never reaches\n * `formatDate` (which throws on an Invalid Date).\n *\n * `drilldown_data` fields: `amount` (number), `start_date`/`end_date` (unix seconds|ms or ISO),\n * `count` (number of transactions).\n */\nexport const readSummary = (cta: DrilldownCta | undefined): TransactionListSummary | undefined => {\n // Defense-in-depth on financial figures: only the summary-header variant shows the card.\n if (cta?.variant !== SUMMARY_HEADER_VARIANT) return undefined\n\n const source = cta?.drilldown_data\n if (!source) return undefined\n\n const amount = toFiniteNumber(source.amount)\n if (amount === undefined) {\n // `drilldown_data` present but no usable amount -> surface the likely contract drift (field\n // rename) instead of a silently missing header.\n if (Object.keys(source).length > 0) {\n warnOncePerPayload(\n source,\n '[TransactionListBlock] drilldown_data has no finite `amount` — no summary header.',\n )\n }\n return undefined\n }\n\n return {\n amount,\n startDate: toDate(source.start_date, 'start_date', source),\n endDate: toDate(source.end_date, 'end_date', source),\n count: toCount(source.count),\n }\n}\n"],"mappings":";AAOA,IAAa,IAAyB,kBAOzB,IAAA,CACX,GACA,GACA,MACW,GAAM,kBAAkB,SAAS,IAaxC,IAAA,CAAkB,MACtB,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,IAAI,IAAQ,QAI1D,IAAA,CAAW,MACf,OAAO,KAAU,YAAY,OAAO,UAAU,CAAK,KAAK,IAAQ,IAAI,IAAQ,QAGxE,IAAY,KAAK,IAAI,KAAM,GAAG,CAAC,GAC/B,IAAY,KAAK,IAAI,MAAM,GAAG,CAAC,GAK/B,IAAiB,oBAAI,QAAgB,GACrC,IAAA,CAAsB,GAAgB,MAA0B;AACpE,EAAI,EAAe,IAAI,CAAM,MAC7B,EAAe,IAAI,CAAM,GACzB,QAAQ,KAAK,CAAO;AACtB,GAQM,IAAA,CAAU,GAAgB,GAAe,MAAqC;AAElF,MAA2B,KAAU,QAAQ,MAAU,GAAI;AAE3D,MAAI;AACJ,MAAI,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,EAGpD,CAAA,IAAK,IAAQ,OAAO,IAAQ,MAAO;AAAA,WAC1B,OAAO,KAAU,UAAU;AACpC,UAAM,IAAS,EAAS,CAAK,EAAE,QAAQ;AACvC,IAAA,IAAK,OAAO,MAAM,CAAM,IAAI,SAAY;AAAA,EAC1C;AAEA,MAAI,MAAO,UAAa,IAAK,KAAa,IAAK,GAAW;AACxD,IAAA,EACE,GACA,yCAAyC,CAAA,oCAAyC,OAAO,CAAA,GAC3F;AACA;AAAA,EACF;AACA,SAAO,IAAI,KAAK,CAAE;AACpB,GAaa,IAAA,CAAe,MAAsE;AAEhG,MAAI,GAAK,YAAA,iBAAoC;AAE7C,QAAM,IAAS,GAAK;AACpB,MAAI,CAAC,EAAQ;AAEb,QAAM,IAAS,EAAe,EAAO,MAAM;AAC3C,MAAI,MAAW,QAAW;AAGxB,IAAI,OAAO,KAAK,CAAM,EAAE,SAAS,KAC/B,EACE,GACA,mFACF;AAEF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,QAAA;AAAA,IACA,WAAW,EAAO,EAAO,YAAY,cAAc,CAAM;AAAA,IACzD,SAAS,EAAO,EAAO,UAAU,YAAY,CAAM;AAAA,IACnD,OAAO,EAAQ,EAAO,KAAK;AAAA,EAC7B;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.58",
3
+ "version": "9.7.60",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",