@mx-cartographer/insights-ui 1.4.9-alpha.mega2 → 1.4.9-alpha.mega3
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 +54 -52
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
1
|
+
import { jsx as t, jsxs as s, Fragment as w } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "react";
|
|
3
3
|
import A, { useRef as F, useLayoutEffect as re, useMemo as G, useCallback as ne, useState as U, useEffect as Q, forwardRef as I, memo as ae } from "react";
|
|
4
4
|
import oe from "@mui/material/Dialog";
|
|
@@ -6,7 +6,7 @@ import { BottomSheetTransition as de, Icon as y, P as C, Text as b, InstitutionL
|
|
|
6
6
|
import he from "react-confetti";
|
|
7
7
|
import p from "@mui/material/Box";
|
|
8
8
|
import H from "@mui/material/Card";
|
|
9
|
-
import { useTheme as
|
|
9
|
+
import { useTheme as M, styled as J, ThemeProvider as me } from "@mui/material/styles";
|
|
10
10
|
import { useInView as pe } from "react-intersection-observer";
|
|
11
11
|
import ue from "@mui/material/CardHeader";
|
|
12
12
|
import $ from "@mui/material/CardContent";
|
|
@@ -162,7 +162,7 @@ const Re = ({
|
|
|
162
162
|
percentageCompleteText: r,
|
|
163
163
|
progressColorOverride: o
|
|
164
164
|
}) => {
|
|
165
|
-
const a =
|
|
165
|
+
const a = M();
|
|
166
166
|
return /* @__PURE__ */ s(
|
|
167
167
|
p,
|
|
168
168
|
{
|
|
@@ -212,7 +212,7 @@ const Re = ({
|
|
|
212
212
|
gradientOverride: l,
|
|
213
213
|
title: n
|
|
214
214
|
}) => {
|
|
215
|
-
const r =
|
|
215
|
+
const r = M();
|
|
216
216
|
return /* @__PURE__ */ s(
|
|
217
217
|
p,
|
|
218
218
|
{
|
|
@@ -258,7 +258,7 @@ const Re = ({
|
|
|
258
258
|
height: d
|
|
259
259
|
}) => {
|
|
260
260
|
const [c, h] = A.useState(null), m = () => {
|
|
261
|
-
const
|
|
261
|
+
const u = document.getElementsByClassName("mx-mini-insight-card")[0].clientHeight, f = document.getElementsByClassName("mx-mini-insight-card-header")[0].clientHeight + document.getElementsByClassName("mx-mini-insight-card-content-body")[0].clientHeight, E = u - f - 24;
|
|
262
262
|
h(Math.floor(E / 20));
|
|
263
263
|
};
|
|
264
264
|
return A.useEffect(() => (m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m)), []), /* @__PURE__ */ t(
|
|
@@ -333,7 +333,7 @@ const Re = ({
|
|
|
333
333
|
width: "100%"
|
|
334
334
|
},
|
|
335
335
|
children: [
|
|
336
|
-
r && /* @__PURE__ */ s(
|
|
336
|
+
r && /* @__PURE__ */ s(w, { children: [
|
|
337
337
|
/* @__PURE__ */ t(
|
|
338
338
|
"svg",
|
|
339
339
|
{
|
|
@@ -348,7 +348,7 @@ const Re = ({
|
|
|
348
348
|
),
|
|
349
349
|
/* @__PURE__ */ t(b, { id: "chartLegendLabel", sx: { fontSize: 11, fontWeight: 400 }, variant: "XSmall", children: r })
|
|
350
350
|
] }),
|
|
351
|
-
i && n && /* @__PURE__ */ s(
|
|
351
|
+
i && n && /* @__PURE__ */ s(w, { children: [
|
|
352
352
|
/* @__PURE__ */ t(
|
|
353
353
|
x,
|
|
354
354
|
{
|
|
@@ -386,12 +386,12 @@ const Re = ({
|
|
|
386
386
|
style: r,
|
|
387
387
|
...o
|
|
388
388
|
}) => {
|
|
389
|
-
const a =
|
|
389
|
+
const a = M(), d = F(null);
|
|
390
390
|
re(() => {
|
|
391
391
|
const m = new ResizeObserver(() => {
|
|
392
392
|
if (d.current) {
|
|
393
|
-
const
|
|
394
|
-
d.current.querySelector("text").setAttribute("transform", `translate(${
|
|
393
|
+
const f = d.current.getBoundingClientRect().width / 2;
|
|
394
|
+
d.current.querySelector("text").setAttribute("transform", `translate(${f}, -8)`);
|
|
395
395
|
}
|
|
396
396
|
});
|
|
397
397
|
return d.current && m.observe(d.current), () => {
|
|
@@ -423,7 +423,7 @@ const Re = ({
|
|
|
423
423
|
selectedTabIndex: a,
|
|
424
424
|
onBarClick: d
|
|
425
425
|
}) => {
|
|
426
|
-
const c =
|
|
426
|
+
const c = M(), { containerRef: h, height: m, width: u } = Ce(), f = G(() => {
|
|
427
427
|
const g = `${l}80`;
|
|
428
428
|
return a === void 0 ? [...new Array(n.length - 1).fill(g), l] : n.map((q, Z) => Z === a ? l : g);
|
|
429
429
|
}, [l, n, a]), E = ne(
|
|
@@ -455,7 +455,7 @@ const Re = ({
|
|
|
455
455
|
height: m,
|
|
456
456
|
margin: { left: 16, right: 16, top: 38, bottom: 30 },
|
|
457
457
|
series: v.series,
|
|
458
|
-
width:
|
|
458
|
+
width: u,
|
|
459
459
|
xAxis: v.xAxis,
|
|
460
460
|
children: [
|
|
461
461
|
i?.average && /* @__PURE__ */ t(
|
|
@@ -498,7 +498,7 @@ const Re = ({
|
|
|
498
498
|
Ke,
|
|
499
499
|
{
|
|
500
500
|
...le,
|
|
501
|
-
colorRange:
|
|
501
|
+
colorRange: f,
|
|
502
502
|
data: n,
|
|
503
503
|
dataIndex: q.dataIndex,
|
|
504
504
|
style: Z
|
|
@@ -558,21 +558,21 @@ const Re = ({
|
|
|
558
558
|
rightLowerText: c,
|
|
559
559
|
rightUpperText: h
|
|
560
560
|
}) => {
|
|
561
|
-
const m = a ? Y : N,
|
|
561
|
+
const m = a ? Y : N, u = F(null), { height: f, width: E } = te(u);
|
|
562
562
|
return /* @__PURE__ */ s(
|
|
563
563
|
p,
|
|
564
564
|
{
|
|
565
565
|
alignItems: "center",
|
|
566
566
|
display: "flex",
|
|
567
567
|
justifyContent: "center",
|
|
568
|
-
ref:
|
|
568
|
+
ref: u,
|
|
569
569
|
sx: (v) => ({
|
|
570
570
|
backgroundColor: v.palette.grey[200],
|
|
571
571
|
padding: 16
|
|
572
572
|
}),
|
|
573
573
|
width: "100%",
|
|
574
574
|
children: [
|
|
575
|
-
/* @__PURE__ */ t(ee, { height:
|
|
575
|
+
/* @__PURE__ */ t(ee, { height: f, shouldRun: l.shouldRun, width: E }),
|
|
576
576
|
/* @__PURE__ */ s(
|
|
577
577
|
H,
|
|
578
578
|
{
|
|
@@ -619,10 +619,10 @@ const Re = ({
|
|
|
619
619
|
size: a,
|
|
620
620
|
subHeaderString: d,
|
|
621
621
|
textSX: c
|
|
622
|
-
}) => /* @__PURE__ */ s(
|
|
622
|
+
}) => /* @__PURE__ */ s(w, { children: [
|
|
623
623
|
o && /* @__PURE__ */ t(y, { color: l, fill: n, name: o, size: a, sx: r }),
|
|
624
624
|
/* @__PURE__ */ t(b, { bold: i, sx: c, children: d })
|
|
625
|
-
] }), S = 48, Je = ({ account: i, headerString: l }) => /* @__PURE__ */ s(
|
|
625
|
+
] }), S = 48, Je = ({ account: i, headerString: l }) => /* @__PURE__ */ s(w, { children: [
|
|
626
626
|
/* @__PURE__ */ t(
|
|
627
627
|
ye,
|
|
628
628
|
{
|
|
@@ -648,7 +648,7 @@ const Re = ({
|
|
|
648
648
|
),
|
|
649
649
|
/* @__PURE__ */ t(C, { bold: !0, sx: { width: "100%", textAlign: "center" }, children: l })
|
|
650
650
|
] }), Te = ({ leftLowerText: i, leftUpperText: l }) => {
|
|
651
|
-
const n =
|
|
651
|
+
const n = M();
|
|
652
652
|
return /* @__PURE__ */ s(
|
|
653
653
|
H,
|
|
654
654
|
{
|
|
@@ -698,7 +698,7 @@ const Re = ({
|
|
|
698
698
|
rightLowerText: l,
|
|
699
699
|
rightUpperText: n
|
|
700
700
|
}) => {
|
|
701
|
-
const r =
|
|
701
|
+
const r = M();
|
|
702
702
|
return /* @__PURE__ */ t(
|
|
703
703
|
H,
|
|
704
704
|
{
|
|
@@ -777,14 +777,16 @@ const Re = ({
|
|
|
777
777
|
400: "primary.dark",
|
|
778
778
|
500: "primary.darker"
|
|
779
779
|
}, K = ({ divProps: i, image: l, isMini: n = !1 }) => {
|
|
780
|
-
const r =
|
|
780
|
+
const r = M();
|
|
781
|
+
console.log(r);
|
|
782
|
+
const o = F(null);
|
|
781
783
|
return Q(() => {
|
|
782
|
-
if (!
|
|
783
|
-
const
|
|
784
|
-
["brand100", "brand200", "brand300", "brand400", "brand500"].forEach((
|
|
785
|
-
const
|
|
786
|
-
B(
|
|
787
|
-
}), B(
|
|
784
|
+
if (!o.current) return;
|
|
785
|
+
const a = o.current, d = a.querySelectorAll(".Overlay");
|
|
786
|
+
["brand100", "brand200", "brand300", "brand400", "brand500"].forEach((h) => {
|
|
787
|
+
const m = a.querySelectorAll(`.${h}`), u = h.replace("brand", "");
|
|
788
|
+
B(m, R[u]);
|
|
789
|
+
}), B(d, R[300]);
|
|
788
790
|
}, [R]), /* @__PURE__ */ t(
|
|
789
791
|
"div",
|
|
790
792
|
{
|
|
@@ -793,7 +795,7 @@ const Re = ({
|
|
|
793
795
|
width: "100%"
|
|
794
796
|
},
|
|
795
797
|
...i,
|
|
796
|
-
children: /* @__PURE__ */ t(l, { ref:
|
|
798
|
+
children: /* @__PURE__ */ t(l, { ref: o })
|
|
797
799
|
}
|
|
798
800
|
);
|
|
799
801
|
}, Qe = {
|
|
@@ -869,12 +871,12 @@ const Re = ({
|
|
|
869
871
|
title: d
|
|
870
872
|
}) => {
|
|
871
873
|
const [c, h] = U(null);
|
|
872
|
-
return /* @__PURE__ */ s(
|
|
874
|
+
return /* @__PURE__ */ s(w, { children: [
|
|
873
875
|
/* @__PURE__ */ t(
|
|
874
876
|
Ae,
|
|
875
877
|
{
|
|
876
|
-
action: o && i ? /* @__PURE__ */ t($e, { ariaLabel: i, onClick: (
|
|
877
|
-
h(
|
|
878
|
+
action: o && i ? /* @__PURE__ */ t($e, { ariaLabel: i, onClick: (f) => {
|
|
879
|
+
h(f.currentTarget), n?.();
|
|
878
880
|
} }) : null,
|
|
879
881
|
subheader: a ?? null,
|
|
880
882
|
sx: { alignItems: "flex-start", p: 0, mb: 16 },
|
|
@@ -886,8 +888,8 @@ const Re = ({
|
|
|
886
888
|
{
|
|
887
889
|
anchorEl: c,
|
|
888
890
|
handleClose: () => h(null),
|
|
889
|
-
handleMenuItem: (
|
|
890
|
-
h(null), r?.(
|
|
891
|
+
handleMenuItem: (f, E) => {
|
|
892
|
+
h(null), r?.(f, E);
|
|
891
893
|
},
|
|
892
894
|
menuItems: l
|
|
893
895
|
}
|
|
@@ -960,9 +962,9 @@ const Re = ({
|
|
|
960
962
|
isLoading: a = !1,
|
|
961
963
|
errorText: d = "",
|
|
962
964
|
feedback: c
|
|
963
|
-
}) => /* @__PURE__ */ s(
|
|
965
|
+
}) => /* @__PURE__ */ s(w, { children: [
|
|
964
966
|
/* @__PURE__ */ t(t1, { ...r }),
|
|
965
|
-
o ? /* @__PURE__ */ t(_e, { erroredText: d }) : /* @__PURE__ */ s(
|
|
967
|
+
o ? /* @__PURE__ */ t(_e, { erroredText: d }) : /* @__PURE__ */ s(w, { children: [
|
|
966
968
|
/* @__PURE__ */ t(r1, { ...n, hasFooterButton: !!i, children: a ? /* @__PURE__ */ t(l1, {}) : l }),
|
|
967
969
|
i && /* @__PURE__ */ t(Ye, { button: i }),
|
|
968
970
|
c
|
|
@@ -1057,8 +1059,8 @@ const Re = ({
|
|
|
1057
1059
|
setRefs: a
|
|
1058
1060
|
}) => /* @__PURE__ */ t(
|
|
1059
1061
|
({ elementTag: c, children: h, ...m }) => {
|
|
1060
|
-
const
|
|
1061
|
-
return A.createElement(
|
|
1062
|
+
const u = c;
|
|
1063
|
+
return A.createElement(u, m, h);
|
|
1062
1064
|
},
|
|
1063
1065
|
{
|
|
1064
1066
|
"aria-hidden": i,
|
|
@@ -1117,7 +1119,7 @@ const Re = ({
|
|
|
1117
1119
|
onClose: o,
|
|
1118
1120
|
selectedRadio: a
|
|
1119
1121
|
}) => {
|
|
1120
|
-
const d =
|
|
1122
|
+
const d = M(), { cancelText: c, submitText: h } = i, m = J(L)({
|
|
1121
1123
|
backgroundColor: "transparent",
|
|
1122
1124
|
color: d.palette.primary.light,
|
|
1123
1125
|
fontSize: 15,
|
|
@@ -1127,7 +1129,7 @@ const Re = ({
|
|
|
1127
1129
|
},
|
|
1128
1130
|
marginTop: 12,
|
|
1129
1131
|
width: "100%"
|
|
1130
|
-
}),
|
|
1132
|
+
}), u = J(L)({
|
|
1131
1133
|
backgroundColor: d.palette.action.active,
|
|
1132
1134
|
borderRadius: 4,
|
|
1133
1135
|
fontSize: 16,
|
|
@@ -1148,7 +1150,7 @@ const Re = ({
|
|
|
1148
1150
|
},
|
|
1149
1151
|
children: [
|
|
1150
1152
|
/* @__PURE__ */ t(
|
|
1151
|
-
|
|
1153
|
+
u,
|
|
1152
1154
|
{
|
|
1153
1155
|
className: "mx-insights-beat-feedback-submit-button",
|
|
1154
1156
|
"data-ui-test": "submit-button",
|
|
@@ -1235,7 +1237,7 @@ const Re = ({
|
|
|
1235
1237
|
const m = Se(qe)({
|
|
1236
1238
|
height: 93,
|
|
1237
1239
|
resize: "none"
|
|
1238
|
-
}),
|
|
1240
|
+
}), u = Ve();
|
|
1239
1241
|
return /* @__PURE__ */ s(
|
|
1240
1242
|
p,
|
|
1241
1243
|
{
|
|
@@ -1253,8 +1255,8 @@ const Re = ({
|
|
|
1253
1255
|
maxRows: 4,
|
|
1254
1256
|
minRows: 4,
|
|
1255
1257
|
name: "Feedback",
|
|
1256
|
-
onChange: (
|
|
1257
|
-
c(
|
|
1258
|
+
onChange: (f) => {
|
|
1259
|
+
c(f.target.value), h(f.target.value);
|
|
1258
1260
|
},
|
|
1259
1261
|
onClick: () => d(),
|
|
1260
1262
|
placeholder: r,
|
|
@@ -1269,7 +1271,7 @@ const Re = ({
|
|
|
1269
1271
|
C,
|
|
1270
1272
|
{
|
|
1271
1273
|
sx: {
|
|
1272
|
-
color: i &&
|
|
1274
|
+
color: i && u.palette.error.darker,
|
|
1273
1275
|
fontSize: 12,
|
|
1274
1276
|
p: "0px !important"
|
|
1275
1277
|
},
|
|
@@ -1437,8 +1439,8 @@ const Re = ({
|
|
|
1437
1439
|
onClose: c,
|
|
1438
1440
|
sendResponseAnalytics: h,
|
|
1439
1441
|
upperDescription: m,
|
|
1440
|
-
upperList:
|
|
1441
|
-
yesButtonText:
|
|
1442
|
+
upperList: u,
|
|
1443
|
+
yesButtonText: f
|
|
1442
1444
|
}) => /* @__PURE__ */ t(
|
|
1443
1445
|
se,
|
|
1444
1446
|
{
|
|
@@ -1471,7 +1473,7 @@ const Re = ({
|
|
|
1471
1473
|
/* @__PURE__ */ t(_, { sx: { p: "16px 24px 8px 24px", whiteSpace: "wrap" }, children: l }),
|
|
1472
1474
|
/* @__PURE__ */ s(x, { sx: { gap: 12, px: 24 }, children: [
|
|
1473
1475
|
/* @__PURE__ */ t(C, { color: "secondary", fontSize: 13, children: m }),
|
|
1474
|
-
/* @__PURE__ */ t(P, { children:
|
|
1476
|
+
/* @__PURE__ */ t(P, { children: u.map((E, v) => /* @__PURE__ */ s(
|
|
1475
1477
|
j,
|
|
1476
1478
|
{
|
|
1477
1479
|
sx: {
|
|
@@ -1556,7 +1558,7 @@ const Re = ({
|
|
|
1556
1558
|
border: `1px solid ${E.palette.border.main}`,
|
|
1557
1559
|
p: "12 16"
|
|
1558
1560
|
}),
|
|
1559
|
-
children:
|
|
1561
|
+
children: f
|
|
1560
1562
|
}
|
|
1561
1563
|
)
|
|
1562
1564
|
] })
|
|
@@ -1800,8 +1802,8 @@ const Re = ({
|
|
|
1800
1802
|
isMini: c,
|
|
1801
1803
|
leftLowerText: h,
|
|
1802
1804
|
leftUpperText: m,
|
|
1803
|
-
rightLowerText:
|
|
1804
|
-
rightUpperText:
|
|
1805
|
+
rightLowerText: u,
|
|
1806
|
+
rightUpperText: f,
|
|
1805
1807
|
sourceAccountGuid: E
|
|
1806
1808
|
}) => /* @__PURE__ */ t(A.Fragment, { children: d ? /* @__PURE__ */ t(
|
|
1807
1809
|
ie,
|
|
@@ -1813,8 +1815,8 @@ const Re = ({
|
|
|
1813
1815
|
isMini: c,
|
|
1814
1816
|
leftLowerText: h,
|
|
1815
1817
|
leftUpperText: m,
|
|
1816
|
-
rightLowerText:
|
|
1817
|
-
rightUpperText:
|
|
1818
|
+
rightLowerText: u,
|
|
1819
|
+
rightUpperText: f
|
|
1818
1820
|
}
|
|
1819
1821
|
) : /* @__PURE__ */ t(
|
|
1820
1822
|
E1,
|