@progress/kendo-react-grid 12.2.1-develop.1 → 12.3.0-develop.2

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.
@@ -7,9 +7,9 @@
7
7
  */
8
8
  "use client";
9
9
  import * as a from "react";
10
- import { useAdaptiveModeContext as Ut, canUseDOM as ae, getActiveElement as Vt, useDir as Wt, setScrollbarWidth as Be, cloneArray as jt, getter as de, RowHeightService as _t } from "@progress/kendo-react-common";
10
+ import { useAdaptiveModeContext as Ut, canUseDOM as ae, getActiveElement as Vt, useDir as Wt, setScrollbarWidth as Ue, cloneArray as jt, getter as de, RowHeightService as _t } from "@progress/kendo-react-common";
11
11
  import { filterBy as qt } from "@progress/kendo-data-query";
12
- import { getSelectionOptions as ce, populateClipboardData as $t, ClipboardActionType as Se, getEditableOptions as Xt, tableKeyboardNavigation as O, ClipboardService as Jt, TableKeyboardNavigationContext as Yt, editReducer as Qt, EDIT_ACTION as Zt, getDetailExpandableOptions as pt, detailExpandReducer as en, getGroupExpandableOptions as tn, groupExpandReducer as nn, getSelectedState as Ue, getSelectedStateFromKeyDown as rn, closestTagName as Ve, getColumnIndex as on, getRowIndex as an, updateLeft as dn, updateRight as cn } from "@progress/kendo-react-data-tools";
12
+ import { getSelectionOptions as ce, populateClipboardData as $t, ClipboardActionType as xe, getEditableOptions as Xt, tableKeyboardNavigation as O, ClipboardService as Jt, TableKeyboardNavigationContext as Yt, closestTagName as le, editReducer as Qt, EDIT_ACTION as Zt, getDetailExpandableOptions as pt, detailExpandReducer as en, getGroupExpandableOptions as tn, groupExpandReducer as nn, getSelectedState as Ve, getSelectedStateFromKeyDown as rn, getColumnIndex as on, getRowIndex as an, updateLeft as dn, updateRight as cn } from "@progress/kendo-react-data-tools";
13
13
  import { ColumnResize as ln } from "./drag/ColumnResize.mjs";
14
14
  import { CommonDragLogic as sn } from "./drag/CommonDragLogic.mjs";
15
15
  import { SAFARI_REGEX as un } from "./constants/index.mjs";
@@ -41,7 +41,7 @@ const xn = (t, v, g, y) => {
41
41
  });
42
42
  }, H = () => {
43
43
  y({});
44
- }, h = a.useMemo(() => t.columnsRef.find((e) => e.field === g.field), [t.columnsRef, g]), xe = a.useMemo(() => {
44
+ }, h = a.useMemo(() => t.columnsRef.find((e) => e.field === g.field), [t.columnsRef, g]), ke = a.useMemo(() => {
45
45
  const e = t.gridProps.sortable && (h == null ? void 0 : h.sortable);
46
46
  return gn({
47
47
  pdf: !!t.gridProps.pdf,
@@ -49,7 +49,7 @@ const xn = (t, v, g, y) => {
49
49
  selectable: ce(t.gridProps.selectable).enabled,
50
50
  clipboard: !!t.gridProps.clipboard
51
51
  });
52
- }, [h, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), ke = a.useMemo(() => {
52
+ }, [h, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), De = a.useMemo(() => {
53
53
  const e = t.gridProps.sortable && (h == null ? void 0 : h.sortable);
54
54
  return fn({
55
55
  pdf: !!t.gridProps.pdf,
@@ -61,10 +61,10 @@ const xn = (t, v, g, y) => {
61
61
  }, [h, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), J = a.useMemo(() => {
62
62
  const e = (h == null ? void 0 : h.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(g) : e;
63
63
  if (n && g.offset) {
64
- const o = g.dataItem ? We.body : We.head, r = n[o], i = g.dataItem ? ke : xe;
64
+ const o = g.dataItem ? We.body : We.head, r = n[o], i = g.dataItem ? De : ke;
65
65
  return r === !1 ? void 0 : r === !0 || r === void 0 ? i : r;
66
66
  }
67
- }, [t.gridProps.contextMenu, g, ke, xe, h]), je = (e) => {
67
+ }, [t.gridProps.contextMenu, g, De, ke, h]), je = (e) => {
68
68
  var c, s, u, P, I, ie, b, q, $;
69
69
  const n = e.event.item, o = {
70
70
  target: C.current,
@@ -95,7 +95,7 @@ const xn = (t, v, g, y) => {
95
95
  case "SortCommand":
96
96
  if (h) {
97
97
  const X = (s = n.name) == null ? void 0 : s.toLowerCase().includes("asc"), Ot = ((u = n.name) == null ? void 0 : u.toLowerCase().includes("desc")) ? "desc" : void 0, Nt = X ? "asc" : Ot, Bt = n.name ? Nt : void 0;
98
- De(e.event.syntheticEvent, h, Bt);
98
+ Ke(e.event.syntheticEvent, h, Bt);
99
99
  }
100
100
  break;
101
101
  case "SelectRowCommand":
@@ -105,7 +105,7 @@ const xn = (t, v, g, y) => {
105
105
  ct(i);
106
106
  break;
107
107
  case "ExportPDFCommand":
108
- le();
108
+ se();
109
109
  break;
110
110
  case "ClearSelectionCommand":
111
111
  st(i);
@@ -115,7 +115,7 @@ const xn = (t, v, g, y) => {
115
115
  break;
116
116
  case "CopySelectionCommand":
117
117
  p(
118
- Se.copy,
118
+ xe.copy,
119
119
  e.event.nativeEvent,
120
120
  {
121
121
  copyHeaders: !((q = n.name) != null && q.toLowerCase().includes("noheaders"))
@@ -126,7 +126,7 @@ const xn = (t, v, g, y) => {
126
126
  break;
127
127
  case "PasteCommand":
128
128
  p(
129
- Se.paste,
129
+ xe.paste,
130
130
  e.event.nativeEvent,
131
131
  {
132
132
  copyHeaders: !(($ = n.name) != null && $.toLowerCase().includes("noheaders"))
@@ -159,13 +159,13 @@ const xn = (t, v, g, y) => {
159
159
  }, qe = (e) => {
160
160
  if (e.target !== e.currentTarget)
161
161
  return;
162
- clearTimeout(Ie.current), m.current && (m.current.table = T.current);
162
+ clearTimeout(Ee.current), m.current && (m.current.table = T.current);
163
163
  const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
164
- t.gridProps.columnVirtualization && (!k || o === Ce.current) && (Ie.current = window.setTimeout(() => {
164
+ t.gridProps.columnVirtualization && (!k || o === Ie.current) && (Ee.current = window.setTimeout(() => {
165
165
  U();
166
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), j.current && j.current.setScrollLeft(n), W.current && W.current.setScrollLeft(n), m.current && o !== Ce.current && m.current.scrollHandler(e), t.gridProps.onScroll && v && l(t.gridProps.onScroll, {
166
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), j.current && j.current.setScrollLeft(n), W.current && W.current.setScrollLeft(n), m.current && o !== Ie.current && m.current.scrollHandler(e), t.gridProps.onScroll && v && l(t.gridProps.onScroll, {
167
167
  ...f(e)
168
- }), Ce.current = o;
168
+ }), Ie.current = o;
169
169
  }, $e = (e) => {
170
170
  O.onKeyDown(e, {
171
171
  navigatable: t.gridProps.navigatable || !1,
@@ -201,12 +201,12 @@ const xn = (t, v, g, y) => {
201
201
  if (e.action === "reorderToRight" && o < t.columnsRef.length - 1) {
202
202
  if (n[o + 1].disableReorder)
203
203
  return;
204
- ge(o, o + 1, e.event);
204
+ fe(o, o + 1, e.event);
205
205
  }
206
206
  if (e.action === "reorderToLeft" && o > 0) {
207
207
  if (n[o - 1].disableReorder)
208
208
  return;
209
- ge(o, o - 1, e.event);
209
+ fe(o, o - 1, e.event);
210
210
  }
211
211
  }
212
212
  if (e.action === "select" && it(e.event), t.gridProps.onNavigationAction && v) {
@@ -217,12 +217,12 @@ const xn = (t, v, g, y) => {
217
217
  l(t.gridProps.onNavigationAction, o);
218
218
  }
219
219
  }, Ye = (e, n) => {
220
- t.gridProps.onRowClick && e.target.nodeName === "TD" && l(t.gridProps.onRowClick, {
220
+ t.gridProps.onRowClick && le(e.target, "TD") && l(t.gridProps.onRowClick, {
221
221
  dataItem: n,
222
222
  ...f(e)
223
223
  });
224
224
  }, Qe = (e, n) => {
225
- t.gridProps.onRowDoubleClick && e.target.nodeName === "TD" && l(t.gridProps.onRowDoubleClick, {
225
+ t.gridProps.onRowDoubleClick && le(e.target, "TD") && l(t.gridProps.onRowDoubleClick, {
226
226
  dataItem: n,
227
227
  ...f(e)
228
228
  });
@@ -239,7 +239,7 @@ const xn = (t, v, g, y) => {
239
239
  ...f(e.syntheticEvent)
240
240
  });
241
241
  }, et = (e, n, o) => {
242
- if (Ne.enabled && Ne.mode === "incell" && t.gridProps.dataItemKey) {
242
+ if (Be.enabled && Be.mode === "incell" && t.gridProps.dataItemKey) {
243
243
  const r = Qt(t.gridProps.edit, {
244
244
  type: Zt.ENTER_FIELD_EDIT,
245
245
  payload: { id: n[t.gridProps.dataItemKey], field: o }
@@ -270,12 +270,12 @@ const xn = (t, v, g, y) => {
270
270
  groupExpand: i
271
271
  });
272
272
  }
273
- }, De = (e, n, o) => {
273
+ }, Ke = (e, n, o) => {
274
274
  const { allowUnsort: r, mode: i } = In(
275
275
  t.gridProps.sortable || !1,
276
276
  n.sortable || !1
277
277
  ), d = (t.gridProps.sort || []).filter((u) => u.field === n.field)[0], c = o || En[r][d && d.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((u) => u.field !== n.field);
278
- c !== "" && n.field && s.push({ field: n.field, dir: c }), Ke(s, e);
278
+ c !== "" && n.field && s.push({ field: n.field, dir: c }), Te(s, e);
279
279
  }, rt = (e) => {
280
280
  t.gridProps.onItemChange && l(t.gridProps.onItemChange, {
281
281
  ...f(e.syntheticEvent),
@@ -307,7 +307,7 @@ const xn = (t, v, g, y) => {
307
307
  };
308
308
  l(t.gridProps.onSelectionChange, {
309
309
  ...c,
310
- select: t.gridProps.dataItemKey ? Ue({
310
+ select: t.gridProps.dataItemKey ? Ve({
311
311
  event: c,
312
312
  selectedState: (n = t.gridProps.select) != null ? n : {},
313
313
  dataItemKey: t.gridProps.dataItemKey
@@ -332,7 +332,7 @@ const xn = (t, v, g, y) => {
332
332
  });
333
333
  if (o === t.gridProps.select)
334
334
  return;
335
- const r = e.target, i = Ve(r, "TD"), d = Ve(r, "TR"), c = on(i), s = an(d);
335
+ const r = e.target, i = le(r, "TD"), d = le(r, "TR"), c = on(i), s = an(d);
336
336
  if (c !== void 0 && s !== void 0) {
337
337
  const I = (P = hn(t.gridProps.data)) == null ? void 0 : P[s];
338
338
  t.gridProps.onSelectionChange && l(t.gridProps.onSelectionChange, {
@@ -382,7 +382,7 @@ const xn = (t, v, g, y) => {
382
382
  startDataItem: o,
383
383
  endDataItem: r,
384
384
  ...e
385
- }, d = Ue({
385
+ }, d = Ve({
386
386
  event: i,
387
387
  selectedState: (n = t.gridProps.select) != null ? n : {},
388
388
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
@@ -465,7 +465,7 @@ const xn = (t, v, g, y) => {
465
465
  o >= 0 && Z({ skip: o, take: n }, e);
466
466
  }, ht = (e) => {
467
467
  Z({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
468
- }, Ke = (e, n) => {
468
+ }, Te = (e, n) => {
469
469
  G(
470
470
  t.gridProps.onSortChange,
471
471
  { sort: e },
@@ -481,7 +481,7 @@ const xn = (t, v, g, y) => {
481
481
  );
482
482
  }, bt = (e) => {
483
483
  if (!e || e.length === 0) {
484
- Te({});
484
+ Me({});
485
485
  return;
486
486
  }
487
487
  const n = kn(
@@ -490,9 +490,14 @@ const xn = (t, v, g, y) => {
490
490
  t.columnsRef,
491
491
  t.gridProps.dataItemKey
492
492
  );
493
- Te({ ...n });
494
- }, Te = (e) => {
495
- G(t.gridProps.onHighlightChange, { highlight: e }, {}, {});
493
+ Me({ ...n });
494
+ }, Me = (e) => {
495
+ G(
496
+ t.gridProps.onHighlightChange,
497
+ { highlight: e },
498
+ {},
499
+ {}
500
+ );
496
501
  }, vt = (e) => {
497
502
  const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
498
503
  logic: "or",
@@ -514,22 +519,22 @@ const xn = (t, v, g, y) => {
514
519
  { skip: 0 },
515
520
  e.syntheticEvent
516
521
  );
517
- }, le = () => {
522
+ }, se = () => {
518
523
  var e;
519
524
  (e = A.current) == null || e.save();
520
525
  }, Ct = async (e) => {
521
526
  var n, o;
522
527
  (n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
523
- }, se = (e, n) => {
528
+ }, ue = (e, n) => {
524
529
  const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
525
530
  let r = {};
526
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Re.current = !0), G(
531
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (be.current = !0), G(
527
532
  t.gridProps.onGroupChange,
528
533
  { group: e },
529
534
  { group: e, skip: 0, ...r },
530
535
  o
531
536
  );
532
- }, ue = (e) => {
537
+ }, ge = (e) => {
533
538
  if (t.gridProps.onColumnsStateChange) {
534
539
  const n = {
535
540
  target: C.current,
@@ -537,7 +542,7 @@ const xn = (t, v, g, y) => {
537
542
  };
538
543
  l(t.gridProps.onColumnsStateChange, n);
539
544
  }
540
- }, ge = (e, n, o) => {
545
+ }, fe = (e, n, o) => {
541
546
  const { columnsRef: r, columnsState: i } = t, d = r[e], c = Rn(i), s = d.depth, u = (b) => {
542
547
  do
543
548
  b++;
@@ -550,7 +555,7 @@ const xn = (t, v, g, y) => {
550
555
  $ && ($.orderIndex = q);
551
556
  });
552
557
  const I = r[e].locked && r[n].locked;
553
- dn(t.columnsMapRef, r, I || re.current), cn(t.columnsMapRef, r, I || re.current), he.current && (re.current = !1, he.current = !1);
558
+ dn(t.columnsMapRef, r, I || re.current), cn(t.columnsMapRef, r, I || re.current), Re.current && (re.current = !1, Re.current = !1);
554
559
  const ie = Y();
555
560
  if (U(), t.gridProps.onColumnReorder) {
556
561
  const b = {
@@ -561,7 +566,7 @@ const xn = (t, v, g, y) => {
561
566
  };
562
567
  l(t.gridProps.onColumnReorder, b);
563
568
  }
564
- ue(i);
569
+ ge(i);
565
570
  }, B = (e, n, o) => {
566
571
  const r = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
567
572
  if (o === "forbidden" || !r || !_.current)
@@ -579,17 +584,17 @@ const xn = (t, v, g, y) => {
579
584
  if (t.gridProps.group === void 0)
580
585
  return;
581
586
  const r = t.gridProps.group.slice();
582
- r.splice(n, 0, ...r.splice(e, 1)), se(r, o);
583
- }, Me = (e, n, o) => {
587
+ r.splice(n, 0, ...r.splice(e, 1)), ue(r, o);
588
+ }, Ae = (e, n, o) => {
584
589
  const r = t.columnsRef[e].field;
585
590
  if (!r)
586
591
  return;
587
592
  const i = (t.gridProps.group || []).slice();
588
- i.splice(n, 0, { field: r }), se(i, o);
593
+ i.splice(n, 0, { field: r }), ue(i, o);
589
594
  }, Et = (e, n) => {
590
595
  const o = D.current.getCurrentGroupsLength;
591
- Me(e, o, n);
592
- }, fe = () => {
596
+ Ae(e, o, n);
597
+ }, me = () => {
593
598
  let e = 0;
594
599
  if (!x.current.colGroupMain)
595
600
  return;
@@ -603,10 +608,10 @@ const xn = (t, v, g, y) => {
603
608
  e += parseFloat(r.toString());
604
609
  }
605
610
  e = Math.round(e), j.current && j.current.setWidth(e), W.current && W.current.setWidth(e), T.current && (T.current.style.width = e ? e + "px" : "");
606
- }, Ae = () => {
611
+ }, He = () => {
607
612
  var e;
608
613
  t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0);
609
- }, He = () => {
614
+ }, Ge = () => {
610
615
  var e;
611
616
  t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = V.current) == null ? void 0 : e.offsetHeight) || 0);
612
617
  }, wt = () => {
@@ -633,9 +638,9 @@ const xn = (t, v, g, y) => {
633
638
  event: d,
634
639
  data: c,
635
640
  selectedState: (u = t.gridProps.select) != null ? u : {},
636
- previousCopiedItems: ze.current
641
+ previousCopiedItems: Oe.current
637
642
  });
638
- e !== Se.paste && (ze.current = s.copiedItems), t.gridProps.onClipboard && v && l(t.gridProps.onClipboard, {
643
+ e !== xe.paste && (Oe.current = s.copiedItems), t.gridProps.onClipboard && v && l(t.gridProps.onClipboard, {
639
644
  ...d,
640
645
  ...s
641
646
  });
@@ -654,7 +659,7 @@ const xn = (t, v, g, y) => {
654
659
  const e = Vt(S()), n = e ? e.matches(".k-table-td") ? e : (i = S()) == null ? void 0 : i.body : (d = S()) == null ? void 0 : d.body, o = n.closest(".k-grid-container"), r = n && ((c = M.current) == null ? void 0 : c.contains(n));
655
660
  return !!(n && r && o);
656
661
  }, St = (e, n, o, r, i, d, c) => {
657
- fe(), re.current = !0, he.current = !0, t.gridProps.onColumnResize && v && l(t.gridProps.onColumnResize, {
662
+ me(), re.current = !0, Re.current = !0, t.gridProps.onColumnResize && v && l(t.gridProps.onColumnResize, {
658
663
  columns: Y(),
659
664
  nativeEvent: r,
660
665
  targetColumnId: c,
@@ -663,7 +668,7 @@ const xn = (t, v, g, y) => {
663
668
  oldWidth: o,
664
669
  end: i,
665
670
  target: C.current
666
- }), i && ue(d);
671
+ }), i && ge(d);
667
672
  }, xt = () => {
668
673
  var e;
669
674
  return {
@@ -693,17 +698,17 @@ const xn = (t, v, g, y) => {
693
698
  }, Dt = () => {
694
699
  var e, n, o;
695
700
  if (z.current && ((e = z.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
696
- ve.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? be.current = document.activeElement : be.current = void 0;
701
+ Ce.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? ve.current = document.activeElement : ve.current = void 0;
697
702
  const r = Array.from((o = z.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
698
- r.length > we.current.length ? ne.current = r.filter(
699
- (i) => !we.current.includes(i)
700
- )[0] : r.length === 1 && (ne.current = r[0], ve.current = !0), we.current = r;
703
+ r.length > ye.current.length ? ne.current = r.filter(
704
+ (i) => !ye.current.includes(i)
705
+ )[0] : r.length === 1 && (ne.current = r[0], Ce.current = !0), ye.current = r;
701
706
  }
702
707
  }, w = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), S = () => {
703
708
  var e;
704
709
  if (ae)
705
710
  return ((e = ee()) == null ? void 0 : e.ownerDocument) || document;
706
- }, ee = () => M.current, me = a.useCallback(
711
+ }, ee = () => M.current, Pe = a.useCallback(
707
712
  (e) => {
708
713
  var r, i;
709
714
  if (!m.current || !((r = m.current) != null && r.container) || t.gridProps.scrollable === "none")
@@ -719,23 +724,23 @@ const xn = (t, v, g, y) => {
719
724
  }
720
725
  },
721
726
  [t.gridProps.scrollable]
722
- ), Ge = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), Kt = () => Ge(Ft) === Ge(t.columnsRef), Tt = () => {
727
+ ), Le = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), Kt = () => Le(Ft) === Le(t.columnsRef), Tt = () => {
723
728
  oe.current = window.innerWidth, Kt() || U();
724
729
  }, Mt = () => {
725
730
  var d;
726
731
  const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = m.current, i = t.gridProps.rowHeight || ((d = o.minRowHeightRef) == null ? void 0 : d.current) || 0;
727
- r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = ut, r.pageSize = n, r.scrollableVirtual = k, r.container = V.current, r.tableBody = z.current, r.scrollHeightContainer = Fe.current, r.table = T.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new _t(e, i)));
728
- }, Le = a.useCallback(
732
+ r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = ut, r.pageSize = n, r.scrollableVirtual = k, r.container = V.current, r.tableBody = z.current, r.scrollHeightContainer = ze.current, r.table = T.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new _t(e, i)));
733
+ }, Fe = a.useCallback(
729
734
  (e) => {
730
- const n = { rowIndex: Ee.current };
735
+ const n = { rowIndex: we.current };
731
736
  e.forEach((o) => {
732
- o.boundingClientRect.height !== o.intersectionRect.height && me(n);
737
+ o.boundingClientRect.height !== o.intersectionRect.height && Pe(n);
733
738
  });
734
739
  },
735
- [me]
740
+ [Pe]
736
741
  ), U = () => {
737
742
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
738
- }, At = (e) => e.left !== void 0 ? ye !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, C = a.useRef(null), m = a.useRef(void 0), x = a.useRef(void 0), D = a.useRef(void 0), K = a.useRef(void 0), L = a.useRef(void 0), te = a.useRef(void 0), F = a.useRef(null), z = a.useRef(null), Ht = a.useRef(null), V = a.useRef(null), T = a.useRef(null), Pe = a.useRef(null), M = a.useRef(null), Fe = a.useRef(null), W = a.useRef(null), j = a.useRef(null), he = a.useRef(!1), Re = a.useRef(!1), ne = a.useRef(void 0), be = a.useRef(void 0), ve = a.useRef(!1), re = a.useRef(!0), Ce = a.useRef(0), Ie = a.useRef(void 0), Ee = a.useRef(void 0), we = a.useRef([]), ze = a.useRef([]), oe = a.useRef(0), _ = a.useRef(null), Gt = a.useRef(null), Lt = a.useRef(null), ye = Wt(M), k = t.isVirtualScroll, Ft = a.useMemo(() => a.Children.toArray(t.gridProps.children), [t.gridProps.children]), Oe = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, R = ce(t.gridProps.selectable), Ne = Xt(t.gridProps.editable), zt = oe.current && N && oe.current <= N.medium && t.gridProps.adaptive;
743
+ }, At = (e) => e.left !== void 0 ? Se !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, C = a.useRef(null), m = a.useRef(void 0), x = a.useRef(void 0), D = a.useRef(void 0), K = a.useRef(void 0), L = a.useRef(void 0), te = a.useRef(void 0), F = a.useRef(null), z = a.useRef(null), Ht = a.useRef(null), V = a.useRef(null), T = a.useRef(null), he = a.useRef(null), M = a.useRef(null), ze = a.useRef(null), W = a.useRef(null), j = a.useRef(null), Re = a.useRef(!1), be = a.useRef(!1), ne = a.useRef(void 0), ve = a.useRef(void 0), Ce = a.useRef(!1), re = a.useRef(!0), Ie = a.useRef(0), Ee = a.useRef(void 0), we = a.useRef(void 0), ye = a.useRef([]), Oe = a.useRef([]), oe = a.useRef(0), _ = a.useRef(null), Gt = a.useRef(null), Lt = a.useRef(null), Se = Wt(M), k = t.isVirtualScroll, Ft = a.useMemo(() => a.Children.toArray(t.gridProps.children), [t.gridProps.children]), Ne = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, R = ce(t.gridProps.selectable), Be = Xt(t.gridProps.editable), zt = oe.current && N && oe.current <= N.medium && t.gridProps.adaptive;
739
744
  return a.useMemo(() => {
740
745
  O.onConstructor({
741
746
  navigatable: !!t.gridProps.navigatable,
@@ -751,42 +756,42 @@ const xn = (t, v, g, y) => {
751
756
  t.gridProps.total,
752
757
  t.gridProps.filter,
753
758
  t.gridProps.group,
754
- Oe,
759
+ Ne,
755
760
  t.gridProps.sort,
756
761
  t.gridProps.rowHeight
757
762
  ]), a.useEffect(() => (t.gridProps.clipboard && (te.current = new Jt(p), te.current.addEventListeners(S())), () => {
758
763
  te.current && te.current.removeEventListeners(S());
759
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, p, S]), a.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(un) && (Pe.current && (Pe.current.style.display = "block"), T.current && (T.current.style.display = "block")), Ae(), fe(), Be(), O.onComponentDidMount({
764
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard, p, S]), a.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(un) && (he.current && (he.current.style.display = "block"), T.current && (T.current.style.display = "block")), He(), me(), Ue(), O.onComponentDidMount({
760
765
  scope: M.current || void 0,
761
766
  contextStateRef: K,
762
767
  navigationStateRef: L
763
768
  }), () => {
764
- clearTimeout(Ie.current);
769
+ clearTimeout(Ee.current);
765
770
  }), []), a.useEffect(() => {
766
771
  var e;
767
- Ae(), fe(), Be(), k && (He(), wt(), (e = m.current) == null || e.update()), Dt(), O.onComponentDidUpdate({
772
+ He(), me(), Ue(), k && (Ge(), wt(), (e = m.current) == null || e.update()), Dt(), O.onComponentDidUpdate({
768
773
  scope: M.current || void 0,
769
774
  contextStateRef: K,
770
775
  navigationStateRef: L,
771
- focusFirst: Re.current,
776
+ focusFirst: be.current,
772
777
  newEditableRow: ne.current,
773
- singleEditRow: ve.current,
774
- lastActiveElement: be.current,
778
+ singleEditRow: Ce.current,
779
+ lastActiveElement: ve.current,
775
780
  navigatable: t.gridProps.navigatable
776
- }), Re.current = !1, ne.current = void 0;
781
+ }), be.current = !1, ne.current = void 0;
777
782
  }), a.useEffect(() => {
778
783
  if (ae) {
779
784
  const e = {
780
785
  rootMargin: "0px",
781
786
  threshold: 0.9
782
787
  };
783
- F.current = window.IntersectionObserver && new window.IntersectionObserver(Le, e) || null;
788
+ F.current = window.IntersectionObserver && new window.IntersectionObserver(Fe, e) || null;
784
789
  }
785
- }, [Le]), a.useEffect(() => {
790
+ }, [Fe]), a.useEffect(() => {
786
791
  var n;
787
792
  let e;
788
793
  return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
789
- Tt(), k && He();
794
+ Tt(), k && Ge();
790
795
  }), e.observe((n = S()) == null ? void 0 : n.body)), () => {
791
796
  e == null || e.disconnect();
792
797
  };
@@ -805,30 +810,30 @@ const xn = (t, v, g, y) => {
805
810
  if (!((r = m.current) != null && r.container) || t.gridProps.scrollable === "none")
806
811
  return;
807
812
  const { rowIndex: n } = e;
808
- Ee.current = n;
813
+ we.current = n;
809
814
  const o = ee();
810
815
  if (F.current && o) {
811
816
  F.current.disconnect();
812
- const i = o.querySelector(`[absolute-row-index="${Ee.current}"]`);
813
- i ? F.current.observe(i) : me(e);
817
+ const i = o.querySelector(`[absolute-row-index="${we.current}"]`);
818
+ i ? F.current.observe(i) : Pe(e);
814
819
  }
815
820
  },
816
821
  fitColumns: (e) => {
817
822
  x.current.dblClickHandler(null, e);
818
823
  },
819
- exportAsPdf: le
824
+ exportAsPdf: se
820
825
  })
821
826
  ), a.useImperativeHandle(t.gridRef, () => C.current), a.useMemo(() => {
822
827
  x.current = new ln(St);
823
828
  }, [t.gridProps.onColumnResize, t.columnsRef]), a.useMemo(() => {
824
- D.current = new sn(ge, It, Me);
829
+ D.current = new sn(fe, It, Ae);
825
830
  }, [
826
831
  t.gridProps.onColumnReorder,
827
832
  t.gridProps.onGroupChange,
828
833
  t.gridProps.group,
829
834
  t.columnsRef,
830
835
  t.gridProps.groupable
831
- ]), x.current.resizable = t.gridProps.resizable || !1, x.current.columns = t.columnsRef, x.current.columnsState = jt(t.columnsState), D.current.reorderable = t.gridProps.reorderable || !1, D.current.groupable = Oe, D.current.columns = t.columnsRef, D.current.dir = ye, Mt(), /* @__PURE__ */ a.createElement(
836
+ ]), x.current.resizable = t.gridProps.resizable || !1, x.current.columns = t.columnsRef, x.current.columnsState = jt(t.columnsState), D.current.reorderable = t.gridProps.reorderable || !1, D.current.groupable = Ne, D.current.columns = t.columnsRef, D.current.dir = Se, Mt(), /* @__PURE__ */ a.createElement(
832
837
  yn.Provider,
833
838
  {
834
839
  value: {
@@ -837,30 +842,30 @@ const xn = (t, v, g, y) => {
837
842
  activeDragRowDataItemRef: _,
838
843
  reorderRowDragTargetRef: Gt,
839
844
  reorderRowDropTargetRef: Lt,
840
- dir: ye,
845
+ dir: Se,
841
846
  getCellPositionStyle: At,
842
847
  dataItemKey: t.gridProps.dataItemKey,
843
848
  columnsState: t.columnsState,
844
849
  columnsRef: t.columnsRef,
845
- onColumnsStateChange: ue,
850
+ onColumnsStateChange: ge,
846
851
  groupable: t.gridProps.groupable,
847
852
  group: t.gridProps.group,
848
853
  defaultGroup: t.gridProps.defaultGroup,
849
- groupChange: se,
854
+ groupChange: ue,
850
855
  selectionRelease: dt,
851
856
  pagerPageChange: ht,
852
857
  onContextMenu: _e,
853
858
  rowClick: Ye,
854
859
  rowDblClick: Qe,
855
860
  cellClick: et,
856
- headerCellClick: De,
861
+ headerCellClick: Ke,
857
862
  itemChange: rt,
858
863
  onDialogEditCancel: pe,
859
864
  onDialogEditSubmit: Ze,
860
865
  sortable: t.gridProps.sortable,
861
866
  sort: t.gridProps.sort,
862
867
  defaultSort: t.gridProps.defaultSort,
863
- sortChange: Ke,
868
+ sortChange: Te,
864
869
  filterable: t.gridProps.filterable,
865
870
  filter: t.gridProps.filter,
866
871
  defaultFilter: t.gridProps.defaultFilter,
@@ -869,7 +874,7 @@ const xn = (t, v, g, y) => {
869
874
  applyHighlightDescriptor: bt,
870
875
  highlight: t.gridProps.highlight,
871
876
  searchChange: vt,
872
- exportAsPdf: le,
877
+ exportAsPdf: se,
873
878
  onHeaderSelectionChange: at,
874
879
  columnGroupChange: Et,
875
880
  onKeyDown: $e,
@@ -889,9 +894,9 @@ const xn = (t, v, g, y) => {
889
894
  tableBodyElementRef: z,
890
895
  headerElementRef: Ht,
891
896
  containerElementRef: V,
892
- headTableElementRef: Pe,
897
+ headTableElementRef: he,
893
898
  elementRef: M,
894
- virtualScrollHeightContainerRef: Fe,
899
+ virtualScrollHeightContainerRef: ze,
895
900
  footerRef: W,
896
901
  headerRef: j,
897
902
  vsRef: m