@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.
Files changed (78) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/common/components/ConnectDrawer.es.js +17 -44
  3. package/dist/common/components/ConnectDrawer.es.js.map +1 -1
  4. package/dist/common/components/ConnectWidgetPanel.d.ts +8 -0
  5. package/dist/common/components/ConnectWidgetPanel.es.js +44 -0
  6. package/dist/common/components/ConnectWidgetPanel.es.js.map +1 -0
  7. package/dist/common/components/dialog/Dialog.d.ts +2 -0
  8. package/dist/common/components/dialog/Dialog.es.js +30 -30
  9. package/dist/common/components/dialog/Dialog.es.js.map +1 -1
  10. package/dist/common/components/index.d.ts +1 -0
  11. package/dist/common/index.es.js +67 -65
  12. package/dist/core/index.es.js +111 -109
  13. package/dist/core/types/Insights.d.ts +33 -16
  14. package/dist/core/types/Insights.es.js +6 -0
  15. package/dist/core/types/Insights.es.js.map +1 -0
  16. package/dist/core/types/index.d.ts +2 -1
  17. package/dist/core/types/localization/InsightsFeedCopy.d.ts +87 -0
  18. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +19 -19
  19. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.d.ts +21 -0
  21. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js +16 -0
  22. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js.map +1 -0
  23. package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.d.ts +12 -0
  24. package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js +25 -0
  25. package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js.map +1 -0
  26. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.d.ts +17 -0
  27. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js +39 -0
  28. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js.map +1 -0
  29. package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.d.ts +16 -0
  30. package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js +47 -0
  31. package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js.map +1 -0
  32. package/dist/insights-v2/beatActions.d.ts +2 -2
  33. package/dist/insights-v2/beatActions.es.js.map +1 -1
  34. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +1 -1
  35. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
  36. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -1
  37. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
  38. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +1 -1
  39. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
  40. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +5 -2
  41. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +36 -35
  42. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  43. package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.d.ts +2 -2
  44. package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js +6 -5
  45. package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js.map +1 -1
  46. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
  47. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  48. package/dist/insights-v2/components/BaseLayout.es.js +14 -14
  49. package/dist/insights-v2/components/CompactInsightCard.d.ts +4 -4
  50. package/dist/insights-v2/components/CompactInsightCard.es.js +50 -46
  51. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  52. package/dist/insights-v2/components/ConnectionDetailDrillDown.d.ts +32 -0
  53. package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js +148 -0
  54. package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js.map +1 -0
  55. package/dist/insights-v2/components/FeedbackDialog.d.ts +3 -1
  56. package/dist/insights-v2/components/FeedbackDialog.es.js +80 -72
  57. package/dist/insights-v2/components/FeedbackDialog.es.js.map +1 -1
  58. package/dist/insights-v2/components/FeedbackModal.d.ts +60 -0
  59. package/dist/insights-v2/components/FeedbackModal.es.js +61 -0
  60. package/dist/insights-v2/components/FeedbackModal.es.js.map +1 -0
  61. package/dist/insights-v2/components/SurveyModal.d.ts +65 -0
  62. package/dist/insights-v2/components/SurveyModal.es.js +138 -0
  63. package/dist/insights-v2/components/SurveyModal.es.js.map +1 -0
  64. package/dist/insights-v2/components/shared/StatusSnackbar.d.ts +28 -0
  65. package/dist/insights-v2/components/shared/StatusSnackbar.es.js +19 -0
  66. package/dist/insights-v2/components/shared/StatusSnackbar.es.js.map +1 -0
  67. package/dist/insights-v2/index.d.ts +4 -0
  68. package/dist/insights-v2/index.es.js +72 -64
  69. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +4 -0
  70. package/dist/insights-v2/mappings/actionBlocksKey.es.js +4 -0
  71. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  72. package/dist/insights-v2/mappings/blocks.es.js +79 -56
  73. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  74. package/dist/insights-v2/resolveInsightRender.d.ts +8 -5
  75. package/dist/insights-v2/resolveInsightRender.es.js.map +1 -1
  76. package/dist/microinsights/cards/InsightCard.es.js +32 -31
  77. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  78. 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 c } from "./components/InsightOptionsMenu.es.js";
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 h from "./components/CompactInsightCard.es.js";
10
- import S from "./components/InsightErrorCard.es.js";
11
- import { BAR_CHART_VARIANTS as A, barChartVariant as T, buildChartData as b, buildDataSeries as I } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
12
- import { BarchartBlock as H } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
13
- import { DoubleBarChartBlock as O } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
14
- import E from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
15
- import R from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
16
- import V from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
17
- import y from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
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 sr from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
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/AmountPill.es.js";
33
- import Br from "./components/DesignateEmergencySavingsCard.es.js";
34
- import { ErrorCard as hr } from "./components/ErrorCard.es.js";
35
- import { HOST_ACTIONS as Sr } from "./ctaActions/hostActions.es.js";
36
- import { useBeatCtaActions as Ar, useCtaHandler as Tr } from "./ctaActions/useCtaAction.es.js";
37
- import { FeedbackBar as Ir } from "./components/FeedbackBar.es.js";
38
- import Hr from "./components/FeedbackDialog.es.js";
39
- import { DismissInsightDialog as Or } from "./components/DismissInsightDialog.es.js";
40
- import { HiddenConfirmationCard as Er } from "./components/HiddenConfirmationCard.es.js";
41
- import { LoadingCard as Rr } from "./components/LoadingCard.es.js";
42
- import { ObsolesceBanner as Vr } from "./components/ObsolesceBanner.es.js";
43
- import yr from "./components/BaseLayout.es.js";
44
- import Gr from "./components/StatusMessageCard.es.js";
45
- import Nr from "./components/LogoTile.es.js";
46
- import Ur from "./components/LogoClusterCard.es.js";
47
- import qr from "./components/MerchantHighlightCard.es.js";
48
- import Jr from "./components/P2PLogoStack.es.js";
49
- import Qr from "./components/SavingsOpportunityCard.es.js";
50
- import Yr from "./components/SubscriptionHeroCard.es.js";
51
- import $r from "./components/UpcomingBillCard.es.js";
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
- y as AccountBlock,
57
+ V as AccountBlock,
54
58
  U as AccountHeroCard,
55
59
  N as AccountSwitchBlock,
56
- Cr as AmountPill,
60
+ Br as AmountPill,
57
61
  A as BAR_CHART_VARIANTS,
58
62
  f as BadgedTile,
59
- H as BarchartBlock,
60
- yr as BaseLayout,
63
+ v as BarchartBlock,
64
+ qr as BaseLayout,
61
65
  Q as BudgetBlock,
62
- h as CompactInsightCard,
63
- Br as DesignateEmergencySavingsCard,
66
+ k as CompactInsightCard,
67
+ Cr as ConnectionDetailDrillDown,
68
+ kr as DesignateEmergencySavingsCard,
64
69
  J as DirectDepositBlock,
65
70
  q as DirectDepositCard,
66
- Or as DismissInsightDialog,
67
- R as DonutChartBlock,
68
- O as DoubleBarChartBlock,
69
- V as DoubleProgressBarBlock,
70
- hr as ErrorCard,
71
- Ir as FeedbackBar,
72
- Hr as FeedbackDialog,
73
- Sr as HOST_ACTIONS,
74
- Er as HiddenConfirmationCard,
75
- S as InsightErrorCard,
76
- c as InsightOptionsMenu,
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
- Rr as LoadingCard,
79
- Ur as LogoClusterCard,
84
+ Nr as LoadingCard,
85
+ Yr as LogoClusterCard,
80
86
  d as LogoFromGuid,
81
- Nr as LogoTile,
82
- qr as MerchantHighlightCard,
83
- Vr as ObsolesceBanner,
87
+ Qr as LogoTile,
88
+ $r as MerchantHighlightCard,
89
+ Ur as ObsolesceBanner,
84
90
  n as OverflowMenu,
85
- Jr as P2PLogoStack,
91
+ oo as P2PLogoStack,
86
92
  lr as SVGImageBlock,
87
93
  Y as SaveAnExtraCard,
88
94
  $ as SaveExtraBlock,
89
- Qr as SavingsOpportunityCard,
95
+ mo as SavingsOpportunityCard,
90
96
  B as StatusBadge,
91
- Gr as StatusMessageCard,
97
+ Jr as StatusMessageCard,
92
98
  o as StatusPill,
93
- E as StepChartBlock,
94
- Yr as SubscriptionHeroCard,
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
- $r as UpcomingBillCard,
100
- sr as WithdrawalBlock,
107
+ fo as UpcomingBillCard,
108
+ cr as WithdrawalBlock,
101
109
  er as WithdrawalCard,
102
- T as barChartVariant,
103
- b as buildChartData,
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
- Ar as useBeatCtaActions,
109
- Tr as useCtaHandler
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 m } from "../actionBlocks/ContactSupportActionBlock.es.js";
1
+ import { ContactSupportActionBlock as c } from "../actionBlocks/ContactSupportActionBlock.es.js";
2
2
  import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
3
- import { BarchartBlock as l } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
4
- import { DoubleBarChartBlock as n } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
5
- import p from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
6
- import _ from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
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 k from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
9
- import C from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
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 f } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
14
- import u from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
15
- import O from "../blocks/ImageBlocks/ImageBlock.es.js";
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 { PlaceholderActionBlock as b } from "../actionBlocks/PlaceholderActionBlock.es.js";
18
- import { getMakeTransferDrawerTitle as I } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
19
- import { MakeTransferActionBlockLayer as h } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
20
- import { getDrawerHeaderTitle as g } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
21
- import { TransactionDetailsBlock as d } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
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 L } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
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 P } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
26
- import { TransactionListBlock as R } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
27
- import { RemainingCashBlock as D } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
28
- import { hasDrawerBlock as co } from "./hasDrawerBlock.es.js";
29
- import { AmountInputModalBlock as S } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
30
- var t = (e) => {
31
- }, lo = {
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: b,
34
- usePrepare: t,
37
+ Component: D,
38
+ usePrepare: r,
35
39
  title: () => "Action Block Layer Drilldown"
36
40
  },
37
41
  [o.MAKE_TRANSFER_ACTION_BLOCK]: {
38
- Component: h,
39
- usePrepare: t,
40
- title: I
42
+ Component: g,
43
+ usePrepare: r,
44
+ title: P
41
45
  },
42
46
  [o.TRANSCATION_HISTORY_ACTION_BLOCK]: {
43
- Component: L,
44
- usePrepare: t,
45
- title: g
47
+ Component: S,
48
+ usePrepare: r,
49
+ title: h
46
50
  },
47
51
  [o.TRANSACTION_DETAILS_ACTION_BLOCK]: {
48
- Component: d,
52
+ Component: R,
49
53
  usePrepare: a,
50
54
  title: () => "Transaction Details"
51
55
  },
52
56
  [o.RECURRING_TRANSACTION_ACTION_BLOCK]: {
53
- Component: P,
57
+ Component: K,
54
58
  usePrepare: i,
55
- title: (e, r) => r.recurring?.expense_details ?? ""
59
+ title: (e, t) => t.recurring?.expense_details ?? ""
56
60
  },
57
61
  [o.REMAINING_CASH_ACTION_BLOCK]: {
58
- Component: D,
62
+ Component: v,
59
63
  usePrepare: i,
60
- title: (e, r) => r.insights_feed?.remaining_cash?.title ?? ""
64
+ title: (e, t) => t.insights_feed?.remaining_cash?.title ?? ""
61
65
  },
62
66
  [o.CONTACT_SUPPORT_ACTION_BLOCK]: {
63
- Component: m,
64
- usePrepare: t,
65
- title: (e, r) => r.help?.request_support ?? ""
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: R,
91
+ Component: E,
69
92
  usePrepare: a,
70
- title: (e, r, c) => c?.insights_payload?.title ?? ""
93
+ title: (e, t, n) => n?.insights_payload?.title ?? ""
71
94
  },
72
95
  [o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: {
73
- Component: S,
96
+ Component: M,
74
97
  presentation: "modal",
75
- usePrepare: t
98
+ usePrepare: r
76
99
  }
77
- }, no = {
78
- account_block: k,
79
- account_switch_block: C,
100
+ }, Ao = {
101
+ account_block: C,
102
+ account_switch_block: k,
80
103
  direct_deposit_block: B,
81
- bar_chart_block: l,
104
+ bar_chart_block: m,
82
105
  budget_block: T,
83
- donut_chart_block: _,
84
- double_bar_chart_block: n,
106
+ donut_chart_block: p,
107
+ double_bar_chart_block: l,
85
108
  double_progress_bar_block: s,
86
- image_block: O,
109
+ image_block: u,
87
110
  save_extra_block: A,
88
- step_chart_block: p,
111
+ step_chart_block: _,
89
112
  svg_image_block: N,
90
- withdrawal_block: u,
91
- transaction_block: f
113
+ withdrawal_block: f,
114
+ transaction_block: O
92
115
  };
93
116
  export {
94
- lo as actionBlocks,
95
- no as blocks,
96
- co as hasDrawerBlock
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' blocks render their own dialog, so the layer skips the Drawer (and its title) and mounts\n // the block only while it is open for this beat. Defaults to 'drawer'.\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.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GAuB1B,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,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"}
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
- * An envelope counts as present only when it carries both an `instance_slot` and a `description`: a
25
- * bare `{}` is a half-built envelope, every V2 renderer reads `instance_slot.block` first, and all
26
- * three — `BaseLayout`, `CompactInsightCard` and the micro `InsightCard` — paint
27
- * `description.html_text` unguarded, so a half-built envelope has to resolve to `error` rather than
28
- * throw inside the renderer.
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 * An envelope counts as present only when it carries both an `instance_slot` and a `description`: a\n * bare `{}` is a half-built envelope, every V2 renderer reads `instance_slot.block` first, and all\n * three — `BaseLayout`, `CompactInsightCard` and the micro `InsightCard` — paint\n * `description.html_text` unguarded, so a half-built envelope has to resolve to `error` rather than\n * throw inside the renderer.\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":"AA+BA,IAAa,IAAA,CAAwB,MAAsC;AACzE,MAAI,CAAC,GAAM,eAAgB,QAAO;AAElC,QAAM,IAAU,EAAK;AAErB,SAAO,GAAS,iBAAiB,EAAQ,cAAc,OAAO;AAChE"}
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 { resolveInsightRender as k } from "../../insights-v2/resolveInsightRender.es.js";
2
- import x from "../../insights-v2/components/LogoFromGuid.es.js";
3
- import B from "../../insights-v2/components/InsightErrorCard.es.js";
4
- import { ON_CLICK_EVENT as M, ON_VIEW_EVENT as R, ON_VIEW_FIRST_TIME_EVENT as W } from "../constants/Analytics.es.js";
5
- import S from "../beaticons/BeatMaterialIcon.es.js";
6
- import { BeatIcon as F } from "../beaticons/BeatIcon.es.js";
7
- import { useCopyStore as O, useEvent as P, useInsightsMicroWidgetStore as A } from "../context/hooks.es.js";
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 j, useTheme as v } from "@mui/material/styles";
12
- import w from "@mui/material/Box";
13
- import { useInView as z } from "react-intersection-observer";
14
- var G = 32, ei = ({ ariaLabel: l, beat: i, elevation: g, index: s, isActiveCard: c, onCardClick: u, posthog: o, widthOverrides: m, variant: f, showIcon: h, heightOverrides: a }) => {
15
- const { ref: _, inView: n } = z({ threshold: 1 }), C = v(), { cardsCopy: T } = O(), { onEvent: d } = P(), { updateBeat: N, updateOffer: V } = A();
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(R(i.template)) : (i.guid.startsWith("OFR") ? V({
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(W(i.template))));
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: s
38
+ position: c
38
39
  });
39
40
  }, [
40
41
  i,
41
- s,
42
+ c,
42
43
  n
43
44
  ]);
44
45
  const p = () => {
45
- if (u && u(i), d(M(i.template)), i.template === "MarketingOffer") {
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: s
58
+ position: c
58
59
  });
59
- }, y = k(i), t = y === "v2" ? i.insights_payload : void 0;
60
- if (y === "error") return /* @__PURE__ */ r(w, {
61
- "aria-hidden": !c,
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(B, { beat: i })
72
+ children: /* @__PURE__ */ r(M, { beat: i })
72
73
  });
73
74
  if (t) {
74
- const e = t.instance_slot.data_series?.[0]?.logo;
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(x, {
82
+ icon: h && (e ? /* @__PURE__ */ r(B, {
82
83
  logo: e,
83
- size: G
84
- }) : /* @__PURE__ */ r(S, {
85
- bgColor: j(C.palette.primary.main, 0.15),
84
+ size: K
85
+ }) : /* @__PURE__ */ r(F, {
86
+ bgColor: v(C.palette.primary.main, 0.15),
86
87
  name: "lightbulb"
87
88
  })),
88
- isActiveCard: c,
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(F, { beat: i }),
105
- isActiveCard: c,
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
- ei as InsightCard
117
+ ti as InsightCard
117
118
  };
118
119
 
119
120
  //# sourceMappingURL=InsightCard.es.js.map