@mx-cartographer/insights-ui 1.4.8 → 1.4.9-alpha.mega1
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/components/shared/InsightsCard/CardHeader.d.ts +1 -0
- package/dist/components/shared/InsightsCard/__tests__/CardButtonSection.test.d.ts +1 -0
- package/dist/components/shared/InsightsCard/__tests__/InsightButton.test.d.ts +1 -0
- package/dist/index.es.js +55 -53
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
1
|
+
import { jsx as t, jsxs as s, Fragment as M } 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";
|
|
5
5
|
import { BottomSheetTransition as de, Icon as y, P as C, Text as b, InstitutionLogo as k, H3 as _, Drawer as se, createMXTheme as ce } from "@kyper/mui";
|
|
6
6
|
import he from "react-confetti";
|
|
7
7
|
import p from "@mui/material/Box";
|
|
8
|
-
import
|
|
9
|
-
import { useTheme as
|
|
8
|
+
import H from "@mui/material/Card";
|
|
9
|
+
import { useTheme as w, 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";
|
|
@@ -115,7 +115,7 @@ const Re = ({
|
|
|
115
115
|
return A.useEffect(() => {
|
|
116
116
|
a && c(`${h}%`);
|
|
117
117
|
}, [a, h]), /* @__PURE__ */ t(A.Fragment, { children: /* @__PURE__ */ s(
|
|
118
|
-
|
|
118
|
+
H,
|
|
119
119
|
{
|
|
120
120
|
"data-ui-test": "progress-bar",
|
|
121
121
|
ref: o,
|
|
@@ -162,7 +162,7 @@ const Re = ({
|
|
|
162
162
|
percentageCompleteText: r,
|
|
163
163
|
progressColorOverride: o
|
|
164
164
|
}) => {
|
|
165
|
-
const a =
|
|
165
|
+
const a = w();
|
|
166
166
|
return /* @__PURE__ */ s(
|
|
167
167
|
p,
|
|
168
168
|
{
|
|
@@ -171,7 +171,7 @@ const Re = ({
|
|
|
171
171
|
sx: { marginBottom: 16 },
|
|
172
172
|
children: [
|
|
173
173
|
/* @__PURE__ */ s(
|
|
174
|
-
|
|
174
|
+
H,
|
|
175
175
|
{
|
|
176
176
|
sx: {
|
|
177
177
|
display: "flex",
|
|
@@ -212,7 +212,7 @@ const Re = ({
|
|
|
212
212
|
gradientOverride: l,
|
|
213
213
|
title: n
|
|
214
214
|
}) => {
|
|
215
|
-
const r =
|
|
215
|
+
const r = w();
|
|
216
216
|
return /* @__PURE__ */ s(
|
|
217
217
|
p,
|
|
218
218
|
{
|
|
@@ -223,7 +223,7 @@ const Re = ({
|
|
|
223
223
|
p: 16
|
|
224
224
|
},
|
|
225
225
|
children: [
|
|
226
|
-
/* @__PURE__ */ t(
|
|
226
|
+
/* @__PURE__ */ t(H, { sx: { background: "transparent", boxShadow: "none", marginBottom: 16 }, children: n && /* @__PURE__ */ t(
|
|
227
227
|
C,
|
|
228
228
|
{
|
|
229
229
|
className: "mx-insights-gradient-box-title",
|
|
@@ -262,7 +262,7 @@ const Re = ({
|
|
|
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(
|
|
265
|
-
|
|
265
|
+
H,
|
|
266
266
|
{
|
|
267
267
|
"aria-labelledby": i.guid,
|
|
268
268
|
className: "mx-mini-insight-card",
|
|
@@ -333,7 +333,7 @@ const Re = ({
|
|
|
333
333
|
width: "100%"
|
|
334
334
|
},
|
|
335
335
|
children: [
|
|
336
|
-
r && /* @__PURE__ */ s(
|
|
336
|
+
r && /* @__PURE__ */ s(M, { 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(M, { children: [
|
|
352
352
|
/* @__PURE__ */ t(
|
|
353
353
|
x,
|
|
354
354
|
{
|
|
@@ -386,7 +386,7 @@ const Re = ({
|
|
|
386
386
|
style: r,
|
|
387
387
|
...o
|
|
388
388
|
}) => {
|
|
389
|
-
const a =
|
|
389
|
+
const a = w(), d = F(null);
|
|
390
390
|
re(() => {
|
|
391
391
|
const m = new ResizeObserver(() => {
|
|
392
392
|
if (d.current) {
|
|
@@ -423,13 +423,13 @@ const Re = ({
|
|
|
423
423
|
selectedTabIndex: a,
|
|
424
424
|
onBarClick: d
|
|
425
425
|
}) => {
|
|
426
|
-
const c =
|
|
426
|
+
const c = w(), { 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(
|
|
430
430
|
(g, { dataIndex: q }) => d && d(q),
|
|
431
431
|
[d]
|
|
432
|
-
),
|
|
432
|
+
), v = G(
|
|
433
433
|
() => ({
|
|
434
434
|
series: [
|
|
435
435
|
{
|
|
@@ -454,9 +454,9 @@ const Re = ({
|
|
|
454
454
|
{
|
|
455
455
|
height: m,
|
|
456
456
|
margin: { left: 16, right: 16, top: 38, bottom: 30 },
|
|
457
|
-
series:
|
|
457
|
+
series: v.series,
|
|
458
458
|
width: u,
|
|
459
|
-
xAxis:
|
|
459
|
+
xAxis: v.xAxis,
|
|
460
460
|
children: [
|
|
461
461
|
i?.average && /* @__PURE__ */ t(
|
|
462
462
|
Ee,
|
|
@@ -566,24 +566,24 @@ const Re = ({
|
|
|
566
566
|
display: "flex",
|
|
567
567
|
justifyContent: "center",
|
|
568
568
|
ref: u,
|
|
569
|
-
sx: (
|
|
570
|
-
backgroundColor:
|
|
569
|
+
sx: (v) => ({
|
|
570
|
+
backgroundColor: v.palette.grey[200],
|
|
571
571
|
padding: 16
|
|
572
572
|
}),
|
|
573
573
|
width: "100%",
|
|
574
574
|
children: [
|
|
575
575
|
/* @__PURE__ */ t(ee, { height: f, shouldRun: l.shouldRun, width: E }),
|
|
576
576
|
/* @__PURE__ */ s(
|
|
577
|
-
|
|
577
|
+
H,
|
|
578
578
|
{
|
|
579
579
|
elevation: 1,
|
|
580
|
-
sx: (
|
|
580
|
+
sx: (v) => ({
|
|
581
581
|
display: "flex",
|
|
582
582
|
flexDirection: "column",
|
|
583
583
|
alignItems: "center",
|
|
584
584
|
justifyContent: "center",
|
|
585
585
|
flexWrap: "wrap",
|
|
586
|
-
backgroundColor:
|
|
586
|
+
backgroundColor: v.palette.background.paper,
|
|
587
587
|
borderRadius: "8px",
|
|
588
588
|
overflow: "visible",
|
|
589
589
|
minHeight: 120,
|
|
@@ -619,10 +619,10 @@ const Re = ({
|
|
|
619
619
|
size: a,
|
|
620
620
|
subHeaderString: d,
|
|
621
621
|
textSX: c
|
|
622
|
-
}) => /* @__PURE__ */ s(
|
|
622
|
+
}) => /* @__PURE__ */ s(M, { 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(M, { children: [
|
|
626
626
|
/* @__PURE__ */ t(
|
|
627
627
|
ye,
|
|
628
628
|
{
|
|
@@ -648,9 +648,9 @@ 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 = w();
|
|
652
652
|
return /* @__PURE__ */ s(
|
|
653
|
-
|
|
653
|
+
H,
|
|
654
654
|
{
|
|
655
655
|
sx: {
|
|
656
656
|
backgroundColor: n.palette.background.default,
|
|
@@ -698,9 +698,9 @@ const Re = ({
|
|
|
698
698
|
rightLowerText: l,
|
|
699
699
|
rightUpperText: n
|
|
700
700
|
}) => {
|
|
701
|
-
const r =
|
|
701
|
+
const r = w();
|
|
702
702
|
return /* @__PURE__ */ t(
|
|
703
|
-
|
|
703
|
+
H,
|
|
704
704
|
{
|
|
705
705
|
elevation: 0,
|
|
706
706
|
sx: {
|
|
@@ -823,7 +823,8 @@ const Re = ({
|
|
|
823
823
|
name: "more_horiz",
|
|
824
824
|
size: 24,
|
|
825
825
|
sx: {
|
|
826
|
-
color: "text.primary"
|
|
826
|
+
color: "text.primary",
|
|
827
|
+
fontVariationSettings: "initial"
|
|
827
828
|
}
|
|
828
829
|
}
|
|
829
830
|
)
|
|
@@ -861,31 +862,32 @@ const Re = ({
|
|
|
861
862
|
), t1 = ({
|
|
862
863
|
ariaLabel: i,
|
|
863
864
|
menuItems: l = [],
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
865
|
+
onOpen: n,
|
|
866
|
+
onClick: r,
|
|
867
|
+
shouldShowMenu: o = !1,
|
|
868
|
+
subHeader: a,
|
|
869
|
+
title: d
|
|
868
870
|
}) => {
|
|
869
|
-
const [
|
|
870
|
-
return /* @__PURE__ */ s(
|
|
871
|
+
const [c, h] = U(null);
|
|
872
|
+
return /* @__PURE__ */ s(M, { children: [
|
|
871
873
|
/* @__PURE__ */ t(
|
|
872
874
|
Ae,
|
|
873
875
|
{
|
|
874
|
-
action:
|
|
875
|
-
|
|
876
|
+
action: o && i ? /* @__PURE__ */ t($e, { ariaLabel: i, onClick: (f) => {
|
|
877
|
+
h(f.currentTarget), n?.();
|
|
876
878
|
} }) : null,
|
|
877
|
-
subheader:
|
|
879
|
+
subheader: a ?? null,
|
|
878
880
|
sx: { alignItems: "flex-start", p: 0, mb: 16 },
|
|
879
|
-
title: /* @__PURE__ */ t(_, { children:
|
|
881
|
+
title: /* @__PURE__ */ t(_, { children: d })
|
|
880
882
|
}
|
|
881
883
|
),
|
|
882
|
-
|
|
884
|
+
c && /* @__PURE__ */ t(
|
|
883
885
|
e1,
|
|
884
886
|
{
|
|
885
|
-
anchorEl:
|
|
886
|
-
handleClose: () =>
|
|
887
|
-
handleMenuItem: (
|
|
888
|
-
|
|
887
|
+
anchorEl: c,
|
|
888
|
+
handleClose: () => h(null),
|
|
889
|
+
handleMenuItem: (f, E) => {
|
|
890
|
+
h(null), r?.(f, E);
|
|
889
891
|
},
|
|
890
892
|
menuItems: l
|
|
891
893
|
}
|
|
@@ -958,9 +960,9 @@ const Re = ({
|
|
|
958
960
|
isLoading: a = !1,
|
|
959
961
|
errorText: d = "",
|
|
960
962
|
feedback: c
|
|
961
|
-
}) => /* @__PURE__ */ s(
|
|
963
|
+
}) => /* @__PURE__ */ s(M, { children: [
|
|
962
964
|
/* @__PURE__ */ t(t1, { ...r }),
|
|
963
|
-
o ? /* @__PURE__ */ t(_e, { erroredText: d }) : /* @__PURE__ */ s(
|
|
965
|
+
o ? /* @__PURE__ */ t(_e, { erroredText: d }) : /* @__PURE__ */ s(M, { children: [
|
|
964
966
|
/* @__PURE__ */ t(r1, { ...n, hasFooterButton: !!i, children: a ? /* @__PURE__ */ t(l1, {}) : l }),
|
|
965
967
|
i && /* @__PURE__ */ t(Ye, { button: i }),
|
|
966
968
|
c
|
|
@@ -1115,7 +1117,7 @@ const Re = ({
|
|
|
1115
1117
|
onClose: o,
|
|
1116
1118
|
selectedRadio: a
|
|
1117
1119
|
}) => {
|
|
1118
|
-
const d =
|
|
1120
|
+
const d = w(), { cancelText: c, submitText: h } = i, m = J(L)({
|
|
1119
1121
|
backgroundColor: "transparent",
|
|
1120
1122
|
color: d.palette.primary.light,
|
|
1121
1123
|
fontSize: 15,
|
|
@@ -1469,7 +1471,7 @@ const Re = ({
|
|
|
1469
1471
|
/* @__PURE__ */ t(_, { sx: { p: "16px 24px 8px 24px", whiteSpace: "wrap" }, children: l }),
|
|
1470
1472
|
/* @__PURE__ */ s(x, { sx: { gap: 12, px: 24 }, children: [
|
|
1471
1473
|
/* @__PURE__ */ t(C, { color: "secondary", fontSize: 13, children: m }),
|
|
1472
|
-
/* @__PURE__ */ t(P, { children: u.map((E,
|
|
1474
|
+
/* @__PURE__ */ t(P, { children: u.map((E, v) => /* @__PURE__ */ s(
|
|
1473
1475
|
j,
|
|
1474
1476
|
{
|
|
1475
1477
|
sx: {
|
|
@@ -1499,14 +1501,14 @@ const Re = ({
|
|
|
1499
1501
|
)
|
|
1500
1502
|
]
|
|
1501
1503
|
},
|
|
1502
|
-
`list-item-${
|
|
1504
|
+
`list-item-${v}`
|
|
1503
1505
|
)) })
|
|
1504
1506
|
] })
|
|
1505
1507
|
] }),
|
|
1506
1508
|
/* @__PURE__ */ s(p, { children: [
|
|
1507
1509
|
/* @__PURE__ */ t(b, { bold: !0, fontSize: 15, sx: { p: "16px 24px 8px 24px" }, children: o }),
|
|
1508
1510
|
/* @__PURE__ */ t(C, { color: "secondary", fontSize: 13, sx: { mb: 16, mx: 24 }, children: r }),
|
|
1509
|
-
/* @__PURE__ */ t(P, { sx: { p: "16px 24px" }, children: a.map((E,
|
|
1511
|
+
/* @__PURE__ */ t(P, { sx: { p: "16px 24px" }, children: a.map((E, v) => /* @__PURE__ */ s(
|
|
1510
1512
|
j,
|
|
1511
1513
|
{
|
|
1512
1514
|
sx: (g) => ({
|
|
@@ -1538,7 +1540,7 @@ const Re = ({
|
|
|
1538
1540
|
)
|
|
1539
1541
|
]
|
|
1540
1542
|
},
|
|
1541
|
-
`lower-list-${
|
|
1543
|
+
`lower-list-${v}`
|
|
1542
1544
|
)) })
|
|
1543
1545
|
] }),
|
|
1544
1546
|
/* @__PURE__ */ s(x, { sx: { alignItems: "center", display: "flex", justifyContent: "center", pb: 16 }, children: [
|
|
@@ -1630,7 +1632,7 @@ const Re = ({
|
|
|
1630
1632
|
)
|
|
1631
1633
|
] }) }) });
|
|
1632
1634
|
}, p1 = ({ goalContribution: i }) => /* @__PURE__ */ s(
|
|
1633
|
-
|
|
1635
|
+
H,
|
|
1634
1636
|
{
|
|
1635
1637
|
"data-ui-test": "mefr-body-contributed",
|
|
1636
1638
|
sx: {
|
|
@@ -1653,7 +1655,7 @@ const Re = ({
|
|
|
1653
1655
|
]
|
|
1654
1656
|
}
|
|
1655
1657
|
), u1 = ({ goalCompletionDate: i }) => /* @__PURE__ */ s(
|
|
1656
|
-
|
|
1658
|
+
H,
|
|
1657
1659
|
{
|
|
1658
1660
|
"data-ui-test": "mefr-body-projected",
|
|
1659
1661
|
sx: {
|
|
@@ -1679,7 +1681,7 @@ const Re = ({
|
|
|
1679
1681
|
showGoalContributedLastMonth: i,
|
|
1680
1682
|
totalSavedText: l
|
|
1681
1683
|
}) => /* @__PURE__ */ s(
|
|
1682
|
-
|
|
1684
|
+
H,
|
|
1683
1685
|
{
|
|
1684
1686
|
"data-ui-test": "mefr-body-saved",
|
|
1685
1687
|
sx: {
|