radar-ui 1.1.16 → 1.1.17
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.js +161 -161
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,11 +21,11 @@ var Xe;
|
|
|
21
21
|
function Nt() {
|
|
22
22
|
if (Xe) return Te;
|
|
23
23
|
Xe = 1;
|
|
24
|
-
var t = Re, n = Symbol.for("react.element"), u = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
24
|
+
var t = Re, n = Symbol.for("react.element"), u = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
25
|
function w(E, g, N) {
|
|
26
26
|
var S, I = {}, B = null, Y = null;
|
|
27
27
|
N !== void 0 && (B = "" + N), g.key !== void 0 && (B = "" + g.key), g.ref !== void 0 && (Y = g.ref);
|
|
28
|
-
for (S in g) o.call(g, S) && !
|
|
28
|
+
for (S in g) o.call(g, S) && !y.hasOwnProperty(S) && (I[S] = g[S]);
|
|
29
29
|
if (E && E.defaultProps) for (S in g = E.defaultProps, g) I[S] === void 0 && (I[S] = g[S]);
|
|
30
30
|
return { $$typeof: n, type: E, key: B, ref: Y, props: I, _owner: k.current };
|
|
31
31
|
}
|
|
@@ -44,7 +44,7 @@ var Pe = {};
|
|
|
44
44
|
var qe;
|
|
45
45
|
function It() {
|
|
46
46
|
return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
var t = Re, n = Symbol.for("react.element"), u = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"),
|
|
47
|
+
var t = Re, n = Symbol.for("react.element"), u = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), E = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), H = Symbol.iterator, K = "@@iterator";
|
|
48
48
|
function C(e) {
|
|
49
49
|
if (e === null || typeof e != "object")
|
|
50
50
|
return null;
|
|
@@ -69,10 +69,10 @@ function It() {
|
|
|
69
69
|
Q.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, Q);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var h = !1,
|
|
72
|
+
var h = !1, b = !1, m = !1, x = !1, D = !1, p;
|
|
73
73
|
p = Symbol.for("react.module.reference");
|
|
74
74
|
function L(e) {
|
|
75
|
-
return !!(typeof e == "string" || typeof e == "function" || e === o || e ===
|
|
75
|
+
return !!(typeof e == "string" || typeof e == "function" || e === o || e === y || D || e === k || e === N || e === S || x || e === Y || h || b || m || typeof e == "object" && e !== null && (e.$$typeof === B || e.$$typeof === I || e.$$typeof === w || e.$$typeof === E || e.$$typeof === g || // This needs to include all possible module reference object
|
|
76
76
|
// types supported by any Flight configuration anywhere since
|
|
77
77
|
// we don't know which Flight build this will end up being used
|
|
78
78
|
// with.
|
|
@@ -100,7 +100,7 @@ function It() {
|
|
|
100
100
|
return "Fragment";
|
|
101
101
|
case u:
|
|
102
102
|
return "Portal";
|
|
103
|
-
case
|
|
103
|
+
case y:
|
|
104
104
|
return "Profiler";
|
|
105
105
|
case k:
|
|
106
106
|
return "StrictMode";
|
|
@@ -285,7 +285,7 @@ function It() {
|
|
|
285
285
|
var we = e ? e.displayName || e.name : "", je = we ? W(we) : "";
|
|
286
286
|
return typeof e == "function" && fe.set(e, je), je;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function v(e, a, d) {
|
|
289
289
|
return s(e, !1);
|
|
290
290
|
}
|
|
291
291
|
function O(e) {
|
|
@@ -308,7 +308,7 @@ function It() {
|
|
|
308
308
|
if (typeof e == "object")
|
|
309
309
|
switch (e.$$typeof) {
|
|
310
310
|
case g:
|
|
311
|
-
return
|
|
311
|
+
return v(e.render);
|
|
312
312
|
case I:
|
|
313
313
|
return c(e.type, a, d);
|
|
314
314
|
case B: {
|
|
@@ -634,24 +634,24 @@ React keys must be passed directly to JSX without using spread:
|
|
|
634
634
|
process.env.NODE_ENV === "production" ? Me.exports = Nt() : Me.exports = It();
|
|
635
635
|
var i = Me.exports;
|
|
636
636
|
const $t = ({ column: t, currWidth: n, currMinWidth: u, onResize: o, scrollContainerRef: k }) => {
|
|
637
|
-
const [
|
|
638
|
-
if (!
|
|
639
|
-
const
|
|
640
|
-
let m = Math.min((t == null ? void 0 : t.maxWidth) || 9999999, I +
|
|
641
|
-
const
|
|
642
|
-
|
|
637
|
+
const [y, w] = be(!1), [E, g] = be(null), [N, S] = be(0), [I, B] = be(0), Y = Le(null), H = Le(0), K = Le(!1), C = Le(null), f = ee((h) => {
|
|
638
|
+
if (!y || !E || !t) return;
|
|
639
|
+
const b = h.clientX - N;
|
|
640
|
+
let m = Math.min((t == null ? void 0 : t.maxWidth) || 9999999, I + b);
|
|
641
|
+
const x = k == null ? void 0 : k.current, D = -10, p = 10, L = h.clientX, A = x == null ? void 0 : x.getBoundingClientRect(), P = A == null ? void 0 : A.right;
|
|
642
|
+
x && P && P - L < D && !K.current && (K.current = !0, H.current = m, Y.current = setInterval(() => {
|
|
643
643
|
if (t != null && t.maxWidth && H.current >= (t == null ? void 0 : t.maxWidth)) return;
|
|
644
|
-
const te =
|
|
645
|
-
|
|
644
|
+
const te = x.scrollWidth - x.clientWidth + p;
|
|
645
|
+
x.scrollLeft < te ? (x.scrollLeft += p, H.current += p, console.log("Calling onResize with width:", H.current), o == null || o(E, H.current)) : (console.log("Max scroll reached, but continuing to resize"), H.current += p, o == null || o(E, H.current));
|
|
646
646
|
}, 16)), K.current || o == null || o(E, m);
|
|
647
|
-
}, [
|
|
648
|
-
|
|
649
|
-
}, [
|
|
650
|
-
h.preventDefault(), w(!0), S(h.clientX), B(m), g(
|
|
647
|
+
}, [y, N, I, E, o, k]), r = ee((h) => {
|
|
648
|
+
y && (E && h.clientX - N, Y.current && (console.log("Stopping auto scroll on mouse up"), clearInterval(Y.current), Y.current = null), K.current = !1, w(!1), S(0), B(0), g(null), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", r));
|
|
649
|
+
}, [y, E, N, I, f]), l = ee((h, b, m) => {
|
|
650
|
+
h.preventDefault(), w(!0), S(h.clientX), B(m), g(b);
|
|
651
651
|
}, []);
|
|
652
652
|
return Ie(() => {
|
|
653
|
-
|
|
654
|
-
}, [
|
|
653
|
+
y && (document.addEventListener("mousemove", f), document.addEventListener("mouseup", r));
|
|
654
|
+
}, [y, f, r]), Ie(() => () => {
|
|
655
655
|
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", r);
|
|
656
656
|
}, [f, r]), /* @__PURE__ */ i.jsx(
|
|
657
657
|
"button",
|
|
@@ -664,10 +664,10 @@ const $t = ({ column: t, currWidth: n, currMinWidth: u, onResize: o, scrollConta
|
|
|
664
664
|
}
|
|
665
665
|
);
|
|
666
666
|
}, Ft = ({ text: t, children: n }) => {
|
|
667
|
-
const [u, o] = be(!1), [k,
|
|
667
|
+
const [u, o] = be(!1), [k, y] = be("left"), w = Le(null), E = () => {
|
|
668
668
|
if (w.current) {
|
|
669
669
|
const g = w.current.getBoundingClientRect(), N = window.innerWidth, S = 250, I = 20, B = N - g.left, Y = g.right;
|
|
670
|
-
B < S + I && Y > S + I ?
|
|
670
|
+
B < S + I && Y > S + I ? y("right") : y("left");
|
|
671
671
|
}
|
|
672
672
|
o(!0);
|
|
673
673
|
};
|
|
@@ -705,7 +705,7 @@ function At({
|
|
|
705
705
|
fullConfig: n,
|
|
706
706
|
onColumnReorder: u
|
|
707
707
|
}) {
|
|
708
|
-
const [o, k] = be(null),
|
|
708
|
+
const [o, k] = be(null), y = jt(
|
|
709
709
|
Ke(kt, {
|
|
710
710
|
activationConstraint: {
|
|
711
711
|
distance: 5
|
|
@@ -719,7 +719,7 @@ function At({
|
|
|
719
719
|
const f = St(C);
|
|
720
720
|
if (f.length > 0) {
|
|
721
721
|
const h = f.filter(
|
|
722
|
-
(
|
|
722
|
+
(b) => b.id.toString().startsWith("drop-zone-")
|
|
723
723
|
);
|
|
724
724
|
if (h.length > 0)
|
|
725
725
|
return console.log("🎯 Pointer collision found:", h[0].id), h;
|
|
@@ -729,12 +729,12 @@ function At({
|
|
|
729
729
|
);
|
|
730
730
|
return l.length > 0 ? (console.log("📦 Rect collision found:", l[0].id), [l[0]]) : [];
|
|
731
731
|
}, []), E = ee((C) => C.some((f) => f.children && f.children.length > 0), []), g = ee((C, f) => {
|
|
732
|
-
const r = (l, h,
|
|
733
|
-
for (const
|
|
734
|
-
if (
|
|
735
|
-
return { column:
|
|
736
|
-
if (
|
|
737
|
-
const D = r(
|
|
732
|
+
const r = (l, h, b = 0, m = null) => {
|
|
733
|
+
for (const x of l) {
|
|
734
|
+
if (x.key === h)
|
|
735
|
+
return { column: x, parent: m, level: b };
|
|
736
|
+
if (x.children && x.children.length > 0) {
|
|
737
|
+
const D = r(x.children, h, b + 1, x);
|
|
738
738
|
if (D) return D;
|
|
739
739
|
}
|
|
740
740
|
}
|
|
@@ -746,7 +746,7 @@ function At({
|
|
|
746
746
|
const r = g(f, C);
|
|
747
747
|
return r && (r.column.fixed || ((l = r.parent) == null ? void 0 : l.fixed)) || !1;
|
|
748
748
|
}, [g]), S = ee((C, f) => {
|
|
749
|
-
var h,
|
|
749
|
+
var h, b, m, x;
|
|
750
750
|
if (C.columnKey === f.columnKey)
|
|
751
751
|
return !1;
|
|
752
752
|
const r = N(C.columnKey, n), l = N(f.columnKey, n);
|
|
@@ -768,7 +768,7 @@ function At({
|
|
|
768
768
|
draggedLevel: D.level,
|
|
769
769
|
targetLevel: p.level,
|
|
770
770
|
draggedParent: (h = D.parent) == null ? void 0 : h.key,
|
|
771
|
-
targetParent: (
|
|
771
|
+
targetParent: (b = p.parent) == null ? void 0 : b.key
|
|
772
772
|
}), P && M;
|
|
773
773
|
}
|
|
774
774
|
if (L && A) {
|
|
@@ -779,7 +779,7 @@ function At({
|
|
|
779
779
|
draggedLevel: D.level,
|
|
780
780
|
targetLevel: p.level,
|
|
781
781
|
draggedParent: (m = D.parent) == null ? void 0 : m.key,
|
|
782
|
-
targetParent: (
|
|
782
|
+
targetParent: (x = p.parent) == null ? void 0 : x.key
|
|
783
783
|
}), P && M;
|
|
784
784
|
}
|
|
785
785
|
return console.log("❌ Mixed group/leaf drop rejected", {
|
|
@@ -802,7 +802,7 @@ function At({
|
|
|
802
802
|
const l = g(n, C), h = g(n, f);
|
|
803
803
|
if (!l || !h)
|
|
804
804
|
return console.log("❌ Column info not found in complex config"), r;
|
|
805
|
-
const
|
|
805
|
+
const b = JSON.parse(JSON.stringify(n)), m = (Z, re) => {
|
|
806
806
|
if (re === null)
|
|
807
807
|
return { container: Z, parentObj: null };
|
|
808
808
|
const q = (X) => {
|
|
@@ -820,7 +820,7 @@ function At({
|
|
|
820
820
|
container: (se == null ? void 0 : se.children) || Z,
|
|
821
821
|
parentObj: se
|
|
822
822
|
};
|
|
823
|
-
},
|
|
823
|
+
}, x = ((U = l.parent) == null ? void 0 : U.key) || null, D = ((ue = h.parent) == null ? void 0 : ue.key) || null, { container: p } = m(b, x), { container: L } = m(b, D);
|
|
824
824
|
if (p !== L)
|
|
825
825
|
return console.log("❌ Different containers for drag and target"), r;
|
|
826
826
|
const A = p.findIndex((Z) => Z.key === C), P = p.findIndex((Z) => Z.key === f);
|
|
@@ -837,8 +837,8 @@ function At({
|
|
|
837
837
|
draggedIndex: A,
|
|
838
838
|
targetIndex: P,
|
|
839
839
|
insertIndex: te,
|
|
840
|
-
parentKey:
|
|
841
|
-
}),
|
|
840
|
+
parentKey: x
|
|
841
|
+
}), b;
|
|
842
842
|
}, [n, E, g]), B = ee((C) => {
|
|
843
843
|
const f = C.active.data.current;
|
|
844
844
|
k(f), document.body.style.cursor = "grabbing", console.log("🚀 Drag started:", f);
|
|
@@ -853,10 +853,10 @@ function At({
|
|
|
853
853
|
document.body.style.cursor = "grabbing";
|
|
854
854
|
return;
|
|
855
855
|
}
|
|
856
|
-
const
|
|
857
|
-
document.body.style.cursor =
|
|
856
|
+
const b = S(l, h);
|
|
857
|
+
document.body.style.cursor = b ? "copy" : "not-allowed", console.log("🎯 Drag over:", {
|
|
858
858
|
target: h.columnKey,
|
|
859
|
-
isValid:
|
|
859
|
+
isValid: b,
|
|
860
860
|
draggedType: l.isLeaf ? "leaf" : "group",
|
|
861
861
|
targetType: h.isLeaf ? "leaf" : "group"
|
|
862
862
|
});
|
|
@@ -872,18 +872,18 @@ function At({
|
|
|
872
872
|
return;
|
|
873
873
|
}
|
|
874
874
|
if (console.log("✅ Valid drop:", { dragData: l, dropData: h }), u) {
|
|
875
|
-
const
|
|
875
|
+
const b = I(
|
|
876
876
|
l.columnKey,
|
|
877
877
|
h.columnKey,
|
|
878
878
|
n
|
|
879
879
|
);
|
|
880
|
-
|
|
880
|
+
b._dragInfo = {
|
|
881
881
|
draggedKey: l.columnKey,
|
|
882
882
|
targetKey: h.columnKey,
|
|
883
883
|
draggedIndex: l.index,
|
|
884
884
|
targetIndex: -1
|
|
885
885
|
// будет вычислен в TableHeader если нужно
|
|
886
|
-
}, u(
|
|
886
|
+
}, u(b), console.log("🔄 Column reorder executed");
|
|
887
887
|
}
|
|
888
888
|
}, [S, u, I, n]), K = {
|
|
889
889
|
activeColumn: o,
|
|
@@ -892,7 +892,7 @@ function At({
|
|
|
892
892
|
return /* @__PURE__ */ i.jsx(at.Provider, { value: K, children: /* @__PURE__ */ i.jsxs(
|
|
893
893
|
Ot,
|
|
894
894
|
{
|
|
895
|
-
sensors:
|
|
895
|
+
sensors: y,
|
|
896
896
|
collisionDetection: w,
|
|
897
897
|
onDragStart: B,
|
|
898
898
|
onDragOver: Y,
|
|
@@ -916,7 +916,7 @@ function Mt({
|
|
|
916
916
|
config: u,
|
|
917
917
|
fullConfig: o,
|
|
918
918
|
sorting: k,
|
|
919
|
-
onSort:
|
|
919
|
+
onSort: y,
|
|
920
920
|
onResize: w,
|
|
921
921
|
sortIcon: E,
|
|
922
922
|
resizeable: g,
|
|
@@ -941,22 +941,22 @@ function Mt({
|
|
|
941
941
|
if (s.key === fe)
|
|
942
942
|
return pe;
|
|
943
943
|
if (s.children && s.children.length > 0) {
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
944
|
+
const v = W(s.children, fe, s);
|
|
945
|
+
if (v !== null) return v;
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
return null;
|
|
949
949
|
};
|
|
950
950
|
return W(o, _);
|
|
951
|
-
}, [o])(t.key),
|
|
951
|
+
}, [o])(t.key), x = t.fixed || (m == null ? void 0 : m.fixed) || !1, p = ee((_) => {
|
|
952
952
|
if (!o) return 0;
|
|
953
953
|
const W = (ie, fe, pe = 0) => {
|
|
954
954
|
for (const s of ie) {
|
|
955
955
|
if (s.key === fe)
|
|
956
956
|
return pe;
|
|
957
957
|
if (s.children && s.children.length > 0) {
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
958
|
+
const v = W(s.children, fe, pe + 1);
|
|
959
|
+
if (v !== -1) return v;
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
return -1;
|
|
@@ -972,7 +972,7 @@ function Mt({
|
|
|
972
972
|
data: {
|
|
973
973
|
type: "table-column",
|
|
974
974
|
columnKey: t.key,
|
|
975
|
-
isFixed:
|
|
975
|
+
isFixed: x,
|
|
976
976
|
parentKey: m == null ? void 0 : m.key,
|
|
977
977
|
level: p,
|
|
978
978
|
index: n,
|
|
@@ -988,8 +988,8 @@ function Mt({
|
|
|
988
988
|
data: {
|
|
989
989
|
type: "column-drop-zone",
|
|
990
990
|
columnKey: t.key,
|
|
991
|
-
isFixed:
|
|
992
|
-
accepts: [
|
|
991
|
+
isFixed: x,
|
|
992
|
+
accepts: [x ? "fixed" : "non-fixed"],
|
|
993
993
|
isLeaf: l
|
|
994
994
|
// ✅ Добавляем информацию о типе колонки
|
|
995
995
|
},
|
|
@@ -1001,12 +1001,12 @@ function Mt({
|
|
|
1001
1001
|
const _ = {
|
|
1002
1002
|
type: "column-drop-zone",
|
|
1003
1003
|
columnKey: t.key,
|
|
1004
|
-
isFixed:
|
|
1005
|
-
accepts: [
|
|
1004
|
+
isFixed: x,
|
|
1005
|
+
accepts: [x ? "fixed" : "non-fixed"],
|
|
1006
1006
|
isLeaf: l
|
|
1007
1007
|
};
|
|
1008
1008
|
return r(f, _);
|
|
1009
|
-
}, [f, U, t.key,
|
|
1009
|
+
}, [f, U, t.key, x, r, l]), re = Ne(() => M ? "grabbing" : U && f ? Z ? "copy" : "not-allowed" : "default", [M, U, f, Z]), q = t.fixed && !t.width ? 200 : t.width, se = t.fixed && !t.minWidth ? 200 : t.minWidth;
|
|
1010
1010
|
let X = t.fixedLeft ? t.fixedLeft : 0;
|
|
1011
1011
|
if (n !== 0)
|
|
1012
1012
|
for (let _ = 0; _ < n; _++) {
|
|
@@ -1022,8 +1022,8 @@ function Mt({
|
|
|
1022
1022
|
if (s.children) {
|
|
1023
1023
|
if (s.children.some((O) => O.key === pe))
|
|
1024
1024
|
return s;
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1025
|
+
const v = W(s.children, pe);
|
|
1026
|
+
if (v) return v;
|
|
1027
1027
|
}
|
|
1028
1028
|
return null;
|
|
1029
1029
|
}, ie = W(o, _.key);
|
|
@@ -1098,7 +1098,7 @@ function Mt({
|
|
|
1098
1098
|
columnKey: t.key,
|
|
1099
1099
|
direction: "ASC"
|
|
1100
1100
|
};
|
|
1101
|
-
_ === "ASC" && (W.direction = "DESC"), _ === "DESC" && (W.columnKey = void 0, W.direction = void 0),
|
|
1101
|
+
_ === "ASC" && (W.direction = "DESC"), _ === "DESC" && (W.columnKey = void 0, W.direction = void 0), y(W.columnKey, W.direction);
|
|
1102
1102
|
},
|
|
1103
1103
|
style: {
|
|
1104
1104
|
cursor: t.sortable ? "pointer" : "default",
|
|
@@ -1112,7 +1112,7 @@ function Mt({
|
|
|
1112
1112
|
"button",
|
|
1113
1113
|
{
|
|
1114
1114
|
className: "radar-table__sort-button",
|
|
1115
|
-
onClick: (_) =>
|
|
1115
|
+
onClick: (_) => y(t.key, "ASC"),
|
|
1116
1116
|
title: `Сортировать по ${t.title}`,
|
|
1117
1117
|
children: /* @__PURE__ */ i.jsx("svg", { width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: 12, height: 7 }, children: /* @__PURE__ */ i.jsx("path", { fill: ne, d: "M4.99264 0.21967C5.28553 -0.0732233 5.76041 -0.0732233 6.0533 0.21967L10.8263 4.99264C11.1192 5.28553 11.1192 5.76041 10.8263 6.0533C10.5334 6.34619 10.0585 6.34619 9.76561 6.0533L6.27297 2.56066L5.5 1.78769L4.77297 2.56066L1.28033 6.0533C0.987437 6.34619 0.512563 6.34619 0.21967 6.0533C-0.0732234 5.76041 -0.0732234 5.28553 0.21967 4.99264L4.99264 0.21967Z" }) })
|
|
1118
1118
|
}
|
|
@@ -1121,7 +1121,7 @@ function Mt({
|
|
|
1121
1121
|
"button",
|
|
1122
1122
|
{
|
|
1123
1123
|
className: "radar-table__sort-button",
|
|
1124
|
-
onClick: (_) =>
|
|
1124
|
+
onClick: (_) => y(t.key, "DESC"),
|
|
1125
1125
|
title: `Сортировать по ${t.title}`,
|
|
1126
1126
|
children: /* @__PURE__ */ i.jsx("svg", { width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: 12, height: 7 }, children: /* @__PURE__ */ i.jsx("path", { fill: ae, d: "M4.99264 6.78033C5.28553 7.07322 5.76041 7.07322 6.0533 6.78033L10.8263 2.00736C11.1192 1.71447 11.1192 1.23959 10.8263 0.946699C10.5334 0.653806 10.0585 0.653806 9.76561 0.946699L6.27297 4.43934L5.5 5.21231L4.77297 4.43934L1.28033 0.946699C0.987437 0.653806 0.512563 0.653806 0.21967 0.946699C-0.0732234 1.23959 -0.0732234 1.71447 0.21967 2.00736L4.99264 6.78033Z" }) })
|
|
1127
1127
|
}
|
|
@@ -1152,7 +1152,7 @@ function Qe({
|
|
|
1152
1152
|
onResize: o,
|
|
1153
1153
|
onColumnReorder: k,
|
|
1154
1154
|
// ✅ Сохранен (понадобится для передачи в TableDndProvider)
|
|
1155
|
-
sortIcon:
|
|
1155
|
+
sortIcon: y,
|
|
1156
1156
|
resizeable: w,
|
|
1157
1157
|
draggableColumns: E,
|
|
1158
1158
|
preset: g,
|
|
@@ -1171,13 +1171,13 @@ function Qe({
|
|
|
1171
1171
|
const [l, h] = be({
|
|
1172
1172
|
sort_field: void 0,
|
|
1173
1173
|
sort_order: void 0
|
|
1174
|
-
}),
|
|
1174
|
+
}), b = ee((m, x) => {
|
|
1175
1175
|
const { sort_field: D, sort_order: p } = l;
|
|
1176
1176
|
let L = {
|
|
1177
1177
|
sort_field: m,
|
|
1178
|
-
sort_order:
|
|
1178
|
+
sort_order: x
|
|
1179
1179
|
};
|
|
1180
|
-
D === m && p ===
|
|
1180
|
+
D === m && p === x && (L = {
|
|
1181
1181
|
sort_field: void 0,
|
|
1182
1182
|
sort_order: void 0
|
|
1183
1183
|
}), console.log("newSortingState", L), h(L), u == null || u(L.sort_field, L.sort_order);
|
|
@@ -1187,17 +1187,17 @@ function Qe({
|
|
|
1187
1187
|
{
|
|
1188
1188
|
className: `radar-table__header-row ${g ? g + "__header-row" : ""} ${I || ""}`,
|
|
1189
1189
|
style: B,
|
|
1190
|
-
children: t.map((m,
|
|
1190
|
+
children: t.map((m, x) => /* @__PURE__ */ i.jsx(
|
|
1191
1191
|
Mt,
|
|
1192
1192
|
{
|
|
1193
1193
|
column: m,
|
|
1194
|
-
index:
|
|
1194
|
+
index: x,
|
|
1195
1195
|
config: t,
|
|
1196
1196
|
fullConfig: n,
|
|
1197
1197
|
sorting: l,
|
|
1198
|
-
onSort:
|
|
1198
|
+
onSort: b,
|
|
1199
1199
|
onResize: o,
|
|
1200
|
-
sortIcon:
|
|
1200
|
+
sortIcon: y,
|
|
1201
1201
|
resizeable: w,
|
|
1202
1202
|
draggableColumns: E,
|
|
1203
1203
|
preset: g,
|
|
@@ -1219,7 +1219,7 @@ function Vt(t) {
|
|
|
1219
1219
|
preset: u,
|
|
1220
1220
|
headerClassName: o,
|
|
1221
1221
|
headerStyle: k,
|
|
1222
|
-
stickyHeader:
|
|
1222
|
+
stickyHeader: y,
|
|
1223
1223
|
headerRowClassName: w,
|
|
1224
1224
|
headerRowStyle: E,
|
|
1225
1225
|
headerCellClassName: g,
|
|
@@ -1231,16 +1231,16 @@ function Vt(t) {
|
|
|
1231
1231
|
} = t, H = n.some((r) => r.children && r.children.length > 0), K = Ne(() => {
|
|
1232
1232
|
if (!H)
|
|
1233
1233
|
return null;
|
|
1234
|
-
const r = {}, l = (h,
|
|
1235
|
-
r[
|
|
1236
|
-
m.hidden || (r[
|
|
1234
|
+
const r = {}, l = (h, b = 0) => {
|
|
1235
|
+
r[b] || (r[b] = []), h.forEach((m) => {
|
|
1236
|
+
m.hidden || (r[b].push(m), m.children && m.children.length > 0 && l(m.children, b + 1));
|
|
1237
1237
|
});
|
|
1238
1238
|
};
|
|
1239
1239
|
return l(n), r;
|
|
1240
1240
|
}, [n, H]), C = ee((r, l) => {
|
|
1241
1241
|
if (!B) return;
|
|
1242
|
-
const h = (
|
|
1243
|
-
for (const p of
|
|
1242
|
+
const h = (x, D) => {
|
|
1243
|
+
for (const p of x) {
|
|
1244
1244
|
if (p.key === D) return p;
|
|
1245
1245
|
if (p.children) {
|
|
1246
1246
|
const L = h(p.children, D);
|
|
@@ -1248,20 +1248,20 @@ function Vt(t) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
return null;
|
|
1251
|
-
},
|
|
1252
|
-
if (!
|
|
1253
|
-
return [
|
|
1251
|
+
}, b = (x) => {
|
|
1252
|
+
if (!x.children || x.children.length === 0)
|
|
1253
|
+
return [x];
|
|
1254
1254
|
const D = [];
|
|
1255
|
-
return
|
|
1256
|
-
p.hidden || D.push(...
|
|
1255
|
+
return x.children.forEach((p) => {
|
|
1256
|
+
p.hidden || D.push(...b(p));
|
|
1257
1257
|
}), D;
|
|
1258
1258
|
}, m = h(n, r);
|
|
1259
1259
|
if (m)
|
|
1260
1260
|
if (m.children && m.children.length > 0) {
|
|
1261
|
-
const
|
|
1262
|
-
if (
|
|
1263
|
-
const D =
|
|
1264
|
-
|
|
1261
|
+
const x = b(m);
|
|
1262
|
+
if (x.length > 0) {
|
|
1263
|
+
const D = x.reduce((L, A) => L + (A.width || A.minWidth || 200), 0), p = l / D;
|
|
1264
|
+
x.forEach((L) => {
|
|
1265
1265
|
const A = Math.max(50, Math.round((L.width || L.minWidth || 200) * p));
|
|
1266
1266
|
B(L.key, A);
|
|
1267
1267
|
});
|
|
@@ -1298,10 +1298,10 @@ function Vt(t) {
|
|
|
1298
1298
|
return JSON.stringify($) === JSON.stringify(ne);
|
|
1299
1299
|
}))
|
|
1300
1300
|
return;
|
|
1301
|
-
const
|
|
1302
|
-
if (!(
|
|
1301
|
+
const b = r._dragInfo;
|
|
1302
|
+
if (!(b != null && b.draggedKey) || !(b != null && b.targetKey))
|
|
1303
1303
|
return;
|
|
1304
|
-
const { draggedKey: m, targetKey:
|
|
1304
|
+
const { draggedKey: m, targetKey: x } = b, D = l(n, m), p = l(n, x);
|
|
1305
1305
|
if (!D || !p) return;
|
|
1306
1306
|
const { column: L, parent: A, path: P, level: M } = D, { column: te, parent: U, path: ue, level: Z } = p, re = (J, $) => J.fixed || ($ == null ? void 0 : $.fixed) || !1, q = re(L, A), se = re(te, U);
|
|
1307
1307
|
if (M !== Z || A !== U || A && U && A.key !== U.key || q !== se)
|
|
@@ -1330,8 +1330,8 @@ function Vt(t) {
|
|
|
1330
1330
|
{
|
|
1331
1331
|
className: `radar-table__header ${u ? u + "__header" : ""} ${o}`,
|
|
1332
1332
|
style: {
|
|
1333
|
-
position:
|
|
1334
|
-
top:
|
|
1333
|
+
position: y ? "sticky" : "static",
|
|
1334
|
+
top: y && typeof y == "number" ? y : 0,
|
|
1335
1335
|
...k
|
|
1336
1336
|
},
|
|
1337
1337
|
children: Object.keys(K).map((r) => {
|
|
@@ -1352,14 +1352,14 @@ function Vt(t) {
|
|
|
1352
1352
|
headerRowClassName: w,
|
|
1353
1353
|
headerRowStyle: {
|
|
1354
1354
|
...E,
|
|
1355
|
-
position:
|
|
1356
|
-
top:
|
|
1355
|
+
position: y ? "sticky" : "static",
|
|
1356
|
+
top: y && typeof y == "number" ? y + (h - 1) * 50 : 0
|
|
1357
1357
|
},
|
|
1358
1358
|
headerCellClassName: g,
|
|
1359
1359
|
headerCellStyle: N,
|
|
1360
1360
|
headerCellWrapperClassName: S,
|
|
1361
1361
|
headerCellWrapperStyle: I,
|
|
1362
|
-
stickyHeader:
|
|
1362
|
+
stickyHeader: y,
|
|
1363
1363
|
sortIcon: t.sortIcon,
|
|
1364
1364
|
scrollContainerRef: t.scrollContainerRef
|
|
1365
1365
|
},
|
|
@@ -1372,8 +1372,8 @@ function Vt(t) {
|
|
|
1372
1372
|
{
|
|
1373
1373
|
className: `radar-table__header ${u ? u + "__header" : ""} ${o}`,
|
|
1374
1374
|
style: {
|
|
1375
|
-
position:
|
|
1376
|
-
top:
|
|
1375
|
+
position: y ? "sticky" : "static",
|
|
1376
|
+
top: y && typeof y == "number" ? y : 0,
|
|
1377
1377
|
...k
|
|
1378
1378
|
},
|
|
1379
1379
|
children: /* @__PURE__ */ i.jsx(Qe, { ...t, fullConfig: n, onResize: C, onColumnReorder: f, scrollContainerRef: t.scrollContainerRef })
|
|
@@ -1398,7 +1398,7 @@ function Bt({
|
|
|
1398
1398
|
config: u,
|
|
1399
1399
|
rowKey: o,
|
|
1400
1400
|
loading: k = !1,
|
|
1401
|
-
onRowReorder:
|
|
1401
|
+
onRowReorder: y,
|
|
1402
1402
|
preset: w,
|
|
1403
1403
|
customCellRender: E,
|
|
1404
1404
|
treeMode: g,
|
|
@@ -1414,9 +1414,9 @@ function Bt({
|
|
|
1414
1414
|
bodyCellClassName: r,
|
|
1415
1415
|
bodyCellStyle: l,
|
|
1416
1416
|
bodyCellWrapperClassName: h,
|
|
1417
|
-
bodyCellWrapperStyle:
|
|
1417
|
+
bodyCellWrapperStyle: b,
|
|
1418
1418
|
noDataRender: m,
|
|
1419
|
-
scrollContainerRef:
|
|
1419
|
+
scrollContainerRef: x,
|
|
1420
1420
|
recalculateRowHeight: D
|
|
1421
1421
|
}) {
|
|
1422
1422
|
var pe;
|
|
@@ -1424,8 +1424,8 @@ function Bt({
|
|
|
1424
1424
|
N || te(new Set(s)), I == null || I(s);
|
|
1425
1425
|
}, [N, I]), Z = ee((s) => o ? o(s) : JSON.stringify(s), [o]), re = Re.useMemo(() => {
|
|
1426
1426
|
if (!g) return [];
|
|
1427
|
-
const s = [],
|
|
1428
|
-
return
|
|
1427
|
+
const s = [], v = n;
|
|
1428
|
+
return v.forEach((O, c) => {
|
|
1429
1429
|
const T = Z(O), V = O == null ? void 0 : O.children;
|
|
1430
1430
|
s.push({
|
|
1431
1431
|
record: O,
|
|
@@ -1433,7 +1433,7 @@ function Bt({
|
|
|
1433
1433
|
type: "parent",
|
|
1434
1434
|
depth: 0,
|
|
1435
1435
|
indexWithinGroup: c,
|
|
1436
|
-
groupSize:
|
|
1436
|
+
groupSize: v.length
|
|
1437
1437
|
}), V && V.length > 0 && U.has(T) && V.forEach((R, he) => {
|
|
1438
1438
|
s.push({
|
|
1439
1439
|
record: R,
|
|
@@ -1448,11 +1448,11 @@ function Bt({
|
|
|
1448
1448
|
}), s;
|
|
1449
1449
|
}, [g, n, Z, U]), q = Re.useMemo(() => {
|
|
1450
1450
|
const s = /* @__PURE__ */ new Map();
|
|
1451
|
-
return re.forEach((
|
|
1451
|
+
return re.forEach((v) => s.set(v.key, v)), s;
|
|
1452
1452
|
}, [re]);
|
|
1453
1453
|
Ie(() => {
|
|
1454
1454
|
Jt && D && (() => {
|
|
1455
|
-
const
|
|
1455
|
+
const v = document.querySelectorAll(".radar-table__body-row");
|
|
1456
1456
|
document.querySelectorAll(".radar-table__header-row").forEach((c) => {
|
|
1457
1457
|
const T = c.querySelectorAll(".radar-table__header-cell-wrapper");
|
|
1458
1458
|
let V = 0;
|
|
@@ -1461,7 +1461,7 @@ function Bt({
|
|
|
1461
1461
|
}), T.forEach((R) => {
|
|
1462
1462
|
R.style.height = V + "px";
|
|
1463
1463
|
});
|
|
1464
|
-
}),
|
|
1464
|
+
}), v.forEach((c) => {
|
|
1465
1465
|
const T = c.querySelectorAll(".radar-table__body-cell-wrapper");
|
|
1466
1466
|
let V = 0;
|
|
1467
1467
|
T.forEach((R) => {
|
|
@@ -1473,33 +1473,33 @@ function Bt({
|
|
|
1473
1473
|
})();
|
|
1474
1474
|
}, [n, u]);
|
|
1475
1475
|
const X = ((s) => {
|
|
1476
|
-
const
|
|
1476
|
+
const v = [], O = (c) => {
|
|
1477
1477
|
c.forEach((T) => {
|
|
1478
|
-
T.children && T.children.length > 0 ? O(T.children) :
|
|
1478
|
+
T.children && T.children.length > 0 ? O(T.children) : v.push(T);
|
|
1479
1479
|
});
|
|
1480
1480
|
};
|
|
1481
|
-
return O(s),
|
|
1481
|
+
return O(s), v;
|
|
1482
1482
|
})(u), J = (s) => {
|
|
1483
1483
|
if (s.groupColor)
|
|
1484
1484
|
return s.groupColor;
|
|
1485
|
-
const
|
|
1485
|
+
const v = (c, T) => {
|
|
1486
1486
|
for (const V of c)
|
|
1487
1487
|
if (V.children) {
|
|
1488
1488
|
if (V.children.some((he) => he.key === T))
|
|
1489
1489
|
return V;
|
|
1490
|
-
const R =
|
|
1490
|
+
const R = v(V.children, T);
|
|
1491
1491
|
if (R) return R;
|
|
1492
1492
|
}
|
|
1493
1493
|
return null;
|
|
1494
|
-
}, O =
|
|
1494
|
+
}, O = v(u, s.key);
|
|
1495
1495
|
return O == null ? void 0 : O.groupColor;
|
|
1496
|
-
}, $ = ee((s,
|
|
1497
|
-
if (!
|
|
1496
|
+
}, $ = ee((s, v) => {
|
|
1497
|
+
if (!v) {
|
|
1498
1498
|
s.preventDefault();
|
|
1499
1499
|
return;
|
|
1500
1500
|
}
|
|
1501
|
-
L(
|
|
1502
|
-
const O = n.find((c) => (o ? o(c) : JSON.stringify(c)) ===
|
|
1501
|
+
L(v), s.dataTransfer.effectAllowed = "move", s.dataTransfer.setData("text/plain", v), document.body.style.cursor = "grabbing";
|
|
1502
|
+
const O = n.find((c) => (o ? o(c) : JSON.stringify(c)) === v);
|
|
1503
1503
|
if (O) {
|
|
1504
1504
|
const c = document.createElement("div");
|
|
1505
1505
|
c.style.cssText = `
|
|
@@ -1530,38 +1530,38 @@ function Bt({
|
|
|
1530
1530
|
}
|
|
1531
1531
|
}, []), ne = ee((s) => {
|
|
1532
1532
|
s.preventDefault(), s.dataTransfer.dropEffect = "move";
|
|
1533
|
-
}, []), ae = ee((s,
|
|
1533
|
+
}, []), ae = ee((s, v) => {
|
|
1534
1534
|
if (s.preventDefault(), !p) return;
|
|
1535
1535
|
if (!g) {
|
|
1536
|
-
p !==
|
|
1536
|
+
p !== v && P(v);
|
|
1537
1537
|
return;
|
|
1538
1538
|
}
|
|
1539
|
-
const O = q.get(p), c = q.get(
|
|
1539
|
+
const O = q.get(p), c = q.get(v);
|
|
1540
1540
|
if (!O || !c) return;
|
|
1541
1541
|
const T = O.type === "parent" && c.type === "parent" || O.type === "child" && c.type === "child" && O.parentKey === c.parentKey;
|
|
1542
|
-
P(T && p !==
|
|
1542
|
+
P(T && p !== v ? v : null);
|
|
1543
1543
|
}, [p, g, q]), le = ee((s) => {
|
|
1544
1544
|
s.preventDefault(), P(null);
|
|
1545
1545
|
}, []), _ = ee(() => {
|
|
1546
1546
|
L(null), P(null), document.body.style.cursor = "";
|
|
1547
|
-
}, []), W = ee((s,
|
|
1548
|
-
if (s.preventDefault(), !p || p ===
|
|
1547
|
+
}, []), W = ee((s, v) => {
|
|
1548
|
+
if (s.preventDefault(), !p || p === v)
|
|
1549
1549
|
return;
|
|
1550
1550
|
if (!g) {
|
|
1551
|
-
const T = n.findIndex((ce) => (o ? o(ce) : JSON.stringify(ce)) === p), V = n.findIndex((ce) => (o ? o(ce) : JSON.stringify(ce)) ===
|
|
1551
|
+
const T = n.findIndex((ce) => (o ? o(ce) : JSON.stringify(ce)) === p), V = n.findIndex((ce) => (o ? o(ce) : JSON.stringify(ce)) === v);
|
|
1552
1552
|
if (T === -1 || V === -1)
|
|
1553
1553
|
return;
|
|
1554
1554
|
const R = [...n], [he] = R.splice(T, 1);
|
|
1555
|
-
R.splice(V, 0, he),
|
|
1555
|
+
R.splice(V, 0, he), y == null || y(R), L(null), P(null), document.body.style.cursor = "";
|
|
1556
1556
|
return;
|
|
1557
1557
|
}
|
|
1558
|
-
const O = q.get(p), c = q.get(
|
|
1558
|
+
const O = q.get(p), c = q.get(v);
|
|
1559
1559
|
if (!(!O || !c)) {
|
|
1560
1560
|
if (O.type === "parent" && c.type === "parent") {
|
|
1561
1561
|
const T = n.findIndex((ce) => (o ? o(ce) : JSON.stringify(ce)) === O.key), V = n.findIndex((ce) => (o ? o(ce) : JSON.stringify(ce)) === c.key);
|
|
1562
1562
|
if (T === -1 || V === -1) return;
|
|
1563
1563
|
const R = [...n], [he] = R.splice(T, 1);
|
|
1564
|
-
R.splice(V, 0, he),
|
|
1564
|
+
R.splice(V, 0, he), y == null || y(R), L(null), P(null), document.body.style.cursor = "";
|
|
1565
1565
|
return;
|
|
1566
1566
|
}
|
|
1567
1567
|
if (O.type === "child" && c.type === "child" && O.parentKey === c.parentKey) {
|
|
@@ -1576,14 +1576,14 @@ function Bt({
|
|
|
1576
1576
|
const Ee = [...R], [me] = Ee.splice(he, 1);
|
|
1577
1577
|
return Ee.splice(ce, 0, me), { ...ge, children: Ee };
|
|
1578
1578
|
});
|
|
1579
|
-
|
|
1579
|
+
y == null || y(Ce), L(null), P(null), document.body.style.cursor = "";
|
|
1580
1580
|
return;
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
}, [p, n, o,
|
|
1583
|
+
}, [p, n, o, y, g, q]);
|
|
1584
1584
|
if (n.length === 0) {
|
|
1585
1585
|
let s;
|
|
1586
|
-
return
|
|
1586
|
+
return x && (s = ((pe = x.current) == null ? void 0 : pe.clientWidth) + "px"), /* @__PURE__ */ i.jsx("tbody", { className: `radar-table__body ${w ? w + "__body" : ""} ${H}`, style: K, children: /* @__PURE__ */ i.jsx(
|
|
1587
1587
|
"tr",
|
|
1588
1588
|
{
|
|
1589
1589
|
className: `radar-table__body-row ${w ? w + "__body-row" : ""} ${C}`,
|
|
@@ -1613,11 +1613,11 @@ function Bt({
|
|
|
1613
1613
|
indexWithinGroup: 0,
|
|
1614
1614
|
groupSize: n.length
|
|
1615
1615
|
})), fe = ee((s) => {
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1616
|
+
const v = new Set(U);
|
|
1617
|
+
v.has(s) ? v.delete(s) : v.add(s), ue(Array.from(v));
|
|
1618
1618
|
}, [U, ue]);
|
|
1619
1619
|
return /* @__PURE__ */ i.jsx("tbody", { className: `radar-table__body ${w ? w + "__body" : ""} ${H}`, style: K, children: ie.map((s) => {
|
|
1620
|
-
const
|
|
1620
|
+
const v = s.record, O = s.key;
|
|
1621
1621
|
return /* @__PURE__ */ i.jsx(
|
|
1622
1622
|
"tr",
|
|
1623
1623
|
{
|
|
@@ -1657,10 +1657,10 @@ function Bt({
|
|
|
1657
1657
|
style: {
|
|
1658
1658
|
backgroundColor: Ce || "white",
|
|
1659
1659
|
paddingLeft: Se,
|
|
1660
|
-
...
|
|
1660
|
+
...b
|
|
1661
1661
|
},
|
|
1662
1662
|
children: [
|
|
1663
|
-
ge && Ee && g && /* @__PURE__ */ i.jsx(
|
|
1663
|
+
ge && Ee && g && (v == null ? void 0 : v.children) && v.children.length > 0 && /* @__PURE__ */ i.jsx(
|
|
1664
1664
|
"button",
|
|
1665
1665
|
{
|
|
1666
1666
|
type: "button",
|
|
@@ -1669,12 +1669,12 @@ function Bt({
|
|
|
1669
1669
|
onClick: () => fe(s.key),
|
|
1670
1670
|
style: { marginRight: 8, cursor: "pointer", background: "transparent", border: "none", transform: me ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 150ms ease" },
|
|
1671
1671
|
title: me ? "Свернуть" : "Развернуть",
|
|
1672
|
-
children: Y ? Y(me,
|
|
1672
|
+
children: Y ? Y(me, v) : /* @__PURE__ */ i.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ i.jsx("path", { d: "M4.99264 6.91705C5.28553 7.20994 5.76041 7.20994 6.0533 6.91705L10.8263 2.14408C11.1192 1.85118 11.1192 1.37631 10.8263 1.08342C10.5334 0.790524 10.0585 0.790524 9.76561 1.08342L6.27297 4.57606L5.5 5.34903L4.77297 4.57606L1.28033 1.08342C0.987437 0.790524 0.512563 0.790524 0.21967 1.08342C-0.0732234 1.37631 -0.0732234 1.85118 0.21967 2.14408L4.99264 6.91705Z", fill: "#8C8C8C" }) })
|
|
1673
1673
|
}
|
|
1674
1674
|
),
|
|
1675
|
-
ce ? E == null ? void 0 : E.renderer(
|
|
1676
|
-
c.units && zt(((Oe =
|
|
1677
|
-
!c.units &&
|
|
1675
|
+
ce ? E == null ? void 0 : E.renderer(v[c.dataIndex], v, T, c.dataIndex) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1676
|
+
c.units && zt(((Oe = v[c.key]) == null ? void 0 : Oe.toString()) || "", c.units),
|
|
1677
|
+
!c.units && v[c.key]
|
|
1678
1678
|
] })
|
|
1679
1679
|
]
|
|
1680
1680
|
}
|
|
@@ -1689,7 +1689,7 @@ function Bt({
|
|
|
1689
1689
|
}) });
|
|
1690
1690
|
}
|
|
1691
1691
|
const et = ({ config: t }) => {
|
|
1692
|
-
const [{ current: n, pageSize: u, total: o, onChange: k, showQuickJumper:
|
|
1692
|
+
const [{ current: n, pageSize: u, total: o, onChange: k, showQuickJumper: y, buttonsCount: w = 4, hideOnSinglePage: E = !1 }, g] = be(t);
|
|
1693
1693
|
Ie(() => {
|
|
1694
1694
|
g(t);
|
|
1695
1695
|
}, [t]);
|
|
@@ -1706,8 +1706,8 @@ const et = ({ config: t }) => {
|
|
|
1706
1706
|
r.target.value = h;
|
|
1707
1707
|
}, K = (r) => {
|
|
1708
1708
|
r.preventDefault();
|
|
1709
|
-
const h = r.clipboardData.getData("text").replace(/[^0-9]/g, ""),
|
|
1710
|
-
|
|
1709
|
+
const h = r.clipboardData.getData("text").replace(/[^0-9]/g, ""), b = r.target, m = b.selectionStart || 0, x = b.selectionEnd || 0, D = b.value.substring(0, m) + h + b.value.substring(x);
|
|
1710
|
+
b.value = D, b.setSelectionRange(m + h.length, m + h.length);
|
|
1711
1711
|
}, C = (r) => {
|
|
1712
1712
|
const l = r.currentTarget.id;
|
|
1713
1713
|
l === "pagination_left_button" && n > 1 && (g({ ...t, current: n - 1 }), k == null || k(n - 1, u)), l === "pagination_right_button" && n < o && (g({ ...t, current: n + 1 }), k == null || k(n + 1, u));
|
|
@@ -1733,7 +1733,7 @@ const et = ({ config: t }) => {
|
|
|
1733
1733
|
]
|
|
1734
1734
|
}
|
|
1735
1735
|
),
|
|
1736
|
-
|
|
1736
|
+
y && /* @__PURE__ */ i.jsxs("div", { className: "radar-table__pagination-quick-jumper", children: [
|
|
1737
1737
|
"Перейти на ",
|
|
1738
1738
|
/* @__PURE__ */ i.jsx(
|
|
1739
1739
|
"input",
|
|
@@ -1756,7 +1756,7 @@ function Kt({
|
|
|
1756
1756
|
config: u,
|
|
1757
1757
|
rowKey: o,
|
|
1758
1758
|
loading: k = !1,
|
|
1759
|
-
pagination:
|
|
1759
|
+
pagination: y,
|
|
1760
1760
|
stickyHeader: w = !1,
|
|
1761
1761
|
resizeable: E = !1,
|
|
1762
1762
|
draggableRows: g = !1,
|
|
@@ -1773,9 +1773,9 @@ function Kt({
|
|
|
1773
1773
|
recalculateRowHeight: l = !1,
|
|
1774
1774
|
// tree props
|
|
1775
1775
|
treeMode: h,
|
|
1776
|
-
expandedRowKeys:
|
|
1776
|
+
expandedRowKeys: b,
|
|
1777
1777
|
defaultExpandedRowKeys: m,
|
|
1778
|
-
onExpandedRowsChange:
|
|
1778
|
+
onExpandedRowsChange: x,
|
|
1779
1779
|
indentSize: D,
|
|
1780
1780
|
className: p = "",
|
|
1781
1781
|
style: L,
|
|
@@ -1801,7 +1801,7 @@ function Kt({
|
|
|
1801
1801
|
headerGroupCellStyle: fe,
|
|
1802
1802
|
headerGroupCellWrapperClassName: pe,
|
|
1803
1803
|
headerGroupCellWrapperStyle: s,
|
|
1804
|
-
paginationContainerClassName:
|
|
1804
|
+
paginationContainerClassName: v = "",
|
|
1805
1805
|
paginationContainerStyle: O
|
|
1806
1806
|
}) {
|
|
1807
1807
|
return N ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
@@ -1818,7 +1818,7 @@ function Kt({
|
|
|
1818
1818
|
config: u,
|
|
1819
1819
|
rowKey: o,
|
|
1820
1820
|
loading: k,
|
|
1821
|
-
pagination:
|
|
1821
|
+
pagination: y,
|
|
1822
1822
|
stickyHeader: w,
|
|
1823
1823
|
resizeable: E,
|
|
1824
1824
|
draggableRows: g,
|
|
@@ -1832,9 +1832,9 @@ function Kt({
|
|
|
1832
1832
|
sortIcon: f,
|
|
1833
1833
|
expandIcon: r,
|
|
1834
1834
|
treeMode: h,
|
|
1835
|
-
expandedRowKeys:
|
|
1835
|
+
expandedRowKeys: b,
|
|
1836
1836
|
defaultExpandedRowKeys: m,
|
|
1837
|
-
onExpandedRowsChange:
|
|
1837
|
+
onExpandedRowsChange: x,
|
|
1838
1838
|
indentSize: D,
|
|
1839
1839
|
className: p,
|
|
1840
1840
|
style: L,
|
|
@@ -1860,7 +1860,7 @@ function Kt({
|
|
|
1860
1860
|
headerGroupCellStyle: fe,
|
|
1861
1861
|
headerGroupCellWrapperClassName: pe,
|
|
1862
1862
|
headerGroupCellWrapperStyle: s,
|
|
1863
|
-
paginationContainerClassName:
|
|
1863
|
+
paginationContainerClassName: v,
|
|
1864
1864
|
paginationContainerStyle: O,
|
|
1865
1865
|
noDataRender: C,
|
|
1866
1866
|
recalculateRowHeight: l
|
|
@@ -1868,7 +1868,7 @@ function Kt({
|
|
|
1868
1868
|
)
|
|
1869
1869
|
}
|
|
1870
1870
|
),
|
|
1871
|
-
/* @__PURE__ */ i.jsx("div", { className: `radar-table-pagination-container ${
|
|
1871
|
+
/* @__PURE__ */ i.jsx("div", { className: `radar-table-pagination-container ${v}`, style: O, children: y && /* @__PURE__ */ i.jsx(et, { config: y }) })
|
|
1872
1872
|
] }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1873
1873
|
/* @__PURE__ */ i.jsx(
|
|
1874
1874
|
tt,
|
|
@@ -1878,7 +1878,7 @@ function Kt({
|
|
|
1878
1878
|
config: u,
|
|
1879
1879
|
rowKey: o,
|
|
1880
1880
|
loading: k,
|
|
1881
|
-
pagination:
|
|
1881
|
+
pagination: y,
|
|
1882
1882
|
stickyHeader: w,
|
|
1883
1883
|
resizeable: E,
|
|
1884
1884
|
draggableRows: g,
|
|
@@ -1892,9 +1892,9 @@ function Kt({
|
|
|
1892
1892
|
sortIcon: f,
|
|
1893
1893
|
expandIcon: r,
|
|
1894
1894
|
treeMode: h,
|
|
1895
|
-
expandedRowKeys:
|
|
1895
|
+
expandedRowKeys: b,
|
|
1896
1896
|
defaultExpandedRowKeys: m,
|
|
1897
|
-
onExpandedRowsChange:
|
|
1897
|
+
onExpandedRowsChange: x,
|
|
1898
1898
|
indentSize: D,
|
|
1899
1899
|
className: p,
|
|
1900
1900
|
style: L,
|
|
@@ -1920,13 +1920,13 @@ function Kt({
|
|
|
1920
1920
|
headerGroupCellStyle: fe,
|
|
1921
1921
|
headerGroupCellWrapperClassName: pe,
|
|
1922
1922
|
headerGroupCellWrapperStyle: s,
|
|
1923
|
-
paginationContainerClassName:
|
|
1923
|
+
paginationContainerClassName: v,
|
|
1924
1924
|
paginationContainerStyle: O,
|
|
1925
1925
|
noDataRender: C,
|
|
1926
1926
|
recalculateRowHeight: l
|
|
1927
1927
|
}
|
|
1928
1928
|
),
|
|
1929
|
-
/* @__PURE__ */ i.jsx("div", { className: `radar-table-pagination-container ${
|
|
1929
|
+
/* @__PURE__ */ i.jsx("div", { className: `radar-table-pagination-container ${v}`, style: O, children: y && /* @__PURE__ */ i.jsx(et, { config: y }) })
|
|
1930
1930
|
] });
|
|
1931
1931
|
}
|
|
1932
1932
|
function tt(t) {
|
|
@@ -1935,7 +1935,7 @@ function tt(t) {
|
|
|
1935
1935
|
preset: u,
|
|
1936
1936
|
config: o,
|
|
1937
1937
|
rowKey: k,
|
|
1938
|
-
loading:
|
|
1938
|
+
loading: y,
|
|
1939
1939
|
stickyHeader: w,
|
|
1940
1940
|
resizeable: E,
|
|
1941
1941
|
draggableRows: g,
|
|
@@ -1951,9 +1951,9 @@ function tt(t) {
|
|
|
1951
1951
|
treeMode: r,
|
|
1952
1952
|
expandedRowKeys: l,
|
|
1953
1953
|
defaultExpandedRowKeys: h,
|
|
1954
|
-
onExpandedRowsChange:
|
|
1954
|
+
onExpandedRowsChange: b,
|
|
1955
1955
|
indentSize: m,
|
|
1956
|
-
className:
|
|
1956
|
+
className: x,
|
|
1957
1957
|
style: D,
|
|
1958
1958
|
headerClassName: p,
|
|
1959
1959
|
headerStyle: L,
|
|
@@ -1980,7 +1980,7 @@ function tt(t) {
|
|
|
1980
1980
|
noDataRender: pe,
|
|
1981
1981
|
recalculateRowHeight: s
|
|
1982
1982
|
} = t;
|
|
1983
|
-
return /* @__PURE__ */ i.jsxs("table", { className: `radar-table ${u || ""} ${
|
|
1983
|
+
return /* @__PURE__ */ i.jsxs("table", { className: `radar-table ${u || ""} ${x}`, style: D, children: [
|
|
1984
1984
|
/* @__PURE__ */ i.jsx(
|
|
1985
1985
|
Vt,
|
|
1986
1986
|
{
|
|
@@ -2018,14 +2018,14 @@ function tt(t) {
|
|
|
2018
2018
|
dataSource: n,
|
|
2019
2019
|
config: o,
|
|
2020
2020
|
rowKey: k,
|
|
2021
|
-
loading:
|
|
2021
|
+
loading: y,
|
|
2022
2022
|
preset: u,
|
|
2023
2023
|
customCellRender: K,
|
|
2024
2024
|
expandIcon: f,
|
|
2025
2025
|
treeMode: r,
|
|
2026
2026
|
expandedRowKeys: l,
|
|
2027
2027
|
defaultExpandedRowKeys: h,
|
|
2028
|
-
onExpandedRowsChange:
|
|
2028
|
+
onExpandedRowsChange: b,
|
|
2029
2029
|
indentSize: m,
|
|
2030
2030
|
bodyClassName: Z,
|
|
2031
2031
|
bodyStyle: re,
|
package/package.json
CHANGED