@mx-cartographer/experiences 9.5.3 → 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 (95) hide show
  1. package/CHANGELOG.md +13 -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/CurrencyDialog.d.ts +10 -2
  8. package/dist/common/components/CurrencyDialog.es.js +56 -50
  9. package/dist/common/components/CurrencyDialog.es.js.map +1 -1
  10. package/dist/common/components/dialog/Dialog.d.ts +2 -0
  11. package/dist/common/components/dialog/Dialog.es.js +30 -30
  12. package/dist/common/components/dialog/Dialog.es.js.map +1 -1
  13. package/dist/common/components/index.d.ts +1 -0
  14. package/dist/common/index.es.js +67 -65
  15. package/dist/core/index.es.js +111 -109
  16. package/dist/core/types/Insights.d.ts +33 -16
  17. package/dist/core/types/Insights.es.js +6 -0
  18. package/dist/core/types/Insights.es.js.map +1 -0
  19. package/dist/core/types/index.d.ts +2 -1
  20. package/dist/core/types/localization/InsightsFeedCopy.d.ts +108 -0
  21. package/dist/core/types/localization/index.d.ts +1 -1
  22. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +24 -18
  23. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
  24. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.d.ts +13 -0
  25. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +128 -0
  26. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js.map +1 -0
  27. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/index.d.ts +1 -0
  28. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.d.ts +14 -0
  29. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js +14 -0
  30. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js.map +1 -0
  31. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.d.ts +21 -0
  32. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js +16 -0
  33. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js.map +1 -0
  34. package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.d.ts +12 -0
  35. package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js +25 -0
  36. package/dist/insights-v2/actionBlocks/ConnectionDetailActionBlock.es.js.map +1 -0
  37. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.d.ts +17 -0
  38. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js +39 -0
  39. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js.map +1 -0
  40. package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.d.ts +16 -0
  41. package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js +47 -0
  42. package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js.map +1 -0
  43. package/dist/insights-v2/beatActions.d.ts +2 -2
  44. package/dist/insights-v2/beatActions.es.js.map +1 -1
  45. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +1 -1
  46. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
  47. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -1
  48. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
  49. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +1 -1
  50. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
  51. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.d.ts +5 -2
  52. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +36 -35
  53. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  54. package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.d.ts +2 -2
  55. package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js +6 -5
  56. package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js.map +1 -1
  57. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
  58. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  59. package/dist/insights-v2/components/BaseLayout.es.js +24 -24
  60. package/dist/insights-v2/components/CompactInsightCard.d.ts +4 -4
  61. package/dist/insights-v2/components/CompactInsightCard.es.js +50 -46
  62. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  63. package/dist/insights-v2/components/ConnectionDetailDrillDown.d.ts +32 -0
  64. package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js +148 -0
  65. package/dist/insights-v2/components/ConnectionDetailDrillDown.es.js.map +1 -0
  66. package/dist/insights-v2/components/FeedbackDialog.d.ts +3 -1
  67. package/dist/insights-v2/components/FeedbackDialog.es.js +80 -72
  68. package/dist/insights-v2/components/FeedbackDialog.es.js.map +1 -1
  69. package/dist/insights-v2/components/FeedbackModal.d.ts +60 -0
  70. package/dist/insights-v2/components/FeedbackModal.es.js +61 -0
  71. package/dist/insights-v2/components/FeedbackModal.es.js.map +1 -0
  72. package/dist/insights-v2/components/SurveyModal.d.ts +65 -0
  73. package/dist/insights-v2/components/SurveyModal.es.js +138 -0
  74. package/dist/insights-v2/components/SurveyModal.es.js.map +1 -0
  75. package/dist/insights-v2/components/shared/StatusSnackbar.d.ts +28 -0
  76. package/dist/insights-v2/components/shared/StatusSnackbar.es.js +19 -0
  77. package/dist/insights-v2/components/shared/StatusSnackbar.es.js.map +1 -0
  78. package/dist/insights-v2/ctaActions/runCtaAction.es.js +10 -10
  79. package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
  80. package/dist/insights-v2/index.d.ts +4 -0
  81. package/dist/insights-v2/index.es.js +70 -62
  82. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +5 -0
  83. package/dist/insights-v2/mappings/actionBlocksKey.es.js +6 -1
  84. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  85. package/dist/insights-v2/mappings/blocks.d.ts +2 -1
  86. package/dist/insights-v2/mappings/blocks.es.js +91 -68
  87. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  88. package/dist/insights-v2/mappings/hasDrawerBlock.d.ts +1 -0
  89. package/dist/insights-v2/mappings/hasDrawerBlock.es.js +13 -0
  90. package/dist/insights-v2/mappings/hasDrawerBlock.es.js.map +1 -0
  91. package/dist/insights-v2/resolveInsightRender.d.ts +8 -5
  92. package/dist/insights-v2/resolveInsightRender.es.js.map +1 -1
  93. package/dist/microinsights/cards/InsightCard.es.js +32 -31
  94. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  95. package/package.json +1 -1
@@ -4,9 +4,9 @@ import a from "./components/charts/StatusBar.es.js";
4
4
  import p from "./components/charts/Donut.es.js";
5
5
  import u from "./hooks/useAccountDisplayName.es.js";
6
6
  import { useCombineEvents as C, useCombinePageviews as S } from "./hooks/useCombineEvents.es.js";
7
- import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
7
+ import { GlobalDataContext as c, GlobalDataProvider as d } from "./context/GlobalDataProvider.es.js";
8
8
  import { WidgetContainerContext as E, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
9
- import { useAccountStore as _, useActionContext as N, useAppConfig as y, useBudgetsStore as A, useCashflowStore as b, useCategoryStore as P, useDebtStore as O, useError as G, useEvent as W, useFinstrongStore as L, useGlobalCopyStore as R, useGlobalStore as U, useGlobalUiStore as v, useGoalStore as B, useHelpStore as h, useHoldingStore as w, useInsightsV2Store as x, useLoad as M, useMerchantStore as Y, useNetWorthStore as H, useNotificationStore as F, usePageView as z, useRecurringTransactionsStore as V, useSettingsStore as Z, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as j } from "./context/hooks.es.js";
9
+ import { useAccountStore as I, useActionContext as N, useAppConfig as P, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as b, useDebtStore as O, useError as W, useEvent as G, useFinstrongStore as L, useGlobalCopyStore as R, useGlobalStore as U, useGlobalUiStore as v, useGoalStore as B, useHelpStore as h, useHoldingStore as w, useInsightsV2Store as x, useLoad as M, useMerchantStore as Y, useNetWorthStore as H, useNotificationStore as F, usePageView as z, useRecurringTransactionsStore as V, useSettingsStore as Z, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as j } from "./context/hooks.es.js";
10
10
  import { useInsightsEnabled as Q } from "./hooks/useInsightsEnabled.es.js";
11
11
  import { useScreenSize as $ } from "./hooks/useScreenSize.es.js";
12
12
  import ro from "./hooks/usePrevious.es.js";
@@ -16,10 +16,10 @@ import { useWidgetHeaderStyles as lo } from "./hooks/useWidgetHeaderStyles.es.js
16
16
  import { useWidgetLoadTimer as So } from "./hooks/useWidgetLoadTimer.es.js";
17
17
  import co from "./components/dialog/Dialog.es.js";
18
18
  import Eo from "./components/drawer/Drawer.es.js";
19
- import Io from "./components/daterangeselector/DateRangeSelector.es.js";
19
+ import _o from "./components/daterangeselector/DateRangeSelector.es.js";
20
20
  import { ANALYTICS_EVENTS as No } from "./constants/Analytics.es.js";
21
- import { CONNECTIONS_WIDGET_ID as Ao, CONNECT_WIDGET_ID as bo, MemberConnectionStatus as Po } from "./constants/Connect.es.js";
22
- import { GlobalStore as Go } from "../core/stores/GlobalStore.es.js";
21
+ import { CONNECTIONS_WIDGET_ID as yo, CONNECT_WIDGET_ID as Ao, MemberConnectionStatus as bo } from "./constants/Connect.es.js";
22
+ import { GlobalStore as Wo } from "../core/stores/GlobalStore.es.js";
23
23
  import { INCOME_ACCOUNT_TYPES as Lo, PAYMENT_ACCOUNT_TYPES as Ro, SPENDING_ACCOUNT_TYPES as Uo } from "./constants/Account.es.js";
24
24
  import { RECURRENCE_COPY as Bo } from "./constants/ScheduledPayment.es.js";
25
25
  import { LOADING_STATUS as wo } from "./constants/SpendingPlan.es.js";
@@ -34,108 +34,110 @@ import rr from "./components/MiniWidgetContainer.es.js";
34
34
  import { GlobalAccountFilter as er } from "./components/GlobalAccountFilter.es.js";
35
35
  import mr from "./components/Loader.es.js";
36
36
  import { WidgetContainer as ar } from "./components/WidgetContainer.es.js";
37
- import pr from "./components/ConnectDrawer.es.js";
38
- import ur from "./components/CurrencyDialog.es.js";
39
- import Cr from "./components/CurrencyInput.es.js";
40
- import gr from "./components/ResponsiveButton.es.js";
41
- import Tr from "./components/SearchBox.es.js";
42
- import Er from "./components/SelectionBox.es.js";
43
- import Ir from "./components/TabContentContainer.es.js";
44
- import Nr from "./components/IconBacking.es.js";
45
- import Ar from "./components/DataRow.es.js";
46
- import Pr from "./components/ZeroState.es.js";
47
- import Gr from "./components/InformationTooltip.es.js";
48
- import { ConnectCard as Lr } from "./components/ConnectCard.es.js";
49
- import { CurrencyText as Ur } from "./components/CurrencyText.es.js";
50
- import { EmptyState as Br } from "./components/EmptyState.es.js";
51
- import { ListItemAction as wr } from "./components/ListItemAction.es.js";
52
- import { ListItemRow as Mr } from "./components/ListItemRow.es.js";
53
- import { ListItemWrapper as Hr } from "./components/ListItemWrapper.es.js";
54
- import { Select as zr } from "./components/Select.es.js";
55
- import { ToggleButtonListItem as Zr } from "./components/listitems/ToggleButtonListItem.es.js";
56
- import { ToggleListItem as qr } from "./components/listitems/ToggleListItem.es.js";
57
- import { analyticsSession as jr } from "./utils/Analytics.es.js";
58
- import { getClientComponentOverrides as Qr, getClientCustomizations as Xr, getClientPaletteOptions as $r, getClientTheme as ot } from "./utils/Theme.es.js";
37
+ import pr from "./components/ConnectWidgetPanel.es.js";
38
+ import ur from "./components/ConnectDrawer.es.js";
39
+ import Cr from "./components/CurrencyDialog.es.js";
40
+ import gr from "./components/CurrencyInput.es.js";
41
+ import dr from "./components/ResponsiveButton.es.js";
42
+ import Er from "./components/SearchBox.es.js";
43
+ import _r from "./components/SelectionBox.es.js";
44
+ import Nr from "./components/TabContentContainer.es.js";
45
+ import yr from "./components/IconBacking.es.js";
46
+ import br from "./components/DataRow.es.js";
47
+ import Wr from "./components/ZeroState.es.js";
48
+ import Lr from "./components/InformationTooltip.es.js";
49
+ import { ConnectCard as Ur } from "./components/ConnectCard.es.js";
50
+ import { CurrencyText as Br } from "./components/CurrencyText.es.js";
51
+ import { EmptyState as wr } from "./components/EmptyState.es.js";
52
+ import { ListItemAction as Mr } from "./components/ListItemAction.es.js";
53
+ import { ListItemRow as Hr } from "./components/ListItemRow.es.js";
54
+ import { ListItemWrapper as zr } from "./components/ListItemWrapper.es.js";
55
+ import { Select as Zr } from "./components/Select.es.js";
56
+ import { ToggleButtonListItem as qr } from "./components/listitems/ToggleButtonListItem.es.js";
57
+ import { ToggleListItem as jr } from "./components/listitems/ToggleListItem.es.js";
58
+ import { analyticsSession as Qr } from "./utils/Analytics.es.js";
59
+ import { getClientComponentOverrides as $r, getClientCustomizations as ot, getClientPaletteOptions as rt, getClientTheme as tt } from "./utils/Theme.es.js";
59
60
  export {
60
61
  No as ANALYTICS_EVENTS,
61
- Ao as CONNECTIONS_WIDGET_ID,
62
- bo as CONNECT_WIDGET_ID,
62
+ yo as CONNECTIONS_WIDGET_ID,
63
+ Ao as CONNECT_WIDGET_ID,
63
64
  i as Calendar,
64
65
  m as CalendarSelectionTypes,
65
- Lr as ConnectCard,
66
- pr as ConnectDrawer,
67
- ur as CurrencyDialog,
68
- Cr as CurrencyInput,
69
- Ur as CurrencyText,
66
+ Ur as ConnectCard,
67
+ ur as ConnectDrawer,
68
+ pr as ConnectWidgetPanel,
69
+ Cr as CurrencyDialog,
70
+ gr as CurrencyInput,
71
+ Br as CurrencyText,
70
72
  Mo as DEFAULT_DONUT_SIZE,
71
73
  Yo as DEFAULT_STROKE_WIDTH,
72
- Ar as DataRow,
73
- Io as DateRangeSelector,
74
+ br as DataRow,
75
+ _o as DateRangeSelector,
74
76
  co as Dialog,
75
77
  p as Donut,
76
78
  Eo as Drawer,
77
- Br as EmptyState,
79
+ wr as EmptyState,
78
80
  Qo as Error,
79
81
  jo as ErrorBoundary,
80
82
  er as GlobalAccountFilter,
81
83
  c as GlobalDataContext,
82
- T as GlobalDataProvider,
83
- Go as GlobalStore,
84
+ d as GlobalDataProvider,
85
+ Wo as GlobalStore,
84
86
  Lo as INCOME_ACCOUNT_TYPES,
85
- Nr as IconBacking,
86
- Gr as InformationTooltip,
87
+ yr as IconBacking,
88
+ Lr as InformationTooltip,
87
89
  wo as LOADING_STATUS,
88
- wr as ListItemAction,
89
- Mr as ListItemRow,
90
- Hr as ListItemWrapper,
90
+ Mr as ListItemAction,
91
+ Hr as ListItemRow,
92
+ zr as ListItemWrapper,
91
93
  mr as Loader,
92
- Po as MemberConnectionStatus,
94
+ bo as MemberConnectionStatus,
93
95
  $o as MicroWidgetContainer,
94
96
  rr as MiniWidgetContainer,
95
97
  Zo as MultiSegmentDonut,
96
98
  Ro as PAYMENT_ACCOUNT_TYPES,
97
99
  Bo as RECURRENCE_COPY,
98
- gr as ResponsiveButton,
100
+ dr as ResponsiveButton,
99
101
  Uo as SPENDING_ACCOUNT_TYPES,
100
- Tr as SearchBox,
101
- zr as Select,
102
- Er as SelectionBox,
102
+ Er as SearchBox,
103
+ Zr as Select,
104
+ _r as SelectionBox,
103
105
  qo as SingleSegmentDonut,
104
106
  Fo as Sizes,
105
107
  a as StatusBar,
106
108
  zo as TOUCH_TARGET,
107
- Ir as TabContentContainer,
108
- Zr as ToggleButtonListItem,
109
- qr as ToggleListItem,
109
+ Nr as TabContentContainer,
110
+ qr as ToggleButtonListItem,
111
+ jr as ToggleListItem,
110
112
  ar as WidgetContainer,
111
113
  E as WidgetContainerContext,
112
114
  D as WidgetContainerProvider,
113
- Pr as ZeroState,
114
- jr as analyticsSession,
115
+ Wr as ZeroState,
116
+ Qr as analyticsSession,
115
117
  r as buildDynamicCopy,
116
118
  t as buildPluralCopy,
117
119
  eo as formatCurrency,
118
120
  io as formatOrdinal,
119
121
  mo as formatPercentage,
120
122
  no as generateEqualIntervals,
121
- Qr as getClientComponentOverrides,
122
- Xr as getClientCustomizations,
123
- $r as getClientPaletteOptions,
124
- ot as getClientTheme,
123
+ $r as getClientComponentOverrides,
124
+ ot as getClientCustomizations,
125
+ rt as getClientPaletteOptions,
126
+ tt as getClientTheme,
125
127
  ao as getCurrencyCodes,
126
128
  so as getPluralRules,
127
129
  u as useAccountDisplayName,
128
- _ as useAccountStore,
130
+ I as useAccountStore,
129
131
  N as useActionContext,
130
- y as useAppConfig,
131
- A as useBudgetsStore,
132
- b as useCashflowStore,
133
- P as useCategoryStore,
132
+ P as useAppConfig,
133
+ y as useBudgetsStore,
134
+ A as useCashflowStore,
135
+ b as useCategoryStore,
134
136
  C as useCombineEvents,
135
137
  S as useCombinePageviews,
136
138
  O as useDebtStore,
137
- G as useError,
138
- W as useEvent,
139
+ W as useError,
140
+ G as useEvent,
139
141
  L as useFinstrongStore,
140
142
  R as useGlobalCopyStore,
141
143
  U as useGlobalStore,
@@ -1,138 +1,140 @@
1
1
  import { LOCALES as r, VALID_LOCALES as t, buildDynamicCopy as i, getLocale as m } from "./utils/Localization.es.js";
2
2
  import { Fetch as p } from "./utils/Fetch.es.js";
3
- import { AccountIcon as a, AccountIconVariants as f, AccountSubType as c, AccountType as s, AccountTypeName as S, ConnectionStatus as A, ConnectionStatusEnums as u, ErrorStatuses as y, MfaStatuses as T, NonConnectedStatuses as l, ProcessingStatuses as g, PropertyType as d, PropertyTypeName as C, StatusName as N } from "./types/Account.es.js";
3
+ import { AccountIcon as f, AccountIconVariants as a, AccountSubType as c, AccountType as s, AccountTypeName as S, ConnectionStatus as A, ConnectionStatusEnums as u, ErrorStatuses as y, MfaStatuses as T, NonConnectedStatuses as l, ProcessingStatuses as g, PropertyType as d, PropertyTypeName as C, StatusName as N } from "./types/Account.es.js";
4
4
  import { UserVerification as b } from "./types/Beat.es.js";
5
5
  import { ExpenseStatus as B, ScheduledPaymentTypes as L } from "./types/Expense.es.js";
6
6
  import { GoalType as E, MetaType as I, TrackType as P } from "./types/Goal.es.js";
7
- import { AccountNotificationTypes as F, BudgetNotificationTypes as H, InsightNotificationTypes as M, NotificationTypes as U } from "./types/Notification.es.js";
8
- import { TransactionStatus as x, TransactionType as O } from "./types/Transaction.es.js";
9
- import { ScreenSize as k } from "./types/ScreenSize.es.js";
10
- import { Frequency as w, RecurrenceStatus as z, RecurrenceType as _, RepeatingType as j } from "./types/RepeatingTransaction.es.js";
11
- import { AccountApi as J } from "./api/AccountApi.es.js";
12
- import { AnalyticsApi as Q } from "./api/AnalyticsApi.es.js";
13
- import { AppDataApi as Y } from "./api/AppDataApi.es.js";
14
- import { BannerApi as $ } from "./api/BannerApi.es.js";
15
- import { BeatApi as ro } from "./api/BeatApi.es.js";
16
- import { BudgetsApi as io } from "./api/BudgetsApi.es.js";
17
- import { CategoryApi as eo } from "./api/CategoryApi.es.js";
18
- import { FinstrongApi as no } from "./api/FinstrongApi.es.js";
19
- import { GlobalCopyApi as fo } from "./api/GlobalCopyApi.es.js";
20
- import { GoalApi as so } from "./api/GoalApi.es.js";
21
- import { HelpApi as Ao } from "./api/HelpApi.es.js";
22
- import { HoldingApi as yo } from "./api/HoldingApi.es.js";
23
- import { MerchantApi as lo } from "./api/MerchantApi.es.js";
24
- import { NotificationApi as Co } from "./api/NotificationApi.es.js";
25
- import { RepeatingTransactionsApi as ho } from "./api/RepeatingTransactionsApi.es.js";
26
- import { ScheduledPaymentsApi as Go } from "./api/ScheduledPaymentsApi.es.js";
27
- import { SettingsApi as Lo } from "./api/SettingsApi.es.js";
28
- import { TransactionApi as Eo } from "./api/TransactionApi.es.js";
29
- import { UserApi as Po } from "./api/UserApi.es.js";
30
- import { WidgetApi as Fo } from "./api/WidgetApi.es.js";
31
- import { AccountStore as Mo } from "./stores/AccountStore.es.js";
32
- import { AppDataStore as Vo } from "./stores/AppDataStore.es.js";
33
- import { AnalyticsStore as Oo } from "./stores/AnalyticsStore.es.js";
34
- import { BeatStore as ko } from "./stores/BeatStore.es.js";
35
- import { BudgetsStore as wo } from "./stores/BudgetsStore.es.js";
36
- import { CashflowStore as _o } from "./stores/CashflowStore.es.js";
37
- import { CategoryStore as vo } from "./stores/CategoryStore.es.js";
38
- import { ConnectStore as Ko } from "./stores/ConnectStore.es.js";
39
- import { DebtsStore as Xo } from "./stores/DebtsStore.es.js";
40
- import { FinstrongStore as Zo } from "./stores/FinstrongStore.es.js";
41
- import { GlobalStore as or } from "./stores/GlobalStore.es.js";
42
- import { GlobalUiStore as tr } from "./stores/GlobalUiStore.es.js";
43
- import { GlobalCopyStore as mr } from "./stores/GlobalCopyStore.es.js";
44
- import { GoalStore as pr } from "./stores/GoalStore.es.js";
45
- import { HelpStore as ar } from "./stores/HelpStore.es.js";
46
- import { HoldingStore as cr } from "./stores/HoldingStore.es.js";
47
- import { InsightsV2Store as Sr } from "./stores/InsightsV2Store.es.js";
48
- import { MerchantStore as ur } from "./stores/MerchantStore.es.js";
49
- import { NetWorthStore as Tr } from "./stores/NetWorthStore.es.js";
50
- import { NotificationStore as gr } from "./stores/NotificationStore.es.js";
51
- import { RecurringTransactionsStore as Cr } from "./stores/RecurringTransactionsStore.es.js";
52
- import { SettingsStore as hr } from "./stores/SettingsStore.es.js";
53
- import { TransactionStore as Gr } from "./stores/TransactionStore.es.js";
54
- import { TrendsStore as Lr } from "./stores/TrendsStore.es.js";
55
- import { UserStore as Er } from "./stores/UserStore.es.js";
7
+ import { slot as F } from "./types/Insights.es.js";
8
+ import { AccountNotificationTypes as M, BudgetNotificationTypes as U, InsightNotificationTypes as V, NotificationTypes as x } from "./types/Notification.es.js";
9
+ import { TransactionStatus as W, TransactionType as k } from "./types/Transaction.es.js";
10
+ import { ScreenSize as w } from "./types/ScreenSize.es.js";
11
+ import { Frequency as _, RecurrenceStatus as j, RecurrenceType as v, RepeatingType as J } from "./types/RepeatingTransaction.es.js";
12
+ import { AccountApi as Q } from "./api/AccountApi.es.js";
13
+ import { AnalyticsApi as Y } from "./api/AnalyticsApi.es.js";
14
+ import { AppDataApi as $ } from "./api/AppDataApi.es.js";
15
+ import { BannerApi as ro } from "./api/BannerApi.es.js";
16
+ import { BeatApi as io } from "./api/BeatApi.es.js";
17
+ import { BudgetsApi as eo } from "./api/BudgetsApi.es.js";
18
+ import { CategoryApi as no } from "./api/CategoryApi.es.js";
19
+ import { FinstrongApi as ao } from "./api/FinstrongApi.es.js";
20
+ import { GlobalCopyApi as so } from "./api/GlobalCopyApi.es.js";
21
+ import { GoalApi as Ao } from "./api/GoalApi.es.js";
22
+ import { HelpApi as yo } from "./api/HelpApi.es.js";
23
+ import { HoldingApi as lo } from "./api/HoldingApi.es.js";
24
+ import { MerchantApi as Co } from "./api/MerchantApi.es.js";
25
+ import { NotificationApi as ho } from "./api/NotificationApi.es.js";
26
+ import { RepeatingTransactionsApi as Go } from "./api/RepeatingTransactionsApi.es.js";
27
+ import { ScheduledPaymentsApi as Lo } from "./api/ScheduledPaymentsApi.es.js";
28
+ import { SettingsApi as Eo } from "./api/SettingsApi.es.js";
29
+ import { TransactionApi as Po } from "./api/TransactionApi.es.js";
30
+ import { UserApi as Fo } from "./api/UserApi.es.js";
31
+ import { WidgetApi as Mo } from "./api/WidgetApi.es.js";
32
+ import { AccountStore as Vo } from "./stores/AccountStore.es.js";
33
+ import { AppDataStore as Oo } from "./stores/AppDataStore.es.js";
34
+ import { AnalyticsStore as ko } from "./stores/AnalyticsStore.es.js";
35
+ import { BeatStore as wo } from "./stores/BeatStore.es.js";
36
+ import { BudgetsStore as _o } from "./stores/BudgetsStore.es.js";
37
+ import { CashflowStore as vo } from "./stores/CashflowStore.es.js";
38
+ import { CategoryStore as Ko } from "./stores/CategoryStore.es.js";
39
+ import { ConnectStore as Xo } from "./stores/ConnectStore.es.js";
40
+ import { DebtsStore as Zo } from "./stores/DebtsStore.es.js";
41
+ import { FinstrongStore as or } from "./stores/FinstrongStore.es.js";
42
+ import { GlobalStore as tr } from "./stores/GlobalStore.es.js";
43
+ import { GlobalUiStore as mr } from "./stores/GlobalUiStore.es.js";
44
+ import { GlobalCopyStore as pr } from "./stores/GlobalCopyStore.es.js";
45
+ import { GoalStore as fr } from "./stores/GoalStore.es.js";
46
+ import { HelpStore as cr } from "./stores/HelpStore.es.js";
47
+ import { HoldingStore as Sr } from "./stores/HoldingStore.es.js";
48
+ import { InsightsV2Store as ur } from "./stores/InsightsV2Store.es.js";
49
+ import { MerchantStore as Tr } from "./stores/MerchantStore.es.js";
50
+ import { NetWorthStore as gr } from "./stores/NetWorthStore.es.js";
51
+ import { NotificationStore as Cr } from "./stores/NotificationStore.es.js";
52
+ import { RecurringTransactionsStore as hr } from "./stores/RecurringTransactionsStore.es.js";
53
+ import { SettingsStore as Gr } from "./stores/SettingsStore.es.js";
54
+ import { TransactionStore as Lr } from "./stores/TransactionStore.es.js";
55
+ import { TrendsStore as Er } from "./stores/TrendsStore.es.js";
56
+ import { UserStore as Pr } from "./stores/UserStore.es.js";
56
57
  export {
57
- J as AccountApi,
58
- a as AccountIcon,
59
- f as AccountIconVariants,
60
- F as AccountNotificationTypes,
61
- Mo as AccountStore,
58
+ Q as AccountApi,
59
+ f as AccountIcon,
60
+ a as AccountIconVariants,
61
+ M as AccountNotificationTypes,
62
+ Vo as AccountStore,
62
63
  c as AccountSubType,
63
64
  s as AccountType,
64
65
  S as AccountTypeName,
65
- Q as AnalyticsApi,
66
- Oo as AnalyticsStore,
67
- Y as AppDataApi,
68
- Vo as AppDataStore,
69
- $ as BannerApi,
70
- ro as BeatApi,
71
- ko as BeatStore,
72
- H as BudgetNotificationTypes,
73
- io as BudgetsApi,
74
- wo as BudgetsStore,
75
- _o as CashflowStore,
76
- eo as CategoryApi,
77
- vo as CategoryStore,
78
- Ko as ConnectStore,
66
+ Y as AnalyticsApi,
67
+ ko as AnalyticsStore,
68
+ $ as AppDataApi,
69
+ Oo as AppDataStore,
70
+ ro as BannerApi,
71
+ io as BeatApi,
72
+ wo as BeatStore,
73
+ U as BudgetNotificationTypes,
74
+ eo as BudgetsApi,
75
+ _o as BudgetsStore,
76
+ vo as CashflowStore,
77
+ no as CategoryApi,
78
+ Ko as CategoryStore,
79
+ Xo as ConnectStore,
79
80
  A as ConnectionStatus,
80
81
  u as ConnectionStatusEnums,
81
- Xo as DebtsStore,
82
+ Zo as DebtsStore,
82
83
  y as ErrorStatuses,
83
84
  B as ExpenseStatus,
84
85
  p as Fetch,
85
- no as FinstrongApi,
86
- Zo as FinstrongStore,
87
- w as Frequency,
88
- fo as GlobalCopyApi,
89
- mr as GlobalCopyStore,
90
- or as GlobalStore,
91
- tr as GlobalUiStore,
92
- so as GoalApi,
93
- pr as GoalStore,
86
+ ao as FinstrongApi,
87
+ or as FinstrongStore,
88
+ _ as Frequency,
89
+ so as GlobalCopyApi,
90
+ pr as GlobalCopyStore,
91
+ tr as GlobalStore,
92
+ mr as GlobalUiStore,
93
+ Ao as GoalApi,
94
+ fr as GoalStore,
94
95
  E as GoalType,
95
- Ao as HelpApi,
96
- ar as HelpStore,
97
- yo as HoldingApi,
98
- cr as HoldingStore,
99
- M as InsightNotificationTypes,
100
- Sr as InsightsV2Store,
96
+ yo as HelpApi,
97
+ cr as HelpStore,
98
+ lo as HoldingApi,
99
+ Sr as HoldingStore,
100
+ V as InsightNotificationTypes,
101
+ ur as InsightsV2Store,
101
102
  r as LOCALES,
102
- lo as MerchantApi,
103
- ur as MerchantStore,
103
+ Co as MerchantApi,
104
+ Tr as MerchantStore,
104
105
  I as MetaType,
105
106
  T as MfaStatuses,
106
- Tr as NetWorthStore,
107
+ gr as NetWorthStore,
107
108
  l as NonConnectedStatuses,
108
- Co as NotificationApi,
109
- gr as NotificationStore,
110
- U as NotificationTypes,
109
+ ho as NotificationApi,
110
+ Cr as NotificationStore,
111
+ x as NotificationTypes,
111
112
  g as ProcessingStatuses,
112
113
  d as PropertyType,
113
114
  C as PropertyTypeName,
114
- z as RecurrenceStatus,
115
- _ as RecurrenceType,
116
- Cr as RecurringTransactionsStore,
117
- ho as RepeatingTransactionsApi,
118
- j as RepeatingType,
115
+ j as RecurrenceStatus,
116
+ v as RecurrenceType,
117
+ hr as RecurringTransactionsStore,
118
+ Go as RepeatingTransactionsApi,
119
+ J as RepeatingType,
119
120
  L as ScheduledPaymentTypes,
120
- Go as ScheduledPaymentsApi,
121
- k as ScreenSize,
122
- Lo as SettingsApi,
123
- hr as SettingsStore,
121
+ Lo as ScheduledPaymentsApi,
122
+ w as ScreenSize,
123
+ Eo as SettingsApi,
124
+ Gr as SettingsStore,
124
125
  N as StatusName,
125
126
  P as TrackType,
126
- Eo as TransactionApi,
127
- x as TransactionStatus,
128
- Gr as TransactionStore,
129
- O as TransactionType,
130
- Lr as TrendsStore,
131
- Po as UserApi,
132
- Er as UserStore,
127
+ Po as TransactionApi,
128
+ W as TransactionStatus,
129
+ Lr as TransactionStore,
130
+ k as TransactionType,
131
+ Er as TrendsStore,
132
+ Fo as UserApi,
133
+ Pr as UserStore,
133
134
  b as UserVerification,
134
135
  t as VALID_LOCALES,
135
- Fo as WidgetApi,
136
+ Mo as WidgetApi,
136
137
  i as buildDynamicCopy,
137
- m as getLocale
138
+ m as getLocale,
139
+ F as slot
138
140
  };
@@ -39,7 +39,7 @@ export interface InsightsPayload {
39
39
  widget_type: WidgetType;
40
40
  instance_slot: InstanceSlot;
41
41
  /**
42
- * V1 only. The v2 contract carries everything a block needs on `instance_slot.data_series` rows,
42
+ * V1 only. The v2 contract carries everything a block needs on `instance_slot.data`,
43
43
  * and omits this key entirely (see the LargeTransactionV2 payload). Blocks that still require it
44
44
  * get it as a required field through `BlockProps`, which re-declares it.
45
45
  */
@@ -237,22 +237,39 @@ export interface InstanceSlotRow {
237
237
  primary_text?: string;
238
238
  secondary_text?: string;
239
239
  }
240
+ /**
241
+ * V2: the slots a block's variant filled, keyed by slot name; ditto owns the names and omits any
242
+ * slot it has no value for (`lib/ditto/blocks/<block>.yml`). Read with `slot()`, which names the
243
+ * kind the caller expects.
244
+ */
245
+ export interface InstanceSlotData {
246
+ [slot: string]: unknown;
247
+ }
248
+ /**
249
+ * Reads one slot off a block's `data`; undefined when ditto did not fill it.
250
+ *
251
+ * The caller names the kind, because the slot's kind lives in the block's ditto schema and not
252
+ * here — a block fills slots with whatever its card needs, so no fixed list of kinds would hold
253
+ * (`account_switch_block` alone carries a boolean and `budget_block` a nested object).
254
+ */
255
+ export declare const slot: <T = unknown>(data: InstanceSlotData | undefined, name: string) => T | undefined;
256
+ /**
257
+ * V2: which block renders this beat's content, and what it renders.
258
+ *
259
+ * `block` is optional: a beat whose template has no ditto config arrives as an empty `{}` and the
260
+ * card renders its copy and CTAs alone, so a reader cannot assume a block is named. One interface
261
+ * with `block` optional rather than a union with `Record<string, never>`, which TypeScript absorbs
262
+ * — that union left `block` reading as required and typed a promise it did not keep.
263
+ *
264
+ * `variant` is optional for the same reason — the empty `{}` carries neither. Every ditto beat
265
+ * file that names a block also names a variant, so a *filled* slot always has one; ditto drops a
266
+ * nil variant rather than sending null, which is why the type is `string | null | undefined`.
267
+ */
240
268
  export interface InstanceSlot {
241
- block: BlockType;
242
- variant: string | null;
243
- /**
244
- * V2: the slot's pre-localized header, sent by tupac's `instance_slot_with_text` /
245
- * `instance_slot_with_header` envelopes (e.g. `"July 26"`, the transaction date).
246
- *
247
- * This is *not* a row field: under `with_header` a row's `secondary_text` is the category, so
248
- * the header has to come from here. Absent on the `logos_only` envelopes (micro/notification).
249
- */
250
- header_text?: string;
251
- /**
252
- * V2 (LargeTransactionV2 onward): rows carried inline on the slot. V1 blocks read their data
253
- * from `InsightsPayload.instance_slot_data` instead and leave this absent.
254
- */
255
- data_series?: InstanceSlotRow[];
269
+ block?: BlockType;
270
+ variant?: string | null;
271
+ /** The slots this block's variant declares in ditto. */
272
+ data?: InstanceSlotData;
256
273
  /** Primary line on the hero card, e.g. "Epic Bank Checking, *1234". */
257
274
  account_name?: string;
258
275
  /** Secondary line beneath the name, e.g. "Checking Account" / "Credit Card". */
@@ -0,0 +1,6 @@
1
+ var t = (o, r) => o?.[r];
2
+ export {
3
+ t as slot
4
+ };
5
+
6
+ //# sourceMappingURL=Insights.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Insights.es.js","names":[],"sources":["../../../src/core/types/Insights.ts"],"sourcesContent":["// ============ Core InsightsV2 Types ============\n\nimport { InsightsInstanceSlotData } from './InsightsInstanceSlotData'\n\nexport interface ThemedSVGImageProps {\n divProps?: React.HTMLAttributes<HTMLDivElement>\n image: React.ComponentType<React.SVGProps<SVGSVGElement>>\n isMini?: boolean\n}\n\n/**\n * Emitted by a block when the user drills into a specific datum (e.g. clicks a\n * chart bar). Named fields rather than positional args so blocks with differing\n * shapes can extend this without the call sites transposing values.\n */\nexport interface DrilldownPayload {\n chartBarIndex: number\n tabIndex?: number\n transaction_guid?: string\n block?: string\n}\n\n/**\n * Which envelope a beat was fetched with. `embedded` (the transaction-row pill + details-drawer\n * card) and `notification` are V2 additions; a surface asks for one with `widget_type=` on the fetch.\n */\nexport type WidgetType = 'full' | 'mini' | 'micro' | 'embedded' | 'notification'\n\n/**\n * V2: the transaction-row tag, its own small section of the `embedded` envelope (the same grammar\n * as `description` / `footer`, with room for a tone or an icon later). Omitted for an insight that\n * tags no transaction row. It deliberately is *not* `short_title`, which stays a per-variant\n * attribute with a second consumer (the bank-holiday sub-header).\n */\nexport interface Pill {\n text: string\n}\n\n/**\n * V2: facts a drilldown shows that the card does not (e.g. the account number for the Transaction\n * Details drawer). A flat hash shared by every CTA of the card, omitted when the insight has none.\n * Never carries copy or user actions (memo, tags, hide, flag come from the transaction store).\n */\nexport type DrilldownData = Record<string, string | number | boolean | null>\n\nexport interface InsightsPayload {\n widget_type: WidgetType\n instance_slot: InstanceSlot\n /**\n * V1 only. The v2 contract carries everything a block needs on `instance_slot.data`,\n * and omits this key entirely (see the LargeTransactionV2 payload). Blocks that still require it\n * get it as a required field through `BlockProps`, which re-declares it.\n */\n instance_slot_data?: InsightsInstanceSlotData\n description: Description\n primary_cta?: PrimaryCTA\n secondary_cta?: SecondaryCTA\n title?: string\n sub_title?: Subtitle\n /**\n * V2 rename of `sub_title`: a flat string, with the logo promoted to the payload-level `logo`\n * field below. `sub_title` wins when both are present.\n */\n subtitle?: string\n /** V2: header logo paired with the flat `subtitle`: an entity guid or a status icon (`LogoRef`). */\n logo?: LogoRef\n /** V2: which design branch the backend picked (e.g. `no_merchant`). */\n variant?: string\n /** V2, `embedded` envelope only: the transaction-row pill. */\n pill?: Pill\n /** V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`. */\n drilldown_data?: DrilldownData\n footer?: Footer\n // TODO: Add in_description_cta to insights_payload from backend\n guid: string\n user_guid: string\n client_guid?: string\n /** Template name, e.g. `LargeTransactionV2`. */\n template?: string\n revision?: number\n /** Unix seconds. */\n created_at?: number\n /** Unix seconds. */\n updated_at?: number\n /** Unix seconds. */\n active_at?: number\n displayed_at?: number | null\n dismissed_at: number | null\n cta_clicked_at?: number | null\n has_been_displayed?: boolean\n is_dismissed: boolean\n is_deleted?: boolean\n is_hidden_by_system?: boolean\n is_obsolete?: boolean\n is_refreshable?: boolean\n is_sampled?: boolean\n is_zero_state?: boolean\n status?: string | null\n /**\n * V2 (LargeTransactionV2 onward): the entities the beat is about, carried on the payload so\n * action blocks do not have to reach back out to the beat envelope.\n */\n primary_account_guid?: string | null\n primary_transaction_guid?: string | null\n primary_category_guid?: string | null\n primary_merchant_guid?: string | null\n /**\n * V2: the repeating transaction a subscription beat is about (Upcoming Subscription, Subscription\n * Price Increase). Read by `recurring_transaction_block`, see\n * `actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts`.\n */\n primary_repeating_transaction_guid?: string | null\n}\n\nexport interface Legends {\n label: string\n value: number\n additional_value?: number\n additional_value_type?: string\n value_type?: string\n}\n\nexport interface Logo {\n category_guid?: string\n category_name?: string\n institution_guid?: string\n institution_name?: string\n logo_color?: string\n logo_name?: string\n merchant_guid?: string\n merchant_name?: string\n}\n\nexport interface Subtitle {\n logo?: Logo\n text: string\n}\n\n/**\n * A V2 logo, shared by the header (`InsightsPayload.logo`) and every instance-slot row. It takes\n * one of two shapes:\n *\n * - **Entity**: `guid`, whose prefix (`INS-` / `MCH-` / `CAT-`) picks the logo component, plus an\n * optional `fallback_guid` for when that component's asset cannot load. Today that is the\n * category behind an `MCH-` guid, which `MerchantLogo` shows as a tile when the merchant image\n * is missing.\n * - **Status icon**: `icon` (an mx-icons name, e.g. `warning`) and `color` (a theme palette path,\n * e.g. `error.main`), for subheaders that show a state rather than an entity (V1's\n * `logo_name` / `logo_color`).\n *\n * `alt` is the accessible name for either shape. A logo sends one shape; if it sends both, `icon`\n * wins, as `logo_name` does in V1's `SubHeader`.\n */\nexport interface LogoRef {\n alt?: string\n color?: string\n fallback_guid?: string\n guid?: string\n icon?: string\n}\n\nexport interface CategoryLogo {\n category_guid: string\n category_name: string\n}\n\nexport interface MerchantLogo {\n merchant_guid: string\n merchant_name: string\n}\n\nexport interface InstitutionLogo {\n institution_guid: string\n institution_name: string\n}\n\nexport interface Description {\n text: string\n html_text: string\n}\n\n/**\n * Post message a CTA press sends to the host, resolved by the backend for the beat's current\n * state. Absent/null = the backend has not described one: the frontend uses the template's\n * interim `ctaPostMessages` entry if there is one, else sends no message. `payload` carries only\n * beat-specific extras; the frontend always adds `beat_guid`, `beat_template`, `user_guid` and\n * `action_string`.\n */\nexport interface CtaPostMessageMetadata {\n /** Post message event; defaults to `beat/cta`. */\n event?: string | null\n /** Operation the host should perform, e.g. `op_1`, `op_2`, `op_3`. Defaults to `op_1`. */\n action?: string | null\n /** Beat-specific fields merged into the message metadata (account ids, amounts, ...). */\n payload?: Record<string, unknown> | null\n}\n\nexport interface PrimaryCTA {\n label: string\n block: string\n variant?: string | null\n /**\n * What pressing the CTA does beyond opening its block, named by the backend (ditto\n * `primary_cta_action`, passed through by tupac). Looked up in `insights-v2/ctaActions`;\n * null / absent / unknown means the CTA only opens its block or posts its message.\n */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\nexport interface SecondaryCTA {\n label: string\n block: string\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\nexport interface Footer {\n /** V1: a pre-formatted date string. */\n date?: string\n /**\n * The account label, on both V1 and V2. The backend resolves the plurality: one account sends\n * its name (e.g. `Epic Bank`), several send a localized count (e.g. `2 Accounts`), none sends\n * nothing. There is deliberately no separate `accounts` key — see tupac's `footer_account_label`.\n */\n account?: string\n /**\n * V2 (LargeTransactionV2 onward): unix seconds, formatted by `Footer` for display.\n * Replaces `date`; `date` wins when a beat somehow sends both.\n */\n timestamp?: number\n}\n\n// ============ Instance Slot Types ============\n// Values are the snake_case block names the backend sends on a beat's instance slot; the PascalCase\n// keys stay as friendly references (e.g. BlockType.BarChartBlock === 'bar_chart_block').\nexport const BlockType = {\n AccountBlock: 'account_block',\n AccountSwitchBlock: 'account_switch_block',\n BarChartBlock: 'bar_chart_block',\n BudgetBlock: 'budget_block',\n ImageBlock: 'image_block',\n TransactionBlock: 'transaction_block',\n DonutChartBlock: 'donut_chart_block',\n DoubleBarChartBlock: 'double_bar_chart_block',\n DoubleProgressBarBlock: 'double_progress_bar_block',\n SaveExtraBlock: 'save_extra_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n WithdrawalBlock: 'withdrawal_block',\n} as const\n\nexport type BlockType = (typeof BlockType)[keyof typeof BlockType]\n\n/**\n * A pre-localized row on a V2 instance slot. The backend resolves the copy and formatting; the\n * logo is a `LogoRef` (an entity guid or a status icon, see `logoFromRef`).\n */\nexport interface InstanceSlotRow {\n amount?: number\n logo?: LogoRef\n primary_text?: string\n secondary_text?: string\n}\n\n/**\n * V2: the slots a block's variant filled, keyed by slot name; ditto owns the names and omits any\n * slot it has no value for (`lib/ditto/blocks/<block>.yml`). Read with `slot()`, which names the\n * kind the caller expects.\n */\nexport interface InstanceSlotData {\n [slot: string]: unknown\n}\n\n/**\n * Reads one slot off a block's `data`; undefined when ditto did not fill it.\n *\n * The caller names the kind, because the slot's kind lives in the block's ditto schema and not\n * here — a block fills slots with whatever its card needs, so no fixed list of kinds would hold\n * (`account_switch_block` alone carries a boolean and `budget_block` a nested object).\n */\nexport const slot = <T = unknown>(\n data: InstanceSlotData | undefined,\n name: string,\n): T | undefined => data?.[name] as T | undefined\n\n/**\n * V2: which block renders this beat's content, and what it renders.\n *\n * `block` is optional: a beat whose template has no ditto config arrives as an empty `{}` and the\n * card renders its copy and CTAs alone, so a reader cannot assume a block is named. One interface\n * with `block` optional rather than a union with `Record<string, never>`, which TypeScript absorbs\n * — that union left `block` reading as required and typed a promise it did not keep.\n *\n * `variant` is optional for the same reason — the empty `{}` carries neither. Every ditto beat\n * file that names a block also names a variant, so a *filled* slot always has one; ditto drops a\n * nil variant rather than sending null, which is why the type is `string | null | undefined`.\n */\nexport interface InstanceSlot {\n block?: BlockType\n variant?: string | null\n /** The slots this block's variant declares in ditto. */\n data?: InstanceSlotData\n // Direct Deposit block (Set Up Direct Deposit, Switch Direct Deposit, Missing\n // Interest Rate): account facts carried flat on the slot, beside `data`.\n /** Primary line on the hero card, e.g. \"Epic Bank Checking, *1234\". */\n account_name?: string\n /** Secondary line beneath the name, e.g. \"Checking Account\" / \"Credit Card\". */\n account_type?: string\n /** Status pill label, e.g. \"Direct Deposit Not Set Up\" / \"Interest Rate: 19.99% APR\". */\n status_text?: string\n institution_guid?: string\n institution_name?: string\n}\n"],"mappings":"AA2RA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
@@ -13,7 +13,8 @@ export type { Expense } from './Expense';
13
13
  export { ExpenseStatus, ScheduledPaymentTypes } from './Expense';
14
14
  export type { DynamicCopyElement, GlobalCopy } from './GlobalCopy';
15
15
  export { GoalType, MetaType, TrackType } from './Goal';
16
- export type { ThemedSVGImageProps, DrilldownData, DrilldownPayload, InsightsPayload, InstanceSlot, Pill, WidgetType, InstanceSlotRow, BlockType, Description, PrimaryCTA, CtaPostMessageMetadata, SecondaryCTA, Subtitle, Footer, Logo, LogoRef, CategoryLogo, MerchantLogo, InstitutionLogo, Legends, } from './Insights';
16
+ export type { ThemedSVGImageProps, DrilldownData, DrilldownPayload, InsightsPayload, InstanceSlot, InstanceSlotData, Pill, WidgetType, InstanceSlotRow, BlockType, Description, PrimaryCTA, CtaPostMessageMetadata, SecondaryCTA, Subtitle, Footer, Logo, LogoRef, CategoryLogo, MerchantLogo, InstitutionLogo, Legends, } from './Insights';
17
+ export { slot } from './Insights';
17
18
  export type { Goal, MonthlyCashFlowProfile, RetirementGoalAccount } from './Goal';
18
19
  export type { Debt } from './Debt';
19
20
  export type { GlobalCaptureException, GlobalErrorHandler, GlobalEventHandler } from './Handlers';