@mx-cartographer/insights-ui 1.8.13-aplha.JB5 → 1.8.13-aplha.JB6
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/dist/index.es.js +40 -40
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as d, Fragment as b } from "react/jsx-runtime";
|
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import J, { useState as X, useRef as z, useLayoutEffect as ne, useMemo as N, useCallback as me, useEffect as oe, forwardRef as R } from "react";
|
|
4
4
|
import Ee from "@mui/material/Dialog";
|
|
5
|
-
import { BottomSheetTransition as pe, Icon as C, P as k, Text as M, InstitutionLogo as Y, H3 as ae, createMXTheme as
|
|
5
|
+
import { BottomSheetTransition as pe, Icon as C, P as k, Text as M, InstitutionLogo as Y, H3 as ae, createMXTheme as ue, MerchantLogo as ye, CategoryIcon as ke, CheckmarkFilledIcon as fe } from "@kyper/mui";
|
|
6
6
|
import Ce from "react-confetti";
|
|
7
7
|
import p from "@mui/material/Box";
|
|
8
8
|
import w from "@mui/material/Card";
|
|
@@ -256,8 +256,8 @@ const Ue = ({
|
|
|
256
256
|
height: s
|
|
257
257
|
}) => {
|
|
258
258
|
const [h, c] = J.useState(null), m = () => {
|
|
259
|
-
const E = document.getElementsByClassName("mx-mini-insight-card")[0].clientHeight,
|
|
260
|
-
c(Math.floor(
|
|
259
|
+
const E = document.getElementsByClassName("mx-mini-insight-card")[0].clientHeight, u = document.getElementsByClassName("mx-mini-insight-card-header")[0].clientHeight + document.getElementsByClassName("mx-mini-insight-card-content-body")[0].clientHeight, y = E - u - 24;
|
|
260
|
+
c(Math.floor(y / 20));
|
|
261
261
|
};
|
|
262
262
|
return J.useEffect(() => (m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m)), []), /* @__PURE__ */ e(
|
|
263
263
|
w,
|
|
@@ -326,8 +326,8 @@ const Ue = ({
|
|
|
326
326
|
tabIndex: a = 0,
|
|
327
327
|
...s
|
|
328
328
|
}) => {
|
|
329
|
-
const [h, c] = X(null), m = () => c(null), E = (
|
|
330
|
-
m(), o(
|
|
329
|
+
const [h, c] = X(null), m = () => c(null), E = (y, S) => {
|
|
330
|
+
m(), o(y, S);
|
|
331
331
|
};
|
|
332
332
|
return /* @__PURE__ */ d(b, { children: [
|
|
333
333
|
/* @__PURE__ */ e(
|
|
@@ -335,8 +335,8 @@ const Ue = ({
|
|
|
335
335
|
{
|
|
336
336
|
"aria-hidden": i,
|
|
337
337
|
"aria-label": l,
|
|
338
|
-
onClick: (
|
|
339
|
-
c(
|
|
338
|
+
onClick: (y) => {
|
|
339
|
+
c(y.currentTarget), n();
|
|
340
340
|
},
|
|
341
341
|
sx: { position: "relative !important", bottom: 6 },
|
|
342
342
|
tabIndex: a,
|
|
@@ -364,8 +364,8 @@ const Ue = ({
|
|
|
364
364
|
onClose: m,
|
|
365
365
|
open: !!h,
|
|
366
366
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
367
|
-
children: r.map(({ icon:
|
|
368
|
-
/* @__PURE__ */ e(T, { sx: { minWidth: "32px !important" }, children:
|
|
367
|
+
children: r.map(({ icon: y, key: S, text: v }, g) => /* @__PURE__ */ d(Me, { onClick: () => E(g, S), sx: { padding: 12 }, children: [
|
|
368
|
+
/* @__PURE__ */ e(T, { sx: { minWidth: "32px !important" }, children: y }),
|
|
369
369
|
/* @__PURE__ */ e(
|
|
370
370
|
D,
|
|
371
371
|
{
|
|
@@ -456,21 +456,21 @@ const Ue = ({
|
|
|
456
456
|
width: n.width
|
|
457
457
|
});
|
|
458
458
|
ne(() => {
|
|
459
|
-
const
|
|
459
|
+
const u = new ResizeObserver(() => {
|
|
460
460
|
window.requestAnimationFrame(() => {
|
|
461
461
|
if (h.current) {
|
|
462
|
-
const { width:
|
|
462
|
+
const { width: y, height: S } = h.current.getBoundingClientRect();
|
|
463
463
|
if (S === 0) {
|
|
464
464
|
const x = h.current;
|
|
465
465
|
x.style.height = "1px", x.style.transform = `translate3d(${n.x?.get()}px, ${Number(n.y?.get()) - 1}px, 0px)`;
|
|
466
466
|
}
|
|
467
|
-
const v =
|
|
467
|
+
const v = y / 2, g = h.current.querySelector("text");
|
|
468
468
|
g && g.setAttribute("transform", `translate(${v}, -8)`);
|
|
469
469
|
}
|
|
470
470
|
});
|
|
471
471
|
});
|
|
472
|
-
return h.current &&
|
|
473
|
-
h.current &&
|
|
472
|
+
return h.current && u.observe(h.current), () => {
|
|
473
|
+
h.current && u.unobserve(h.current);
|
|
474
474
|
};
|
|
475
475
|
}, []);
|
|
476
476
|
const { ariaLabel: m, formattedAmount: E } = l[r];
|
|
@@ -515,7 +515,7 @@ const Ue = ({
|
|
|
515
515
|
selectedTabIndex: h,
|
|
516
516
|
onBarClick: c
|
|
517
517
|
}) => {
|
|
518
|
-
const m = Z(), { containerRef: E, height:
|
|
518
|
+
const m = Z(), { containerRef: E, height: u, width: y } = He(), S = N(() => {
|
|
519
519
|
const x = `${l}80`;
|
|
520
520
|
return h === void 0 ? [...new Array(r.length - 1).fill(x), l] : r.map((A, V) => V === h ? l : x);
|
|
521
521
|
}, [l, r, h]), v = me(
|
|
@@ -543,10 +543,10 @@ const Ue = ({
|
|
|
543
543
|
/* @__PURE__ */ e(p, { ref: E, sx: { height: o ? 120 : 172, width: "100%", mb: 8 }, children: /* @__PURE__ */ d(
|
|
544
544
|
we,
|
|
545
545
|
{
|
|
546
|
-
height:
|
|
546
|
+
height: u,
|
|
547
547
|
margin: n,
|
|
548
548
|
series: g.series,
|
|
549
|
-
width:
|
|
549
|
+
width: y,
|
|
550
550
|
xAxis: g.xAxis,
|
|
551
551
|
children: [
|
|
552
552
|
i?.average && /* @__PURE__ */ e(
|
|
@@ -668,7 +668,7 @@ const Ue = ({
|
|
|
668
668
|
rightLowerText: h,
|
|
669
669
|
rightUpperText: c
|
|
670
670
|
}) => {
|
|
671
|
-
const m = a ? te : ie, E = z(null), { height:
|
|
671
|
+
const m = a ? te : ie, E = z(null), { height: u, width: y } = Q(E);
|
|
672
672
|
return /* @__PURE__ */ d(
|
|
673
673
|
p,
|
|
674
674
|
{
|
|
@@ -682,7 +682,7 @@ const Ue = ({
|
|
|
682
682
|
}),
|
|
683
683
|
width: "100%",
|
|
684
684
|
children: [
|
|
685
|
-
/* @__PURE__ */ e(P, { height:
|
|
685
|
+
/* @__PURE__ */ e(P, { height: u, shouldRun: l.shouldRun, width: y }),
|
|
686
686
|
/* @__PURE__ */ d(
|
|
687
687
|
w,
|
|
688
688
|
{
|
|
@@ -874,8 +874,8 @@ const Ue = ({
|
|
|
874
874
|
if (!n.current) return;
|
|
875
875
|
const s = n.current, h = s.querySelectorAll(".Overlay");
|
|
876
876
|
["brand100", "brand200", "brand300", "brand400", "brand500"].forEach((m) => {
|
|
877
|
-
const E = s.querySelectorAll(`.${m}`),
|
|
878
|
-
le(E, a[
|
|
877
|
+
const E = s.querySelectorAll(`.${m}`), u = m.replace("brand", "");
|
|
878
|
+
le(E, a[u]);
|
|
879
879
|
}), le(h, a[300]);
|
|
880
880
|
}, [a]), /* @__PURE__ */ e(
|
|
881
881
|
"div",
|
|
@@ -955,10 +955,10 @@ const Ue = ({
|
|
|
955
955
|
console.log("parentChildren"), console.log(m);
|
|
956
956
|
const E = m.reduce((v, g) => g !== s ? (console.log(g), console.log(g.clientHeight), v + g.clientHeight) : v, 0);
|
|
957
957
|
console.log("nonDescriptionChildrenHeight"), console.log(E);
|
|
958
|
-
const
|
|
958
|
+
const u = c - E, y = parseInt(
|
|
959
959
|
window.getComputedStyle(s).lineHeight,
|
|
960
960
|
10
|
|
961
|
-
), S = Math.floor(
|
|
961
|
+
), S = Math.floor(u / y);
|
|
962
962
|
S !== r && o(S);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
@@ -1038,9 +1038,9 @@ const Ue = ({
|
|
|
1038
1038
|
header: c,
|
|
1039
1039
|
isError: m = !1,
|
|
1040
1040
|
isLoading: E = !1,
|
|
1041
|
-
isMini:
|
|
1041
|
+
isMini: u = !1
|
|
1042
1042
|
}) => /* @__PURE__ */ d(b, { children: [
|
|
1043
|
-
/* @__PURE__ */ e(ht, { ...c, isMini:
|
|
1043
|
+
/* @__PURE__ */ e(ht, { ...c, isMini: u, title: r.html_title }),
|
|
1044
1044
|
m ? /* @__PURE__ */ e(st, { erroredText: s }) : /* @__PURE__ */ d(b, { children: [
|
|
1045
1045
|
/* @__PURE__ */ e(
|
|
1046
1046
|
Et,
|
|
@@ -1050,11 +1050,11 @@ const Ue = ({
|
|
|
1050
1050
|
beat: r,
|
|
1051
1051
|
hasFooterButton: !!o,
|
|
1052
1052
|
isLoading: E,
|
|
1053
|
-
isMini:
|
|
1053
|
+
isMini: u,
|
|
1054
1054
|
children: E ? /* @__PURE__ */ e(dt, { altLoadingText: i }) : n
|
|
1055
1055
|
}
|
|
1056
1056
|
),
|
|
1057
|
-
!
|
|
1057
|
+
!u && o,
|
|
1058
1058
|
h
|
|
1059
1059
|
] })
|
|
1060
1060
|
] }), w1 = ({
|
|
@@ -1171,7 +1171,7 @@ const Ue = ({
|
|
|
1171
1171
|
},
|
|
1172
1172
|
children: l.dismissed_at ? o : r
|
|
1173
1173
|
}
|
|
1174
|
-
),
|
|
1174
|
+
), ut = (i, l) => /* @__PURE__ */ t.createElement("svg", { width: 295, height: 142, viewBox: "0 0 295 142", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: l, ...i }, /* @__PURE__ */ t.createElement("path", { d: "M0.5 4C0.5 2.067 2.067 0.5 4 0.5H291C292.933 0.5 294.5 2.067 294.5 4V39.5H0.5V4Z", stroke: "#EEF1F6" }), /* @__PURE__ */ t.createElement("path", { d: "M0.5 102.5H294.5V138C294.5 139.933 292.933 141.5 291 141.5H4.00001C2.06701 141.5 0.5 139.933 0.5 138V102.5Z", fill: "#F8F9FB", stroke: "#EEF1F6" }), /* @__PURE__ */ t.createElement("rect", { x: 0.5, y: 39.5, width: 294, height: 63, fill: "white", stroke: "#EEF1F6" }), /* @__PURE__ */ t.createElement("rect", { x: 16, y: 55, width: 32, height: 32, rx: 2, fill: "#EEF1F6" }), /* @__PURE__ */ t.createElement("rect", { x: 16, y: 15, width: 80, height: 8, rx: 2, fill: "#EEF1F6" }), /* @__PURE__ */ t.createElement("rect", { x: 16, y: 118, width: 80, height: 8, rx: 2, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 226, y: 118, width: 56, height: 8, rx: 2, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 64, y: 60, width: 80, height: 8, rx: 2, fill: "#EEF1F6" }), /* @__PURE__ */ t.createElement("rect", { x: 232, y: 60, width: 47, height: 8, rx: 2, fill: "#EEF1F6" }), /* @__PURE__ */ t.createElement("rect", { x: 64, y: 76, width: 60, height: 4, rx: 2, fill: "#EEF1F6" })), yt = R(ut), kt = {
|
|
1175
1175
|
padding: 8,
|
|
1176
1176
|
marginTop: 8,
|
|
1177
1177
|
marginBottom: 12
|
|
@@ -1182,7 +1182,7 @@ const Ue = ({
|
|
|
1182
1182
|
flexDirection: "row",
|
|
1183
1183
|
justifyContent: "center"
|
|
1184
1184
|
},
|
|
1185
|
-
children: /* @__PURE__ */ e(I, { divProps: { style: kt }, image:
|
|
1185
|
+
children: /* @__PURE__ */ e(I, { divProps: { style: kt }, image: yt })
|
|
1186
1186
|
}
|
|
1187
1187
|
), v1 = ({
|
|
1188
1188
|
headerText: i,
|
|
@@ -1360,8 +1360,8 @@ const Ue = ({
|
|
|
1360
1360
|
maxRows: 4,
|
|
1361
1361
|
minRows: 4,
|
|
1362
1362
|
name: "Feedback",
|
|
1363
|
-
onChange: (
|
|
1364
|
-
h(
|
|
1363
|
+
onChange: (u) => {
|
|
1364
|
+
h(u.target.value), c(u.target.value);
|
|
1365
1365
|
},
|
|
1366
1366
|
onClick: () => s(),
|
|
1367
1367
|
placeholder: o,
|
|
@@ -1734,7 +1734,7 @@ const R1 = ({
|
|
|
1734
1734
|
title: h,
|
|
1735
1735
|
totalSavedText: c
|
|
1736
1736
|
}) => {
|
|
1737
|
-
const m =
|
|
1737
|
+
const m = ue(r ? "dark" : "light");
|
|
1738
1738
|
return /* @__PURE__ */ e(Se, { theme: m, children: /* @__PURE__ */ e(p, { className: "mx-insights-mefr-body", "data-ui-test": "mefr-body", sx: { mb: 16 }, children: /* @__PURE__ */ d(Pe, { title: h, children: [
|
|
1739
1739
|
/* @__PURE__ */ e(
|
|
1740
1740
|
Xe,
|
|
@@ -1934,8 +1934,8 @@ const R1 = ({
|
|
|
1934
1934
|
leftLowerText: c,
|
|
1935
1935
|
leftUpperText: m,
|
|
1936
1936
|
rightLowerText: E,
|
|
1937
|
-
rightUpperText:
|
|
1938
|
-
sourceAccountGuid:
|
|
1937
|
+
rightUpperText: u,
|
|
1938
|
+
sourceAccountGuid: y
|
|
1939
1939
|
}) => /* @__PURE__ */ e(J.Fragment, { children: s ? /* @__PURE__ */ e(
|
|
1940
1940
|
he,
|
|
1941
1941
|
{
|
|
@@ -1947,7 +1947,7 @@ const R1 = ({
|
|
|
1947
1947
|
leftLowerText: c,
|
|
1948
1948
|
leftUpperText: m,
|
|
1949
1949
|
rightLowerText: E,
|
|
1950
|
-
rightUpperText:
|
|
1950
|
+
rightUpperText: u
|
|
1951
1951
|
}
|
|
1952
1952
|
) : /* @__PURE__ */ e(
|
|
1953
1953
|
Lt,
|
|
@@ -1955,7 +1955,7 @@ const R1 = ({
|
|
|
1955
1955
|
destinationAccountGuid: r,
|
|
1956
1956
|
externalAccountName: o,
|
|
1957
1957
|
heldAccountName: n,
|
|
1958
|
-
sourceAccountGuid:
|
|
1958
|
+
sourceAccountGuid: y
|
|
1959
1959
|
}
|
|
1960
1960
|
) }), bt = (i, l) => /* @__PURE__ */ t.createElement("svg", { width: 288, height: 156, viewBox: "0 0 288 156", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: l, ...i }, /* @__PURE__ */ t.createElement("rect", { width: 288, height: 156 }), /* @__PURE__ */ t.createElement("line", { x1: 16, y1: 119.5, x2: 272, y2: 119.5, stroke: "#A8B1BD" }), /* @__PURE__ */ t.createElement("path", { d: "M242 18C242 16.8954 242.895 16 244 16H262C263.105 16 264 16.8954 264 18V119H242V18Z", fill: "#CDD3DD" }), /* @__PURE__ */ t.createElement("path", { d: "M198 37C198 35.8954 198.895 35 200 35H218C219.105 35 220 35.8954 220 37V119H198V37Z", fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("path", { d: "M154 54C154 52.8954 154.895 52 156 52H174C175.105 52 176 52.8954 176 54V119H154V54Z", fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("path", { d: "M110 77C110 75.8954 110.895 75 112 75H130C131.105 75 132 75.8954 132 77V119H110V77Z", fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("path", { d: "M66 61C66 59.8954 66.8954 59 68 59H86C87.1046 59 88 59.8954 88 61V119H66V61Z", fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("path", { d: "M22 72C22 70.8954 22.8954 70 24 70H42C43.1046 70 44 70.8954 44 72V119H22V72Z", fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 23, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 67, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 111, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 155, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 199, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ t.createElement("rect", { x: 243, y: 130, width: 20, height: 6, rx: 3, fill: "#CDD3DD" })), ce = R(bt), F1 = ({
|
|
1961
1961
|
amounts: i,
|
|
@@ -2015,7 +2015,7 @@ const R1 = ({
|
|
|
2015
2015
|
}),
|
|
2016
2016
|
children: [
|
|
2017
2017
|
/* @__PURE__ */ e(
|
|
2018
|
-
|
|
2018
|
+
ye,
|
|
2019
2019
|
{
|
|
2020
2020
|
alt: o,
|
|
2021
2021
|
categoryGuid: i.primary_transaction?.top_level_category_guid || "",
|
|
@@ -2136,7 +2136,7 @@ const R1 = ({
|
|
|
2136
2136
|
displayData: o,
|
|
2137
2137
|
...n
|
|
2138
2138
|
}) => {
|
|
2139
|
-
const { no_spend_days: a } = i.payload, { noSpendDays: s, dollarBillAltText: h, daysOfTheWeek: c } = o, m = zt[a.length || 0], E = J.useRef(null), { height:
|
|
2139
|
+
const { no_spend_days: a } = i.payload, { noSpendDays: s, dollarBillAltText: h, daysOfTheWeek: c } = o, m = zt[a.length || 0], E = J.useRef(null), { height: u, width: y } = Q(E);
|
|
2140
2140
|
return /* @__PURE__ */ e(
|
|
2141
2141
|
L,
|
|
2142
2142
|
{
|
|
@@ -2152,7 +2152,7 @@ const R1 = ({
|
|
|
2152
2152
|
width: "100%",
|
|
2153
2153
|
children: [
|
|
2154
2154
|
/* @__PURE__ */ e("img", { alt: h, src: m, width: 138 }),
|
|
2155
|
-
a?.length >= 4 && /* @__PURE__ */ e(P, { height:
|
|
2155
|
+
a?.length >= 4 && /* @__PURE__ */ e(P, { height: u, shouldRun: !0, width: y }),
|
|
2156
2156
|
/* @__PURE__ */ e(Tt, { daysOfTheWeek: c, noSpendDays: s })
|
|
2157
2157
|
]
|
|
2158
2158
|
}
|
|
@@ -2202,7 +2202,7 @@ const R1 = ({
|
|
|
2202
2202
|
),
|
|
2203
2203
|
header: n ? void 0 : o,
|
|
2204
2204
|
isMini: n,
|
|
2205
|
-
children: /* @__PURE__ */ e(p, { mb: 16, ml: -16, mr: -16, children: /* @__PURE__ */ e(
|
|
2205
|
+
children: /* @__PURE__ */ e(p, { height: n ? 200 : "auto", mb: 16, ml: -16, mr: -16, children: /* @__PURE__ */ e(
|
|
2206
2206
|
"img",
|
|
2207
2207
|
{
|
|
2208
2208
|
alt: l.description,
|