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