@mx-cartographer/experiences 9.7.78 → 9.7.79
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/GlobalCopyStore.d.ts +6 -0
- package/dist/core/stores/GlobalCopyStore.es.js +14 -8
- package/dist/core/stores/GlobalCopyStore.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +24 -0
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.d.ts +6 -0
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +161 -0
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +86 -61
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +7 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +9 -5
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +5 -5
- package/dist/insights-v2/components/BaseLayout.es.js +106 -105
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/CtaStatus.d.ts +5 -1
- package/dist/insights-v2/components/CtaStatus.es.js +25 -22
- package/dist/insights-v2/components/CtaStatus.es.js.map +1 -1
- package/dist/insights-v2/components/TransactionListCard.d.ts +5 -1
- package/dist/insights-v2/components/TransactionListCard.es.js +61 -45
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaConfig.es.js +35 -14
- package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/subscriptionAnswer.d.ts +9 -1
- package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js +62 -57
- package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/types.d.ts +10 -2
- package/dist/insights-v2/ctaActions/useCtaAction.d.ts +5 -2
- package/dist/insights-v2/ctaActions/useCtaAction.es.js +45 -37
- package/dist/insights-v2/ctaActions/useCtaAction.es.js.map +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +82 -76
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +92 -83
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/dist/microinsights/cards/MicroCtaStatus.d.ts +18 -0
- package/dist/microinsights/cards/MicroCtaStatus.es.js +50 -0
- package/dist/microinsights/cards/MicroCtaStatus.es.js.map +1 -0
- package/dist/microinsights/stores/CopyStore.d.ts +10 -1
- package/dist/microinsights/stores/CopyStore.es.js +20 -11
- package/dist/microinsights/stores/CopyStore.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import { ContactSupportActionBlock as p } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
2
|
-
import { hasDrawerBlock as
|
|
2
|
+
import { hasDrawerBlock as co } from "./hasDrawerBlock.es.js";
|
|
3
3
|
import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
|
|
4
4
|
import { BarchartBlock as _ } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
5
5
|
import { DoubleBarChartBlock as s } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
6
6
|
import C from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
7
7
|
import u from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
8
8
|
import B from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import T from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
10
|
+
import k from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
11
11
|
import A from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
12
|
-
import { BudgetBlock as
|
|
13
|
-
import
|
|
12
|
+
import { BudgetBlock as O } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
13
|
+
import f from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
14
14
|
import N from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
|
|
15
15
|
import d from "../blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js";
|
|
16
16
|
import I from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
|
|
17
17
|
import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import L from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
19
|
+
import g from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
20
20
|
import { TransactionBlock as P } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
21
21
|
import b from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { SVGImageBlock as
|
|
25
|
-
import { FeedbackModalActionBlock as
|
|
22
|
+
import S from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
23
|
+
import D from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
24
|
+
import { SVGImageBlock as h } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
25
|
+
import { FeedbackModalActionBlock as E } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
26
26
|
import { ConnectionDetailActionBlock as K } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
27
27
|
import { ConnectWidgetActionBlock as R } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
28
28
|
import { SurveyModalActionBlock as v } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
29
|
+
import { SubscriptionStatusModalBlock as y } from "../actionBlocks/SubscriptionStatusModalBlock.es.js";
|
|
30
|
+
import { PlaceholderActionBlock as M } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
31
|
+
import { getMakeTransferDrawerTitle as U } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
32
|
+
import { MakeTransferActionBlockLayer as w } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
33
|
+
import { getDrawerHeaderTitle as G } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
34
|
+
import { TransactionDetailsBlock as F } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
34
35
|
import { useTransactionDetailsPrepare as c } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
35
|
-
import { TransactionHistoryBlock as
|
|
36
|
-
import { useTransactionHistoryPrepare as
|
|
37
|
-
import { useRecurringTransactionPrepare as
|
|
38
|
-
import { RecurringTransactionBlock as
|
|
39
|
-
import { getTransactionListDrawerTitle as
|
|
40
|
-
import { TransactionListBlock as
|
|
41
|
-
import { RemainingCashBlock as
|
|
42
|
-
import { AmountInputModalBlock as
|
|
43
|
-
import { OverdraftBlock as
|
|
44
|
-
import { AccountListBlock as
|
|
45
|
-
import { useAccountListPrepare as
|
|
46
|
-
import { EmergencySavingsBlock as
|
|
47
|
-
import { CreditUtilizationBlock as
|
|
48
|
-
import { useCreditUtilizationPrepare as
|
|
49
|
-
import { PayoffCalculatorBlock as
|
|
50
|
-
import { BudgetDetailsBlock as
|
|
51
|
-
import { AccountDetailsBlock as
|
|
52
|
-
import { useAccountDetailsPrepare as
|
|
36
|
+
import { TransactionHistoryBlock as H } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
37
|
+
import { useTransactionHistoryPrepare as Y } from "../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js";
|
|
38
|
+
import { useRecurringTransactionPrepare as m } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
39
|
+
import { RecurringTransactionBlock as x } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
40
|
+
import { getTransactionListDrawerTitle as V } from "../actionBlocks/TransactionListBlock/layout.es.js";
|
|
41
|
+
import { TransactionListBlock as z } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
|
|
42
|
+
import { RemainingCashBlock as W } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
43
|
+
import { AmountInputModalBlock as l } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
44
|
+
import { OverdraftBlock as q, useOverdraftPrepare as Z } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
|
|
45
|
+
import { AccountListBlock as j } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
|
|
46
|
+
import { useAccountListPrepare as J } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
|
|
47
|
+
import { EmergencySavingsBlock as Q } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
|
|
48
|
+
import { CreditUtilizationBlock as X } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
|
|
49
|
+
import { useCreditUtilizationPrepare as $ } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
|
|
50
|
+
import { PayoffCalculatorBlock as oo, usePayoffCalculatorPrepare as to } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
|
|
51
|
+
import { BudgetDetailsBlock as ro } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
|
|
52
|
+
import { AccountDetailsBlock as eo } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
|
|
53
|
+
import { useAccountDetailsPrepare as io } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
|
|
53
54
|
var i = (e) => {
|
|
54
55
|
}, t = (e) => ({
|
|
55
56
|
get Component() {
|
|
@@ -64,35 +65,35 @@ var i = (e) => {
|
|
|
64
65
|
get presentation() {
|
|
65
66
|
return e().presentation;
|
|
66
67
|
}
|
|
67
|
-
}),
|
|
68
|
+
}), nt = {
|
|
68
69
|
[o.PLACEHOLDER_ACTION_BLOCK]: t(() => ({
|
|
69
|
-
Component:
|
|
70
|
+
Component: M,
|
|
70
71
|
usePrepare: i,
|
|
71
72
|
title: () => "Action Block Layer Drilldown"
|
|
72
73
|
})),
|
|
73
74
|
[o.MAKE_TRANSFER_ACTION_BLOCK]: t(() => ({
|
|
74
|
-
Component:
|
|
75
|
+
Component: w,
|
|
75
76
|
usePrepare: i,
|
|
76
|
-
title:
|
|
77
|
+
title: U
|
|
77
78
|
})),
|
|
78
79
|
[o.TRANSCATION_HISTORY_ACTION_BLOCK]: t(() => ({
|
|
79
|
-
Component:
|
|
80
|
-
usePrepare:
|
|
81
|
-
title:
|
|
80
|
+
Component: H,
|
|
81
|
+
usePrepare: Y,
|
|
82
|
+
title: G
|
|
82
83
|
})),
|
|
83
84
|
[o.TRANSACTION_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
84
|
-
Component:
|
|
85
|
+
Component: F,
|
|
85
86
|
usePrepare: c,
|
|
86
87
|
title: () => "Transaction Details"
|
|
87
88
|
})),
|
|
88
89
|
[o.RECURRING_TRANSACTION_ACTION_BLOCK]: t(() => ({
|
|
89
|
-
Component:
|
|
90
|
-
usePrepare:
|
|
90
|
+
Component: x,
|
|
91
|
+
usePrepare: m,
|
|
91
92
|
title: (e, r) => r.recurring?.expense_details ?? ""
|
|
92
93
|
})),
|
|
93
94
|
[o.REMAINING_CASH_ACTION_BLOCK]: t(() => ({
|
|
94
|
-
Component:
|
|
95
|
-
usePrepare:
|
|
95
|
+
Component: W,
|
|
96
|
+
usePrepare: m,
|
|
96
97
|
title: (e, r) => r.insights_feed?.remaining_cash?.title ?? ""
|
|
97
98
|
})),
|
|
98
99
|
[o.CONTACT_SUPPORT_ACTION_BLOCK]: t(() => ({
|
|
@@ -101,7 +102,7 @@ var i = (e) => {
|
|
|
101
102
|
title: (e, r) => r.help?.request_support ?? ""
|
|
102
103
|
})),
|
|
103
104
|
[o.FEEDBACK_MODAL_ACTION_BLOCK]: t(() => ({
|
|
104
|
-
Component:
|
|
105
|
+
Component: E,
|
|
105
106
|
usePrepare: i,
|
|
106
107
|
presentation: "modal"
|
|
107
108
|
})),
|
|
@@ -119,84 +120,89 @@ var i = (e) => {
|
|
|
119
120
|
usePrepare: i,
|
|
120
121
|
presentation: "modal"
|
|
121
122
|
})),
|
|
123
|
+
[o.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: t(() => ({
|
|
124
|
+
Component: y,
|
|
125
|
+
usePrepare: i,
|
|
126
|
+
presentation: "modal"
|
|
127
|
+
})),
|
|
122
128
|
[o.TRANSACTION_LIST_ACTION_BLOCK]: t(() => ({
|
|
123
|
-
Component:
|
|
129
|
+
Component: z,
|
|
124
130
|
usePrepare: c,
|
|
125
|
-
title:
|
|
131
|
+
title: V
|
|
126
132
|
})),
|
|
127
133
|
[o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: t(() => ({
|
|
128
|
-
Component:
|
|
134
|
+
Component: l,
|
|
129
135
|
presentation: "modal",
|
|
130
136
|
usePrepare: i
|
|
131
137
|
})),
|
|
132
138
|
[o.SAFETY_NET_ACTION_BLOCK]: t(() => ({
|
|
133
|
-
Component:
|
|
139
|
+
Component: l,
|
|
134
140
|
presentation: "modal",
|
|
135
141
|
usePrepare: i
|
|
136
142
|
})),
|
|
137
143
|
[o.OVERDRAFT_ACTION_BLOCK]: t(() => ({
|
|
138
|
-
Component:
|
|
139
|
-
usePrepare:
|
|
144
|
+
Component: q,
|
|
145
|
+
usePrepare: Z,
|
|
140
146
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
141
147
|
})),
|
|
142
148
|
[o.CREDIT_UTILIZATION_ACTION_BLOCK]: t(() => ({
|
|
143
|
-
Component:
|
|
144
|
-
usePrepare:
|
|
149
|
+
Component: X,
|
|
150
|
+
usePrepare: $,
|
|
145
151
|
title: (e, r) => r.insights_feed?.credit_utilization?.title ?? ""
|
|
146
152
|
})),
|
|
147
153
|
[o.EMERGENCY_SAVINGS_ACTION_BLOCK]: t(() => ({
|
|
148
|
-
Component:
|
|
154
|
+
Component: Q,
|
|
149
155
|
usePrepare: i,
|
|
150
156
|
title: (e, r, a) => a?.insights_payload?.title ?? ""
|
|
151
157
|
})),
|
|
152
158
|
[o.PAYOFF_CALCULATOR_ACTION_BLOCK]: t(() => ({
|
|
153
|
-
Component:
|
|
154
|
-
usePrepare:
|
|
159
|
+
Component: oo,
|
|
160
|
+
usePrepare: to,
|
|
155
161
|
title: (e, r) => r.insights_feed?.payoff_calculator?.title ?? ""
|
|
156
162
|
})),
|
|
157
163
|
[o.BUDGET_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
158
|
-
Component:
|
|
164
|
+
Component: ro,
|
|
159
165
|
usePrepare: i,
|
|
160
166
|
title: (e, r, a) => a?.insights_payload?.title || r.budgets?.details_title || ""
|
|
161
167
|
})),
|
|
162
168
|
[o.ACCOUNT_DETAILS_ACTION_BLOCK]: t(() => ({
|
|
163
|
-
Component:
|
|
164
|
-
usePrepare:
|
|
169
|
+
Component: eo,
|
|
170
|
+
usePrepare: io,
|
|
165
171
|
title: (e, r) => r.accounts?.account_details ?? ""
|
|
166
172
|
})),
|
|
167
173
|
[o.ACCOUNT_LIST_ACTION_BLOCK]: t(() => ({
|
|
168
|
-
Component:
|
|
169
|
-
usePrepare:
|
|
174
|
+
Component: j,
|
|
175
|
+
usePrepare: J,
|
|
170
176
|
title: (e, r) => r.insights_feed?.account_list?.title ?? ""
|
|
171
177
|
}))
|
|
172
|
-
},
|
|
173
|
-
account_block:
|
|
178
|
+
}, ct = {
|
|
179
|
+
account_block: k,
|
|
174
180
|
account_switch_block: A,
|
|
175
|
-
direct_deposit_block:
|
|
181
|
+
direct_deposit_block: T,
|
|
176
182
|
bar_chart_block: _,
|
|
177
|
-
budget_block:
|
|
178
|
-
debts_block:
|
|
183
|
+
budget_block: O,
|
|
184
|
+
debts_block: f,
|
|
179
185
|
donut_chart_block: u,
|
|
180
186
|
double_bar_chart_block: s,
|
|
181
187
|
double_progress_bar_block: B,
|
|
182
188
|
goals_block: N,
|
|
183
|
-
image_block:
|
|
189
|
+
image_block: D,
|
|
184
190
|
merchant_block: d,
|
|
185
191
|
no_spend_days_block: I,
|
|
186
192
|
repeating_transaction_block: n,
|
|
187
|
-
save_extra_block:
|
|
188
|
-
savings_amount_block:
|
|
193
|
+
save_extra_block: L,
|
|
194
|
+
savings_amount_block: g,
|
|
189
195
|
step_chart_block: C,
|
|
190
|
-
svg_image_block:
|
|
196
|
+
svg_image_block: h,
|
|
191
197
|
upcoming_bill_block: n,
|
|
192
198
|
upcoming_subscription_block: b,
|
|
193
|
-
withdrawal_block:
|
|
199
|
+
withdrawal_block: S,
|
|
194
200
|
transaction_block: P
|
|
195
201
|
};
|
|
196
202
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
nt as actionBlocks,
|
|
204
|
+
ct as blocks,
|
|
205
|
+
co as hasDrawerBlock
|
|
200
206
|
};
|
|
201
207
|
|
|
202
208
|
//# sourceMappingURL=blocks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\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: useTransactionHistoryPrepare,\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: getTransactionListDrawerTitle,\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 // Savings Opportunity's safety-net reminder (secondary CTA). ditto names a dedicated\n // `safety_net_block` with no CTA variant, so it opens the same amount-input modal, which reads the\n // safety_net variant from the block name (see resolveAmountInputVariant).\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n usePrepare: noop,\n title: (_variant, copy, beat) =>\n beat?.insights_payload?.title || copy.budgets?.details_title || '',\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,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,WAA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","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n MerchantBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { SubscriptionStatusModalBlock } from '../actionBlocks/SubscriptionStatusModalBlock'\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 { useTransactionHistoryPrepare } from '../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { getTransactionListDrawerTitle } from '../actionBlocks/TransactionListBlock/layout'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\nimport { OverdraftBlock, useOverdraftPrepare } from '../actionBlocks/OverdraftBlock'\nimport { AccountListBlock, useAccountListPrepare } from '../actionBlocks/AccountListBlock'\nimport { EmergencySavingsBlock } from '../actionBlocks/EmergencySavingsBlock'\nimport {\n CreditUtilizationBlock,\n useCreditUtilizationPrepare,\n} from '../actionBlocks/CreditUtilizationBlock'\nimport {\n PayoffCalculatorBlock,\n usePayoffCalculatorPrepare,\n} from '../actionBlocks/PayoffCalculatorBlock'\nimport { BudgetDetailsBlock } from '../actionBlocks/BudgetDetailsBlock'\nimport { AccountDetailsBlock, useAccountDetailsPrepare } from '../actionBlocks/AccountDetailsBlock'\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: useTransactionHistoryPrepare,\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 // Unexpected Subscription Payment's Subscription Status modal.\n [actionBlocksKey.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SubscriptionStatusModalBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: getTransactionListDrawerTitle,\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 // Savings Opportunity's safety-net reminder (secondary CTA). ditto names a dedicated\n // `safety_net_block` with no CTA variant, so it opens the same amount-input modal, which reads the\n // safety_net variant from the block name (see resolveAmountInputVariant).\n [actionBlocksKey.SAFETY_NET_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n usePrepare: noop,\n })),\n // Transparent Overdraft's \"Learn more\": the projected overdraft, its account and the confidence\n // meter. Titled from the beat, as the pulse drawer was.\n [actionBlocksKey.OVERDRAFT_ACTION_BLOCK]: liveEntry(() => ({\n Component: OverdraftBlock,\n usePrepare: useOverdraftPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Credit Utilization's \"Learn more\": donut summary, legend and the per-card list. Loads accounts\n // for the institution logos; the rows themselves ride on the beat.\n [actionBlocksKey.CREDIT_UTILIZATION_ACTION_BLOCK]: liveEntry(() => ({\n Component: CreditUtilizationBlock,\n usePrepare: useCreditUtilizationPrepare,\n title: (_variant, copy) => copy.insights_feed?.credit_utilization?.title ?? '',\n })),\n [actionBlocksKey.EMERGENCY_SAVINGS_ACTION_BLOCK]: liveEntry(() => ({\n Component: EmergencySavingsBlock,\n usePrepare: noop,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // Monthly Credit Card Interest Summary's \"Learn how to save\": the credit card payoff calculator.\n [actionBlocksKey.PAYOFF_CALCULATOR_ACTION_BLOCK]: liveEntry(() => ({\n Component: PayoffCalculatorBlock,\n usePrepare: usePayoffCalculatorPrepare,\n title: (_variant, copy) => copy.insights_feed?.payoff_calculator?.title ?? '',\n })),\n [actionBlocksKey.BUDGET_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: BudgetDetailsBlock,\n usePrepare: noop,\n title: (_variant, copy, beat) =>\n beat?.insights_payload?.title || copy.budgets?.details_title || '',\n })),\n // The accounts widget's account details (header, trend chart, tabs, connection, actions) for the\n // beat's primary account. Shared by every beat that opens an account.\n [actionBlocksKey.ACCOUNT_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountDetailsBlock,\n usePrepare: useAccountDetailsPrepare,\n title: (_variant, copy) => copy.accounts?.account_details ?? '',\n })),\n // Monthly Obligations Status's account list: the beat's calculation and the accounts behind it.\n [actionBlocksKey.ACCOUNT_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: AccountListBlock,\n usePrepare: useAccountListPrepare,\n title: (_variant, copy) => copy.insights_feed?.account_list?.title ?? '',\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n merchant_block: MerchantBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_amount_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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GA0BjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA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EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { GlobalDataContext as
|
|
2
|
-
import { slot as
|
|
3
|
-
import { resolveInsightRender as
|
|
4
|
-
import { hasDrawerBlock as
|
|
5
|
-
import
|
|
6
|
-
import { statusIconName as
|
|
7
|
-
import { ON_CLICK_EVENT as
|
|
8
|
-
import
|
|
9
|
-
import { BeatIcon as
|
|
10
|
-
import { useCopyStore as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { GlobalDataContext as $ } from "../../common/context/GlobalDataProvider.es.js";
|
|
2
|
+
import { slot as f } from "../../core/types/Insights.es.js";
|
|
3
|
+
import { resolveInsightRender as z } from "../../insights-v2/resolveInsightRender.es.js";
|
|
4
|
+
import { hasDrawerBlock as H } from "../../insights-v2/mappings/hasDrawerBlock.es.js";
|
|
5
|
+
import K from "../../insights-v2/components/LogoFromGuid.es.js";
|
|
6
|
+
import { statusIconName as Z, statusIconPalette as J } from "../../insights-v2/components/statusIcon.es.js";
|
|
7
|
+
import { ON_CLICK_EVENT as v, ON_VIEW_EVENT as Q, ON_VIEW_FIRST_TIME_EVENT as U } from "../constants/Analytics.es.js";
|
|
8
|
+
import w from "../beaticons/BeatMaterialIcon.es.js";
|
|
9
|
+
import { BeatIcon as X } from "../beaticons/BeatIcon.es.js";
|
|
10
|
+
import { useCopyStore as Y, useEvent as b, useInsightsMicroWidgetStore as ii } from "../context/hooks.es.js";
|
|
11
|
+
import F from "../MicroCardTemplate.es.js";
|
|
12
|
+
import ti from "./InlineActionBlock.es.js";
|
|
13
|
+
import { MicroCtaStatusGate as ei } from "./MicroCtaStatus.es.js";
|
|
14
|
+
import oi from "../../insights-v2/components/InsightErrorCard.es.js";
|
|
15
|
+
import ri, { useEffect as O, useState as ni } from "react";
|
|
16
|
+
import { Fragment as li, jsx as e, jsxs as si } from "react/jsx-runtime";
|
|
17
|
+
import { alpha as P, useTheme as ai } from "@mui/material/styles";
|
|
18
|
+
import ci from "@mui/material/Box";
|
|
19
|
+
import { useInView as mi } from "react-intersection-observer";
|
|
20
|
+
var pi = 32, vi = ({ ariaLabel: d, beat: i, elevation: h, inDescriptionCtaBehavior: W = "external", index: l, isActiveCard: _, onCardClick: s, posthog: r, widthOverrides: a, variant: I, showIcon: y, heightOverrides: u }) => {
|
|
21
|
+
const { ref: g, inView: c } = mi({ threshold: 1 }), C = ai(), { cardsCopy: G } = Y(), { onEvent: m } = b(), { updateBeat: q, updateOffer: A } = ii();
|
|
22
|
+
O(() => {
|
|
23
|
+
c && (i.has_been_displayed ? m(Q(i.template)) : (i.guid.startsWith("OFR") ? A({
|
|
23
24
|
...i,
|
|
24
25
|
has_been_displayed: !0
|
|
25
|
-
}) :
|
|
26
|
+
}) : q({
|
|
26
27
|
...i,
|
|
27
28
|
has_been_displayed: !0
|
|
28
|
-
}),
|
|
29
|
-
}, [
|
|
30
|
-
if (
|
|
29
|
+
}), m(U(i.template))));
|
|
30
|
+
}, [c]), O(() => {
|
|
31
|
+
if (c && i) if (i.template === "MarketingOffer") {
|
|
31
32
|
const t = i;
|
|
32
33
|
r?.capture("viewed_messaging_insight", {
|
|
33
34
|
template: i.template,
|
|
@@ -44,10 +45,10 @@ var si = 32, Ti = ({ ariaLabel: m, beat: i, elevation: u, inDescriptionCtaBehavi
|
|
|
44
45
|
}, [
|
|
45
46
|
i,
|
|
46
47
|
l,
|
|
47
|
-
|
|
48
|
+
c
|
|
48
49
|
]);
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
50
|
+
const E = z(i), o = E === "v2" ? i.insights_payload : void 0, D = ri.useContext($) !== null, k = W === "internal" && D && H(o?.in_description_cta?.block), [x, j] = ni(0), p = () => {
|
|
51
|
+
if (k ? j((t) => t + 1) : s && s(i), m(v(i.template)), i.template === "MarketingOffer") {
|
|
51
52
|
const t = i;
|
|
52
53
|
r?.capture("clicked_messaging_insight", {
|
|
53
54
|
template: i.template,
|
|
@@ -62,71 +63,79 @@ var si = 32, Ti = ({ ariaLabel: m, beat: i, elevation: u, inDescriptionCtaBehavi
|
|
|
62
63
|
position: l
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
|
-
|
|
66
|
-
"aria-hidden": !
|
|
67
|
-
"aria-label":
|
|
66
|
+
return E === "error" ? /* @__PURE__ */ e(ci, {
|
|
67
|
+
"aria-hidden": !_,
|
|
68
|
+
"aria-label": d,
|
|
68
69
|
"aria-roledescription": "slide",
|
|
69
|
-
ref:
|
|
70
|
+
ref: g,
|
|
70
71
|
role: "group",
|
|
71
72
|
sx: {
|
|
72
|
-
height:
|
|
73
|
-
minWidth:
|
|
73
|
+
height: u ? "100%" : 120,
|
|
74
|
+
minWidth: a ? `${a}px` : "100%",
|
|
74
75
|
my: 1
|
|
75
76
|
},
|
|
76
|
-
children: /* @__PURE__ */ e(
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
77
|
+
children: /* @__PURE__ */ e(oi, { beat: i })
|
|
78
|
+
}) : o ? /* @__PURE__ */ e(ei, {
|
|
79
|
+
beat: i,
|
|
80
|
+
posthog: r,
|
|
81
|
+
children: ({ presentation: n }) => {
|
|
82
|
+
const N = n?.kind === "status" ? n : void 0, T = f(o.instance_slot.data, "logo"), B = f(o.instance_slot.data, N && f(o.instance_slot.data, "reviewed_icon") ? "reviewed_icon" : "icon"), R = Z(B?.guid), M = J(B?.color), L = n ? N?.action?.label : o.primary_cta?.label || o.in_description_cta?.label || void 0, V = () => {
|
|
83
|
+
s && s(i), m(v(i.template)), r?.capture("clicked_insight", {
|
|
84
|
+
beat_guid: i.guid,
|
|
85
|
+
template: i.template,
|
|
86
|
+
position: l
|
|
87
|
+
});
|
|
88
|
+
}, S = /* @__PURE__ */ e(F, {
|
|
89
|
+
"aria-roledescription": "slide",
|
|
90
|
+
ariaLabel: d,
|
|
91
|
+
description: o.description.html_text,
|
|
92
|
+
elevation: h,
|
|
93
|
+
heightOverrides: u,
|
|
94
|
+
icon: y && (T ? /* @__PURE__ */ e(K, {
|
|
95
|
+
logo: T,
|
|
96
|
+
size: pi
|
|
97
|
+
}) : R ? /* @__PURE__ */ e(w, {
|
|
98
|
+
bgColor: P(C.palette[M].main, 0.15),
|
|
99
|
+
iconColor: M,
|
|
100
|
+
name: R
|
|
101
|
+
}) : /* @__PURE__ */ e(w, {
|
|
102
|
+
bgColor: P(C.palette.primary.main, 0.15),
|
|
103
|
+
name: "lightbulb"
|
|
104
|
+
})),
|
|
105
|
+
isActiveCard: _,
|
|
106
|
+
onCardClick: n ? V : p,
|
|
107
|
+
onPrimaryAction: n ? V : p,
|
|
108
|
+
primaryActionText: L,
|
|
109
|
+
ref: g,
|
|
110
|
+
title: n?.title || o.title || "",
|
|
111
|
+
variant: I,
|
|
112
|
+
widthOverrides: a
|
|
113
|
+
});
|
|
114
|
+
return k ? /* @__PURE__ */ si(li, { children: [S, x > 0 && /* @__PURE__ */ e(ti, {
|
|
115
|
+
beat: i,
|
|
116
|
+
openRequest: x,
|
|
117
|
+
posthog: r
|
|
118
|
+
})] }) : S;
|
|
119
|
+
}
|
|
120
|
+
}) : /* @__PURE__ */ e(F, {
|
|
112
121
|
"aria-roledescription": "slide",
|
|
113
|
-
ariaLabel:
|
|
122
|
+
ariaLabel: d,
|
|
114
123
|
description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description || "",
|
|
115
|
-
elevation:
|
|
116
|
-
heightOverrides:
|
|
117
|
-
icon:
|
|
118
|
-
isActiveCard:
|
|
119
|
-
onCardClick:
|
|
120
|
-
onPrimaryAction:
|
|
121
|
-
primaryActionText: i.micro_call_to_action ||
|
|
122
|
-
ref:
|
|
124
|
+
elevation: h,
|
|
125
|
+
heightOverrides: u,
|
|
126
|
+
icon: y && /* @__PURE__ */ e(X, { beat: i }),
|
|
127
|
+
isActiveCard: _,
|
|
128
|
+
onCardClick: p,
|
|
129
|
+
onPrimaryAction: p,
|
|
130
|
+
primaryActionText: i.micro_call_to_action || G?.micro_card_cta,
|
|
131
|
+
ref: g,
|
|
123
132
|
title: i.micro_title && i.micro_title.length > 0 ? i.micro_title : i.title,
|
|
124
|
-
variant:
|
|
125
|
-
widthOverrides:
|
|
133
|
+
variant: I,
|
|
134
|
+
widthOverrides: a
|
|
126
135
|
});
|
|
127
136
|
};
|
|
128
137
|
export {
|
|
129
|
-
|
|
138
|
+
vi as InsightCard
|
|
130
139
|
};
|
|
131
140
|
|
|
132
141
|
//# sourceMappingURL=InsightCard.es.js.map
|