@mx-cartographer/experiences 9.7.3 → 9.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/common/components/GlobalAccountFilter.es.js +56 -53
- package/dist/common/components/GlobalAccountFilter.es.js.map +1 -1
- package/dist/common/components/WidgetContainer.es.js +64 -60
- package/dist/common/components/WidgetContainer.es.js.map +1 -1
- package/dist/common/constants/Analytics.d.ts +0 -1
- package/dist/common/constants/Analytics.es.js +0 -1
- package/dist/common/constants/Analytics.es.js.map +1 -1
- package/dist/common/context/GlobalDataProvider.d.ts +6 -2
- package/dist/common/context/GlobalDataProvider.es.js +17 -11
- package/dist/common/context/GlobalDataProvider.es.js.map +1 -1
- package/dist/common/context/hooks.d.ts +4 -1
- package/dist/common/context/hooks.es.js +15 -14
- 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/types/Handlers.d.ts +11 -0
- package/dist/core/types/Insights.d.ts +1 -0
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +77 -65
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +8 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +93 -81
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/DirectDepositCard.es.js +4 -4
- package/dist/insights-v2/index.es.js +13 -13
- package/package.json +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { GlobalErrorHandler, GlobalEventHandler } from '../../core';
|
|
2
|
+
import { GlobalErrorHandler, GlobalEventHandler, GlobalHostMessageHandler } from '../../core';
|
|
3
3
|
import { GlobalStore } from '../../core/stores';
|
|
4
4
|
export interface GlobalStoreContextTypes {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
onError: GlobalErrorHandler;
|
|
7
7
|
onEvent: GlobalEventHandler;
|
|
8
|
+
onHostMessage?: GlobalHostMessageHandler;
|
|
8
9
|
onLoad?: (widgetName: string) => void;
|
|
9
10
|
onPageView: (pageViewEvent: string) => void;
|
|
10
11
|
globalStore: GlobalStore;
|
|
11
12
|
}
|
|
12
|
-
export
|
|
13
|
+
export interface GlobalDataContextValue extends Omit<GlobalStoreContextTypes, 'onHostMessage'> {
|
|
14
|
+
sendHostMessage: GlobalHostMessageHandler;
|
|
15
|
+
}
|
|
16
|
+
export declare const GlobalDataContext: React.Context<GlobalDataContextValue | null>;
|
|
13
17
|
export declare const GlobalDataProvider: React.FC<React.PropsWithChildren<GlobalStoreContextTypes>>;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "react";
|
|
2
2
|
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
-
var x =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
var x = e.createContext(null), p = ({ children: r, globalStore: o, onError: s, onEvent: l, onHostMessage: t, onLoad: n, onPageView: u }) => {
|
|
4
|
+
const a = e.useRef(t);
|
|
5
|
+
a.current = t;
|
|
6
|
+
const c = e.useCallback((v, f) => a.current?.(v, f), []);
|
|
7
|
+
return /* @__PURE__ */ m(x.Provider, {
|
|
8
|
+
value: {
|
|
9
|
+
globalStore: o,
|
|
10
|
+
onError: s,
|
|
11
|
+
onEvent: l,
|
|
12
|
+
onLoad: n,
|
|
13
|
+
onPageView: u,
|
|
14
|
+
sendHostMessage: c,
|
|
15
|
+
children: r
|
|
16
|
+
},
|
|
10
17
|
children: r
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
});
|
|
18
|
+
});
|
|
19
|
+
};
|
|
14
20
|
export {
|
|
15
21
|
x as GlobalDataContext,
|
|
16
22
|
p as GlobalDataProvider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalDataProvider.es.js","names":[],"sources":["../../../src/common/context/GlobalDataProvider.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { GlobalErrorHandler, GlobalEventHandler } from '../../core'\nimport { GlobalStore } from '../../core/stores'\n\nexport interface GlobalStoreContextTypes {\n children: React.ReactNode\n onError: GlobalErrorHandler\n onEvent: GlobalEventHandler\n onLoad?: (widgetName: string) => void\n onPageView: (pageViewEvent: string) => void\n globalStore: GlobalStore\n}\nexport const GlobalDataContext = React.createContext<
|
|
1
|
+
{"version":3,"file":"GlobalDataProvider.es.js","names":[],"sources":["../../../src/common/context/GlobalDataProvider.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { GlobalErrorHandler, GlobalEventHandler, GlobalHostMessageHandler } from '../../core'\nimport { GlobalStore } from '../../core/stores'\n\nexport interface GlobalStoreContextTypes {\n children: React.ReactNode\n onError: GlobalErrorHandler\n onEvent: GlobalEventHandler\n onHostMessage?: GlobalHostMessageHandler\n onLoad?: (widgetName: string) => void\n onPageView: (pageViewEvent: string) => void\n globalStore: GlobalStore\n}\n\nexport interface GlobalDataContextValue extends Omit<GlobalStoreContextTypes, 'onHostMessage'> {\n sendHostMessage: GlobalHostMessageHandler\n}\n\nexport const GlobalDataContext = React.createContext<GlobalDataContextValue | null>(null)\n\nexport const GlobalDataProvider: React.FC<React.PropsWithChildren<GlobalStoreContextTypes>> = ({\n children,\n globalStore,\n onError,\n onEvent,\n onHostMessage,\n onLoad,\n onPageView,\n}) => {\n // A ref, so a host that passes a new onHostMessage each render does not change\n // sendHostMessage and re-run the effects that depend on it.\n const onHostMessageRef = React.useRef(onHostMessage)\n onHostMessageRef.current = onHostMessage\n\n const sendHostMessage = React.useCallback<GlobalHostMessageHandler>(\n (event, metadata) => onHostMessageRef.current?.(event, metadata),\n [],\n )\n\n return (\n <GlobalDataContext.Provider\n value={{\n globalStore,\n onError,\n onEvent,\n onLoad,\n onPageView,\n sendHostMessage,\n children,\n }}\n >\n {children}\n </GlobalDataContext.Provider>\n )\n}\n"],"mappings":";;AAmBA,IAAa,IAAoB,EAAM,cAA6C,IAAI,GAE3E,IAAA,CAAkF,EAC7F,UAAA,GACA,aAAA,GACA,SAAA,GACA,SAAA,GACA,eAAA,GACA,QAAA,GACA,YAAA,EAAA,MACI;AAGJ,QAAM,IAAmB,EAAM,OAAO,CAAa;AACnD,EAAA,EAAiB,UAAU;AAE3B,QAAM,IAAkB,EAAM,YAAA,CAC3B,GAAO,MAAa,EAAiB,UAAU,GAAO,CAAQ,GAC/D,CAAC,CACH;AAEA,SACE,gBAAA,EAAC,EAAkB,UAAnB;AAAA,IACE,OAAO;AAAA,MACL,aAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,iBAAA;AAAA,MACA,UAAA;AAAA,IACF;AAAA,IAEC,UAAA;AAAA,EACyB,CAAA;AAEhC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useGlobalDataContext: (providerName?: string) => import('./GlobalDataProvider').
|
|
1
|
+
export declare const useGlobalDataContext: (providerName?: string) => import('./GlobalDataProvider').GlobalDataContextValue;
|
|
2
2
|
export declare const useAccountStore: () => import('../../core').AccountStore;
|
|
3
3
|
export declare const useAgreementStore: () => import('../../core').AgreementStore;
|
|
4
4
|
export declare const useAppConfig: () => import('../../core').AppConfig;
|
|
@@ -31,6 +31,9 @@ export declare const useError: () => {
|
|
|
31
31
|
export declare const useEvent: () => {
|
|
32
32
|
onEvent: import('../../core').GlobalEventHandler;
|
|
33
33
|
};
|
|
34
|
+
export declare const useHostMessage: () => {
|
|
35
|
+
sendHostMessage: import('../../core').GlobalHostMessageHandler;
|
|
36
|
+
};
|
|
34
37
|
export declare const useLoad: () => {
|
|
35
38
|
onLoad: ((widgetName: string) => void) | undefined;
|
|
36
39
|
};
|
|
@@ -5,15 +5,15 @@ 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
|
-
},
|
|
8
|
+
}, g = () => e("useAccountStore").globalStore.accountStore, i = () => e("useAgreementStore").globalStore.agreementStore, b = () => e("useAppConfig").globalStore.appDataStore.appConfig, c = () => e("useAnalyticsStore").globalStore.analyticsStore, v = () => e("useBudgetsStore").globalStore.budgetsStore, C = () => e("useCashflowStore").globalStore.cashflowStore, d = () => e("useCategoryStore").globalStore.categoryStore, h = () => e("useConnectStore").globalStore.connectStore, p = () => e("useDebtsStore").globalStore.debtsStore, f = () => e("useFinstrongStore").globalStore.finstrongStore, x = () => e("useGlobalStore").globalStore, w = () => e("useGlobalUiStore").globalStore.globalUiStore, m = () => e("globalCopyStore").globalStore.copyStore.copy, G = () => e("useGoalStore").globalStore.goalStore, y = () => e("useHelpStore").globalStore.helpStore, A = () => e("useHoldingStore").globalStore.holdingStore, E = () => e("useInsightsV2Store").globalStore.insightsV2Store, W = () => e("useActionContext").globalStore.insightsV2Store.actionDrawer.context, D = () => e("useMerchantStore").globalStore.merchantStore, H = () => e("useNetWorthStore").globalStore.netWorthStore, T = () => e("useNotificationStore").globalStore.notificationStore, V = () => e("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, M = () => e("useSettingsStore").globalStore.settingsStore, U = () => e("useTransactionStore").globalStore.transactionStore, N = () => e("useTrendsStore").globalStore.trendsStore, P = () => e("useUserStore").globalStore.userStore, L = () => ({ onError: e().onError }), R = () => ({ onEvent: e().onEvent }), B = () => ({ sendHostMessage: e().sendHostMessage }), F = () => ({ onLoad: e().onLoad }), I = () => ({ 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
|
+
}, $ = () => n();
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
g as useAccountStore,
|
|
15
15
|
W as useActionContext,
|
|
16
|
-
|
|
16
|
+
i as useAgreementStore,
|
|
17
17
|
c as useAnalyticsStore,
|
|
18
18
|
b as useAppConfig,
|
|
19
19
|
v as useBudgetsStore,
|
|
@@ -21,8 +21,8 @@ export {
|
|
|
21
21
|
d as useCategoryStore,
|
|
22
22
|
h as useConnectStore,
|
|
23
23
|
p as useDebtStore,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
L as useError,
|
|
25
|
+
R as useEvent,
|
|
26
26
|
f as useFinstrongStore,
|
|
27
27
|
m as useGlobalCopyStore,
|
|
28
28
|
e as useGlobalDataContext,
|
|
@@ -31,19 +31,20 @@ export {
|
|
|
31
31
|
G as useGoalStore,
|
|
32
32
|
y as useHelpStore,
|
|
33
33
|
A as useHoldingStore,
|
|
34
|
+
B as useHostMessage,
|
|
34
35
|
E as useInsightsV2Store,
|
|
35
36
|
F as useLoad,
|
|
36
37
|
D as useMerchantStore,
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
H as useNetWorthStore,
|
|
39
|
+
T as useNotificationStore,
|
|
39
40
|
I as usePageView,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
V as useRecurringTransactionsStore,
|
|
42
|
+
M as useSettingsStore,
|
|
43
|
+
U as useTransactionStore,
|
|
44
|
+
N as useTrendsStore,
|
|
45
|
+
P as useUserStore,
|
|
45
46
|
n as useWidgetContainerContext,
|
|
46
|
-
|
|
47
|
+
$ as useWidgetContainerProvider
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
//# 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 useAgreementStore = () =>\n useGlobalDataContext('useAgreementStore').globalStore.agreementStore\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,mBAAmB,EAAE,YAAY,gBAC3C,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
|
+
{"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 useAgreementStore = () =>\n useGlobalDataContext('useAgreementStore').globalStore.agreementStore\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 useHostMessage = () => ({\n sendHostMessage: useGlobalDataContext().sendHostMessage,\n})\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,mBAAmB,EAAE,YAAY,gBAC3C,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,OAAwB,EACnC,iBAAiB,EAAqB,EAAE,gBAC1C,IACa,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, useAgreementStore, 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';
|
|
1
|
+
export { useAccountStore, useAgreementStore, useAppConfig, useBudgetsStore, useCashflowStore, useCategoryStore, useDebtStore, useError, useEvent, useHostMessage, 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,133 +2,133 @@ import { buildDynamicCopy as r, buildPluralCopy as t } from "../core/utils/Local
|
|
|
2
2
|
import i, { CalendarSelectionTypes as m } 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 d, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
|
|
9
|
-
import { useAccountStore as I, useActionContext as N, useAgreementStore as P, useAppConfig as A, useBudgetsStore as y, useCashflowStore as O, useCategoryStore as b, useDebtStore as W, useError as G, useEvent as L, useFinstrongStore as R, useGlobalCopyStore as U, useGlobalStore as v, useGlobalUiStore as B, useGoalStore as h, useHelpStore as w, useHoldingStore as x,
|
|
10
|
-
import { useInsightsEnabled as
|
|
11
|
-
import { useScreenSize as
|
|
12
|
-
import
|
|
13
|
-
import { formatCurrency as
|
|
14
|
-
import { useRepeatingTransactionEligibility as
|
|
15
|
-
import { useWidgetHeaderStyles as
|
|
16
|
-
import { useWidgetLoadTimer as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { ANALYTICS_EVENTS as
|
|
21
|
-
import { CONNECTIONS_WIDGET_ID as
|
|
22
|
-
import { GlobalStore as
|
|
23
|
-
import { INCOME_ACCOUNT_TYPES as
|
|
24
|
-
import { RECURRENCE_COPY as
|
|
25
|
-
import { LOADING_STATUS as
|
|
26
|
-
import { DEFAULT_DONUT_SIZE as
|
|
27
|
-
import { Sizes as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { GlobalAccountFilter as
|
|
35
|
-
import
|
|
9
|
+
import { useAccountStore as I, useActionContext as N, useAgreementStore as P, useAppConfig as A, useBudgetsStore as y, useCashflowStore as O, useCategoryStore as b, useDebtStore as W, useError as G, useEvent as L, useFinstrongStore as R, useGlobalCopyStore as U, useGlobalStore as v, useGlobalUiStore as B, useGoalStore as h, useHelpStore as w, useHoldingStore as x, useHostMessage as M, useInsightsV2Store as Y, useLoad as H, useMerchantStore as F, useNetWorthStore as z, useNotificationStore as V, usePageView as Z, useRecurringTransactionsStore as K, useSettingsStore as k, useTransactionStore as q, useTrendsStore as j, useUserStore as J, useWidgetContainerProvider as Q } from "./context/hooks.es.js";
|
|
10
|
+
import { useInsightsEnabled as $ } from "./hooks/useInsightsEnabled.es.js";
|
|
11
|
+
import { useScreenSize as ro } from "./hooks/useScreenSize.es.js";
|
|
12
|
+
import eo from "./hooks/usePrevious.es.js";
|
|
13
|
+
import { formatCurrency as mo, formatOrdinal as no, formatPercentage as ao, generateEqualIntervals as so, getCurrencyCodes as po, getPluralRules as uo } from "../core/utils/NumberFormatting.es.js";
|
|
14
|
+
import { useRepeatingTransactionEligibility as lo } from "./hooks/useRepeatingTransactionEligibility.es.js";
|
|
15
|
+
import { useWidgetHeaderStyles as So } from "./hooks/useWidgetHeaderStyles.es.js";
|
|
16
|
+
import { useWidgetLoadTimer as co } from "./hooks/useWidgetLoadTimer.es.js";
|
|
17
|
+
import Eo from "./components/dialog/Dialog.es.js";
|
|
18
|
+
import _o from "./components/drawer/Drawer.es.js";
|
|
19
|
+
import No from "./components/daterangeselector/DateRangeSelector.es.js";
|
|
20
|
+
import { ANALYTICS_EVENTS as Ao } from "./constants/Analytics.es.js";
|
|
21
|
+
import { CONNECTIONS_WIDGET_ID as Oo, CONNECT_WIDGET_ID as bo, CONNECT_WIDGET_SOURCES as Wo, DEEP_LINK_TYPE as Go, MemberConnectionStatus as Lo } from "./constants/Connect.es.js";
|
|
22
|
+
import { GlobalStore as Uo } from "../core/stores/GlobalStore.es.js";
|
|
23
|
+
import { INCOME_ACCOUNT_TYPES as Bo, PAYMENT_ACCOUNT_TYPES as ho, SPENDING_ACCOUNT_TYPES as wo } from "./constants/Account.es.js";
|
|
24
|
+
import { RECURRENCE_COPY as Mo } from "./constants/ScheduledPayment.es.js";
|
|
25
|
+
import { LOADING_STATUS as Ho } from "./constants/SpendingPlan.es.js";
|
|
26
|
+
import { DEFAULT_DONUT_SIZE as zo, DEFAULT_STROKE_WIDTH as Vo } from "./constants/Donut.es.js";
|
|
27
|
+
import { Sizes as Ko, TOUCH_TARGET as ko } from "./constants/Sizes.es.js";
|
|
28
|
+
import jo from "./components/donuts/MultiSegmentDonut.es.js";
|
|
29
|
+
import Qo from "./components/donuts/SingleSegmentDonut.es.js";
|
|
30
|
+
import $o from "./components/ErrorBoundary.es.js";
|
|
31
|
+
import rr from "./components/Error.es.js";
|
|
32
|
+
import er from "./components/MicroWidgetContainer.es.js";
|
|
33
|
+
import mr from "./components/MiniWidgetContainer.es.js";
|
|
34
|
+
import { GlobalAccountFilter as ar } from "./components/GlobalAccountFilter.es.js";
|
|
35
|
+
import pr from "./components/Loader.es.js";
|
|
36
36
|
import { WidgetContainer as fr } from "./components/WidgetContainer.es.js";
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import { ConnectCard as
|
|
50
|
-
import { CurrencyText as
|
|
51
|
-
import { EmptyState as
|
|
52
|
-
import { ListItemAction as
|
|
53
|
-
import { ListItemRow as
|
|
54
|
-
import { ListItemWrapper as
|
|
55
|
-
import { Select as
|
|
56
|
-
import { ToggleButtonListItem as
|
|
57
|
-
import { ToggleListItem as
|
|
58
|
-
import { analyticsSession as
|
|
59
|
-
import { getClientComponentOverrides as
|
|
37
|
+
import Cr from "./components/ConnectWidgetPanel.es.js";
|
|
38
|
+
import gr from "./components/ConnectDrawer.es.js";
|
|
39
|
+
import Tr from "./components/CurrencyDialog.es.js";
|
|
40
|
+
import dr from "./components/CurrencyInput.es.js";
|
|
41
|
+
import _r from "./components/ResponsiveButton.es.js";
|
|
42
|
+
import Nr from "./components/SearchBox.es.js";
|
|
43
|
+
import Ar from "./components/SelectionBox.es.js";
|
|
44
|
+
import Or from "./components/TabContentContainer.es.js";
|
|
45
|
+
import Wr from "./components/IconBacking.es.js";
|
|
46
|
+
import Lr from "./components/DataRow.es.js";
|
|
47
|
+
import Ur from "./components/ZeroState.es.js";
|
|
48
|
+
import Br from "./components/InformationTooltip.es.js";
|
|
49
|
+
import { ConnectCard as wr } from "./components/ConnectCard.es.js";
|
|
50
|
+
import { CurrencyText as Mr } from "./components/CurrencyText.es.js";
|
|
51
|
+
import { EmptyState as Hr } from "./components/EmptyState.es.js";
|
|
52
|
+
import { ListItemAction as zr } from "./components/ListItemAction.es.js";
|
|
53
|
+
import { ListItemRow as Zr } from "./components/ListItemRow.es.js";
|
|
54
|
+
import { ListItemWrapper as kr } from "./components/ListItemWrapper.es.js";
|
|
55
|
+
import { Select as jr } from "./components/Select.es.js";
|
|
56
|
+
import { ToggleButtonListItem as Qr } from "./components/listitems/ToggleButtonListItem.es.js";
|
|
57
|
+
import { ToggleListItem as $r } from "./components/listitems/ToggleListItem.es.js";
|
|
58
|
+
import { analyticsSession as rt } from "./utils/Analytics.es.js";
|
|
59
|
+
import { getClientComponentOverrides as et, getClientCustomizations as it, getClientPaletteOptions as mt, getClientTheme as nt } from "./utils/Theme.es.js";
|
|
60
60
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
Ao as ANALYTICS_EVENTS,
|
|
62
|
+
Oo as CONNECTIONS_WIDGET_ID,
|
|
63
|
+
bo as CONNECT_WIDGET_ID,
|
|
64
|
+
Wo as CONNECT_WIDGET_SOURCES,
|
|
65
65
|
i as Calendar,
|
|
66
66
|
m as CalendarSelectionTypes,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
wr as ConnectCard,
|
|
68
|
+
gr as ConnectDrawer,
|
|
69
|
+
Cr as ConnectWidgetPanel,
|
|
70
|
+
Tr as CurrencyDialog,
|
|
71
|
+
dr as CurrencyInput,
|
|
72
|
+
Mr as CurrencyText,
|
|
73
|
+
Go as DEEP_LINK_TYPE,
|
|
74
|
+
zo as DEFAULT_DONUT_SIZE,
|
|
75
|
+
Vo as DEFAULT_STROKE_WIDTH,
|
|
76
|
+
Lr as DataRow,
|
|
77
|
+
No as DateRangeSelector,
|
|
78
|
+
Eo as Dialog,
|
|
79
79
|
p as Donut,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
_o as Drawer,
|
|
81
|
+
Hr as EmptyState,
|
|
82
|
+
rr as Error,
|
|
83
|
+
$o as ErrorBoundary,
|
|
84
|
+
ar as GlobalAccountFilter,
|
|
85
85
|
c as GlobalDataContext,
|
|
86
86
|
T as GlobalDataProvider,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
87
|
+
Uo as GlobalStore,
|
|
88
|
+
Bo as INCOME_ACCOUNT_TYPES,
|
|
89
|
+
Wr as IconBacking,
|
|
90
|
+
Br as InformationTooltip,
|
|
91
|
+
Ho as LOADING_STATUS,
|
|
92
|
+
zr as ListItemAction,
|
|
93
|
+
Zr as ListItemRow,
|
|
94
|
+
kr as ListItemWrapper,
|
|
95
|
+
pr as Loader,
|
|
96
|
+
Lo as MemberConnectionStatus,
|
|
97
|
+
er as MicroWidgetContainer,
|
|
98
|
+
mr as MiniWidgetContainer,
|
|
99
|
+
jo as MultiSegmentDonut,
|
|
100
|
+
ho as PAYMENT_ACCOUNT_TYPES,
|
|
101
|
+
Mo as RECURRENCE_COPY,
|
|
102
|
+
_r as ResponsiveButton,
|
|
103
|
+
wo as SPENDING_ACCOUNT_TYPES,
|
|
104
|
+
Nr as SearchBox,
|
|
105
|
+
jr as Select,
|
|
106
|
+
Ar as SelectionBox,
|
|
107
|
+
Qo as SingleSegmentDonut,
|
|
108
|
+
Ko as Sizes,
|
|
109
109
|
a as StatusBar,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
ko as TOUCH_TARGET,
|
|
111
|
+
Or as TabContentContainer,
|
|
112
|
+
Qr as ToggleButtonListItem,
|
|
113
|
+
$r as ToggleListItem,
|
|
114
114
|
fr as WidgetContainer,
|
|
115
115
|
d as WidgetContainerContext,
|
|
116
116
|
D as WidgetContainerProvider,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
Ur as ZeroState,
|
|
118
|
+
rt as analyticsSession,
|
|
119
119
|
r as buildDynamicCopy,
|
|
120
120
|
t as buildPluralCopy,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
mo as formatCurrency,
|
|
122
|
+
no as formatOrdinal,
|
|
123
|
+
ao as formatPercentage,
|
|
124
|
+
so as generateEqualIntervals,
|
|
125
|
+
et as getClientComponentOverrides,
|
|
126
|
+
it as getClientCustomizations,
|
|
127
|
+
mt as getClientPaletteOptions,
|
|
128
|
+
nt as getClientTheme,
|
|
129
|
+
po as getCurrencyCodes,
|
|
130
|
+
uo as getPluralRules,
|
|
131
|
+
f as useAccountDisplayName,
|
|
132
132
|
I as useAccountStore,
|
|
133
133
|
N as useActionContext,
|
|
134
134
|
P as useAgreementStore,
|
|
@@ -148,22 +148,23 @@ export {
|
|
|
148
148
|
h as useGoalStore,
|
|
149
149
|
w as useHelpStore,
|
|
150
150
|
x as useHoldingStore,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Y as
|
|
154
|
-
H as
|
|
155
|
-
F as
|
|
156
|
-
z as
|
|
157
|
-
V as
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
k as
|
|
164
|
-
q as
|
|
165
|
-
j as
|
|
166
|
-
J as
|
|
167
|
-
|
|
168
|
-
|
|
151
|
+
M as useHostMessage,
|
|
152
|
+
$ as useInsightsEnabled,
|
|
153
|
+
Y as useInsightsV2Store,
|
|
154
|
+
H as useLoad,
|
|
155
|
+
F as useMerchantStore,
|
|
156
|
+
z as useNetWorthStore,
|
|
157
|
+
V as useNotificationStore,
|
|
158
|
+
Z as usePageView,
|
|
159
|
+
eo as usePrevious,
|
|
160
|
+
K as useRecurringTransactionsStore,
|
|
161
|
+
lo as useRepeatingTransactionEligibility,
|
|
162
|
+
ro as useScreenSize,
|
|
163
|
+
k as useSettingsStore,
|
|
164
|
+
q as useTransactionStore,
|
|
165
|
+
j as useTrendsStore,
|
|
166
|
+
J as useUserStore,
|
|
167
|
+
Q as useWidgetContainerProvider,
|
|
168
|
+
So as useWidgetHeaderStyles,
|
|
169
|
+
co as useWidgetLoadTimer
|
|
169
170
|
};
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
export type GlobalCaptureException = (error: unknown, context?: Record<string, string>) => void;
|
|
2
2
|
export type GlobalErrorHandler = (error: Error, props?: object, errorActionType?: string) => void;
|
|
3
3
|
export type GlobalEventHandler = (event: string, props?: object) => void;
|
|
4
|
+
export interface HostMessageMetadata {
|
|
5
|
+
focusTrap: {
|
|
6
|
+
trapped: boolean;
|
|
7
|
+
};
|
|
8
|
+
widget_size_changed: {
|
|
9
|
+
height: number;
|
|
10
|
+
width: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export type HostMessage = keyof HostMessageMetadata;
|
|
14
|
+
export type GlobalHostMessageHandler = <E extends HostMessage>(event: E, metadata: HostMessageMetadata[E]) => void;
|
|
@@ -240,6 +240,7 @@ export declare const BlockType: {
|
|
|
240
240
|
readonly AccountSwitchBlock: "account_switch_block";
|
|
241
241
|
readonly BarChartBlock: "bar_chart_block";
|
|
242
242
|
readonly BudgetBlock: "budget_block";
|
|
243
|
+
readonly DirectDepositBlock: "direct_deposit_block";
|
|
243
244
|
readonly ImageBlock: "image_block";
|
|
244
245
|
readonly TransactionBlock: "transaction_block";
|
|
245
246
|
readonly DonutChartBlock: "donut_chart_block";
|
|
@@ -1 +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 /**\n * V2: the link inside the description: on the full card a drawer of its own (Low Account\n * Balance's \"Transactions ›\"); on mini and micro the card's action, sent instead of `primary_cta`.\n * Absent when the beat has no link.\n */\n in_description_cta?: InDescriptionCTA\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 /** Draw the `logo_name` icon filled (V2 `ICO-` logos). */\n logo_fill?: boolean\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 /**\n * Drawer block to open. `null` when the CTA opens nothing (ditto `secondary_cta_block: null`,\n * e.g. Fee Detected's \"Contact Support\"): the press posts its message to the host instead.\n */\n block: string | null\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\n/**\n * The description link: its label, the action block it opens and, like a CTA's, the variant that\n * tells that block what to show (ditto's `in_description_cta_variant`, e.g. `low_balance`). On mini\n * and micro it words the card's action; `block` is empty when that action opens no drawer.\n */\nexport interface InDescriptionCTA {\n label: string\n block?: string\n variant?: string | null\n action_key?: string | 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 * `null` (tupac's `footer_account_label` returns nil for a beat with no accounts, as Payday Cash\n * Left Over Status does). There is deliberately no separate `accounts` key.\n */\n account?: string | null\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 DebtsBlock: 'debts_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsOpportunityBlock: 'savings_opportunity_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_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 // Shared across multiple V2 component blocks:\n // `amount` — UpcomingBillBlock (projected bill), SavingsOpportunityBlock (coupon),\n // UpcomingSubscriptionBlock (price per cadence).\n // `merchant_guid` / `merchant_name` — UpcomingBillBlock (bill row logo + name),\n // UpcomingSubscriptionBlock (hero logo + name).\n /** Dollar amount (unformatted); the block formats it as currency. */\n amount?: number\n /** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */\n merchant_guid?: string\n /** Merchant display name — shown as logo alt text and as the merchant/hero label. */\n merchant_name?: string\n // Upcoming Bill block (Projected Bill Payment): the block derives the Sun→Sat week strip\n // around `due_date` at render time.\n /** Due date of the projected bill in ISO form (e.g. `2025-10-30`). */\n due_date?: string\n // Savings Opportunity block (Save An Extra, Potential Savings, Embedded): purely data-driven\n // coupon card. Backend sends the caption and the amount, plus `slot` to toggle the green\n // gradient background when the card is embedded in a parent surface that supplies its own.\n /** Caption shown above the amount, e.g. `Save an extra` or `Potential savings`. */\n label?: string\n /**\n * Whether to render the green gradient slot behind the coupon. Defaults to true. Backend sends\n * `false` when the coupon is embedded in a parent surface that supplies its own background.\n */\n slot?: boolean\n // Upcoming Subscription block: billing cadence for the price pill (`${amount} / ${cadence}`).\n /** Billing cadence word that trails the price, e.g. `month` or `year`. */\n cadence?: string\n // Account block (status on/off-track, deposit, payoff variants): card content carried flat on\n // the slot (the V2 contract drops `instance_slot_data`). `amount`, `label`, `merchant_guid`,\n // `merchant_name`, `institution_guid`, `institution_name` are shared fields declared above.\n /** Secondary line beneath the amount on the standard card, e.g. \"Remaining after expenses\". */\n sub_text?: string\n /** Header bar text (standard card) or the colored category strip label (deposit cards). */\n header_text?: string\n /** Generic-tile icon name used when no merchant/institution logo is available. */\n icon_name?: string\n /** Category guid used to render the deposit-card logo fallback. */\n category_guid?: string\n // Debts block: `amount` is the current balance; the shared account/institution fields above.\n /** Projected payoff date in ISO form (e.g. `2027-03-01`); the block formats it as month + year. */\n payoff_date?: string\n /** Monthly payment toward the debt (unformatted); the block formats it as currency. */\n monthly_payment?: number\n /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */\n interest_rate?: number\n}\n"],"mappings":"AAuTA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
|
|
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 /**\n * V2: the link inside the description: on the full card a drawer of its own (Low Account\n * Balance's \"Transactions ›\"); on mini and micro the card's action, sent instead of `primary_cta`.\n * Absent when the beat has no link.\n */\n in_description_cta?: InDescriptionCTA\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 /** Draw the `logo_name` icon filled (V2 `ICO-` logos). */\n logo_fill?: boolean\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 /**\n * Drawer block to open. `null` when the CTA opens nothing (ditto `secondary_cta_block: null`,\n * e.g. Fee Detected's \"Contact Support\"): the press posts its message to the host instead.\n */\n block: string | null\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\n/**\n * The description link: its label, the action block it opens and, like a CTA's, the variant that\n * tells that block what to show (ditto's `in_description_cta_variant`, e.g. `low_balance`). On mini\n * and micro it words the card's action; `block` is empty when that action opens no drawer.\n */\nexport interface InDescriptionCTA {\n label: string\n block?: string\n variant?: string | null\n action_key?: string | 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 * `null` (tupac's `footer_account_label` returns nil for a beat with no accounts, as Payday Cash\n * Left Over Status does). There is deliberately no separate `accounts` key.\n */\n account?: string | null\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 DirectDepositBlock: 'direct_deposit_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 DebtsBlock: 'debts_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsOpportunityBlock: 'savings_opportunity_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_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 // Shared across multiple V2 component blocks:\n // `amount` — UpcomingBillBlock (projected bill), SavingsOpportunityBlock (coupon),\n // UpcomingSubscriptionBlock (price per cadence).\n // `merchant_guid` / `merchant_name` — UpcomingBillBlock (bill row logo + name),\n // UpcomingSubscriptionBlock (hero logo + name).\n /** Dollar amount (unformatted); the block formats it as currency. */\n amount?: number\n /** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */\n merchant_guid?: string\n /** Merchant display name — shown as logo alt text and as the merchant/hero label. */\n merchant_name?: string\n // Upcoming Bill block (Projected Bill Payment): the block derives the Sun→Sat week strip\n // around `due_date` at render time.\n /** Due date of the projected bill in ISO form (e.g. `2025-10-30`). */\n due_date?: string\n // Savings Opportunity block (Save An Extra, Potential Savings, Embedded): purely data-driven\n // coupon card. Backend sends the caption and the amount, plus `slot` to toggle the green\n // gradient background when the card is embedded in a parent surface that supplies its own.\n /** Caption shown above the amount, e.g. `Save an extra` or `Potential savings`. */\n label?: string\n /**\n * Whether to render the green gradient slot behind the coupon. Defaults to true. Backend sends\n * `false` when the coupon is embedded in a parent surface that supplies its own background.\n */\n slot?: boolean\n // Upcoming Subscription block: billing cadence for the price pill (`${amount} / ${cadence}`).\n /** Billing cadence word that trails the price, e.g. `month` or `year`. */\n cadence?: string\n // Account block (status on/off-track, deposit, payoff variants): card content carried flat on\n // the slot (the V2 contract drops `instance_slot_data`). `amount`, `label`, `merchant_guid`,\n // `merchant_name`, `institution_guid`, `institution_name` are shared fields declared above.\n /** Secondary line beneath the amount on the standard card, e.g. \"Remaining after expenses\". */\n sub_text?: string\n /** Header bar text (standard card) or the colored category strip label (deposit cards). */\n header_text?: string\n /** Generic-tile icon name used when no merchant/institution logo is available. */\n icon_name?: string\n /** Category guid used to render the deposit-card logo fallback. */\n category_guid?: string\n // Debts block: `amount` is the current balance; the shared account/institution fields above.\n /** Projected payoff date in ISO form (e.g. `2027-03-01`); the block formats it as month + year. */\n payoff_date?: string\n /** Monthly payment toward the debt (unformatted); the block formats it as currency. */\n monthly_payment?: number\n /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */\n interest_rate?: number\n}\n"],"mappings":"AAwTA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
|
|
@@ -18,7 +18,7 @@ export type { ThemedSVGImageProps, DrilldownData, DrilldownPayload, InsightsPayl
|
|
|
18
18
|
export { slot } from './Insights';
|
|
19
19
|
export type { Goal, MonthlyCashFlowProfile, RetirementGoalAccount } from './Goal';
|
|
20
20
|
export type { Debt } from './Debt';
|
|
21
|
-
export type { GlobalCaptureException, GlobalErrorHandler, GlobalEventHandler } from './Handlers';
|
|
21
|
+
export type { GlobalCaptureException, GlobalErrorHandler, GlobalEventHandler, GlobalHostMessageHandler, HostMessage, HostMessageMetadata, } from './Handlers';
|
|
22
22
|
export type { HealthScore, HealthScoreReport, MonthlyHealthScore, MonthlySummaries, SpendingFeeTransaction, AllTransactions, } from './Finstrong';
|
|
23
23
|
export type { HelpAlertProps, HelpCategory, HelpContentProps, HelpTopic, HelpType, ImageContentProps, InstitutionData, NoImageContentProps, SectionProps, SelectedTopic, Ticket, } from './Help';
|
|
24
24
|
export type { Institution } from './Institution';
|