@mx-cartographer/experiences 9.7.159 → 9.7.161
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 +11 -0
- package/dist/common/components/CurrencyDialog.d.ts +11 -1
- package/dist/common/components/CurrencyDialog.es.js +50 -44
- package/dist/common/components/CurrencyDialog.es.js.map +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -0
- package/dist/common/components/ErrorBoundary.es.js +1 -1
- package/dist/common/components/ErrorBoundary.es.js.map +1 -1
- package/dist/common/components/index.d.ts +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +8 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +39 -39
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +40 -35
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +91 -91
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.d.ts +42 -2
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js +75 -15
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +73 -74
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +20 -21
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +36 -38
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js +29 -30
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +60 -59
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +20 -20
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js +3 -3
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +36 -36
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.d.ts +2 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +77 -76
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +64 -59
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.d.ts +11 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.es.js +138 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +13 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +80 -63
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/useRequiredCopy.d.ts +3 -0
- package/dist/insights-v2/actionBlocks/useRequiredCopy.es.js +11 -0
- package/dist/insights-v2/actionBlocks/useRequiredCopy.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +14 -14
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +9 -2
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +14 -7
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +7 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js +14 -7
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +4 -4
- package/dist/insights-v2/components/CompactInsightCard.es.js +164 -138
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.d.ts +1 -0
- package/dist/insights-v2/mappings/blocks.es.js +190 -178
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import { useGlobalStore as
|
|
1
|
+
import { useGlobalStore as P, useInsightsV2Store as W } from "../../common/context/hooks.es.js";
|
|
2
2
|
import { slot as p } from "../../core/types/Insights.es.js";
|
|
3
|
-
import { CURRENCY_FORMAT as
|
|
4
|
-
import { getCategoryColor as
|
|
5
|
-
import { TinyBarChart as
|
|
6
|
-
import { BAR_ARIA_LABEL as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
3
|
+
import { CURRENCY_FORMAT as B, formatCurrency as M } from "../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import { getCategoryColor as K } from "../../core/utils/CategoryUtil.es.js";
|
|
5
|
+
import { TinyBarChart as T } from "../../common/components/TinyBarChart.es.js";
|
|
6
|
+
import { BAR_ARIA_LABEL as j, buildChartData as F, buildDataSeries as Z } from "../blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
7
|
+
import X from "../blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js";
|
|
8
|
+
import { donutChartVariant as $ } from "../blocks/ChartBlocks/DonutChartBlock/layout.es.js";
|
|
9
|
+
import { getDonutSegments as U } from "../blocks/ChartBlocks/DonutChartBlock/utils.es.js";
|
|
10
|
+
import { formatValueByType as Y } from "../CommonUtils.es.js";
|
|
11
|
+
import { ThemedSVGImage as q } from "./chartblocks/ThemedSVGImage.es.js";
|
|
12
|
+
import { asLogoRef as J, asNonEmptyText as L, asNumber as I } from "../blocks/slotReaders.es.js";
|
|
13
|
+
import { postCtaMessage as Q } from "../ctaActions/runCtaAction.es.js";
|
|
14
|
+
import u from "./LogoFromGuid.es.js";
|
|
15
|
+
import { createVariantBlock as tt } from "../blocks/createVariantBlock.es.js";
|
|
16
|
+
import { ActionBlockLayer as rt } from "../actionBlocks/ActionBlockLayer.es.js";
|
|
17
|
+
import D from "./BadgedTile.es.js";
|
|
18
|
+
import { InsightOptionsMenu as et } from "./InsightOptionsMenu.es.js";
|
|
19
|
+
import { ReactComponent as it } from "./shared/images/FeeDetected.es.js";
|
|
20
|
+
import V from "./StatusBadge.es.js";
|
|
21
|
+
import C from "@mui/material/Stack";
|
|
22
|
+
import { P as ot, Text as A } from "@mxenabled/mxui";
|
|
23
|
+
import at from "@mui/material/Button";
|
|
24
|
+
import { Icon as w } from "@mxenabled/mx-icons";
|
|
25
|
+
import { Fragment as nt, jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
26
|
+
import { useTheme as st } from "@mui/material/styles";
|
|
22
27
|
import n from "@mui/material/Box";
|
|
23
|
-
import
|
|
24
|
-
var
|
|
28
|
+
import lt from "@mui/material/Card";
|
|
29
|
+
var dt = 2, m = 44, E = 36, ct = 75, mt = 74, f = {
|
|
25
30
|
left: "50%",
|
|
26
31
|
position: "absolute",
|
|
27
32
|
top: "50%",
|
|
28
33
|
transform: "translate(-50%, -50%)"
|
|
29
|
-
},
|
|
34
|
+
}, pt = 54, gt = 75, S = ({ logo: r }) => r ? /* @__PURE__ */ t(u, {
|
|
30
35
|
logo: r,
|
|
31
|
-
size:
|
|
36
|
+
size: m
|
|
32
37
|
}) : /* @__PURE__ */ t(n, {
|
|
33
38
|
"data-testid": "compact-insight-card-fallback-icon",
|
|
34
39
|
sx: {
|
|
35
40
|
alignItems: "center",
|
|
36
41
|
bgcolor: "primary.lighter",
|
|
37
42
|
display: "flex",
|
|
38
|
-
height:
|
|
43
|
+
height: m,
|
|
39
44
|
justifyContent: "center",
|
|
40
|
-
width:
|
|
45
|
+
width: m
|
|
41
46
|
},
|
|
42
|
-
children: /* @__PURE__ */ t(
|
|
47
|
+
children: /* @__PURE__ */ t(w, {
|
|
43
48
|
color: "primary",
|
|
44
49
|
fill: !0,
|
|
45
50
|
name: "lightbulb",
|
|
46
51
|
size: 24
|
|
47
52
|
})
|
|
48
|
-
}),
|
|
49
|
-
center: /* @__PURE__ */ t(
|
|
50
|
-
size:
|
|
53
|
+
}), R = ({ logo: r }) => /* @__PURE__ */ t(D, {
|
|
54
|
+
center: /* @__PURE__ */ t(S, { logo: r }),
|
|
55
|
+
size: m,
|
|
51
56
|
sx: { flexShrink: 0 }
|
|
52
|
-
}),
|
|
53
|
-
center: /* @__PURE__ */ t(
|
|
54
|
-
size:
|
|
57
|
+
}), ht = ({ logo: r }) => /* @__PURE__ */ t(D, {
|
|
58
|
+
center: /* @__PURE__ */ t(S, { logo: r }),
|
|
59
|
+
size: m,
|
|
55
60
|
sx: { flexShrink: 0 },
|
|
56
|
-
topRight: /* @__PURE__ */ t(
|
|
57
|
-
}),
|
|
61
|
+
topRight: /* @__PURE__ */ t(V, { tone: "warning" })
|
|
62
|
+
}), ut = 24, ft = ({ logo: r }) => /* @__PURE__ */ t(D, {
|
|
58
63
|
bottomLeft: r ? /* @__PURE__ */ t(n, {
|
|
59
64
|
"aria-hidden": !0,
|
|
60
65
|
sx: {
|
|
@@ -64,30 +69,30 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
64
69
|
outlineColor: "background.paper",
|
|
65
70
|
overflow: "hidden"
|
|
66
71
|
},
|
|
67
|
-
children: /* @__PURE__ */ t(
|
|
72
|
+
children: /* @__PURE__ */ t(u, {
|
|
68
73
|
logo: {
|
|
69
74
|
...r,
|
|
70
75
|
alt: void 0
|
|
71
76
|
},
|
|
72
|
-
size:
|
|
77
|
+
size: ut
|
|
73
78
|
})
|
|
74
79
|
}) : void 0,
|
|
75
|
-
center: /* @__PURE__ */ t(
|
|
76
|
-
size:
|
|
80
|
+
center: /* @__PURE__ */ t(S, { logo: r }),
|
|
81
|
+
size: m,
|
|
77
82
|
sx: { flexShrink: 0 },
|
|
78
|
-
topRight: /* @__PURE__ */ t(
|
|
79
|
-
}),
|
|
83
|
+
topRight: /* @__PURE__ */ t(V, { tone: "error" })
|
|
84
|
+
}), xt = () => /* @__PURE__ */ t(q, {
|
|
80
85
|
divProps: { style: {
|
|
81
86
|
flexShrink: 0,
|
|
82
87
|
lineHeight: 0,
|
|
83
88
|
width: "max-content"
|
|
84
89
|
} },
|
|
85
|
-
image:
|
|
86
|
-
}),
|
|
90
|
+
image: it
|
|
91
|
+
}), k = 24, _t = () => /* @__PURE__ */ t(n, {
|
|
87
92
|
"aria-hidden": !0,
|
|
88
93
|
"data-testid": "linked-logos-badge",
|
|
89
94
|
sx: {
|
|
90
|
-
...
|
|
95
|
+
...f,
|
|
91
96
|
alignItems: "center",
|
|
92
97
|
bgcolor: "primary.main",
|
|
93
98
|
border: "2px solid",
|
|
@@ -98,50 +103,50 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
98
103
|
p: 2,
|
|
99
104
|
zIndex: 1
|
|
100
105
|
},
|
|
101
|
-
children: /* @__PURE__ */ t(
|
|
106
|
+
children: /* @__PURE__ */ t(w, {
|
|
102
107
|
name: "link",
|
|
103
108
|
size: 16,
|
|
104
109
|
sx: { color: "primary.contrastText" }
|
|
105
110
|
})
|
|
106
|
-
}),
|
|
111
|
+
}), vt = () => /* @__PURE__ */ t(n, {
|
|
107
112
|
"aria-hidden": !0,
|
|
108
113
|
"data-testid": "linked-logos-badge",
|
|
109
114
|
sx: {
|
|
110
|
-
...
|
|
115
|
+
...f,
|
|
111
116
|
alignItems: "center",
|
|
112
117
|
bgcolor: "primary.contrastText",
|
|
113
118
|
borderRadius: "50%",
|
|
114
119
|
display: "flex",
|
|
115
|
-
height:
|
|
120
|
+
height: k,
|
|
116
121
|
justifyContent: "center",
|
|
117
122
|
overflow: "hidden",
|
|
118
|
-
width:
|
|
123
|
+
width: k,
|
|
119
124
|
zIndex: 1
|
|
120
125
|
},
|
|
121
|
-
children: /* @__PURE__ */ t(
|
|
126
|
+
children: /* @__PURE__ */ t(w, {
|
|
122
127
|
name: "swap_vertical_circle",
|
|
123
|
-
size:
|
|
128
|
+
size: k * 1.2,
|
|
124
129
|
sx: {
|
|
125
130
|
color: "primary.main",
|
|
126
131
|
flexShrink: 0,
|
|
127
132
|
transform: "rotate(-90deg)"
|
|
128
133
|
}
|
|
129
134
|
})
|
|
130
|
-
}),
|
|
131
|
-
const { from_logo:
|
|
132
|
-
return /* @__PURE__ */
|
|
135
|
+
}), yt = ({ data: r, template: o }) => {
|
|
136
|
+
const { from_logo: e, to_logo: i } = r ?? {}, a = o === "SwitchDirectDeposit";
|
|
137
|
+
return /* @__PURE__ */ c(n, {
|
|
133
138
|
sx: {
|
|
134
139
|
flexShrink: 0,
|
|
135
|
-
height:
|
|
140
|
+
height: mt,
|
|
136
141
|
position: "relative",
|
|
137
|
-
width:
|
|
142
|
+
width: ct
|
|
138
143
|
},
|
|
139
144
|
children: [
|
|
140
145
|
/* @__PURE__ */ t(n, {
|
|
141
146
|
"aria-hidden": !0,
|
|
142
147
|
"data-testid": "linked-logos-ring",
|
|
143
148
|
sx: {
|
|
144
|
-
...
|
|
149
|
+
...f,
|
|
145
150
|
borderRadius: "50%",
|
|
146
151
|
height: 36,
|
|
147
152
|
width: 36,
|
|
@@ -155,7 +160,7 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
155
160
|
"aria-hidden": !0,
|
|
156
161
|
"data-testid": "linked-logos-ring",
|
|
157
162
|
sx: {
|
|
158
|
-
...
|
|
163
|
+
...f,
|
|
159
164
|
border: "1px solid",
|
|
160
165
|
borderColor: "divider",
|
|
161
166
|
borderRadius: "50%",
|
|
@@ -171,9 +176,9 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
171
176
|
position: "absolute",
|
|
172
177
|
top: 0
|
|
173
178
|
},
|
|
174
|
-
children: /* @__PURE__ */ t(
|
|
175
|
-
logo:
|
|
176
|
-
size:
|
|
179
|
+
children: /* @__PURE__ */ t(u, {
|
|
180
|
+
logo: e,
|
|
181
|
+
size: E
|
|
177
182
|
})
|
|
178
183
|
}),
|
|
179
184
|
/* @__PURE__ */ t(n, {
|
|
@@ -184,67 +189,88 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
184
189
|
position: "absolute",
|
|
185
190
|
right: 0
|
|
186
191
|
},
|
|
187
|
-
children: /* @__PURE__ */ t(
|
|
188
|
-
logo:
|
|
189
|
-
size:
|
|
192
|
+
children: /* @__PURE__ */ t(u, {
|
|
193
|
+
logo: i,
|
|
194
|
+
size: E
|
|
190
195
|
})
|
|
191
196
|
}),
|
|
192
|
-
a ? /* @__PURE__ */ t(
|
|
197
|
+
a ? /* @__PURE__ */ t(vt, {}) : /* @__PURE__ */ t(_t, {})
|
|
193
198
|
]
|
|
194
199
|
});
|
|
195
|
-
},
|
|
196
|
-
const
|
|
197
|
-
if (!
|
|
198
|
-
const
|
|
200
|
+
}, bt = ({ data: r }) => {
|
|
201
|
+
const o = Z(p(r, "series"));
|
|
202
|
+
if (!o.length) return null;
|
|
203
|
+
const e = p(r, "category_guid"), i = F(o, j).slice(-3);
|
|
199
204
|
return /* @__PURE__ */ t(n, {
|
|
200
205
|
"data-testid": "compact-insight-card-bar-chart",
|
|
201
206
|
sx: { flexShrink: 0 },
|
|
202
|
-
children: /* @__PURE__ */ t(
|
|
203
|
-
color: (a) =>
|
|
204
|
-
data:
|
|
205
|
-
height:
|
|
206
|
-
width:
|
|
207
|
+
children: /* @__PURE__ */ t(T, {
|
|
208
|
+
color: (a) => e ? K(e, a) : a.palette.primary.main,
|
|
209
|
+
data: i,
|
|
210
|
+
height: pt,
|
|
211
|
+
width: gt
|
|
207
212
|
})
|
|
208
213
|
});
|
|
209
|
-
},
|
|
210
|
-
const i =
|
|
211
|
-
if (
|
|
212
|
-
const
|
|
214
|
+
}, Ct = ({ data: r }) => {
|
|
215
|
+
const o = st(), e = p(r, "main"), i = p(r, "legends"), a = I(e?.value), g = (Array.isArray(i) ? i : []).map((s) => I(s?.value));
|
|
216
|
+
if (a === void 0 || g.length !== 2 || g.some((s) => s === void 0)) return null;
|
|
217
|
+
const { colors: x, arcs: _ } = U($.CreditLimit, {}, g.map((s) => ({ value: s })), o), h = typeof e?.value_type == "string" ? e.value_type : "amount";
|
|
218
|
+
return /* @__PURE__ */ t(n, {
|
|
219
|
+
"data-testid": "compact-insight-card-donut",
|
|
220
|
+
sx: { flexShrink: 0 },
|
|
221
|
+
children: /* @__PURE__ */ t(X, {
|
|
222
|
+
centerLabel: L(e?.label),
|
|
223
|
+
centerValue: Y(a, h, B.whole),
|
|
224
|
+
data: _.map((s, v) => ({
|
|
225
|
+
color: x[v],
|
|
226
|
+
value: s
|
|
227
|
+
}))
|
|
228
|
+
})
|
|
229
|
+
});
|
|
230
|
+
}, kt = 75, It = 50, Dt = (r) => {
|
|
231
|
+
const o = L(r?.primary_text), e = I(r?.amount);
|
|
232
|
+
if (o === void 0 || e === void 0) return;
|
|
233
|
+
const i = M(e, B.cents);
|
|
213
234
|
return {
|
|
214
|
-
ariaLabel: `${
|
|
215
|
-
formattedAmount:
|
|
216
|
-
label:
|
|
217
|
-
value:
|
|
235
|
+
ariaLabel: `${o}: ${i}`,
|
|
236
|
+
formattedAmount: i,
|
|
237
|
+
label: o,
|
|
238
|
+
value: e
|
|
218
239
|
};
|
|
219
|
-
},
|
|
220
|
-
const
|
|
221
|
-
return !
|
|
240
|
+
}, wt = ({ data: r }) => {
|
|
241
|
+
const o = p(r, "compact_series"), [e, i] = (Array.isArray(o) ? o.slice(0, 2) : []).map(Dt);
|
|
242
|
+
return !e || !i || e.label === i.label ? null : /* @__PURE__ */ t(n, {
|
|
222
243
|
"data-testid": "compact-insight-card-comparison",
|
|
223
244
|
sx: { flexShrink: 0 },
|
|
224
|
-
children: /* @__PURE__ */ t(
|
|
245
|
+
children: /* @__PURE__ */ t(T, {
|
|
225
246
|
color: (a) => a.palette.warning.main,
|
|
226
|
-
data: [
|
|
227
|
-
height:
|
|
228
|
-
width:
|
|
247
|
+
data: [e, i],
|
|
248
|
+
height: It,
|
|
249
|
+
width: kt
|
|
229
250
|
})
|
|
230
251
|
});
|
|
231
|
-
},
|
|
252
|
+
}, St = tt({
|
|
232
253
|
variants: {
|
|
233
|
-
category_color:
|
|
234
|
-
compact_comparison:
|
|
235
|
-
linked_logos:
|
|
236
|
-
minimal:
|
|
237
|
-
stacked_logos:
|
|
238
|
-
|
|
239
|
-
|
|
254
|
+
category_color: bt,
|
|
255
|
+
compact_comparison: wt,
|
|
256
|
+
linked_logos: yt,
|
|
257
|
+
minimal: R,
|
|
258
|
+
stacked_logos: ft,
|
|
259
|
+
with_donut: Ct,
|
|
260
|
+
with_illustration: xt,
|
|
261
|
+
with_warning_badge: ht
|
|
240
262
|
},
|
|
241
|
-
fallback:
|
|
263
|
+
fallback: R,
|
|
242
264
|
name: "InsightVisual"
|
|
243
|
-
}),
|
|
265
|
+
}), At = {
|
|
244
266
|
BillAmountNotStandard: {
|
|
245
267
|
key: "in_description_cta",
|
|
246
268
|
trigger: "inDescriptionCta"
|
|
247
269
|
},
|
|
270
|
+
CreditCardCloseToLimit: {
|
|
271
|
+
key: "in_description_cta",
|
|
272
|
+
trigger: "inDescriptionCta"
|
|
273
|
+
},
|
|
248
274
|
ConnectDiscoveredAccountsV2: {
|
|
249
275
|
key: "in_description_cta",
|
|
250
276
|
trigger: "inDescriptionCta"
|
|
@@ -254,35 +280,35 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
254
280
|
trigger: "inDescriptionCta"
|
|
255
281
|
},
|
|
256
282
|
SwitchDirectDeposit: { key: "in_description_cta" }
|
|
257
|
-
},
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
260
|
-
if (
|
|
261
|
-
if (r &&
|
|
283
|
+
}, Et = (r) => r.stopPropagation(), ar = ({ beat: r, isCtaDisabled: o = !1, onCtaClick: e, onTap: i, payload: a }) => {
|
|
284
|
+
const g = P(), { openActionDrawer: x } = W(), { description: _, instance_slot: h, primary_cta: s, title: v } = a, l = At[a.template ?? ""], y = l ? a[l.key] : s, b = a.in_description_cta?.post_message_metadata, O = !l || !!l.trigger || !!r && !!b, N = J(p(h.data, "logo")), z = (d) => {
|
|
285
|
+
if (d.stopPropagation(), !(o || !y)) {
|
|
286
|
+
if (l) {
|
|
287
|
+
if (r && l.trigger) x({
|
|
262
288
|
guid: r.guid,
|
|
263
|
-
trigger:
|
|
289
|
+
trigger: l.trigger
|
|
264
290
|
});
|
|
265
|
-
else if (r &&
|
|
266
|
-
const { action:
|
|
267
|
-
|
|
291
|
+
else if (r && b) {
|
|
292
|
+
const { action: H, ...G } = b;
|
|
293
|
+
Q({
|
|
268
294
|
beat: r,
|
|
269
|
-
stores:
|
|
295
|
+
stores: g
|
|
270
296
|
}, {
|
|
271
|
-
action:
|
|
272
|
-
payload:
|
|
297
|
+
action: H,
|
|
298
|
+
payload: G
|
|
273
299
|
});
|
|
274
300
|
}
|
|
275
301
|
return;
|
|
276
302
|
}
|
|
277
|
-
|
|
303
|
+
s && e?.(s);
|
|
278
304
|
}
|
|
279
305
|
};
|
|
280
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ c(nt, { children: [/* @__PURE__ */ c(lt, {
|
|
281
307
|
"data-testid": "compact-insight-card",
|
|
282
|
-
...
|
|
283
|
-
onClick:
|
|
284
|
-
onKeyDown: (
|
|
285
|
-
|
|
308
|
+
...i ? {
|
|
309
|
+
onClick: i,
|
|
310
|
+
onKeyDown: (d) => {
|
|
311
|
+
d.target === d.currentTarget && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), i?.());
|
|
286
312
|
},
|
|
287
313
|
role: "button",
|
|
288
314
|
tabIndex: 0
|
|
@@ -293,9 +319,9 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
293
319
|
pl: 8,
|
|
294
320
|
pr: 16,
|
|
295
321
|
pt: 8,
|
|
296
|
-
...
|
|
322
|
+
...i && { cursor: "pointer" }
|
|
297
323
|
},
|
|
298
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ c(C, {
|
|
299
325
|
sx: {
|
|
300
326
|
alignItems: "center",
|
|
301
327
|
flexDirection: "row",
|
|
@@ -304,23 +330,23 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
304
330
|
pl: 8,
|
|
305
331
|
pt: 4
|
|
306
332
|
},
|
|
307
|
-
children: [/* @__PURE__ */ t(
|
|
333
|
+
children: [/* @__PURE__ */ t(A, {
|
|
308
334
|
bold: !0,
|
|
309
335
|
variant: "body1",
|
|
310
|
-
children:
|
|
336
|
+
children: v ?? ""
|
|
311
337
|
}), /* @__PURE__ */ t(n, {
|
|
312
|
-
onClick:
|
|
338
|
+
onClick: Et,
|
|
313
339
|
sx: { display: "flex" },
|
|
314
|
-
children: /* @__PURE__ */ t(
|
|
340
|
+
children: /* @__PURE__ */ t(et, {})
|
|
315
341
|
})]
|
|
316
|
-
}), /* @__PURE__ */
|
|
342
|
+
}), /* @__PURE__ */ c(C, {
|
|
317
343
|
sx: {
|
|
318
344
|
alignItems: "center",
|
|
319
345
|
flexDirection: "row",
|
|
320
346
|
gap: 16,
|
|
321
347
|
pl: 8
|
|
322
348
|
},
|
|
323
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ c(C, {
|
|
324
350
|
sx: {
|
|
325
351
|
alignSelf: "stretch",
|
|
326
352
|
flex: 1,
|
|
@@ -328,8 +354,8 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
328
354
|
minWidth: 0,
|
|
329
355
|
pt: 2
|
|
330
356
|
},
|
|
331
|
-
children: [/* @__PURE__ */ t(
|
|
332
|
-
dangerouslySetInnerHTML: { __html:
|
|
357
|
+
children: [/* @__PURE__ */ t(ot, {
|
|
358
|
+
dangerouslySetInnerHTML: { __html: _.html_text },
|
|
333
359
|
"data-testid": "compact-insight-card-description",
|
|
334
360
|
sx: {
|
|
335
361
|
display: "-webkit-box",
|
|
@@ -337,41 +363,41 @@ var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
|
|
|
337
363
|
overflow: "hidden",
|
|
338
364
|
textOverflow: "ellipsis",
|
|
339
365
|
WebkitBoxOrient: "vertical",
|
|
340
|
-
WebkitLineClamp:
|
|
366
|
+
WebkitLineClamp: dt
|
|
341
367
|
},
|
|
342
368
|
variant: "subtitle2"
|
|
343
|
-
}),
|
|
344
|
-
"aria-disabled":
|
|
345
|
-
onClick:
|
|
369
|
+
}), y?.label && O && /* @__PURE__ */ t(at, {
|
|
370
|
+
"aria-disabled": o,
|
|
371
|
+
onClick: z,
|
|
346
372
|
size: "small",
|
|
347
373
|
sx: {
|
|
348
374
|
alignSelf: "flex-start",
|
|
349
375
|
ml: -8,
|
|
350
376
|
my: 0,
|
|
351
377
|
px: 8,
|
|
352
|
-
...
|
|
378
|
+
...o && {
|
|
353
379
|
color: "text.disabled",
|
|
354
380
|
cursor: "default"
|
|
355
381
|
}
|
|
356
382
|
},
|
|
357
383
|
variant: "text",
|
|
358
|
-
children: /* @__PURE__ */ t(
|
|
384
|
+
children: /* @__PURE__ */ t(A, {
|
|
359
385
|
bold: !0,
|
|
360
386
|
variant: "body2",
|
|
361
|
-
children:
|
|
387
|
+
children: y.label
|
|
362
388
|
})
|
|
363
389
|
})]
|
|
364
|
-
}), /* @__PURE__ */ t(
|
|
390
|
+
}), /* @__PURE__ */ t(St, {
|
|
365
391
|
data: h.data,
|
|
366
|
-
logo:
|
|
392
|
+
logo: N,
|
|
367
393
|
template: a.template,
|
|
368
394
|
variant: h.variant
|
|
369
395
|
})]
|
|
370
396
|
})]
|
|
371
|
-
}), r && /* @__PURE__ */ t(
|
|
397
|
+
}), r && /* @__PURE__ */ t(rt, { beat: r })] });
|
|
372
398
|
};
|
|
373
399
|
export {
|
|
374
|
-
|
|
400
|
+
ar as default
|
|
375
401
|
};
|
|
376
402
|
|
|
377
403
|
//# sourceMappingURL=CompactInsightCard.es.js.map
|