@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.
Files changed (81) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/common/components/CurrencyDialog.d.ts +11 -1
  3. package/dist/common/components/CurrencyDialog.es.js +50 -44
  4. package/dist/common/components/CurrencyDialog.es.js.map +1 -1
  5. package/dist/common/components/ErrorBoundary.d.ts +1 -0
  6. package/dist/common/components/ErrorBoundary.es.js +1 -1
  7. package/dist/common/components/ErrorBoundary.es.js.map +1 -1
  8. package/dist/common/components/index.d.ts +1 -1
  9. package/dist/core/types/localization/InsightsFeedCopy.d.ts +8 -0
  10. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +2 -0
  11. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +39 -39
  12. package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
  13. package/dist/insights-v2/actionBlocks/AccountListBlock/index.d.ts +1 -1
  14. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +40 -35
  15. package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
  16. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.d.ts +1 -1
  17. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +91 -91
  18. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js.map +1 -1
  19. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.d.ts +42 -2
  20. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js +75 -15
  21. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js.map +1 -1
  22. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.d.ts +2 -0
  23. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +73 -74
  24. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
  25. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/index.d.ts +1 -1
  26. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +2 -0
  27. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +20 -21
  28. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -1
  29. package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/index.d.ts +1 -1
  30. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.d.ts +2 -0
  31. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +36 -38
  32. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
  33. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/index.d.ts +1 -1
  34. package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.d.ts +2 -0
  35. package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js +29 -30
  36. package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js.map +1 -1
  37. package/dist/insights-v2/actionBlocks/OverdraftBlock/index.d.ts +1 -1
  38. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.d.ts +2 -0
  39. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +60 -59
  40. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
  41. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/index.d.ts +1 -1
  42. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +2 -0
  43. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +20 -20
  44. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
  45. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/index.d.ts +1 -1
  46. package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
  47. package/dist/insights-v2/actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js +3 -3
  48. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.d.ts +2 -0
  49. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +36 -36
  50. package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
  51. package/dist/insights-v2/actionBlocks/RemainingCashBlock/index.d.ts +1 -1
  52. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.d.ts +2 -1
  53. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +77 -76
  54. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  55. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +64 -59
  56. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
  57. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.d.ts +11 -0
  58. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.es.js +138 -0
  59. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.es.js.map +1 -0
  60. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +13 -0
  61. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +80 -63
  62. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
  63. package/dist/insights-v2/actionBlocks/useRequiredCopy.d.ts +3 -0
  64. package/dist/insights-v2/actionBlocks/useRequiredCopy.es.js +11 -0
  65. package/dist/insights-v2/actionBlocks/useRequiredCopy.es.js.map +1 -0
  66. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +14 -14
  67. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
  68. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +9 -2
  69. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +14 -7
  70. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
  71. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +7 -1
  72. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js +14 -7
  73. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
  74. package/dist/insights-v2/blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js +1 -1
  75. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +4 -4
  76. package/dist/insights-v2/components/CompactInsightCard.es.js +164 -138
  77. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  78. package/dist/insights-v2/mappings/blocks.d.ts +1 -0
  79. package/dist/insights-v2/mappings/blocks.es.js +190 -178
  80. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  81. package/package.json +1 -1
@@ -1,60 +1,65 @@
1
- import { useGlobalStore as z, useInsightsV2Store as H } from "../../common/context/hooks.es.js";
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 G, formatCurrency as P } from "../../core/utils/NumberFormatting.es.js";
4
- import { getCategoryColor as W } from "../../core/utils/CategoryUtil.es.js";
5
- import { TinyBarChart as S } from "../../common/components/TinyBarChart.es.js";
6
- import { BAR_ARIA_LABEL as M, buildChartData as K, buildDataSeries as j } from "../blocks/ChartBlocks/BarchartBlock/utils.es.js";
7
- import { ThemedSVGImage as F } from "./chartblocks/ThemedSVGImage.es.js";
8
- import { asLogoRef as Z, asNonEmptyText as X, asNumber as $ } from "../blocks/slotReaders.es.js";
9
- import { postCtaMessage as U } from "../ctaActions/runCtaAction.es.js";
10
- import m from "./LogoFromGuid.es.js";
11
- import { createVariantBlock as Y } from "../blocks/createVariantBlock.es.js";
12
- import { ActionBlockLayer as q } from "../actionBlocks/ActionBlockLayer.es.js";
13
- import v from "./BadgedTile.es.js";
14
- import { InsightOptionsMenu as J } from "./InsightOptionsMenu.es.js";
15
- import { ReactComponent as Q } from "./shared/images/FeeDetected.es.js";
16
- import D from "./StatusBadge.es.js";
17
- import _ from "@mui/material/Stack";
18
- import { P as tt, Text as k } from "@mxenabled/mxui";
19
- import rt from "@mui/material/Button";
20
- import { Icon as y } from "@mxenabled/mx-icons";
21
- import { Fragment as it, jsx as t, jsxs as d } from "react/jsx-runtime";
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 et from "@mui/material/Card";
24
- var ot = 2, c = 44, I = 36, at = 75, nt = 74, g = {
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
- }, st = 54, lt = 75, C = ({ logo: r }) => r ? /* @__PURE__ */ t(m, {
34
+ }, pt = 54, gt = 75, S = ({ logo: r }) => r ? /* @__PURE__ */ t(u, {
30
35
  logo: r,
31
- size: c
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: c,
43
+ height: m,
39
44
  justifyContent: "center",
40
- width: c
45
+ width: m
41
46
  },
42
- children: /* @__PURE__ */ t(y, {
47
+ children: /* @__PURE__ */ t(w, {
43
48
  color: "primary",
44
49
  fill: !0,
45
50
  name: "lightbulb",
46
51
  size: 24
47
52
  })
48
- }), w = ({ logo: r }) => /* @__PURE__ */ t(v, {
49
- center: /* @__PURE__ */ t(C, { logo: r }),
50
- size: c,
53
+ }), R = ({ logo: r }) => /* @__PURE__ */ t(D, {
54
+ center: /* @__PURE__ */ t(S, { logo: r }),
55
+ size: m,
51
56
  sx: { flexShrink: 0 }
52
- }), dt = ({ logo: r }) => /* @__PURE__ */ t(v, {
53
- center: /* @__PURE__ */ t(C, { logo: r }),
54
- size: c,
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(D, { tone: "warning" })
57
- }), ct = 24, pt = ({ logo: r }) => /* @__PURE__ */ t(v, {
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(m, {
72
+ children: /* @__PURE__ */ t(u, {
68
73
  logo: {
69
74
  ...r,
70
75
  alt: void 0
71
76
  },
72
- size: ct
77
+ size: ut
73
78
  })
74
79
  }) : void 0,
75
- center: /* @__PURE__ */ t(C, { logo: r }),
76
- size: c,
80
+ center: /* @__PURE__ */ t(S, { logo: r }),
81
+ size: m,
77
82
  sx: { flexShrink: 0 },
78
- topRight: /* @__PURE__ */ t(D, { tone: "error" })
79
- }), mt = () => /* @__PURE__ */ t(F, {
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: Q
86
- }), b = 24, gt = () => /* @__PURE__ */ t(n, {
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
- ...g,
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(y, {
106
+ children: /* @__PURE__ */ t(w, {
102
107
  name: "link",
103
108
  size: 16,
104
109
  sx: { color: "primary.contrastText" }
105
110
  })
106
- }), ht = () => /* @__PURE__ */ t(n, {
111
+ }), vt = () => /* @__PURE__ */ t(n, {
107
112
  "aria-hidden": !0,
108
113
  "data-testid": "linked-logos-badge",
109
114
  sx: {
110
- ...g,
115
+ ...f,
111
116
  alignItems: "center",
112
117
  bgcolor: "primary.contrastText",
113
118
  borderRadius: "50%",
114
119
  display: "flex",
115
- height: b,
120
+ height: k,
116
121
  justifyContent: "center",
117
122
  overflow: "hidden",
118
- width: b,
123
+ width: k,
119
124
  zIndex: 1
120
125
  },
121
- children: /* @__PURE__ */ t(y, {
126
+ children: /* @__PURE__ */ t(w, {
122
127
  name: "swap_vertical_circle",
123
- size: b * 1.2,
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
- }), ut = ({ data: r, template: i }) => {
131
- const { from_logo: o, to_logo: e } = r ?? {}, a = i === "SwitchDirectDeposit";
132
- return /* @__PURE__ */ d(n, {
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: nt,
140
+ height: mt,
136
141
  position: "relative",
137
- width: at
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
- ...g,
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
- ...g,
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(m, {
175
- logo: o,
176
- size: I
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(m, {
188
- logo: e,
189
- size: I
192
+ children: /* @__PURE__ */ t(u, {
193
+ logo: i,
194
+ size: E
190
195
  })
191
196
  }),
192
- a ? /* @__PURE__ */ t(ht, {}) : /* @__PURE__ */ t(gt, {})
197
+ a ? /* @__PURE__ */ t(vt, {}) : /* @__PURE__ */ t(_t, {})
193
198
  ]
194
199
  });
195
- }, ft = ({ data: r }) => {
196
- const i = j(p(r, "series"));
197
- if (!i.length) return null;
198
- const o = p(r, "category_guid"), e = K(i, M).slice(-3);
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(S, {
203
- color: (a) => o ? W(o, a) : a.palette.primary.main,
204
- data: e,
205
- height: st,
206
- width: lt
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
- }, xt = 75, _t = 50, bt = (r) => {
210
- const i = X(r?.primary_text), o = $(r?.amount);
211
- if (i === void 0 || o === void 0) return;
212
- const e = P(o, G.cents);
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: `${i}: ${e}`,
215
- formattedAmount: e,
216
- label: i,
217
- value: o
235
+ ariaLabel: `${o}: ${i}`,
236
+ formattedAmount: i,
237
+ label: o,
238
+ value: e
218
239
  };
219
- }, vt = ({ data: r }) => {
220
- const i = p(r, "compact_series"), [o, e] = (Array.isArray(i) ? i.slice(0, 2) : []).map(bt);
221
- return !o || !e || o.label === e.label ? null : /* @__PURE__ */ t(n, {
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(S, {
245
+ children: /* @__PURE__ */ t(T, {
225
246
  color: (a) => a.palette.warning.main,
226
- data: [o, e],
227
- height: _t,
228
- width: xt
247
+ data: [e, i],
248
+ height: It,
249
+ width: kt
229
250
  })
230
251
  });
231
- }, yt = Y({
252
+ }, St = tt({
232
253
  variants: {
233
- category_color: ft,
234
- compact_comparison: vt,
235
- linked_logos: ut,
236
- minimal: w,
237
- stacked_logos: pt,
238
- with_illustration: mt,
239
- with_warning_badge: dt
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: w,
263
+ fallback: R,
242
264
  name: "InsightVisual"
243
- }), Ct = {
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
- }, kt = (r) => r.stopPropagation(), $t = ({ beat: r, isCtaDisabled: i = !1, onCtaClick: o, onTap: e, payload: a }) => {
258
- const E = z(), { openActionDrawer: R } = H(), { description: A, instance_slot: h, primary_cta: u, title: B } = a, s = Ct[a.template ?? ""], f = s ? a[s.key] : u, x = a.in_description_cta?.post_message_metadata, L = !s || !!s.trigger || !!r && !!x, T = Z(p(h.data, "logo")), O = (l) => {
259
- if (l.stopPropagation(), !(i || !f)) {
260
- if (s) {
261
- if (r && s.trigger) 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: s.trigger
289
+ trigger: l.trigger
264
290
  });
265
- else if (r && x) {
266
- const { action: N, ...V } = x;
267
- U({
291
+ else if (r && b) {
292
+ const { action: H, ...G } = b;
293
+ Q({
268
294
  beat: r,
269
- stores: E
295
+ stores: g
270
296
  }, {
271
- action: N,
272
- payload: V
297
+ action: H,
298
+ payload: G
273
299
  });
274
300
  }
275
301
  return;
276
302
  }
277
- u && o?.(u);
303
+ s && e?.(s);
278
304
  }
279
305
  };
280
- return /* @__PURE__ */ d(it, { children: [/* @__PURE__ */ d(et, {
306
+ return /* @__PURE__ */ c(nt, { children: [/* @__PURE__ */ c(lt, {
281
307
  "data-testid": "compact-insight-card",
282
- ...e ? {
283
- onClick: e,
284
- onKeyDown: (l) => {
285
- l.target === l.currentTarget && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), e?.());
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
- ...e && { cursor: "pointer" }
322
+ ...i && { cursor: "pointer" }
297
323
  },
298
- children: [/* @__PURE__ */ d(_, {
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(k, {
333
+ children: [/* @__PURE__ */ t(A, {
308
334
  bold: !0,
309
335
  variant: "body1",
310
- children: B ?? ""
336
+ children: v ?? ""
311
337
  }), /* @__PURE__ */ t(n, {
312
- onClick: kt,
338
+ onClick: Et,
313
339
  sx: { display: "flex" },
314
- children: /* @__PURE__ */ t(J, {})
340
+ children: /* @__PURE__ */ t(et, {})
315
341
  })]
316
- }), /* @__PURE__ */ d(_, {
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__ */ d(_, {
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(tt, {
332
- dangerouslySetInnerHTML: { __html: A.html_text },
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: ot
366
+ WebkitLineClamp: dt
341
367
  },
342
368
  variant: "subtitle2"
343
- }), f?.label && L && /* @__PURE__ */ t(rt, {
344
- "aria-disabled": i,
345
- onClick: O,
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
- ...i && {
378
+ ...o && {
353
379
  color: "text.disabled",
354
380
  cursor: "default"
355
381
  }
356
382
  },
357
383
  variant: "text",
358
- children: /* @__PURE__ */ t(k, {
384
+ children: /* @__PURE__ */ t(A, {
359
385
  bold: !0,
360
386
  variant: "body2",
361
- children: f.label
387
+ children: y.label
362
388
  })
363
389
  })]
364
- }), /* @__PURE__ */ t(yt, {
390
+ }), /* @__PURE__ */ t(St, {
365
391
  data: h.data,
366
- logo: T,
392
+ logo: N,
367
393
  template: a.template,
368
394
  variant: h.variant
369
395
  })]
370
396
  })]
371
- }), r && /* @__PURE__ */ t(q, { beat: r })] });
397
+ }), r && /* @__PURE__ */ t(rt, { beat: r })] });
372
398
  };
373
399
  export {
374
- $t as default
400
+ ar as default
375
401
  };
376
402
 
377
403
  //# sourceMappingURL=CompactInsightCard.es.js.map