radar-ui 1.1.6 → 1.1.7
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.
|
@@ -10,7 +10,7 @@ interface HeaderCellProps<T = any> {
|
|
|
10
10
|
sort_field: string | undefined;
|
|
11
11
|
sort_order: 'ASC' | 'DESC' | undefined;
|
|
12
12
|
};
|
|
13
|
-
onSort: (columnKey
|
|
13
|
+
onSort: (columnKey?: string, direction?: 'ASC' | 'DESC') => void;
|
|
14
14
|
onResize?: (columnKey: string, width: number) => void;
|
|
15
15
|
sortIcon?: (sort_field: string | undefined, sort_order: 'ASC' | 'DESC' | undefined) => React.ReactNode;
|
|
16
16
|
resizeable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderCell.d.ts","sourceRoot":"","sources":["../../../src/components/Table/HeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAgC,MAAM,aAAa,CAAC;AAIzE,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAe,CAAC,CAAC,GAAG,GAAG;IAC/B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,UAAU,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAGpF,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"HeaderCell.d.ts","sourceRoot":"","sources":["../../../src/components/Table/HeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAgC,MAAM,aAAa,CAAC;AAIzE,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAe,CAAC,CAAC,GAAG,GAAG;IAC/B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,UAAU,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAGpF,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGtD,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;IACvG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,qBAAqB,GAAG,oBAAoB,CAAC;IACtD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACtC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7C,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,wBAAgB,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,EAClC,MAAM,EACN,KAAK,EACL,MAAM,EACN,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,mBAAmB,EACnB,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,GACnB,EAAE,eAAe,CAAC,CAAC,CAAC,kDA4TpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableDndProvider.d.ts","sourceRoot":"","sources":["../../../src/components/Table/TableDndProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAkBhF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzE,UAAU,oBAAoB;IAC5B,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC;CAChF;AAID,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"TableDndProvider.d.ts","sourceRoot":"","sources":["../../../src/components/Table/TableDndProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAkBhF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzE,UAAU,oBAAoB;IAC5B,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC;CAChF;AAID,eAAO,MAAM,WAAW,4BAUvB,CAAC;AAEF,UAAU,qBAAqB,CAAC,CAAC,GAAG,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC;CAC1D;AAED,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,EACxC,QAAQ,EACR,UAAU,EACV,eAAe,EAChB,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CAsa1B"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
style.textContent = ".radar-table-container{display:flex;flex-direction:column;gap:16px;position:relative}.radar-table{width:100%;border-collapse:separate;border-spacing:0;font-family:inherit;overflow:clip;scroll-snap-type:x mandatory;scroll-behavior:smooth;table-layout:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.radar-table-default{border-radius:12px;background-color:#fff}.radar-table-pagination-container{position:sticky;bottom:-16px;left:0;background-color:#fff;padding:16px;border-top:1px solid #E8E8E8;width:100%}.radar-table *,.radar-table *:before,.radar-table *:after{box-sizing:border-box}@-moz-document url-prefix(){.radar-table{border-collapse:separate;border-spacing:0}.radar-table__body-row{height:1px!important;min-height:54px}.radar-table__body-cell{height:1px!important;min-height:54px;vertical-align:top}.radar-table__body-cell-wrapper,.radar-table__header-cell-wrapper{display:flex!important;align-items:center!important;box-sizing:border-box!important;min-height:54px}.radar-table-default__body-cell-wrapper,.radar-table-simple__body-cell-wrapper{line-height:1.2!important;padding:18px 12px!important;font-size:16px!important}.radar-table-default__header-cell-wrapper{min-height:80px!important;padding:28px 12px!important}.radar-table-simple__header-cell-wrapper{min-height:60px!important;padding:20px 10px!important}}.column-drag-overlay{pointer-events:none;z-index:9999}.drag-preview{background:#fff;border-radius:6px;padding:8px 12px;box-shadow:0 6px 16px #00000040;font-size:14px;color:#333;white-space:nowrap;transform:rotate(3deg) scale(.95);max-width:200px;overflow:hidden;text-overflow:ellipsis}.radar-table__header{text-align:left;z-index:1}.radar-table-default__header{background-color:#f7f6fe;min-height:80px}.radar-table-simple__header{background-color:#fff;min-height:80px}.radar-table__header-group-cell{scroll-snap-align:start}.radar-table-simple__header-group-cell{font-family:inherit;font-weight:700;font-size:18px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;vertical-align:top}.radar-table__header-group-cell-wrapper{width:100%}.radar-table-simple__header-group-cell-wrapper{padding:12px 10px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:44px}.radar-table__header-cell{scroll-snap-align:start;box-sizing:border-box}.radar-table-default__header-cell{font-weight:500!important;font-size:16px;line-height:1.2;letter-spacing:0%;color:#8c8c8c;background-color:#f7f6fe;box-sizing:border-box;vertical-align:top}.radar-table-simple__header-cell{font-weight:500!important;font-size:16px;line-height:1.2;letter-spacing:0%;color:#8c8c8c;background-color:#fff;box-sizing:border-box;vertical-align:top}.radar-table-default__header-cell:first-child{border-top-left-radius:12px;border-bottom-left-radius:12px}.radar-table-default__header-cell:last-child{border-top-right-radius:12px;border-bottom-right-radius:12px}.radar-table__header-cell-wrapper{width:100%;position:relative;box-sizing:border-box;padding-right:25px!important}.radar-table-default__header-cell-wrapper{padding:28px 12px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:80px}.radar-table-simple__header-cell-wrapper{padding:20px 10px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:60px}.radar-table__sort-button-wrapper{display:flex;align-items:center;justify-content:center}.radar-table__sort-button{border:none;background-color:transparent;color:inherit;cursor:pointer;font-size:inherit;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.radar-table__sort-button svg{width:1em;height:1em}.radar-table__sort-button:hover{opacity:.75}.radar-table__drag-handle{display:flex;align-items:center;justify-content:center;cursor:move;opacity:.5;transition:opacity .2s ease;padding:2px;margin-right:4px}.radar-table__drag-handle:hover{opacity:.8}.radar-table__drag-handle.dragging{opacity:1}.radar-table__header-cell.dragging{opacity:.5;transform:rotate(2deg);z-index:1000}.radar-table__header-cell.drag-over.valid-drop-zone{background-color:#5329ff1a!important;border-left:2px solid #5329FF;transition:all .2s ease;z-index:1000}.radar-table__header-cell.drag-over.invalid-drop-zone{background-color:#ff3b3b1a!important;border-left:2px solid #ff3b3b;transition:all .2s ease;z-index:1000}.radar-table__drag-handle{cursor:grab;transition:transform .2s ease}.radar-table__drag-handle:hover{transform:scale(1.1)}.radar-table__drag-handle.dragging{cursor:grabbing}.radar-table__header-cell.group-header{cursor:default!important}.column-drag-overlay .drag-preview{background:#fff;border-radius:6px;padding:8px 12px;box-shadow:0 6px 16px #00000040;font-size:14px;color:#333;white-space:nowrap;transform:rotate(3deg) scale(.95);max-width:200px;overflow:hidden;text-overflow:ellipsis;border:2px solid #5329FF}.radar-table__header-cell.group-header{cursor:grab}.radar-table__header-cell.group-header.dragging{cursor:grabbing}.radar-table__body-row,.radar-table-default__body-row{height:1px}.radar-table__body-row[draggable=true]{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radar-table__body-row.dragging{opacity:.25;cursor:grabbing;border-radius:20px}.radar-table__body-row.drag-over{border-top:2px solid #5329FF!important}.radar-table__body-row[draggable=true]{cursor:grab}.radar-table__body-row[draggable=true]:active{cursor:grabbing}.radar-table__body-cell{height:1px;scroll-snap-align:start;box-sizing:border-box;vertical-align:top}.radar-table-default__body-cell,.radar-table-simple__body-cell{height:1px}.radar-table__body-cell-wrapper{width:100%;height:100%;font-family:inherit;background-color:#fff;display:flex;align-items:center}.radar-table-default__body-cell-wrapper,.radar-table-simple__body-cell-wrapper{padding:18px 12px;display:flex;gap:8px;border-bottom:1px solid #E8E8E8;font-weight:500;font-size:16px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;align-items:center}.radar-table-default__body-row:last-of-type .radar-table-default__body-cell-wrapper{border-bottom:none}.radar-table-simple__body-row:last-of-type .radar-table-simple__body-cell-wrapper{border-bottom:none}.radar-table__body-noData{padding:18px 12px;display:flex;align-items:center;font-size:16px;line-height:1.2;width:100%}@-moz-document url-prefix(){.radar-table__body-row{height:1px!important}.radar-table__body-cell{height:1px!important;vertical-align:top!important}.radar-table-default__body-cell-wrapper,.radar-table-simple__body-cell-wrapper{min-height:54px!important;display:flex!important;align-items:center!important;box-sizing:border-box!important;line-height:1.2!important}.radar-table__body-cell-wrapper{-moz-osx-font-smoothing:grayscale;font-weight:500!important}}.radar-table__footer{pointer-events:auto}.radar-table__footer.resizing{pointer-events:none}.radar-table-default__footer,.radar-table-simple__footer{background-color:#fff}.radar-table-default__footer-cell,.radar-table-simple__footer-cell{border-top:1px solid #E8E8E8}.radar-table__footer-cell-wrapper{width:100%;font-family:inherit}.radar-table-default__footer-cell-wrapper,.radar-table-simple__footer-cell-wrapper{padding:12px 0;display:flex;gap:8px}.radar-table__resize-button{position:absolute;right:0;top:50%;transform:translateY(-50%);height:32px;width:20px;padding-right:6px;background-color:transparent;cursor:col-resize;border:none;display:flex;justify-content:flex-end;align-items:center;transition:transform .2s cubic-bezier(.4,0,.2,1)}.radar-table__resize-button:hover{cursor:col-resize!important}.radar-table__resize-button div{background-color:#8c8c8c;width:2px;height:50%;opacity:1;transition:all .3s cubic-bezier(.4,0,.2,1);border-radius:1px}.radar-table__resize-button:hover div{opacity:.5}.radar-table__pagination{display:flex;align-items:center;gap:24px}.radar-table__pagination-main{display:grid;grid-template-rows:32px;gap:4px}.radar-table__pagination-button{width:100%;height:100%;max-width:32px;max-height:32px;border-radius:8px;border:none;cursor:pointer;background-color:#f7f7f7;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#8c8c8c;opacity:1;transition:all .2s ease;display:flex;align-items:center;justify-content:center;border:1px solid #F7F7F7}.radar-table__pagination-button_active{color:#5329ff;background-color:#eeeaff;border:1px solid #5329FF}.radar-table__pagination-button_control{background-color:transparent;border:none}.radar-table__pagination-button_control:hover{background-color:#f7f7f7}.radar-table__pagination-button:hover{opacity:.75}.radar-table__pagination-quick-jumper{display:flex;align-items:center;gap:8px;font-family:inherit;font-weight:500;font-style:Medium;font-size:14px;line-height:100%;letter-spacing:0%;color:#1a1a1a}.radar-table__pagination-input{width:32px;height:32px;border-radius:8px;border:1px solid #F7F7F7;background-color:#f7f7f7;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#5329ff;background-color:#eeeaff;text-align:center;outline:none;border:none}.radar-table__tooltip-button{border:none;display:flex;align-items:center;justify-content:center;background-color:transparent;color:inherit;cursor:pointer;font-size:inherit;position:relative}.radar-table__tooltip-button:hover{color:#5329ff}.radar-table__tooltip-text{position:absolute;top:calc(100% + 10px);left:0;background-color:#fff;padding:8px;width:250px;transform:scale(0);opacity:0;transition:all .2s ease;transform-origin:top left;border-radius:8px;box-shadow:0 0 20px #00000014;white-space:pre-line;text-align:left;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#1a1a1a;z-index:1000}.radar-table__tooltip-text_visible{transform:scale(1);opacity:1}.radar-table__tooltip-text--right{left:auto!important;right:0!important;transform-origin:top right!important}.radar-table__tooltip-text--right.radar-table__tooltip-text_visible{transform:scale(1)!important}.radar-table__drag-handle{height:20px;cursor:grab;border-radius:4px;border:none}\n";
|
|
5
5
|
document.head.appendChild(style);
|
|
6
6
|
})();
|
|
7
|
-
import Xe, { useState as ce, useRef as
|
|
7
|
+
import Xe, { useState as ce, useRef as xe, useCallback as q, useEffect as Ce, createContext as xt, useContext as _t, useMemo as _e } from "react";
|
|
8
8
|
import { useSensors as Ct, useSensor as Ye, PointerSensor as wt, KeyboardSensor as Et, pointerWithin as jt, rectIntersection as kt, DndContext as Rt, DragOverlay as Tt, useDraggable as St, useDroppable as Dt } from "@dnd-kit/core";
|
|
9
9
|
import { sortableKeyboardCoordinates as Pt } from "@dnd-kit/sortable";
|
|
10
10
|
var Se = { exports: {} }, ve = {};
|
|
@@ -22,11 +22,11 @@ function Ot() {
|
|
|
22
22
|
if (Be) return ve;
|
|
23
23
|
Be = 1;
|
|
24
24
|
var n = Xe, o = Symbol.for("react.element"), p = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, T = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
|
-
function E(j,
|
|
25
|
+
function E(j, x, F) {
|
|
26
26
|
var S, L = {}, M = null, J = null;
|
|
27
|
-
F !== void 0 && (M = "" + F),
|
|
28
|
-
for (S in
|
|
29
|
-
if (j && j.defaultProps) for (S in
|
|
27
|
+
F !== void 0 && (M = "" + F), x.key !== void 0 && (M = "" + x.key), x.ref !== void 0 && (J = x.ref);
|
|
28
|
+
for (S in x) i.call(x, S) && !b.hasOwnProperty(S) && (L[S] = x[S]);
|
|
29
|
+
if (j && j.defaultProps) for (S in x = j.defaultProps, x) L[S] === void 0 && (L[S] = x[S]);
|
|
30
30
|
return { $$typeof: o, type: j, key: M, ref: J, props: L, _owner: T.current };
|
|
31
31
|
}
|
|
32
32
|
return ve.Fragment = p, ve.jsx = E, ve.jsxs = E, ve;
|
|
@@ -44,11 +44,11 @@ var ye = {};
|
|
|
44
44
|
var Je;
|
|
45
45
|
function Lt() {
|
|
46
46
|
return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
var n = Xe, o = Symbol.for("react.element"), p = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), j = Symbol.for("react.context"),
|
|
47
|
+
var n = Xe, o = Symbol.for("react.element"), p = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), j = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), J = Symbol.for("react.offscreen"), Z = Symbol.iterator, Y = "@@iterator";
|
|
48
48
|
function w(e) {
|
|
49
49
|
if (e === null || typeof e != "object")
|
|
50
50
|
return null;
|
|
51
|
-
var r =
|
|
51
|
+
var r = Z && e[Z] || e[Y];
|
|
52
52
|
return typeof r == "function" ? r : null;
|
|
53
53
|
}
|
|
54
54
|
var d = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -69,10 +69,10 @@ function Lt() {
|
|
|
69
69
|
G.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, G);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var u = !1,
|
|
72
|
+
var u = !1, m = !1, l = !1, h = !1, C = !1, g;
|
|
73
73
|
g = Symbol.for("react.module.reference");
|
|
74
|
-
function
|
|
75
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e === b || C || e === T || e === F || e === S || h || e === J || u ||
|
|
74
|
+
function I(e) {
|
|
75
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === b || C || e === T || e === F || e === S || h || e === J || u || m || l || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === L || e.$$typeof === E || e.$$typeof === j || e.$$typeof === x || // 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.
|
|
@@ -117,7 +117,7 @@ function Lt() {
|
|
|
117
117
|
case E:
|
|
118
118
|
var c = e;
|
|
119
119
|
return z(c._context) + ".Provider";
|
|
120
|
-
case
|
|
120
|
+
case x:
|
|
121
121
|
return V(e, e.render, "ForwardRef");
|
|
122
122
|
case L:
|
|
123
123
|
var R = e.displayName || null;
|
|
@@ -160,7 +160,7 @@ function Lt() {
|
|
|
160
160
|
y++;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function X() {
|
|
164
164
|
{
|
|
165
165
|
if (y--, y === 0) {
|
|
166
166
|
var e = {
|
|
@@ -196,7 +196,7 @@ function Lt() {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
var re = d.ReactCurrentDispatcher, k;
|
|
199
|
-
function
|
|
199
|
+
function H(e, r, c) {
|
|
200
200
|
{
|
|
201
201
|
if (k === void 0)
|
|
202
202
|
try {
|
|
@@ -262,17 +262,17 @@ function Lt() {
|
|
|
262
262
|
}
|
|
263
263
|
} catch (ie) {
|
|
264
264
|
if (ie && R && typeof ie.stack == "string") {
|
|
265
|
-
for (var
|
|
265
|
+
for (var $ = ie.stack.split(`
|
|
266
266
|
`), oe = R.stack.split(`
|
|
267
|
-
`), ee =
|
|
267
|
+
`), ee = $.length - 1, te = oe.length - 1; ee >= 1 && te >= 0 && $[ee] !== oe[te]; )
|
|
268
268
|
te--;
|
|
269
269
|
for (; ee >= 1 && te >= 0; ee--, te--)
|
|
270
|
-
if (
|
|
270
|
+
if ($[ee] !== oe[te]) {
|
|
271
271
|
if (ee !== 1 || te !== 1)
|
|
272
272
|
do
|
|
273
|
-
if (ee--, te--, te < 0 ||
|
|
273
|
+
if (ee--, te--, te < 0 || $[ee] !== oe[te]) {
|
|
274
274
|
var le = `
|
|
275
|
-
` +
|
|
275
|
+
` + $[ee].replace(" at new ", " at ");
|
|
276
276
|
return e.displayName && le.includes("<anonymous>") && (le = le.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, le), le;
|
|
277
277
|
}
|
|
278
278
|
while (ee >= 1 && te >= 0);
|
|
@@ -280,9 +280,9 @@ function Lt() {
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
} finally {
|
|
283
|
-
ae = !1, re.current = G,
|
|
283
|
+
ae = !1, re.current = G, X(), Error.prepareStackTrace = B;
|
|
284
284
|
}
|
|
285
|
-
var ge = e ? e.displayName || e.name : "", fe = ge ?
|
|
285
|
+
var ge = e ? e.displayName || e.name : "", fe = ge ? H(ge) : "";
|
|
286
286
|
return typeof e == "function" && se.set(e, fe), fe;
|
|
287
287
|
}
|
|
288
288
|
function de(e, r, c) {
|
|
@@ -298,16 +298,16 @@ function Lt() {
|
|
|
298
298
|
if (typeof e == "function")
|
|
299
299
|
return ne(e, we(e));
|
|
300
300
|
if (typeof e == "string")
|
|
301
|
-
return
|
|
301
|
+
return H(e);
|
|
302
302
|
switch (e) {
|
|
303
303
|
case F:
|
|
304
|
-
return
|
|
304
|
+
return H("Suspense");
|
|
305
305
|
case S:
|
|
306
|
-
return
|
|
306
|
+
return H("SuspenseList");
|
|
307
307
|
}
|
|
308
308
|
if (typeof e == "object")
|
|
309
309
|
switch (e.$$typeof) {
|
|
310
|
-
case
|
|
310
|
+
case x:
|
|
311
311
|
return de(e.render);
|
|
312
312
|
case L:
|
|
313
313
|
return be(e.type, r, c);
|
|
@@ -322,7 +322,7 @@ function Lt() {
|
|
|
322
322
|
return "";
|
|
323
323
|
}
|
|
324
324
|
var pe = Object.prototype.hasOwnProperty, De = {}, Pe = d.ReactDebugCurrentFrame;
|
|
325
|
-
function
|
|
325
|
+
function me(e) {
|
|
326
326
|
if (e) {
|
|
327
327
|
var r = e._owner, c = be(e.type, e._source, r ? r.type : null);
|
|
328
328
|
Pe.setExtraStackFrame(c);
|
|
@@ -334,17 +334,17 @@ function Lt() {
|
|
|
334
334
|
var G = Function.call.bind(pe);
|
|
335
335
|
for (var W in e)
|
|
336
336
|
if (G(e, W)) {
|
|
337
|
-
var
|
|
337
|
+
var $ = void 0;
|
|
338
338
|
try {
|
|
339
339
|
if (typeof e[W] != "function") {
|
|
340
340
|
var oe = Error((R || "React class") + ": " + c + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
341
341
|
throw oe.name = "Invariant Violation", oe;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
$ = e[W](r, W, R, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
344
|
} catch (ee) {
|
|
345
|
-
|
|
345
|
+
$ = ee;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
$ && !($ instanceof Error) && (me(B), t("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", R || "React class", c, W, typeof $), me(null)), $ instanceof Error && !($.message in De) && (De[$.message] = !0, me(B), t("Failed %s type: %s", c, $.message), me(null));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -420,7 +420,7 @@ function Lt() {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
var lt = function(e, r, c, R, B, G, W) {
|
|
423
|
-
var
|
|
423
|
+
var $ = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: o,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
@@ -431,27 +431,27 @@ function Lt() {
|
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
432
|
_owner: G
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return $._store = {}, Object.defineProperty($._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty($, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
443
|
value: R
|
|
444
|
-
}), Object.defineProperty(
|
|
444
|
+
}), Object.defineProperty($, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
448
|
value: B
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
449
|
+
}), Object.freeze && (Object.freeze($.props), Object.freeze($)), $;
|
|
450
450
|
};
|
|
451
451
|
function ct(e, r, c, R, B) {
|
|
452
452
|
{
|
|
453
|
-
var G, W = {},
|
|
454
|
-
c !== void 0 && (Le(c),
|
|
453
|
+
var G, W = {}, $ = null, oe = null;
|
|
454
|
+
c !== void 0 && (Le(c), $ = "" + c), ot(r) && (Le(r.key), $ = "" + r.key), nt(r) && (oe = r.ref, at(r, B));
|
|
455
455
|
for (G in r)
|
|
456
456
|
pe.call(r, G) && !rt.hasOwnProperty(G) && (W[G] = r[G]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
@@ -459,11 +459,11 @@ function Lt() {
|
|
|
459
459
|
for (G in ee)
|
|
460
460
|
W[G] === void 0 && (W[G] = ee[G]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
462
|
+
if ($ || oe) {
|
|
463
463
|
var te = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
-
|
|
464
|
+
$ && it(W, te), oe && st(W, te);
|
|
465
465
|
}
|
|
466
|
-
return lt(e,
|
|
466
|
+
return lt(e, $, oe, B, R, Ie.current, W);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var je = d.ReactCurrentOwner, Fe = d.ReactDebugCurrentFrame;
|
|
@@ -547,7 +547,7 @@ Check the top-level render call using <` + c + ">.");
|
|
|
547
547
|
var c;
|
|
548
548
|
if (typeof r == "function")
|
|
549
549
|
c = r.propTypes;
|
|
550
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
550
|
+
else if (typeof r == "object" && (r.$$typeof === x || // Note: Memo only checks outer props here.
|
|
551
551
|
// Inner props are checked in the reconciler.
|
|
552
552
|
r.$$typeof === L))
|
|
553
553
|
c = r.propTypes;
|
|
@@ -579,14 +579,14 @@ Check the top-level render call using <` + c + ">.");
|
|
|
579
579
|
var ze = {};
|
|
580
580
|
function Ke(e, r, c, R, B, G) {
|
|
581
581
|
{
|
|
582
|
-
var W =
|
|
582
|
+
var W = I(e);
|
|
583
583
|
if (!W) {
|
|
584
|
-
var
|
|
585
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
584
|
+
var $ = "";
|
|
585
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
586
586
|
var oe = dt();
|
|
587
|
-
oe ?
|
|
587
|
+
oe ? $ += oe : $ += Ae();
|
|
588
588
|
var ee;
|
|
589
|
-
e === null ? ee = "null" : Ee(e) ? ee = "array" : e !== void 0 && e.$$typeof === o ? (ee = "<" + (N(e.type) || "Unknown") + " />",
|
|
589
|
+
e === null ? ee = "null" : Ee(e) ? ee = "array" : e !== void 0 && e.$$typeof === o ? (ee = "<" + (N(e.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof e, t("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, $);
|
|
590
590
|
}
|
|
591
591
|
var te = ct(e, r, c, B, G);
|
|
592
592
|
if (te == null)
|
|
@@ -605,8 +605,8 @@ Check the top-level render call using <` + c + ">.");
|
|
|
605
605
|
Ve(le, e);
|
|
606
606
|
}
|
|
607
607
|
if (pe.call(r, "key")) {
|
|
608
|
-
var fe = N(e), ie = Object.keys(r).filter(function(
|
|
609
|
-
return
|
|
608
|
+
var fe = N(e), ie = Object.keys(r).filter(function(mt) {
|
|
609
|
+
return mt !== "key";
|
|
610
610
|
}), Te = ie.length > 0 ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
611
611
|
if (!ze[fe + Te]) {
|
|
612
612
|
var bt = ie.length > 0 ? "{" + ie.join(": ..., ") + ": ...}" : "{}";
|
|
@@ -644,7 +644,7 @@ const It = (n, o) => {
|
|
|
644
644
|
clearTimeout(p), p = setTimeout(() => n.apply(this, i), o);
|
|
645
645
|
};
|
|
646
646
|
}, Nt = ({ column: n, currWidth: o, currMinWidth: p, onResize: i, scrollContainerRef: T }) => {
|
|
647
|
-
const [b, E] = ce(!1), [j,
|
|
647
|
+
const [b, E] = ce(!1), [j, x] = ce(null), [F, S] = ce(0), [L, M] = ce(0), J = xe(null), Z = xe(0), Y = xe(null), w = q(
|
|
648
648
|
It((l, h) => {
|
|
649
649
|
i == null || i(l, h);
|
|
650
650
|
}, 16),
|
|
@@ -652,14 +652,14 @@ const It = (n, o) => {
|
|
|
652
652
|
), d = q((l) => {
|
|
653
653
|
if (!j) return;
|
|
654
654
|
const h = performance.now();
|
|
655
|
-
h -
|
|
655
|
+
h - Z.current >= 16 && (w(j, l), Z.current = h);
|
|
656
656
|
}, [j, w]), t = q((l) => {
|
|
657
657
|
if (!b) return;
|
|
658
658
|
const h = l.clientX - F, C = Math.max(50, L + h);
|
|
659
659
|
d(C);
|
|
660
660
|
const g = T == null ? void 0 : T.current;
|
|
661
661
|
if (g) {
|
|
662
|
-
const
|
|
662
|
+
const I = g.getBoundingClientRect(), V = 50, z = 7, N = l.clientX, _ = I.left, y = I.right;
|
|
663
663
|
if (N - _ < V && g.scrollLeft > 0)
|
|
664
664
|
g.scrollLeft = Math.max(0, g.scrollLeft - z);
|
|
665
665
|
else if (y - N < V) {
|
|
@@ -678,10 +678,10 @@ const It = (n, o) => {
|
|
|
678
678
|
const h = l.clientX - F, C = Math.max(50, L + h);
|
|
679
679
|
a(j, C);
|
|
680
680
|
}
|
|
681
|
-
E(!1), S(0), M(0),
|
|
681
|
+
E(!1), S(0), M(0), x(null), Y.current && (cancelAnimationFrame(Y.current), Y.current = null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", u);
|
|
682
682
|
}
|
|
683
|
-
}, [b, j, F, L, a, t]),
|
|
684
|
-
l.preventDefault(), E(!0), S(l.clientX), M(C),
|
|
683
|
+
}, [b, j, F, L, a, t]), m = q((l, h, C) => {
|
|
684
|
+
l.preventDefault(), E(!0), S(l.clientX), M(C), x(h);
|
|
685
685
|
}, []);
|
|
686
686
|
return Ce(() => {
|
|
687
687
|
b && (document.addEventListener("mousemove", t), document.addEventListener("mouseup", u));
|
|
@@ -692,15 +692,15 @@ const It = (n, o) => {
|
|
|
692
692
|
{
|
|
693
693
|
ref: J,
|
|
694
694
|
className: "radar-table__resize-button",
|
|
695
|
-
onMouseDown: (l) =>
|
|
695
|
+
onMouseDown: (l) => m(l, n.key, o || p || 200),
|
|
696
696
|
title: "Изменить ширину колонки",
|
|
697
697
|
children: /* @__PURE__ */ s.jsx("div", {})
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
700
|
}, Ft = ({ text: n, children: o }) => {
|
|
701
|
-
const [p, i] = ce(!1), [T, b] = ce("left"), E =
|
|
701
|
+
const [p, i] = ce(!1), [T, b] = ce("left"), E = xe(null), j = () => {
|
|
702
702
|
if (E.current) {
|
|
703
|
-
const
|
|
703
|
+
const x = E.current.getBoundingClientRect(), F = window.innerWidth, S = 250, L = 20, M = F - x.left, J = x.right;
|
|
704
704
|
M < S + L && J > S + L ? b("right") : b("left");
|
|
705
705
|
}
|
|
706
706
|
i(!0);
|
|
@@ -727,11 +727,12 @@ const It = (n, o) => {
|
|
|
727
727
|
]
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
|
-
}, Ge =
|
|
730
|
+
}, Ge = xt(null), At = () => {
|
|
731
731
|
const n = _t(Ge);
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
732
|
+
return n || {
|
|
733
|
+
activeColumn: null,
|
|
734
|
+
isValidDropZone: () => !1
|
|
735
|
+
};
|
|
735
736
|
};
|
|
736
737
|
function Wt({
|
|
737
738
|
children: n,
|
|
@@ -752,7 +753,7 @@ function Wt({
|
|
|
752
753
|
const d = jt(w);
|
|
753
754
|
if (d.length > 0) {
|
|
754
755
|
const u = d.filter(
|
|
755
|
-
(
|
|
756
|
+
(m) => m.id.toString().startsWith("drop-zone-")
|
|
756
757
|
);
|
|
757
758
|
if (u.length > 0)
|
|
758
759
|
return console.log("🎯 Pointer collision found:", u[0].id), u;
|
|
@@ -761,13 +762,13 @@ function Wt({
|
|
|
761
762
|
(u) => u.id.toString().startsWith("drop-zone-")
|
|
762
763
|
);
|
|
763
764
|
return a.length > 0 ? (console.log("📦 Rect collision found:", a[0].id), [a[0]]) : [];
|
|
764
|
-
}, []), j = q((w) => w.some((d) => d.children && d.children.length > 0), []),
|
|
765
|
-
const t = (a, u,
|
|
765
|
+
}, []), j = q((w) => w.some((d) => d.children && d.children.length > 0), []), x = q((w, d) => {
|
|
766
|
+
const t = (a, u, m = 0, l = null) => {
|
|
766
767
|
for (const h of a) {
|
|
767
768
|
if (h.key === u)
|
|
768
|
-
return { column: h, parent: l, level:
|
|
769
|
+
return { column: h, parent: l, level: m };
|
|
769
770
|
if (h.children && h.children.length > 0) {
|
|
770
|
-
const C = t(h.children, u,
|
|
771
|
+
const C = t(h.children, u, m + 1, h);
|
|
771
772
|
if (C) return C;
|
|
772
773
|
}
|
|
773
774
|
}
|
|
@@ -776,10 +777,10 @@ function Wt({
|
|
|
776
777
|
return t(w, d);
|
|
777
778
|
}, []), F = q((w, d) => {
|
|
778
779
|
var a;
|
|
779
|
-
const t =
|
|
780
|
+
const t = x(d, w);
|
|
780
781
|
return t && (t.column.fixed || ((a = t.parent) == null ? void 0 : a.fixed)) || !1;
|
|
781
|
-
}, [
|
|
782
|
-
var u,
|
|
782
|
+
}, [x]), S = q((w, d) => {
|
|
783
|
+
var u, m, l, h;
|
|
783
784
|
if (w.columnKey === d.columnKey)
|
|
784
785
|
return !1;
|
|
785
786
|
const t = F(w.columnKey, o), a = F(d.columnKey, o);
|
|
@@ -789,11 +790,11 @@ function Wt({
|
|
|
789
790
|
targetFixed: a
|
|
790
791
|
}), !1;
|
|
791
792
|
if (j(o)) {
|
|
792
|
-
const C =
|
|
793
|
+
const C = x(o, w.columnKey), g = x(o, d.columnKey);
|
|
793
794
|
if (!C || !g)
|
|
794
795
|
return console.log("❌ Drop rejected: column info not found"), !1;
|
|
795
|
-
const
|
|
796
|
-
if (
|
|
796
|
+
const I = w.isLeaf, V = d.isLeaf;
|
|
797
|
+
if (!I && !V) {
|
|
797
798
|
const z = C.level === g.level, N = C.parent === null && g.parent === null || C.parent !== null && g.parent !== null && C.parent.key === g.parent.key;
|
|
798
799
|
return console.log("🔄 Group to group validation:", {
|
|
799
800
|
sameLevel: z,
|
|
@@ -801,10 +802,10 @@ function Wt({
|
|
|
801
802
|
draggedLevel: C.level,
|
|
802
803
|
targetLevel: g.level,
|
|
803
804
|
draggedParent: (u = C.parent) == null ? void 0 : u.key,
|
|
804
|
-
targetParent: (
|
|
805
|
+
targetParent: (m = g.parent) == null ? void 0 : m.key
|
|
805
806
|
}), z && N;
|
|
806
807
|
}
|
|
807
|
-
if (
|
|
808
|
+
if (I && V) {
|
|
808
809
|
const z = C.level === g.level, N = C.parent === null && g.parent === null || C.parent !== null && g.parent !== null && C.parent.key === g.parent.key;
|
|
809
810
|
return console.log("🍃 Leaf to leaf validation:", {
|
|
810
811
|
sameLevel: z,
|
|
@@ -816,12 +817,12 @@ function Wt({
|
|
|
816
817
|
}), z && N;
|
|
817
818
|
}
|
|
818
819
|
return console.log("❌ Mixed group/leaf drop rejected", {
|
|
819
|
-
draggedIsLeaf:
|
|
820
|
+
draggedIsLeaf: I,
|
|
820
821
|
targetIsLeaf: V
|
|
821
822
|
}), !1;
|
|
822
823
|
}
|
|
823
824
|
return !0;
|
|
824
|
-
}, [o, j,
|
|
825
|
+
}, [o, j, x, F]), L = q((w, d, t) => {
|
|
825
826
|
var y, f;
|
|
826
827
|
if (console.log("🔄 Performing column reorder:", { draggedKey: w, targetKey: d }), !j(o)) {
|
|
827
828
|
const v = t.findIndex((A) => A.key === w), D = t.findIndex((A) => A.key === d);
|
|
@@ -832,10 +833,10 @@ function Wt({
|
|
|
832
833
|
const U = (v < D, D);
|
|
833
834
|
return K.splice(U, 0, P), console.log("✅ Simple header reorder completed"), K;
|
|
834
835
|
}
|
|
835
|
-
const a =
|
|
836
|
+
const a = x(o, w), u = x(o, d);
|
|
836
837
|
if (!a || !u)
|
|
837
838
|
return console.log("❌ Column info not found in complex config"), t;
|
|
838
|
-
const
|
|
839
|
+
const m = JSON.parse(JSON.stringify(o)), l = (v, D) => {
|
|
839
840
|
if (D === null)
|
|
840
841
|
return { container: v, parentObj: null };
|
|
841
842
|
const K = (U) => {
|
|
@@ -853,8 +854,8 @@ function Wt({
|
|
|
853
854
|
container: (P == null ? void 0 : P.children) || v,
|
|
854
855
|
parentObj: P
|
|
855
856
|
};
|
|
856
|
-
}, h = ((y = a.parent) == null ? void 0 : y.key) || null, C = ((f = u.parent) == null ? void 0 : f.key) || null, { container: g } = l(
|
|
857
|
-
if (g !==
|
|
857
|
+
}, h = ((y = a.parent) == null ? void 0 : y.key) || null, C = ((f = u.parent) == null ? void 0 : f.key) || null, { container: g } = l(m, h), { container: I } = l(m, C);
|
|
858
|
+
if (g !== I)
|
|
858
859
|
return console.log("❌ Different containers for drag and target"), t;
|
|
859
860
|
const V = g.findIndex((v) => v.key === w), z = g.findIndex((v) => v.key === d);
|
|
860
861
|
if (V === -1 || z === -1)
|
|
@@ -871,8 +872,8 @@ function Wt({
|
|
|
871
872
|
targetIndex: z,
|
|
872
873
|
insertIndex: _,
|
|
873
874
|
parentKey: h
|
|
874
|
-
}),
|
|
875
|
-
}, [o, j,
|
|
875
|
+
}), m;
|
|
876
|
+
}, [o, j, x]), M = q((w) => {
|
|
876
877
|
const d = w.active.data.current;
|
|
877
878
|
T(d), document.body.style.cursor = "grabbing", console.log("🚀 Drag started:", d);
|
|
878
879
|
}, []), J = q((w) => {
|
|
@@ -886,14 +887,14 @@ function Wt({
|
|
|
886
887
|
document.body.style.cursor = "grabbing";
|
|
887
888
|
return;
|
|
888
889
|
}
|
|
889
|
-
const
|
|
890
|
-
document.body.style.cursor =
|
|
890
|
+
const m = S(a, u);
|
|
891
|
+
document.body.style.cursor = m ? "copy" : "not-allowed", console.log("🎯 Drag over:", {
|
|
891
892
|
target: u.columnKey,
|
|
892
|
-
isValid:
|
|
893
|
+
isValid: m,
|
|
893
894
|
draggedType: a.isLeaf ? "leaf" : "group",
|
|
894
895
|
targetType: u.isLeaf ? "leaf" : "group"
|
|
895
896
|
});
|
|
896
|
-
}, [S]),
|
|
897
|
+
}, [S]), Z = q((w) => {
|
|
897
898
|
const { active: d, over: t } = w;
|
|
898
899
|
if (document.body.style.cursor = "", T(null), !t || !d.data.current || !t.data.current) {
|
|
899
900
|
console.log("❌ Invalid drop - no target");
|
|
@@ -905,18 +906,18 @@ function Wt({
|
|
|
905
906
|
return;
|
|
906
907
|
}
|
|
907
908
|
if (console.log("✅ Valid drop:", { dragData: a, dropData: u }), p) {
|
|
908
|
-
const
|
|
909
|
+
const m = L(
|
|
909
910
|
a.columnKey,
|
|
910
911
|
u.columnKey,
|
|
911
912
|
o
|
|
912
913
|
);
|
|
913
|
-
|
|
914
|
+
m._dragInfo = {
|
|
914
915
|
draggedKey: a.columnKey,
|
|
915
916
|
targetKey: u.columnKey,
|
|
916
917
|
draggedIndex: a.index,
|
|
917
918
|
targetIndex: -1
|
|
918
919
|
// будет вычислен в TableHeader если нужно
|
|
919
|
-
}, p(
|
|
920
|
+
}, p(m), console.log("🔄 Column reorder executed");
|
|
920
921
|
}
|
|
921
922
|
}, [S, p, L, o]), Y = {
|
|
922
923
|
activeColumn: i,
|
|
@@ -929,7 +930,7 @@ function Wt({
|
|
|
929
930
|
collisionDetection: E,
|
|
930
931
|
onDragStart: M,
|
|
931
932
|
onDragOver: J,
|
|
932
|
-
onDragEnd:
|
|
933
|
+
onDragEnd: Z,
|
|
933
934
|
children: [
|
|
934
935
|
n,
|
|
935
936
|
/* @__PURE__ */ s.jsx(Tt, { children: i ? /* @__PURE__ */ s.jsx("div", { className: "column-drag-overlay", children: /* @__PURE__ */ s.jsxs("div", { className: "drag-preview", children: [
|
|
@@ -952,13 +953,13 @@ function Mt({
|
|
|
952
953
|
onSort: b,
|
|
953
954
|
onResize: E,
|
|
954
955
|
sortIcon: j,
|
|
955
|
-
resizeable:
|
|
956
|
+
resizeable: x,
|
|
956
957
|
draggableColumns: F,
|
|
957
958
|
preset: S,
|
|
958
959
|
headerCellClassName: L,
|
|
959
960
|
headerCellStyle: M,
|
|
960
961
|
headerCellWrapperClassName: J,
|
|
961
|
-
headerCellWrapperStyle:
|
|
962
|
+
headerCellWrapperStyle: Z,
|
|
962
963
|
stickyHeader: Y,
|
|
963
964
|
scrollContainerRef: w
|
|
964
965
|
}) {
|
|
@@ -969,34 +970,34 @@ function Mt({
|
|
|
969
970
|
_e(() => (i == null ? void 0 : i.some((k) => k.children && k.children.length > 0)) || !1, [i]);
|
|
970
971
|
const u = F, l = q((k) => {
|
|
971
972
|
if (!i) return null;
|
|
972
|
-
const
|
|
973
|
+
const H = (ae, se, ue = null) => {
|
|
973
974
|
for (const ne of ae) {
|
|
974
975
|
if (ne.key === se)
|
|
975
976
|
return ue;
|
|
976
977
|
if (ne.children && ne.children.length > 0) {
|
|
977
|
-
const de =
|
|
978
|
+
const de = H(ne.children, se, ne);
|
|
978
979
|
if (de !== null) return de;
|
|
979
980
|
}
|
|
980
981
|
}
|
|
981
982
|
return null;
|
|
982
983
|
};
|
|
983
|
-
return
|
|
984
|
+
return H(i, k);
|
|
984
985
|
}, [i])(n.key), h = n.fixed || (l == null ? void 0 : l.fixed) || !1, g = q((k) => {
|
|
985
986
|
if (!i) return 0;
|
|
986
|
-
const
|
|
987
|
+
const H = (ae, se, ue = 0) => {
|
|
987
988
|
for (const ne of ae) {
|
|
988
989
|
if (ne.key === se)
|
|
989
990
|
return ue;
|
|
990
991
|
if (ne.children && ne.children.length > 0) {
|
|
991
|
-
const de =
|
|
992
|
+
const de = H(ne.children, se, ue + 1);
|
|
992
993
|
if (de !== -1) return de;
|
|
993
994
|
}
|
|
994
995
|
}
|
|
995
996
|
return -1;
|
|
996
997
|
};
|
|
997
|
-
return
|
|
998
|
+
return H(i, k);
|
|
998
999
|
}, [i])(n.key), {
|
|
999
|
-
attributes:
|
|
1000
|
+
attributes: I,
|
|
1000
1001
|
listeners: V,
|
|
1001
1002
|
setNodeRef: z,
|
|
1002
1003
|
isDragging: N
|
|
@@ -1043,28 +1044,28 @@ function Mt({
|
|
|
1043
1044
|
let U = n.fixedLeft ? n.fixedLeft : 0;
|
|
1044
1045
|
if (o !== 0)
|
|
1045
1046
|
for (let k = 0; k < o; k++) {
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1047
|
+
const H = p[k];
|
|
1048
|
+
H.fixed && !H.hidden && (U += (H.width || H.minWidth || 200) + (H.fixedLeft || 0));
|
|
1048
1049
|
}
|
|
1049
1050
|
const O = ((k) => {
|
|
1050
1051
|
if (k.groupColor)
|
|
1051
1052
|
return k.groupColor;
|
|
1052
1053
|
if (i) {
|
|
1053
|
-
const
|
|
1054
|
+
const H = (se, ue) => {
|
|
1054
1055
|
for (const ne of se)
|
|
1055
1056
|
if (ne.children) {
|
|
1056
1057
|
if (ne.children.some((we) => we.key === ue))
|
|
1057
1058
|
return ne;
|
|
1058
|
-
const de =
|
|
1059
|
+
const de = H(ne.children, ue);
|
|
1059
1060
|
if (de) return de;
|
|
1060
1061
|
}
|
|
1061
1062
|
return null;
|
|
1062
|
-
}, ae =
|
|
1063
|
+
}, ae = H(i, k.key);
|
|
1063
1064
|
return ae == null ? void 0 : ae.groupColor;
|
|
1064
1065
|
}
|
|
1065
1066
|
})(n);
|
|
1066
|
-
let Q = "currentColor",
|
|
1067
|
-
return T.sort_field === n.key && (T.sort_order === "ASC" && (Q = "#5329FF"), T.sort_order === "DESC" && (
|
|
1067
|
+
let Q = "currentColor", X = "currentColor";
|
|
1068
|
+
return T.sort_field === n.key && (T.sort_order === "ASC" && (Q = "#5329FF"), T.sort_order === "DESC" && (X = "#5329FF")), /* @__PURE__ */ s.jsx(
|
|
1068
1069
|
"th",
|
|
1069
1070
|
{
|
|
1070
1071
|
ref: f,
|
|
@@ -1102,13 +1103,13 @@ function Mt({
|
|
|
1102
1103
|
${S ? S + "__header-cell-wrapper" : ""}
|
|
1103
1104
|
${J || ""}
|
|
1104
1105
|
`,
|
|
1105
|
-
style:
|
|
1106
|
+
style: Z,
|
|
1106
1107
|
children: [
|
|
1107
1108
|
u && /* @__PURE__ */ s.jsx(
|
|
1108
1109
|
"div",
|
|
1109
1110
|
{
|
|
1110
1111
|
className: `radar-table__drag-handle ${N ? "dragging" : ""} ${a ? "" : "group-drag-handle"}`,
|
|
1111
|
-
|
|
1112
|
+
...I,
|
|
1112
1113
|
...V,
|
|
1113
1114
|
style: { cursor: N ? "grabbing" : "grab" },
|
|
1114
1115
|
children: /* @__PURE__ */ s.jsxs("svg", { width: "8", height: "10", viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
@@ -1127,11 +1128,11 @@ function Mt({
|
|
|
1127
1128
|
title: n.title,
|
|
1128
1129
|
onClick: () => {
|
|
1129
1130
|
const { sort_order: k } = T;
|
|
1130
|
-
let
|
|
1131
|
+
let H = {
|
|
1131
1132
|
columnKey: n.key,
|
|
1132
1133
|
direction: "ASC"
|
|
1133
1134
|
};
|
|
1134
|
-
k === "ASC" && (
|
|
1135
|
+
k === "ASC" && (H.direction = "DESC"), k === "DESC" && (H.columnKey = void 0, H.direction = void 0), b(H.columnKey, H.direction);
|
|
1135
1136
|
},
|
|
1136
1137
|
style: {
|
|
1137
1138
|
cursor: "pointer",
|
|
@@ -1156,13 +1157,13 @@ function Mt({
|
|
|
1156
1157
|
className: "radar-table__sort-button",
|
|
1157
1158
|
onClick: (k) => b(n.key, "DESC"),
|
|
1158
1159
|
title: `Сортировать по ${n.title}`,
|
|
1159
|
-
children: /* @__PURE__ */ s.jsx("svg", { width: "9", height: "12", viewBox: "0 0 9 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s.jsx("path", { fill:
|
|
1160
|
+
children: /* @__PURE__ */ s.jsx("svg", { width: "9", height: "12", viewBox: "0 0 9 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s.jsx("path", { fill: X, fillRule: "evenodd", clipRule: "evenodd", d: "M3.57973 9.392V0.625H4.70473V9.392L7.32421 6.77252C7.54388 6.55285 7.90003 6.55285 8.1197 6.77252C8.33937 6.99219 8.33937 7.34835 8.1197 7.56802L4.53998 11.1477C4.32031 11.3674 3.96415 11.3674 3.74448 11.1477L0.164753 7.56802C-0.0549175 7.34835 -0.0549175 6.99219 0.164753 6.77252C0.384423 6.55285 0.740578 6.55285 0.960248 6.77252L3.57973 9.392Z" }) })
|
|
1160
1161
|
}
|
|
1161
1162
|
)
|
|
1162
1163
|
] }),
|
|
1163
1164
|
n.sortable && j && a && j(T.sort_field, T.sort_order),
|
|
1164
1165
|
n.tooltipText && /* @__PURE__ */ s.jsx(Ft, { text: n.tooltipText, children: n.tooltipIcon }),
|
|
1165
|
-
|
|
1166
|
+
x && /* @__PURE__ */ s.jsx(
|
|
1166
1167
|
Nt,
|
|
1167
1168
|
{
|
|
1168
1169
|
column: n,
|
|
@@ -1188,13 +1189,13 @@ function Ue({
|
|
|
1188
1189
|
sortIcon: b,
|
|
1189
1190
|
resizeable: E,
|
|
1190
1191
|
draggableColumns: j,
|
|
1191
|
-
preset:
|
|
1192
|
+
preset: x,
|
|
1192
1193
|
headerClassName: F,
|
|
1193
1194
|
headerStyle: S,
|
|
1194
1195
|
headerRowClassName: L,
|
|
1195
1196
|
headerRowStyle: M,
|
|
1196
1197
|
headerCellClassName: J,
|
|
1197
|
-
headerCellStyle:
|
|
1198
|
+
headerCellStyle: Z,
|
|
1198
1199
|
headerCellWrapperClassName: Y,
|
|
1199
1200
|
headerCellWrapperStyle: w,
|
|
1200
1201
|
stickyHeader: d,
|
|
@@ -1204,21 +1205,21 @@ function Ue({
|
|
|
1204
1205
|
const [a, u] = ce({
|
|
1205
1206
|
sort_field: void 0,
|
|
1206
1207
|
sort_order: void 0
|
|
1207
|
-
}),
|
|
1208
|
+
}), m = q((l, h) => {
|
|
1208
1209
|
const { sort_field: C, sort_order: g } = a;
|
|
1209
|
-
let
|
|
1210
|
+
let I = {
|
|
1210
1211
|
sort_field: l,
|
|
1211
1212
|
sort_order: h
|
|
1212
1213
|
};
|
|
1213
|
-
C === l && g === h && (
|
|
1214
|
+
C === l && g === h && (I = {
|
|
1214
1215
|
sort_field: void 0,
|
|
1215
1216
|
sort_order: void 0
|
|
1216
|
-
}), u(
|
|
1217
|
+
}), console.log("newSortingState", I), u(I), p == null || p(I.sort_field, I.sort_order);
|
|
1217
1218
|
}, [a.sort_order, p]);
|
|
1218
1219
|
return /* @__PURE__ */ s.jsx(
|
|
1219
1220
|
"tr",
|
|
1220
1221
|
{
|
|
1221
|
-
className: `radar-table__header-row ${
|
|
1222
|
+
className: `radar-table__header-row ${x ? x + "__header-row" : ""} ${L || ""}`,
|
|
1222
1223
|
style: M,
|
|
1223
1224
|
children: n.map((l, h) => /* @__PURE__ */ s.jsx(
|
|
1224
1225
|
Mt,
|
|
@@ -1228,14 +1229,14 @@ function Ue({
|
|
|
1228
1229
|
config: n,
|
|
1229
1230
|
fullConfig: o,
|
|
1230
1231
|
sorting: a,
|
|
1231
|
-
onSort:
|
|
1232
|
+
onSort: m,
|
|
1232
1233
|
onResize: i,
|
|
1233
1234
|
sortIcon: b,
|
|
1234
1235
|
resizeable: E,
|
|
1235
1236
|
draggableColumns: j,
|
|
1236
|
-
preset:
|
|
1237
|
+
preset: x,
|
|
1237
1238
|
headerCellClassName: J,
|
|
1238
|
-
headerCellStyle:
|
|
1239
|
+
headerCellStyle: Z,
|
|
1239
1240
|
headerCellWrapperClassName: Y,
|
|
1240
1241
|
headerCellWrapperStyle: w,
|
|
1241
1242
|
stickyHeader: d,
|
|
@@ -1255,70 +1256,70 @@ function Vt(n) {
|
|
|
1255
1256
|
stickyHeader: b,
|
|
1256
1257
|
headerRowClassName: E,
|
|
1257
1258
|
headerRowStyle: j,
|
|
1258
|
-
headerCellClassName:
|
|
1259
|
+
headerCellClassName: x,
|
|
1259
1260
|
headerCellStyle: F,
|
|
1260
1261
|
headerCellWrapperClassName: S,
|
|
1261
1262
|
headerCellWrapperStyle: L,
|
|
1262
1263
|
onResize: M,
|
|
1263
1264
|
onColumnReorder: J
|
|
1264
|
-
} = n,
|
|
1265
|
-
if (!
|
|
1265
|
+
} = n, Z = o.some((t) => t.children && t.children.length > 0), Y = _e(() => {
|
|
1266
|
+
if (!Z)
|
|
1266
1267
|
return null;
|
|
1267
|
-
const t = {}, a = (u,
|
|
1268
|
-
t[
|
|
1269
|
-
l.hidden || (t[
|
|
1268
|
+
const t = {}, a = (u, m = 0) => {
|
|
1269
|
+
t[m] || (t[m] = []), u.forEach((l) => {
|
|
1270
|
+
l.hidden || (t[m].push(l), l.children && l.children.length > 0 && a(l.children, m + 1));
|
|
1270
1271
|
});
|
|
1271
1272
|
};
|
|
1272
1273
|
return a(o), t;
|
|
1273
|
-
}, [o,
|
|
1274
|
+
}, [o, Z]), w = q((t, a) => {
|
|
1274
1275
|
if (!M) return;
|
|
1275
1276
|
const u = (h, C) => {
|
|
1276
1277
|
for (const g of h) {
|
|
1277
1278
|
if (g.key === C) return g;
|
|
1278
1279
|
if (g.children) {
|
|
1279
|
-
const
|
|
1280
|
-
if (
|
|
1280
|
+
const I = u(g.children, C);
|
|
1281
|
+
if (I) return I;
|
|
1281
1282
|
}
|
|
1282
1283
|
}
|
|
1283
1284
|
return null;
|
|
1284
|
-
},
|
|
1285
|
+
}, m = (h) => {
|
|
1285
1286
|
if (!h.children || h.children.length === 0)
|
|
1286
1287
|
return [h];
|
|
1287
1288
|
const C = [];
|
|
1288
1289
|
return h.children.forEach((g) => {
|
|
1289
|
-
g.hidden || C.push(...
|
|
1290
|
+
g.hidden || C.push(...m(g));
|
|
1290
1291
|
}), C;
|
|
1291
1292
|
}, l = u(o, t);
|
|
1292
1293
|
if (l)
|
|
1293
1294
|
if (l.children && l.children.length > 0) {
|
|
1294
|
-
const h =
|
|
1295
|
+
const h = m(l);
|
|
1295
1296
|
if (h.length > 0) {
|
|
1296
|
-
const C = h.reduce((
|
|
1297
|
-
h.forEach((
|
|
1298
|
-
const V = Math.max(50, Math.round((
|
|
1299
|
-
M(
|
|
1297
|
+
const C = h.reduce((I, V) => I + (V.width || V.minWidth || 200), 0), g = a / C;
|
|
1298
|
+
h.forEach((I) => {
|
|
1299
|
+
const V = Math.max(50, Math.round((I.width || I.minWidth || 200) * g));
|
|
1300
|
+
M(I.key, V);
|
|
1300
1301
|
});
|
|
1301
1302
|
}
|
|
1302
1303
|
} else
|
|
1303
1304
|
M(t, a);
|
|
1304
1305
|
}, [o, M]), d = q((t) => {
|
|
1305
1306
|
if (!J) return;
|
|
1306
|
-
if (!
|
|
1307
|
+
if (!Z) {
|
|
1307
1308
|
J(t);
|
|
1308
1309
|
return;
|
|
1309
1310
|
}
|
|
1310
|
-
const a = (A, O, Q = [],
|
|
1311
|
+
const a = (A, O, Q = [], X = null) => {
|
|
1311
1312
|
for (let re = 0; re < A.length; re++) {
|
|
1312
|
-
const k = A[re],
|
|
1313
|
+
const k = A[re], H = [...Q, re];
|
|
1313
1314
|
if (k.key === O)
|
|
1314
1315
|
return {
|
|
1315
1316
|
column: k,
|
|
1316
|
-
parent:
|
|
1317
|
-
path:
|
|
1317
|
+
parent: X,
|
|
1318
|
+
path: H,
|
|
1318
1319
|
level: Q.length
|
|
1319
1320
|
};
|
|
1320
1321
|
if (k.children && k.children.length > 0) {
|
|
1321
|
-
const ae = a(k.children, O,
|
|
1322
|
+
const ae = a(k.children, O, H, k);
|
|
1322
1323
|
if (ae)
|
|
1323
1324
|
return ae;
|
|
1324
1325
|
}
|
|
@@ -1327,16 +1328,16 @@ function Vt(n) {
|
|
|
1327
1328
|
};
|
|
1328
1329
|
if (!Object.values(Y).find((A) => {
|
|
1329
1330
|
if (A.length !== t.length) return !1;
|
|
1330
|
-
const O = A.map((
|
|
1331
|
+
const O = A.map((X) => X.key).sort(), Q = t.map((X) => X.key).sort();
|
|
1331
1332
|
return JSON.stringify(O) === JSON.stringify(Q);
|
|
1332
1333
|
}))
|
|
1333
1334
|
return;
|
|
1334
|
-
const
|
|
1335
|
-
if (!(
|
|
1335
|
+
const m = t._dragInfo;
|
|
1336
|
+
if (!(m != null && m.draggedKey) || !(m != null && m.targetKey))
|
|
1336
1337
|
return;
|
|
1337
|
-
const { draggedKey: l, targetKey: h } =
|
|
1338
|
+
const { draggedKey: l, targetKey: h } = m, C = a(o, l), g = a(o, h);
|
|
1338
1339
|
if (!C || !g) return;
|
|
1339
|
-
const { column:
|
|
1340
|
+
const { column: I, parent: V, path: z, level: N } = C, { column: _, parent: y, path: f, level: v } = g, D = (A, O) => A.fixed || (O == null ? void 0 : O.fixed) || !1, K = D(I, V), P = D(_, y);
|
|
1340
1341
|
if (N !== v || V !== y || V && y && V.key !== y.key || K !== P)
|
|
1341
1342
|
return;
|
|
1342
1343
|
const U = JSON.parse(JSON.stringify(o));
|
|
@@ -1350,15 +1351,15 @@ function Vt(n) {
|
|
|
1350
1351
|
k === 0 ? O = O[A[k]] : O = O.children[A[k]];
|
|
1351
1352
|
if (!O || !O.children)
|
|
1352
1353
|
return;
|
|
1353
|
-
const Q = z[z.length - 1],
|
|
1354
|
-
if (Q < 0 || Q >= O.children.length ||
|
|
1354
|
+
const Q = z[z.length - 1], X = f[f.length - 1];
|
|
1355
|
+
if (Q < 0 || Q >= O.children.length || X < 0 || X >= O.children.length)
|
|
1355
1356
|
return;
|
|
1356
1357
|
const [re] = O.children.splice(Q, 1);
|
|
1357
|
-
O.children.splice(
|
|
1358
|
+
O.children.splice(X, 0, re);
|
|
1358
1359
|
}
|
|
1359
1360
|
J(U);
|
|
1360
1361
|
}, [o, J, Y]);
|
|
1361
|
-
return
|
|
1362
|
+
return Z ? /* @__PURE__ */ s.jsx(
|
|
1362
1363
|
"thead",
|
|
1363
1364
|
{
|
|
1364
1365
|
className: `radar-table__header ${p ? p + "__header" : ""} ${i}`,
|
|
@@ -1388,7 +1389,7 @@ function Vt(n) {
|
|
|
1388
1389
|
position: b ? "sticky" : "static",
|
|
1389
1390
|
top: b && typeof b == "number" ? b + (u - 1) * 50 : 0
|
|
1390
1391
|
},
|
|
1391
|
-
headerCellClassName:
|
|
1392
|
+
headerCellClassName: x,
|
|
1392
1393
|
headerCellStyle: F,
|
|
1393
1394
|
headerCellWrapperClassName: S,
|
|
1394
1395
|
headerCellWrapperStyle: L,
|
|
@@ -1434,13 +1435,13 @@ function Yt({
|
|
|
1434
1435
|
onRowReorder: b,
|
|
1435
1436
|
preset: E,
|
|
1436
1437
|
customCellRender: j,
|
|
1437
|
-
bodyClassName:
|
|
1438
|
+
bodyClassName: x,
|
|
1438
1439
|
bodyStyle: F,
|
|
1439
1440
|
bodyRowClassName: S,
|
|
1440
1441
|
bodyRowStyle: L,
|
|
1441
1442
|
bodyCellClassName: M,
|
|
1442
1443
|
bodyCellStyle: J,
|
|
1443
|
-
bodyCellWrapperClassName:
|
|
1444
|
+
bodyCellWrapperClassName: Z,
|
|
1444
1445
|
bodyCellWrapperStyle: Y,
|
|
1445
1446
|
noDataRender: w
|
|
1446
1447
|
}) {
|
|
@@ -1518,7 +1519,7 @@ function Yt({
|
|
|
1518
1519
|
}
|
|
1519
1520
|
}, []), g = q((_) => {
|
|
1520
1521
|
_.preventDefault(), _.dataTransfer.dropEffect = "move";
|
|
1521
|
-
}, []),
|
|
1522
|
+
}, []), I = q((_, y) => {
|
|
1522
1523
|
_.preventDefault(), d !== y && u(y);
|
|
1523
1524
|
}, [d]), V = q((_) => {
|
|
1524
1525
|
_.preventDefault(), u(null);
|
|
@@ -1533,7 +1534,7 @@ function Yt({
|
|
|
1533
1534
|
const D = [...o], [K] = D.splice(f, 1);
|
|
1534
1535
|
D.splice(v, 0, K), b && (b == null || b(D)), t(null), u(null);
|
|
1535
1536
|
}, [d, o, i, b]);
|
|
1536
|
-
return o.length === 0 ? /* @__PURE__ */ s.jsx("tbody", { className: `radar-table__body ${E ? E + "__body" : ""} ${
|
|
1537
|
+
return o.length === 0 ? /* @__PURE__ */ s.jsx("tbody", { className: `radar-table__body ${E ? E + "__body" : ""} ${x}`, style: F, children: /* @__PURE__ */ s.jsx(
|
|
1537
1538
|
"tr",
|
|
1538
1539
|
{
|
|
1539
1540
|
className: `radar-table__body-row ${E ? E + "__body-row" : ""} ${S}`,
|
|
@@ -1553,7 +1554,7 @@ function Yt({
|
|
|
1553
1554
|
}
|
|
1554
1555
|
)
|
|
1555
1556
|
}
|
|
1556
|
-
) }) : /* @__PURE__ */ s.jsx("tbody", { className: `radar-table__body ${E ? E + "__body" : ""} ${
|
|
1557
|
+
) }) : /* @__PURE__ */ s.jsx("tbody", { className: `radar-table__body ${E ? E + "__body" : ""} ${x}`, style: F, children: o.map((_) => {
|
|
1557
1558
|
const y = i ? i(_) : JSON.stringify(_);
|
|
1558
1559
|
return (
|
|
1559
1560
|
// Table row
|
|
@@ -1565,7 +1566,7 @@ function Yt({
|
|
|
1565
1566
|
draggable: n,
|
|
1566
1567
|
onDragStart: (f) => C(f, y),
|
|
1567
1568
|
onDragOver: g,
|
|
1568
|
-
onDragEnter: (f) =>
|
|
1569
|
+
onDragEnter: (f) => I(f, y),
|
|
1569
1570
|
onDragLeave: V,
|
|
1570
1571
|
onDrop: (f) => N(f, y),
|
|
1571
1572
|
onDragEnd: z,
|
|
@@ -1574,8 +1575,8 @@ function Yt({
|
|
|
1574
1575
|
const D = f.fixed && !f.width ? 200 : f.width, K = f.fixed && !f.minWidth ? 200 : f.minWidth;
|
|
1575
1576
|
let P = f.fixedLeft ? f.fixedLeft : 0, U = !1;
|
|
1576
1577
|
if (j && j.idx.includes(f.dataIndex) && (U = !0), j && j.idx.length === 0 && (U = !0), f.fixed && v !== 0)
|
|
1577
|
-
for (let
|
|
1578
|
-
l[
|
|
1578
|
+
for (let X = 0; X < v; X++)
|
|
1579
|
+
l[X].fixed && !l[X].hidden && (P += (l[X].width || l[X].minWidth || 200) + (l[X].fixedLeft || 0));
|
|
1579
1580
|
const A = h(f);
|
|
1580
1581
|
return !f.hidden && /* @__PURE__ */ s.jsxs(
|
|
1581
1582
|
"td",
|
|
@@ -1593,7 +1594,7 @@ function Yt({
|
|
|
1593
1594
|
!U && /* @__PURE__ */ s.jsxs(
|
|
1594
1595
|
"div",
|
|
1595
1596
|
{
|
|
1596
|
-
className: `radar-table__body-cell-wrapper ${E ? E + "__body-cell-wrapper" : ""} ${
|
|
1597
|
+
className: `radar-table__body-cell-wrapper ${E ? E + "__body-cell-wrapper" : ""} ${Z}`,
|
|
1597
1598
|
style: {
|
|
1598
1599
|
...Y,
|
|
1599
1600
|
backgroundColor: A || "white"
|
|
@@ -1607,7 +1608,7 @@ function Yt({
|
|
|
1607
1608
|
U && /* @__PURE__ */ s.jsx(
|
|
1608
1609
|
"div",
|
|
1609
1610
|
{
|
|
1610
|
-
className: `radar-table__body-cell-wrapper ${E ? E + "__body-cell-wrapper" : ""} ${
|
|
1611
|
+
className: `radar-table__body-cell-wrapper ${E ? E + "__body-cell-wrapper" : ""} ${Z}`,
|
|
1611
1612
|
style: {
|
|
1612
1613
|
...Y,
|
|
1613
1614
|
backgroundColor: A || "white"
|
|
@@ -1627,9 +1628,9 @@ function Yt({
|
|
|
1627
1628
|
}) });
|
|
1628
1629
|
}
|
|
1629
1630
|
const He = ({ config: n }) => {
|
|
1630
|
-
const [{ current: o, pageSize: p, total: i, onChange: T, showQuickJumper: b, buttonsCount: E = 4, hideOnSinglePage: j = !1 },
|
|
1631
|
+
const [{ current: o, pageSize: p, total: i, onChange: T, showQuickJumper: b, buttonsCount: E = 4, hideOnSinglePage: j = !1 }, x] = ce(n);
|
|
1631
1632
|
Ce(() => {
|
|
1632
|
-
|
|
1633
|
+
x(n);
|
|
1633
1634
|
}, [n]);
|
|
1634
1635
|
const F = Math.ceil(o / E), S = (F - 1) * E + 1, L = F * E, M = (t) => {
|
|
1635
1636
|
const a = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab", "Enter"];
|
|
@@ -1637,20 +1638,20 @@ const He = ({ config: n }) => {
|
|
|
1637
1638
|
}, J = (t) => {
|
|
1638
1639
|
if (t.key === "Enter") {
|
|
1639
1640
|
const a = parseInt(t.currentTarget.value);
|
|
1640
|
-
a > 0 && a <= i && (
|
|
1641
|
+
a > 0 && a <= i && (x({ ...n, current: a }), T == null || T(a, p), t.currentTarget.value = "");
|
|
1641
1642
|
}
|
|
1642
|
-
},
|
|
1643
|
+
}, Z = (t) => {
|
|
1643
1644
|
const u = t.target.value.replace(/[^0-9]/g, "");
|
|
1644
1645
|
t.target.value = u;
|
|
1645
1646
|
}, Y = (t) => {
|
|
1646
1647
|
t.preventDefault();
|
|
1647
|
-
const u = t.clipboardData.getData("text").replace(/[^0-9]/g, ""),
|
|
1648
|
-
|
|
1648
|
+
const u = t.clipboardData.getData("text").replace(/[^0-9]/g, ""), m = t.target, l = m.selectionStart || 0, h = m.selectionEnd || 0, C = m.value.substring(0, l) + u + m.value.substring(h);
|
|
1649
|
+
m.value = C, m.setSelectionRange(l + u.length, l + u.length);
|
|
1649
1650
|
}, w = (t) => {
|
|
1650
1651
|
const a = t.currentTarget.id;
|
|
1651
|
-
a === "pagination_left_button" && o > 1 && (
|
|
1652
|
+
a === "pagination_left_button" && o > 1 && (x({ ...n, current: o - 1 }), T == null || T(o - 1, p)), a === "pagination_right_button" && o < i && (x({ ...n, current: o + 1 }), T == null || T(o + 1, p));
|
|
1652
1653
|
}, d = (t) => {
|
|
1653
|
-
|
|
1654
|
+
x({ ...n, current: t }), T == null || T(t, p);
|
|
1654
1655
|
};
|
|
1655
1656
|
return j && i <= 1 ? null : /* @__PURE__ */ s.jsxs("div", { className: "radar-table__pagination", children: [
|
|
1656
1657
|
/* @__PURE__ */ s.jsxs(
|
|
@@ -1678,7 +1679,7 @@ const He = ({ config: n }) => {
|
|
|
1678
1679
|
{
|
|
1679
1680
|
className: "radar-table__pagination-input",
|
|
1680
1681
|
onKeyDown: M,
|
|
1681
|
-
onChange:
|
|
1682
|
+
onChange: Z,
|
|
1682
1683
|
onPaste: Y,
|
|
1683
1684
|
onKeyUp: (t) => J(t)
|
|
1684
1685
|
}
|
|
@@ -1697,25 +1698,25 @@ function Ht({
|
|
|
1697
1698
|
pagination: b,
|
|
1698
1699
|
stickyHeader: E = !1,
|
|
1699
1700
|
resizeable: j = !1,
|
|
1700
|
-
draggableRows:
|
|
1701
|
+
draggableRows: x = !1,
|
|
1701
1702
|
draggableColumns: F = !1,
|
|
1702
1703
|
scrollContainerRef: S,
|
|
1703
1704
|
onResize: L,
|
|
1704
1705
|
onSort: M,
|
|
1705
1706
|
onRowReorder: J,
|
|
1706
|
-
onColumnReorder:
|
|
1707
|
+
onColumnReorder: Z,
|
|
1707
1708
|
customCellRender: Y,
|
|
1708
1709
|
noDataRender: w,
|
|
1709
1710
|
sortIcon: d,
|
|
1710
1711
|
className: t = "",
|
|
1711
1712
|
style: a,
|
|
1712
1713
|
headerClassName: u = "",
|
|
1713
|
-
headerStyle:
|
|
1714
|
+
headerStyle: m,
|
|
1714
1715
|
headerCellClassName: l = "",
|
|
1715
1716
|
headerCellStyle: h,
|
|
1716
1717
|
headerRowClassName: C = "",
|
|
1717
1718
|
headerRowStyle: g,
|
|
1718
|
-
headerCellWrapperClassName:
|
|
1719
|
+
headerCellWrapperClassName: I = "",
|
|
1719
1720
|
headerCellWrapperStyle: V,
|
|
1720
1721
|
bodyClassName: z = "",
|
|
1721
1722
|
bodyStyle: N,
|
|
@@ -1730,7 +1731,7 @@ function Ht({
|
|
|
1730
1731
|
headerGroupCellClassName: A,
|
|
1731
1732
|
headerGroupCellStyle: O,
|
|
1732
1733
|
headerGroupCellWrapperClassName: Q,
|
|
1733
|
-
headerGroupCellWrapperStyle:
|
|
1734
|
+
headerGroupCellWrapperStyle: X,
|
|
1734
1735
|
paginationContainerClassName: re = "",
|
|
1735
1736
|
paginationContainerStyle: k
|
|
1736
1737
|
}) {
|
|
@@ -1739,7 +1740,7 @@ function Ht({
|
|
|
1739
1740
|
Wt,
|
|
1740
1741
|
{
|
|
1741
1742
|
fullConfig: p,
|
|
1742
|
-
onColumnReorder:
|
|
1743
|
+
onColumnReorder: Z,
|
|
1743
1744
|
children: /* @__PURE__ */ s.jsx(
|
|
1744
1745
|
Ze,
|
|
1745
1746
|
{
|
|
@@ -1751,24 +1752,24 @@ function Ht({
|
|
|
1751
1752
|
pagination: b,
|
|
1752
1753
|
stickyHeader: E,
|
|
1753
1754
|
resizeable: j,
|
|
1754
|
-
draggableRows:
|
|
1755
|
+
draggableRows: x,
|
|
1755
1756
|
draggableColumns: F,
|
|
1756
1757
|
scrollContainerRef: S,
|
|
1757
1758
|
onResize: L,
|
|
1758
1759
|
onSort: M,
|
|
1759
1760
|
onRowReorder: J,
|
|
1760
|
-
onColumnReorder:
|
|
1761
|
+
onColumnReorder: Z,
|
|
1761
1762
|
customCellRender: Y,
|
|
1762
1763
|
sortIcon: d,
|
|
1763
1764
|
className: t,
|
|
1764
1765
|
style: a,
|
|
1765
1766
|
headerClassName: u,
|
|
1766
|
-
headerStyle:
|
|
1767
|
+
headerStyle: m,
|
|
1767
1768
|
headerCellClassName: l,
|
|
1768
1769
|
headerCellStyle: h,
|
|
1769
1770
|
headerRowClassName: C,
|
|
1770
1771
|
headerRowStyle: g,
|
|
1771
|
-
headerCellWrapperClassName:
|
|
1772
|
+
headerCellWrapperClassName: I,
|
|
1772
1773
|
headerCellWrapperStyle: V,
|
|
1773
1774
|
bodyClassName: z,
|
|
1774
1775
|
bodyStyle: N,
|
|
@@ -1783,7 +1784,7 @@ function Ht({
|
|
|
1783
1784
|
headerGroupCellClassName: A,
|
|
1784
1785
|
headerGroupCellStyle: O,
|
|
1785
1786
|
headerGroupCellWrapperClassName: Q,
|
|
1786
|
-
headerGroupCellWrapperStyle:
|
|
1787
|
+
headerGroupCellWrapperStyle: X,
|
|
1787
1788
|
paginationContainerClassName: re,
|
|
1788
1789
|
paginationContainerStyle: k,
|
|
1789
1790
|
noDataRender: w
|
|
@@ -1804,24 +1805,24 @@ function Ht({
|
|
|
1804
1805
|
pagination: b,
|
|
1805
1806
|
stickyHeader: E,
|
|
1806
1807
|
resizeable: j,
|
|
1807
|
-
draggableRows:
|
|
1808
|
+
draggableRows: x,
|
|
1808
1809
|
draggableColumns: F,
|
|
1809
1810
|
scrollContainerRef: S,
|
|
1810
1811
|
onResize: L,
|
|
1811
1812
|
onSort: M,
|
|
1812
1813
|
onRowReorder: J,
|
|
1813
|
-
onColumnReorder:
|
|
1814
|
+
onColumnReorder: Z,
|
|
1814
1815
|
customCellRender: Y,
|
|
1815
1816
|
sortIcon: d,
|
|
1816
1817
|
className: t,
|
|
1817
1818
|
style: a,
|
|
1818
1819
|
headerClassName: u,
|
|
1819
|
-
headerStyle:
|
|
1820
|
+
headerStyle: m,
|
|
1820
1821
|
headerCellClassName: l,
|
|
1821
1822
|
headerCellStyle: h,
|
|
1822
1823
|
headerRowClassName: C,
|
|
1823
1824
|
headerRowStyle: g,
|
|
1824
|
-
headerCellWrapperClassName:
|
|
1825
|
+
headerCellWrapperClassName: I,
|
|
1825
1826
|
headerCellWrapperStyle: V,
|
|
1826
1827
|
bodyClassName: z,
|
|
1827
1828
|
bodyStyle: N,
|
|
@@ -1836,7 +1837,7 @@ function Ht({
|
|
|
1836
1837
|
headerGroupCellClassName: A,
|
|
1837
1838
|
headerGroupCellStyle: O,
|
|
1838
1839
|
headerGroupCellWrapperClassName: Q,
|
|
1839
|
-
headerGroupCellWrapperStyle:
|
|
1840
|
+
headerGroupCellWrapperStyle: X,
|
|
1840
1841
|
paginationContainerClassName: re,
|
|
1841
1842
|
paginationContainerStyle: k,
|
|
1842
1843
|
noDataRender: w
|
|
@@ -1854,25 +1855,25 @@ function Ze(n) {
|
|
|
1854
1855
|
loading: b,
|
|
1855
1856
|
stickyHeader: E,
|
|
1856
1857
|
resizeable: j,
|
|
1857
|
-
draggableRows:
|
|
1858
|
+
draggableRows: x,
|
|
1858
1859
|
draggableColumns: F,
|
|
1859
1860
|
scrollContainerRef: S,
|
|
1860
1861
|
onResize: L,
|
|
1861
1862
|
onSort: M,
|
|
1862
1863
|
onRowReorder: J,
|
|
1863
|
-
onColumnReorder:
|
|
1864
|
+
onColumnReorder: Z,
|
|
1864
1865
|
customCellRender: Y,
|
|
1865
1866
|
sortIcon: w,
|
|
1866
1867
|
className: d,
|
|
1867
1868
|
style: t,
|
|
1868
1869
|
headerClassName: a,
|
|
1869
1870
|
headerStyle: u,
|
|
1870
|
-
headerCellClassName:
|
|
1871
|
+
headerCellClassName: m,
|
|
1871
1872
|
headerCellStyle: l,
|
|
1872
1873
|
headerRowClassName: h,
|
|
1873
1874
|
headerRowStyle: C,
|
|
1874
1875
|
headerCellWrapperClassName: g,
|
|
1875
|
-
headerCellWrapperStyle:
|
|
1876
|
+
headerCellWrapperStyle: I,
|
|
1876
1877
|
bodyClassName: V,
|
|
1877
1878
|
bodyStyle: z,
|
|
1878
1879
|
bodyRowClassName: N,
|
|
@@ -1887,7 +1888,7 @@ function Ze(n) {
|
|
|
1887
1888
|
headerGroupCellStyle: A,
|
|
1888
1889
|
headerGroupCellWrapperClassName: O,
|
|
1889
1890
|
headerGroupCellWrapperStyle: Q,
|
|
1890
|
-
noDataRender:
|
|
1891
|
+
noDataRender: X
|
|
1891
1892
|
} = n;
|
|
1892
1893
|
return /* @__PURE__ */ s.jsxs("table", { className: `radar-table ${p || ""} ${d}`, style: t, children: [
|
|
1893
1894
|
/* @__PURE__ */ s.jsx(
|
|
@@ -1904,10 +1905,10 @@ function Ze(n) {
|
|
|
1904
1905
|
headerStyle: u,
|
|
1905
1906
|
headerRowClassName: h,
|
|
1906
1907
|
headerRowStyle: C,
|
|
1907
|
-
headerCellClassName:
|
|
1908
|
+
headerCellClassName: m,
|
|
1908
1909
|
headerCellStyle: l,
|
|
1909
1910
|
headerCellWrapperClassName: g,
|
|
1910
|
-
headerCellWrapperStyle:
|
|
1911
|
+
headerCellWrapperStyle: I,
|
|
1911
1912
|
headerGroupRowClassName: K,
|
|
1912
1913
|
headerGroupRowStyle: P,
|
|
1913
1914
|
headerGroupCellClassName: U,
|
|
@@ -1916,13 +1917,13 @@ function Ze(n) {
|
|
|
1916
1917
|
headerGroupCellWrapperStyle: Q,
|
|
1917
1918
|
stickyHeader: E,
|
|
1918
1919
|
scrollContainerRef: S,
|
|
1919
|
-
onColumnReorder:
|
|
1920
|
+
onColumnReorder: Z
|
|
1920
1921
|
}
|
|
1921
1922
|
),
|
|
1922
1923
|
/* @__PURE__ */ s.jsx(
|
|
1923
1924
|
Yt,
|
|
1924
1925
|
{
|
|
1925
|
-
draggableRows:
|
|
1926
|
+
draggableRows: x,
|
|
1926
1927
|
onRowReorder: J,
|
|
1927
1928
|
dataSource: o,
|
|
1928
1929
|
config: i,
|
|
@@ -1938,7 +1939,7 @@ function Ze(n) {
|
|
|
1938
1939
|
bodyCellStyle: f,
|
|
1939
1940
|
bodyCellWrapperClassName: v,
|
|
1940
1941
|
bodyCellWrapperStyle: D,
|
|
1941
|
-
noDataRender:
|
|
1942
|
+
noDataRender: X
|
|
1942
1943
|
}
|
|
1943
1944
|
)
|
|
1944
1945
|
] });
|