@mx-cartographer/experiences 9.5.4 → 9.6.0-alpha-ram1-connect-widget-testing
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 +6 -0
- package/dist/common/components/ConnectDrawer.es.js +17 -44
- package/dist/common/components/ConnectDrawer.es.js.map +1 -1
- package/dist/common/components/ConnectWidgetPanel.d.ts +8 -0
- package/dist/common/components/ConnectWidgetPanel.es.js +44 -0
- package/dist/common/components/ConnectWidgetPanel.es.js.map +1 -0
- package/dist/common/components/dialog/Dialog.d.ts +2 -0
- package/dist/common/components/dialog/Dialog.es.js +30 -30
- package/dist/common/components/dialog/Dialog.es.js.map +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +67 -65
- package/dist/core/index.es.js +111 -109
- package/dist/core/types/Insights.d.ts +33 -16
- package/dist/core/types/Insights.es.js +6 -0
- package/dist/core/types/Insights.es.js.map +1 -0
- package/dist/core/types/index.d.ts +2 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +87 -0
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +19 -19
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.d.ts +21 -0
- package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js +16 -0
- package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.d.ts +12 -0
- package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js +25 -0
- package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.d.ts +17 -0
- package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js +39 -0
- package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.d.ts +16 -0
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js +47 -0
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js.map +1 -0
- package/dist/insights-v2/beatActions.d.ts +2 -2
- package/dist/insights-v2/beatActions.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +5 -2
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +36 -35
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.d.ts +2 -2
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js +6 -5
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/BaseLayout.es.js +14 -14
- package/dist/insights-v2/components/CompactInsightCard.d.ts +4 -4
- package/dist/insights-v2/components/CompactInsightCard.es.js +50 -46
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/components/ConnectionDetailDrillDown.d.ts +32 -0
- package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js +148 -0
- package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js.map +1 -0
- package/dist/insights-v2/components/FeedbackDialog.d.ts +3 -1
- package/dist/insights-v2/components/FeedbackDialog.es.js +80 -72
- package/dist/insights-v2/components/FeedbackDialog.es.js.map +1 -1
- package/dist/insights-v2/components/FeedbackModal.d.ts +60 -0
- package/dist/insights-v2/components/FeedbackModal.es.js +61 -0
- package/dist/insights-v2/components/FeedbackModal.es.js.map +1 -0
- package/dist/insights-v2/components/SurveyModal.d.ts +65 -0
- package/dist/insights-v2/components/SurveyModal.es.js +138 -0
- package/dist/insights-v2/components/SurveyModal.es.js.map +1 -0
- package/dist/insights-v2/components/shared/StatusSnackbar.d.ts +28 -0
- package/dist/insights-v2/components/shared/StatusSnackbar.es.js +19 -0
- package/dist/insights-v2/components/shared/StatusSnackbar.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +4 -0
- package/dist/insights-v2/index.es.js +72 -64
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +4 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +4 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +79 -56
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/insights-v2/resolveInsightRender.d.ts +8 -5
- package/dist/insights-v2/resolveInsightRender.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +32 -31
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,18 +3,18 @@ import { resolveInsightRender as m } from "./resolveInsightRender.es.js";
|
|
|
3
3
|
import { useBeatActions as a } from "./beatActions.es.js";
|
|
4
4
|
import f from "./components/BadgedTile.es.js";
|
|
5
5
|
import { OverflowMenu as n } from "./components/OverflowMenu.es.js";
|
|
6
|
-
import { InsightOptionsMenu as
|
|
6
|
+
import { InsightOptionsMenu as s } from "./components/InsightOptionsMenu.es.js";
|
|
7
7
|
import d, { isLogoGuid as C } from "./components/LogoFromGuid.es.js";
|
|
8
8
|
import B from "./components/StatusBadge.es.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { BAR_CHART_VARIANTS as A, barChartVariant as
|
|
12
|
-
import { BarchartBlock as
|
|
13
|
-
import { DoubleBarChartBlock as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
9
|
+
import k from "./components/CompactInsightCard.es.js";
|
|
10
|
+
import h from "./components/InsightErrorCard.es.js";
|
|
11
|
+
import { BAR_CHART_VARIANTS as A, barChartVariant as b, buildChartData as T, buildDataSeries as I } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
12
|
+
import { BarchartBlock as v } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
13
|
+
import { DoubleBarChartBlock as w } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
14
|
+
import O from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
15
|
+
import P from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
16
|
+
import y from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
17
|
+
import V from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
18
18
|
import G from "./components/TransferLogoCard.es.js";
|
|
19
19
|
import N from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
20
20
|
import U from "./components/AccountHeroCard.es.js";
|
|
@@ -27,84 +27,92 @@ import or from "./components/InsightTransactionRow.es.js";
|
|
|
27
27
|
import mr from "./components/TransactionListCard.es.js";
|
|
28
28
|
import { TransactionBlock as ar, TransactionBlockVariant as pr } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
29
29
|
import er from "./components/WithdrawalCard.es.js";
|
|
30
|
-
import
|
|
30
|
+
import cr from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
31
31
|
import { SVGImageBlock as lr } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
32
|
-
import Cr from "./components/
|
|
33
|
-
import Br from "./components/
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import
|
|
44
|
-
import Gr from "./components/
|
|
45
|
-
import Nr from "./components/
|
|
46
|
-
import Ur from "./components/
|
|
47
|
-
import qr from "./components/
|
|
48
|
-
import Jr from "./components/
|
|
49
|
-
import Qr from "./components/
|
|
50
|
-
import Yr from "./components/
|
|
51
|
-
import $r from "./components/
|
|
32
|
+
import Cr from "./components/ConnectionDetailDrillDown.es.js";
|
|
33
|
+
import Br from "./components/AmountPill.es.js";
|
|
34
|
+
import kr from "./components/DesignateEmergencySavingsCard.es.js";
|
|
35
|
+
import hr from "./components/shared/StatusSnackbar.es.js";
|
|
36
|
+
import Ar from "./components/FeedbackDialog.es.js";
|
|
37
|
+
import Tr from "./components/FeedbackModal.es.js";
|
|
38
|
+
import Lr from "./components/SurveyModal.es.js";
|
|
39
|
+
import { ErrorCard as Hr } from "./components/ErrorCard.es.js";
|
|
40
|
+
import { HOST_ACTIONS as Mr } from "./ctaActions/hostActions.es.js";
|
|
41
|
+
import { useBeatCtaActions as Er, useCtaHandler as Pr } from "./ctaActions/useCtaAction.es.js";
|
|
42
|
+
import { FeedbackBar as yr } from "./components/FeedbackBar.es.js";
|
|
43
|
+
import { DismissInsightDialog as Vr } from "./components/DismissInsightDialog.es.js";
|
|
44
|
+
import { HiddenConfirmationCard as Gr } from "./components/HiddenConfirmationCard.es.js";
|
|
45
|
+
import { LoadingCard as Nr } from "./components/LoadingCard.es.js";
|
|
46
|
+
import { ObsolesceBanner as Ur } from "./components/ObsolesceBanner.es.js";
|
|
47
|
+
import qr from "./components/BaseLayout.es.js";
|
|
48
|
+
import Jr from "./components/StatusMessageCard.es.js";
|
|
49
|
+
import Qr from "./components/LogoTile.es.js";
|
|
50
|
+
import Yr from "./components/LogoClusterCard.es.js";
|
|
51
|
+
import $r from "./components/MerchantHighlightCard.es.js";
|
|
52
|
+
import oo from "./components/P2PLogoStack.es.js";
|
|
53
|
+
import mo from "./components/SavingsOpportunityCard.es.js";
|
|
54
|
+
import ao from "./components/SubscriptionHeroCard.es.js";
|
|
55
|
+
import fo from "./components/UpcomingBillCard.es.js";
|
|
52
56
|
export {
|
|
53
|
-
|
|
57
|
+
V as AccountBlock,
|
|
54
58
|
U as AccountHeroCard,
|
|
55
59
|
N as AccountSwitchBlock,
|
|
56
|
-
|
|
60
|
+
Br as AmountPill,
|
|
57
61
|
A as BAR_CHART_VARIANTS,
|
|
58
62
|
f as BadgedTile,
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
v as BarchartBlock,
|
|
64
|
+
qr as BaseLayout,
|
|
61
65
|
Q as BudgetBlock,
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
k as CompactInsightCard,
|
|
67
|
+
Cr as ConnectionDetailDrillDown,
|
|
68
|
+
kr as DesignateEmergencySavingsCard,
|
|
64
69
|
J as DirectDepositBlock,
|
|
65
70
|
q as DirectDepositCard,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
Vr as DismissInsightDialog,
|
|
72
|
+
P as DonutChartBlock,
|
|
73
|
+
w as DoubleBarChartBlock,
|
|
74
|
+
y as DoubleProgressBarBlock,
|
|
75
|
+
Hr as ErrorCard,
|
|
76
|
+
yr as FeedbackBar,
|
|
77
|
+
Ar as FeedbackDialog,
|
|
78
|
+
Tr as FeedbackModal,
|
|
79
|
+
Mr as HOST_ACTIONS,
|
|
80
|
+
Gr as HiddenConfirmationCard,
|
|
81
|
+
h as InsightErrorCard,
|
|
82
|
+
s as InsightOptionsMenu,
|
|
77
83
|
or as InsightTransactionRow,
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
Nr as LoadingCard,
|
|
85
|
+
Yr as LogoClusterCard,
|
|
80
86
|
d as LogoFromGuid,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
Qr as LogoTile,
|
|
88
|
+
$r as MerchantHighlightCard,
|
|
89
|
+
Ur as ObsolesceBanner,
|
|
84
90
|
n as OverflowMenu,
|
|
85
|
-
|
|
91
|
+
oo as P2PLogoStack,
|
|
86
92
|
lr as SVGImageBlock,
|
|
87
93
|
Y as SaveAnExtraCard,
|
|
88
94
|
$ as SaveExtraBlock,
|
|
89
|
-
|
|
95
|
+
mo as SavingsOpportunityCard,
|
|
90
96
|
B as StatusBadge,
|
|
91
|
-
|
|
97
|
+
Jr as StatusMessageCard,
|
|
92
98
|
o as StatusPill,
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
hr as StatusSnackbar,
|
|
100
|
+
O as StepChartBlock,
|
|
101
|
+
ao as SubscriptionHeroCard,
|
|
102
|
+
Lr as SurveyModal,
|
|
95
103
|
ar as TransactionBlock,
|
|
96
104
|
pr as TransactionBlockVariant,
|
|
97
105
|
mr as TransactionListCard,
|
|
98
106
|
G as TransferLogoCard,
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
fo as UpcomingBillCard,
|
|
108
|
+
cr as WithdrawalBlock,
|
|
101
109
|
er as WithdrawalCard,
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
b as barChartVariant,
|
|
111
|
+
T as buildChartData,
|
|
104
112
|
I as buildDataSeries,
|
|
105
113
|
C as isLogoGuid,
|
|
106
114
|
m as resolveInsightRender,
|
|
107
115
|
a as useBeatActions,
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
Er as useBeatCtaActions,
|
|
117
|
+
Pr as useCtaHandler
|
|
110
118
|
};
|
|
@@ -4,6 +4,10 @@ export declare const actionBlocksKey: {
|
|
|
4
4
|
TRANSCATION_HISTORY_ACTION_BLOCK: string;
|
|
5
5
|
TRANSACTION_DETAILS_ACTION_BLOCK: string;
|
|
6
6
|
CONTACT_SUPPORT_ACTION_BLOCK: string;
|
|
7
|
+
FEEDBACK_MODAL_ACTION_BLOCK: string;
|
|
8
|
+
CONNECTION_DETAIL_ACTION_BLOCK: string;
|
|
9
|
+
CONNECT_WIDGET_ACTION_BLOCK: string;
|
|
10
|
+
SURVEY_MODAL_ACTION_BLOCK: string;
|
|
7
11
|
RECURRING_TRANSACTION_ACTION_BLOCK: string;
|
|
8
12
|
TRANSACTION_LIST_ACTION_BLOCK: string;
|
|
9
13
|
REMAINING_CASH_ACTION_BLOCK: string;
|
|
@@ -4,6 +4,10 @@ var _ = {
|
|
|
4
4
|
TRANSCATION_HISTORY_ACTION_BLOCK: "transaction_history_block",
|
|
5
5
|
TRANSACTION_DETAILS_ACTION_BLOCK: "transaction_details_block",
|
|
6
6
|
CONTACT_SUPPORT_ACTION_BLOCK: "contact_support_block",
|
|
7
|
+
FEEDBACK_MODAL_ACTION_BLOCK: "feedback_modal_block",
|
|
8
|
+
CONNECTION_DETAIL_ACTION_BLOCK: "connection_detail_block",
|
|
9
|
+
CONNECT_WIDGET_ACTION_BLOCK: "connect_widget_block",
|
|
10
|
+
SURVEY_MODAL_ACTION_BLOCK: "survey_modal_block",
|
|
7
11
|
RECURRING_TRANSACTION_ACTION_BLOCK: "recurring_transaction_block",
|
|
8
12
|
TRANSACTION_LIST_ACTION_BLOCK: "transaction_list_block",
|
|
9
13
|
REMAINING_CASH_ACTION_BLOCK: "remaining_cash_block",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`). `make_transfer` is a legacy\n// name that stays as an alias until the last legacy payload is gone.\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'PlaceholderActionBlock',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n}\n"],"mappings":"AAiBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AACnC"}
|
|
1
|
+
{"version":3,"file":"actionBlocksKey.es.js","names":[],"sources":["../../../src/insights-v2/mappings/actionBlocksKey.ts"],"sourcesContent":["// Keys for the drawer drilldown registry in `blocks.ts`, extracted into their own module.\n//\n// Why: chart blocks (e.g. BarchartBlock, DoubleBarChartBlock) need\n// `TRANSCATION_HISTORY_ACTION_BLOCK` to tag a chart bar's drilldown context, but they are\n// themselves re-exported through `../blocks` -> `mappings/blocks.ts` imports from that same\n// barrel to build its `blocks` registry. Importing the key straight from `mappings/blocks.ts`\n// closed that loop into a circular import: evaluating `mappings/blocks.ts` pulled in the\n// `blocks` barrel, which (before it got to `ComponentBlocks`/`AccountBlock`) loaded\n// `BarchartBlock`, which imported back into the still-initializing `mappings/blocks.ts` —\n// tripping a \"Cannot access 'AccountBlock' before initialization\" TDZ error in Storybook/Vite.\n//\n// Keeping the keys here (no dependency on `mappings/blocks.ts`) lets chart blocks reference\n// them without re-entering that module.\n//\n// Names follow ditto: its registry ends every CTA block in `_block` and the V2 envelope copies those\n// names verbatim (`transaction_details_block`, `contact_support_block`). `make_transfer` is a legacy\n// name that stays as an alias until the last legacy payload is gone.\nexport const actionBlocksKey = {\n PLACEHOLDER_ACTION_BLOCK: 'PlaceholderActionBlock',\n MAKE_TRANSFER_ACTION_BLOCK: 'make_transfer',\n TRANSCATION_HISTORY_ACTION_BLOCK: 'transaction_history_block',\n TRANSACTION_DETAILS_ACTION_BLOCK: 'transaction_details_block',\n CONTACT_SUPPORT_ACTION_BLOCK: 'contact_support_block',\n FEEDBACK_MODAL_ACTION_BLOCK: 'feedback_modal_block',\n CONNECTION_DETAIL_ACTION_BLOCK: 'connection_detail_block',\n CONNECT_WIDGET_ACTION_BLOCK: 'connect_widget_block',\n SURVEY_MODAL_ACTION_BLOCK: 'survey_modal_block',\n RECURRING_TRANSACTION_ACTION_BLOCK: 'recurring_transaction_block',\n TRANSACTION_LIST_ACTION_BLOCK: 'transaction_list_block',\n REMAINING_CASH_ACTION_BLOCK: 'remaining_cash_block',\n AMOUNT_INPUT_MODAL_ACTION_BLOCK: 'amount_input_modal_block',\n}\n"],"mappings":"AAiBA,IAAa,IAAkB;AAAA,EAC7B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,kCAAkC;AAAA,EAClC,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,oCAAoC;AAAA,EACpC,+BAA+B;AAAA,EAC/B,6BAA6B;AAAA,EAC7B,iCAAiC;AACnC"}
|
|
@@ -1,99 +1,122 @@
|
|
|
1
|
-
import { ContactSupportActionBlock as
|
|
1
|
+
import { ContactSupportActionBlock as c } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
2
2
|
import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
|
|
3
|
-
import { BarchartBlock as
|
|
4
|
-
import { DoubleBarChartBlock as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { BarchartBlock as m } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
4
|
+
import { DoubleBarChartBlock as l } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
5
|
+
import _ from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
6
|
+
import p from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
7
7
|
import s from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import C from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
9
|
+
import k from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
10
10
|
import B from "../blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js";
|
|
11
11
|
import { BudgetBlock as T } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
12
12
|
import A from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
13
|
-
import { TransactionBlock as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import { TransactionBlock as O } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
14
|
+
import f from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
15
|
+
import u from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
16
16
|
import { SVGImageBlock as N } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
17
|
+
import { FeedbackModalActionBlock as I } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
18
|
+
import { ConnectionDetailActionBlock as d } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
19
|
+
import { ConnectWidgetActionBlock as b } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
20
|
+
import { SurveyModalActionBlock as L } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
21
|
+
import { PlaceholderActionBlock as D } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
22
|
+
import { getMakeTransferDrawerTitle as P } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
23
|
+
import { MakeTransferActionBlockLayer as g } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
24
|
+
import { getDrawerHeaderTitle as h } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
25
|
+
import { TransactionDetailsBlock as R } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
22
26
|
import { useTransactionDetailsPrepare as a } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
23
|
-
import { TransactionHistoryBlock as
|
|
27
|
+
import { TransactionHistoryBlock as S } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
24
28
|
import { useRecurringTransactionPrepare as i } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
25
|
-
import { RecurringTransactionBlock as
|
|
26
|
-
import { TransactionListBlock as
|
|
27
|
-
import { RemainingCashBlock as
|
|
28
|
-
import { hasDrawerBlock as
|
|
29
|
-
import { AmountInputModalBlock as
|
|
30
|
-
var
|
|
31
|
-
},
|
|
29
|
+
import { RecurringTransactionBlock as K } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
30
|
+
import { TransactionListBlock as E } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
|
|
31
|
+
import { RemainingCashBlock as v } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
32
|
+
import { hasDrawerBlock as ko } from "./hasDrawerBlock.es.js";
|
|
33
|
+
import { AmountInputModalBlock as M } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
34
|
+
var r = (e) => {
|
|
35
|
+
}, To = {
|
|
32
36
|
[o.PLACEHOLDER_ACTION_BLOCK]: {
|
|
33
|
-
Component:
|
|
34
|
-
usePrepare:
|
|
37
|
+
Component: D,
|
|
38
|
+
usePrepare: r,
|
|
35
39
|
title: () => "Action Block Layer Drilldown"
|
|
36
40
|
},
|
|
37
41
|
[o.MAKE_TRANSFER_ACTION_BLOCK]: {
|
|
38
|
-
Component:
|
|
39
|
-
usePrepare:
|
|
40
|
-
title:
|
|
42
|
+
Component: g,
|
|
43
|
+
usePrepare: r,
|
|
44
|
+
title: P
|
|
41
45
|
},
|
|
42
46
|
[o.TRANSCATION_HISTORY_ACTION_BLOCK]: {
|
|
43
|
-
Component:
|
|
44
|
-
usePrepare:
|
|
45
|
-
title:
|
|
47
|
+
Component: S,
|
|
48
|
+
usePrepare: r,
|
|
49
|
+
title: h
|
|
46
50
|
},
|
|
47
51
|
[o.TRANSACTION_DETAILS_ACTION_BLOCK]: {
|
|
48
|
-
Component:
|
|
52
|
+
Component: R,
|
|
49
53
|
usePrepare: a,
|
|
50
54
|
title: () => "Transaction Details"
|
|
51
55
|
},
|
|
52
56
|
[o.RECURRING_TRANSACTION_ACTION_BLOCK]: {
|
|
53
|
-
Component:
|
|
57
|
+
Component: K,
|
|
54
58
|
usePrepare: i,
|
|
55
|
-
title: (e,
|
|
59
|
+
title: (e, t) => t.recurring?.expense_details ?? ""
|
|
56
60
|
},
|
|
57
61
|
[o.REMAINING_CASH_ACTION_BLOCK]: {
|
|
58
|
-
Component:
|
|
62
|
+
Component: v,
|
|
59
63
|
usePrepare: i,
|
|
60
|
-
title: (e,
|
|
64
|
+
title: (e, t) => t.insights_feed?.remaining_cash?.title ?? ""
|
|
61
65
|
},
|
|
62
66
|
[o.CONTACT_SUPPORT_ACTION_BLOCK]: {
|
|
63
|
-
Component:
|
|
64
|
-
usePrepare:
|
|
65
|
-
title: (e,
|
|
67
|
+
Component: c,
|
|
68
|
+
usePrepare: r,
|
|
69
|
+
title: (e, t) => t.help?.request_support ?? ""
|
|
70
|
+
},
|
|
71
|
+
[o.FEEDBACK_MODAL_ACTION_BLOCK]: {
|
|
72
|
+
Component: I,
|
|
73
|
+
usePrepare: r,
|
|
74
|
+
presentation: "modal"
|
|
75
|
+
},
|
|
76
|
+
[o.CONNECTION_DETAIL_ACTION_BLOCK]: {
|
|
77
|
+
Component: d,
|
|
78
|
+
usePrepare: r,
|
|
79
|
+
title: (e, t) => t.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
|
|
80
|
+
},
|
|
81
|
+
[o.CONNECT_WIDGET_ACTION_BLOCK]: {
|
|
82
|
+
Component: b,
|
|
83
|
+
usePrepare: r
|
|
84
|
+
},
|
|
85
|
+
[o.SURVEY_MODAL_ACTION_BLOCK]: {
|
|
86
|
+
Component: L,
|
|
87
|
+
usePrepare: r,
|
|
88
|
+
presentation: "modal"
|
|
66
89
|
},
|
|
67
90
|
[o.TRANSACTION_LIST_ACTION_BLOCK]: {
|
|
68
|
-
Component:
|
|
91
|
+
Component: E,
|
|
69
92
|
usePrepare: a,
|
|
70
|
-
title: (e,
|
|
93
|
+
title: (e, t, n) => n?.insights_payload?.title ?? ""
|
|
71
94
|
},
|
|
72
95
|
[o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: {
|
|
73
|
-
Component:
|
|
96
|
+
Component: M,
|
|
74
97
|
presentation: "modal",
|
|
75
|
-
usePrepare:
|
|
98
|
+
usePrepare: r
|
|
76
99
|
}
|
|
77
|
-
},
|
|
78
|
-
account_block:
|
|
79
|
-
account_switch_block:
|
|
100
|
+
}, Ao = {
|
|
101
|
+
account_block: C,
|
|
102
|
+
account_switch_block: k,
|
|
80
103
|
direct_deposit_block: B,
|
|
81
|
-
bar_chart_block:
|
|
104
|
+
bar_chart_block: m,
|
|
82
105
|
budget_block: T,
|
|
83
|
-
donut_chart_block:
|
|
84
|
-
double_bar_chart_block:
|
|
106
|
+
donut_chart_block: p,
|
|
107
|
+
double_bar_chart_block: l,
|
|
85
108
|
double_progress_bar_block: s,
|
|
86
|
-
image_block:
|
|
109
|
+
image_block: u,
|
|
87
110
|
save_extra_block: A,
|
|
88
|
-
step_chart_block:
|
|
111
|
+
step_chart_block: _,
|
|
89
112
|
svg_image_block: N,
|
|
90
|
-
withdrawal_block:
|
|
91
|
-
transaction_block:
|
|
113
|
+
withdrawal_block: f,
|
|
114
|
+
transaction_block: O
|
|
92
115
|
};
|
|
93
116
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
117
|
+
To as actionBlocks,
|
|
118
|
+
Ao as blocks,
|
|
119
|
+
ko as hasDrawerBlock
|
|
97
120
|
};
|
|
98
121
|
|
|
99
122
|
//# 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 DirectDepositBlock,\n BarchartBlock,\n BudgetBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SVGImageBlock,\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 { 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 // 'modal'
|
|
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 DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n SaveExtraBlock,\n SVGImageBlock,\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\n// on a beat's CTA. To add one: create a component taking ActionBlockProps,\n// read the clicked indexes from useInsightsV2Store().actionDrawer, and\n// register it here. Add\n// `usePrepare` when the block needs to load data before rendering.\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: {\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n },\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: {\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n },\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: {\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n },\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: {\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]: {\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]: {\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]: {\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n },\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: {\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n },\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: {\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]: {\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n },\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: {\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n },\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: {\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]: {\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 donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n image_block: ImageBlock,\n save_extra_block: SaveExtraBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAsB1B,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B;AAAA,IAC1C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf;AAAA,EACC,CAAA,EAAgB,0BAAA,GAA6B;AAAA,IAC5C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACC,CAAA,EAAgB,gCAAA,GAAmC;AAAA,IAClD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACC,CAAA,EAAgB,gCAAA,GAAmC;AAAA,IAClD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf;AAAA,EAGC,CAAA,EAAgB,kCAAA,GAAqC;AAAA,IACpD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,WAAW,mBAAmB;AAAA,EAChE;AAAA,EAGC,CAAA,EAAgB,2BAAA,GAA8B;AAAA,IAC7C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,eAAe,gBAAgB,SAAS;AAAA,EAC1E;AAAA,EAGC,CAAA,EAAgB,4BAAA,GAA+B;AAAA,IAC9C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,MAAM,mBAAmB;AAAA,EAC3D;AAAA,EACC,CAAA,EAAgB,2BAAA,GAA8B;AAAA,IAC7C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACC,CAAA,EAAgB,8BAAA,GAAiC;AAAA,IAChD,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAChB,EAAK,eAAe,oBAAoB,mCAAmC;AAAA,EAC/E;AAAA,EAGC,CAAA,EAAgB,2BAAA,GAA8B;AAAA,IAC7C,WAAW;AAAA,IACX,YAAY;AAAA,EACd;AAAA,EACC,CAAA,EAAgB,yBAAA,GAA4B;AAAA,IAC3C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACC,CAAA,EAAgB,6BAAA,GAAgC;AAAA,IAC/C,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,GAAO,MAAS,GAAM,kBAAkB,SAAS;AAAA,EACrE;AAAA,EAGC,CAAA,EAAgB,+BAAA,GAAkC;AAAA,IACjD,WAAW;AAAA,IACX,cAAc;AAAA,IAEd,YAAY;AAAA,EACd;AACF,GAEa,KAAS;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
|
|
@@ -21,10 +21,13 @@ export type InsightRender = 'legacy' | 'v2' | 'error';
|
|
|
21
21
|
* no block, no logo and no footer, and the failure would never surface. An absent flag (older firefly,
|
|
22
22
|
* cortex) renders the legacy path unchanged.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* `
|
|
28
|
-
*
|
|
24
|
+
* The gate checks only that `instance_slot` is an object and `description` is present. It does not
|
|
25
|
+
* look inside the slot: an empty `{}` is a valid envelope and resolves to `v2`, because a beat
|
|
26
|
+
* whose template has no ditto config names no block, and the card renders its copy and CTAs alone.
|
|
27
|
+
* So `block` is optional on `InstanceSlot` and a renderer must not dereference it unguarded.
|
|
28
|
+
*
|
|
29
|
+
* A payload missing `description` resolves to `error` instead: all three renderers — `BaseLayout`,
|
|
30
|
+
* `CompactInsightCard` and the micro `InsightCard` — paint `description.html_text` unguarded, so
|
|
31
|
+
* that one would throw.
|
|
29
32
|
*/
|
|
30
33
|
export declare const resolveInsightRender: (beat?: Beat | null) => InsightRender;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveInsightRender.es.js","names":[],"sources":["../../src/insights-v2/resolveInsightRender.ts"],"sourcesContent":["import type { Beat } from '../core'\n\n/**\n * Which renderer draws a beat:\n * - `legacy` — the per-template legacy component (feed, mini, micro) or the legacy caption / embedded\n * `switch` (transaction row, details drawer).\n * - `v2` — `BaseLayout` (full, mini) or `CompactInsightCard` (micro, embedded) from `insights_payload`.\n * - `error` — `InsightErrorCard`: the beat is flagged but its envelope is missing.\n */\nexport type InsightRender = 'legacy' | 'v2' | 'error'\n\n/**\n * The single gate every surface calls. Two facts decide: `beat.is_insights_v2` (written by firefly\n * when the insight's Insights 2.0 flag is on) and whether the envelope is present.\n *\n * | `is_insights_v2` | envelope | result |\n * | false / absent | any | `legacy` |\n * | true | non-empty | `v2` |\n * | true | empty | `error` |\n *\n * `error` is never downgraded to `legacy`: a flagged insight's legacy copy fields are filled from the\n * same V2 copy block, so a failed envelope would otherwise render a plausible legacy-looking card with\n * no block, no logo and no footer, and the failure would never surface. An absent flag (older firefly,\n * cortex) renders the legacy path unchanged.\n *\n *
|
|
1
|
+
{"version":3,"file":"resolveInsightRender.es.js","names":[],"sources":["../../src/insights-v2/resolveInsightRender.ts"],"sourcesContent":["import type { Beat } from '../core'\n\n/**\n * Which renderer draws a beat:\n * - `legacy` — the per-template legacy component (feed, mini, micro) or the legacy caption / embedded\n * `switch` (transaction row, details drawer).\n * - `v2` — `BaseLayout` (full, mini) or `CompactInsightCard` (micro, embedded) from `insights_payload`.\n * - `error` — `InsightErrorCard`: the beat is flagged but its envelope is missing.\n */\nexport type InsightRender = 'legacy' | 'v2' | 'error'\n\n/**\n * The single gate every surface calls. Two facts decide: `beat.is_insights_v2` (written by firefly\n * when the insight's Insights 2.0 flag is on) and whether the envelope is present.\n *\n * | `is_insights_v2` | envelope | result |\n * | false / absent | any | `legacy` |\n * | true | non-empty | `v2` |\n * | true | empty | `error` |\n *\n * `error` is never downgraded to `legacy`: a flagged insight's legacy copy fields are filled from the\n * same V2 copy block, so a failed envelope would otherwise render a plausible legacy-looking card with\n * no block, no logo and no footer, and the failure would never surface. An absent flag (older firefly,\n * cortex) renders the legacy path unchanged.\n *\n * The gate checks only that `instance_slot` is an object and `description` is present. It does not\n * look inside the slot: an empty `{}` is a valid envelope and resolves to `v2`, because a beat\n * whose template has no ditto config names no block, and the card renders its copy and CTAs alone.\n * So `block` is optional on `InstanceSlot` and a renderer must not dereference it unguarded.\n *\n * A payload missing `description` resolves to `error` instead: all three renderers — `BaseLayout`,\n * `CompactInsightCard` and the micro `InsightCard` — paint `description.html_text` unguarded, so\n * that one would throw.\n */\nexport const resolveInsightRender = (beat?: Beat | null): InsightRender => {\n if (!beat?.is_insights_v2) return 'legacy'\n\n const payload = beat.insights_payload\n\n return payload?.instance_slot && payload.description ? 'v2' : 'error'\n}\n"],"mappings":"AAkCA,IAAa,IAAA,CAAwB,MAAsC;AACzE,MAAI,CAAC,GAAM,eAAgB,QAAO;AAElC,QAAM,IAAU,EAAK;AAErB,SAAO,GAAS,iBAAiB,EAAQ,cAAc,OAAO;AAChE"}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import x from "../../insights-v2/
|
|
3
|
-
import B from "../../insights-v2/components/
|
|
4
|
-
import
|
|
5
|
-
import S from "../
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
1
|
+
import { slot as k } from "../../core/types/Insights.es.js";
|
|
2
|
+
import { resolveInsightRender as x } from "../../insights-v2/resolveInsightRender.es.js";
|
|
3
|
+
import B from "../../insights-v2/components/LogoFromGuid.es.js";
|
|
4
|
+
import M from "../../insights-v2/components/InsightErrorCard.es.js";
|
|
5
|
+
import { ON_CLICK_EVENT as R, ON_VIEW_EVENT as W, ON_VIEW_FIRST_TIME_EVENT as S } from "../constants/Analytics.es.js";
|
|
6
|
+
import F from "../beaticons/BeatMaterialIcon.es.js";
|
|
7
|
+
import { BeatIcon as O } from "../beaticons/BeatIcon.es.js";
|
|
8
|
+
import { useCopyStore as P, useEvent as A, useInsightsMicroWidgetStore as j } from "../context/hooks.es.js";
|
|
8
9
|
import E from "../MicroCardTemplate.es.js";
|
|
9
10
|
import { useEffect as I } from "react";
|
|
10
11
|
import { jsx as r } from "react/jsx-runtime";
|
|
11
|
-
import { alpha as
|
|
12
|
-
import
|
|
13
|
-
import { useInView as
|
|
14
|
-
var
|
|
15
|
-
const { ref: _, inView: n } =
|
|
12
|
+
import { alpha as v, useTheme as w } from "@mui/material/styles";
|
|
13
|
+
import z from "@mui/material/Box";
|
|
14
|
+
import { useInView as G } from "react-intersection-observer";
|
|
15
|
+
var K = 32, ti = ({ ariaLabel: l, beat: i, elevation: g, index: c, isActiveCard: s, onCardClick: u, posthog: o, widthOverrides: m, variant: f, showIcon: h, heightOverrides: a }) => {
|
|
16
|
+
const { ref: _, inView: n } = G({ threshold: 1 }), C = w(), { cardsCopy: T } = P(), { onEvent: d } = A(), { updateBeat: N, updateOffer: V } = j();
|
|
16
17
|
I(() => {
|
|
17
|
-
n && (i.has_been_displayed ? d(
|
|
18
|
+
n && (i.has_been_displayed ? d(W(i.template)) : (i.guid.startsWith("OFR") ? V({
|
|
18
19
|
...i,
|
|
19
20
|
has_been_displayed: !0
|
|
20
21
|
}) : N({
|
|
21
22
|
...i,
|
|
22
23
|
has_been_displayed: !0
|
|
23
|
-
}), d(
|
|
24
|
+
}), d(S(i.template))));
|
|
24
25
|
}, [n]), I(() => {
|
|
25
26
|
if (n && i) if (i.template === "MarketingOffer") {
|
|
26
27
|
const e = i;
|
|
@@ -34,15 +35,15 @@ var G = 32, ei = ({ ariaLabel: l, beat: i, elevation: g, index: s, isActiveCard:
|
|
|
34
35
|
} else o?.capture("viewed_insight", {
|
|
35
36
|
beat_guid: i.guid,
|
|
36
37
|
template: i.template,
|
|
37
|
-
position:
|
|
38
|
+
position: c
|
|
38
39
|
});
|
|
39
40
|
}, [
|
|
40
41
|
i,
|
|
41
|
-
|
|
42
|
+
c,
|
|
42
43
|
n
|
|
43
44
|
]);
|
|
44
45
|
const p = () => {
|
|
45
|
-
if (u && u(i), d(
|
|
46
|
+
if (u && u(i), d(R(i.template)), i.template === "MarketingOffer") {
|
|
46
47
|
const e = i;
|
|
47
48
|
o?.capture("clicked_messaging_insight", {
|
|
48
49
|
template: i.template,
|
|
@@ -54,11 +55,11 @@ var G = 32, ei = ({ ariaLabel: l, beat: i, elevation: g, index: s, isActiveCard:
|
|
|
54
55
|
} else o?.capture("clicked_insight", {
|
|
55
56
|
beat_guid: i.guid,
|
|
56
57
|
template: i.template,
|
|
57
|
-
position:
|
|
58
|
+
position: c
|
|
58
59
|
});
|
|
59
|
-
}, y =
|
|
60
|
-
if (y === "error") return /* @__PURE__ */ r(
|
|
61
|
-
"aria-hidden": !
|
|
60
|
+
}, y = x(i), t = y === "v2" ? i.insights_payload : void 0;
|
|
61
|
+
if (y === "error") return /* @__PURE__ */ r(z, {
|
|
62
|
+
"aria-hidden": !s,
|
|
62
63
|
"aria-label": l,
|
|
63
64
|
"aria-roledescription": "slide",
|
|
64
65
|
ref: _,
|
|
@@ -68,24 +69,24 @@ var G = 32, ei = ({ ariaLabel: l, beat: i, elevation: g, index: s, isActiveCard:
|
|
|
68
69
|
minWidth: m ? `${m}px` : "100%",
|
|
69
70
|
my: 1
|
|
70
71
|
},
|
|
71
|
-
children: /* @__PURE__ */ r(
|
|
72
|
+
children: /* @__PURE__ */ r(M, { beat: i })
|
|
72
73
|
});
|
|
73
74
|
if (t) {
|
|
74
|
-
const e = t.instance_slot.
|
|
75
|
+
const e = k(t.instance_slot.data, "logo");
|
|
75
76
|
return /* @__PURE__ */ r(E, {
|
|
76
77
|
"aria-roledescription": "slide",
|
|
77
78
|
ariaLabel: l,
|
|
78
79
|
description: t.description.html_text,
|
|
79
80
|
elevation: g,
|
|
80
81
|
heightOverrides: a,
|
|
81
|
-
icon: h && (e ? /* @__PURE__ */ r(
|
|
82
|
+
icon: h && (e ? /* @__PURE__ */ r(B, {
|
|
82
83
|
logo: e,
|
|
83
|
-
size:
|
|
84
|
-
}) : /* @__PURE__ */ r(
|
|
85
|
-
bgColor:
|
|
84
|
+
size: K
|
|
85
|
+
}) : /* @__PURE__ */ r(F, {
|
|
86
|
+
bgColor: v(C.palette.primary.main, 0.15),
|
|
86
87
|
name: "lightbulb"
|
|
87
88
|
})),
|
|
88
|
-
isActiveCard:
|
|
89
|
+
isActiveCard: s,
|
|
89
90
|
onCardClick: p,
|
|
90
91
|
onPrimaryAction: p,
|
|
91
92
|
primaryActionText: t.primary_cta?.label,
|
|
@@ -101,8 +102,8 @@ var G = 32, ei = ({ ariaLabel: l, beat: i, elevation: g, index: s, isActiveCard:
|
|
|
101
102
|
description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description || "",
|
|
102
103
|
elevation: g,
|
|
103
104
|
heightOverrides: a,
|
|
104
|
-
icon: h && /* @__PURE__ */ r(
|
|
105
|
-
isActiveCard:
|
|
105
|
+
icon: h && /* @__PURE__ */ r(O, { beat: i }),
|
|
106
|
+
isActiveCard: s,
|
|
106
107
|
onCardClick: p,
|
|
107
108
|
onPrimaryAction: p,
|
|
108
109
|
primaryActionText: i.micro_call_to_action || T?.micro_card_cta,
|
|
@@ -113,7 +114,7 @@ var G = 32, ei = ({ ariaLabel: l, beat: i, elevation: g, index: s, isActiveCard:
|
|
|
113
114
|
});
|
|
114
115
|
};
|
|
115
116
|
export {
|
|
116
|
-
|
|
117
|
+
ti as InsightCard
|
|
117
118
|
};
|
|
118
119
|
|
|
119
120
|
//# sourceMappingURL=InsightCard.es.js.map
|