@mx-cartographer/experiences 9.4.12-alpha.al1 → 9.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/dist/common/context/hooks.d.ts +1 -0
- package/dist/common/context/hooks.es.js +18 -17
- package/dist/common/context/hooks.es.js.map +1 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +130 -129
- package/dist/core/stores/InsightsV2Store.d.ts +24 -7
- package/dist/core/stores/InsightsV2Store.es.js +18 -23
- package/dist/core/stores/InsightsV2Store.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.d.ts +4 -27
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js +253 -206
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.d.ts +5 -4
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js +12 -20
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/index.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.d.ts +9 -43
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js +12 -79
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js +35 -13
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +17 -13
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +7 -7
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +17 -13
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +19 -25
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/createVariantBlock.d.ts +29 -0
- package/dist/insights-v2/blocks/createVariantBlock.es.js +13 -0
- package/dist/insights-v2/blocks/createVariantBlock.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +24 -25
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +18 -19
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
- package/dist/insights-v2/index.es.js +52 -50
- package/dist/insights-v2/mappings/blocks.es.js +20 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
## [9.4.
|
|
1
|
+
## [9.4.13] - 09-02-2026
|
|
2
2
|
|
|
3
3
|
- **CHANGED** - the theme shape radius is half of `card_corner_radius`, so cards render at 2x the theme radius per MXUI convention (MEW-3445)
|
|
4
4
|
- **CHANGED** - `StyleConfig.corner_radius` replaced by `card_corner_radius` and `button_corner_radius`, matching `ClientStyleProfile` (MEW-3445)
|
|
5
5
|
|
|
6
|
+
## [9.4.12] - 09-02-2026
|
|
7
|
+
|
|
8
|
+
- **CHANGED** - insights-v2 action drilldown refactor for readability: `InsightsV2Store`'s action drawer now carries an opaque `context` envelope (read via the new `useActionContext<T>()` hook) instead of block-specific fields, opened through a single generic `openActionDrawer`; added a `createVariantBlock` factory for variant→component dispatch with an unknown-variant fallback, and simplified `MakeTransferActionBlock`/`layout.ts` (WEC-1774)
|
|
9
|
+
- **ADDED** - `StepChartBlock` to the insights-v2 ChartBlocks barrel export (was missing from the public entry point) (WEC-1774)
|
|
10
|
+
- **FIXED** - insights-v2 post-review cleanups: `BudgetBlock` icon computed as a JSX element instead of a component defined during render (avoids remount); `DonutChart` uses a data-driven React key; removed dead `.recharts-wrapper` selectors from `DoubleBarChart`/`BarchartV2`; wrapped `DefaultPlaceholder` in `observer`; oxfmt formatting in the figma-to-code script (WEC-1774)
|
|
11
|
+
|
|
6
12
|
## [9.4.11] - 09-02-2026
|
|
7
13
|
|
|
8
14
|
- **ADDED** - insights-v2 `AccountSwitchBlock` component block for the discovered-accounts connect insight: two institution logos on a `TransferLogoCard` track, gated on the payload `is_connected` flag — a pending state (link badge) and a connected success state (success badge + `ACCOUNT_CONNECTED_GRADIENT` wash + confetti); registered as `account_switch_block` in `mappings/blocks.ts` (WEC-1310)
|
|
@@ -15,6 +15,7 @@ export declare const useGoalStore: () => import('../../core').GoalStore;
|
|
|
15
15
|
export declare const useHelpStore: () => import('../../core').HelpStore;
|
|
16
16
|
export declare const useHoldingStore: () => import('../../core').HoldingStore;
|
|
17
17
|
export declare const useInsightsV2Store: () => import('../../core').InsightsV2Store;
|
|
18
|
+
export declare const useActionContext: <T>() => T | undefined;
|
|
18
19
|
export declare const useMerchantStore: () => import('../../core').MerchantStore;
|
|
19
20
|
export declare const useNetWorthStore: () => import('../../core').NetWorthStore;
|
|
20
21
|
export declare const useNotificationStore: () => import('../../core').NotificationStore;
|
|
@@ -5,13 +5,14 @@ var e = (t = "useGlobalStore") => {
|
|
|
5
5
|
const o = r.useContext(a);
|
|
6
6
|
if (!o) throw new Error(`${t}() must be used within the GlobalDataContext`);
|
|
7
7
|
return o;
|
|
8
|
-
}, i = () => e("useAccountStore").globalStore.accountStore, g = () => e("useAppConfig").globalStore.appDataStore.appConfig, b = () => e("useAnalyticsStore").globalStore.analyticsStore, c = () => e("useBudgetsStore").globalStore.budgetsStore, v = () => e("useCashflowStore").globalStore.cashflowStore, C = () => e("useCategoryStore").globalStore.categoryStore, d = () => e("useConnectStore").globalStore.connectStore, h = () => e("useDebtsStore").globalStore.debtsStore, p = () => e("useFinstrongStore").globalStore.finstrongStore, f = () => e("useGlobalStore").globalStore,
|
|
8
|
+
}, i = () => e("useAccountStore").globalStore.accountStore, g = () => e("useAppConfig").globalStore.appDataStore.appConfig, b = () => e("useAnalyticsStore").globalStore.analyticsStore, c = () => e("useBudgetsStore").globalStore.budgetsStore, v = () => e("useCashflowStore").globalStore.cashflowStore, C = () => e("useCategoryStore").globalStore.categoryStore, d = () => e("useConnectStore").globalStore.connectStore, h = () => e("useDebtsStore").globalStore.debtsStore, p = () => e("useFinstrongStore").globalStore.finstrongStore, f = () => e("useGlobalStore").globalStore, x = () => e("useGlobalUiStore").globalStore.globalUiStore, w = () => e("globalCopyStore").globalStore.copyStore.copy, G = () => e("useGoalStore").globalStore.goalStore, y = () => e("useHelpStore").globalStore.helpStore, m = () => e("useHoldingStore").globalStore.holdingStore, A = () => e("useInsightsV2Store").globalStore.insightsV2Store, E = () => e("useActionContext").globalStore.insightsV2Store.actionDrawer.context, W = () => e("useMerchantStore").globalStore.merchantStore, D = () => e("useNetWorthStore").globalStore.netWorthStore, T = () => e("useNotificationStore").globalStore.notificationStore, V = () => e("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, U = () => e("useSettingsStore").globalStore.settingsStore, H = () => e("useTransactionStore").globalStore.transactionStore, N = () => e("useTrendsStore").globalStore.trendsStore, P = () => e("useUserStore").globalStore.userStore, L = () => ({ onError: e().onError }), R = () => ({ onEvent: e().onEvent }), B = () => ({ onLoad: e().onLoad }), F = () => ({ onPageView: e().onPageView }), n = (t = "useWidgetContainerContext") => {
|
|
9
9
|
const o = r.useContext(s);
|
|
10
10
|
if (!o) throw new Error(`${t}() must be used within the WidgetContainerContext`);
|
|
11
11
|
return o;
|
|
12
|
-
},
|
|
12
|
+
}, I = () => n();
|
|
13
13
|
export {
|
|
14
14
|
i as useAccountStore,
|
|
15
|
+
E as useActionContext,
|
|
15
16
|
b as useAnalyticsStore,
|
|
16
17
|
g as useAppConfig,
|
|
17
18
|
c as useBudgetsStore,
|
|
@@ -19,29 +20,29 @@ export {
|
|
|
19
20
|
C as useCategoryStore,
|
|
20
21
|
d as useConnectStore,
|
|
21
22
|
h as useDebtStore,
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
L as useError,
|
|
24
|
+
R as useEvent,
|
|
24
25
|
p as useFinstrongStore,
|
|
25
|
-
|
|
26
|
+
w as useGlobalCopyStore,
|
|
26
27
|
e as useGlobalDataContext,
|
|
27
28
|
f as useGlobalStore,
|
|
28
|
-
|
|
29
|
+
x as useGlobalUiStore,
|
|
29
30
|
G as useGoalStore,
|
|
30
31
|
y as useHelpStore,
|
|
31
32
|
m as useHoldingStore,
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
A as useInsightsV2Store,
|
|
34
|
+
B as useLoad,
|
|
34
35
|
W as useMerchantStore,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
D as useNetWorthStore,
|
|
37
|
+
T as useNotificationStore,
|
|
38
|
+
F as usePageView,
|
|
39
|
+
V as useRecurringTransactionsStore,
|
|
40
|
+
U as useSettingsStore,
|
|
41
|
+
H as useTransactionStore,
|
|
42
|
+
N as useTrendsStore,
|
|
43
|
+
P as useUserStore,
|
|
43
44
|
n as useWidgetContainerContext,
|
|
44
|
-
|
|
45
|
+
I as useWidgetContainerProvider
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
//# sourceMappingURL=hooks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.es.js","names":[],"sources":["../../../src/common/context/hooks.tsx"],"sourcesContent":["import React from 'react'\nimport { GlobalDataContext } from './GlobalDataProvider'\nimport { WidgetContainerContext } from './WidgetContainerProvider'\n\nexport const useGlobalDataContext = (providerName = 'useGlobalStore') => {\n const context = React.useContext(GlobalDataContext)\n\n if (!context) {\n throw new Error(`${providerName}() must be used within the GlobalDataContext`)\n }\n return context\n}\n\nexport const useAccountStore = () =>\n useGlobalDataContext('useAccountStore').globalStore.accountStore\nexport const useAppConfig = () =>\n useGlobalDataContext('useAppConfig').globalStore.appDataStore.appConfig\nexport const useAnalyticsStore = () =>\n useGlobalDataContext('useAnalyticsStore').globalStore.analyticsStore\nexport const useBudgetsStore = () =>\n useGlobalDataContext('useBudgetsStore').globalStore.budgetsStore\nexport const useCashflowStore = () =>\n useGlobalDataContext('useCashflowStore').globalStore.cashflowStore\nexport const useCategoryStore = () =>\n useGlobalDataContext('useCategoryStore').globalStore.categoryStore\nexport const useConnectStore = () =>\n useGlobalDataContext('useConnectStore').globalStore.connectStore\nexport const useDebtStore = () => useGlobalDataContext('useDebtsStore').globalStore.debtsStore\nexport const useFinstrongStore = () =>\n useGlobalDataContext('useFinstrongStore').globalStore.finstrongStore\nexport const useGlobalStore = () => useGlobalDataContext('useGlobalStore').globalStore\nexport const useGlobalUiStore = () =>\n useGlobalDataContext('useGlobalUiStore').globalStore.globalUiStore\nexport const useGlobalCopyStore = () =>\n useGlobalDataContext('globalCopyStore').globalStore.copyStore.copy\nexport const useGoalStore = () => useGlobalDataContext('useGoalStore').globalStore.goalStore\nexport const useHelpStore = () => useGlobalDataContext('useHelpStore').globalStore.helpStore\nexport const useHoldingStore = () =>\n useGlobalDataContext('useHoldingStore').globalStore.holdingStore\nexport const useInsightsV2Store = () =>\n useGlobalDataContext('useInsightsV2Store').globalStore.insightsV2Store\nexport const useMerchantStore = () =>\n useGlobalDataContext('useMerchantStore').globalStore.merchantStore\nexport const useNetWorthStore = () =>\n useGlobalDataContext('useNetWorthStore').globalStore.netWorthStore\nexport const useNotificationStore = () =>\n useGlobalDataContext('useNotificationStore').globalStore.notificationStore\nexport const useRecurringTransactionsStore = () =>\n useGlobalDataContext('useRecurringTransactionsStore').globalStore.recurringTransactionsStore\nexport const useSettingsStore = () =>\n useGlobalDataContext('useSettingsStore').globalStore.settingsStore\nexport const useTransactionStore = () =>\n useGlobalDataContext('useTransactionStore').globalStore.transactionStore\nexport const useTrendsStore = () => useGlobalDataContext('useTrendsStore').globalStore.trendsStore\nexport const useUserStore = () => useGlobalDataContext('useUserStore').globalStore.userStore\n\nexport const useError = () => ({ onError: useGlobalDataContext().onError })\nexport const useEvent = () => ({ onEvent: useGlobalDataContext().onEvent })\nexport const useLoad = () => ({ onLoad: useGlobalDataContext().onLoad })\nexport const usePageView = () => ({ onPageView: useGlobalDataContext().onPageView })\n\nexport const useWidgetContainerContext = (providerName = 'useWidgetContainerContext') => {\n const context = React.useContext(WidgetContainerContext)\n\n if (!context) {\n throw new Error(`${providerName}() must be used within the WidgetContainerContext`)\n }\n\n return context\n}\n\nexport const useWidgetContainerProvider = () => useWidgetContainerContext()\n"],"mappings":";;;AAIA,IAAa,IAAA,CAAwB,IAAe,qBAAqB;AACvE,QAAM,IAAU,EAAM,WAAW,CAAiB;AAElD,MAAI,CAAC,EACH,OAAM,IAAI,MAAM,GAAG,CAAA,8CAA0D;AAE/E,SAAO;AACT,GAEa,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MACX,EAAqB,cAAc,EAAE,YAAY,aAAa,WACnD,IAAA,MACX,EAAqB,mBAAmB,EAAE,YAAY,gBAC3C,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MAAqB,EAAqB,eAAe,EAAE,YAAY,YACvE,IAAA,MACX,EAAqB,mBAAmB,EAAE,YAAY,gBAC3C,IAAA,MAAuB,EAAqB,gBAAgB,EAAE,aAC9D,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,UAAU,MACnD,IAAA,MAAqB,EAAqB,cAAc,EAAE,YAAY,WACtE,IAAA,MAAqB,EAAqB,cAAc,EAAE,YAAY,WACtE,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MACX,EAAqB,oBAAoB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"hooks.es.js","names":[],"sources":["../../../src/common/context/hooks.tsx"],"sourcesContent":["import React from 'react'\nimport { GlobalDataContext } from './GlobalDataProvider'\nimport { WidgetContainerContext } from './WidgetContainerProvider'\n\nexport const useGlobalDataContext = (providerName = 'useGlobalStore') => {\n const context = React.useContext(GlobalDataContext)\n\n if (!context) {\n throw new Error(`${providerName}() must be used within the GlobalDataContext`)\n }\n return context\n}\n\nexport const useAccountStore = () =>\n useGlobalDataContext('useAccountStore').globalStore.accountStore\nexport const useAppConfig = () =>\n useGlobalDataContext('useAppConfig').globalStore.appDataStore.appConfig\nexport const useAnalyticsStore = () =>\n useGlobalDataContext('useAnalyticsStore').globalStore.analyticsStore\nexport const useBudgetsStore = () =>\n useGlobalDataContext('useBudgetsStore').globalStore.budgetsStore\nexport const useCashflowStore = () =>\n useGlobalDataContext('useCashflowStore').globalStore.cashflowStore\nexport const useCategoryStore = () =>\n useGlobalDataContext('useCategoryStore').globalStore.categoryStore\nexport const useConnectStore = () =>\n useGlobalDataContext('useConnectStore').globalStore.connectStore\nexport const useDebtStore = () => useGlobalDataContext('useDebtsStore').globalStore.debtsStore\nexport const useFinstrongStore = () =>\n useGlobalDataContext('useFinstrongStore').globalStore.finstrongStore\nexport const useGlobalStore = () => useGlobalDataContext('useGlobalStore').globalStore\nexport const useGlobalUiStore = () =>\n useGlobalDataContext('useGlobalUiStore').globalStore.globalUiStore\nexport const useGlobalCopyStore = () =>\n useGlobalDataContext('globalCopyStore').globalStore.copyStore.copy\nexport const useGoalStore = () => useGlobalDataContext('useGoalStore').globalStore.goalStore\nexport const useHelpStore = () => useGlobalDataContext('useHelpStore').globalStore.helpStore\nexport const useHoldingStore = () =>\n useGlobalDataContext('useHoldingStore').globalStore.holdingStore\nexport const useInsightsV2Store = () =>\n useGlobalDataContext('useInsightsV2Store').globalStore.insightsV2Store\n// Typed accessor for the action drawer's opaque, block-specific context. The\n// reading component must be an `observer` (the store read is what tracks it).\nexport const useActionContext = <T,>(): T | undefined =>\n useGlobalDataContext('useActionContext').globalStore.insightsV2Store.actionDrawer.context as\n | T\n | undefined\nexport const useMerchantStore = () =>\n useGlobalDataContext('useMerchantStore').globalStore.merchantStore\nexport const useNetWorthStore = () =>\n useGlobalDataContext('useNetWorthStore').globalStore.netWorthStore\nexport const useNotificationStore = () =>\n useGlobalDataContext('useNotificationStore').globalStore.notificationStore\nexport const useRecurringTransactionsStore = () =>\n useGlobalDataContext('useRecurringTransactionsStore').globalStore.recurringTransactionsStore\nexport const useSettingsStore = () =>\n useGlobalDataContext('useSettingsStore').globalStore.settingsStore\nexport const useTransactionStore = () =>\n useGlobalDataContext('useTransactionStore').globalStore.transactionStore\nexport const useTrendsStore = () => useGlobalDataContext('useTrendsStore').globalStore.trendsStore\nexport const useUserStore = () => useGlobalDataContext('useUserStore').globalStore.userStore\n\nexport const useError = () => ({ onError: useGlobalDataContext().onError })\nexport const useEvent = () => ({ onEvent: useGlobalDataContext().onEvent })\nexport const useLoad = () => ({ onLoad: useGlobalDataContext().onLoad })\nexport const usePageView = () => ({ onPageView: useGlobalDataContext().onPageView })\n\nexport const useWidgetContainerContext = (providerName = 'useWidgetContainerContext') => {\n const context = React.useContext(WidgetContainerContext)\n\n if (!context) {\n throw new Error(`${providerName}() must be used within the WidgetContainerContext`)\n }\n\n return context\n}\n\nexport const useWidgetContainerProvider = () => useWidgetContainerContext()\n"],"mappings":";;;AAIA,IAAa,IAAA,CAAwB,IAAe,qBAAqB;AACvE,QAAM,IAAU,EAAM,WAAW,CAAiB;AAElD,MAAI,CAAC,EACH,OAAM,IAAI,MAAM,GAAG,CAAA,8CAA0D;AAE/E,SAAO;AACT,GAEa,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MACX,EAAqB,cAAc,EAAE,YAAY,aAAa,WACnD,IAAA,MACX,EAAqB,mBAAmB,EAAE,YAAY,gBAC3C,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MAAqB,EAAqB,eAAe,EAAE,YAAY,YACvE,IAAA,MACX,EAAqB,mBAAmB,EAAE,YAAY,gBAC3C,IAAA,MAAuB,EAAqB,gBAAgB,EAAE,aAC9D,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,UAAU,MACnD,IAAA,MAAqB,EAAqB,cAAc,EAAE,YAAY,WACtE,IAAA,MAAqB,EAAqB,cAAc,EAAE,YAAY,WACtE,IAAA,MACX,EAAqB,iBAAiB,EAAE,YAAY,cACzC,IAAA,MACX,EAAqB,oBAAoB,EAAE,YAAY,iBAG5C,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,gBAAgB,aAAa,SAGvE,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,sBAAsB,EAAE,YAAY,mBAC9C,IAAA,MACX,EAAqB,+BAA+B,EAAE,YAAY,4BACvD,IAAA,MACX,EAAqB,kBAAkB,EAAE,YAAY,eAC1C,IAAA,MACX,EAAqB,qBAAqB,EAAE,YAAY,kBAC7C,IAAA,MAAuB,EAAqB,gBAAgB,EAAE,YAAY,aAC1E,IAAA,MAAqB,EAAqB,cAAc,EAAE,YAAY,WAEtE,IAAA,OAAkB,EAAE,SAAS,EAAqB,EAAE,QAAQ,IAC5D,IAAA,OAAkB,EAAE,SAAS,EAAqB,EAAE,QAAQ,IAC5D,IAAA,OAAiB,EAAE,QAAQ,EAAqB,EAAE,OAAO,IACzD,IAAA,OAAqB,EAAE,YAAY,EAAqB,EAAE,WAAW,IAErE,IAAA,CAA6B,IAAe,gCAAgC;AACvF,QAAM,IAAU,EAAM,WAAW,CAAsB;AAEvD,MAAI,CAAC,EACH,OAAM,IAAI,MAAM,GAAG,CAAA,mDAA+D;AAGpF,SAAO;AACT,GAEa,IAAA,MAAmC,EAA0B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { useAccountStore, useAppConfig, useBudgetsStore, useCashflowStore, useCategoryStore, useDebtStore, useError, useEvent, useLoad, useFinstrongStore, useGlobalStore, useGlobalUiStore, useGlobalCopyStore, useGoalStore, useHelpStore, useHoldingStore, useInsightsV2Store, useMerchantStore, useNetWorthStore, useNotificationStore, usePageView, useRecurringTransactionsStore, useSettingsStore, useTransactionStore, useTrendsStore, useUserStore, useWidgetContainerProvider, } from './hooks';
|
|
1
|
+
export { useAccountStore, useAppConfig, useBudgetsStore, useCashflowStore, useCategoryStore, useDebtStore, useError, useEvent, useLoad, useFinstrongStore, useGlobalStore, useGlobalUiStore, useGlobalCopyStore, useGoalStore, useHelpStore, useHoldingStore, useInsightsV2Store, useActionContext, useMerchantStore, useNetWorthStore, useNotificationStore, usePageView, useRecurringTransactionsStore, useSettingsStore, useTransactionStore, useTrendsStore, useUserStore, useWidgetContainerProvider, } from './hooks';
|
|
2
2
|
export { GlobalDataContext, GlobalDataProvider } from './GlobalDataProvider';
|
|
3
3
|
export { WidgetContainerContext, WidgetContainerProvider } from './WidgetContainerProvider';
|
package/dist/common/index.es.js
CHANGED
|
@@ -2,158 +2,159 @@ import { buildDynamicCopy as r, buildPluralCopy as t } from "../core/utils/Local
|
|
|
2
2
|
import m, { CalendarSelectionTypes as i } from "./components/calendar/Calendar.es.js";
|
|
3
3
|
import a from "./components/charts/StatusBar.es.js";
|
|
4
4
|
import p from "./components/charts/Donut.es.js";
|
|
5
|
-
import
|
|
5
|
+
import f from "./hooks/useAccountDisplayName.es.js";
|
|
6
6
|
import { useCombineEvents as C, useCombinePageviews as S } from "./hooks/useCombineEvents.es.js";
|
|
7
7
|
import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
|
|
8
8
|
import { WidgetContainerContext as E, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
|
|
9
|
-
import { useAccountStore as _,
|
|
10
|
-
import { useInsightsEnabled as
|
|
11
|
-
import { useScreenSize as
|
|
12
|
-
import
|
|
13
|
-
import { useWidgetHeaderStyles as
|
|
14
|
-
import { useWidgetLoadTimer as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
9
|
+
import { useAccountStore as _, useActionContext as N, useAppConfig as A, useBudgetsStore as y, useCashflowStore as P, useCategoryStore as b, 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 k, useTransactionStore as q, useTrendsStore as K, useUserStore as Z, useWidgetContainerProvider as j } from "./context/hooks.es.js";
|
|
10
|
+
import { useInsightsEnabled as Q } from "./hooks/useInsightsEnabled.es.js";
|
|
11
|
+
import { useScreenSize as $ } from "./hooks/useScreenSize.es.js";
|
|
12
|
+
import ro from "./hooks/usePrevious.es.js";
|
|
13
|
+
import { useWidgetHeaderStyles as eo } from "./hooks/useWidgetHeaderStyles.es.js";
|
|
14
|
+
import { useWidgetLoadTimer as io } from "./hooks/useWidgetLoadTimer.es.js";
|
|
15
|
+
import ao from "./components/dialog/Dialog.es.js";
|
|
16
|
+
import po from "./components/drawer/Drawer.es.js";
|
|
17
17
|
import fo from "./components/daterangeselector/DateRangeSelector.es.js";
|
|
18
|
-
import { ANALYTICS_EVENTS as
|
|
19
|
-
import { CONNECTIONS_WIDGET_ID as
|
|
20
|
-
import { formatCurrency as
|
|
21
|
-
import { GlobalStore as
|
|
22
|
-
import { INCOME_ACCOUNT_TYPES as
|
|
23
|
-
import { RECURRENCE_COPY as
|
|
24
|
-
import { LOADING_STATUS as
|
|
25
|
-
import { DEFAULT_DONUT_SIZE as
|
|
26
|
-
import { Sizes as
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { GlobalAccountFilter as
|
|
34
|
-
import
|
|
35
|
-
import { WidgetContainer as
|
|
36
|
-
import
|
|
37
|
-
import
|
|
18
|
+
import { ANALYTICS_EVENTS as Co } from "./constants/Analytics.es.js";
|
|
19
|
+
import { CONNECTIONS_WIDGET_ID as go, CONNECT_WIDGET_ID as co, MemberConnectionStatus as To } from "./constants/Connect.es.js";
|
|
20
|
+
import { formatCurrency as Do, formatOrdinal as Io, formatPercentage as _o, generateEqualIntervals as No, getCurrencyCodes as Ao, getPluralRules as yo } from "../core/utils/NumberFormatting.es.js";
|
|
21
|
+
import { GlobalStore as bo } from "../core/stores/GlobalStore.es.js";
|
|
22
|
+
import { INCOME_ACCOUNT_TYPES as Go, PAYMENT_ACCOUNT_TYPES as Wo, SPENDING_ACCOUNT_TYPES as Lo } from "./constants/Account.es.js";
|
|
23
|
+
import { RECURRENCE_COPY as Uo } from "./constants/ScheduledPayment.es.js";
|
|
24
|
+
import { LOADING_STATUS as Bo } from "./constants/SpendingPlan.es.js";
|
|
25
|
+
import { DEFAULT_DONUT_SIZE as wo, DEFAULT_STROKE_WIDTH as xo } from "./constants/Donut.es.js";
|
|
26
|
+
import { Sizes as Yo, TOUCH_TARGET as Ho } from "./constants/Sizes.es.js";
|
|
27
|
+
import zo from "./components/donuts/MultiSegmentDonut.es.js";
|
|
28
|
+
import ko from "./components/donuts/SingleSegmentDonut.es.js";
|
|
29
|
+
import Ko from "./components/ErrorBoundary.es.js";
|
|
30
|
+
import jo from "./components/Error.es.js";
|
|
31
|
+
import Qo from "./components/MicroWidgetContainer.es.js";
|
|
32
|
+
import $o from "./components/MiniWidgetContainer.es.js";
|
|
33
|
+
import { GlobalAccountFilter as rr } from "./components/GlobalAccountFilter.es.js";
|
|
34
|
+
import er from "./components/Loader.es.js";
|
|
35
|
+
import { WidgetContainer as ir } from "./components/WidgetContainer.es.js";
|
|
36
|
+
import ar from "./components/ConnectDrawer.es.js";
|
|
37
|
+
import pr from "./components/CurrencyDialog.es.js";
|
|
38
38
|
import fr from "./components/CurrencyInput.es.js";
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
39
|
+
import Cr from "./components/ResponsiveButton.es.js";
|
|
40
|
+
import gr from "./components/SearchBox.es.js";
|
|
41
|
+
import Tr from "./components/SelectionBox.es.js";
|
|
42
|
+
import Er from "./components/TabContentContainer.es.js";
|
|
43
|
+
import Ir from "./components/IconBacking.es.js";
|
|
44
|
+
import Nr from "./components/DataRow.es.js";
|
|
45
45
|
import yr from "./components/InformationTooltip.es.js";
|
|
46
|
-
import { ConnectCard as
|
|
47
|
-
import { CurrencyText as
|
|
48
|
-
import { EmptyState as
|
|
49
|
-
import { ListItemAction as
|
|
50
|
-
import { ListItemRow as
|
|
51
|
-
import { ListItemWrapper as
|
|
52
|
-
import { Select as
|
|
53
|
-
import { ToggleButtonListItem as
|
|
54
|
-
import { ToggleListItem as
|
|
55
|
-
import { analyticsSession as
|
|
56
|
-
import { getClientComponentOverrides as
|
|
46
|
+
import { ConnectCard as br } from "./components/ConnectCard.es.js";
|
|
47
|
+
import { CurrencyText as Gr } from "./components/CurrencyText.es.js";
|
|
48
|
+
import { EmptyState as Lr } from "./components/EmptyState.es.js";
|
|
49
|
+
import { ListItemAction as Ur } from "./components/ListItemAction.es.js";
|
|
50
|
+
import { ListItemRow as Br } from "./components/ListItemRow.es.js";
|
|
51
|
+
import { ListItemWrapper as wr } from "./components/ListItemWrapper.es.js";
|
|
52
|
+
import { Select as Mr } from "./components/Select.es.js";
|
|
53
|
+
import { ToggleButtonListItem as Hr } from "./components/listitems/ToggleButtonListItem.es.js";
|
|
54
|
+
import { ToggleListItem as zr } from "./components/listitems/ToggleListItem.es.js";
|
|
55
|
+
import { analyticsSession as kr } from "./utils/Analytics.es.js";
|
|
56
|
+
import { getClientComponentOverrides as Kr, getClientCustomizations as Zr, getClientPaletteOptions as jr, getClientTheme as Jr } from "./utils/Theme.es.js";
|
|
57
57
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
Co as ANALYTICS_EVENTS,
|
|
59
|
+
go as CONNECTIONS_WIDGET_ID,
|
|
60
|
+
co as CONNECT_WIDGET_ID,
|
|
61
61
|
m as Calendar,
|
|
62
62
|
i as CalendarSelectionTypes,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
br as ConnectCard,
|
|
64
|
+
ar as ConnectDrawer,
|
|
65
|
+
pr as CurrencyDialog,
|
|
66
66
|
fr as CurrencyInput,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
Gr as CurrencyText,
|
|
68
|
+
wo as DEFAULT_DONUT_SIZE,
|
|
69
|
+
xo as DEFAULT_STROKE_WIDTH,
|
|
70
|
+
Nr as DataRow,
|
|
71
71
|
fo as DateRangeSelector,
|
|
72
|
-
|
|
72
|
+
ao as Dialog,
|
|
73
73
|
p as Donut,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
po as Drawer,
|
|
75
|
+
Lr as EmptyState,
|
|
76
|
+
jo as Error,
|
|
77
|
+
Ko as ErrorBoundary,
|
|
78
|
+
rr as GlobalAccountFilter,
|
|
79
79
|
c as GlobalDataContext,
|
|
80
80
|
T as GlobalDataProvider,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
bo as GlobalStore,
|
|
82
|
+
Go as INCOME_ACCOUNT_TYPES,
|
|
83
|
+
Ir as IconBacking,
|
|
84
84
|
yr as InformationTooltip,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
Bo as LOADING_STATUS,
|
|
86
|
+
Ur as ListItemAction,
|
|
87
|
+
Br as ListItemRow,
|
|
88
|
+
wr as ListItemWrapper,
|
|
89
|
+
er as Loader,
|
|
90
|
+
To as MemberConnectionStatus,
|
|
91
|
+
Qo as MicroWidgetContainer,
|
|
92
|
+
$o as MiniWidgetContainer,
|
|
93
|
+
zo as MultiSegmentDonut,
|
|
94
|
+
Wo as PAYMENT_ACCOUNT_TYPES,
|
|
95
|
+
Uo as RECURRENCE_COPY,
|
|
96
|
+
Cr as ResponsiveButton,
|
|
97
|
+
Lo as SPENDING_ACCOUNT_TYPES,
|
|
98
|
+
gr as SearchBox,
|
|
99
|
+
Mr as Select,
|
|
100
|
+
Tr as SelectionBox,
|
|
101
|
+
ko as SingleSegmentDonut,
|
|
102
|
+
Yo as Sizes,
|
|
103
103
|
a as StatusBar,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
Ho as TOUCH_TARGET,
|
|
105
|
+
Er as TabContentContainer,
|
|
106
|
+
Hr as ToggleButtonListItem,
|
|
107
|
+
zr as ToggleListItem,
|
|
108
|
+
ir as WidgetContainer,
|
|
109
109
|
E as WidgetContainerContext,
|
|
110
110
|
D as WidgetContainerProvider,
|
|
111
|
-
|
|
111
|
+
kr as analyticsSession,
|
|
112
112
|
r as buildDynamicCopy,
|
|
113
113
|
t as buildPluralCopy,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
Do as formatCurrency,
|
|
115
|
+
Io as formatOrdinal,
|
|
116
|
+
_o as formatPercentage,
|
|
117
|
+
No as generateEqualIntervals,
|
|
118
|
+
Kr as getClientComponentOverrides,
|
|
119
|
+
Zr as getClientCustomizations,
|
|
120
|
+
jr as getClientPaletteOptions,
|
|
121
|
+
Jr as getClientTheme,
|
|
122
|
+
Ao as getCurrencyCodes,
|
|
123
123
|
yo as getPluralRules,
|
|
124
|
-
|
|
124
|
+
f as useAccountDisplayName,
|
|
125
125
|
_ as useAccountStore,
|
|
126
|
-
N as
|
|
126
|
+
N as useActionContext,
|
|
127
|
+
A as useAppConfig,
|
|
127
128
|
y as useBudgetsStore,
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
P as useCashflowStore,
|
|
130
|
+
b as useCategoryStore,
|
|
130
131
|
C as useCombineEvents,
|
|
131
132
|
S as useCombinePageviews,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
133
|
+
O as useDebtStore,
|
|
134
|
+
G as useError,
|
|
135
|
+
W as useEvent,
|
|
136
|
+
L as useFinstrongStore,
|
|
137
|
+
R as useGlobalCopyStore,
|
|
138
|
+
U as useGlobalStore,
|
|
139
|
+
v as useGlobalUiStore,
|
|
140
|
+
B as useGoalStore,
|
|
141
|
+
h as useHelpStore,
|
|
142
|
+
w as useHoldingStore,
|
|
143
|
+
Q as useInsightsEnabled,
|
|
144
|
+
x as useInsightsV2Store,
|
|
145
|
+
M as useLoad,
|
|
146
|
+
Y as useMerchantStore,
|
|
147
|
+
H as useNetWorthStore,
|
|
148
|
+
F as useNotificationStore,
|
|
149
|
+
z as usePageView,
|
|
150
|
+
ro as usePrevious,
|
|
151
|
+
V as useRecurringTransactionsStore,
|
|
152
|
+
$ as useScreenSize,
|
|
153
|
+
k as useSettingsStore,
|
|
154
|
+
q as useTransactionStore,
|
|
155
|
+
K as useTrendsStore,
|
|
156
|
+
Z as useUserStore,
|
|
157
|
+
j as useWidgetContainerProvider,
|
|
158
|
+
eo as useWidgetHeaderStyles,
|
|
159
|
+
io as useWidgetLoadTimer
|
|
159
160
|
};
|
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import { DrilldownPayload } from '../types';
|
|
2
1
|
import { GlobalStore } from './GlobalStore';
|
|
3
2
|
export type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar';
|
|
4
3
|
export interface ActionDrawerState {
|
|
5
4
|
isDrawerOpen: boolean;
|
|
6
5
|
trigger: ActionDrawerTrigger;
|
|
7
|
-
chartBarIndex: number;
|
|
8
|
-
tabIndex: number;
|
|
9
6
|
guid: string;
|
|
7
|
+
/**
|
|
8
|
+
* Block-specific drilldown data, opaque to the store. Each action block defines
|
|
9
|
+
* and reads its own shape (via useActionContext<T>()), so adding a block never
|
|
10
|
+
* widens this envelope. Chart drilldowns put `{ chartBarIndex, tabIndex }` here;
|
|
11
|
+
* CTAs carry none.
|
|
12
|
+
*/
|
|
13
|
+
context: unknown;
|
|
10
14
|
}
|
|
11
15
|
export declare const CLOSED_ACTION_DRAWER: ActionDrawerState;
|
|
16
|
+
interface OpenActionDrawerArgs {
|
|
17
|
+
guid: string;
|
|
18
|
+
trigger: ActionDrawerTrigger;
|
|
19
|
+
context?: unknown;
|
|
20
|
+
}
|
|
12
21
|
/**
|
|
13
|
-
* UI state shared across the insights-v2 widget tree. Owns the action drawer
|
|
14
|
-
*
|
|
15
|
-
*
|
|
22
|
+
* UI state shared across the insights-v2 widget tree. Owns the action drawer so
|
|
23
|
+
* cards, charts, and action blocks coordinate through the store instead of prop
|
|
24
|
+
* drilling. The drawer state is a fixed envelope (isDrawerOpen/guid/trigger) plus
|
|
25
|
+
* an opaque `context` bag, so per-block drilldown data never leaks into this shape.
|
|
16
26
|
*/
|
|
17
27
|
export declare class InsightsV2Store {
|
|
18
28
|
globalStore: GlobalStore;
|
|
19
29
|
actionDrawer: ActionDrawerState;
|
|
20
30
|
constructor(globalStore: GlobalStore);
|
|
31
|
+
/**
|
|
32
|
+
* Generic drawer opener — the only opener a new action block needs. Pass the
|
|
33
|
+
* beat guid, the CTA/source that triggered it, and (optionally) a block-specific
|
|
34
|
+
* context object the block reads back via useActionContext.
|
|
35
|
+
*/
|
|
36
|
+
openActionDrawer: ({ guid, trigger, context }: OpenActionDrawerArgs) => void;
|
|
37
|
+
/** Convenience opener for CTA drawers (no drilldown context). */
|
|
21
38
|
openCtaDrawer: (guid: string, trigger: "primaryCta" | "secondaryCta") => void;
|
|
22
|
-
openChartDrilldown: (guid: string, { chartBarIndex, tabIndex }: DrilldownPayload) => void;
|
|
23
39
|
closeActionDrawer: () => void;
|
|
24
40
|
}
|
|
41
|
+
export {};
|
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
2
|
-
var
|
|
3
|
-
chartBarIndex: 0,
|
|
4
|
-
tabIndex: 0,
|
|
1
|
+
import { makeAutoObservable as a } from "mobx";
|
|
2
|
+
var o = {
|
|
5
3
|
isDrawerOpen: !1,
|
|
6
4
|
trigger: "primaryCta",
|
|
7
|
-
guid: ""
|
|
8
|
-
|
|
5
|
+
guid: "",
|
|
6
|
+
context: void 0
|
|
7
|
+
}, s = class {
|
|
9
8
|
globalStore;
|
|
10
|
-
actionDrawer =
|
|
9
|
+
actionDrawer = o;
|
|
11
10
|
constructor(r) {
|
|
12
|
-
this.globalStore = r,
|
|
11
|
+
this.globalStore = r, a(this);
|
|
13
12
|
}
|
|
14
|
-
|
|
13
|
+
openActionDrawer = ({ guid: r, trigger: e, context: t }) => {
|
|
15
14
|
this.actionDrawer = {
|
|
16
|
-
chartBarIndex: 0,
|
|
17
|
-
tabIndex: 0,
|
|
18
15
|
isDrawerOpen: !0,
|
|
19
|
-
trigger:
|
|
20
|
-
guid: r
|
|
16
|
+
trigger: e,
|
|
17
|
+
guid: r,
|
|
18
|
+
context: t
|
|
21
19
|
};
|
|
22
20
|
};
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
trigger: "chartBar",
|
|
29
|
-
guid: r
|
|
30
|
-
};
|
|
21
|
+
openCtaDrawer = (r, e) => {
|
|
22
|
+
this.openActionDrawer({
|
|
23
|
+
guid: r,
|
|
24
|
+
trigger: e
|
|
25
|
+
});
|
|
31
26
|
};
|
|
32
27
|
closeActionDrawer = () => {
|
|
33
28
|
this.actionDrawer = {
|
|
@@ -38,8 +33,8 @@ var i = {
|
|
|
38
33
|
};
|
|
39
34
|
};
|
|
40
35
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
o as CLOSED_ACTION_DRAWER,
|
|
37
|
+
s as InsightsV2Store
|
|
43
38
|
};
|
|
44
39
|
|
|
45
40
|
//# sourceMappingURL=InsightsV2Store.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type {
|
|
1
|
+
{"version":3,"file":"InsightsV2Store.es.js","names":[],"sources":["../../../src/core/stores/InsightsV2Store.ts"],"sourcesContent":["import { makeAutoObservable } from 'mobx'\n\nimport type { GlobalStore } from './GlobalStore'\n\nexport type ActionDrawerTrigger = 'primaryCta' | 'secondaryCta' | 'chartBar'\n\nexport interface ActionDrawerState {\n isDrawerOpen: boolean\n trigger: ActionDrawerTrigger\n guid: string\n /**\n * Block-specific drilldown data, opaque to the store. Each action block defines\n * and reads its own shape (via useActionContext<T>()), so adding a block never\n * widens this envelope. Chart drilldowns put `{ chartBarIndex, tabIndex }` here;\n * CTAs carry none.\n */\n context: unknown\n}\n\nexport const CLOSED_ACTION_DRAWER: ActionDrawerState = {\n isDrawerOpen: false,\n trigger: 'primaryCta',\n guid: '',\n context: undefined,\n}\n\ninterface OpenActionDrawerArgs {\n guid: string\n trigger: ActionDrawerTrigger\n context?: unknown\n}\n\n/**\n * UI state shared across the insights-v2 widget tree. Owns the action drawer so\n * cards, charts, and action blocks coordinate through the store instead of prop\n * drilling. The drawer state is a fixed envelope (isDrawerOpen/guid/trigger) plus\n * an opaque `context` bag, so per-block drilldown data never leaks into this shape.\n */\nexport class InsightsV2Store {\n globalStore: GlobalStore\n\n actionDrawer: ActionDrawerState = CLOSED_ACTION_DRAWER\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n\n makeAutoObservable(this)\n }\n\n /**\n * Generic drawer opener — the only opener a new action block needs. Pass the\n * beat guid, the CTA/source that triggered it, and (optionally) a block-specific\n * context object the block reads back via useActionContext.\n */\n openActionDrawer = ({ guid, trigger, context }: OpenActionDrawerArgs) => {\n this.actionDrawer = { isDrawerOpen: true, trigger, guid, context }\n }\n\n /** Convenience opener for CTA drawers (no drilldown context). */\n openCtaDrawer = (guid: string, trigger: 'primaryCta' | 'secondaryCta') => {\n this.openActionDrawer({ guid, trigger })\n }\n\n closeActionDrawer = () => {\n // Preserve `trigger` + `context` so the drawer keeps its variant-specific\n // title/content through the slide-out animation (ActionBlockLayer stays\n // mounted while closing). Only flip isDrawerOpen off and clear the beat guid.\n this.actionDrawer = { ...this.actionDrawer, isDrawerOpen: false, guid: '' }\n }\n}\n"],"mappings":";AAmBA,IAAa,IAA0C;AAAA,EACrD,cAAc;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AACX,GAca,IAAb,MAA6B;AAAA,EAC3B;AAAA,EAEA,eAAkC;AAAA,EAElC,YAAY,GAA0B;AACpC,SAAK,cAAc,GAEnB,EAAmB,IAAI;AAAA,EACzB;AAAA,EAOA,mBAAA,CAAoB,EAAE,MAAA,GAAM,SAAA,GAAS,SAAA,EAAA,MAAoC;AACvE,SAAK,eAAe;AAAA,MAAE,cAAc;AAAA,MAAM,SAAA;AAAA,MAAS,MAAA;AAAA,MAAM,SAAA;AAAA,IAAQ;AAAA,EACnE;AAAA,EAGA,gBAAA,CAAiB,GAAc,MAA2C;AACxE,SAAK,iBAAiB;AAAA,MAAE,MAAA;AAAA,MAAM,SAAA;AAAA,IAAQ,CAAC;AAAA,EACzC;AAAA,EAEA,oBAAA,MAA0B;AAIxB,SAAK,eAAe;AAAA,MAAE,GAAG,KAAK;AAAA,MAAc,cAAc;AAAA,MAAO,MAAM;AAAA,IAAG;AAAA,EAC5E;AACF"}
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
description?: string;
|
|
6
|
-
body_content?: string;
|
|
7
|
-
body_description?: string;
|
|
8
|
-
available_text?: string;
|
|
9
|
-
total_remaining_text?: string;
|
|
10
|
-
increment_aria_label?: string;
|
|
11
|
-
decrement_aria_label?: string;
|
|
12
|
-
expenses_text?: string;
|
|
13
|
-
available_balances_text?: string;
|
|
14
|
-
average_monthly_spend_text?: string;
|
|
15
|
-
your_available_balances_text?: string;
|
|
16
|
-
}
|
|
17
|
-
interface MakeTransferActionBlockProps {
|
|
18
|
-
date?: string;
|
|
19
|
-
variant: (typeof variants)[keyof typeof variants];
|
|
20
|
-
svgDateContent?: string;
|
|
21
|
-
availableBalances?: number;
|
|
22
|
-
copy: CopyContent;
|
|
23
|
-
averageMonthlySpend?: number;
|
|
24
|
-
/** SAVE_AN_EXTRA_100: total remaining from the payload; falls back to available − expenses. */
|
|
25
|
-
totalRemaining?: number;
|
|
26
|
-
}
|
|
27
|
-
export declare const MakeTransferActionBlock: ({ variant, svgDateContent, date, copy, availableBalances, averageMonthlySpend, totalRemaining, }: MakeTransferActionBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { MakeTransferVariant, MakeTransferVariantProps } from './layout';
|
|
2
|
+
export declare const MakeTransferActionBlock: ({ variant, slotData, copy, }: MakeTransferVariantProps & {
|
|
3
|
+
variant: MakeTransferVariant;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|