@mx-cartographer/experiences 9.7.74 → 9.7.76
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 +12 -0
- package/dist/core/types/Insights.d.ts +2 -7
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +37 -37
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.d.ts +10 -0
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js +12 -7
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js +28 -20
- package/dist/insights-v2/actionBlocks/SurveyModalActionBlock.es.js.map +1 -1
- 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/SavingsOpportunityBlock/SavingsOpportunityBlock.d.ts +7 -14
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js +11 -27
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +75 -68
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +4 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +2 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +4 -4
- package/dist/insights-v2/components/BaseLayout.es.js +40 -40
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/CtaStatus.d.ts +2 -2
- package/dist/insights-v2/components/CtaStatus.es.js +23 -14
- package/dist/insights-v2/components/CtaStatus.es.js.map +1 -1
- package/dist/insights-v2/components/FeedbackDialog.d.ts +3 -1
- package/dist/insights-v2/components/FeedbackDialog.es.js +28 -28
- package/dist/insights-v2/components/FeedbackDialog.es.js.map +1 -1
- package/dist/insights-v2/components/FeedbackModal.d.ts +3 -1
- package/dist/insights-v2/components/FeedbackModal.es.js +17 -16
- package/dist/insights-v2/components/FeedbackModal.es.js.map +1 -1
- package/dist/insights-v2/components/InsightTransactionRow.d.ts +3 -1
- package/dist/insights-v2/components/InsightTransactionRow.es.js +36 -19
- package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -1
- package/dist/insights-v2/components/SavingsOpportunityCard.es.js +6 -4
- package/dist/insights-v2/components/SavingsOpportunityCard.es.js.map +1 -1
- package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.d.ts +4 -0
- package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.es.js +11 -0
- package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.es.js.map +1 -0
- package/dist/insights-v2/components/SurveyModal.d.ts +5 -1
- package/dist/insights-v2/components/SurveyModal.es.js +46 -38
- package/dist/insights-v2/components/SurveyModal.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaConfig.es.js +19 -11
- package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/index.d.ts +1 -1
- package/dist/insights-v2/ctaActions/runCtaAction.d.ts +5 -1
- package/dist/insights-v2/ctaActions/runCtaAction.es.js +4 -4
- package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/subscriptionAnswer.d.ts +4 -2
- package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js +136 -0
- package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js.map +1 -0
- package/dist/insights-v2/ctaActions/types.d.ts +12 -0
- package/dist/insights-v2/ctaActions/useCtaAction.d.ts +4 -1
- package/dist/insights-v2/ctaActions/useCtaAction.es.js +33 -33
- package/dist/insights-v2/ctaActions/useCtaAction.es.js.map +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +69 -64
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/layout.d.ts +0 -18
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/layout.es.js +0 -13
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/layout.es.js.map +0 -1
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 { getDynamicCtaBasedOnTriggers as g } from "../util.es.js";
|
|
3
|
+
import { getDrillDownConfig as m, guidListOf as p } from "./utils.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 = g(r, a?.primary_cta, a?.secondary_cta, a?.in_description_cta)?.variant, { fetchMissingTransactions: e } = m(c ?? ""), i = p(e?.(t));
|
|
9
9
|
(async () => (o || await s(), i && await n(i)))();
|
|
10
10
|
}, []);
|
|
11
11
|
};
|
package/dist/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { InsightsPayload } from '../../../../core';
|
|
2
|
-
interface SavingsOpportunityBlockProps {
|
|
3
|
-
payload: InsightsPayload;
|
|
4
|
-
beatGuid?: string;
|
|
5
|
-
}
|
|
6
2
|
/**
|
|
7
|
-
* Savings Opportunity
|
|
8
|
-
* `
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Wrapped in `createVariantBlock` so an added design branch is a new registry entry rather than a
|
|
12
|
-
* rewrite of dispatch logic. Six variants are defined today, formed by
|
|
13
|
-
* `{generic, savings, specific} × {safety_net_not_set, safety_net_set}`; copy/CTA differences
|
|
14
|
-
* live in the payload, not here. An unknown variant degrades to the default
|
|
15
|
-
* (`generic_safety_net_not_set`).
|
|
3
|
+
* Savings Opportunity V2 coupon (ditto `savings_amount_block`, single `save_amount` variant): reads
|
|
4
|
+
* `primary_text` and `amount` off `instance_slot.data`. `slot()` is an unchecked cast, so a payload
|
|
5
|
+
* that omits the amount or sends a non-number / non-string renders nothing rather than a fabricated
|
|
6
|
+
* `$0.00` card (same guard as `SaveExtraBlock`).
|
|
16
7
|
*/
|
|
17
|
-
declare const SavingsOpportunityBlock: ({ payload
|
|
8
|
+
declare const SavingsOpportunityBlock: ({ payload }: {
|
|
9
|
+
payload: InsightsPayload;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
11
|
export default SavingsOpportunityBlock;
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
children: /* @__PURE__ */ o(p, {
|
|
12
|
-
amount: m(a ?? 0, "0,0.00"),
|
|
13
|
-
label: i ?? "",
|
|
14
|
-
slot: e
|
|
15
|
-
})
|
|
1
|
+
import { slot as i } from "../../../../core/types/Insights.es.js";
|
|
2
|
+
import { formatCurrency as a } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import m from "../../../components/SavingsOpportunityCard.es.js";
|
|
4
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
5
|
+
var s = (t) => typeof t == "number" && Number.isFinite(t), y = ({ payload: t }) => {
|
|
6
|
+
const r = t.instance_slot?.data, o = i(r, "amount"), n = i(r, "primary_text");
|
|
7
|
+
return !s(o) || typeof n != "string" ? null : /* @__PURE__ */ e(m, {
|
|
8
|
+
amount: a(o, "0,0.00"),
|
|
9
|
+
label: n,
|
|
10
|
+
slot: !0
|
|
16
11
|
});
|
|
17
|
-
}
|
|
18
|
-
const a = r.instance_slot.variant ?? void 0;
|
|
19
|
-
return /* @__PURE__ */ o(f, {
|
|
20
|
-
beatGuid: t,
|
|
21
|
-
payload: r,
|
|
22
|
-
variant: a
|
|
23
|
-
});
|
|
24
|
-
}, f = l({
|
|
25
|
-
variants: Object.fromEntries(Object.values(c).map((r) => [r, n])),
|
|
26
|
-
fallback: n,
|
|
27
|
-
name: "SavingsOpportunityBlock"
|
|
28
|
-
});
|
|
12
|
+
};
|
|
29
13
|
export {
|
|
30
14
|
y as default
|
|
31
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavingsOpportunityBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SavingsOpportunityBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.tsx"],"sourcesContent":["import { slot as readSlot, type InsightsPayload } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport SavingsOpportunityCard from '../../../components/SavingsOpportunityCard'\n\nconst isFiniteNumber = (value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value)\n\n/**\n * Savings Opportunity V2 coupon (ditto `savings_amount_block`, single `save_amount` variant): reads\n * `primary_text` and `amount` off `instance_slot.data`. `slot()` is an unchecked cast, so a payload\n * that omits the amount or sends a non-number / non-string renders nothing rather than a fabricated\n * `$0.00` card (same guard as `SaveExtraBlock`).\n */\nconst SavingsOpportunityBlock = ({ payload }: { payload: InsightsPayload }) => {\n const data = payload.instance_slot?.data\n const amount = readSlot<unknown>(data, 'amount')\n const primaryText = readSlot<unknown>(data, 'primary_text')\n\n if (!isFiniteNumber(amount) || typeof primaryText !== 'string') return null\n\n return <SavingsOpportunityCard amount={formatCurrency(amount, '0,0.00')} label={primaryText} slot />\n}\n\nexport default SavingsOpportunityBlock\n"],"mappings":";;;;AAKA,IAAM,IAAA,CAAkB,MACtB,OAAO,KAAU,YAAY,OAAO,SAAS,CAAK,GAQ9C,IAAA,CAA2B,EAAE,SAAA,EAAA,MAA4C;AAC7E,QAAM,IAAO,EAAQ,eAAe,MAC9B,IAAS,EAAkB,GAAM,QAAQ,GACzC,IAAc,EAAkB,GAAM,cAAc;AAE1D,SAAI,CAAC,EAAe,CAAM,KAAK,OAAO,KAAgB,WAAiB,OAEhE,gBAAA,EAAC,GAAD;AAAA,IAAwB,QAAQ,EAAe,GAAQ,QAAQ;AAAA,IAAG,OAAO;AAAA,IAAa,MAAA;AAAA,EAAM,CAAA;AACrG"}
|
|
@@ -1,95 +1,102 @@
|
|
|
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 {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { useCategoryStore as L, useGlobalCopyStore as O, useGlobalStore as B } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { slot as n } from "../../../../core/types/Insights.es.js";
|
|
3
|
+
import { formatCurrency as f } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import { useBeatActions as k } from "../../../beatActions.es.js";
|
|
5
|
+
import { repeatingTransactionOf as z } from "../../../ctaActions/subscriptionAnswer.es.js";
|
|
6
|
+
import { logoFromRef as A } from "../../../components/shared/EntityLogo.es.js";
|
|
7
|
+
import F from "../../../components/LogoFromGuid.es.js";
|
|
8
|
+
import { resolveVariantConfig as M } from "../../resolveVariantConfig.es.js";
|
|
9
|
+
import R from "../../../components/TransactionListCard.es.js";
|
|
10
|
+
import q from "../../../components/StatusMessageCard.es.js";
|
|
11
|
+
import { subscriptionFrequency as E } from "../../../components/SubscriptionStatus/subscriptionFrequency.es.js";
|
|
12
|
+
import { getLayoutConfig as N, transactionBlockVariant as V } from "./layout.es.js";
|
|
13
|
+
import { observer as Z } from "mobx-react-lite";
|
|
14
|
+
import { CategoryIcon as j, InstitutionLogo as w, MerchantLogo as H } from "@mxenabled/mxui";
|
|
15
|
+
import { Icon as W } from "@mxenabled/mx-icons";
|
|
16
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
17
|
+
import { useTheme as $ } from "@mui/material/styles";
|
|
18
|
+
import u from "@mui/material/Box";
|
|
19
|
+
var i = 32, U = Math.round(i * 0.625), D = 20, J = (a, s) => {
|
|
20
|
+
const o = A(a.logo, a.primary_text);
|
|
21
|
+
if (o) {
|
|
22
|
+
if (o.logo_name) return /* @__PURE__ */ t(u, {
|
|
20
23
|
sx: {
|
|
21
24
|
alignItems: "center",
|
|
22
25
|
display: "flex",
|
|
23
|
-
height:
|
|
26
|
+
height: i,
|
|
24
27
|
justifyContent: "center",
|
|
25
|
-
width:
|
|
28
|
+
width: i
|
|
26
29
|
},
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
name:
|
|
29
|
-
size:
|
|
30
|
-
sx: { color:
|
|
30
|
+
children: /* @__PURE__ */ t(W, {
|
|
31
|
+
name: o.logo_name,
|
|
32
|
+
size: U,
|
|
33
|
+
sx: { color: o.logo_color }
|
|
31
34
|
})
|
|
32
35
|
});
|
|
33
|
-
if (
|
|
34
|
-
alt:
|
|
35
|
-
categoryGuid:
|
|
36
|
-
merchantGuid:
|
|
37
|
-
size:
|
|
36
|
+
if (o.merchant_guid) return /* @__PURE__ */ t(H, {
|
|
37
|
+
alt: o.merchant_name ?? "",
|
|
38
|
+
categoryGuid: o.category_guid ? s(o.category_guid) : "",
|
|
39
|
+
merchantGuid: o.merchant_guid,
|
|
40
|
+
size: i
|
|
38
41
|
});
|
|
39
|
-
if (
|
|
40
|
-
alt:
|
|
41
|
-
institutionGuid:
|
|
42
|
-
size:
|
|
42
|
+
if (o.institution_guid) return /* @__PURE__ */ t(w, {
|
|
43
|
+
alt: o.institution_name ?? "",
|
|
44
|
+
institutionGuid: o.institution_guid,
|
|
45
|
+
size: i
|
|
43
46
|
});
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
"data-testid": `category-icon-${
|
|
47
|
+
if (o.category_guid) {
|
|
48
|
+
const m = s(o.category_guid);
|
|
49
|
+
return /* @__PURE__ */ t(u, {
|
|
50
|
+
"data-testid": `category-icon-${m}`,
|
|
48
51
|
sx: { display: "flex" },
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
categoryGuid:
|
|
51
|
-
size:
|
|
52
|
+
children: /* @__PURE__ */ t(j, {
|
|
53
|
+
categoryGuid: m,
|
|
54
|
+
size: i
|
|
52
55
|
})
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
|
-
},
|
|
57
|
-
const s =
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
return typeof
|
|
61
|
-
icon: /* @__PURE__ */
|
|
59
|
+
}, lo = Z(({ payload: a }) => {
|
|
60
|
+
const s = $(), { getTopLevelCategoryGuid: o } = L(), m = B(), { recurring: l } = O(), { beat: g } = k(), { data: e, variant: p } = a.instance_slot, { background: y, cardVariant: _, showFooter: h, showFrequency: x, showHeader: v, statusMessage: C } = M(N(s), p, V.NoHeader, "TransactionBlock");
|
|
61
|
+
if (C) {
|
|
62
|
+
const r = n(e, "message");
|
|
63
|
+
return typeof r != "string" || !r.trim() ? (console.warn("[TransactionBlock] status_message has no message — rendering nothing."), null) : /* @__PURE__ */ t(q, {
|
|
64
|
+
icon: /* @__PURE__ */ t(u, {
|
|
62
65
|
"aria-hidden": "true",
|
|
63
66
|
sx: { display: "flex" },
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
logo:
|
|
66
|
-
size:
|
|
67
|
+
children: /* @__PURE__ */ t(F, {
|
|
68
|
+
logo: n(e, "icon"),
|
|
69
|
+
size: D
|
|
67
70
|
})
|
|
68
71
|
}),
|
|
69
|
-
message:
|
|
72
|
+
message: r
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
|
-
const
|
|
73
|
-
if (!Array.isArray(
|
|
74
|
-
const
|
|
75
|
-
label:
|
|
76
|
-
amount:
|
|
77
|
-
} : void 0
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
const c = n(e, "series"), d = n(e, "header_text");
|
|
76
|
+
if (!Array.isArray(c) || !c.length) return null;
|
|
77
|
+
const G = v && typeof d == "string" ? d : void 0, I = n(e, "footer_text"), T = n(e, "footer_amount"), b = h ? {
|
|
78
|
+
label: I,
|
|
79
|
+
amount: f(T, "0,0.00")
|
|
80
|
+
} : void 0, S = x && g ? E(l, z({
|
|
81
|
+
beat: g,
|
|
82
|
+
stores: m
|
|
83
|
+
})) : void 0;
|
|
84
|
+
return /* @__PURE__ */ t(R, {
|
|
85
|
+
background: y,
|
|
86
|
+
footer: b,
|
|
87
|
+
header: G,
|
|
88
|
+
variant: _,
|
|
89
|
+
rows: c.map((r) => ({
|
|
90
|
+
amount: typeof r.amount == "number" ? f(r.amount, "0,0.00") : "",
|
|
91
|
+
amountCaption: S,
|
|
92
|
+
leading: J(r, o),
|
|
93
|
+
subtitle: r.secondary_text ?? "",
|
|
94
|
+
title: r.primary_text ?? ""
|
|
88
95
|
}))
|
|
89
96
|
});
|
|
90
97
|
});
|
|
91
98
|
export {
|
|
92
|
-
|
|
99
|
+
lo as TransactionBlock
|
|
93
100
|
};
|
|
94
101
|
|
|
95
102
|
//# 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 } 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
|
+
{"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 { subscriptionFrequency } from '../../../components/SubscriptionStatus/subscriptionFrequency'\nimport { repeatingTransactionOf } 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\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 { background, cardVariant, showFooter, showFrequency, showHeader, statusMessage } =\n 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 // Live, as pulse: the repeating transaction the CTA's `prepare` loads.\n const frequency =\n showFrequency && beat\n ? subscriptionFrequency(recurringCopy, repeatingTransactionOf({ beat, stores }))\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 amountCaption: frequency,\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,IAAM,IAAgB,IAEhB,IAAgB,KAAK,MAAM,IAAgB,KAAK,GAChD,IAAmB,IAanB,IAAA,CAAiB,GAAsB,MAAsD;AACjG,QAAM,IAAO,EAAY,EAAI,MAAM,EAAI,YAAY;AAEnD,MAAK,GAEL;AAAA,QAAI,EAAK,UAEP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,gBAAgB;AAAA,QAChB,OAAO;AAAA,MACT;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM,EAAK;AAAA,QAAW,MAAM;AAAA,QAAe,IAAI,EAAE,OAAO,EAAK,WAAW;AAAA,MAAI,CAAA;AAAA,IAC/E,CAAA;AAIT,QAAI,EAAK,cACP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,EAAK,iBAAiB;AAAA,MAC3B,cAAc,EAAK,gBAAgB,EAAwB,EAAK,aAAa,IAAI;AAAA,MACjF,cAAc,EAAK;AAAA,MACnB,MAAM;AAAA,IACP,CAAA;AAIL,QAAI,EAAK,iBACP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,EAAK,oBAAoB;AAAA,MAC9B,iBAAiB,EAAK;AAAA,MACtB,MAAM;AAAA,IACP,CAAA;AAIL,QAAI,EAAK,eAAe;AACtB,YAAM,IAAe,EAAwB,EAAK,aAAa;AAC/D,aACE,gBAAA,EAAC,GAAD;AAAA,QAAK,eAAa,iBAAiB,CAAA;AAAA,QAAgB,IAAI,EAAE,SAAS,OAAO;AAAA,QACvE,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAc,cAAc;AAAA,UAAc,MAAM;AAAA,QAAgB,CAAA;AAAA,MAC7D,CAAA;AAAA,IAET;AAAA;AAGF,GAuBa,KAAmB,EAAA,CAAU,EAAE,SAAA,EAAA,MAAqC;AAC/E,QAAM,IAAQ,EAAS,GACjB,EAAE,yBAAA,EAAA,IAA4B,EAAiB,GAC/C,IAAS,EAAe,GACxB,EAAE,WAAW,EAAA,IAAkB,EAAmB,GAClD,EAAE,MAAA,EAAA,IAAS,EAAe,GAC1B,EAAE,MAAA,GAAM,SAAA,EAAA,IAAY,EAAQ,eAE5B,EAAE,YAAA,GAAY,aAAA,GAAa,YAAA,GAAY,eAAA,GAAe,YAAA,GAAY,eAAA,EAAA,IACtE,EACE,EAAgB,CAAK,GACrB,GACA,EAAwB,UACxB,kBACF;AAEF,MAAI,GAAe;AACjB,UAAM,IAAU,EAAa,GAAM,SAAS;AAC5C,WAAI,OAAO,KAAY,YAAY,CAAC,EAAQ,KAAK,KAC/C,QAAQ,KAAK,uEAAuE,GAC7E,QAKP,gBAAA,EAAC,GAAD;AAAA,MACE,MACE,gBAAA,EAAC,GAAD;AAAA,QAAK,eAAY;AAAA,QAAO,IAAI,EAAE,SAAS,OAAO;AAAA,QAC5C,UAAA,gBAAA,EAAC,GAAD;AAAA,UAAc,MAAM,EAAc,GAAM,MAAM;AAAA,UAAG,MAAM;AAAA,QAAmB,CAAA;AAAA,MACvE,CAAA;AAAA,MAEE,SAAA;AAAA,IACV,CAAA;AAAA,EAEL;AAEA,QAAM,IAAS,EAAwB,GAAM,QAAQ,GAC/C,IAAa,EAAa,GAAM,aAAa;AAEnD,MAAI,CAAC,MAAM,QAAQ,CAAM,KAAK,CAAC,EAAO,OAAQ,QAAO;AAErD,QAAM,IAAS,KAAc,OAAO,KAAe,WAAW,IAAa,QAErE,IAAa,EAAa,GAAM,aAAa,GAC7C,IAAe,EAAa,GAAM,eAAe,GACjD,IAAS,IACX;AAAA,IACE,OAAO;AAAA,IACP,QAAQ,EAAe,GAAc,QAAQ;AAAA,EAC/C,IACA,QAGE,IACJ,KAAiB,IACb,EAAsB,GAAe,EAAuB;AAAA,IAAE,MAAA;AAAA,IAAM,QAAA;AAAA,EAAO,CAAC,CAAC,IAC7E;AAEN,SACE,gBAAA,EAAC,GAAD;AAAA,IACc,YAAA;AAAA,IACJ,QAAA;AAAA,IACA,QAAA;AAAA,IACR,SAAS;AAAA,IACT,MAAM,EAAO,IAAA,CAAK,OAAS;AAAA,MACzB,QAAQ,OAAO,EAAI,UAAW,WAAW,EAAe,EAAI,QAAQ,QAAQ,IAAI;AAAA,MAChF,eAAe;AAAA,MACf,SAAS,EAAc,GAAK,CAAuB;AAAA,MACnD,UAAU,EAAI,kBAAkB;AAAA,MAChC,OAAO,EAAI,gBAAgB;AAAA,IAC7B,EAAE;AAAA,EACH,CAAA;AAEL,CAAC"}
|
|
@@ -8,7 +8,8 @@ import { Theme } from '@mui/material/styles';
|
|
|
8
8
|
* `data.footer_text` / `data.footer_amount` (Replenish Savings' "Remaining Balance").
|
|
9
9
|
* - `NoHeader` — the row alone (Large Transaction without a merchant).
|
|
10
10
|
* - `UncategorizedTransaction` — filled primary header ("{count} transactions").
|
|
11
|
-
* - `InfoWash` — borderless row on the blue slot wash
|
|
11
|
+
* - `InfoWash` — borderless row on the blue slot wash, with the subscription's live
|
|
12
|
+
* frequency under the amount (e.g. Subscription Detected).
|
|
12
13
|
* - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected
|
|
13
14
|
* Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.
|
|
14
15
|
* - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`
|
|
@@ -35,6 +36,8 @@ export interface TransactionLayoutConfig {
|
|
|
35
36
|
background?: string;
|
|
36
37
|
/** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */
|
|
37
38
|
statusMessage?: boolean;
|
|
39
|
+
/** Caption each amount with the beat's live repeating transaction frequency. */
|
|
40
|
+
showFrequency?: boolean;
|
|
38
41
|
}
|
|
39
42
|
/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */
|
|
40
43
|
export declare const getLayoutConfig: (theme: Theme) => Record<TransactionBlockVariant, TransactionLayoutConfig>;
|
|
@@ -1 +1 @@
|
|
|
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":";
|
|
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, with the subscription's live\n * 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 */\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 /** Caption each amount with the beat's live repeating transaction frequency. */\n showFrequency?: 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 showFrequency: true,\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n },\n [transactionBlockVariant.StatusMessage]: { showHeader: false, statusMessage: true },\n})\n"],"mappings":";AAuBA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AACjB,GAqBa,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,IACxC,eAAe;AAAA,EACjB;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"}
|
|
@@ -2,8 +2,8 @@ import { useGlobalCopyStore as S } from "../../../../common/context/hooks.es.js"
|
|
|
2
2
|
import { slot as c } from "../../../../core/types/Insights.es.js";
|
|
3
3
|
import { formatCurrency as C } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
4
|
import v from "../../../components/LogoFromGuid.es.js";
|
|
5
|
-
import
|
|
6
|
-
import B from "
|
|
5
|
+
import $ from "../../../components/SubscriptionHeroCard.es.js";
|
|
6
|
+
import { createVariantBlock as B } from "../../createVariantBlock.es.js";
|
|
7
7
|
import { CADENCE as V, upcomingSubscriptionVariant as j } from "./layout.es.js";
|
|
8
8
|
import w from "@mui/material/Stack";
|
|
9
9
|
import { jsx as o, jsxs as A } from "react/jsx-runtime";
|
|
@@ -125,7 +125,7 @@ var E = [
|
|
|
125
125
|
}) : null;
|
|
126
126
|
return /* @__PURE__ */ o(w, {
|
|
127
127
|
sx: { px: 16 },
|
|
128
|
-
children: /* @__PURE__ */ o(
|
|
128
|
+
children: /* @__PURE__ */ o($, {
|
|
129
129
|
backdrop: k,
|
|
130
130
|
compact: l,
|
|
131
131
|
logo: n ? /* @__PURE__ */ o(v, {
|
|
@@ -144,7 +144,7 @@ var E = [
|
|
|
144
144
|
payload: i,
|
|
145
145
|
variant: a
|
|
146
146
|
});
|
|
147
|
-
}, G =
|
|
147
|
+
}, G = B({
|
|
148
148
|
variants: { [j.Hero]: x },
|
|
149
149
|
fallback: x,
|
|
150
150
|
name: "UpcomingSubscriptionBlock"
|
|
@@ -3,27 +3,27 @@ import { sendClientConfiguredCta as Q } from "../../common/utils/PostMessage.es.
|
|
|
3
3
|
import { BeatActionsProvider as Z } from "../beatActions.es.js";
|
|
4
4
|
import { isContactSupportCtaDisabled as oo } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
5
5
|
import { reportCtaClick as io } from "../ctaActions/runCtaAction.es.js";
|
|
6
|
-
import { useBeatCtaActions as
|
|
7
|
-
import { actionBlocksKey as
|
|
6
|
+
import { useBeatCtaActions as to } from "../ctaActions/useCtaAction.es.js";
|
|
7
|
+
import { actionBlocksKey as eo } from "../mappings/actionBlocksKey.es.js";
|
|
8
8
|
import { logoFromRef as ro } from "./shared/EntityLogo.es.js";
|
|
9
9
|
import { CtaStatus as no } from "./CtaStatus.es.js";
|
|
10
10
|
import so from "./FeedbackDialog.es.js";
|
|
11
11
|
import { ErrorCard as ao } from "./ErrorCard.es.js";
|
|
12
12
|
import { blocks as lo } from "../mappings/blocks.es.js";
|
|
13
13
|
import { ActionBlockLayer as co } from "../actionBlocks/ActionBlockLayer.es.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import po from "./Footer.es.js";
|
|
15
|
+
import mo from "./Header.es.js";
|
|
16
16
|
import { FeedbackBar as uo } from "./FeedbackBar.es.js";
|
|
17
17
|
import { DismissInsightDialog as fo } from "./DismissInsightDialog.es.js";
|
|
18
18
|
import { HiddenConfirmationCard as Co } from "./HiddenConfirmationCard.es.js";
|
|
19
19
|
import { LoadingCard as bo } from "./LoadingCard.es.js";
|
|
20
20
|
import { ObsolesceBanner as go } from "./ObsolesceBanner.es.js";
|
|
21
21
|
import { useBeatFeedbackFlow as ho } from "../hooks/useBeatFeedbackFlow.es.js";
|
|
22
|
-
import { useMemo as
|
|
23
|
-
import { observer as
|
|
22
|
+
import { useMemo as _o } from "react";
|
|
23
|
+
import { observer as yo } from "mobx-react-lite";
|
|
24
24
|
import x from "@mui/material/Stack";
|
|
25
25
|
import { P as ko } from "@mxenabled/mxui";
|
|
26
|
-
import
|
|
26
|
+
import m from "@mui/material/Button";
|
|
27
27
|
import { ChevronRight as O } from "@mxenabled/mx-icons";
|
|
28
28
|
import { Fragment as xo, jsx as i, jsxs as u } from "react/jsx-runtime";
|
|
29
29
|
import vo from "@mui/material/Box";
|
|
@@ -64,38 +64,38 @@ var wo = {}, To = {
|
|
|
64
64
|
px: 16,
|
|
65
65
|
py: 12,
|
|
66
66
|
"&.Mui-disabled": { color: "text.disabled" }
|
|
67
|
-
}, ni =
|
|
68
|
-
const E = $(), H = J(), { config: R } = Y(), o = ho(
|
|
67
|
+
}, ni = yo(({ beat: t, beatActions: l = wo, obsolete: b, isLoading: I = !1, isError: F = !1 }) => {
|
|
68
|
+
const E = $(), H = J(), { config: R } = Y(), o = ho(t, l), S = q(), { runCta: M, primary: g, secondary: w } = to(t, l, t.insights_payload?.primary_cta, t.insights_payload?.secondary_cta, t.insights_payload?.in_description_cta), f = t.insights_payload?.widget_type === "mini", N = _o(() => ({
|
|
69
69
|
...o.wrappedActions,
|
|
70
|
-
beat:
|
|
71
|
-
}), [o.wrappedActions,
|
|
70
|
+
beat: t
|
|
71
|
+
}), [o.wrappedActions, t]);
|
|
72
72
|
if (F) return /* @__PURE__ */ i(ao, {});
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
75
|
-
const { instance_slot: W, primary_cta: n, secondary_cta: s, sub_title: P, title: X, guid: T, dismissed_at: z } =
|
|
76
|
-
logo: ro(
|
|
77
|
-
text:
|
|
78
|
-
} : void 0), c = (a) => oo(a, R, l.onContactSupport), D = async (a,
|
|
79
|
-
if (!c(
|
|
80
|
-
if (
|
|
73
|
+
const e = t.insights_payload;
|
|
74
|
+
if (!e || o.cardState === "dismissed") return null;
|
|
75
|
+
const { instance_slot: W, primary_cta: n, secondary_cta: s, sub_title: P, title: X, guid: T, dismissed_at: z } = e, { block: G } = W, V = P ?? (e.subtitle ? {
|
|
76
|
+
logo: ro(e.logo),
|
|
77
|
+
text: e.subtitle
|
|
78
|
+
} : void 0), c = (a) => oo(a, R, l.onContactSupport), D = async (a, p) => {
|
|
79
|
+
if (!c(p.block)) {
|
|
80
|
+
if (p.block === eo.CONTACT_SUPPORT_ACTION_BLOCK) {
|
|
81
81
|
io({
|
|
82
|
-
beat:
|
|
82
|
+
beat: t,
|
|
83
83
|
stores: S,
|
|
84
84
|
hostActions: l,
|
|
85
85
|
slot: a
|
|
86
86
|
}), l.onContactSupport?.();
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
await M(a,
|
|
89
|
+
await M(a, p);
|
|
90
90
|
}
|
|
91
|
-
}, L = lo[G], d =
|
|
92
|
-
const { is_mobile_webview: a, clientConfig:
|
|
93
|
-
Q(
|
|
91
|
+
}, L = lo[G], d = e.in_description_cta, h = !f && d?.label && d.block ? d : void 0, _ = n?.label || (h ? void 0 : d?.label) || void 0, C = !f && !!n?.label, A = t.in_description_cta || t.html_in_description_cta, j = () => {
|
|
92
|
+
const { is_mobile_webview: a, clientConfig: p } = S.appDataStore.appConfig;
|
|
93
|
+
Q(t.template, {
|
|
94
94
|
isMobileWebview: a,
|
|
95
|
-
webviewScheme:
|
|
96
|
-
userGuid:
|
|
95
|
+
webviewScheme: p?.master?.ui_message_webview_url_scheme,
|
|
96
|
+
userGuid: e.user_guid ?? t.user_guid
|
|
97
97
|
});
|
|
98
|
-
}, r = C ? g.presentation : void 0, K = r?.kind === "hidden" && !!r.hideAll, B = !f && !!s?.label && !K, U = !!
|
|
98
|
+
}, r = C ? g.presentation : void 0, K = r?.kind === "hidden" && !!r.hideAll, B = !f && !!s?.label && !K, U = !!_ && r?.kind !== "hidden" || B, y = E.insights_feed?.general, k = b?.state === "not_refreshable" && !z && !!y;
|
|
99
99
|
return /* @__PURE__ */ i(Z, {
|
|
100
100
|
value: N,
|
|
101
101
|
children: /* @__PURE__ */ u(x, {
|
|
@@ -105,9 +105,9 @@ var wo = {}, To = {
|
|
|
105
105
|
onClose: o.collapseConfirmation,
|
|
106
106
|
onLeaveFeedback: o.openHideSurvey,
|
|
107
107
|
onUndo: o.undoDismiss
|
|
108
|
-
}) : /* @__PURE__ */ u(xo, { children: [b &&
|
|
108
|
+
}) : /* @__PURE__ */ u(xo, { children: [b && y && /* @__PURE__ */ i(go, {
|
|
109
109
|
...b,
|
|
110
|
-
copy:
|
|
110
|
+
copy: y
|
|
111
111
|
}), /* @__PURE__ */ u(So, {
|
|
112
112
|
inert: k,
|
|
113
113
|
sx: { ...k && {
|
|
@@ -117,14 +117,14 @@ var wo = {}, To = {
|
|
|
117
117
|
} },
|
|
118
118
|
children: [
|
|
119
119
|
k && /* @__PURE__ */ i(vo, { sx: To }),
|
|
120
|
-
/* @__PURE__ */ i(
|
|
120
|
+
/* @__PURE__ */ i(mo, {
|
|
121
121
|
isMini: f,
|
|
122
122
|
subtitle: V,
|
|
123
123
|
title: X ?? ""
|
|
124
124
|
}),
|
|
125
125
|
I ? /* @__PURE__ */ i(bo, {}) : L && /* @__PURE__ */ i(L, {
|
|
126
126
|
beatGuid: T,
|
|
127
|
-
payload:
|
|
127
|
+
payload: e
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ u(x, {
|
|
130
130
|
sx: {
|
|
@@ -135,11 +135,11 @@ var wo = {}, To = {
|
|
|
135
135
|
},
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ i(ko, {
|
|
138
|
-
dangerouslySetInnerHTML: { __html:
|
|
138
|
+
dangerouslySetInnerHTML: { __html: e.description.html_text },
|
|
139
139
|
sx: { fontWeight: "fontWeightRegular" },
|
|
140
140
|
variant: "subtitle2"
|
|
141
141
|
}),
|
|
142
|
-
h && /* @__PURE__ */ i(
|
|
142
|
+
h && /* @__PURE__ */ i(m, {
|
|
143
143
|
endIcon: /* @__PURE__ */ i(O, {}),
|
|
144
144
|
onClick: () => H.openActionDrawer({
|
|
145
145
|
guid: T,
|
|
@@ -148,7 +148,7 @@ var wo = {}, To = {
|
|
|
148
148
|
sx: v,
|
|
149
149
|
children: h.label
|
|
150
150
|
}),
|
|
151
|
-
!d?.label && A && /* @__PURE__ */ i(
|
|
151
|
+
!d?.label && A && /* @__PURE__ */ i(m, {
|
|
152
152
|
endIcon: /* @__PURE__ */ i(O, {}),
|
|
153
153
|
onClick: j,
|
|
154
154
|
sx: v,
|
|
@@ -163,10 +163,10 @@ var wo = {}, To = {
|
|
|
163
163
|
px: 16
|
|
164
164
|
},
|
|
165
165
|
children: [
|
|
166
|
-
|
|
166
|
+
_ && !C && /* @__PURE__ */ i(m, {
|
|
167
167
|
sx: Do,
|
|
168
168
|
variant: "text",
|
|
169
|
-
children:
|
|
169
|
+
children: _
|
|
170
170
|
}),
|
|
171
171
|
C && n && r?.kind === "status" && /* @__PURE__ */ i(no, {
|
|
172
172
|
action: r.action,
|
|
@@ -174,7 +174,7 @@ var wo = {}, To = {
|
|
|
174
174
|
label: r.label,
|
|
175
175
|
tone: r.tone
|
|
176
176
|
}),
|
|
177
|
-
C && n && !r && /* @__PURE__ */ i(
|
|
177
|
+
C && n && !r && /* @__PURE__ */ i(m, {
|
|
178
178
|
"aria-disabled": c(n.block) || g.disabled,
|
|
179
179
|
disabled: g.disabled,
|
|
180
180
|
onClick: () => D("primary", n),
|
|
@@ -182,7 +182,7 @@ var wo = {}, To = {
|
|
|
182
182
|
variant: "outlined",
|
|
183
183
|
children: n.label
|
|
184
184
|
}),
|
|
185
|
-
B && s && /* @__PURE__ */ i(
|
|
185
|
+
B && s && /* @__PURE__ */ i(m, {
|
|
186
186
|
"aria-disabled": c(s.block) || w.disabled,
|
|
187
187
|
color: "inherit",
|
|
188
188
|
disabled: w.disabled,
|
|
@@ -201,7 +201,7 @@ var wo = {}, To = {
|
|
|
201
201
|
})
|
|
202
202
|
]
|
|
203
203
|
})] }),
|
|
204
|
-
/* @__PURE__ */ i(co, { beat:
|
|
204
|
+
/* @__PURE__ */ i(co, { beat: t }),
|
|
205
205
|
/* @__PURE__ */ i(fo, {
|
|
206
206
|
isOpen: o.isDismissOpen,
|
|
207
207
|
onClose: o.closeDismissDialog,
|
|
@@ -220,7 +220,7 @@ var wo = {}, To = {
|
|
|
220
220
|
secondaryText: o.survey.backText,
|
|
221
221
|
title: o.survey.title
|
|
222
222
|
}),
|
|
223
|
-
o.cardState === "visible" &&
|
|
223
|
+
o.cardState === "visible" && e.footer && /* @__PURE__ */ i(po, { footer: e.footer })
|
|
224
224
|
]
|
|
225
225
|
})
|
|
226
226
|
});
|