@mx-cartographer/insights-ui 1.16.23 → 1.16.24-alpha.sms1

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,17 +1,17 @@
1
1
  import { jsx as e, jsxs as d, Fragment as G } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import b, { useState as he, useRef as P, useLayoutEffect as de, useMemo as ye, useCallback as Ge, forwardRef as T, useEffect as Me } from "react";
4
- import { BottomSheetTransition as Ye, P as M, Text as C, MerchantLogo as q, InstitutionLogo as D, H3 as me, CategoryIcon as Je, createMXTheme as Fe, CheckmarkFilledIcon as We, H2 as re } from "@mxenabled/mxui";
3
+ import b, { useState as he, useRef as q, useLayoutEffect as de, useMemo as ye, useCallback as Ge, forwardRef as T, useEffect as Me } from "react";
4
+ import { BottomSheetTransition as Ye, P as M, Text as C, MerchantLogo as N, InstitutionLogo as D, H3 as me, CategoryIcon as Je, createMXTheme as Fe, CheckmarkFilledIcon as We, H2 as re } from "@mxenabled/mxui";
5
5
  import ve from "@mui/material/Dialog";
6
6
  import Ke from "react-confetti";
7
7
  import { Icon as w } from "@mxenabled/mx-icons";
8
8
  import p from "@mui/material/Box";
9
9
  import E from "@mui/material/Stack";
10
10
  import { useInView as ze } from "react-intersection-observer";
11
- import N from "@mui/material/Card";
11
+ import U from "@mui/material/Card";
12
12
  import be from "@mui/material/CardContent";
13
13
  import De from "@mui/material/CardHeader";
14
- import j from "@mui/material/IconButton";
14
+ import X from "@mui/material/IconButton";
15
15
  import oe from "@mui/material/ListItemIcon";
16
16
  import se from "@mui/material/ListItemText";
17
17
  import Te from "@mui/material/Menu";
@@ -22,7 +22,7 @@ import { useChartContainerDimensions as Le } from "@mui/x-charts/internals";
22
22
  import { animated as W, to as _, useSpring as Xe } from "@react-spring/web";
23
23
  import Pe from "@mui/material/Paper";
24
24
  import { CardHeader as qe, Stack as ne, Box as fe, ToggleButtonGroup as Ne, TextField as Qe, Grow as Be, Alert as _e } from "@mui/material";
25
- import X from "@mui/material/Button";
25
+ import P from "@mui/material/Button";
26
26
  import Re from "@mui/material/DialogTitle";
27
27
  import $e from "@mui/material/FormControl";
28
28
  import et from "@mui/material/FormControlLabel";
@@ -221,7 +221,7 @@ const at = ({
221
221
  }
222
222
  ),
223
223
  /* @__PURE__ */ e(
224
- N,
224
+ U,
225
225
  {
226
226
  className: "mx-insights-gradient-box-card",
227
227
  sx: {
@@ -246,7 +246,7 @@ const at = ({
246
246
  h(Math.floor(k / 20));
247
247
  };
248
248
  return b.useEffect(() => (m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m)), []), /* @__PURE__ */ e(
249
- N,
249
+ U,
250
250
  {
251
251
  ref: s,
252
252
  "aria-labelledby": t.guid,
@@ -317,7 +317,7 @@ const at = ({
317
317
  };
318
318
  return /* @__PURE__ */ d(G, { children: [
319
319
  /* @__PURE__ */ e(
320
- j,
320
+ X,
321
321
  {
322
322
  "aria-hidden": t,
323
323
  "aria-label": n,
@@ -439,7 +439,7 @@ const at = ({
439
439
  style: o,
440
440
  ...a
441
441
  }) => {
442
- const c = z(), h = P(null);
442
+ const c = z(), h = q(null);
443
443
  de(() => {
444
444
  const f = new ResizeObserver(() => {
445
445
  window.requestAnimationFrame(() => {
@@ -494,7 +494,7 @@ const at = ({
494
494
  justifyContent: "center"
495
495
  },
496
496
  children: /* @__PURE__ */ e(
497
- q,
497
+ N,
498
498
  {
499
499
  alt: u,
500
500
  categoryGuid: y || "",
@@ -725,7 +725,7 @@ const at = ({
725
725
  style: l,
726
726
  ...s
727
727
  }) => {
728
- const o = z(), a = P(null), { width: c } = Xe({
728
+ const o = z(), a = q(null), { width: c } = Xe({
729
729
  width: l.width
730
730
  });
731
731
  de(() => {
@@ -942,8 +942,8 @@ const at = ({
942
942
  }
943
943
  }
944
944
  });
945
- }, U = ({ divProps: t, image: n, isMini: r = !1 }) => {
946
- const l = z(), s = P(null), o = {
945
+ }, j = ({ divProps: t, image: n, isMini: r = !1 }) => {
946
+ const l = z(), s = q(null), o = {
947
947
  100: l.palette.primary.lighter,
948
948
  200: l.palette.primary.light,
949
949
  300: l.palette.primary.main,
@@ -970,7 +970,7 @@ const at = ({
970
970
  );
971
971
  };
972
972
  function Q() {
973
- return /* @__PURE__ */ e(U, { divProps: { style: {} }, image: kt });
973
+ return /* @__PURE__ */ e(j, { divProps: { style: {} }, image: kt });
974
974
  }
975
975
  const Ee = (t) => {
976
976
  const [n, r] = he({ width: 0, height: 0 });
@@ -1001,7 +1001,7 @@ const Ee = (t) => {
1001
1001
  rightLowerText: c,
1002
1002
  rightUpperText: h
1003
1003
  }) => {
1004
- const m = o ? Ce : Se, u = P(null), { height: y, width: k } = Ee(u);
1004
+ const m = o ? Ce : Se, u = q(null), { height: y, width: k } = Ee(u);
1005
1005
  return /* @__PURE__ */ d(
1006
1006
  p,
1007
1007
  {
@@ -1014,7 +1014,7 @@ const Ee = (t) => {
1014
1014
  children: [
1015
1015
  /* @__PURE__ */ e(ue, { height: y, shouldRun: n.shouldRun, width: k }),
1016
1016
  /* @__PURE__ */ d(
1017
- N,
1017
+ U,
1018
1018
  {
1019
1019
  elevation: 1,
1020
1020
  sx: {
@@ -1185,7 +1185,7 @@ const Ee = (t) => {
1185
1185
  alignItems: "center"
1186
1186
  },
1187
1187
  children: [
1188
- /* @__PURE__ */ e(U, { divProps: { style: Zt }, image: At }),
1188
+ /* @__PURE__ */ e(j, { divProps: { style: Zt }, image: At }),
1189
1189
  /* @__PURE__ */ e(M, { color: "secondary", sx: { mx: 8, mb: 8 }, variant: "ParagraphSmall", children: t })
1190
1190
  ]
1191
1191
  }
@@ -1230,7 +1230,7 @@ const Ee = (t) => {
1230
1230
  )
1231
1231
  }
1232
1232
  ), Vt = ({ content: t, isLoading: n, sx: r }) => {
1233
- const [l, s] = he(0), o = P(null), a = () => {
1233
+ const [l, s] = he(0), o = q(null), a = () => {
1234
1234
  if (o.current) {
1235
1235
  const c = o.current, h = c.parentElement;
1236
1236
  if (h) {
@@ -1324,7 +1324,7 @@ const Ee = (t) => {
1324
1324
  isError: m = !1,
1325
1325
  isLoading: u = !1,
1326
1326
  isMini: y = !1
1327
- }) => /* @__PURE__ */ d(E, { sx: { height: "100%" }, children: [
1327
+ }) => /* @__PURE__ */ d(U, { sx: { height: "100%" }, children: [
1328
1328
  /* @__PURE__ */ e(Lt, { ...h, isMini: y, title: r.html_title }),
1329
1329
  m ? /* @__PURE__ */ e(Ht, { erroredText: a }) : /* @__PURE__ */ d(G, { children: [
1330
1330
  /* @__PURE__ */ e(
@@ -1396,7 +1396,7 @@ const Ee = (t) => {
1396
1396
  variant: "ParagraphSmall"
1397
1397
  }
1398
1398
  ),
1399
- a && l && /* @__PURE__ */ d(X, { fullWidth: !0, onClick: l, sx: { mb: c }, children: [
1399
+ a && l && /* @__PURE__ */ d(P, { fullWidth: !0, onClick: l, sx: { mb: c }, children: [
1400
1400
  a,
1401
1401
  /* @__PURE__ */ e(w, { name: "chevron_right" })
1402
1402
  ] })
@@ -1413,7 +1413,7 @@ const Ee = (t) => {
1413
1413
  variant: a = !s && "text",
1414
1414
  ...c
1415
1415
  }) => r ? null : /* @__PURE__ */ e(
1416
- X,
1416
+ P,
1417
1417
  {
1418
1418
  disabled: n,
1419
1419
  fullWidth: !0,
@@ -1442,7 +1442,7 @@ const Ee = (t) => {
1442
1442
  flexDirection: "row",
1443
1443
  justifyContent: "center"
1444
1444
  },
1445
- children: /* @__PURE__ */ e(U, { divProps: { style: Wt }, image: Ft })
1445
+ children: /* @__PURE__ */ e(j, { divProps: { style: Wt }, image: Ft })
1446
1446
  }
1447
1447
  ), t1 = ({
1448
1448
  headerText: t,
@@ -1454,7 +1454,7 @@ const Ee = (t) => {
1454
1454
  }) => /* @__PURE__ */ d(Re, { fontSize: 18, id: "alert-dialog-title", children: [
1455
1455
  t,
1456
1456
  /* @__PURE__ */ e(
1457
- j,
1457
+ X,
1458
1458
  {
1459
1459
  "aria-label": s ? n.ratingExist : n.ratingDoesntExist,
1460
1460
  "data-ui-test": "feedback-close-button",
@@ -1496,7 +1496,7 @@ const Ee = (t) => {
1496
1496
  },
1497
1497
  children: [
1498
1498
  /* @__PURE__ */ e(
1499
- X,
1499
+ P,
1500
1500
  {
1501
1501
  className: "mx-insights-beat-feedback-submit-button",
1502
1502
  "data-ui-test": "submit-button",
@@ -1515,7 +1515,7 @@ const Ee = (t) => {
1515
1515
  }
1516
1516
  ),
1517
1517
  /* @__PURE__ */ e(
1518
- X,
1518
+ P,
1519
1519
  {
1520
1520
  className: "mx-insights-beat-feedback-no-thanks-button",
1521
1521
  "data-ui-test": "no-thanks-button",
@@ -1664,7 +1664,7 @@ const Ee = (t) => {
1664
1664
  margin: { bottom: 32, left: 2, right: 2, top: 24 },
1665
1665
  onBarClick: c
1666
1666
  }
1667
- ) : /* @__PURE__ */ e(U, { image: Ve }) });
1667
+ ) : /* @__PURE__ */ e(j, { image: Ve }) });
1668
1668
  var K = /* @__PURE__ */ ((t) => (t.Primary = "Primary", t.Secondary = "Secondary", t))(K || {});
1669
1669
  const s1 = ({
1670
1670
  amounts: t,
@@ -1777,9 +1777,9 @@ const s1 = ({
1777
1777
  ...a.header,
1778
1778
  hasFullWidthImage: !0
1779
1779
  },
1780
- children: /* @__PURE__ */ e(p, { sx: { background: k, p: 16, width: "100%" }, children: /* @__PURE__ */ e(N, { sx: { bgcolor: s ? "grey.800" : "common.white", p: 16 }, children: /* @__PURE__ */ d(E, { sx: { alignItems: "center", gap: 12 }, children: [
1780
+ children: /* @__PURE__ */ e(p, { sx: { background: k, p: 16, width: "100%" }, children: /* @__PURE__ */ e(U, { sx: { bgcolor: s ? "grey.800" : "common.white", p: 16 }, children: /* @__PURE__ */ d(E, { sx: { alignItems: "center", gap: 12 }, children: [
1781
1781
  /* @__PURE__ */ e(
1782
- q,
1782
+ N,
1783
1783
  {
1784
1784
  alt: c.description,
1785
1785
  categoryGuid: m,
@@ -2038,7 +2038,7 @@ const s1 = ({
2038
2038
  /* @__PURE__ */ e(C, { bold: !0, sx: { p: "16px 24px 8px 24px" }, children: t.footer_title }),
2039
2039
  /* @__PURE__ */ d(p, { sx: { display: "flex", gap: 24, p: "12px 24px" }, children: [
2040
2040
  /* @__PURE__ */ e(
2041
- j,
2041
+ X,
2042
2042
  {
2043
2043
  "aria-label": t.aria_label_thumbs_down,
2044
2044
  onClick: () => n("no"),
@@ -2046,7 +2046,7 @@ const s1 = ({
2046
2046
  }
2047
2047
  ),
2048
2048
  /* @__PURE__ */ e(
2049
- j,
2049
+ X,
2050
2050
  {
2051
2051
  "aria-label": t.aria_label_thumbs_up,
2052
2052
  onClick: () => n("yes"),
@@ -2084,7 +2084,7 @@ const s1 = ({
2084
2084
  marginBottom: 16,
2085
2085
  width: n ? "30%" : "50%"
2086
2086
  }, o = t ? { ...s, width: n ? "50%" : "70%" } : s;
2087
- return /* @__PURE__ */ e(H, { ...r, isMini: n, children: /* @__PURE__ */ e(U, { divProps: { style: o }, image: l }) });
2087
+ return /* @__PURE__ */ e(H, { ...r, isMini: n, children: /* @__PURE__ */ e(j, { divProps: { style: o }, image: l }) });
2088
2088
  }, u1 = ({
2089
2089
  altLoadingText: t,
2090
2090
  beat: n,
@@ -2324,7 +2324,7 @@ const s1 = ({
2324
2324
  margin: { bottom: 32, left: 2, right: 2, top: 24 },
2325
2325
  onBarClick: c
2326
2326
  }
2327
- ) : /* @__PURE__ */ e(U, { image: Ve }) }), k1 = ({
2327
+ ) : /* @__PURE__ */ e(j, { image: Ve }) }), k1 = ({
2328
2328
  beat: t,
2329
2329
  buttonProps: n,
2330
2330
  colors: r,
@@ -2426,7 +2426,7 @@ const s1 = ({
2426
2426
  position: "absolute"
2427
2427
  },
2428
2428
  children: /* @__PURE__ */ e(
2429
- q,
2429
+ N,
2430
2430
  {
2431
2431
  alt: a.feedDescription,
2432
2432
  categoryGuid: a.categoryGuid || "",
@@ -2479,7 +2479,7 @@ const s1 = ({
2479
2479
  },
2480
2480
  children: [
2481
2481
  /* @__PURE__ */ e(
2482
- q,
2482
+ N,
2483
2483
  {
2484
2484
  alt: r,
2485
2485
  categoryGuid: n || "",
@@ -2689,7 +2689,7 @@ const s1 = ({
2689
2689
  }
2690
2690
  };
2691
2691
  return /* @__PURE__ */ e(E, { sx: a.boxContainer, children: /* @__PURE__ */ d(
2692
- N,
2692
+ U,
2693
2693
  {
2694
2694
  sx: {
2695
2695
  ...a.card,
@@ -2697,7 +2697,7 @@ const s1 = ({
2697
2697
  },
2698
2698
  children: [
2699
2699
  /* @__PURE__ */ e(
2700
- q,
2700
+ N,
2701
2701
  {
2702
2702
  alt: l,
2703
2703
  categoryGuid: t.primary_transaction?.top_level_category_guid || "",
@@ -2967,7 +2967,7 @@ const s1 = ({
2967
2967
  }) => /* @__PURE__ */ d(ve, { fullScreen: !0, onClose: l, open: r, ...s, children: [
2968
2968
  /* @__PURE__ */ e(Re, { children: n.title }),
2969
2969
  /* @__PURE__ */ e(
2970
- j,
2970
+ X,
2971
2971
  {
2972
2972
  "aria-label": n.close_dialog_aria,
2973
2973
  onClick: l,
@@ -3099,7 +3099,7 @@ const s1 = ({
3099
3099
  }
3100
3100
  )
3101
3101
  ] }),
3102
- /* @__PURE__ */ e(X, { onClick: o.onClose, sx: { mx: "auto" }, variant: "contained", children: t.error_button_text })
3102
+ /* @__PURE__ */ e(P, { onClick: o.onClose, sx: { mx: "auto" }, variant: "contained", children: t.error_button_text })
3103
3103
  ] })
3104
3104
  ] })
3105
3105
  ] });