@mx-cartographer/insights-ui 1.16.11-alpha.lonniem.2 → 1.16.11-alpha.lonniem.3
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 +27 -27
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -349,12 +349,12 @@ const Be = ({
|
|
|
349
349
|
onClose: m,
|
|
350
350
|
open: !!c,
|
|
351
351
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
352
|
-
children: n.map(({ icon: x, key: C, text:
|
|
352
|
+
children: n.map(({ icon: x, key: C, text: M }, f) => /* @__PURE__ */ d(Fe, { onClick: () => E(f, C), sx: { p: 12 }, children: [
|
|
353
353
|
/* @__PURE__ */ e(ie, { sx: { minWidth: "32px !important" }, children: x }),
|
|
354
354
|
/* @__PURE__ */ e(
|
|
355
355
|
re,
|
|
356
356
|
{
|
|
357
|
-
primary:
|
|
357
|
+
primary: M,
|
|
358
358
|
primaryTypographyProps: {
|
|
359
359
|
fontWeight: "normal",
|
|
360
360
|
fontSize: 15,
|
|
@@ -457,7 +457,7 @@ const Be = ({
|
|
|
457
457
|
h.current && f.unobserve(h.current);
|
|
458
458
|
};
|
|
459
459
|
}, []);
|
|
460
|
-
const { ariaLabel: m, category: E, categoryGuid: y, formattedAmount: x, imageSize: C, merchantGuid:
|
|
460
|
+
const { ariaLabel: m, category: E, categoryGuid: y, formattedAmount: x, imageSize: C, merchantGuid: M } = r[n];
|
|
461
461
|
return /* @__PURE__ */ d("g", { "aria-label": m, children: [
|
|
462
462
|
/* @__PURE__ */ e(
|
|
463
463
|
I.rect,
|
|
@@ -469,7 +469,7 @@ const Be = ({
|
|
|
469
469
|
style: o
|
|
470
470
|
}
|
|
471
471
|
),
|
|
472
|
-
(
|
|
472
|
+
(M || y) && /* @__PURE__ */ e(
|
|
473
473
|
I.foreignObject,
|
|
474
474
|
{
|
|
475
475
|
height: C || 32,
|
|
@@ -497,7 +497,7 @@ const Be = ({
|
|
|
497
497
|
{
|
|
498
498
|
alt: E,
|
|
499
499
|
categoryGuid: y || "",
|
|
500
|
-
merchantGuid:
|
|
500
|
+
merchantGuid: M || "",
|
|
501
501
|
size: C || 32
|
|
502
502
|
}
|
|
503
503
|
)
|
|
@@ -548,18 +548,18 @@ const Be = ({
|
|
|
548
548
|
removeSelectedTabColorChange: m,
|
|
549
549
|
onBarClick: E
|
|
550
550
|
}) => {
|
|
551
|
-
const y = F(), { containerRef: x, height: C, width:
|
|
552
|
-
const
|
|
553
|
-
return m ? n.map(() =>
|
|
551
|
+
const y = F(), { containerRef: x, height: C, width: M } = ve(), k = n.reduce((J, H) => Math.min(J, H.value), 1 / 0) < 0, A = me(() => {
|
|
552
|
+
const J = `${r}80`;
|
|
553
|
+
return m ? n.map(() => r) : h === void 0 ? [...new Array(n.length - 1).fill(J), r] : n.map((H, L) => L === h ? r : J);
|
|
554
554
|
}, [r, n, h]), W = He(
|
|
555
|
-
(
|
|
555
|
+
(J, { dataIndex: H }) => E && E(H),
|
|
556
556
|
[E]
|
|
557
557
|
), z = me(() => {
|
|
558
|
-
const
|
|
558
|
+
const J = n.map(({ value: R }) => R), H = Math.min(...J), L = Math.max(...J);
|
|
559
559
|
return {
|
|
560
560
|
series: [
|
|
561
561
|
{
|
|
562
|
-
data:
|
|
562
|
+
data: J,
|
|
563
563
|
type: "bar"
|
|
564
564
|
}
|
|
565
565
|
],
|
|
@@ -598,7 +598,7 @@ const Be = ({
|
|
|
598
598
|
left: o.left
|
|
599
599
|
},
|
|
600
600
|
series: z.series,
|
|
601
|
-
width:
|
|
601
|
+
width: M,
|
|
602
602
|
xAxis: z.xAxis,
|
|
603
603
|
children: [
|
|
604
604
|
t?.average && // show average line if available
|
|
@@ -633,7 +633,7 @@ const Be = ({
|
|
|
633
633
|
position: "bottom",
|
|
634
634
|
slots: {
|
|
635
635
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
636
|
-
axisTickLabel: ({ text:
|
|
636
|
+
axisTickLabel: ({ text: J, ownerState: H, ...L }) => {
|
|
637
637
|
const R = n[h ?? n.length - 1]?.label;
|
|
638
638
|
return /* @__PURE__ */ e(
|
|
639
639
|
"text",
|
|
@@ -641,16 +641,16 @@ const Be = ({
|
|
|
641
641
|
...L,
|
|
642
642
|
style: {
|
|
643
643
|
...L.style,
|
|
644
|
-
fontWeight: !m && R ===
|
|
644
|
+
fontWeight: !m && R === J ? "bold" : 400
|
|
645
645
|
},
|
|
646
|
-
children:
|
|
646
|
+
children: J
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
650
|
},
|
|
651
|
-
sx: (
|
|
651
|
+
sx: (J) => ({
|
|
652
652
|
".MuiChartsAxis-line": {
|
|
653
|
-
stroke: k ? "none" :
|
|
653
|
+
stroke: k ? "none" : J.palette.border?.dark
|
|
654
654
|
// If there is a negative value hide this line and use the reference line
|
|
655
655
|
},
|
|
656
656
|
"MuiChartsAxis-root-MuiChartsXAxis-root": {
|
|
@@ -671,8 +671,8 @@ const Be = ({
|
|
|
671
671
|
{
|
|
672
672
|
onItemClick: W,
|
|
673
673
|
slots: {
|
|
674
|
-
bar: (
|
|
675
|
-
const { ownerState: H, style: L, ...R } =
|
|
674
|
+
bar: (J) => {
|
|
675
|
+
const { ownerState: H, style: L, ...R } = J;
|
|
676
676
|
return /* @__PURE__ */ e(
|
|
677
677
|
rt,
|
|
678
678
|
{
|
|
@@ -716,7 +716,7 @@ const Be = ({
|
|
|
716
716
|
width: l.width
|
|
717
717
|
});
|
|
718
718
|
se(() => {
|
|
719
|
-
const
|
|
719
|
+
const M = new ResizeObserver(() => {
|
|
720
720
|
window.requestAnimationFrame(() => {
|
|
721
721
|
if (a.current) {
|
|
722
722
|
const { width: f } = a.current.getBoundingClientRect(), k = f / 2, A = a.current.querySelector("text");
|
|
@@ -724,8 +724,8 @@ const Be = ({
|
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
726
|
});
|
|
727
|
-
return a.current &&
|
|
728
|
-
a.current &&
|
|
727
|
+
return a.current && M.observe(a.current), () => {
|
|
728
|
+
a.current && M.unobserve(a.current);
|
|
729
729
|
};
|
|
730
730
|
}, []);
|
|
731
731
|
const { ariaLabelComparison: h, ariaLabelMain: m, formattedComparison: E, formattedMain: y } = r[n.index], x = n.type === 0 ? m : h, C = n.type === 0 ? y : E;
|
|
@@ -738,7 +738,7 @@ const Be = ({
|
|
|
738
738
|
fontSize: 11,
|
|
739
739
|
fontWeight: 400,
|
|
740
740
|
textAnchor: "middle",
|
|
741
|
-
transform: c.to((
|
|
741
|
+
transform: c.to((M) => `translate(${M / 2}, -8)`),
|
|
742
742
|
x: l.x,
|
|
743
743
|
y: l.y,
|
|
744
744
|
children: C
|
|
@@ -812,7 +812,7 @@ const Be = ({
|
|
|
812
812
|
},
|
|
813
813
|
onBarClick: m
|
|
814
814
|
}) => {
|
|
815
|
-
const E = F(), { containerRef: y, height: x, width: C } = ve(),
|
|
815
|
+
const E = F(), { containerRef: y, height: x, width: C } = ve(), M = ({ dataIndex: f, seriesId: k }) => {
|
|
816
816
|
const A = k.toString().split("-").pop();
|
|
817
817
|
m?.(f * 2 + Number(A));
|
|
818
818
|
};
|
|
@@ -864,7 +864,7 @@ const Be = ({
|
|
|
864
864
|
/* @__PURE__ */ e(
|
|
865
865
|
Je,
|
|
866
866
|
{
|
|
867
|
-
onItemClick: (f, { dataIndex: k, seriesId: A }) =>
|
|
867
|
+
onItemClick: (f, { dataIndex: k, seriesId: A }) => M({ dataIndex: k, seriesId: A.toString() }),
|
|
868
868
|
slots: {
|
|
869
869
|
bar: (f) => {
|
|
870
870
|
const { ownerState: k, style: A, ...W } = f;
|
|
@@ -1205,8 +1205,8 @@ const de = (t) => {
|
|
|
1205
1205
|
const E = Array.from(h.children).reduce((f, k) => k !== c ? f + k.clientHeight : f, 0), x = h.clientHeight - E, C = parseInt(
|
|
1206
1206
|
window.getComputedStyle(c).lineHeight,
|
|
1207
1207
|
10
|
|
1208
|
-
),
|
|
1209
|
-
|
|
1208
|
+
), M = Math.floor(x / C);
|
|
1209
|
+
M !== l && s(M);
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
1212
|
};
|