@mx-cartographer/experiences 9.7.5 → 9.7.7
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 +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +101 -92
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +39 -31
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +2 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +12 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [9.7.6] - 10-20-2026
|
|
2
|
+
|
|
3
|
+
- **CHANGED** - `account_block` standard cards restyled to the [Insights V2 design](https://www.figma.com/design/zHeKCtAYZl4NoOb6NgqKwb/Insights-V2-Development?node-id=13428-17654): `h2` amount, `caption` / `text.secondary` sub_text, `px: 16 / py: 12` body, `py: 4` header strip, a 30px icon glyph in the 48px tile, and the `theme.shadows[1]` elevation around the header and card together. Every standard variant; confetti cards unchanged (MEW2-3317)
|
|
4
|
+
- **FIXED** - `account_block` reads `header_text` from `instance_slot.data`, so an Insights 2.0 beat's period strip renders instead of nothing (MEW2-3317)
|
|
5
|
+
- **FIXED** - `account_block` no longer spreads non-style `layoutConfig` keys (`logo_color`, `sub_logo`, `badge`) into the card's `sx` (MEW2-3317)
|
|
6
|
+
- **FIXED** - Payday Cash Left Over Status's off-track full and mini tile draws its money icon (white on the red square), from the `ICO-` logo ditto sends (WEC-1916)
|
|
7
|
+
|
|
1
8
|
## [9.7.5] - 10-19-2026
|
|
2
9
|
|
|
3
10
|
- **ADDED** - `GlobalDataProvider` takes an optional `onHostMessage` handler for messages to the host app, and the account filter sends `focusTrap` through it (`trapped: true` on open, `trapped: false` on close), so a native host can hide its own views from the screen reader (MEW-4257)
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { slot as
|
|
2
|
-
import { formatCurrency as
|
|
3
|
-
import { useContainerDimensions as
|
|
4
|
-
import { DepositLogo as
|
|
5
|
-
import { Confetti as
|
|
1
|
+
import { slot as m } from "../../../../core/types/Insights.es.js";
|
|
2
|
+
import { formatCurrency as I } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { useContainerDimensions as j } from "../../../hooks/useContainerDimensions.es.js";
|
|
4
|
+
import { DepositLogo as D } from "../../../components/ComponentBlocks/DepositLogo.es.js";
|
|
5
|
+
import { Confetti as H } from "../../../components/shared/Confetti.es.js";
|
|
6
6
|
import E from "../../../components/DirectDepositCard.es.js";
|
|
7
|
-
import { ReactComponent as
|
|
8
|
-
import { ReactComponent as
|
|
9
|
-
import { resolveVariantConfig as
|
|
10
|
-
import { HeaderComponent as
|
|
11
|
-
import { getLayoutConfig as
|
|
12
|
-
import { IconComponent as
|
|
13
|
-
import { useRef as
|
|
14
|
-
import
|
|
15
|
-
import { Text as
|
|
16
|
-
import { Icon as
|
|
17
|
-
import { jsx as o, jsxs as
|
|
18
|
-
import { useTheme as
|
|
7
|
+
import { ReactComponent as O } from "../../../components/shared/images/PaidOffCard.es.js";
|
|
8
|
+
import { ReactComponent as W } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
|
|
9
|
+
import { resolveVariantConfig as q } from "../../resolveVariantConfig.es.js";
|
|
10
|
+
import { HeaderComponent as J } from "./HeaderComponent.es.js";
|
|
11
|
+
import { getLayoutConfig as K } from "./layout.es.js";
|
|
12
|
+
import { IconComponent as M } from "./IconComponent.es.js";
|
|
13
|
+
import { useRef as Q } from "react";
|
|
14
|
+
import e from "@mui/material/Stack";
|
|
15
|
+
import { Text as c } from "@mxenabled/mxui";
|
|
16
|
+
import { Icon as U } from "@mxenabled/mx-icons";
|
|
17
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
18
|
+
import { useTheme as X } from "@mui/material/styles";
|
|
19
19
|
import n from "@mui/material/Box";
|
|
20
|
-
var
|
|
20
|
+
var Y = {
|
|
21
21
|
deposit_received: "payments",
|
|
22
22
|
status_on_track: "monetization_on"
|
|
23
|
-
},
|
|
24
|
-
const
|
|
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
25
|
if (t?.isDetailed) return /* @__PURE__ */ o(E, {
|
|
26
26
|
...t.detailed,
|
|
27
|
-
logo: /* @__PURE__ */ o(
|
|
27
|
+
logo: /* @__PURE__ */ o(D, {
|
|
28
28
|
iconName: "account_balance",
|
|
29
|
-
institutionGuid:
|
|
30
|
-
institutionName:
|
|
29
|
+
institutionGuid: d ?? "",
|
|
30
|
+
institutionName: h ?? d ?? ""
|
|
31
31
|
}),
|
|
32
|
-
name:
|
|
33
|
-
statusLabel:
|
|
34
|
-
subtitle:
|
|
32
|
+
name: L,
|
|
33
|
+
statusLabel: G,
|
|
34
|
+
subtitle: z
|
|
35
35
|
});
|
|
36
36
|
if (t?.isConfetti) {
|
|
37
|
-
const
|
|
37
|
+
const P = {
|
|
38
38
|
paidOffCard: /* @__PURE__ */ o(n, {
|
|
39
39
|
sx: {
|
|
40
40
|
flexShrink: 0,
|
|
@@ -42,7 +42,7 @@ var X = {
|
|
|
42
42
|
position: "relative",
|
|
43
43
|
width: 44
|
|
44
44
|
},
|
|
45
|
-
children: /* @__PURE__ */ o(
|
|
45
|
+
children: /* @__PURE__ */ o(O, {
|
|
46
46
|
"aria-hidden": !0,
|
|
47
47
|
role: "presentation",
|
|
48
48
|
style: {
|
|
@@ -52,7 +52,7 @@ var X = {
|
|
|
52
52
|
}
|
|
53
53
|
})
|
|
54
54
|
}),
|
|
55
|
-
savings: /* @__PURE__ */ o(
|
|
55
|
+
savings: /* @__PURE__ */ o(W, {
|
|
56
56
|
"aria-hidden": !0,
|
|
57
57
|
height: 55,
|
|
58
58
|
role: "presentation",
|
|
@@ -66,26 +66,26 @@ var X = {
|
|
|
66
66
|
overflow: "hidden",
|
|
67
67
|
width: 48
|
|
68
68
|
},
|
|
69
|
-
children: /* @__PURE__ */ o(
|
|
70
|
-
categoryGuid:
|
|
71
|
-
iconName:
|
|
72
|
-
institutionGuid:
|
|
73
|
-
institutionName:
|
|
74
|
-
merchantGuid:
|
|
75
|
-
merchantName:
|
|
69
|
+
children: /* @__PURE__ */ o(D, {
|
|
70
|
+
categoryGuid: B,
|
|
71
|
+
iconName: Y[p] ?? "payments",
|
|
72
|
+
institutionGuid: d,
|
|
73
|
+
institutionName: h,
|
|
74
|
+
merchantGuid: A,
|
|
75
|
+
merchantName: y
|
|
76
76
|
})
|
|
77
77
|
})
|
|
78
|
-
}[t.graphic ?? "logo"],
|
|
78
|
+
}[t.graphic ?? "logo"], k = t.secondarySource === "merchant" ? y ?? h : F, S = k ? /* @__PURE__ */ o(c, {
|
|
79
79
|
color: t.secondaryColor,
|
|
80
80
|
variant: t.secondaryVariant,
|
|
81
|
-
children:
|
|
82
|
-
}) : null,
|
|
81
|
+
children: k
|
|
82
|
+
}) : null, V = u != null ? /* @__PURE__ */ o(c, {
|
|
83
83
|
bold: !0,
|
|
84
84
|
color: "success.dark",
|
|
85
85
|
variant: t.amountVariant,
|
|
86
|
-
children: `${t.amountPrefix ?? ""}${
|
|
86
|
+
children: `${t.amountPrefix ?? ""}${I(u, "0,0.00")}`
|
|
87
87
|
}) : null;
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ r(n, {
|
|
89
89
|
ref: g,
|
|
90
90
|
sx: {
|
|
91
91
|
backgroundImage: t.gradient,
|
|
@@ -102,12 +102,12 @@ var X = {
|
|
|
102
102
|
position: "absolute",
|
|
103
103
|
zIndex: 1
|
|
104
104
|
},
|
|
105
|
-
children: /* @__PURE__ */ o(
|
|
106
|
-
height:
|
|
107
|
-
shouldRun:
|
|
108
|
-
width:
|
|
105
|
+
children: /* @__PURE__ */ o(H, {
|
|
106
|
+
height: b,
|
|
107
|
+
shouldRun: b > 0 && v > 0,
|
|
108
|
+
width: v
|
|
109
109
|
})
|
|
110
|
-
}), /* @__PURE__ */ e
|
|
110
|
+
}), /* @__PURE__ */ r(e, {
|
|
111
111
|
sx: {
|
|
112
112
|
borderRadius: "8px",
|
|
113
113
|
overflow: "hidden",
|
|
@@ -115,18 +115,18 @@ var X = {
|
|
|
115
115
|
width: "100%",
|
|
116
116
|
zIndex: 2
|
|
117
117
|
},
|
|
118
|
-
children: [t.categoryStrip &&
|
|
118
|
+
children: [t.categoryStrip && s && /* @__PURE__ */ o(n, {
|
|
119
119
|
sx: {
|
|
120
120
|
bgcolor: "success.main",
|
|
121
121
|
px: 12,
|
|
122
122
|
py: 4
|
|
123
123
|
},
|
|
124
|
-
children: /* @__PURE__ */ o(
|
|
124
|
+
children: /* @__PURE__ */ o(c, {
|
|
125
125
|
color: "success.contrastText",
|
|
126
126
|
variant: "caption",
|
|
127
|
-
children:
|
|
127
|
+
children: s
|
|
128
128
|
})
|
|
129
|
-
}), /* @__PURE__ */ e
|
|
129
|
+
}), /* @__PURE__ */ r(e, {
|
|
130
130
|
sx: {
|
|
131
131
|
alignItems: "center",
|
|
132
132
|
bgcolor: "success.lighter",
|
|
@@ -146,69 +146,78 @@ var X = {
|
|
|
146
146
|
display: "flex",
|
|
147
147
|
flexShrink: 0
|
|
148
148
|
},
|
|
149
|
-
children:
|
|
150
|
-
}), /* @__PURE__ */ e
|
|
149
|
+
children: P
|
|
150
|
+
}), /* @__PURE__ */ r(e, {
|
|
151
151
|
sx: {
|
|
152
152
|
flex: "1 0 0",
|
|
153
153
|
minWidth: 0
|
|
154
154
|
},
|
|
155
155
|
children: [
|
|
156
|
-
t.secondaryPosition === "above" &&
|
|
157
|
-
|
|
158
|
-
t.secondaryPosition === "below" &&
|
|
156
|
+
t.secondaryPosition === "above" && S,
|
|
157
|
+
V,
|
|
158
|
+
t.secondaryPosition === "below" && S
|
|
159
159
|
]
|
|
160
160
|
})]
|
|
161
161
|
})]
|
|
162
162
|
})]
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
return /* @__PURE__ */ e
|
|
165
|
+
return /* @__PURE__ */ o(e, {
|
|
166
166
|
sx: {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
background: t.background,
|
|
168
|
+
p: 16
|
|
169
169
|
},
|
|
170
|
-
children:
|
|
170
|
+
children: /* @__PURE__ */ r(e, {
|
|
171
171
|
sx: {
|
|
172
|
-
alignItems: "center",
|
|
173
|
-
bgcolor: "background.paper",
|
|
174
172
|
borderRadius: "8px",
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
borderTopRightRadius: "0"
|
|
178
|
-
},
|
|
179
|
-
gap: 16,
|
|
180
|
-
p: 16,
|
|
181
|
-
width: "100%",
|
|
182
|
-
...(c || G || R?.guid) && { flexDirection: "row" }
|
|
173
|
+
boxShadow: x.shadows[1],
|
|
174
|
+
width: "100%"
|
|
183
175
|
},
|
|
184
|
-
children: [/* @__PURE__ */ o(
|
|
185
|
-
logo: R,
|
|
186
|
-
slot: i,
|
|
187
|
-
variant: m
|
|
188
|
-
}), /* @__PURE__ */ e(r, { children: [l != null && /* @__PURE__ */ o(s, {
|
|
189
|
-
variant: "h1",
|
|
190
|
-
children: k(l, "0,0.00")
|
|
191
|
-
}), /* @__PURE__ */ e(r, {
|
|
176
|
+
children: [s && /* @__PURE__ */ o(J, { headerText: s }), /* @__PURE__ */ r(e, {
|
|
192
177
|
sx: {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
178
|
+
alignItems: "center",
|
|
179
|
+
bgcolor: "background.paper",
|
|
180
|
+
borderRadius: "8px",
|
|
181
|
+
gap: 16,
|
|
182
|
+
px: 16,
|
|
183
|
+
py: 12,
|
|
184
|
+
width: "100%",
|
|
185
|
+
...s && {
|
|
186
|
+
borderTopLeftRadius: "0",
|
|
187
|
+
borderTopRightRadius: "0"
|
|
188
|
+
},
|
|
189
|
+
...(d || $ || T?.guid) && { flexDirection: "row" }
|
|
196
190
|
},
|
|
197
|
-
children: [
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
191
|
+
children: [/* @__PURE__ */ o(M, {
|
|
192
|
+
logo: T,
|
|
193
|
+
slot: i,
|
|
194
|
+
variant: p
|
|
195
|
+
}), /* @__PURE__ */ r(e, { children: [u != null && /* @__PURE__ */ o(c, {
|
|
196
|
+
variant: "h2",
|
|
197
|
+
children: I(u, "0,0.00")
|
|
198
|
+
}), /* @__PURE__ */ r(e, {
|
|
199
|
+
sx: {
|
|
200
|
+
gap: 8,
|
|
201
|
+
flexDirection: "row",
|
|
202
|
+
alignItems: "center"
|
|
203
|
+
},
|
|
204
|
+
children: [t.sub_logo && /* @__PURE__ */ o(U, {
|
|
205
|
+
color: "warning",
|
|
206
|
+
fill: !0,
|
|
207
|
+
name: t.sub_logo,
|
|
208
|
+
size: 20
|
|
209
|
+
}), R && /* @__PURE__ */ o(c, {
|
|
210
|
+
color: "text.secondary",
|
|
211
|
+
variant: "caption",
|
|
212
|
+
children: R
|
|
213
|
+
})]
|
|
214
|
+
})] })]
|
|
215
|
+
})]
|
|
216
|
+
})
|
|
208
217
|
});
|
|
209
218
|
};
|
|
210
219
|
export {
|
|
211
|
-
|
|
220
|
+
vo as default
|
|
212
221
|
};
|
|
213
222
|
|
|
214
223
|
//# 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 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 Acc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AAK,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 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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Q,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\nimport { Text } from '@mxenabled/mxui'\n\ninterface HeaderComponentProps {\n headerText?: string\n}\n\nexport const HeaderComponent = ({ headerText }: HeaderComponentProps) => {\n return (\n <Stack\n sx={{\n bgcolor: 'background.default',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\n borderTopLeftRadius: '8px',\n borderTopRightRadius: '8px',\n px: 16,\n py:
|
|
1
|
+
{"version":3,"file":"HeaderComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\nimport { Text } from '@mxenabled/mxui'\n\ninterface HeaderComponentProps {\n headerText?: string\n}\n\nexport const HeaderComponent = ({ headerText }: HeaderComponentProps) => {\n return (\n <Stack\n sx={{\n bgcolor: 'background.default',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\n borderTopLeftRadius: '8px',\n borderTopRightRadius: '8px',\n px: 16,\n py: 4,\n width: '100%',\n }}\n >\n <Text sx={{ color: 'text.secondary' }} variant=\"caption\">\n {headerText}\n </Text>\n </Stack>\n )\n}\n"],"mappings":";;;AAOA,IAAa,IAAA,CAAmB,EAAE,YAAA,EAAA,MAE9B,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IAAM,IAAI,EAAE,OAAO,iBAAiB;AAAA,IAAG,SAAQ;AAAA,IAC5C,UAAA;AAAA,EACG,CAAA;AACD,CAAA"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveVariantConfig as
|
|
3
|
-
import { getLayoutConfig as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import c from "../../../../common/components/IconBacking.es.js";
|
|
2
|
+
import { resolveVariantConfig as u } from "../../resolveVariantConfig.es.js";
|
|
3
|
+
import { getLayoutConfig as g } from "./layout.es.js";
|
|
4
|
+
import f from "../../../components/LogoFromGuid.es.js";
|
|
5
|
+
import { statusIconName as d } from "../../../components/statusIcon.es.js";
|
|
6
|
+
import { InstitutionLogo as p } from "@mxenabled/mxui";
|
|
7
|
+
import { Icon as n } from "@mxenabled/mx-icons";
|
|
8
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
import { useTheme as b } from "@mui/material/styles";
|
|
10
|
+
import { Stack as a } from "@mui/material";
|
|
11
|
+
var y = ({ slot: i, variant: s, logo: e }) => {
|
|
12
|
+
const m = b(), o = u(g(m), s, "default", "AccountBlock");
|
|
13
|
+
if (/^INS-[A-Za-z0-9-]+$/.test(e?.guid ?? "")) return /* @__PURE__ */ l(a, {
|
|
13
14
|
sx: {
|
|
14
15
|
alignItems: "center",
|
|
15
16
|
flexDirection: "row",
|
|
16
17
|
position: "relative"
|
|
17
18
|
},
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
-
logo:
|
|
19
|
+
children: [/* @__PURE__ */ r(f, {
|
|
20
|
+
logo: e,
|
|
20
21
|
size: 48
|
|
21
|
-
}),
|
|
22
|
+
}), o.badge && /* @__PURE__ */ r(c, {
|
|
22
23
|
size: 20,
|
|
23
24
|
sx: {
|
|
24
25
|
position: "absolute",
|
|
25
26
|
right: -8,
|
|
26
27
|
top: -8
|
|
27
28
|
},
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
+
children: /* @__PURE__ */ r(n, {
|
|
29
30
|
"aria-hidden": !0,
|
|
30
31
|
color: "error",
|
|
31
32
|
"data-testid": "account-block-error-badge",
|
|
32
33
|
fill: !0,
|
|
33
|
-
name:
|
|
34
|
+
name: o.badge,
|
|
34
35
|
size: 20,
|
|
35
36
|
sx: {
|
|
36
37
|
gridColumn: 1,
|
|
@@ -39,24 +40,25 @@ var k = ({ slot: i, variant: c, logo: n }) => {
|
|
|
39
40
|
}
|
|
40
41
|
})
|
|
41
42
|
})]
|
|
42
|
-
})
|
|
43
|
+
});
|
|
44
|
+
if (i.institution_guid) return /* @__PURE__ */ l(a, {
|
|
43
45
|
sx: {
|
|
44
46
|
alignItems: "center",
|
|
45
47
|
flexDirection: "row",
|
|
46
48
|
position: "relative"
|
|
47
49
|
},
|
|
48
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ r(p, {
|
|
49
51
|
alt: `${i.institution_name}`,
|
|
50
52
|
institutionGuid: `${i.institution_guid}`,
|
|
51
53
|
size: 48
|
|
52
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ r(c, {
|
|
53
55
|
size: 20,
|
|
54
56
|
sx: {
|
|
55
57
|
position: "absolute",
|
|
56
58
|
right: -8,
|
|
57
59
|
top: -8
|
|
58
60
|
},
|
|
59
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ r(n, {
|
|
60
62
|
color: "error",
|
|
61
63
|
fill: !0,
|
|
62
64
|
name: "error",
|
|
@@ -68,29 +70,35 @@ var k = ({ slot: i, variant: c, logo: n }) => {
|
|
|
68
70
|
}
|
|
69
71
|
})
|
|
70
72
|
})]
|
|
71
|
-
})
|
|
73
|
+
});
|
|
74
|
+
const t = d(i.icon_name && `ICO-${i.icon_name}`) ?? (o.logo_bGcolor ? d(e?.guid) : void 0);
|
|
75
|
+
return t ? /* @__PURE__ */ r(a, {
|
|
76
|
+
"data-icon": t,
|
|
77
|
+
"data-testid": "account-block-icon-tile",
|
|
72
78
|
sx: {
|
|
73
79
|
alignItems: "center",
|
|
74
|
-
bgcolor:
|
|
75
|
-
borderRadius: "6px",
|
|
80
|
+
bgcolor: o.logo_bGcolor,
|
|
81
|
+
borderRadius: o.logo_border_radius ?? "6px",
|
|
82
|
+
flexShrink: 0,
|
|
76
83
|
height: 48,
|
|
77
84
|
justifyContent: "center",
|
|
78
85
|
width: 48,
|
|
79
|
-
...
|
|
80
|
-
borderColor:
|
|
86
|
+
...o.logo_border_color && {
|
|
87
|
+
borderColor: o.logo_border_color,
|
|
81
88
|
borderStyle: "solid",
|
|
82
89
|
borderWidth: 1.5
|
|
83
90
|
}
|
|
84
91
|
},
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
children: /* @__PURE__ */ r(n, {
|
|
93
|
+
"aria-hidden": !0,
|
|
94
|
+
name: t,
|
|
95
|
+
size: 30,
|
|
96
|
+
sx: { color: o.logo_color }
|
|
89
97
|
})
|
|
90
98
|
}) : null;
|
|
91
99
|
};
|
|
92
100
|
export {
|
|
93
|
-
|
|
101
|
+
y as IconComponent
|
|
94
102
|
};
|
|
95
103
|
|
|
96
104
|
//# sourceMappingURL=IconComponent.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking } from '../../../../common'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig } from './layout'\nimport { useTheme } from '@mui/material/styles'\nimport type { InstanceSlot, LogoRef } from '../../../../core'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\ninterface IconComponentProps {\n slot: InstanceSlot\n variant?: string | null\n /** V2: the slot's logo object (`instance_slot.data.logo`), badged with the layout's `badge`. */\n logo?: LogoRef\n}\n\nexport const IconComponent = ({ slot, variant, logo }: IconComponentProps) => {\n const theme = useTheme()\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // V2 slot logo: an institution guid only; anything else falls through to the legacy fields.\n if (/^INS-[A-Za-z0-9-]+$/.test(logo?.guid ?? '')) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <LogoFromGuid logo={logo} size={48} />\n {layoutConfig.badge && (\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n aria-hidden={true}\n color=\"error\"\n data-testid=\"account-block-error-badge\"\n fill={true}\n name={layoutConfig.badge}\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n )}\n </Stack>\n )\n }\n\n if (slot.institution_guid) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <InstitutionLogo\n alt={`${slot.institution_name}`}\n institutionGuid={`${slot.institution_guid}`}\n size={48}\n />\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n color=\"error\"\n fill={true}\n name=\"error\"\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n </Stack>\n )\n }\n\n
|
|
1
|
+
{"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking } from '../../../../common'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig } from './layout'\nimport { useTheme } from '@mui/material/styles'\nimport type { InstanceSlot, LogoRef } from '../../../../core'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { statusIconName } from '../../../components/statusIcon'\n\ninterface IconComponentProps {\n slot: InstanceSlot\n variant?: string | null\n /** V2: the slot's logo object (`instance_slot.data.logo`), badged with the layout's `badge`. */\n logo?: LogoRef\n}\n\nexport const IconComponent = ({ slot, variant, logo }: IconComponentProps) => {\n const theme = useTheme()\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // V2 slot logo: an institution guid only; anything else falls through to the legacy fields.\n if (/^INS-[A-Za-z0-9-]+$/.test(logo?.guid ?? '')) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <LogoFromGuid logo={logo} size={48} />\n {layoutConfig.badge && (\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n aria-hidden={true}\n color=\"error\"\n data-testid=\"account-block-error-badge\"\n fill={true}\n name={layoutConfig.badge}\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n )}\n </Stack>\n )\n }\n\n if (slot.institution_guid) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <InstitutionLogo\n alt={`${slot.institution_name}`}\n institutionGuid={`${slot.institution_guid}`}\n size={48}\n />\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n color=\"error\"\n fill={true}\n name=\"error\"\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n </Stack>\n )\n }\n\n // The flat `icon_name`, else a V2 `ICO-` logo, both through statusIconName's mx-icons allowlist so\n // an unknown name draws nothing. Drawn here rather than through LogoFromGuid, which fills every\n // `ICO-` glyph. An `ICO-` logo needs a variant that styles the tile, or it would be a bare glyph.\n const iconName =\n statusIconName(slot.icon_name && `ICO-${slot.icon_name}`) ??\n (layoutConfig.logo_bGcolor ? statusIconName(logo?.guid) : undefined)\n if (iconName) {\n return (\n <Stack\n data-icon={iconName}\n data-testid=\"account-block-icon-tile\"\n sx={{\n alignItems: 'center',\n bgcolor: layoutConfig.logo_bGcolor,\n borderRadius: layoutConfig.logo_border_radius ?? '6px',\n flexShrink: 0,\n height: 48,\n justifyContent: 'center',\n width: 48,\n ...(layoutConfig.logo_border_color && {\n borderColor: layoutConfig.logo_border_color,\n borderStyle: 'solid',\n borderWidth: 1.5,\n }),\n }}\n >\n <Icon\n aria-hidden={true}\n name={iconName}\n size={30}\n sx={{ color: layoutConfig.logo_color }}\n />\n </Stack>\n )\n }\n\n return null\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAa,IAAA,CAAiB,EAAE,MAAA,GAAM,SAAA,GAAS,MAAA,EAAA,MAA+B;AAC5E,QAAM,IAAQ,EAAS,GACjB,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAGA,MAAI,sBAAsB,KAAK,GAAM,QAAQ,EAAE,EAC7C,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe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OAAO,EAAK,SAAA,EAAW,MACvD,EAAa,eAAe,EAAe,GAAM,IAAI,IAAI;AAC5D,SAAI,IAEA,gBAAA,EAAC,GAAD;AAAA,IACE,aAAW;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,EAAa;AAAA,MACtB,cAAc,EAAa,sBAAsB;AAAA,MACjD,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,GAAI,EAAa,qBAAqB;AAAA,QACpC,aAAa,EAAa;AAAA,QAC1B,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,eAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI,EAAE,OAAO,EAAa,WAAW;AAAA,IACtC,CAAA;AAAA,EACI,CAAA,IAIJ;AACT"}
|
|
@@ -5,6 +5,8 @@ export interface BlockLayoutConfig {
|
|
|
5
5
|
logo_color?: string;
|
|
6
6
|
logo_bGcolor?: string;
|
|
7
7
|
logo_border_color?: string;
|
|
8
|
+
/** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */
|
|
9
|
+
logo_border_radius?: string;
|
|
8
10
|
/** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */
|
|
9
11
|
sub_logo?: string;
|
|
10
12
|
/** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */
|
|
@@ -16,6 +16,7 @@ var i = { background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%,
|
|
|
16
16
|
status_off_track: {
|
|
17
17
|
logo_color: "background.paper",
|
|
18
18
|
logo_bGcolor: "error.main",
|
|
19
|
+
logo_border_radius: "4px",
|
|
19
20
|
background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)"
|
|
20
21
|
},
|
|
21
22
|
interest_charges_summary: {
|
|
@@ -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'\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":";;;
|
|
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 /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: 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 // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\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":";;;AAyDA,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,MAEd,oBAAoB;AAAA,MACpB,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,S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|
import { slot as T } from "../../core/types/Insights.es.js";
|
|
2
2
|
import { resolveInsightRender as S } from "../../insights-v2/resolveInsightRender.es.js";
|
|
3
3
|
import F from "../../insights-v2/components/LogoFromGuid.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { statusIconName as O, statusIconPalette as v } from "../../insights-v2/components/statusIcon.es.js";
|
|
5
|
+
import { ON_CLICK_EVENT as A, ON_VIEW_EVENT as L, ON_VIEW_FIRST_TIME_EVENT as j } from "../constants/Analytics.es.js";
|
|
5
6
|
import V from "../beaticons/BeatMaterialIcon.es.js";
|
|
6
|
-
import { BeatIcon as
|
|
7
|
-
import { useCopyStore as
|
|
7
|
+
import { BeatIcon as w } from "../beaticons/BeatIcon.es.js";
|
|
8
|
+
import { useCopyStore as z, useEvent as G, useInsightsMicroWidgetStore as K } from "../context/hooks.es.js";
|
|
8
9
|
import k from "../MicroCardTemplate.es.js";
|
|
9
|
-
import
|
|
10
|
-
import { statusIconName as K, statusIconPalette as Z } from "../../insights-v2/components/statusIcon.es.js";
|
|
10
|
+
import Z from "../../insights-v2/components/InsightErrorCard.es.js";
|
|
11
11
|
import { useEffect as x } from "react";
|
|
12
12
|
import { jsx as o } from "react/jsx-runtime";
|
|
13
13
|
import { alpha as B, useTheme as $ } from "@mui/material/styles";
|
|
14
14
|
import q from "@mui/material/Box";
|
|
15
15
|
import { useInView as D } from "react-intersection-observer";
|
|
16
16
|
var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard: l, onCardClick: u, posthog: r, widthOverrides: n, variant: f, showIcon: h, heightOverrides: p }) => {
|
|
17
|
-
const { ref: _, inView: m } = D({ threshold: 1 }), I = $(), { cardsCopy: M } =
|
|
17
|
+
const { ref: _, inView: m } = D({ threshold: 1 }), I = $(), { cardsCopy: M } = z(), { onEvent: d } = G(), { updateBeat: P, updateOffer: R } = K();
|
|
18
18
|
x(() => {
|
|
19
|
-
m && (i.has_been_displayed ? d(
|
|
19
|
+
m && (i.has_been_displayed ? d(L(i.template)) : (i.guid.startsWith("OFR") ? R({
|
|
20
20
|
...i,
|
|
21
21
|
has_been_displayed: !0
|
|
22
22
|
}) : P({
|
|
23
23
|
...i,
|
|
24
24
|
has_been_displayed: !0
|
|
25
|
-
}), d(
|
|
25
|
+
}), d(j(i.template))));
|
|
26
26
|
}, [m]), x(() => {
|
|
27
27
|
if (m && i) if (i.template === "MarketingOffer") {
|
|
28
28
|
const t = i;
|
|
@@ -44,7 +44,7 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
|
|
|
44
44
|
m
|
|
45
45
|
]);
|
|
46
46
|
const s = () => {
|
|
47
|
-
if (u && u(i), d(
|
|
47
|
+
if (u && u(i), d(A(i.template)), i.template === "MarketingOffer") {
|
|
48
48
|
const t = i;
|
|
49
49
|
r?.capture("clicked_messaging_insight", {
|
|
50
50
|
template: i.template,
|
|
@@ -70,10 +70,10 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
|
|
|
70
70
|
minWidth: n ? `${n}px` : "100%",
|
|
71
71
|
my: 1
|
|
72
72
|
},
|
|
73
|
-
children: /* @__PURE__ */ o(
|
|
73
|
+
children: /* @__PURE__ */ o(Z, { beat: i })
|
|
74
74
|
});
|
|
75
75
|
if (e) {
|
|
76
|
-
const t = T(e.instance_slot.data, "logo"), E = T(e.instance_slot.data, "icon"), C =
|
|
76
|
+
const t = T(e.instance_slot.data, "logo"), E = T(e.instance_slot.data, "icon"), C = O(E?.guid), N = v(E?.color), W = e.primary_cta?.label || e.in_description_cta?.label || void 0;
|
|
77
77
|
return /* @__PURE__ */ o(k, {
|
|
78
78
|
"aria-roledescription": "slide",
|
|
79
79
|
ariaLabel: a,
|
|
@@ -107,7 +107,7 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
|
|
|
107
107
|
description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description || "",
|
|
108
108
|
elevation: g,
|
|
109
109
|
heightOverrides: p,
|
|
110
|
-
icon: h && /* @__PURE__ */ o(
|
|
110
|
+
icon: h && /* @__PURE__ */ o(w, { beat: i }),
|
|
111
111
|
isActiveCard: l,
|
|
112
112
|
onCardClick: s,
|
|
113
113
|
onPrimaryAction: s,
|