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

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,3 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { CommonBeatProps } from '../../../types/CommonBeat';
3
- export declare const CustomInsight: React.FC<CommonBeatProps>;
3
+ interface CustomInsightProps extends CommonBeatProps {
4
+ category_guids: string[];
5
+ merchant_guids: string[];
6
+ }
7
+ export declare const CustomInsight: React.FC<CustomInsightProps>;
8
+ export {};
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import { jsx as A, jsxs as c, Fragment as v } from "react/jsx-runtime";
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 U, 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 O, 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 O from "@mui/material/Card";
11
+ import X 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 T } from "@react-spring/web";
22
+ import { useSpring as W2, animated as U } 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
- O,
223
+ X,
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
- O,
248
+ X,
249
249
  {
250
250
  ref: l,
251
251
  "aria-labelledby": e.guid,
@@ -314,7 +314,7 @@ const U2 = ({
314
314
  const [C, n] = s2(null), w = () => n(null), o = (Z, L) => {
315
315
  w(), t(Z, L);
316
316
  };
317
- return /* @__PURE__ */ c(v, { children: [
317
+ return /* @__PURE__ */ c(x, { children: [
318
318
  /* @__PURE__ */ A(
319
319
  K,
320
320
  {
@@ -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
- T.rect,
464
+ U.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
- T.text,
474
+ U.text,
475
475
  {
476
476
  fill: g.palette.text.primary,
477
477
  fontSize: 11,
@@ -507,7 +507,7 @@ const U2 = ({
507
507
  (f, { dataIndex: J }) => n && n(J),
508
508
  [n]
509
509
  ), V = B2(() => {
510
- const f = i.map(({ value: x }) => x), J = Math.min(...f), G = Math.max(...f);
510
+ const f = i.map(({ value: v }) => v), J = Math.min(...f), G = Math.max(...f);
511
511
  return {
512
512
  series: [
513
513
  {
@@ -517,7 +517,7 @@ const U2 = ({
517
517
  ],
518
518
  xAxis: [
519
519
  {
520
- data: i.map(({ label: x }) => x),
520
+ data: i.map(({ label: v }) => v),
521
521
  scaleType: "band",
522
522
  categoryGapRatio: 0.45
523
523
  }
@@ -576,12 +576,12 @@ const U2 = ({
576
576
  slots: {
577
577
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
578
578
  axisTickLabel: ({ text: f, ownerState: J, ...G }) => {
579
- const x = i[C ?? i.length - 1]?.label;
579
+ const v = i[C ?? i.length - 1]?.label;
580
580
  return /* @__PURE__ */ A(
581
581
  "text",
582
582
  {
583
583
  ...G,
584
- style: { ...G.style, fontWeight: x === f ? "bold" : 400 },
584
+ style: { ...G.style, fontWeight: v === f ? "bold" : 400 },
585
585
  children: f
586
586
  }
587
587
  );
@@ -611,11 +611,11 @@ const U2 = ({
611
611
  onItemClick: W,
612
612
  slots: {
613
613
  bar: (f) => {
614
- const { ownerState: J, style: G, ...x } = f;
614
+ const { ownerState: J, style: G, ...v } = f;
615
615
  return /* @__PURE__ */ A(
616
616
  A0,
617
617
  {
618
- ...x,
618
+ ...v,
619
619
  colorRange: F,
620
620
  data: i,
621
621
  dataIndex: J.dataIndex,
@@ -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(T.rect, { ...l, ref: g, fill: e, rx: 2, style: t }),
669
+ /* @__PURE__ */ A(U.rect, { ...l, ref: g, fill: e, rx: 2, style: t }),
670
670
  /* @__PURE__ */ A(
671
- T.text,
671
+ U.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
- O,
880
+ X,
881
881
  {
882
882
  elevation: 1,
883
883
  sx: {
@@ -922,17 +922,17 @@ const U2 = ({
922
922
  size: B,
923
923
  subHeaderString: g,
924
924
  textSX: C
925
- }) => /* @__PURE__ */ c(v, { children: [
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
- ] }), S = 48, i0 = ({ account: e, headerString: r }) => /* @__PURE__ */ c(v, { children: [
928
+ ] }), N = 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: S,
935
- width: S,
934
+ height: N,
935
+ width: N,
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: S,
945
+ height: N,
946
946
  institutionGuid: e.guid || "",
947
- width: S
947
+ width: N
948
948
  }
949
949
  )
950
950
  }
@@ -1194,7 +1194,7 @@ const U2 = ({
1194
1194
  sx: o
1195
1195
  }
1196
1196
  );
1197
- return /* @__PURE__ */ c(v, { children: [
1197
+ return /* @__PURE__ */ c(x, { children: [
1198
1198
  t === "top" && m(),
1199
1199
  /* @__PURE__ */ A(a, { sx: { alignItems: "center", ...n && C && { mx: -16 } }, children: i }),
1200
1200
  t === "bottom" && m(),
@@ -1225,9 +1225,9 @@ const U2 = ({
1225
1225
  isError: w = !1,
1226
1226
  isLoading: o = !1,
1227
1227
  isMini: m = !1
1228
- }) => /* @__PURE__ */ c(v, { children: [
1228
+ }) => /* @__PURE__ */ c(x, { children: [
1229
1229
  /* @__PURE__ */ A(o0, { ...n, isMini: m, title: i.html_title }),
1230
- w ? /* @__PURE__ */ A(a0, { erroredText: g }) : /* @__PURE__ */ c(v, { children: [
1230
+ w ? /* @__PURE__ */ A(a0, { erroredText: g }) : /* @__PURE__ */ c(x, { children: [
1231
1231
  /* @__PURE__ */ A(
1232
1232
  Y0,
1233
1233
  {
@@ -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 X() {
1571
+ function S() {
1572
1572
  return /* @__PURE__ */ A(I, { divProps: { style: {} }, image: u0 });
1573
1573
  }
1574
1574
  const A1 = ({
@@ -1624,11 +1624,21 @@ const A1 = ({
1624
1624
  onBarClick: C,
1625
1625
  selectedTabIndex: n
1626
1626
  }
1627
- ) : /* @__PURE__ */ A(X, {})
1627
+ ) : /* @__PURE__ */ A(S, {})
1628
1628
  }
1629
1629
  ), e1 = ({
1630
- ...e
1631
- }) => /* @__PURE__ */ A(h, { ...e, children: /* @__PURE__ */ A(v, {}) }), s1 = ({
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 = ({
1632
1642
  beat: e,
1633
1643
  buttonProps: r,
1634
1644
  category: i,
@@ -1654,9 +1664,9 @@ const A1 = ({
1654
1664
  ...g.header,
1655
1665
  hasFullWidthImage: !0
1656
1666
  },
1657
- 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: [
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
1668
  /* @__PURE__ */ A(
1659
- U,
1669
+ O,
1660
1670
  {
1661
1671
  alt: C.description,
1662
1672
  categoryGuid: w,
@@ -1684,7 +1694,7 @@ const A1 = ({
1684
1694
  ] }) }) })
1685
1695
  }
1686
1696
  );
1687
- }, N = ({ sx: e }) => /* @__PURE__ */ A(
1697
+ }, P = ({ sx: e }) => /* @__PURE__ */ A(
1688
1698
  d,
1689
1699
  {
1690
1700
  fill: !0,
@@ -1761,8 +1771,8 @@ const A1 = ({
1761
1771
  width: 64
1762
1772
  }
1763
1773
  ),
1764
- /* @__PURE__ */ A(N, { sx: { marginLeft: 11 } }),
1765
- /* @__PURE__ */ A(N, { sx: { marginLeft: 4 } }),
1774
+ /* @__PURE__ */ A(P, { sx: { marginLeft: 11 } }),
1775
+ /* @__PURE__ */ A(P, { sx: { marginLeft: 4 } }),
1766
1776
  l ? /* @__PURE__ */ A(
1767
1777
  d,
1768
1778
  {
@@ -1792,8 +1802,8 @@ const A1 = ({
1792
1802
  }
1793
1803
  }
1794
1804
  ),
1795
- /* @__PURE__ */ A(N, { sx: { marginRight: 4 } }),
1796
- /* @__PURE__ */ A(N, { sx: { marginRight: 11 } }),
1805
+ /* @__PURE__ */ A(P, { sx: { marginRight: 4 } }),
1806
+ /* @__PURE__ */ A(P, { sx: { marginRight: 11 } }),
1797
1807
  /* @__PURE__ */ A(
1798
1808
  k,
1799
1809
  {
@@ -2053,7 +2063,7 @@ const A1 = ({
2053
2063
  },
2054
2064
  onBarClick: g
2055
2065
  }
2056
- ) : /* @__PURE__ */ A(X, {})
2066
+ ) : /* @__PURE__ */ A(S, {})
2057
2067
  }
2058
2068
  ), B1 = ({
2059
2069
  goalCompletionDate: e = "",
@@ -2196,7 +2206,7 @@ const A1 = ({
2196
2206
  },
2197
2207
  onBarClick: g
2198
2208
  }
2199
- ) : /* @__PURE__ */ A(X, {})
2209
+ ) : /* @__PURE__ */ A(S, {})
2200
2210
  }
2201
2211
  ), c1 = ({
2202
2212
  amounts: e,
@@ -2251,7 +2261,7 @@ const A1 = ({
2251
2261
  },
2252
2262
  onBarClick: g
2253
2263
  }
2254
- ) : /* @__PURE__ */ A(X, {})
2264
+ ) : /* @__PURE__ */ A(S, {})
2255
2265
  }
2256
2266
  ), w1 = ({
2257
2267
  beat: e,
@@ -2322,7 +2332,7 @@ const A1 = ({
2322
2332
  position: "absolute"
2323
2333
  },
2324
2334
  children: /* @__PURE__ */ A(
2325
- U,
2335
+ O,
2326
2336
  {
2327
2337
  alt: g.feedDescription,
2328
2338
  categoryGuid: g.categoryGuid || "",
@@ -2375,7 +2385,7 @@ const A1 = ({
2375
2385
  },
2376
2386
  children: [
2377
2387
  /* @__PURE__ */ A(
2378
- U,
2388
+ O,
2379
2389
  {
2380
2390
  alt: i,
2381
2391
  categoryGuid: r || "",
@@ -2434,7 +2444,7 @@ const A1 = ({
2434
2444
  onBarClick: g,
2435
2445
  selectedTabIndex: C
2436
2446
  }
2437
- ) : /* @__PURE__ */ A(X, {})
2447
+ ) : /* @__PURE__ */ A(S, {})
2438
2448
  }
2439
2449
  ), a1 = ({
2440
2450
  account: e,
@@ -2585,7 +2595,7 @@ const A1 = ({
2585
2595
  }
2586
2596
  };
2587
2597
  return /* @__PURE__ */ A(a, { sx: g.boxContainer, children: /* @__PURE__ */ c(
2588
- O,
2598
+ X,
2589
2599
  {
2590
2600
  sx: {
2591
2601
  ...g.card,
@@ -2593,7 +2603,7 @@ const A1 = ({
2593
2603
  },
2594
2604
  children: [
2595
2605
  /* @__PURE__ */ A(
2596
- U,
2606
+ O,
2597
2607
  {
2598
2608
  alt: t,
2599
2609
  categoryGuid: e.primary_transaction?.top_level_category_guid || "",
@@ -2753,7 +2763,7 @@ const A1 = ({
2753
2763
  },
2754
2764
  children: e
2755
2765
  }
2756
- ), 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(
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
2767
  M,
2758
2768
  {
2759
2769
  sx: {
@@ -2795,8 +2805,8 @@ const A1 = ({
2795
2805
  style: { borderRadius: "8px" }
2796
2806
  }
2797
2807
  ),
2798
- /* @__PURE__ */ A(P, {}),
2799
- /* @__PURE__ */ A(P, {}),
2808
+ /* @__PURE__ */ A(T, {}),
2809
+ /* @__PURE__ */ A(T, {}),
2800
2810
  t ? /* @__PURE__ */ A(d, { color: "error", fill: !0, name: "error", size: 32 }) : /* @__PURE__ */ A(
2801
2811
  d,
2802
2812
  {
@@ -2806,8 +2816,8 @@ const A1 = ({
2806
2816
  sx: { color: "text.secondary" }
2807
2817
  }
2808
2818
  ),
2809
- /* @__PURE__ */ A(P, {}),
2810
- /* @__PURE__ */ A(P, {}),
2819
+ /* @__PURE__ */ A(T, {}),
2820
+ /* @__PURE__ */ A(T, {}),
2811
2821
  /* @__PURE__ */ A(
2812
2822
  M,
2813
2823
  {
@@ -2829,7 +2839,7 @@ const A1 = ({
2829
2839
  ] }) }) }) }),
2830
2840
  /* @__PURE__ */ c(a, { sx: { alignItems: "center", justifyContent: "center" }, children: [
2831
2841
  i && !t && /* @__PURE__ */ A(q, { sx: { textAlign: "center", whiteSpace: "wrap" }, children: e.your_direct_deposit_has_been_updated_successfully }),
2832
- l && /* @__PURE__ */ c(v, { children: [
2842
+ l && /* @__PURE__ */ c(x, { children: [
2833
2843
  /* @__PURE__ */ A(q, { children: e.connecting }),
2834
2844
  /* @__PURE__ */ A(M, { sx: { my: 24, width: "50%" }, children: /* @__PURE__ */ A(P2, { "aria-label": e.loading }) }),
2835
2845
  /* @__PURE__ */ A(D, { bold: !0, variant: "Body", children: e.syncing_your_information }),