@mx-cartographer/experiences 9.7.71-alpha-ram-usp-2 → 9.7.72
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 +2 -5
- package/dist/core/stores/GlobalCopyStore.d.ts +0 -6
- package/dist/core/stores/GlobalCopyStore.es.js +8 -14
- package/dist/core/stores/GlobalCopyStore.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +0 -24
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +11 -11
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +3 -3
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +59 -92
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +1 -9
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +5 -9
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +5 -5
- package/dist/insights-v2/components/BaseLayout.es.js +146 -160
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/CtaStatus.d.ts +1 -14
- package/dist/insights-v2/components/CtaStatus.es.js +38 -76
- package/dist/insights-v2/components/CtaStatus.es.js.map +1 -1
- package/dist/insights-v2/components/InsightTransactionRow.d.ts +1 -3
- package/dist/insights-v2/components/InsightTransactionRow.es.js +20 -36
- package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -1
- package/dist/insights-v2/components/TransactionListCard.d.ts +1 -5
- package/dist/insights-v2/components/TransactionListCard.es.js +49 -69
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
- package/dist/insights-v2/components/WithdrawalCard.es.js +8 -10
- package/dist/insights-v2/components/WithdrawalCard.es.js.map +1 -1
- package/dist/insights-v2/components/shared/StatusSnackbar.d.ts +1 -10
- package/dist/insights-v2/components/shared/StatusSnackbar.es.js +11 -27
- package/dist/insights-v2/components/shared/StatusSnackbar.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaConfig.es.js +9 -23
- package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/runCtaAction.d.ts +0 -7
- package/dist/insights-v2/ctaActions/runCtaAction.es.js +62 -73
- package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/subscriptionAnswer.d.ts +1 -10
- package/dist/insights-v2/ctaActions/types.d.ts +2 -5
- package/dist/insights-v2/ctaActions/useCtaAction.d.ts +0 -6
- package/dist/insights-v2/ctaActions/useCtaAction.es.js +27 -32
- package/dist/insights-v2/ctaActions/useCtaAction.es.js.map +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +0 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +0 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +68 -74
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/microinsights/MicroCardTemplate.es.js +17 -21
- package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +86 -91
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -4
- package/dist/microinsights/stores/CopyStore.es.js +10 -13
- package/dist/microinsights/stores/CopyStore.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.d.ts +0 -6
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +0 -168
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js.map +0 -1
- package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.d.ts +0 -4
- package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.es.js +0 -10
- package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.es.js.map +0 -1
- package/dist/insights-v2/components/shared/elevation.d.ts +0 -16
- package/dist/insights-v2/components/shared/elevation.es.js +0 -15
- package/dist/insights-v2/components/shared/elevation.es.js.map +0 -1
- package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js +0 -115
- package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js.map +0 -1
- package/dist/microinsights/cards/MicroCtaStatus.d.ts +0 -18
- package/dist/microinsights/cards/MicroCtaStatus.es.js +0 -44
- package/dist/microinsights/cards/MicroCtaStatus.es.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
## [9.7.72] - 11-02-2026
|
|
2
2
|
|
|
3
|
-
- **
|
|
4
|
-
- **
|
|
5
|
-
- **ADDED** - The micro card resolves its `in_description_cta` through the CTA layer (`MicroCtaStatusGate`): answered, it shows the opening block's `answeredTitle` (USP: "Unexpected Charge Reviewed"), `data.reviewed_icon` and the presenter's "Undo", and a tap goes to the host instead of re-opening the block; with missing data it shows no action
|
|
6
|
-
- **CHANGED** - Subscription Status dialogs: fixed `xs` width, white paper, 4px radius, full-bleed wash; reasons as 44px rows with inset dividers. `CtaStatus` neutral tone is the white alert (paper fill, 50% black border). The `warning_wash` badge is a 32px palette disc with a `contrastText` glyph; `TransactionListCard` gains `elevated`
|
|
7
|
-
- **CHANGED** - `useBeatCtaActions` prepares the CTA the card has: the primary one, else the in-description one, so a step's data also loads on mini (which has no primary CTA)
|
|
3
|
+
- **FIXED** - Insights 2.0 full card secondary CTA, mini CTA, in-description link and Emergency Fund Withdrawal amount block now match Figma (WEC-2149, WEC-2152, WEC-2153, WEC-2156)
|
|
4
|
+
- **FIXED** - Emergency Fund Withdrawal amount is bold, matching Figma (WEC-2149)
|
|
8
5
|
|
|
9
6
|
## [9.7.71] - 10-30-2026
|
|
10
7
|
|
|
@@ -10,11 +10,5 @@ export declare class GlobalCopyStore {
|
|
|
10
10
|
constructor(globalStore: GlobalStore);
|
|
11
11
|
loadCopy: () => Promise<void>;
|
|
12
12
|
getCopy: (namespace: string, translationKey?: string) => Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Merges an already-loaded section into `copy` (no request), for a host that did not load the
|
|
15
|
-
* copy, e.g. the micro widget handing over the insights_feed it loaded with its own copy. A
|
|
16
|
-
* section the store already has is kept.
|
|
17
|
-
*/
|
|
18
|
-
setSection: <K extends keyof GlobalCopy>(key: K, section: GlobalCopy[K] | undefined) => void;
|
|
19
13
|
private captureError;
|
|
20
14
|
}
|
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
import { GlobalCopyApi as
|
|
2
|
-
import { makeAutoObservable as a, runInAction as
|
|
3
|
-
var
|
|
1
|
+
import { GlobalCopyApi as r } from "../api/GlobalCopyApi.es.js";
|
|
2
|
+
import { makeAutoObservable as a, runInAction as i } from "mobx";
|
|
3
|
+
var n = class {
|
|
4
4
|
globalStore;
|
|
5
|
-
api = new
|
|
5
|
+
api = new r("/", "");
|
|
6
6
|
copy = {};
|
|
7
7
|
featureNamespace = "experiences";
|
|
8
8
|
isInitialized = !1;
|
|
9
9
|
constructor(t) {
|
|
10
|
-
this.globalStore = t, this.api = new
|
|
10
|
+
this.globalStore = t, this.api = new r(t.endpoint, t.sessionToken, t.onError), a(this);
|
|
11
11
|
}
|
|
12
12
|
loadCopy = async () => {
|
|
13
|
-
await this.getCopy(this.featureNamespace),
|
|
13
|
+
await this.getCopy(this.featureNamespace), i(() => {
|
|
14
14
|
this.isInitialized = !0;
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
getCopy = async (t, o = "") => {
|
|
18
18
|
try {
|
|
19
19
|
const e = await this.api.getGlobalCopy(t, o);
|
|
20
|
-
|
|
20
|
+
i(() => {
|
|
21
21
|
this.copy = e[t];
|
|
22
22
|
});
|
|
23
23
|
} catch (e) {
|
|
24
24
|
this.captureError("getCopy", e);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
setSection = (t, o) => {
|
|
28
|
-
!o || this.copy?.[t] || (this.copy = {
|
|
29
|
-
...this.copy,
|
|
30
|
-
[t]: o
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
27
|
captureError = (t, o) => this.globalStore.captureException(o, {
|
|
34
28
|
store: "GlobalCopyStore",
|
|
35
29
|
action: t
|
|
36
30
|
});
|
|
37
31
|
};
|
|
38
32
|
export {
|
|
39
|
-
|
|
33
|
+
n as GlobalCopyStore
|
|
40
34
|
};
|
|
41
35
|
|
|
42
36
|
//# sourceMappingURL=GlobalCopyStore.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalCopyStore.es.js","names":[],"sources":["../../../src/core/stores/GlobalCopyStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { GlobalCopyApi } from '../api'\nimport { GlobalCopy } from '../types'\n\nimport { GlobalStore } from './GlobalStore'\n\nexport class GlobalCopyStore {\n globalStore: GlobalStore\n api: GlobalCopyApi = new GlobalCopyApi('/', '')\n\n copy: GlobalCopy = {} as GlobalCopy\n featureNamespace = 'experiences'\n\n isInitialized = false\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new GlobalCopyApi(\n globalStore.endpoint,\n globalStore.sessionToken,\n globalStore.onError,\n )\n\n makeAutoObservable(this)\n }\n\n loadCopy = async () => {\n await this.getCopy(this.featureNamespace)\n\n runInAction(() => {\n this.isInitialized = true\n })\n }\n\n getCopy = async (namespace: string, translationKey: string = '') => {\n try {\n const newCopy = await this.api.getGlobalCopy(namespace, translationKey)\n\n runInAction(() => {\n this.copy = newCopy[namespace]\n })\n } catch (error) {\n this.captureError('getCopy', error)\n }\n }\n\n
|
|
1
|
+
{"version":3,"file":"GlobalCopyStore.es.js","names":[],"sources":["../../../src/core/stores/GlobalCopyStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { GlobalCopyApi } from '../api'\nimport { GlobalCopy } from '../types'\n\nimport { GlobalStore } from './GlobalStore'\n\nexport class GlobalCopyStore {\n globalStore: GlobalStore\n api: GlobalCopyApi = new GlobalCopyApi('/', '')\n\n copy: GlobalCopy = {} as GlobalCopy\n featureNamespace = 'experiences'\n\n isInitialized = false\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new GlobalCopyApi(\n globalStore.endpoint,\n globalStore.sessionToken,\n globalStore.onError,\n )\n\n makeAutoObservable(this)\n }\n\n loadCopy = async () => {\n await this.getCopy(this.featureNamespace)\n\n runInAction(() => {\n this.isInitialized = true\n })\n }\n\n getCopy = async (namespace: string, translationKey: string = '') => {\n try {\n const newCopy = await this.api.getGlobalCopy(namespace, translationKey)\n\n runInAction(() => {\n this.copy = newCopy[namespace]\n })\n } catch (error) {\n this.captureError('getCopy', error)\n }\n }\n\n private captureError = (action: string, error: unknown) =>\n this.globalStore.captureException(error, { store: 'GlobalCopyStore', action })\n}\n"],"mappings":";;AAOA,IAAa,IAAb,MAA6B;AAAA,EAC3B;AAAA,EACA,MAAqB,IAAI,EAAc,KAAK,EAAE;AAAA,EAE9C,OAAmB,CAAC;AAAA,EACpB,mBAAmB;AAAA,EAEnB,gBAAgB;AAAA,EAEhB,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EACb,EAAY,UACZ,EAAY,cACZ,EAAY,OACd,GAEA,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,WAAW,YAAY;AACrB,UAAM,KAAK,QAAQ,KAAK,gBAAgB,GAExC,EAAA,MAAkB;AAChB,WAAK,gBAAgB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,OAAO,GAAmB,IAAyB,OAAO;AAClE,QAAI;AACF,YAAM,IAAU,MAAM,KAAK,IAAI,cAAc,GAAW,CAAc;AAEtE,MAAA,EAAA,MAAkB;AAChB,aAAK,OAAO,EAAQ,CAAA;AAAA,MACtB,CAAC;AAAA,IACH,SAAS,GAAO;AACd,WAAK,aAAa,WAAW,CAAK;AAAA,IACpC;AAAA,EACF;AAAA,EAEA,eAAA,CAAwB,GAAgB,MACtC,KAAK,YAAY,iBAAiB,GAAO;AAAA,IAAE,OAAO;AAAA,IAAmB,QAAA;AAAA,EAAO,CAAC;AACjF"}
|
|
@@ -194,28 +194,6 @@ export interface SurveyModalCopy {
|
|
|
194
194
|
/** ARIA label for the snackbar close button. */
|
|
195
195
|
toast_close_aria: string;
|
|
196
196
|
}
|
|
197
|
-
/** Subscription Status modal words. */
|
|
198
|
-
export interface SubscriptionStatusModalCopy {
|
|
199
|
-
/** Dialog title. */
|
|
200
|
-
title: string;
|
|
201
|
-
/** Positive answer. */
|
|
202
|
-
subscribed_answer: string;
|
|
203
|
-
/** Negative answer; opens the reasons. */
|
|
204
|
-
not_subscribed_answer: string;
|
|
205
|
-
/** Reasons. */
|
|
206
|
-
never_subscribed: string;
|
|
207
|
-
cancelled: string;
|
|
208
|
-
one_time_purchase: string;
|
|
209
|
-
/** Micro title once answered. */
|
|
210
|
-
reviewed_title: string;
|
|
211
|
-
/** Snackbar words. */
|
|
212
|
-
success_message: string;
|
|
213
|
-
error_message: string;
|
|
214
|
-
try_again: string;
|
|
215
|
-
/** Close labels. */
|
|
216
|
-
close_aria: string;
|
|
217
|
-
toast_close_aria: string;
|
|
218
|
-
}
|
|
219
197
|
/** Connection-details education drilldown (`connection_detail_block`). */
|
|
220
198
|
export interface ConnectionDetailsCopy {
|
|
221
199
|
aria_label_thumbs_down: string;
|
|
@@ -445,8 +423,6 @@ export interface InsightsFeedCopy {
|
|
|
445
423
|
connection_details?: ConnectionDetailsCopy;
|
|
446
424
|
/** Optional: every caller already null-guards (`copyStore.insights_feed?.survey_modal`). */
|
|
447
425
|
survey_modal?: SurveyModalCopy;
|
|
448
|
-
/** Subscription Status modal words. */
|
|
449
|
-
subscription_status_modal?: SubscriptionStatusModalCopy;
|
|
450
426
|
feedback_bar: FeedbackBarCopy;
|
|
451
427
|
dismiss: DismissInsightCopy;
|
|
452
428
|
/** Optional until the localized-content service ships the namespace. */
|
|
@@ -9,25 +9,25 @@ import { ANALYTICS_EVENTS_CONFIG as P } from "../../analytics/analyticsEventsCon
|
|
|
9
9
|
import { useAnalyticsEvent as Lt } from "../../analytics/useAnalyticsEvent.es.js";
|
|
10
10
|
import { DoubleBarChart as It } from "../../components/chartblocks/DoubleBarChart.es.js";
|
|
11
11
|
import { toLegendItems as xt } from "../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils.es.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { TransactionDrillDown as Et } from "./TransactionDrillDown.es.js";
|
|
13
|
+
import { getDefaultSelection as Rt, getDrillDownConfig as Ot, getFlattenedDataSeries as jt, resolveDrillDownSubHeader as Ft, splitProjectedTransaction as Gt, toStoreFilter as Ht } from "./utils.es.js";
|
|
14
|
+
import { useTransactionHistory as wt } from "./useTransactionHistory.es.js";
|
|
15
|
+
import { getDynamicCtaBasedOnTriggers as kt } from "../util.es.js";
|
|
16
16
|
import { TransactionDetailsBlock as Nt } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
17
17
|
import { useLayoutEffect as Kt, useState as m } from "react";
|
|
18
18
|
import { observer as Mt } from "mobx-react-lite";
|
|
19
19
|
import { Fragment as Pt, jsx as r, jsxs as Vt } from "react/jsx-runtime";
|
|
20
20
|
import { useTheme as zt } from "@mui/material/styles";
|
|
21
21
|
var ge = Mt(({ beat: s }) => {
|
|
22
|
-
const D = zt(), { actionDrawer: B, setActionContext: S } = Ct(), { insights_payload: c } = s, V =
|
|
22
|
+
const D = zt(), { actionDrawer: B, setActionContext: S } = Ct(), { insights_payload: c } = s, V = kt(B, c?.primary_cta, c?.secondary_cta, c?.in_description_cta)?.variant, { top: e, filterMode: u, header: z, colors: U, filterStrategy: W, tipSection: v, subTabAriaLabels: Y, slotData: $, beatTransactions: q } = Ot(V ?? ""), { instanceSlotData: a, beatTransactions: g, spendCategoryGuids: L, allAccountGuids: I, categoryName: J, displayedDateRange: f, transactionStore: Q } = wt(s, {
|
|
23
23
|
slotData: $,
|
|
24
24
|
beatTransactions: q
|
|
25
|
-
}), { common: X, insights_feed: n } = _t(), { isCopyLoaded: Z } = Tt(), [tt, x] = m(!1), [et, ot] = m(!1), E = Lt(), { dataSeries: p, chartData: b, comparisonBars: i } =
|
|
25
|
+
}), { common: X, insights_feed: n } = _t(), { isCopyLoaded: Z } = Tt(), [tt, x] = m(!1), [et, ot] = m(!1), E = Lt(), { dataSeries: p, chartData: b, comparisonBars: i } = jt({
|
|
26
26
|
data: a?.data_series,
|
|
27
27
|
ariaLabel: e === "doubleBar" ? n?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : Bt,
|
|
28
28
|
top: e,
|
|
29
29
|
beatTransactions: g
|
|
30
|
-
}), d = e === "doubleBar", at = e === "tabsOnly", l = d ? i : b, { chartBarIndex: R, subTabIndex: nt } =
|
|
30
|
+
}), d = e === "doubleBar", at = e === "tabsOnly", l = d ? i : b, { chartBarIndex: R, subTabIndex: nt } = Rt({
|
|
31
31
|
chartTabCount: b.length,
|
|
32
32
|
comparisonTabCount: i.length,
|
|
33
33
|
actionDrawer: B,
|
|
@@ -46,7 +46,7 @@ var ge = Mt(({ beat: s }) => {
|
|
|
46
46
|
spendCategoryGuids: L,
|
|
47
47
|
displayedDateRange: f
|
|
48
48
|
}), it = g.map((t) => t.guid).join(","), lt = L.join(","), ct = I.join(","), dt = e === "list" || e === "tabsOnly" || e === "monthTabs" || p.length > 0, j = () => {
|
|
49
|
-
u !== "store" || !dt || Q.setFilter(
|
|
49
|
+
u !== "store" || !dt || Q.setFilter(Ht(C(o), {
|
|
50
50
|
allAccountGuids: I,
|
|
51
51
|
displayedDateRange: f
|
|
52
52
|
}));
|
|
@@ -66,14 +66,14 @@ var ge = Mt(({ beat: s }) => {
|
|
|
66
66
|
it,
|
|
67
67
|
e
|
|
68
68
|
]);
|
|
69
|
-
const F =
|
|
69
|
+
const F = Ft(c), y = z?.({
|
|
70
70
|
title: c?.title,
|
|
71
71
|
subHeader: F,
|
|
72
72
|
categoryName: J,
|
|
73
73
|
selectedDate: b[o]?.date ?? void 0
|
|
74
74
|
}), G = U(D, a?.category_guid);
|
|
75
75
|
if (!Z) return /* @__PURE__ */ r(Dt, {});
|
|
76
|
-
const [H, w] = a?.legends ?? [], mt = u === "local" ? (t) => C(t).custom ?? (() => !0) : void 0, { transactions: ut, projectedTransaction: A } =
|
|
76
|
+
const [H, w] = a?.legends ?? [], mt = u === "local" ? (t) => C(t).custom ?? (() => !0) : void 0, { transactions: ut, projectedTransaction: A } = Gt(g), gt = u === "local" ? ut : void 0, k = n.general.projected_amount, pt = A && k && C(o).custom?.(A) ? {
|
|
77
77
|
heading: k,
|
|
78
78
|
transaction: A
|
|
79
79
|
} : void 0, N = (t, h) => {
|
|
@@ -116,7 +116,7 @@ var ge = Mt(({ beat: s }) => {
|
|
|
116
116
|
selectedTabIndex: o,
|
|
117
117
|
trendAmountLabel: w?.label ?? n.general.trend
|
|
118
118
|
}) : /* @__PURE__ */ r(vt, {}) : null;
|
|
119
|
-
return /* @__PURE__ */ Vt(Pt, { children: [/* @__PURE__ */ r(
|
|
119
|
+
return /* @__PURE__ */ Vt(Pt, { children: [/* @__PURE__ */ r(Et, {
|
|
120
120
|
baseTransactions: gt,
|
|
121
121
|
projectedRow: pt,
|
|
122
122
|
heading: y?.heading,
|
package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useInsightsV2Store as d, useTransactionStore as f } from "../../../common/context/hooks.es.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { getDrillDownConfig as g, guidListOf as m } from "./utils.es.js";
|
|
3
|
+
import { getDynamicCtaBasedOnTriggers as p } from "../util.es.js";
|
|
4
4
|
import l from "react";
|
|
5
5
|
var w = ({ beat: t }) => {
|
|
6
6
|
const { isTransactionDataLoaded: o, loadMissingTransactionData: s, loadTransactionsByGuids: n } = f(), { actionDrawer: r } = d();
|
|
7
7
|
l.useEffect(() => {
|
|
8
|
-
const a = t?.insights_payload, c =
|
|
8
|
+
const a = t?.insights_payload, c = p(r, a?.primary_cta, a?.secondary_cta, a?.in_description_cta)?.variant, { fetchMissingTransactions: e } = g(c ?? ""), i = m(e?.(t));
|
|
9
9
|
(async () => (o || await s(), i && await n(i)))();
|
|
10
10
|
}, []);
|
|
11
11
|
};
|
|
@@ -1,128 +1,95 @@
|
|
|
1
|
-
import { useCategoryStore as
|
|
2
|
-
import { slot as
|
|
3
|
-
import { formatCurrency as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { getLayoutConfig as J, transactionBlockVariant as K } from "./layout.es.js";
|
|
14
|
-
import { observer as Q } from "mobx-react-lite";
|
|
15
|
-
import { CategoryIcon as X, InstitutionLogo as tt, MerchantLogo as ot } from "@mxenabled/mxui";
|
|
16
|
-
import { Icon as b } from "@mxenabled/mx-icons";
|
|
1
|
+
import { useCategoryStore as I } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { slot as i } from "../../../../core/types/Insights.es.js";
|
|
3
|
+
import { formatCurrency as g } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import { logoFromRef as T } from "../../../components/shared/EntityLogo.es.js";
|
|
5
|
+
import G from "../../../components/LogoFromGuid.es.js";
|
|
6
|
+
import { resolveVariantConfig as L } from "../../resolveVariantConfig.es.js";
|
|
7
|
+
import S from "../../../components/TransactionListCard.es.js";
|
|
8
|
+
import O from "../../../components/StatusMessageCard.es.js";
|
|
9
|
+
import { getLayoutConfig as b, transactionBlockVariant as k } from "./layout.es.js";
|
|
10
|
+
import { observer as z } from "mobx-react-lite";
|
|
11
|
+
import { CategoryIcon as B, InstitutionLogo as A, MerchantLogo as M } from "@mxenabled/mxui";
|
|
12
|
+
import { Icon as R } from "@mxenabled/mx-icons";
|
|
17
13
|
import { jsx as o } from "react/jsx-runtime";
|
|
18
|
-
import { useTheme as
|
|
19
|
-
import
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
return n ? /* @__PURE__ */ o(u, {
|
|
23
|
-
"aria-hidden": !0,
|
|
24
|
-
"data-icon": n,
|
|
25
|
-
"data-testid": "subscription-badge",
|
|
26
|
-
sx: {
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
bgcolor: `${x(e?.color)}.main`,
|
|
29
|
-
borderRadius: "50%",
|
|
30
|
-
display: "flex",
|
|
31
|
-
height: v,
|
|
32
|
-
justifyContent: "center",
|
|
33
|
-
width: v
|
|
34
|
-
},
|
|
35
|
-
children: /* @__PURE__ */ o(b, {
|
|
36
|
-
fill: !0,
|
|
37
|
-
name: n,
|
|
38
|
-
size: it,
|
|
39
|
-
sx: { color: `${x(e?.color)}.contrastText` }
|
|
40
|
-
})
|
|
41
|
-
}) : null;
|
|
42
|
-
}, st = (e, n) => {
|
|
43
|
-
const t = H(e.logo, e.primary_text);
|
|
14
|
+
import { useTheme as E } from "@mui/material/styles";
|
|
15
|
+
import c from "@mui/material/Box";
|
|
16
|
+
var n = 32, F = Math.round(n * 0.625), N = 20, V = (a, s) => {
|
|
17
|
+
const t = T(a.logo, a.primary_text);
|
|
44
18
|
if (t) {
|
|
45
|
-
if (t.logo_name) return /* @__PURE__ */ o(
|
|
19
|
+
if (t.logo_name) return /* @__PURE__ */ o(c, {
|
|
46
20
|
sx: {
|
|
47
21
|
alignItems: "center",
|
|
48
22
|
display: "flex",
|
|
49
|
-
height:
|
|
23
|
+
height: n,
|
|
50
24
|
justifyContent: "center",
|
|
51
|
-
width:
|
|
25
|
+
width: n
|
|
52
26
|
},
|
|
53
|
-
children: /* @__PURE__ */ o(
|
|
27
|
+
children: /* @__PURE__ */ o(R, {
|
|
54
28
|
name: t.logo_name,
|
|
55
|
-
size:
|
|
29
|
+
size: F,
|
|
56
30
|
sx: { color: t.logo_color }
|
|
57
31
|
})
|
|
58
32
|
});
|
|
59
|
-
if (t.merchant_guid) return /* @__PURE__ */ o(
|
|
33
|
+
if (t.merchant_guid) return /* @__PURE__ */ o(M, {
|
|
60
34
|
alt: t.merchant_name ?? "",
|
|
61
|
-
categoryGuid: t.category_guid ?
|
|
35
|
+
categoryGuid: t.category_guid ? s(t.category_guid) : "",
|
|
62
36
|
merchantGuid: t.merchant_guid,
|
|
63
|
-
size:
|
|
37
|
+
size: n
|
|
64
38
|
});
|
|
65
|
-
if (t.institution_guid) return /* @__PURE__ */ o(
|
|
39
|
+
if (t.institution_guid) return /* @__PURE__ */ o(A, {
|
|
66
40
|
alt: t.institution_name ?? "",
|
|
67
41
|
institutionGuid: t.institution_guid,
|
|
68
|
-
size:
|
|
42
|
+
size: n
|
|
69
43
|
});
|
|
70
44
|
if (t.category_guid) {
|
|
71
|
-
const
|
|
72
|
-
return /* @__PURE__ */ o(
|
|
73
|
-
"data-testid": `category-icon-${
|
|
45
|
+
const r = s(t.category_guid);
|
|
46
|
+
return /* @__PURE__ */ o(c, {
|
|
47
|
+
"data-testid": `category-icon-${r}`,
|
|
74
48
|
sx: { display: "flex" },
|
|
75
|
-
children: /* @__PURE__ */ o(
|
|
76
|
-
categoryGuid:
|
|
77
|
-
size:
|
|
49
|
+
children: /* @__PURE__ */ o(B, {
|
|
50
|
+
categoryGuid: r,
|
|
51
|
+
size: n
|
|
78
52
|
})
|
|
79
53
|
});
|
|
80
54
|
}
|
|
81
55
|
}
|
|
82
|
-
},
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const r = a(i, "message");
|
|
89
|
-
return typeof r != "string" || !r.trim() ? (console.warn("[TransactionBlock] status_message has no message — rendering nothing."), null) : /* @__PURE__ */ o(W, {
|
|
90
|
-
icon: /* @__PURE__ */ o(u, {
|
|
56
|
+
}, tt = z(({ payload: a }) => {
|
|
57
|
+
const s = E(), { getTopLevelCategoryGuid: t } = I(), { data: r, variant: d } = a.instance_slot, { background: f, cardVariant: l, showFooter: _, showHeader: p, statusMessage: h } = L(b(s), d, k.NoHeader, "TransactionBlock");
|
|
58
|
+
if (h) {
|
|
59
|
+
const e = i(r, "message");
|
|
60
|
+
return typeof e != "string" || !e.trim() ? (console.warn("[TransactionBlock] status_message has no message — rendering nothing."), null) : /* @__PURE__ */ o(O, {
|
|
61
|
+
icon: /* @__PURE__ */ o(c, {
|
|
91
62
|
"aria-hidden": "true",
|
|
92
63
|
sx: { display: "flex" },
|
|
93
|
-
children: /* @__PURE__ */ o(
|
|
94
|
-
logo:
|
|
95
|
-
size:
|
|
64
|
+
children: /* @__PURE__ */ o(G, {
|
|
65
|
+
logo: i(r, "icon"),
|
|
66
|
+
size: N
|
|
96
67
|
})
|
|
97
68
|
}),
|
|
98
|
-
message:
|
|
69
|
+
message: e
|
|
99
70
|
});
|
|
100
71
|
}
|
|
101
|
-
const
|
|
102
|
-
if (!Array.isArray(
|
|
103
|
-
const
|
|
104
|
-
label:
|
|
105
|
-
amount:
|
|
106
|
-
} : void 0
|
|
107
|
-
return /* @__PURE__ */ o(
|
|
108
|
-
background:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
amountCaption: N,
|
|
118
|
-
leading: st(r, t),
|
|
119
|
-
subtitle: r.secondary_text ?? "",
|
|
120
|
-
title: r.primary_text ?? ""
|
|
72
|
+
const m = i(r, "series"), u = i(r, "header_text");
|
|
73
|
+
if (!Array.isArray(m) || !m.length) return null;
|
|
74
|
+
const y = p && typeof u == "string" ? u : void 0, x = i(r, "footer_text"), v = i(r, "footer_amount"), C = _ ? {
|
|
75
|
+
label: x,
|
|
76
|
+
amount: g(v, "0,0.00")
|
|
77
|
+
} : void 0;
|
|
78
|
+
return /* @__PURE__ */ o(S, {
|
|
79
|
+
background: f,
|
|
80
|
+
footer: C,
|
|
81
|
+
header: y,
|
|
82
|
+
variant: l,
|
|
83
|
+
rows: m.map((e) => ({
|
|
84
|
+
amount: typeof e.amount == "number" ? g(e.amount, "0,0.00") : "",
|
|
85
|
+
leading: V(e, t),
|
|
86
|
+
subtitle: e.secondary_text ?? "",
|
|
87
|
+
title: e.primary_text ?? ""
|
|
121
88
|
}))
|
|
122
89
|
});
|
|
123
90
|
});
|
|
124
91
|
export {
|
|
125
|
-
|
|
92
|
+
tt as TransactionBlock
|
|
126
93
|
};
|
|
127
94
|
|
|
128
95
|
//# sourceMappingURL=TransactionBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useCategoryStore, useGlobalCopyStore, useGlobalStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport { useBeatActions } from '../../../beatActions'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\nimport { statusIconName, statusIconPalette } from '../../../components/statusIcon'\nimport { subscriptionFrequency } from '../../../components/SubscriptionStatus/subscriptionFrequency'\nimport { repeatingTransactionOf, USER_RESPONSE } from '../../../ctaActions/subscriptionAnswer'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 20\n// Status badge: palette disc, contrastText glyph.\nconst BADGE_SIZE = 32\nconst BADGE_GLYPH_SIZE = 20\n\n/** Status disc from `data.icon` / `data.reviewed_icon`. */\nconst SubscriptionBadge = ({ icon }: { icon?: LogoRef }) => {\n const name = statusIconName(icon?.guid)\n\n if (!name) return null\n\n return (\n <Box\n aria-hidden={true}\n data-icon={name}\n data-testid=\"subscription-badge\"\n sx={{\n alignItems: 'center',\n bgcolor: `${statusIconPalette(icon?.color)}.main`,\n borderRadius: '50%',\n display: 'flex',\n height: BADGE_SIZE,\n justifyContent: 'center',\n width: BADGE_SIZE,\n }}\n >\n <Icon\n fill={true}\n name={name}\n size={BADGE_GLYPH_SIZE}\n sx={{ color: `${statusIconPalette(icon?.color)}.contrastText` }}\n />\n </Box>\n )\n}\n\n/**\n * Renders the row's leading logo from its `LogoRef`: a status icon, or an entity guid whose prefix\n * names the entity. An unrecognized prefix renders no logo rather than guessing.\n *\n * `resolveTopLevelCategory`: mxui's `CategoryIcon` only knows the top-level category guids and\n * silently falls back to the Uncategorized icon for a sub-category. The details drawer avoids\n * this by passing `transaction.top_level_category_guid`; the row only has the raw guid, so it is\n * walked up to its parent here (identity until categories load). That applies both to a `CAT-`\n * row logo and to a merchant's `fallback_guid`, which `MerchantLogo` draws through the same\n * `CategoryIcon` when the merchant image fails to load.\n */\nconst renderRowLogo = (row: InstanceSlotRow, resolveTopLevelCategory: (guid: string) => string) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n // A fixed box the size of the other logos keeps the row's text column aligned.\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n }}\n >\n <Icon name={logo.logo_name} size={ROW_ICON_SIZE} sx={{ color: logo.logo_color }} />\n </Box>\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? resolveTopLevelCategory(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.category_guid) {\n const topLevelGuid = resolveTopLevelCategory(logo.category_guid)\n return (\n <Box data-testid={`category-icon-${topLevelGuid}`} sx={{ display: 'flex' }}>\n <CategoryIcon categoryGuid={topLevelGuid} size={ROW_LOGO_SIZE} />\n </Box>\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n *\n * A footer/summary row (Replenish Savings' \"Remaining Balance\") renders under the\n * `with_header_footer` variant, from `data.footer_text` with `data.footer_amount` beside it,\n * formatted like the row amounts (the contract sends it as a number).\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const { getTopLevelCategoryGuid } = useCategoryStore()\n const stores = useGlobalStore()\n const { recurring: recurringCopy } = useGlobalCopyStore()\n const { beat } = useBeatActions()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const {\n answeredBackground,\n background,\n cardVariant,\n elevated,\n followsSubscription,\n showFooter,\n sx,\n showHeader,\n statusMessage,\n } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n // Follows the live repeating transaction (read-only).\n const tracked = followsSubscription && beat ? beat : undefined\n const repeating = tracked ? repeatingTransactionOf({ beat: tracked, stores }) : undefined\n const subscribed = repeating?.user_response === USER_RESPONSE.CONFIRMED\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={slot<LogoRef>(data, 'icon')} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n const footerText = slot<string>(data, 'footer_text')\n const footerAmount = slot<number>(data, 'footer_amount')\n const footer = showFooter\n ? {\n label: footerText,\n amount: formatCurrency(footerAmount, '0,0.00'),\n }\n : undefined\n\n const frequency = tracked ? subscriptionFrequency(recurringCopy, repeating) : undefined\n const badge = followsSubscription ? (\n <SubscriptionBadge icon={slot<LogoRef>(data, subscribed ? 'reviewed_icon' : 'icon')} />\n ) : undefined\n\n return (\n <TransactionListCard\n background={subscribed && answeredBackground ? answeredBackground : background}\n badge={badge}\n elevated={elevated}\n footer={footer}\n header={header}\n sx={sx}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount: typeof row.amount === 'number' ? formatCurrency(row.amount, '0,0.00') : '',\n amountCaption: frequency,\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useCategoryStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 20\n\n/**\n * Renders the row's leading logo from its `LogoRef`: a status icon, or an entity guid whose prefix\n * names the entity. An unrecognized prefix renders no logo rather than guessing.\n *\n * `resolveTopLevelCategory`: mxui's `CategoryIcon` only knows the top-level category guids and\n * silently falls back to the Uncategorized icon for a sub-category. The details drawer avoids\n * this by passing `transaction.top_level_category_guid`; the row only has the raw guid, so it is\n * walked up to its parent here (identity until categories load). That applies both to a `CAT-`\n * row logo and to a merchant's `fallback_guid`, which `MerchantLogo` draws through the same\n * `CategoryIcon` when the merchant image fails to load.\n */\nconst renderRowLogo = (row: InstanceSlotRow, resolveTopLevelCategory: (guid: string) => string) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n // A fixed box the size of the other logos keeps the row's text column aligned.\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n }}\n >\n <Icon name={logo.logo_name} size={ROW_ICON_SIZE} sx={{ color: logo.logo_color }} />\n </Box>\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? resolveTopLevelCategory(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.category_guid) {\n const topLevelGuid = resolveTopLevelCategory(logo.category_guid)\n return (\n <Box data-testid={`category-icon-${topLevelGuid}`} sx={{ display: 'flex' }}>\n <CategoryIcon categoryGuid={topLevelGuid} size={ROW_LOGO_SIZE} />\n </Box>\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n *\n * A footer/summary row (Replenish Savings' \"Remaining Balance\") renders under the\n * `with_header_footer` variant, from `data.footer_text` with `data.footer_amount` beside it,\n * formatted like the row amounts (the contract sends it as a number).\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const { getTopLevelCategoryGuid } = useCategoryStore()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const { background, cardVariant, showFooter, showHeader, statusMessage } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={slot<LogoRef>(data, 'icon')} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n const footerText = slot<string>(data, 'footer_text')\n const footerAmount = slot<number>(data, 'footer_amount')\n const footer = showFooter\n ? {\n label: footerText,\n amount: formatCurrency(footerAmount, '0,0.00'),\n }\n : undefined\n\n return (\n <TransactionListCard\n background={background}\n footer={footer}\n header={header}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount: typeof row.amount === 'number' ? formatCurrency(row.amount, '0,0.00') : '',\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
2
|
/**
|
|
3
3
|
* Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same
|
|
4
4
|
* pre-localized rows through `TransactionListCard`; only the header and the slot differ.
|
|
@@ -35,14 +35,6 @@ export interface TransactionLayoutConfig {
|
|
|
35
35
|
background?: string;
|
|
36
36
|
/** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */
|
|
37
37
|
statusMessage?: boolean;
|
|
38
|
-
/** Frequency, badge and answered wash from the live repeating transaction. */
|
|
39
|
-
followsSubscription?: boolean;
|
|
40
|
-
/** Wash once subscribed. */
|
|
41
|
-
answeredBackground?: string;
|
|
42
|
-
/** The rows' card on the wash gets `elevation/1` (needs `background`). */
|
|
43
|
-
elevated?: boolean;
|
|
44
|
-
/** Slot padding override (CSS shorthand). */
|
|
45
|
-
sx?: SxProps;
|
|
46
38
|
}
|
|
47
39
|
/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */
|
|
48
40
|
export declare const getLayoutConfig: (theme: Theme) => Record<TransactionBlockVariant, TransactionLayoutConfig>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WARNING_WASH_GRADIENT as r, getPrimaryWashGradient as t } from "../../../components/celebrationGradients.es.js";
|
|
2
2
|
var e = {
|
|
3
3
|
WithHeader: "with_header",
|
|
4
4
|
WithHeaderFooter: "with_header_footer",
|
|
@@ -7,7 +7,7 @@ var e = {
|
|
|
7
7
|
InfoWash: "info_wash",
|
|
8
8
|
WarningWash: "warning_wash",
|
|
9
9
|
StatusMessage: "status_message"
|
|
10
|
-
},
|
|
10
|
+
}, s = (a) => ({
|
|
11
11
|
[e.WithHeader]: { showHeader: !0 },
|
|
12
12
|
[e.WithHeaderFooter]: {
|
|
13
13
|
showHeader: !0,
|
|
@@ -20,15 +20,11 @@ var e = {
|
|
|
20
20
|
},
|
|
21
21
|
[e.InfoWash]: {
|
|
22
22
|
showHeader: !1,
|
|
23
|
-
background:
|
|
23
|
+
background: t(a)
|
|
24
24
|
},
|
|
25
25
|
[e.WarningWash]: {
|
|
26
26
|
showHeader: !1,
|
|
27
|
-
background:
|
|
28
|
-
followsSubscription: !0,
|
|
29
|
-
answeredBackground: r,
|
|
30
|
-
elevated: !0,
|
|
31
|
-
sx: { p: "28px 24px 24px 32px" }
|
|
27
|
+
background: r
|
|
32
28
|
},
|
|
33
29
|
[e.StatusMessage]: {
|
|
34
30
|
showHeader: !1,
|
|
@@ -36,7 +32,7 @@ var e = {
|
|
|
36
32
|
}
|
|
37
33
|
});
|
|
38
34
|
export {
|
|
39
|
-
|
|
35
|
+
s as getLayoutConfig,
|
|
40
36
|
e as transactionBlockVariant
|
|
41
37
|
};
|
|
42
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport {\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` — borderless row on the blue slot wash (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 */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\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 /** CSS background for the slot behind the card; the card then renders borderless on paper. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n [transactionBlockVariant.WithHeader]: { showHeader: true },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n },\n [transactionBlockVariant.StatusMessage]: { showHeader: false, statusMessage: true },\n})\n"],"mappings":";AAsBA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AACjB,GAmBa,IAAA,CACX,OAC8D;AAAA,EAC7D,CAAA,EAAwB,UAAA,GAAa,EAAE,YAAY,GAAK;AAAA,EACxD,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,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,EAC1C;AAAA,EACC,CAAA,EAAwB,WAAA,GAAc;AAAA,IACrC,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IAAE,YAAY;AAAA,IAAO,eAAe;AAAA,EAAK;AACpF"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ThemedSVGImage as f } from "../../../components/chartblocks/ThemedSVGImage.es.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { resolveVariantConfig as p } from "../../resolveVariantConfig.es.js";
|
|
3
|
+
import { getLayoutConfig as d } from "./layout.es.js";
|
|
4
|
+
import { CtaStatus as v } from "../../../components/CtaStatus.es.js";
|
|
5
5
|
import { EmergencySavingsAccountPicker as h } from "./EmergencySavingsAccountPicker.es.js";
|
|
6
6
|
import s from "@mui/material/Stack";
|
|
7
7
|
import { jsx as o, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
var V = ({ payload: { instance_slot: m, instance_slot_data: n, widget_type: t }, beatGuid: c }) => {
|
|
9
|
-
const l = t === "mini", a = t === "full", { variant: g, data: e } = m, i = d(
|
|
9
|
+
const l = t === "mini", a = t === "full", { variant: g, data: e } = m, i = p(d(n?.isCIBC), g, "savings", "SVGImageBlock"), r = typeof e?.saved_label == "string" ? e.saved_label.trim() : "";
|
|
10
10
|
return /* @__PURE__ */ u(s, {
|
|
11
11
|
alignItems: "center",
|
|
12
12
|
sx: { width: "100%" },
|
|
@@ -25,7 +25,7 @@ var V = ({ payload: { instance_slot: m, instance_slot_data: n, widget_type: t },
|
|
|
25
25
|
px: 16,
|
|
26
26
|
width: "100%"
|
|
27
27
|
},
|
|
28
|
-
children: /* @__PURE__ */ o(
|
|
28
|
+
children: /* @__PURE__ */ o(v, {
|
|
29
29
|
icon: "check_circle",
|
|
30
30
|
label: r,
|
|
31
31
|
tone: "success"
|