@mx-cartographer/experiences 9.7.10 → 9.7.11
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 +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +82 -74
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +5 -5
- package/dist/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js +4 -4
- package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js +6 -6
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [9.7.11] - 10-20-2026
|
|
2
|
+
|
|
3
|
+
- **CHANGED** - `AccountBlock` renders its confetti-tile and detailed-hero logos from `instance_slot.data.logo` through `LogoFromGuid` (the guid prefix picks merchant / institution / category / `ICO-` icon), replacing `DepositLogo`, the `depositIcons` map and the flat `merchant_guid` / `category_guid` / `institution_guid` logo inputs. An `ICO-` logo on the confetti tile keeps its look (an outlined 24px glyph on the `success.main` square), drawn with `Icon` as `IconComponent` does. Stories send the logo (with `amount` / `header_text` / `sub_text`) on `data` (WEC-1929)
|
|
4
|
+
- **CHANGED** - `UnifiedDepositMini` story rebuilt on the real deposit envelope; its `in_description_cta` variant is `merchant_budget` (Unified Deposit always has a merchant) (WEC-1929)
|
|
5
|
+
|
|
1
6
|
## [9.7.10] - 10-20-2026
|
|
2
7
|
|
|
3
8
|
- **FIXED** - Cash Back `image_block` (`image_with_overlay` variant) reads the Insights 2.0 `instance_slot.data` (`amount`, `image`) instead of the legacy top-level `instance_slot_data`, so the card draws the reward amount rather than `$0.00`; and `imageMap` is keyed by the snake_case `cash_back` the backend sends (was camelCase `cashBack`), so the `CashBack.png` background resolves. The overlay amount is omitted when `amount` is missing or non-finite, and the background is dropped (no `url(undefined)`) when the image key is unknown. Test and story moved to the V2 slot shape (WEC-1516)
|
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
import { slot as
|
|
1
|
+
import { slot as d } from "../../../../core/types/Insights.es.js";
|
|
2
2
|
import { formatCurrency as I } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
|
-
import { useContainerDimensions as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ReactComponent as
|
|
8
|
-
import { ReactComponent as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
3
|
+
import { useContainerDimensions as G } from "../../../hooks/useContainerDimensions.es.js";
|
|
4
|
+
import { Confetti as O } from "../../../components/shared/Confetti.es.js";
|
|
5
|
+
import W from "../../../components/DirectDepositCard.es.js";
|
|
6
|
+
import S from "../../../components/LogoFromGuid.es.js";
|
|
7
|
+
import { ReactComponent as q } from "../../../components/shared/images/PaidOffCard.es.js";
|
|
8
|
+
import { ReactComponent as J } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
|
|
9
|
+
import { statusIconName as K } from "../../../components/statusIcon.es.js";
|
|
10
|
+
import { resolveVariantConfig as M } from "../../resolveVariantConfig.es.js";
|
|
11
|
+
import { HeaderComponent as Q } from "./HeaderComponent.es.js";
|
|
12
|
+
import { getLayoutConfig as U } from "./layout.es.js";
|
|
13
|
+
import { IconComponent as X } from "./IconComponent.es.js";
|
|
14
|
+
import { useRef as Y } from "react";
|
|
14
15
|
import e from "@mui/material/Stack";
|
|
15
|
-
import { Text as
|
|
16
|
-
import { Icon as
|
|
16
|
+
import { Text as l } from "@mxenabled/mxui";
|
|
17
|
+
import { Icon as D } from "@mxenabled/mx-icons";
|
|
17
18
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
18
|
-
import { useTheme as
|
|
19
|
-
import
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, vo = ({ payload: N }) => {
|
|
24
|
-
const x = X(), g = Q(null), { height: b, width: v } = j(g), { instance_slot: i } = N, { variant: p, account_name: L, account_type: z, status_text: G, institution_guid: d, institution_name: h, icon_name: $, merchant_guid: A, merchant_name: y, category_guid: B } = i, { data: a } = i, l = a !== void 0, f = m(a, "amount"), u = l ? typeof f == "number" && Number.isFinite(f) ? f : void 0 : i.amount, _ = m(a, "sub_text"), w = typeof _ == "string" ? _ : void 0, R = l ? w : i.sub_text, F = l ? w : i.label, C = m(a, "header_text"), s = l ? typeof C == "string" ? C : void 0 : i.header_text, T = m(a, "logo"), t = q(K(x), p, "default", "AccountBlock");
|
|
25
|
-
if (t?.isDetailed) return /* @__PURE__ */ o(E, {
|
|
19
|
+
import { useTheme as Z } from "@mui/material/styles";
|
|
20
|
+
import s from "@mui/material/Box";
|
|
21
|
+
var wo = ({ payload: z }) => {
|
|
22
|
+
const f = Z(), x = Y(null), { height: g, width: b } = G(x), { instance_slot: n } = z, { variant: y, account_name: L, account_type: F, status_text: $, institution_guid: j, institution_name: A, icon_name: B, merchant_name: P } = n, { data: a } = n, u = a !== void 0, p = d(a, "amount"), m = u ? typeof p == "number" && Number.isFinite(p) ? p : void 0 : n.amount, v = d(a, "sub_text"), w = typeof v == "string" ? v : void 0, R = u ? w : n.sub_text, V = u ? w : n.label, _ = d(a, "header_text"), c = u ? typeof _ == "string" ? _ : void 0 : n.header_text, i = d(a, "logo"), t = M(U(f), y, "default", "AccountBlock");
|
|
23
|
+
if (t?.isDetailed) return /* @__PURE__ */ o(W, {
|
|
26
24
|
...t.detailed,
|
|
27
|
-
logo: /* @__PURE__ */ o(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}),
|
|
25
|
+
logo: i?.guid ? /* @__PURE__ */ o(S, {
|
|
26
|
+
logo: i,
|
|
27
|
+
size: 48
|
|
28
|
+
}) : null,
|
|
32
29
|
name: L,
|
|
33
|
-
statusLabel:
|
|
34
|
-
subtitle:
|
|
30
|
+
statusLabel: $,
|
|
31
|
+
subtitle: F
|
|
35
32
|
});
|
|
36
33
|
if (t?.isConfetti) {
|
|
37
|
-
const
|
|
38
|
-
paidOffCard: /* @__PURE__ */ o(
|
|
34
|
+
const h = K(i?.guid), H = {
|
|
35
|
+
paidOffCard: /* @__PURE__ */ o(s, {
|
|
39
36
|
sx: {
|
|
40
37
|
flexShrink: 0,
|
|
41
38
|
height: 32,
|
|
42
39
|
position: "relative",
|
|
43
40
|
width: 44
|
|
44
41
|
},
|
|
45
|
-
children: /* @__PURE__ */ o(
|
|
42
|
+
children: /* @__PURE__ */ o(q, {
|
|
46
43
|
"aria-hidden": !0,
|
|
47
44
|
role: "presentation",
|
|
48
45
|
style: {
|
|
@@ -52,13 +49,13 @@ var Y = {
|
|
|
52
49
|
}
|
|
53
50
|
})
|
|
54
51
|
}),
|
|
55
|
-
savings: /* @__PURE__ */ o(
|
|
52
|
+
savings: /* @__PURE__ */ o(J, {
|
|
56
53
|
"aria-hidden": !0,
|
|
57
54
|
height: 55,
|
|
58
55
|
role: "presentation",
|
|
59
56
|
width: 55
|
|
60
57
|
}),
|
|
61
|
-
logo: /* @__PURE__ */ o(
|
|
58
|
+
logo: /* @__PURE__ */ o(s, {
|
|
62
59
|
sx: {
|
|
63
60
|
borderRadius: "4px",
|
|
64
61
|
flexShrink: 0,
|
|
@@ -66,27 +63,38 @@ var Y = {
|
|
|
66
63
|
overflow: "hidden",
|
|
67
64
|
width: 48
|
|
68
65
|
},
|
|
69
|
-
children: /* @__PURE__ */ o(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
children: h ? /* @__PURE__ */ o(e, {
|
|
67
|
+
"data-icon": h,
|
|
68
|
+
sx: {
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
bgcolor: "success.main",
|
|
71
|
+
height: "100%",
|
|
72
|
+
justifyContent: "center",
|
|
73
|
+
width: "100%"
|
|
74
|
+
},
|
|
75
|
+
children: /* @__PURE__ */ o(D, {
|
|
76
|
+
"aria-hidden": !0,
|
|
77
|
+
name: h,
|
|
78
|
+
size: 24,
|
|
79
|
+
sx: { color: "success.contrastText" }
|
|
80
|
+
})
|
|
81
|
+
}) : i?.guid ? /* @__PURE__ */ o(S, {
|
|
82
|
+
logo: i,
|
|
83
|
+
size: 48
|
|
84
|
+
}) : null
|
|
77
85
|
})
|
|
78
|
-
}[t.graphic ?? "logo"],
|
|
86
|
+
}[t.graphic ?? "logo"], C = d(a, "secondary_text"), N = typeof C == "string" && C || (P ?? A), T = t.secondarySource === "merchant" ? N : V, k = T ? /* @__PURE__ */ o(l, {
|
|
79
87
|
color: t.secondaryColor,
|
|
80
88
|
variant: t.secondaryVariant,
|
|
81
|
-
children:
|
|
82
|
-
}) : null,
|
|
89
|
+
children: T
|
|
90
|
+
}) : null, E = m != null ? /* @__PURE__ */ o(l, {
|
|
83
91
|
bold: !0,
|
|
84
92
|
color: "success.dark",
|
|
85
93
|
variant: t.amountVariant,
|
|
86
|
-
children: `${t.amountPrefix ?? ""}${I(
|
|
94
|
+
children: `${t.amountPrefix ?? ""}${I(m, "0,0.00")}`
|
|
87
95
|
}) : null;
|
|
88
|
-
return /* @__PURE__ */ r(
|
|
89
|
-
ref:
|
|
96
|
+
return /* @__PURE__ */ r(s, {
|
|
97
|
+
ref: x,
|
|
90
98
|
sx: {
|
|
91
99
|
backgroundImage: t.gradient,
|
|
92
100
|
bgcolor: "background.paper",
|
|
@@ -95,17 +103,17 @@ var Y = {
|
|
|
95
103
|
p: 16,
|
|
96
104
|
width: "100%"
|
|
97
105
|
},
|
|
98
|
-
children: [/* @__PURE__ */ o(
|
|
106
|
+
children: [/* @__PURE__ */ o(s, {
|
|
99
107
|
sx: {
|
|
100
108
|
inset: 0,
|
|
101
109
|
pointerEvents: "none",
|
|
102
110
|
position: "absolute",
|
|
103
111
|
zIndex: 1
|
|
104
112
|
},
|
|
105
|
-
children: /* @__PURE__ */ o(
|
|
106
|
-
height:
|
|
107
|
-
shouldRun:
|
|
108
|
-
width:
|
|
113
|
+
children: /* @__PURE__ */ o(O, {
|
|
114
|
+
height: g,
|
|
115
|
+
shouldRun: g > 0 && b > 0,
|
|
116
|
+
width: b
|
|
109
117
|
})
|
|
110
118
|
}), /* @__PURE__ */ r(e, {
|
|
111
119
|
sx: {
|
|
@@ -115,16 +123,16 @@ var Y = {
|
|
|
115
123
|
width: "100%",
|
|
116
124
|
zIndex: 2
|
|
117
125
|
},
|
|
118
|
-
children: [t.categoryStrip &&
|
|
126
|
+
children: [t.categoryStrip && c && /* @__PURE__ */ o(s, {
|
|
119
127
|
sx: {
|
|
120
128
|
bgcolor: "success.main",
|
|
121
129
|
px: 12,
|
|
122
130
|
py: 4
|
|
123
131
|
},
|
|
124
|
-
children: /* @__PURE__ */ o(
|
|
132
|
+
children: /* @__PURE__ */ o(l, {
|
|
125
133
|
color: "success.contrastText",
|
|
126
134
|
variant: "caption",
|
|
127
|
-
children:
|
|
135
|
+
children: c
|
|
128
136
|
})
|
|
129
137
|
}), /* @__PURE__ */ r(e, {
|
|
130
138
|
sx: {
|
|
@@ -141,21 +149,21 @@ var Y = {
|
|
|
141
149
|
flexDirection: "row",
|
|
142
150
|
...t.rowSx
|
|
143
151
|
},
|
|
144
|
-
children: [/* @__PURE__ */ o(
|
|
152
|
+
children: [/* @__PURE__ */ o(s, {
|
|
145
153
|
sx: {
|
|
146
154
|
display: "flex",
|
|
147
155
|
flexShrink: 0
|
|
148
156
|
},
|
|
149
|
-
children:
|
|
157
|
+
children: H
|
|
150
158
|
}), /* @__PURE__ */ r(e, {
|
|
151
159
|
sx: {
|
|
152
160
|
flex: "1 0 0",
|
|
153
161
|
minWidth: 0
|
|
154
162
|
},
|
|
155
163
|
children: [
|
|
156
|
-
t.secondaryPosition === "above" &&
|
|
157
|
-
|
|
158
|
-
t.secondaryPosition === "below" &&
|
|
164
|
+
t.secondaryPosition === "above" && k,
|
|
165
|
+
E,
|
|
166
|
+
t.secondaryPosition === "below" && k
|
|
159
167
|
]
|
|
160
168
|
})]
|
|
161
169
|
})]
|
|
@@ -170,10 +178,10 @@ var Y = {
|
|
|
170
178
|
children: /* @__PURE__ */ r(e, {
|
|
171
179
|
sx: {
|
|
172
180
|
borderRadius: "8px",
|
|
173
|
-
boxShadow:
|
|
181
|
+
boxShadow: f.shadows[1],
|
|
174
182
|
width: "100%"
|
|
175
183
|
},
|
|
176
|
-
children: [
|
|
184
|
+
children: [c && /* @__PURE__ */ o(Q, { headerText: c }), /* @__PURE__ */ r(e, {
|
|
177
185
|
sx: {
|
|
178
186
|
alignItems: "center",
|
|
179
187
|
bgcolor: "background.paper",
|
|
@@ -182,31 +190,31 @@ var Y = {
|
|
|
182
190
|
px: 16,
|
|
183
191
|
py: 12,
|
|
184
192
|
width: "100%",
|
|
185
|
-
...
|
|
193
|
+
...c && {
|
|
186
194
|
borderTopLeftRadius: "0",
|
|
187
195
|
borderTopRightRadius: "0"
|
|
188
196
|
},
|
|
189
|
-
...(
|
|
197
|
+
...(j || B || i?.guid) && { flexDirection: "row" }
|
|
190
198
|
},
|
|
191
|
-
children: [/* @__PURE__ */ o(
|
|
192
|
-
logo:
|
|
193
|
-
slot:
|
|
194
|
-
variant:
|
|
195
|
-
}), /* @__PURE__ */ r(e, { children: [
|
|
199
|
+
children: [/* @__PURE__ */ o(X, {
|
|
200
|
+
logo: i,
|
|
201
|
+
slot: n,
|
|
202
|
+
variant: y
|
|
203
|
+
}), /* @__PURE__ */ r(e, { children: [m != null && /* @__PURE__ */ o(l, {
|
|
196
204
|
variant: "h2",
|
|
197
|
-
children: I(
|
|
205
|
+
children: I(m, "0,0.00")
|
|
198
206
|
}), /* @__PURE__ */ r(e, {
|
|
199
207
|
sx: {
|
|
200
208
|
gap: 8,
|
|
201
209
|
flexDirection: "row",
|
|
202
210
|
alignItems: "center"
|
|
203
211
|
},
|
|
204
|
-
children: [t.sub_logo && /* @__PURE__ */ o(
|
|
212
|
+
children: [t.sub_logo && /* @__PURE__ */ o(D, {
|
|
205
213
|
color: "warning",
|
|
206
214
|
fill: !0,
|
|
207
215
|
name: t.sub_logo,
|
|
208
216
|
size: 20
|
|
209
|
-
}), R && /* @__PURE__ */ o(
|
|
217
|
+
}), R && /* @__PURE__ */ o(l, {
|
|
210
218
|
color: "text.secondary",
|
|
211
219
|
variant: "caption",
|
|
212
220
|
children: R
|
|
@@ -217,7 +225,7 @@ var Y = {
|
|
|
217
225
|
});
|
|
218
226
|
};
|
|
219
227
|
export {
|
|
220
|
-
|
|
228
|
+
wo as default
|
|
221
229
|
};
|
|
222
230
|
|
|
223
231
|
//# sourceMappingURL=AccountBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport { DepositLogo } from '../../../components/ComponentBlocks/DepositLogo'\nimport DirectDepositCard from '../../../components/DirectDepositCard'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\n/** Default generic-tile icon per deposit variant, used when no merchant/institution logo. */\nconst depositIcons: Record<string, string> = {\n deposit_received: 'payments',\n status_on_track: 'monetization_on',\n}\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const {\n variant,\n account_name,\n account_type,\n status_text,\n institution_guid,\n institution_name,\n icon_name,\n merchant_guid,\n merchant_name,\n category_guid,\n } = instance_slot\n // V2 variants fill `instance_slot.data` (ditto's account_block slots) and it is then the whole\n // truth: a slot it leaves empty, or sends with the wrong kind, draws nothing rather than falling\n // back to the stale flat field it supersedes. Beats not yet migrated send no `data` and keep the\n // flat fields.\n const { data } = instance_slot\n const v2 = data !== undefined\n const dataAmount = slot<unknown>(data, 'amount')\n const amount = v2\n ? typeof dataAmount === 'number' && Number.isFinite(dataAmount)\n ? dataAmount\n : undefined\n : instance_slot.amount\n // One V2 slot feeds the line under the amount on both tiles. V1 called it `sub_text` on the\n // standard tile and `label` on the confetti tile, so each keeps its own flat field.\n const dataSubText = slot<unknown>(data, 'sub_text')\n const v2SubText = typeof dataSubText === 'string' ? dataSubText : undefined\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const dataHeaderText = slot<unknown>(data, 'header_text')\n const header_text = v2\n ? typeof dataHeaderText === 'string'\n ? dataHeaderText\n : undefined\n : instance_slot.header_text\n const logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // \"Detailed\" hero variants — the logo-over-card account hero the Direct Deposit block also\n // renders, addressed through `account_block` per the architecture doc's Account block variants.\n // The account facts arrive flat on the slot (`account_name`, `account_type`, `status_text`).\n // The logo's accessible name is the institution name; a slot that sends only the guid falls\n // back to it rather than leaving the hero logo unnamed.\n if (layoutConfig?.isDetailed) {\n return (\n <DirectDepositCard\n {...layoutConfig.detailed}\n logo={\n <DepositLogo\n iconName=\"account_balance\"\n institutionGuid={institution_guid ?? ''}\n institutionName={institution_name ?? institution_guid ?? ''}\n />\n }\n name={account_name}\n statusLabel={status_text}\n subtitle={account_type}\n />\n )\n }\n\n // Confetti-backed celebration variants (deposits, payoff, savings) — a success-tinted card\n // on a gradient + confetti wash. Everything variant-specific is flat on `layoutConfig`.\n if (layoutConfig?.isConfetti) {\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // SVG is 58x46 but the card sits at (0,14) with the check badge overflowing top-right.\n // Box it to the card's real 44x32 footprint and shift the SVG up so it aligns with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 44 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n <DepositLogo\n categoryGuid={category_guid}\n iconName={depositIcons[variant as keyof typeof depositIcons] ?? 'payments'}\n institutionGuid={institution_guid}\n institutionName={institution_name}\n merchantGuid={merchant_guid}\n merchantName={merchant_name}\n />\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // Deposit cards show the payer name — a merchant when we have one, otherwise the institution.\n const secondaryText =\n layoutConfig.secondarySource === 'merchant' ? (merchant_name ?? institution_name) : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text bold={true} color=\"success.dark\" variant={layoutConfig.amountVariant}>\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, '0,0.00')}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n px: 16,\n py: 12,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && <Text variant=\"h2\">{formatCurrency(amount, '0,0.00')}</Text>}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAM,IAAuC;AAAA,EAC3C,kBAAkB;AAAA,EAClB,iBAAiB;AACnB,GAEM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EACJ,SAAA,GACA,cAAA,GACA,cAAA,GACA,aAAA,GACA,kBAAA,GACA,kBAAA,GACA,WAAA,GACA,eAAA,GACA,eAAA,GACA,eAAA,EAAA,IACE,GAKE,EAAE,MAAA,EAAA,IAAS,GACX,IAAK,MAAS,QACd,IAAa,EAAc,GAAM,QAAQ,GACzC,IAAS,IACX,OAAO,KAAe,YAAY,OAAO,SAAS,CAAU,IAC1D,IACA,SACF,EAAc,QAGZ,IAAc,EAAc,GAAM,UAAU,GAC5C,IAAY,OAAO,KAAgB,WAAW,IAAc,QAC5D,IAAW,IAAK,IAAY,EAAc,UAC1C,IAAQ,IAAK,IAAY,EAAc,OACvC,IAAiB,EAAc,GAAM,aAAa,GAClD,IAAc,IAChB,OAAO,KAAmB,WACxB,IACA,SACF,EAAc,aACZ,IAAO,EAAc,GAAM,MAAM,GACjC,IAAe,EACnB,EAAgB,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,YACrB,sBAAsB;AAAA,UACxB;AAAA,UACA,IAAK,KAAoB,KAAa,GAAM,SAAS,EACnD,eAAe,MACjB;AAAA,QACF;AAAA,QAhBF,UAAA,CAkBE,gBAAA,EAAC,GAAD;AAAA,UAAqB,MAAA;AAAA,UAAM,MAAM;AAAA,UAAwB,SAAA;AAAA,QAAU,CAAA,GAEnE,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,KAAU,QAAQ,gBAAA,EAAC,GAAD;AAAA,UAAM,SAAQ;AAAA,UAAM,UAAA,EAAe,GAAQ,QAAQ;AAAA,QAAQ,CAAA,GAC9E,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,KAAK;AAAA,YAAG,eAAe;AAAA,YAAO,YAAY;AAAA,UAAS;AAAA,UAAhE,UAAA,CACG,EAAa,YACZ,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAU,MAAM;AAAA,YAAM,MAAM,EAAa;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA,GAE3E,KACC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAiB,SAAQ;AAAA,YAClC,UAAA;AAAA,UACG,CAAA,CAEH;AAAA,QACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
|
|
1
|
+
{"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport DirectDepositCard from '../../../components/DirectDepositCard'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const {\n variant,\n account_name,\n account_type,\n status_text,\n institution_guid,\n institution_name,\n icon_name,\n merchant_name,\n } = instance_slot\n // V2 variants fill `instance_slot.data` (ditto's account_block slots) and it is then the whole\n // truth: a slot it leaves empty, or sends with the wrong kind, draws nothing rather than falling\n // back to the stale flat field it supersedes. Beats not yet migrated send no `data` and keep the\n // flat fields.\n const { data } = instance_slot\n const v2 = data !== undefined\n const dataAmount = slot<unknown>(data, 'amount')\n const amount = v2\n ? typeof dataAmount === 'number' && Number.isFinite(dataAmount)\n ? dataAmount\n : undefined\n : instance_slot.amount\n // One V2 slot feeds the line under the amount on both tiles. V1 called it `sub_text` on the\n // standard tile and `label` on the confetti tile, so each keeps its own flat field.\n const dataSubText = slot<unknown>(data, 'sub_text')\n const v2SubText = typeof dataSubText === 'string' ? dataSubText : undefined\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const dataHeaderText = slot<unknown>(data, 'header_text')\n const header_text = v2\n ? typeof dataHeaderText === 'string'\n ? dataHeaderText\n : undefined\n : instance_slot.header_text\n const logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // \"Detailed\" hero variants — the logo-over-card account hero the Direct Deposit block also\n // renders, addressed through `account_block` per the architecture doc's Account block variants.\n // The account facts arrive flat on the slot (`account_name`, `account_type`, `status_text`).\n // The logo's accessible name is the institution name; a slot that sends only the guid falls\n // back to it rather than leaving the hero logo unnamed.\n if (layoutConfig?.isDetailed) {\n return (\n <DirectDepositCard\n {...layoutConfig.detailed}\n logo={logo?.guid ? <LogoFromGuid logo={logo} size={48} /> : null}\n name={account_name}\n statusLabel={status_text}\n subtitle={account_type}\n />\n )\n }\n\n // Confetti-backed celebration variants (deposits, payoff, savings) — a success-tinted card\n // on a gradient + confetti wash. Everything variant-specific is flat on `layoutConfig`.\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // SVG is 58x46 but the card sits at (0,14) with the check badge overflowing top-right.\n // Box it to the card's real 44x32 footprint and shift the SVG up so it aligns with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 44 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined 24px glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // Deposit cards show the payer name — a merchant when we have one, otherwise the institution.\n // V2 sends it resolved as `data.secondary_text`; the flat fields remain the fallback.\n const dataSecondaryText = slot<unknown>(data, 'secondary_text')\n const payer =\n (typeof dataSecondaryText === 'string' && dataSecondaryText) ||\n (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text bold={true} color=\"success.dark\" variant={layoutConfig.amountVariant}>\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, '0,0.00')}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n px: 16,\n py: 12,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && <Text variant=\"h2\">{formatCurrency(amount, '0,0.00')}</Text>}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EACJ,SAAA,GACA,cAAA,GACA,cAAA,GACA,aAAA,GACA,kBAAA,GACA,kBAAA,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G,eAAe;AAAA,YAAO,YAAY;AAAA,UAAS;AAAA,UAAhE,UAAA,CACG,EAAa,YACZ,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAU,MAAM;AAAA,YAAM,MAAM,EAAa;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA,GAE3E,KACC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAiB,SAAQ;AAAA,YAClC,UAAA;AAAA,UACG,CAAA,CAEH;AAAA,QACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import c from "../../../../common/components/IconBacking.es.js";
|
|
2
|
-
import
|
|
3
|
-
import { getLayoutConfig as g } from "./layout.es.js";
|
|
4
|
-
import f from "../../../components/LogoFromGuid.es.js";
|
|
2
|
+
import u from "../../../components/LogoFromGuid.es.js";
|
|
5
3
|
import { statusIconName as d } from "../../../components/statusIcon.es.js";
|
|
4
|
+
import { resolveVariantConfig as g } from "../../resolveVariantConfig.es.js";
|
|
5
|
+
import { getLayoutConfig as f } from "./layout.es.js";
|
|
6
6
|
import { InstitutionLogo as p } from "@mxenabled/mxui";
|
|
7
7
|
import { Icon as n } from "@mxenabled/mx-icons";
|
|
8
8
|
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
9
9
|
import { useTheme as b } from "@mui/material/styles";
|
|
10
10
|
import { Stack as a } from "@mui/material";
|
|
11
11
|
var y = ({ slot: i, variant: s, logo: e }) => {
|
|
12
|
-
const m = b(), o =
|
|
12
|
+
const m = b(), o = g(f(m), s, "default", "AccountBlock");
|
|
13
13
|
if (/^INS-[A-Za-z0-9-]+$/.test(e?.guid ?? "")) return /* @__PURE__ */ l(a, {
|
|
14
14
|
sx: {
|
|
15
15
|
alignItems: "center",
|
|
16
16
|
flexDirection: "row",
|
|
17
17
|
position: "relative"
|
|
18
18
|
},
|
|
19
|
-
children: [/* @__PURE__ */ r(
|
|
19
|
+
children: [/* @__PURE__ */ r(u, {
|
|
20
20
|
logo: e,
|
|
21
21
|
size: 48
|
|
22
22
|
}), o.badge && /* @__PURE__ */ r(c, {
|
|
@@ -2,9 +2,9 @@ import { DATE_FORMATS_INTL as R, formatDate as k } from "../../../../core/consta
|
|
|
2
2
|
import { useGlobalCopyStore as F } from "../../../../common/context/hooks.es.js";
|
|
3
3
|
import { slot as f } from "../../../../core/types/Insights.es.js";
|
|
4
4
|
import { formatCurrency as i, formatPercentage as N } from "../../../../core/utils/NumberFormatting.es.js";
|
|
5
|
-
import
|
|
5
|
+
import P from "../../../components/LogoFromGuid.es.js";
|
|
6
6
|
import { resolveVariantConfig as B } from "../../resolveVariantConfig.es.js";
|
|
7
|
-
import Y from "../../../components/
|
|
7
|
+
import { DepositLogo as Y } from "../../../components/ComponentBlocks/DepositLogo.es.js";
|
|
8
8
|
import G from "../../../components/DebtPayoffCard.es.js";
|
|
9
9
|
import j from "../../../components/TransactionListCard.es.js";
|
|
10
10
|
import { parseDueDate as I } from "../RepeatingTransactionBlock/weekStrip.es.js";
|
|
@@ -23,7 +23,7 @@ var U = 32, W = /* @__PURE__ */ new Set([
|
|
|
23
23
|
}, [o, b]), p) {
|
|
24
24
|
const r = f(s, "series"), O = (Array.isArray(r) ? r : []).filter($).map((a) => ({
|
|
25
25
|
amount: typeof a.amount == "number" ? i(a.amount, "0,0.00") : "",
|
|
26
|
-
leading: /* @__PURE__ */ l(
|
|
26
|
+
leading: /* @__PURE__ */ l(P, {
|
|
27
27
|
logo: a.logo,
|
|
28
28
|
size: U
|
|
29
29
|
}),
|
|
@@ -59,7 +59,7 @@ var U = 32, W = /* @__PURE__ */ new Set([
|
|
|
59
59
|
..._.style,
|
|
60
60
|
balance: D ? i(y, "0,0.00") : void 0,
|
|
61
61
|
balanceLabel: D ? e.balance_label : void 0,
|
|
62
|
-
logo: /* @__PURE__ */ l(
|
|
62
|
+
logo: /* @__PURE__ */ l(Y, {
|
|
63
63
|
iconName: Z(d),
|
|
64
64
|
institutionGuid: S ?? "",
|
|
65
65
|
institutionName: x ?? ""
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import g from "../../../components/
|
|
1
|
+
import { directDepositVariant as f, getLayoutConfig as l } from "./layout.es.js";
|
|
2
|
+
import D from "../../../components/DirectDepositCard.es.js";
|
|
3
|
+
import { DepositLogo as g } from "../../../components/ComponentBlocks/DepositLogo.es.js";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
5
|
import { useTheme as _ } from "@mui/material/styles";
|
|
6
6
|
var L = ({ payload: i }) => {
|
|
7
|
-
const e = _(), { instance_slot: n } = i, { account_name: a, account_type: s, institution_guid: r, institution_name: c, status_text: m, variant: u } = n, t =
|
|
8
|
-
return /* @__PURE__ */ o(
|
|
7
|
+
const e = _(), { instance_slot: n } = i, { account_name: a, account_type: s, institution_guid: r, institution_name: c, status_text: m, variant: u } = n, t = l(e), p = t[u] ?? t[f.SetUpDirectDeposit];
|
|
8
|
+
return /* @__PURE__ */ o(D, {
|
|
9
9
|
...p,
|
|
10
|
-
logo: /* @__PURE__ */ o(
|
|
10
|
+
logo: /* @__PURE__ */ o(g, {
|
|
11
11
|
iconName: "account_balance",
|
|
12
12
|
institutionName: c ?? "",
|
|
13
13
|
institutionGuid: r ?? ""
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCategoryStore as p } from "../../../../common/context/hooks.es.js";
|
|
2
2
|
import { slot as c } from "../../../../core/types/Insights.es.js";
|
|
3
3
|
import { formatCurrency as _ } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { logoFromRef as y } from "../../../components/shared/EntityLogo.es.js";
|
|
5
|
+
import { resolveVariantConfig as h } from "../../resolveVariantConfig.es.js";
|
|
6
6
|
import x from "../../../components/TransactionListCard.es.js";
|
|
7
7
|
import { getLayoutConfig as v, transactionBlockVariant as C } from "./layout.es.js";
|
|
8
8
|
import { observer as I } from "mobx-react-lite";
|
|
@@ -12,7 +12,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
12
12
|
import { useTheme as b } from "@mui/material/styles";
|
|
13
13
|
import u from "@mui/material/Box";
|
|
14
14
|
var r = 32, k = Math.round(r * 0.625), z = (n, a) => {
|
|
15
|
-
const t =
|
|
15
|
+
const t = y(n.logo, n.primary_text);
|
|
16
16
|
if (t) {
|
|
17
17
|
if (t.logo_name) return /* @__PURE__ */ o(u, {
|
|
18
18
|
sx: {
|
|
@@ -54,7 +54,7 @@ var r = 32, k = Math.round(r * 0.625), z = (n, a) => {
|
|
|
54
54
|
}, F = I(({ payload: n }) => {
|
|
55
55
|
const a = b(), { getTopLevelCategoryGuid: t } = p(), { data: e, variant: d } = n.instance_slot, s = c(e, "series"), m = c(e, "header_text");
|
|
56
56
|
if (!Array.isArray(s) || !s.length) return null;
|
|
57
|
-
const { background: g, cardVariant: l, showHeader: f } =
|
|
57
|
+
const { background: g, cardVariant: l, showHeader: f } = h(v(a), d, C.NoHeader, "TransactionBlock");
|
|
58
58
|
return /* @__PURE__ */ o(x, {
|
|
59
59
|
background: g,
|
|
60
60
|
header: f && typeof m == "string" ? m : void 0,
|