@progress/kendo-react-grid 14.3.0-develop.9 → 14.3.1-develop.1

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.
@@ -6,32 +6,32 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as d from "react";
9
+ import * as c from "react";
10
10
  import { useAdaptiveModeContext as In, canUseDOM as ae, getActiveElement as wn, useDir as yn, setScrollbarWidth as at, cloneArray as En, RowHeightService as xn, getter as ee } from "@progress/kendo-react-common";
11
11
  import { filterBy as Sn } from "@progress/kendo-data-query";
12
- import { getSelectionOptions as we, populateClipboardData as kn, ClipboardActionType as ze, getEditableOptions as Dn, tableKeyboardNavigation as te, ClipboardService as Kn, TableKeyboardNavigationContext as Gn, updateLeft as Tn, updateRight as Hn, getGroupExpandableOptions as Mn, groupExpandReducer as An, getDetailExpandableOptions as Fn, detailExpandReducer as Ln, getSelectedState as dt, editReducer as Bn, EDIT_ACTION as Wn, closestTagName as ye, getSelectedStateFromKeyDown as zn, getColumnIndex as On, getRowIndex as pn } from "@progress/kendo-react-data-tools";
12
+ import { getSelectionOptions as we, populateClipboardData as kn, ClipboardActionType as ze, getEditableOptions as Dn, tableKeyboardNavigation as te, ClipboardService as Kn, TableKeyboardNavigationContext as Gn, updateLeft as Tn, updateRight as Hn, getGroupExpandableOptions as Mn, groupExpandReducer as An, getDetailExpandableOptions as Fn, detailExpandReducer as Ln, getSelectedState as ct, editReducer as Bn, EDIT_ACTION as Wn, closestTagName as ye, getSelectedStateFromKeyDown as zn, getColumnIndex as On, getRowIndex as pn } from "@progress/kendo-react-data-tools";
13
13
  import { ColumnResize as Nn } from "./drag/ColumnResize.mjs";
14
14
  import { CommonDragLogic as Un } from "./drag/CommonDragLogic.mjs";
15
15
  import { useStickyGroups as Vn } from "./hooks/useStickyGroups.mjs";
16
16
  import { getDefaultHeadContextMenuItems as jn, getDefaultBodyContextMenuItems as qn, isRowReorderEnabled as $n, calcRowHeight as _n, sanitizeColumns as Zn, getFlatColumnsState as Jn, getDataAsArray as Xn } from "./utils/index.mjs";
17
17
  import { VirtualScroll as Yn } from "./VirtualScroll.mjs";
18
18
  import { GridContextMenu as Qn, contextMenuItemsMap as er } from "./contextMenu/GridContextMenu.mjs";
19
- import { GridContextMenuAnchorPart as ct, GridContextMenuItemNames as Ee } from "./contextMenu/enums.mjs";
19
+ import { GridContextMenuAnchorPart as dt, GridContextMenuItemNames as Ee } from "./contextMenu/enums.mjs";
20
20
  import { normalizeSortable as tr, firstLevelSortSeqMap as nr } from "./sortCommon.mjs";
21
21
  import { BasePDFExport as rr } from "./BasePDFExport.mjs";
22
22
  import { BaseCSVExport as or } from "./BaseCSVExport.mjs";
23
23
  import { GridContext as ir } from "./utils/GridContext.mjs";
24
24
  import { operators as ar } from "./filterCommon.mjs";
25
- const dr = (t, x, b, W) => {
26
- const ne = Object.keys(x.cells).map((k) => b.findIndex((re) => re.field === k)), $ = Object.keys(x.cells).length > 0 ? ne : !0;
27
- return t.reduce((k, re) => (k[re[W != null ? W : "id"]] = $, k), {});
28
- }, lt = (t, x, b, W) => x.reduce(($, k) => ({
29
- ...$,
30
- ...dr(Sn(t, k), k, b, W)
25
+ const cr = (t, x, b, z) => {
26
+ const ne = Object.keys(x.cells).map((k) => b.findIndex((re) => re.field === k)), _ = Object.keys(x.cells).length > 0 ? ne : !0;
27
+ return t.reduce((k, re) => (k[re[z != null ? z : "id"]] = _, k), {});
28
+ }, lt = (t, x, b, z) => x.reduce((_, k) => ({
29
+ ..._,
30
+ ...cr(Sn(t, k), k, b, z)
31
31
  }), {}), yr = (t) => {
32
32
  var it;
33
- const x = t.gridProps.isClient, [b, W] = d.useState({}), ne = In(), $ = d.useRef(null), k = d.useRef(null), re = (e) => {
34
- e.event.preventDefault(), W({
33
+ const x = t.gridProps.isClient, [b, z] = c.useState({}), ne = In(), _ = c.useRef(null), k = c.useRef(null), re = (e) => {
34
+ e.event.preventDefault(), z({
35
35
  ...b,
36
36
  show: !0,
37
37
  offset: {
@@ -42,17 +42,17 @@ const dr = (t, x, b, W) => {
42
42
  field: e.field
43
43
  });
44
44
  }, Oe = () => {
45
- W({});
45
+ z({});
46
46
  }, st = (e) => {
47
- const n = t.gridProps.dataItemKey || "", o = b.dataItem, r = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = n ? o[n] : void 0, c = a !== void 0 && r.some((l) => l[n] === a), s = a !== void 0 && i.some((l) => l[n] === a);
47
+ const n = t.gridProps.dataItemKey || "", o = b.dataItem, r = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = n ? o[n] : void 0, d = a !== void 0 && r.some((l) => l[n] === a), s = a !== void 0 && i.some((l) => l[n] === a);
48
48
  return e.map((l) => {
49
49
  const u = typeof l == "string" ? er[l] : l;
50
50
  return (u == null ? void 0 : u.name) === Ee.pinRow && u.items ? {
51
51
  ...u,
52
- items: u.items.filter((m) => m.name === Ee.pinTop ? !c : m.name === Ee.pinBottom ? !s : m.name === Ee.unpin ? c || s : !0)
52
+ items: u.items.filter((m) => m.name === Ee.pinTop ? !d : m.name === Ee.pinBottom ? !s : m.name === Ee.unpin ? d || s : !0)
53
53
  } : l;
54
54
  });
55
- }, y = d.useMemo(() => t.columnsRef.find((e) => e.field === b.field), [t.columnsRef, b]), pe = d.useMemo(() => {
55
+ }, y = c.useMemo(() => t.columnsRef.find((e) => e.field === b.field), [t.columnsRef, b]), pe = c.useMemo(() => {
56
56
  const e = t.gridProps.sortable && (y == null ? void 0 : y.sortable);
57
57
  return jn({
58
58
  pdf: !!t.gridProps.pdf,
@@ -60,7 +60,7 @@ const dr = (t, x, b, W) => {
60
60
  selectable: we(t.gridProps.selectable).enabled,
61
61
  clipboard: !!t.gridProps.clipboard
62
62
  });
63
- }, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ne = d.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), qn({
63
+ }, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ne = c.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), qn({
64
64
  pdf: !!t.gridProps.pdf,
65
65
  selectable: we(t.gridProps.selectable).enabled,
66
66
  clipboard: !!t.gridProps.clipboard,
@@ -74,10 +74,10 @@ const dr = (t, x, b, W) => {
74
74
  t.gridProps.pinnable,
75
75
  t.gridProps.rowReorderable,
76
76
  t.gridProps.pdf
77
- ]), de = d.useMemo(() => {
77
+ ]), ce = c.useMemo(() => {
78
78
  const e = (y == null ? void 0 : y.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(b) : e;
79
79
  if (n && b.offset) {
80
- const o = b.dataItem ? ct.body : ct.head, r = n[o], i = b.dataItem ? Ne : pe;
80
+ const o = b.dataItem ? dt.body : dt.head, r = n[o], i = b.dataItem ? Ne : pe;
81
81
  let a;
82
82
  return r === !0 || r === void 0 ? a = i : r !== !1 && (a = r), t.gridProps.pinnable && a && b.dataItem ? st(a) : a;
83
83
  }
@@ -89,7 +89,7 @@ const dr = (t, x, b, W) => {
89
89
  pe,
90
90
  y
91
91
  ]), ut = (e) => {
92
- var c, s, l, u, m, w, h, O, g;
92
+ var d, s, l, u, m, w, h, p, g;
93
93
  const n = e.event.item, o = {
94
94
  target: S.current,
95
95
  syntheticEvent: e.event.syntheticEvent,
@@ -115,10 +115,10 @@ const dr = (t, x, b, W) => {
115
115
  ...we(t.gridProps.selectable),
116
116
  ...o
117
117
  }, a = r.findIndex((E) => E === e.dataItem);
118
- switch ((c = n.data) == null ? void 0 : c.action) {
118
+ switch ((d = n.data) == null ? void 0 : d.action) {
119
119
  case "SortCommand":
120
120
  if (y) {
121
- const E = (s = n.name) == null ? void 0 : s.toLowerCase().includes("asc"), q = ((l = n.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, B = E ? "asc" : q, Q = n.name ? B : void 0;
121
+ const E = (s = n.name) == null ? void 0 : s.toLowerCase().includes("asc"), $ = ((l = n.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, W = E ? "asc" : $, Q = n.name ? W : void 0;
122
122
  Ue(e.event.syntheticEvent, y, Q);
123
123
  }
124
124
  break;
@@ -142,7 +142,7 @@ const dr = (t, x, b, W) => {
142
142
  ze.copy,
143
143
  e.event.nativeEvent,
144
144
  {
145
- copyHeaders: !((O = n.name) != null && O.toLowerCase().includes("noheaders"))
145
+ copyHeaders: !((p = n.name) != null && p.toLowerCase().includes("noheaders"))
146
146
  },
147
147
  e.dataItem,
148
148
  e.field
@@ -170,7 +170,7 @@ const dr = (t, x, b, W) => {
170
170
  break;
171
171
  }
172
172
  Oe();
173
- }, ce = () => {
173
+ }, de = () => {
174
174
  const e = t.columnsRef.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
175
175
  return Zn(e);
176
176
  }, gt = (e, n, o) => {
@@ -190,17 +190,17 @@ const dr = (t, x, b, W) => {
190
190
  field: o
191
191
  });
192
192
  }, ft = (e) => {
193
- var a, c;
193
+ var a, d;
194
194
  if (e.target !== e.currentTarget)
195
195
  return;
196
- clearTimeout(Fe.current), C.current && (C.current.table = U.current);
196
+ clearTimeout(Fe.current), C.current && (C.current.table = V.current);
197
197
  const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
198
198
  t.gridProps.columnVirtualization && (!K || o === Ae.current) && (Fe.current = window.setTimeout(() => {
199
- J();
200
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), j.current && j.current.setScrollLeft(n), V.current && V.current.setScrollLeft(n), M != null && M.current && M.current.setScrollLeft(n), A != null && A.current && A.current.setScrollLeft(n), F != null && F.current && F.current.setScrollLeft(n), L != null && L.current && L.current.setScrollLeft(n);
199
+ X();
200
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), q.current && q.current.setScrollLeft(n), j.current && j.current.setScrollLeft(n), A != null && A.current && A.current.setScrollLeft(n), F != null && F.current && F.current.setScrollLeft(n), L != null && L.current && L.current.setScrollLeft(n), B != null && B.current && B.current.setScrollLeft(n);
201
201
  const r = (a = t.gridProps.virtualSkipRef) == null ? void 0 : a.current;
202
202
  C.current && o !== Ae.current && C.current.scrollHandler(e);
203
- const i = K && ((c = t.gridProps.virtualSkipRef) == null ? void 0 : c.current) !== r;
203
+ const i = K && ((d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current) !== r;
204
204
  t.gridProps.onScroll && x && f(t.gridProps.onScroll, {
205
205
  ...I(e)
206
206
  }), Ae.current = o, i || nt();
@@ -209,7 +209,7 @@ const dr = (t, x, b, W) => {
209
209
  const n = e.target;
210
210
  if ((e.keyCode === 38 || e.keyCode === 40) && n.closest(".k-grid-sticky-container")) {
211
211
  const i = parseInt(((o = n.closest("tr")) == null ? void 0 : o.getAttribute("absolute-row-index")) || "", 10), a = n.getAttribute("data-keyboardnavid");
212
- if (!isNaN(i) && a && !((r = G.current) == null ? void 0 : r.querySelector(`tr[absolute-row-index="${i}"]`)))
212
+ if (!isNaN(i) && a && !((r = T.current) == null ? void 0 : r.querySelector(`tr[absolute-row-index="${i}"]`)))
213
213
  return Ce.current = {
214
214
  navId: a,
215
215
  key: e.key,
@@ -220,9 +220,9 @@ const dr = (t, x, b, W) => {
220
220
  return !1;
221
221
  }, Pt = () => {
222
222
  var a;
223
- if (!Ce.current || !H.current)
223
+ if (!Ce.current || !M.current)
224
224
  return;
225
- const { navId: e, key: n, code: o, keyCode: r } = Ce.current, i = (a = G.current) == null ? void 0 : a.querySelector(
225
+ const { navId: e, key: n, code: o, keyCode: r } = Ce.current, i = (a = T.current) == null ? void 0 : a.querySelector(
226
226
  `[data-keyboardnavid="${e}"]`
227
227
  );
228
228
  i && i.dispatchEvent(
@@ -239,14 +239,14 @@ const dr = (t, x, b, W) => {
239
239
  return;
240
240
  te.onKeyDown(e, {
241
241
  navigatable: t.gridProps.navigatable || !1,
242
- contextStateRef: N,
243
- navigationStateRef: X,
242
+ contextStateRef: U,
243
+ navigationStateRef: Y,
244
244
  onNavigationAction: bt,
245
- columns: ce()
245
+ columns: de()
246
246
  }), te.onGetSnapshotBeforeUpdate({
247
- document: z(),
248
- contextStateRef: N,
249
- navigationStateRef: X
247
+ document: O(),
248
+ contextStateRef: U,
249
+ navigationStateRef: Y
250
250
  });
251
251
  const n = {
252
252
  dataItems: D(),
@@ -260,7 +260,7 @@ const dr = (t, x, b, W) => {
260
260
  }, Rt = (e) => {
261
261
  te.onFocus(e, {
262
262
  navigatable: !!t.gridProps.navigatable,
263
- contextStateRef: N
263
+ contextStateRef: U
264
264
  });
265
265
  }, bt = (e) => {
266
266
  const { columnsRef: n } = t;
@@ -312,8 +312,8 @@ const dr = (t, x, b, W) => {
312
312
  var r, i;
313
313
  if (ot.enabled && ot.mode === "incell" && t.gridProps.dataItemKey) {
314
314
  if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
315
- const c = !!((i = (r = e.target).closest) != null && i.call(r, ".k-grid-pinned-container"));
316
- t.gridProps.editZoneRef.current = c ? "pinned" : "body";
315
+ const d = !!((i = (r = e.target).closest) != null && i.call(r, ".k-grid-pinned-container"));
316
+ t.gridProps.editZoneRef.current = d ? "pinned" : "body";
317
317
  }
318
318
  const a = Bn(t.gridProps.edit, {
319
319
  type: Wn.ENTER_FIELD_EDIT,
@@ -346,7 +346,7 @@ const dr = (t, x, b, W) => {
346
346
  });
347
347
  }
348
348
  Pn(e.group);
349
- }, St = d.useCallback(
349
+ }, St = c.useCallback(
350
350
  (e) => {
351
351
  const { dataItemKey: n = "", pinnedTopRows: o = [], pinnedBottomRows: r = [] } = t.gridProps;
352
352
  if (!n || !e)
@@ -358,17 +358,17 @@ const dr = (t, x, b, W) => {
358
358
  ), le = (e, n) => {
359
359
  if (!t.gridProps.pinnable)
360
360
  return;
361
- const { dataItemKey: o = "", pinnedTopRows: r = [], pinnedBottomRows: i = [] } = t.gridProps, a = n[o], c = r.filter((u) => u[o] !== a), s = i.filter((u) => u[o] !== a);
361
+ const { dataItemKey: o = "", pinnedTopRows: r = [], pinnedBottomRows: i = [] } = t.gridProps, a = n[o], d = r.filter((u) => u[o] !== a), s = i.filter((u) => u[o] !== a);
362
362
  let l;
363
363
  switch (e) {
364
364
  case "pinTop":
365
- l = { pinnedTopRows: [...c, n], pinnedBottomRows: s, dataItem: n };
365
+ l = { pinnedTopRows: [...d, n], pinnedBottomRows: s, dataItem: n };
366
366
  break;
367
367
  case "pinBottom":
368
- l = { pinnedTopRows: c, pinnedBottomRows: [...s, n], dataItem: n };
368
+ l = { pinnedTopRows: d, pinnedBottomRows: [...s, n], dataItem: n };
369
369
  break;
370
370
  case "unpin":
371
- l = { pinnedTopRows: c, pinnedBottomRows: s, dataItem: n };
371
+ l = { pinnedTopRows: d, pinnedBottomRows: s, dataItem: n };
372
372
  break;
373
373
  default:
374
374
  return;
@@ -378,8 +378,8 @@ const dr = (t, x, b, W) => {
378
378
  const { allowUnsort: r, mode: i } = tr(
379
379
  t.gridProps.sortable || !1,
380
380
  n.sortable || !1
381
- ), a = (t.gridProps.sort || []).filter((l) => l.field === n.field)[0], c = o || nr[r][a && a.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== n.field);
382
- c !== "" && n.field && s.push({ field: n.field, dir: c }), je(s, e);
381
+ ), a = (t.gridProps.sort || []).filter((l) => l.field === n.field)[0], d = o || nr[r][a && a.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== n.field);
382
+ d !== "" && n.field && s.push({ field: n.field, dir: d }), je(s, e);
383
383
  }, kt = (e) => {
384
384
  t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
385
385
  ...I(e.syntheticEvent),
@@ -391,7 +391,7 @@ const dr = (t, x, b, W) => {
391
391
  }, Dt = (e) => {
392
392
  var n;
393
393
  if (t.gridProps.onSelectionChange && v.enabled) {
394
- const { event: o, dataItem: r, dataIndex: i, columnIndex: a } = e, c = {
394
+ const { event: o, dataItem: r, dataIndex: i, columnIndex: a } = e, d = {
395
395
  ...I(o),
396
396
  dataItem: r,
397
397
  startColIndex: a,
@@ -410,9 +410,9 @@ const dr = (t, x, b, W) => {
410
410
  selectedField: ""
411
411
  };
412
412
  f(t.gridProps.onSelectionChange, {
413
- ...c,
414
- select: t.gridProps.dataItemKey ? dt({
415
- event: c,
413
+ ...d,
414
+ select: t.gridProps.dataItemKey ? ct({
415
+ event: d,
416
416
  selectedState: (n = t.gridProps.select) != null ? n : {},
417
417
  dataItemKey: t.gridProps.dataItemKey
418
418
  }) : {}
@@ -436,19 +436,19 @@ const dr = (t, x, b, W) => {
436
436
  });
437
437
  if (o === t.gridProps.select)
438
438
  return;
439
- const r = e.target, i = ye(r, "TD"), a = ye(r, "TR"), c = On(i), s = pn(a);
440
- if (c !== void 0 && s !== void 0) {
439
+ const r = e.target, i = ye(r, "TD"), a = ye(r, "TR"), d = On(i), s = pn(a);
440
+ if (d !== void 0 && s !== void 0) {
441
441
  const m = (u = Xn(t.gridProps.data)) == null ? void 0 : u[s];
442
442
  t.gridProps.onSelectionChange && f(t.gridProps.onSelectionChange, {
443
443
  ...n,
444
444
  select: o,
445
445
  dataItem: m,
446
446
  startRowIndex: s,
447
- startColIndex: c,
447
+ startColIndex: d,
448
448
  startDataItem: m,
449
449
  endDataItem: m,
450
450
  endRowIndex: s,
451
- endColIndex: c,
451
+ endColIndex: d,
452
452
  ctrlKey: e.ctrlKey,
453
453
  altKey: e.altKey,
454
454
  metaKey: e.metaKey,
@@ -468,7 +468,7 @@ const dr = (t, x, b, W) => {
468
468
  dataItems: n
469
469
  });
470
470
  }
471
- }, _ = (e, n) => {
471
+ }, Z = (e, n) => {
472
472
  t.gridProps.onSelectionChange && v.enabled && f(t.gridProps.onSelectionChange, {
473
473
  ...e,
474
474
  select: n
@@ -496,12 +496,12 @@ const dr = (t, x, b, W) => {
496
496
  startDataItem: r,
497
497
  endDataItem: i,
498
498
  ...e
499
- }, c = dt({
499
+ }, d = ct({
500
500
  event: a,
501
501
  selectedState: (n = t.gridProps.select) != null ? n : {},
502
502
  dataItemKey: t.gridProps.dataItemKey
503
503
  });
504
- _(a, c);
504
+ Z(a, d);
505
505
  }
506
506
  }, Ht = (e) => {
507
507
  if (t.gridProps.onSelectionChange && v.enabled) {
@@ -517,7 +517,7 @@ const dr = (t, x, b, W) => {
517
517
  e.dataItems.forEach((a) => {
518
518
  const s = ee(t.gridProps.dataItemKey)(a);
519
519
  r[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
520
- }), _(i, r);
520
+ }), Z(i, r);
521
521
  }
522
522
  }, Mt = (e) => {
523
523
  if (t.gridProps.onSelectionChange && v.enabled) {
@@ -532,7 +532,7 @@ const dr = (t, x, b, W) => {
532
532
  startColIndex: r,
533
533
  endColIndex: i
534
534
  }, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
535
- u[o] === !0 || Array.isArray(u[o]) && u[o].length === t.columnsRef.length ? delete u[o] : u[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, _(l, u);
535
+ u[o] === !0 || Array.isArray(u[o]) && u[o].length === t.columnsRef.length ? delete u[o] : u[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, Z(l, u);
536
536
  }
537
537
  }, At = (e) => {
538
538
  if (!v.enabled)
@@ -563,7 +563,7 @@ const dr = (t, x, b, W) => {
563
563
  startColIndex: -1,
564
564
  endColIndex: -1
565
565
  };
566
- _(m, {});
566
+ Z(m, {});
567
567
  return;
568
568
  }
569
569
  const r = lt(
@@ -575,32 +575,32 @@ const dr = (t, x, b, W) => {
575
575
  Object.keys(r).forEach((m) => {
576
576
  r[m] && (i[m] = v.cell ? [...Array(t.columnsRef.length).keys()] : !0);
577
577
  });
578
- let a = -1, c = -1, s = n[0] || null, l = n[n.length - 1] || null;
578
+ let a = -1, d = -1, s = n[0] || null, l = n[n.length - 1] || null;
579
579
  if (t.gridProps.dataItemKey) {
580
580
  const m = ee(t.gridProps.dataItemKey);
581
581
  for (let w = 0; w < n.length; w++) {
582
582
  const h = m(n[w]);
583
- h !== void 0 && r[h] && (a === -1 && (a = w, s = n[w]), c = w, l = n[w]);
583
+ h !== void 0 && r[h] && (a === -1 && (a = w, s = n[w]), d = w, l = n[w]);
584
584
  }
585
585
  }
586
586
  const u = {
587
587
  ...o,
588
588
  startRowIndex: a,
589
- endRowIndex: c,
589
+ endRowIndex: d,
590
590
  startColIndex: 0,
591
591
  endColIndex: t.columnsRef.length - 1,
592
592
  startDataItem: s,
593
593
  endDataItem: l
594
594
  };
595
- _(u, i);
595
+ Z(u, i);
596
596
  }, Ft = (e) => {
597
- t.gridProps.onSelectionChange && v.enabled && _(e, {});
598
- }, Z = (e, n, o, r, i) => {
597
+ t.gridProps.onSelectionChange && v.enabled && Z(e, {});
598
+ }, J = (e, n, o, r, i) => {
599
599
  Bt();
600
600
  const a = t.gridProps.onDataStateChange;
601
601
  if (e) {
602
- const c = { ...I(r), ...n, targetEvent: i };
603
- f(e, c);
602
+ const d = { ...I(r), ...n, targetEvent: i };
603
+ f(e, d);
604
604
  } else a && f(a, {
605
605
  ...I(r),
606
606
  targetEvent: i || {},
@@ -611,7 +611,7 @@ const dr = (t, x, b, W) => {
611
611
  });
612
612
  }, se = (e, n, o) => {
613
613
  var r;
614
- K && t.gridProps.pageable && ((r = C.current) == null || r.reset()), Z(
614
+ K && t.gridProps.pageable && ((r = C.current) == null || r.reset()), J(
615
615
  t.gridProps.onPageChange,
616
616
  { page: e },
617
617
  { skip: e.skip, take: e.take },
@@ -620,7 +620,7 @@ const dr = (t, x, b, W) => {
620
620
  );
621
621
  }, Lt = (e, n, o) => {
622
622
  var r;
623
- t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, J()) : se(e, n, o);
623
+ t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, X()) : se(e, n, o);
624
624
  }, xe = () => {
625
625
  let e = t.gridProps.total || 0;
626
626
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
@@ -637,14 +637,14 @@ const dr = (t, x, b, W) => {
637
637
  }, Ot = (e) => {
638
638
  se({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
639
639
  }, je = (e, n) => {
640
- Z(
640
+ J(
641
641
  t.gridProps.onSortChange,
642
642
  { sort: e },
643
643
  { sort: e, ...K && !t.gridProps.pageable ? { skip: 0 } : {} },
644
644
  n
645
645
  );
646
646
  }, pt = (e, n) => {
647
- Z(
647
+ J(
648
648
  t.gridProps.onFilterChange,
649
649
  { filter: e },
650
650
  { filter: e, skip: 0 },
@@ -663,7 +663,7 @@ const dr = (t, x, b, W) => {
663
663
  );
664
664
  qe({ ...n });
665
665
  }, qe = (e) => {
666
- Z(
666
+ J(
667
667
  t.gridProps.onHighlightChange,
668
668
  { highlight: e },
669
669
  {},
@@ -682,7 +682,7 @@ const dr = (t, x, b, W) => {
682
682
  };
683
683
  })
684
684
  };
685
- Z(
685
+ J(
686
686
  t.gridProps.onSearchChange,
687
687
  {
688
688
  search: r
@@ -692,7 +692,7 @@ const dr = (t, x, b, W) => {
692
692
  );
693
693
  }, Se = () => {
694
694
  var e;
695
- (e = $.current) == null || e.save();
695
+ (e = _.current) == null || e.save();
696
696
  }, $e = async () => {
697
697
  var e;
698
698
  await ((e = k.current) == null ? void 0 : e.save());
@@ -708,7 +708,7 @@ const dr = (t, x, b, W) => {
708
708
  }, ke = (e, n) => {
709
709
  const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
710
710
  let r = {};
711
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Te.current = !0), Z(
711
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Te.current = !0), J(
712
712
  t.gridProps.onGroupChange,
713
713
  { group: e },
714
714
  { group: e, skip: 0, ...r },
@@ -723,21 +723,21 @@ const dr = (t, x, b, W) => {
723
723
  f(t.gridProps.onColumnsStateChange, n);
724
724
  }
725
725
  }, ue = (e, n, o) => {
726
- const { columnsRef: r, columnsState: i } = t, a = r[e], c = Jn(i), s = a.depth, l = (h) => {
726
+ const { columnsRef: r, columnsState: i } = t, a = r[e], d = Jn(i), s = a.depth, l = (h) => {
727
727
  do
728
728
  h++;
729
729
  while (h < r.length && r[h].depth > s);
730
730
  return h;
731
731
  }, u = r.splice(e, l(e) - e);
732
- r.splice(e < n ? l(n - u.length) : n, 0, ...u), r.filter((h) => h.declarationIndex >= 0).forEach((h, O) => {
733
- h.orderIndex = O;
734
- const g = c.find((E) => E.id === h.id);
735
- g && (g.orderIndex = O);
732
+ r.splice(e < n ? l(n - u.length) : n, 0, ...u), r.filter((h) => h.declarationIndex >= 0).forEach((h, p) => {
733
+ h.orderIndex = p;
734
+ const g = d.find((E) => E.id === h.id);
735
+ g && (g.orderIndex = p);
736
736
  });
737
737
  const m = r[e].locked && r[n].locked;
738
738
  Tn(t.columnsMapRef, r, m || be.current), Hn(t.columnsMapRef, r, m || be.current), Ge.current && (be.current = !1, Ge.current = !1);
739
- const w = ce();
740
- if (J(), t.gridProps.onColumnReorder) {
739
+ const w = de();
740
+ if (X(), t.gridProps.onColumnReorder) {
741
741
  const h = {
742
742
  target: S.current,
743
743
  columns: w,
@@ -772,57 +772,57 @@ const dr = (t, x, b, W) => {
772
772
  const i = (t.gridProps.group || []).slice();
773
773
  i.splice(n, 0, { field: r }), ke(i, o);
774
774
  }, $t = (e, n) => {
775
- const o = p.current.getCurrentGroupsLength;
775
+ const o = N.current.getCurrentGroupsLength;
776
776
  Ze(e, o, n);
777
777
  }, Ke = () => {
778
- var e, n, o, r, i, a, c, s, l, u, m, w, h, O;
778
+ var e, n, o, r, i, a, d, s, l, u, m, w, h, p;
779
779
  if (t.gridProps.dataLayoutMode === "stacked") {
780
- const g = ((e = H.current) == null ? void 0 : e.offsetWidth) || 0;
780
+ const g = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0;
781
781
  if ((n = P.current) != null && n.colGroupMain && g) {
782
782
  const E = P.current.colGroupMain.children, R = E.length - 1;
783
783
  if (R >= 0) {
784
- let q = 0;
784
+ let $ = 0;
785
785
  for (let Q = 0; Q < R; Q++) {
786
786
  const Cn = parseFloat((E[Q].width || 0).toString()) || E[Q].clientWidth;
787
- q += Cn;
787
+ $ += Cn;
788
788
  }
789
- const B = Math.max(0, g - q);
790
- E[R].width = B + "px", (r = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && r[R] && (P.current.colGroupHeader.children[R].width = B + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[R] && (P.current.colGroupFooter.children[R].width = B + "px"), (s = (c = P.current.colGroupStickyHeader) == null ? void 0 : c.children) != null && s[R] && (P.current.colGroupStickyHeader.children[R].width = B + "px"), (u = (l = P.current.colGroupStickyFooter) == null ? void 0 : l.children) != null && u[R] && (P.current.colGroupStickyFooter.children[R].width = B + "px"), (w = (m = P.current.colGroupPinnedTop) == null ? void 0 : m.children) != null && w[R] && (P.current.colGroupPinnedTop.children[R].width = B + "px"), (O = (h = P.current.colGroupPinnedBottom) == null ? void 0 : h.children) != null && O[R] && (P.current.colGroupPinnedBottom.children[R].width = B + "px");
789
+ const W = Math.max(0, g - $);
790
+ E[R].width = W + "px", (r = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && r[R] && (P.current.colGroupHeader.children[R].width = W + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[R] && (P.current.colGroupFooter.children[R].width = W + "px"), (s = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && s[R] && (P.current.colGroupStickyHeader.children[R].width = W + "px"), (u = (l = P.current.colGroupStickyFooter) == null ? void 0 : l.children) != null && u[R] && (P.current.colGroupStickyFooter.children[R].width = W + "px"), (w = (m = P.current.colGroupPinnedTop) == null ? void 0 : m.children) != null && w[R] && (P.current.colGroupPinnedTop.children[R].width = W + "px"), (p = (h = P.current.colGroupPinnedBottom) == null ? void 0 : h.children) != null && p[R] && (P.current.colGroupPinnedBottom.children[R].width = W + "px");
791
791
  }
792
792
  }
793
- j.current && j.current.setWidth(g), V.current && V.current.setWidth(g), M.current && M.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), U.current && (U.current.style.width = g ? g + "px" : "");
793
+ q.current && q.current.setWidth(g), j.current && j.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), B.current && B.current.setWidth(g), V.current && (V.current.style.width = g ? g + "px" : "");
794
794
  } else {
795
795
  let g = 0;
796
796
  if (!P.current.colGroupMain)
797
797
  return;
798
798
  const E = P.current.colGroupMain.children;
799
799
  for (let R = 0; R < E.length; R++) {
800
- const q = E[R].width;
801
- if (!q) {
800
+ const $ = E[R].width;
801
+ if (!$) {
802
802
  g = 0;
803
803
  break;
804
804
  }
805
- g += parseFloat(q.toString());
805
+ g += parseFloat($.toString());
806
806
  }
807
- g = Math.round(g), j.current && j.current.setWidth(g), V.current && V.current.setWidth(g), M.current && M.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), U.current && (U.current.style.width = g ? g + "px" : "");
807
+ g = Math.round(g), q.current && q.current.setWidth(g), j.current && j.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), B.current && B.current.setWidth(g), V.current && (V.current.style.width = g ? g + "px" : "");
808
808
  }
809
809
  Ie.current && _t();
810
810
  }, _t = () => {
811
- const e = T.current, n = e ? e.scrollWidth > e.clientWidth : !1;
811
+ const e = H.current, n = e ? e.scrollWidth > e.clientWidth : !1;
812
812
  Ie.current && (Ie.current.style.marginBlockEnd = n ? "var(--kendo-scrollbar-width, 0px)" : "");
813
813
  }, Je = () => {
814
814
  var e;
815
- t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = H.current) == null ? void 0 : e.offsetWidth) || 0);
815
+ t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0);
816
816
  }, ge = () => {
817
817
  var e;
818
- t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = T.current) == null ? void 0 : e.offsetHeight) || 0);
818
+ t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = H.current) == null ? void 0 : e.offsetHeight) || 0);
819
819
  }, Zt = () => {
820
820
  const e = t.gridProps.minRowHeightRef;
821
821
  if (e && !e.current && !t.gridProps.rowHeight) {
822
- const n = _n(G.current);
823
- n && (e.current = n, J());
822
+ const n = _n(T.current);
823
+ n && (e.current = n, X());
824
824
  }
825
- }, fe = d.useCallback(
825
+ }, fe = c.useCallback(
826
826
  (e, n, o, r, i) => {
827
827
  var l;
828
828
  if (!Jt() && !o || !e)
@@ -836,9 +836,9 @@ const dr = (t, x, b, W) => {
836
836
  field: i,
837
837
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
838
838
  ...o
839
- }, c = D(), s = kn({
839
+ }, d = D(), s = kn({
840
840
  event: a,
841
- data: c,
841
+ data: d,
842
842
  selectedState: (l = t.gridProps.select) != null ? l : {},
843
843
  previousCopiedItems: tt.current
844
844
  });
@@ -855,16 +855,16 @@ const dr = (t, x, b, W) => {
855
855
  t.gridProps.onClipboard
856
856
  ]
857
857
  ), Jt = () => {
858
- var i, a, c;
858
+ var i, a, d;
859
859
  if (!ae)
860
860
  return !1;
861
- const e = wn(z()), n = e ? e.matches(".k-table-td") ? e : (i = z()) == null ? void 0 : i.body : (a = z()) == null ? void 0 : a.body, o = n.closest(".k-grid-container"), r = n && ((c = H.current) == null ? void 0 : c.contains(n));
861
+ const e = wn(O()), n = e ? e.matches(".k-table-td") ? e : (i = O()) == null ? void 0 : i.body : (a = O()) == null ? void 0 : a.body, o = n.closest(".k-grid-container"), r = n && ((d = M.current) == null ? void 0 : d.contains(n));
862
862
  return !!(n && r && o);
863
- }, Xe = (e, n, o, r, i, a, c) => {
863
+ }, Xe = (e, n, o, r, i, a, d) => {
864
864
  Ke(), be.current = !0, Ge.current = !0, t.gridProps.onColumnResize && x && f(t.gridProps.onColumnResize, {
865
- columns: ce(),
865
+ columns: de(),
866
866
  nativeEvent: r,
867
- targetColumnId: c,
867
+ targetColumnId: d,
868
868
  index: e,
869
869
  newWidth: n,
870
870
  oldWidth: o,
@@ -899,40 +899,40 @@ const dr = (t, x, b, W) => {
899
899
  e(Yt(n));
900
900
  }, Qt = () => {
901
901
  var e, n, o;
902
- if (G.current && ((e = G.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
902
+ if (T.current && ((e = T.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
903
903
  Me.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? He.current = document.activeElement : He.current = void 0;
904
- const r = Array.from((o = G.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
904
+ const r = Array.from((o = T.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
905
905
  r.length > Be.current.length ? Re.current = r.filter(
906
906
  (i) => !Be.current.includes(i)
907
907
  )[0] : r.length === 1 && (Re.current = r[0], Me.current = !0), Be.current = r;
908
908
  }
909
- }, D = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), z = () => {
909
+ }, D = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), O = () => {
910
910
  var e;
911
911
  if (ae)
912
912
  return ((e = me()) == null ? void 0 : e.ownerDocument) || document;
913
- }, me = () => H.current, Pe = d.useCallback(
913
+ }, me = () => M.current, Pe = c.useCallback(
914
914
  (e) => {
915
915
  var r, i;
916
916
  if (!C.current || !((r = C.current) != null && r.container) || t.gridProps.scrollable === "none")
917
917
  return;
918
- Y.current && Y.current.disconnect();
918
+ G.current && G.current.disconnect();
919
919
  const { rowIndex: n } = e, o = me();
920
920
  if (K) {
921
921
  const a = ((i = C.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
922
922
  C.current.container.scroll(0, a);
923
923
  } else if (o) {
924
924
  const a = n < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${n + 1})`);
925
- a && T.current && (T.current.scrollTop = a.offsetTop);
925
+ a && H.current && (H.current.scrollTop = a.offsetTop);
926
926
  }
927
927
  },
928
928
  [t.gridProps.scrollable]
929
929
  ), Ye = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), en = () => Ye(bn) === Ye(t.columnsRef), tn = () => {
930
- ve.current = window.innerWidth, en() || J();
930
+ ve.current = window.innerWidth, en() || X();
931
931
  }, nn = () => {
932
932
  var a;
933
933
  const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = C.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
934
- r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = Lt, r.pageSize = n, r.scrollableVirtual = K, r.container = T.current, r.tableBody = G.current, r.scrollHeightContainer = et.current, r.table = U.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new xn(e, i)));
935
- }, Qe = d.useCallback(
934
+ r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = Lt, r.pageSize = n, r.scrollableVirtual = K, r.container = H.current, r.tableBody = T.current, r.scrollHeightContainer = et.current, r.table = V.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new xn(e, i)));
935
+ }, Qe = c.useCallback(
936
936
  (e) => {
937
937
  const n = { rowIndex: Le.current };
938
938
  e.forEach((o) => {
@@ -940,9 +940,9 @@ const dr = (t, x, b, W) => {
940
940
  });
941
941
  },
942
942
  [Pe]
943
- ), J = () => {
943
+ ), X = () => {
944
944
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
945
- }, rn = (e) => e.left !== void 0 ? We !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, S = d.useRef(null), C = d.useRef(void 0), P = d.useRef(void 0), p = d.useRef(void 0), N = d.useRef(void 0), X = d.useRef(void 0), he = d.useRef(void 0), Y = d.useRef(null), G = d.useRef(null), on = d.useRef(null), T = d.useRef(null), U = d.useRef(null), an = d.useRef(null), H = d.useRef(null), et = d.useRef(null), V = d.useRef(null), j = d.useRef(null), M = d.useRef(null), A = d.useRef(null), F = d.useRef(null), L = d.useRef(null), dn = d.useRef(null), cn = d.useRef(null), Ge = d.useRef(!1), Te = d.useRef(!1), Re = d.useRef(void 0), He = d.useRef(void 0), Me = d.useRef(!1), be = d.useRef(!0), Ae = d.useRef(0), Fe = d.useRef(void 0), Le = d.useRef(void 0), Be = d.useRef([]), tt = d.useRef([]), ve = d.useRef(0), Ce = d.useRef(
945
+ }, rn = (e) => e.left !== void 0 ? We !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, S = c.useRef(null), C = c.useRef(void 0), P = c.useRef(void 0), N = c.useRef(void 0), U = c.useRef(void 0), Y = c.useRef(void 0), he = c.useRef(void 0), G = c.useRef(null), T = c.useRef(null), on = c.useRef(null), H = c.useRef(null), V = c.useRef(null), an = c.useRef(null), M = c.useRef(null), et = c.useRef(null), j = c.useRef(null), q = c.useRef(null), A = c.useRef(null), F = c.useRef(null), L = c.useRef(null), B = c.useRef(null), cn = c.useRef(null), dn = c.useRef(null), Ge = c.useRef(!1), Te = c.useRef(!1), Re = c.useRef(void 0), He = c.useRef(void 0), Me = c.useRef(!1), be = c.useRef(!0), Ae = c.useRef(0), Fe = c.useRef(void 0), Le = c.useRef(void 0), Be = c.useRef([]), tt = c.useRef([]), ve = c.useRef(0), Ce = c.useRef(
946
946
  null
947
947
  ), ln = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, sn = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, un = !!((it = t.gridProps.group) != null && it.length), {
948
948
  stickyHeaderItems: gn,
@@ -955,8 +955,8 @@ const dr = (t, x, b, W) => {
955
955
  enabled: ln,
956
956
  enabledFooters: sn,
957
957
  flatData: t.dataRef,
958
- containerRef: T,
959
- tableBodyRef: G,
958
+ containerRef: H,
959
+ tableBodyRef: T,
960
960
  rowHeight: t.gridProps.rowHeight,
961
961
  isGrouped: un,
962
962
  virtualSkipRef: t.gridProps.virtualSkipRef,
@@ -966,15 +966,15 @@ const dr = (t, x, b, W) => {
966
966
  return (e = C.current) == null ? void 0 : e.rowHeightService;
967
967
  }
968
968
  }
969
- }), ie = d.useRef(null), hn = d.useRef(null), Rn = d.useRef(null), We = yn(H), K = t.isVirtualScroll, bn = d.useMemo(() => d.Children.toArray(t.gridProps.children), [t.gridProps.children]), rt = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, v = we(t.gridProps.selectable), ot = Dn(t.gridProps.editable), vn = ve.current && ne && ve.current <= ne.medium && t.gridProps.adaptive;
970
- return d.useMemo(() => {
969
+ }), ie = c.useRef(null), hn = c.useRef(null), Rn = c.useRef(null), We = yn(M), K = t.isVirtualScroll, bn = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), rt = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, v = we(t.gridProps.selectable), ot = Dn(t.gridProps.editable), vn = ve.current && ne && ve.current <= ne.medium && t.gridProps.adaptive;
970
+ return c.useMemo(() => {
971
971
  te.onConstructor({
972
972
  navigatable: !!t.gridProps.navigatable,
973
- contextStateRef: N,
974
- navigationStateRef: X,
973
+ contextStateRef: U,
974
+ navigationStateRef: Y,
975
975
  idPrefix: t.id
976
976
  }), C.current = new Yn();
977
- }, []), d.useMemo(() => {
977
+ }, []), c.useMemo(() => {
978
978
  var e;
979
979
  (e = C.current) == null || e.reset();
980
980
  }, [
@@ -985,56 +985,59 @@ const dr = (t, x, b, W) => {
985
985
  rt,
986
986
  t.gridProps.sort,
987
987
  t.gridProps.rowHeight
988
- ]), d.useEffect(() => (t.gridProps.clipboard && (he.current = new Kn(fe), he.current.addEventListeners(z())), () => {
989
- he.current && he.current.removeEventListeners(z());
990
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, fe, z]), d.useEffect(() => (Je(), Ke(), at(), te.onComponentDidMount({
991
- scope: H.current || void 0,
992
- contextStateRef: N,
993
- navigationStateRef: X
988
+ ]), c.useEffect(() => (t.gridProps.clipboard && (he.current = new Kn(fe), he.current.addEventListeners(O())), () => {
989
+ he.current && he.current.removeEventListeners(O());
990
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard, fe, O]), c.useEffect(() => (Je(), Ke(), at(), te.onComponentDidMount({
991
+ scope: M.current || void 0,
992
+ contextStateRef: U,
993
+ navigationStateRef: Y
994
994
  }), () => {
995
995
  clearTimeout(Fe.current);
996
- }), []), d.useEffect(() => {
996
+ }), []), c.useEffect(() => {
997
997
  var e;
998
998
  Je(), Ke(), at(), K && (ge(), Zt(), (e = C.current) == null || e.update()), nt(), Qt(), te.onComponentDidUpdate({
999
- scope: H.current || void 0,
1000
- contextStateRef: N,
1001
- navigationStateRef: X,
999
+ scope: M.current || void 0,
1000
+ contextStateRef: U,
1001
+ navigationStateRef: Y,
1002
1002
  focusFirst: Te.current,
1003
1003
  newEditableRow: Re.current,
1004
1004
  singleEditRow: Me.current,
1005
1005
  lastActiveElement: He.current,
1006
1006
  navigatable: t.gridProps.navigatable
1007
1007
  }), Pt(), Te.current = !1, Re.current = void 0, Ce.current = void 0;
1008
- }), d.useEffect(() => {
1008
+ }), c.useEffect(() => {
1009
1009
  if (ae) {
1010
1010
  const e = {
1011
1011
  rootMargin: "0px",
1012
1012
  threshold: 0.9
1013
1013
  };
1014
- Y.current = window.IntersectionObserver && new window.IntersectionObserver(Qe, e) || null;
1014
+ G.current = window.IntersectionObserver && new window.IntersectionObserver(Qe, e) || null;
1015
1015
  }
1016
- }, [Qe]), d.useEffect(() => {
1016
+ return () => {
1017
+ G.current && (G.current.disconnect(), G.current = null);
1018
+ };
1019
+ }, [Qe]), c.useEffect(() => {
1017
1020
  var n;
1018
1021
  let e;
1019
1022
  return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
1020
1023
  tn(), K && ge();
1021
- }), e.observe((n = z()) == null ? void 0 : n.body)), () => {
1024
+ }), e.observe((n = O()) == null ? void 0 : n.body)), () => {
1022
1025
  e == null || e.disconnect();
1023
1026
  };
1024
- }, []), d.useEffect(() => {
1025
- if (!ae || !window.ResizeObserver || !K || !T.current)
1027
+ }, []), c.useEffect(() => {
1028
+ if (!ae || !window.ResizeObserver || !K || !H.current)
1026
1029
  return;
1027
1030
  const e = () => {
1028
1031
  var i, a;
1029
1032
  const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
1030
1033
  ge();
1031
1034
  const r = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
1032
- (o === 0 && r > 0 || Math.abs(r - o) > 10) && J();
1035
+ (o === 0 && r > 0 || Math.abs(r - o) > 10) && X();
1033
1036
  }, n = new window.ResizeObserver(e);
1034
- return n.observe(T.current), () => {
1037
+ return n.observe(H.current), () => {
1035
1038
  n.disconnect();
1036
1039
  };
1037
- }, [K, ge]), d.useImperativeHandle(
1040
+ }, [K, ge]), c.useImperativeHandle(
1038
1041
  S,
1039
1042
  () => ({
1040
1043
  get element() {
@@ -1042,7 +1045,7 @@ const dr = (t, x, b, W) => {
1042
1045
  },
1043
1046
  props: t.gridProps,
1044
1047
  get columns() {
1045
- return ce();
1048
+ return de();
1046
1049
  },
1047
1050
  scrollIntoView: (e) => {
1048
1051
  var r;
@@ -1051,10 +1054,10 @@ const dr = (t, x, b, W) => {
1051
1054
  const { rowIndex: n } = e;
1052
1055
  Le.current = n;
1053
1056
  const o = me();
1054
- if (Y.current && o) {
1055
- Y.current.disconnect();
1057
+ if (G.current && o) {
1058
+ G.current.disconnect();
1056
1059
  const i = o.querySelector(`[absolute-row-index="${Le.current}"]`);
1057
- i ? Y.current.observe(i) : Pe(e);
1060
+ i ? G.current.observe(i) : Pe(e);
1058
1061
  }
1059
1062
  },
1060
1063
  fitColumns: (e) => {
@@ -1066,17 +1069,17 @@ const dr = (t, x, b, W) => {
1066
1069
  getTotal: xe,
1067
1070
  getLeafDataItems: D
1068
1071
  })
1069
- ), d.useImperativeHandle(t.gridRef, () => S.current), d.useMemo(() => {
1072
+ ), c.useImperativeHandle(t.gridRef, () => S.current), c.useMemo(() => {
1070
1073
  P.current = new Nn(Xe);
1071
- }, [t.gridProps.onColumnResize, t.columnsRef]), d.useMemo(() => {
1072
- p.current = new Un(ue, qt, Ze);
1074
+ }, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
1075
+ N.current = new Un(ue, qt, Ze);
1073
1076
  }, [
1074
1077
  t.gridProps.onColumnReorder,
1075
1078
  t.gridProps.onGroupChange,
1076
1079
  t.gridProps.group,
1077
1080
  t.columnsRef,
1078
1081
  t.gridProps.groupable
1079
- ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState = En(t.columnsState), p.current.reorderable = t.gridProps.reorderable || !1, p.current.groupable = rt, p.current.columns = t.columnsRef, p.current.dir = We, nn(), /* @__PURE__ */ d.createElement(
1082
+ ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState = En(t.columnsState), N.current.reorderable = t.gridProps.reorderable || !1, N.current.groupable = rt, N.current.columns = t.columnsRef, N.current.dir = We, nn(), /* @__PURE__ */ c.createElement(
1080
1083
  ir.Provider,
1081
1084
  {
1082
1085
  value: {
@@ -1146,56 +1149,56 @@ const dr = (t, x, b, W) => {
1146
1149
  dispatchDetailExpand: Et,
1147
1150
  dispatchGroupExpand: xt,
1148
1151
  columnResizeRef: P,
1149
- dragLogicRef: p,
1150
- navigationStateRef: X,
1151
- tableElementRef: U,
1152
- tableBodyElementRef: G,
1152
+ dragLogicRef: N,
1153
+ navigationStateRef: Y,
1154
+ tableElementRef: V,
1155
+ tableBodyElementRef: T,
1153
1156
  headerElementRef: on,
1154
- containerElementRef: T,
1157
+ containerElementRef: H,
1155
1158
  headTableElementRef: an,
1156
- elementRef: H,
1159
+ elementRef: M,
1157
1160
  virtualScrollHeightContainerRef: et,
1158
- footerRef: V,
1159
- headerRef: j,
1161
+ footerRef: j,
1162
+ headerRef: q,
1160
1163
  vsRef: C,
1161
1164
  stickyHeaderItems: gn,
1162
1165
  stickyHeaderRef: fn,
1163
1166
  stickyFooterItems: mn,
1164
1167
  stickyFooterRef: Ie,
1165
- stickyHeaderTableRef: M,
1166
- stickyFooterTableRef: A,
1167
- pinnedTopTableRef: F,
1168
- pinnedBottomTableRef: L,
1169
- pinnedTopRef: dn,
1170
- pinnedBottomRef: cn,
1168
+ stickyHeaderTableRef: A,
1169
+ stickyFooterTableRef: F,
1170
+ pinnedTopTableRef: L,
1171
+ pinnedBottomTableRef: B,
1172
+ pinnedTopRef: cn,
1173
+ pinnedBottomRef: dn,
1171
1174
  onRowPin: le,
1172
1175
  getRowPinPosition: St
1173
1176
  }
1174
1177
  },
1175
- /* @__PURE__ */ d.createElement(Gn.Provider, { value: N.current }, t.children),
1176
- /* @__PURE__ */ d.createElement(
1178
+ /* @__PURE__ */ c.createElement(Gn.Provider, { value: U.current }, t.children),
1179
+ /* @__PURE__ */ c.createElement(
1177
1180
  Qn,
1178
1181
  {
1179
- show: b.show && (de == null ? void 0 : de.length),
1182
+ show: b.show && (ce == null ? void 0 : ce.length),
1180
1183
  dataItem: b.dataItem,
1181
1184
  field: b.field,
1182
- items: de,
1185
+ items: ce,
1183
1186
  offset: b.offset,
1184
1187
  onClose: Oe,
1185
1188
  onSelect: ut
1186
1189
  }
1187
1190
  ),
1188
- t.gridProps.pdf && /* @__PURE__ */ d.createElement(
1191
+ t.gridProps.pdf && /* @__PURE__ */ c.createElement(
1189
1192
  rr,
1190
1193
  {
1191
1194
  gridProps: t.gridProps,
1192
1195
  innerGrid: t.innerGrid,
1193
1196
  pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
1194
1197
  onPdfExport: Vt,
1195
- ref: (e) => $.current = e
1198
+ ref: (e) => _.current = e
1196
1199
  }
1197
1200
  ),
1198
- t.gridProps.csv && /* @__PURE__ */ d.createElement(
1201
+ t.gridProps.csv && /* @__PURE__ */ c.createElement(
1199
1202
  or,
1200
1203
  {
1201
1204
  gridProps: t.gridProps,