@mx-cartographer/experiences 9.7.38 → 9.7.39
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 +4 -0
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +14 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/core/utils/NumberFormatting.d.ts +5 -0
- package/dist/core/utils/NumberFormatting.es.js +19 -15
- package/dist/core/utils/NumberFormatting.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +10 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +36 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.d.ts +22 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js +176 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListContent.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/index.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.d.ts +20 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js +24 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.d.ts +1 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js +13 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.d.ts +0 -5
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js +5 -10
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +2 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +54 -47
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.39] - 10-23-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - `account_list_block` action block for Monthly Obligations Status: the beat's calculation (current cash, estimated income, recurring expenses, remaining) from `drilldown_data`, then the accounts behind it from the account store with their total, behind "View accounts" on track and "View details" off track. Copy from the new `insights_feed.account_list` namespace; `formatSignedCurrency` moves from the Remaining Cash block to `core/utils/NumberFormatting`. Fixture, stories, tests and `docs/action-blocks/account-list-block.md` (MEW2-3363)
|
|
4
|
+
|
|
1
5
|
## [9.7.38] - 10-23-2026
|
|
2
6
|
|
|
3
7
|
- **CHANGED** - `upcoming_subscription_block` reads the merchant name, merchant guid, amount and recurrence type from `instance_slot.data`. `data` is the only source, because the beat is already flagged `is_insights_v2` by firefly: a missing or wrongly typed slot draws nothing — no `$0.00` — and the flat `instance_slot` fields of the old shape are no longer read. The card draws when the envelope names no layout variant (WEC-1970)
|
|
@@ -365,6 +365,19 @@ export interface UpcomingSubscriptionBlockCopy {
|
|
|
365
365
|
cadence_every_year?: string;
|
|
366
366
|
cadence_twice_a_month?: string;
|
|
367
367
|
}
|
|
368
|
+
/** The Account List drawer (`account_list_block`). */
|
|
369
|
+
export interface AccountListCopy {
|
|
370
|
+
/** Drawer title. */
|
|
371
|
+
title: string;
|
|
372
|
+
how_is_this_calculated: string;
|
|
373
|
+
current_cash: string;
|
|
374
|
+
estimated_income: string;
|
|
375
|
+
recurring_expenses: string;
|
|
376
|
+
remaining: string;
|
|
377
|
+
accounts_header: string;
|
|
378
|
+
total_balance: string;
|
|
379
|
+
no_accounts: string;
|
|
380
|
+
}
|
|
368
381
|
export interface InsightsFeedCopy {
|
|
369
382
|
general: GeneralInsightsFeedCopy;
|
|
370
383
|
settings_menu: SettingsMenuCopy;
|
|
@@ -394,6 +407,7 @@ export interface InsightsFeedCopy {
|
|
|
394
407
|
/** Optional until the localized-content service ships the namespace. */
|
|
395
408
|
transparent_overdraft?: OverdraftCopy;
|
|
396
409
|
credit_utilization?: CreditUtilizationCopy;
|
|
410
|
+
account_list?: AccountListCopy;
|
|
397
411
|
payoff_calculator?: PayoffCalculatorCopy;
|
|
398
412
|
budget_details?: BudgetDetailsCopy;
|
|
399
413
|
upcoming_subscription_block?: UpcomingSubscriptionBlockCopy;
|
|
@@ -13,7 +13,7 @@ export type { DebtsCopy } from './DebtsCopy';
|
|
|
13
13
|
export type { FinstrongCopy } from './FinstrongCopy';
|
|
14
14
|
export type { GoalsCopy } from './GoalsCopy';
|
|
15
15
|
export type { HelpCopy, HelpByCategoryList } from './HelpCopy';
|
|
16
|
-
export type { AmountInputModalCopy, AmountInputModalVariantCopy, EmergencySavingsCopy, InsightsFeedCopy, MakeTransferCopy, PayoffCalculatorCopy, RemainingCashCopy, OverdraftCopy, CreditUtilizationCopy, OverflowMenuCopy, DismissInsightCopy, DismissInsightOptionCopy, HiddenConfirmationCopy, HideFeedbackCopy, FeedbackCopy, FeedbackBarCopy, } from './InsightsFeedCopy';
|
|
16
|
+
export type { AmountInputModalCopy, AmountInputModalVariantCopy, EmergencySavingsCopy, InsightsFeedCopy, MakeTransferCopy, PayoffCalculatorCopy, RemainingCashCopy, OverdraftCopy, CreditUtilizationCopy, AccountListCopy, OverflowMenuCopy, DismissInsightCopy, DismissInsightOptionCopy, HiddenConfirmationCopy, HideFeedbackCopy, FeedbackCopy, FeedbackBarCopy, } from './InsightsFeedCopy';
|
|
17
17
|
export type { InvestmentsCopy } from './InvestmentsCopy';
|
|
18
18
|
export type { MicroInsightsCopy } from './MicroInsightsCopy';
|
|
19
19
|
export type { NetWorthCopy } from './NetWorthCopy';
|
|
@@ -13,3 +13,8 @@ export declare const formatOrdinal: (number: number, options?: Intl.PluralRulesO
|
|
|
13
13
|
readonly few: "rd";
|
|
14
14
|
readonly other: "th";
|
|
15
15
|
}) => string;
|
|
16
|
+
/**
|
|
17
|
+
* `-$220.00`, not `$-220.00`: the sign goes before the currency symbol. Rounded to cents first so a
|
|
18
|
+
* sub-cent negative (or `-0`) reads `$0.00`, never `-$0.00`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const formatSignedCurrency: (amount: number) => string;
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import { getLocale as a } from "./Localization.es.js";
|
|
2
|
-
import { CurrencyCodes as
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
const n = [],
|
|
2
|
+
import { CurrencyCodes as s } from "../constants/Numbers.es.js";
|
|
3
|
+
import c from "numeral";
|
|
4
|
+
var v = (r, e, t) => {
|
|
5
|
+
const n = [], i = (e - r) / (t - 1);
|
|
6
6
|
for (let o = 0; o < t; o++) {
|
|
7
|
-
const
|
|
8
|
-
n.push(
|
|
7
|
+
const l = r + o * i;
|
|
8
|
+
n.push(l);
|
|
9
9
|
}
|
|
10
10
|
return n[t - 1] = e, n.map(Math.round);
|
|
11
|
-
},
|
|
11
|
+
}, y = (r) => r.length ? Math.round(r.reduce((e, t) => e + t, 0) / r.length) : 0, d = (r, e, t) => a() === "fr-ca" ? c(r).format(`${e} $`, t) : c(r).format(`$${e}`, t), $ = () => a() === "fr-ca" ? s.CAD : s.USD, m = (r) => r != null && r !== "" && isFinite(r), f = {
|
|
12
12
|
style: "percent",
|
|
13
13
|
minimumFractionDigits: 2,
|
|
14
14
|
maximumFractionDigits: 2
|
|
15
|
-
},
|
|
15
|
+
}, w = (r, e = f) => m(r) ? new Intl.NumberFormat(a(), e).format(Number(r)) : r, u = (r) => new Intl.PluralRules(a(), r), C = (r, e = { type: "ordinal" }, t = {
|
|
16
16
|
one: "st",
|
|
17
17
|
two: "nd",
|
|
18
18
|
few: "rd",
|
|
19
19
|
other: "th"
|
|
20
|
-
}) => `${r}${t[
|
|
20
|
+
}) => `${r}${t[u(e).select(r)]}`, D = (r) => {
|
|
21
|
+
const e = Math.round(Math.abs(r) * 100), t = d(e / 100, "0,0.00");
|
|
22
|
+
return r < 0 && e > 0 ? `-${t}` : t;
|
|
23
|
+
};
|
|
21
24
|
export {
|
|
22
|
-
|
|
25
|
+
d as formatCurrency,
|
|
23
26
|
C as formatOrdinal,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
w as formatPercentage,
|
|
28
|
+
D as formatSignedCurrency,
|
|
29
|
+
v as generateEqualIntervals,
|
|
30
|
+
$ as getCurrencyCodes,
|
|
31
|
+
u as getPluralRules,
|
|
28
32
|
m as isValidNumber,
|
|
29
|
-
|
|
33
|
+
y as roundedAverage
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
//# sourceMappingURL=NumberFormatting.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberFormatting.es.js","names":[],"sources":["../../../src/core/utils/NumberFormatting.ts"],"sourcesContent":["import numeral from 'numeral'\nimport type { RoundingFunction } from 'numeral'\n\nimport { CurrencyCodes } from '../constants/Numbers'\nimport { getLocale } from './Localization'\n\nexport const generateEqualIntervals = (\n minValue: number,\n maxValue: number,\n tickCount: number,\n): number[] => {\n const ticks: number[] = []\n const range = maxValue - minValue\n const step = range / (tickCount - 1) // The space between each tick\n\n for (let i = 0; i < tickCount; i++) {\n const tickValue = minValue + i * step\n ticks.push(tickValue)\n }\n\n ticks[tickCount - 1] = maxValue\n\n return ticks.map(Math.round)\n}\n\nexport const roundedAverage = (values: number[]) =>\n values.length ? Math.round(values.reduce((sum, value) => sum + value, 0) / values.length) : 0\n\n// enhances numeral's localization functionality by puting the $ in the correct place\nexport const formatCurrency = (\n amount: number | undefined,\n formatting: string,\n roundingFunction?: RoundingFunction,\n) => {\n switch (getLocale()) {\n case 'fr-ca': {\n return numeral(amount).format(`${formatting} $`, roundingFunction)\n }\n default: {\n return numeral(amount).format(`$${formatting}`, roundingFunction)\n }\n }\n}\n\nexport const getCurrencyCodes = () => {\n switch (getLocale()) {\n case 'fr-ca':\n return CurrencyCodes.CAD\n default:\n return CurrencyCodes.USD\n }\n}\n\n// will return `true` if value is a string number, like '99', which matches Serenity logic\nexport const isValidNumber = (value: any) =>\n value !== undefined && value !== null && value !== '' && isFinite(value)\n\nconst defaultPercentStyle = {\n style: 'percent',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n} as Intl.NumberFormatOptions\n\nexport const formatPercentage = (\n amount: number | string | undefined,\n options: Intl.NumberFormatOptions = defaultPercentStyle,\n) =>\n isValidNumber(amount)\n ? new Intl.NumberFormat(getLocale(), options).format(Number(amount))\n : amount\n\nexport const getPluralRules = (options: Intl.PluralRulesOptions) =>\n new Intl.PluralRules(getLocale(), options)\n\nexport const formatOrdinal = (\n number: number,\n options: Intl.PluralRulesOptions = { type: 'ordinal' },\n copy = {\n one: 'st',\n two: 'nd',\n few: 'rd',\n other: 'th',\n } as const,\n) => {\n const rule = getPluralRules(options).select(number)\n\n return `${number}${copy[rule as keyof typeof copy]}`\n}\n"],"mappings":";;;AAMA,IAAa,IAAA,CACX,GACA,GACA,MACa;AACb,QAAM,IAAkB,CAAC,GAEnB,KADQ,IAAW,MACH,IAAY;AAElC,WAAS,IAAI,GAAG,IAAI,GAAW,KAAK;AAClC,UAAM,IAAY,IAAW,IAAI;AACjC,IAAA,EAAM,KAAK,CAAS;AAAA,EACtB;AAEA,SAAA,EAAM,IAAY,CAAA,IAAK,GAEhB,EAAM,IAAI,KAAK,KAAK;AAC7B,GAEa,IAAA,CAAkB,MAC7B,EAAO,SAAS,KAAK,MAAM,EAAO,OAAA,CAAQ,GAAK,MAAU,IAAM,GAAO,CAAC,IAAI,EAAO,MAAM,IAAI,GAGjF,IAAA,CACX,GACA,GACA,MAEQ,EAAU,MACX,UACI,EAAQ,CAAM,EAAE,OAAO,GAAG,CAAA,MAAgB,CAAgB,IAG1D,EAAQ,CAAM,EAAE,OAAO,IAAI,CAAA,IAAc,CAAgB,GAKzD,IAAA,MACH,EAAU,MACX,UACI,EAAc,MAEd,EAAc,KAKd,IAAA,CAAiB,MACL,KAAU,QAAQ,MAAU,MAAM,SAAS,CAAK,GAEnE,IAAsB;AAAA,EAC1B,OAAO;AAAA,EACP,uBAAuB;AAAA,EACvB,uBAAuB;AACzB,GAEa,IAAA,CACX,GACA,IAAoC,MAEpC,EAAc,CAAM,IAChB,IAAI,KAAK,aAAa,EAAU,GAAG,CAAO,EAAE,OAAO,OAAO,CAAM,CAAC,IACjE,GAEO,IAAA,CAAkB,MAC7B,IAAI,KAAK,YAAY,EAAU,GAAG,CAAO,GAE9B,IAAA,CACX,GACA,IAAmC,EAAE,MAAM,UAAU,GACrD,IAAO;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,OAAO;AACT,MAIO,GAAG,CAAA,GAAS,EAFN,EAAe,CAAO,EAAE,OAAO,CAEpB,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"NumberFormatting.es.js","names":[],"sources":["../../../src/core/utils/NumberFormatting.ts"],"sourcesContent":["import numeral from 'numeral'\nimport type { RoundingFunction } from 'numeral'\n\nimport { CurrencyCodes } from '../constants/Numbers'\nimport { getLocale } from './Localization'\n\nexport const generateEqualIntervals = (\n minValue: number,\n maxValue: number,\n tickCount: number,\n): number[] => {\n const ticks: number[] = []\n const range = maxValue - minValue\n const step = range / (tickCount - 1) // The space between each tick\n\n for (let i = 0; i < tickCount; i++) {\n const tickValue = minValue + i * step\n ticks.push(tickValue)\n }\n\n ticks[tickCount - 1] = maxValue\n\n return ticks.map(Math.round)\n}\n\nexport const roundedAverage = (values: number[]) =>\n values.length ? Math.round(values.reduce((sum, value) => sum + value, 0) / values.length) : 0\n\n// enhances numeral's localization functionality by puting the $ in the correct place\nexport const formatCurrency = (\n amount: number | undefined,\n formatting: string,\n roundingFunction?: RoundingFunction,\n) => {\n switch (getLocale()) {\n case 'fr-ca': {\n return numeral(amount).format(`${formatting} $`, roundingFunction)\n }\n default: {\n return numeral(amount).format(`$${formatting}`, roundingFunction)\n }\n }\n}\n\nexport const getCurrencyCodes = () => {\n switch (getLocale()) {\n case 'fr-ca':\n return CurrencyCodes.CAD\n default:\n return CurrencyCodes.USD\n }\n}\n\n// will return `true` if value is a string number, like '99', which matches Serenity logic\nexport const isValidNumber = (value: any) =>\n value !== undefined && value !== null && value !== '' && isFinite(value)\n\nconst defaultPercentStyle = {\n style: 'percent',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n} as Intl.NumberFormatOptions\n\nexport const formatPercentage = (\n amount: number | string | undefined,\n options: Intl.NumberFormatOptions = defaultPercentStyle,\n) =>\n isValidNumber(amount)\n ? new Intl.NumberFormat(getLocale(), options).format(Number(amount))\n : amount\n\nexport const getPluralRules = (options: Intl.PluralRulesOptions) =>\n new Intl.PluralRules(getLocale(), options)\n\nexport const formatOrdinal = (\n number: number,\n options: Intl.PluralRulesOptions = { type: 'ordinal' },\n copy = {\n one: 'st',\n two: 'nd',\n few: 'rd',\n other: 'th',\n } as const,\n) => {\n const rule = getPluralRules(options).select(number)\n\n return `${number}${copy[rule as keyof typeof copy]}`\n}\n\n/**\n * `-$220.00`, not `$-220.00`: the sign goes before the currency symbol. Rounded to cents first so a\n * sub-cent negative (or `-0`) reads `$0.00`, never `-$0.00`.\n */\nexport const formatSignedCurrency = (amount: number): string => {\n const cents = Math.round(Math.abs(amount) * 100)\n const formatted = formatCurrency(cents / 100, '0,0.00')\n\n return amount < 0 && cents > 0 ? `-${formatted}` : formatted\n}\n"],"mappings":";;;AAMA,IAAa,IAAA,CACX,GACA,GACA,MACa;AACb,QAAM,IAAkB,CAAC,GAEnB,KADQ,IAAW,MACH,IAAY;AAElC,WAAS,IAAI,GAAG,IAAI,GAAW,KAAK;AAClC,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
|
1
|
+
import { ActionBlockProps } from '../../mappings/blocks';
|
|
2
|
+
/**
|
|
3
|
+
* Account List drawer (MEW2-3363): the beat's calculation from `drilldown_data`, then the accounts
|
|
4
|
+
* behind it from the account store, largest balance first, with their total. Opened by Monthly
|
|
5
|
+
* Obligations Status's "View accounts" (on track) and "View details" (off track). `observer`: reads
|
|
6
|
+
* copy and accounts from MobX stores.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AccountListBlock: (({ beat }: ActionBlockProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import p from "../../../common/utils/AccountDisplayName.es.js";
|
|
2
|
+
import { useAccountStore as d, useGlobalCopyStore as f, useGlobalStore as g } from "../../../common/context/hooks.es.js";
|
|
3
|
+
import n from "../../../common/components/Loader.es.js";
|
|
4
|
+
import y from "./AccountListContent.es.js";
|
|
5
|
+
import { lastFour as A, readSummary as S, resolveBeatAccounts as b, sumBalances as h } from "./layout.es.js";
|
|
6
|
+
import { observer as v } from "mobx-react-lite";
|
|
7
|
+
import B from "@mui/material/Stack";
|
|
8
|
+
import { Text as L } from "@mxenabled/mxui";
|
|
9
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
10
|
+
var _ = (o) => ({
|
|
11
|
+
balance: o.balance ?? 0,
|
|
12
|
+
guid: o.guid,
|
|
13
|
+
institutionGuid: o.institution_guid ?? "",
|
|
14
|
+
lastFour: A(o.account_number),
|
|
15
|
+
name: p(o)
|
|
16
|
+
}), I = v(function({ beat: r }) {
|
|
17
|
+
const { copyStore: s } = g(), { common: c, insights_feed: m } = f(), { accountsLoaded: a, cashAccounts: u, visibleAccounts: l } = d(), e = m?.account_list;
|
|
18
|
+
if (!s.isInitialized) return /* @__PURE__ */ t(n, {});
|
|
19
|
+
if (!e) return /* @__PURE__ */ t(B, {
|
|
20
|
+
sx: { p: 24 },
|
|
21
|
+
children: /* @__PURE__ */ t(L, { children: c?.error_message ?? "Something went wrong." })
|
|
22
|
+
});
|
|
23
|
+
if (!a) return /* @__PURE__ */ t(n, {});
|
|
24
|
+
const i = b(r, l, u);
|
|
25
|
+
return /* @__PURE__ */ t(y, {
|
|
26
|
+
accounts: i.map(_),
|
|
27
|
+
copy: e,
|
|
28
|
+
summary: S(r),
|
|
29
|
+
totalBalance: h(i)
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
I as AccountListBlock
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=AccountListBlock.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountListBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport { Loader, useAccountStore, useGlobalCopyStore, useGlobalStore } from '../../../common'\nimport getAccountDisplayName from '../../../common/utils/AccountDisplayName'\nimport type { Account } from '../../../core'\nimport type { ActionBlockProps } from '../../mappings/blocks'\n\nimport AccountListContent, { type AccountListRow } from './AccountListContent'\nimport { lastFour, readSummary, resolveBeatAccounts, sumBalances } from './layout'\n\nconst toRow = (account: Account): AccountListRow => ({\n balance: account.balance ?? 0,\n guid: account.guid,\n institutionGuid: account.institution_guid ?? '',\n lastFour: lastFour(account.account_number),\n name: getAccountDisplayName(account),\n})\n\n/**\n * Account List drawer (MEW2-3363): the beat's calculation from `drilldown_data`, then the accounts\n * behind it from the account store, largest balance first, with their total. Opened by Monthly\n * Obligations Status's \"View accounts\" (on track) and \"View details\" (off track). `observer`: reads\n * copy and accounts from MobX stores.\n */\nexport const AccountListBlock = observer(function AccountListBlock({ beat }: ActionBlockProps) {\n const { copyStore } = useGlobalStore()\n const { common: commonCopy, insights_feed: insightsFeedCopy } = useGlobalCopyStore()\n const { accountsLoaded, cashAccounts, visibleAccounts } = useAccountStore()\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\n return (\n <AccountListContent\n accounts={listed.map(toRow)}\n copy={copy}\n summary={readSummary(beat)}\n totalBalance={sumBalances(listed)}\n />\n )\n})\n"],"mappings":";;;;;;;;;AAaA,IAAM,IAAA,CAAS,OAAsC;AAAA,EACnD,SAAS,EAAQ,WAAW;AAAA,EAC5B,MAAM,EAAQ;AAAA,EACd,iBAAiB,EAAQ,oBAAoB;AAAA,EAC7C,UAAU,EAAS,EAAQ,cAAc;AAAA,EACzC,MAAM,EAAsB,CAAO;AACrC,IAQa,IAAmB,EAAS,SAA0B,EAAE,MAAA,EAAA,GAA0B;AAC7F,QAAM,EAAE,WAAA,EAAA,IAAc,EAAe,GAC/B,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAqB,EAAmB,GAC7E,EAAE,gBAAA,GAAgB,cAAA,GAAc,iBAAA,EAAA,IAAoB,EAAgB,GACpE,IAAO,GAAkB;AAE/B,MAAI,CAAC,EAAU,cAAe,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAG9C,MAAI,CAAC,EACH,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,GAAD,EAAA,UAAO,GAAY,iBAAiB,wBAA8B,CAAA;AAAA,EAC7D,CAAA;AAIX,MAAI,CAAC,EAAgB,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAErC,QAAM,IAAS,EAAoB,GAAM,GAAiB,CAAY;AAEtE,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,UAAU,EAAO,IAAI,CAAK;AAAA,IACpB,MAAA;AAAA,IACN,SAAS,EAAY,CAAI;AAAA,IACzB,cAAc,EAAY,CAAM;AAAA,EACjC,CAAA;AAEL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AccountListCopy } from '../../../core/types/localization/InsightsFeedCopy';
|
|
2
|
+
import { ObligationsSummary } from './layout';
|
|
3
|
+
export interface AccountListRow {
|
|
4
|
+
guid: string;
|
|
5
|
+
name: string;
|
|
6
|
+
/** The last digits of the account number, shown masked; empty when unknown. */
|
|
7
|
+
lastFour: string;
|
|
8
|
+
/** Empty when no institution is known: the default logo is shown. */
|
|
9
|
+
institutionGuid: string;
|
|
10
|
+
balance: number;
|
|
11
|
+
}
|
|
12
|
+
export interface AccountListContentProps {
|
|
13
|
+
copy: AccountListCopy;
|
|
14
|
+
/** Omitted when the beat carries no calculation: the drawer is just the list. */
|
|
15
|
+
summary?: ObligationsSummary;
|
|
16
|
+
/** Already ordered. */
|
|
17
|
+
accounts: AccountListRow[];
|
|
18
|
+
totalBalance: number;
|
|
19
|
+
}
|
|
20
|
+
/** Presentational body of the Account List drawer, minus the drawer header. */
|
|
21
|
+
declare const AccountListContent: ({ accounts, copy, summary, totalBalance }: AccountListContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default AccountListContent;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { DEFAULT_INSTITUTION_LOGO_URL as g } from "../../../core/constants/InstitutionLogo.es.js";
|
|
2
|
+
import { formatSignedCurrency as l } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { createElement as f } from "react";
|
|
4
|
+
import n from "@mui/material/Stack";
|
|
5
|
+
import { InstitutionLogo as u, Text as i } from "@mxenabled/mxui";
|
|
6
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
7
|
+
import h from "@mui/material/Box";
|
|
8
|
+
import p from "@mui/material/Divider";
|
|
9
|
+
var v = (r) => r > 0 ? `+${l(r)}` : l(r), x = ({ children: r }) => /* @__PURE__ */ e(i, {
|
|
10
|
+
bold: !0,
|
|
11
|
+
sx: {
|
|
12
|
+
flexShrink: 0,
|
|
13
|
+
fontVariantNumeric: "tabular-nums"
|
|
14
|
+
},
|
|
15
|
+
variant: "body1",
|
|
16
|
+
children: r
|
|
17
|
+
}), c = ({ bold: r = !1, label: o, value: a }) => /* @__PURE__ */ t(n, {
|
|
18
|
+
sx: {
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
flexDirection: "row",
|
|
21
|
+
gap: 16,
|
|
22
|
+
minHeight: 44,
|
|
23
|
+
px: 16
|
|
24
|
+
},
|
|
25
|
+
children: [/* @__PURE__ */ e(i, {
|
|
26
|
+
bold: r,
|
|
27
|
+
sx: { flexGrow: 1 },
|
|
28
|
+
variant: "body1",
|
|
29
|
+
children: o
|
|
30
|
+
}), /* @__PURE__ */ e(x, { children: a })]
|
|
31
|
+
}), _ = ({ copy: r, summary: o }) => /* @__PURE__ */ t(n, {
|
|
32
|
+
sx: {
|
|
33
|
+
gap: 12,
|
|
34
|
+
pt: 24,
|
|
35
|
+
px: 24
|
|
36
|
+
},
|
|
37
|
+
children: [/* @__PURE__ */ e(i, {
|
|
38
|
+
bold: !0,
|
|
39
|
+
component: "h3",
|
|
40
|
+
variant: "body1",
|
|
41
|
+
children: r.how_is_this_calculated
|
|
42
|
+
}), /* @__PURE__ */ t(n, {
|
|
43
|
+
sx: {
|
|
44
|
+
bgcolor: "background.paper",
|
|
45
|
+
border: "1px solid",
|
|
46
|
+
borderColor: "divider",
|
|
47
|
+
borderRadius: "8px",
|
|
48
|
+
overflow: "hidden"
|
|
49
|
+
},
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ e(c, {
|
|
52
|
+
label: r.current_cash,
|
|
53
|
+
value: l(o.cashOnHand)
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ e(p, {}),
|
|
56
|
+
/* @__PURE__ */ e(c, {
|
|
57
|
+
label: r.estimated_income,
|
|
58
|
+
value: v(o.estimatedIncome)
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ e(p, {}),
|
|
61
|
+
/* @__PURE__ */ e(c, {
|
|
62
|
+
label: r.recurring_expenses,
|
|
63
|
+
value: l(-o.upcomingExpenses)
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ e(p, {}),
|
|
66
|
+
/* @__PURE__ */ e(c, {
|
|
67
|
+
bold: !0,
|
|
68
|
+
label: r.remaining,
|
|
69
|
+
value: l(o.totalRemaining)
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
})]
|
|
73
|
+
}), w = ({ balance: r, institutionGuid: o, isLast: a, lastFour: d, name: s }) => /* @__PURE__ */ t(h, {
|
|
74
|
+
component: "li",
|
|
75
|
+
sx: { position: "relative" },
|
|
76
|
+
children: [/* @__PURE__ */ t(n, {
|
|
77
|
+
sx: {
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
flexDirection: "row",
|
|
80
|
+
gap: 12,
|
|
81
|
+
px: 24,
|
|
82
|
+
py: 12
|
|
83
|
+
},
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ e(u, {
|
|
86
|
+
alt: "",
|
|
87
|
+
institutionGuid: o,
|
|
88
|
+
logoUrl: o ? void 0 : g,
|
|
89
|
+
size: 32
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ t(n, {
|
|
92
|
+
sx: {
|
|
93
|
+
flexGrow: 1,
|
|
94
|
+
minWidth: 0
|
|
95
|
+
},
|
|
96
|
+
children: [/* @__PURE__ */ e(i, {
|
|
97
|
+
truncate: !0,
|
|
98
|
+
variant: "body1",
|
|
99
|
+
children: s
|
|
100
|
+
}), d && /* @__PURE__ */ e(i, {
|
|
101
|
+
color: "text.secondary",
|
|
102
|
+
variant: "caption",
|
|
103
|
+
children: `•••• ${d}`
|
|
104
|
+
})]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ e(x, { children: l(r) })
|
|
107
|
+
]
|
|
108
|
+
}), /* @__PURE__ */ e(p, { sx: {
|
|
109
|
+
bottom: 0,
|
|
110
|
+
left: a ? 0 : 24,
|
|
111
|
+
position: "absolute",
|
|
112
|
+
right: 0
|
|
113
|
+
} })]
|
|
114
|
+
}), O = ({ accounts: r, copy: o, summary: a, totalBalance: d }) => /* @__PURE__ */ t(n, {
|
|
115
|
+
sx: {
|
|
116
|
+
bgcolor: "background.default",
|
|
117
|
+
pb: 24
|
|
118
|
+
},
|
|
119
|
+
children: [a && /* @__PURE__ */ e(_, {
|
|
120
|
+
copy: o,
|
|
121
|
+
summary: a
|
|
122
|
+
}), r.length === 0 ? /* @__PURE__ */ e(i, {
|
|
123
|
+
component: "p",
|
|
124
|
+
sx: { p: 24 },
|
|
125
|
+
children: o.no_accounts
|
|
126
|
+
}) : /* @__PURE__ */ t(n, { children: [
|
|
127
|
+
/* @__PURE__ */ e(h, {
|
|
128
|
+
sx: {
|
|
129
|
+
pb: 4,
|
|
130
|
+
pt: 16,
|
|
131
|
+
px: 24
|
|
132
|
+
},
|
|
133
|
+
children: /* @__PURE__ */ e(i, {
|
|
134
|
+
bold: !0,
|
|
135
|
+
component: "h3",
|
|
136
|
+
variant: "body1",
|
|
137
|
+
children: o.accounts_header
|
|
138
|
+
})
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ e(n, {
|
|
141
|
+
component: "ul",
|
|
142
|
+
sx: {
|
|
143
|
+
bgcolor: "background.paper",
|
|
144
|
+
listStyle: "none",
|
|
145
|
+
m: 0,
|
|
146
|
+
p: 0
|
|
147
|
+
},
|
|
148
|
+
children: r.map(({ guid: s, ...m }, b) => /* @__PURE__ */ f(w, {
|
|
149
|
+
...m,
|
|
150
|
+
isLast: b === r.length - 1,
|
|
151
|
+
key: s
|
|
152
|
+
}))
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ t(n, {
|
|
155
|
+
sx: {
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
bgcolor: "background.paper",
|
|
158
|
+
flexDirection: "row",
|
|
159
|
+
gap: 16,
|
|
160
|
+
px: 24,
|
|
161
|
+
py: 14
|
|
162
|
+
},
|
|
163
|
+
children: [/* @__PURE__ */ e(i, {
|
|
164
|
+
bold: !0,
|
|
165
|
+
sx: { flexGrow: 1 },
|
|
166
|
+
variant: "body1",
|
|
167
|
+
children: o.total_balance
|
|
168
|
+
}), /* @__PURE__ */ e(x, { children: l(d) })]
|
|
169
|
+
})
|
|
170
|
+
] })]
|
|
171
|
+
});
|
|
172
|
+
export {
|
|
173
|
+
O as default
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
//# sourceMappingURL=AccountListContent.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountListContent.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountListBlock/AccountListContent.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport { DEFAULT_INSTITUTION_LOGO_URL } from '../../../core/constants/InstitutionLogo'\nimport type { AccountListCopy } from '../../../core/types/localization/InsightsFeedCopy'\nimport { formatSignedCurrency } from '../../../core/utils/NumberFormatting'\n\nimport type { ObligationsSummary } from './layout'\n\nexport interface AccountListRow {\n guid: string\n name: string\n /** The last digits of the account number, shown masked; empty when unknown. */\n lastFour: string\n /** Empty when no institution is known: the default logo is shown. */\n institutionGuid: string\n balance: number\n}\n\nexport interface AccountListContentProps {\n copy: AccountListCopy\n /** Omitted when the beat carries no calculation: the drawer is just the list. */\n summary?: ObligationsSummary\n /** Already ordered. */\n accounts: AccountListRow[]\n totalBalance: number\n}\n\nconst formatAddend = (amount: number) =>\n amount > 0 ? `+${formatSignedCurrency(amount)}` : formatSignedCurrency(amount)\n\nconst Amount = ({ children }: { children: string }) => (\n <Text bold={true} sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums' }} variant=\"body1\">\n {children}\n </Text>\n)\n\nconst BreakdownRow = ({\n bold = false,\n label,\n value,\n}: {\n bold?: boolean\n label: string\n value: string\n}) => (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, minHeight: 44, px: 16 }}>\n <Text bold={bold} sx={{ flexGrow: 1 }} variant=\"body1\">\n {label}\n </Text>\n <Amount>{value}</Amount>\n </Stack>\n)\n\n/** Current cash + estimated income - recurring expenses = remaining, as the pulse drawer tabled it. */\nconst Summary = ({ copy, summary }: { copy: AccountListCopy; summary: ObligationsSummary }) => (\n <Stack sx={{ gap: 12, pt: 24, px: 24 }}>\n <Text bold={true} component=\"h3\" variant=\"body1\">\n {copy.how_is_this_calculated}\n </Text>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n }}\n >\n <BreakdownRow label={copy.current_cash} value={formatSignedCurrency(summary.cashOnHand)} />\n <Divider />\n <BreakdownRow label={copy.estimated_income} value={formatAddend(summary.estimatedIncome)} />\n <Divider />\n <BreakdownRow\n label={copy.recurring_expenses}\n value={formatSignedCurrency(-summary.upcomingExpenses)}\n />\n <Divider />\n <BreakdownRow\n bold={true}\n label={copy.remaining}\n value={formatSignedCurrency(summary.totalRemaining)}\n />\n </Stack>\n </Stack>\n)\n\n/** One row. The last row's divider runs full width; the rest are inset to the text. */\nconst RowItem = ({\n balance,\n institutionGuid,\n isLast,\n lastFour,\n name,\n}: Omit<AccountListRow, 'guid'> & { isLast: boolean }) => (\n <Box component=\"li\" sx={{ position: 'relative' }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12, px: 24, py: 12 }}>\n <InstitutionLogo\n alt=\"\"\n institutionGuid={institutionGuid}\n logoUrl={institutionGuid ? undefined : DEFAULT_INSTITUTION_LOGO_URL}\n size={32}\n />\n <Stack sx={{ flexGrow: 1, minWidth: 0 }}>\n <Text truncate={true} variant=\"body1\">\n {name}\n </Text>\n {lastFour && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {`•••• ${lastFour}`}\n </Text>\n )}\n </Stack>\n <Amount>{formatSignedCurrency(balance)}</Amount>\n </Stack>\n <Divider sx={{ bottom: 0, left: isLast ? 0 : 24, position: 'absolute', right: 0 }} />\n </Box>\n)\n\n/** Presentational body of the Account List drawer, minus the drawer header. */\nconst AccountListContent = ({ accounts, copy, summary, totalBalance }: AccountListContentProps) => (\n <Stack sx={{ bgcolor: 'background.default', pb: 24 }}>\n {summary && <Summary copy={copy} summary={summary} />}\n {accounts.length === 0 ? (\n <Text component=\"p\" sx={{ p: 24 }}>\n {copy.no_accounts}\n </Text>\n ) : (\n <Stack>\n <Box sx={{ pb: 4, pt: 16, px: 24 }}>\n <Text bold={true} component=\"h3\" variant=\"body1\">\n {copy.accounts_header}\n </Text>\n </Box>\n <Stack component=\"ul\" sx={{ bgcolor: 'background.paper', listStyle: 'none', m: 0, p: 0 }}>\n {accounts.map(({ guid, ...row }, index) => (\n <RowItem {...row} isLast={index === accounts.length - 1} key={guid} />\n ))}\n </Stack>\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n flexDirection: 'row',\n gap: 16,\n px: 24,\n py: 14,\n }}\n >\n <Text bold={true} sx={{ flexGrow: 1 }} variant=\"body1\">\n {copy.total_balance}\n </Text>\n <Amount>{formatSignedCurrency(totalBalance)}</Amount>\n </Stack>\n </Stack>\n )}\n </Stack>\n)\n\nexport default AccountListContent\n"],"mappings":";;;;;;;;AA+BA,IAAM,IAAA,CAAgB,MACpB,IAAS,IAAI,IAAI,EAAqB,CAAM,CAAA,KAAM,EAAqB,CAAM,GAEzE,IAAA,CAAU,EAAE,UAAA,EAAA,MAChB,gBAAA,EAAC,GAAD;AAAA,EAAM,MAAM;AAAA,EAAM,IAAI;AAAA,IAAE,YAAY;AAAA,IAAG,oBAAoB;AAAA,EAAe;AAAA,EAAG,SAAQ;AAAA,EAClF,UAAA;AACG,CAAA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AY;AAAA,QACZ,SAAS;AAAA,QACT,eAAe;AAAA,QACf,KAAK;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAM,IAAI,EAAE,UAAU,EAAE;AAAA,QAAG,SAAQ;AAAA,QAC5C,UAAA,EAAK;AAAA,MACF,CAAA,GACN,gBAAA,EAAC,GAAD,EAAA,UAAS,EAAqB,CAAY,EAAU,CAAA,CAC/C;AAAA;EACF,EAAA,CAAA,CAEJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Account, Beat } from '../../../core';
|
|
2
|
+
/**
|
|
3
|
+
* The accounts the drawer lists, largest balance first: the beat's `account_guids` among the store's
|
|
4
|
+
* visible accounts, or every visible account the store counts as cash when the beat names none
|
|
5
|
+
* (tupac's Monthly Obligations factory sums the cash accounts without recording their guids). Both
|
|
6
|
+
* rules are the store's: `visibleAccounts` applies the widget's hidden, closed and external/held
|
|
7
|
+
* settings, `cashAccounts` says which types are cash.
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolveBeatAccounts: (beat: Beat, visibleAccounts: Account[], cashAccounts: Account[]) => Account[];
|
|
10
|
+
export declare const sumBalances: (accounts: Account[]) => number;
|
|
11
|
+
/** The last four digits of an account number; empty when the account has none. */
|
|
12
|
+
export declare const lastFour: (accountNumber?: string) => string;
|
|
13
|
+
export interface ObligationsSummary {
|
|
14
|
+
cashOnHand: number;
|
|
15
|
+
estimatedIncome: number;
|
|
16
|
+
upcomingExpenses: number;
|
|
17
|
+
totalRemaining: number;
|
|
18
|
+
}
|
|
19
|
+
/** The beat's calculation from `drilldown_data`; undefined unless every figure is a finite number. */
|
|
20
|
+
export declare const readSummary: (beat: Beat) => ObligationsSummary | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var r = (e) => e.balance ?? 0, d = (e, t, a) => {
|
|
2
|
+
const o = new Set(e.account_guids?.length ? e.account_guids : a.map(({ guid: n }) => n));
|
|
3
|
+
return t.filter((n) => o.has(n.guid)).sort((n, s) => r(s) - r(n));
|
|
4
|
+
}, l = (e) => e.reduce((t, a) => t + r(a), 0), m = (e) => e?.replace(/\D/g, "").slice(-4) ?? "", v = (e) => {
|
|
5
|
+
const t = e.insights_payload?.drilldown_data, a = (u) => {
|
|
6
|
+
const i = t?.[u];
|
|
7
|
+
return typeof i == "number" && Number.isFinite(i) ? i : void 0;
|
|
8
|
+
}, o = a("available_cash_on_hand"), n = a("estimated_income"), s = a("upcoming_expenses"), c = a("total_remaining");
|
|
9
|
+
if (!(o === void 0 || n === void 0 || s === void 0 || c === void 0))
|
|
10
|
+
return {
|
|
11
|
+
cashOnHand: o,
|
|
12
|
+
estimatedIncome: n,
|
|
13
|
+
upcomingExpenses: s,
|
|
14
|
+
totalRemaining: c
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
m as lastFour,
|
|
19
|
+
v as readSummary,
|
|
20
|
+
d as resolveBeatAccounts,
|
|
21
|
+
l as sumBalances
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=layout.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountListBlock/layout.ts"],"sourcesContent":["import type { Account, Beat } from '../../../core'\n\nconst balanceOf = (account: Account) => account.balance ?? 0\n\n/**\n * The accounts the drawer lists, largest balance first: the beat's `account_guids` among the store's\n * visible accounts, or every visible account the store counts as cash when the beat names none\n * (tupac's Monthly Obligations factory sums the cash accounts without recording their guids). Both\n * rules are the store's: `visibleAccounts` applies the widget's hidden, closed and external/held\n * settings, `cashAccounts` says which types are cash.\n */\nexport const resolveBeatAccounts = (\n beat: Beat,\n visibleAccounts: Account[],\n cashAccounts: Account[],\n): Account[] => {\n const guids = new Set<string>(\n beat.account_guids?.length ? beat.account_guids : cashAccounts.map(({ guid }) => guid),\n )\n\n return visibleAccounts\n .filter((account) => guids.has(account.guid))\n .sort((a, b) => balanceOf(b) - balanceOf(a))\n}\n\nexport const sumBalances = (accounts: Account[]): number =>\n accounts.reduce((total, account) => total + balanceOf(account), 0)\n\n/** The last four digits of an account number; empty when the account has none. */\nexport const lastFour = (accountNumber?: string): string =>\n accountNumber?.replace(/\\D/g, '').slice(-4) ?? ''\n\nexport interface ObligationsSummary {\n cashOnHand: number\n estimatedIncome: number\n upcomingExpenses: number\n totalRemaining: number\n}\n\n/** The beat's calculation from `drilldown_data`; undefined unless every figure is a finite number. */\nexport const readSummary = (beat: Beat): ObligationsSummary | undefined => {\n const data = beat.insights_payload?.drilldown_data\n const numberAt = (key: string) => {\n const value = data?.[key]\n\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n }\n const cashOnHand = numberAt('available_cash_on_hand')\n const estimatedIncome = numberAt('estimated_income')\n const upcomingExpenses = numberAt('upcoming_expenses')\n const totalRemaining = numberAt('total_remaining')\n\n if (\n cashOnHand === undefined ||\n estimatedIncome === undefined ||\n upcomingExpenses === undefined ||\n totalRemaining === undefined\n ) {\n return undefined\n }\n\n return { cashOnHand, estimatedIncome, upcomingExpenses, totalRemaining }\n}\n"],"mappings":"AAEA,IAAM,IAAA,CAAa,MAAqB,EAAQ,WAAW,GAS9C,IAAA,CACX,GACA,GACA,MACc;AACd,QAAM,IAAQ,IAAI,IAChB,EAAK,eAAe,SAAS,EAAK,gBAAgB,EAAa,IAAA,CAAK,EAAE,MAAA,EAAA,MAAW,CAAI,CACvF;AAEA,SAAO,EACJ,OAAA,CAAQ,MAAY,EAAM,IAAI,EAAQ,IAAI,CAAC,EAC3C,KAAA,CAAM,GAAG,MAAM,EAAU,CAAC,IAAI,EAAU,CAAC,CAAC;AAC/C,GAEa,IAAA,CAAe,MAC1B,EAAS,OAAA,CAAQ,GAAO,MAAY,IAAQ,EAAU,CAAO,GAAG,CAAC,GAGtD,IAAA,CAAY,MACvB,GAAe,QAAQ,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,IAUpC,IAAA,CAAe,MAA+C;AACzE,QAAM,IAAO,EAAK,kBAAkB,gBAC9B,IAAA,CAAY,MAAgB;AAChC,UAAM,IAAQ,IAAO,CAAA;AAErB,WAAO,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,IAAI,IAAQ;AAAA,EACvE,GACM,IAAa,EAAS,wBAAwB,GAC9C,IAAkB,EAAS,kBAAkB,GAC7C,IAAmB,EAAS,mBAAmB,GAC/C,IAAiB,EAAS,iBAAiB;AAEjD,MACE,EAAA,MAAe,UACf,MAAoB,UACpB,MAAqB,UACrB,MAAmB;AAKrB,WAAO;AAAA,MAAE,YAAA;AAAA,MAAY,iBAAA;AAAA,MAAiB,kBAAA;AAAA,MAAkB,gBAAA;AAAA,IAAe;AACzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useAccountListPrepare: () => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useAccountStore as c } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import e from "react";
|
|
3
|
+
var u = () => {
|
|
4
|
+
const { accountsLoaded: o, loadAccounts: t } = c();
|
|
5
|
+
e.useEffect(() => {
|
|
6
|
+
o || t();
|
|
7
|
+
}, [o, t]);
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
u as useAccountListPrepare
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=useAccountListPrepare.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountListPrepare.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/AccountListBlock/useAccountListPrepare.ts"],"sourcesContent":["import React from 'react'\n\nimport { useAccountStore } from '../../../common'\n\nexport const useAccountListPrepare = () => {\n const { accountsLoaded, loadAccounts } = useAccountStore()\n\n React.useEffect(() => {\n if (!accountsLoaded) void loadAccounts()\n }, [accountsLoaded, loadAccounts])\n}\n"],"mappings":";;AAIA,IAAa,IAAA,MAA8B;AACzC,QAAM,EAAE,gBAAA,GAAgB,cAAA,EAAA,IAAiB,EAAgB;AAEzD,EAAA,EAAM,UAAA,MAAgB;AACpB,IAAK,KAAgB,EAAkB;AAAA,EACzC,GAAG,CAAC,GAAgB,CAAY,CAAC;AACnC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { formatSignedCurrency as d } from "../../../core/utils/NumberFormatting.es.js";
|
|
1
2
|
import { getLogoElevation as x } from "../../components/logoShadow.es.js";
|
|
2
|
-
import { formatSignedCurrency as d } from "./layout.es.js";
|
|
3
3
|
import { createElement as b } from "react";
|
|
4
4
|
import i from "@mui/material/Stack";
|
|
5
5
|
import { Text as a } from "@mxenabled/mxui";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemainingCashContent.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport {
|
|
1
|
+
{"version":3,"file":"RemainingCashContent.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashContent.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatSignedCurrency } from '../../../core/utils/NumberFormatting'\nimport { getLogoElevation } from '../../components/logoShadow'\n\nexport interface RemainingCashRow {\n key: string\n name: string\n amount: number\n /** The row's 32px logo: an account's institution or an expense's category. */\n leading: ReactNode\n}\n\ninterface RemainingCashSectionProps {\n header: string\n /** Already grouped and ordered, including any \"Other (#)\" row. */\n rows: RemainingCashRow[]\n}\n\ninterface RemainingCashSummaryProps {\n /** Omitted when there is no upcoming payday: a \"remaining until payday\" figure has no meaning. */\n remaining?: { amount: number; caption: string }\n cashOnHand: number\n upcomingExpenses: number\n cashOnHandLabel: string\n upcomingExpensesLabel: string\n}\n\nexport interface RemainingCashContentProps {\n summary: RemainingCashSummaryProps\n accounts: RemainingCashSectionProps\n expenses: RemainingCashSectionProps\n}\n\nconst BreakdownRow = ({ label, value }: { label: string; value: string }) => (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, minHeight: 44, px: 24 }}>\n <Text sx={{ flexGrow: 1 }} variant=\"body1\">\n {label}\n </Text>\n <Text bold={true} sx={{ fontVariantNumeric: 'tabular-nums' }} variant=\"body1\">\n {value}\n </Text>\n </Stack>\n)\n\nconst Summary = ({\n cashOnHand,\n cashOnHandLabel,\n remaining,\n upcomingExpenses,\n upcomingExpensesLabel,\n}: RemainingCashSummaryProps) => (\n <Stack sx={{ pb: 8, pt: 24, px: 24 }}>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 16,\n p: 16,\n }}\n >\n {remaining && (\n // One announcement (\"$2,350.00, Remaining until payday (7 days)\") instead of two loose text\n // nodes. The amount keeps the h2 look but is a paragraph: it is a value, not a heading.\n <Stack\n aria-label={`${formatSignedCurrency(remaining.amount)}, ${remaining.caption}`}\n role=\"group\"\n sx={{ alignItems: 'center', justifyContent: 'center', minHeight: 72, p: 12 }}\n >\n <Text aria-hidden={true} bold={true} component=\"p\" variant=\"h2\">\n {formatSignedCurrency(remaining.amount)}\n </Text>\n <Text aria-hidden={true} color=\"text.secondary\" variant=\"subtitle2\">\n {remaining.caption}\n </Text>\n </Stack>\n )}\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n }}\n >\n <BreakdownRow label={cashOnHandLabel} value={formatSignedCurrency(cashOnHand)} />\n <Divider />\n {/* Shown as a deduction (-$1,200.00) per Figma; the expense rows below show positive amounts. */}\n <BreakdownRow\n label={upcomingExpensesLabel}\n value={formatSignedCurrency(-upcomingExpenses)}\n />\n </Stack>\n </Stack>\n </Stack>\n)\n\n/** One 64px row. The last row's divider runs full width; the rest are inset 24px (Figma). */\nconst RowItem = ({\n amount,\n isLast,\n leading,\n name,\n}: Omit<RemainingCashRow, 'key'> & { isLast: boolean }) => (\n <Box component=\"li\" sx={{ position: 'relative' }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, px: 24, py: 14 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', flexGrow: 1, gap: 12, minWidth: 0 }}>\n <Box sx={{ display: 'flex', flexShrink: 0, height: 32, width: 32 }}>{leading}</Box>\n <Text truncate={true} variant=\"body1\">\n {name}\n </Text>\n </Stack>\n <Text bold={true} sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums' }} variant=\"body1\">\n {formatSignedCurrency(amount)}\n </Text>\n </Stack>\n <Divider sx={{ bottom: 0, left: isLast ? 0 : 24, position: 'absolute', right: 0 }} />\n </Box>\n)\n\n// The drawer title is the h2, so section headers are h3 and each section is a real list.\nconst Section = ({ header, rows }: RemainingCashSectionProps) => (\n <Stack>\n <Box sx={{ pb: 4, pt: 16, px: 24 }}>\n <Text bold={true} component=\"h3\" variant=\"body1\">\n {header}\n </Text>\n </Box>\n <Stack component=\"ul\" sx={{ bgcolor: 'background.paper', listStyle: 'none', m: 0, p: 0 }}>\n {rows.map(({ key, ...row }, index) => (\n <RowItem {...row} isLast={index === rows.length - 1} key={key} />\n ))}\n </Stack>\n </Stack>\n)\n\n/** Presentational body of the Remaining Cash drawer (Figma 9936:39163, minus the drawer header). */\nconst RemainingCashContent = ({ accounts, expenses, summary }: RemainingCashContentProps) => (\n <Stack sx={{ bgcolor: 'background.default', pb: 24 }}>\n <Summary {...summary} />\n {accounts.rows.length > 0 && <Section {...accounts} />}\n {expenses.rows.length > 0 && <Section {...expenses} />}\n </Stack>\n)\n\nexport default RemainingCashContent\n"],"mappings":";;;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AAU,SAAA,EAAA,MAClD,gBAAA,EAAC,GAAD;AAAA,EAAO,IAAI;AAAA,IAAE,SAAS;AAAA,IAAsB,IAAI;AAAA,EAAG;AAAA,EAAnD,UAAA;AAAA,IACE,gBAAA,EAAC,GAAD,EAAS,GAAI,EAAU,CAAA;AAAA,IACtB,EAAS,KAAK,SAAS,KAAK,gBAAA,EAAC,GAAD,EAAS,GAAI,EAAW,CAAA;AAAA,IACpD,EAAS,KAAK,SAAS,KAAK,gBAAA,EAAC,GAAD,EAAS,GAAI,EAAW,CAAA;AAAA,EAChD"}
|
|
@@ -12,10 +12,5 @@ export interface GroupedRows<T> {
|
|
|
12
12
|
export declare const groupRows: <T extends {
|
|
13
13
|
amount: number;
|
|
14
14
|
}>(rows: T[]) => GroupedRows<T>;
|
|
15
|
-
/**
|
|
16
|
-
* `-$220.00`, not `$-220.00`: the sign goes before the currency symbol. Rounded to cents first so a
|
|
17
|
-
* sub-cent negative (or `-0`) reads `$0.00`, never `-$0.00`.
|
|
18
|
-
*/
|
|
19
|
-
export declare const formatSignedCurrency: (amount: number) => string;
|
|
20
15
|
export declare const getCaption: (copy: RemainingCashCopy, days: number) => string;
|
|
21
16
|
export declare const getOtherLabel: (templateOne: string, templateMulti: string, count: number) => string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { buildDynamicCopy as a, buildPluralCopy as i } from "../../../core/utils/Localization.es.js";
|
|
2
|
-
|
|
3
|
-
var m = (t) => {
|
|
2
|
+
var l = (t) => {
|
|
4
3
|
const r = [...t].sort((e, o) => o.amount - e.amount);
|
|
5
4
|
if (r.length <= 2) return { shown: r };
|
|
6
5
|
const n = r.slice(2);
|
|
@@ -11,15 +10,11 @@ var m = (t) => {
|
|
|
11
10
|
total: n.reduce((e, o) => e + o.amount, 0)
|
|
12
11
|
}
|
|
13
12
|
};
|
|
14
|
-
},
|
|
15
|
-
const r = Math.round(Math.abs(t) * 100), n = u(r / 100, "0,0.00");
|
|
16
|
-
return t < 0 && r > 0 ? `-${n}` : n;
|
|
17
|
-
}, g = (t, r) => r === 1 ? t.remaining_until_payday_one : a(t.remaining_until_payday, String(r)), d = (t, r, n) => i(t, r, n, String(n));
|
|
13
|
+
}, s = (t, r) => r === 1 ? t.remaining_until_payday_one : a(t.remaining_until_payday, String(r)), g = (t, r, n) => i(t, r, n, String(n));
|
|
18
14
|
export {
|
|
19
|
-
|
|
20
|
-
g as
|
|
21
|
-
|
|
22
|
-
m as groupRows
|
|
15
|
+
s as getCaption,
|
|
16
|
+
g as getOtherLabel,
|
|
17
|
+
l as groupRows
|
|
23
18
|
};
|
|
24
19
|
|
|
25
20
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/layout.ts"],"sourcesContent":["import type { RemainingCashCopy } from '../../../core'\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RemainingCashBlock/layout.ts"],"sourcesContent":["import type { RemainingCashCopy } from '../../../core'\nimport { buildDynamicCopy, buildPluralCopy } from '../../../core/utils/Localization'\n\n/** Rows shown per section before the rest fold into an \"Other (#)\" row (Figma shows two). */\nexport const ROW_LIMIT = 2\n\nexport interface GroupedRows<T> {\n shown: T[]\n others?: { count: number; total: number }\n}\n\n/** Largest rows first (stable for ties), capped at `ROW_LIMIT`; the remainder as a count and total. */\nexport const groupRows = <T extends { amount: number }>(rows: T[]): GroupedRows<T> => {\n const sorted = [...rows].sort((a, b) => b.amount - a.amount)\n\n if (sorted.length <= ROW_LIMIT) return { shown: sorted }\n\n const rest = sorted.slice(ROW_LIMIT)\n\n return {\n shown: sorted.slice(0, ROW_LIMIT),\n others: { count: rest.length, total: rest.reduce((total, r) => total + r.amount, 0) },\n }\n}\n\nexport const getCaption = (copy: RemainingCashCopy, days: number): string => {\n if (days === 1) return copy.remaining_until_payday_one\n\n return buildDynamicCopy(copy.remaining_until_payday, String(days)) as string\n}\n\nexport const getOtherLabel = (templateOne: string, templateMulti: string, count: number): string =>\n buildPluralCopy(templateOne, templateMulti, count, String(count)) as string\n"],"mappings":";AAYA,IAAa,IAAA,CAA2C,MAA8B;AACpF,QAAM,IAAS,CAAC,GAAG,CAAI,EAAE,KAAA,CAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;AAE3D,MAAI,EAAO,UAAA,EAAqB,QAAO,EAAE,OAAO,EAAO;AAEvD,QAAM,IAAO,EAAO,MAAA,CAAe;AAEnC,SAAO;AAAA,IACL,OAAO,EAAO,MAAM,GAAA,CAAY;AAAA,IAChC,QAAQ;AAAA,MAAE,OAAO,EAAK;AAAA,MAAQ,OAAO,EAAK,OAAA,CAAQ,GAAO,MAAM,IAAQ,EAAE,QAAQ,CAAC;AAAA,IAAE;AAAA,EACtF;AACF,GAEa,IAAA,CAAc,GAAyB,MAC9C,MAAS,IAAU,EAAK,6BAErB,EAAiB,EAAK,wBAAwB,OAAO,CAAI,CAAC,GAGtD,IAAA,CAAiB,GAAqB,GAAuB,MACxE,EAAgB,GAAa,GAAe,GAAO,OAAO,CAAK,CAAC"}
|
|
@@ -16,7 +16,8 @@ var _ = {
|
|
|
16
16
|
CREDIT_UTILIZATION_ACTION_BLOCK: "credit_utilization_block",
|
|
17
17
|
EMERGENCY_SAVINGS_ACTION_BLOCK: "emergency_savings_block",
|
|
18
18
|
PAYOFF_CALCULATOR_ACTION_BLOCK: "payoff_calculator_block",
|
|
19
|
-
BUDGET_DETAILS_ACTION_BLOCK: "budget_details_block"
|
|
19
|
+
BUDGET_DETAILS_ACTION_BLOCK: "budget_details_block",
|
|
20
|
+
ACCOUNT_LIST_ACTION_BLOCK: "account_list_block"
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
23
|
_ as actionBlocksKey
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`, `make_transfer_block`).\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'placeholder_block',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer_block',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n OVERDRAFT_ACTION_BLOCK: 'transparent_overdraft_block',\n CREDIT_UTILIZATION_ACTION_BLOCK: 'credit_utilization_block',\n EMERGENCY_SAVINGS_ACTION_BLOCK: 'emergency_savings_block',\n PAYOFF_CALCULATOR_ACTION_BLOCK: 'payoff_calculator_block',\n BUDGET_DETAILS_ACTION_BLOCK: 'budget_details_block',\n}\n"],"mappings":"AAgBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,6BAA6B;
|
|
1
|
+
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`, `make_transfer_block`).\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'placeholder_block',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer_block',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n OVERDRAFT_ACTION_BLOCK: 'transparent_overdraft_block',\n CREDIT_UTILIZATION_ACTION_BLOCK: 'credit_utilization_block',\n EMERGENCY_SAVINGS_ACTION_BLOCK: 'emergency_savings_block',\n PAYOFF_CALCULATOR_ACTION_BLOCK: 'payoff_calculator_block',\n BUDGET_DETAILS_ACTION_BLOCK: 'budget_details_block',\n ACCOUNT_LIST_ACTION_BLOCK: 'account_list_block',\n}\n"],"mappings":"AAgBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAC7B"}
|
|
@@ -1,48 +1,50 @@
|
|
|
1
1
|
import { ContactSupportActionBlock as p } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
2
|
-
import { hasDrawerBlock as
|
|
2
|
+
import { hasDrawerBlock as to } from "./hasDrawerBlock.es.js";
|
|
3
3
|
import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
|
|
4
4
|
import { BarchartBlock as m } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
5
5
|
import { DoubleBarChartBlock as _ } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
6
6
|
import s from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
7
7
|
import C from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import B from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
9
|
+
import k from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
10
10
|
import u from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
11
11
|
import f from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
12
|
-
import { BudgetBlock as
|
|
13
|
-
import
|
|
12
|
+
import { BudgetBlock as A } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
13
|
+
import T from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
14
14
|
import O from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
|
|
15
15
|
import d from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
|
|
16
16
|
import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
17
17
|
import N from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
18
|
-
import
|
|
19
|
-
import { TransactionBlock as
|
|
18
|
+
import I from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
19
|
+
import { TransactionBlock as g } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
20
20
|
import b from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
21
|
+
import L from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
22
|
+
import P from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
23
23
|
import { SVGImageBlock as D } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
24
24
|
import { FeedbackModalActionBlock as h } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
25
|
-
import { ConnectionDetailActionBlock as
|
|
26
|
-
import { ConnectWidgetActionBlock as
|
|
25
|
+
import { ConnectionDetailActionBlock as S } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
26
|
+
import { ConnectWidgetActionBlock as E } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
27
27
|
import { SurveyModalActionBlock as R } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
28
28
|
import { PlaceholderActionBlock as v } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
29
|
-
import { getMakeTransferDrawerTitle as
|
|
30
|
-
import { MakeTransferActionBlockLayer as
|
|
29
|
+
import { getMakeTransferDrawerTitle as K } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
30
|
+
import { MakeTransferActionBlockLayer as y } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
31
31
|
import { getDrawerHeaderTitle as M } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
32
32
|
import { TransactionDetailsBlock as U } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
33
|
-
import { useTransactionDetailsPrepare as
|
|
33
|
+
import { useTransactionDetailsPrepare as c } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
34
34
|
import { TransactionHistoryBlock as w } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
35
|
-
import { useRecurringTransactionPrepare as
|
|
35
|
+
import { useRecurringTransactionPrepare as l } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
36
36
|
import { RecurringTransactionBlock as G } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
37
37
|
import { TransactionListBlock as F } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
|
|
38
38
|
import { RemainingCashBlock as H } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
39
39
|
import { AmountInputModalBlock as x } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
40
40
|
import { OverdraftBlock as V, useOverdraftPrepare as Y } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
41
|
+
import { AccountListBlock as z } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
|
|
42
|
+
import { useAccountListPrepare as W } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
|
|
43
|
+
import { EmergencySavingsBlock as q } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
|
|
44
|
+
import { CreditUtilizationBlock as Z } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
|
|
45
|
+
import { useCreditUtilizationPrepare as j } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
|
|
46
|
+
import { PayoffCalculatorBlock as J, usePayoffCalculatorPrepare as Q } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
|
|
47
|
+
import { BudgetDetailsBlock as X } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
|
|
46
48
|
var i = (e) => {
|
|
47
49
|
}, t = (e) => ({
|
|
48
50
|
get Component() {
|
|
@@ -57,16 +59,16 @@ var i = (e) => {
|
|
|
57
59
|
get presentation() {
|
|
58
60
|
return e().presentation;
|
|
59
61
|
}
|
|
60
|
-
}),
|
|
62
|
+
}), Zo = {
|
|
61
63
|
[o.PLACEHOLDER_ACTION_BLOCK]: t(() => ({
|
|
62
64
|
Component: v,
|
|
63
65
|
usePrepare: i,
|
|
64
66
|
title: () => "Action Block Layer Drilldown"
|
|
65
67
|
})),
|
|
66
68
|
[o.MAKE_TRANSFER_ACTION_BLOCK]: t(() => ({
|
|
67
|
-
Component:
|
|
69
|
+
Component: y,
|
|
68
70
|
usePrepare: i,
|
|
69
|
-
title:
|
|
71
|
+
title: K
|
|
70
72
|
})),
|
|
71
73
|
[o.TRANSCATION_HISTORY_ACTION_BLOCK]: t(() => ({
|
|
72
74
|
Component: w,
|
|
@@ -75,17 +77,17 @@ var i = (e) => {
|
|
|
75
77
|
})),
|
|
76
78
|
[o.TRANSACTION_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
77
79
|
Component: U,
|
|
78
|
-
usePrepare:
|
|
80
|
+
usePrepare: c,
|
|
79
81
|
title: () => "Transaction Details"
|
|
80
82
|
})),
|
|
81
83
|
[o.RECURRING_TRANSACTION_ACTION_BLOCK]: t(() => ({
|
|
82
84
|
Component: G,
|
|
83
|
-
usePrepare:
|
|
85
|
+
usePrepare: l,
|
|
84
86
|
title: (e, r) => r.recurring?.expense_details ?? ""
|
|
85
87
|
})),
|
|
86
88
|
[o.REMAINING_CASH_ACTION_BLOCK]: t(() => ({
|
|
87
89
|
Component: H,
|
|
88
|
-
usePrepare:
|
|
90
|
+
usePrepare: l,
|
|
89
91
|
title: (e, r) => r.insights_feed?.remaining_cash?.title ?? ""
|
|
90
92
|
})),
|
|
91
93
|
[o.CONTACT_SUPPORT_ACTION_BLOCK]: t(() => ({
|
|
@@ -99,12 +101,12 @@ var i = (e) => {
|
|
|
99
101
|
presentation: "modal"
|
|
100
102
|
})),
|
|
101
103
|
[o.CONNECTION_DETAIL_ACTION_BLOCK]: t(() => ({
|
|
102
|
-
Component:
|
|
104
|
+
Component: S,
|
|
103
105
|
usePrepare: i,
|
|
104
106
|
title: (e, r) => r.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
|
|
105
107
|
})),
|
|
106
108
|
[o.CONNECT_WIDGET_ACTION_BLOCK]: t(() => ({
|
|
107
|
-
Component:
|
|
109
|
+
Component: E,
|
|
108
110
|
usePrepare: i
|
|
109
111
|
})),
|
|
110
112
|
[o.SURVEY_MODAL_ACTION_BLOCK]: t(() => ({
|
|
@@ -114,7 +116,7 @@ var i = (e) => {
|
|
|
114
116
|
})),
|
|
115
117
|
[o.TRANSACTION_LIST_ACTION_BLOCK]: t(() => ({
|
|
116
118
|
Component: F,
|
|
117
|
-
usePrepare:
|
|
119
|
+
usePrepare: c,
|
|
118
120
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
119
121
|
})),
|
|
120
122
|
[o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: t(() => ({
|
|
@@ -128,52 +130,57 @@ var i = (e) => {
|
|
|
128
130
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
129
131
|
})),
|
|
130
132
|
[o.CREDIT_UTILIZATION_ACTION_BLOCK]: t(() => ({
|
|
131
|
-
Component:
|
|
132
|
-
usePrepare:
|
|
133
|
+
Component: Z,
|
|
134
|
+
usePrepare: j,
|
|
133
135
|
title: (e, r) => r.insights_feed?.credit_utilization?.title ?? ""
|
|
134
136
|
})),
|
|
135
137
|
[o.EMERGENCY_SAVINGS_ACTION_BLOCK]: t(() => ({
|
|
136
|
-
Component:
|
|
138
|
+
Component: q,
|
|
137
139
|
usePrepare: i,
|
|
138
140
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
139
141
|
})),
|
|
140
142
|
[o.PAYOFF_CALCULATOR_ACTION_BLOCK]: t(() => ({
|
|
141
|
-
Component:
|
|
142
|
-
usePrepare:
|
|
143
|
+
Component: J,
|
|
144
|
+
usePrepare: Q,
|
|
143
145
|
title: (e, r) => r.insights_feed?.payoff_calculator?.title ?? ""
|
|
144
146
|
})),
|
|
145
147
|
[o.BUDGET_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
146
|
-
Component:
|
|
148
|
+
Component: X,
|
|
147
149
|
usePrepare: i,
|
|
148
150
|
title: (e, r, a) => a?.insights_payload?.title || r.budgets?.details_title || ""
|
|
151
|
+
})),
|
|
152
|
+
[o.ACCOUNT_LIST_ACTION_BLOCK]: t(() => ({
|
|
153
|
+
Component: z,
|
|
154
|
+
usePrepare: W,
|
|
155
|
+
title: (e, r) => r.insights_feed?.account_list?.title ?? ""
|
|
149
156
|
}))
|
|
150
|
-
},
|
|
157
|
+
}, jo = {
|
|
151
158
|
account_block: u,
|
|
152
159
|
account_switch_block: f,
|
|
153
|
-
direct_deposit_block:
|
|
160
|
+
direct_deposit_block: k,
|
|
154
161
|
bar_chart_block: m,
|
|
155
|
-
budget_block:
|
|
156
|
-
debts_block:
|
|
162
|
+
budget_block: A,
|
|
163
|
+
debts_block: T,
|
|
157
164
|
donut_chart_block: C,
|
|
158
165
|
double_bar_chart_block: _,
|
|
159
|
-
double_progress_bar_block:
|
|
166
|
+
double_progress_bar_block: B,
|
|
160
167
|
goals_block: O,
|
|
161
|
-
image_block:
|
|
168
|
+
image_block: P,
|
|
162
169
|
no_spend_days_block: d,
|
|
163
170
|
repeating_transaction_block: n,
|
|
164
171
|
save_extra_block: N,
|
|
165
|
-
savings_opportunity_block:
|
|
172
|
+
savings_opportunity_block: I,
|
|
166
173
|
step_chart_block: s,
|
|
167
174
|
svg_image_block: D,
|
|
168
175
|
upcoming_bill_block: n,
|
|
169
176
|
upcoming_subscription_block: b,
|
|
170
|
-
withdrawal_block:
|
|
171
|
-
transaction_block:
|
|
177
|
+
withdrawal_block: L,
|
|
178
|
+
transaction_block: g
|
|
172
179
|
};
|
|
173
180
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
Zo as actionBlocks,
|
|
182
|
+
jo as blocks,
|
|
183
|
+
to as hasDrawerBlock
|
|
177
184
|
};
|
|
178
185
|
|
|
179
186
|
//# sourceMappingURL=blocks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n usePrepare: noop,\n title: (_variant, copy, beat) =>\n beat?.insights_payload?.title || copy.budgets?.details_title || '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GA0BjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AACF,IAEa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B,EAAA,OAAiB;AAAA,IAC3D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf,EAAE;AAAA,EACD,CAAA,EAAgB,0BAAA,GAA6B,EAAA,OAAiB;AAAA,IAC7D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAAA,EAAgB,gCAAA,GAAmC,EAAA,OAAiB;AAAA,IACnE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAAA,EAAgB,gCAAA,GAAmC,EAAA,OAA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EAC3B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
|
|
1
|
+
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n usePrepare: noop,\n title: (_variant, copy, beat) =>\n beat?.insights_payload?.title || copy.budgets?.details_title || '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GA0BjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AACF,IAEa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B,EAAA,OAAiB;AAAA,IAC3D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf,EAAE;AAAA,EACD,CAAA,EAAgB,0BAAA,GAA6B,EAAA,OAAiB;AAAA,IAC7D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAAA,EAAgB,gCAAA,GAAmC,EAAA,OAAiB;AAAA,IACnE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AA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