@mx-cartographer/experiences 9.4.7 → 9.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/core/stores/InsightsV2Store.es.js +12 -8
- package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
- package/dist/core/types/Insights.d.ts +2 -0
- package/dist/core/types/InsightsInstanceSlotData.d.ts +19 -1
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +19 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/insights-v2/{blocks/ComponentBlocks/ActionBlock → actionBlocks}/ActionBlockLayer.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +35 -0
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.d.ts +12 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js +58 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.d.ts +27 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js +228 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts +13 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js +26 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.d.ts +11 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js +77 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/images/SaveEnoughToLiveOnBottom.es.js +21 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/images/SaveEnoughToLiveOnBottom.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/index.d.ts +1 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.d.ts +57 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +85 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/{blocks/ComponentBlocks/ActionBlock → actionBlocks}/PlaceholderActionBlock.d.ts +1 -1
- package/dist/insights-v2/{blocks/ComponentBlocks/ActionBlock → actionBlocks}/PlaceholderActionBlock.es.js +1 -1
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js +18 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
- package/dist/insights-v2/components/BaseLayout.es.js +18 -18
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/SaveAnExtraCard.d.ts +3 -21
- package/dist/insights-v2/components/SaveAnExtraCard.es.js +55 -47
- package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js +12 -12
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +46 -44
- package/dist/insights-v2/mappings/blocks.d.ts +3 -2
- package/dist/insights-v2/mappings/blocks.es.js +48 -29
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js +0 -41
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js.map +0 -1
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [9.4.8] - 08-27-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - insights-v2 Action Block drilldowns: shared `ActionBlockLayer` owns a single drawer, content-only blocks register in `mappings/blocks.ts` keyed by the beat CTA's `block` (WEC-1705)
|
|
4
|
+
- **ADDED** - `MakeTransferActionBlock` drilldown with `SaveAnExtra100` / `SaveEnoughToLiveOn` variants; per-variant layout (sections, tables, copy keys, data keys) driven by `actionBlocks/MakeTransferActionBlock/layout.ts`; variant-specific, localized drawer titles from `insights_feed.make_transfer` copy (WEC-1705)
|
|
5
|
+
- **ADDED** - `SaveExtraBlock` component block rendering the shared `SaveAnExtraCard` from the beat's `primary_text` / `secondary_text` segments (WEC-1705)
|
|
6
|
+
- **ADDED** - CTA drawer gating: a CTA without a `block` opens nothing (reserved for postMessage), an unknown block shows the error drawer, a matching block opens its drilldown (WEC-1705)
|
|
7
|
+
- **CHANGED** - Moved ActionBlock from `blocks/ComponentBlocks/ActionBlock` to `src/insights-v2/actionBlocks`; drilldown figures/copy now sourced from `insights_payload.instance_slot_data` (WEC-1705)
|
|
8
|
+
- **CHANGED** - `InsightsV2Store.closeActionDrawer` preserves `trigger` so the drawer keeps its title/content through the slide-out animation (WEC-1705)
|
|
9
|
+
- **FIXED** - Action drawer first-open animation: `ActionBlockLayer` stays mounted for null-block CTAs so the slide-in transition plays on the first open (WEC-1705)
|
|
10
|
+
|
|
1
11
|
## [9.4.7] - 08-27-2026
|
|
2
12
|
|
|
3
13
|
- **ADDED** - `CategoryTransactionsBlock` component block supporting `SameHeaderDesign` variant for single fee and large transactions in Insights v2 (MEW2-3237)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
2
|
-
var
|
|
1
|
+
import { makeAutoObservable as t } from "mobx";
|
|
2
|
+
var i = {
|
|
3
3
|
chartBarIndex: 0,
|
|
4
4
|
tabIndex: 0,
|
|
5
5
|
isDrawerOpen: !1,
|
|
@@ -7,9 +7,9 @@ var e = {
|
|
|
7
7
|
guid: ""
|
|
8
8
|
}, n = class {
|
|
9
9
|
globalStore;
|
|
10
|
-
actionDrawer =
|
|
10
|
+
actionDrawer = i;
|
|
11
11
|
constructor(r) {
|
|
12
|
-
this.globalStore = r,
|
|
12
|
+
this.globalStore = r, t(this);
|
|
13
13
|
}
|
|
14
14
|
openCtaDrawer = (r, a) => {
|
|
15
15
|
this.actionDrawer = {
|
|
@@ -20,21 +20,25 @@ var e = {
|
|
|
20
20
|
guid: r
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
openChartDrilldown = (r, { chartBarIndex: a, tabIndex:
|
|
23
|
+
openChartDrilldown = (r, { chartBarIndex: a, tabIndex: e }) => {
|
|
24
24
|
this.actionDrawer = {
|
|
25
25
|
chartBarIndex: a,
|
|
26
|
-
tabIndex:
|
|
26
|
+
tabIndex: e ?? 0,
|
|
27
27
|
isDrawerOpen: !0,
|
|
28
28
|
trigger: "chartBar",
|
|
29
29
|
guid: r
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
closeActionDrawer = () => {
|
|
33
|
-
this.actionDrawer =
|
|
33
|
+
this.actionDrawer = {
|
|
34
|
+
...this.actionDrawer,
|
|
35
|
+
isDrawerOpen: !1,
|
|
36
|
+
guid: ""
|
|
37
|
+
};
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
40
|
export {
|
|
37
|
-
|
|
41
|
+
i as CLOSED_ACTION_DRAWER,
|
|
38
42
|
n as InsightsV2Store
|
|
39
43
|
};
|
|
40
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type { DrilldownPayload } from '../types'\n\nimport type { GlobalStore } from './GlobalStore'\n\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n chartBarIndex: number\n tabIndex: number\n guid: string\n}\n\nexport const CLOSED_ACTION_DRAWER: ActionDrawerState = {\n chartBarIndex: 0,\n tabIndex: 0,\n isDrawerOpen: false,\n trigger: 'primaryCta',\n guid: '',\n}\n\n/**\n * UI state shared across the insights-v2 widget tree. Owns the action drawer\n * so cards, charts, and action blocks coordinate through the store instead of\n * prop drilling.\n */\nexport class InsightsV2Store {\n globalStore: GlobalStore\n\n actionDrawer: ActionDrawerState = CLOSED_ACTION_DRAWER\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n\n makeAutoObservable(this)\n }\n\n openCtaDrawer = (guid: string, trigger: 'primaryCta' | 'secondaryCta') => {\n this.actionDrawer = {\n chartBarIndex: 0,\n tabIndex: 0,\n isDrawerOpen: true,\n trigger,\n guid,\n }\n }\n\n openChartDrilldown = (guid: string, { chartBarIndex, tabIndex }: DrilldownPayload) => {\n this.actionDrawer = {\n chartBarIndex,\n tabIndex: tabIndex ?? 0,\n isDrawerOpen: true,\n trigger: 'chartBar',\n guid,\n }\n }\n\n closeActionDrawer = () => {\n this.actionDrawer =
|
|
1
|
+
{"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type { DrilldownPayload } from '../types'\n\nimport type { GlobalStore } from './GlobalStore'\n\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n chartBarIndex: number\n tabIndex: number\n guid: string\n}\n\nexport const CLOSED_ACTION_DRAWER: ActionDrawerState = {\n chartBarIndex: 0,\n tabIndex: 0,\n isDrawerOpen: false,\n trigger: 'primaryCta',\n guid: '',\n}\n\n/**\n * UI state shared across the insights-v2 widget tree. Owns the action drawer\n * so cards, charts, and action blocks coordinate through the store instead of\n * prop drilling.\n */\nexport class InsightsV2Store {\n globalStore: GlobalStore\n\n actionDrawer: ActionDrawerState = CLOSED_ACTION_DRAWER\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n\n makeAutoObservable(this)\n }\n\n openCtaDrawer = (guid: string, trigger: 'primaryCta' | 'secondaryCta') => {\n this.actionDrawer = {\n chartBarIndex: 0,\n tabIndex: 0,\n isDrawerOpen: true,\n trigger,\n guid,\n }\n }\n\n openChartDrilldown = (guid: string, { chartBarIndex, tabIndex }: DrilldownPayload) => {\n this.actionDrawer = {\n chartBarIndex,\n tabIndex: tabIndex ?? 0,\n isDrawerOpen: true,\n trigger: 'chartBar',\n guid,\n }\n }\n\n closeActionDrawer = () => {\n // Preserve `trigger` so the drawer keeps its variant-specific title/content\n // through the slide-out animation (ActionBlockLayer stays mounted while\n // closing). Only flip isDrawerOpen off and clear the beat guid.\n this.actionDrawer = { ...this.actionDrawer, isDrawerOpen: false, guid: '' }\n }\n}\n"],"mappings":";AAgBA,IAAa,IAA0C;AAAA,EACrD,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AACR,GAOa,IAAb,MAA6B;AAAA,EAC3B;AAAA,EAEA,eAAkC;AAAA,EAElC,YAAY,GAA0B;AACpC,SAAK,cAAc,GAEnB,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,gBAAA,CAAiB,GAAc,MAA2C;AACxE,SAAK,eAAe;AAAA,MAClB,eAAe;AAAA,MACf,UAAU;AAAA,MACV,cAAc;AAAA,MACd,SAAA;AAAA,MACA,MAAA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,qBAAA,CAAsB,GAAc,EAAE,eAAA,GAAe,UAAA,EAAA,MAAiC;AACpF,SAAK,eAAe;AAAA,MAClB,eAAA;AAAA,MACA,UAAU,KAAY;AAAA,MACtB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,MAAA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAA,MAA0B;AAIxB,SAAK,eAAe;AAAA,MAAE,GAAG,KAAK;AAAA,MAAc,cAAc;AAAA,MAAO,MAAM;AAAA,IAAG;AAAA,EAC5E;AACF"}
|
|
@@ -63,10 +63,12 @@ export interface Description {
|
|
|
63
63
|
export interface PrimaryCTA {
|
|
64
64
|
label: string;
|
|
65
65
|
block: string;
|
|
66
|
+
variant?: string | null;
|
|
66
67
|
}
|
|
67
68
|
export interface SecondaryCTA {
|
|
68
69
|
label: string;
|
|
69
70
|
block: string;
|
|
71
|
+
variant?: string | null;
|
|
70
72
|
}
|
|
71
73
|
export interface Footer {
|
|
72
74
|
date: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataSeries, Legends } from '../../core';
|
|
2
2
|
import { Transaction } from './Transaction';
|
|
3
|
-
export interface InsightsInstanceSlotData extends Partial<BarChartBlockData>, Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<CategoryTransactionsBlockData>, Partial<CommonProps> {
|
|
3
|
+
export interface InsightsInstanceSlotData extends Partial<BarChartBlockData>, Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<CategoryTransactionsBlockData>, Partial<CommonProps> {
|
|
4
4
|
}
|
|
5
5
|
interface CommonProps {
|
|
6
6
|
amount?: number;
|
|
@@ -62,6 +62,24 @@ export interface AccountBlockData {
|
|
|
62
62
|
/** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */
|
|
63
63
|
label?: string;
|
|
64
64
|
}
|
|
65
|
+
export interface SaveExtraBlockData {
|
|
66
|
+
/** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */
|
|
67
|
+
primary_text?: string[];
|
|
68
|
+
/** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */
|
|
69
|
+
secondary_text?: string[];
|
|
70
|
+
/** MakeTransfer drilldown: available balance (both variants). */
|
|
71
|
+
available_balance?: number;
|
|
72
|
+
/** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */
|
|
73
|
+
avg_monthly_spend?: number;
|
|
74
|
+
/** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. "2 months, 11 days"). */
|
|
75
|
+
time_period?: string;
|
|
76
|
+
/** SAVE_AN_EXTRA_100: upcoming expenses (the "Expenses" figure). */
|
|
77
|
+
upcoming_expenses?: number;
|
|
78
|
+
/** SAVE_AN_EXTRA_100: total remaining after expenses. */
|
|
79
|
+
total_remaining?: number;
|
|
80
|
+
/** SAVE_ENOUGH_TO_LIVE_ON: date for the "Your available balances as of {date}" line. */
|
|
81
|
+
date?: string;
|
|
82
|
+
}
|
|
65
83
|
export interface StepChartBlockData {
|
|
66
84
|
completed_steps: number;
|
|
67
85
|
label_1: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\nimport type { Transaction } from './Transaction'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BarChartBlockData>,\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<CategoryTransactionsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n legends?: (Legends | LegendProps)[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n}\n\n//BarChart Block\nexport interface BarChartBlockData {\n average_amount?: number\n ariaLabel?: string\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\nexport type InsightTransaction = Pick<Transaction, 'amount'> &\n Partial<Pick<Transaction, 'category_guid' | 'date' | 'description' | 'merchant_guid'>> & {\n merchant_name?: string\n }\n\nexport interface CategoryTransactionsBlockData {\n primary_transaction?: InsightTransaction\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\nimport type { Transaction } from './Transaction'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BarChartBlockData>,\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<CategoryTransactionsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n legends?: (Legends | LegendProps)[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n}\n\n//BarChart Block\nexport interface BarChartBlockData {\n average_amount?: number\n ariaLabel?: string\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\nexport type InsightTransaction = Pick<Transaction, 'amount'> &\n Partial<Pick<Transaction, 'category_guid' | 'date' | 'description' | 'merchant_guid'>> & {\n merchant_name?: string\n }\n\nexport interface CategoryTransactionsBlockData {\n primary_transaction?: InsightTransaction\n}\n"],"mappings":"AA0HA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
|
|
@@ -30,8 +30,27 @@ interface SettingsMenuCopy {
|
|
|
30
30
|
unselect_all: string;
|
|
31
31
|
unselect_insight: string;
|
|
32
32
|
}
|
|
33
|
+
export interface MakeTransferCopy {
|
|
34
|
+
save_extra_title: string;
|
|
35
|
+
save_enough_title: string;
|
|
36
|
+
header_content: string;
|
|
37
|
+
description: string;
|
|
38
|
+
body_spending_content: string;
|
|
39
|
+
body_spending_description: string;
|
|
40
|
+
body_saving_content: string;
|
|
41
|
+
body_saving_description: string;
|
|
42
|
+
available_text: string;
|
|
43
|
+
total_remaining_text: string;
|
|
44
|
+
expenses_text: string;
|
|
45
|
+
available_balances_text: string;
|
|
46
|
+
average_monthly_spend_text: string;
|
|
47
|
+
your_available_balances_text: string;
|
|
48
|
+
increment_aria_label: string;
|
|
49
|
+
decrement_aria_label: string;
|
|
50
|
+
}
|
|
33
51
|
export interface InsightsFeedCopy {
|
|
34
52
|
general: GeneralInsightsFeedCopy;
|
|
35
53
|
settings_menu: SettingsMenuCopy;
|
|
54
|
+
make_transfer: MakeTransferCopy;
|
|
36
55
|
}
|
|
37
56
|
export {};
|
|
@@ -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 { InsightsFeedCopy } from './InsightsFeedCopy';
|
|
16
|
+
export type { InsightsFeedCopy, MakeTransferCopy } from './InsightsFeedCopy';
|
|
17
17
|
export type { InvestmentsCopy } from './InvestmentsCopy';
|
|
18
18
|
export type { MicroInsightsCopy } from './MicroInsightsCopy';
|
|
19
19
|
export type { NetWorthCopy } from './NetWorthCopy';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useGlobalCopyStore as y, useGlobalUiStore as k, useInsightsV2Store as g } from "../../common/context/hooks.es.js";
|
|
2
|
+
import C from "../../common/components/drawer/Drawer.es.js";
|
|
3
|
+
import h from "../../common/components/Loader.es.js";
|
|
4
|
+
import { actionBlocks as B, hasDrawerBlock as _ } from "../mappings/blocks.es.js";
|
|
5
|
+
import { observer as b } from "mobx-react-lite";
|
|
6
|
+
import w from "@mui/material/Stack";
|
|
7
|
+
import { Text as v } from "@mxenabled/mxui";
|
|
8
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
9
|
+
var D = ({ actionBlock: l, ...o }) => {
|
|
10
|
+
const { Component: n, usePrepare: t } = l;
|
|
11
|
+
return t(o), /* @__PURE__ */ e(n, { ...o });
|
|
12
|
+
}, j = b(function({ beat: o }) {
|
|
13
|
+
const n = y(), t = n.common, { isCopyLoaded: m } = k(), { actionDrawer: c, closeActionDrawer: p } = g(), s = c.isDrawerOpen && c.guid === o.guid;
|
|
14
|
+
if (!m) return s ? /* @__PURE__ */ e(h, {}) : null;
|
|
15
|
+
if (!o.insights_payload) return null;
|
|
16
|
+
const { primary_cta: u, secondary_cta: d } = o.insights_payload, r = c.trigger === "secondaryCta" ? d : u, a = _(r?.block), i = a ? B[r?.block] : void 0, f = i ? i.title?.(r?.variant, n) ?? r?.label ?? "" : a ? t.error_heading : r?.label ?? "";
|
|
17
|
+
return /* @__PURE__ */ e(C, {
|
|
18
|
+
ariaLabelClose: t.close_aria,
|
|
19
|
+
isOpen: s,
|
|
20
|
+
onClose: p,
|
|
21
|
+
title: f,
|
|
22
|
+
children: i ? /* @__PURE__ */ e(D, {
|
|
23
|
+
actionBlock: i,
|
|
24
|
+
beat: o
|
|
25
|
+
}, r?.block) : a ? /* @__PURE__ */ e(w, {
|
|
26
|
+
sx: { p: 24 },
|
|
27
|
+
children: /* @__PURE__ */ e(v, { children: t.error_message })
|
|
28
|
+
}) : null
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
j as ActionBlockLayer
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ActionBlockLayer.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionBlockLayer.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/ActionBlockLayer.tsx"],"sourcesContent":["import 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'\n\ninterface ActionBlockLayerProps {\n beat: Beat\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, closeActionDrawer } = 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 if (!isCopyLoaded) return isCurrentBeatOpen ? <Loader /> : null\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 const { primary_cta, secondary_cta } = beat.insights_payload\n\n const currentCta = actionDrawer.trigger === 'secondaryCta' ? secondary_cta : primary_cta\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 const drawerTitle = actionBlock\n ? (actionBlock.title?.(currentCta?.variant, copy) ?? currentCta?.label ?? '')\n : blockValid\n ? commonCopy.error_heading\n : (currentCta?.label ?? '')\n\n return (\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\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 )\n})\n"],"mappings":";;;;;;;;AA6BA,IAAM,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,mBAAA,EAAA,IAAsB,EAAmB,GAIzD,IAAoB,EAAa,gBAAgB,EAAa,SAAS,EAAK;AAElF,MAAI,CAAC,EAAc,QAAO,IAAoB,gBAAA,EAAC,GAAD,CAAS,CAAA,IAAI;AAI3D,MAAI,CAAC,EAAK,iBAAkB,QAAO;AAEnC,QAAM,EAAE,aAAA,GAAa,eAAA,EAAA,IAAkB,EAAK,kBAEtC,IAAa,EAAa,YAAY,iBAAiB,IAAgB,GAIvE,IAAa,EAAe,GAAY,KAAK,GAC7C,IAAc,IAChB,EAAa,GAAY,KAAA,IACzB,QAEE,IAAc,IACf,EAAY,QAAQ,GAAY,SAAS,CAAI,KAAK,GAAY,SAAS,KACxE,IACE,EAAW,gBACV,GAAY,SAAS;AAE5B,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAW;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;AAAA,MAAO,IAAI,EAAE,GAAG,GAAG;AAAA,MACjB,UAAA,gBAAA,EAAC,GAAD,EAAA,UAAO,EAAW,cAAoB,CAAA;AAAA,IACjC,CAAA,IACL;AAAA,EACE,CAAA;AAEZ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface CopyContent {
|
|
2
|
+
decrement_aria_label?: string;
|
|
3
|
+
increment_aria_label?: string;
|
|
4
|
+
}
|
|
5
|
+
interface BalanceStepperProps {
|
|
6
|
+
amount: string;
|
|
7
|
+
onDecrement?: () => void;
|
|
8
|
+
onIncrement?: () => void;
|
|
9
|
+
copy: CopyContent;
|
|
10
|
+
}
|
|
11
|
+
export declare const BalanceStepper: ({ amount, onDecrement, onIncrement, copy }: BalanceStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Text as t } from "@mxenabled/mxui";
|
|
2
|
+
import { Icon as i } from "@mxenabled/mx-icons";
|
|
3
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
4
|
+
import { IconButton as o, Stack as m } from "@mui/material";
|
|
5
|
+
var b = ({ amount: a, onDecrement: l, onIncrement: n, copy: e }) => /* @__PURE__ */ d(m, {
|
|
6
|
+
sx: {
|
|
7
|
+
flexDirection: "row",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
border: "1px solid",
|
|
10
|
+
borderColor: "divider",
|
|
11
|
+
borderRadius: 1,
|
|
12
|
+
bgcolor: "background.paper",
|
|
13
|
+
flex: 1
|
|
14
|
+
},
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ r(o, {
|
|
17
|
+
"aria-label": e.decrement_aria_label,
|
|
18
|
+
onClick: l,
|
|
19
|
+
sx: {
|
|
20
|
+
width: 44,
|
|
21
|
+
minHeight: 48
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ r(i, {
|
|
24
|
+
name: "remove",
|
|
25
|
+
sx: { color: "primary.main" }
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ r(t, {
|
|
29
|
+
sx: {
|
|
30
|
+
p: 12,
|
|
31
|
+
flex: 1,
|
|
32
|
+
textAlign: "center",
|
|
33
|
+
borderLeft: "1px solid",
|
|
34
|
+
borderRight: "1px solid",
|
|
35
|
+
borderColor: "divider"
|
|
36
|
+
},
|
|
37
|
+
variant: "h3",
|
|
38
|
+
children: a
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ r(o, {
|
|
41
|
+
"aria-label": e.increment_aria_label,
|
|
42
|
+
onClick: n,
|
|
43
|
+
sx: {
|
|
44
|
+
width: 44,
|
|
45
|
+
minHeight: 48
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ r(i, {
|
|
48
|
+
name: "add",
|
|
49
|
+
sx: { color: "primary.main" }
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
b as BalanceStepper
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=BalanceStepper.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BalanceStepper.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.tsx"],"sourcesContent":["import { IconButton, Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\ninterface CopyContent {\n decrement_aria_label?: string\n increment_aria_label?: string\n}\n\ninterface BalanceStepperProps {\n amount: string\n onDecrement?: () => void\n onIncrement?: () => void\n copy: CopyContent\n}\n\nexport const BalanceStepper = ({ amount, onDecrement, onIncrement, copy }: BalanceStepperProps) => {\n return (\n <Stack\n sx={{\n flexDirection: 'row',\n alignItems: 'center',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 1,\n bgcolor: 'background.paper',\n flex: 1,\n }}\n >\n <IconButton\n aria-label={copy.decrement_aria_label}\n onClick={onDecrement}\n sx={{ width: 44, minHeight: 48 }}\n >\n <Icon name=\"remove\" sx={{ color: 'primary.main' }} />\n </IconButton>\n <Text\n sx={{\n p: 12,\n flex: 1,\n textAlign: 'center',\n borderLeft: '1px solid',\n borderRight: '1px solid',\n borderColor: 'divider',\n }}\n variant=\"h3\"\n >\n {amount}\n </Text>\n <IconButton\n aria-label={copy.increment_aria_label}\n onClick={onIncrement}\n sx={{ width: 44, minHeight: 48 }}\n >\n <Icon name=\"add\" sx={{ color: 'primary.main' }} />\n </IconButton>\n </Stack>\n )\n}\n"],"mappings":";;;;AAgBA,IAAa,IAAA,CAAkB,EAAE,QAAA,GAAQ,aAAA,GAAa,aAAA,GAAa,MAAA,EAAA,MAE/D,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAAA,EATF,UAAA;AAAA,IAWE,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,EAAK;AAAA,MACjB,SAAS;AAAA,MACT,IAAI;AAAA,QAAE,OAAO;AAAA,QAAI,WAAW;AAAA,MAAG;AAAA,MAE/B,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAK;AAAA,QAAS,IAAI,EAAE,OAAO,eAAe;AAAA,MAAI,CAAA;AAAA,IAC1C,CAAA;AAAA,IACZ,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,GAAG;AAAA,QACH,MAAM;AAAA,QACN,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,MACA,SAAQ;AAAA,MAEP,UAAA;AAAA,IACG,CAAA;AAAA,IACN,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,EAAK;AAAA,MACjB,SAAS;AAAA,MACT,IAAI;AAAA,QAAE,OAAO;AAAA,QAAI,WAAW;AAAA,MAAG;AAAA,MAE/B,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAK;AAAA,QAAM,IAAI,EAAE,OAAO,eAAe;AAAA,MAAI,CAAA;AAAA,IACvC,CAAA;AAAA,EACP"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { variants } from './layout';
|
|
2
|
+
export { variants };
|
|
3
|
+
interface CopyContent {
|
|
4
|
+
header_content?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
body_content?: string;
|
|
7
|
+
body_description?: string;
|
|
8
|
+
available_text?: string;
|
|
9
|
+
total_remaining_text?: string;
|
|
10
|
+
increment_aria_label?: string;
|
|
11
|
+
decrement_aria_label?: string;
|
|
12
|
+
expenses_text?: string;
|
|
13
|
+
available_balances_text?: string;
|
|
14
|
+
average_monthly_spend_text?: string;
|
|
15
|
+
your_available_balances_text?: string;
|
|
16
|
+
}
|
|
17
|
+
interface MakeTransferActionBlockProps {
|
|
18
|
+
date?: string;
|
|
19
|
+
variant: (typeof variants)[keyof typeof variants];
|
|
20
|
+
svgDateContent?: string;
|
|
21
|
+
availableBalances?: number;
|
|
22
|
+
copy: CopyContent;
|
|
23
|
+
averageMonthlySpend?: number;
|
|
24
|
+
/** SAVE_AN_EXTRA_100: total remaining from the payload; falls back to available − expenses. */
|
|
25
|
+
totalRemaining?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare const MakeTransferActionBlock: ({ variant, svgDateContent, date, copy, availableBalances, averageMonthlySpend, totalRemaining, }: MakeTransferActionBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { buildDynamicCopy as A } from "../../../core/utils/Localization.es.js";
|
|
2
|
+
import { formatCurrency as l } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { BalanceStepper as C } from "./BalanceStepper.es.js";
|
|
4
|
+
import I from "./SaveEnoughToLiveOnBottomSection.es.js";
|
|
5
|
+
import { getMakeTransferLayout as y, variants as T } from "./layout.es.js";
|
|
6
|
+
import x from "react";
|
|
7
|
+
import { Text as e } from "@mxenabled/mxui";
|
|
8
|
+
import { Icon as L } from "@mxenabled/mx-icons";
|
|
9
|
+
import { Fragment as k, jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
10
|
+
import { Card as W, Divider as j, List as D, ListItem as E, Stack as n } from "@mui/material";
|
|
11
|
+
var P = ({ variant: p = T.SAVE_ENOUGH_TO_LIVE_ON, svgDateContent: m, date: h, copy: i, availableBalances: c, averageMonthlySpend: o, totalRemaining: g }) => {
|
|
12
|
+
const a = y(p), { monthsTable: _, deltaAmount: u } = a, [f, d] = x.useState(a.initialAmount ?? o ?? 0);
|
|
13
|
+
return x.useEffect(() => {
|
|
14
|
+
a.initialAmount == null && o != null && d(o);
|
|
15
|
+
}, [o, a.initialAmount]), /* @__PURE__ */ r(k, { children: [
|
|
16
|
+
/* @__PURE__ */ r(n, {
|
|
17
|
+
sx: {
|
|
18
|
+
bgcolor: "background.paper",
|
|
19
|
+
p: 24,
|
|
20
|
+
borderBottom: "1px solid",
|
|
21
|
+
borderColor: "divider"
|
|
22
|
+
},
|
|
23
|
+
children: [a.showBalancesSection && c != null && o != null && m && /* @__PURE__ */ t(I, {
|
|
24
|
+
content: m || "",
|
|
25
|
+
leftLabel: i.available_balances_text,
|
|
26
|
+
leftValue: l(c, "0,0.00"),
|
|
27
|
+
rightLabel: i.average_monthly_spend_text,
|
|
28
|
+
rightValue: l(o, "0,0.00"),
|
|
29
|
+
sx: {
|
|
30
|
+
width: "100%",
|
|
31
|
+
mb: 24
|
|
32
|
+
}
|
|
33
|
+
}), /* @__PURE__ */ r(n, {
|
|
34
|
+
sx: { gap: 8 },
|
|
35
|
+
children: [/* @__PURE__ */ t(e, {
|
|
36
|
+
variant: "h3",
|
|
37
|
+
children: i.header_content
|
|
38
|
+
}), /* @__PURE__ */ t(e, {
|
|
39
|
+
sx: { lineHeight: "24px" },
|
|
40
|
+
truncate: !1,
|
|
41
|
+
variant: "body1",
|
|
42
|
+
children: i.description
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
a.showRemainingCard && c != null && o != null && /* @__PURE__ */ t(n, {
|
|
47
|
+
sx: {
|
|
48
|
+
pt: 24,
|
|
49
|
+
px: 24
|
|
50
|
+
},
|
|
51
|
+
children: /* @__PURE__ */ r(W, {
|
|
52
|
+
sx: {
|
|
53
|
+
px: 16,
|
|
54
|
+
pt: 16,
|
|
55
|
+
pb: 12
|
|
56
|
+
},
|
|
57
|
+
children: [/* @__PURE__ */ r(n, {
|
|
58
|
+
sx: {
|
|
59
|
+
border: 1,
|
|
60
|
+
borderColor: "divider",
|
|
61
|
+
borderRadius: "4px",
|
|
62
|
+
gap: 12,
|
|
63
|
+
flexDirection: "row",
|
|
64
|
+
justifyContent: "space-between",
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
p: 8,
|
|
67
|
+
mb: 12
|
|
68
|
+
},
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ r(n, {
|
|
71
|
+
sx: {
|
|
72
|
+
width: 155,
|
|
73
|
+
textAlign: "center"
|
|
74
|
+
},
|
|
75
|
+
children: [/* @__PURE__ */ t(e, {
|
|
76
|
+
sx: { fontWeight: 600 },
|
|
77
|
+
variant: "body1",
|
|
78
|
+
children: l(c, "0,0.00")
|
|
79
|
+
}), /* @__PURE__ */ t(e, {
|
|
80
|
+
sx: { color: "text.secondary" },
|
|
81
|
+
variant: "caption",
|
|
82
|
+
children: i.available_text
|
|
83
|
+
})]
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ t(L, {
|
|
86
|
+
name: "remove",
|
|
87
|
+
size: 20
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ r(n, {
|
|
90
|
+
sx: {
|
|
91
|
+
width: 155,
|
|
92
|
+
textAlign: "center"
|
|
93
|
+
},
|
|
94
|
+
children: [/* @__PURE__ */ t(e, {
|
|
95
|
+
sx: { fontWeight: 600 },
|
|
96
|
+
variant: "body1",
|
|
97
|
+
children: l(o, "0,0.00")
|
|
98
|
+
}), /* @__PURE__ */ t(e, {
|
|
99
|
+
sx: { color: "text.secondary" },
|
|
100
|
+
variant: "caption",
|
|
101
|
+
children: i.expenses_text
|
|
102
|
+
})]
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}), /* @__PURE__ */ r(n, {
|
|
106
|
+
sx: {
|
|
107
|
+
textAlign: "center",
|
|
108
|
+
flexDirection: "row",
|
|
109
|
+
justifyContent: "center",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
gap: 4
|
|
112
|
+
},
|
|
113
|
+
children: [/* @__PURE__ */ r(e, {
|
|
114
|
+
sx: { color: "text.secondary" },
|
|
115
|
+
variant: "body2",
|
|
116
|
+
children: [i.total_remaining_text, ":"]
|
|
117
|
+
}), /* @__PURE__ */ t(e, {
|
|
118
|
+
sx: { fontWeight: 600 },
|
|
119
|
+
variant: "body2",
|
|
120
|
+
children: l(g, "0,0.00")
|
|
121
|
+
})]
|
|
122
|
+
})]
|
|
123
|
+
})
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ r(n, {
|
|
126
|
+
sx: {
|
|
127
|
+
p: 24,
|
|
128
|
+
gap: 8
|
|
129
|
+
},
|
|
130
|
+
children: [/* @__PURE__ */ t(e, {
|
|
131
|
+
sx: { fontWeight: 600 },
|
|
132
|
+
truncate: !1,
|
|
133
|
+
variant: "body1",
|
|
134
|
+
children: i.body_content
|
|
135
|
+
}), /* @__PURE__ */ t(C, {
|
|
136
|
+
amount: l(f, "0,0.00"),
|
|
137
|
+
copy: i,
|
|
138
|
+
onDecrement: () => d((s) => Math.max(0, s - u)),
|
|
139
|
+
onIncrement: () => d((s) => s + u)
|
|
140
|
+
})]
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ r(n, {
|
|
143
|
+
sx: { gap: 8 },
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ t(e, {
|
|
146
|
+
sx: {
|
|
147
|
+
fontWeight: 600,
|
|
148
|
+
mx: 24
|
|
149
|
+
},
|
|
150
|
+
truncate: !1,
|
|
151
|
+
variant: "body1",
|
|
152
|
+
children: i.body_description
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ t(D, {
|
|
155
|
+
sx: {
|
|
156
|
+
bgcolor: "background.paper",
|
|
157
|
+
width: "100%"
|
|
158
|
+
},
|
|
159
|
+
children: _.map(({ label: s, value: b }, w) => {
|
|
160
|
+
const v = a.lastRowIndex;
|
|
161
|
+
return /* @__PURE__ */ r(x.Fragment, { children: [/* @__PURE__ */ t(E, {
|
|
162
|
+
disableGutters: !0,
|
|
163
|
+
disablePadding: !0,
|
|
164
|
+
sx: {
|
|
165
|
+
minHeight: 52,
|
|
166
|
+
bgcolor: "background.paper"
|
|
167
|
+
},
|
|
168
|
+
children: /* @__PURE__ */ t(n, {
|
|
169
|
+
sx: { width: "100%" },
|
|
170
|
+
children: /* @__PURE__ */ r(n, {
|
|
171
|
+
sx: {
|
|
172
|
+
flexDirection: "row",
|
|
173
|
+
justifyContent: "space-between",
|
|
174
|
+
alignItems: "center",
|
|
175
|
+
width: "100%",
|
|
176
|
+
px: 24,
|
|
177
|
+
py: 8
|
|
178
|
+
},
|
|
179
|
+
children: [/* @__PURE__ */ t(e, {
|
|
180
|
+
truncate: !1,
|
|
181
|
+
variant: "body1",
|
|
182
|
+
children: s
|
|
183
|
+
}), /* @__PURE__ */ t(e, {
|
|
184
|
+
sx: { fontWeight: 600 },
|
|
185
|
+
truncate: !1,
|
|
186
|
+
variant: "body1",
|
|
187
|
+
children: l(b * f, "0,0")
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
}), /* @__PURE__ */ t(j, {
|
|
192
|
+
component: "li",
|
|
193
|
+
sx: { ml: w === v ? 0 : 24 }
|
|
194
|
+
})] }, b);
|
|
195
|
+
})
|
|
196
|
+
}),
|
|
197
|
+
a.showTotalBalances && c != null && /* @__PURE__ */ r(n, {
|
|
198
|
+
sx: {
|
|
199
|
+
pt: 6,
|
|
200
|
+
pb: 14,
|
|
201
|
+
px: 24,
|
|
202
|
+
textAlign: "right",
|
|
203
|
+
gap: 4
|
|
204
|
+
},
|
|
205
|
+
children: [/* @__PURE__ */ t(e, {
|
|
206
|
+
truncate: !1,
|
|
207
|
+
variant: "h3",
|
|
208
|
+
children: l(c, "0,0.00")
|
|
209
|
+
}), h && /* @__PURE__ */ t(e, {
|
|
210
|
+
sx: {
|
|
211
|
+
color: "text.secondary",
|
|
212
|
+
fontWeight: 400
|
|
213
|
+
},
|
|
214
|
+
truncate: !1,
|
|
215
|
+
variant: "subtitle2",
|
|
216
|
+
children: A(i.your_available_balances_text, h)
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
]
|
|
220
|
+
})
|
|
221
|
+
] });
|
|
222
|
+
};
|
|
223
|
+
export {
|
|
224
|
+
P as MakeTransferActionBlock,
|
|
225
|
+
T as variants
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
//# sourceMappingURL=MakeTransferActionBlock.es.js.map
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MakeTransferActionBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.tsx"],"sourcesContent":["import React from 'react'\nimport { Card, Divider, List, ListItem, Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { Text } from '@mxenabled/mxui'\nimport { BalanceStepper } from './BalanceStepper'\nimport { formatCurrency } from '../../../common'\nimport { buildDynamicCopy } from '../../../core'\nimport SaveEnoughToLiveOnBottomSection from './SaveEnoughToLiveOnBottomSection'\nimport { getMakeTransferLayout, variants } from './layout'\n\n// Re-exported for existing importers (adapter, tests) that pull `variants` from\n// the component module. The source of truth is ./layout.\nexport { variants }\n\ninterface CopyContent {\n header_content?: string\n description?: string\n body_content?: string\n body_description?: string\n available_text?: string\n total_remaining_text?: string\n increment_aria_label?: string\n decrement_aria_label?: string\n expenses_text?: string\n available_balances_text?: string\n average_monthly_spend_text?: string\n your_available_balances_text?: string\n}\n\ninterface MakeTransferActionBlockProps {\n date?: string\n variant: (typeof variants)[keyof typeof variants]\n svgDateContent?: string\n availableBalances?: number\n copy: CopyContent\n averageMonthlySpend?: number\n /** SAVE_AN_EXTRA_100: total remaining from the payload; falls back to available − expenses. */\n totalRemaining?: number\n}\n\n// Content-only: the surrounding Drawer (open/close/title) is owned by\n// ActionBlockLayer, which renders this inside the shared action-drawer shell.\nexport const MakeTransferActionBlock = ({\n variant = variants.SAVE_ENOUGH_TO_LIVE_ON,\n svgDateContent,\n date,\n copy,\n availableBalances,\n averageMonthlySpend,\n totalRemaining,\n}: MakeTransferActionBlockProps) => {\n // All per-variant layout decisions live in ./layout.ts (Beat Blocks pattern).\n const layout = getMakeTransferLayout(variant)\n const { monthsTable, deltaAmount } = layout\n\n const [amountToCalculate, setAmountToCalculate] = React.useState(\n layout.initialAmount ?? averageMonthlySpend ?? 0,\n )\n\n // Variants without a fixed initialAmount (e.g. SAVE_ENOUGH_TO_LIVE_ON) seed the\n // stepper from averageMonthlySpend. useState only captures its initializer once,\n // so sync once the spend resolves after mount.\n React.useEffect(() => {\n if (layout.initialAmount == null && averageMonthlySpend != null) {\n setAmountToCalculate(averageMonthlySpend)\n }\n }, [averageMonthlySpend, layout.initialAmount])\n\n return (\n <>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n p: 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n }}\n >\n {layout.showBalancesSection &&\n availableBalances != null &&\n averageMonthlySpend != null &&\n svgDateContent && (\n <SaveEnoughToLiveOnBottomSection\n content={svgDateContent || ''}\n leftLabel={copy.available_balances_text!}\n leftValue={formatCurrency(availableBalances, '0,0.00')}\n rightLabel={copy.average_monthly_spend_text!}\n rightValue={formatCurrency(averageMonthlySpend, '0,0.00')}\n sx={{ width: '100%', mb: 24 }}\n />\n )}\n <Stack\n sx={{\n gap: 8,\n }}\n >\n <Text variant=\"h3\">{copy.header_content}</Text>\n <Text sx={{ lineHeight: '24px' }} truncate={false} variant=\"body1\">\n {copy.description}\n </Text>\n </Stack>\n </Stack>\n {layout.showRemainingCard && availableBalances != null && averageMonthlySpend != null && (\n <Stack sx={{ pt: 24, px: 24 }}>\n <Card sx={{ px: 16, pt: 16, pb: 12 }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '4px',\n gap: 12,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n p: 8,\n mb: 12,\n }}\n >\n <Stack sx={{ width: 155, textAlign: 'center' }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {formatCurrency(availableBalances, '0,0.00')}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {copy.available_text}\n </Text>\n </Stack>\n <Icon name=\"remove\" size={20} />\n <Stack sx={{ width: 155, textAlign: 'center' }}>\n <Text sx={{ fontWeight: 600 }} variant=\"body1\">\n {formatCurrency(averageMonthlySpend, '0,0.00')}\n </Text>\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {copy.expenses_text}\n </Text>\n </Stack>\n </Stack>\n <Stack\n sx={{\n textAlign: 'center',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n gap: 4,\n }}\n >\n <Text sx={{ color: 'text.secondary' }} variant=\"body2\">\n {copy.total_remaining_text}:\n </Text>\n <Text sx={{ fontWeight: 600 }} variant=\"body2\">\n {formatCurrency(totalRemaining, '0,0.00')}\n </Text>\n </Stack>\n </Card>\n </Stack>\n )}\n\n <Stack sx={{ p: 24, gap: 8 }}>\n <Text sx={{ fontWeight: 600 }} truncate={false} variant=\"body1\">\n {copy.body_content}\n </Text>\n <BalanceStepper\n amount={formatCurrency(amountToCalculate, '0,0.00')}\n copy={copy}\n onDecrement={() => setAmountToCalculate((prev) => Math.max(0, prev - deltaAmount))}\n onIncrement={() => setAmountToCalculate((prev) => prev + deltaAmount)}\n />\n </Stack>\n <Stack sx={{ gap: 8 }}>\n <Text sx={{ fontWeight: 600, mx: 24 }} truncate={false} variant=\"body1\">\n {copy.body_description}\n </Text>\n <List sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {monthsTable.map(({ label, value }, index) => {\n const isLastIndex = layout.lastRowIndex\n return (\n <React.Fragment key={value}>\n <ListItem\n disableGutters={true}\n disablePadding={true}\n sx={{\n minHeight: 52,\n bgcolor: 'background.paper',\n }}\n >\n <Stack sx={{ width: '100%' }}>\n <Stack\n sx={{\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n px: 24,\n py: 8,\n }}\n >\n <Text truncate={false} variant=\"body1\">\n {label}\n </Text>\n <Text sx={{ fontWeight: 600 }} truncate={false} variant=\"body1\">\n {formatCurrency(value * amountToCalculate, '0,0')}\n </Text>\n </Stack>\n </Stack>\n </ListItem>\n <Divider component=\"li\" sx={{ ml: index === isLastIndex ? 0 : 24 }} />\n </React.Fragment>\n )\n })}\n </List>\n {layout.showTotalBalances && availableBalances != null && (\n <Stack sx={{ pt: 6, pb: 14, px: 24, textAlign: 'right', gap: 4 }}>\n <Text truncate={false} variant=\"h3\">\n {formatCurrency(availableBalances, '0,0.00')}\n </Text>\n {date && (\n <Text\n sx={{ color: 'text.secondary', fontWeight: 400 }}\n truncate={false}\n variant=\"subtitle2\"\n >\n {buildDynamicCopy(copy.your_available_balances_text!, date) as string}\n </Text>\n )}\n </Stack>\n )}\n </Stack>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;AA2CA,IAAa,IAAA,CAA2B,EACtC,SAAA,IAAU,EAAS,wBACnB,gBAAA,GACA,MAAA,GAC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B,CAAC;AAAA,QACG,CAAA;AAAA,QACL,EAAO,qBAAqB,KAAqB,QAChD,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,IAAI;AAAA,YAAG,IAAI;AAAA,YAAI,IAAI;AAAA,YAAI,WAAW;AAAA,YAAS,KAAK;AAAA,UAAE;AAAA,UAA/D,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAM,UAAU;AAAA,YAAO,SAAQ;AAAA,YAC5B,UAAA,EAAe,GAAmB,QAAQ;AAAA,UACvC,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,YACE,IAAI;AAAA,cAAE,OAAO;AAAA,cAAkB,YAAY;AAAA,YAAI;AAAA,YAC/C,UAAU;AAAA,YACV,SAAQ;AAAA,YAEP,UAAA,EAAiB,EAAK,8BAA+B,CAAI;AAAA,UACtD,CAAA,CAEH;AAAA;MAEJ;AAAA;EACP,EAAA,CAAA;AAEN"}
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Beat } from '../../../core';
|
|
2
|
+
/**
|
|
3
|
+
* Adapter that plugs MakeTransferActionBlock into the ActionBlock registry.
|
|
4
|
+
*
|
|
5
|
+
* The block is content-only — ActionBlockLayer owns the surrounding Drawer
|
|
6
|
+
* (open/close/title). This adapter derives the variant from the clicked CTA,
|
|
7
|
+
* the figures from the beat payload, and the copy from GlobalCopyStore.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MakeTransferActionBlockLayer: (({ beat, }: {
|
|
10
|
+
beat: Beat;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|