@mx-cartographer/experiences 9.7.3 → 9.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/common/components/GlobalAccountFilter.es.js +56 -53
- package/dist/common/components/GlobalAccountFilter.es.js.map +1 -1
- package/dist/common/components/WidgetContainer.es.js +64 -60
- package/dist/common/components/WidgetContainer.es.js.map +1 -1
- package/dist/common/constants/Analytics.d.ts +0 -1
- package/dist/common/constants/Analytics.es.js +0 -1
- package/dist/common/constants/Analytics.es.js.map +1 -1
- package/dist/common/context/GlobalDataProvider.d.ts +6 -2
- package/dist/common/context/GlobalDataProvider.es.js +17 -11
- package/dist/common/context/GlobalDataProvider.es.js.map +1 -1
- package/dist/common/context/hooks.d.ts +4 -1
- package/dist/common/context/hooks.es.js +15 -14
- package/dist/common/context/hooks.es.js.map +1 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +130 -129
- package/dist/core/types/Handlers.d.ts +11 -0
- package/dist/core/types/Insights.d.ts +1 -0
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +77 -65
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +8 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +93 -81
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/DirectDepositCard.es.js +4 -4
- package/dist/insights-v2/index.es.js +13 -13
- package/package.json +1 -1
|
@@ -1,28 +1,40 @@
|
|
|
1
|
-
import { slot as
|
|
1
|
+
import { slot as f } from "../../../../core/types/Insights.es.js";
|
|
2
2
|
import { formatCurrency as k } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
|
-
import { useContainerDimensions as
|
|
4
|
-
import { DepositLogo as
|
|
5
|
-
import { Confetti as
|
|
6
|
-
import
|
|
7
|
-
import { ReactComponent as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
3
|
+
import { useContainerDimensions as V } from "../../../hooks/useContainerDimensions.es.js";
|
|
4
|
+
import { DepositLogo as I } from "../../../components/ComponentBlocks/DepositLogo.es.js";
|
|
5
|
+
import { Confetti as j } from "../../../components/shared/Confetti.es.js";
|
|
6
|
+
import E from "../../../components/DirectDepositCard.es.js";
|
|
7
|
+
import { ReactComponent as H } from "../../../components/shared/images/PaidOffCard.es.js";
|
|
8
|
+
import { ReactComponent as O } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
|
|
9
|
+
import { resolveVariantConfig as W } from "../../resolveVariantConfig.es.js";
|
|
10
|
+
import { HeaderComponent as q } from "./HeaderComponent.es.js";
|
|
11
|
+
import { getLayoutConfig as J } from "./layout.es.js";
|
|
12
|
+
import { IconComponent as K } from "./IconComponent.es.js";
|
|
13
|
+
import { useRef as M } from "react";
|
|
13
14
|
import r from "@mui/material/Stack";
|
|
14
15
|
import { Text as s } from "@mxenabled/mxui";
|
|
15
|
-
import { Icon as
|
|
16
|
-
import { jsx as o, jsxs as
|
|
17
|
-
import { useTheme as
|
|
16
|
+
import { Icon as Q } from "@mxenabled/mx-icons";
|
|
17
|
+
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
18
|
+
import { useTheme as U } from "@mui/material/styles";
|
|
18
19
|
import n from "@mui/material/Box";
|
|
19
|
-
var
|
|
20
|
+
var X = {
|
|
20
21
|
deposit_received: "payments",
|
|
21
22
|
status_on_track: "monetization_on"
|
|
22
|
-
},
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
25
|
-
|
|
23
|
+
}, bo = ({ payload: S }) => {
|
|
24
|
+
const D = U(), g = M(null), { height: x, width: b } = V(g), { instance_slot: i } = S, { variant: m, account_name: N, account_type: L, status_text: z, header_text: a, institution_guid: c, institution_name: u, icon_name: G, merchant_guid: $, merchant_name: v, category_guid: A } = i, { data: d } = i, p = d !== void 0, h = f(d, "amount"), l = p ? typeof h == "number" && Number.isFinite(h) ? h : void 0 : i.amount, y = f(d, "sub_text"), _ = typeof y == "string" ? y : void 0, w = p ? _ : i.sub_text, B = p ? _ : i.label, R = f(d, "logo"), t = W(J(D), m, "default", "AccountBlock");
|
|
25
|
+
if (t?.isDetailed) return /* @__PURE__ */ o(E, {
|
|
26
|
+
...t.detailed,
|
|
27
|
+
logo: /* @__PURE__ */ o(I, {
|
|
28
|
+
iconName: "account_balance",
|
|
29
|
+
institutionGuid: c ?? "",
|
|
30
|
+
institutionName: u ?? c ?? ""
|
|
31
|
+
}),
|
|
32
|
+
name: N,
|
|
33
|
+
statusLabel: z,
|
|
34
|
+
subtitle: L
|
|
35
|
+
});
|
|
36
|
+
if (t?.isConfetti) {
|
|
37
|
+
const F = {
|
|
26
38
|
paidOffCard: /* @__PURE__ */ o(n, {
|
|
27
39
|
sx: {
|
|
28
40
|
flexShrink: 0,
|
|
@@ -30,7 +42,7 @@ var K = {
|
|
|
30
42
|
position: "relative",
|
|
31
43
|
width: 44
|
|
32
44
|
},
|
|
33
|
-
children: /* @__PURE__ */ o(
|
|
45
|
+
children: /* @__PURE__ */ o(H, {
|
|
34
46
|
"aria-hidden": !0,
|
|
35
47
|
role: "presentation",
|
|
36
48
|
style: {
|
|
@@ -40,7 +52,7 @@ var K = {
|
|
|
40
52
|
}
|
|
41
53
|
})
|
|
42
54
|
}),
|
|
43
|
-
savings: /* @__PURE__ */ o(
|
|
55
|
+
savings: /* @__PURE__ */ o(O, {
|
|
44
56
|
"aria-hidden": !0,
|
|
45
57
|
height: 55,
|
|
46
58
|
role: "presentation",
|
|
@@ -54,29 +66,29 @@ var K = {
|
|
|
54
66
|
overflow: "hidden",
|
|
55
67
|
width: 48
|
|
56
68
|
},
|
|
57
|
-
children: /* @__PURE__ */ o(
|
|
58
|
-
categoryGuid:
|
|
59
|
-
iconName:
|
|
60
|
-
institutionGuid:
|
|
61
|
-
institutionName:
|
|
62
|
-
merchantGuid:
|
|
69
|
+
children: /* @__PURE__ */ o(I, {
|
|
70
|
+
categoryGuid: A,
|
|
71
|
+
iconName: X[m] ?? "payments",
|
|
72
|
+
institutionGuid: c,
|
|
73
|
+
institutionName: u,
|
|
74
|
+
merchantGuid: $,
|
|
63
75
|
merchantName: v
|
|
64
76
|
})
|
|
65
77
|
})
|
|
66
|
-
}[
|
|
67
|
-
color:
|
|
68
|
-
variant:
|
|
78
|
+
}[t.graphic ?? "logo"], C = t.secondarySource === "merchant" ? v ?? u : B, T = C ? /* @__PURE__ */ o(s, {
|
|
79
|
+
color: t.secondaryColor,
|
|
80
|
+
variant: t.secondaryVariant,
|
|
69
81
|
children: C
|
|
70
|
-
}) : null,
|
|
82
|
+
}) : null, P = l != null ? /* @__PURE__ */ o(s, {
|
|
71
83
|
bold: !0,
|
|
72
84
|
color: "success.dark",
|
|
73
|
-
variant:
|
|
74
|
-
children: `${
|
|
85
|
+
variant: t.amountVariant,
|
|
86
|
+
children: `${t.amountPrefix ?? ""}${k(l, "0,0.00")}`
|
|
75
87
|
}) : null;
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
ref:
|
|
88
|
+
return /* @__PURE__ */ e(n, {
|
|
89
|
+
ref: g,
|
|
78
90
|
sx: {
|
|
79
|
-
backgroundImage:
|
|
91
|
+
backgroundImage: t.gradient,
|
|
80
92
|
bgcolor: "background.paper",
|
|
81
93
|
overflow: "hidden",
|
|
82
94
|
position: "relative",
|
|
@@ -90,12 +102,12 @@ var K = {
|
|
|
90
102
|
position: "absolute",
|
|
91
103
|
zIndex: 1
|
|
92
104
|
},
|
|
93
|
-
children: /* @__PURE__ */ o(
|
|
94
|
-
height:
|
|
95
|
-
shouldRun:
|
|
96
|
-
width:
|
|
105
|
+
children: /* @__PURE__ */ o(j, {
|
|
106
|
+
height: x,
|
|
107
|
+
shouldRun: x > 0 && b > 0,
|
|
108
|
+
width: b
|
|
97
109
|
})
|
|
98
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ e(r, {
|
|
99
111
|
sx: {
|
|
100
112
|
borderRadius: "8px",
|
|
101
113
|
overflow: "hidden",
|
|
@@ -103,7 +115,7 @@ var K = {
|
|
|
103
115
|
width: "100%",
|
|
104
116
|
zIndex: 2
|
|
105
117
|
},
|
|
106
|
-
children: [
|
|
118
|
+
children: [t.categoryStrip && a && /* @__PURE__ */ o(n, {
|
|
107
119
|
sx: {
|
|
108
120
|
bgcolor: "success.main",
|
|
109
121
|
px: 12,
|
|
@@ -114,48 +126,48 @@ var K = {
|
|
|
114
126
|
variant: "caption",
|
|
115
127
|
children: a
|
|
116
128
|
})
|
|
117
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ e(r, {
|
|
118
130
|
sx: {
|
|
119
131
|
alignItems: "center",
|
|
120
132
|
bgcolor: "success.lighter",
|
|
121
133
|
border: "1px solid",
|
|
122
134
|
borderColor: "success.main",
|
|
123
135
|
borderRadius: "8px",
|
|
124
|
-
...
|
|
136
|
+
...t.categoryStrip && {
|
|
125
137
|
borderTopLeftRadius: 0,
|
|
126
138
|
borderTopRightRadius: 0,
|
|
127
139
|
borderTop: 0
|
|
128
140
|
},
|
|
129
141
|
flexDirection: "row",
|
|
130
|
-
...
|
|
142
|
+
...t.rowSx
|
|
131
143
|
},
|
|
132
144
|
children: [/* @__PURE__ */ o(n, {
|
|
133
145
|
sx: {
|
|
134
146
|
display: "flex",
|
|
135
147
|
flexShrink: 0
|
|
136
148
|
},
|
|
137
|
-
children:
|
|
138
|
-
}), /* @__PURE__ */
|
|
149
|
+
children: F
|
|
150
|
+
}), /* @__PURE__ */ e(r, {
|
|
139
151
|
sx: {
|
|
140
152
|
flex: "1 0 0",
|
|
141
153
|
minWidth: 0
|
|
142
154
|
},
|
|
143
155
|
children: [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
156
|
+
t.secondaryPosition === "above" && T,
|
|
157
|
+
P,
|
|
158
|
+
t.secondaryPosition === "below" && T
|
|
147
159
|
]
|
|
148
160
|
})]
|
|
149
161
|
})]
|
|
150
162
|
})]
|
|
151
163
|
});
|
|
152
164
|
}
|
|
153
|
-
return /* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ e(r, {
|
|
154
166
|
sx: {
|
|
155
167
|
p: 16,
|
|
156
|
-
...
|
|
168
|
+
...t
|
|
157
169
|
},
|
|
158
|
-
children: [a && /* @__PURE__ */ o(
|
|
170
|
+
children: [a && /* @__PURE__ */ o(q, { headerText: a }), /* @__PURE__ */ e(r, {
|
|
159
171
|
sx: {
|
|
160
172
|
alignItems: "center",
|
|
161
173
|
bgcolor: "background.paper",
|
|
@@ -167,36 +179,36 @@ var K = {
|
|
|
167
179
|
gap: 16,
|
|
168
180
|
p: 16,
|
|
169
181
|
width: "100%",
|
|
170
|
-
...(
|
|
182
|
+
...(c || G || R?.guid) && { flexDirection: "row" }
|
|
171
183
|
},
|
|
172
|
-
children: [/* @__PURE__ */ o(
|
|
173
|
-
logo:
|
|
184
|
+
children: [/* @__PURE__ */ o(K, {
|
|
185
|
+
logo: R,
|
|
174
186
|
slot: i,
|
|
175
|
-
variant:
|
|
176
|
-
}), /* @__PURE__ */
|
|
187
|
+
variant: m
|
|
188
|
+
}), /* @__PURE__ */ e(r, { children: [l != null && /* @__PURE__ */ o(s, {
|
|
177
189
|
variant: "h1",
|
|
178
|
-
children: k(
|
|
179
|
-
}), /* @__PURE__ */
|
|
190
|
+
children: k(l, "0,0.00")
|
|
191
|
+
}), /* @__PURE__ */ e(r, {
|
|
180
192
|
sx: {
|
|
181
193
|
gap: 8,
|
|
182
194
|
flexDirection: "row",
|
|
183
195
|
alignItems: "center"
|
|
184
196
|
},
|
|
185
|
-
children: [
|
|
197
|
+
children: [t?.sub_logo && /* @__PURE__ */ o(Q, {
|
|
186
198
|
color: "warning",
|
|
187
199
|
fill: !0,
|
|
188
|
-
name:
|
|
200
|
+
name: t.sub_logo,
|
|
189
201
|
size: 20
|
|
190
|
-
}),
|
|
202
|
+
}), w && /* @__PURE__ */ o(s, {
|
|
191
203
|
variant: "body2",
|
|
192
|
-
children:
|
|
204
|
+
children: w
|
|
193
205
|
})]
|
|
194
206
|
})] })]
|
|
195
207
|
})]
|
|
196
208
|
});
|
|
197
209
|
};
|
|
198
210
|
export {
|
|
199
|
-
|
|
211
|
+
bo as default
|
|
200
212
|
};
|
|
201
213
|
|
|
202
214
|
//# 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 { 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 header_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 logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\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 p: 16,\n ...layoutConfig,\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n gap: 16,\n p: 16,\n width: '100%',\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=\"h1\">{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 && <Text variant=\"body2\">{sub_text}</Text>}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,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,aAAA,GACA,kBAAA,GACA,kBAAA,GACA,WAAA,GACA,eAAA,GACA,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SAAS,EACnD,eAAe,MACjB;AAAA,MACF;AAAA,MAfF,UAAA,CAiBE,gBAAA,EAAC,GAAD;AAAA,QAAqB,MAAA;AAAA,QAAM,MAAM;AAAA,QAAwB,SAAA;AAAA,MAAU,CAAA,GAEnE,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,KAAU,QAAQ,gBAAA,EAAC,GAAD;AAAA,QAAM,SAAQ;AAAA,QAAM,UAAA,EAAe,GAAQ,QAAQ;AAAA,MAAQ,CAAA,GAC9E,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,KAAK;AAAA,UAAG,eAAe;AAAA,UAAO,YAAY;AAAA,QAAS;AAAA,QAAhE,UAAA,CACG,GAAc,YACb,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAU,MAAM;AAAA,UAAM,MAAM,EAAa;AAAA,UAAU,MAAM;AAAA,QAAK,CAAA,GAE3E,KAAY,gBAAA,EAAC,GAAD;AAAA,UAAM,SAAQ;AAAA,UAAS,UAAA;AAAA,QAAe,CAAA,CAC9C;AAAA,MACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,IACF,CAAA,CAAA;AAAA;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 { 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 header_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 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 p: 16,\n ...layoutConfig,\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n gap: 16,\n p: 16,\n width: '100%',\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=\"h1\">{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 && <Text variant=\"body2\">{sub_text}</Text>}\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,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,IAAO,EAAc,GAAM,MAAM,GACjC,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAOA,MAAI,GAAc,WAChB,QACE,gBAAA,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,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,KAAU,QAAQ,gBAAA,EAAC,GAAD;AAAA,QAAM,SAAQ;AAAA,QAAM,UAAA,EAAe,GAAQ,QAAQ;AAAA,MAAQ,CAAA,GAC9E,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,KAAK;AAAA,UAAG,eAAe;AAAA,UAAO,YAAY;AAAA,QAAS;AAAA,QAAhE,UAAA,CACG,GAAc,YACb,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAU,MAAM;AAAA,UAAM,MAAM,EAAa;AAAA,UAAU,MAAM;AAAA,QAAK,CAAA,GAE3E,KAAY,gBAAA,EAAC,GAAD;AAAA,UAAM,SAAQ;AAAA,UAAS,UAAA;AAAA,QAAe,CAAA,CAC9C;AAAA,MACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,IACF,CAAA,CAAA;AAAA;AAEX"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
import { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard';
|
|
2
3
|
export interface BlockLayoutConfig {
|
|
3
4
|
background?: string;
|
|
4
5
|
logo_color?: string;
|
|
@@ -30,5 +31,12 @@ export interface BlockLayoutConfig {
|
|
|
30
31
|
secondaryVariant?: 'body2' | 'caption';
|
|
31
32
|
/** Theme color path for the secondary line. */
|
|
32
33
|
secondaryColor?: string;
|
|
34
|
+
/**
|
|
35
|
+
* When true, AccountBlock renders the "Detailed" account hero (overhanging institution logo,
|
|
36
|
+
* account name + type, status pill) through `DirectDepositCard`, styled by `detailed`.
|
|
37
|
+
*/
|
|
38
|
+
isDetailed?: boolean;
|
|
39
|
+
/** Hero card style props for the detailed variants. */
|
|
40
|
+
detailed?: DirectDepositCardStyleProps;
|
|
33
41
|
}
|
|
34
42
|
export declare const getLayoutConfig: (theme: Theme) => Record<string, BlockLayoutConfig>;
|
|
@@ -1,89 +1,101 @@
|
|
|
1
|
-
import { CELEBRATION_GRADIENT as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...e,
|
|
11
|
-
badge: "error"
|
|
12
|
-
},
|
|
13
|
-
status_off_track: {
|
|
14
|
-
logo_color: "background.paper",
|
|
15
|
-
logo_bGcolor: "error.main",
|
|
16
|
-
background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)"
|
|
17
|
-
},
|
|
18
|
-
interest_charges_summary: {
|
|
19
|
-
logo_color: "text.primary",
|
|
20
|
-
logo_bGcolor: t(r.palette.categories?.feesCharges || "", 0.25),
|
|
21
|
-
logo_border_color: "categories.feesCharges",
|
|
22
|
-
background: "linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)"
|
|
23
|
-
},
|
|
24
|
-
deposit_received: {
|
|
25
|
-
isConfetti: !0,
|
|
26
|
-
gradient: o,
|
|
27
|
-
graphic: "logo",
|
|
28
|
-
amountVariant: "h3",
|
|
29
|
-
amountPrefix: "+",
|
|
30
|
-
categoryStrip: !0,
|
|
31
|
-
rowSx: {
|
|
32
|
-
gap: 12,
|
|
33
|
-
p: 12
|
|
1
|
+
import { CELEBRATION_GRADIENT as o, WARM_LIME_ACCENT_GRADIENT as e } from "../../../components/celebrationGradients.es.js";
|
|
2
|
+
import { directDepositVariant as t, getLayoutConfig as n } from "../DirectDepositBlock/layout.es.js";
|
|
3
|
+
import { alpha as d } from "@mui/material/styles";
|
|
4
|
+
var i = { background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)" }, l = (r) => {
|
|
5
|
+
const a = n(r);
|
|
6
|
+
return {
|
|
7
|
+
overdraft_warning: {
|
|
8
|
+
background: r.palette.warning.light,
|
|
9
|
+
sub_logo: "error"
|
|
34
10
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
status_on_track: {
|
|
41
|
-
isConfetti: !0,
|
|
42
|
-
gradient: o,
|
|
43
|
-
graphic: "logo",
|
|
44
|
-
amountVariant: "h2",
|
|
45
|
-
rowSx: {
|
|
46
|
-
gap: 16,
|
|
47
|
-
p: 16
|
|
11
|
+
low_balance_alert: i,
|
|
12
|
+
low_balance: {
|
|
13
|
+
...i,
|
|
14
|
+
badge: "error"
|
|
48
15
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
payoff_celebration: {
|
|
55
|
-
isConfetti: !0,
|
|
56
|
-
gradient: a,
|
|
57
|
-
graphic: "paidOffCard",
|
|
58
|
-
amountVariant: "h2",
|
|
59
|
-
rowSx: {
|
|
60
|
-
gap: 24,
|
|
61
|
-
px: 24,
|
|
62
|
-
py: 16
|
|
16
|
+
status_off_track: {
|
|
17
|
+
logo_color: "background.paper",
|
|
18
|
+
logo_bGcolor: "error.main",
|
|
19
|
+
background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)"
|
|
63
20
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
savings_deposit: {
|
|
70
|
-
isConfetti: !0,
|
|
71
|
-
gradient: a,
|
|
72
|
-
graphic: "savings",
|
|
73
|
-
amountVariant: "h2",
|
|
74
|
-
rowSx: {
|
|
75
|
-
gap: 16,
|
|
76
|
-
p: 16
|
|
21
|
+
interest_charges_summary: {
|
|
22
|
+
logo_color: "text.primary",
|
|
23
|
+
logo_bGcolor: d(r.palette.categories?.feesCharges || "", 0.25),
|
|
24
|
+
logo_border_color: "categories.feesCharges",
|
|
25
|
+
background: "linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)"
|
|
77
26
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
27
|
+
deposit_received: {
|
|
28
|
+
isConfetti: !0,
|
|
29
|
+
gradient: e,
|
|
30
|
+
graphic: "logo",
|
|
31
|
+
amountVariant: "h3",
|
|
32
|
+
amountPrefix: "+",
|
|
33
|
+
categoryStrip: !0,
|
|
34
|
+
rowSx: {
|
|
35
|
+
gap: 12,
|
|
36
|
+
p: 12
|
|
37
|
+
},
|
|
38
|
+
secondarySource: "merchant",
|
|
39
|
+
secondaryPosition: "below",
|
|
40
|
+
secondaryVariant: "body2",
|
|
41
|
+
secondaryColor: "text.primary"
|
|
42
|
+
},
|
|
43
|
+
status_on_track: {
|
|
44
|
+
isConfetti: !0,
|
|
45
|
+
gradient: e,
|
|
46
|
+
graphic: "logo",
|
|
47
|
+
amountVariant: "h2",
|
|
48
|
+
rowSx: {
|
|
49
|
+
gap: 16,
|
|
50
|
+
p: 16
|
|
51
|
+
},
|
|
52
|
+
secondarySource: "label",
|
|
53
|
+
secondaryPosition: "below",
|
|
54
|
+
secondaryVariant: "caption",
|
|
55
|
+
secondaryColor: "text.secondary"
|
|
56
|
+
},
|
|
57
|
+
payoff_celebration: {
|
|
58
|
+
isConfetti: !0,
|
|
59
|
+
gradient: o,
|
|
60
|
+
graphic: "paidOffCard",
|
|
61
|
+
amountVariant: "h2",
|
|
62
|
+
rowSx: {
|
|
63
|
+
gap: 24,
|
|
64
|
+
px: 24,
|
|
65
|
+
py: 16
|
|
66
|
+
},
|
|
67
|
+
secondarySource: "label",
|
|
68
|
+
secondaryPosition: "below",
|
|
69
|
+
secondaryVariant: "caption",
|
|
70
|
+
secondaryColor: "text.secondary"
|
|
71
|
+
},
|
|
72
|
+
savings_deposit: {
|
|
73
|
+
isConfetti: !0,
|
|
74
|
+
gradient: o,
|
|
75
|
+
graphic: "savings",
|
|
76
|
+
amountVariant: "h2",
|
|
77
|
+
rowSx: {
|
|
78
|
+
gap: 16,
|
|
79
|
+
p: 16
|
|
80
|
+
},
|
|
81
|
+
secondarySource: "label",
|
|
82
|
+
secondaryPosition: "above",
|
|
83
|
+
secondaryVariant: "body2",
|
|
84
|
+
secondaryColor: "text.primary"
|
|
85
|
+
},
|
|
86
|
+
detailed_primary: {
|
|
87
|
+
isDetailed: !0,
|
|
88
|
+
detailed: a[t.MissingInterestRate]
|
|
89
|
+
},
|
|
90
|
+
detailed_success: {
|
|
91
|
+
isDetailed: !0,
|
|
92
|
+
detailed: a[t.InterestRateAdded]
|
|
93
|
+
},
|
|
94
|
+
default: {}
|
|
95
|
+
};
|
|
96
|
+
};
|
|
85
97
|
export {
|
|
86
|
-
|
|
98
|
+
l as getLayoutConfig
|
|
87
99
|
};
|
|
88
100
|
|
|
89
101
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n}\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n },\n interest_charges_summary: {\n logo_color: 'text.primary',\n logo_bGcolor: alpha(theme.palette.categories?.feesCharges || '', 0.25),\n logo_border_color: 'categories.feesCharges',\n background:\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)',\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h3',\n amountPrefix: '+',\n categoryStrip: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 24, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\nimport type { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard'\n\nimport {\n directDepositVariant,\n getLayoutConfig as getDirectDepositLayoutConfig,\n} from '../DirectDepositBlock/layout'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n /**\n * When true, AccountBlock renders the \"Detailed\" account hero (overhanging institution logo,\n * account name + type, status pill) through `DirectDepositCard`, styled by `detailed`.\n */\n isDetailed?: boolean\n /** Hero card style props for the detailed variants. */\n detailed?: DirectDepositCardStyleProps\n}\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n const directDepositLayout = getDirectDepositLayoutConfig(theme)\n\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n },\n interest_charges_summary: {\n logo_color: 'text.primary',\n logo_bGcolor: alpha(theme.palette.categories?.feesCharges || '', 0.25),\n logo_border_color: 'categories.feesCharges',\n background:\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)',\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h3',\n amountPrefix: '+',\n categoryStrip: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 24, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // \"Detailed\" hero pair from the Insights UI Toolkit (architecture doc: Account -> Detailed -\n // Primary / Detailed - Success). It is the same hero the Direct Deposit block renders for its\n // beats, so the styling is read from that block's table rather than duplicated here:\n // primary = blue slot gradient + primary-tinted pill, success = green slot gradient + solid\n // success pill.\n detailed_primary: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.MissingInterestRate],\n },\n detailed_success: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.InterestRateAdded],\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";;;AAuDA,IAAM,IAAsC,EAC1C,YACE,0FACJ,GAEa,IAAA,CAAmB,MAAoD;AAClF,QAAM,IAAsB,EAA6B,CAAK;AAE9D,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,MAClC,UAAU;AAAA,IACZ;AAAA,IACA,mBAAmB;AAAA,IAEnB,aAAa;AAAA,MAAE,GAAG;AAAA,MAAkB,OAAO;AAAA,IAAQ;AAAA,IAGnD,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,YACE;AAAA,IACJ;AAAA,IACA,0BAA0B;AAAA,MACxB,YAAY;AAAA,MACZ,cAAc,EAAM,EAAM,QAAQ,YAAY,eAAe,IAAI,IAAI;AAAA,MACrE,mBAAmB;AAAA,MACnB,YACE;AAAA,IACJ;AAAA,IAGA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,cAAc;AAAA,MACd,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,oBAAoB;AAAA,MAClB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,IAAI;AAAA,QAAI,IAAI;AAAA,MAAG;AAAA,MACjC,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IAMA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,mBAAA;AAAA,IACrD;AAAA,IACA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,iBAAA;AAAA,IACrD;AAAA,IAGA,SAAS,CAAC;AAAA,EACZ;AACF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import n from "./StatusPill.es.js";
|
|
2
|
-
import
|
|
3
|
-
import f from "./
|
|
2
|
+
import b from "./AccountHeroCard.es.js";
|
|
3
|
+
import { ConfettiOverlay as f } from "./shared/ConfettiOverlay.es.js";
|
|
4
4
|
import { NEUTRAL_PILL as s } from "../blocks/ComponentBlocks/DirectDepositBlock/layout.es.js";
|
|
5
5
|
import { Icon as C } from "@mxenabled/mx-icons";
|
|
6
6
|
import { jsx as r } from "react/jsx-runtime";
|
|
7
|
-
var h = ({ backgroundImage: t, bgcolor: i = "primary.lighter", logo: a, name: d, nameVariant: m = "body2", pill: o = s, showConfetti: l = !1, statusLabel: e, subtitle: c }) => /* @__PURE__ */ r(
|
|
8
|
-
backdrop: l ? /* @__PURE__ */ r(
|
|
7
|
+
var h = ({ backgroundImage: t, bgcolor: i = "primary.lighter", logo: a, name: d, nameVariant: m = "body2", pill: o = s, showConfetti: l = !1, statusLabel: e, subtitle: c }) => /* @__PURE__ */ r(b, {
|
|
8
|
+
backdrop: l ? /* @__PURE__ */ r(f, {}) : void 0,
|
|
9
9
|
backgroundImage: t,
|
|
10
10
|
bgcolor: i,
|
|
11
11
|
logo: a,
|