@mx-cartographer/experiences 9.7.109 → 9.7.111
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 +9 -0
- package/dist/common/hooks/useCombineEvents.d.ts +2 -2
- package/dist/common/hooks/useCombineEvents.es.js +11 -11
- package/dist/common/hooks/useCombineEvents.es.js.map +1 -1
- package/dist/core/types/Analytics.d.ts +6 -2
- package/dist/core/types/index.d.ts +1 -1
- package/dist/insights-v2/analytics/resolveAnalyticsEvent.es.js +11 -7
- package/dist/insights-v2/analytics/resolveAnalyticsEvent.es.js.map +1 -1
- package/dist/insights-v2/beatActions.d.ts +1 -0
- package/dist/insights-v2/beatActions.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +3 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/CompactInsightCard.es.js +100 -73
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/components/TransactionListCard.es.js +15 -15
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
- package/dist/microinsights/analytics.d.ts +2 -1
- package/dist/microinsights/analytics.es.js +8 -5
- package/dist/microinsights/analytics.es.js.map +1 -1
- package/dist/microinsights/beatActions.es.js +12 -11
- package/dist/microinsights/beatActions.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +81 -78
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +2 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.es.js +22 -22
- package/dist/microinsights/stores/InsightsMicroWidgetStore.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [9.7.111] - 11-05-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - Insights 2.0 analytics events are flagged `is_insights_v2: true` in their Firefly `metadata` and PostHog properties (MEW2-3444)
|
|
4
|
+
|
|
5
|
+
## [9.7.110] - 11-05-2026
|
|
6
|
+
|
|
7
|
+
- **ADDED** - Duplicate Payment shows its date header, rows and total on the full card, its rows on the mini card, and stacked logos with an error badge on the embedded card, which opens "View Transactions" (WEC-2207)
|
|
8
|
+
- **FIXED** - The date header on transaction cards is now bold and 40px tall, as designed (WEC-2207)
|
|
9
|
+
|
|
1
10
|
## [9.7.109] - 11-05-2026
|
|
2
11
|
|
|
3
12
|
- **CHANGED** - Micro Deposits' full and mini cards each have their own named variant, so the mini card never shows a date (WEC-2109)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AnalyticEventFunction, AnalyticPageviewFunction } from '../../core';
|
|
2
|
-
export declare const useCombineEvents: (events: AnalyticEventFunction[], store: any) => (event: string) => void;
|
|
1
|
+
import { AnalyticEventFunction, AnalyticEventProps, AnalyticPageviewFunction } from '../../core';
|
|
2
|
+
export declare const useCombineEvents: (events: AnalyticEventFunction[], store: any) => (event: string, props?: AnalyticEventProps) => void;
|
|
3
3
|
export declare const useCombinePageviews: (pages: AnalyticPageviewFunction[], store: any) => (event: string) => void;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
const { session: t } =
|
|
4
|
-
return
|
|
5
|
-
r.forEach((
|
|
6
|
-
t ?
|
|
1
|
+
import c from "react";
|
|
2
|
+
var f = (o, i) => {
|
|
3
|
+
const { session: t } = i, s = Object.values(i).reduce((n, e) => t && e?.onAnalyticEvent && typeof e?.onAnalyticEvent == "function" ? [...n, e.onAnalyticEvent] : n, []), r = [...o, ...s];
|
|
4
|
+
return c.useMemo(() => (n, e) => {
|
|
5
|
+
r.forEach((u) => {
|
|
6
|
+
t ? u(n, t, e) : u(n, void 0, e);
|
|
7
7
|
});
|
|
8
8
|
}, [o, t]);
|
|
9
|
-
},
|
|
10
|
-
const { session: t } =
|
|
11
|
-
return
|
|
9
|
+
}, v = (o, i) => {
|
|
10
|
+
const { session: t } = i, s = Object.values(i).reduce((n, e) => t && e?.onAnalyticPageView && typeof e?.onAnalyticPageView == "function" ? [...n, e.onAnalyticPageView] : n, []), r = [...o, ...s];
|
|
11
|
+
return c.useMemo(() => (n) => {
|
|
12
12
|
r.forEach((e) => {
|
|
13
13
|
t ? e(n, t) : e(n);
|
|
14
14
|
});
|
|
15
15
|
}, [o, t]);
|
|
16
16
|
};
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
f as useCombineEvents,
|
|
19
|
+
v as useCombinePageviews
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=useCombineEvents.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCombineEvents.es.js","names":[],"sources":["../../../src/common/hooks/useCombineEvents.tsx"],"sourcesContent":["import React from 'react'\n\nimport { AnalyticEventFunction, AnalyticPageviewFunction } from '../../core'\n\nexport const useCombineEvents = (events: AnalyticEventFunction[], store: any) => {\n const { session } = store\n\n const storeEvents = Object.values(store).reduce((acc: AnalyticEventFunction[], curr: any) => {\n if (session && curr?.onAnalyticEvent && typeof curr?.onAnalyticEvent === 'function') {\n return [...acc, curr.onAnalyticEvent]\n }\n\n return acc\n }, [])\n const eventFunctions = [...events, ...storeEvents]\n\n return React.useMemo(() => {\n return (event: string) => {\n eventFunctions.forEach((e) => {\n if (!session) {\n e(event)\n } else {\n e(event, session)\n }\n })\n }\n }, [events, session])\n}\n\nexport const useCombinePageviews = (pages: AnalyticPageviewFunction[], store: any) => {\n const { session } = store\n\n const storeEvents = Object.values(store).reduce((acc: AnalyticPageviewFunction[], curr: any) => {\n if (session && curr?.onAnalyticPageView && typeof curr?.onAnalyticPageView === 'function') {\n return [...acc, curr.onAnalyticPageView]\n }\n\n return acc\n }, [])\n const eventFunctions = [...pages, ...storeEvents]\n\n return React.useMemo(() => {\n return (event: string) => {\n eventFunctions.forEach((e) => {\n if (!session) {\n e(event)\n } else {\n e(event, session)\n }\n })\n }\n }, [pages, session])\n}\n"],"mappings":";AAIA,IAAa,IAAA,CAAoB,GAAiC,MAAe;AAC/E,QAAM,EAAE,SAAA,EAAA,IAAY,GAEd,IAAc,OAAO,OAAO,CAAK,EAAE,OAAA,CAAQ,GAA8B,MACzE,KAAW,GAAM,mBAAmB,OAAO,GAAM,mBAAoB,aAChE,CAAC,GAAG,GAAK,EAAK,eAAe,IAG/B,GACN,CAAC,CAAC,GACC,IAAiB,CAAC,GAAG,GAAQ,GAAG,CAAW;AAEjD,SAAO,EAAM,QAAA,MACX,CAAQ,
|
|
1
|
+
{"version":3,"file":"useCombineEvents.es.js","names":[],"sources":["../../../src/common/hooks/useCombineEvents.tsx"],"sourcesContent":["import React from 'react'\n\nimport { AnalyticEventFunction, AnalyticEventProps, AnalyticPageviewFunction } from '../../core'\n\nexport const useCombineEvents = (events: AnalyticEventFunction[], store: any) => {\n const { session } = store\n\n const storeEvents = Object.values(store).reduce((acc: AnalyticEventFunction[], curr: any) => {\n if (session && curr?.onAnalyticEvent && typeof curr?.onAnalyticEvent === 'function') {\n return [...acc, curr.onAnalyticEvent]\n }\n\n return acc\n }, [])\n const eventFunctions = [...events, ...storeEvents]\n\n return React.useMemo(() => {\n return (event: string, props?: AnalyticEventProps) => {\n eventFunctions.forEach((e) => {\n if (!session) {\n e(event, undefined, props)\n } else {\n e(event, session, props)\n }\n })\n }\n }, [events, session])\n}\n\nexport const useCombinePageviews = (pages: AnalyticPageviewFunction[], store: any) => {\n const { session } = store\n\n const storeEvents = Object.values(store).reduce((acc: AnalyticPageviewFunction[], curr: any) => {\n if (session && curr?.onAnalyticPageView && typeof curr?.onAnalyticPageView === 'function') {\n return [...acc, curr.onAnalyticPageView]\n }\n\n return acc\n }, [])\n const eventFunctions = [...pages, ...storeEvents]\n\n return React.useMemo(() => {\n return (event: string) => {\n eventFunctions.forEach((e) => {\n if (!session) {\n e(event)\n } else {\n e(event, session)\n }\n })\n }\n }, [pages, session])\n}\n"],"mappings":";AAIA,IAAa,IAAA,CAAoB,GAAiC,MAAe;AAC/E,QAAM,EAAE,SAAA,EAAA,IAAY,GAEd,IAAc,OAAO,OAAO,CAAK,EAAE,OAAA,CAAQ,GAA8B,MACzE,KAAW,GAAM,mBAAmB,OAAO,GAAM,mBAAoB,aAChE,CAAC,GAAG,GAAK,EAAK,eAAe,IAG/B,GACN,CAAC,CAAC,GACC,IAAiB,CAAC,GAAG,GAAQ,GAAG,CAAW;AAEjD,SAAO,EAAM,QAAA,MACX,CAAQ,GAAe,MAA+B;AACpD,IAAA,EAAe,QAAA,CAAS,MAAM;AAC5B,MAAK,IAGH,EAAE,GAAO,GAAS,CAAK,IAFvB,EAAE,GAAO,QAAW,CAAK;AAAA,IAI7B,CAAC;AAAA,EACH,GACC,CAAC,GAAQ,CAAO,CAAC;AACtB,GAEa,IAAA,CAAuB,GAAmC,MAAe;AACpF,QAAM,EAAE,SAAA,EAAA,IAAY,GAEd,IAAc,OAAO,OAAO,CAAK,EAAE,OAAA,CAAQ,GAAiC,MAC5E,KAAW,GAAM,sBAAsB,OAAO,GAAM,sBAAuB,aACtE,CAAC,GAAG,GAAK,EAAK,kBAAkB,IAGlC,GACN,CAAC,CAAC,GACC,IAAiB,CAAC,GAAG,GAAO,GAAG,CAAW;AAEhD,SAAO,EAAM,QAAA,MACX,CAAQ,MAAkB;AACxB,IAAA,EAAe,QAAA,CAAS,MAAM;AAC5B,MAAK,IAGH,EAAE,GAAO,CAAO,IAFhB,EAAE,CAAK;AAAA,IAIX,CAAC;AAAA,EACH,GACC,CAAC,GAAO,CAAO,CAAC;AACrB"}
|
|
@@ -10,6 +10,7 @@ export type AnalyticsEvent = {
|
|
|
10
10
|
created_at: string;
|
|
11
11
|
host: string;
|
|
12
12
|
label: string;
|
|
13
|
+
metadata?: string | null;
|
|
13
14
|
name: string;
|
|
14
15
|
session_id: string;
|
|
15
16
|
user_agent: string;
|
|
@@ -30,7 +31,7 @@ export type AnalyticsPageview = {
|
|
|
30
31
|
user_agent: string;
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
export type BasicAnalyticsEvent = Pick<AnalyticsEvent['analytics_event'], 'action' | 'category' | 'label' | 'value'>;
|
|
34
|
+
export type BasicAnalyticsEvent = Pick<AnalyticsEvent['analytics_event'], 'action' | 'category' | 'label' | 'value' | 'metadata'>;
|
|
34
35
|
export type BasicAnalyticsPageview = Pick<AnalyticsPageview['analytics_pageview'], 'name' | 'detailed_path' | 'metadata' | 'path'>;
|
|
35
36
|
export type AnalyticsSession = {
|
|
36
37
|
browser_name: string;
|
|
@@ -40,7 +41,10 @@ export type AnalyticsSession = {
|
|
|
40
41
|
product_name: string;
|
|
41
42
|
product_version: string;
|
|
42
43
|
};
|
|
43
|
-
export type
|
|
44
|
+
export type AnalyticEventProps = {
|
|
45
|
+
metadata?: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
export type AnalyticEventFunction = (event: string, session?: AnalyticsSessionInstance | null, props?: AnalyticEventProps) => void;
|
|
44
48
|
export type AnalyticPageviewFunction = (page: string, session?: AnalyticsSessionInstance | null) => void;
|
|
45
49
|
export interface AnalyticsEventsObjectType extends BasicAnalyticsEvent {
|
|
46
50
|
instanceId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { Account, DetailedAccount, HistoricalAccountBalance, Member, MonthlyAccountBalance, } from './Account';
|
|
2
2
|
export type { Agreement } from './Agreement';
|
|
3
3
|
export { AccountIcon, AccountIconVariants, AccountSubType, AccountType, AccountTypeName, ConnectionStatus, ConnectionStatusEnums, ErrorStatuses, MfaStatuses, NonConnectedStatuses, ProcessingStatuses, PropertyType, PropertyTypeName, StatusName, } from './Account';
|
|
4
|
-
export type { AnalyticsEvent, AnalyticsPageview, BasicAnalyticsEvent, BasicAnalyticsPageview, AnalyticsSession, AnalyticEventFunction, AnalyticPageviewFunction, AnalyticsSessionInstance, } from './Analytics';
|
|
4
|
+
export type { AnalyticsEvent, AnalyticsPageview, BasicAnalyticsEvent, BasicAnalyticsPageview, AnalyticsSession, AnalyticEventFunction, AnalyticEventProps, AnalyticPageviewFunction, AnalyticsSessionInstance, } from './Analytics';
|
|
5
5
|
export type { AppConfig, AppData, Banner, ClientConfig, Config, Options, StyleConfig, } from './AppData';
|
|
6
6
|
export type { Beat, DataSeries } from './Beat';
|
|
7
7
|
export { UserVerification } from './Beat';
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { sentenceCaseTemplate as a } from "./analyticsEventsConfig.es.js";
|
|
2
|
-
var
|
|
3
|
-
const
|
|
2
|
+
var r = (e, t) => typeof e == "function" ? e(t) : e, v = (e, t) => {
|
|
3
|
+
const s = r(e.action, t), o = r(e.category, t), p = r(e.value, t);
|
|
4
4
|
return {
|
|
5
|
-
...
|
|
6
|
-
...
|
|
7
|
-
...(
|
|
5
|
+
...s && { action: s },
|
|
6
|
+
...o && { category: o },
|
|
7
|
+
...(s || o) && { label: a(t.template) },
|
|
8
8
|
...p && { value: p },
|
|
9
|
+
metadata: { is_insights_v2: !0 },
|
|
9
10
|
...e.postHog && { postHog: {
|
|
10
11
|
eventName: e.postHog.eventName,
|
|
11
|
-
properties:
|
|
12
|
+
properties: {
|
|
13
|
+
...e.postHog.properties?.(t),
|
|
14
|
+
is_insights_v2: !0
|
|
15
|
+
}
|
|
12
16
|
} }
|
|
13
17
|
};
|
|
14
18
|
};
|
|
15
19
|
export {
|
|
16
|
-
|
|
20
|
+
v as resolveAnalyticsEvent,
|
|
17
21
|
a as sentenceCaseTemplate
|
|
18
22
|
};
|
|
19
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAnalyticsEvent.es.js","names":[],"sources":["../../../src/insights-v2/analytics/resolveAnalyticsEvent.ts"],"sourcesContent":["import type { AnalyticsEventPayload } from '../beatActions'\nimport type { Beat } from '../../core'\nimport { sentenceCaseTemplate, type AnalyticsEventConfigEntry } from './analyticsEventsConfig'\n\nexport { sentenceCaseTemplate }\n\nconst resolve = (\n value: string | ((beat: Beat) => string) | undefined,\n beat: Beat,\n): string | undefined => (typeof value === 'function' ? value(beat) : value)\n\n// Resolves a catalogue entry (e.g. ANALYTICS_EVENTS_CONFIG.PRIMARY_ACTION_SELECTED) + beat into\n// a final analytics payload. Takes the entry directly, not a lookup key: the call site already\n// has the entry via property access, so there is nothing to look up and nothing to mistype.\nexport const resolveAnalyticsEvent = (\n config: AnalyticsEventConfigEntry,\n beat: Beat,\n): AnalyticsEventPayload => {\n const action = resolve(config.action, beat)\n const category = resolve(config.category, beat)\n const value = resolve(config.value, beat)\n\n return {\n ...(action && { action }),\n ...(category && { category }),\n ...((action || category) && { label: sentenceCaseTemplate(beat.template) }),\n ...(value && { value }),\n ...(config.postHog && {\n postHog: {\n eventName: config.postHog.eventName,\n properties: config.postHog.properties?.(beat)
|
|
1
|
+
{"version":3,"file":"resolveAnalyticsEvent.es.js","names":[],"sources":["../../../src/insights-v2/analytics/resolveAnalyticsEvent.ts"],"sourcesContent":["import type { AnalyticsEventPayload } from '../beatActions'\nimport type { Beat } from '../../core'\nimport { sentenceCaseTemplate, type AnalyticsEventConfigEntry } from './analyticsEventsConfig'\n\nexport { sentenceCaseTemplate }\n\nconst resolve = (\n value: string | ((beat: Beat) => string) | undefined,\n beat: Beat,\n): string | undefined => (typeof value === 'function' ? value(beat) : value)\n\n// Resolves a catalogue entry (e.g. ANALYTICS_EVENTS_CONFIG.PRIMARY_ACTION_SELECTED) + beat into\n// a final analytics payload. Takes the entry directly, not a lookup key: the call site already\n// has the entry via property access, so there is nothing to look up and nothing to mistype.\nexport const resolveAnalyticsEvent = (\n config: AnalyticsEventConfigEntry,\n beat: Beat,\n): AnalyticsEventPayload => {\n const action = resolve(config.action, beat)\n const category = resolve(config.category, beat)\n const value = resolve(config.value, beat)\n\n return {\n ...(action && { action }),\n ...(category && { category }),\n ...((action || category) && { label: sentenceCaseTemplate(beat.template) }),\n ...(value && { value }),\n metadata: { is_insights_v2: true },\n ...(config.postHog && {\n postHog: {\n eventName: config.postHog.eventName,\n properties: { ...config.postHog.properties?.(beat), is_insights_v2: true },\n },\n }),\n }\n}\n"],"mappings":";AAMA,IAAM,IAAA,CACJ,GACA,MACwB,OAAO,KAAU,aAAa,EAAM,CAAI,IAAI,GAKzD,IAAA,CACX,GACA,MAC0B;AAC1B,QAAM,IAAS,EAAQ,EAAO,QAAQ,CAAI,GACpC,IAAW,EAAQ,EAAO,UAAU,CAAI,GACxC,IAAQ,EAAQ,EAAO,OAAO,CAAI;AAExC,SAAO;AAAA,IACL,GAAI,KAAU,EAAE,QAAA,EAAO;AAAA,IACvB,GAAI,KAAY,EAAE,UAAA,EAAS;AAAA,IAC3B,IAAK,KAAU,MAAa,EAAE,OAAO,EAAqB,EAAK,QAAQ,EAAE;AAAA,IACzE,GAAI,KAAS,EAAE,OAAA,EAAM;AAAA,IACrB,UAAU,EAAE,gBAAgB,GAAK;AAAA,IACjC,GAAI,EAAO,WAAW,EACpB,SAAS;AAAA,MACP,WAAW,EAAO,QAAQ;AAAA,MAC1B,YAAY;AAAA,QAAE,GAAG,EAAO,QAAQ,aAAa,CAAI;AAAA,QAAG,gBAAgB;AAAA,MAAK;AAAA,IAC3E,EACF;AAAA,EACF;AACF"}
|
|
@@ -28,6 +28,7 @@ export interface AnalyticsEventPayload {
|
|
|
28
28
|
label?: string;
|
|
29
29
|
/** Detail stored with the Firefly event, e.g. a survey reason. */
|
|
30
30
|
value?: string;
|
|
31
|
+
metadata?: Record<string, unknown>;
|
|
31
32
|
postHog?: {
|
|
32
33
|
eventName: string;
|
|
33
34
|
properties?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beatActions.es.js","names":[],"sources":["../../src/insights-v2/beatActions.tsx"],"sourcesContent":["import { createContext, useContext, type ReactNode } from 'react'\n\nimport type { Beat } from '../core'\nimport type { DismissType } from './components/DismissInsightDialog'\nimport type { FeedbackDialogCloseReason } from './components/FeedbackDialog'\n\nexport type InsightMenuAction = 'helpful' | 'not_helpful' | 'hide'\nexport type InsightRating = 'helpful' | 'not_helpful'\n\nexport interface MenuActionHandlers {\n onAction: (action: InsightMenuAction) => void\n onOpen?: () => void\n disabled?: boolean\n}\n\nexport interface UpdateParams {\n beatGuid: string\n}\n\nexport interface FeedbackParams {\n beatGuid: string\n source: InsightRating | 'hide' | 'cta' | 'not_interested'\n option: string\n detail?: string\n}\n\nexport interface DismissParams {\n beatGuid: string\n type: DismissType\n}\n\n// Raw analytics payload for the host.\nexport interface AnalyticsEventPayload {\n action?: string\n category?: string\n label?: string\n /** Detail stored with the Firefly event, e.g. a survey reason. */\n value?: string\n postHog?: {\n eventName: string\n properties?: Record<string, unknown>\n }\n}\n/** A host-side CTA effect. See ctaActions/README.md. */\nexport interface CtaActionParams {\n beatGuid: string\n name: string\n params?: Record<string, unknown>\n}\n\n/** Host callbacks for a beat card. */\nexport interface BeatActions {\n onMenuAction?: MenuActionHandlers\n onUpdate?: (params: UpdateParams) => void\n onSubmitFeedback?: (params: FeedbackParams) => void | Promise<void>\n onDismissInsight?: (params: DismissParams) => void\n onUndoDismiss?: (params: { beatGuid: string }) => void\n /** The survey for `variant` opened (the hide survey, from \"Leave feedback\"). */\n onFeedbackSurveyShown?: (variant: InsightRating | 'hide') => void\n /** The survey closed unsent; `variant` says which one it was. */\n onFeedbackDialogClose?: (\n reason: FeedbackDialogCloseReason,\n variant?: InsightRating | 'hide',\n ) => void\n onFeedbackDialogBack?: () => void\n onFeedbackTextFocus?: () => void\n // Raw analytics callback; use useAnalyticsEvent() instead.\n onAnalyticsEvent?: (payload: AnalyticsEventPayload) => void\n // Host's contact-support flow for a contact_support_block CTA.\n onContactSupport?: () => void\n onCtaAction?: (params: CtaActionParams) => Promise<void> | void\n}\n\n// BeatActions plus beat, for useAnalyticsEvent().\ninterface BeatActionsContextValue extends BeatActions {\n beat?: Beat\n}\n\nconst BeatActionsContext = createContext<BeatActionsContextValue>({})\n\nexport const BeatActionsProvider = ({\n value,\n children,\n}: {\n value: BeatActionsContextValue\n children: ReactNode\n}) => <BeatActionsContext.Provider value={value}>{children}</BeatActionsContext.Provider>\n\nexport const useBeatActions = () => useContext(BeatActionsContext)\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"beatActions.es.js","names":[],"sources":["../../src/insights-v2/beatActions.tsx"],"sourcesContent":["import { createContext, useContext, type ReactNode } from 'react'\n\nimport type { Beat } from '../core'\nimport type { DismissType } from './components/DismissInsightDialog'\nimport type { FeedbackDialogCloseReason } from './components/FeedbackDialog'\n\nexport type InsightMenuAction = 'helpful' | 'not_helpful' | 'hide'\nexport type InsightRating = 'helpful' | 'not_helpful'\n\nexport interface MenuActionHandlers {\n onAction: (action: InsightMenuAction) => void\n onOpen?: () => void\n disabled?: boolean\n}\n\nexport interface UpdateParams {\n beatGuid: string\n}\n\nexport interface FeedbackParams {\n beatGuid: string\n source: InsightRating | 'hide' | 'cta' | 'not_interested'\n option: string\n detail?: string\n}\n\nexport interface DismissParams {\n beatGuid: string\n type: DismissType\n}\n\n// Raw analytics payload for the host.\nexport interface AnalyticsEventPayload {\n action?: string\n category?: string\n label?: string\n /** Detail stored with the Firefly event, e.g. a survey reason. */\n value?: string\n metadata?: Record<string, unknown>\n postHog?: {\n eventName: string\n properties?: Record<string, unknown>\n }\n}\n/** A host-side CTA effect. See ctaActions/README.md. */\nexport interface CtaActionParams {\n beatGuid: string\n name: string\n params?: Record<string, unknown>\n}\n\n/** Host callbacks for a beat card. */\nexport interface BeatActions {\n onMenuAction?: MenuActionHandlers\n onUpdate?: (params: UpdateParams) => void\n onSubmitFeedback?: (params: FeedbackParams) => void | Promise<void>\n onDismissInsight?: (params: DismissParams) => void\n onUndoDismiss?: (params: { beatGuid: string }) => void\n /** The survey for `variant` opened (the hide survey, from \"Leave feedback\"). */\n onFeedbackSurveyShown?: (variant: InsightRating | 'hide') => void\n /** The survey closed unsent; `variant` says which one it was. */\n onFeedbackDialogClose?: (\n reason: FeedbackDialogCloseReason,\n variant?: InsightRating | 'hide',\n ) => void\n onFeedbackDialogBack?: () => void\n onFeedbackTextFocus?: () => void\n // Raw analytics callback; use useAnalyticsEvent() instead.\n onAnalyticsEvent?: (payload: AnalyticsEventPayload) => void\n // Host's contact-support flow for a contact_support_block CTA.\n onContactSupport?: () => void\n onCtaAction?: (params: CtaActionParams) => Promise<void> | void\n}\n\n// BeatActions plus beat, for useAnalyticsEvent().\ninterface BeatActionsContextValue extends BeatActions {\n beat?: Beat\n}\n\nconst BeatActionsContext = createContext<BeatActionsContextValue>({})\n\nexport const BeatActionsProvider = ({\n value,\n children,\n}: {\n value: BeatActionsContextValue\n children: ReactNode\n}) => <BeatActionsContext.Provider value={value}>{children}</BeatActionsContext.Provider>\n\nexport const useBeatActions = () => useContext(BeatActionsContext)\n"],"mappings":";;AA+EA,IAAM,IAAqB,EAAuC,CAAC,CAAC,GAEvD,IAAA,CAAuB,EAClC,OAAA,GACA,UAAA,EAAA,MAII,gBAAA,EAAC,EAAmB,UAApB;AAAA,EAAoC,OAAA;AAAA,EAAQ,UAAA;AAAsC,CAAA,GAE3E,IAAA,MAAuB,EAAW,CAAkB"}
|
|
@@ -14,6 +14,7 @@ import { SxProps, Theme } from '@mui/material/styles';
|
|
|
14
14
|
* Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.
|
|
15
15
|
* - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`
|
|
16
16
|
* (Uncategorized Transactions V2 `complete`, "All Categorized!").
|
|
17
|
+
* - `ListWithHeaderFooter` — every row under a date header plus a total row (Duplicate Payment).
|
|
17
18
|
* - `SpendingSummary` — header, rows and footer, with the header text in `primary.main`
|
|
18
19
|
* (Weekend Spending Summary: the weekend above one row per category and "Total spent").
|
|
19
20
|
* - `CreditListWithHeader` — the date above the rows, each amount a green "+" credit (Micro Deposits' full).
|
|
@@ -24,6 +25,8 @@ export declare const transactionBlockVariant: {
|
|
|
24
25
|
readonly WithHeaderFooter: "with_header_footer";
|
|
25
26
|
readonly NoHeader: "no_header";
|
|
26
27
|
readonly WithFooter: "with_footer";
|
|
28
|
+
readonly ListWithHeaderFooter: "list_with_header_footer";
|
|
29
|
+
readonly List: "list";
|
|
27
30
|
readonly UncategorizedTransaction: "uncategorized_transaction";
|
|
28
31
|
readonly InfoWash: "info_wash";
|
|
29
32
|
readonly WarningWash: "warning_wash";
|
|
@@ -4,6 +4,8 @@ var e = {
|
|
|
4
4
|
WithHeaderFooter: "with_header_footer",
|
|
5
5
|
NoHeader: "no_header",
|
|
6
6
|
WithFooter: "with_footer",
|
|
7
|
+
ListWithHeaderFooter: "list_with_header_footer",
|
|
8
|
+
List: "list",
|
|
7
9
|
UncategorizedTransaction: "uncategorized_transaction",
|
|
8
10
|
InfoWash: "info_wash",
|
|
9
11
|
WarningWash: "warning_wash",
|
|
@@ -25,6 +27,11 @@ var e = {
|
|
|
25
27
|
showHeader: !1,
|
|
26
28
|
showFooter: !0
|
|
27
29
|
},
|
|
30
|
+
[e.ListWithHeaderFooter]: {
|
|
31
|
+
showHeader: !0,
|
|
32
|
+
showFooter: !0
|
|
33
|
+
},
|
|
34
|
+
[e.List]: { showHeader: !1 },
|
|
28
35
|
[e.UncategorizedTransaction]: {
|
|
29
36
|
showHeader: !0,
|
|
30
37
|
cardVariant: "primary"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles'\n\nimport {\n WARM_LIME_ACCENT_GRADIENT,\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `WithHeaderFooter` — date header above the rows plus the footer/summary row from\n * `data.footer_text` / `data.footer_amount` (Replenish Savings' \"Remaining Balance\").\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — raised row (border + shadow) on the blue slot wash, with the\n * subscription's live frequency under the amount (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n * - `SpendingSummary` — header, rows and footer, with the header text in `primary.main`\n * (Weekend Spending Summary: the weekend above one row per category and \"Total spent\").\n * - `CreditListWithHeader` — the date above the rows, each amount a green \"+\" credit (Micro Deposits' full).\n * - `CreditSummary` — credit rows, header never shown (Micro Deposits' mini sends one summed row).\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n // A multi-row list with no in-card header plus a \"Total\" summary row (Weekly New Merchants; the\n // date range is the card subtitle). The plain no-footer list reuses `NoHeader`.\n WithFooter: 'with_footer',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n SpendingSummary: 'spending_summary',\n CreditListWithHeader: 'credit_list_with_header',\n CreditSummary: 'credit_summary',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** Show the `data.footer_text` / `data.footer_amount` summary row beneath the rows. */\n showFooter?: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** Theme colour for the header text, over the card style's own. */\n headerColor?: string\n /** CSS background for the slot behind the card; the card renders borderless unless `raised`. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n /** Caption each amount with the beat's live repeating transaction frequency. */\n showFrequency?: boolean\n /** Status badge and answered wash from the live repeating transaction. */\n followsSubscription?: boolean\n /** Wash once subscribed. */\n answeredBackground?: string\n /** Row card at `elevation/1` (needs `background`). */\n elevated?: boolean\n /** Slot padding override (CSS shorthand). */\n sx?: SxProps\n /** Border and shadow on the row card. */\n raised?: boolean\n /**\n * Tint a `CAT-` row logo as the Budget-style accent tile (category colour at 15% opacity, a 1px\n * category-colour border, a `text.primary` glyph) instead of mxui's default. Opt-in per variant so\n * it stays scoped to the beats that want it (Replenish Savings' multi-account Transfer row), not\n * every `transaction_block` consumer.\n */\n tintedCategoryLogo?: boolean\n /** Draw each amount as a credit: a \"+\" prefix in `success.main`. */\n creditAmounts?: boolean\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n // `with_header` is Replenish Savings' multi-account card: its one summary row is a `CAT-` Transfer\n // logo, which we tint. (Other `with_header` beats, e.g. Large Transaction, use a merchant logo, so\n // the `CAT-` tint path never runs for them.)\n [transactionBlockVariant.WithHeader]: { showHeader: true, tintedCategoryLogo: true },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.WithFooter]: { showHeader: false, showFooter: true },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n raised: true,\n showFrequency: true,\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n showFrequency: true,\n followsSubscription: true,\n answeredBackground: WARM_LIME_ACCENT_GRADIENT,\n elevated: true,\n // Room for the badge.\n sx: { p: '28px 24px 24px 32px' },\n },\n // Figma 1941:207336: the banner sits on the warm-to-lime slot wash.\n [transactionBlockVariant.StatusMessage]: {\n showHeader: false,\n statusMessage: true,\n background: WARM_LIME_ACCENT_GRADIENT,\n },\n [transactionBlockVariant.SpendingSummary]: {\n showHeader: true,\n showFooter: true,\n headerColor: 'primary.main',\n },\n [transactionBlockVariant.CreditListWithHeader]: {\n showHeader: true,\n tintedCategoryLogo: true,\n creditAmounts: true,\n },\n [transactionBlockVariant.CreditSummary]: {\n showHeader: false,\n tintedCategoryLogo: true,\n creditAmounts: true,\n },\n})\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles'\n\nimport {\n WARM_LIME_ACCENT_GRADIENT,\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `WithHeaderFooter` — date header above the rows plus the footer/summary row from\n * `data.footer_text` / `data.footer_amount` (Replenish Savings' \"Remaining Balance\").\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — raised row (border + shadow) on the blue slot wash, with the\n * subscription's live frequency under the amount (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n * - `ListWithHeaderFooter` — every row under a date header plus a total row (Duplicate Payment).\n * - `SpendingSummary` — header, rows and footer, with the header text in `primary.main`\n * (Weekend Spending Summary: the weekend above one row per category and \"Total spent\").\n * - `CreditListWithHeader` — the date above the rows, each amount a green \"+\" credit (Micro Deposits' full).\n * - `CreditSummary` — credit rows, header never shown (Micro Deposits' mini sends one summed row).\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n // A multi-row list with no in-card header plus a \"Total\" summary row (Weekly New Merchants; the\n // date range is the card subtitle). The plain no-footer list reuses `NoHeader`.\n WithFooter: 'with_footer',\n ListWithHeaderFooter: 'list_with_header_footer',\n List: 'list',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n SpendingSummary: 'spending_summary',\n CreditListWithHeader: 'credit_list_with_header',\n CreditSummary: 'credit_summary',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** Show the `data.footer_text` / `data.footer_amount` summary row beneath the rows. */\n showFooter?: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** Theme colour for the header text, over the card style's own. */\n headerColor?: string\n /** CSS background for the slot behind the card; the card renders borderless unless `raised`. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n /** Caption each amount with the beat's live repeating transaction frequency. */\n showFrequency?: boolean\n /** Status badge and answered wash from the live repeating transaction. */\n followsSubscription?: boolean\n /** Wash once subscribed. */\n answeredBackground?: string\n /** Row card at `elevation/1` (needs `background`). */\n elevated?: boolean\n /** Slot padding override (CSS shorthand). */\n sx?: SxProps\n /** Border and shadow on the row card. */\n raised?: boolean\n /**\n * Tint a `CAT-` row logo as the Budget-style accent tile (category colour at 15% opacity, a 1px\n * category-colour border, a `text.primary` glyph) instead of mxui's default. Opt-in per variant so\n * it stays scoped to the beats that want it (Replenish Savings' multi-account Transfer row), not\n * every `transaction_block` consumer.\n */\n tintedCategoryLogo?: boolean\n /** Draw each amount as a credit: a \"+\" prefix in `success.main`. */\n creditAmounts?: boolean\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n // `with_header` is Replenish Savings' multi-account card: its one summary row is a `CAT-` Transfer\n // logo, which we tint. (Other `with_header` beats, e.g. Large Transaction, use a merchant logo, so\n // the `CAT-` tint path never runs for them.)\n [transactionBlockVariant.WithHeader]: { showHeader: true, tintedCategoryLogo: true },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.WithFooter]: { showHeader: false, showFooter: true },\n [transactionBlockVariant.ListWithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.List]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n raised: true,\n showFrequency: true,\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n showFrequency: true,\n followsSubscription: true,\n answeredBackground: WARM_LIME_ACCENT_GRADIENT,\n elevated: true,\n // Room for the badge.\n sx: { p: '28px 24px 24px 32px' },\n },\n // Figma 1941:207336: the banner sits on the warm-to-lime slot wash.\n [transactionBlockVariant.StatusMessage]: {\n showHeader: false,\n statusMessage: true,\n background: WARM_LIME_ACCENT_GRADIENT,\n },\n [transactionBlockVariant.SpendingSummary]: {\n showHeader: true,\n showFooter: true,\n headerColor: 'primary.main',\n },\n [transactionBlockVariant.CreditListWithHeader]: {\n showHeader: true,\n tintedCategoryLogo: true,\n creditAmounts: true,\n },\n [transactionBlockVariant.CreditSummary]: {\n showHeader: false,\n tintedCategoryLogo: true,\n creditAmounts: true,\n },\n})\n"],"mappings":";AA6BA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EAGV,YAAY;AAAA,EACZ,sBAAsB;AAAA,EACtB,MAAM;AAAA,EACN,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,eAAe;AACjB,GA0Ca,IAAA,CACX,OAC8D;AAAA,EAI7D,CAAA,EAAwB,UAAA,GAAa;AAAA,IAAE,YAAY;AAAA,IAAM,oBAAoB;AAAA,EAAK;AAAA,EAClF,CAAA,EAAwB,gBAAA,GAAmB;AAAA,IAAE,YAAY;AAAA,IAAM,YAAY;AAAA,EAAK;AAAA,EAChF,CAAA,EAAwB,QAAA,GAAW,EAAE,YAAY,GAAM;AAAA,EACvD,CAAA,EAAwB,UAAA,GAAa;AAAA,IAAE,YAAY;AAAA,IAAO,YAAY;AAAA,EAAK;AAAA,EAC3E,CAAA,EAAwB,oBAAA,GAAuB;AAAA,IAAE,YAAY;AAAA,IAAM,YAAY;AAAA,EAAK;AAAA,EACpF,CAAA,EAAwB,IAAA,GAAO,EAAE,YAAY,GAAM;AAAA,EACnD,CAAA,EAAwB,wBAAA,GAA2B;AAAA,IAAE,YAAY;AAAA,IAAM,aAAa;AAAA,EAAU;AAAA,EAC9F,CAAA,EAAwB,QAAA,GAAW;AAAA,IAClC,YAAY;AAAA,IACZ,YAAY,EAAuB,CAAK;AAAA,IACxC,QAAQ;AAAA,IACR,eAAe;AAAA,EACjB;AAAA,EACC,CAAA,EAAwB,WAAA,GAAc;AAAA,IACrC,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,IACpB,UAAU;AAAA,IAEV,IAAI,EAAE,GAAG,sBAAsB;AAAA,EACjC;AAAA,EAEC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IACvC,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACC,CAAA,EAAwB,eAAA,GAAkB;AAAA,IACzC,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACC,CAAA,EAAwB,oBAAA,GAAuB;AAAA,IAC9C,YAAY;AAAA,IACZ,oBAAoB;AAAA,IACpB,eAAe;AAAA,EACjB;AAAA,EACC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IACvC,YAAY;AAAA,IACZ,oBAAoB;AAAA,IACpB,eAAe;AAAA,EACjB;AACF"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { useGlobalStore as
|
|
2
|
-
import { slot as
|
|
1
|
+
import { useGlobalStore as V, useInsightsV2Store as G } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { slot as _ } from "../../core/types/Insights.es.js";
|
|
3
3
|
import { getCategoryColor as N } from "../../core/utils/CategoryUtil.es.js";
|
|
4
|
-
import { TinyBarChart as
|
|
5
|
-
import { BAR_ARIA_LABEL as
|
|
6
|
-
import { ThemedSVGImage as
|
|
7
|
-
import { postCtaMessage as
|
|
8
|
-
import
|
|
9
|
-
import { createVariantBlock as
|
|
10
|
-
import { ActionBlockLayer as
|
|
11
|
-
import
|
|
4
|
+
import { TinyBarChart as P } from "../../common/components/TinyBarChart.es.js";
|
|
5
|
+
import { BAR_ARIA_LABEL as W, buildChartData as K, buildDataSeries as j } from "../blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
6
|
+
import { ThemedSVGImage as F } from "./chartblocks/ThemedSVGImage.es.js";
|
|
7
|
+
import { postCtaMessage as H } from "../ctaActions/runCtaAction.es.js";
|
|
8
|
+
import p from "./LogoFromGuid.es.js";
|
|
9
|
+
import { createVariantBlock as M } from "../blocks/createVariantBlock.es.js";
|
|
10
|
+
import { ActionBlockLayer as Z } from "../actionBlocks/ActionBlockLayer.es.js";
|
|
11
|
+
import y from "./BadgedTile.es.js";
|
|
12
12
|
import { InsightOptionsMenu as X } from "./InsightOptionsMenu.es.js";
|
|
13
|
-
import { ReactComponent as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { P as q, Text as
|
|
13
|
+
import { ReactComponent as $ } from "./shared/images/FeeDetected.es.js";
|
|
14
|
+
import S from "./StatusBadge.es.js";
|
|
15
|
+
import x from "@mui/material/Stack";
|
|
16
|
+
import { P as q, Text as C } from "@mxenabled/mxui";
|
|
17
17
|
import J from "@mui/material/Button";
|
|
18
|
-
import { Icon as
|
|
18
|
+
import { Icon as v } from "@mxenabled/mx-icons";
|
|
19
19
|
import { Fragment as Q, jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
20
20
|
import e from "@mui/material/Box";
|
|
21
21
|
import U from "@mui/material/Card";
|
|
22
|
-
var Y = 2, c = 44,
|
|
22
|
+
var Y = 2, c = 44, I = 36, tt = 75, rt = 74, g = {
|
|
23
23
|
left: "50%",
|
|
24
24
|
position: "absolute",
|
|
25
25
|
top: "50%",
|
|
26
26
|
transform: "translate(-50%, -50%)"
|
|
27
|
-
},
|
|
27
|
+
}, k = ({ logo: r }) => r ? /* @__PURE__ */ t(p, {
|
|
28
28
|
logo: r,
|
|
29
29
|
size: c
|
|
30
30
|
}) : /* @__PURE__ */ t(e, {
|
|
@@ -37,29 +37,51 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
37
37
|
justifyContent: "center",
|
|
38
38
|
width: c
|
|
39
39
|
},
|
|
40
|
-
children: /* @__PURE__ */ t(
|
|
40
|
+
children: /* @__PURE__ */ t(v, {
|
|
41
41
|
color: "primary",
|
|
42
42
|
fill: !0,
|
|
43
43
|
name: "lightbulb",
|
|
44
44
|
size: 24
|
|
45
45
|
})
|
|
46
|
-
}),
|
|
47
|
-
center: /* @__PURE__ */ t(
|
|
46
|
+
}), w = ({ logo: r }) => /* @__PURE__ */ t(y, {
|
|
47
|
+
center: /* @__PURE__ */ t(k, { logo: r }),
|
|
48
48
|
size: c,
|
|
49
49
|
sx: { flexShrink: 0 }
|
|
50
|
-
}), it = ({ logo: r }) => /* @__PURE__ */ t(
|
|
51
|
-
center: /* @__PURE__ */ t(
|
|
50
|
+
}), it = ({ logo: r }) => /* @__PURE__ */ t(y, {
|
|
51
|
+
center: /* @__PURE__ */ t(k, { logo: r }),
|
|
52
52
|
size: c,
|
|
53
53
|
sx: { flexShrink: 0 },
|
|
54
|
-
topRight: /* @__PURE__ */ t(
|
|
55
|
-
}), et = () => /* @__PURE__ */ t(
|
|
54
|
+
topRight: /* @__PURE__ */ t(S, { tone: "warning" })
|
|
55
|
+
}), et = 24, ot = ({ logo: r }) => /* @__PURE__ */ t(y, {
|
|
56
|
+
bottomLeft: r ? /* @__PURE__ */ t(e, {
|
|
57
|
+
"aria-hidden": !0,
|
|
58
|
+
sx: {
|
|
59
|
+
borderRadius: "6px",
|
|
60
|
+
display: "flex",
|
|
61
|
+
outline: "2px solid",
|
|
62
|
+
outlineColor: "background.paper",
|
|
63
|
+
overflow: "hidden"
|
|
64
|
+
},
|
|
65
|
+
children: /* @__PURE__ */ t(p, {
|
|
66
|
+
logo: {
|
|
67
|
+
...r,
|
|
68
|
+
alt: void 0
|
|
69
|
+
},
|
|
70
|
+
size: et
|
|
71
|
+
})
|
|
72
|
+
}) : void 0,
|
|
73
|
+
center: /* @__PURE__ */ t(k, { logo: r }),
|
|
74
|
+
size: c,
|
|
75
|
+
sx: { flexShrink: 0 },
|
|
76
|
+
topRight: /* @__PURE__ */ t(S, { tone: "error" })
|
|
77
|
+
}), at = () => /* @__PURE__ */ t(F, {
|
|
56
78
|
divProps: { style: {
|
|
57
79
|
flexShrink: 0,
|
|
58
80
|
lineHeight: 0,
|
|
59
81
|
width: "max-content"
|
|
60
82
|
} },
|
|
61
|
-
image:
|
|
62
|
-
}),
|
|
83
|
+
image: $
|
|
84
|
+
}), b = 24, nt = () => /* @__PURE__ */ t(e, {
|
|
63
85
|
"aria-hidden": !0,
|
|
64
86
|
"data-testid": "linked-logos-badge",
|
|
65
87
|
sx: {
|
|
@@ -74,12 +96,12 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
74
96
|
p: 2,
|
|
75
97
|
zIndex: 1
|
|
76
98
|
},
|
|
77
|
-
children: /* @__PURE__ */ t(
|
|
99
|
+
children: /* @__PURE__ */ t(v, {
|
|
78
100
|
name: "link",
|
|
79
101
|
size: 16,
|
|
80
102
|
sx: { color: "primary.contrastText" }
|
|
81
103
|
})
|
|
82
|
-
}),
|
|
104
|
+
}), st = () => /* @__PURE__ */ t(e, {
|
|
83
105
|
"aria-hidden": !0,
|
|
84
106
|
"data-testid": "linked-logos-badge",
|
|
85
107
|
sx: {
|
|
@@ -88,22 +110,22 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
88
110
|
bgcolor: "primary.contrastText",
|
|
89
111
|
borderRadius: "50%",
|
|
90
112
|
display: "flex",
|
|
91
|
-
height:
|
|
113
|
+
height: b,
|
|
92
114
|
justifyContent: "center",
|
|
93
115
|
overflow: "hidden",
|
|
94
|
-
width:
|
|
116
|
+
width: b,
|
|
95
117
|
zIndex: 1
|
|
96
118
|
},
|
|
97
|
-
children: /* @__PURE__ */ t(
|
|
119
|
+
children: /* @__PURE__ */ t(v, {
|
|
98
120
|
name: "swap_vertical_circle",
|
|
99
|
-
size:
|
|
121
|
+
size: b * 1.2,
|
|
100
122
|
sx: {
|
|
101
123
|
color: "primary.main",
|
|
102
124
|
flexShrink: 0,
|
|
103
125
|
transform: "rotate(-90deg)"
|
|
104
126
|
}
|
|
105
127
|
})
|
|
106
|
-
}),
|
|
128
|
+
}), lt = ({ data: r, template: o }) => {
|
|
107
129
|
const { from_logo: l, to_logo: a } = r ?? {}, i = o === "SwitchDirectDeposit";
|
|
108
130
|
return /* @__PURE__ */ d(e, {
|
|
109
131
|
sx: {
|
|
@@ -147,9 +169,9 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
147
169
|
position: "absolute",
|
|
148
170
|
top: 0
|
|
149
171
|
},
|
|
150
|
-
children: /* @__PURE__ */ t(
|
|
172
|
+
children: /* @__PURE__ */ t(p, {
|
|
151
173
|
logo: l,
|
|
152
|
-
size:
|
|
174
|
+
size: I
|
|
153
175
|
})
|
|
154
176
|
}),
|
|
155
177
|
/* @__PURE__ */ t(e, {
|
|
@@ -160,37 +182,38 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
160
182
|
position: "absolute",
|
|
161
183
|
right: 0
|
|
162
184
|
},
|
|
163
|
-
children: /* @__PURE__ */ t(
|
|
185
|
+
children: /* @__PURE__ */ t(p, {
|
|
164
186
|
logo: a,
|
|
165
|
-
size:
|
|
187
|
+
size: I
|
|
166
188
|
})
|
|
167
189
|
}),
|
|
168
|
-
i ? /* @__PURE__ */ t(
|
|
190
|
+
i ? /* @__PURE__ */ t(st, {}) : /* @__PURE__ */ t(nt, {})
|
|
169
191
|
]
|
|
170
192
|
});
|
|
171
|
-
},
|
|
172
|
-
const o = j(
|
|
193
|
+
}, dt = ({ data: r }) => {
|
|
194
|
+
const o = j(_(r, "series"));
|
|
173
195
|
if (!o.length) return null;
|
|
174
|
-
const l =
|
|
196
|
+
const l = _(r, "category_guid"), a = K(o, W).slice(-3);
|
|
175
197
|
return /* @__PURE__ */ t(e, {
|
|
176
198
|
"data-testid": "compact-insight-card-bar-chart",
|
|
177
199
|
sx: { flexShrink: 0 },
|
|
178
|
-
children: /* @__PURE__ */ t(
|
|
200
|
+
children: /* @__PURE__ */ t(P, {
|
|
179
201
|
color: (i) => l ? N(l, i) : i.palette.primary.main,
|
|
180
202
|
data: a
|
|
181
203
|
})
|
|
182
204
|
});
|
|
183
|
-
},
|
|
205
|
+
}, ct = M({
|
|
184
206
|
variants: {
|
|
185
|
-
category_color:
|
|
186
|
-
linked_logos:
|
|
187
|
-
minimal:
|
|
188
|
-
|
|
207
|
+
category_color: dt,
|
|
208
|
+
linked_logos: lt,
|
|
209
|
+
minimal: w,
|
|
210
|
+
stacked_logos: ot,
|
|
211
|
+
with_illustration: at,
|
|
189
212
|
with_warning_badge: it
|
|
190
213
|
},
|
|
191
|
-
fallback:
|
|
214
|
+
fallback: w,
|
|
192
215
|
name: "InsightVisual"
|
|
193
|
-
}),
|
|
216
|
+
}), pt = {
|
|
194
217
|
BillAmountNotStandard: {
|
|
195
218
|
key: "in_description_cta",
|
|
196
219
|
trigger: "inDescriptionCta"
|
|
@@ -199,28 +222,32 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
199
222
|
key: "in_description_cta",
|
|
200
223
|
trigger: "inDescriptionCta"
|
|
201
224
|
},
|
|
225
|
+
DuplicatePaymentV2: {
|
|
226
|
+
key: "in_description_cta",
|
|
227
|
+
trigger: "inDescriptionCta"
|
|
228
|
+
},
|
|
202
229
|
SwitchDirectDeposit: { key: "in_description_cta" }
|
|
203
|
-
},
|
|
204
|
-
const
|
|
205
|
-
if (s.stopPropagation(), !(o || !
|
|
230
|
+
}, gt = (r) => r.stopPropagation(), Tt = ({ beat: r, isCtaDisabled: o = !1, onCtaClick: l, onTap: a, payload: i }) => {
|
|
231
|
+
const D = V(), { openActionDrawer: B } = G(), { description: L, instance_slot: m, primary_cta: h, title: E } = i, n = pt[i.template ?? ""], f = n ? i[n.key] : h, u = i.in_description_cta?.post_message_metadata, R = !n || !!n.trigger || !!r && !!u, A = _(m.data, "logo"), z = (s) => {
|
|
232
|
+
if (s.stopPropagation(), !(o || !f)) {
|
|
206
233
|
if (n) {
|
|
207
|
-
if (r && n.trigger)
|
|
234
|
+
if (r && n.trigger) B({
|
|
208
235
|
guid: r.guid,
|
|
209
236
|
trigger: n.trigger
|
|
210
237
|
});
|
|
211
|
-
else if (r &&
|
|
212
|
-
const { action:
|
|
213
|
-
|
|
238
|
+
else if (r && u) {
|
|
239
|
+
const { action: O, ...T } = u;
|
|
240
|
+
H({
|
|
214
241
|
beat: r,
|
|
215
|
-
stores:
|
|
242
|
+
stores: D
|
|
216
243
|
}, {
|
|
217
|
-
action:
|
|
218
|
-
payload:
|
|
244
|
+
action: O,
|
|
245
|
+
payload: T
|
|
219
246
|
});
|
|
220
247
|
}
|
|
221
248
|
return;
|
|
222
249
|
}
|
|
223
|
-
|
|
250
|
+
h && l?.(h);
|
|
224
251
|
}
|
|
225
252
|
};
|
|
226
253
|
return /* @__PURE__ */ d(Q, { children: [/* @__PURE__ */ d(U, {
|
|
@@ -241,7 +268,7 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
241
268
|
pt: 8,
|
|
242
269
|
...a && { cursor: "pointer" }
|
|
243
270
|
},
|
|
244
|
-
children: [/* @__PURE__ */ d(
|
|
271
|
+
children: [/* @__PURE__ */ d(x, {
|
|
245
272
|
sx: {
|
|
246
273
|
alignItems: "center",
|
|
247
274
|
flexDirection: "row",
|
|
@@ -250,23 +277,23 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
250
277
|
pl: 8,
|
|
251
278
|
pt: 4
|
|
252
279
|
},
|
|
253
|
-
children: [/* @__PURE__ */ t(
|
|
280
|
+
children: [/* @__PURE__ */ t(C, {
|
|
254
281
|
bold: !0,
|
|
255
282
|
variant: "body1",
|
|
256
|
-
children:
|
|
283
|
+
children: E ?? ""
|
|
257
284
|
}), /* @__PURE__ */ t(e, {
|
|
258
|
-
onClick:
|
|
285
|
+
onClick: gt,
|
|
259
286
|
sx: { display: "flex" },
|
|
260
287
|
children: /* @__PURE__ */ t(X, {})
|
|
261
288
|
})]
|
|
262
|
-
}), /* @__PURE__ */ d(
|
|
289
|
+
}), /* @__PURE__ */ d(x, {
|
|
263
290
|
sx: {
|
|
264
291
|
alignItems: "center",
|
|
265
292
|
flexDirection: "row",
|
|
266
293
|
gap: 16,
|
|
267
294
|
pl: 8
|
|
268
295
|
},
|
|
269
|
-
children: [/* @__PURE__ */ d(
|
|
296
|
+
children: [/* @__PURE__ */ d(x, {
|
|
270
297
|
sx: {
|
|
271
298
|
alignSelf: "stretch",
|
|
272
299
|
flex: 1,
|
|
@@ -275,7 +302,7 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
275
302
|
pt: 2
|
|
276
303
|
},
|
|
277
304
|
children: [/* @__PURE__ */ t(q, {
|
|
278
|
-
dangerouslySetInnerHTML: { __html:
|
|
305
|
+
dangerouslySetInnerHTML: { __html: L.html_text },
|
|
279
306
|
"data-testid": "compact-insight-card-description",
|
|
280
307
|
sx: {
|
|
281
308
|
display: "-webkit-box",
|
|
@@ -286,9 +313,9 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
286
313
|
WebkitLineClamp: Y
|
|
287
314
|
},
|
|
288
315
|
variant: "subtitle2"
|
|
289
|
-
}),
|
|
316
|
+
}), f?.label && R && /* @__PURE__ */ t(J, {
|
|
290
317
|
"aria-disabled": o,
|
|
291
|
-
onClick:
|
|
318
|
+
onClick: z,
|
|
292
319
|
size: "small",
|
|
293
320
|
sx: {
|
|
294
321
|
alignSelf: "flex-start",
|
|
@@ -301,20 +328,20 @@ var Y = 2, c = 44, k = 36, tt = 75, rt = 74, g = {
|
|
|
301
328
|
}
|
|
302
329
|
},
|
|
303
330
|
variant: "text",
|
|
304
|
-
children: /* @__PURE__ */ t(
|
|
331
|
+
children: /* @__PURE__ */ t(C, {
|
|
305
332
|
bold: !0,
|
|
306
333
|
variant: "body2",
|
|
307
|
-
children:
|
|
334
|
+
children: f.label
|
|
308
335
|
})
|
|
309
336
|
})]
|
|
310
|
-
}), /* @__PURE__ */ t(
|
|
337
|
+
}), /* @__PURE__ */ t(ct, {
|
|
311
338
|
data: m.data,
|
|
312
339
|
logo: A,
|
|
313
340
|
template: i.template,
|
|
314
341
|
variant: m.variant
|
|
315
342
|
})]
|
|
316
343
|
})]
|
|
317
|
-
}), r && /* @__PURE__ */ t(
|
|
344
|
+
}), r && /* @__PURE__ */ t(Z, { beat: r })] });
|
|
318
345
|
};
|
|
319
346
|
export {
|
|
320
347
|
Tt as default
|