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