@mx-cartographer/insights-ui 1.16.7-alpha.JB2 → 1.16.7-alpha.JB4

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.
@@ -1,8 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { CommonBeatProps } from '../../../types/CommonBeat';
3
3
  interface CustomInsightProps extends CommonBeatProps {
4
- category_guids: string[];
5
- merchant_guids: string[];
4
+ children: React.ReactNode;
6
5
  }
7
6
  export declare const CustomInsight: React.FC<CustomInsightProps>;
8
7
  export {};
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsx as A, jsxs as c, Fragment as x } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import p, { useState as s2, useRef as H, useLayoutEffect as r2, useMemo as B2, useCallback as h2, useEffect as m2, forwardRef as z } from "react";
4
- import { BottomSheetTransition as L2, P as Y, Text as D, InstitutionLogo as k, H3 as i2, MerchantLogo as O, CategoryIcon as Z2, createMXTheme as J2, CheckmarkFilledIcon as G2, H2 as q } from "@mxenabled/mxui";
4
+ import { BottomSheetTransition as L2, P as Y, Text as D, InstitutionLogo as k, H3 as i2, MerchantLogo as U, CategoryIcon as Z2, createMXTheme as J2, CheckmarkFilledIcon as G2, H2 as q } from "@mxenabled/mxui";
5
5
  import d2 from "@mui/material/Dialog";
6
6
  import v2 from "react-confetti";
7
7
  import { Icon as d } from "@mxenabled/mx-icons";
8
8
  import M from "@mui/material/Box";
9
9
  import a from "@mui/material/Stack";
10
10
  import { useInView as x2 } from "react-intersection-observer";
11
- import X from "@mui/material/Card";
11
+ import O from "@mui/material/Card";
12
12
  import Y2 from "@mui/material/CardContent";
13
13
  import k2 from "@mui/material/CardHeader";
14
14
  import K from "@mui/material/IconButton";
@@ -19,7 +19,7 @@ import z2 from "@mui/material/MenuItem";
19
19
  import { useTheme as Q, ThemeProvider as Q2 } from "@mui/material/styles";
20
20
  import { ResponsiveChartContainer as f2, ChartsReferenceLine as A2, ChartsXAxis as D2, BarPlot as y2 } from "@mui/x-charts";
21
21
  import { useChartContainerDimensions as F2 } from "@mui/x-charts/internals";
22
- import { useSpring as W2, animated as U } from "@react-spring/web";
22
+ import { useSpring as W2, animated as T } from "@react-spring/web";
23
23
  import I2 from "@mui/material/Paper";
24
24
  import { CardHeader as K2 } from "@mui/material";
25
25
  import b from "@mui/material/Button";
@@ -220,7 +220,7 @@ const U2 = ({
220
220
  }
221
221
  ),
222
222
  /* @__PURE__ */ A(
223
- X,
223
+ O,
224
224
  {
225
225
  className: "mx-insights-gradient-box-card",
226
226
  sx: {
@@ -245,7 +245,7 @@ const U2 = ({
245
245
  n(Math.floor(Z / 20));
246
246
  };
247
247
  return p.useEffect(() => (w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w)), []), /* @__PURE__ */ A(
248
- X,
248
+ O,
249
249
  {
250
250
  ref: l,
251
251
  "aria-labelledby": e.guid,
@@ -461,7 +461,7 @@ const U2 = ({
461
461
  const { ariaLabel: w, formattedAmount: o, value: m } = r[i];
462
462
  return /* @__PURE__ */ c("g", { "aria-label": w, children: [
463
463
  /* @__PURE__ */ A(
464
- U.rect,
464
+ T.rect,
465
465
  {
466
466
  ...B,
467
467
  ref: C,
@@ -471,7 +471,7 @@ const U2 = ({
471
471
  }
472
472
  ),
473
473
  /* @__PURE__ */ A(
474
- U.text,
474
+ T.text,
475
475
  {
476
476
  fill: g.palette.text.primary,
477
477
  fontSize: 11,
@@ -666,9 +666,9 @@ const U2 = ({
666
666
  }, []);
667
667
  const { ariaLabelComparison: n, ariaLabelMain: w, formattedComparison: o, formattedMain: m } = r[i.index], Z = i.type === 0 ? w : n, L = i.type === 0 ? m : o;
668
668
  return /* @__PURE__ */ c("g", { "aria-label": Z, children: [
669
- /* @__PURE__ */ A(U.rect, { ...l, ref: g, fill: e, rx: 2, style: t }),
669
+ /* @__PURE__ */ A(T.rect, { ...l, ref: g, fill: e, rx: 2, style: t }),
670
670
  /* @__PURE__ */ A(
671
- U.text,
671
+ T.text,
672
672
  {
673
673
  fill: B.palette.text.secondary,
674
674
  fontSize: 11,
@@ -877,7 +877,7 @@ const U2 = ({
877
877
  children: [
878
878
  /* @__PURE__ */ A(t2, { height: m, shouldRun: r.shouldRun, width: Z }),
879
879
  /* @__PURE__ */ c(
880
- X,
880
+ O,
881
881
  {
882
882
  elevation: 1,
883
883
  sx: {
@@ -925,14 +925,14 @@ const U2 = ({
925
925
  }) => /* @__PURE__ */ c(x, { children: [
926
926
  l && /* @__PURE__ */ A(d, { color: r, fill: i, name: l, size: B, sx: t }),
927
927
  /* @__PURE__ */ A(D, { bold: e, sx: C, children: g })
928
- ] }), N = 48, i0 = ({ account: e, headerString: r }) => /* @__PURE__ */ c(x, { children: [
928
+ ] }), S = 48, i0 = ({ account: e, headerString: r }) => /* @__PURE__ */ c(x, { children: [
929
929
  /* @__PURE__ */ A(
930
930
  I2,
931
931
  {
932
932
  elevation: 1,
933
933
  sx: (i) => ({
934
- height: N,
935
- width: N,
934
+ height: S,
935
+ width: S,
936
936
  borderRadius: "6px",
937
937
  outline: `1.2px solid ${i.palette.border?.lighter}`,
938
938
  marginTop: -22,
@@ -942,9 +942,9 @@ const U2 = ({
942
942
  k,
943
943
  {
944
944
  alt: e.logo_alt_text,
945
- height: N,
945
+ height: S,
946
946
  institutionGuid: e.guid || "",
947
- width: N
947
+ width: S
948
948
  }
949
949
  )
950
950
  }
@@ -1568,7 +1568,7 @@ const U2 = ({
1568
1568
  ) : /* @__PURE__ */ A(I, { image: u2 }) });
1569
1569
  var E = /* @__PURE__ */ ((e) => (e.Primary = "Primary", e.Secondary = "Secondary", e))(E || {});
1570
1570
  const p0 = (e, r) => /* @__PURE__ */ s.createElement("svg", { width: 288, height: 156, viewBox: "0 0 288 156", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: r, ...e }, /* @__PURE__ */ s.createElement("rect", { width: 288, height: 156 }), /* @__PURE__ */ s.createElement("line", { x1: 16, y1: 119.5, x2: 272, y2: 119.5, stroke: "#A8B1BD" }), /* @__PURE__ */ s.createElement("path", { d: "M242 18C242 16.8954 242.895 16 244 16H262C263.105 16 264 16.8954 264 18V119H242V18Z", fill: "#CDD3DD" }), /* @__PURE__ */ s.createElement("path", { d: "M198 37C198 35.8954 198.895 35 200 35H218C219.105 35 220 35.8954 220 37V119H198V37Z", fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("path", { d: "M154 54C154 52.8954 154.895 52 156 52H174C175.105 52 176 52.8954 176 54V119H154V54Z", fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("path", { d: "M110 77C110 75.8954 110.895 75 112 75H130C131.105 75 132 75.8954 132 77V119H110V77Z", fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("path", { d: "M66 61C66 59.8954 66.8954 59 68 59H86C87.1046 59 88 59.8954 88 61V119H66V61Z", fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("path", { d: "M22 72C22 70.8954 22.8954 70 24 70H42C43.1046 70 44 70.8954 44 72V119H22V72Z", fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("rect", { x: 23, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("rect", { x: 67, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("rect", { x: 111, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("rect", { x: 155, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("rect", { x: 199, y: 130, width: 20, height: 6, rx: 3, fill: "#E4E8EE" }), /* @__PURE__ */ s.createElement("rect", { x: 243, y: 130, width: 20, height: 6, rx: 3, fill: "#CDD3DD" })), u0 = z(p0);
1571
- function S() {
1571
+ function X() {
1572
1572
  return /* @__PURE__ */ A(I, { divProps: { style: {} }, image: u0 });
1573
1573
  }
1574
1574
  const A1 = ({
@@ -1624,21 +1624,12 @@ const A1 = ({
1624
1624
  onBarClick: C,
1625
1625
  selectedTabIndex: n
1626
1626
  }
1627
- ) : /* @__PURE__ */ A(S, {})
1627
+ ) : /* @__PURE__ */ A(X, {})
1628
1628
  }
1629
1629
  ), e1 = ({
1630
- category_guids: e,
1631
- merchant_guids: r,
1632
- ...i
1633
- }) => /* @__PURE__ */ A(h, { ...i, children: /* @__PURE__ */ A(M, { style: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ A(
1634
- O,
1635
- {
1636
- alt: "alt name",
1637
- categoryGuid: e[0],
1638
- merchantGuid: r[0],
1639
- size: 32
1640
- }
1641
- ) }) }), s1 = ({
1630
+ children: e,
1631
+ ...r
1632
+ }) => /* @__PURE__ */ A(h, { ...r, children: e }), s1 = ({
1642
1633
  beat: e,
1643
1634
  buttonProps: r,
1644
1635
  category: i,
@@ -1664,9 +1655,9 @@ const A1 = ({
1664
1655
  ...g.header,
1665
1656
  hasFullWidthImage: !0
1666
1657
  },
1667
- children: /* @__PURE__ */ A(M, { sx: { background: Z, p: 16, width: "100%" }, children: /* @__PURE__ */ A(X, { sx: { bgcolor: l ? "grey.800" : "common.white", p: 16 }, children: /* @__PURE__ */ c(a, { sx: { alignItems: "center", gap: 12 }, children: [
1658
+ children: /* @__PURE__ */ A(M, { sx: { background: Z, p: 16, width: "100%" }, children: /* @__PURE__ */ A(O, { sx: { bgcolor: l ? "grey.800" : "common.white", p: 16 }, children: /* @__PURE__ */ c(a, { sx: { alignItems: "center", gap: 12 }, children: [
1668
1659
  /* @__PURE__ */ A(
1669
- O,
1660
+ U,
1670
1661
  {
1671
1662
  alt: C.description,
1672
1663
  categoryGuid: w,
@@ -1694,7 +1685,7 @@ const A1 = ({
1694
1685
  ] }) }) })
1695
1686
  }
1696
1687
  );
1697
- }, P = ({ sx: e }) => /* @__PURE__ */ A(
1688
+ }, N = ({ sx: e }) => /* @__PURE__ */ A(
1698
1689
  d,
1699
1690
  {
1700
1691
  fill: !0,
@@ -1771,8 +1762,8 @@ const A1 = ({
1771
1762
  width: 64
1772
1763
  }
1773
1764
  ),
1774
- /* @__PURE__ */ A(P, { sx: { marginLeft: 11 } }),
1775
- /* @__PURE__ */ A(P, { sx: { marginLeft: 4 } }),
1765
+ /* @__PURE__ */ A(N, { sx: { marginLeft: 11 } }),
1766
+ /* @__PURE__ */ A(N, { sx: { marginLeft: 4 } }),
1776
1767
  l ? /* @__PURE__ */ A(
1777
1768
  d,
1778
1769
  {
@@ -1802,8 +1793,8 @@ const A1 = ({
1802
1793
  }
1803
1794
  }
1804
1795
  ),
1805
- /* @__PURE__ */ A(P, { sx: { marginRight: 4 } }),
1806
- /* @__PURE__ */ A(P, { sx: { marginRight: 11 } }),
1796
+ /* @__PURE__ */ A(N, { sx: { marginRight: 4 } }),
1797
+ /* @__PURE__ */ A(N, { sx: { marginRight: 11 } }),
1807
1798
  /* @__PURE__ */ A(
1808
1799
  k,
1809
1800
  {
@@ -2063,7 +2054,7 @@ const A1 = ({
2063
2054
  },
2064
2055
  onBarClick: g
2065
2056
  }
2066
- ) : /* @__PURE__ */ A(S, {})
2057
+ ) : /* @__PURE__ */ A(X, {})
2067
2058
  }
2068
2059
  ), B1 = ({
2069
2060
  goalCompletionDate: e = "",
@@ -2206,7 +2197,7 @@ const A1 = ({
2206
2197
  },
2207
2198
  onBarClick: g
2208
2199
  }
2209
- ) : /* @__PURE__ */ A(S, {})
2200
+ ) : /* @__PURE__ */ A(X, {})
2210
2201
  }
2211
2202
  ), c1 = ({
2212
2203
  amounts: e,
@@ -2261,7 +2252,7 @@ const A1 = ({
2261
2252
  },
2262
2253
  onBarClick: g
2263
2254
  }
2264
- ) : /* @__PURE__ */ A(S, {})
2255
+ ) : /* @__PURE__ */ A(X, {})
2265
2256
  }
2266
2257
  ), w1 = ({
2267
2258
  beat: e,
@@ -2332,7 +2323,7 @@ const A1 = ({
2332
2323
  position: "absolute"
2333
2324
  },
2334
2325
  children: /* @__PURE__ */ A(
2335
- O,
2326
+ U,
2336
2327
  {
2337
2328
  alt: g.feedDescription,
2338
2329
  categoryGuid: g.categoryGuid || "",
@@ -2385,7 +2376,7 @@ const A1 = ({
2385
2376
  },
2386
2377
  children: [
2387
2378
  /* @__PURE__ */ A(
2388
- O,
2379
+ U,
2389
2380
  {
2390
2381
  alt: i,
2391
2382
  categoryGuid: r || "",
@@ -2444,7 +2435,7 @@ const A1 = ({
2444
2435
  onBarClick: g,
2445
2436
  selectedTabIndex: C
2446
2437
  }
2447
- ) : /* @__PURE__ */ A(S, {})
2438
+ ) : /* @__PURE__ */ A(X, {})
2448
2439
  }
2449
2440
  ), a1 = ({
2450
2441
  account: e,
@@ -2595,7 +2586,7 @@ const A1 = ({
2595
2586
  }
2596
2587
  };
2597
2588
  return /* @__PURE__ */ A(a, { sx: g.boxContainer, children: /* @__PURE__ */ c(
2598
- X,
2589
+ O,
2599
2590
  {
2600
2591
  sx: {
2601
2592
  ...g.card,
@@ -2603,7 +2594,7 @@ const A1 = ({
2603
2594
  },
2604
2595
  children: [
2605
2596
  /* @__PURE__ */ A(
2606
- O,
2597
+ U,
2607
2598
  {
2608
2599
  alt: t,
2609
2600
  categoryGuid: e.primary_transaction?.top_level_category_guid || "",
@@ -2763,7 +2754,7 @@ const A1 = ({
2763
2754
  },
2764
2755
  children: e
2765
2756
  }
2766
- ), T = () => /* @__PURE__ */ A("svg", { fill: "none", height: "4", viewBox: "0 0 3 4", width: "3", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ A("circle", { cx: "1.75", cy: "1.9502", fill: "#666666", r: "1.25" }) }), B3 = () => /* @__PURE__ */ A(
2757
+ ), P = () => /* @__PURE__ */ A("svg", { fill: "none", height: "4", viewBox: "0 0 3 4", width: "3", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ A("circle", { cx: "1.75", cy: "1.9502", fill: "#666666", r: "1.25" }) }), B3 = () => /* @__PURE__ */ A(
2767
2758
  M,
2768
2759
  {
2769
2760
  sx: {
@@ -2805,8 +2796,8 @@ const A1 = ({
2805
2796
  style: { borderRadius: "8px" }
2806
2797
  }
2807
2798
  ),
2808
- /* @__PURE__ */ A(T, {}),
2809
- /* @__PURE__ */ A(T, {}),
2799
+ /* @__PURE__ */ A(P, {}),
2800
+ /* @__PURE__ */ A(P, {}),
2810
2801
  t ? /* @__PURE__ */ A(d, { color: "error", fill: !0, name: "error", size: 32 }) : /* @__PURE__ */ A(
2811
2802
  d,
2812
2803
  {
@@ -2816,8 +2807,8 @@ const A1 = ({
2816
2807
  sx: { color: "text.secondary" }
2817
2808
  }
2818
2809
  ),
2819
- /* @__PURE__ */ A(T, {}),
2820
- /* @__PURE__ */ A(T, {}),
2810
+ /* @__PURE__ */ A(P, {}),
2811
+ /* @__PURE__ */ A(P, {}),
2821
2812
  /* @__PURE__ */ A(
2822
2813
  M,
2823
2814
  {