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