@mx-cartographer/insights-ui 1.8.1-alpha.mega1 → 1.8.1-alpha.mega2

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
@@ -258,7 +258,7 @@ const Be = ({
258
258
  height: d
259
259
  }) => {
260
260
  const [s, c] = v.useState(null), m = () => {
261
- const p = 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, f = p - u - 24;
261
+ const u = document.getElementsByClassName("mx-mini-insight-card")[0].clientHeight, p = document.getElementsByClassName("mx-mini-insight-card-header")[0].clientHeight + document.getElementsByClassName("mx-mini-insight-card-content-body")[0].clientHeight, f = u - p - 24;
262
262
  c(Math.floor(f / 20));
263
263
  };
264
264
  return v.useEffect(() => (m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m)), []), /* @__PURE__ */ t(
@@ -328,7 +328,7 @@ const Be = ({
328
328
  tabIndex: o = 0,
329
329
  ...d
330
330
  }) => {
331
- const [s, c] = B(null), m = () => c(null), p = (f, g) => {
331
+ const [s, c] = B(null), m = () => c(null), u = (f, g) => {
332
332
  m(), n(f, g);
333
333
  };
334
334
  return /* @__PURE__ */ h(k, { children: [
@@ -366,7 +366,7 @@ const Be = ({
366
366
  onClose: m,
367
367
  open: !!s,
368
368
  transformOrigin: { horizontal: "right", vertical: "top" },
369
- children: l.map(({ icon: f, key: g, text: S }, M) => /* @__PURE__ */ h(Ae, { onClick: () => p(M, g), sx: { padding: 12 }, children: [
369
+ children: l.map(({ icon: f, key: g, text: S }, M) => /* @__PURE__ */ h(Ae, { onClick: () => u(M, g), sx: { padding: 12 }, children: [
370
370
  /* @__PURE__ */ t(J, { sx: { minWidth: "32px !important" }, children: f }),
371
371
  /* @__PURE__ */ t(
372
372
  T,
@@ -458,7 +458,7 @@ const Be = ({
458
458
  width: a.width
459
459
  });
460
460
  ie(() => {
461
- const u = new ResizeObserver(() => {
461
+ const p = new ResizeObserver(() => {
462
462
  window.requestAnimationFrame(() => {
463
463
  if (s.current) {
464
464
  const { width: f } = s.current.getBoundingClientRect(), g = f / 2;
@@ -466,11 +466,11 @@ const Be = ({
466
466
  }
467
467
  });
468
468
  });
469
- return s.current && u.observe(s.current), () => {
470
- s.current && u.unobserve(s.current);
469
+ return s.current && p.observe(s.current), () => {
470
+ s.current && p.unobserve(s.current);
471
471
  };
472
472
  }, []);
473
- const { ariaLabel: m, formattedAmount: p } = r[l];
473
+ const { ariaLabel: m, formattedAmount: u } = r[l];
474
474
  return /* @__PURE__ */ h("g", { "aria-label": m, ref: s, children: [
475
475
  /* @__PURE__ */ t(O.rect, { ...o, fill: i[l], rx: 2, style: a }),
476
476
  /* @__PURE__ */ t(
@@ -483,7 +483,7 @@ const Be = ({
483
483
  transform: `translate(${c.get() / 2}, -8)`,
484
484
  x: a.x,
485
485
  y: a.y,
486
- children: p
486
+ children: u
487
487
  }
488
488
  )
489
489
  ] });
@@ -503,7 +503,7 @@ const Be = ({
503
503
  selectedTabIndex: s,
504
504
  onBarClick: c
505
505
  }) => {
506
- const m = w(), { containerRef: p, height: u, width: f } = Se(), g = N(() => {
506
+ const m = w(), { containerRef: u, height: p, width: f } = Se(), g = N(() => {
507
507
  const H = `${r}80`;
508
508
  return s === void 0 ? [...new Array(l.length - 1).fill(H), r] : l.map((L, Z) => Z === s ? r : H);
509
509
  }, [r, l, s]), S = he(
@@ -528,10 +528,10 @@ const Be = ({
528
528
  [l]
529
529
  );
530
530
  return /* @__PURE__ */ h(C, { alignItems: "center", sx: { mb: n ? 16 : 24, width: "100%" }, children: [
531
- /* @__PURE__ */ t(E, { ref: p, sx: { height: 130, width: "100%", mb: 8 }, children: /* @__PURE__ */ h(
531
+ /* @__PURE__ */ t(E, { ref: u, sx: { height: 130, width: "100%", mb: 8 }, children: /* @__PURE__ */ h(
532
532
  be,
533
533
  {
534
- height: u,
534
+ height: p,
535
535
  margin: a,
536
536
  series: M.series,
537
537
  width: f,
@@ -656,21 +656,21 @@ const Be = ({
656
656
  rightLowerText: s,
657
657
  rightUpperText: c
658
658
  }) => {
659
- const m = o ? _ : $, p = G(null), { height: u, width: f } = oe(p);
659
+ const m = o ? _ : $, u = G(null), { height: p, width: f } = oe(u);
660
660
  return /* @__PURE__ */ h(
661
661
  E,
662
662
  {
663
663
  alignItems: "center",
664
664
  display: "flex",
665
665
  justifyContent: "center",
666
- ref: p,
666
+ ref: u,
667
667
  sx: (g) => ({
668
668
  backgroundColor: g.palette.grey[200],
669
669
  padding: 16
670
670
  }),
671
671
  width: "100%",
672
672
  children: [
673
- /* @__PURE__ */ t(ae, { height: u, shouldRun: r.shouldRun, width: f }),
673
+ /* @__PURE__ */ t(ae, { height: p, shouldRun: r.shouldRun, width: f }),
674
674
  /* @__PURE__ */ h(
675
675
  A,
676
676
  {
@@ -862,8 +862,8 @@ const Be = ({
862
862
  if (!a.current) return;
863
863
  const d = a.current, s = d.querySelectorAll(".Overlay");
864
864
  ["brand100", "brand200", "brand300", "brand400", "brand500"].forEach((m) => {
865
- const p = d.querySelectorAll(`.${m}`), u = m.replace("brand", "");
866
- ee(p, o[u]);
865
+ const u = d.querySelectorAll(`.${m}`), p = m.replace("brand", "");
866
+ ee(u, o[p]);
867
867
  }), ee(s, o[300]);
868
868
  }, [o]), /* @__PURE__ */ t(
869
869
  "div",
@@ -934,10 +934,10 @@ const Be = ({
934
934
  if (a.current) {
935
935
  const d = a.current, s = d.parentElement;
936
936
  if (s) {
937
- const m = Array.from(s.children).reduce((S, M) => M !== d ? S + M.clientHeight : S, 0), u = s.clientHeight - m, f = parseInt(
937
+ const m = Array.from(s.children).reduce((S, M) => M !== d ? S + M.clientHeight : S, 0), p = s.clientHeight - m, f = parseInt(
938
938
  window.getComputedStyle(d).lineHeight,
939
939
  10
940
- ), g = Math.floor(u / f);
940
+ ), g = Math.floor(p / f);
941
941
  g !== l && n(g);
942
942
  }
943
943
  }
@@ -978,7 +978,7 @@ const Be = ({
978
978
  hasFullWidthImage: c,
979
979
  hasFooterButton: m = !1
980
980
  }) => {
981
- const p = () => a || !r.html_description ? null : s ? /* @__PURE__ */ t(p1, { content: r.html_description, isLoading: d }) : /* @__PURE__ */ t(
981
+ const u = () => a || !r.html_description ? null : s ? /* @__PURE__ */ t(p1, { content: r.html_description, isLoading: d }) : /* @__PURE__ */ t(
982
982
  E1,
983
983
  {
984
984
  beat: r,
@@ -988,9 +988,9 @@ const Be = ({
988
988
  }
989
989
  );
990
990
  return /* @__PURE__ */ h(k, { children: [
991
- n === "top" && p(),
991
+ n === "top" && u(),
992
992
  /* @__PURE__ */ t(C, { sx: { alignItems: "center", ...c && s && { mx: -16 } }, children: l }),
993
- n === "bottom" && p(),
993
+ n === "bottom" && u(),
994
994
  i && /* @__PURE__ */ t(
995
995
  b,
996
996
  {
@@ -1016,10 +1016,10 @@ const Be = ({
1016
1016
  feedback: s,
1017
1017
  header: c,
1018
1018
  isError: m = !1,
1019
- isLoading: p = !1,
1020
- isMini: u = !1
1019
+ isLoading: u = !1,
1020
+ isMini: p = !1
1021
1021
  }) => /* @__PURE__ */ h(k, { children: [
1022
- /* @__PURE__ */ t(c1, { ...c, isMini: u, title: l.html_title }),
1022
+ /* @__PURE__ */ t(c1, { ...c, isMini: p, title: l.html_title }),
1023
1023
  m ? /* @__PURE__ */ t(s1, { erroredText: d }) : /* @__PURE__ */ h(k, { children: [
1024
1024
  /* @__PURE__ */ t(
1025
1025
  u1,
@@ -1028,12 +1028,12 @@ const Be = ({
1028
1028
  asteriskText: r,
1029
1029
  beat: l,
1030
1030
  hasFooterButton: !!n,
1031
- isLoading: p,
1032
- isMini: u,
1033
- children: p ? /* @__PURE__ */ t(m1, { altLoadingText: i }) : a
1031
+ isLoading: u,
1032
+ isMini: p,
1033
+ children: u ? /* @__PURE__ */ t(m1, { altLoadingText: i }) : a
1034
1034
  }
1035
1035
  ),
1036
- !u && n,
1036
+ !p && n,
1037
1037
  s
1038
1038
  ] })
1039
1039
  ] }), ft = ({
@@ -1130,8 +1130,8 @@ const Be = ({
1130
1130
  setRefs: o
1131
1131
  }) => /* @__PURE__ */ t(
1132
1132
  ({ elementTag: s, children: c, ...m }) => {
1133
- const p = s;
1134
- return v.createElement(p, m, c);
1133
+ const u = s;
1134
+ return v.createElement(u, m, c);
1135
1135
  },
1136
1136
  {
1137
1137
  "aria-hidden": i,
@@ -1213,7 +1213,7 @@ const Be = ({
1213
1213
  },
1214
1214
  marginTop: 12,
1215
1215
  width: "100%"
1216
- }), p = X(K)({
1216
+ }), u = X(K)({
1217
1217
  backgroundColor: d.palette.action.active,
1218
1218
  borderRadius: 4,
1219
1219
  fontSize: 16,
@@ -1234,7 +1234,7 @@ const Be = ({
1234
1234
  },
1235
1235
  children: [
1236
1236
  /* @__PURE__ */ t(
1237
- p,
1237
+ u,
1238
1238
  {
1239
1239
  className: "mx-insights-beat-feedback-submit-button",
1240
1240
  "data-ui-test": "submit-button",
@@ -1321,7 +1321,7 @@ const Be = ({
1321
1321
  const m = ze(Te)({
1322
1322
  height: 93,
1323
1323
  resize: "none"
1324
- }), p = De();
1324
+ }), u = De();
1325
1325
  return /* @__PURE__ */ h(
1326
1326
  E,
1327
1327
  {
@@ -1339,8 +1339,8 @@ const Be = ({
1339
1339
  maxRows: 4,
1340
1340
  minRows: 4,
1341
1341
  name: "Feedback",
1342
- onChange: (u) => {
1343
- s(u.target.value), c(u.target.value);
1342
+ onChange: (p) => {
1343
+ s(p.target.value), c(p.target.value);
1344
1344
  },
1345
1345
  onClick: () => d(),
1346
1346
  placeholder: n,
@@ -1355,7 +1355,7 @@ const Be = ({
1355
1355
  x,
1356
1356
  {
1357
1357
  sx: {
1358
- color: i && p.palette.error.darker,
1358
+ color: i && u.palette.error.darker,
1359
1359
  fontSize: 12,
1360
1360
  p: "0px !important"
1361
1361
  },
@@ -1378,13 +1378,14 @@ const bt = ({
1378
1378
  data: a,
1379
1379
  legendLabelAvg: o,
1380
1380
  legendLabelMain: d,
1381
- onBarClick: s,
1382
- selectedTabIndex: c,
1383
- ...m
1381
+ margin: s,
1382
+ onBarClick: c,
1383
+ selectedTabIndex: m,
1384
+ ...u
1384
1385
  }) => /* @__PURE__ */ t(
1385
1386
  D,
1386
1387
  {
1387
- ...m,
1388
+ ...u,
1388
1389
  beat: r,
1389
1390
  button: a.length ? /* @__PURE__ */ h(P, { spacing: 10, sx: { pt: 8 }, children: [
1390
1391
  /* @__PURE__ */ t(
@@ -1411,17 +1412,12 @@ const bt = ({
1411
1412
  amounts: i,
1412
1413
  color: n,
1413
1414
  data: a,
1414
- isMini: m.isMini,
1415
+ isMini: u.isMini,
1415
1416
  legendLabelAvg: o,
1416
1417
  legendLabelMain: d,
1417
- margin: {
1418
- bottom: 32,
1419
- left: 2,
1420
- right: 2,
1421
- top: 24
1422
- },
1423
- onBarClick: s,
1424
- selectedTabIndex: c
1418
+ margin: s,
1419
+ onBarClick: c,
1420
+ selectedTabIndex: m
1425
1421
  }
1426
1422
  ) : /* @__PURE__ */ t(H1, {})
1427
1423
  }
@@ -1583,7 +1579,7 @@ const bt = ({
1583
1579
  onClose: s,
1584
1580
  sendResponseAnalytics: c,
1585
1581
  upperDescription: m,
1586
- upperList: p
1582
+ upperList: u
1587
1583
  }) => /* @__PURE__ */ t(
1588
1584
  ue,
1589
1585
  {
@@ -1616,7 +1612,7 @@ const bt = ({
1616
1612
  /* @__PURE__ */ t(le, { sx: { p: "16px 24px 8px 24px", whiteSpace: "wrap" }, children: l }),
1617
1613
  /* @__PURE__ */ h(C, { sx: { gap: 12, px: 24 }, children: [
1618
1614
  /* @__PURE__ */ t(x, { color: "secondary", fontSize: 13, children: m }),
1619
- /* @__PURE__ */ t(U, { children: p.map((u, f) => /* @__PURE__ */ h(
1615
+ /* @__PURE__ */ t(U, { children: u.map((p, f) => /* @__PURE__ */ h(
1620
1616
  Q,
1621
1617
  {
1622
1618
  sx: {
@@ -1640,7 +1636,7 @@ const bt = ({
1640
1636
  T,
1641
1637
  {
1642
1638
  disableTypography: !0,
1643
- secondary: u,
1639
+ secondary: p,
1644
1640
  sx: (g) => ({ color: g.palette.text.secondary, fontSize: 13 })
1645
1641
  }
1646
1642
  )
@@ -1653,7 +1649,7 @@ const bt = ({
1653
1649
  /* @__PURE__ */ h(E, { children: [
1654
1650
  /* @__PURE__ */ t(b, { bold: !0, fontSize: 15, sx: { p: "16px 24px 8px 24px" }, children: o }),
1655
1651
  /* @__PURE__ */ t(x, { color: "secondary", fontSize: 13, sx: { mb: 16, mx: 24 }, children: a }),
1656
- /* @__PURE__ */ t(U, { sx: { p: "16px 24px" }, children: d.map((u, f) => /* @__PURE__ */ h(
1652
+ /* @__PURE__ */ t(U, { sx: { p: "16px 24px" }, children: d.map((p, f) => /* @__PURE__ */ h(
1657
1653
  Q,
1658
1654
  {
1659
1655
  sx: (g) => ({
@@ -1667,12 +1663,12 @@ const bt = ({
1667
1663
  p: 16
1668
1664
  }),
1669
1665
  children: [
1670
- /* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(y, { name: u.icon_name, size: 24 }) }),
1666
+ /* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(y, { name: p.icon_name, size: 24 }) }),
1671
1667
  /* @__PURE__ */ t(
1672
1668
  T,
1673
1669
  {
1674
- primary: u.title,
1675
- secondary: u.content,
1670
+ primary: p.title,
1671
+ secondary: p.content,
1676
1672
  sx: (g) => ({
1677
1673
  "& > p": {
1678
1674
  color: g.palette.text.secondary,
@@ -1935,8 +1931,8 @@ const bt = ({
1935
1931
  isMini: s,
1936
1932
  leftLowerText: c,
1937
1933
  leftUpperText: m,
1938
- rightLowerText: p,
1939
- rightUpperText: u,
1934
+ rightLowerText: u,
1935
+ rightUpperText: p,
1940
1936
  sourceAccountGuid: f
1941
1937
  }) => /* @__PURE__ */ t(v.Fragment, { children: d ? /* @__PURE__ */ t(
1942
1938
  de,
@@ -1948,8 +1944,8 @@ const bt = ({
1948
1944
  isMini: s,
1949
1945
  leftLowerText: c,
1950
1946
  leftUpperText: m,
1951
- rightLowerText: p,
1952
- rightUpperText: u
1947
+ rightLowerText: u,
1948
+ rightUpperText: p
1953
1949
  }
1954
1950
  ) : /* @__PURE__ */ t(
1955
1951
  V1,