@progress/kendo-react-grid 14.5.0-develop.3 → 14.5.0-develop.4
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 +288 -283
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +271 -260
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
package/GridClientWrapper.mjs
CHANGED
|
@@ -7,30 +7,30 @@
|
|
|
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 we, populateClipboardData as
|
|
13
|
-
import { ColumnResize as
|
|
14
|
-
import { CommonDragLogic as
|
|
15
|
-
import { useStickyGroups as
|
|
16
|
-
import { getDefaultHeadContextMenuItems as
|
|
17
|
-
import { VirtualScroll as
|
|
18
|
-
import { GridContextMenu as
|
|
10
|
+
import { useAdaptiveModeContext as wn, canUseDOM as ae, getActiveElement as yn, useDir as En, setScrollbarWidth as at, cloneArray as xn, RowHeightService as Sn, getter as te } from "@progress/kendo-react-common";
|
|
11
|
+
import { filterBy as kn } from "@progress/kendo-data-query";
|
|
12
|
+
import { getSelectionOptions as we, populateClipboardData as Dn, ClipboardActionType as ze, getEditableOptions as Kn, tableKeyboardNavigation as ne, ClipboardService as Gn, TableKeyboardNavigationContext as Tn, updateLeft as Hn, updateRight as Mn, getGroupExpandableOptions as An, groupExpandReducer as Fn, getDetailExpandableOptions as Ln, detailExpandReducer as Bn, getSelectedState as ct, editReducer as Wn, EDIT_ACTION as zn, closestTagName as ye, getSelectedStateFromKeyDown as On, getColumnIndex as pn, getRowIndex as Nn } from "@progress/kendo-react-data-tools";
|
|
13
|
+
import { ColumnResize as Un } from "./drag/ColumnResize.mjs";
|
|
14
|
+
import { CommonDragLogic as Vn } from "./drag/CommonDragLogic.mjs";
|
|
15
|
+
import { useStickyGroups as jn } from "./hooks/useStickyGroups.mjs";
|
|
16
|
+
import { getDefaultHeadContextMenuItems as qn, getDefaultBodyContextMenuItems as $n, isRowReorderEnabled as _n, calcRowHeight as Zn, sanitizeColumns as Jn, getFlatColumnsState as Xn, getDataAsArray as Yn } from "./utils/index.mjs";
|
|
17
|
+
import { VirtualScroll as Qn } from "./VirtualScroll.mjs";
|
|
18
|
+
import { GridContextMenu as er, contextMenuItemsMap as tr } from "./contextMenu/GridContextMenu.mjs";
|
|
19
19
|
import { GridContextMenuAnchorPart as dt, GridContextMenuItemNames as Ee } from "./contextMenu/enums.mjs";
|
|
20
|
-
import { normalizeSortable as
|
|
21
|
-
import { BasePDFExport as
|
|
22
|
-
import { BaseCSVExport as
|
|
23
|
-
import { GridContext as
|
|
24
|
-
import { operators as
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
return t.reduce((k,
|
|
28
|
-
},
|
|
29
|
-
...
|
|
30
|
-
...
|
|
31
|
-
}), {}),
|
|
20
|
+
import { normalizeSortable as nr, firstLevelSortSeqMap as rr } from "./sortCommon.mjs";
|
|
21
|
+
import { BasePDFExport as or } from "./BasePDFExport.mjs";
|
|
22
|
+
import { BaseCSVExport as ir } from "./BaseCSVExport.mjs";
|
|
23
|
+
import { GridContext as ar } from "./utils/GridContext.mjs";
|
|
24
|
+
import { operators as cr } from "./filterCommon.mjs";
|
|
25
|
+
const dr = (t, x, b, z) => {
|
|
26
|
+
const re = Object.keys(x.cells).map((k) => b.findIndex((O) => O.field === k)), Z = Object.keys(x.cells).length > 0 ? re : !0;
|
|
27
|
+
return t.reduce((k, O) => (k[O[z != null ? z : "id"]] = Z, k), {});
|
|
28
|
+
}, st = (t, x, b, z) => x.reduce((Z, k) => ({
|
|
29
|
+
...Z,
|
|
30
|
+
...dr(kn(t, k), k, b, z)
|
|
31
|
+
}), {}), Er = (t) => {
|
|
32
32
|
var it;
|
|
33
|
-
const x = t.gridProps.isClient, [b, z] = c.useState({}),
|
|
33
|
+
const x = t.gridProps.isClient, [b, z] = c.useState({}), re = wn(), Z = c.useRef(null), k = c.useRef(null), O = c.useRef({}), lt = (e) => {
|
|
34
34
|
e.event.preventDefault(), z({
|
|
35
35
|
...b,
|
|
36
36
|
show: !0,
|
|
@@ -43,28 +43,28 @@ const cr = (t, x, b, z) => {
|
|
|
43
43
|
});
|
|
44
44
|
}, Oe = () => {
|
|
45
45
|
z({});
|
|
46
|
-
},
|
|
47
|
-
const n = t.gridProps.dataItemKey || "", o = b.dataItem, r = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = n ? o[n] : void 0, d = a !== void 0 && r.some((
|
|
48
|
-
return e.map((
|
|
49
|
-
const u = typeof
|
|
46
|
+
}, ut = (e) => {
|
|
47
|
+
const n = t.gridProps.dataItemKey || "", o = b.dataItem, r = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = n ? o[n] : void 0, d = a !== void 0 && r.some((s) => s[n] === a), l = a !== void 0 && i.some((s) => s[n] === a);
|
|
48
|
+
return e.map((s) => {
|
|
49
|
+
const u = typeof s == "string" ? tr[s] : s;
|
|
50
50
|
return (u == null ? void 0 : u.name) === Ee.pinRow && u.items ? {
|
|
51
51
|
...u,
|
|
52
|
-
items: u.items.filter((m) => m.name === Ee.pinTop ? !d : m.name === Ee.pinBottom ? !
|
|
53
|
-
} :
|
|
52
|
+
items: u.items.filter((m) => m.name === Ee.pinTop ? !d : m.name === Ee.pinBottom ? !l : m.name === Ee.unpin ? d || l : !0)
|
|
53
|
+
} : s;
|
|
54
54
|
});
|
|
55
55
|
}, y = c.useMemo(() => t.columnsRef.find((e) => e.field === b.field), [t.columnsRef, b]), pe = c.useMemo(() => {
|
|
56
56
|
const e = t.gridProps.sortable && (y == null ? void 0 : y.sortable);
|
|
57
|
-
return
|
|
57
|
+
return qn({
|
|
58
58
|
pdf: !!t.gridProps.pdf,
|
|
59
59
|
sortable: !!e,
|
|
60
60
|
selectable: we(t.gridProps.selectable).enabled,
|
|
61
61
|
clipboard: !!t.gridProps.clipboard
|
|
62
62
|
});
|
|
63
|
-
}, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ne = c.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable),
|
|
63
|
+
}, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ne = c.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), $n({
|
|
64
64
|
pdf: !!t.gridProps.pdf,
|
|
65
65
|
selectable: we(t.gridProps.selectable).enabled,
|
|
66
66
|
clipboard: !!t.gridProps.clipboard,
|
|
67
|
-
rowReorderable:
|
|
67
|
+
rowReorderable: _n(t.gridProps.rowReorderable),
|
|
68
68
|
pinnable: !!t.gridProps.pinnable
|
|
69
69
|
})), [
|
|
70
70
|
y,
|
|
@@ -79,7 +79,7 @@ const cr = (t, x, b, z) => {
|
|
|
79
79
|
if (n && b.offset) {
|
|
80
80
|
const o = b.dataItem ? dt.body : dt.head, r = n[o], i = b.dataItem ? Ne : pe;
|
|
81
81
|
let a;
|
|
82
|
-
return r === !0 || r === void 0 ? a = i : r !== !1 && (a = r), t.gridProps.pinnable && a && b.dataItem ?
|
|
82
|
+
return r === !0 || r === void 0 ? a = i : r !== !1 && (a = r), t.gridProps.pinnable && a && b.dataItem ? ut(a) : a;
|
|
83
83
|
}
|
|
84
84
|
}, [
|
|
85
85
|
t.gridProps.contextMenu,
|
|
@@ -88,8 +88,8 @@ const cr = (t, x, b, z) => {
|
|
|
88
88
|
Ne,
|
|
89
89
|
pe,
|
|
90
90
|
y
|
|
91
|
-
]),
|
|
92
|
-
var d,
|
|
91
|
+
]), gt = (e) => {
|
|
92
|
+
var d, l, s, u, m, w, h, N, g;
|
|
93
93
|
const n = e.event.item, o = {
|
|
94
94
|
target: S.current,
|
|
95
95
|
syntheticEvent: e.event.syntheticEvent,
|
|
@@ -118,21 +118,21 @@ const cr = (t, x, b, z) => {
|
|
|
118
118
|
switch ((d = n.data) == null ? void 0 : d.action) {
|
|
119
119
|
case "SortCommand":
|
|
120
120
|
if (y) {
|
|
121
|
-
const E = (
|
|
122
|
-
Ue(e.event.syntheticEvent, y,
|
|
121
|
+
const E = (l = n.name) == null ? void 0 : l.toLowerCase().includes("asc"), _ = ((s = n.name) == null ? void 0 : s.toLowerCase().includes("desc")) ? "desc" : void 0, W = E ? "asc" : _, ee = n.name ? W : void 0;
|
|
122
|
+
Ue(e.event.syntheticEvent, y, ee);
|
|
123
123
|
}
|
|
124
124
|
break;
|
|
125
125
|
case "SelectRowCommand":
|
|
126
|
-
|
|
126
|
+
At(i);
|
|
127
127
|
break;
|
|
128
128
|
case "SelectAllRowsCommand":
|
|
129
|
-
|
|
129
|
+
Mt(i);
|
|
130
130
|
break;
|
|
131
131
|
case "ExportPDFCommand":
|
|
132
132
|
Se();
|
|
133
133
|
break;
|
|
134
134
|
case "ClearSelectionCommand":
|
|
135
|
-
|
|
135
|
+
Lt(i);
|
|
136
136
|
break;
|
|
137
137
|
case "ReorderRowCommand":
|
|
138
138
|
ie.current = e.dataItem, (u = n.name) != null && u.toLowerCase().includes("rowup") && a > 0 && oe(e.event.syntheticEvent, a - 1, "before"), (m = n.name) != null && m.toLowerCase().includes("rowdown") && a < r.length - 1 && oe(e.event.syntheticEvent, a + 1, "after"), (w = n.name) != null && w.toLowerCase().includes("rowtop") && oe(e.event.syntheticEvent, 0, "before"), (h = n.name) != null && h.toLowerCase().includes("rowbottom") && oe(e.event.syntheticEvent, r.length - 1, "after");
|
|
@@ -142,7 +142,7 @@ const cr = (t, x, b, z) => {
|
|
|
142
142
|
ze.copy,
|
|
143
143
|
e.event.nativeEvent,
|
|
144
144
|
{
|
|
145
|
-
copyHeaders: !((
|
|
145
|
+
copyHeaders: !((N = n.name) != null && N.toLowerCase().includes("noheaders"))
|
|
146
146
|
},
|
|
147
147
|
e.dataItem,
|
|
148
148
|
e.field
|
|
@@ -160,20 +160,20 @@ const cr = (t, x, b, z) => {
|
|
|
160
160
|
);
|
|
161
161
|
break;
|
|
162
162
|
case "PinTopCommand":
|
|
163
|
-
|
|
163
|
+
se("pinTop", e.dataItem);
|
|
164
164
|
break;
|
|
165
165
|
case "PinBottomCommand":
|
|
166
|
-
|
|
166
|
+
se("pinBottom", e.dataItem);
|
|
167
167
|
break;
|
|
168
168
|
case "UnpinCommand":
|
|
169
|
-
|
|
169
|
+
se("unpin", e.dataItem);
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
Oe();
|
|
173
173
|
}, de = () => {
|
|
174
174
|
const e = t.columnsRef.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
|
|
175
|
-
return
|
|
176
|
-
},
|
|
175
|
+
return Jn(e);
|
|
176
|
+
}, ft = (e, n, o) => {
|
|
177
177
|
if (t.gridProps.onContextMenu && x) {
|
|
178
178
|
const r = {
|
|
179
179
|
target: S.current,
|
|
@@ -184,27 +184,27 @@ const cr = (t, x, b, z) => {
|
|
|
184
184
|
};
|
|
185
185
|
f(t.gridProps.onContextMenu, r);
|
|
186
186
|
}
|
|
187
|
-
t.gridProps.contextMenu &&
|
|
187
|
+
t.gridProps.contextMenu && lt({
|
|
188
188
|
event: e,
|
|
189
189
|
dataItem: n,
|
|
190
190
|
field: o
|
|
191
191
|
});
|
|
192
|
-
},
|
|
192
|
+
}, mt = (e) => {
|
|
193
193
|
var a, d;
|
|
194
194
|
if (e.target !== e.currentTarget)
|
|
195
195
|
return;
|
|
196
|
-
clearTimeout(Fe.current), C.current && (C.current.table =
|
|
196
|
+
clearTimeout(Fe.current), C.current && (C.current.table = j.current);
|
|
197
197
|
const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
|
|
198
198
|
t.gridProps.columnVirtualization && (!K || o === Ae.current) && (Fe.current = window.setTimeout(() => {
|
|
199
|
-
|
|
200
|
-
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n),
|
|
199
|
+
Y();
|
|
200
|
+
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), $.current && $.current.setScrollLeft(n), q.current && q.current.setScrollLeft(n), A != null && A.current && A.current.setScrollLeft(n), F != null && F.current && F.current.setScrollLeft(n), L != null && L.current && L.current.setScrollLeft(n), B != null && B.current && B.current.setScrollLeft(n);
|
|
201
201
|
const r = (a = t.gridProps.virtualSkipRef) == null ? void 0 : a.current;
|
|
202
202
|
C.current && o !== Ae.current && C.current.scrollHandler(e);
|
|
203
203
|
const i = K && ((d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current) !== r;
|
|
204
204
|
t.gridProps.onScroll && x && f(t.gridProps.onScroll, {
|
|
205
205
|
...I(e)
|
|
206
206
|
}), Ae.current = o, i || nt();
|
|
207
|
-
},
|
|
207
|
+
}, Pt = (e) => {
|
|
208
208
|
var o, r;
|
|
209
209
|
const n = e.target;
|
|
210
210
|
if ((e.keyCode === 38 || e.keyCode === 40) && n.closest(".k-grid-sticky-container")) {
|
|
@@ -218,7 +218,7 @@ const cr = (t, x, b, z) => {
|
|
|
218
218
|
}, e.preventDefault(), e.stopPropagation(), Pe({ rowIndex: i }), !0;
|
|
219
219
|
}
|
|
220
220
|
return !1;
|
|
221
|
-
},
|
|
221
|
+
}, ht = () => {
|
|
222
222
|
var a;
|
|
223
223
|
if (!Ce.current || !M.current)
|
|
224
224
|
return;
|
|
@@ -234,19 +234,19 @@ const cr = (t, x, b, z) => {
|
|
|
234
234
|
cancelable: !0
|
|
235
235
|
})
|
|
236
236
|
);
|
|
237
|
-
},
|
|
238
|
-
if (
|
|
237
|
+
}, Rt = (e) => {
|
|
238
|
+
if (Pt(e))
|
|
239
239
|
return;
|
|
240
|
-
|
|
240
|
+
ne.onKeyDown(e, {
|
|
241
241
|
navigatable: t.gridProps.navigatable || !1,
|
|
242
|
-
contextStateRef:
|
|
243
|
-
navigationStateRef:
|
|
244
|
-
onNavigationAction:
|
|
242
|
+
contextStateRef: V,
|
|
243
|
+
navigationStateRef: Q,
|
|
244
|
+
onNavigationAction: vt,
|
|
245
245
|
columns: de()
|
|
246
|
-
}),
|
|
247
|
-
document:
|
|
248
|
-
contextStateRef:
|
|
249
|
-
navigationStateRef:
|
|
246
|
+
}), ne.onGetSnapshotBeforeUpdate({
|
|
247
|
+
document: p(),
|
|
248
|
+
contextStateRef: V,
|
|
249
|
+
navigationStateRef: Q
|
|
250
250
|
});
|
|
251
251
|
const n = {
|
|
252
252
|
dataItems: D(),
|
|
@@ -257,14 +257,14 @@ const cr = (t, x, b, z) => {
|
|
|
257
257
|
...I(e)
|
|
258
258
|
};
|
|
259
259
|
t.gridProps.onKeyDown && x && f(t.gridProps.onKeyDown, n);
|
|
260
|
-
},
|
|
261
|
-
|
|
260
|
+
}, bt = (e) => {
|
|
261
|
+
ne.onFocus(e, {
|
|
262
262
|
navigatable: !!t.gridProps.navigatable,
|
|
263
|
-
contextStateRef:
|
|
263
|
+
contextStateRef: V
|
|
264
264
|
});
|
|
265
|
-
},
|
|
265
|
+
}, vt = (e) => {
|
|
266
266
|
const { columnsRef: n } = t;
|
|
267
|
-
if (e.action === "moveToNextPage" &&
|
|
267
|
+
if (e.action === "moveToNextPage" && zt(e.event), e.action === "moveToPrevPage" && Ot(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
|
|
268
268
|
const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
|
|
269
269
|
if (!n[o].reorderable)
|
|
270
270
|
return;
|
|
@@ -279,44 +279,44 @@ const cr = (t, x, b, z) => {
|
|
|
279
279
|
ue(o, o - 1, e.event);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
if (e.action === "select" &&
|
|
282
|
+
if (e.action === "select" && Gt(e.event), t.gridProps.onNavigationAction && x) {
|
|
283
283
|
const o = {
|
|
284
284
|
focusElement: e.focusElement,
|
|
285
285
|
...I(e.event)
|
|
286
286
|
};
|
|
287
287
|
f(t.gridProps.onNavigationAction, o);
|
|
288
288
|
}
|
|
289
|
-
},
|
|
289
|
+
}, Ct = (e, n) => {
|
|
290
290
|
t.gridProps.onRowClick && ye(e.target, "TD") && f(t.gridProps.onRowClick, {
|
|
291
291
|
dataItem: n,
|
|
292
292
|
...I(e)
|
|
293
293
|
});
|
|
294
|
-
},
|
|
294
|
+
}, It = (e, n) => {
|
|
295
295
|
t.gridProps.onRowDoubleClick && ye(e.target, "TD") && f(t.gridProps.onRowDoubleClick, {
|
|
296
296
|
dataItem: n,
|
|
297
297
|
...I(e)
|
|
298
298
|
});
|
|
299
|
-
},
|
|
299
|
+
}, wt = (e) => {
|
|
300
300
|
t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
|
|
301
301
|
...I(e.syntheticEvent),
|
|
302
302
|
dataItem: e.dataItem,
|
|
303
303
|
field: void 0,
|
|
304
304
|
value: void 0
|
|
305
305
|
});
|
|
306
|
-
},
|
|
306
|
+
}, yt = (e) => {
|
|
307
307
|
t.gridProps.onItemChange && t.gridProps.onEditChange && f(t.gridProps.onEditChange, {
|
|
308
308
|
edit: {},
|
|
309
309
|
...I(e.syntheticEvent)
|
|
310
310
|
});
|
|
311
|
-
},
|
|
311
|
+
}, Et = (e, n, o) => {
|
|
312
312
|
var r, i;
|
|
313
313
|
if (ot.enabled && ot.mode === "incell" && t.gridProps.dataItemKey) {
|
|
314
314
|
if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
|
|
315
315
|
const d = !!((i = (r = e.target).closest) != null && i.call(r, ".k-grid-pinned-container"));
|
|
316
316
|
t.gridProps.editZoneRef.current = d ? "pinned" : "body";
|
|
317
317
|
}
|
|
318
|
-
const a =
|
|
319
|
-
type:
|
|
318
|
+
const a = Wn(t.gridProps.edit, {
|
|
319
|
+
type: zn.ENTER_FIELD_EDIT,
|
|
320
320
|
payload: { id: n[t.gridProps.dataItemKey], field: o }
|
|
321
321
|
});
|
|
322
322
|
t.gridProps.onEditChange && f(t.gridProps.onEditChange, {
|
|
@@ -324,29 +324,29 @@ const cr = (t, x, b, z) => {
|
|
|
324
324
|
...I(e)
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
-
},
|
|
327
|
+
}, xt = (e, n) => {
|
|
328
328
|
var r;
|
|
329
|
-
if (
|
|
330
|
-
const i =
|
|
329
|
+
if (Ln(t.detailExpandable).enabled) {
|
|
330
|
+
const i = Bn((r = t.gridProps.detailExpand) != null ? r : {}, e);
|
|
331
331
|
t.gridProps.onDetailExpandChange && f(t.gridProps.onDetailExpandChange, {
|
|
332
332
|
...I(n),
|
|
333
333
|
detailExpand: i
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
|
-
},
|
|
336
|
+
}, St = (e, n) => {
|
|
337
337
|
var r;
|
|
338
|
-
const o =
|
|
338
|
+
const o = An(
|
|
339
339
|
typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
|
|
340
340
|
);
|
|
341
341
|
if (o.enabled) {
|
|
342
|
-
const i =
|
|
342
|
+
const i = Fn((r = t.gridProps.groupExpand) != null ? r : [], e, o);
|
|
343
343
|
t.gridProps.onGroupExpandChange && f(t.gridProps.onGroupExpandChange, {
|
|
344
344
|
...I(n),
|
|
345
345
|
groupExpand: i
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
-
|
|
349
|
-
},
|
|
348
|
+
hn(e.group);
|
|
349
|
+
}, kt = c.useCallback(
|
|
350
350
|
(e) => {
|
|
351
351
|
const { dataItemKey: n = "", pinnedTopRows: o = [], pinnedBottomRows: r = [] } = t.gridProps;
|
|
352
352
|
if (!n || !e)
|
|
@@ -355,32 +355,32 @@ const cr = (t, x, b, z) => {
|
|
|
355
355
|
return o != null && o.some((a) => a[n] === i) ? "top" : r != null && r.some((a) => a[n] === i) ? "bottom" : "none";
|
|
356
356
|
},
|
|
357
357
|
[t.gridProps.pinnedTopRows, t.gridProps.pinnedBottomRows, t.gridProps.dataItemKey]
|
|
358
|
-
),
|
|
358
|
+
), se = (e, n) => {
|
|
359
359
|
if (!t.gridProps.pinnable)
|
|
360
360
|
return;
|
|
361
|
-
const { dataItemKey: o = "", pinnedTopRows: r = [], pinnedBottomRows: i = [] } = t.gridProps, a = n[o], d = r.filter((u) => u[o] !== a),
|
|
362
|
-
let
|
|
361
|
+
const { dataItemKey: o = "", pinnedTopRows: r = [], pinnedBottomRows: i = [] } = t.gridProps, a = n[o], d = r.filter((u) => u[o] !== a), l = i.filter((u) => u[o] !== a);
|
|
362
|
+
let s;
|
|
363
363
|
switch (e) {
|
|
364
364
|
case "pinTop":
|
|
365
|
-
|
|
365
|
+
s = { pinnedTopRows: [...d, n], pinnedBottomRows: l, dataItem: n };
|
|
366
366
|
break;
|
|
367
367
|
case "pinBottom":
|
|
368
|
-
|
|
368
|
+
s = { pinnedTopRows: d, pinnedBottomRows: [...l, n], dataItem: n };
|
|
369
369
|
break;
|
|
370
370
|
case "unpin":
|
|
371
|
-
|
|
371
|
+
s = { pinnedTopRows: d, pinnedBottomRows: l, dataItem: n };
|
|
372
372
|
break;
|
|
373
373
|
default:
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
|
-
t.gridProps.onRowPinChange && f(t.gridProps.onRowPinChange,
|
|
376
|
+
t.gridProps.onRowPinChange && f(t.gridProps.onRowPinChange, s);
|
|
377
377
|
}, Ue = (e, n, o) => {
|
|
378
|
-
const { allowUnsort: r, mode: i } =
|
|
378
|
+
const { allowUnsort: r, mode: i } = nr(
|
|
379
379
|
t.gridProps.sortable || !1,
|
|
380
380
|
n.sortable || !1
|
|
381
|
-
), a = (t.gridProps.sort || []).filter((
|
|
382
|
-
d !== "" && n.field &&
|
|
383
|
-
},
|
|
381
|
+
), a = (t.gridProps.sort || []).filter((s) => s.field === n.field)[0], d = o || rr[r][a && a.dir || ""], l = i === "single" ? [] : (t.gridProps.sort || []).filter((s) => s.field !== n.field);
|
|
382
|
+
d !== "" && n.field && l.push({ field: n.field, dir: d }), je(l, e);
|
|
383
|
+
}, Dt = (e) => {
|
|
384
384
|
t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
|
|
385
385
|
...I(e.syntheticEvent),
|
|
386
386
|
dataItem: e.dataItem,
|
|
@@ -388,7 +388,7 @@ const cr = (t, x, b, z) => {
|
|
|
388
388
|
field: e.field,
|
|
389
389
|
value: e.value
|
|
390
390
|
});
|
|
391
|
-
},
|
|
391
|
+
}, Kt = (e) => {
|
|
392
392
|
var n;
|
|
393
393
|
if (t.gridProps.onSelectionChange && v.enabled) {
|
|
394
394
|
const { event: o, dataItem: r, dataIndex: i, columnIndex: a } = e, d = {
|
|
@@ -418,8 +418,8 @@ const cr = (t, x, b, z) => {
|
|
|
418
418
|
}) : {}
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
|
-
},
|
|
422
|
-
var
|
|
421
|
+
}, Gt = (e) => {
|
|
422
|
+
var s, u;
|
|
423
423
|
if (!v.enabled || !t.gridProps.dataItemKey)
|
|
424
424
|
return;
|
|
425
425
|
const n = {
|
|
@@ -429,25 +429,25 @@ const cr = (t, x, b, z) => {
|
|
|
429
429
|
componentId: t.id,
|
|
430
430
|
selectedField: "",
|
|
431
431
|
...I(e)
|
|
432
|
-
}, o =
|
|
432
|
+
}, o = On({
|
|
433
433
|
event: n,
|
|
434
|
-
selectedState: (
|
|
434
|
+
selectedState: (s = t.gridProps.select) != null ? s : {},
|
|
435
435
|
dataItemKey: t.gridProps.dataItemKey
|
|
436
436
|
});
|
|
437
437
|
if (o === t.gridProps.select)
|
|
438
438
|
return;
|
|
439
|
-
const r = e.target, i = ye(r, "TD"), a = ye(r, "TR"), d =
|
|
440
|
-
if (d !== void 0 &&
|
|
441
|
-
const m = (u =
|
|
439
|
+
const r = e.target, i = ye(r, "TD"), a = ye(r, "TR"), d = pn(i), l = Nn(a);
|
|
440
|
+
if (d !== void 0 && l !== void 0) {
|
|
441
|
+
const m = (u = Yn(t.gridProps.data)) == null ? void 0 : u[l];
|
|
442
442
|
t.gridProps.onSelectionChange && f(t.gridProps.onSelectionChange, {
|
|
443
443
|
...n,
|
|
444
444
|
select: o,
|
|
445
445
|
dataItem: m,
|
|
446
|
-
startRowIndex:
|
|
446
|
+
startRowIndex: l,
|
|
447
447
|
startColIndex: d,
|
|
448
448
|
startDataItem: m,
|
|
449
449
|
endDataItem: m,
|
|
450
|
-
endRowIndex:
|
|
450
|
+
endRowIndex: l,
|
|
451
451
|
endColIndex: d,
|
|
452
452
|
ctrlKey: e.ctrlKey,
|
|
453
453
|
altKey: e.altKey,
|
|
@@ -456,11 +456,11 @@ const cr = (t, x, b, z) => {
|
|
|
456
456
|
isDrag: !1
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, Tt = (e) => {
|
|
460
460
|
if (t.gridProps.onHeaderSelectionChange && v.enabled) {
|
|
461
461
|
const n = D();
|
|
462
462
|
f(t.gridProps.onHeaderSelectionChange, {
|
|
463
|
-
select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey &&
|
|
463
|
+
select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey && te(t.gridProps.dataItemKey)(r) !== void 0 && (o[te(t.gridProps.dataItemKey)(r)] = !0), o), {}) : {},
|
|
464
464
|
field: e.field,
|
|
465
465
|
nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
|
|
466
466
|
syntheticEvent: e.syntheticEvent,
|
|
@@ -468,16 +468,16 @@ const cr = (t, x, b, z) => {
|
|
|
468
468
|
dataItems: n
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
|
-
},
|
|
471
|
+
}, J = (e, n) => {
|
|
472
472
|
t.gridProps.onSelectionChange && v.enabled && f(t.gridProps.onSelectionChange, {
|
|
473
473
|
...e,
|
|
474
474
|
select: n
|
|
475
475
|
});
|
|
476
|
-
},
|
|
476
|
+
}, Ht = (e, n) => {
|
|
477
477
|
const o = t.gridProps.dataItemKey;
|
|
478
478
|
if (!o || !n)
|
|
479
479
|
return;
|
|
480
|
-
const r =
|
|
480
|
+
const r = te(o), i = D().findIndex((a) => r(a) === r(n));
|
|
481
481
|
i !== -1 && Ve({
|
|
482
482
|
...e,
|
|
483
483
|
startRowIndex: i,
|
|
@@ -501,9 +501,9 @@ const cr = (t, x, b, z) => {
|
|
|
501
501
|
selectedState: (n = t.gridProps.select) != null ? n : {},
|
|
502
502
|
dataItemKey: t.gridProps.dataItemKey
|
|
503
503
|
});
|
|
504
|
-
|
|
504
|
+
J(a, d);
|
|
505
505
|
}
|
|
506
|
-
},
|
|
506
|
+
}, Mt = (e) => {
|
|
507
507
|
if (t.gridProps.onSelectionChange && v.enabled) {
|
|
508
508
|
const n = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], r = {}, i = {
|
|
509
509
|
...e,
|
|
@@ -515,15 +515,15 @@ const cr = (t, x, b, z) => {
|
|
|
515
515
|
endColIndex: t.columnsRef.length - 1
|
|
516
516
|
};
|
|
517
517
|
e.dataItems.forEach((a) => {
|
|
518
|
-
const
|
|
519
|
-
r[
|
|
520
|
-
}),
|
|
518
|
+
const l = te(t.gridProps.dataItemKey)(a);
|
|
519
|
+
r[l] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
|
|
520
|
+
}), J(i, r);
|
|
521
521
|
}
|
|
522
|
-
},
|
|
522
|
+
}, At = (e) => {
|
|
523
523
|
if (t.gridProps.onSelectionChange && v.enabled) {
|
|
524
|
-
const o =
|
|
524
|
+
const o = te(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
|
|
525
525
|
(m) => m[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
|
|
526
|
-
),
|
|
526
|
+
), s = {
|
|
527
527
|
...e,
|
|
528
528
|
startDataItem: a,
|
|
529
529
|
endDataItem: a,
|
|
@@ -532,9 +532,9 @@ const cr = (t, x, b, z) => {
|
|
|
532
532
|
startColIndex: r,
|
|
533
533
|
endColIndex: i
|
|
534
534
|
}, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
|
|
535
|
-
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,
|
|
535
|
+
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, J(s, u);
|
|
536
536
|
}
|
|
537
|
-
},
|
|
537
|
+
}, Ft = (e) => {
|
|
538
538
|
if (!v.enabled)
|
|
539
539
|
return;
|
|
540
540
|
const n = D(), o = {
|
|
@@ -563,10 +563,10 @@ const cr = (t, x, b, z) => {
|
|
|
563
563
|
startColIndex: -1,
|
|
564
564
|
endColIndex: -1
|
|
565
565
|
};
|
|
566
|
-
|
|
566
|
+
J(m, {});
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
|
-
const r =
|
|
569
|
+
const r = st(
|
|
570
570
|
t.gridProps.data,
|
|
571
571
|
e,
|
|
572
572
|
t.columnsRef,
|
|
@@ -575,12 +575,12 @@ const cr = (t, x, b, z) => {
|
|
|
575
575
|
Object.keys(r).forEach((m) => {
|
|
576
576
|
r[m] && (i[m] = v.cell ? [...Array(t.columnsRef.length).keys()] : !0);
|
|
577
577
|
});
|
|
578
|
-
let a = -1, d = -1,
|
|
578
|
+
let a = -1, d = -1, l = n[0] || null, s = n[n.length - 1] || null;
|
|
579
579
|
if (t.gridProps.dataItemKey) {
|
|
580
|
-
const m =
|
|
580
|
+
const m = te(t.gridProps.dataItemKey);
|
|
581
581
|
for (let w = 0; w < n.length; w++) {
|
|
582
582
|
const h = m(n[w]);
|
|
583
|
-
h !== void 0 && r[h] && (a === -1 && (a = w,
|
|
583
|
+
h !== void 0 && r[h] && (a === -1 && (a = w, l = n[w]), d = w, s = n[w]);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
const u = {
|
|
@@ -589,73 +589,76 @@ const cr = (t, x, b, z) => {
|
|
|
589
589
|
endRowIndex: d,
|
|
590
590
|
startColIndex: 0,
|
|
591
591
|
endColIndex: t.columnsRef.length - 1,
|
|
592
|
-
startDataItem:
|
|
593
|
-
endDataItem:
|
|
592
|
+
startDataItem: l,
|
|
593
|
+
endDataItem: s
|
|
594
594
|
};
|
|
595
|
-
|
|
596
|
-
},
|
|
597
|
-
t.gridProps.onSelectionChange && v.enabled &&
|
|
598
|
-
},
|
|
599
|
-
|
|
595
|
+
J(u, i);
|
|
596
|
+
}, Lt = (e) => {
|
|
597
|
+
t.gridProps.onSelectionChange && v.enabled && J(e, {});
|
|
598
|
+
}, X = (e, n, o, r, i) => {
|
|
599
|
+
Wt();
|
|
600
600
|
const a = t.gridProps.onDataStateChange;
|
|
601
601
|
if (e) {
|
|
602
602
|
const d = { ...I(r), ...n, targetEvent: i };
|
|
603
603
|
f(e, d);
|
|
604
|
-
} else a &&
|
|
604
|
+
} else a && (O.current = {
|
|
605
|
+
...O.current,
|
|
606
|
+
...o
|
|
607
|
+
}, f(a, {
|
|
605
608
|
...I(r),
|
|
606
609
|
targetEvent: i || {},
|
|
607
610
|
dataState: {
|
|
608
|
-
...
|
|
609
|
-
...
|
|
611
|
+
...Yt(),
|
|
612
|
+
...O.current
|
|
610
613
|
}
|
|
611
|
-
});
|
|
612
|
-
},
|
|
614
|
+
}));
|
|
615
|
+
}, le = (e, n, o) => {
|
|
613
616
|
var r;
|
|
614
|
-
K && t.gridProps.pageable && ((r = C.current) == null || r.reset()),
|
|
617
|
+
K && t.gridProps.pageable && ((r = C.current) == null || r.reset()), X(
|
|
615
618
|
t.gridProps.onPageChange,
|
|
616
619
|
{ page: e },
|
|
617
620
|
{ skip: e.skip, take: e.take },
|
|
618
621
|
n,
|
|
619
622
|
o
|
|
620
623
|
);
|
|
621
|
-
},
|
|
624
|
+
}, Bt = (e, n, o) => {
|
|
622
625
|
var r;
|
|
623
|
-
t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip,
|
|
626
|
+
t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, Y()) : le(e, n, o);
|
|
624
627
|
}, xe = () => {
|
|
625
628
|
let e = t.gridProps.total || 0;
|
|
626
629
|
return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
|
|
627
|
-
},
|
|
630
|
+
}, Wt = () => {
|
|
628
631
|
K && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
|
|
629
|
-
},
|
|
632
|
+
}, zt = (e) => {
|
|
630
633
|
var i, a;
|
|
631
634
|
const n = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + n, r = xe();
|
|
632
|
-
o < r &&
|
|
633
|
-
},
|
|
635
|
+
o < r && le({ skip: o, take: n }, e);
|
|
636
|
+
}, Ot = (e) => {
|
|
634
637
|
var r, i;
|
|
635
638
|
const n = (i = (r = t.gridProps.take) != null ? r : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - n;
|
|
636
|
-
o >= 0 &&
|
|
637
|
-
},
|
|
638
|
-
|
|
639
|
+
o >= 0 && le({ skip: o, take: n }, e);
|
|
640
|
+
}, pt = (e) => {
|
|
641
|
+
le({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
|
|
639
642
|
}, je = (e, n) => {
|
|
640
|
-
|
|
643
|
+
X(
|
|
641
644
|
t.gridProps.onSortChange,
|
|
642
645
|
{ sort: e },
|
|
643
646
|
{ sort: e, ...K && !t.gridProps.pageable ? { skip: 0 } : {} },
|
|
644
647
|
n
|
|
645
648
|
);
|
|
646
|
-
},
|
|
647
|
-
|
|
649
|
+
}, Nt = (e, n) => {
|
|
650
|
+
X(
|
|
648
651
|
t.gridProps.onFilterChange,
|
|
649
652
|
{ filter: e },
|
|
650
653
|
{ filter: e, skip: 0 },
|
|
651
654
|
n
|
|
652
655
|
);
|
|
653
|
-
},
|
|
656
|
+
}, Ut = (e) => {
|
|
654
657
|
if (!e || e.length === 0) {
|
|
655
658
|
qe({});
|
|
656
659
|
return;
|
|
657
660
|
}
|
|
658
|
-
const n =
|
|
661
|
+
const n = st(
|
|
659
662
|
t.gridProps.data,
|
|
660
663
|
e,
|
|
661
664
|
t.columnsRef,
|
|
@@ -663,13 +666,13 @@ const cr = (t, x, b, z) => {
|
|
|
663
666
|
);
|
|
664
667
|
qe({ ...n });
|
|
665
668
|
}, qe = (e) => {
|
|
666
|
-
|
|
669
|
+
X(
|
|
667
670
|
t.gridProps.onHighlightChange,
|
|
668
671
|
{ highlight: e },
|
|
669
672
|
{},
|
|
670
673
|
{}
|
|
671
674
|
);
|
|
672
|
-
},
|
|
675
|
+
}, Vt = (e) => {
|
|
673
676
|
const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
|
|
674
677
|
logic: "or",
|
|
675
678
|
filters: n.filter((i) => i !== void 0).map((i) => {
|
|
@@ -682,7 +685,7 @@ const cr = (t, x, b, z) => {
|
|
|
682
685
|
};
|
|
683
686
|
})
|
|
684
687
|
};
|
|
685
|
-
|
|
688
|
+
X(
|
|
686
689
|
t.gridProps.onSearchChange,
|
|
687
690
|
{
|
|
688
691
|
search: r
|
|
@@ -692,23 +695,23 @@ const cr = (t, x, b, z) => {
|
|
|
692
695
|
);
|
|
693
696
|
}, Se = () => {
|
|
694
697
|
var e;
|
|
695
|
-
(e =
|
|
698
|
+
(e = Z.current) == null || e.save();
|
|
696
699
|
}, $e = async () => {
|
|
697
700
|
var e;
|
|
698
701
|
await ((e = k.current) == null ? void 0 : e.save());
|
|
699
702
|
}, _e = () => {
|
|
700
703
|
var e;
|
|
701
704
|
return ((e = k.current) == null ? void 0 : e.getBlob()) || null;
|
|
702
|
-
},
|
|
705
|
+
}, jt = async (e) => {
|
|
703
706
|
var n, o;
|
|
704
707
|
(n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
|
|
705
|
-
},
|
|
708
|
+
}, qt = (e) => {
|
|
706
709
|
var n, o;
|
|
707
710
|
return (n = t.gridProps) != null && n.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
|
|
708
711
|
}, ke = (e, n) => {
|
|
709
712
|
const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
|
|
710
713
|
let r = {};
|
|
711
|
-
t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Te.current = !0),
|
|
714
|
+
t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Te.current = !0), X(
|
|
712
715
|
t.gridProps.onGroupChange,
|
|
713
716
|
{ group: e },
|
|
714
717
|
{ group: e, skip: 0, ...r },
|
|
@@ -723,21 +726,21 @@ const cr = (t, x, b, z) => {
|
|
|
723
726
|
f(t.gridProps.onColumnsStateChange, n);
|
|
724
727
|
}
|
|
725
728
|
}, ue = (e, n, o) => {
|
|
726
|
-
const { columnsRef: r, columnsState: i } = t, a = r[e], d =
|
|
729
|
+
const { columnsRef: r, columnsState: i } = t, a = r[e], d = Xn(i), l = a.depth, s = (h) => {
|
|
727
730
|
do
|
|
728
731
|
h++;
|
|
729
|
-
while (h < r.length && r[h].depth >
|
|
732
|
+
while (h < r.length && r[h].depth > l);
|
|
730
733
|
return h;
|
|
731
|
-
}, u = r.splice(e,
|
|
732
|
-
r.splice(e < n ?
|
|
733
|
-
h.orderIndex =
|
|
734
|
+
}, u = r.splice(e, s(e) - e);
|
|
735
|
+
r.splice(e < n ? s(n - u.length) : n, 0, ...u), r.filter((h) => h.declarationIndex >= 0).forEach((h, N) => {
|
|
736
|
+
h.orderIndex = N;
|
|
734
737
|
const g = d.find((E) => E.id === h.id);
|
|
735
|
-
g && (g.orderIndex =
|
|
738
|
+
g && (g.orderIndex = N);
|
|
736
739
|
});
|
|
737
740
|
const m = r[e].locked && r[n].locked;
|
|
738
|
-
|
|
741
|
+
Hn(t.columnsMapRef, r, m || be.current), Mn(t.columnsMapRef, r, m || be.current), Ge.current && (be.current = !1, Ge.current = !1);
|
|
739
742
|
const w = de();
|
|
740
|
-
if (
|
|
743
|
+
if (Y(), t.gridProps.onColumnReorder) {
|
|
741
744
|
const h = {
|
|
742
745
|
target: S.current,
|
|
743
746
|
columns: w,
|
|
@@ -760,7 +763,7 @@ const cr = (t, x, b, z) => {
|
|
|
760
763
|
dragEvent: e,
|
|
761
764
|
target: S.current
|
|
762
765
|
}), ie.current = null;
|
|
763
|
-
},
|
|
766
|
+
}, $t = (e, n, o) => {
|
|
764
767
|
if (t.gridProps.group === void 0)
|
|
765
768
|
return;
|
|
766
769
|
const r = t.gridProps.group.slice();
|
|
@@ -771,43 +774,43 @@ const cr = (t, x, b, z) => {
|
|
|
771
774
|
return;
|
|
772
775
|
const i = (t.gridProps.group || []).slice();
|
|
773
776
|
i.splice(n, 0, { field: r }), ke(i, o);
|
|
774
|
-
},
|
|
775
|
-
const o =
|
|
777
|
+
}, _t = (e, n) => {
|
|
778
|
+
const o = U.current.getCurrentGroupsLength;
|
|
776
779
|
Ze(e, o, n);
|
|
777
780
|
}, Ke = () => {
|
|
778
|
-
var e, n, o, r, i, a, d,
|
|
781
|
+
var e, n, o, r, i, a, d, l, s, u, m, w, h, N;
|
|
779
782
|
if (t.gridProps.dataLayoutMode === "stacked") {
|
|
780
783
|
const g = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0;
|
|
781
784
|
if ((n = P.current) != null && n.colGroupMain && g) {
|
|
782
785
|
const E = P.current.colGroupMain.children, R = E.length - 1;
|
|
783
786
|
if (R >= 0) {
|
|
784
|
-
let
|
|
785
|
-
for (let
|
|
786
|
-
const
|
|
787
|
-
|
|
787
|
+
let _ = 0;
|
|
788
|
+
for (let ee = 0; ee < R; ee++) {
|
|
789
|
+
const In = parseFloat((E[ee].width || 0).toString()) || E[ee].clientWidth;
|
|
790
|
+
_ += In;
|
|
788
791
|
}
|
|
789
|
-
const W = Math.max(0, g -
|
|
790
|
-
E[R].width = W + "px", (r = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && r[R] && (P.current.colGroupHeader.children[R].width = W + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[R] && (P.current.colGroupFooter.children[R].width = W + "px"), (
|
|
792
|
+
const W = Math.max(0, g - _);
|
|
793
|
+
E[R].width = W + "px", (r = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && r[R] && (P.current.colGroupHeader.children[R].width = W + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[R] && (P.current.colGroupFooter.children[R].width = W + "px"), (l = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && l[R] && (P.current.colGroupStickyHeader.children[R].width = W + "px"), (u = (s = P.current.colGroupStickyFooter) == null ? void 0 : s.children) != null && u[R] && (P.current.colGroupStickyFooter.children[R].width = W + "px"), (w = (m = P.current.colGroupPinnedTop) == null ? void 0 : m.children) != null && w[R] && (P.current.colGroupPinnedTop.children[R].width = W + "px"), (N = (h = P.current.colGroupPinnedBottom) == null ? void 0 : h.children) != null && N[R] && (P.current.colGroupPinnedBottom.children[R].width = W + "px");
|
|
791
794
|
}
|
|
792
795
|
}
|
|
793
|
-
|
|
796
|
+
$.current && $.current.setWidth(g), q.current && q.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), B.current && B.current.setWidth(g), j.current && (j.current.style.width = g ? g + "px" : "");
|
|
794
797
|
} else {
|
|
795
798
|
let g = 0;
|
|
796
799
|
if (!P.current.colGroupMain)
|
|
797
800
|
return;
|
|
798
801
|
const E = P.current.colGroupMain.children;
|
|
799
802
|
for (let R = 0; R < E.length; R++) {
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
803
|
+
const _ = E[R].width;
|
|
804
|
+
if (!_) {
|
|
802
805
|
g = 0;
|
|
803
806
|
break;
|
|
804
807
|
}
|
|
805
|
-
g += parseFloat(
|
|
808
|
+
g += parseFloat(_.toString());
|
|
806
809
|
}
|
|
807
|
-
g = Math.round(g),
|
|
810
|
+
g = Math.round(g), $.current && $.current.setWidth(g), q.current && q.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), B.current && B.current.setWidth(g), j.current && (j.current.style.width = g ? g + "px" : "");
|
|
808
811
|
}
|
|
809
|
-
Ie.current &&
|
|
810
|
-
},
|
|
812
|
+
Ie.current && Zt();
|
|
813
|
+
}, Zt = () => {
|
|
811
814
|
const e = H.current, n = e ? e.scrollWidth > e.clientWidth : !1;
|
|
812
815
|
Ie.current && (Ie.current.style.marginBlockEnd = n ? "var(--kendo-scrollbar-width, 0px)" : "");
|
|
813
816
|
}, Je = () => {
|
|
@@ -816,16 +819,16 @@ const cr = (t, x, b, z) => {
|
|
|
816
819
|
}, ge = () => {
|
|
817
820
|
var e;
|
|
818
821
|
t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = H.current) == null ? void 0 : e.offsetHeight) || 0);
|
|
819
|
-
},
|
|
822
|
+
}, Jt = () => {
|
|
820
823
|
const e = t.gridProps.minRowHeightRef;
|
|
821
824
|
if (e && !e.current && !t.gridProps.rowHeight) {
|
|
822
|
-
const n =
|
|
823
|
-
n && (e.current = n,
|
|
825
|
+
const n = Zn(T.current);
|
|
826
|
+
n && (e.current = n, Y());
|
|
824
827
|
}
|
|
825
828
|
}, fe = c.useCallback(
|
|
826
829
|
(e, n, o, r, i) => {
|
|
827
|
-
var
|
|
828
|
-
if (!
|
|
830
|
+
var s;
|
|
831
|
+
if (!Xt() && !o || !e)
|
|
829
832
|
return;
|
|
830
833
|
const a = {
|
|
831
834
|
type: e,
|
|
@@ -836,15 +839,15 @@ const cr = (t, x, b, z) => {
|
|
|
836
839
|
field: i,
|
|
837
840
|
...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
|
|
838
841
|
...o
|
|
839
|
-
}, d = D(),
|
|
842
|
+
}, d = D(), l = Dn({
|
|
840
843
|
event: a,
|
|
841
844
|
data: d,
|
|
842
|
-
selectedState: (
|
|
845
|
+
selectedState: (s = t.gridProps.select) != null ? s : {},
|
|
843
846
|
previousCopiedItems: tt.current
|
|
844
847
|
});
|
|
845
|
-
e !== ze.paste && (tt.current =
|
|
848
|
+
e !== ze.paste && (tt.current = l.copiedItems), t.gridProps.onClipboard && x && f(t.gridProps.onClipboard, {
|
|
846
849
|
...a,
|
|
847
|
-
...
|
|
850
|
+
...l
|
|
848
851
|
});
|
|
849
852
|
},
|
|
850
853
|
[
|
|
@@ -854,11 +857,11 @@ const cr = (t, x, b, z) => {
|
|
|
854
857
|
t.gridProps.clipboard,
|
|
855
858
|
t.gridProps.onClipboard
|
|
856
859
|
]
|
|
857
|
-
),
|
|
860
|
+
), Xt = () => {
|
|
858
861
|
var i, a, d;
|
|
859
862
|
if (!ae)
|
|
860
863
|
return !1;
|
|
861
|
-
const e =
|
|
864
|
+
const e = yn(p()), n = e ? e.matches(".k-table-td") ? e : (i = p()) == null ? void 0 : i.body : (a = p()) == null ? void 0 : a.body, o = n.closest(".k-grid-container"), r = n && ((d = M.current) == null ? void 0 : d.contains(n));
|
|
862
865
|
return !!(n && r && o);
|
|
863
866
|
}, Xe = (e, n, o, r, i, a, d) => {
|
|
864
867
|
Ke(), be.current = !0, Ge.current = !0, t.gridProps.onColumnResize && x && f(t.gridProps.onColumnResize, {
|
|
@@ -871,7 +874,7 @@ const cr = (t, x, b, z) => {
|
|
|
871
874
|
end: i,
|
|
872
875
|
target: S.current
|
|
873
876
|
}), i && De(a);
|
|
874
|
-
},
|
|
877
|
+
}, Yt = () => {
|
|
875
878
|
var e;
|
|
876
879
|
return {
|
|
877
880
|
filter: t.gridProps.filter,
|
|
@@ -884,7 +887,7 @@ const cr = (t, x, b, z) => {
|
|
|
884
887
|
nativeEvent: e && e.nativeEvent,
|
|
885
888
|
syntheticEvent: e,
|
|
886
889
|
target: S.current
|
|
887
|
-
}),
|
|
890
|
+
}), Qt = (e) => ({
|
|
888
891
|
...e,
|
|
889
892
|
nativeEvent: void 0,
|
|
890
893
|
syntheticEvent: void 0,
|
|
@@ -896,8 +899,8 @@ const cr = (t, x, b, z) => {
|
|
|
896
899
|
e(n);
|
|
897
900
|
return;
|
|
898
901
|
}
|
|
899
|
-
e(
|
|
900
|
-
},
|
|
902
|
+
e(Qt(n));
|
|
903
|
+
}, en = () => {
|
|
901
904
|
var e, n, o;
|
|
902
905
|
if (T.current && ((e = T.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
|
|
903
906
|
Me.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? He.current = document.activeElement : He.current = void 0;
|
|
@@ -906,7 +909,7 @@ const cr = (t, x, b, z) => {
|
|
|
906
909
|
(i) => !Be.current.includes(i)
|
|
907
910
|
)[0] : r.length === 1 && (Re.current = r[0], Me.current = !0), Be.current = r;
|
|
908
911
|
}
|
|
909
|
-
}, D = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem),
|
|
912
|
+
}, D = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), p = () => {
|
|
910
913
|
var e;
|
|
911
914
|
if (ae)
|
|
912
915
|
return ((e = me()) == null ? void 0 : e.ownerDocument) || document;
|
|
@@ -926,12 +929,12 @@ const cr = (t, x, b, z) => {
|
|
|
926
929
|
}
|
|
927
930
|
},
|
|
928
931
|
[t.gridProps.scrollable]
|
|
929
|
-
), Ye = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))),
|
|
930
|
-
ve.current = window.innerWidth,
|
|
931
|
-
},
|
|
932
|
+
), Ye = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), tn = () => Ye(vn) === Ye(t.columnsRef), nn = () => {
|
|
933
|
+
ve.current = window.innerWidth, tn() || Y();
|
|
934
|
+
}, rn = () => {
|
|
932
935
|
var a;
|
|
933
936
|
const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = C.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
|
|
934
|
-
r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange =
|
|
937
|
+
r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = Bt, r.pageSize = n, r.scrollableVirtual = K, r.container = H.current, r.tableBody = T.current, r.scrollHeightContainer = et.current, r.table = j.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new Sn(e, i)));
|
|
935
938
|
}, Qe = c.useCallback(
|
|
936
939
|
(e) => {
|
|
937
940
|
const n = { rowIndex: Le.current };
|
|
@@ -940,25 +943,25 @@ const cr = (t, x, b, z) => {
|
|
|
940
943
|
});
|
|
941
944
|
},
|
|
942
945
|
[Pe]
|
|
943
|
-
),
|
|
946
|
+
), Y = () => {
|
|
944
947
|
t.gridProps.forceUpdate && t.gridProps.forceUpdate();
|
|
945
|
-
},
|
|
948
|
+
}, on = (e) => e.left !== void 0 ? We !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, S = c.useRef(null), C = c.useRef(void 0), P = c.useRef(void 0), U = c.useRef(void 0), V = c.useRef(void 0), Q = c.useRef(void 0), he = c.useRef(void 0), G = c.useRef(null), T = c.useRef(null), an = c.useRef(null), H = c.useRef(null), j = c.useRef(null), cn = c.useRef(null), M = c.useRef(null), et = c.useRef(null), q = c.useRef(null), $ = c.useRef(null), A = c.useRef(null), F = c.useRef(null), L = c.useRef(null), B = c.useRef(null), dn = c.useRef(null), sn = c.useRef(null), Ge = c.useRef(!1), Te = c.useRef(!1), Re = c.useRef(void 0), He = c.useRef(void 0), Me = c.useRef(!1), be = c.useRef(!0), Ae = c.useRef(0), Fe = c.useRef(void 0), Le = c.useRef(void 0), Be = c.useRef([]), tt = c.useRef([]), ve = c.useRef(0), Ce = c.useRef(
|
|
946
949
|
null
|
|
947
|
-
), ln = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders,
|
|
948
|
-
stickyHeaderItems:
|
|
949
|
-
stickyHeaderRef:
|
|
950
|
-
stickyFooterItems:
|
|
950
|
+
), ln = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, un = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, gn = !!((it = t.gridProps.group) != null && it.length), {
|
|
951
|
+
stickyHeaderItems: fn,
|
|
952
|
+
stickyHeaderRef: mn,
|
|
953
|
+
stickyFooterItems: Pn,
|
|
951
954
|
stickyFooterRef: Ie,
|
|
952
|
-
scrollToStickyGroup:
|
|
955
|
+
scrollToStickyGroup: hn,
|
|
953
956
|
update: nt
|
|
954
|
-
} =
|
|
957
|
+
} = jn({
|
|
955
958
|
enabled: ln,
|
|
956
|
-
enabledFooters:
|
|
959
|
+
enabledFooters: un,
|
|
957
960
|
flatData: t.dataRef,
|
|
958
961
|
containerRef: H,
|
|
959
962
|
tableBodyRef: T,
|
|
960
963
|
rowHeight: t.gridProps.rowHeight,
|
|
961
|
-
isGrouped:
|
|
964
|
+
isGrouped: gn,
|
|
962
965
|
virtualSkipRef: t.gridProps.virtualSkipRef,
|
|
963
966
|
rowHeightServiceRef: {
|
|
964
967
|
get current() {
|
|
@@ -966,14 +969,14 @@ const cr = (t, x, b, z) => {
|
|
|
966
969
|
return (e = C.current) == null ? void 0 : e.rowHeightService;
|
|
967
970
|
}
|
|
968
971
|
}
|
|
969
|
-
}), ie = c.useRef(null),
|
|
972
|
+
}), ie = c.useRef(null), Rn = c.useRef(null), bn = c.useRef(null), We = En(M), K = t.isVirtualScroll, vn = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), rt = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, v = we(t.gridProps.selectable), ot = Kn(t.gridProps.editable), Cn = ve.current && re && ve.current <= re.medium && t.gridProps.adaptive;
|
|
970
973
|
return c.useMemo(() => {
|
|
971
|
-
|
|
974
|
+
ne.onConstructor({
|
|
972
975
|
navigatable: !!t.gridProps.navigatable,
|
|
973
|
-
contextStateRef:
|
|
974
|
-
navigationStateRef:
|
|
976
|
+
contextStateRef: V,
|
|
977
|
+
navigationStateRef: Q,
|
|
975
978
|
idPrefix: t.id
|
|
976
|
-
}), C.current = new
|
|
979
|
+
}), C.current = new Qn();
|
|
977
980
|
}, []), c.useMemo(() => {
|
|
978
981
|
var e;
|
|
979
982
|
(e = C.current) == null || e.reset();
|
|
@@ -985,26 +988,28 @@ const cr = (t, x, b, z) => {
|
|
|
985
988
|
rt,
|
|
986
989
|
t.gridProps.sort,
|
|
987
990
|
t.gridProps.rowHeight
|
|
988
|
-
]), c.useEffect(() =>
|
|
989
|
-
|
|
990
|
-
}),
|
|
991
|
+
]), c.useEffect(() => {
|
|
992
|
+
O.current = {};
|
|
993
|
+
}), c.useEffect(() => (t.gridProps.clipboard && (he.current = new Gn(fe), he.current.addEventListeners(p())), () => {
|
|
994
|
+
he.current && he.current.removeEventListeners(p());
|
|
995
|
+
}), [t.gridProps.onClipboard, t.gridProps.clipboard, fe, p]), c.useEffect(() => (Je(), Ke(), at(), ne.onComponentDidMount({
|
|
991
996
|
scope: M.current || void 0,
|
|
992
|
-
contextStateRef:
|
|
993
|
-
navigationStateRef:
|
|
997
|
+
contextStateRef: V,
|
|
998
|
+
navigationStateRef: Q
|
|
994
999
|
}), () => {
|
|
995
1000
|
clearTimeout(Fe.current);
|
|
996
1001
|
}), []), c.useEffect(() => {
|
|
997
1002
|
var e;
|
|
998
|
-
Je(), Ke(), at(), K && (ge(),
|
|
1003
|
+
Je(), Ke(), at(), K && (ge(), Jt(), (e = C.current) == null || e.update()), nt(), en(), ne.onComponentDidUpdate({
|
|
999
1004
|
scope: M.current || void 0,
|
|
1000
|
-
contextStateRef:
|
|
1001
|
-
navigationStateRef:
|
|
1005
|
+
contextStateRef: V,
|
|
1006
|
+
navigationStateRef: Q,
|
|
1002
1007
|
focusFirst: Te.current,
|
|
1003
1008
|
newEditableRow: Re.current,
|
|
1004
1009
|
singleEditRow: Me.current,
|
|
1005
1010
|
lastActiveElement: He.current,
|
|
1006
1011
|
navigatable: t.gridProps.navigatable
|
|
1007
|
-
}),
|
|
1012
|
+
}), ht(), Te.current = !1, Re.current = void 0, Ce.current = void 0;
|
|
1008
1013
|
}), c.useEffect(() => {
|
|
1009
1014
|
if (ae) {
|
|
1010
1015
|
const e = {
|
|
@@ -1020,8 +1025,8 @@ const cr = (t, x, b, z) => {
|
|
|
1020
1025
|
var n;
|
|
1021
1026
|
let e;
|
|
1022
1027
|
return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
|
|
1023
|
-
|
|
1024
|
-
}), e.observe((n =
|
|
1028
|
+
nn(), K && ge();
|
|
1029
|
+
}), e.observe((n = p()) == null ? void 0 : n.body)), () => {
|
|
1025
1030
|
e == null || e.disconnect();
|
|
1026
1031
|
};
|
|
1027
1032
|
}, []), c.useEffect(() => {
|
|
@@ -1032,7 +1037,7 @@ const cr = (t, x, b, z) => {
|
|
|
1032
1037
|
const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
|
|
1033
1038
|
ge();
|
|
1034
1039
|
const r = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
|
|
1035
|
-
(o === 0 && r > 0 || Math.abs(r - o) > 10) &&
|
|
1040
|
+
(o === 0 && r > 0 || Math.abs(r - o) > 10) && Y();
|
|
1036
1041
|
}, n = new window.ResizeObserver(e);
|
|
1037
1042
|
return n.observe(H.current), () => {
|
|
1038
1043
|
n.disconnect();
|
|
@@ -1070,26 +1075,26 @@ const cr = (t, x, b, z) => {
|
|
|
1070
1075
|
getLeafDataItems: D
|
|
1071
1076
|
})
|
|
1072
1077
|
), c.useImperativeHandle(t.gridRef, () => S.current), c.useMemo(() => {
|
|
1073
|
-
P.current = new
|
|
1078
|
+
P.current = new Un(Xe);
|
|
1074
1079
|
}, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
|
|
1075
|
-
|
|
1080
|
+
U.current = new Vn(ue, $t, Ze);
|
|
1076
1081
|
}, [
|
|
1077
1082
|
t.gridProps.onColumnReorder,
|
|
1078
1083
|
t.gridProps.onGroupChange,
|
|
1079
1084
|
t.gridProps.group,
|
|
1080
1085
|
t.columnsRef,
|
|
1081
1086
|
t.gridProps.groupable
|
|
1082
|
-
]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState =
|
|
1083
|
-
|
|
1087
|
+
]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState = xn(t.columnsState), U.current.reorderable = t.gridProps.reorderable || !1, U.current.groupable = rt, U.current.columns = t.columnsRef, U.current.dir = We, rn(), /* @__PURE__ */ c.createElement(
|
|
1088
|
+
ar.Provider,
|
|
1084
1089
|
{
|
|
1085
1090
|
value: {
|
|
1086
1091
|
isClient: x,
|
|
1087
1092
|
rowReorder: oe,
|
|
1088
1093
|
activeDragRowDataItemRef: ie,
|
|
1089
|
-
reorderRowDragTargetRef:
|
|
1090
|
-
reorderRowDropTargetRef:
|
|
1094
|
+
reorderRowDragTargetRef: Rn,
|
|
1095
|
+
reorderRowDropTargetRef: bn,
|
|
1091
1096
|
dir: We,
|
|
1092
|
-
getCellPositionStyle:
|
|
1097
|
+
getCellPositionStyle: on,
|
|
1093
1098
|
dataItemKey: t.gridProps.dataItemKey,
|
|
1094
1099
|
columnsState: t.columnsState,
|
|
1095
1100
|
columnsRef: t.columnsRef,
|
|
@@ -1101,16 +1106,16 @@ const cr = (t, x, b, z) => {
|
|
|
1101
1106
|
defaultGroup: t.gridProps.defaultGroup,
|
|
1102
1107
|
groupChange: ke,
|
|
1103
1108
|
selectionRelease: Ve,
|
|
1104
|
-
pinnedSelectionRelease:
|
|
1105
|
-
pagerPageChange:
|
|
1106
|
-
onContextMenu:
|
|
1107
|
-
rowClick:
|
|
1108
|
-
rowDblClick:
|
|
1109
|
-
cellClick:
|
|
1109
|
+
pinnedSelectionRelease: Ht,
|
|
1110
|
+
pagerPageChange: pt,
|
|
1111
|
+
onContextMenu: ft,
|
|
1112
|
+
rowClick: Ct,
|
|
1113
|
+
rowDblClick: It,
|
|
1114
|
+
cellClick: Et,
|
|
1110
1115
|
headerCellClick: Ue,
|
|
1111
|
-
itemChange:
|
|
1112
|
-
onDialogEditCancel:
|
|
1113
|
-
onDialogEditSubmit:
|
|
1116
|
+
itemChange: Dt,
|
|
1117
|
+
onDialogEditCancel: yt,
|
|
1118
|
+
onDialogEditSubmit: wt,
|
|
1114
1119
|
columnReorder: ue,
|
|
1115
1120
|
onResize: Xe,
|
|
1116
1121
|
getTotal: xe,
|
|
@@ -1125,59 +1130,59 @@ const cr = (t, x, b, z) => {
|
|
|
1125
1130
|
filterable: t.gridProps.filterable,
|
|
1126
1131
|
filter: t.gridProps.filter,
|
|
1127
1132
|
defaultFilter: t.gridProps.defaultFilter,
|
|
1128
|
-
filterOperators: t.gridProps.filterOperators ||
|
|
1133
|
+
filterOperators: t.gridProps.filterOperators || cr,
|
|
1129
1134
|
getLeafDataItems: D,
|
|
1130
|
-
filterChange:
|
|
1131
|
-
applyHighlightDescriptor:
|
|
1132
|
-
applySelectionDescriptor:
|
|
1135
|
+
filterChange: Nt,
|
|
1136
|
+
applyHighlightDescriptor: Ut,
|
|
1137
|
+
applySelectionDescriptor: Ft,
|
|
1133
1138
|
highlight: t.gridProps.highlight,
|
|
1134
1139
|
select: t.gridProps.select,
|
|
1135
|
-
searchChange:
|
|
1140
|
+
searchChange: Vt,
|
|
1136
1141
|
exportAsPdf: Se,
|
|
1137
1142
|
exportAsCsv: $e,
|
|
1138
1143
|
getCsvBlob: _e,
|
|
1139
|
-
onHeaderSelectionChange:
|
|
1140
|
-
columnGroupChange:
|
|
1141
|
-
onKeyDown:
|
|
1142
|
-
onFocus:
|
|
1143
|
-
scrollHandler:
|
|
1144
|
-
selectionChange:
|
|
1145
|
-
mobileMode:
|
|
1144
|
+
onHeaderSelectionChange: Tt,
|
|
1145
|
+
columnGroupChange: _t,
|
|
1146
|
+
onKeyDown: Rt,
|
|
1147
|
+
onFocus: bt,
|
|
1148
|
+
scrollHandler: mt,
|
|
1149
|
+
selectionChange: Kt,
|
|
1150
|
+
mobileMode: Cn,
|
|
1146
1151
|
adaptiveColumnMenuRef: ve.current,
|
|
1147
1152
|
adpativeTitle: t.gridProps.adaptiveTitle,
|
|
1148
1153
|
adaptive: t.gridProps.adaptive,
|
|
1149
|
-
dispatchDetailExpand:
|
|
1150
|
-
dispatchGroupExpand:
|
|
1154
|
+
dispatchDetailExpand: xt,
|
|
1155
|
+
dispatchGroupExpand: St,
|
|
1151
1156
|
columnResizeRef: P,
|
|
1152
|
-
dragLogicRef:
|
|
1153
|
-
navigationStateRef:
|
|
1154
|
-
tableElementRef:
|
|
1157
|
+
dragLogicRef: U,
|
|
1158
|
+
navigationStateRef: Q,
|
|
1159
|
+
tableElementRef: j,
|
|
1155
1160
|
tableBodyElementRef: T,
|
|
1156
|
-
headerElementRef:
|
|
1161
|
+
headerElementRef: an,
|
|
1157
1162
|
containerElementRef: H,
|
|
1158
|
-
headTableElementRef:
|
|
1163
|
+
headTableElementRef: cn,
|
|
1159
1164
|
elementRef: M,
|
|
1160
1165
|
virtualScrollHeightContainerRef: et,
|
|
1161
|
-
footerRef:
|
|
1162
|
-
headerRef:
|
|
1166
|
+
footerRef: q,
|
|
1167
|
+
headerRef: $,
|
|
1163
1168
|
vsRef: C,
|
|
1164
|
-
stickyHeaderItems:
|
|
1165
|
-
stickyHeaderRef:
|
|
1166
|
-
stickyFooterItems:
|
|
1169
|
+
stickyHeaderItems: fn,
|
|
1170
|
+
stickyHeaderRef: mn,
|
|
1171
|
+
stickyFooterItems: Pn,
|
|
1167
1172
|
stickyFooterRef: Ie,
|
|
1168
1173
|
stickyHeaderTableRef: A,
|
|
1169
1174
|
stickyFooterTableRef: F,
|
|
1170
1175
|
pinnedTopTableRef: L,
|
|
1171
1176
|
pinnedBottomTableRef: B,
|
|
1172
|
-
pinnedTopRef:
|
|
1173
|
-
pinnedBottomRef:
|
|
1174
|
-
onRowPin:
|
|
1175
|
-
getRowPinPosition:
|
|
1177
|
+
pinnedTopRef: dn,
|
|
1178
|
+
pinnedBottomRef: sn,
|
|
1179
|
+
onRowPin: se,
|
|
1180
|
+
getRowPinPosition: kt
|
|
1176
1181
|
}
|
|
1177
1182
|
},
|
|
1178
|
-
/* @__PURE__ */ c.createElement(
|
|
1183
|
+
/* @__PURE__ */ c.createElement(Tn.Provider, { value: V.current }, t.children),
|
|
1179
1184
|
/* @__PURE__ */ c.createElement(
|
|
1180
|
-
|
|
1185
|
+
er,
|
|
1181
1186
|
{
|
|
1182
1187
|
show: b.show && (ce == null ? void 0 : ce.length),
|
|
1183
1188
|
dataItem: b.dataItem,
|
|
@@ -1185,25 +1190,25 @@ const cr = (t, x, b, z) => {
|
|
|
1185
1190
|
items: ce,
|
|
1186
1191
|
offset: b.offset,
|
|
1187
1192
|
onClose: Oe,
|
|
1188
|
-
onSelect:
|
|
1193
|
+
onSelect: gt
|
|
1189
1194
|
}
|
|
1190
1195
|
),
|
|
1191
1196
|
t.gridProps.pdf && /* @__PURE__ */ c.createElement(
|
|
1192
|
-
|
|
1197
|
+
or,
|
|
1193
1198
|
{
|
|
1194
1199
|
gridProps: t.gridProps,
|
|
1195
1200
|
innerGrid: t.innerGrid,
|
|
1196
1201
|
pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
|
|
1197
|
-
onPdfExport:
|
|
1198
|
-
ref: (e) =>
|
|
1202
|
+
onPdfExport: jt,
|
|
1203
|
+
ref: (e) => Z.current = e
|
|
1199
1204
|
}
|
|
1200
1205
|
),
|
|
1201
1206
|
t.gridProps.csv && /* @__PURE__ */ c.createElement(
|
|
1202
|
-
|
|
1207
|
+
ir,
|
|
1203
1208
|
{
|
|
1204
1209
|
gridProps: t.gridProps,
|
|
1205
1210
|
csv: typeof t.gridProps.csv == "object" ? t.gridProps.csv : {},
|
|
1206
|
-
onCsvExport:
|
|
1211
|
+
onCsvExport: qt,
|
|
1207
1212
|
columnsState: t.columnsState,
|
|
1208
1213
|
ref: (e) => k.current = e
|
|
1209
1214
|
}
|
|
@@ -1211,5 +1216,5 @@ const cr = (t, x, b, z) => {
|
|
|
1211
1216
|
);
|
|
1212
1217
|
};
|
|
1213
1218
|
export {
|
|
1214
|
-
|
|
1219
|
+
Er as GridClientWrapper
|
|
1215
1220
|
};
|