@progress/kendo-react-grid 16.2.0-develop.5 → 16.2.0-develop.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.
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +662 -638
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +154 -152
- package/VirtualScroll.d.ts +2 -0
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +20 -13
- package/components/VirtualScrollOverlay.js +1 -8
- package/components/VirtualScrollOverlay.mjs +43 -41
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/interfaces/GridScrollableSettings.d.ts +11 -2
- package/interfaces/VirtualScrollInterface.d.ts +2 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/utils/proxiedScrollOverlay.d.ts +48 -0
- package/utils/proxiedScrollOverlay.js +8 -0
- package/utils/proxiedScrollOverlay.mjs +31 -0
- package/utils/wheelTouchScroll.d.ts +21 -0
- package/utils/wheelTouchScroll.js +8 -0
- package/utils/wheelTouchScroll.mjs +57 -0
package/GridClientWrapper.mjs
CHANGED
|
@@ -7,32 +7,34 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as c from "react";
|
|
10
|
-
import { useAdaptiveModeContext as
|
|
11
|
-
import { filterBy as
|
|
12
|
-
import { getSelectionOptions as
|
|
13
|
-
import { ColumnResize as
|
|
14
|
-
import { CommonDragLogic as
|
|
15
|
-
import { useStickyGroups as
|
|
16
|
-
import { getDefaultHeadContextMenuItems as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
10
|
+
import { useAdaptiveModeContext as Tr, canUseDOM as J, getActiveElement as Mr, useDir as Gr, setScrollbarWidth as mt, cloneArray as Hr, useWebMcpRegister as Ar, RowHeightService as Fr, getter as X } from "@progress/kendo-react-common";
|
|
11
|
+
import { filterBy as Wr } from "@progress/kendo-data-query";
|
|
12
|
+
import { getSelectionOptions as xe, populateClipboardData as Lr, ClipboardActionType as Ve, getEditableOptions as Or, tableKeyboardNavigation as ie, ClipboardService as zr, TableKeyboardNavigationContext as Br, updateLeft as pr, updateRight as Nr, getGroupExpandableOptions as jr, groupExpandReducer as Ur, getDetailExpandableOptions as Vr, detailExpandReducer as qr, getSelectedState as Pt, editReducer as $r, EDIT_ACTION as _r, closestTagName as ke, getSelectedStateFromKeyDown as Zr, getColumnIndex as Jr, getRowIndex as Xr } from "@progress/kendo-react-data-tools";
|
|
13
|
+
import { ColumnResize as Yr } from "./drag/ColumnResize.mjs";
|
|
14
|
+
import { CommonDragLogic as Qr } from "./drag/CommonDragLogic.mjs";
|
|
15
|
+
import { useStickyGroups as en } from "./hooks/useStickyGroups.mjs";
|
|
16
|
+
import { getDefaultHeadContextMenuItems as tn, getDefaultBodyContextMenuItems as rn, isRowReorderEnabled as nn, calcRowHeight as on, sanitizeColumns as an, getFlatColumnsState as cn, flattenGroupItems as dn, getDataAsArray as ln } from "./utils/index.mjs";
|
|
17
|
+
import { getScrollableOverlaySettings as sn } from "./utils/proxiedScrollOverlay.mjs";
|
|
18
|
+
import { attachWheelTouchScroll as un } from "./utils/wheelTouchScroll.mjs";
|
|
19
|
+
import { VirtualScroll as gn } from "./VirtualScroll.mjs";
|
|
20
|
+
import { GridContextMenu as fn, contextMenuItemsMap as mn } from "./contextMenu/GridContextMenu.mjs";
|
|
21
|
+
import { GridContextMenuAnchorPart as ht, GridContextMenuItemNames as De } from "./contextMenu/enums.mjs";
|
|
22
|
+
import { normalizeSortable as Pn, firstLevelSortSeqMap as hn } from "./sortCommon.mjs";
|
|
23
|
+
import { BasePDFExport as Rn } from "./BasePDFExport.mjs";
|
|
24
|
+
import { BaseCSVExport as bn } from "./BaseCSVExport.mjs";
|
|
25
|
+
import { GridContext as vn } from "./utils/GridContext.mjs";
|
|
26
|
+
import { operators as Cn } from "./filterCommon.mjs";
|
|
27
|
+
const In = (t, D, p, K) => {
|
|
28
|
+
const Y = Object.keys(D.cells).map((M) => p.findIndex((Q) => Q.field === M)), C = Object.keys(D.cells).length > 0 ? Y : !0;
|
|
29
|
+
return t.reduce((M, Q) => (M[Q[K != null ? K : "id"]] = C, M), {});
|
|
30
|
+
}, Rt = (t, D, p, K) => D.reduce((C, M) => ({
|
|
31
|
+
...C,
|
|
32
|
+
...In(Wr(t, M), M, p, K)
|
|
33
|
+
}), {}), zn = (t) => {
|
|
34
|
+
var ft;
|
|
35
|
+
const D = t.gridProps.isClient, p = typeof t.gridProps.scrollable == "object" ? t.gridProps.scrollable.mode : t.gridProps.scrollable, { overlayScrollbar: K, wheelMultiplier: Y } = sn(t.gridProps.scrollable), [C, M] = c.useState({}), Q = Tr(), qe = c.useRef(null), Ke = c.useRef(null), de = c.useRef({}), bt = (e) => {
|
|
36
|
+
e.event.preventDefault(), M({
|
|
37
|
+
...C,
|
|
36
38
|
show: !0,
|
|
37
39
|
offset: {
|
|
38
40
|
left: e.event.pageX,
|
|
@@ -41,67 +43,67 @@ const hr = (t, x, z, R) => {
|
|
|
41
43
|
dataItem: e.dataItem,
|
|
42
44
|
field: e.field
|
|
43
45
|
});
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
const
|
|
46
|
+
}, $e = () => {
|
|
47
|
+
M({});
|
|
48
|
+
}, vt = (e) => {
|
|
49
|
+
const r = t.gridProps.dataItemKey || "", o = C.dataItem, n = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = r ? o[r] : void 0, d = a !== void 0 && n.some((l) => l[r] === a), s = a !== void 0 && i.some((l) => l[r] === a);
|
|
48
50
|
return e.map((l) => {
|
|
49
|
-
const u = typeof l == "string" ?
|
|
50
|
-
return u && u.name ===
|
|
51
|
+
const u = typeof l == "string" ? mn[l] : l;
|
|
52
|
+
return u && u.name === De.pinRow && u.items ? {
|
|
51
53
|
...u,
|
|
52
|
-
items: u.items.filter((f) => f.name ===
|
|
54
|
+
items: u.items.filter((f) => f.name === De.pinTop ? !d : f.name === De.pinBottom ? !s : f.name === De.unpin ? d || s : !0)
|
|
53
55
|
} : l;
|
|
54
56
|
});
|
|
55
|
-
},
|
|
56
|
-
const e = t.gridProps.sortable && (
|
|
57
|
-
return
|
|
57
|
+
}, w = c.useMemo(() => t.columnsRef.find((e) => e.field === C.field), [t.columnsRef, C]), _e = c.useMemo(() => {
|
|
58
|
+
const e = t.gridProps.sortable && (w == null ? void 0 : w.sortable);
|
|
59
|
+
return tn({
|
|
58
60
|
pdf: !!t.gridProps.pdf,
|
|
59
61
|
sortable: !!e,
|
|
60
|
-
selectable:
|
|
62
|
+
selectable: xe(t.gridProps.selectable).enabled,
|
|
61
63
|
clipboard: !!t.gridProps.clipboard
|
|
62
64
|
});
|
|
63
|
-
}, [
|
|
65
|
+
}, [w, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ze = c.useMemo(() => (t.gridProps.sortable && (w == null || w.sortable), rn({
|
|
64
66
|
pdf: !!t.gridProps.pdf,
|
|
65
|
-
selectable:
|
|
67
|
+
selectable: xe(t.gridProps.selectable).enabled,
|
|
66
68
|
clipboard: !!t.gridProps.clipboard,
|
|
67
|
-
rowReorderable:
|
|
69
|
+
rowReorderable: nn(t.gridProps.rowReorderable),
|
|
68
70
|
pinnable: !!t.gridProps.pinnable
|
|
69
71
|
})), [
|
|
70
|
-
|
|
72
|
+
w,
|
|
71
73
|
t.gridProps.sortable,
|
|
72
74
|
t.gridProps.selectable,
|
|
73
75
|
t.gridProps.clipboard,
|
|
74
76
|
t.gridProps.pinnable,
|
|
75
77
|
t.gridProps.rowReorderable,
|
|
76
78
|
t.gridProps.pdf
|
|
77
|
-
]),
|
|
78
|
-
const e = (
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
79
|
+
]), le = c.useMemo(() => {
|
|
80
|
+
const e = (w == null ? void 0 : w.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(C) : e;
|
|
81
|
+
if (r && C.offset) {
|
|
82
|
+
const o = C.dataItem ? ht.body : ht.head, n = r[o], i = C.dataItem ? Ze : _e;
|
|
81
83
|
let a;
|
|
82
|
-
return
|
|
84
|
+
return n === !0 || n === void 0 ? a = i : n !== !1 && (a = n), t.gridProps.pinnable && a && C.dataItem ? vt(a) : a;
|
|
83
85
|
}
|
|
84
86
|
}, [
|
|
85
87
|
t.gridProps.contextMenu,
|
|
86
88
|
t.gridProps.pinnable,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]),
|
|
92
|
-
var d, s, l, u, f,
|
|
93
|
-
const
|
|
94
|
-
target:
|
|
89
|
+
C,
|
|
90
|
+
Ze,
|
|
91
|
+
_e,
|
|
92
|
+
w
|
|
93
|
+
]), Ct = (e) => {
|
|
94
|
+
var d, s, l, u, f, v, R, j, g;
|
|
95
|
+
const r = e.event.item, o = {
|
|
96
|
+
target: S.current,
|
|
95
97
|
syntheticEvent: e.event.syntheticEvent,
|
|
96
98
|
nativeEvent: e.event.nativeEvent,
|
|
97
|
-
menuItem:
|
|
99
|
+
menuItem: r,
|
|
98
100
|
...e
|
|
99
101
|
};
|
|
100
|
-
t.gridProps.onContextMenuItemClick && m(t.gridProps.onContextMenuItemClick,
|
|
101
|
-
const
|
|
102
|
+
t.gridProps.onContextMenuItemClick && m(t.gridProps.onContextMenuItemClick, o);
|
|
103
|
+
const n = T(), i = {
|
|
102
104
|
selectedField: "",
|
|
103
105
|
componentId: t.id,
|
|
104
|
-
dataItems:
|
|
106
|
+
dataItems: n,
|
|
105
107
|
dataItem: e.dataItem,
|
|
106
108
|
startRowIndex: -1,
|
|
107
109
|
endRowIndex: -1,
|
|
@@ -112,293 +114,293 @@ const hr = (t, x, z, R) => {
|
|
|
112
114
|
metaKey: !1,
|
|
113
115
|
shiftKey: !1,
|
|
114
116
|
isDrag: !1,
|
|
115
|
-
...
|
|
116
|
-
...
|
|
117
|
-
}, a =
|
|
118
|
-
switch ((d =
|
|
117
|
+
...xe(t.gridProps.selectable),
|
|
118
|
+
...o
|
|
119
|
+
}, a = n.findIndex((k) => k === e.dataItem);
|
|
120
|
+
switch ((d = r.data) == null ? void 0 : d.action) {
|
|
119
121
|
case "SortCommand":
|
|
120
|
-
if (
|
|
121
|
-
const
|
|
122
|
-
|
|
122
|
+
if (w) {
|
|
123
|
+
const k = (s = r.name) == null ? void 0 : s.toLowerCase().includes("asc"), Z = ((l = r.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, B = k ? "asc" : Z, oe = r.name ? B : void 0;
|
|
124
|
+
Je(e.event.syntheticEvent, w, oe);
|
|
123
125
|
}
|
|
124
126
|
break;
|
|
125
127
|
case "SelectRowCommand":
|
|
126
|
-
|
|
128
|
+
jt(i);
|
|
127
129
|
break;
|
|
128
130
|
case "SelectAllRowsCommand":
|
|
129
|
-
|
|
131
|
+
Nt(i);
|
|
130
132
|
break;
|
|
131
133
|
case "ExportPDFCommand":
|
|
132
|
-
|
|
134
|
+
Me();
|
|
133
135
|
break;
|
|
134
136
|
case "ClearSelectionCommand":
|
|
135
|
-
|
|
137
|
+
Vt(i);
|
|
136
138
|
break;
|
|
137
139
|
case "ReorderRowCommand":
|
|
138
|
-
|
|
140
|
+
ce.current = e.dataItem, (u = r.name) != null && u.toLowerCase().includes("rowup") && a > 0 && ae(e.event.syntheticEvent, a - 1, "before"), (f = r.name) != null && f.toLowerCase().includes("rowdown") && a < n.length - 1 && ae(e.event.syntheticEvent, a + 1, "after"), (v = r.name) != null && v.toLowerCase().includes("rowtop") && ae(e.event.syntheticEvent, 0, "before"), (R = r.name) != null && R.toLowerCase().includes("rowbottom") && ae(e.event.syntheticEvent, n.length - 1, "after");
|
|
139
141
|
break;
|
|
140
142
|
case "CopySelectionCommand":
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
Pe(
|
|
144
|
+
Ve.copy,
|
|
143
145
|
e.event.nativeEvent,
|
|
144
146
|
{
|
|
145
|
-
copyHeaders: !((
|
|
147
|
+
copyHeaders: !((j = r.name) != null && j.toLowerCase().includes("noheaders"))
|
|
146
148
|
},
|
|
147
149
|
e.dataItem,
|
|
148
150
|
e.field
|
|
149
151
|
);
|
|
150
152
|
break;
|
|
151
153
|
case "PasteCommand":
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
Pe(
|
|
155
|
+
Ve.paste,
|
|
154
156
|
e.event.nativeEvent,
|
|
155
157
|
{
|
|
156
|
-
copyHeaders: !((g =
|
|
158
|
+
copyHeaders: !((g = r.name) != null && g.toLowerCase().includes("noheaders"))
|
|
157
159
|
},
|
|
158
160
|
e.dataItem,
|
|
159
161
|
e.field
|
|
160
162
|
);
|
|
161
163
|
break;
|
|
162
164
|
case "PinTopCommand":
|
|
163
|
-
|
|
165
|
+
ue("pinTop", e.dataItem);
|
|
164
166
|
break;
|
|
165
167
|
case "PinBottomCommand":
|
|
166
|
-
|
|
168
|
+
ue("pinBottom", e.dataItem);
|
|
167
169
|
break;
|
|
168
170
|
case "UnpinCommand":
|
|
169
|
-
|
|
171
|
+
ue("unpin", e.dataItem);
|
|
170
172
|
break;
|
|
171
173
|
}
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
const e = t.columnsRef.filter((
|
|
175
|
-
return
|
|
176
|
-
},
|
|
177
|
-
if (t.gridProps.onContextMenu &&
|
|
178
|
-
const
|
|
179
|
-
target:
|
|
174
|
+
$e();
|
|
175
|
+
}, se = () => {
|
|
176
|
+
const e = t.columnsRef.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
|
|
177
|
+
return an(e);
|
|
178
|
+
}, It = (e, r, o) => {
|
|
179
|
+
if (t.gridProps.onContextMenu && D) {
|
|
180
|
+
const n = {
|
|
181
|
+
target: S.current,
|
|
180
182
|
syntheticEvent: e,
|
|
181
183
|
nativeEvent: e.nativeEvent,
|
|
182
|
-
dataItem:
|
|
183
|
-
field:
|
|
184
|
+
dataItem: r,
|
|
185
|
+
field: o
|
|
184
186
|
};
|
|
185
|
-
m(t.gridProps.onContextMenu,
|
|
187
|
+
m(t.gridProps.onContextMenu, n);
|
|
186
188
|
}
|
|
187
|
-
t.gridProps.contextMenu &&
|
|
189
|
+
t.gridProps.contextMenu && bt({
|
|
188
190
|
event: e,
|
|
189
|
-
dataItem:
|
|
190
|
-
field:
|
|
191
|
+
dataItem: r,
|
|
192
|
+
field: o
|
|
191
193
|
});
|
|
192
|
-
},
|
|
193
|
-
var
|
|
194
|
+
}, yt = (e) => {
|
|
195
|
+
var d, s;
|
|
194
196
|
if (e.target !== e.currentTarget)
|
|
195
197
|
return;
|
|
196
|
-
clearTimeout(
|
|
197
|
-
const
|
|
198
|
-
t.gridProps.columnVirtualization && (!
|
|
199
|
-
|
|
200
|
-
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current =
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
t.gridProps.onScroll &&
|
|
205
|
-
...
|
|
206
|
-
}), Be.current =
|
|
207
|
-
},
|
|
208
|
-
var
|
|
209
|
-
const
|
|
210
|
-
if ((e.keyCode === 38 || e.keyCode === 40) &&
|
|
211
|
-
const i = parseInt(((
|
|
212
|
-
if (!isNaN(i) && a && !((
|
|
213
|
-
return
|
|
198
|
+
clearTimeout(pe.current), y.current && (y.current.table = A.current);
|
|
199
|
+
const r = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop, n = o !== Be.current;
|
|
200
|
+
t.gridProps.columnVirtualization && (!x || o === Be.current) && (pe.current = window.setTimeout(() => {
|
|
201
|
+
re();
|
|
202
|
+
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), _.current && _.current.setScrollLeft(r), $.current && $.current.setScrollLeft(r), W != null && W.current && W.current.setScrollLeft(r), L != null && L.current && L.current.setScrollLeft(r), O != null && O.current && O.current.setScrollLeft(r), z != null && z.current && z.current.setScrollLeft(r);
|
|
203
|
+
const i = (d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current;
|
|
204
|
+
y.current && n && y.current.scrollHandler(e);
|
|
205
|
+
const a = x && ((s = t.gridProps.virtualSkipRef) == null ? void 0 : s.current) !== i;
|
|
206
|
+
t.gridProps.onScroll && D && m(t.gridProps.onScroll, {
|
|
207
|
+
...I(e)
|
|
208
|
+
}), Be.current = o, !dt.current && q.current && Math.abs(q.current.scrollTop - o) > 1 && (Fe.current = !0, q.current.scrollTop = o), a || st();
|
|
209
|
+
}, wt = (e) => {
|
|
210
|
+
var o, n;
|
|
211
|
+
const r = e.target;
|
|
212
|
+
if ((e.keyCode === 38 || e.keyCode === 40) && r.closest(".k-grid-sticky-container")) {
|
|
213
|
+
const i = parseInt(((o = r.closest("tr")) == null ? void 0 : o.getAttribute("absolute-row-index")) || "", 10), a = r.getAttribute("data-keyboardnavid");
|
|
214
|
+
if (!isNaN(i) && a && !((n = H.current) == null ? void 0 : n.querySelector(`tr[absolute-row-index="${i}"]`)))
|
|
215
|
+
return we.current = {
|
|
214
216
|
navId: a,
|
|
215
217
|
key: e.key,
|
|
216
218
|
code: e.code,
|
|
217
219
|
keyCode: e.keyCode
|
|
218
|
-
}, e.preventDefault(), e.stopPropagation(),
|
|
220
|
+
}, e.preventDefault(), e.stopPropagation(), Re({ rowIndex: i }), !0;
|
|
219
221
|
}
|
|
220
222
|
return !1;
|
|
221
|
-
},
|
|
223
|
+
}, Et = () => {
|
|
222
224
|
var a;
|
|
223
|
-
if (!
|
|
225
|
+
if (!we.current || !F.current)
|
|
224
226
|
return;
|
|
225
|
-
const { navId: e, key:
|
|
227
|
+
const { navId: e, key: r, code: o, keyCode: n } = we.current, i = (a = H.current) == null ? void 0 : a.querySelector(
|
|
226
228
|
`[data-keyboardnavid="${e}"]`
|
|
227
229
|
);
|
|
228
230
|
i && i.dispatchEvent(
|
|
229
231
|
new KeyboardEvent("keydown", {
|
|
230
|
-
key:
|
|
231
|
-
code:
|
|
232
|
-
keyCode:
|
|
232
|
+
key: r,
|
|
233
|
+
code: o,
|
|
234
|
+
keyCode: n,
|
|
233
235
|
bubbles: !0,
|
|
234
236
|
cancelable: !0
|
|
235
237
|
})
|
|
236
238
|
);
|
|
237
|
-
},
|
|
238
|
-
if (
|
|
239
|
+
}, St = (e) => {
|
|
240
|
+
if (wt(e))
|
|
239
241
|
return;
|
|
240
|
-
|
|
242
|
+
ie.onKeyDown(e, {
|
|
241
243
|
navigatable: t.gridProps.navigatable || !1,
|
|
242
|
-
contextStateRef:
|
|
243
|
-
navigationStateRef:
|
|
244
|
-
onNavigationAction:
|
|
245
|
-
columns:
|
|
246
|
-
}),
|
|
247
|
-
document:
|
|
248
|
-
contextStateRef:
|
|
249
|
-
navigationStateRef:
|
|
244
|
+
contextStateRef: V,
|
|
245
|
+
navigationStateRef: ne,
|
|
246
|
+
onNavigationAction: kt,
|
|
247
|
+
columns: se()
|
|
248
|
+
}), ie.onGetSnapshotBeforeUpdate({
|
|
249
|
+
document: N(),
|
|
250
|
+
contextStateRef: V,
|
|
251
|
+
navigationStateRef: ne
|
|
250
252
|
});
|
|
251
|
-
const
|
|
252
|
-
dataItems:
|
|
253
|
+
const r = {
|
|
254
|
+
dataItems: T(),
|
|
253
255
|
mode: h.mode,
|
|
254
256
|
cell: h.cell,
|
|
255
257
|
componentId: t.id,
|
|
256
258
|
selectedField: "",
|
|
257
|
-
...
|
|
259
|
+
...I(e)
|
|
258
260
|
};
|
|
259
|
-
t.gridProps.onKeyDown &&
|
|
260
|
-
},
|
|
261
|
-
|
|
261
|
+
t.gridProps.onKeyDown && D && m(t.gridProps.onKeyDown, r);
|
|
262
|
+
}, xt = (e) => {
|
|
263
|
+
ie.onFocus(e, {
|
|
262
264
|
navigatable: !!t.gridProps.navigatable,
|
|
263
|
-
contextStateRef:
|
|
265
|
+
contextStateRef: V
|
|
264
266
|
});
|
|
265
|
-
},
|
|
266
|
-
const { columnsRef:
|
|
267
|
-
if (e.action === "moveToNextPage" &&
|
|
268
|
-
const
|
|
269
|
-
if (!
|
|
267
|
+
}, kt = (e) => {
|
|
268
|
+
const { columnsRef: r } = t;
|
|
269
|
+
if (e.action === "moveToNextPage" && _t(e.event), e.action === "moveToPrevPage" && Zt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
|
|
270
|
+
const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
|
|
271
|
+
if (!r[o].reorderable)
|
|
270
272
|
return;
|
|
271
|
-
if (e.action === "reorderToRight" &&
|
|
272
|
-
if (
|
|
273
|
+
if (e.action === "reorderToRight" && o < t.columnsRef.length - 1) {
|
|
274
|
+
if (r[o + 1].disableReorder)
|
|
273
275
|
return;
|
|
274
|
-
|
|
276
|
+
fe(o, o + 1, e.event);
|
|
275
277
|
}
|
|
276
|
-
if (e.action === "reorderToLeft" &&
|
|
277
|
-
if (
|
|
278
|
+
if (e.action === "reorderToLeft" && o > 0) {
|
|
279
|
+
if (r[o - 1].disableReorder)
|
|
278
280
|
return;
|
|
279
|
-
|
|
281
|
+
fe(o, o - 1, e.event);
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
|
-
if (e.action === "select" &&
|
|
283
|
-
const
|
|
284
|
+
if (e.action === "select" && zt(e.event), t.gridProps.onNavigationAction && D) {
|
|
285
|
+
const o = {
|
|
284
286
|
focusElement: e.focusElement,
|
|
285
|
-
...
|
|
287
|
+
...I(e.event)
|
|
286
288
|
};
|
|
287
|
-
m(t.gridProps.onNavigationAction,
|
|
289
|
+
m(t.gridProps.onNavigationAction, o);
|
|
288
290
|
}
|
|
289
|
-
},
|
|
290
|
-
t.gridProps.onRowClick &&
|
|
291
|
-
dataItem:
|
|
292
|
-
...
|
|
291
|
+
}, Dt = (e, r) => {
|
|
292
|
+
t.gridProps.onRowClick && ke(e.target, "TD") && m(t.gridProps.onRowClick, {
|
|
293
|
+
dataItem: r,
|
|
294
|
+
...I(e)
|
|
293
295
|
});
|
|
294
|
-
},
|
|
295
|
-
t.gridProps.onRowDoubleClick &&
|
|
296
|
-
dataItem:
|
|
297
|
-
...
|
|
296
|
+
}, Kt = (e, r) => {
|
|
297
|
+
t.gridProps.onRowDoubleClick && ke(e.target, "TD") && m(t.gridProps.onRowDoubleClick, {
|
|
298
|
+
dataItem: r,
|
|
299
|
+
...I(e)
|
|
298
300
|
});
|
|
299
|
-
},
|
|
301
|
+
}, Tt = (e) => {
|
|
300
302
|
t.gridProps.onItemChange && m(t.gridProps.onItemChange, {
|
|
301
|
-
...
|
|
303
|
+
...I(e.syntheticEvent),
|
|
302
304
|
dataItem: e.dataItem,
|
|
303
305
|
field: void 0,
|
|
304
306
|
value: void 0
|
|
305
307
|
});
|
|
306
|
-
},
|
|
308
|
+
}, Mt = (e) => {
|
|
307
309
|
t.gridProps.onItemChange && t.gridProps.onEditChange && m(t.gridProps.onEditChange, {
|
|
308
310
|
edit: {},
|
|
309
|
-
...
|
|
311
|
+
...I(e.syntheticEvent)
|
|
310
312
|
});
|
|
311
|
-
},
|
|
312
|
-
var
|
|
313
|
-
if (
|
|
313
|
+
}, Gt = (e, r, o) => {
|
|
314
|
+
var n, i;
|
|
315
|
+
if (gt.enabled && gt.mode === "incell" && t.gridProps.dataItemKey) {
|
|
314
316
|
if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
|
|
315
|
-
const d = !!((i = (
|
|
317
|
+
const d = !!((i = (n = e.target).closest) != null && i.call(n, ".k-grid-pinned-container"));
|
|
316
318
|
t.gridProps.editZoneRef.current = d ? "pinned" : "body";
|
|
317
319
|
}
|
|
318
|
-
const a =
|
|
319
|
-
type:
|
|
320
|
-
payload: { id:
|
|
320
|
+
const a = $r(t.gridProps.edit, {
|
|
321
|
+
type: _r.ENTER_FIELD_EDIT,
|
|
322
|
+
payload: { id: r[t.gridProps.dataItemKey], field: o }
|
|
321
323
|
});
|
|
322
324
|
t.gridProps.onEditChange && m(t.gridProps.onEditChange, {
|
|
323
325
|
edit: a,
|
|
324
|
-
...
|
|
326
|
+
...I(e)
|
|
325
327
|
});
|
|
326
328
|
}
|
|
327
|
-
},
|
|
328
|
-
var
|
|
329
|
-
if (
|
|
330
|
-
const i =
|
|
329
|
+
}, Ht = (e, r) => {
|
|
330
|
+
var n;
|
|
331
|
+
if (Vr(t.detailExpandable).enabled) {
|
|
332
|
+
const i = qr((n = t.gridProps.detailExpand) != null ? n : {}, e);
|
|
331
333
|
t.gridProps.onDetailExpandChange && m(t.gridProps.onDetailExpandChange, {
|
|
332
|
-
...
|
|
334
|
+
...I(r),
|
|
333
335
|
detailExpand: i
|
|
334
336
|
});
|
|
335
337
|
}
|
|
336
|
-
},
|
|
337
|
-
var
|
|
338
|
-
const
|
|
338
|
+
}, At = (e, r) => {
|
|
339
|
+
var n;
|
|
340
|
+
const o = jr(
|
|
339
341
|
typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
|
|
340
342
|
);
|
|
341
|
-
if (
|
|
342
|
-
const i =
|
|
343
|
+
if (o.enabled) {
|
|
344
|
+
const i = Ur((n = t.gridProps.groupExpand) != null ? n : [], e, o);
|
|
343
345
|
t.gridProps.onGroupExpandChange && m(t.gridProps.onGroupExpandChange, {
|
|
344
|
-
...
|
|
346
|
+
...I(r),
|
|
345
347
|
groupExpand: i
|
|
346
348
|
});
|
|
347
349
|
}
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
+
Er(e.group);
|
|
351
|
+
}, Ft = c.useCallback(
|
|
350
352
|
(e) => {
|
|
351
|
-
const { dataItemKey:
|
|
352
|
-
if (!
|
|
353
|
+
const { dataItemKey: r = "", pinnedTopRows: o = [], pinnedBottomRows: n = [] } = t.gridProps;
|
|
354
|
+
if (!r || !e)
|
|
353
355
|
return "none";
|
|
354
|
-
const i = e[
|
|
355
|
-
return
|
|
356
|
+
const i = e[r];
|
|
357
|
+
return o != null && o.some((a) => a[r] === i) ? "top" : n != null && n.some((a) => a[r] === i) ? "bottom" : "none";
|
|
356
358
|
},
|
|
357
359
|
[t.gridProps.pinnedTopRows, t.gridProps.pinnedBottomRows, t.gridProps.dataItemKey]
|
|
358
|
-
),
|
|
360
|
+
), ue = (e, r) => {
|
|
359
361
|
if (!t.gridProps.pinnable)
|
|
360
362
|
return;
|
|
361
|
-
const { dataItemKey:
|
|
363
|
+
const { dataItemKey: o = "", pinnedTopRows: n = [], pinnedBottomRows: i = [] } = t.gridProps, a = r[o], d = n.filter((u) => u[o] !== a), s = i.filter((u) => u[o] !== a);
|
|
362
364
|
let l;
|
|
363
365
|
switch (e) {
|
|
364
366
|
case "pinTop":
|
|
365
|
-
l = { pinnedTopRows: [...d,
|
|
367
|
+
l = { pinnedTopRows: [...d, r], pinnedBottomRows: s, dataItem: r };
|
|
366
368
|
break;
|
|
367
369
|
case "pinBottom":
|
|
368
|
-
l = { pinnedTopRows: d, pinnedBottomRows: [...s,
|
|
370
|
+
l = { pinnedTopRows: d, pinnedBottomRows: [...s, r], dataItem: r };
|
|
369
371
|
break;
|
|
370
372
|
case "unpin":
|
|
371
|
-
l = { pinnedTopRows: d, pinnedBottomRows: s, dataItem:
|
|
373
|
+
l = { pinnedTopRows: d, pinnedBottomRows: s, dataItem: r };
|
|
372
374
|
break;
|
|
373
375
|
default:
|
|
374
376
|
return;
|
|
375
377
|
}
|
|
376
378
|
t.gridProps.onRowPinChange && m(t.gridProps.onRowPinChange, l);
|
|
377
|
-
},
|
|
378
|
-
const { allowUnsort:
|
|
379
|
+
}, Je = (e, r, o) => {
|
|
380
|
+
const { allowUnsort: n, mode: i } = Pn(
|
|
379
381
|
t.gridProps.sortable || !1,
|
|
380
|
-
|
|
381
|
-
), a = (t.gridProps.sort || []).filter((l) => l.field ===
|
|
382
|
-
d !== "" &&
|
|
383
|
-
},
|
|
382
|
+
r.sortable || !1
|
|
383
|
+
), a = (t.gridProps.sort || []).filter((l) => l.field === r.field)[0], d = o || hn[n][a && a.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== r.field);
|
|
384
|
+
d !== "" && r.field && s.push({ field: r.field, dir: d }), Ye(s, e);
|
|
385
|
+
}, Wt = (e) => {
|
|
384
386
|
t.gridProps.onItemChange && m(t.gridProps.onItemChange, {
|
|
385
|
-
...
|
|
387
|
+
...I(e.syntheticEvent),
|
|
386
388
|
dataItem: e.dataItem,
|
|
387
389
|
dataIndex: e.dataIndex,
|
|
388
390
|
field: e.field,
|
|
389
391
|
value: e.value
|
|
390
392
|
});
|
|
391
|
-
},
|
|
392
|
-
var
|
|
393
|
+
}, Lt = (e) => {
|
|
394
|
+
var r;
|
|
393
395
|
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
394
|
-
const { event:
|
|
395
|
-
...
|
|
396
|
-
dataItem:
|
|
396
|
+
const { event: o, dataItem: n, dataIndex: i, columnIndex: a } = e, d = {
|
|
397
|
+
...I(o),
|
|
398
|
+
dataItem: n,
|
|
397
399
|
startColIndex: a,
|
|
398
400
|
endColIndex: a,
|
|
399
401
|
startRowIndex: i,
|
|
400
402
|
endRowIndex: i,
|
|
401
|
-
dataItems:
|
|
403
|
+
dataItems: T(),
|
|
402
404
|
altKey: !1,
|
|
403
405
|
ctrlKey: !1,
|
|
404
406
|
shiftKey: !1,
|
|
@@ -411,24 +413,24 @@ const hr = (t, x, z, R) => {
|
|
|
411
413
|
};
|
|
412
414
|
m(t.gridProps.onSelectionChange, {
|
|
413
415
|
...d,
|
|
414
|
-
select: t.gridProps.dataItemKey ?
|
|
416
|
+
select: t.gridProps.dataItemKey ? Pt({
|
|
415
417
|
event: d,
|
|
416
|
-
selectedState: (
|
|
418
|
+
selectedState: (r = t.gridProps.select) != null ? r : {},
|
|
417
419
|
dataItemKey: t.gridProps.dataItemKey
|
|
418
420
|
}) : {}
|
|
419
421
|
});
|
|
420
422
|
}
|
|
421
|
-
},
|
|
423
|
+
}, Ot = (e) => {
|
|
422
424
|
var u;
|
|
423
425
|
if (!t.gridProps.onSelectionChange || !h.enabled || !t.gridProps.dataItemKey)
|
|
424
426
|
return;
|
|
425
|
-
const { event:
|
|
427
|
+
const { event: r, groupDataItem: o, selectAll: n } = e, i = X(t.gridProps.dataItemKey), a = dn(o), d = T(), l = { ...(u = t.gridProps.select) != null ? u : {} };
|
|
426
428
|
a.forEach((f) => {
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
+
const v = i(f);
|
|
430
|
+
v !== void 0 && (n ? l[v] = !0 : delete l[v]);
|
|
429
431
|
}), m(t.gridProps.onSelectionChange, {
|
|
430
|
-
...
|
|
431
|
-
dataItem:
|
|
432
|
+
...I(r),
|
|
433
|
+
dataItem: o,
|
|
432
434
|
startColIndex: 0,
|
|
433
435
|
endColIndex: 0,
|
|
434
436
|
startRowIndex: 0,
|
|
@@ -445,30 +447,30 @@ const hr = (t, x, z, R) => {
|
|
|
445
447
|
selectedField: "",
|
|
446
448
|
select: l
|
|
447
449
|
});
|
|
448
|
-
},
|
|
450
|
+
}, zt = (e) => {
|
|
449
451
|
var l, u;
|
|
450
452
|
if (!h.enabled || !t.gridProps.dataItemKey)
|
|
451
453
|
return;
|
|
452
|
-
const
|
|
453
|
-
dataItems:
|
|
454
|
+
const r = {
|
|
455
|
+
dataItems: T(),
|
|
454
456
|
mode: h.mode,
|
|
455
457
|
cell: h.cell,
|
|
456
458
|
componentId: t.id,
|
|
457
459
|
selectedField: "",
|
|
458
|
-
...
|
|
459
|
-
},
|
|
460
|
-
event:
|
|
460
|
+
...I(e)
|
|
461
|
+
}, o = Zr({
|
|
462
|
+
event: r,
|
|
461
463
|
selectedState: (l = t.gridProps.select) != null ? l : {},
|
|
462
464
|
dataItemKey: t.gridProps.dataItemKey
|
|
463
465
|
});
|
|
464
|
-
if (
|
|
466
|
+
if (o === t.gridProps.select)
|
|
465
467
|
return;
|
|
466
|
-
const
|
|
468
|
+
const n = e.target, i = ke(n, "TD"), a = ke(n, "TR"), d = Jr(i), s = Xr(a);
|
|
467
469
|
if (d !== void 0 && s !== void 0) {
|
|
468
|
-
const f = (u =
|
|
470
|
+
const f = (u = ln(t.gridProps.data)) == null ? void 0 : u[s];
|
|
469
471
|
t.gridProps.onSelectionChange && m(t.gridProps.onSelectionChange, {
|
|
470
|
-
...
|
|
471
|
-
select:
|
|
472
|
+
...r,
|
|
473
|
+
select: o,
|
|
472
474
|
dataItem: f,
|
|
473
475
|
startRowIndex: s,
|
|
474
476
|
startColIndex: d,
|
|
@@ -485,70 +487,70 @@ const hr = (t, x, z, R) => {
|
|
|
485
487
|
}
|
|
486
488
|
}, Bt = (e) => {
|
|
487
489
|
if (t.gridProps.onHeaderSelectionChange && h.enabled) {
|
|
488
|
-
const
|
|
490
|
+
const r = T();
|
|
489
491
|
m(t.gridProps.onHeaderSelectionChange, {
|
|
490
|
-
select: e.syntheticEvent.target.checked ?
|
|
492
|
+
select: e.syntheticEvent.target.checked ? r.reduce((o, n) => (t.gridProps.dataItemKey && X(t.gridProps.dataItemKey)(n) !== void 0 && (o[X(t.gridProps.dataItemKey)(n)] = !0), o), {}) : {},
|
|
491
493
|
field: e.field,
|
|
492
494
|
nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
|
|
493
495
|
syntheticEvent: e.syntheticEvent,
|
|
494
|
-
target:
|
|
495
|
-
dataItems:
|
|
496
|
+
target: S.current,
|
|
497
|
+
dataItems: r
|
|
496
498
|
});
|
|
497
499
|
}
|
|
498
|
-
},
|
|
500
|
+
}, ee = (e, r) => {
|
|
499
501
|
t.gridProps.onSelectionChange && h.enabled && m(t.gridProps.onSelectionChange, {
|
|
500
502
|
...e,
|
|
501
|
-
select:
|
|
503
|
+
select: r
|
|
502
504
|
});
|
|
503
|
-
},
|
|
504
|
-
const
|
|
505
|
-
if (!
|
|
505
|
+
}, pt = (e, r) => {
|
|
506
|
+
const o = t.gridProps.dataItemKey;
|
|
507
|
+
if (!o || !r)
|
|
506
508
|
return;
|
|
507
|
-
const
|
|
508
|
-
i !== -1 &&
|
|
509
|
+
const n = X(o), i = T().findIndex((a) => n(a) === n(r));
|
|
510
|
+
i !== -1 && Xe({
|
|
509
511
|
...e,
|
|
510
512
|
startRowIndex: i,
|
|
511
513
|
endRowIndex: i
|
|
512
514
|
});
|
|
513
|
-
},
|
|
514
|
-
var
|
|
515
|
+
}, Xe = (e) => {
|
|
516
|
+
var r;
|
|
515
517
|
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
516
|
-
const
|
|
518
|
+
const o = T(), n = o[e.startRowIndex], i = o[e.endRowIndex], a = {
|
|
517
519
|
syntheticEvent: void 0,
|
|
518
|
-
target:
|
|
520
|
+
target: S.current,
|
|
519
521
|
selectedField: "",
|
|
520
522
|
componentId: t.id,
|
|
521
|
-
dataItems:
|
|
523
|
+
dataItems: o,
|
|
522
524
|
dataItem: null,
|
|
523
|
-
startDataItem:
|
|
525
|
+
startDataItem: n,
|
|
524
526
|
endDataItem: i,
|
|
525
527
|
...e
|
|
526
|
-
}, d =
|
|
528
|
+
}, d = Pt({
|
|
527
529
|
event: a,
|
|
528
|
-
selectedState: (
|
|
530
|
+
selectedState: (r = t.gridProps.select) != null ? r : {},
|
|
529
531
|
dataItemKey: t.gridProps.dataItemKey
|
|
530
532
|
});
|
|
531
|
-
|
|
533
|
+
ee(a, d);
|
|
532
534
|
}
|
|
533
|
-
},
|
|
535
|
+
}, Nt = (e) => {
|
|
534
536
|
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
535
|
-
const
|
|
537
|
+
const r = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], n = {}, i = {
|
|
536
538
|
...e,
|
|
537
|
-
startDataItem:
|
|
538
|
-
endDataItem:
|
|
539
|
+
startDataItem: r,
|
|
540
|
+
endDataItem: o,
|
|
539
541
|
startRowIndex: 0,
|
|
540
542
|
endRowIndex: e.dataItems.length - 1,
|
|
541
543
|
startColIndex: 0,
|
|
542
544
|
endColIndex: t.columnsRef.length - 1
|
|
543
545
|
};
|
|
544
546
|
e.dataItems.forEach((a) => {
|
|
545
|
-
const s =
|
|
546
|
-
|
|
547
|
-
}),
|
|
547
|
+
const s = X(t.gridProps.dataItemKey)(a);
|
|
548
|
+
n[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
|
|
549
|
+
}), ee(i, n);
|
|
548
550
|
}
|
|
549
|
-
},
|
|
551
|
+
}, jt = (e) => {
|
|
550
552
|
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
551
|
-
const
|
|
553
|
+
const o = X(t.gridProps.dataItemKey)(e.dataItem), n = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
|
|
552
554
|
(f) => f[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
|
|
553
555
|
), l = {
|
|
554
556
|
...e,
|
|
@@ -556,21 +558,21 @@ const hr = (t, x, z, R) => {
|
|
|
556
558
|
endDataItem: a,
|
|
557
559
|
startRowIndex: a,
|
|
558
560
|
endRowIndex: a,
|
|
559
|
-
startColIndex:
|
|
561
|
+
startColIndex: n,
|
|
560
562
|
endColIndex: i
|
|
561
563
|
}, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
|
|
562
|
-
u[
|
|
564
|
+
u[o] === !0 || Array.isArray(u[o]) && u[o].length === t.columnsRef.length ? delete u[o] : u[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, ee(l, u);
|
|
563
565
|
}
|
|
564
|
-
},
|
|
566
|
+
}, Ut = (e) => {
|
|
565
567
|
if (!h.enabled)
|
|
566
568
|
return;
|
|
567
|
-
const
|
|
569
|
+
const r = T(), o = {
|
|
568
570
|
syntheticEvent: void 0,
|
|
569
571
|
nativeEvent: void 0,
|
|
570
|
-
target:
|
|
572
|
+
target: S.current,
|
|
571
573
|
selectedField: "",
|
|
572
574
|
componentId: t.id,
|
|
573
|
-
dataItems:
|
|
575
|
+
dataItems: r,
|
|
574
576
|
dataItem: null,
|
|
575
577
|
startDataItem: null,
|
|
576
578
|
endDataItem: null,
|
|
@@ -584,34 +586,34 @@ const hr = (t, x, z, R) => {
|
|
|
584
586
|
};
|
|
585
587
|
if (!e || e.length === 0) {
|
|
586
588
|
const f = {
|
|
587
|
-
...
|
|
589
|
+
...o,
|
|
588
590
|
startRowIndex: -1,
|
|
589
591
|
endRowIndex: -1,
|
|
590
592
|
startColIndex: -1,
|
|
591
593
|
endColIndex: -1
|
|
592
594
|
};
|
|
593
|
-
|
|
595
|
+
ee(f, {});
|
|
594
596
|
return;
|
|
595
597
|
}
|
|
596
|
-
const
|
|
598
|
+
const n = Rt(
|
|
597
599
|
t.gridProps.data,
|
|
598
600
|
e,
|
|
599
601
|
t.columnsRef,
|
|
600
602
|
t.gridProps.dataItemKey
|
|
601
603
|
), i = {};
|
|
602
|
-
Object.keys(
|
|
603
|
-
|
|
604
|
+
Object.keys(n).forEach((f) => {
|
|
605
|
+
n[f] && (i[f] = h.cell ? [...Array(t.columnsRef.length).keys()] : !0);
|
|
604
606
|
});
|
|
605
|
-
let a = -1, d = -1, s =
|
|
607
|
+
let a = -1, d = -1, s = r[0] || null, l = r[r.length - 1] || null;
|
|
606
608
|
if (t.gridProps.dataItemKey) {
|
|
607
|
-
const f =
|
|
608
|
-
for (let
|
|
609
|
-
const
|
|
610
|
-
|
|
609
|
+
const f = X(t.gridProps.dataItemKey);
|
|
610
|
+
for (let v = 0; v < r.length; v++) {
|
|
611
|
+
const R = f(r[v]);
|
|
612
|
+
R !== void 0 && n[R] && (a === -1 && (a = v, s = r[v]), d = v, l = r[v]);
|
|
611
613
|
}
|
|
612
614
|
}
|
|
613
615
|
const u = {
|
|
614
|
-
...
|
|
616
|
+
...o,
|
|
615
617
|
startRowIndex: a,
|
|
616
618
|
endRowIndex: d,
|
|
617
619
|
startColIndex: 0,
|
|
@@ -619,260 +621,260 @@ const hr = (t, x, z, R) => {
|
|
|
619
621
|
startDataItem: s,
|
|
620
622
|
endDataItem: l
|
|
621
623
|
};
|
|
622
|
-
|
|
623
|
-
},
|
|
624
|
-
t.gridProps.onSelectionChange && h.enabled &&
|
|
625
|
-
},
|
|
626
|
-
|
|
624
|
+
ee(u, i);
|
|
625
|
+
}, Vt = (e) => {
|
|
626
|
+
t.gridProps.onSelectionChange && h.enabled && ee(e, {});
|
|
627
|
+
}, te = (e, r, o, n, i) => {
|
|
628
|
+
$t();
|
|
627
629
|
const a = t.gridProps.onDataStateChange;
|
|
628
630
|
if (e) {
|
|
629
|
-
const d = { ...
|
|
631
|
+
const d = { ...I(n), ...r, targetEvent: i };
|
|
630
632
|
m(e, d);
|
|
631
|
-
} else a && (
|
|
632
|
-
...
|
|
633
|
-
...
|
|
633
|
+
} else a && (de.current = {
|
|
634
|
+
...de.current,
|
|
635
|
+
...o
|
|
634
636
|
}, m(a, {
|
|
635
|
-
...
|
|
637
|
+
...I(n),
|
|
636
638
|
targetEvent: i || {},
|
|
637
639
|
dataState: {
|
|
638
|
-
...
|
|
639
|
-
...
|
|
640
|
+
...cr(),
|
|
641
|
+
...de.current
|
|
640
642
|
}
|
|
641
643
|
}));
|
|
642
|
-
},
|
|
643
|
-
var
|
|
644
|
-
|
|
644
|
+
}, ge = (e, r, o) => {
|
|
645
|
+
var n;
|
|
646
|
+
x && t.gridProps.pageable && ((n = y.current) == null || n.reset()), te(
|
|
645
647
|
t.gridProps.onPageChange,
|
|
646
648
|
{ page: e },
|
|
647
649
|
{ skip: e.skip, take: e.take },
|
|
648
|
-
|
|
649
|
-
|
|
650
|
+
r,
|
|
651
|
+
o
|
|
650
652
|
);
|
|
651
|
-
},
|
|
652
|
-
var
|
|
653
|
-
t.gridProps.pageable || (
|
|
654
|
-
},
|
|
653
|
+
}, qt = (e, r, o) => {
|
|
654
|
+
var n;
|
|
655
|
+
t.gridProps.pageable || (n = t.gridProps.group) != null && n.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, re()) : ge(e, r, o);
|
|
656
|
+
}, Te = () => {
|
|
655
657
|
let e = t.gridProps.total || 0;
|
|
656
658
|
return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
|
|
657
|
-
},
|
|
658
|
-
|
|
659
|
-
},
|
|
659
|
+
}, $t = () => {
|
|
660
|
+
x && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
|
|
661
|
+
}, _t = (e) => {
|
|
660
662
|
var i, a;
|
|
661
|
-
const
|
|
662
|
-
|
|
663
|
-
},
|
|
664
|
-
var
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
},
|
|
668
|
-
|
|
669
|
-
},
|
|
670
|
-
|
|
663
|
+
const r = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + r, n = Te();
|
|
664
|
+
o < n && ge({ skip: o, take: r }, e);
|
|
665
|
+
}, Zt = (e) => {
|
|
666
|
+
var n, i;
|
|
667
|
+
const r = (i = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - r;
|
|
668
|
+
o >= 0 && ge({ skip: o, take: r }, e);
|
|
669
|
+
}, Jt = (e) => {
|
|
670
|
+
ge({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
|
|
671
|
+
}, Ye = (e, r) => {
|
|
672
|
+
te(
|
|
671
673
|
t.gridProps.onSortChange,
|
|
672
674
|
{ sort: e },
|
|
673
|
-
{ sort: e, ...
|
|
674
|
-
|
|
675
|
+
{ sort: e, ...x && !t.gridProps.pageable ? { skip: 0 } : {} },
|
|
676
|
+
r
|
|
675
677
|
);
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
+
}, Xt = (e, r) => {
|
|
679
|
+
te(
|
|
678
680
|
t.gridProps.onFilterChange,
|
|
679
681
|
{ filter: e },
|
|
680
682
|
{ filter: e, skip: 0 },
|
|
681
|
-
|
|
683
|
+
r
|
|
682
684
|
);
|
|
683
|
-
},
|
|
685
|
+
}, Yt = (e) => {
|
|
684
686
|
if (!e || e.length === 0) {
|
|
685
|
-
|
|
687
|
+
Qe({});
|
|
686
688
|
return;
|
|
687
689
|
}
|
|
688
|
-
const
|
|
690
|
+
const r = Rt(
|
|
689
691
|
t.gridProps.data,
|
|
690
692
|
e,
|
|
691
693
|
t.columnsRef,
|
|
692
694
|
t.gridProps.dataItemKey
|
|
693
695
|
);
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
|
|
696
|
+
Qe({ ...r });
|
|
697
|
+
}, Qe = (e) => {
|
|
698
|
+
te(
|
|
697
699
|
t.gridProps.onHighlightChange,
|
|
698
700
|
{ highlight: e },
|
|
699
701
|
{},
|
|
700
702
|
{}
|
|
701
703
|
);
|
|
702
|
-
},
|
|
703
|
-
const
|
|
704
|
+
}, Qt = (e) => {
|
|
705
|
+
const r = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, n = {
|
|
704
706
|
logic: "or",
|
|
705
|
-
filters:
|
|
707
|
+
filters: r.filter((i) => i !== void 0).map((i) => {
|
|
706
708
|
var a;
|
|
707
|
-
return typeof i == "string" ? { field: i, value:
|
|
708
|
-
value:
|
|
709
|
+
return typeof i == "string" ? { field: i, value: o, operator: "contains" } : {
|
|
710
|
+
value: o,
|
|
709
711
|
operator: (a = i.operator) != null ? a : "contains",
|
|
710
712
|
field: i.field,
|
|
711
713
|
ignoreCase: i.ignoreCase
|
|
712
714
|
};
|
|
713
715
|
})
|
|
714
716
|
};
|
|
715
|
-
|
|
717
|
+
te(
|
|
716
718
|
t.gridProps.onSearchChange,
|
|
717
719
|
{
|
|
718
|
-
search:
|
|
720
|
+
search: n
|
|
719
721
|
},
|
|
720
722
|
{ skip: 0 },
|
|
721
723
|
e.syntheticEvent
|
|
722
724
|
);
|
|
723
|
-
},
|
|
725
|
+
}, Me = () => {
|
|
724
726
|
var e;
|
|
725
|
-
(e =
|
|
726
|
-
},
|
|
727
|
+
(e = qe.current) == null || e.save();
|
|
728
|
+
}, et = async () => {
|
|
727
729
|
var e;
|
|
728
|
-
await ((e =
|
|
729
|
-
},
|
|
730
|
+
await ((e = Ke.current) == null ? void 0 : e.save());
|
|
731
|
+
}, tt = () => {
|
|
730
732
|
var e;
|
|
731
|
-
return ((e =
|
|
732
|
-
},
|
|
733
|
-
var
|
|
734
|
-
(
|
|
735
|
-
},
|
|
736
|
-
var
|
|
737
|
-
return (
|
|
738
|
-
}, Ge = (e,
|
|
739
|
-
const
|
|
740
|
-
let
|
|
741
|
-
t.isVirtualScroll && e.length && !t.gridProps.pageable && (
|
|
733
|
+
return ((e = Ke.current) == null ? void 0 : e.getBlob()) || null;
|
|
734
|
+
}, er = async (e) => {
|
|
735
|
+
var r, o;
|
|
736
|
+
(r = t.gridProps) != null && r.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
|
|
737
|
+
}, tr = (e) => {
|
|
738
|
+
var r, o;
|
|
739
|
+
return (r = t.gridProps) != null && r.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
|
|
740
|
+
}, Ge = (e, r) => {
|
|
741
|
+
const o = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
|
|
742
|
+
let n = {};
|
|
743
|
+
t.isVirtualScroll && e.length && !t.gridProps.pageable && (n = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Le.current = !0), te(
|
|
742
744
|
t.gridProps.onGroupChange,
|
|
743
745
|
{ group: e },
|
|
744
|
-
{ group: e, skip: 0, ...
|
|
745
|
-
|
|
746
|
+
{ group: e, skip: 0, ...n },
|
|
747
|
+
o
|
|
746
748
|
);
|
|
747
|
-
},
|
|
749
|
+
}, He = (e) => {
|
|
748
750
|
if (t.gridProps.onColumnsStateChange) {
|
|
749
|
-
const
|
|
750
|
-
target:
|
|
751
|
+
const r = {
|
|
752
|
+
target: S.current,
|
|
751
753
|
columnsState: e
|
|
752
754
|
};
|
|
753
|
-
m(t.gridProps.onColumnsStateChange,
|
|
755
|
+
m(t.gridProps.onColumnsStateChange, r);
|
|
754
756
|
}
|
|
755
|
-
},
|
|
756
|
-
const { columnsRef:
|
|
757
|
+
}, fe = (e, r, o) => {
|
|
758
|
+
const { columnsRef: n, columnsState: i } = t, a = n[e], d = cn(i), s = a.depth, l = (R) => {
|
|
757
759
|
do
|
|
758
|
-
|
|
759
|
-
while (
|
|
760
|
-
return
|
|
761
|
-
}, u =
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
const g = d.find((
|
|
765
|
-
g && (g.orderIndex =
|
|
760
|
+
R++;
|
|
761
|
+
while (R < n.length && n[R].depth > s);
|
|
762
|
+
return R;
|
|
763
|
+
}, u = n.splice(e, l(e) - e);
|
|
764
|
+
n.splice(e < r ? l(r - u.length) : r, 0, ...u), n.filter((R) => R.declarationIndex >= 0).forEach((R, j) => {
|
|
765
|
+
R.orderIndex = j;
|
|
766
|
+
const g = d.find((k) => k.id === R.id);
|
|
767
|
+
g && (g.orderIndex = j);
|
|
766
768
|
});
|
|
767
|
-
const f =
|
|
768
|
-
|
|
769
|
-
const
|
|
770
|
-
if (
|
|
771
|
-
const
|
|
772
|
-
target:
|
|
773
|
-
columns:
|
|
769
|
+
const f = n[e].locked && n[r].locked;
|
|
770
|
+
pr(t.columnsMapRef, n, f || Ie.current), Nr(t.columnsMapRef, n, f || Ie.current), We.current && (Ie.current = !1, We.current = !1);
|
|
771
|
+
const v = se();
|
|
772
|
+
if (re(), t.gridProps.onColumnReorder) {
|
|
773
|
+
const R = {
|
|
774
|
+
target: S.current,
|
|
775
|
+
columns: v,
|
|
774
776
|
columnId: a.id,
|
|
775
|
-
nativeEvent:
|
|
777
|
+
nativeEvent: o
|
|
776
778
|
};
|
|
777
|
-
m(t.gridProps.onColumnReorder,
|
|
779
|
+
m(t.gridProps.onColumnReorder, R);
|
|
778
780
|
}
|
|
779
|
-
|
|
780
|
-
},
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
781
|
+
He(i);
|
|
782
|
+
}, ae = (e, r, o) => {
|
|
783
|
+
const n = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
|
|
784
|
+
if (o === "forbidden" || !n || !ce.current)
|
|
783
785
|
return;
|
|
784
|
-
const i = t.dataRef[
|
|
786
|
+
const i = t.dataRef[r];
|
|
785
787
|
t.gridProps.onRowReorder && m(t.gridProps.onRowReorder, {
|
|
786
|
-
draggedDataItems: [
|
|
788
|
+
draggedDataItems: [ce.current],
|
|
787
789
|
droppedDataItem: i == null ? void 0 : i.dataItem,
|
|
788
|
-
dropPosition:
|
|
790
|
+
dropPosition: o,
|
|
789
791
|
nativeEvent: e.originalEvent,
|
|
790
792
|
dragEvent: e,
|
|
791
|
-
target:
|
|
792
|
-
}),
|
|
793
|
-
},
|
|
793
|
+
target: S.current
|
|
794
|
+
}), ce.current = null;
|
|
795
|
+
}, rr = (e, r, o) => {
|
|
794
796
|
if (t.gridProps.group === void 0)
|
|
795
797
|
return;
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
},
|
|
799
|
-
const
|
|
800
|
-
if (!
|
|
798
|
+
const n = t.gridProps.group.slice();
|
|
799
|
+
n.splice(r, 0, ...n.splice(e, 1)), Ge(n, o);
|
|
800
|
+
}, rt = (e, r, o) => {
|
|
801
|
+
const n = t.columnsRef[e].field;
|
|
802
|
+
if (!n)
|
|
801
803
|
return;
|
|
802
804
|
const i = (t.gridProps.group || []).slice();
|
|
803
|
-
i.splice(
|
|
804
|
-
},
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
},
|
|
808
|
-
var e,
|
|
805
|
+
i.splice(r, 0, { field: n }), Ge(i, o);
|
|
806
|
+
}, nr = (e, r) => {
|
|
807
|
+
const o = U.current.getCurrentGroupsLength;
|
|
808
|
+
rt(e, o, r);
|
|
809
|
+
}, Ae = () => {
|
|
810
|
+
var e, r, o, n, i, a, d, s, l, u, f, v, R, j;
|
|
809
811
|
if (t.gridProps.dataLayoutMode === "stacked") {
|
|
810
|
-
const g = ((e =
|
|
811
|
-
if ((
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
814
|
-
let
|
|
815
|
-
for (let
|
|
816
|
-
const
|
|
817
|
-
|
|
812
|
+
const g = ((e = F.current) == null ? void 0 : e.offsetWidth) || 0;
|
|
813
|
+
if ((r = P.current) != null && r.colGroupMain && g) {
|
|
814
|
+
const k = P.current.colGroupMain.children, b = k.length - 1;
|
|
815
|
+
if (b >= 0) {
|
|
816
|
+
let Z = 0;
|
|
817
|
+
for (let oe = 0; oe < b; oe++) {
|
|
818
|
+
const Kr = parseFloat((k[oe].width || 0).toString()) || k[oe].clientWidth;
|
|
819
|
+
Z += Kr;
|
|
818
820
|
}
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
+
const B = Math.max(0, g - Z);
|
|
822
|
+
k[b].width = B + "px", (n = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && n[b] && (P.current.colGroupHeader.children[b].width = B + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[b] && (P.current.colGroupFooter.children[b].width = B + "px"), (s = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && s[b] && (P.current.colGroupStickyHeader.children[b].width = B + "px"), (u = (l = P.current.colGroupStickyFooter) == null ? void 0 : l.children) != null && u[b] && (P.current.colGroupStickyFooter.children[b].width = B + "px"), (v = (f = P.current.colGroupPinnedTop) == null ? void 0 : f.children) != null && v[b] && (P.current.colGroupPinnedTop.children[b].width = B + "px"), (j = (R = P.current.colGroupPinnedBottom) == null ? void 0 : R.children) != null && j[b] && (P.current.colGroupPinnedBottom.children[b].width = B + "px");
|
|
821
823
|
}
|
|
822
824
|
}
|
|
823
|
-
|
|
825
|
+
_.current && _.current.setWidth(g), $.current && $.current.setWidth(g), W.current && W.current.setWidth(g), L.current && L.current.setWidth(g), O.current && O.current.setWidth(g), z.current && z.current.setWidth(g), A.current && (A.current.style.width = g ? g + "px" : "");
|
|
824
826
|
} else {
|
|
825
827
|
let g = 0;
|
|
826
828
|
if (!P.current.colGroupMain)
|
|
827
829
|
return;
|
|
828
|
-
const
|
|
829
|
-
for (let
|
|
830
|
-
const
|
|
831
|
-
if (!
|
|
830
|
+
const k = P.current.colGroupMain.children;
|
|
831
|
+
for (let b = 0; b < k.length; b++) {
|
|
832
|
+
const Z = k[b].width;
|
|
833
|
+
if (!Z) {
|
|
832
834
|
g = 0;
|
|
833
835
|
break;
|
|
834
836
|
}
|
|
835
|
-
g += parseFloat(
|
|
837
|
+
g += parseFloat(Z.toString());
|
|
836
838
|
}
|
|
837
|
-
g = Math.round(g),
|
|
839
|
+
g = Math.round(g), _.current && _.current.setWidth(g), $.current && $.current.setWidth(g), W.current && W.current.setWidth(g), L.current && L.current.setWidth(g), O.current && O.current.setWidth(g), z.current && z.current.setWidth(g), A.current && (A.current.style.width = g ? g + "px" : "");
|
|
838
840
|
}
|
|
839
|
-
Ee.current &&
|
|
840
|
-
},
|
|
841
|
-
const e =
|
|
842
|
-
Ee.current && (Ee.current.style.marginBlockEnd =
|
|
843
|
-
},
|
|
841
|
+
Ee.current && or();
|
|
842
|
+
}, or = () => {
|
|
843
|
+
const e = E.current, r = e ? e.scrollWidth > e.clientWidth : !1;
|
|
844
|
+
Ee.current && (Ee.current.style.marginBlockEnd = r ? "var(--kendo-scrollbar-width, 0px)" : "");
|
|
845
|
+
}, nt = () => {
|
|
844
846
|
var e;
|
|
845
|
-
t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e =
|
|
846
|
-
},
|
|
847
|
+
t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = F.current) == null ? void 0 : e.offsetWidth) || 0);
|
|
848
|
+
}, me = () => {
|
|
847
849
|
var e;
|
|
848
|
-
t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e =
|
|
849
|
-
},
|
|
850
|
+
t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = E.current) == null ? void 0 : e.offsetHeight) || 0);
|
|
851
|
+
}, ir = () => {
|
|
850
852
|
const e = t.gridProps.minRowHeightRef;
|
|
851
853
|
if (e && !e.current && !t.gridProps.rowHeight) {
|
|
852
|
-
const
|
|
853
|
-
|
|
854
|
+
const r = on(H.current);
|
|
855
|
+
r && (e.current = r, re());
|
|
854
856
|
}
|
|
855
|
-
},
|
|
856
|
-
(e,
|
|
857
|
+
}, Pe = c.useCallback(
|
|
858
|
+
(e, r, o, n, i) => {
|
|
857
859
|
var l;
|
|
858
|
-
if (!
|
|
860
|
+
if (!ar() && !o || !e)
|
|
859
861
|
return;
|
|
860
862
|
const a = {
|
|
861
863
|
type: e,
|
|
862
|
-
nativeEvent:
|
|
864
|
+
nativeEvent: r,
|
|
863
865
|
columns: t.columnsRef,
|
|
864
866
|
dataItemKey: t.gridProps.dataItemKey || "",
|
|
865
|
-
dataItem:
|
|
867
|
+
dataItem: n,
|
|
866
868
|
field: i,
|
|
867
869
|
...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
|
|
868
|
-
...
|
|
869
|
-
}, d =
|
|
870
|
+
...o
|
|
871
|
+
}, d = T(), s = Lr({
|
|
870
872
|
event: a,
|
|
871
873
|
data: d,
|
|
872
874
|
selectedState: (l = t.gridProps.select) != null ? l : {},
|
|
873
|
-
previousCopiedItems:
|
|
875
|
+
previousCopiedItems: lt.current
|
|
874
876
|
});
|
|
875
|
-
e !==
|
|
877
|
+
e !== Ve.paste && (lt.current = s.copiedItems), t.gridProps.onClipboard && D && m(t.gridProps.onClipboard, {
|
|
876
878
|
...a,
|
|
877
879
|
...s
|
|
878
880
|
});
|
|
@@ -884,24 +886,24 @@ const hr = (t, x, z, R) => {
|
|
|
884
886
|
t.gridProps.clipboard,
|
|
885
887
|
t.gridProps.onClipboard
|
|
886
888
|
]
|
|
887
|
-
),
|
|
889
|
+
), ar = () => {
|
|
888
890
|
var i, a, d;
|
|
889
|
-
if (!
|
|
891
|
+
if (!J)
|
|
890
892
|
return !1;
|
|
891
|
-
const e =
|
|
892
|
-
return !!(
|
|
893
|
-
},
|
|
894
|
-
|
|
895
|
-
columns:
|
|
896
|
-
nativeEvent:
|
|
893
|
+
const e = Mr(N()), r = e ? e.matches(".k-table-td") ? e : (i = N()) == null ? void 0 : i.body : (a = N()) == null ? void 0 : a.body, o = r == null ? void 0 : r.closest(".k-grid-container"), n = r && ((d = F.current) == null ? void 0 : d.contains(r));
|
|
894
|
+
return !!(r && n && o);
|
|
895
|
+
}, ot = (e, r, o, n, i, a, d) => {
|
|
896
|
+
Ae(), Ie.current = !0, We.current = !0, t.gridProps.onColumnResize && D && m(t.gridProps.onColumnResize, {
|
|
897
|
+
columns: se(),
|
|
898
|
+
nativeEvent: n,
|
|
897
899
|
targetColumnId: d,
|
|
898
900
|
index: e,
|
|
899
|
-
newWidth:
|
|
900
|
-
oldWidth:
|
|
901
|
+
newWidth: r,
|
|
902
|
+
oldWidth: o,
|
|
901
903
|
end: i,
|
|
902
|
-
target:
|
|
903
|
-
}), i &&
|
|
904
|
-
},
|
|
904
|
+
target: S.current
|
|
905
|
+
}), i && He(a);
|
|
906
|
+
}, cr = () => {
|
|
905
907
|
var e;
|
|
906
908
|
return {
|
|
907
909
|
filter: t.gridProps.filter,
|
|
@@ -910,242 +912,264 @@ const hr = (t, x, z, R) => {
|
|
|
910
912
|
take: (e = t.gridProps.take) != null ? e : t.gridProps.pageSize,
|
|
911
913
|
group: t.gridProps.group
|
|
912
914
|
};
|
|
913
|
-
},
|
|
915
|
+
}, I = (e) => ({
|
|
914
916
|
nativeEvent: e && e.nativeEvent,
|
|
915
917
|
syntheticEvent: e,
|
|
916
|
-
target:
|
|
917
|
-
}),
|
|
918
|
+
target: S.current
|
|
919
|
+
}), dr = (e) => ({
|
|
918
920
|
...e,
|
|
919
921
|
nativeEvent: void 0,
|
|
920
922
|
syntheticEvent: void 0,
|
|
921
923
|
target: void 0,
|
|
922
924
|
targetEvent: void 0,
|
|
923
925
|
focusElement: void 0
|
|
924
|
-
}), m = (e,
|
|
926
|
+
}), m = (e, r) => {
|
|
925
927
|
if (t.gridProps.isClient) {
|
|
926
|
-
e(
|
|
928
|
+
e(r);
|
|
927
929
|
return;
|
|
928
930
|
}
|
|
929
|
-
e(
|
|
930
|
-
},
|
|
931
|
-
var e,
|
|
932
|
-
if (
|
|
933
|
-
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
(i) => !
|
|
937
|
-
)[0] :
|
|
931
|
+
e(dr(r));
|
|
932
|
+
}, lr = () => {
|
|
933
|
+
var e, r, o;
|
|
934
|
+
if (H.current && ((e = H.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
|
|
935
|
+
ze.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? Oe.current = document.activeElement : Oe.current = void 0;
|
|
936
|
+
const n = Array.from((o = H.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
|
|
937
|
+
n.length > je.current.length ? Ce.current = n.filter(
|
|
938
|
+
(i) => !je.current.includes(i)
|
|
939
|
+
)[0] : n.length === 1 && (Ce.current = n[0], ze.current = !0), je.current = n;
|
|
938
940
|
}
|
|
939
|
-
},
|
|
941
|
+
}, T = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), N = () => {
|
|
940
942
|
var e;
|
|
941
|
-
if (
|
|
942
|
-
return ((e =
|
|
943
|
-
},
|
|
943
|
+
if (J)
|
|
944
|
+
return ((e = he()) == null ? void 0 : e.ownerDocument) || document;
|
|
945
|
+
}, he = () => F.current, Re = c.useCallback(
|
|
944
946
|
(e) => {
|
|
945
|
-
var
|
|
946
|
-
if (!
|
|
947
|
+
var n, i;
|
|
948
|
+
if (!y.current || !((n = y.current) != null && n.container) || p === "none")
|
|
947
949
|
return;
|
|
948
950
|
G.current && G.current.disconnect();
|
|
949
|
-
const { rowIndex:
|
|
950
|
-
if (
|
|
951
|
-
const a = ((i =
|
|
952
|
-
|
|
953
|
-
} else if (
|
|
954
|
-
const a =
|
|
955
|
-
a &&
|
|
951
|
+
const { rowIndex: r } = e, o = he();
|
|
952
|
+
if (x) {
|
|
953
|
+
const a = ((i = y.current.rowHeightService) == null ? void 0 : i.offset(r)) || 0;
|
|
954
|
+
y.current.container.scroll(0, a);
|
|
955
|
+
} else if (o) {
|
|
956
|
+
const a = r < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${r + 1})`);
|
|
957
|
+
a && E.current && (E.current.scrollTop = a.offsetTop);
|
|
956
958
|
}
|
|
957
959
|
},
|
|
958
|
-
[
|
|
959
|
-
),
|
|
960
|
-
|
|
961
|
-
},
|
|
960
|
+
[p]
|
|
961
|
+
), it = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), sr = () => it(kr) === it(t.columnsRef), ur = () => {
|
|
962
|
+
ye.current = window.innerWidth, sr() || re();
|
|
963
|
+
}, gr = () => {
|
|
962
964
|
var a;
|
|
963
|
-
const { virtualTotal: e, virtualPageSize:
|
|
964
|
-
|
|
965
|
-
},
|
|
965
|
+
const { virtualTotal: e, virtualPageSize: r, gridProps: o } = t, n = y.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
|
|
966
|
+
n && (n.fixedScroll = o.fixedScroll || !1, n.PageChange = qt, n.pageSize = r, n.scrollableVirtual = x, n.container = E.current, n.tableBody = H.current, n.scrollHeightContainer = ct.current, n.scrollbarOverlaySpacerElement = ve.current, n.overlaySyncingRef = Fe, n.table = A.current, (!n.rowHeightService || n.total !== e) && i && (n.total = e, n.rowHeightService = new Fr(e, i)));
|
|
967
|
+
}, at = c.useCallback(
|
|
966
968
|
(e) => {
|
|
967
|
-
const
|
|
968
|
-
e.forEach((
|
|
969
|
-
|
|
969
|
+
const r = { rowIndex: Ne.current };
|
|
970
|
+
e.forEach((o) => {
|
|
971
|
+
o.boundingClientRect.height !== o.intersectionRect.height && Re(r);
|
|
970
972
|
});
|
|
971
973
|
},
|
|
972
|
-
[
|
|
973
|
-
),
|
|
974
|
+
[Re]
|
|
975
|
+
), re = () => {
|
|
974
976
|
t.gridProps.forceUpdate && t.gridProps.forceUpdate();
|
|
975
|
-
},
|
|
977
|
+
}, fr = (e) => e.left !== void 0 ? Ue !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, S = c.useRef(null), y = c.useRef(void 0), P = c.useRef(void 0), U = c.useRef(void 0), V = c.useRef(void 0), ne = c.useRef(void 0), be = c.useRef(void 0), G = c.useRef(null), H = c.useRef(null), mr = c.useRef(null), E = c.useRef(null), A = c.useRef(null), Pr = c.useRef(null), F = c.useRef(null), ct = c.useRef(null), q = c.useRef(null), ve = c.useRef(null), dt = c.useRef(!1), Fe = c.useRef(!1), $ = c.useRef(null), _ = c.useRef(null), W = c.useRef(null), L = c.useRef(null), O = c.useRef(null), z = c.useRef(null), hr = c.useRef(null), Rr = c.useRef(null), We = c.useRef(!1), Le = c.useRef(!1), Ce = c.useRef(void 0), Oe = c.useRef(void 0), ze = c.useRef(!1), Ie = c.useRef(!0), Be = c.useRef(0), pe = c.useRef(void 0), Ne = c.useRef(void 0), je = c.useRef([]), lt = c.useRef([]), ye = c.useRef(0), we = c.useRef(
|
|
976
978
|
null
|
|
977
|
-
),
|
|
978
|
-
stickyHeaderItems:
|
|
979
|
-
stickyHeaderRef:
|
|
980
|
-
stickyFooterItems:
|
|
979
|
+
), br = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, vr = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, Cr = !!((ft = t.gridProps.group) != null && ft.length), {
|
|
980
|
+
stickyHeaderItems: Ir,
|
|
981
|
+
stickyHeaderRef: yr,
|
|
982
|
+
stickyFooterItems: wr,
|
|
981
983
|
stickyFooterRef: Ee,
|
|
982
|
-
scrollToStickyGroup:
|
|
983
|
-
update:
|
|
984
|
-
} =
|
|
985
|
-
enabled:
|
|
986
|
-
enabledFooters:
|
|
984
|
+
scrollToStickyGroup: Er,
|
|
985
|
+
update: st
|
|
986
|
+
} = en({
|
|
987
|
+
enabled: br,
|
|
988
|
+
enabledFooters: vr,
|
|
987
989
|
flatData: t.dataRef,
|
|
988
|
-
containerRef:
|
|
989
|
-
tableBodyRef:
|
|
990
|
+
containerRef: E,
|
|
991
|
+
tableBodyRef: H,
|
|
990
992
|
rowHeight: t.gridProps.rowHeight,
|
|
991
|
-
isGrouped:
|
|
993
|
+
isGrouped: Cr,
|
|
992
994
|
virtualSkipRef: t.gridProps.virtualSkipRef,
|
|
993
995
|
rowHeightServiceRef: {
|
|
994
996
|
get current() {
|
|
995
997
|
var e;
|
|
996
|
-
return (e =
|
|
998
|
+
return (e = y.current) == null ? void 0 : e.rowHeightService;
|
|
997
999
|
}
|
|
998
1000
|
}
|
|
999
|
-
}),
|
|
1000
|
-
|
|
1001
|
-
|
|
1001
|
+
}), ce = c.useRef(null), Sr = c.useRef(null), xr = c.useRef(null), Ue = Gr(F), x = t.isVirtualScroll, kr = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), ut = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, h = xe(t.gridProps.selectable), gt = Or(t.gridProps.editable), Dr = ye.current && Q && ye.current <= Q.medium && t.gridProps.adaptive;
|
|
1002
|
+
c.useMemo(() => {
|
|
1003
|
+
ie.onConstructor({
|
|
1002
1004
|
navigatable: !!t.gridProps.navigatable,
|
|
1003
|
-
contextStateRef:
|
|
1004
|
-
navigationStateRef:
|
|
1005
|
+
contextStateRef: V,
|
|
1006
|
+
navigationStateRef: ne,
|
|
1005
1007
|
idPrefix: t.id
|
|
1006
|
-
}),
|
|
1008
|
+
}), y.current = new gn();
|
|
1007
1009
|
}, []), c.useMemo(() => {
|
|
1008
1010
|
var e;
|
|
1009
|
-
(e =
|
|
1011
|
+
(e = y.current) == null || e.reset();
|
|
1010
1012
|
}, [
|
|
1011
|
-
|
|
1013
|
+
p,
|
|
1012
1014
|
t.gridProps.total,
|
|
1013
1015
|
t.gridProps.filter,
|
|
1014
1016
|
t.gridProps.group,
|
|
1015
|
-
|
|
1017
|
+
ut,
|
|
1016
1018
|
t.gridProps.sort,
|
|
1017
1019
|
t.gridProps.rowHeight
|
|
1018
1020
|
]), c.useEffect(() => {
|
|
1019
|
-
|
|
1020
|
-
}), c.useEffect(() => (t.gridProps.clipboard && (
|
|
1021
|
-
|
|
1022
|
-
}), [t.gridProps.onClipboard, t.gridProps.clipboard,
|
|
1023
|
-
scope:
|
|
1024
|
-
contextStateRef:
|
|
1025
|
-
navigationStateRef:
|
|
1021
|
+
de.current = {};
|
|
1022
|
+
}), c.useEffect(() => (t.gridProps.clipboard && (be.current = new zr(Pe), be.current.addEventListeners(N())), () => {
|
|
1023
|
+
be.current && be.current.removeEventListeners(N());
|
|
1024
|
+
}), [t.gridProps.onClipboard, t.gridProps.clipboard, Pe, N]), c.useEffect(() => (nt(), Ae(), mt(), ie.onComponentDidMount({
|
|
1025
|
+
scope: F.current || void 0,
|
|
1026
|
+
contextStateRef: V,
|
|
1027
|
+
navigationStateRef: ne
|
|
1026
1028
|
}), () => {
|
|
1027
|
-
clearTimeout(
|
|
1029
|
+
clearTimeout(pe.current);
|
|
1028
1030
|
}), []), c.useEffect(() => {
|
|
1029
1031
|
var e;
|
|
1030
|
-
|
|
1031
|
-
scope:
|
|
1032
|
-
contextStateRef:
|
|
1033
|
-
navigationStateRef:
|
|
1034
|
-
focusFirst:
|
|
1035
|
-
newEditableRow:
|
|
1036
|
-
singleEditRow:
|
|
1037
|
-
lastActiveElement:
|
|
1032
|
+
nt(), Ae(), mt(), x && (me(), ir(), (e = y.current) == null || e.update()), st(), lr(), ie.onComponentDidUpdate({
|
|
1033
|
+
scope: F.current || void 0,
|
|
1034
|
+
contextStateRef: V,
|
|
1035
|
+
navigationStateRef: ne,
|
|
1036
|
+
focusFirst: Le.current,
|
|
1037
|
+
newEditableRow: Ce.current,
|
|
1038
|
+
singleEditRow: ze.current,
|
|
1039
|
+
lastActiveElement: Oe.current,
|
|
1038
1040
|
navigatable: t.gridProps.navigatable
|
|
1039
|
-
}),
|
|
1041
|
+
}), Et(), Le.current = !1, Ce.current = void 0, we.current = void 0;
|
|
1040
1042
|
}), c.useEffect(() => {
|
|
1041
|
-
if (
|
|
1043
|
+
if (J) {
|
|
1042
1044
|
const e = {
|
|
1043
1045
|
rootMargin: "0px",
|
|
1044
1046
|
threshold: 0.9
|
|
1045
1047
|
};
|
|
1046
|
-
G.current = window.IntersectionObserver && new window.IntersectionObserver(
|
|
1048
|
+
G.current = window.IntersectionObserver && new window.IntersectionObserver(at, e) || null;
|
|
1047
1049
|
}
|
|
1048
1050
|
return () => {
|
|
1049
1051
|
G.current && (G.current.disconnect(), G.current = null);
|
|
1050
1052
|
};
|
|
1051
|
-
}, [
|
|
1052
|
-
var
|
|
1053
|
+
}, [at]), c.useEffect(() => {
|
|
1054
|
+
var r;
|
|
1053
1055
|
let e;
|
|
1054
|
-
return
|
|
1055
|
-
|
|
1056
|
-
}), e.observe((
|
|
1056
|
+
return J && window.ResizeObserver && (e = new window.ResizeObserver(() => {
|
|
1057
|
+
ur(), x && me();
|
|
1058
|
+
}), e.observe((r = N()) == null ? void 0 : r.body)), () => {
|
|
1057
1059
|
e == null || e.disconnect();
|
|
1058
1060
|
};
|
|
1059
1061
|
}, []), c.useEffect(() => {
|
|
1060
|
-
if (!
|
|
1062
|
+
if (!J || !window.ResizeObserver || !x || !E.current)
|
|
1061
1063
|
return;
|
|
1062
1064
|
const e = () => {
|
|
1063
1065
|
var i, a;
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1066
|
-
const
|
|
1067
|
-
(
|
|
1068
|
-
},
|
|
1069
|
-
return
|
|
1070
|
-
|
|
1066
|
+
const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
|
|
1067
|
+
me();
|
|
1068
|
+
const n = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
|
|
1069
|
+
(o === 0 && n > 0 || Math.abs(n - o) > 10) && re();
|
|
1070
|
+
}, r = new window.ResizeObserver(e);
|
|
1071
|
+
return r.observe(E.current), () => {
|
|
1072
|
+
r.disconnect();
|
|
1073
|
+
};
|
|
1074
|
+
}, [x, me]);
|
|
1075
|
+
const Se = c.useCallback(() => {
|
|
1076
|
+
var n;
|
|
1077
|
+
const e = E.current;
|
|
1078
|
+
if (!e)
|
|
1079
|
+
return;
|
|
1080
|
+
const r = ((n = q.current) == null ? void 0 : n.offsetWidth) || 17, o = e.scrollWidth > e.clientWidth ? r : 0;
|
|
1081
|
+
q.current && (q.current.style.bottom = o + "px"), ve.current && (ve.current.style.height = Math.max(0, e.scrollHeight - o) + "px");
|
|
1082
|
+
}, []);
|
|
1083
|
+
return c.useEffect(() => {
|
|
1084
|
+
if (!J || !K || !E.current || !window.ResizeObserver)
|
|
1085
|
+
return;
|
|
1086
|
+
const e = E.current, r = new window.ResizeObserver(Se);
|
|
1087
|
+
return A.current && r.observe(A.current), r.observe(e), () => {
|
|
1088
|
+
r.disconnect();
|
|
1071
1089
|
};
|
|
1072
|
-
}, [
|
|
1073
|
-
E
|
|
1090
|
+
}, [K, Se]), c.useEffect(() => {
|
|
1091
|
+
!J || !K || !E.current || Se();
|
|
1092
|
+
}, [K, Se, t.columnsState, t.gridProps.data]), c.useEffect(() => {
|
|
1093
|
+
const e = E.current, r = x && K;
|
|
1094
|
+
if (!(!e || !r && Y === 1))
|
|
1095
|
+
return un(e, { wheelMultiplier: Y, overlayRequiresCustomWheel: r });
|
|
1096
|
+
}, [x, K, Y]), c.useImperativeHandle(
|
|
1097
|
+
S,
|
|
1074
1098
|
() => ({
|
|
1075
1099
|
get element() {
|
|
1076
|
-
return
|
|
1100
|
+
return he();
|
|
1077
1101
|
},
|
|
1078
1102
|
props: t.gridProps,
|
|
1079
1103
|
get columns() {
|
|
1080
|
-
return
|
|
1104
|
+
return se();
|
|
1081
1105
|
},
|
|
1082
1106
|
scrollIntoView: (e) => {
|
|
1083
|
-
var
|
|
1084
|
-
if (!((
|
|
1107
|
+
var n;
|
|
1108
|
+
if (!((n = y.current) != null && n.container) || p === "none")
|
|
1085
1109
|
return;
|
|
1086
|
-
const { rowIndex:
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
if (G.current &&
|
|
1110
|
+
const { rowIndex: r } = e;
|
|
1111
|
+
Ne.current = r;
|
|
1112
|
+
const o = he();
|
|
1113
|
+
if (G.current && o) {
|
|
1090
1114
|
G.current.disconnect();
|
|
1091
|
-
const i =
|
|
1092
|
-
i ? G.current.observe(i) :
|
|
1115
|
+
const i = o.querySelector(`[absolute-row-index="${Ne.current}"]`);
|
|
1116
|
+
i ? G.current.observe(i) : Re(e);
|
|
1093
1117
|
}
|
|
1094
1118
|
},
|
|
1095
1119
|
fitColumns: (e) => {
|
|
1096
1120
|
P.current.dblClickHandler(null, e);
|
|
1097
1121
|
},
|
|
1098
|
-
exportAsPdf:
|
|
1099
|
-
saveAsCsv:
|
|
1100
|
-
getCsvBlob:
|
|
1101
|
-
getTotal:
|
|
1102
|
-
getLeafDataItems:
|
|
1122
|
+
exportAsPdf: Me,
|
|
1123
|
+
saveAsCsv: et,
|
|
1124
|
+
getCsvBlob: tt,
|
|
1125
|
+
getTotal: Te,
|
|
1126
|
+
getLeafDataItems: T
|
|
1103
1127
|
})
|
|
1104
|
-
), c.useImperativeHandle(t.gridRef, () =>
|
|
1105
|
-
P.current = new
|
|
1128
|
+
), c.useImperativeHandle(t.gridRef, () => S.current), c.useMemo(() => {
|
|
1129
|
+
P.current = new Yr(ot);
|
|
1106
1130
|
}, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
|
|
1107
|
-
|
|
1131
|
+
U.current = new Qr(fe, rr, rt);
|
|
1108
1132
|
}, [
|
|
1109
1133
|
t.gridProps.onColumnReorder,
|
|
1110
1134
|
t.gridProps.onGroupChange,
|
|
1111
1135
|
t.gridProps.group,
|
|
1112
1136
|
t.columnsRef,
|
|
1113
1137
|
t.gridProps.groupable
|
|
1114
|
-
]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.renderedColumnsRef || t.columnsRef, P.current.columnsState =
|
|
1115
|
-
|
|
1138
|
+
]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.renderedColumnsRef || t.columnsRef, P.current.columnsState = Hr(t.columnsState), U.current.reorderable = t.gridProps.reorderable || !1, U.current.groupable = ut, U.current.columns = t.columnsRef, U.current.dir = Ue, gr(), Ar("grid", S, t.gridProps, t.gridProps.webMcp), /* @__PURE__ */ c.createElement(
|
|
1139
|
+
vn.Provider,
|
|
1116
1140
|
{
|
|
1117
1141
|
value: {
|
|
1118
|
-
isClient:
|
|
1119
|
-
rowReorder:
|
|
1120
|
-
activeDragRowDataItemRef:
|
|
1121
|
-
reorderRowDragTargetRef:
|
|
1122
|
-
reorderRowDropTargetRef:
|
|
1123
|
-
dir:
|
|
1124
|
-
getCellPositionStyle:
|
|
1142
|
+
isClient: D,
|
|
1143
|
+
rowReorder: ae,
|
|
1144
|
+
activeDragRowDataItemRef: ce,
|
|
1145
|
+
reorderRowDragTargetRef: Sr,
|
|
1146
|
+
reorderRowDropTargetRef: xr,
|
|
1147
|
+
dir: Ue,
|
|
1148
|
+
getCellPositionStyle: fr,
|
|
1125
1149
|
dataItemKey: t.gridProps.dataItemKey,
|
|
1126
1150
|
columnsState: t.columnsState,
|
|
1127
1151
|
columnsRef: t.columnsRef,
|
|
1128
1152
|
hiddenColumnsRef: t.hiddenColumnsRef,
|
|
1129
|
-
onColumnsStateChange:
|
|
1153
|
+
onColumnsStateChange: He,
|
|
1130
1154
|
groupable: t.gridProps.groupable,
|
|
1131
1155
|
group: t.gridProps.group,
|
|
1132
1156
|
reorderable: t.gridProps.reorderable,
|
|
1133
1157
|
defaultGroup: t.gridProps.defaultGroup,
|
|
1134
1158
|
groupChange: Ge,
|
|
1135
|
-
selectionRelease:
|
|
1136
|
-
pinnedSelectionRelease:
|
|
1137
|
-
pagerPageChange:
|
|
1138
|
-
onContextMenu:
|
|
1139
|
-
rowClick:
|
|
1140
|
-
rowDblClick:
|
|
1141
|
-
cellClick:
|
|
1142
|
-
headerCellClick:
|
|
1143
|
-
itemChange:
|
|
1144
|
-
onDialogEditCancel:
|
|
1145
|
-
onDialogEditSubmit:
|
|
1146
|
-
columnReorder:
|
|
1147
|
-
onResize:
|
|
1148
|
-
getTotal:
|
|
1159
|
+
selectionRelease: Xe,
|
|
1160
|
+
pinnedSelectionRelease: pt,
|
|
1161
|
+
pagerPageChange: Jt,
|
|
1162
|
+
onContextMenu: It,
|
|
1163
|
+
rowClick: Dt,
|
|
1164
|
+
rowDblClick: Kt,
|
|
1165
|
+
cellClick: Gt,
|
|
1166
|
+
headerCellClick: Je,
|
|
1167
|
+
itemChange: Wt,
|
|
1168
|
+
onDialogEditCancel: Mt,
|
|
1169
|
+
onDialogEditSubmit: Tt,
|
|
1170
|
+
columnReorder: fe,
|
|
1171
|
+
onResize: ot,
|
|
1172
|
+
getTotal: Te,
|
|
1149
1173
|
sortable: t.gridProps.sortable,
|
|
1150
1174
|
pageable: t.gridProps.pageable,
|
|
1151
1175
|
pageSize: t.gridProps.pageSize,
|
|
@@ -1153,101 +1177,101 @@ const hr = (t, x, z, R) => {
|
|
|
1153
1177
|
skip: t.gridProps.skip,
|
|
1154
1178
|
take: t.gridProps.take,
|
|
1155
1179
|
defaultSort: t.gridProps.defaultSort,
|
|
1156
|
-
sortChange:
|
|
1180
|
+
sortChange: Ye,
|
|
1157
1181
|
filterable: t.gridProps.filterable,
|
|
1158
1182
|
filter: t.gridProps.filter,
|
|
1159
1183
|
defaultFilter: t.gridProps.defaultFilter,
|
|
1160
|
-
filterOperators: t.gridProps.filterOperators ||
|
|
1161
|
-
getLeafDataItems:
|
|
1162
|
-
filterChange:
|
|
1163
|
-
applyHighlightDescriptor:
|
|
1164
|
-
applySelectionDescriptor:
|
|
1184
|
+
filterOperators: t.gridProps.filterOperators || Cn,
|
|
1185
|
+
getLeafDataItems: T,
|
|
1186
|
+
filterChange: Xt,
|
|
1187
|
+
applyHighlightDescriptor: Yt,
|
|
1188
|
+
applySelectionDescriptor: Ut,
|
|
1165
1189
|
highlight: t.gridProps.highlight,
|
|
1166
1190
|
select: t.gridProps.select,
|
|
1167
1191
|
selectable: t.gridProps.selectable,
|
|
1168
|
-
searchChange:
|
|
1169
|
-
exportAsPdf:
|
|
1170
|
-
exportAsCsv:
|
|
1171
|
-
getCsvBlob:
|
|
1192
|
+
searchChange: Qt,
|
|
1193
|
+
exportAsPdf: Me,
|
|
1194
|
+
exportAsCsv: et,
|
|
1195
|
+
getCsvBlob: tt,
|
|
1172
1196
|
onHeaderSelectionChange: Bt,
|
|
1173
|
-
columnGroupChange:
|
|
1174
|
-
onKeyDown:
|
|
1175
|
-
onFocus:
|
|
1176
|
-
scrollHandler:
|
|
1177
|
-
selectionChange:
|
|
1178
|
-
groupSelectionChange:
|
|
1179
|
-
mobileMode:
|
|
1180
|
-
adaptiveColumnMenuRef:
|
|
1197
|
+
columnGroupChange: nr,
|
|
1198
|
+
onKeyDown: St,
|
|
1199
|
+
onFocus: xt,
|
|
1200
|
+
scrollHandler: yt,
|
|
1201
|
+
selectionChange: Lt,
|
|
1202
|
+
groupSelectionChange: Ot,
|
|
1203
|
+
mobileMode: Dr,
|
|
1204
|
+
adaptiveColumnMenuRef: ye.current,
|
|
1181
1205
|
adpativeTitle: t.gridProps.adaptiveTitle,
|
|
1182
1206
|
adaptive: t.gridProps.adaptive,
|
|
1183
|
-
dispatchDetailExpand:
|
|
1184
|
-
dispatchGroupExpand:
|
|
1207
|
+
dispatchDetailExpand: Ht,
|
|
1208
|
+
dispatchGroupExpand: At,
|
|
1185
1209
|
columnResizeRef: P,
|
|
1186
|
-
dragLogicRef:
|
|
1187
|
-
navigationStateRef:
|
|
1188
|
-
tableElementRef:
|
|
1189
|
-
tableBodyElementRef:
|
|
1190
|
-
headerElementRef:
|
|
1191
|
-
containerElementRef:
|
|
1192
|
-
headTableElementRef:
|
|
1193
|
-
elementRef:
|
|
1194
|
-
virtualScrollHeightContainerRef:
|
|
1195
|
-
scrollbarContainerRef:
|
|
1196
|
-
scrollbarSpacerRef:
|
|
1197
|
-
vScrollDraggingRef:
|
|
1198
|
-
|
|
1199
|
-
footerRef:
|
|
1200
|
-
headerRef:
|
|
1201
|
-
vsRef:
|
|
1202
|
-
stickyHeaderItems:
|
|
1203
|
-
stickyHeaderRef:
|
|
1204
|
-
stickyFooterItems:
|
|
1210
|
+
dragLogicRef: U,
|
|
1211
|
+
navigationStateRef: ne,
|
|
1212
|
+
tableElementRef: A,
|
|
1213
|
+
tableBodyElementRef: H,
|
|
1214
|
+
headerElementRef: mr,
|
|
1215
|
+
containerElementRef: E,
|
|
1216
|
+
headTableElementRef: Pr,
|
|
1217
|
+
elementRef: F,
|
|
1218
|
+
virtualScrollHeightContainerRef: ct,
|
|
1219
|
+
scrollbarContainerRef: q,
|
|
1220
|
+
scrollbarSpacerRef: ve,
|
|
1221
|
+
vScrollDraggingRef: dt,
|
|
1222
|
+
overlaySyncingRef: Fe,
|
|
1223
|
+
footerRef: $,
|
|
1224
|
+
headerRef: _,
|
|
1225
|
+
vsRef: y,
|
|
1226
|
+
stickyHeaderItems: Ir,
|
|
1227
|
+
stickyHeaderRef: yr,
|
|
1228
|
+
stickyFooterItems: wr,
|
|
1205
1229
|
stickyFooterRef: Ee,
|
|
1206
|
-
stickyHeaderTableRef:
|
|
1207
|
-
stickyFooterTableRef:
|
|
1208
|
-
pinnedTopTableRef:
|
|
1209
|
-
pinnedBottomTableRef:
|
|
1210
|
-
pinnedTopRef:
|
|
1211
|
-
pinnedBottomRef:
|
|
1212
|
-
onRowPin:
|
|
1213
|
-
getRowPinPosition:
|
|
1230
|
+
stickyHeaderTableRef: W,
|
|
1231
|
+
stickyFooterTableRef: L,
|
|
1232
|
+
pinnedTopTableRef: O,
|
|
1233
|
+
pinnedBottomTableRef: z,
|
|
1234
|
+
pinnedTopRef: hr,
|
|
1235
|
+
pinnedBottomRef: Rr,
|
|
1236
|
+
onRowPin: ue,
|
|
1237
|
+
getRowPinPosition: Ft
|
|
1214
1238
|
}
|
|
1215
1239
|
},
|
|
1216
|
-
/* @__PURE__ */ c.createElement(
|
|
1240
|
+
/* @__PURE__ */ c.createElement(Br.Provider, { value: V.current }, t.children),
|
|
1217
1241
|
/* @__PURE__ */ c.createElement(
|
|
1218
|
-
|
|
1242
|
+
fn,
|
|
1219
1243
|
{
|
|
1220
|
-
show:
|
|
1221
|
-
dataItem:
|
|
1222
|
-
field:
|
|
1223
|
-
items:
|
|
1224
|
-
offset:
|
|
1225
|
-
onClose:
|
|
1226
|
-
onSelect:
|
|
1244
|
+
show: C.show && (le == null ? void 0 : le.length),
|
|
1245
|
+
dataItem: C.dataItem,
|
|
1246
|
+
field: C.field,
|
|
1247
|
+
items: le,
|
|
1248
|
+
offset: C.offset,
|
|
1249
|
+
onClose: $e,
|
|
1250
|
+
onSelect: Ct
|
|
1227
1251
|
}
|
|
1228
1252
|
),
|
|
1229
1253
|
t.gridProps.pdf && /* @__PURE__ */ c.createElement(
|
|
1230
|
-
|
|
1254
|
+
Rn,
|
|
1231
1255
|
{
|
|
1232
1256
|
gridProps: t.gridProps,
|
|
1233
1257
|
innerGrid: t.innerGrid,
|
|
1234
1258
|
pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
|
|
1235
|
-
onPdfExport:
|
|
1236
|
-
ref: (e) =>
|
|
1259
|
+
onPdfExport: er,
|
|
1260
|
+
ref: (e) => qe.current = e
|
|
1237
1261
|
}
|
|
1238
1262
|
),
|
|
1239
1263
|
t.gridProps.csv && /* @__PURE__ */ c.createElement(
|
|
1240
|
-
|
|
1264
|
+
bn,
|
|
1241
1265
|
{
|
|
1242
1266
|
gridProps: t.gridProps,
|
|
1243
1267
|
csv: typeof t.gridProps.csv == "object" ? t.gridProps.csv : {},
|
|
1244
|
-
onCsvExport:
|
|
1268
|
+
onCsvExport: tr,
|
|
1245
1269
|
columnsState: t.columnsState,
|
|
1246
|
-
ref: (e) =>
|
|
1270
|
+
ref: (e) => Ke.current = e
|
|
1247
1271
|
}
|
|
1248
1272
|
)
|
|
1249
1273
|
);
|
|
1250
1274
|
};
|
|
1251
1275
|
export {
|
|
1252
|
-
|
|
1276
|
+
zn as GridClientWrapper
|
|
1253
1277
|
};
|