@mx-cartographer/experiences 9.7.155 → 9.7.156

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 (36) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js +19 -22
  3. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js.map +1 -1
  4. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +44 -49
  5. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
  6. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +37 -41
  7. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
  8. package/dist/insights-v2/actionBlocks/BlockErrorMessage.d.ts +4 -0
  9. package/dist/insights-v2/actionBlocks/BlockErrorMessage.es.js +17 -0
  10. package/dist/insights-v2/actionBlocks/BlockErrorMessage.es.js.map +1 -0
  11. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +116 -120
  12. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
  13. package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.es.js +14 -18
  14. package/dist/insights-v2/actionBlocks/ContactSupportActionBlock.es.js.map +1 -1
  15. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +19 -25
  16. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +26 -28
  18. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
  19. package/dist/insights-v2/actionBlocks/HelpBlock/HelpBlock.es.js +11 -14
  20. package/dist/insights-v2/actionBlocks/HelpBlock/HelpBlock.es.js.map +1 -1
  21. package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js +28 -30
  22. package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js.map +1 -1
  23. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +53 -55
  24. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
  25. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +26 -31
  26. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
  27. package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
  28. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +38 -41
  29. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
  30. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js +11 -16
  31. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js.map +1 -1
  32. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +39 -42
  33. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  34. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +76 -78
  35. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
+ ## [9.7.156] - 11-13-2026
2
+
3
+ - **CHANGED** - Insights 2.0 action blocks show one shared error message when their copy or data is missing; no visible change when copy has loaded (WEC-2262)
4
+ - **CHANGED** - Action blocks rely on `ActionBlockLayer`'s copy loader and no longer check copy loading themselves (WEC-2262)
5
+ - **FIXED** - After a failed copy request, the error drawer shows "Something went wron...
6
+
1
7
  ## [9.7.155] - 11-13-2026
2
8
 
3
- - **CHANGED** - Insights 2.0 action blocks read the CTA that opened their drawer through one shared `useOpenedCta` hook in...
9
+ - **CHANGED** - Insights 2.0 action blocks read the CTA that opened their drawer through one shared `useOpenedCta` hook instead of resolving it themselves; drawers behave the same (WEC-2262)
10
+ - **CHANGED** - The placeholder action block resolves its in-description link and chart-bar trigger like the other action blocks (WEC-2262)
11
+ - **CHANGED** - Debt Payoff Strategies uses the shared currency format for account balances; no visible change (WEC-2259)
12
+ - **CHANGED** - The Transaction List summary and Subscriptions header cards share one icon tile; no visible change (WEC-2262)
4
13
 
5
14
  ## [9.7.154] - 11-13-2026
6
15
 
@@ -1,29 +1,26 @@
1
- import { useAccountStore as b, useGlobalCopyStore as S, useGlobalStore as A } from "../../../common/context/hooks.es.js";
2
- import r from "../../../common/components/Loader.es.js";
3
- import g from "../../../trends/components/TrendsChart.es.js";
4
- import x from "../../../accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js";
5
- import { resolveAccount as C } from "./layout.es.js";
6
- import h from "../../../accounts/components/detailsdrawer/Accounts/AccountDetailsContent.es.js";
7
- import { useEffect as _ } from "react";
1
+ import { useAccountStore as a } from "../../../common/context/hooks.es.js";
2
+ import c from "../../../common/components/Loader.es.js";
3
+ import l from "../../../trends/components/TrendsChart.es.js";
4
+ import { BlockErrorMessage as p } from "../BlockErrorMessage.es.js";
5
+ import A from "../../../accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js";
6
+ import { resolveAccount as b } from "./layout.es.js";
7
+ import g from "../../../accounts/components/detailsdrawer/Accounts/AccountDetailsContent.es.js";
8
+ import { useEffect as S } from "react";
8
9
  import { observer as k } from "mobx-react-lite";
9
- import n from "@mui/material/Stack";
10
- import { Text as D } from "@mxenabled/mxui";
11
- import { jsx as e, jsxs as L } from "react/jsx-runtime";
10
+ import x from "@mui/material/Stack";
11
+ import { jsx as e, jsxs as C } from "react/jsx-runtime";
12
12
  var w = k(function({ beat: i }) {
13
- const { copyStore: m } = A(), { common: s } = S(), { accounts: u, accountsLoaded: d, institutionsLoaded: a, members: c, membersLoaded: f, uiStore: t } = b(), o = C(i, u), l = !!o && t.selectedAccount.guid === o.guid;
14
- return _(() => {
15
- o && (t.setSelectedAccount(o), t.setSelectedMember(c.find((p) => p.guid === o.member_guid) ?? {}));
13
+ const { accounts: n, accountsLoaded: m, institutionsLoaded: u, members: r, membersLoaded: s, uiStore: o } = a(), t = b(i, n), d = !!t && o.selectedAccount.guid === t.guid;
14
+ return S(() => {
15
+ t && (o.setSelectedAccount(t), o.setSelectedMember(r.find((f) => f.guid === t.member_guid) ?? {}));
16
16
  }, [
17
- o,
18
- c,
19
- t
20
- ]), m.isInitialized ? o ? !l || !f || !a ? /* @__PURE__ */ e(r, {}) : /* @__PURE__ */ L(n, {
17
+ t,
18
+ r,
19
+ o
20
+ ]), t ? !d || !s || !u ? /* @__PURE__ */ e(c, {}) : /* @__PURE__ */ C(x, {
21
21
  sx: { bgcolor: "background.default" },
22
- children: [/* @__PURE__ */ e(x, { ChartComponent: g }), /* @__PURE__ */ e(h, {})]
23
- }) : d ? /* @__PURE__ */ e(n, {
24
- sx: { p: 24 },
25
- children: /* @__PURE__ */ e(D, { children: s.error_message })
26
- }) : /* @__PURE__ */ e(r, {}) : /* @__PURE__ */ e(r, {});
22
+ children: [/* @__PURE__ */ e(A, { ChartComponent: l }), /* @__PURE__ */ e(g, {})]
23
+ }) : m ? /* @__PURE__ */ e(p, {}) : /* @__PURE__ */ e(c, {});
27
24
  });
28
25
  export {
29
26
  w as AccountDetailsBlock
@@ -1 +1 @@
1
- {"version":3,"file":"AccountDetailsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.tsx"],"sourcesContent":["import { useEffect } from 'react'\n\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport AccountDetailsContent from '../../../accounts/components/detailsdrawer/Accounts/AccountDetailsContent'\nimport AccountDetailsHeader from '../../../accounts/components/detailsdrawer/Accounts/AccountDetailsHeader'\nimport { Loader, useAccountStore, useGlobalCopyStore, useGlobalStore } from '../../../common'\nimport type { Member } from '../../../core'\nimport TrendsChart from '../../../trends/components/TrendsChart'\nimport type { ActionBlockProps } from '../../mappings/blocks'\n\nimport { resolveAccount } from './layout'\n\n/**\n * Account Details drawer (MEW2-2633): the accounts widget's details header (logo, institution,\n * name, balances, trend chart) and content (Transactions / Account Details tabs, connection status,\n * actions) for the beat's account. Those components read the account store's selection, so the\n * beat's account is selected here first and nothing renders until the selection matches and the\n * members and institutions are in (the connection section reads the member's status): a guid the\n * store cannot resolve shows the error message, never the previously selected account.\n */\nexport const AccountDetailsBlock = observer(function AccountDetailsBlock({\n beat,\n}: ActionBlockProps) {\n const { copyStore } = useGlobalStore()\n const { common: commonCopy } = useGlobalCopyStore()\n const { accounts, accountsLoaded, institutionsLoaded, members, membersLoaded, uiStore } =\n useAccountStore()\n const account = resolveAccount(beat, accounts)\n const isSelected = !!account && uiStore.selectedAccount.guid === account.guid\n\n useEffect(() => {\n if (!account) return\n\n uiStore.setSelectedAccount(account)\n uiStore.setSelectedMember(\n members.find((member) => member.guid === account.member_guid) ?? ({} as Member),\n )\n }, [account, members, uiStore])\n\n if (!copyStore.isInitialized) return <Loader />\n\n if (!account) {\n if (!accountsLoaded) return <Loader />\n\n return (\n <Stack sx={{ p: 24 }}>\n <Text>{commonCopy.error_message}</Text>\n </Stack>\n )\n }\n\n if (!isSelected || !membersLoaded || !institutionsLoaded) return <Loader />\n\n return (\n <Stack sx={{ bgcolor: 'background.default' }}>\n <AccountDetailsHeader ChartComponent={TrendsChart} />\n <AccountDetailsContent />\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,IAAsB,EAAS,SAA6B,EACvE,MAAA,EAAA,GACmB;AACnB,QAAM,EAAE,WAAA,EAAA,IAAc,EAAe,GAC/B,EAAE,QAAQ,EAAA,IAAe,EAAmB,GAC5C,EAAE,UAAA,GAAU,gBAAA,GAAgB,oBAAA,GAAoB,SAAA,GAAS,eAAA,GAAe,SAAA,EAAA,IAC5E,EAAgB,GACZ,IAAU,EAAe,GAAM,CAAQ,GACvC,IAAa,CAAC,CAAC,KAAW,EAAQ,gBAAgB,SAAS,EAAQ;AAWzE,SATA,EAAA,MAAgB;AACd,IAAK,MAEL,EAAQ,mBAAmB,CAAO,GAClC,EAAQ,kBACN,EAAQ,KAAA,CAAM,MAAW,EAAO,SAAS,EAAQ,WAAW,KAAM,CAAC,CACrE;AAAA,EACF,GAAG;AAAA,IAAC;AAAA,IAAS;AAAA,IAAS;AAAA,EAAO,CAAC,GAEzB,EAAU,gBAEV,IAUD,CAAC,KAAc,CAAC,KAAiB,CAAC,IAA2B,gBAAA,EAAC,GAAD,CAAS,CAAA,IAGxE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,SAAS,qBAAqB;AAAA,IAA3C,UAAA,CACE,gBAAA,EAAC,GAAD,EAAsB,gBAAgB,EAAc,CAAA,GACpD,gBAAA,EAAC,GAAD,CAAwB,CAAA,CACnB;AAAA,OAfF,IAGH,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,GAAD,EAAA,UAAO,EAAW,cAAoB,CAAA;AAAA,EACjC,CAAA,IALmB,gBAAA,EAAC,GAAD,CAAS,CAAA,IAHF,gBAAA,EAAC,GAAD,CAAS,CAAA;AAoBhD,CAAC"}
1
+ {"version":3,"file":"AccountDetailsBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.tsx"],"sourcesContent":["import { useEffect } from 'react'\n\nimport Stack from '@mui/material/Stack'\n\nimport { observer } from 'mobx-react-lite'\n\nimport AccountDetailsContent from '../../../accounts/components/detailsdrawer/Accounts/AccountDetailsContent'\nimport AccountDetailsHeader from '../../../accounts/components/detailsdrawer/Accounts/AccountDetailsHeader'\nimport { Loader, useAccountStore } from '../../../common'\nimport type { Member } from '../../../core'\nimport TrendsChart from '../../../trends/components/TrendsChart'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { BlockErrorMessage } from '../BlockErrorMessage'\n\nimport { resolveAccount } from './layout'\n\n/**\n * Account Details drawer (MEW2-2633): the accounts widget's details header (logo, institution,\n * name, balances, trend chart) and content (Transactions / Account Details tabs, connection status,\n * actions) for the beat's account. Those components read the account store's selection, so the\n * beat's account is selected here first and nothing renders until the selection matches and the\n * members and institutions are in (the connection section reads the member's status): a guid the\n * store cannot resolve shows the error message, never the previously selected account.\n */\nexport const AccountDetailsBlock = observer(function AccountDetailsBlock({\n beat,\n}: ActionBlockProps) {\n const { accounts, accountsLoaded, institutionsLoaded, members, membersLoaded, uiStore } =\n useAccountStore()\n const account = resolveAccount(beat, accounts)\n const isSelected = !!account && uiStore.selectedAccount.guid === account.guid\n\n useEffect(() => {\n if (!account) return\n\n uiStore.setSelectedAccount(account)\n uiStore.setSelectedMember(\n members.find((member) => member.guid === account.member_guid) ?? ({} as Member),\n )\n }, [account, members, uiStore])\n\n if (!account) {\n if (!accountsLoaded) return <Loader />\n\n return <BlockErrorMessage />\n }\n\n if (!isSelected || !membersLoaded || !institutionsLoaded) return <Loader />\n\n return (\n <Stack sx={{ bgcolor: 'background.default' }}>\n <AccountDetailsHeader ChartComponent={TrendsChart} />\n <AccountDetailsContent />\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,IAAsB,EAAS,SAA6B,EACvE,MAAA,EAAA,GACmB;AACnB,QAAM,EAAE,UAAA,GAAU,gBAAA,GAAgB,oBAAA,GAAoB,SAAA,GAAS,eAAA,GAAe,SAAA,EAAA,IAC5E,EAAgB,GACZ,IAAU,EAAe,GAAM,CAAQ,GACvC,IAAa,CAAC,CAAC,KAAW,EAAQ,gBAAgB,SAAS,EAAQ;AAWzE,SATA,EAAA,MAAgB;AACd,IAAK,MAEL,EAAQ,mBAAmB,CAAO,GAClC,EAAQ,kBACN,EAAQ,KAAA,CAAM,MAAW,EAAO,SAAS,EAAQ,WAAW,KAAM,CAAC,CACrE;AAAA,EACF,GAAG;AAAA,IAAC;AAAA,IAAS;AAAA,IAAS;AAAA,EAAO,CAAC,GAEzB,IAMD,CAAC,KAAc,CAAC,KAAiB,CAAC,IAA2B,gBAAA,EAAC,GAAD,CAAS,CAAA,IAGxE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,SAAS,qBAAqB;AAAA,IAA3C,UAAA,CACE,gBAAA,EAAC,GAAD,EAAsB,gBAAgB,EAAc,CAAA,GACpD,gBAAA,EAAC,GAAD,CAAwB,CAAA,CACnB;AAAA,OAXF,IAEE,gBAAA,EAAC,GAAD,CAAoB,CAAA,IAFC,gBAAA,EAAC,GAAD,CAAS,CAAA;AAazC,CAAC"}
@@ -1,85 +1,80 @@
1
- import q from "../../../common/utils/AccountDisplayName.es.js";
2
- import { useAccountStore as z, useAppConfig as I, useCashflowStore as H, useGlobalCopyStore as J, useGlobalStore as K, useRecurringTransactionsStore as M } from "../../../common/context/hooks.es.js";
3
- import { getFrequencyLabel as P } from "../../../core/utils/RecurringTransactionsUtil.es.js";
4
- import C from "../../../common/components/drawer/Drawer.es.js";
5
- import _ from "../../../common/components/Loader.es.js";
6
- import Q from "../../components/CategoryTile.es.js";
7
- import { useOpenedCta as U } from "../useOpenedCta.es.js";
8
- import { useRecurringExpensesLoadState as V } from "../RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
9
- import { RecurringTransactionBlock as W } from "../RecurringTransactionBlock/RecurringTransactionBlock.es.js";
10
- import { AccountDetailsBlock as X } from "../AccountDetailsBlock/AccountDetailsBlock.es.js";
11
- import Y from "./AccountListContent.es.js";
12
- import { buildSummary as Z, isCheckingAccount as G, resolveBeatAccounts as tt, toAccountSection as S } from "./layout.es.js";
13
- import { useState as T } from "react";
14
- import { observer as ot } from "mobx-react-lite";
15
- import et from "@mui/material/Stack";
16
- import { Text as nt } from "@mxenabled/mxui";
17
- import { Fragment as it, jsx as o, jsxs as ct } from "react/jsx-runtime";
18
- var kt = ot(function({ beat: n }) {
19
- const [i, l] = T(null), [r, m] = T(null), { copyStore: k } = K(), { accounts: p, common: v, insights_feed: L, recurring: s } = J(), { accountsLoaded: b, cashAccounts: x, visibleAccounts: d } = z(), w = U(n), { uiStore: D } = H(), { detailedRepeatingTransactions: R } = M(), { config: B } = I(), { failed: g, ready: f, retry: E } = V(), e = L?.account_list;
20
- if (!k.isInitialized) return /* @__PURE__ */ o(_, {});
21
- if (!e) return /* @__PURE__ */ o(et, {
22
- sx: { p: 24 },
23
- children: /* @__PURE__ */ o(nt, { children: v?.error_message ?? "Something went wrong." })
24
- });
25
- if (!b) return /* @__PURE__ */ o(_, {});
26
- const y = tt(n, d, x), F = y.filter(G), $ = y.filter((t) => !G(t)), a = B.display_available_balance_in_accounts, N = [S("checking", e.checking, F, a), S("savings", e.savings, $, a)].filter((t) => t.rows.length > 0), O = f ? [...D.expensesTilNextIncome].sort((t, c) => c.amount - t.amount).map((t) => {
27
- const c = d.find(({ guid: u }) => u === t.accountGuid), A = R.find(({ guid: u }) => u === t.repeatingTransactionGuid);
1
+ import O from "../../../common/utils/AccountDisplayName.es.js";
2
+ import { useAccountStore as $, useAppConfig as j, useCashflowStore as q, useGlobalCopyStore as z, useRecurringTransactionsStore as I } from "../../../common/context/hooks.es.js";
3
+ import { getFrequencyLabel as M } from "../../../core/utils/RecurringTransactionsUtil.es.js";
4
+ import _ from "../../../common/components/drawer/Drawer.es.js";
5
+ import H from "../../../common/components/Loader.es.js";
6
+ import { BlockErrorMessage as J } from "../BlockErrorMessage.es.js";
7
+ import K from "../../components/CategoryTile.es.js";
8
+ import { useOpenedCta as P } from "../useOpenedCta.es.js";
9
+ import { useRecurringExpensesLoadState as Q } from "../RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
10
+ import { RecurringTransactionBlock as U } from "../RecurringTransactionBlock/RecurringTransactionBlock.es.js";
11
+ import { AccountDetailsBlock as V } from "../AccountDetailsBlock/AccountDetailsBlock.es.js";
12
+ import W from "./AccountListContent.es.js";
13
+ import { buildSummary as X, isCheckingAccount as h, resolveBeatAccounts as Y, toAccountSection as k } from "./layout.es.js";
14
+ import { useState as G } from "react";
15
+ import { observer as Z } from "mobx-react-lite";
16
+ import { Fragment as tt, jsx as o, jsxs as ot } from "react/jsx-runtime";
17
+ var _t = Z(function({ beat: n }) {
18
+ const [i, l] = G(null), [s, m] = G(null), { accounts: p, insights_feed: T, recurring: r } = z(), { accountsLoaded: v, cashAccounts: L, visibleAccounts: d } = $(), S = P(n), { uiStore: b } = q(), { detailedRepeatingTransactions: x } = I(), { config: D } = j(), { failed: g, ready: f, retry: R } = Q(), e = T?.account_list;
19
+ if (!e) return /* @__PURE__ */ o(J, {});
20
+ if (!v) return /* @__PURE__ */ o(H, {});
21
+ const y = Y(n, d, L), B = y.filter(h), E = y.filter((t) => !h(t)), a = D.display_available_balance_in_accounts, w = [k("checking", e.checking, B, a), k("savings", e.savings, E, a)].filter((t) => t.rows.length > 0), F = f ? [...b.expensesTilNextIncome].sort((t, c) => c.amount - t.amount).map((t) => {
22
+ const c = d.find(({ guid: u }) => u === t.accountGuid), C = x.find(({ guid: u }) => u === t.repeatingTransactionGuid);
28
23
  return {
29
24
  account: {
30
25
  institutionGuid: t.institutionGuid,
31
- name: c ? q(c) : t.institutionName
26
+ name: c ? O(c) : t.institutionName
32
27
  },
33
28
  amount: t.amount,
34
- frequency: A && P(s, A, !1),
29
+ frequency: C && M(r, C, !1),
35
30
  key: `${t.repeatingTransactionGuid}-${t.expectedDate.getTime()}`,
36
- leading: /* @__PURE__ */ o(Q, {
31
+ leading: /* @__PURE__ */ o(K, {
37
32
  categoryGuid: t.categoryGuid,
38
33
  size: 32
39
34
  }),
40
35
  name: t.name,
41
36
  onClick: () => l(t)
42
37
  };
43
- }) : [], h = () => l(null), j = () => m(null);
44
- return /* @__PURE__ */ ct(it, { children: [
45
- /* @__PURE__ */ o(Y, {
38
+ }) : [], A = () => l(null), N = () => m(null);
39
+ return /* @__PURE__ */ ot(tt, { children: [
40
+ /* @__PURE__ */ o(W, {
46
41
  copy: e,
47
- expenses: O,
42
+ expenses: F,
48
43
  expensesLoading: !f && !g,
49
44
  onAccountClick: m,
50
- onRetryExpenses: g ? E : void 0,
51
- sections: N,
45
+ onRetryExpenses: g ? R : void 0,
46
+ sections: w,
52
47
  showAvailable: a,
53
- summary: Z(w, e)
48
+ summary: X(S, e)
54
49
  }),
55
- /* @__PURE__ */ o(C, {
56
- ariaLabelClose: s.close_drawer_aria,
50
+ /* @__PURE__ */ o(_, {
51
+ ariaLabelClose: r.close_drawer_aria,
57
52
  isOpen: i !== null,
58
- onClose: h,
59
- title: s.expense_details,
60
- children: i && /* @__PURE__ */ o(W, {
53
+ onClose: A,
54
+ title: r.expense_details,
55
+ children: i && /* @__PURE__ */ o(U, {
61
56
  beat: n,
62
57
  layout: "insights",
63
- onDeleted: h,
58
+ onDeleted: A,
64
59
  repeatingTransactionGuid: i.repeatingTransactionGuid,
65
60
  selectedRecurrence: i
66
61
  })
67
62
  }),
68
- /* @__PURE__ */ o(C, {
63
+ /* @__PURE__ */ o(_, {
69
64
  ariaLabelClose: p?.close_account_details_aria,
70
- isOpen: r !== null,
71
- onClose: j,
65
+ isOpen: s !== null,
66
+ onClose: N,
72
67
  title: p?.account_details,
73
- children: r && /* @__PURE__ */ o(X, { beat: {
68
+ children: s && /* @__PURE__ */ o(V, { beat: {
74
69
  ...n,
75
70
  primary_account: void 0,
76
- primary_account_guid: r
71
+ primary_account_guid: s
77
72
  } })
78
73
  })
79
74
  ] });
80
75
  });
81
76
  export {
82
- kt as AccountListBlock
77
+ _t as AccountListBlock
83
78
  };
84
79
 
85
80
  //# sourceMappingURL=AccountListBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n Loader,\n useAccountStore,\n useAppConfig,\n useCashflowStore,\n useGlobalCopyStore,\n useGlobalStore,\n useRecurringTransactionsStore,\n} from '../../../common'\nimport getAccountDisplayName from '../../../common/utils/AccountDisplayName'\nimport type { Recurrence } from '../../../core'\nimport { getFrequencyLabel } from '../../../core/utils/RecurringTransactionsUtil'\nimport CategoryTile from '../../components/CategoryTile'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { AccountDetailsBlock } from '../AccountDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringExpensesLoadState,\n} from '../RecurringTransactionBlock'\nimport { useOpenedCta } from '../useOpenedCta'\n\nimport AccountListContent, { type ExpenseRow } from './AccountListContent'\nimport { buildSummary, isCheckingAccount, resolveBeatAccounts, toAccountSection } from './layout'\n\n/**\n * Account List drawer: the CTA's calculation, then Accounts and Recurring Expenses tabs.\n * A tapped expense opens its Expense Details, and a tapped account its Account Details (the shared\n * AccountDetailsBlock), each in a nested drawer.\n */\nexport const AccountListBlock = observer(function AccountListBlock({ beat }: ActionBlockProps) {\n const [tappedExpense, setTappedExpense] = useState<Recurrence | null>(null)\n const [tappedAccountGuid, setTappedAccountGuid] = useState<string | null>(null)\n const { copyStore } = useGlobalStore()\n const {\n accounts: accountsCopy,\n common: commonCopy,\n insights_feed: insightsFeedCopy,\n recurring: recurringCopy,\n } = useGlobalCopyStore()\n const { accountsLoaded, cashAccounts, visibleAccounts } = useAccountStore()\n const cta = useOpenedCta(beat)\n const { uiStore } = useCashflowStore()\n const { detailedRepeatingTransactions } = useRecurringTransactionsStore()\n const { config } = useAppConfig()\n const { failed: expensesFailed, ready: expensesReady, retry } = useRecurringExpensesLoadState()\n const copy = insightsFeedCopy?.account_list\n\n if (!copyStore.isInitialized) return <Loader />\n\n // Copy loads once at app start, so a retry cannot clear a missing namespace: a plain message.\n if (!copy) {\n return (\n <Stack sx={{ p: 24 }}>\n <Text>{commonCopy?.error_message ?? 'Something went wrong.'}</Text>\n </Stack>\n )\n }\n\n if (!accountsLoaded) return <Loader />\n\n const listed = resolveBeatAccounts(beat, visibleAccounts, cashAccounts)\n const checking = listed.filter(isCheckingAccount)\n const savings = listed.filter((account) => !isCheckingAccount(account))\n const showAvailable = config.display_available_balance_in_accounts\n const sections = [\n toAccountSection('checking', copy.checking, checking, showAvailable),\n toAccountSection('savings', copy.savings, savings, showAvailable),\n ].filter((section) => section.rows.length > 0)\n\n // Every upcoming expense as its own row, largest first (Figma); no \"Other\" fold, so each opens its details.\n const expenses: ExpenseRow[] = expensesReady\n ? [...uiStore.expensesTilNextIncome]\n .sort((a, b) => b.amount - a.amount)\n .map((expense) => {\n const account = visibleAccounts.find(({ guid }) => guid === expense.accountGuid)\n const repeating = detailedRepeatingTransactions.find(\n ({ guid }) => guid === expense.repeatingTransactionGuid,\n )\n\n return {\n account: {\n institutionGuid: expense.institutionGuid,\n name: account ? getAccountDisplayName(account) : expense.institutionName,\n },\n amount: expense.amount,\n frequency: repeating && getFrequencyLabel(recurringCopy, repeating, false),\n key: `${expense.repeatingTransactionGuid}-${expense.expectedDate.getTime()}`,\n leading: <CategoryTile categoryGuid={expense.categoryGuid} size={32} />,\n name: expense.name,\n onClick: () => setTappedExpense(expense),\n }\n })\n : []\n\n const closeExpenseDetails = () => setTappedExpense(null)\n const closeAccountDetails = () => setTappedAccountGuid(null)\n\n return (\n <>\n <AccountListContent\n copy={copy}\n expenses={expenses}\n expensesLoading={!expensesReady && !expensesFailed}\n onAccountClick={setTappedAccountGuid}\n onRetryExpenses={expensesFailed ? retry : undefined}\n sections={sections}\n showAvailable={showAvailable}\n summary={buildSummary(cta, copy)}\n />\n <Drawer\n ariaLabelClose={recurringCopy.close_drawer_aria}\n isOpen={tappedExpense !== null}\n onClose={closeExpenseDetails}\n title={recurringCopy.expense_details}\n >\n {tappedExpense && (\n <RecurringTransactionBlock\n beat={beat}\n layout=\"insights\"\n onDeleted={closeExpenseDetails}\n repeatingTransactionGuid={tappedExpense.repeatingTransactionGuid}\n selectedRecurrence={tappedExpense}\n />\n )}\n </Drawer>\n <Drawer\n ariaLabelClose={accountsCopy?.close_account_details_aria}\n isOpen={tappedAccountGuid !== null}\n onClose={closeAccountDetails}\n title={accountsCopy?.account_details}\n >\n {tappedAccountGuid && (\n // The shared block shows the beat's account, so hand it the tapped one instead.\n <AccountDetailsBlock\n beat={{ ...beat, primary_account: undefined, primary_account_guid: tappedAccountGuid }}\n />\n )}\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,IAAa,KAAmB,GAAS,SAA0B,EAAE,MAAA,EAAA,GAA0B;AAC7F,QAAM,CAAC,GAAe,CAAA,IAAoB,EAA4B,IAAI,GACpE,CAAC,GAAmB,CAAA,IAAwB,EAAwB,IAAI,GACxE,EAAE,WAAA,EAAA,IAAc,EAAe,GAC/B,EACJ,UAAU,GACV,QAAQ,GACR,eAAe,GACf,WAAW,EAAA,IACT,EAAmB,GACjB,EAAE,gBAAA,GAAgB,cAAA,GAAc,iBAAA,EAAA,IAAoB,EAAgB,GACpE,IAAM,EAAa,CAAI,GACvB,EAAE,SAAA,EAAA,IAAY,EAAiB,GAC/B,EAAE,+BAAA,EAAA,IAAkC,EAA8B,GAClE,EAAE,QAAA,EAAA,IAAW,EAAa,GAC1B,EAAE,QAAQ,GAAgB,OAAO,GAAe,OAAA,EAAA,IAAU,EAA8B,GACxF,IAAO,GAAkB;AAE/B,MAAI,CAAC,EAAU,cAAe,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAG9C,MAAI,CAAC,EACH,QACE,gBAAA,EAAC,IAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,IAAD,EAA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A4B,EAAqB,IAAI;AAE3D,SACE,gBAAA,GAAA,IAAA,EAAA,UAAA;AAAA,IACE,gBAAA,EAAC,GAAD;AAAA,MACQ,MAAA;AAAA,MACI,UAAA;AAAA,MACV,iBAAiB,CAAC,KAAiB,CAAC;AAAA,MACpC,gBAAgB;AAAA,MAChB,iBAAiB,IAAiB,IAAQ;AAAA,MAChC,UAAA;AAAA,MACK,eAAA;AAAA,MACf,SAAS,EAAa,GAAK,CAAI;AAAA,IAChC,CAAA;AAAA,IACD,gBAAA,EAAC,GAAD;AAAA,MACE,gBAAgB,EAAc;AAAA,MAC9B,QAAQ,MAAkB;AAAA,MAC1B,SAAS;AAAA,MACT,OAAO,EAAc;AAAA,MAEpB,UAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QACQ,MAAA;AAAA,QACN,QAAO;AAAA,QACP,WAAW;AAAA,QACX,0BAA0B,EAAc;AAAA,QACxC,oBAAoB;AAAA,MACrB,CAAA;AAAA,IAEG,CAAA;AAAA,IACR,gBAAA,EAAC,GAAD;AAAA,MACE,gBAAgB,GAAc;AAAA,MAC9B,QAAQ,MAAsB;AAAA,MAC9B,SAAS;AAAA,MACT,OAAO,GAAc;AAAA,MAEpB,UAAA,KAEC,gBAAA,EAAC,GAAD,EACE,MAAM;AAAA,QAAE,GAAG;AAAA,QAAM,iBAAiB;AAAA,QAAW,sBAAsB;AAAA,MAAkB,EACtF,CAAA;AAAA,IAEG,CAAA;AAAA,EACR,EAAA,CAAA;AAEN,CAAC"}
1
+ {"version":3,"file":"AccountListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n Loader,\n useAccountStore,\n useAppConfig,\n useCashflowStore,\n useGlobalCopyStore,\n useRecurringTransactionsStore,\n} from '../../../common'\nimport getAccountDisplayName from '../../../common/utils/AccountDisplayName'\nimport type { Recurrence } from '../../../core'\nimport { getFrequencyLabel } from '../../../core/utils/RecurringTransactionsUtil'\nimport CategoryTile from '../../components/CategoryTile'\nimport type { ActionBlockProps } from '../../mappings/blocks'\nimport { AccountDetailsBlock } from '../AccountDetailsBlock'\nimport { BlockErrorMessage } from '../BlockErrorMessage'\nimport {\n RecurringTransactionBlock,\n useRecurringExpensesLoadState,\n} from '../RecurringTransactionBlock'\nimport { useOpenedCta } from '../useOpenedCta'\n\nimport AccountListContent, { type ExpenseRow } from './AccountListContent'\nimport { buildSummary, isCheckingAccount, resolveBeatAccounts, toAccountSection } from './layout'\n\n/**\n * Account List drawer: the CTA's calculation, then Accounts and Recurring Expenses tabs.\n * A tapped expense opens its Expense Details, and a tapped account its Account Details (the shared\n * AccountDetailsBlock), each in a nested drawer.\n */\nexport const AccountListBlock = observer(function AccountListBlock({ beat }: ActionBlockProps) {\n const [tappedExpense, setTappedExpense] = useState<Recurrence | null>(null)\n const [tappedAccountGuid, setTappedAccountGuid] = useState<string | null>(null)\n const {\n accounts: accountsCopy,\n insights_feed: insightsFeedCopy,\n recurring: recurringCopy,\n } = useGlobalCopyStore()\n const { accountsLoaded, cashAccounts, visibleAccounts } = useAccountStore()\n const cta = useOpenedCta(beat)\n const { uiStore } = useCashflowStore()\n const { detailedRepeatingTransactions } = useRecurringTransactionsStore()\n const { config } = useAppConfig()\n const { failed: expensesFailed, ready: expensesReady, retry } = useRecurringExpensesLoadState()\n const copy = insightsFeedCopy?.account_list\n\n if (!copy) {\n return <BlockErrorMessage />\n }\n\n if (!accountsLoaded) return <Loader />\n\n const listed = resolveBeatAccounts(beat, visibleAccounts, cashAccounts)\n const checking = listed.filter(isCheckingAccount)\n const savings = listed.filter((account) => !isCheckingAccount(account))\n const showAvailable = config.display_available_balance_in_accounts\n const sections = [\n toAccountSection('checking', copy.checking, checking, showAvailable),\n toAccountSection('savings', copy.savings, savings, showAvailable),\n ].filter((section) => section.rows.length > 0)\n\n // Every upcoming expense as its own row, largest first (Figma); no \"Other\" fold, so each opens its details.\n const expenses: ExpenseRow[] = expensesReady\n ? [...uiStore.expensesTilNextIncome]\n .sort((a, b) => b.amount - a.amount)\n .map((expense) => {\n const account = visibleAccounts.find(({ guid }) => guid === expense.accountGuid)\n const repeating = detailedRepeatingTransactions.find(\n ({ guid }) => guid === expense.repeatingTransactionGuid,\n )\n\n return {\n account: {\n institutionGuid: expense.institutionGuid,\n name: account ? getAccountDisplayName(account) : expense.institutionName,\n },\n amount: expense.amount,\n frequency: repeating && getFrequencyLabel(recurringCopy, repeating, false),\n key: `${expense.repeatingTransactionGuid}-${expense.expectedDate.getTime()}`,\n leading: <CategoryTile categoryGuid={expense.categoryGuid} size={32} />,\n name: expense.name,\n onClick: () => setTappedExpense(expense),\n }\n })\n : []\n\n const closeExpenseDetails = () => setTappedExpense(null)\n const closeAccountDetails = () => setTappedAccountGuid(null)\n\n return (\n <>\n <AccountListContent\n copy={copy}\n expenses={expenses}\n expensesLoading={!expensesReady && !expensesFailed}\n onAccountClick={setTappedAccountGuid}\n onRetryExpenses={expensesFailed ? retry : undefined}\n sections={sections}\n showAvailable={showAvailable}\n summary={buildSummary(cta, copy)}\n />\n <Drawer\n ariaLabelClose={recurringCopy.close_drawer_aria}\n isOpen={tappedExpense !== null}\n onClose={closeExpenseDetails}\n title={recurringCopy.expense_details}\n >\n {tappedExpense && (\n <RecurringTransactionBlock\n beat={beat}\n layout=\"insights\"\n onDeleted={closeExpenseDetails}\n repeatingTransactionGuid={tappedExpense.repeatingTransactionGuid}\n selectedRecurrence={tappedExpense}\n />\n )}\n </Drawer>\n <Drawer\n ariaLabelClose={accountsCopy?.close_account_details_aria}\n isOpen={tappedAccountGuid !== null}\n onClose={closeAccountDetails}\n title={accountsCopy?.account_details}\n >\n {tappedAccountGuid && (\n // The shared block shows the beat's account, so hand it the tapped one instead.\n <AccountDetailsBlock\n beat={{ ...beat, primary_account: undefined, primary_account_guid: tappedAccountGuid }}\n />\n )}\n </Drawer>\n </>\n )\n})\n"],"mappings":";;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,SAAS;AAAA,MACT,OAAO,GAAc;AAAA,MAEpB,UAAA,KAEC,gBAAA,EAAC,GAAD,EACE,MAAM;AAAA,QAAE,GAAG;AAAA,QAAM,iBAAiB;AAAA,QAAW,sBAAsB;AAAA,MAAkB,EACtF,CAAA;AAAA,IAEG,CAAA;AAAA,EACR,EAAA,CAAA;AAEN,CAAC"}
@@ -1,54 +1,50 @@
1
- import { useGlobalCopyStore as A, useGlobalUiStore as B, useInsightsV2Store as S } from "../../common/context/hooks.es.js";
2
- import b from "../../common/components/drawer/Drawer.es.js";
3
- import w from "../../common/components/Loader.es.js";
4
- import { hasDrawerBlock as L } from "../mappings/hasDrawerBlock.es.js";
1
+ import { useGlobalCopyStore as B, useGlobalUiStore as S, useInsightsV2Store as b } from "../../common/context/hooks.es.js";
2
+ import w from "../../common/components/drawer/Drawer.es.js";
3
+ import L from "../../common/components/Loader.es.js";
4
+ import { BlockErrorMessage as D } from "./BlockErrorMessage.es.js";
5
+ import { hasDrawerBlock as O } from "../mappings/hasDrawerBlock.es.js";
5
6
  import x from "../components/shared/StatusSnackbar.es.js";
6
- import { useOpenedCta as D } from "./useOpenedCta.es.js";
7
- import { actionBlocks as _ } from "../mappings/blocks.es.js";
8
- import { useRef as O } from "react";
9
- import { observer as T } from "mobx-react-lite";
10
- import j from "@mui/material/Stack";
11
- import { Text as F } from "@mxenabled/mxui";
12
- import { Fragment as p, jsx as e, jsxs as d } from "react/jsx-runtime";
13
- var G = (c, o) => {
14
- const r = O(void 0);
15
- return c ? (r.current ??= o, r.current) : (r.current = void 0, o);
16
- }, f = ({ actionBlock: c, ...o }) => {
17
- const { Component: r, usePrepare: i } = c;
18
- return i(o), /* @__PURE__ */ e(r, { ...o });
19
- }, M = T(function({ beat: o }) {
20
- const r = A(), i = r.common, { isCopyLoaded: k } = B(), { actionDrawer: m, actionNotice: g, closeActionDrawer: h, setActionNotice: v } = S(), s = m.isDrawerOpen && m.guid === o.guid, n = G(s, D(o));
7
+ import { useOpenedCta as _ } from "./useOpenedCta.es.js";
8
+ import { actionBlocks as j } from "../mappings/blocks.es.js";
9
+ import { useRef as F } from "react";
10
+ import { observer as G } from "mobx-react-lite";
11
+ import { Fragment as d, jsx as t, jsxs as f } from "react/jsx-runtime";
12
+ var N = (i, o) => {
13
+ const r = F(void 0);
14
+ return i ? (r.current ??= o, r.current) : (r.current = void 0, o);
15
+ }, k = ({ actionBlock: i, ...o }) => {
16
+ const { Component: r, usePrepare: c } = i;
17
+ return c(o), /* @__PURE__ */ t(r, { ...o });
18
+ }, J = G(function({ beat: o }) {
19
+ const r = B(), c = r.common, m = c?.close_aria ?? "Close", { isCopyLoaded: g } = S(), { actionDrawer: u, actionNotice: C, closeActionDrawer: v, setActionNotice: h } = b(), s = u.isDrawerOpen && u.guid === o.guid, e = N(s, _(o));
21
20
  if (!o.insights_payload) return null;
22
- if (!k) return s ? /* @__PURE__ */ e(w, {}) : null;
23
- const a = g[o.guid], u = /* @__PURE__ */ e(x, {
24
- closeAriaLabel: i.close_aria,
21
+ if (!g) return s ? /* @__PURE__ */ t(L, {}) : null;
22
+ const a = C[o.guid], p = /* @__PURE__ */ t(x, {
23
+ closeAriaLabel: m,
25
24
  message: a?.message ?? "",
26
- onClose: () => v(o.guid, void 0),
25
+ onClose: () => h(o.guid, void 0),
27
26
  open: !!a,
28
27
  severity: a?.severity
29
- }), l = L(n?.block), t = l ? _[n?.block] : void 0;
30
- if (t?.presentation === "modal") return /* @__PURE__ */ d(p, { children: [s && /* @__PURE__ */ e(f, {
31
- actionBlock: t,
28
+ }), l = O(e?.block), n = l ? j[e?.block] : void 0;
29
+ if (n?.presentation === "modal") return /* @__PURE__ */ f(d, { children: [s && /* @__PURE__ */ t(k, {
30
+ actionBlock: n,
32
31
  beat: o
33
- }, n?.block), u] });
34
- const C = t?.title?.(n?.variant, r, o), y = t ? C || n?.label || "" : l ? i.error_heading : n?.label ?? "";
35
- return /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ e(b, {
36
- ariaLabelClose: i.close_aria,
37
- headerAction: t?.headerAction,
32
+ }, e?.block), p] });
33
+ const y = n?.title?.(e?.variant, r, o), A = n ? y || e?.label || "" : l ? c?.error_heading ?? "Oops" : e?.label ?? "";
34
+ return /* @__PURE__ */ f(d, { children: [/* @__PURE__ */ t(w, {
35
+ ariaLabelClose: m,
36
+ headerAction: n?.headerAction,
38
37
  isOpen: s,
39
- onClose: h,
40
- title: y,
41
- children: t ? /* @__PURE__ */ e(f, {
42
- actionBlock: t,
38
+ onClose: v,
39
+ title: A,
40
+ children: n ? /* @__PURE__ */ t(k, {
41
+ actionBlock: n,
43
42
  beat: o
44
- }, n?.block) : l ? /* @__PURE__ */ e(j, {
45
- sx: { p: 24 },
46
- children: /* @__PURE__ */ e(F, { children: i.error_message })
47
- }) : null
48
- }), u] });
43
+ }, e?.block) : l ? /* @__PURE__ */ t(D, {}) : null
44
+ }), p] });
49
45
  });
50
46
  export {
51
- M as ActionBlockLayer
47
+ J as ActionBlockLayer
52
48
  };
53
49
 
54
50
  //# sourceMappingURL=ActionBlockLayer.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionBlockLayer.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/ActionBlockLayer.tsx"],"sourcesContent":["import { useRef } from 'react'\n\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n Loader,\n useGlobalCopyStore,\n useGlobalUiStore,\n useInsightsV2Store,\n} from '../../common'\nimport type { Beat } from '../../core'\nimport {\n actionBlocks,\n hasDrawerBlock,\n type ActionBlockEntry,\n type ActionBlockProps,\n} from '../mappings/blocks'\nimport StatusSnackbar from '../components/shared/StatusSnackbar'\nimport { useOpenedCta } from './useOpenedCta'\nimport type { OpenedCta } from './util'\n\ninterface ActionBlockLayerProps {\n beat: Beat\n}\n\n/** Keeps the CTA the user pressed for the open session: a refreshed beat may name another CTA there. */\nconst useSessionCta = (isOpen: boolean, resolved: OpenedCta): OpenedCta => {\n const pinned = useRef<OpenedCta>(undefined)\n\n if (!isOpen) {\n pinned.current = undefined\n return resolved\n }\n pinned.current ??= resolved\n\n return pinned.current\n}\n\n/**\n * Renders a registered action block. Callers MUST key this per block name — a\n * block with `usePrepare` and one without run a different number of hooks, so\n * reusing the same fiber across a block switch violates the rules of hooks.\n */\nconst ActionBlockRunner = ({\n actionBlock,\n ...blockProps\n}: ActionBlockProps & { actionBlock: ActionBlockEntry }) => {\n const { Component, usePrepare } = actionBlock\n\n usePrepare(blockProps)\n\n return <Component {...blockProps} />\n}\n\n// `observer` is required: this reads `isCopyLoaded` off GlobalUiStore and the\n// action drawer off InsightsV2Store. Without it the component never re-renders\n// and stays stuck on <Loader /> forever.\nexport const ActionBlockLayer = observer(function ActionBlockLayer({\n beat,\n}: ActionBlockLayerProps) {\n const copy = useGlobalCopyStore()\n const commonCopy = copy.common\n const { isCopyLoaded } = useGlobalUiStore()\n const { actionDrawer, actionNotice, closeActionDrawer, setActionNotice } = useInsightsV2Store()\n\n // Every card in the feed renders its own layer against the shared store, so\n // this card's drawer only opens when its beat is the one that triggered it.\n const isCurrentBeatOpen = actionDrawer.isDrawerOpen && actionDrawer.guid === beat.guid\n\n const currentCta = useSessionCta(isCurrentBeatOpen, useOpenedCta(beat))\n\n // Mirrors BaseLayout's guard — the layer is exported, so callers are not\n // guaranteed to have narrowed this already.\n if (!beat.insights_payload) return null\n\n if (!isCopyLoaded) return isCurrentBeatOpen ? <Loader /> : null\n\n // A block that closes its own drawer hands its message here, so it shows after the unmount.\n const notice = actionNotice[beat.guid]\n const noticeSnackbar = (\n <StatusSnackbar\n closeAriaLabel={commonCopy.close_aria}\n message={notice?.message ?? ''}\n onClose={() => setActionNotice(beat.guid, undefined)}\n open={Boolean(notice)}\n severity={notice?.severity}\n />\n )\n\n // A CTA without a real block never opens a drawer (BaseLayout won't trigger it);\n // a real-but-unknown block shows the error (\"oops\") content.\n const blockValid = hasDrawerBlock(currentCta?.block)\n const actionBlock = blockValid\n ? actionBlocks[currentCta?.block as keyof typeof actionBlocks]\n : undefined\n\n // A modal block owns its dialog: no drawer behind it, and nothing mounted until it is opened.\n if (actionBlock?.presentation === 'modal') {\n return (\n <>\n {isCurrentBeatOpen && (\n <ActionBlockRunner actionBlock={actionBlock} beat={beat} key={currentCta?.block} />\n )}\n {noticeSnackbar}\n </>\n )\n }\n\n const resolvedTitle = actionBlock?.title?.(currentCta?.variant, copy, beat)\n const drawerTitle = actionBlock\n ? resolvedTitle || currentCta?.label || ''\n : blockValid\n ? commonCopy.error_heading\n : (currentCta?.label ?? '')\n\n return (\n <>\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n headerAction={actionBlock?.headerAction}\n isOpen={isCurrentBeatOpen}\n onClose={closeActionDrawer}\n title={drawerTitle}\n >\n {actionBlock ? (\n <ActionBlockRunner actionBlock={actionBlock} beat={beat} key={currentCta?.block} />\n ) : blockValid ? (\n <Stack sx={{ p: 24 }}>\n <Text>{commonCopy.error_message}</Text>\n </Stack>\n ) : null}\n </Drawer>\n {noticeSnackbar}\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;;AA8BA,IAAM,IAAA,CAAiB,GAAiB,MAAmC;AACzE,QAAM,IAAS,EAAkB,MAAS;AAE1C,SAAK,KAIL,EAAO,YAAY,GAEZ,EAAO,YALZ,EAAO,UAAU,QACV;AAKX,GAOM,IAAA,CAAqB,EACzB,aAAA,GACA,GAAG,EAAA,MACuD;AAC1D,QAAM,EAAE,WAAA,GAAW,YAAA,EAAA,IAAe;AAElC,SAAA,EAAW,CAAU,GAEd,gBAAA,EAAC,GAAD,EAAW,GAAI,EAAa,CAAA;AACrC,GAKa,IAAmB,EAAS,SAA0B,EACjE,MAAA,EAAA,GACwB;AACxB,QAAM,IAAO,EAAmB,GAC1B,IAAa,EAAK,QAClB,EAAE,cAAA,EAAA,IAAiB,EAAiB,GACpC,EAAE,cAAA,GAAc,cAAA,GAAc,mBAAA,GAAmB,iBAAA,E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AA,gBAAA,EAAC,GAAD,EAAA,UAAO,EAAW,cAAoB,CAAA;AAAA,IACjC,CAAA,IACL;AAAA,EACE,CAAA,GACP,CACD,EAAA,CAAA;AAEN,CAAC"}
1
+ {"version":3,"file":"ActionBlockLayer.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/ActionBlockLayer.tsx"],"sourcesContent":["import { useRef } from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Drawer,\n Loader,\n useGlobalCopyStore,\n useGlobalUiStore,\n useInsightsV2Store,\n} from '../../common'\nimport type { Beat } from '../../core'\nimport {\n actionBlocks,\n hasDrawerBlock,\n type ActionBlockEntry,\n type ActionBlockProps,\n} from '../mappings/blocks'\nimport StatusSnackbar from '../components/shared/StatusSnackbar'\nimport { BlockErrorMessage } from './BlockErrorMessage'\nimport { useOpenedCta } from './useOpenedCta'\nimport type { OpenedCta } from './util'\n\ninterface ActionBlockLayerProps {\n beat: Beat\n}\n\n/** Keeps the CTA the user pressed for the open session: a refreshed beat may name another CTA there. */\nconst useSessionCta = (isOpen: boolean, resolved: OpenedCta): OpenedCta => {\n const pinned = useRef<OpenedCta>(undefined)\n\n if (!isOpen) {\n pinned.current = undefined\n return resolved\n }\n pinned.current ??= resolved\n\n return pinned.current\n}\n\n/**\n * Renders a registered action block. Callers MUST key this per block name — a\n * block with `usePrepare` and one without run a different number of hooks, so\n * reusing the same fiber across a block switch violates the rules of hooks.\n */\nconst ActionBlockRunner = ({\n actionBlock,\n ...blockProps\n}: ActionBlockProps & { actionBlock: ActionBlockEntry }) => {\n const { Component, usePrepare } = actionBlock\n\n usePrepare(blockProps)\n\n return <Component {...blockProps} />\n}\n\n// `observer` is required: this reads `isCopyLoaded` off GlobalUiStore and the\n// action drawer off InsightsV2Store. Without it the component never re-renders\n// and stays stuck on <Loader /> forever.\nexport const ActionBlockLayer = observer(function ActionBlockLayer({\n beat,\n}: ActionBlockLayerProps) {\n const copy = useGlobalCopyStore()\n const commonCopy = copy.common\n const closeAria = commonCopy?.close_aria ?? 'Close'\n const { isCopyLoaded } = useGlobalUiStore()\n const { actionDrawer, actionNotice, closeActionDrawer, setActionNotice } = useInsightsV2Store()\n\n // Every card in the feed renders its own layer against the shared store, so\n // this card's drawer only opens when its beat is the one that triggered it.\n const isCurrentBeatOpen = actionDrawer.isDrawerOpen && actionDrawer.guid === beat.guid\n\n const currentCta = useSessionCta(isCurrentBeatOpen, useOpenedCta(beat))\n\n // Mirrors BaseLayout's guard — the layer is exported, so callers are not\n // guaranteed to have narrowed this already.\n if (!beat.insights_payload) return null\n\n if (!isCopyLoaded) return isCurrentBeatOpen ? <Loader /> : null\n\n // A block that closes its own drawer hands its message here, so it shows after the unmount.\n const notice = actionNotice[beat.guid]\n const noticeSnackbar = (\n <StatusSnackbar\n closeAriaLabel={closeAria}\n message={notice?.message ?? ''}\n onClose={() => setActionNotice(beat.guid, undefined)}\n open={Boolean(notice)}\n severity={notice?.severity}\n />\n )\n\n // A CTA without a real block never opens a drawer (BaseLayout won't trigger it);\n // a real-but-unknown block shows the error (\"oops\") content.\n const blockValid = hasDrawerBlock(currentCta?.block)\n const actionBlock = blockValid\n ? actionBlocks[currentCta?.block as keyof typeof actionBlocks]\n : undefined\n\n // A modal block owns its dialog: no drawer behind it, and nothing mounted until it is opened.\n if (actionBlock?.presentation === 'modal') {\n return (\n <>\n {isCurrentBeatOpen && (\n <ActionBlockRunner actionBlock={actionBlock} beat={beat} key={currentCta?.block} />\n )}\n {noticeSnackbar}\n </>\n )\n }\n\n const resolvedTitle = actionBlock?.title?.(currentCta?.variant, copy, beat)\n const drawerTitle = actionBlock\n ? resolvedTitle || currentCta?.label || ''\n : blockValid\n ? (commonCopy?.error_heading ?? 'Oops')\n : (currentCta?.label ?? '')\n\n return (\n <>\n <Drawer\n ariaLabelClose={closeAria}\n headerAction={actionBlock?.headerAction}\n isOpen={isCurrentBeatOpen}\n onClose={closeActionDrawer}\n title={drawerTitle}\n >\n {actionBlock ? (\n <ActionBlockRunner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a,iBAAiB,QAChC,QACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACG,KACC,gBAAA,EAAC,GAAD;AAAA,IAAgC,aAAA;AAAA,IAAmB,MAAA;AAAA,EAA+B,GAApB,GAAY,KAAQ,GAEnF,CACD,EAAA,CAAA;AAIN,QAAM,IAAgB,GAAa,QAAQ,GAAY,SAAS,GAAM,CAAI,GACpE,IAAc,IAChB,KAAiB,GAAY,SAAS,KACtC,IACG,GAAY,iBAAiB,SAC7B,GAAY,SAAS;AAE5B,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB;AAAA,IAChB,cAAc,GAAa;AAAA,IAC3B,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO;AAAA,IAEN,UAAA,IACC,gBAAA,EAAC,GAAD;AAAA,MAAgC,aAAA;AAAA,MAAmB,MAAA;AAAA,IAA+B,GAApB,GAAY,KAAQ,IAChF,IACF,gBAAA,EAAC,GAAD,CAAoB,CAAA,IAClB;AAAA,EACE,CAAA,GACP,CACD,EAAA,CAAA;AAEN,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** A drawer's plain error: copy or data a retry cannot bring back (copy loads once). */
2
+ export declare const BlockErrorMessage: (() => import("react/jsx-runtime").JSX.Element) & {
3
+ displayName: string;
4
+ };
@@ -0,0 +1,17 @@
1
+ import { useGlobalCopyStore as e } from "../../common/context/hooks.es.js";
2
+ import { observer as m } from "mobx-react-lite";
3
+ import t from "@mui/material/Stack";
4
+ import { Text as s } from "@mxenabled/mxui";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ var l = m(function() {
7
+ const { common: o } = e();
8
+ return /* @__PURE__ */ r(t, {
9
+ sx: { p: 24 },
10
+ children: /* @__PURE__ */ r(s, { children: o?.error_message ?? "Something went wrong." })
11
+ });
12
+ });
13
+ export {
14
+ l as BlockErrorMessage
15
+ };
16
+
17
+ //# sourceMappingURL=BlockErrorMessage.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockErrorMessage.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/BlockErrorMessage.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { useGlobalCopyStore } from '../../common'\n\n/** A drawer's plain error: copy or data a retry cannot bring back (copy loads once). */\nexport const BlockErrorMessage = observer(function BlockErrorMessage() {\n const { common } = useGlobalCopyStore()\n\n return (\n <Stack sx={{ p: 24 }}>\n <Text>{common?.error_message ?? 'Something went wrong.'}</Text>\n </Stack>\n )\n})\n"],"mappings":";;;;;AAQA,IAAa,IAAoB,EAAS,WAA6B;AACrE,QAAM,EAAE,QAAA,EAAA,IAAW,EAAmB;AAEtC,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,GAAD,EAAA,UAAO,GAAQ,iBAAiB,wBAA8B,CAAA;AAAA,EACzD,CAAA;AAEX,CAAC"}