@mx-cartographer/experiences 9.7.14 → 9.7.16
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 +9 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +60 -67
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +0 -8
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +82 -94
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.d.ts +6 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +28 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/index.d.ts +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +18 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +73 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -1
- package/dist/insights-v2/components/AmountBreakdownCard.d.ts +15 -0
- package/dist/insights-v2/components/AmountBreakdownCard.es.js +90 -0
- package/dist/insights-v2/components/AmountBreakdownCard.es.js.map +1 -0
- package/dist/insights-v2/components/DirectDepositCard.es.js +17 -14
- package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
- package/dist/insights-v2/index.d.ts +1 -0
- package/dist/insights-v2/index.es.js +119 -112
- package/dist/insights-v2/mappings/blocks.es.js +6 -6
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.d.ts +0 -16
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js +0 -24
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js.map +0 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/index.d.ts +0 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.d.ts +0 -28
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js +0 -63
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js.map +0 -1
|
@@ -1,131 +1,138 @@
|
|
|
1
1
|
import r from "./components/StatusPill.es.js";
|
|
2
2
|
import { resolveInsightRender as m } from "./resolveInsightRender.es.js";
|
|
3
3
|
import { useBeatActions as a } from "./beatActions.es.js";
|
|
4
|
-
import { BAR_ARIA_LABEL as
|
|
4
|
+
import { BAR_ARIA_LABEL as e, BAR_CHART_VARIANTS as f, barChartVariant as n, buildChartData as c, buildDataSeries as l } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
5
5
|
import { HOST_ACTIONS as d } from "./ctaActions/hostActions.es.js";
|
|
6
|
-
import { useBeatCtaActions as
|
|
6
|
+
import { useBeatCtaActions as C, useCtaHandler as g } from "./ctaActions/useCtaAction.es.js";
|
|
7
7
|
import { BarchartBlock as k } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
8
|
-
import { DoubleBarChartBlock as
|
|
9
|
-
import
|
|
8
|
+
import { DoubleBarChartBlock as S } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
9
|
+
import h from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
10
10
|
import L from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
11
11
|
import I from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
12
|
-
import R from "./components/
|
|
13
|
-
import O from "./components/
|
|
14
|
-
import y
|
|
15
|
-
import P from "./blocks/ComponentBlocks/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import ho from "./components/
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import hr from "./components/
|
|
12
|
+
import R, { isLogoGuid as w } from "./components/LogoFromGuid.es.js";
|
|
13
|
+
import O from "./components/AccountHeroCard.es.js";
|
|
14
|
+
import y from "./components/DirectDepositCard.es.js";
|
|
15
|
+
import { detailedAccountVariant as M, directDepositVariant as P, isDetailedAccountVariant as _ } from "./blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js";
|
|
16
|
+
import x from "./blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
17
|
+
import U from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
18
|
+
import W from "./components/TransferLogoCard.es.js";
|
|
19
|
+
import q from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
20
|
+
import { BudgetBlock as J } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
21
|
+
import Q from "./components/DebtPayoffCard.es.js";
|
|
22
|
+
import Y from "./components/InsightTransactionRow.es.js";
|
|
23
|
+
import $ from "./components/TransactionListCard.es.js";
|
|
24
|
+
import ro from "./blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
25
|
+
import mo from "./components/UpcomingBillCard.es.js";
|
|
26
|
+
import ao from "./blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
27
|
+
import eo from "./components/SaveAnExtraCard.es.js";
|
|
28
|
+
import no from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
29
|
+
import lo from "./components/SavingsOpportunityCard.es.js";
|
|
30
|
+
import Bo from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
31
|
+
import go from "./components/StatusMessageCard.es.js";
|
|
32
|
+
import { transactionBlockVariant as ko } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
|
|
33
|
+
import { TransactionBlock as So } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
34
|
+
import ho from "./components/AmountPill.es.js";
|
|
35
|
+
import Lo from "./components/SubscriptionHeroCard.es.js";
|
|
36
|
+
import Io from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
37
|
+
import Ro from "./components/WithdrawalCard.es.js";
|
|
38
|
+
import Ho from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
39
|
+
import { SVGImageBlock as Vo } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
40
|
+
import Eo from "./components/shared/StatusSnackbar.es.js";
|
|
41
|
+
import Po from "./components/FeedbackDialog.es.js";
|
|
42
|
+
import Fo from "./components/FeedbackModal.es.js";
|
|
43
|
+
import Go from "./components/ConnectionDetailDrillDown.es.js";
|
|
44
|
+
import No from "./components/SurveyModal.es.js";
|
|
45
|
+
import jo from "./components/InsightErrorCard.es.js";
|
|
46
|
+
import { ErrorCard as zo } from "./components/ErrorCard.es.js";
|
|
47
|
+
import Ko from "./components/BadgedTile.es.js";
|
|
48
|
+
import { OverflowMenu as Xo } from "./components/OverflowMenu.es.js";
|
|
49
|
+
import { InsightOptionsMenu as Zo } from "./components/InsightOptionsMenu.es.js";
|
|
50
|
+
import or from "./components/StatusBadge.es.js";
|
|
51
|
+
import tr from "./components/CompactInsightCard.es.js";
|
|
52
|
+
import ir from "./components/AmountBreakdownCard.es.js";
|
|
53
|
+
import pr from "./components/DesignateEmergencySavingsCard.es.js";
|
|
54
|
+
import { FeedbackBar as fr } from "./components/FeedbackBar.es.js";
|
|
55
|
+
import { DismissInsightDialog as cr } from "./components/DismissInsightDialog.es.js";
|
|
56
|
+
import { HiddenConfirmationCard as sr } from "./components/HiddenConfirmationCard.es.js";
|
|
57
|
+
import { LoadingCard as Br } from "./components/LoadingCard.es.js";
|
|
58
|
+
import { ObsolesceBanner as gr } from "./components/ObsolesceBanner.es.js";
|
|
59
|
+
import kr from "./components/BaseLayout.es.js";
|
|
60
|
+
import Sr from "./components/LogoTile.es.js";
|
|
61
|
+
import hr from "./components/LogoClusterCard.es.js";
|
|
62
|
+
import Lr from "./components/MerchantHighlightCard.es.js";
|
|
63
|
+
import Ir from "./components/P2PLogoStack.es.js";
|
|
62
64
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
e as
|
|
69
|
-
|
|
65
|
+
U as AccountBlock,
|
|
66
|
+
O as AccountHeroCard,
|
|
67
|
+
q as AccountSwitchBlock,
|
|
68
|
+
ir as AmountBreakdownCard,
|
|
69
|
+
ho as AmountPill,
|
|
70
|
+
e as BAR_ARIA_LABEL,
|
|
71
|
+
f as BAR_CHART_VARIANTS,
|
|
72
|
+
Ko as BadgedTile,
|
|
70
73
|
k as BarchartBlock,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
kr as BaseLayout,
|
|
75
|
+
J as BudgetBlock,
|
|
76
|
+
tr as CompactInsightCard,
|
|
77
|
+
Go as ConnectionDetailDrillDown,
|
|
78
|
+
Q as DebtPayoffCard,
|
|
79
|
+
ro as DebtsBlock,
|
|
80
|
+
pr as DesignateEmergencySavingsCard,
|
|
81
|
+
x as DetailedAccountBlock,
|
|
82
|
+
x as DirectDepositBlock,
|
|
83
|
+
y as DirectDepositCard,
|
|
84
|
+
cr as DismissInsightDialog,
|
|
81
85
|
L as DonutChartBlock,
|
|
82
|
-
|
|
86
|
+
S as DoubleBarChartBlock,
|
|
83
87
|
I as DoubleProgressBarBlock,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
zo as ErrorCard,
|
|
89
|
+
fr as FeedbackBar,
|
|
90
|
+
Po as FeedbackDialog,
|
|
91
|
+
Fo as FeedbackModal,
|
|
88
92
|
d as HOST_ACTIONS,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
sr as HiddenConfirmationCard,
|
|
94
|
+
jo as InsightErrorCard,
|
|
95
|
+
Zo as InsightOptionsMenu,
|
|
96
|
+
Y as InsightTransactionRow,
|
|
97
|
+
Br as LoadingCard,
|
|
98
|
+
hr as LogoClusterCard,
|
|
99
|
+
R as LogoFromGuid,
|
|
100
|
+
Sr as LogoTile,
|
|
101
|
+
Lr as MerchantHighlightCard,
|
|
102
|
+
gr as ObsolesceBanner,
|
|
103
|
+
Xo as OverflowMenu,
|
|
104
|
+
Ir as P2PLogoStack,
|
|
105
|
+
ao as RepeatingTransactionBlock,
|
|
106
|
+
Vo as SVGImageBlock,
|
|
107
|
+
eo as SaveAnExtraCard,
|
|
108
|
+
no as SaveExtraBlock,
|
|
109
|
+
Bo as SavingsOpportunityBlock,
|
|
110
|
+
lo as SavingsOpportunityCard,
|
|
111
|
+
or as StatusBadge,
|
|
112
|
+
go as StatusMessageCard,
|
|
109
113
|
r as StatusPill,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
Eo as StatusSnackbar,
|
|
115
|
+
h as StepChartBlock,
|
|
116
|
+
Lo as SubscriptionHeroCard,
|
|
117
|
+
No as SurveyModal,
|
|
118
|
+
So as TransactionBlock,
|
|
119
|
+
$ as TransactionListCard,
|
|
120
|
+
W as TransferLogoCard,
|
|
121
|
+
ao as UpcomingBillBlock,
|
|
122
|
+
mo as UpcomingBillCard,
|
|
123
|
+
Io as UpcomingSubscriptionBlock,
|
|
124
|
+
Ho as WithdrawalBlock,
|
|
125
|
+
Ro as WithdrawalCard,
|
|
122
126
|
n as barChartVariant,
|
|
123
127
|
c as buildChartData,
|
|
124
128
|
l as buildDataSeries,
|
|
125
|
-
|
|
129
|
+
M as detailedAccountVariant,
|
|
130
|
+
P as directDepositVariant,
|
|
131
|
+
_ as isDetailedAccountVariant,
|
|
132
|
+
w as isLogoGuid,
|
|
126
133
|
m as resolveInsightRender,
|
|
127
|
-
|
|
134
|
+
ko as transactionBlockVariant,
|
|
128
135
|
a as useBeatActions,
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
C as useBeatCtaActions,
|
|
137
|
+
g as useCtaHandler
|
|
131
138
|
};
|
|
@@ -6,9 +6,9 @@ import { DoubleBarChartBlock as _ } from "../blocks/ChartBlocks/DoubleBarChartBl
|
|
|
6
6
|
import s from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
7
7
|
import C from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
8
8
|
import k from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
9
|
-
import B from "../blocks/ComponentBlocks/
|
|
10
|
-
import u from "../blocks/ComponentBlocks/
|
|
11
|
-
import T from "../blocks/ComponentBlocks/
|
|
9
|
+
import B from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
10
|
+
import u from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
11
|
+
import T from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
12
12
|
import { BudgetBlock as A } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
13
13
|
import O from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
14
14
|
import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
@@ -115,9 +115,9 @@ var e = (t) => {
|
|
|
115
115
|
usePrepare: e
|
|
116
116
|
}))
|
|
117
117
|
}, Po = {
|
|
118
|
-
account_block:
|
|
119
|
-
account_switch_block:
|
|
120
|
-
direct_deposit_block:
|
|
118
|
+
account_block: u,
|
|
119
|
+
account_switch_block: T,
|
|
120
|
+
direct_deposit_block: B,
|
|
121
121
|
bar_chart_block: l,
|
|
122
122
|
budget_block: A,
|
|
123
123
|
debts_block: O,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n DirectDepositBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\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'\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} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DirectDepositBlock,\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 image_block: ImageBlock,\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: Transact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;AAAA,EACb,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 DoubleBarChartBlock,\n DoubleProgressBarBlock,\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'\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} 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 image_block: ImageBlock,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,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,OAAiB;AAAA,IACnE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf,EAAE;AAAA,EAGD,CAAA,EAAgB,kCAAA,GAAqC,EAAA,OAAiB;AAAA,IACrE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,WAAW,mBAAmB;AAAA,EAChE,EAAE;AAAA,EAGD,CAAA,EAAgB,2BAAA,GAA8B,EAAA,OAAiB;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;AAAA,EACb,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,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"}
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InsightsPayload } from '../../../../core';
|
|
2
|
-
interface DirectDepositBlockProps {
|
|
3
|
-
payload: InsightsPayload;
|
|
4
|
-
beatGuid?: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Direct Deposit component block — the shared hero visual for the Set Up
|
|
8
|
-
* Direct Deposit, Switch Direct Deposit, and Missing Interest Rate beats.
|
|
9
|
-
*
|
|
10
|
-
* The backend picks the design branch via `instance_slot.variant` and carries
|
|
11
|
-
* the account facts flat on `instance_slot` (V2 contract — no
|
|
12
|
-
* `instance_slot_data`). Everything variant-specific is flat on the layout
|
|
13
|
-
* config (`./layout.ts`); `DirectDepositCard` is a variant-agnostic hero.
|
|
14
|
-
*/
|
|
15
|
-
declare const DirectDepositBlock: ({ payload }: DirectDepositBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export default DirectDepositBlock;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { directDepositVariant as f, getLayoutConfig as l } from "./layout.es.js";
|
|
2
|
-
import D from "../../../components/DirectDepositCard.es.js";
|
|
3
|
-
import { DepositLogo as g } from "../../../components/ComponentBlocks/DepositLogo.es.js";
|
|
4
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
-
import { useTheme as _ } from "@mui/material/styles";
|
|
6
|
-
var L = ({ payload: i }) => {
|
|
7
|
-
const e = _(), { instance_slot: n } = i, { account_name: a, account_type: s, institution_guid: r, institution_name: c, status_text: m, variant: u } = n, t = l(e), p = t[u] ?? t[f.SetUpDirectDeposit];
|
|
8
|
-
return /* @__PURE__ */ o(D, {
|
|
9
|
-
...p,
|
|
10
|
-
logo: /* @__PURE__ */ o(g, {
|
|
11
|
-
iconName: "account_balance",
|
|
12
|
-
institutionName: c ?? "",
|
|
13
|
-
institutionGuid: r ?? ""
|
|
14
|
-
}),
|
|
15
|
-
name: a,
|
|
16
|
-
statusLabel: m,
|
|
17
|
-
subtitle: s
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
L as default
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=DirectDepositBlock.es.js.map
|
package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DirectDepositBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\n\nimport type { InsightsPayload } from '../../../../core'\n\nimport DirectDepositCard from '../../../components/DirectDepositCard'\n\nimport { directDepositVariant, getLayoutConfig, type DirectDepositVariant } from './layout'\nimport DepositLogo from '../../../components/ComponentBlocks/DepositLogo'\n\ninterface DirectDepositBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\n/**\n * Direct Deposit component block — the shared hero visual for the Set Up\n * Direct Deposit, Switch Direct Deposit, and Missing Interest Rate beats.\n *\n * The backend picks the design branch via `instance_slot.variant` and carries\n * the account facts flat on `instance_slot` (V2 contract — no\n * `instance_slot_data`). Everything variant-specific is flat on the layout\n * config (`./layout.ts`); `DirectDepositCard` is a variant-agnostic hero.\n */\nconst DirectDepositBlock = ({ payload }: DirectDepositBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n const { account_name, account_type, institution_guid, institution_name, status_text, variant } =\n instance_slot\n\n const layoutConfig = getLayoutConfig(theme)\n // Unknown backend variants degrade to the pending setup styling rather than\n // crashing (mirrors createVariantBlock's fallback philosophy).\n const config =\n layoutConfig[variant as DirectDepositVariant] ??\n layoutConfig[directDepositVariant.SetUpDirectDeposit]\n\n return (\n <DirectDepositCard\n {...config}\n logo={\n <DepositLogo\n iconName=\"account_balance\"\n institutionName={institution_name ?? ''}\n institutionGuid={institution_guid ?? ''}\n />\n }\n name={account_name}\n statusLabel={status_text}\n subtitle={account_type}\n />\n )\n}\n\nexport default DirectDepositBlock\n"],"mappings":";;;;;AAuBA,IAAM,IAAA,CAAsB,EAAE,SAAA,EAAA,MAAuC;AACnE,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,cAAA,GAAc,cAAA,GAAc,kBAAA,GAAkB,kBAAA,GAAkB,aAAA,GAAa,SAAA,EAAA,IACnF,GAEI,IAAe,EAAgB,CAAK,GAGpC,IACJ,EAAa,CAAA,KACb,EAAa,EAAqB,kBAAA;AAEpC,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MACE,gBAAA,EAAC,GAAD;AAAA,MACE,UAAS;AAAA,MACT,iBAAiB,KAAoB;AAAA,MACrC,iBAAiB,KAAoB;AAAA,IACtC,CAAA;AAAA,IAEH,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,EACX,CAAA;AAEL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as DirectDepositBlock } from './DirectDepositBlock';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/material/styles';
|
|
2
|
-
import { DirectDepositCardStyleProps, DirectDepositPillConfig } from '../../../components/DirectDepositCard';
|
|
3
|
-
/**
|
|
4
|
-
* Design branches of the Direct Deposit component block (Figma: "Direct
|
|
5
|
-
* Deposit" — Detailed Primary / Detailed Success / Deposit Completed):
|
|
6
|
-
*
|
|
7
|
-
* - `SetUpDirectDeposit` — pending setup: flat `primary.lighter` slot, neutral pill
|
|
8
|
-
* ("Direct Deposit Not Set Up").
|
|
9
|
-
* - `DirectDepositComplete` — Set Up / Switch Direct Deposit success: celebration wash +
|
|
10
|
-
* confetti, solid success pill with a check_circle glyph ("Direct Deposit Complete").
|
|
11
|
-
* - `MissingInterestRate` — pending rate: blue gradient slot, primary-tinted pill
|
|
12
|
-
* ("Unknown Interest Rate (APR)%").
|
|
13
|
-
* - `InterestRateAdded` — rate added: green gradient slot, solid success pill
|
|
14
|
-
* ("Interest Rate: 19.99% APR").
|
|
15
|
-
*/
|
|
16
|
-
export declare const directDepositVariant: {
|
|
17
|
-
readonly SetUpDirectDeposit: "set_up_direct_deposit";
|
|
18
|
-
readonly DirectDepositComplete: "direct_deposit_complete";
|
|
19
|
-
readonly MissingInterestRate: "missing_interest_rate";
|
|
20
|
-
readonly InterestRateAdded: "interest_rate_added";
|
|
21
|
-
};
|
|
22
|
-
export type DirectDepositVariant = (typeof directDepositVariant)[keyof typeof directDepositVariant];
|
|
23
|
-
export declare const NEUTRAL_PILL: DirectDepositPillConfig;
|
|
24
|
-
/**
|
|
25
|
-
* Per-variant style props for `DirectDepositCard`, keyed by the backend
|
|
26
|
-
* `instance_slot.variant` (mirrors AccountBlock's `getLayoutConfig`).
|
|
27
|
-
*/
|
|
28
|
-
export declare const getLayoutConfig: (theme: Theme) => Record<DirectDepositVariant, DirectDepositCardStyleProps>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { WARM_LIME_ACCENT_GRADIENT as o } from "../../../components/celebrationGradients.es.js";
|
|
2
|
-
var e = {
|
|
3
|
-
SetUpDirectDeposit: "set_up_direct_deposit",
|
|
4
|
-
DirectDepositComplete: "direct_deposit_complete",
|
|
5
|
-
MissingInterestRate: "missing_interest_rate",
|
|
6
|
-
InterestRateAdded: "interest_rate_added"
|
|
7
|
-
}, i = {
|
|
8
|
-
light: "linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)",
|
|
9
|
-
dark: "linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)"
|
|
10
|
-
}, l = {
|
|
11
|
-
light: "linear-gradient(180deg, #94C9B7 0%, #12875E 100%)",
|
|
12
|
-
dark: "linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)"
|
|
13
|
-
}, n = {
|
|
14
|
-
bgcolor: "grey.200",
|
|
15
|
-
borderColor: "grey.200",
|
|
16
|
-
labelColor: "text.primary"
|
|
17
|
-
}, d = {
|
|
18
|
-
bgcolor: "primary.lighter",
|
|
19
|
-
borderColor: "primary.lighter",
|
|
20
|
-
labelColor: "text.primary"
|
|
21
|
-
}, t = {
|
|
22
|
-
bgcolor: "success.main",
|
|
23
|
-
borderColor: "success.main",
|
|
24
|
-
labelColor: "success.contrastText"
|
|
25
|
-
}, c = (a) => {
|
|
26
|
-
const r = a.palette.mode;
|
|
27
|
-
return {
|
|
28
|
-
[e.SetUpDirectDeposit]: {
|
|
29
|
-
bgcolor: "primary.lighter",
|
|
30
|
-
nameVariant: "body2",
|
|
31
|
-
pill: n
|
|
32
|
-
},
|
|
33
|
-
[e.DirectDepositComplete]: {
|
|
34
|
-
backgroundImage: o,
|
|
35
|
-
bgcolor: "background.paper",
|
|
36
|
-
nameVariant: "body2",
|
|
37
|
-
pill: {
|
|
38
|
-
...t,
|
|
39
|
-
icon: "check_circle"
|
|
40
|
-
},
|
|
41
|
-
showConfetti: !0
|
|
42
|
-
},
|
|
43
|
-
[e.MissingInterestRate]: {
|
|
44
|
-
backgroundImage: i[r],
|
|
45
|
-
bgcolor: "background.paper",
|
|
46
|
-
nameVariant: "body1",
|
|
47
|
-
pill: d
|
|
48
|
-
},
|
|
49
|
-
[e.InterestRateAdded]: {
|
|
50
|
-
backgroundImage: l[r],
|
|
51
|
-
bgcolor: "background.paper",
|
|
52
|
-
nameVariant: "body1",
|
|
53
|
-
pill: t
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
n as NEUTRAL_PILL,
|
|
59
|
-
e as directDepositVariant,
|
|
60
|
-
c as getLayoutConfig
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport { WARM_LIME_ACCENT_GRADIENT } from '../../../components/celebrationGradients'\nimport type {\n DirectDepositCardStyleProps,\n DirectDepositPillConfig,\n} from '../../../components/DirectDepositCard'\n\n/**\n * Design branches of the Direct Deposit component block (Figma: \"Direct\n * Deposit\" — Detailed Primary / Detailed Success / Deposit Completed):\n *\n * - `SetUpDirectDeposit` — pending setup: flat `primary.lighter` slot, neutral pill\n * (\"Direct Deposit Not Set Up\").\n * - `DirectDepositComplete` — Set Up / Switch Direct Deposit success: celebration wash +\n * confetti, solid success pill with a check_circle glyph (\"Direct Deposit Complete\").\n * - `MissingInterestRate` — pending rate: blue gradient slot, primary-tinted pill\n * (\"Unknown Interest Rate (APR)%\").\n * - `InterestRateAdded` — rate added: green gradient slot, solid success pill\n * (\"Interest Rate: 19.99% APR\").\n */\nexport const directDepositVariant = {\n SetUpDirectDeposit: 'set_up_direct_deposit',\n DirectDepositComplete: 'direct_deposit_complete',\n MissingInterestRate: 'missing_interest_rate',\n InterestRateAdded: 'interest_rate_added',\n} as const\n\nexport type DirectDepositVariant = (typeof directDepositVariant)[keyof typeof directDepositVariant]\n\n// Figma slot gradients (opaque, vertical). Light/dark pairs are taken from the\n// light and dark pages of the Missing Interest Rates frame — they are bespoke\n// blends with no theme token, so they stay literal hexes keyed by palette mode.\nconst MISSING_RATE_GRADIENTS = {\n light: 'linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)',\n dark: 'linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)',\n} as const\n\nconst RATE_ADDED_GRADIENTS = {\n light: 'linear-gradient(180deg, #94C9B7 0%, #12875E 100%)',\n dark: 'linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)',\n} as const\n\n// Figma light-mode references: neutral pill #ececec, primary-tinted pill\n// #dfe8fd (`primary.lighter`), solid success pill #12875e (`success.main`).\nexport const NEUTRAL_PILL: DirectDepositPillConfig = {\n bgcolor: 'grey.200',\n borderColor: 'grey.200',\n labelColor: 'text.primary',\n}\n\nconst PRIMARY_TINT_PILL: DirectDepositPillConfig = {\n bgcolor: 'primary.lighter',\n borderColor: 'primary.lighter',\n labelColor: 'text.primary',\n}\n\nconst SUCCESS_PILL: DirectDepositPillConfig = {\n bgcolor: 'success.main',\n borderColor: 'success.main',\n labelColor: 'success.contrastText',\n}\n\n/**\n * Per-variant style props for `DirectDepositCard`, keyed by the backend\n * `instance_slot.variant` (mirrors AccountBlock's `getLayoutConfig`).\n */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<DirectDepositVariant, DirectDepositCardStyleProps> => {\n const mode = theme.palette.mode\n\n return {\n [directDepositVariant.SetUpDirectDeposit]: {\n bgcolor: 'primary.lighter',\n nameVariant: 'body2',\n pill: NEUTRAL_PILL,\n },\n [directDepositVariant.DirectDepositComplete]: {\n backgroundImage: WARM_LIME_ACCENT_GRADIENT,\n bgcolor: 'background.paper',\n nameVariant: 'body2',\n // Figma 1941:192796: 16px check_circle inside the complete pill.\n pill: { ...SUCCESS_PILL, icon: 'check_circle' },\n showConfetti: true,\n },\n [directDepositVariant.MissingInterestRate]: {\n backgroundImage: MISSING_RATE_GRADIENTS[mode],\n bgcolor: 'background.paper',\n nameVariant: 'body1',\n pill: PRIMARY_TINT_PILL,\n },\n [directDepositVariant.InterestRateAdded]: {\n backgroundImage: RATE_ADDED_GRADIENTS[mode],\n bgcolor: 'background.paper',\n nameVariant: 'body1',\n pill: SUCCESS_PILL,\n },\n }\n}\n"],"mappings":";AAqBA,IAAa,IAAuB;AAAA,EAClC,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,EACrB,mBAAmB;AACrB,GAOM,IAAyB;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AACR,GAEM,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,MAAM;AACR,GAIa,IAAwC;AAAA,EACnD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEM,IAA6C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEM,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAMa,IAAA,CACX,MAC8D;AAC9D,QAAM,IAAO,EAAM,QAAQ;AAE3B,SAAO;AAAA,IACJ,CAAA,EAAqB,kBAAA,GAAqB;AAAA,MACzC,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACC,CAAA,EAAqB,qBAAA,GAAwB;AAAA,MAC5C,iBAAiB;AAAA,MACjB,SAAS;AAAA,MACT,aAAa;AAAA,MAEb,MAAM;AAAA,QAAE,GAAG;AAAA,QAAc,MAAM;AAAA,MAAe;AAAA,MAC9C,cAAc;AAAA,IAChB;AAAA,IACC,CAAA,EAAqB,mBAAA,GAAsB;AAAA,MAC1C,iBAAiB,EAAuB,CAAA;AAAA,MACxC,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACC,CAAA,EAAqB,iBAAA,GAAoB;AAAA,MACxC,iBAAiB,EAAqB,CAAA;AAAA,MACtC,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,EACF;AACF"}
|