@progress/kendo-react-grid 16.2.0-develop.8 → 16.2.0

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.
@@ -8,8 +8,8 @@
8
8
  "use client";
9
9
  import * as c from "react";
10
10
  import { useAdaptiveModeContext as Tr, canUseDOM as J, getActiveElement as Mr, useDir as Gr, setScrollbarWidth as mt, cloneArray as Hr, useWebMcpRegister as Ar, RowHeightService as Fr, getter as X } from "@progress/kendo-react-common";
11
- import { filterBy as Wr } from "@progress/kendo-data-query";
12
- import { getSelectionOptions as xe, populateClipboardData as Lr, ClipboardActionType as Ve, getEditableOptions as Or, tableKeyboardNavigation as ie, ClipboardService as zr, TableKeyboardNavigationContext as Br, updateLeft as pr, updateRight as Nr, getGroupExpandableOptions as jr, groupExpandReducer as Ur, getDetailExpandableOptions as Vr, detailExpandReducer as qr, getSelectedState as Pt, editReducer as $r, EDIT_ACTION as _r, closestTagName as ke, getSelectedStateFromKeyDown as Zr, getColumnIndex as Jr, getRowIndex as Xr } from "@progress/kendo-react-data-tools";
11
+ import { filterBy as Lr } from "@progress/kendo-data-query";
12
+ import { getSelectionOptions as xe, populateClipboardData as Wr, ClipboardActionType as Ve, getEditableOptions as Or, tableKeyboardNavigation as ie, ClipboardService as zr, TableKeyboardNavigationContext as Br, updateLeft as pr, updateRight as Nr, getGroupExpandableOptions as jr, groupExpandReducer as Ur, getDetailExpandableOptions as Vr, detailExpandReducer as qr, getSelectedState as Pt, editReducer as $r, EDIT_ACTION as _r, closestTagName as ke, getSelectedStateFromKeyDown as Zr, getColumnIndex as Jr, getRowIndex as Xr } from "@progress/kendo-react-data-tools";
13
13
  import { ColumnResize as Yr } from "./drag/ColumnResize.mjs";
14
14
  import { CommonDragLogic as Qr } from "./drag/CommonDragLogic.mjs";
15
15
  import { useStickyGroups as en } from "./hooks/useStickyGroups.mjs";
@@ -24,15 +24,15 @@ import { BasePDFExport as Rn } from "./BasePDFExport.mjs";
24
24
  import { BaseCSVExport as bn } from "./BaseCSVExport.mjs";
25
25
  import { GridContext as vn } from "./utils/GridContext.mjs";
26
26
  import { operators as Cn } from "./filterCommon.mjs";
27
- const In = (t, D, p, K) => {
28
- const Y = Object.keys(D.cells).map((M) => p.findIndex((Q) => Q.field === M)), C = Object.keys(D.cells).length > 0 ? Y : !0;
29
- return t.reduce((M, Q) => (M[Q[K != null ? K : "id"]] = C, M), {});
30
- }, Rt = (t, D, p, K) => D.reduce((C, M) => ({
27
+ const In = (t, K, p, S) => {
28
+ const Y = Object.keys(K.cells).map((M) => p.findIndex((Q) => Q.field === M)), C = Object.keys(K.cells).length > 0 ? Y : !0;
29
+ return t.reduce((M, Q) => (M[Q[S != null ? S : "id"]] = C, M), {});
30
+ }, Rt = (t, K, p, S) => K.reduce((C, M) => ({
31
31
  ...C,
32
- ...In(Wr(t, M), M, p, K)
32
+ ...In(Lr(t, M), M, p, S)
33
33
  }), {}), zn = (t) => {
34
34
  var ft;
35
- const D = t.gridProps.isClient, p = typeof t.gridProps.scrollable == "object" ? t.gridProps.scrollable.mode : t.gridProps.scrollable, { overlayScrollbar: K, wheelMultiplier: Y } = sn(t.gridProps.scrollable), [C, M] = c.useState({}), Q = Tr(), qe = c.useRef(null), Ke = c.useRef(null), de = c.useRef({}), bt = (e) => {
35
+ const K = t.gridProps.isClient, p = typeof t.gridProps.scrollable == "object" ? t.gridProps.scrollable.mode : t.gridProps.scrollable, { overlayScrollbar: S, wheelMultiplier: Y } = sn(t.gridProps.scrollable), [C, M] = c.useState({}), Q = Tr(), qe = c.useRef(null), Ke = c.useRef(null), de = c.useRef({}), bt = (e) => {
36
36
  e.event.preventDefault(), M({
37
37
  ...C,
38
38
  show: !0,
@@ -46,7 +46,7 @@ const In = (t, D, p, K) => {
46
46
  }, $e = () => {
47
47
  M({});
48
48
  }, vt = (e) => {
49
- const r = t.gridProps.dataItemKey || "", o = C.dataItem, n = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = r ? o[r] : void 0, d = a !== void 0 && n.some((l) => l[r] === a), s = a !== void 0 && i.some((l) => l[r] === a);
49
+ const r = t.gridProps.dataItemKey || "", n = C.dataItem, o = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = r ? n[r] : void 0, d = a !== void 0 && o.some((l) => l[r] === a), s = a !== void 0 && i.some((l) => l[r] === a);
50
50
  return e.map((l) => {
51
51
  const u = typeof l == "string" ? mn[l] : l;
52
52
  return u && u.name === De.pinRow && u.items ? {
@@ -79,9 +79,9 @@ const In = (t, D, p, K) => {
79
79
  ]), le = c.useMemo(() => {
80
80
  const e = (w == null ? void 0 : w.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(C) : e;
81
81
  if (r && C.offset) {
82
- const o = C.dataItem ? ht.body : ht.head, n = r[o], i = C.dataItem ? Ze : _e;
82
+ const n = C.dataItem ? ht.body : ht.head, o = r[n], i = C.dataItem ? Ze : _e;
83
83
  let a;
84
- return n === !0 || n === void 0 ? a = i : n !== !1 && (a = n), t.gridProps.pinnable && a && C.dataItem ? vt(a) : a;
84
+ return o === !0 || o === void 0 ? a = i : o !== !1 && (a = o), t.gridProps.pinnable && a && C.dataItem ? vt(a) : a;
85
85
  }
86
86
  }, [
87
87
  t.gridProps.contextMenu,
@@ -92,18 +92,18 @@ const In = (t, D, p, K) => {
92
92
  w
93
93
  ]), Ct = (e) => {
94
94
  var d, s, l, u, f, v, R, j, g;
95
- const r = e.event.item, o = {
96
- target: S.current,
95
+ const r = e.event.item, n = {
96
+ target: x.current,
97
97
  syntheticEvent: e.event.syntheticEvent,
98
98
  nativeEvent: e.event.nativeEvent,
99
99
  menuItem: r,
100
100
  ...e
101
101
  };
102
- t.gridProps.onContextMenuItemClick && m(t.gridProps.onContextMenuItemClick, o);
103
- const n = T(), i = {
102
+ t.gridProps.onContextMenuItemClick && m(t.gridProps.onContextMenuItemClick, n);
103
+ const o = T(), i = {
104
104
  selectedField: "",
105
105
  componentId: t.id,
106
- dataItems: n,
106
+ dataItems: o,
107
107
  dataItem: e.dataItem,
108
108
  startRowIndex: -1,
109
109
  endRowIndex: -1,
@@ -115,12 +115,12 @@ const In = (t, D, p, K) => {
115
115
  shiftKey: !1,
116
116
  isDrag: !1,
117
117
  ...xe(t.gridProps.selectable),
118
- ...o
119
- }, a = n.findIndex((k) => k === e.dataItem);
118
+ ...n
119
+ }, a = o.findIndex((D) => D === e.dataItem);
120
120
  switch ((d = r.data) == null ? void 0 : d.action) {
121
121
  case "SortCommand":
122
122
  if (w) {
123
- const k = (s = r.name) == null ? void 0 : s.toLowerCase().includes("asc"), Z = ((l = r.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, B = k ? "asc" : Z, oe = r.name ? B : void 0;
123
+ const D = (s = r.name) == null ? void 0 : s.toLowerCase().includes("asc"), Z = ((l = r.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, B = D ? "asc" : Z, oe = r.name ? B : void 0;
124
124
  Je(e.event.syntheticEvent, w, oe);
125
125
  }
126
126
  break;
@@ -137,7 +137,7 @@ const In = (t, D, p, K) => {
137
137
  Vt(i);
138
138
  break;
139
139
  case "ReorderRowCommand":
140
- ce.current = e.dataItem, (u = r.name) != null && u.toLowerCase().includes("rowup") && a > 0 && ae(e.event.syntheticEvent, a - 1, "before"), (f = r.name) != null && f.toLowerCase().includes("rowdown") && a < n.length - 1 && ae(e.event.syntheticEvent, a + 1, "after"), (v = r.name) != null && v.toLowerCase().includes("rowtop") && ae(e.event.syntheticEvent, 0, "before"), (R = r.name) != null && R.toLowerCase().includes("rowbottom") && ae(e.event.syntheticEvent, n.length - 1, "after");
140
+ ce.current = e.dataItem, (u = r.name) != null && u.toLowerCase().includes("rowup") && a > 0 && ae(e.event.syntheticEvent, a - 1, "before"), (f = r.name) != null && f.toLowerCase().includes("rowdown") && a < o.length - 1 && ae(e.event.syntheticEvent, a + 1, "after"), (v = r.name) != null && v.toLowerCase().includes("rowtop") && ae(e.event.syntheticEvent, 0, "before"), (R = r.name) != null && R.toLowerCase().includes("rowbottom") && ae(e.event.syntheticEvent, o.length - 1, "after");
141
141
  break;
142
142
  case "CopySelectionCommand":
143
143
  Pe(
@@ -175,43 +175,43 @@ const In = (t, D, p, K) => {
175
175
  }, se = () => {
176
176
  const e = t.columnsRef.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
177
177
  return an(e);
178
- }, It = (e, r, o) => {
179
- if (t.gridProps.onContextMenu && D) {
180
- const n = {
181
- target: S.current,
178
+ }, It = (e, r, n) => {
179
+ if (t.gridProps.onContextMenu && K) {
180
+ const o = {
181
+ target: x.current,
182
182
  syntheticEvent: e,
183
183
  nativeEvent: e.nativeEvent,
184
184
  dataItem: r,
185
- field: o
185
+ field: n
186
186
  };
187
- m(t.gridProps.onContextMenu, n);
187
+ m(t.gridProps.onContextMenu, o);
188
188
  }
189
189
  t.gridProps.contextMenu && bt({
190
190
  event: e,
191
191
  dataItem: r,
192
- field: o
192
+ field: n
193
193
  });
194
194
  }, yt = (e) => {
195
195
  var d, s;
196
196
  if (e.target !== e.currentTarget)
197
197
  return;
198
198
  clearTimeout(pe.current), y.current && (y.current.table = A.current);
199
- const r = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop, n = o !== Be.current;
200
- t.gridProps.columnVirtualization && (!x || o === Be.current) && (pe.current = window.setTimeout(() => {
199
+ const r = e.currentTarget.scrollLeft, n = e.currentTarget.scrollTop, o = n !== Be.current;
200
+ t.gridProps.columnVirtualization && (!k || n === Be.current) && (pe.current = window.setTimeout(() => {
201
201
  re();
202
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), _.current && _.current.setScrollLeft(r), $.current && $.current.setScrollLeft(r), W != null && W.current && W.current.setScrollLeft(r), L != null && L.current && L.current.setScrollLeft(r), O != null && O.current && O.current.setScrollLeft(r), z != null && z.current && z.current.setScrollLeft(r);
202
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), _.current && _.current.setScrollLeft(r), $.current && $.current.setScrollLeft(r), L != null && L.current && L.current.setScrollLeft(r), W != null && W.current && W.current.setScrollLeft(r), O != null && O.current && O.current.setScrollLeft(r), z != null && z.current && z.current.setScrollLeft(r);
203
203
  const i = (d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current;
204
- y.current && n && y.current.scrollHandler(e);
205
- const a = x && ((s = t.gridProps.virtualSkipRef) == null ? void 0 : s.current) !== i;
206
- t.gridProps.onScroll && D && m(t.gridProps.onScroll, {
204
+ y.current && o && y.current.scrollHandler(e);
205
+ const a = k && ((s = t.gridProps.virtualSkipRef) == null ? void 0 : s.current) !== i;
206
+ t.gridProps.onScroll && K && m(t.gridProps.onScroll, {
207
207
  ...I(e)
208
- }), Be.current = o, !dt.current && q.current && Math.abs(q.current.scrollTop - o) > 1 && (Fe.current = !0, q.current.scrollTop = o), a || st();
208
+ }), Be.current = n, !dt.current && q.current && Math.abs(q.current.scrollTop - n) > 1 && (Fe.current = !0, q.current.scrollTop = n), a || st();
209
209
  }, wt = (e) => {
210
- var o, n;
210
+ var n, o;
211
211
  const r = e.target;
212
212
  if ((e.keyCode === 38 || e.keyCode === 40) && r.closest(".k-grid-sticky-container")) {
213
- const i = parseInt(((o = r.closest("tr")) == null ? void 0 : o.getAttribute("absolute-row-index")) || "", 10), a = r.getAttribute("data-keyboardnavid");
214
- if (!isNaN(i) && a && !((n = H.current) == null ? void 0 : n.querySelector(`tr[absolute-row-index="${i}"]`)))
213
+ const i = parseInt(((n = r.closest("tr")) == null ? void 0 : n.getAttribute("absolute-row-index")) || "", 10), a = r.getAttribute("data-keyboardnavid");
214
+ if (!isNaN(i) && a && !((o = H.current) == null ? void 0 : o.querySelector(`tr[absolute-row-index="${i}"]`)))
215
215
  return we.current = {
216
216
  navId: a,
217
217
  key: e.key,
@@ -224,14 +224,14 @@ const In = (t, D, p, K) => {
224
224
  var a;
225
225
  if (!we.current || !F.current)
226
226
  return;
227
- const { navId: e, key: r, code: o, keyCode: n } = we.current, i = (a = H.current) == null ? void 0 : a.querySelector(
227
+ const { navId: e, key: r, code: n, keyCode: o } = we.current, i = (a = H.current) == null ? void 0 : a.querySelector(
228
228
  `[data-keyboardnavid="${e}"]`
229
229
  );
230
230
  i && i.dispatchEvent(
231
231
  new KeyboardEvent("keydown", {
232
232
  key: r,
233
- code: o,
234
- keyCode: n,
233
+ code: n,
234
+ keyCode: o,
235
235
  bubbles: !0,
236
236
  cancelable: !0
237
237
  })
@@ -258,7 +258,7 @@ const In = (t, D, p, K) => {
258
258
  selectedField: "",
259
259
  ...I(e)
260
260
  };
261
- t.gridProps.onKeyDown && D && m(t.gridProps.onKeyDown, r);
261
+ t.gridProps.onKeyDown && K && m(t.gridProps.onKeyDown, r);
262
262
  }, xt = (e) => {
263
263
  ie.onFocus(e, {
264
264
  navigatable: !!t.gridProps.navigatable,
@@ -267,26 +267,26 @@ const In = (t, D, p, K) => {
267
267
  }, kt = (e) => {
268
268
  const { columnsRef: r } = t;
269
269
  if (e.action === "moveToNextPage" && _t(e.event), e.action === "moveToPrevPage" && Zt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
270
- const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
271
- if (!r[o].reorderable)
270
+ const n = parseInt(e.focusElement.ariaColIndex, 10) - 1;
271
+ if (!r[n].reorderable)
272
272
  return;
273
- if (e.action === "reorderToRight" && o < t.columnsRef.length - 1) {
274
- if (r[o + 1].disableReorder)
273
+ if (e.action === "reorderToRight" && n < t.columnsRef.length - 1) {
274
+ if (r[n + 1].disableReorder)
275
275
  return;
276
- fe(o, o + 1, e.event);
276
+ fe(n, n + 1, e.event);
277
277
  }
278
- if (e.action === "reorderToLeft" && o > 0) {
279
- if (r[o - 1].disableReorder)
278
+ if (e.action === "reorderToLeft" && n > 0) {
279
+ if (r[n - 1].disableReorder)
280
280
  return;
281
- fe(o, o - 1, e.event);
281
+ fe(n, n - 1, e.event);
282
282
  }
283
283
  }
284
- if (e.action === "select" && zt(e.event), t.gridProps.onNavigationAction && D) {
285
- const o = {
284
+ if (e.action === "select" && zt(e.event), t.gridProps.onNavigationAction && K) {
285
+ const n = {
286
286
  focusElement: e.focusElement,
287
287
  ...I(e.event)
288
288
  };
289
- m(t.gridProps.onNavigationAction, o);
289
+ m(t.gridProps.onNavigationAction, n);
290
290
  }
291
291
  }, Dt = (e, r) => {
292
292
  t.gridProps.onRowClick && ke(e.target, "TD") && m(t.gridProps.onRowClick, {
@@ -310,16 +310,16 @@ const In = (t, D, p, K) => {
310
310
  edit: {},
311
311
  ...I(e.syntheticEvent)
312
312
  });
313
- }, Gt = (e, r, o) => {
314
- var n, i;
313
+ }, Gt = (e, r, n) => {
314
+ var o, i;
315
315
  if (gt.enabled && gt.mode === "incell" && t.gridProps.dataItemKey) {
316
316
  if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
317
- const d = !!((i = (n = e.target).closest) != null && i.call(n, ".k-grid-pinned-container"));
317
+ const d = !!((i = (o = e.target).closest) != null && i.call(o, ".k-grid-pinned-container"));
318
318
  t.gridProps.editZoneRef.current = d ? "pinned" : "body";
319
319
  }
320
320
  const a = $r(t.gridProps.edit, {
321
321
  type: _r.ENTER_FIELD_EDIT,
322
- payload: { id: r[t.gridProps.dataItemKey], field: o }
322
+ payload: { id: r[t.gridProps.dataItemKey], field: n }
323
323
  });
324
324
  t.gridProps.onEditChange && m(t.gridProps.onEditChange, {
325
325
  edit: a,
@@ -327,21 +327,21 @@ const In = (t, D, p, K) => {
327
327
  });
328
328
  }
329
329
  }, Ht = (e, r) => {
330
- var n;
330
+ var o;
331
331
  if (Vr(t.detailExpandable).enabled) {
332
- const i = qr((n = t.gridProps.detailExpand) != null ? n : {}, e);
332
+ const i = qr((o = t.gridProps.detailExpand) != null ? o : {}, e);
333
333
  t.gridProps.onDetailExpandChange && m(t.gridProps.onDetailExpandChange, {
334
334
  ...I(r),
335
335
  detailExpand: i
336
336
  });
337
337
  }
338
338
  }, At = (e, r) => {
339
- var n;
340
- const o = jr(
339
+ var o;
340
+ const n = jr(
341
341
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
342
342
  );
343
- if (o.enabled) {
344
- const i = Ur((n = t.gridProps.groupExpand) != null ? n : [], e, o);
343
+ if (n.enabled) {
344
+ const i = Ur((o = t.gridProps.groupExpand) != null ? o : [], e, n);
345
345
  t.gridProps.onGroupExpandChange && m(t.gridProps.onGroupExpandChange, {
346
346
  ...I(r),
347
347
  groupExpand: i
@@ -350,17 +350,17 @@ const In = (t, D, p, K) => {
350
350
  Er(e.group);
351
351
  }, Ft = c.useCallback(
352
352
  (e) => {
353
- const { dataItemKey: r = "", pinnedTopRows: o = [], pinnedBottomRows: n = [] } = t.gridProps;
353
+ const { dataItemKey: r = "", pinnedTopRows: n = [], pinnedBottomRows: o = [] } = t.gridProps;
354
354
  if (!r || !e)
355
355
  return "none";
356
356
  const i = e[r];
357
- return o != null && o.some((a) => a[r] === i) ? "top" : n != null && n.some((a) => a[r] === i) ? "bottom" : "none";
357
+ return n != null && n.some((a) => a[r] === i) ? "top" : o != null && o.some((a) => a[r] === i) ? "bottom" : "none";
358
358
  },
359
359
  [t.gridProps.pinnedTopRows, t.gridProps.pinnedBottomRows, t.gridProps.dataItemKey]
360
360
  ), ue = (e, r) => {
361
361
  if (!t.gridProps.pinnable)
362
362
  return;
363
- const { dataItemKey: o = "", pinnedTopRows: n = [], pinnedBottomRows: i = [] } = t.gridProps, a = r[o], d = n.filter((u) => u[o] !== a), s = i.filter((u) => u[o] !== a);
363
+ const { dataItemKey: n = "", pinnedTopRows: o = [], pinnedBottomRows: i = [] } = t.gridProps, a = r[n], d = o.filter((u) => u[n] !== a), s = i.filter((u) => u[n] !== a);
364
364
  let l;
365
365
  switch (e) {
366
366
  case "pinTop":
@@ -376,13 +376,13 @@ const In = (t, D, p, K) => {
376
376
  return;
377
377
  }
378
378
  t.gridProps.onRowPinChange && m(t.gridProps.onRowPinChange, l);
379
- }, Je = (e, r, o) => {
380
- const { allowUnsort: n, mode: i } = Pn(
379
+ }, Je = (e, r, n) => {
380
+ const { allowUnsort: o, mode: i } = Pn(
381
381
  t.gridProps.sortable || !1,
382
382
  r.sortable || !1
383
- ), a = (t.gridProps.sort || []).filter((l) => l.field === r.field)[0], d = o || hn[n][a && a.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== r.field);
383
+ ), a = (t.gridProps.sort || []).filter((l) => l.field === r.field)[0], d = n || hn[o][a && a.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== r.field);
384
384
  d !== "" && r.field && s.push({ field: r.field, dir: d }), Ye(s, e);
385
- }, Wt = (e) => {
385
+ }, Lt = (e) => {
386
386
  t.gridProps.onItemChange && m(t.gridProps.onItemChange, {
387
387
  ...I(e.syntheticEvent),
388
388
  dataItem: e.dataItem,
@@ -390,12 +390,12 @@ const In = (t, D, p, K) => {
390
390
  field: e.field,
391
391
  value: e.value
392
392
  });
393
- }, Lt = (e) => {
393
+ }, Wt = (e) => {
394
394
  var r;
395
395
  if (t.gridProps.onSelectionChange && h.enabled) {
396
- const { event: o, dataItem: n, dataIndex: i, columnIndex: a } = e, d = {
397
- ...I(o),
398
- dataItem: n,
396
+ const { event: n, dataItem: o, dataIndex: i, columnIndex: a } = e, d = {
397
+ ...I(n),
398
+ dataItem: o,
399
399
  startColIndex: a,
400
400
  endColIndex: a,
401
401
  startRowIndex: i,
@@ -424,13 +424,13 @@ const In = (t, D, p, K) => {
424
424
  var u;
425
425
  if (!t.gridProps.onSelectionChange || !h.enabled || !t.gridProps.dataItemKey)
426
426
  return;
427
- const { event: r, groupDataItem: o, selectAll: n } = e, i = X(t.gridProps.dataItemKey), a = dn(o), d = T(), l = { ...(u = t.gridProps.select) != null ? u : {} };
427
+ const { event: r, groupDataItem: n, selectAll: o } = e, i = X(t.gridProps.dataItemKey), a = dn(n), d = T(), l = { ...(u = t.gridProps.select) != null ? u : {} };
428
428
  a.forEach((f) => {
429
429
  const v = i(f);
430
- v !== void 0 && (n ? l[v] = !0 : delete l[v]);
430
+ v !== void 0 && (o ? l[v] = !0 : delete l[v]);
431
431
  }), m(t.gridProps.onSelectionChange, {
432
432
  ...I(r),
433
- dataItem: o,
433
+ dataItem: n,
434
434
  startColIndex: 0,
435
435
  endColIndex: 0,
436
436
  startRowIndex: 0,
@@ -458,19 +458,19 @@ const In = (t, D, p, K) => {
458
458
  componentId: t.id,
459
459
  selectedField: "",
460
460
  ...I(e)
461
- }, o = Zr({
461
+ }, n = Zr({
462
462
  event: r,
463
463
  selectedState: (l = t.gridProps.select) != null ? l : {},
464
464
  dataItemKey: t.gridProps.dataItemKey
465
465
  });
466
- if (o === t.gridProps.select)
466
+ if (n === t.gridProps.select)
467
467
  return;
468
- const n = e.target, i = ke(n, "TD"), a = ke(n, "TR"), d = Jr(i), s = Xr(a);
468
+ const o = e.target, i = ke(o, "TD"), a = ke(o, "TR"), d = Jr(i), s = Xr(a);
469
469
  if (d !== void 0 && s !== void 0) {
470
470
  const f = (u = ln(t.gridProps.data)) == null ? void 0 : u[s];
471
471
  t.gridProps.onSelectionChange && m(t.gridProps.onSelectionChange, {
472
472
  ...r,
473
- select: o,
473
+ select: n,
474
474
  dataItem: f,
475
475
  startRowIndex: s,
476
476
  startColIndex: d,
@@ -489,11 +489,11 @@ const In = (t, D, p, K) => {
489
489
  if (t.gridProps.onHeaderSelectionChange && h.enabled) {
490
490
  const r = T();
491
491
  m(t.gridProps.onHeaderSelectionChange, {
492
- select: e.syntheticEvent.target.checked ? r.reduce((o, n) => (t.gridProps.dataItemKey && X(t.gridProps.dataItemKey)(n) !== void 0 && (o[X(t.gridProps.dataItemKey)(n)] = !0), o), {}) : {},
492
+ select: e.syntheticEvent.target.checked ? r.reduce((n, o) => (t.gridProps.dataItemKey && X(t.gridProps.dataItemKey)(o) !== void 0 && (n[X(t.gridProps.dataItemKey)(o)] = !0), n), {}) : {},
493
493
  field: e.field,
494
494
  nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
495
495
  syntheticEvent: e.syntheticEvent,
496
- target: S.current,
496
+ target: x.current,
497
497
  dataItems: r
498
498
  });
499
499
  }
@@ -503,10 +503,10 @@ const In = (t, D, p, K) => {
503
503
  select: r
504
504
  });
505
505
  }, pt = (e, r) => {
506
- const o = t.gridProps.dataItemKey;
507
- if (!o || !r)
506
+ const n = t.gridProps.dataItemKey;
507
+ if (!n || !r)
508
508
  return;
509
- const n = X(o), i = T().findIndex((a) => n(a) === n(r));
509
+ const o = X(n), i = T().findIndex((a) => o(a) === o(r));
510
510
  i !== -1 && Xe({
511
511
  ...e,
512
512
  startRowIndex: i,
@@ -515,14 +515,14 @@ const In = (t, D, p, K) => {
515
515
  }, Xe = (e) => {
516
516
  var r;
517
517
  if (t.gridProps.onSelectionChange && h.enabled) {
518
- const o = T(), n = o[e.startRowIndex], i = o[e.endRowIndex], a = {
518
+ const n = T(), o = n[e.startRowIndex], i = n[e.endRowIndex], a = {
519
519
  syntheticEvent: void 0,
520
- target: S.current,
520
+ target: x.current,
521
521
  selectedField: "",
522
522
  componentId: t.id,
523
- dataItems: o,
523
+ dataItems: n,
524
524
  dataItem: null,
525
- startDataItem: n,
525
+ startDataItem: o,
526
526
  endDataItem: i,
527
527
  ...e
528
528
  }, d = Pt({
@@ -534,10 +534,10 @@ const In = (t, D, p, K) => {
534
534
  }
535
535
  }, Nt = (e) => {
536
536
  if (t.gridProps.onSelectionChange && h.enabled) {
537
- const r = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], n = {}, i = {
537
+ const r = e.dataItems[0], n = e.dataItems[e.dataItems.length - 1], o = {}, i = {
538
538
  ...e,
539
539
  startDataItem: r,
540
- endDataItem: o,
540
+ endDataItem: n,
541
541
  startRowIndex: 0,
542
542
  endRowIndex: e.dataItems.length - 1,
543
543
  startColIndex: 0,
@@ -545,12 +545,12 @@ const In = (t, D, p, K) => {
545
545
  };
546
546
  e.dataItems.forEach((a) => {
547
547
  const s = X(t.gridProps.dataItemKey)(a);
548
- n[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
549
- }), ee(i, n);
548
+ o[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
549
+ }), ee(i, o);
550
550
  }
551
551
  }, jt = (e) => {
552
552
  if (t.gridProps.onSelectionChange && h.enabled) {
553
- const o = X(t.gridProps.dataItemKey)(e.dataItem), n = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
553
+ const n = X(t.gridProps.dataItemKey)(e.dataItem), o = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
554
554
  (f) => f[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
555
555
  ), l = {
556
556
  ...e,
@@ -558,18 +558,18 @@ const In = (t, D, p, K) => {
558
558
  endDataItem: a,
559
559
  startRowIndex: a,
560
560
  endRowIndex: a,
561
- startColIndex: n,
561
+ startColIndex: o,
562
562
  endColIndex: i
563
563
  }, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
564
- 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, ee(l, u);
564
+ u[n] === !0 || Array.isArray(u[n]) && u[n].length === t.columnsRef.length ? delete u[n] : u[n] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, ee(l, u);
565
565
  }
566
566
  }, Ut = (e) => {
567
567
  if (!h.enabled)
568
568
  return;
569
- const r = T(), o = {
569
+ const r = T(), n = {
570
570
  syntheticEvent: void 0,
571
571
  nativeEvent: void 0,
572
- target: S.current,
572
+ target: x.current,
573
573
  selectedField: "",
574
574
  componentId: t.id,
575
575
  dataItems: r,
@@ -586,7 +586,7 @@ const In = (t, D, p, K) => {
586
586
  };
587
587
  if (!e || e.length === 0) {
588
588
  const f = {
589
- ...o,
589
+ ...n,
590
590
  startRowIndex: -1,
591
591
  endRowIndex: -1,
592
592
  startColIndex: -1,
@@ -595,25 +595,25 @@ const In = (t, D, p, K) => {
595
595
  ee(f, {});
596
596
  return;
597
597
  }
598
- const n = Rt(
598
+ const o = Rt(
599
599
  t.gridProps.data,
600
600
  e,
601
601
  t.columnsRef,
602
602
  t.gridProps.dataItemKey
603
603
  ), i = {};
604
- Object.keys(n).forEach((f) => {
605
- n[f] && (i[f] = h.cell ? [...Array(t.columnsRef.length).keys()] : !0);
604
+ Object.keys(o).forEach((f) => {
605
+ o[f] && (i[f] = h.cell ? [...Array(t.columnsRef.length).keys()] : !0);
606
606
  });
607
607
  let a = -1, d = -1, s = r[0] || null, l = r[r.length - 1] || null;
608
608
  if (t.gridProps.dataItemKey) {
609
609
  const f = X(t.gridProps.dataItemKey);
610
610
  for (let v = 0; v < r.length; v++) {
611
611
  const R = f(r[v]);
612
- R !== void 0 && n[R] && (a === -1 && (a = v, s = r[v]), d = v, l = r[v]);
612
+ R !== void 0 && o[R] && (a === -1 && (a = v, s = r[v]), d = v, l = r[v]);
613
613
  }
614
614
  }
615
615
  const u = {
616
- ...o,
616
+ ...n,
617
617
  startRowIndex: a,
618
618
  endRowIndex: d,
619
619
  startColIndex: 0,
@@ -624,55 +624,55 @@ const In = (t, D, p, K) => {
624
624
  ee(u, i);
625
625
  }, Vt = (e) => {
626
626
  t.gridProps.onSelectionChange && h.enabled && ee(e, {});
627
- }, te = (e, r, o, n, i) => {
627
+ }, te = (e, r, n, o, i) => {
628
628
  $t();
629
629
  const a = t.gridProps.onDataStateChange;
630
630
  if (e) {
631
- const d = { ...I(n), ...r, targetEvent: i };
631
+ const d = { ...I(o), ...r, targetEvent: i };
632
632
  m(e, d);
633
633
  } else a && (de.current = {
634
634
  ...de.current,
635
- ...o
635
+ ...n
636
636
  }, m(a, {
637
- ...I(n),
637
+ ...I(o),
638
638
  targetEvent: i || {},
639
639
  dataState: {
640
640
  ...cr(),
641
641
  ...de.current
642
642
  }
643
643
  }));
644
- }, ge = (e, r, o) => {
645
- var n;
646
- x && t.gridProps.pageable && ((n = y.current) == null || n.reset()), te(
644
+ }, ge = (e, r, n) => {
645
+ var o;
646
+ k && t.gridProps.pageable && ((o = y.current) == null || o.reset()), te(
647
647
  t.gridProps.onPageChange,
648
648
  { page: e },
649
649
  { skip: e.skip, take: e.take },
650
650
  r,
651
- o
651
+ n
652
652
  );
653
- }, qt = (e, r, o) => {
654
- var n;
655
- t.gridProps.pageable || (n = t.gridProps.group) != null && n.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, re()) : ge(e, r, o);
653
+ }, qt = (e, r, n) => {
654
+ var o;
655
+ t.gridProps.pageable || (o = t.gridProps.group) != null && o.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, re()) : ge(e, r, n);
656
656
  }, Te = () => {
657
657
  let e = t.gridProps.total || 0;
658
658
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
659
659
  }, $t = () => {
660
- x && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
660
+ k && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
661
661
  }, _t = (e) => {
662
662
  var i, a;
663
- const r = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + r, n = Te();
664
- o < n && ge({ skip: o, take: r }, e);
663
+ const r = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, n = (t.gridProps.skip || 0) + r, o = Te();
664
+ n < o && ge({ skip: n, take: r }, e);
665
665
  }, Zt = (e) => {
666
- var n, i;
667
- const r = (i = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - r;
668
- o >= 0 && ge({ skip: o, take: r }, e);
666
+ var o, i;
667
+ const r = (i = (o = t.gridProps.take) != null ? o : t.gridProps.pageSize) != null ? i : 0, n = (t.gridProps.skip || 0) - r;
668
+ n >= 0 && ge({ skip: n, take: r }, e);
669
669
  }, Jt = (e) => {
670
670
  ge({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
671
671
  }, Ye = (e, r) => {
672
672
  te(
673
673
  t.gridProps.onSortChange,
674
674
  { sort: e },
675
- { sort: e, ...x && !t.gridProps.pageable ? { skip: 0 } : {} },
675
+ { sort: e, ...k && !t.gridProps.pageable ? { skip: 0 } : {} },
676
676
  r
677
677
  );
678
678
  }, Xt = (e, r) => {
@@ -702,12 +702,12 @@ const In = (t, D, p, K) => {
702
702
  {}
703
703
  );
704
704
  }, Qt = (e) => {
705
- const r = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, n = {
705
+ const r = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], n = e.nativeEvent.target.value, o = {
706
706
  logic: "or",
707
707
  filters: r.filter((i) => i !== void 0).map((i) => {
708
708
  var a;
709
- return typeof i == "string" ? { field: i, value: o, operator: "contains" } : {
710
- value: o,
709
+ return typeof i == "string" ? { field: i, value: n, operator: "contains" } : {
710
+ value: n,
711
711
  operator: (a = i.operator) != null ? a : "contains",
712
712
  field: i.field,
713
713
  ignoreCase: i.ignoreCase
@@ -717,7 +717,7 @@ const In = (t, D, p, K) => {
717
717
  te(
718
718
  t.gridProps.onSearchChange,
719
719
  {
720
- search: n
720
+ search: o
721
721
  },
722
722
  { skip: 0 },
723
723
  e.syntheticEvent
@@ -732,111 +732,111 @@ const In = (t, D, p, K) => {
732
732
  var e;
733
733
  return ((e = Ke.current) == null ? void 0 : e.getBlob()) || null;
734
734
  }, er = async (e) => {
735
- var r, o;
736
- (r = t.gridProps) != null && r.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
735
+ var r, n;
736
+ (r = t.gridProps) != null && r.onPdfExport && await ((n = t.gridProps) == null ? void 0 : n.onPdfExport(e));
737
737
  }, tr = (e) => {
738
- var r, o;
739
- return (r = t.gridProps) != null && r.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
738
+ var r, n;
739
+ return (r = t.gridProps) != null && r.onCsvExport ? (n = t.gridProps) == null ? void 0 : n.onCsvExport(e) : e;
740
740
  }, Ge = (e, r) => {
741
- const o = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
742
- let n = {};
743
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (n = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Le.current = !0), te(
741
+ const n = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
742
+ let o = {};
743
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (o = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (We.current = !0), te(
744
744
  t.gridProps.onGroupChange,
745
745
  { group: e },
746
- { group: e, skip: 0, ...n },
747
- o
746
+ { group: e, skip: 0, ...o },
747
+ n
748
748
  );
749
749
  }, He = (e) => {
750
750
  if (t.gridProps.onColumnsStateChange) {
751
751
  const r = {
752
- target: S.current,
752
+ target: x.current,
753
753
  columnsState: e
754
754
  };
755
755
  m(t.gridProps.onColumnsStateChange, r);
756
756
  }
757
- }, fe = (e, r, o) => {
758
- const { columnsRef: n, columnsState: i } = t, a = n[e], d = cn(i), s = a.depth, l = (R) => {
757
+ }, fe = (e, r, n) => {
758
+ const { columnsRef: o, columnsState: i } = t, a = o[e], d = cn(i), s = a.depth, l = (R) => {
759
759
  do
760
760
  R++;
761
- while (R < n.length && n[R].depth > s);
761
+ while (R < o.length && o[R].depth > s);
762
762
  return R;
763
- }, u = n.splice(e, l(e) - e);
764
- n.splice(e < r ? l(r - u.length) : r, 0, ...u), n.filter((R) => R.declarationIndex >= 0).forEach((R, j) => {
763
+ }, u = o.splice(e, l(e) - e);
764
+ o.splice(e < r ? l(r - u.length) : r, 0, ...u), o.filter((R) => R.declarationIndex >= 0).forEach((R, j) => {
765
765
  R.orderIndex = j;
766
- const g = d.find((k) => k.id === R.id);
766
+ const g = d.find((D) => D.id === R.id);
767
767
  g && (g.orderIndex = j);
768
768
  });
769
- const f = n[e].locked && n[r].locked;
770
- pr(t.columnsMapRef, n, f || Ie.current), Nr(t.columnsMapRef, n, f || Ie.current), We.current && (Ie.current = !1, We.current = !1);
769
+ const f = o[e].locked && o[r].locked;
770
+ pr(t.columnsMapRef, o, f || Ie.current), Nr(t.columnsMapRef, o, f || Ie.current), Le.current && (Ie.current = !1, Le.current = !1);
771
771
  const v = se();
772
772
  if (re(), t.gridProps.onColumnReorder) {
773
773
  const R = {
774
- target: S.current,
774
+ target: x.current,
775
775
  columns: v,
776
776
  columnId: a.id,
777
- nativeEvent: o
777
+ nativeEvent: n
778
778
  };
779
779
  m(t.gridProps.onColumnReorder, R);
780
780
  }
781
781
  He(i);
782
- }, ae = (e, r, o) => {
783
- const n = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
784
- if (o === "forbidden" || !n || !ce.current)
782
+ }, ae = (e, r, n) => {
783
+ const o = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
784
+ if (n === "forbidden" || !o || !ce.current)
785
785
  return;
786
786
  const i = t.dataRef[r];
787
787
  t.gridProps.onRowReorder && m(t.gridProps.onRowReorder, {
788
788
  draggedDataItems: [ce.current],
789
789
  droppedDataItem: i == null ? void 0 : i.dataItem,
790
- dropPosition: o,
790
+ dropPosition: n,
791
791
  nativeEvent: e.originalEvent,
792
792
  dragEvent: e,
793
- target: S.current
793
+ target: x.current
794
794
  }), ce.current = null;
795
- }, rr = (e, r, o) => {
795
+ }, rr = (e, r, n) => {
796
796
  if (t.gridProps.group === void 0)
797
797
  return;
798
- const n = t.gridProps.group.slice();
799
- n.splice(r, 0, ...n.splice(e, 1)), Ge(n, o);
800
- }, rt = (e, r, o) => {
801
- const n = t.columnsRef[e].field;
802
- if (!n)
798
+ const o = t.gridProps.group.slice();
799
+ o.splice(r, 0, ...o.splice(e, 1)), Ge(o, n);
800
+ }, rt = (e, r, n) => {
801
+ const o = t.columnsRef[e].field;
802
+ if (!o)
803
803
  return;
804
804
  const i = (t.gridProps.group || []).slice();
805
- i.splice(r, 0, { field: n }), Ge(i, o);
805
+ i.splice(r, 0, { field: o }), Ge(i, n);
806
806
  }, nr = (e, r) => {
807
- const o = U.current.getCurrentGroupsLength;
808
- rt(e, o, r);
807
+ const n = U.current.getCurrentGroupsLength;
808
+ rt(e, n, r);
809
809
  }, Ae = () => {
810
- var e, r, o, n, i, a, d, s, l, u, f, v, R, j;
810
+ var e, r, n, o, i, a, d, s, l, u, f, v, R, j;
811
811
  if (t.gridProps.dataLayoutMode === "stacked") {
812
812
  const g = ((e = F.current) == null ? void 0 : e.offsetWidth) || 0;
813
813
  if ((r = P.current) != null && r.colGroupMain && g) {
814
- const k = P.current.colGroupMain.children, b = k.length - 1;
814
+ const D = P.current.colGroupMain.children, b = D.length - 1;
815
815
  if (b >= 0) {
816
816
  let Z = 0;
817
817
  for (let oe = 0; oe < b; oe++) {
818
- const Kr = parseFloat((k[oe].width || 0).toString()) || k[oe].clientWidth;
818
+ const Kr = parseFloat((D[oe].width || 0).toString()) || D[oe].clientWidth;
819
819
  Z += Kr;
820
820
  }
821
821
  const B = Math.max(0, g - Z);
822
- k[b].width = B + "px", (n = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && n[b] && (P.current.colGroupHeader.children[b].width = B + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[b] && (P.current.colGroupFooter.children[b].width = B + "px"), (s = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && s[b] && (P.current.colGroupStickyHeader.children[b].width = B + "px"), (u = (l = P.current.colGroupStickyFooter) == null ? void 0 : l.children) != null && u[b] && (P.current.colGroupStickyFooter.children[b].width = B + "px"), (v = (f = P.current.colGroupPinnedTop) == null ? void 0 : f.children) != null && v[b] && (P.current.colGroupPinnedTop.children[b].width = B + "px"), (j = (R = P.current.colGroupPinnedBottom) == null ? void 0 : R.children) != null && j[b] && (P.current.colGroupPinnedBottom.children[b].width = B + "px");
822
+ D[b].width = B + "px", (o = (n = P.current.colGroupHeader) == null ? void 0 : n.children) != null && o[b] && (P.current.colGroupHeader.children[b].width = B + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[b] && (P.current.colGroupFooter.children[b].width = B + "px"), (s = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && s[b] && (P.current.colGroupStickyHeader.children[b].width = B + "px"), (u = (l = P.current.colGroupStickyFooter) == null ? void 0 : l.children) != null && u[b] && (P.current.colGroupStickyFooter.children[b].width = B + "px"), (v = (f = P.current.colGroupPinnedTop) == null ? void 0 : f.children) != null && v[b] && (P.current.colGroupPinnedTop.children[b].width = B + "px"), (j = (R = P.current.colGroupPinnedBottom) == null ? void 0 : R.children) != null && j[b] && (P.current.colGroupPinnedBottom.children[b].width = B + "px");
823
823
  }
824
824
  }
825
- _.current && _.current.setWidth(g), $.current && $.current.setWidth(g), W.current && W.current.setWidth(g), L.current && L.current.setWidth(g), O.current && O.current.setWidth(g), z.current && z.current.setWidth(g), A.current && (A.current.style.width = g ? g + "px" : "");
825
+ _.current && _.current.setWidth(g), $.current && $.current.setWidth(g), L.current && L.current.setWidth(g), W.current && W.current.setWidth(g), O.current && O.current.setWidth(g), z.current && z.current.setWidth(g), A.current && (A.current.style.width = g ? g + "px" : "");
826
826
  } else {
827
827
  let g = 0;
828
828
  if (!P.current.colGroupMain)
829
829
  return;
830
- const k = P.current.colGroupMain.children;
831
- for (let b = 0; b < k.length; b++) {
832
- const Z = k[b].width;
830
+ const D = P.current.colGroupMain.children;
831
+ for (let b = 0; b < D.length; b++) {
832
+ const Z = D[b].width;
833
833
  if (!Z) {
834
834
  g = 0;
835
835
  break;
836
836
  }
837
837
  g += parseFloat(Z.toString());
838
838
  }
839
- g = Math.round(g), _.current && _.current.setWidth(g), $.current && $.current.setWidth(g), W.current && W.current.setWidth(g), L.current && L.current.setWidth(g), O.current && O.current.setWidth(g), z.current && z.current.setWidth(g), A.current && (A.current.style.width = g ? g + "px" : "");
839
+ g = Math.round(g), _.current && _.current.setWidth(g), $.current && $.current.setWidth(g), L.current && L.current.setWidth(g), W.current && W.current.setWidth(g), O.current && O.current.setWidth(g), z.current && z.current.setWidth(g), A.current && (A.current.style.width = g ? g + "px" : "");
840
840
  }
841
841
  Ee.current && or();
842
842
  }, or = () => {
@@ -855,26 +855,26 @@ const In = (t, D, p, K) => {
855
855
  r && (e.current = r, re());
856
856
  }
857
857
  }, Pe = c.useCallback(
858
- (e, r, o, n, i) => {
858
+ (e, r, n, o, i) => {
859
859
  var l;
860
- if (!ar() && !o || !e)
860
+ if (!ar() && !n || !e)
861
861
  return;
862
862
  const a = {
863
863
  type: e,
864
864
  nativeEvent: r,
865
865
  columns: t.columnsRef,
866
866
  dataItemKey: t.gridProps.dataItemKey || "",
867
- dataItem: n,
867
+ dataItem: o,
868
868
  field: i,
869
869
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
870
- ...o
871
- }, d = T(), s = Lr({
870
+ ...n
871
+ }, d = T(), s = Wr({
872
872
  event: a,
873
873
  data: d,
874
874
  selectedState: (l = t.gridProps.select) != null ? l : {},
875
875
  previousCopiedItems: lt.current
876
876
  });
877
- e !== Ve.paste && (lt.current = s.copiedItems), t.gridProps.onClipboard && D && m(t.gridProps.onClipboard, {
877
+ e !== Ve.paste && (lt.current = s.copiedItems), t.gridProps.onClipboard && K && m(t.gridProps.onClipboard, {
878
878
  ...a,
879
879
  ...s
880
880
  });
@@ -890,18 +890,18 @@ const In = (t, D, p, K) => {
890
890
  var i, a, d;
891
891
  if (!J)
892
892
  return !1;
893
- const e = Mr(N()), r = e ? e.matches(".k-table-td") ? e : (i = N()) == null ? void 0 : i.body : (a = N()) == null ? void 0 : a.body, o = r == null ? void 0 : r.closest(".k-grid-container"), n = r && ((d = F.current) == null ? void 0 : d.contains(r));
894
- return !!(r && n && o);
895
- }, ot = (e, r, o, n, i, a, d) => {
896
- Ae(), Ie.current = !0, We.current = !0, t.gridProps.onColumnResize && D && m(t.gridProps.onColumnResize, {
893
+ const e = Mr(N()), r = e ? e.matches(".k-table-td") ? e : (i = N()) == null ? void 0 : i.body : (a = N()) == null ? void 0 : a.body, n = r == null ? void 0 : r.closest(".k-grid-container"), o = r && ((d = F.current) == null ? void 0 : d.contains(r));
894
+ return !!(r && o && n);
895
+ }, ot = (e, r, n, o, i, a, d) => {
896
+ Ae(), Ie.current = !0, Le.current = !0, t.gridProps.onColumnResize && K && m(t.gridProps.onColumnResize, {
897
897
  columns: se(),
898
- nativeEvent: n,
898
+ nativeEvent: o,
899
899
  targetColumnId: d,
900
900
  index: e,
901
901
  newWidth: r,
902
- oldWidth: o,
902
+ oldWidth: n,
903
903
  end: i,
904
- target: S.current
904
+ target: x.current
905
905
  }), i && He(a);
906
906
  }, cr = () => {
907
907
  var e;
@@ -915,7 +915,7 @@ const In = (t, D, p, K) => {
915
915
  }, I = (e) => ({
916
916
  nativeEvent: e && e.nativeEvent,
917
917
  syntheticEvent: e,
918
- target: S.current
918
+ target: x.current
919
919
  }), dr = (e) => ({
920
920
  ...e,
921
921
  nativeEvent: void 0,
@@ -930,13 +930,13 @@ const In = (t, D, p, K) => {
930
930
  }
931
931
  e(dr(r));
932
932
  }, lr = () => {
933
- var e, r, o;
933
+ var e, r, n;
934
934
  if (H.current && ((e = H.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
935
935
  ze.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? Oe.current = document.activeElement : Oe.current = void 0;
936
- const n = Array.from((o = H.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
937
- n.length > je.current.length ? Ce.current = n.filter(
936
+ const o = Array.from((n = H.current) == null ? void 0 : n.getElementsByClassName("k-grid-edit-row"));
937
+ o.length > je.current.length ? Ce.current = o.filter(
938
938
  (i) => !je.current.includes(i)
939
- )[0] : n.length === 1 && (Ce.current = n[0], ze.current = !0), je.current = n;
939
+ )[0] : o.length === 1 && (Ce.current = o[0], ze.current = !0), je.current = o;
940
940
  }
941
941
  }, T = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), N = () => {
942
942
  var e;
@@ -944,16 +944,16 @@ const In = (t, D, p, K) => {
944
944
  return ((e = he()) == null ? void 0 : e.ownerDocument) || document;
945
945
  }, he = () => F.current, Re = c.useCallback(
946
946
  (e) => {
947
- var n, i;
948
- if (!y.current || !((n = y.current) != null && n.container) || p === "none")
947
+ var o, i;
948
+ if (!y.current || !((o = y.current) != null && o.container) || p === "none")
949
949
  return;
950
950
  G.current && G.current.disconnect();
951
- const { rowIndex: r } = e, o = he();
952
- if (x) {
951
+ const { rowIndex: r } = e, n = he();
952
+ if (k) {
953
953
  const a = ((i = y.current.rowHeightService) == null ? void 0 : i.offset(r)) || 0;
954
954
  y.current.container.scroll(0, a);
955
- } else if (o) {
956
- const a = r < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${r + 1})`);
955
+ } else if (n) {
956
+ const a = r < 1 ? n.querySelector("tbody > tr:nth-child(1)") : n.querySelector(`tbody > tr:nth-child(${r + 1})`);
957
957
  a && E.current && (E.current.scrollTop = a.offsetTop);
958
958
  }
959
959
  },
@@ -962,19 +962,19 @@ const In = (t, D, p, K) => {
962
962
  ye.current = window.innerWidth, sr() || re();
963
963
  }, gr = () => {
964
964
  var a;
965
- const { virtualTotal: e, virtualPageSize: r, gridProps: o } = t, n = y.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
966
- n && (n.fixedScroll = o.fixedScroll || !1, n.PageChange = qt, n.pageSize = r, n.scrollableVirtual = x, n.container = E.current, n.tableBody = H.current, n.scrollHeightContainer = ct.current, n.scrollbarOverlaySpacerElement = ve.current, n.overlaySyncingRef = Fe, n.table = A.current, (!n.rowHeightService || n.total !== e) && i && (n.total = e, n.rowHeightService = new Fr(e, i)));
965
+ const { virtualTotal: e, virtualPageSize: r, gridProps: n } = t, o = y.current, i = t.gridProps.rowHeight || ((a = n.minRowHeightRef) == null ? void 0 : a.current) || 0;
966
+ o && (o.fixedScroll = n.fixedScroll || !1, o.PageChange = qt, o.pageSize = r, o.scrollableVirtual = k, o.container = E.current, o.tableBody = H.current, o.scrollHeightContainer = ct.current, o.scrollbarOverlaySpacerElement = ve.current, o.overlaySyncingRef = Fe, o.table = A.current, (!o.rowHeightService || o.total !== e) && i && (o.total = e, o.rowHeightService = new Fr(e, i)));
967
967
  }, at = c.useCallback(
968
968
  (e) => {
969
969
  const r = { rowIndex: Ne.current };
970
- e.forEach((o) => {
971
- o.boundingClientRect.height !== o.intersectionRect.height && Re(r);
970
+ e.forEach((n) => {
971
+ n.boundingClientRect.height !== n.intersectionRect.height && Re(r);
972
972
  });
973
973
  },
974
974
  [Re]
975
975
  ), re = () => {
976
976
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
977
- }, fr = (e) => e.left !== void 0 ? Ue !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, S = c.useRef(null), y = c.useRef(void 0), P = c.useRef(void 0), U = c.useRef(void 0), V = c.useRef(void 0), ne = c.useRef(void 0), be = c.useRef(void 0), G = c.useRef(null), H = c.useRef(null), mr = c.useRef(null), E = c.useRef(null), A = c.useRef(null), Pr = c.useRef(null), F = c.useRef(null), ct = c.useRef(null), q = c.useRef(null), ve = c.useRef(null), dt = c.useRef(!1), Fe = c.useRef(!1), $ = c.useRef(null), _ = c.useRef(null), W = c.useRef(null), L = c.useRef(null), O = c.useRef(null), z = c.useRef(null), hr = c.useRef(null), Rr = c.useRef(null), We = c.useRef(!1), Le = c.useRef(!1), Ce = c.useRef(void 0), Oe = c.useRef(void 0), ze = c.useRef(!1), Ie = c.useRef(!0), Be = c.useRef(0), pe = c.useRef(void 0), Ne = c.useRef(void 0), je = c.useRef([]), lt = c.useRef([]), ye = c.useRef(0), we = c.useRef(
977
+ }, fr = (e) => e.left !== void 0 ? Ue !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, x = c.useRef(null), y = c.useRef(void 0), P = c.useRef(void 0), U = c.useRef(void 0), V = c.useRef(void 0), ne = c.useRef(void 0), be = c.useRef(void 0), G = c.useRef(null), H = c.useRef(null), mr = c.useRef(null), E = c.useRef(null), A = c.useRef(null), Pr = c.useRef(null), F = c.useRef(null), ct = c.useRef(null), q = c.useRef(null), ve = c.useRef(null), dt = c.useRef(!1), Fe = c.useRef(!1), $ = c.useRef(null), _ = c.useRef(null), L = c.useRef(null), W = c.useRef(null), O = c.useRef(null), z = c.useRef(null), hr = c.useRef(null), Rr = c.useRef(null), Le = c.useRef(!1), We = c.useRef(!1), Ce = c.useRef(void 0), Oe = c.useRef(void 0), ze = c.useRef(!1), Ie = c.useRef(!0), Be = c.useRef(0), pe = c.useRef(void 0), Ne = c.useRef(void 0), je = c.useRef([]), lt = c.useRef([]), ye = c.useRef(0), we = c.useRef(
978
978
  null
979
979
  ), br = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, vr = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, Cr = !!((ft = t.gridProps.group) != null && ft.length), {
980
980
  stickyHeaderItems: Ir,
@@ -998,7 +998,7 @@ const In = (t, D, p, K) => {
998
998
  return (e = y.current) == null ? void 0 : e.rowHeightService;
999
999
  }
1000
1000
  }
1001
- }), ce = c.useRef(null), Sr = c.useRef(null), xr = c.useRef(null), Ue = Gr(F), x = t.isVirtualScroll, kr = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), ut = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, h = xe(t.gridProps.selectable), gt = Or(t.gridProps.editable), Dr = ye.current && Q && ye.current <= Q.medium && t.gridProps.adaptive;
1001
+ }), ce = c.useRef(null), Sr = c.useRef(null), xr = c.useRef(null), Ue = Gr(F), k = t.isVirtualScroll, kr = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), ut = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, h = xe(t.gridProps.selectable), gt = Or(t.gridProps.editable), Dr = ye.current && Q && ye.current <= Q.medium && t.gridProps.adaptive;
1002
1002
  c.useMemo(() => {
1003
1003
  ie.onConstructor({
1004
1004
  navigatable: !!t.gridProps.navigatable,
@@ -1029,16 +1029,16 @@ const In = (t, D, p, K) => {
1029
1029
  clearTimeout(pe.current);
1030
1030
  }), []), c.useEffect(() => {
1031
1031
  var e;
1032
- nt(), Ae(), mt(), x && (me(), ir(), (e = y.current) == null || e.update()), st(), lr(), ie.onComponentDidUpdate({
1032
+ nt(), Ae(), mt(), k && (me(), ir(), (e = y.current) == null || e.update()), st(), lr(), ie.onComponentDidUpdate({
1033
1033
  scope: F.current || void 0,
1034
1034
  contextStateRef: V,
1035
1035
  navigationStateRef: ne,
1036
- focusFirst: Le.current,
1036
+ focusFirst: We.current,
1037
1037
  newEditableRow: Ce.current,
1038
1038
  singleEditRow: ze.current,
1039
1039
  lastActiveElement: Oe.current,
1040
1040
  navigatable: t.gridProps.navigatable
1041
- }), Et(), Le.current = !1, Ce.current = void 0, we.current = void 0;
1041
+ }), Et(), We.current = !1, Ce.current = void 0, we.current = void 0;
1042
1042
  }), c.useEffect(() => {
1043
1043
  if (J) {
1044
1044
  const e = {
@@ -1054,47 +1054,49 @@ const In = (t, D, p, K) => {
1054
1054
  var r;
1055
1055
  let e;
1056
1056
  return J && window.ResizeObserver && (e = new window.ResizeObserver(() => {
1057
- ur(), x && me();
1057
+ ur(), k && me();
1058
1058
  }), e.observe((r = N()) == null ? void 0 : r.body)), () => {
1059
1059
  e == null || e.disconnect();
1060
1060
  };
1061
1061
  }, []), c.useEffect(() => {
1062
- if (!J || !window.ResizeObserver || !x || !E.current)
1062
+ if (!J || !window.ResizeObserver || !k || !E.current)
1063
1063
  return;
1064
1064
  const e = () => {
1065
1065
  var i, a;
1066
- const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
1066
+ const n = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
1067
1067
  me();
1068
- const n = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
1069
- (o === 0 && n > 0 || Math.abs(n - o) > 10) && re();
1068
+ const o = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
1069
+ (n === 0 && o > 0 || Math.abs(o - n) > 10) && re();
1070
1070
  }, r = new window.ResizeObserver(e);
1071
1071
  return r.observe(E.current), () => {
1072
1072
  r.disconnect();
1073
1073
  };
1074
- }, [x, me]);
1074
+ }, [k, me]);
1075
1075
  const Se = c.useCallback(() => {
1076
- var n;
1076
+ var o;
1077
1077
  const e = E.current;
1078
1078
  if (!e)
1079
1079
  return;
1080
- const r = ((n = q.current) == null ? void 0 : n.offsetWidth) || 17, o = e.scrollWidth > e.clientWidth ? r : 0;
1081
- q.current && (q.current.style.bottom = o + "px"), ve.current && (ve.current.style.height = Math.max(0, e.scrollHeight - o) + "px");
1080
+ const r = ((o = q.current) == null ? void 0 : o.offsetWidth) || 17, n = e.scrollWidth > e.clientWidth ? r : 0;
1081
+ q.current && (q.current.style.bottom = n + "px"), ve.current && (ve.current.style.height = Math.max(0, e.scrollHeight - n) + "px");
1082
1082
  }, []);
1083
1083
  return c.useEffect(() => {
1084
- if (!J || !K || !E.current || !window.ResizeObserver)
1084
+ if (!J || !S || !E.current || !window.ResizeObserver)
1085
1085
  return;
1086
1086
  const e = E.current, r = new window.ResizeObserver(Se);
1087
1087
  return A.current && r.observe(A.current), r.observe(e), () => {
1088
1088
  r.disconnect();
1089
1089
  };
1090
- }, [K, Se]), c.useEffect(() => {
1091
- !J || !K || !E.current || Se();
1092
- }, [K, Se, t.columnsState, t.gridProps.data]), c.useEffect(() => {
1093
- const e = E.current, r = x && K;
1094
- if (!(!e || !r && Y === 1))
1095
- return un(e, { wheelMultiplier: Y, overlayRequiresCustomWheel: r });
1096
- }, [x, K, Y]), c.useImperativeHandle(
1097
- S,
1090
+ }, [S, Se]), c.useEffect(() => {
1091
+ !J || !S || !E.current || Se();
1092
+ }, [S, Se, t.columnsState, t.gridProps.data]), c.useEffect(() => {
1093
+ const e = E.current, r = k && S;
1094
+ if (!e || !r && Y === 1)
1095
+ return;
1096
+ const n = S ? e.parentElement : null;
1097
+ return un(e, { wheelMultiplier: Y, overlayRequiresCustomWheel: r }, n);
1098
+ }, [k, S, Y]), c.useImperativeHandle(
1099
+ x,
1098
1100
  () => ({
1099
1101
  get element() {
1100
1102
  return he();
@@ -1104,15 +1106,15 @@ const In = (t, D, p, K) => {
1104
1106
  return se();
1105
1107
  },
1106
1108
  scrollIntoView: (e) => {
1107
- var n;
1108
- if (!((n = y.current) != null && n.container) || p === "none")
1109
+ var o;
1110
+ if (!((o = y.current) != null && o.container) || p === "none")
1109
1111
  return;
1110
1112
  const { rowIndex: r } = e;
1111
1113
  Ne.current = r;
1112
- const o = he();
1113
- if (G.current && o) {
1114
+ const n = he();
1115
+ if (G.current && n) {
1114
1116
  G.current.disconnect();
1115
- const i = o.querySelector(`[absolute-row-index="${Ne.current}"]`);
1117
+ const i = n.querySelector(`[absolute-row-index="${Ne.current}"]`);
1116
1118
  i ? G.current.observe(i) : Re(e);
1117
1119
  }
1118
1120
  },
@@ -1125,7 +1127,7 @@ const In = (t, D, p, K) => {
1125
1127
  getTotal: Te,
1126
1128
  getLeafDataItems: T
1127
1129
  })
1128
- ), c.useImperativeHandle(t.gridRef, () => S.current), c.useMemo(() => {
1130
+ ), c.useImperativeHandle(t.gridRef, () => x.current), c.useMemo(() => {
1129
1131
  P.current = new Yr(ot);
1130
1132
  }, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
1131
1133
  U.current = new Qr(fe, rr, rt);
@@ -1135,11 +1137,11 @@ const In = (t, D, p, K) => {
1135
1137
  t.gridProps.group,
1136
1138
  t.columnsRef,
1137
1139
  t.gridProps.groupable
1138
- ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.renderedColumnsRef || t.columnsRef, P.current.columnsState = Hr(t.columnsState), U.current.reorderable = t.gridProps.reorderable || !1, U.current.groupable = ut, U.current.columns = t.columnsRef, U.current.dir = Ue, gr(), Ar("grid", S, t.gridProps, t.gridProps.webMcp), /* @__PURE__ */ c.createElement(
1140
+ ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.renderedColumnsRef || t.columnsRef, P.current.columnsState = Hr(t.columnsState), U.current.reorderable = t.gridProps.reorderable || !1, U.current.groupable = ut, U.current.columns = t.columnsRef, U.current.dir = Ue, gr(), Ar("grid", x, t.gridProps, t.gridProps.webMcp), /* @__PURE__ */ c.createElement(
1139
1141
  vn.Provider,
1140
1142
  {
1141
1143
  value: {
1142
- isClient: D,
1144
+ isClient: K,
1143
1145
  rowReorder: ae,
1144
1146
  activeDragRowDataItemRef: ce,
1145
1147
  reorderRowDragTargetRef: Sr,
@@ -1164,7 +1166,7 @@ const In = (t, D, p, K) => {
1164
1166
  rowDblClick: Kt,
1165
1167
  cellClick: Gt,
1166
1168
  headerCellClick: Je,
1167
- itemChange: Wt,
1169
+ itemChange: Lt,
1168
1170
  onDialogEditCancel: Mt,
1169
1171
  onDialogEditSubmit: Tt,
1170
1172
  columnReorder: fe,
@@ -1198,7 +1200,7 @@ const In = (t, D, p, K) => {
1198
1200
  onKeyDown: St,
1199
1201
  onFocus: xt,
1200
1202
  scrollHandler: yt,
1201
- selectionChange: Lt,
1203
+ selectionChange: Wt,
1202
1204
  groupSelectionChange: Ot,
1203
1205
  mobileMode: Dr,
1204
1206
  adaptiveColumnMenuRef: ye.current,
@@ -1227,8 +1229,8 @@ const In = (t, D, p, K) => {
1227
1229
  stickyHeaderRef: yr,
1228
1230
  stickyFooterItems: wr,
1229
1231
  stickyFooterRef: Ee,
1230
- stickyHeaderTableRef: W,
1231
- stickyFooterTableRef: L,
1232
+ stickyHeaderTableRef: L,
1233
+ stickyFooterTableRef: W,
1232
1234
  pinnedTopTableRef: O,
1233
1235
  pinnedBottomTableRef: z,
1234
1236
  pinnedTopRef: hr,