@progress/kendo-react-grid 13.3.0-develop.1 → 13.3.0-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +354 -336
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +330 -350
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +28 -28
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +283 -69
- package/index.d.ts +283 -69
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/rows/GridDetailRowRenderer.js +8 -0
- package/rows/GridDetailRowRenderer.mjs +103 -0
- package/rows/GridRowRenderer.js +8 -0
- package/rows/GridRowRenderer.mjs +88 -0
- package/stacked/GridStackedCell.js +9 -0
- package/stacked/GridStackedCell.mjs +69 -0
- package/stacked/GridStackedDetailToggle.js +9 -0
- package/stacked/GridStackedDetailToggle.mjs +37 -0
- package/stacked/GridStackedRow.js +9 -0
- package/stacked/GridStackedRow.mjs +463 -0
- package/stacked/StackedModeComponents.js +9 -0
- package/stacked/StackedModeComponents.mjs +54 -0
- package/stacked/StackedModeRow.js +8 -0
- package/stacked/StackedModeRow.mjs +131 -0
package/GridClientWrapper.mjs
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { useAdaptiveModeContext as
|
|
9
|
+
import * as d from "react";
|
|
10
|
+
import { useAdaptiveModeContext as Vt, canUseDOM as Q, getActiveElement as jt, useDir as qt, setScrollbarWidth as Ue, cloneArray as _t, getter as Z, RowHeightService as $t } from "@progress/kendo-react-common";
|
|
11
11
|
import { filterBy as Jt } from "@progress/kendo-data-query";
|
|
12
|
-
import { getSelectionOptions as se, populateClipboardData as Xt, ClipboardActionType as ke, getEditableOptions as Yt, tableKeyboardNavigation as
|
|
12
|
+
import { getSelectionOptions as se, populateClipboardData as Xt, ClipboardActionType as ke, getEditableOptions as Yt, tableKeyboardNavigation as _, ClipboardService as Qt, TableKeyboardNavigationContext as Zt, closestTagName as ue, editReducer as pt, EDIT_ACTION as en, getDetailExpandableOptions as tn, detailExpandReducer as nn, getGroupExpandableOptions as rn, groupExpandReducer as on, getSelectedState as Ve, getSelectedStateFromKeyDown as an, getColumnIndex as dn, getRowIndex as cn, updateLeft as ln, updateRight as sn } from "@progress/kendo-react-data-tools";
|
|
13
13
|
import { ColumnResize as un } from "./drag/ColumnResize.mjs";
|
|
14
14
|
import { CommonDragLogic as gn } from "./drag/CommonDragLogic.mjs";
|
|
15
|
-
import { getDefaultHeadContextMenuItems as fn, getDefaultBodyContextMenuItems as mn, isRowReorderEnabled as
|
|
15
|
+
import { getDefaultHeadContextMenuItems as fn, getDefaultBodyContextMenuItems as mn, isRowReorderEnabled as hn, sanitizeColumns as Pn, getDataAsArray as Rn, getFlatColumnsState as bn, calcRowHeight as vn } from "./utils/index.mjs";
|
|
16
16
|
import { VirtualScroll as In } from "./VirtualScroll.mjs";
|
|
17
17
|
import { GridContextMenu as Cn } from "./contextMenu/GridContextMenu.mjs";
|
|
18
18
|
import { GridContextMenuAnchorPart as je } from "./contextMenu/enums.mjs";
|
|
@@ -20,16 +20,16 @@ import { normalizeSortable as En, firstLevelSortSeqMap as wn } from "./sortCommo
|
|
|
20
20
|
import { BasePDFExport as yn } from "./BasePDFExport.mjs";
|
|
21
21
|
import { GridContext as xn } from "./utils/GridContext.mjs";
|
|
22
22
|
import { operators as Sn } from "./filterCommon.mjs";
|
|
23
|
-
const kn = (t,
|
|
24
|
-
const
|
|
25
|
-
return t.reduce((
|
|
26
|
-
}, qe = (t,
|
|
27
|
-
...
|
|
28
|
-
...kn(Jt(t,
|
|
29
|
-
}), {}),
|
|
30
|
-
const
|
|
31
|
-
e.event.preventDefault(),
|
|
32
|
-
...
|
|
23
|
+
const kn = (t, E, P, D) => {
|
|
24
|
+
const $ = Object.keys(E.cells).map((k) => P.findIndex((W) => W.field === k)), O = Object.keys(E.cells).length > 0 ? $ : !0;
|
|
25
|
+
return t.reduce((k, W) => (k[W[D != null ? D : "id"]] = O, k), {});
|
|
26
|
+
}, qe = (t, E, P, D) => E.reduce((O, k) => ({
|
|
27
|
+
...O,
|
|
28
|
+
...kn(Jt(t, k), k, P, D)
|
|
29
|
+
}), {}), Un = (t) => {
|
|
30
|
+
const E = t.gridProps.isClient, [P, D] = d.useState({}), $ = Vt(), O = d.useRef(null), k = (e) => {
|
|
31
|
+
e.event.preventDefault(), D({
|
|
32
|
+
...P,
|
|
33
33
|
show: !0,
|
|
34
34
|
offset: {
|
|
35
35
|
left: e.event.pageX,
|
|
@@ -38,42 +38,42 @@ const kn = (t, I, h, S) => {
|
|
|
38
38
|
dataItem: e.dataItem,
|
|
39
39
|
field: e.field
|
|
40
40
|
});
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
const e = t.gridProps.sortable && (
|
|
41
|
+
}, W = () => {
|
|
42
|
+
D({});
|
|
43
|
+
}, I = d.useMemo(() => t.columnsRef.find((e) => e.field === P.field), [t.columnsRef, P]), De = d.useMemo(() => {
|
|
44
|
+
const e = t.gridProps.sortable && (I == null ? void 0 : I.sortable);
|
|
45
45
|
return fn({
|
|
46
46
|
pdf: !!t.gridProps.pdf,
|
|
47
47
|
sortable: !!e,
|
|
48
48
|
selectable: se(t.gridProps.selectable).enabled,
|
|
49
49
|
clipboard: !!t.gridProps.clipboard
|
|
50
50
|
});
|
|
51
|
-
}, [
|
|
52
|
-
const e = t.gridProps.sortable && (
|
|
51
|
+
}, [I, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ke = d.useMemo(() => {
|
|
52
|
+
const e = t.gridProps.sortable && (I == null ? void 0 : I.sortable);
|
|
53
53
|
return mn({
|
|
54
54
|
pdf: !!t.gridProps.pdf,
|
|
55
55
|
sortable: !!e,
|
|
56
56
|
selectable: se(t.gridProps.selectable).enabled,
|
|
57
57
|
clipboard: !!t.gridProps.clipboard,
|
|
58
|
-
rowReorderable:
|
|
58
|
+
rowReorderable: hn(t.gridProps.rowReorderable)
|
|
59
59
|
});
|
|
60
|
-
}, [
|
|
61
|
-
const e = (
|
|
62
|
-
if (n &&
|
|
63
|
-
const o =
|
|
60
|
+
}, [I, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), p = d.useMemo(() => {
|
|
61
|
+
const e = (I == null ? void 0 : I.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(P) : e;
|
|
62
|
+
if (n && P.offset) {
|
|
63
|
+
const o = P.dataItem ? je.body : je.head, r = n[o], i = P.dataItem ? Ke : De;
|
|
64
64
|
return r === !1 ? void 0 : r === !0 || r === void 0 ? i : r;
|
|
65
65
|
}
|
|
66
|
-
}, [t.gridProps.contextMenu,
|
|
67
|
-
var
|
|
66
|
+
}, [t.gridProps.contextMenu, P, Ke, De, I]), _e = (e) => {
|
|
67
|
+
var c, f, l, u, s, v, m, S, z;
|
|
68
68
|
const n = e.event.item, o = {
|
|
69
|
-
target:
|
|
69
|
+
target: y.current,
|
|
70
70
|
syntheticEvent: e.event.syntheticEvent,
|
|
71
71
|
nativeEvent: e.event.nativeEvent,
|
|
72
72
|
menuItem: n,
|
|
73
73
|
...e
|
|
74
74
|
};
|
|
75
|
-
t.gridProps.onContextMenuItemClick &&
|
|
76
|
-
const r =
|
|
75
|
+
t.gridProps.onContextMenuItemClick && g(t.gridProps.onContextMenuItemClick, o);
|
|
76
|
+
const r = w(), i = {
|
|
77
77
|
selectedField: "",
|
|
78
78
|
componentId: t.id,
|
|
79
79
|
dataItems: r,
|
|
@@ -89,12 +89,12 @@ const kn = (t, I, h, S) => {
|
|
|
89
89
|
isDrag: !1,
|
|
90
90
|
...se(t.gridProps.selectable),
|
|
91
91
|
...o
|
|
92
|
-
},
|
|
93
|
-
switch ((
|
|
92
|
+
}, a = r.findIndex((Y) => Y === e.dataItem);
|
|
93
|
+
switch ((c = n.data) == null ? void 0 : c.action) {
|
|
94
94
|
case "SortCommand":
|
|
95
|
-
if (
|
|
96
|
-
const Y = (
|
|
97
|
-
Me(e.event.syntheticEvent,
|
|
95
|
+
if (I) {
|
|
96
|
+
const Y = (f = n.name) == null ? void 0 : f.toLowerCase().includes("asc"), Nt = ((l = n.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, Bt = Y ? "asc" : Nt, Ut = n.name ? Bt : void 0;
|
|
97
|
+
Me(e.event.syntheticEvent, I, Ut);
|
|
98
98
|
}
|
|
99
99
|
break;
|
|
100
100
|
case "SelectRowCommand":
|
|
@@ -110,14 +110,14 @@ const kn = (t, I, h, S) => {
|
|
|
110
110
|
ft(i);
|
|
111
111
|
break;
|
|
112
112
|
case "ReorderRowCommand":
|
|
113
|
-
|
|
113
|
+
X.current = e.dataItem, (u = n.name) != null && u.toLowerCase().includes("rowup") && a > 0 && J(e.event.syntheticEvent, a - 1, "before"), (s = n.name) != null && s.toLowerCase().includes("rowdown") && a < r.length - 1 && J(e.event.syntheticEvent, a + 1, "after"), (v = n.name) != null && v.toLowerCase().includes("rowtop") && J(e.event.syntheticEvent, 0, "before"), (m = n.name) != null && m.toLowerCase().includes("rowbottom") && J(e.event.syntheticEvent, r.length - 1, "after");
|
|
114
114
|
break;
|
|
115
115
|
case "CopySelectionCommand":
|
|
116
116
|
oe(
|
|
117
117
|
ke.copy,
|
|
118
118
|
e.event.nativeEvent,
|
|
119
119
|
{
|
|
120
|
-
copyHeaders: !((
|
|
120
|
+
copyHeaders: !((S = n.name) != null && S.toLowerCase().includes("noheaders"))
|
|
121
121
|
},
|
|
122
122
|
e.dataItem,
|
|
123
123
|
e.field
|
|
@@ -128,29 +128,29 @@ const kn = (t, I, h, S) => {
|
|
|
128
128
|
ke.paste,
|
|
129
129
|
e.event.nativeEvent,
|
|
130
130
|
{
|
|
131
|
-
copyHeaders: !((
|
|
131
|
+
copyHeaders: !((z = n.name) != null && z.toLowerCase().includes("noheaders"))
|
|
132
132
|
},
|
|
133
133
|
e.dataItem,
|
|
134
134
|
e.field
|
|
135
135
|
);
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
W();
|
|
139
139
|
}, ee = () => {
|
|
140
140
|
const e = t.columnsRef.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
|
|
141
|
-
return
|
|
141
|
+
return Pn(e);
|
|
142
142
|
}, $e = (e, n, o) => {
|
|
143
|
-
if (t.gridProps.onContextMenu &&
|
|
143
|
+
if (t.gridProps.onContextMenu && E) {
|
|
144
144
|
const r = {
|
|
145
|
-
target:
|
|
145
|
+
target: y.current,
|
|
146
146
|
syntheticEvent: e,
|
|
147
147
|
nativeEvent: e.nativeEvent,
|
|
148
148
|
dataItem: n,
|
|
149
149
|
field: o
|
|
150
150
|
};
|
|
151
|
-
|
|
151
|
+
g(t.gridProps.onContextMenu, r);
|
|
152
152
|
}
|
|
153
|
-
t.gridProps.contextMenu &&
|
|
153
|
+
t.gridProps.contextMenu && k({
|
|
154
154
|
event: e,
|
|
155
155
|
dataItem: n,
|
|
156
156
|
field: o
|
|
@@ -158,42 +158,42 @@ const kn = (t, I, h, S) => {
|
|
|
158
158
|
}, Je = (e) => {
|
|
159
159
|
if (e.target !== e.currentTarget)
|
|
160
160
|
return;
|
|
161
|
-
clearTimeout(we.current), b.current && (b.current.table =
|
|
161
|
+
clearTimeout(we.current), b.current && (b.current.table = A.current);
|
|
162
162
|
const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
|
|
163
|
-
t.gridProps.columnVirtualization && (!
|
|
164
|
-
|
|
165
|
-
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n),
|
|
163
|
+
t.gridProps.columnVirtualization && (!x || o === Ee.current) && (we.current = window.setTimeout(() => {
|
|
164
|
+
U();
|
|
165
|
+
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), F.current && F.current.setScrollLeft(n), L.current && L.current.setScrollLeft(n), b.current && o !== Ee.current && b.current.scrollHandler(e), t.gridProps.onScroll && E && g(t.gridProps.onScroll, {
|
|
166
166
|
...R(e)
|
|
167
167
|
}), Ee.current = o;
|
|
168
168
|
}, Xe = (e) => {
|
|
169
|
-
|
|
169
|
+
_.onKeyDown(e, {
|
|
170
170
|
navigatable: t.gridProps.navigatable || !1,
|
|
171
|
-
contextStateRef:
|
|
172
|
-
navigationStateRef:
|
|
171
|
+
contextStateRef: T,
|
|
172
|
+
navigationStateRef: V,
|
|
173
173
|
onNavigationAction: Qe,
|
|
174
174
|
columns: ee()
|
|
175
|
-
}),
|
|
176
|
-
document:
|
|
177
|
-
contextStateRef:
|
|
178
|
-
navigationStateRef:
|
|
175
|
+
}), _.onGetSnapshotBeforeUpdate({
|
|
176
|
+
document: K(),
|
|
177
|
+
contextStateRef: T,
|
|
178
|
+
navigationStateRef: V
|
|
179
179
|
});
|
|
180
180
|
const n = {
|
|
181
|
-
dataItems:
|
|
182
|
-
mode:
|
|
183
|
-
cell:
|
|
181
|
+
dataItems: w(),
|
|
182
|
+
mode: h.mode,
|
|
183
|
+
cell: h.cell,
|
|
184
184
|
componentId: t.id,
|
|
185
185
|
selectedField: "",
|
|
186
186
|
...R(e)
|
|
187
187
|
};
|
|
188
|
-
t.gridProps.onKeyDown &&
|
|
188
|
+
t.gridProps.onKeyDown && E && g(t.gridProps.onKeyDown, n);
|
|
189
189
|
}, Ye = (e) => {
|
|
190
|
-
|
|
190
|
+
_.onFocus(e, {
|
|
191
191
|
navigatable: !!t.gridProps.navigatable,
|
|
192
|
-
contextStateRef:
|
|
192
|
+
contextStateRef: T
|
|
193
193
|
});
|
|
194
194
|
}, Qe = (e) => {
|
|
195
195
|
const { columnsRef: n } = t;
|
|
196
|
-
if (e.action === "moveToNextPage" &&
|
|
196
|
+
if (e.action === "moveToNextPage" && Pt(e.event), e.action === "moveToPrevPage" && Rt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
|
|
197
197
|
const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
|
|
198
198
|
if (!n[o].reorderable)
|
|
199
199
|
return;
|
|
@@ -208,42 +208,42 @@ const kn = (t, I, h, S) => {
|
|
|
208
208
|
ne(o, o - 1, e.event);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
if (e.action === "select" && dt(e.event), t.gridProps.onNavigationAction &&
|
|
211
|
+
if (e.action === "select" && dt(e.event), t.gridProps.onNavigationAction && E) {
|
|
212
212
|
const o = {
|
|
213
213
|
focusElement: e.focusElement,
|
|
214
214
|
...R(e.event)
|
|
215
215
|
};
|
|
216
|
-
|
|
216
|
+
g(t.gridProps.onNavigationAction, o);
|
|
217
217
|
}
|
|
218
218
|
}, Ze = (e, n) => {
|
|
219
|
-
t.gridProps.onRowClick && ue(e.target, "TD") &&
|
|
219
|
+
t.gridProps.onRowClick && ue(e.target, "TD") && g(t.gridProps.onRowClick, {
|
|
220
220
|
dataItem: n,
|
|
221
221
|
...R(e)
|
|
222
222
|
});
|
|
223
223
|
}, pe = (e, n) => {
|
|
224
|
-
t.gridProps.onRowDoubleClick && ue(e.target, "TD") &&
|
|
224
|
+
t.gridProps.onRowDoubleClick && ue(e.target, "TD") && g(t.gridProps.onRowDoubleClick, {
|
|
225
225
|
dataItem: n,
|
|
226
226
|
...R(e)
|
|
227
227
|
});
|
|
228
228
|
}, et = (e) => {
|
|
229
|
-
t.gridProps.onItemChange &&
|
|
229
|
+
t.gridProps.onItemChange && g(t.gridProps.onItemChange, {
|
|
230
230
|
...R(e.syntheticEvent),
|
|
231
231
|
dataItem: e.dataItem,
|
|
232
232
|
field: void 0,
|
|
233
233
|
value: void 0
|
|
234
234
|
});
|
|
235
235
|
}, tt = (e) => {
|
|
236
|
-
t.gridProps.onItemChange && t.gridProps.onEditChange &&
|
|
236
|
+
t.gridProps.onItemChange && t.gridProps.onEditChange && g(t.gridProps.onEditChange, {
|
|
237
237
|
edit: {},
|
|
238
238
|
...R(e.syntheticEvent)
|
|
239
239
|
});
|
|
240
240
|
}, nt = (e, n, o) => {
|
|
241
|
-
if (
|
|
241
|
+
if (Be.enabled && Be.mode === "incell" && t.gridProps.dataItemKey) {
|
|
242
242
|
const r = pt(t.gridProps.edit, {
|
|
243
243
|
type: en.ENTER_FIELD_EDIT,
|
|
244
244
|
payload: { id: n[t.gridProps.dataItemKey], field: o }
|
|
245
245
|
});
|
|
246
|
-
t.gridProps.onEditChange &&
|
|
246
|
+
t.gridProps.onEditChange && g(t.gridProps.onEditChange, {
|
|
247
247
|
edit: r,
|
|
248
248
|
...R(e)
|
|
249
249
|
});
|
|
@@ -252,7 +252,7 @@ const kn = (t, I, h, S) => {
|
|
|
252
252
|
var r;
|
|
253
253
|
if (tn(t.detailExpandable).enabled) {
|
|
254
254
|
const i = nn((r = t.gridProps.detailExpand) != null ? r : {}, e);
|
|
255
|
-
t.gridProps.onDetailExpandChange &&
|
|
255
|
+
t.gridProps.onDetailExpandChange && g(t.gridProps.onDetailExpandChange, {
|
|
256
256
|
...R(n),
|
|
257
257
|
detailExpand: i
|
|
258
258
|
});
|
|
@@ -264,7 +264,7 @@ const kn = (t, I, h, S) => {
|
|
|
264
264
|
);
|
|
265
265
|
if (o.enabled) {
|
|
266
266
|
const i = on((r = t.gridProps.groupExpand) != null ? r : [], e, o);
|
|
267
|
-
t.gridProps.onGroupExpandChange &&
|
|
267
|
+
t.gridProps.onGroupExpandChange && g(t.gridProps.onGroupExpandChange, {
|
|
268
268
|
...R(n),
|
|
269
269
|
groupExpand: i
|
|
270
270
|
});
|
|
@@ -273,10 +273,10 @@ const kn = (t, I, h, S) => {
|
|
|
273
273
|
const { allowUnsort: r, mode: i } = En(
|
|
274
274
|
t.gridProps.sortable || !1,
|
|
275
275
|
n.sortable || !1
|
|
276
|
-
),
|
|
277
|
-
|
|
276
|
+
), a = (t.gridProps.sort || []).filter((l) => l.field === n.field)[0], c = o || wn[r][a && a.dir || ""], f = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== n.field);
|
|
277
|
+
c !== "" && n.field && f.push({ field: n.field, dir: c }), He(f, e);
|
|
278
278
|
}, it = (e) => {
|
|
279
|
-
t.gridProps.onItemChange &&
|
|
279
|
+
t.gridProps.onItemChange && g(t.gridProps.onItemChange, {
|
|
280
280
|
...R(e.syntheticEvent),
|
|
281
281
|
dataItem: e.dataItem,
|
|
282
282
|
dataIndex: e.dataIndex,
|
|
@@ -285,65 +285,65 @@ const kn = (t, I, h, S) => {
|
|
|
285
285
|
});
|
|
286
286
|
}, at = (e) => {
|
|
287
287
|
var n;
|
|
288
|
-
if (t.gridProps.onSelectionChange &&
|
|
289
|
-
const { event: o, dataItem: r, dataIndex: i, columnIndex:
|
|
288
|
+
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
289
|
+
const { event: o, dataItem: r, dataIndex: i, columnIndex: a } = e, c = {
|
|
290
290
|
...R(o),
|
|
291
291
|
dataItem: r,
|
|
292
|
-
startColIndex:
|
|
293
|
-
endColIndex:
|
|
292
|
+
startColIndex: a,
|
|
293
|
+
endColIndex: a,
|
|
294
294
|
startRowIndex: i,
|
|
295
295
|
endRowIndex: i,
|
|
296
|
-
dataItems:
|
|
296
|
+
dataItems: w(),
|
|
297
297
|
altKey: !1,
|
|
298
298
|
ctrlKey: !1,
|
|
299
299
|
shiftKey: !1,
|
|
300
300
|
metaKey: !1,
|
|
301
|
-
mode:
|
|
302
|
-
cell:
|
|
301
|
+
mode: h.mode,
|
|
302
|
+
cell: h.cell,
|
|
303
303
|
isDrag: !1,
|
|
304
304
|
componentId: t.id,
|
|
305
305
|
selectedField: ""
|
|
306
306
|
};
|
|
307
|
-
|
|
308
|
-
...
|
|
309
|
-
select: t.gridProps.dataItemKey ?
|
|
310
|
-
event:
|
|
307
|
+
g(t.gridProps.onSelectionChange, {
|
|
308
|
+
...c,
|
|
309
|
+
select: t.gridProps.dataItemKey ? Ve({
|
|
310
|
+
event: c,
|
|
311
311
|
selectedState: (n = t.gridProps.select) != null ? n : {},
|
|
312
312
|
dataItemKey: t.gridProps.dataItemKey
|
|
313
313
|
}) : {}
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
}, dt = (e) => {
|
|
317
|
-
var
|
|
318
|
-
if (!
|
|
317
|
+
var l, u;
|
|
318
|
+
if (!h.enabled || !t.gridProps.dataItemKey)
|
|
319
319
|
return;
|
|
320
320
|
const n = {
|
|
321
|
-
dataItems:
|
|
322
|
-
mode:
|
|
323
|
-
cell:
|
|
321
|
+
dataItems: w(),
|
|
322
|
+
mode: h.mode,
|
|
323
|
+
cell: h.cell,
|
|
324
324
|
componentId: t.id,
|
|
325
325
|
selectedField: "",
|
|
326
326
|
...R(e)
|
|
327
327
|
}, o = an({
|
|
328
328
|
event: n,
|
|
329
|
-
selectedState: (
|
|
329
|
+
selectedState: (l = t.gridProps.select) != null ? l : {},
|
|
330
330
|
dataItemKey: t.gridProps.dataItemKey
|
|
331
331
|
});
|
|
332
332
|
if (o === t.gridProps.select)
|
|
333
333
|
return;
|
|
334
|
-
const r = e.target, i = ue(r, "TD"),
|
|
335
|
-
if (
|
|
336
|
-
const
|
|
337
|
-
t.gridProps.onSelectionChange &&
|
|
334
|
+
const r = e.target, i = ue(r, "TD"), a = ue(r, "TR"), c = dn(i), f = cn(a);
|
|
335
|
+
if (c !== void 0 && f !== void 0) {
|
|
336
|
+
const s = (u = Rn(t.gridProps.data)) == null ? void 0 : u[f];
|
|
337
|
+
t.gridProps.onSelectionChange && g(t.gridProps.onSelectionChange, {
|
|
338
338
|
...n,
|
|
339
339
|
select: o,
|
|
340
|
-
dataItem:
|
|
341
|
-
startRowIndex:
|
|
342
|
-
startColIndex:
|
|
343
|
-
startDataItem:
|
|
344
|
-
endDataItem:
|
|
345
|
-
endRowIndex:
|
|
346
|
-
endColIndex:
|
|
340
|
+
dataItem: s,
|
|
341
|
+
startRowIndex: f,
|
|
342
|
+
startColIndex: c,
|
|
343
|
+
startDataItem: s,
|
|
344
|
+
endDataItem: s,
|
|
345
|
+
endRowIndex: f,
|
|
346
|
+
endColIndex: c,
|
|
347
347
|
ctrlKey: e.ctrlKey,
|
|
348
348
|
altKey: e.altKey,
|
|
349
349
|
metaKey: e.metaKey,
|
|
@@ -351,47 +351,47 @@ const kn = (t, I, h, S) => {
|
|
|
351
351
|
isDrag: !1
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
},
|
|
355
|
-
if (t.gridProps.onHeaderSelectionChange &&
|
|
356
|
-
const n =
|
|
357
|
-
|
|
354
|
+
}, ct = (e) => {
|
|
355
|
+
if (t.gridProps.onHeaderSelectionChange && h.enabled) {
|
|
356
|
+
const n = w();
|
|
357
|
+
g(t.gridProps.onHeaderSelectionChange, {
|
|
358
358
|
select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey && Z(t.gridProps.dataItemKey)(r) !== void 0 && (o[Z(t.gridProps.dataItemKey)(r)] = !0), o), {}) : {},
|
|
359
359
|
field: e.field,
|
|
360
360
|
nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
|
|
361
361
|
syntheticEvent: e.syntheticEvent,
|
|
362
|
-
target:
|
|
362
|
+
target: y.current,
|
|
363
363
|
dataItems: n
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
|
-
},
|
|
367
|
-
t.gridProps.onSelectionChange &&
|
|
366
|
+
}, N = (e, n) => {
|
|
367
|
+
t.gridProps.onSelectionChange && h.enabled && g(t.gridProps.onSelectionChange, {
|
|
368
368
|
...e,
|
|
369
369
|
select: n
|
|
370
370
|
});
|
|
371
|
-
},
|
|
371
|
+
}, lt = (e) => {
|
|
372
372
|
var n;
|
|
373
|
-
if (t.gridProps.onSelectionChange &&
|
|
374
|
-
const o =
|
|
373
|
+
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
374
|
+
const o = w()[e.startRowIndex], r = w()[e.endRowIndex], i = {
|
|
375
375
|
syntheticEvent: void 0,
|
|
376
|
-
target:
|
|
376
|
+
target: y.current,
|
|
377
377
|
selectedField: "",
|
|
378
378
|
componentId: t.id,
|
|
379
|
-
dataItems:
|
|
379
|
+
dataItems: w(),
|
|
380
380
|
dataItem: null,
|
|
381
381
|
startDataItem: o,
|
|
382
382
|
endDataItem: r,
|
|
383
383
|
...e
|
|
384
|
-
},
|
|
384
|
+
}, a = Ve({
|
|
385
385
|
event: i,
|
|
386
386
|
selectedState: (n = t.gridProps.select) != null ? n : {},
|
|
387
387
|
// Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
|
|
388
388
|
// it does work correctly even without it
|
|
389
389
|
dataItemKey: t.gridProps.dataItemKey
|
|
390
390
|
});
|
|
391
|
-
|
|
391
|
+
N(i, a);
|
|
392
392
|
}
|
|
393
393
|
}, st = (e) => {
|
|
394
|
-
if (t.gridProps.onSelectionChange &&
|
|
394
|
+
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
395
395
|
const n = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], r = {}, i = {
|
|
396
396
|
...e,
|
|
397
397
|
startDataItem: n,
|
|
@@ -401,33 +401,33 @@ const kn = (t, I, h, S) => {
|
|
|
401
401
|
startColIndex: 0,
|
|
402
402
|
endColIndex: t.columnsRef.length - 1
|
|
403
403
|
};
|
|
404
|
-
e.dataItems.forEach((
|
|
405
|
-
const
|
|
406
|
-
r[
|
|
407
|
-
}),
|
|
404
|
+
e.dataItems.forEach((a) => {
|
|
405
|
+
const f = Z(t.gridProps.dataItemKey)(a);
|
|
406
|
+
r[f] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
|
|
407
|
+
}), N(i, r);
|
|
408
408
|
}
|
|
409
409
|
}, ut = (e) => {
|
|
410
|
-
if (t.gridProps.onSelectionChange &&
|
|
411
|
-
const o = Z(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1,
|
|
412
|
-
(
|
|
413
|
-
),
|
|
410
|
+
if (t.gridProps.onSelectionChange && h.enabled) {
|
|
411
|
+
const o = Z(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
|
|
412
|
+
(s) => s[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
|
|
413
|
+
), l = {
|
|
414
414
|
...e,
|
|
415
|
-
startDataItem:
|
|
416
|
-
endDataItem:
|
|
417
|
-
startRowIndex:
|
|
418
|
-
endRowIndex:
|
|
415
|
+
startDataItem: a,
|
|
416
|
+
endDataItem: a,
|
|
417
|
+
startRowIndex: a,
|
|
418
|
+
endRowIndex: a,
|
|
419
419
|
startColIndex: r,
|
|
420
420
|
endColIndex: i
|
|
421
|
-
},
|
|
422
|
-
|
|
421
|
+
}, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
|
|
422
|
+
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, N(l, u);
|
|
423
423
|
}
|
|
424
424
|
}, gt = (e) => {
|
|
425
|
-
if (!
|
|
425
|
+
if (!h.enabled)
|
|
426
426
|
return;
|
|
427
|
-
const n =
|
|
427
|
+
const n = w(), o = {
|
|
428
428
|
syntheticEvent: void 0,
|
|
429
429
|
nativeEvent: void 0,
|
|
430
|
-
target:
|
|
430
|
+
target: y.current,
|
|
431
431
|
selectedField: "",
|
|
432
432
|
componentId: t.id,
|
|
433
433
|
dataItems: n,
|
|
@@ -439,18 +439,18 @@ const kn = (t, I, h, S) => {
|
|
|
439
439
|
metaKey: !1,
|
|
440
440
|
shiftKey: !1,
|
|
441
441
|
isDrag: !1,
|
|
442
|
-
mode:
|
|
443
|
-
cell:
|
|
442
|
+
mode: h.mode,
|
|
443
|
+
cell: h.cell
|
|
444
444
|
};
|
|
445
445
|
if (!e || e.length === 0) {
|
|
446
|
-
const
|
|
446
|
+
const s = {
|
|
447
447
|
...o,
|
|
448
448
|
startRowIndex: -1,
|
|
449
449
|
endRowIndex: -1,
|
|
450
450
|
startColIndex: -1,
|
|
451
451
|
endColIndex: -1
|
|
452
452
|
};
|
|
453
|
-
|
|
453
|
+
N(s, {});
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
456
|
const r = qe(
|
|
@@ -459,36 +459,36 @@ const kn = (t, I, h, S) => {
|
|
|
459
459
|
t.columnsRef,
|
|
460
460
|
t.gridProps.dataItemKey
|
|
461
461
|
), i = {};
|
|
462
|
-
Object.keys(r).forEach((
|
|
463
|
-
r[
|
|
462
|
+
Object.keys(r).forEach((s) => {
|
|
463
|
+
r[s] && (i[s] = h.cell ? [...Array(t.columnsRef.length).keys()] : !0);
|
|
464
464
|
});
|
|
465
|
-
let
|
|
465
|
+
let a = -1, c = -1, f = n[0] || null, l = n[n.length - 1] || null;
|
|
466
466
|
if (t.gridProps.dataItemKey) {
|
|
467
|
-
const
|
|
468
|
-
for (let
|
|
469
|
-
const
|
|
470
|
-
|
|
467
|
+
const s = Z(t.gridProps.dataItemKey);
|
|
468
|
+
for (let v = 0; v < n.length; v++) {
|
|
469
|
+
const m = s(n[v]);
|
|
470
|
+
m !== void 0 && r[m] && (a === -1 && (a = v, f = n[v]), c = v, l = n[v]);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const u = {
|
|
474
474
|
...o,
|
|
475
|
-
startRowIndex:
|
|
476
|
-
endRowIndex:
|
|
475
|
+
startRowIndex: a,
|
|
476
|
+
endRowIndex: c,
|
|
477
477
|
startColIndex: 0,
|
|
478
478
|
endColIndex: t.columnsRef.length - 1,
|
|
479
|
-
startDataItem:
|
|
480
|
-
endDataItem:
|
|
479
|
+
startDataItem: f,
|
|
480
|
+
endDataItem: l
|
|
481
481
|
};
|
|
482
|
-
|
|
482
|
+
N(u, i);
|
|
483
483
|
}, ft = (e) => {
|
|
484
|
-
t.gridProps.onSelectionChange &&
|
|
485
|
-
},
|
|
486
|
-
|
|
487
|
-
const
|
|
484
|
+
t.gridProps.onSelectionChange && h.enabled && N(e, {});
|
|
485
|
+
}, B = (e, n, o, r, i) => {
|
|
486
|
+
ht();
|
|
487
|
+
const a = t.gridProps.onDataStateChange;
|
|
488
488
|
if (e) {
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
} else
|
|
489
|
+
const c = { ...R(r), ...n, targetEvent: i };
|
|
490
|
+
g(e, c);
|
|
491
|
+
} else a && g(a, {
|
|
492
492
|
...R(r),
|
|
493
493
|
targetEvent: i || {},
|
|
494
494
|
dataState: {
|
|
@@ -498,7 +498,7 @@ const kn = (t, I, h, S) => {
|
|
|
498
498
|
});
|
|
499
499
|
}, te = (e, n, o) => {
|
|
500
500
|
var r;
|
|
501
|
-
|
|
501
|
+
x && t.gridProps.pageable && ((r = b.current) == null || r.reset()), B(
|
|
502
502
|
t.gridProps.onPageChange,
|
|
503
503
|
{ page: e },
|
|
504
504
|
{ skip: e.skip, take: e.take },
|
|
@@ -507,15 +507,15 @@ const kn = (t, I, h, S) => {
|
|
|
507
507
|
);
|
|
508
508
|
}, mt = (e, n, o) => {
|
|
509
509
|
var r;
|
|
510
|
-
t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip,
|
|
510
|
+
t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, U()) : te(e, n, o);
|
|
511
511
|
}, ge = () => {
|
|
512
512
|
let e = t.gridProps.total || 0;
|
|
513
513
|
return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
|
|
514
|
-
},
|
|
515
|
-
|
|
516
|
-
},
|
|
517
|
-
var i,
|
|
518
|
-
const n = (
|
|
514
|
+
}, ht = () => {
|
|
515
|
+
x && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
|
|
516
|
+
}, Pt = (e) => {
|
|
517
|
+
var i, a;
|
|
518
|
+
const n = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + n, r = ge();
|
|
519
519
|
o < r && te({ skip: o, take: n }, e);
|
|
520
520
|
}, Rt = (e) => {
|
|
521
521
|
var r, i;
|
|
@@ -523,15 +523,15 @@ const kn = (t, I, h, S) => {
|
|
|
523
523
|
o >= 0 && te({ skip: o, take: n }, e);
|
|
524
524
|
}, bt = (e) => {
|
|
525
525
|
te({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
|
|
526
|
-
},
|
|
527
|
-
|
|
526
|
+
}, He = (e, n) => {
|
|
527
|
+
B(
|
|
528
528
|
t.gridProps.onSortChange,
|
|
529
529
|
{ sort: e },
|
|
530
|
-
{ sort: e, ...
|
|
530
|
+
{ sort: e, ...x && !t.gridProps.pageable ? { skip: 0 } : {} },
|
|
531
531
|
n
|
|
532
532
|
);
|
|
533
533
|
}, vt = (e, n) => {
|
|
534
|
-
|
|
534
|
+
B(
|
|
535
535
|
t.gridProps.onFilterChange,
|
|
536
536
|
{ filter: e },
|
|
537
537
|
{ filter: e, skip: 0 },
|
|
@@ -539,7 +539,7 @@ const kn = (t, I, h, S) => {
|
|
|
539
539
|
);
|
|
540
540
|
}, It = (e) => {
|
|
541
541
|
if (!e || e.length === 0) {
|
|
542
|
-
|
|
542
|
+
Te({});
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
545
|
const n = qe(
|
|
@@ -548,9 +548,9 @@ const kn = (t, I, h, S) => {
|
|
|
548
548
|
t.columnsRef,
|
|
549
549
|
t.gridProps.dataItemKey
|
|
550
550
|
);
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
|
|
551
|
+
Te({ ...n });
|
|
552
|
+
}, Te = (e) => {
|
|
553
|
+
B(
|
|
554
554
|
t.gridProps.onHighlightChange,
|
|
555
555
|
{ highlight: e },
|
|
556
556
|
{},
|
|
@@ -560,16 +560,16 @@ const kn = (t, I, h, S) => {
|
|
|
560
560
|
const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
|
|
561
561
|
logic: "or",
|
|
562
562
|
filters: n.filter((i) => i !== void 0).map((i) => {
|
|
563
|
-
var
|
|
563
|
+
var a;
|
|
564
564
|
return typeof i == "string" ? { field: i, value: o, operator: "contains" } : {
|
|
565
565
|
value: o,
|
|
566
|
-
operator: (
|
|
566
|
+
operator: (a = i.operator) != null ? a : "contains",
|
|
567
567
|
field: i.field,
|
|
568
568
|
ignoreCase: i.ignoreCase
|
|
569
569
|
};
|
|
570
570
|
})
|
|
571
571
|
};
|
|
572
|
-
|
|
572
|
+
B(
|
|
573
573
|
t.gridProps.onSearchChange,
|
|
574
574
|
{
|
|
575
575
|
search: r
|
|
@@ -579,111 +579,129 @@ const kn = (t, I, h, S) => {
|
|
|
579
579
|
);
|
|
580
580
|
}, fe = () => {
|
|
581
581
|
var e;
|
|
582
|
-
(e =
|
|
582
|
+
(e = O.current) == null || e.save();
|
|
583
583
|
}, Et = async (e) => {
|
|
584
584
|
var n, o;
|
|
585
585
|
(n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
|
|
586
586
|
}, me = (e, n) => {
|
|
587
587
|
const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
|
|
588
588
|
let r = {};
|
|
589
|
-
t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (ve.current = !0),
|
|
589
|
+
t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (ve.current = !0), B(
|
|
590
590
|
t.gridProps.onGroupChange,
|
|
591
591
|
{ group: e },
|
|
592
592
|
{ group: e, skip: 0, ...r },
|
|
593
593
|
o
|
|
594
594
|
);
|
|
595
|
-
},
|
|
595
|
+
}, he = (e) => {
|
|
596
596
|
if (t.gridProps.onColumnsStateChange) {
|
|
597
597
|
const n = {
|
|
598
|
-
target:
|
|
598
|
+
target: y.current,
|
|
599
599
|
columnsState: e
|
|
600
600
|
};
|
|
601
|
-
|
|
601
|
+
g(t.gridProps.onColumnsStateChange, n);
|
|
602
602
|
}
|
|
603
603
|
}, ne = (e, n, o) => {
|
|
604
|
-
const { columnsRef: r, columnsState: i } = t,
|
|
604
|
+
const { columnsRef: r, columnsState: i } = t, a = r[e], c = bn(i), f = a.depth, l = (m) => {
|
|
605
605
|
do
|
|
606
|
-
|
|
607
|
-
while (
|
|
608
|
-
return
|
|
609
|
-
},
|
|
610
|
-
r.splice(e < n ?
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
|
|
606
|
+
m++;
|
|
607
|
+
while (m < r.length && r[m].depth > f);
|
|
608
|
+
return m;
|
|
609
|
+
}, u = r.splice(e, l(e) - e);
|
|
610
|
+
r.splice(e < n ? l(n - u.length) : n, 0, ...u), r.filter((m) => m.declarationIndex >= 0).forEach((m, S) => {
|
|
611
|
+
m.orderIndex = S;
|
|
612
|
+
const z = c.find((Y) => Y.id === m.id);
|
|
613
|
+
z && (z.orderIndex = S);
|
|
614
614
|
});
|
|
615
|
-
const
|
|
616
|
-
|
|
617
|
-
const
|
|
618
|
-
if (
|
|
619
|
-
const
|
|
620
|
-
target:
|
|
621
|
-
columns:
|
|
622
|
-
columnId:
|
|
615
|
+
const s = r[e].locked && r[n].locked;
|
|
616
|
+
ln(t.columnsMapRef, r, s || ce.current), sn(t.columnsMapRef, r, s || ce.current), be.current && (ce.current = !1, be.current = !1);
|
|
617
|
+
const v = ee();
|
|
618
|
+
if (U(), t.gridProps.onColumnReorder) {
|
|
619
|
+
const m = {
|
|
620
|
+
target: y.current,
|
|
621
|
+
columns: v,
|
|
622
|
+
columnId: a.id,
|
|
623
623
|
nativeEvent: o
|
|
624
624
|
};
|
|
625
|
-
|
|
625
|
+
g(t.gridProps.onColumnReorder, m);
|
|
626
626
|
}
|
|
627
|
-
|
|
628
|
-
},
|
|
627
|
+
he(i);
|
|
628
|
+
}, J = (e, n, o) => {
|
|
629
629
|
const r = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
|
|
630
|
-
if (o === "forbidden" || !r ||
|
|
630
|
+
if (o === "forbidden" || !r || !X.current)
|
|
631
631
|
return;
|
|
632
632
|
const i = t.dataRef[n];
|
|
633
|
-
t.gridProps.onRowReorder &&
|
|
634
|
-
draggedDataItems: [
|
|
633
|
+
t.gridProps.onRowReorder && g(t.gridProps.onRowReorder, {
|
|
634
|
+
draggedDataItems: [X.current],
|
|
635
635
|
droppedDataItem: i == null ? void 0 : i.dataItem,
|
|
636
636
|
dropPosition: o,
|
|
637
637
|
nativeEvent: e.originalEvent,
|
|
638
638
|
dragEvent: e,
|
|
639
|
-
target:
|
|
640
|
-
}),
|
|
639
|
+
target: y.current
|
|
640
|
+
}), X.current = null;
|
|
641
641
|
}, wt = (e, n, o) => {
|
|
642
642
|
if (t.gridProps.group === void 0)
|
|
643
643
|
return;
|
|
644
644
|
const r = t.gridProps.group.slice();
|
|
645
645
|
r.splice(n, 0, ...r.splice(e, 1)), me(r, o);
|
|
646
|
-
},
|
|
646
|
+
}, Ge = (e, n, o) => {
|
|
647
647
|
const r = t.columnsRef[e].field;
|
|
648
648
|
if (!r)
|
|
649
649
|
return;
|
|
650
650
|
const i = (t.gridProps.group || []).slice();
|
|
651
651
|
i.splice(n, 0, { field: r }), me(i, o);
|
|
652
652
|
}, yt = (e, n) => {
|
|
653
|
-
const o =
|
|
654
|
-
|
|
655
|
-
},
|
|
653
|
+
const o = H.current.getCurrentGroupsLength;
|
|
654
|
+
Ge(e, o, n);
|
|
655
|
+
}, Pe = () => {
|
|
656
|
+
var o, r, i, a, c, f;
|
|
657
|
+
if (t.gridProps.dataLayoutMode === "stacked") {
|
|
658
|
+
const l = ((o = M.current) == null ? void 0 : o.offsetWidth) || 0;
|
|
659
|
+
if ((r = C.current) != null && r.colGroupMain && l) {
|
|
660
|
+
const u = C.current.colGroupMain.children, s = u.length - 1;
|
|
661
|
+
if (s >= 0) {
|
|
662
|
+
let v = 0;
|
|
663
|
+
for (let S = 0; S < s; S++) {
|
|
664
|
+
const z = parseFloat((u[S].width || 0).toString()) || u[S].clientWidth;
|
|
665
|
+
v += z;
|
|
666
|
+
}
|
|
667
|
+
const m = Math.max(0, l - v);
|
|
668
|
+
u[s].width = m + "px", (a = (i = C.current.colGroupHeader) == null ? void 0 : i.children) != null && a[s] && (C.current.colGroupHeader.children[s].width = m + "px"), (f = (c = C.current.colGroupFooter) == null ? void 0 : c.children) != null && f[s] && (C.current.colGroupFooter.children[s].width = m + "px");
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
F.current && F.current.setWidth(l), L.current && L.current.setWidth(l), A.current && (A.current.style.width = l ? l + "px" : "");
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
656
674
|
let e = 0;
|
|
657
|
-
if (!
|
|
675
|
+
if (!C.current.colGroupMain)
|
|
658
676
|
return;
|
|
659
|
-
const n =
|
|
660
|
-
for (let
|
|
661
|
-
const
|
|
662
|
-
if (!
|
|
677
|
+
const n = C.current.colGroupMain.children;
|
|
678
|
+
for (let l = 0; l < n.length; l++) {
|
|
679
|
+
const u = n[l].width;
|
|
680
|
+
if (!u) {
|
|
663
681
|
e = 0;
|
|
664
682
|
break;
|
|
665
683
|
}
|
|
666
|
-
e += parseFloat(
|
|
684
|
+
e += parseFloat(u.toString());
|
|
667
685
|
}
|
|
668
|
-
e = Math.round(e),
|
|
669
|
-
},
|
|
686
|
+
e = Math.round(e), F.current && F.current.setWidth(e), L.current && L.current.setWidth(e), A.current && (A.current.style.width = e ? e + "px" : "");
|
|
687
|
+
}, Ae = () => {
|
|
670
688
|
var e;
|
|
671
|
-
t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e =
|
|
689
|
+
t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0);
|
|
672
690
|
}, re = () => {
|
|
673
691
|
var e;
|
|
674
|
-
t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e =
|
|
692
|
+
t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = G.current) == null ? void 0 : e.offsetHeight) || 0);
|
|
675
693
|
}, xt = () => {
|
|
676
694
|
const e = t.gridProps.minRowHeightRef;
|
|
677
695
|
if (e && !e.current && !t.gridProps.rowHeight) {
|
|
678
|
-
const n = vn(
|
|
679
|
-
n && (e.current = n,
|
|
696
|
+
const n = vn(q.current);
|
|
697
|
+
n && (e.current = n, U());
|
|
680
698
|
}
|
|
681
|
-
}, oe =
|
|
699
|
+
}, oe = d.useCallback(
|
|
682
700
|
(e, n, o, r, i) => {
|
|
683
|
-
var
|
|
701
|
+
var l;
|
|
684
702
|
if (!St() && !o || !e)
|
|
685
703
|
return;
|
|
686
|
-
const
|
|
704
|
+
const a = {
|
|
687
705
|
type: e,
|
|
688
706
|
nativeEvent: n,
|
|
689
707
|
columns: t.columnsRef,
|
|
@@ -692,15 +710,15 @@ const kn = (t, I, h, S) => {
|
|
|
692
710
|
field: i,
|
|
693
711
|
...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
|
|
694
712
|
...o
|
|
695
|
-
},
|
|
696
|
-
event:
|
|
697
|
-
data:
|
|
698
|
-
selectedState: (
|
|
699
|
-
previousCopiedItems:
|
|
713
|
+
}, c = w(), f = Xt({
|
|
714
|
+
event: a,
|
|
715
|
+
data: c,
|
|
716
|
+
selectedState: (l = t.gridProps.select) != null ? l : {},
|
|
717
|
+
previousCopiedItems: We.current
|
|
700
718
|
});
|
|
701
|
-
e !== ke.paste && (
|
|
702
|
-
...
|
|
703
|
-
...
|
|
719
|
+
e !== ke.paste && (We.current = f.copiedItems), t.gridProps.onClipboard && E && g(t.gridProps.onClipboard, {
|
|
720
|
+
...a,
|
|
721
|
+
...f
|
|
704
722
|
});
|
|
705
723
|
},
|
|
706
724
|
[
|
|
@@ -711,22 +729,22 @@ const kn = (t, I, h, S) => {
|
|
|
711
729
|
t.gridProps.onClipboard
|
|
712
730
|
]
|
|
713
731
|
), St = () => {
|
|
714
|
-
var i,
|
|
732
|
+
var i, a, c;
|
|
715
733
|
if (!Q)
|
|
716
734
|
return !1;
|
|
717
|
-
const e = jt(
|
|
735
|
+
const e = jt(K()), n = e ? e.matches(".k-table-td") ? e : (i = K()) == null ? void 0 : i.body : (a = K()) == null ? void 0 : a.body, o = n.closest(".k-grid-container"), r = n && ((c = M.current) == null ? void 0 : c.contains(n));
|
|
718
736
|
return !!(n && r && o);
|
|
719
|
-
}, Le = (e, n, o, r, i,
|
|
720
|
-
|
|
737
|
+
}, Le = (e, n, o, r, i, a, c) => {
|
|
738
|
+
Pe(), ce.current = !0, be.current = !0, t.gridProps.onColumnResize && E && g(t.gridProps.onColumnResize, {
|
|
721
739
|
columns: ee(),
|
|
722
740
|
nativeEvent: r,
|
|
723
|
-
targetColumnId:
|
|
741
|
+
targetColumnId: c,
|
|
724
742
|
index: e,
|
|
725
743
|
newWidth: n,
|
|
726
744
|
oldWidth: o,
|
|
727
745
|
end: i,
|
|
728
|
-
target:
|
|
729
|
-
}), i &&
|
|
746
|
+
target: y.current
|
|
747
|
+
}), i && he(a);
|
|
730
748
|
}, kt = () => {
|
|
731
749
|
var e;
|
|
732
750
|
return {
|
|
@@ -739,7 +757,7 @@ const kn = (t, I, h, S) => {
|
|
|
739
757
|
}, R = (e) => ({
|
|
740
758
|
nativeEvent: e && e.nativeEvent,
|
|
741
759
|
syntheticEvent: e,
|
|
742
|
-
target:
|
|
760
|
+
target: y.current
|
|
743
761
|
}), Dt = (e) => ({
|
|
744
762
|
...e,
|
|
745
763
|
nativeEvent: void 0,
|
|
@@ -747,7 +765,7 @@ const kn = (t, I, h, S) => {
|
|
|
747
765
|
target: void 0,
|
|
748
766
|
targetEvent: void 0,
|
|
749
767
|
focusElement: void 0
|
|
750
|
-
}),
|
|
768
|
+
}), g = (e, n) => {
|
|
751
769
|
if (t.gridProps.isClient) {
|
|
752
770
|
e(n);
|
|
753
771
|
return;
|
|
@@ -755,40 +773,40 @@ const kn = (t, I, h, S) => {
|
|
|
755
773
|
e(Dt(n));
|
|
756
774
|
}, Kt = () => {
|
|
757
775
|
var e, n, o;
|
|
758
|
-
if (
|
|
776
|
+
if (q.current && ((e = q.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
|
|
759
777
|
Ce.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? Ie.current = document.activeElement : Ie.current = void 0;
|
|
760
|
-
const r = Array.from((o =
|
|
778
|
+
const r = Array.from((o = q.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
|
|
761
779
|
r.length > xe.current.length ? de.current = r.filter(
|
|
762
780
|
(i) => !xe.current.includes(i)
|
|
763
781
|
)[0] : r.length === 1 && (de.current = r[0], Ce.current = !0), xe.current = r;
|
|
764
782
|
}
|
|
765
|
-
},
|
|
783
|
+
}, w = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), K = () => {
|
|
766
784
|
var e;
|
|
767
785
|
if (Q)
|
|
768
786
|
return ((e = ie()) == null ? void 0 : e.ownerDocument) || document;
|
|
769
|
-
}, ie = () =>
|
|
787
|
+
}, ie = () => M.current, Re = d.useCallback(
|
|
770
788
|
(e) => {
|
|
771
789
|
var r, i;
|
|
772
790
|
if (!b.current || !((r = b.current) != null && r.container) || t.gridProps.scrollable === "none")
|
|
773
791
|
return;
|
|
774
|
-
|
|
792
|
+
j.current && j.current.disconnect();
|
|
775
793
|
const { rowIndex: n } = e, o = ie();
|
|
776
|
-
if (
|
|
777
|
-
const
|
|
778
|
-
b.current.container.scroll(0,
|
|
794
|
+
if (x) {
|
|
795
|
+
const a = ((i = b.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
|
|
796
|
+
b.current.container.scroll(0, a);
|
|
779
797
|
} else if (o) {
|
|
780
|
-
const
|
|
781
|
-
|
|
798
|
+
const a = n < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${n + 1})`);
|
|
799
|
+
a && G.current && (G.current.scrollTop = a.offsetTop);
|
|
782
800
|
}
|
|
783
801
|
},
|
|
784
802
|
[t.gridProps.scrollable]
|
|
785
|
-
),
|
|
786
|
-
|
|
787
|
-
},
|
|
788
|
-
var
|
|
789
|
-
const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = b.current, i = t.gridProps.rowHeight || ((
|
|
790
|
-
r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = mt, r.pageSize = n, r.scrollableVirtual =
|
|
791
|
-
},
|
|
803
|
+
), Fe = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), Mt = () => Fe(Ot) === Fe(t.columnsRef), Ht = () => {
|
|
804
|
+
le.current = window.innerWidth, Mt() || U();
|
|
805
|
+
}, Tt = () => {
|
|
806
|
+
var a;
|
|
807
|
+
const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = b.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
|
|
808
|
+
r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = mt, r.pageSize = n, r.scrollableVirtual = x, r.container = G.current, r.tableBody = q.current, r.scrollHeightContainer = Oe.current, r.table = A.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new $t(e, i)));
|
|
809
|
+
}, ze = d.useCallback(
|
|
792
810
|
(e) => {
|
|
793
811
|
const n = { rowIndex: ye.current };
|
|
794
812
|
e.forEach((o) => {
|
|
@@ -796,17 +814,17 @@ const kn = (t, I, h, S) => {
|
|
|
796
814
|
});
|
|
797
815
|
},
|
|
798
816
|
[Re]
|
|
799
|
-
),
|
|
817
|
+
), U = () => {
|
|
800
818
|
t.gridProps.forceUpdate && t.gridProps.forceUpdate();
|
|
801
|
-
},
|
|
802
|
-
return
|
|
803
|
-
|
|
819
|
+
}, Gt = (e) => e.left !== void 0 ? Se !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, y = d.useRef(null), b = d.useRef(void 0), C = d.useRef(void 0), H = d.useRef(void 0), T = d.useRef(void 0), V = d.useRef(void 0), ae = d.useRef(void 0), j = d.useRef(null), q = d.useRef(null), At = d.useRef(null), G = d.useRef(null), A = d.useRef(null), Lt = d.useRef(null), M = d.useRef(null), Oe = d.useRef(null), L = d.useRef(null), F = d.useRef(null), be = d.useRef(!1), ve = d.useRef(!1), de = d.useRef(void 0), Ie = d.useRef(void 0), Ce = d.useRef(!1), ce = d.useRef(!0), Ee = d.useRef(0), we = d.useRef(void 0), ye = d.useRef(void 0), xe = d.useRef([]), We = d.useRef([]), le = d.useRef(0), X = d.useRef(null), Ft = d.useRef(null), zt = d.useRef(null), Se = qt(M), x = t.isVirtualScroll, Ot = d.useMemo(() => d.Children.toArray(t.gridProps.children), [t.gridProps.children]), Ne = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, h = se(t.gridProps.selectable), Be = Yt(t.gridProps.editable), Wt = le.current && $ && le.current <= $.medium && t.gridProps.adaptive;
|
|
820
|
+
return d.useMemo(() => {
|
|
821
|
+
_.onConstructor({
|
|
804
822
|
navigatable: !!t.gridProps.navigatable,
|
|
805
|
-
contextStateRef:
|
|
806
|
-
navigationStateRef:
|
|
823
|
+
contextStateRef: T,
|
|
824
|
+
navigationStateRef: V,
|
|
807
825
|
idPrefix: t.id
|
|
808
826
|
}), b.current = new In();
|
|
809
|
-
}, []),
|
|
827
|
+
}, []), d.useMemo(() => {
|
|
810
828
|
var e;
|
|
811
829
|
(e = b.current) == null || e.reset();
|
|
812
830
|
}, [
|
|
@@ -814,60 +832,60 @@ const kn = (t, I, h, S) => {
|
|
|
814
832
|
t.gridProps.total,
|
|
815
833
|
t.gridProps.filter,
|
|
816
834
|
t.gridProps.group,
|
|
817
|
-
|
|
835
|
+
Ne,
|
|
818
836
|
t.gridProps.sort,
|
|
819
837
|
t.gridProps.rowHeight
|
|
820
|
-
]),
|
|
821
|
-
ae.current && ae.current.removeEventListeners(
|
|
822
|
-
}), [t.gridProps.onClipboard, t.gridProps.clipboard, oe,
|
|
823
|
-
scope:
|
|
824
|
-
contextStateRef:
|
|
825
|
-
navigationStateRef:
|
|
838
|
+
]), d.useEffect(() => (t.gridProps.clipboard && (ae.current = new Qt(oe), ae.current.addEventListeners(K())), () => {
|
|
839
|
+
ae.current && ae.current.removeEventListeners(K());
|
|
840
|
+
}), [t.gridProps.onClipboard, t.gridProps.clipboard, oe, K]), d.useEffect(() => (Ae(), Pe(), Ue(), _.onComponentDidMount({
|
|
841
|
+
scope: M.current || void 0,
|
|
842
|
+
contextStateRef: T,
|
|
843
|
+
navigationStateRef: V
|
|
826
844
|
}), () => {
|
|
827
845
|
clearTimeout(we.current);
|
|
828
|
-
}), []),
|
|
846
|
+
}), []), d.useEffect(() => {
|
|
829
847
|
var e;
|
|
830
|
-
|
|
831
|
-
scope:
|
|
832
|
-
contextStateRef:
|
|
833
|
-
navigationStateRef:
|
|
848
|
+
Ae(), Pe(), Ue(), x && (re(), xt(), (e = b.current) == null || e.update()), Kt(), _.onComponentDidUpdate({
|
|
849
|
+
scope: M.current || void 0,
|
|
850
|
+
contextStateRef: T,
|
|
851
|
+
navigationStateRef: V,
|
|
834
852
|
focusFirst: ve.current,
|
|
835
853
|
newEditableRow: de.current,
|
|
836
854
|
singleEditRow: Ce.current,
|
|
837
855
|
lastActiveElement: Ie.current,
|
|
838
856
|
navigatable: t.gridProps.navigatable
|
|
839
857
|
}), ve.current = !1, de.current = void 0;
|
|
840
|
-
}),
|
|
858
|
+
}), d.useEffect(() => {
|
|
841
859
|
if (Q) {
|
|
842
860
|
const e = {
|
|
843
861
|
rootMargin: "0px",
|
|
844
862
|
threshold: 0.9
|
|
845
863
|
};
|
|
846
|
-
|
|
864
|
+
j.current = window.IntersectionObserver && new window.IntersectionObserver(ze, e) || null;
|
|
847
865
|
}
|
|
848
|
-
}, [
|
|
866
|
+
}, [ze]), d.useEffect(() => {
|
|
849
867
|
var n;
|
|
850
868
|
let e;
|
|
851
869
|
return Q && window.ResizeObserver && (e = new window.ResizeObserver(() => {
|
|
852
|
-
|
|
853
|
-
}), e.observe((n =
|
|
870
|
+
Ht(), x && re();
|
|
871
|
+
}), e.observe((n = K()) == null ? void 0 : n.body)), () => {
|
|
854
872
|
e == null || e.disconnect();
|
|
855
873
|
};
|
|
856
|
-
}, []),
|
|
857
|
-
if (!Q || !window.ResizeObserver || !
|
|
874
|
+
}, []), d.useEffect(() => {
|
|
875
|
+
if (!Q || !window.ResizeObserver || !x || !G.current)
|
|
858
876
|
return;
|
|
859
877
|
const e = () => {
|
|
860
|
-
var i,
|
|
878
|
+
var i, a;
|
|
861
879
|
const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
|
|
862
880
|
re();
|
|
863
|
-
const r = ((
|
|
864
|
-
(o === 0 && r > 0 || Math.abs(r - o) > 10) &&
|
|
881
|
+
const r = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
|
|
882
|
+
(o === 0 && r > 0 || Math.abs(r - o) > 10) && U();
|
|
865
883
|
}, n = new window.ResizeObserver(e);
|
|
866
|
-
return n.observe(
|
|
884
|
+
return n.observe(G.current), () => {
|
|
867
885
|
n.disconnect();
|
|
868
886
|
};
|
|
869
|
-
}, [
|
|
870
|
-
|
|
887
|
+
}, [x, re]), d.useImperativeHandle(
|
|
888
|
+
y,
|
|
871
889
|
() => ({
|
|
872
890
|
get element() {
|
|
873
891
|
return ie();
|
|
@@ -883,51 +901,51 @@ const kn = (t, I, h, S) => {
|
|
|
883
901
|
const { rowIndex: n } = e;
|
|
884
902
|
ye.current = n;
|
|
885
903
|
const o = ie();
|
|
886
|
-
if (
|
|
887
|
-
|
|
904
|
+
if (j.current && o) {
|
|
905
|
+
j.current.disconnect();
|
|
888
906
|
const i = o.querySelector(`[absolute-row-index="${ye.current}"]`);
|
|
889
|
-
i ?
|
|
907
|
+
i ? j.current.observe(i) : Re(e);
|
|
890
908
|
}
|
|
891
909
|
},
|
|
892
910
|
fitColumns: (e) => {
|
|
893
|
-
|
|
911
|
+
C.current.dblClickHandler(null, e);
|
|
894
912
|
},
|
|
895
913
|
exportAsPdf: fe,
|
|
896
914
|
getTotal: ge,
|
|
897
|
-
getLeafDataItems:
|
|
915
|
+
getLeafDataItems: w
|
|
898
916
|
})
|
|
899
|
-
),
|
|
900
|
-
|
|
901
|
-
}, [t.gridProps.onColumnResize, t.columnsRef]),
|
|
902
|
-
|
|
917
|
+
), d.useImperativeHandle(t.gridRef, () => y.current), d.useMemo(() => {
|
|
918
|
+
C.current = new un(Le);
|
|
919
|
+
}, [t.gridProps.onColumnResize, t.columnsRef]), d.useMemo(() => {
|
|
920
|
+
H.current = new gn(ne, wt, Ge);
|
|
903
921
|
}, [
|
|
904
922
|
t.gridProps.onColumnReorder,
|
|
905
923
|
t.gridProps.onGroupChange,
|
|
906
924
|
t.gridProps.group,
|
|
907
925
|
t.columnsRef,
|
|
908
926
|
t.gridProps.groupable
|
|
909
|
-
]),
|
|
927
|
+
]), C.current.resizable = t.gridProps.resizable || !1, C.current.columns = t.columnsRef, C.current.columnsState = _t(t.columnsState), H.current.reorderable = t.gridProps.reorderable || !1, H.current.groupable = Ne, H.current.columns = t.columnsRef, H.current.dir = Se, Tt(), /* @__PURE__ */ d.createElement(
|
|
910
928
|
xn.Provider,
|
|
911
929
|
{
|
|
912
930
|
value: {
|
|
913
|
-
isClient:
|
|
914
|
-
rowReorder:
|
|
915
|
-
activeDragRowDataItemRef:
|
|
916
|
-
reorderRowDragTargetRef:
|
|
917
|
-
reorderRowDropTargetRef:
|
|
931
|
+
isClient: E,
|
|
932
|
+
rowReorder: J,
|
|
933
|
+
activeDragRowDataItemRef: X,
|
|
934
|
+
reorderRowDragTargetRef: Ft,
|
|
935
|
+
reorderRowDropTargetRef: zt,
|
|
918
936
|
dir: Se,
|
|
919
|
-
getCellPositionStyle:
|
|
937
|
+
getCellPositionStyle: Gt,
|
|
920
938
|
dataItemKey: t.gridProps.dataItemKey,
|
|
921
939
|
columnsState: t.columnsState,
|
|
922
940
|
columnsRef: t.columnsRef,
|
|
923
941
|
hiddenColumnsRef: t.hiddenColumnsRef,
|
|
924
|
-
onColumnsStateChange:
|
|
942
|
+
onColumnsStateChange: he,
|
|
925
943
|
groupable: t.gridProps.groupable,
|
|
926
944
|
group: t.gridProps.group,
|
|
927
945
|
reorderable: t.gridProps.reorderable,
|
|
928
946
|
defaultGroup: t.gridProps.defaultGroup,
|
|
929
947
|
groupChange: me,
|
|
930
|
-
selectionRelease:
|
|
948
|
+
selectionRelease: lt,
|
|
931
949
|
pagerPageChange: bt,
|
|
932
950
|
onContextMenu: $e,
|
|
933
951
|
rowClick: Ze,
|
|
@@ -947,12 +965,12 @@ const kn = (t, I, h, S) => {
|
|
|
947
965
|
skip: t.gridProps.skip,
|
|
948
966
|
take: t.gridProps.take,
|
|
949
967
|
defaultSort: t.gridProps.defaultSort,
|
|
950
|
-
sortChange:
|
|
968
|
+
sortChange: He,
|
|
951
969
|
filterable: t.gridProps.filterable,
|
|
952
970
|
filter: t.gridProps.filter,
|
|
953
971
|
defaultFilter: t.gridProps.defaultFilter,
|
|
954
972
|
filterOperators: t.gridProps.filterOperators || Sn,
|
|
955
|
-
getLeafDataItems:
|
|
973
|
+
getLeafDataItems: w,
|
|
956
974
|
filterChange: vt,
|
|
957
975
|
applyHighlightDescriptor: It,
|
|
958
976
|
applySelectionDescriptor: gt,
|
|
@@ -960,58 +978,58 @@ const kn = (t, I, h, S) => {
|
|
|
960
978
|
select: t.gridProps.select,
|
|
961
979
|
searchChange: Ct,
|
|
962
980
|
exportAsPdf: fe,
|
|
963
|
-
onHeaderSelectionChange:
|
|
981
|
+
onHeaderSelectionChange: ct,
|
|
964
982
|
columnGroupChange: yt,
|
|
965
983
|
onKeyDown: Xe,
|
|
966
984
|
onFocus: Ye,
|
|
967
985
|
scrollHandler: Je,
|
|
968
986
|
selectionChange: at,
|
|
969
|
-
mobileMode:
|
|
970
|
-
adaptiveColumnMenuRef:
|
|
987
|
+
mobileMode: Wt,
|
|
988
|
+
adaptiveColumnMenuRef: le.current,
|
|
971
989
|
adpativeTitle: t.gridProps.adaptiveTitle,
|
|
972
990
|
adaptive: t.gridProps.adaptive,
|
|
973
991
|
dispatchDetailExpand: rt,
|
|
974
992
|
dispatchGroupExpand: ot,
|
|
975
|
-
columnResizeRef:
|
|
976
|
-
dragLogicRef:
|
|
977
|
-
navigationStateRef:
|
|
978
|
-
tableElementRef:
|
|
979
|
-
tableBodyElementRef:
|
|
980
|
-
headerElementRef:
|
|
981
|
-
containerElementRef:
|
|
993
|
+
columnResizeRef: C,
|
|
994
|
+
dragLogicRef: H,
|
|
995
|
+
navigationStateRef: V,
|
|
996
|
+
tableElementRef: A,
|
|
997
|
+
tableBodyElementRef: q,
|
|
998
|
+
headerElementRef: At,
|
|
999
|
+
containerElementRef: G,
|
|
982
1000
|
headTableElementRef: Lt,
|
|
983
|
-
elementRef:
|
|
984
|
-
virtualScrollHeightContainerRef:
|
|
985
|
-
footerRef:
|
|
986
|
-
headerRef:
|
|
1001
|
+
elementRef: M,
|
|
1002
|
+
virtualScrollHeightContainerRef: Oe,
|
|
1003
|
+
footerRef: L,
|
|
1004
|
+
headerRef: F,
|
|
987
1005
|
vsRef: b
|
|
988
1006
|
}
|
|
989
1007
|
},
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ d.createElement(Zt.Provider, { value: T.current }, t.children),
|
|
1009
|
+
/* @__PURE__ */ d.createElement(
|
|
992
1010
|
Cn,
|
|
993
1011
|
{
|
|
994
|
-
show:
|
|
995
|
-
dataItem:
|
|
996
|
-
field:
|
|
1012
|
+
show: P.show && (p == null ? void 0 : p.length),
|
|
1013
|
+
dataItem: P.dataItem,
|
|
1014
|
+
field: P.field,
|
|
997
1015
|
items: p,
|
|
998
|
-
offset:
|
|
999
|
-
onClose:
|
|
1016
|
+
offset: P.offset,
|
|
1017
|
+
onClose: W,
|
|
1000
1018
|
onSelect: _e
|
|
1001
1019
|
}
|
|
1002
1020
|
),
|
|
1003
|
-
t.gridProps.pdf && /* @__PURE__ */
|
|
1021
|
+
t.gridProps.pdf && /* @__PURE__ */ d.createElement(
|
|
1004
1022
|
yn,
|
|
1005
1023
|
{
|
|
1006
1024
|
gridProps: t.gridProps,
|
|
1007
1025
|
innerGrid: t.innerGrid,
|
|
1008
1026
|
pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
|
|
1009
1027
|
onPdfExport: Et,
|
|
1010
|
-
ref: (e) =>
|
|
1028
|
+
ref: (e) => O.current = e
|
|
1011
1029
|
}
|
|
1012
1030
|
)
|
|
1013
1031
|
);
|
|
1014
1032
|
};
|
|
1015
1033
|
export {
|
|
1016
|
-
|
|
1034
|
+
Un as GridClientWrapper
|
|
1017
1035
|
};
|