@mx-cartographer/insights-ui 1.8.13-aplha.JB4 → 1.8.13-aplha.JB5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as d, Fragment as b } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- import g, { useState as X, useRef as z, useLayoutEffect as ne, useMemo as N, useCallback as me, useEffect as oe, forwardRef as R } from "react";
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
5
  import { BottomSheetTransition as pe, Icon as C, P as k, Text as M, InstitutionLogo as Y, H3 as ae, createMXTheme as ye, MerchantLogo as ue, CategoryIcon as ke, CheckmarkFilledIcon as fe } from "@kyper/mui";
6
6
  import Ce from "react-confetti";
@@ -41,8 +41,8 @@ const Ue = ({
41
41
  showBackground: s = !1,
42
42
  width: h = 450
43
43
  }) => {
44
- const [c, m] = g.useState(!1);
45
- return g.useEffect(() => {
44
+ const [c, m] = J.useState(!1);
45
+ return J.useEffect(() => {
46
46
  m(!!i);
47
47
  }, [i]), /* @__PURE__ */ e(
48
48
  Ee,
@@ -109,10 +109,10 @@ const Ue = ({
109
109
  percent: r,
110
110
  height: o = 12
111
111
  }) => {
112
- const [n, a] = xe({ triggerOnce: !0 }), [s, h] = g.useState("0%"), c = r > 100 ? 100 : r;
113
- return g.useEffect(() => {
112
+ const [n, a] = xe({ triggerOnce: !0 }), [s, h] = J.useState("0%"), c = r > 100 ? 100 : r;
113
+ return J.useEffect(() => {
114
114
  a && h(`${c}%`);
115
- }, [a, c]), /* @__PURE__ */ e(g.Fragment, { children: /* @__PURE__ */ d(
115
+ }, [a, c]), /* @__PURE__ */ e(J.Fragment, { children: /* @__PURE__ */ d(
116
116
  w,
117
117
  {
118
118
  "data-ui-test": "progress-bar",
@@ -255,18 +255,18 @@ const Ue = ({
255
255
  subHeader: a,
256
256
  height: s
257
257
  }) => {
258
- const [h, c] = g.useState(null), m = () => {
258
+ const [h, c] = J.useState(null), m = () => {
259
259
  const E = document.getElementsByClassName("mx-mini-insight-card")[0].clientHeight, y = document.getElementsByClassName("mx-mini-insight-card-header")[0].clientHeight + document.getElementsByClassName("mx-mini-insight-card-content-body")[0].clientHeight, u = E - y - 24;
260
260
  c(Math.floor(u / 20));
261
261
  };
262
- return g.useEffect(() => (m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m)), []), /* @__PURE__ */ e(
262
+ return J.useEffect(() => (m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m)), []), /* @__PURE__ */ e(
263
263
  w,
264
264
  {
265
265
  "aria-labelledby": i.guid,
266
266
  className: "mx-mini-insight-card",
267
267
  ref: n,
268
268
  sx: { height: s, pb: 24, pt: 0, px: 0 },
269
- children: i.dismissed_at ? r : /* @__PURE__ */ d(g.Fragment, { children: [
269
+ children: i.dismissed_at ? r : /* @__PURE__ */ d(J.Fragment, { children: [
270
270
  /* @__PURE__ */ e(
271
271
  ge,
272
272
  {
@@ -364,7 +364,7 @@ const Ue = ({
364
364
  onClose: m,
365
365
  open: !!h,
366
366
  transformOrigin: { horizontal: "right", vertical: "top" },
367
- children: r.map(({ icon: u, key: S, text: v }, J) => /* @__PURE__ */ d(Me, { onClick: () => E(J, S), sx: { padding: 12 }, children: [
367
+ children: r.map(({ icon: u, key: S, text: v }, g) => /* @__PURE__ */ d(Me, { onClick: () => E(g, S), sx: { padding: 12 }, children: [
368
368
  /* @__PURE__ */ e(T, { sx: { minWidth: "32px !important" }, children: u }),
369
369
  /* @__PURE__ */ e(
370
370
  D,
@@ -464,8 +464,8 @@ const Ue = ({
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 = u / 2, J = h.current.querySelector("text");
468
- J && J.setAttribute("transform", `translate(${v}, -8)`);
467
+ const v = u / 2, g = h.current.querySelector("text");
468
+ g && g.setAttribute("transform", `translate(${v}, -8)`);
469
469
  }
470
470
  });
471
471
  });
@@ -521,7 +521,7 @@ const Ue = ({
521
521
  }, [l, r, h]), v = me(
522
522
  (x, { dataIndex: A }) => c && c(A),
523
523
  [c]
524
- ), J = N(
524
+ ), g = N(
525
525
  () => ({
526
526
  series: [
527
527
  {
@@ -545,9 +545,9 @@ const Ue = ({
545
545
  {
546
546
  height: y,
547
547
  margin: n,
548
- series: J.series,
548
+ series: g.series,
549
549
  width: u,
550
- xAxis: J.xAxis,
550
+ xAxis: g.xAxis,
551
551
  children: [
552
552
  i?.average && /* @__PURE__ */ e(
553
553
  Ze,
@@ -953,7 +953,9 @@ const Ue = ({
953
953
  console.log("parentHeight"), console.log(c);
954
954
  const m = Array.from(h.children);
955
955
  console.log("parentChildren"), console.log(m);
956
- const E = m.reduce((v, J) => J !== s ? v + J.clientHeight : v, 0), y = c - E, u = parseInt(
956
+ const E = m.reduce((v, g) => g !== s ? (console.log(g), console.log(g.clientHeight), v + g.clientHeight) : v, 0);
957
+ console.log("nonDescriptionChildrenHeight"), console.log(E);
958
+ const y = c - E, u = parseInt(
957
959
  window.getComputedStyle(s).lineHeight,
958
960
  10
959
961
  ), S = Math.floor(y / u);
@@ -1150,7 +1152,7 @@ const Ue = ({
1150
1152
  }) => /* @__PURE__ */ e(
1151
1153
  ({ elementTag: h, children: c, ...m }) => {
1152
1154
  const E = h;
1153
- return g.createElement(E, m, c);
1155
+ return J.createElement(E, m, c);
1154
1156
  },
1155
1157
  {
1156
1158
  "aria-hidden": i,
@@ -1464,7 +1466,7 @@ const R1 = ({
1464
1466
  account_2_alt_text: o,
1465
1467
  isSuccess: n
1466
1468
  }) => {
1467
- const a = g.useRef(null), { height: s, width: h } = Q(a);
1469
+ const a = J.useRef(null), { height: s, width: h } = Q(a);
1468
1470
  return /* @__PURE__ */ e(
1469
1471
  p,
1470
1472
  {
@@ -1934,7 +1936,7 @@ const R1 = ({
1934
1936
  rightLowerText: E,
1935
1937
  rightUpperText: y,
1936
1938
  sourceAccountGuid: u
1937
- }) => /* @__PURE__ */ e(g.Fragment, { children: s ? /* @__PURE__ */ e(
1939
+ }) => /* @__PURE__ */ e(J.Fragment, { children: s ? /* @__PURE__ */ e(
1938
1940
  he,
1939
1941
  {
1940
1942
  account: i,
@@ -2134,7 +2136,7 @@ const R1 = ({
2134
2136
  displayData: o,
2135
2137
  ...n
2136
2138
  }) => {
2137
- const { no_spend_days: a } = i.payload, { noSpendDays: s, dollarBillAltText: h, daysOfTheWeek: c } = o, m = zt[a.length || 0], E = g.useRef(null), { height: y, width: u } = Q(E);
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: y, width: u } = Q(E);
2138
2140
  return /* @__PURE__ */ e(
2139
2141
  L,
2140
2142
  {