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