@progress/kendo-react-grid 15.1.0-develop.1 → 15.1.0-develop.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/GridClientWrapper.js +1 -1
  2. package/GridClientWrapper.mjs +411 -407
  3. package/GridComponent.js +1 -1
  4. package/GridComponent.mjs +305 -290
  5. package/VirtualScroll.d.ts +4 -0
  6. package/VirtualScroll.js +1 -1
  7. package/VirtualScroll.mjs +32 -27
  8. package/cells/groupcell/useGroupCellClientTdProps.js +1 -1
  9. package/cells/groupcell/useGroupCellClientTdProps.mjs +7 -7
  10. package/cells/hierarchycell/GridHierarchyCellToggle.js +1 -1
  11. package/cells/hierarchycell/GridHierarchyCellToggle.mjs +15 -15
  12. package/columnMenu/GridColumnMenuWrapper.js +1 -1
  13. package/columnMenu/GridColumnMenuWrapper.mjs +118 -82
  14. package/components/GridEditDialog.js +1 -1
  15. package/components/GridEditDialog.mjs +19 -19
  16. package/components/VirtualScrollOverlay.d.ts +12 -0
  17. package/components/VirtualScrollOverlay.js +16 -0
  18. package/components/VirtualScrollOverlay.mjs +65 -0
  19. package/components/noRecords/GridNoRecordsContainer.js +1 -1
  20. package/components/noRecords/GridNoRecordsContainer.mjs +10 -9
  21. package/dist/cdn/js/kendo-react-grid.js +1 -1
  22. package/drag/ColumnResize.js +1 -1
  23. package/drag/ColumnResize.mjs +84 -84
  24. package/getRowContents.js +1 -1
  25. package/getRowContents.mjs +12 -12
  26. package/index.d.mts +2 -1
  27. package/index.d.ts +2 -1
  28. package/interfaces/GridProps.d.ts +2 -1
  29. package/interfaces/GridScrollableSettings.d.ts +33 -0
  30. package/interfaces/VirtualScrollInterface.d.ts +2 -0
  31. package/package-metadata.js +1 -1
  32. package/package-metadata.mjs +2 -2
  33. package/package.json +17 -17
  34. package/toolbar-tools/GridToolbarColumnsChooser.js +1 -1
  35. package/toolbar-tools/GridToolbarColumnsChooser.mjs +33 -33
  36. package/toolbar-tools/GridToolbarFilter.js +1 -1
  37. package/toolbar-tools/GridToolbarFilter.mjs +207 -194
  38. package/toolbar-tools/GridToolbarSort.js +1 -1
  39. package/toolbar-tools/GridToolbarSort.mjs +84 -101
  40. package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.js +1 -1
  41. package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.mjs +50 -46
  42. package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.d.ts +0 -1
  43. package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.js +1 -1
  44. package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.mjs +10 -19
  45. package/utils/index.js +1 -1
  46. package/utils/index.mjs +161 -161
@@ -7,32 +7,32 @@
7
7
  */
8
8
  "use client";
9
9
  import * as c from "react";
10
- import { useAdaptiveModeContext as wn, canUseDOM as ae, getActiveElement as yn, useDir as En, setScrollbarWidth as at, cloneArray as xn, useWebMcpRegister as Sn, RowHeightService as kn, getter as te } from "@progress/kendo-react-common";
11
- import { filterBy as Dn } from "@progress/kendo-data-query";
12
- import { getSelectionOptions as we, populateClipboardData as Kn, ClipboardActionType as ze, getEditableOptions as Gn, tableKeyboardNavigation as ne, ClipboardService as Tn, TableKeyboardNavigationContext as Hn, updateLeft as Mn, updateRight as An, getGroupExpandableOptions as Fn, groupExpandReducer as Ln, getDetailExpandableOptions as Bn, detailExpandReducer as Wn, getSelectedState as ct, editReducer as zn, EDIT_ACTION as On, closestTagName as ye, getSelectedStateFromKeyDown as pn, getColumnIndex as Nn, getRowIndex as Un } from "@progress/kendo-react-data-tools";
13
- import { ColumnResize as Vn } from "./drag/ColumnResize.mjs";
14
- import { CommonDragLogic as jn } from "./drag/CommonDragLogic.mjs";
15
- import { useStickyGroups as qn } from "./hooks/useStickyGroups.mjs";
16
- import { getDefaultHeadContextMenuItems as $n, getDefaultBodyContextMenuItems as _n, isRowReorderEnabled as Zn, calcRowHeight as Jn, sanitizeColumns as Xn, getFlatColumnsState as Yn, getDataAsArray as Qn } from "./utils/index.mjs";
17
- import { VirtualScroll as er } from "./VirtualScroll.mjs";
18
- import { GridContextMenu as tr, contextMenuItemsMap as nr } from "./contextMenu/GridContextMenu.mjs";
19
- import { GridContextMenuAnchorPart as dt, GridContextMenuItemNames as Ee } from "./contextMenu/enums.mjs";
20
- import { normalizeSortable as rr, firstLevelSortSeqMap as or } from "./sortCommon.mjs";
21
- import { BasePDFExport as ir } from "./BasePDFExport.mjs";
22
- import { BaseCSVExport as ar } from "./BaseCSVExport.mjs";
23
- import { GridContext as cr } from "./utils/GridContext.mjs";
24
- import { operators as dr } from "./filterCommon.mjs";
25
- const sr = (t, S, b, z) => {
26
- const re = Object.keys(S.cells).map((k) => b.findIndex((O) => O.field === k)), Z = Object.keys(S.cells).length > 0 ? re : !0;
27
- return t.reduce((k, O) => (k[O[z != null ? z : "id"]] = Z, k), {});
28
- }, st = (t, S, b, z) => S.reduce((Z, k) => ({
10
+ import { useAdaptiveModeContext as kn, canUseDOM as ae, getActiveElement as Dn, useDir as Kn, setScrollbarWidth as ut, cloneArray as Tn, useWebMcpRegister as Mn, RowHeightService as Gn, getter as te } from "@progress/kendo-react-common";
11
+ import { filterBy as Hn } from "@progress/kendo-data-query";
12
+ import { getSelectionOptions as Se, populateClipboardData as An, ClipboardActionType as Ne, getEditableOptions as Fn, tableKeyboardNavigation as ne, ClipboardService as Ln, TableKeyboardNavigationContext as Bn, updateLeft as Wn, updateRight as zn, getGroupExpandableOptions as On, groupExpandReducer as pn, getDetailExpandableOptions as Nn, detailExpandReducer as jn, getSelectedState as gt, editReducer as Un, EDIT_ACTION as Vn, closestTagName as xe, getSelectedStateFromKeyDown as qn, getColumnIndex as $n, getRowIndex as _n } from "@progress/kendo-react-data-tools";
13
+ import { ColumnResize as Zn } from "./drag/ColumnResize.mjs";
14
+ import { CommonDragLogic as Jn } from "./drag/CommonDragLogic.mjs";
15
+ import { useStickyGroups as Xn } from "./hooks/useStickyGroups.mjs";
16
+ import { getDefaultHeadContextMenuItems as Yn, getDefaultBodyContextMenuItems as Qn, isRowReorderEnabled as er, calcRowHeight as tr, sanitizeColumns as nr, getFlatColumnsState as rr, getDataAsArray as or } from "./utils/index.mjs";
17
+ import { VirtualScroll as ir } from "./VirtualScroll.mjs";
18
+ import { GridContextMenu as ar, contextMenuItemsMap as cr } from "./contextMenu/GridContextMenu.mjs";
19
+ import { GridContextMenuAnchorPart as ft, GridContextMenuItemNames as ke } from "./contextMenu/enums.mjs";
20
+ import { normalizeSortable as dr, firstLevelSortSeqMap as sr } from "./sortCommon.mjs";
21
+ import { BasePDFExport as lr } from "./BasePDFExport.mjs";
22
+ import { BaseCSVExport as ur } from "./BaseCSVExport.mjs";
23
+ import { GridContext as gr } from "./utils/GridContext.mjs";
24
+ import { operators as fr } from "./filterCommon.mjs";
25
+ const mr = (t, x, z, h) => {
26
+ const re = Object.keys(x.cells).map((K) => z.findIndex((N) => N.field === K)), Z = Object.keys(x.cells).length > 0 ? re : !0;
27
+ return t.reduce((K, N) => (K[N[h != null ? h : "id"]] = Z, K), {});
28
+ }, mt = (t, x, z, h) => x.reduce((Z, K) => ({
29
29
  ...Z,
30
- ...sr(Dn(t, k), k, b, z)
31
- }), {}), xr = (t) => {
32
- var it;
33
- const S = t.gridProps.isClient, [b, z] = c.useState({}), re = wn(), Z = c.useRef(null), k = c.useRef(null), O = c.useRef({}), lt = (e) => {
34
- e.event.preventDefault(), z({
35
- ...b,
30
+ ...mr(Hn(t, K), K, z, h)
31
+ }), {}), Tr = (t) => {
32
+ var lt;
33
+ const x = t.gridProps.isClient, z = typeof t.gridProps.scrollable == "object" ? t.gridProps.scrollable.mode : t.gridProps.scrollable, [h, re] = c.useState({}), Z = kn(), K = c.useRef(null), N = c.useRef(null), ce = c.useRef({}), Pt = (e) => {
34
+ e.event.preventDefault(), re({
35
+ ...h,
36
36
  show: !0,
37
37
  offset: {
38
38
  left: e.event.pageX,
@@ -41,30 +41,30 @@ const sr = (t, S, b, z) => {
41
41
  dataItem: e.dataItem,
42
42
  field: e.field
43
43
  });
44
- }, Oe = () => {
45
- z({});
46
- }, ut = (e) => {
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((s) => s[n] === a), l = a !== void 0 && i.some((s) => s[n] === a);
44
+ }, je = () => {
45
+ re({});
46
+ }, ht = (e) => {
47
+ const n = t.gridProps.dataItemKey || "", o = h.dataItem, r = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = n ? o[n] : void 0, d = a !== void 0 && r.some((s) => s[n] === a), l = a !== void 0 && i.some((s) => s[n] === a);
48
48
  return e.map((s) => {
49
- const u = typeof s == "string" ? nr[s] : s;
50
- return (u == null ? void 0 : u.name) === Ee.pinRow && u.items ? {
49
+ const u = typeof s == "string" ? cr[s] : s;
50
+ return u && u.name === ke.pinRow && u.items ? {
51
51
  ...u,
52
- items: u.items.filter((m) => m.name === Ee.pinTop ? !d : m.name === Ee.pinBottom ? !l : m.name === Ee.unpin ? d || l : !0)
52
+ items: u.items.filter((m) => m.name === ke.pinTop ? !d : m.name === ke.pinBottom ? !l : m.name === ke.unpin ? d || l : !0)
53
53
  } : s;
54
54
  });
55
- }, y = c.useMemo(() => t.columnsRef.find((e) => e.field === b.field), [t.columnsRef, b]), pe = c.useMemo(() => {
55
+ }, y = c.useMemo(() => t.columnsRef.find((e) => e.field === h.field), [t.columnsRef, h]), Ue = c.useMemo(() => {
56
56
  const e = t.gridProps.sortable && (y == null ? void 0 : y.sortable);
57
- return $n({
57
+ return Yn({
58
58
  pdf: !!t.gridProps.pdf,
59
59
  sortable: !!e,
60
- selectable: we(t.gridProps.selectable).enabled,
60
+ selectable: Se(t.gridProps.selectable).enabled,
61
61
  clipboard: !!t.gridProps.clipboard
62
62
  });
63
- }, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ne = c.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), _n({
63
+ }, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ve = c.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), Qn({
64
64
  pdf: !!t.gridProps.pdf,
65
- selectable: we(t.gridProps.selectable).enabled,
65
+ selectable: Se(t.gridProps.selectable).enabled,
66
66
  clipboard: !!t.gridProps.clipboard,
67
- rowReorderable: Zn(t.gridProps.rowReorderable),
67
+ rowReorderable: er(t.gridProps.rowReorderable),
68
68
  pinnable: !!t.gridProps.pinnable
69
69
  })), [
70
70
  y,
@@ -74,22 +74,22 @@ const sr = (t, S, b, z) => {
74
74
  t.gridProps.pinnable,
75
75
  t.gridProps.rowReorderable,
76
76
  t.gridProps.pdf
77
- ]), ce = c.useMemo(() => {
78
- const e = (y == null ? void 0 : y.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(b) : e;
79
- if (n && b.offset) {
80
- const o = b.dataItem ? dt.body : dt.head, r = n[o], i = b.dataItem ? Ne : pe;
77
+ ]), de = c.useMemo(() => {
78
+ const e = (y == null ? void 0 : y.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(h) : e;
79
+ if (n && h.offset) {
80
+ const o = h.dataItem ? ft.body : ft.head, r = n[o], i = h.dataItem ? Ve : Ue;
81
81
  let a;
82
- return r === !0 || r === void 0 ? a = i : r !== !1 && (a = r), t.gridProps.pinnable && a && b.dataItem ? ut(a) : a;
82
+ return r === !0 || r === void 0 ? a = i : r !== !1 && (a = r), t.gridProps.pinnable && a && h.dataItem ? ht(a) : a;
83
83
  }
84
84
  }, [
85
85
  t.gridProps.contextMenu,
86
86
  t.gridProps.pinnable,
87
- b,
88
- Ne,
89
- pe,
87
+ h,
88
+ Ve,
89
+ Ue,
90
90
  y
91
- ]), gt = (e) => {
92
- var d, l, s, u, m, w, h, N, g;
91
+ ]), Rt = (e) => {
92
+ var d, l, s, u, m, w, R, p, g;
93
93
  const n = e.event.item, o = {
94
94
  target: E.current,
95
95
  syntheticEvent: e.event.syntheticEvent,
@@ -98,7 +98,7 @@ const sr = (t, S, b, z) => {
98
98
  ...e
99
99
  };
100
100
  t.gridProps.onContextMenuItemClick && f(t.gridProps.onContextMenuItemClick, o);
101
- const r = D(), i = {
101
+ const r = k(), i = {
102
102
  selectedField: "",
103
103
  componentId: t.id,
104
104
  dataItems: r,
@@ -112,45 +112,45 @@ const sr = (t, S, b, z) => {
112
112
  metaKey: !1,
113
113
  shiftKey: !1,
114
114
  isDrag: !1,
115
- ...we(t.gridProps.selectable),
115
+ ...Se(t.gridProps.selectable),
116
116
  ...o
117
- }, a = r.findIndex((x) => x === e.dataItem);
117
+ }, a = r.findIndex((S) => S === e.dataItem);
118
118
  switch ((d = n.data) == null ? void 0 : d.action) {
119
119
  case "SortCommand":
120
120
  if (y) {
121
- const x = (l = n.name) == null ? void 0 : l.toLowerCase().includes("asc"), _ = ((s = n.name) == null ? void 0 : s.toLowerCase().includes("desc")) ? "desc" : void 0, W = x ? "asc" : _, ee = n.name ? W : void 0;
122
- Ue(e.event.syntheticEvent, y, ee);
121
+ const S = (l = n.name) == null ? void 0 : l.toLowerCase().includes("asc"), _ = ((s = n.name) == null ? void 0 : s.toLowerCase().includes("desc")) ? "desc" : void 0, W = S ? "asc" : _, ee = n.name ? W : void 0;
122
+ qe(e.event.syntheticEvent, y, ee);
123
123
  }
124
124
  break;
125
125
  case "SelectRowCommand":
126
- At(i);
126
+ zt(i);
127
127
  break;
128
128
  case "SelectAllRowsCommand":
129
- Mt(i);
129
+ Wt(i);
130
130
  break;
131
131
  case "ExportPDFCommand":
132
- Se();
132
+ Ke();
133
133
  break;
134
134
  case "ClearSelectionCommand":
135
- Lt(i);
135
+ pt(i);
136
136
  break;
137
137
  case "ReorderRowCommand":
138
- ie.current = e.dataItem, (u = n.name) != null && u.toLowerCase().includes("rowup") && a > 0 && oe(e.event.syntheticEvent, a - 1, "before"), (m = n.name) != null && m.toLowerCase().includes("rowdown") && a < r.length - 1 && oe(e.event.syntheticEvent, a + 1, "after"), (w = n.name) != null && w.toLowerCase().includes("rowtop") && oe(e.event.syntheticEvent, 0, "before"), (h = n.name) != null && h.toLowerCase().includes("rowbottom") && oe(e.event.syntheticEvent, r.length - 1, "after");
138
+ ie.current = e.dataItem, (u = n.name) != null && u.toLowerCase().includes("rowup") && a > 0 && oe(e.event.syntheticEvent, a - 1, "before"), (m = n.name) != null && m.toLowerCase().includes("rowdown") && a < r.length - 1 && oe(e.event.syntheticEvent, a + 1, "after"), (w = n.name) != null && w.toLowerCase().includes("rowtop") && oe(e.event.syntheticEvent, 0, "before"), (R = n.name) != null && R.toLowerCase().includes("rowbottom") && oe(e.event.syntheticEvent, r.length - 1, "after");
139
139
  break;
140
140
  case "CopySelectionCommand":
141
- fe(
142
- ze.copy,
141
+ me(
142
+ Ne.copy,
143
143
  e.event.nativeEvent,
144
144
  {
145
- copyHeaders: !((N = n.name) != null && N.toLowerCase().includes("noheaders"))
145
+ copyHeaders: !((p = n.name) != null && p.toLowerCase().includes("noheaders"))
146
146
  },
147
147
  e.dataItem,
148
148
  e.field
149
149
  );
150
150
  break;
151
151
  case "PasteCommand":
152
- fe(
153
- ze.paste,
152
+ me(
153
+ Ne.paste,
154
154
  e.event.nativeEvent,
155
155
  {
156
156
  copyHeaders: !((g = n.name) != null && g.toLowerCase().includes("noheaders"))
@@ -160,21 +160,21 @@ const sr = (t, S, b, z) => {
160
160
  );
161
161
  break;
162
162
  case "PinTopCommand":
163
- se("pinTop", e.dataItem);
163
+ le("pinTop", e.dataItem);
164
164
  break;
165
165
  case "PinBottomCommand":
166
- se("pinBottom", e.dataItem);
166
+ le("pinBottom", e.dataItem);
167
167
  break;
168
168
  case "UnpinCommand":
169
- se("unpin", e.dataItem);
169
+ le("unpin", e.dataItem);
170
170
  break;
171
171
  }
172
- Oe();
173
- }, de = () => {
172
+ je();
173
+ }, se = () => {
174
174
  const e = t.columnsRef.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
175
- return Xn(e);
176
- }, ft = (e, n, o) => {
177
- if (t.gridProps.onContextMenu && S) {
175
+ return nr(e);
176
+ }, bt = (e, n, o) => {
177
+ if (t.gridProps.onContextMenu && x) {
178
178
  const r = {
179
179
  target: E.current,
180
180
  syntheticEvent: e,
@@ -184,45 +184,45 @@ const sr = (t, S, b, z) => {
184
184
  };
185
185
  f(t.gridProps.onContextMenu, r);
186
186
  }
187
- t.gridProps.contextMenu && lt({
187
+ t.gridProps.contextMenu && Pt({
188
188
  event: e,
189
189
  dataItem: n,
190
190
  field: o
191
191
  });
192
- }, mt = (e) => {
193
- var a, d;
192
+ }, vt = (e) => {
193
+ var a, d, l;
194
194
  if (e.target !== e.currentTarget)
195
195
  return;
196
- clearTimeout(Fe.current), C.current && (C.current.table = j.current);
196
+ clearTimeout(We.current), C.current && (C.current.table = V.current);
197
197
  const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
198
- t.gridProps.columnVirtualization && (!K || o === Ae.current) && (Fe.current = window.setTimeout(() => {
198
+ t.gridProps.columnVirtualization && (!D || o === Be.current) && (We.current = window.setTimeout(() => {
199
199
  Y();
200
200
  }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), $.current && $.current.setScrollLeft(n), q.current && q.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
- C.current && o !== Ae.current && C.current.scrollHandler(e);
203
- const i = K && ((d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current) !== r;
204
- t.gridProps.onScroll && S && f(t.gridProps.onScroll, {
202
+ C.current && o !== Be.current && C.current.scrollHandler(e);
203
+ const i = D && ((d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current) !== r;
204
+ t.gridProps.onScroll && x && f(t.gridProps.onScroll, {
205
205
  ...I(e)
206
- }), Ae.current = o, i || nt();
207
- }, Pt = (e) => {
206
+ }), Be.current = o, !it.current && be.current && Math.abs(be.current.scrollTop - o) > 1 && (be.current.scrollTop = o), (l = ve.current) == null || l.call(ve), i || ct();
207
+ }, Ct = (e) => {
208
208
  var o, r;
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 = T.current) == null ? void 0 : r.querySelector(`tr[absolute-row-index="${i}"]`)))
213
- return Ce.current = {
212
+ if (!isNaN(i) && a && !((r = M.current) == null ? void 0 : r.querySelector(`tr[absolute-row-index="${i}"]`)))
213
+ return ye.current = {
214
214
  navId: a,
215
215
  key: e.key,
216
216
  code: e.code,
217
217
  keyCode: e.keyCode
218
- }, e.preventDefault(), e.stopPropagation(), Pe({ rowIndex: i }), !0;
218
+ }, e.preventDefault(), e.stopPropagation(), he({ rowIndex: i }), !0;
219
219
  }
220
220
  return !1;
221
- }, ht = () => {
221
+ }, It = () => {
222
222
  var a;
223
- if (!Ce.current || !M.current)
223
+ if (!ye.current || !H.current)
224
224
  return;
225
- const { navId: e, key: n, code: o, keyCode: r } = Ce.current, i = (a = T.current) == null ? void 0 : a.querySelector(
225
+ const { navId: e, key: n, code: o, keyCode: r } = ye.current, i = (a = M.current) == null ? void 0 : a.querySelector(
226
226
  `[data-keyboardnavid="${e}"]`
227
227
  );
228
228
  i && i.dispatchEvent(
@@ -234,89 +234,89 @@ const sr = (t, S, b, z) => {
234
234
  cancelable: !0
235
235
  })
236
236
  );
237
- }, Rt = (e) => {
238
- if (Pt(e))
237
+ }, wt = (e) => {
238
+ if (Ct(e))
239
239
  return;
240
240
  ne.onKeyDown(e, {
241
241
  navigatable: t.gridProps.navigatable || !1,
242
- contextStateRef: V,
242
+ contextStateRef: U,
243
243
  navigationStateRef: Q,
244
- onNavigationAction: vt,
245
- columns: de()
244
+ onNavigationAction: Et,
245
+ columns: se()
246
246
  }), ne.onGetSnapshotBeforeUpdate({
247
- document: p(),
248
- contextStateRef: V,
247
+ document: O(),
248
+ contextStateRef: U,
249
249
  navigationStateRef: Q
250
250
  });
251
251
  const n = {
252
- dataItems: D(),
252
+ dataItems: k(),
253
253
  mode: v.mode,
254
254
  cell: v.cell,
255
255
  componentId: t.id,
256
256
  selectedField: "",
257
257
  ...I(e)
258
258
  };
259
- t.gridProps.onKeyDown && S && f(t.gridProps.onKeyDown, n);
260
- }, bt = (e) => {
259
+ t.gridProps.onKeyDown && x && f(t.gridProps.onKeyDown, n);
260
+ }, yt = (e) => {
261
261
  ne.onFocus(e, {
262
262
  navigatable: !!t.gridProps.navigatable,
263
- contextStateRef: V
263
+ contextStateRef: U
264
264
  });
265
- }, vt = (e) => {
265
+ }, Et = (e) => {
266
266
  const { columnsRef: n } = t;
267
- if (e.action === "moveToNextPage" && zt(e.event), e.action === "moveToPrevPage" && Ot(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
267
+ if (e.action === "moveToNextPage" && Ut(e.event), e.action === "moveToPrevPage" && Vt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
268
268
  const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
269
269
  if (!n[o].reorderable)
270
270
  return;
271
271
  if (e.action === "reorderToRight" && o < t.columnsRef.length - 1) {
272
272
  if (n[o + 1].disableReorder)
273
273
  return;
274
- ue(o, o + 1, e.event);
274
+ ge(o, o + 1, e.event);
275
275
  }
276
276
  if (e.action === "reorderToLeft" && o > 0) {
277
277
  if (n[o - 1].disableReorder)
278
278
  return;
279
- ue(o, o - 1, e.event);
279
+ ge(o, o - 1, e.event);
280
280
  }
281
281
  }
282
- if (e.action === "select" && Gt(e.event), t.gridProps.onNavigationAction && S) {
282
+ if (e.action === "select" && Ft(e.event), t.gridProps.onNavigationAction && x) {
283
283
  const o = {
284
284
  focusElement: e.focusElement,
285
285
  ...I(e.event)
286
286
  };
287
287
  f(t.gridProps.onNavigationAction, o);
288
288
  }
289
- }, Ct = (e, n) => {
290
- t.gridProps.onRowClick && ye(e.target, "TD") && f(t.gridProps.onRowClick, {
289
+ }, St = (e, n) => {
290
+ t.gridProps.onRowClick && xe(e.target, "TD") && f(t.gridProps.onRowClick, {
291
291
  dataItem: n,
292
292
  ...I(e)
293
293
  });
294
- }, It = (e, n) => {
295
- t.gridProps.onRowDoubleClick && ye(e.target, "TD") && f(t.gridProps.onRowDoubleClick, {
294
+ }, xt = (e, n) => {
295
+ t.gridProps.onRowDoubleClick && xe(e.target, "TD") && f(t.gridProps.onRowDoubleClick, {
296
296
  dataItem: n,
297
297
  ...I(e)
298
298
  });
299
- }, wt = (e) => {
299
+ }, kt = (e) => {
300
300
  t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
301
301
  ...I(e.syntheticEvent),
302
302
  dataItem: e.dataItem,
303
303
  field: void 0,
304
304
  value: void 0
305
305
  });
306
- }, yt = (e) => {
306
+ }, Dt = (e) => {
307
307
  t.gridProps.onItemChange && t.gridProps.onEditChange && f(t.gridProps.onEditChange, {
308
308
  edit: {},
309
309
  ...I(e.syntheticEvent)
310
310
  });
311
- }, Et = (e, n, o) => {
311
+ }, Kt = (e, n, o) => {
312
312
  var r, i;
313
- if (ot.enabled && ot.mode === "incell" && t.gridProps.dataItemKey) {
313
+ if (st.enabled && st.mode === "incell" && t.gridProps.dataItemKey) {
314
314
  if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
315
315
  const d = !!((i = (r = e.target).closest) != null && i.call(r, ".k-grid-pinned-container"));
316
316
  t.gridProps.editZoneRef.current = d ? "pinned" : "body";
317
317
  }
318
- const a = zn(t.gridProps.edit, {
319
- type: On.ENTER_FIELD_EDIT,
318
+ const a = Un(t.gridProps.edit, {
319
+ type: Vn.ENTER_FIELD_EDIT,
320
320
  payload: { id: n[t.gridProps.dataItemKey], field: o }
321
321
  });
322
322
  t.gridProps.onEditChange && f(t.gridProps.onEditChange, {
@@ -324,29 +324,29 @@ const sr = (t, S, b, z) => {
324
324
  ...I(e)
325
325
  });
326
326
  }
327
- }, xt = (e, n) => {
327
+ }, Tt = (e, n) => {
328
328
  var r;
329
- if (Bn(t.detailExpandable).enabled) {
330
- const i = Wn((r = t.gridProps.detailExpand) != null ? r : {}, e);
329
+ if (Nn(t.detailExpandable).enabled) {
330
+ const i = jn((r = t.gridProps.detailExpand) != null ? r : {}, e);
331
331
  t.gridProps.onDetailExpandChange && f(t.gridProps.onDetailExpandChange, {
332
332
  ...I(n),
333
333
  detailExpand: i
334
334
  });
335
335
  }
336
- }, St = (e, n) => {
336
+ }, Mt = (e, n) => {
337
337
  var r;
338
- const o = Fn(
338
+ const o = On(
339
339
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
340
340
  );
341
341
  if (o.enabled) {
342
- const i = Ln((r = t.gridProps.groupExpand) != null ? r : [], e, o);
342
+ const i = pn((r = t.gridProps.groupExpand) != null ? r : [], e, o);
343
343
  t.gridProps.onGroupExpandChange && f(t.gridProps.onGroupExpandChange, {
344
344
  ...I(n),
345
345
  groupExpand: i
346
346
  });
347
347
  }
348
- hn(e.group);
349
- }, kt = c.useCallback(
348
+ In(e.group);
349
+ }, Gt = c.useCallback(
350
350
  (e) => {
351
351
  const { dataItemKey: n = "", pinnedTopRows: o = [], pinnedBottomRows: r = [] } = t.gridProps;
352
352
  if (!n || !e)
@@ -355,7 +355,7 @@ const sr = (t, S, b, z) => {
355
355
  return o != null && o.some((a) => a[n] === i) ? "top" : r != null && r.some((a) => a[n] === i) ? "bottom" : "none";
356
356
  },
357
357
  [t.gridProps.pinnedTopRows, t.gridProps.pinnedBottomRows, t.gridProps.dataItemKey]
358
- ), se = (e, n) => {
358
+ ), le = (e, n) => {
359
359
  if (!t.gridProps.pinnable)
360
360
  return;
361
361
  const { dataItemKey: o = "", pinnedTopRows: r = [], pinnedBottomRows: i = [] } = t.gridProps, a = n[o], d = r.filter((u) => u[o] !== a), l = i.filter((u) => u[o] !== a);
@@ -374,13 +374,13 @@ const sr = (t, S, b, z) => {
374
374
  return;
375
375
  }
376
376
  t.gridProps.onRowPinChange && f(t.gridProps.onRowPinChange, s);
377
- }, Ue = (e, n, o) => {
378
- const { allowUnsort: r, mode: i } = rr(
377
+ }, qe = (e, n, o) => {
378
+ const { allowUnsort: r, mode: i } = dr(
379
379
  t.gridProps.sortable || !1,
380
380
  n.sortable || !1
381
- ), a = (t.gridProps.sort || []).filter((s) => s.field === n.field)[0], d = o || or[r][a && a.dir || ""], l = i === "single" ? [] : (t.gridProps.sort || []).filter((s) => s.field !== n.field);
382
- d !== "" && n.field && l.push({ field: n.field, dir: d }), je(l, e);
383
- }, Dt = (e) => {
381
+ ), a = (t.gridProps.sort || []).filter((s) => s.field === n.field)[0], d = o || sr[r][a && a.dir || ""], l = i === "single" ? [] : (t.gridProps.sort || []).filter((s) => s.field !== n.field);
382
+ d !== "" && n.field && l.push({ field: n.field, dir: d }), _e(l, e);
383
+ }, Ht = (e) => {
384
384
  t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
385
385
  ...I(e.syntheticEvent),
386
386
  dataItem: e.dataItem,
@@ -388,7 +388,7 @@ const sr = (t, S, b, z) => {
388
388
  field: e.field,
389
389
  value: e.value
390
390
  });
391
- }, Kt = (e) => {
391
+ }, At = (e) => {
392
392
  var n;
393
393
  if (t.gridProps.onSelectionChange && v.enabled) {
394
394
  const { event: o, dataItem: r, dataIndex: i, columnIndex: a } = e, d = {
@@ -398,7 +398,7 @@ const sr = (t, S, b, z) => {
398
398
  endColIndex: a,
399
399
  startRowIndex: i,
400
400
  endRowIndex: i,
401
- dataItems: D(),
401
+ dataItems: k(),
402
402
  altKey: !1,
403
403
  ctrlKey: !1,
404
404
  shiftKey: !1,
@@ -411,34 +411,34 @@ const sr = (t, S, b, z) => {
411
411
  };
412
412
  f(t.gridProps.onSelectionChange, {
413
413
  ...d,
414
- select: t.gridProps.dataItemKey ? ct({
414
+ select: t.gridProps.dataItemKey ? gt({
415
415
  event: d,
416
416
  selectedState: (n = t.gridProps.select) != null ? n : {},
417
417
  dataItemKey: t.gridProps.dataItemKey
418
418
  }) : {}
419
419
  });
420
420
  }
421
- }, Gt = (e) => {
421
+ }, Ft = (e) => {
422
422
  var s, u;
423
423
  if (!v.enabled || !t.gridProps.dataItemKey)
424
424
  return;
425
425
  const n = {
426
- dataItems: D(),
426
+ dataItems: k(),
427
427
  mode: v.mode,
428
428
  cell: v.cell,
429
429
  componentId: t.id,
430
430
  selectedField: "",
431
431
  ...I(e)
432
- }, o = pn({
432
+ }, o = qn({
433
433
  event: n,
434
434
  selectedState: (s = t.gridProps.select) != null ? s : {},
435
435
  dataItemKey: t.gridProps.dataItemKey
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"), d = Nn(i), l = Un(a);
439
+ const r = e.target, i = xe(r, "TD"), a = xe(r, "TR"), d = $n(i), l = _n(a);
440
440
  if (d !== void 0 && l !== void 0) {
441
- const m = (u = Qn(t.gridProps.data)) == null ? void 0 : u[l];
441
+ const m = (u = or(t.gridProps.data)) == null ? void 0 : u[l];
442
442
  t.gridProps.onSelectionChange && f(t.gridProps.onSelectionChange, {
443
443
  ...n,
444
444
  select: o,
@@ -456,9 +456,9 @@ const sr = (t, S, b, z) => {
456
456
  isDrag: !1
457
457
  });
458
458
  }
459
- }, Tt = (e) => {
459
+ }, Lt = (e) => {
460
460
  if (t.gridProps.onHeaderSelectionChange && v.enabled) {
461
- const n = D();
461
+ const n = k();
462
462
  f(t.gridProps.onHeaderSelectionChange, {
463
463
  select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey && te(t.gridProps.dataItemKey)(r) !== void 0 && (o[te(t.gridProps.dataItemKey)(r)] = !0), o), {}) : {},
464
464
  field: e.field,
@@ -473,20 +473,20 @@ const sr = (t, S, b, z) => {
473
473
  ...e,
474
474
  select: n
475
475
  });
476
- }, Ht = (e, n) => {
476
+ }, Bt = (e, n) => {
477
477
  const o = t.gridProps.dataItemKey;
478
478
  if (!o || !n)
479
479
  return;
480
- const r = te(o), i = D().findIndex((a) => r(a) === r(n));
481
- i !== -1 && Ve({
480
+ const r = te(o), i = k().findIndex((a) => r(a) === r(n));
481
+ i !== -1 && $e({
482
482
  ...e,
483
483
  startRowIndex: i,
484
484
  endRowIndex: i
485
485
  });
486
- }, Ve = (e) => {
486
+ }, $e = (e) => {
487
487
  var n;
488
488
  if (t.gridProps.onSelectionChange && v.enabled) {
489
- const o = D(), r = o[e.startRowIndex], i = o[e.endRowIndex], a = {
489
+ const o = k(), r = o[e.startRowIndex], i = o[e.endRowIndex], a = {
490
490
  syntheticEvent: void 0,
491
491
  target: E.current,
492
492
  selectedField: "",
@@ -496,14 +496,14 @@ const sr = (t, S, b, z) => {
496
496
  startDataItem: r,
497
497
  endDataItem: i,
498
498
  ...e
499
- }, d = ct({
499
+ }, d = gt({
500
500
  event: a,
501
501
  selectedState: (n = t.gridProps.select) != null ? n : {},
502
502
  dataItemKey: t.gridProps.dataItemKey
503
503
  });
504
504
  J(a, d);
505
505
  }
506
- }, Mt = (e) => {
506
+ }, Wt = (e) => {
507
507
  if (t.gridProps.onSelectionChange && v.enabled) {
508
508
  const n = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], r = {}, i = {
509
509
  ...e,
@@ -519,7 +519,7 @@ const sr = (t, S, b, z) => {
519
519
  r[l] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
520
520
  }), J(i, r);
521
521
  }
522
- }, At = (e) => {
522
+ }, zt = (e) => {
523
523
  if (t.gridProps.onSelectionChange && v.enabled) {
524
524
  const o = te(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
525
525
  (m) => m[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
@@ -534,10 +534,10 @@ const sr = (t, S, b, z) => {
534
534
  }, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
535
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, J(s, u);
536
536
  }
537
- }, Ft = (e) => {
537
+ }, Ot = (e) => {
538
538
  if (!v.enabled)
539
539
  return;
540
- const n = D(), o = {
540
+ const n = k(), o = {
541
541
  syntheticEvent: void 0,
542
542
  nativeEvent: void 0,
543
543
  target: E.current,
@@ -566,7 +566,7 @@ const sr = (t, S, b, z) => {
566
566
  J(m, {});
567
567
  return;
568
568
  }
569
- const r = st(
569
+ const r = mt(
570
570
  t.gridProps.data,
571
571
  e,
572
572
  t.columnsRef,
@@ -579,8 +579,8 @@ const sr = (t, S, b, z) => {
579
579
  if (t.gridProps.dataItemKey) {
580
580
  const m = te(t.gridProps.dataItemKey);
581
581
  for (let w = 0; w < n.length; w++) {
582
- const h = m(n[w]);
583
- h !== void 0 && r[h] && (a === -1 && (a = w, l = n[w]), d = w, s = n[w]);
582
+ const R = m(n[w]);
583
+ R !== void 0 && r[R] && (a === -1 && (a = w, l = n[w]), d = w, s = n[w]);
584
584
  }
585
585
  }
586
586
  const u = {
@@ -593,86 +593,86 @@ const sr = (t, S, b, z) => {
593
593
  endDataItem: s
594
594
  };
595
595
  J(u, i);
596
- }, Lt = (e) => {
596
+ }, pt = (e) => {
597
597
  t.gridProps.onSelectionChange && v.enabled && J(e, {});
598
598
  }, X = (e, n, o, r, i) => {
599
- Wt();
599
+ jt();
600
600
  const a = t.gridProps.onDataStateChange;
601
601
  if (e) {
602
602
  const d = { ...I(r), ...n, targetEvent: i };
603
603
  f(e, d);
604
- } else a && (O.current = {
605
- ...O.current,
604
+ } else a && (ce.current = {
605
+ ...ce.current,
606
606
  ...o
607
607
  }, f(a, {
608
608
  ...I(r),
609
609
  targetEvent: i || {},
610
610
  dataState: {
611
- ...Yt(),
612
- ...O.current
611
+ ...rn(),
612
+ ...ce.current
613
613
  }
614
614
  }));
615
- }, le = (e, n, o) => {
615
+ }, ue = (e, n, o) => {
616
616
  var r;
617
- K && t.gridProps.pageable && ((r = C.current) == null || r.reset()), X(
617
+ D && t.gridProps.pageable && ((r = C.current) == null || r.reset()), X(
618
618
  t.gridProps.onPageChange,
619
619
  { page: e },
620
620
  { skip: e.skip, take: e.take },
621
621
  n,
622
622
  o
623
623
  );
624
- }, Bt = (e, n, o) => {
624
+ }, Nt = (e, n, o) => {
625
625
  var r;
626
- t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, Y()) : le(e, n, o);
627
- }, xe = () => {
626
+ t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, Y()) : ue(e, n, o);
627
+ }, De = () => {
628
628
  let e = t.gridProps.total || 0;
629
629
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
630
- }, Wt = () => {
631
- K && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
632
- }, zt = (e) => {
630
+ }, jt = () => {
631
+ D && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
632
+ }, Ut = (e) => {
633
633
  var i, a;
634
- const n = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + n, r = xe();
635
- o < r && le({ skip: o, take: n }, e);
636
- }, Ot = (e) => {
634
+ const n = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + n, r = De();
635
+ o < r && ue({ skip: o, take: n }, e);
636
+ }, Vt = (e) => {
637
637
  var r, i;
638
638
  const n = (i = (r = t.gridProps.take) != null ? r : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - n;
639
- o >= 0 && le({ skip: o, take: n }, e);
640
- }, pt = (e) => {
641
- le({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
642
- }, je = (e, n) => {
639
+ o >= 0 && ue({ skip: o, take: n }, e);
640
+ }, qt = (e) => {
641
+ ue({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
642
+ }, _e = (e, n) => {
643
643
  X(
644
644
  t.gridProps.onSortChange,
645
645
  { sort: e },
646
- { sort: e, ...K && !t.gridProps.pageable ? { skip: 0 } : {} },
646
+ { sort: e, ...D && !t.gridProps.pageable ? { skip: 0 } : {} },
647
647
  n
648
648
  );
649
- }, Nt = (e, n) => {
649
+ }, $t = (e, n) => {
650
650
  X(
651
651
  t.gridProps.onFilterChange,
652
652
  { filter: e },
653
653
  { filter: e, skip: 0 },
654
654
  n
655
655
  );
656
- }, Ut = (e) => {
656
+ }, _t = (e) => {
657
657
  if (!e || e.length === 0) {
658
- qe({});
658
+ Ze({});
659
659
  return;
660
660
  }
661
- const n = st(
661
+ const n = mt(
662
662
  t.gridProps.data,
663
663
  e,
664
664
  t.columnsRef,
665
665
  t.gridProps.dataItemKey
666
666
  );
667
- qe({ ...n });
668
- }, qe = (e) => {
667
+ Ze({ ...n });
668
+ }, Ze = (e) => {
669
669
  X(
670
670
  t.gridProps.onHighlightChange,
671
671
  { highlight: e },
672
672
  {},
673
673
  {}
674
674
  );
675
- }, Vt = (e) => {
675
+ }, Zt = (e) => {
676
676
  const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
677
677
  logic: "or",
678
678
  filters: n.filter((i) => i !== void 0).map((i) => {
@@ -693,31 +693,31 @@ const sr = (t, S, b, z) => {
693
693
  { skip: 0 },
694
694
  e.syntheticEvent
695
695
  );
696
- }, Se = () => {
696
+ }, Ke = () => {
697
697
  var e;
698
- (e = Z.current) == null || e.save();
699
- }, $e = async () => {
698
+ (e = K.current) == null || e.save();
699
+ }, Je = async () => {
700
700
  var e;
701
- await ((e = k.current) == null ? void 0 : e.save());
702
- }, _e = () => {
701
+ await ((e = N.current) == null ? void 0 : e.save());
702
+ }, Xe = () => {
703
703
  var e;
704
- return ((e = k.current) == null ? void 0 : e.getBlob()) || null;
705
- }, jt = async (e) => {
704
+ return ((e = N.current) == null ? void 0 : e.getBlob()) || null;
705
+ }, Jt = async (e) => {
706
706
  var n, o;
707
707
  (n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
708
- }, qt = (e) => {
708
+ }, Xt = (e) => {
709
709
  var n, o;
710
710
  return (n = t.gridProps) != null && n.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
711
- }, ke = (e, n) => {
711
+ }, Te = (e, n) => {
712
712
  const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
713
713
  let r = {};
714
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Te.current = !0), X(
714
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Ae.current = !0), X(
715
715
  t.gridProps.onGroupChange,
716
716
  { group: e },
717
717
  { group: e, skip: 0, ...r },
718
718
  o
719
719
  );
720
- }, De = (e) => {
720
+ }, Me = (e) => {
721
721
  if (t.gridProps.onColumnsStateChange) {
722
722
  const n = {
723
723
  target: E.current,
@@ -725,31 +725,31 @@ const sr = (t, S, b, z) => {
725
725
  };
726
726
  f(t.gridProps.onColumnsStateChange, n);
727
727
  }
728
- }, ue = (e, n, o) => {
729
- const { columnsRef: r, columnsState: i } = t, a = r[e], d = Yn(i), l = a.depth, s = (h) => {
728
+ }, ge = (e, n, o) => {
729
+ const { columnsRef: r, columnsState: i } = t, a = r[e], d = rr(i), l = a.depth, s = (R) => {
730
730
  do
731
- h++;
732
- while (h < r.length && r[h].depth > l);
733
- return h;
731
+ R++;
732
+ while (R < r.length && r[R].depth > l);
733
+ return R;
734
734
  }, u = r.splice(e, s(e) - e);
735
- r.splice(e < n ? s(n - u.length) : n, 0, ...u), r.filter((h) => h.declarationIndex >= 0).forEach((h, N) => {
736
- h.orderIndex = N;
737
- const g = d.find((x) => x.id === h.id);
738
- g && (g.orderIndex = N);
735
+ r.splice(e < n ? s(n - u.length) : n, 0, ...u), r.filter((R) => R.declarationIndex >= 0).forEach((R, p) => {
736
+ R.orderIndex = p;
737
+ const g = d.find((S) => S.id === R.id);
738
+ g && (g.orderIndex = p);
739
739
  });
740
740
  const m = r[e].locked && r[n].locked;
741
- Mn(t.columnsMapRef, r, m || be.current), An(t.columnsMapRef, r, m || be.current), Ge.current && (be.current = !1, Ge.current = !1);
742
- const w = de();
741
+ Wn(t.columnsMapRef, r, m || Ie.current), zn(t.columnsMapRef, r, m || Ie.current), He.current && (Ie.current = !1, He.current = !1);
742
+ const w = se();
743
743
  if (Y(), t.gridProps.onColumnReorder) {
744
- const h = {
744
+ const R = {
745
745
  target: E.current,
746
746
  columns: w,
747
747
  columnId: a.id,
748
748
  nativeEvent: o
749
749
  };
750
- f(t.gridProps.onColumnReorder, h);
750
+ f(t.gridProps.onColumnReorder, R);
751
751
  }
752
- De(i);
752
+ Me(i);
753
753
  }, oe = (e, n, o) => {
754
754
  const r = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
755
755
  if (o === "forbidden" || !r || !ie.current)
@@ -763,72 +763,72 @@ const sr = (t, S, b, z) => {
763
763
  dragEvent: e,
764
764
  target: E.current
765
765
  }), ie.current = null;
766
- }, $t = (e, n, o) => {
766
+ }, Yt = (e, n, o) => {
767
767
  if (t.gridProps.group === void 0)
768
768
  return;
769
769
  const r = t.gridProps.group.slice();
770
- r.splice(n, 0, ...r.splice(e, 1)), ke(r, o);
771
- }, Ze = (e, n, o) => {
770
+ r.splice(n, 0, ...r.splice(e, 1)), Te(r, o);
771
+ }, Ye = (e, n, o) => {
772
772
  const r = t.columnsRef[e].field;
773
773
  if (!r)
774
774
  return;
775
775
  const i = (t.gridProps.group || []).slice();
776
- i.splice(n, 0, { field: r }), ke(i, o);
777
- }, _t = (e, n) => {
778
- const o = U.current.getCurrentGroupsLength;
779
- Ze(e, o, n);
780
- }, Ke = () => {
781
- var e, n, o, r, i, a, d, l, s, u, m, w, h, N;
776
+ i.splice(n, 0, { field: r }), Te(i, o);
777
+ }, Qt = (e, n) => {
778
+ const o = j.current.getCurrentGroupsLength;
779
+ Ye(e, o, n);
780
+ }, Ge = () => {
781
+ var e, n, o, r, i, a, d, l, s, u, m, w, R, p;
782
782
  if (t.gridProps.dataLayoutMode === "stacked") {
783
- const g = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0;
783
+ const g = ((e = H.current) == null ? void 0 : e.offsetWidth) || 0;
784
784
  if ((n = P.current) != null && n.colGroupMain && g) {
785
- const x = P.current.colGroupMain.children, R = x.length - 1;
786
- if (R >= 0) {
785
+ const S = P.current.colGroupMain.children, b = S.length - 1;
786
+ if (b >= 0) {
787
787
  let _ = 0;
788
- for (let ee = 0; ee < R; ee++) {
789
- const In = parseFloat((x[ee].width || 0).toString()) || x[ee].clientWidth;
790
- _ += In;
788
+ for (let ee = 0; ee < b; ee++) {
789
+ const xn = parseFloat((S[ee].width || 0).toString()) || S[ee].clientWidth;
790
+ _ += xn;
791
791
  }
792
792
  const W = Math.max(0, g - _);
793
- x[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"), (l = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && l[R] && (P.current.colGroupStickyHeader.children[R].width = W + "px"), (u = (s = P.current.colGroupStickyFooter) == null ? void 0 : s.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"), (N = (h = P.current.colGroupPinnedBottom) == null ? void 0 : h.children) != null && N[R] && (P.current.colGroupPinnedBottom.children[R].width = W + "px");
793
+ S[b].width = W + "px", (r = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && r[b] && (P.current.colGroupHeader.children[b].width = W + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[b] && (P.current.colGroupFooter.children[b].width = W + "px"), (l = (d = P.current.colGroupStickyHeader) == null ? void 0 : d.children) != null && l[b] && (P.current.colGroupStickyHeader.children[b].width = W + "px"), (u = (s = P.current.colGroupStickyFooter) == null ? void 0 : s.children) != null && u[b] && (P.current.colGroupStickyFooter.children[b].width = W + "px"), (w = (m = P.current.colGroupPinnedTop) == null ? void 0 : m.children) != null && w[b] && (P.current.colGroupPinnedTop.children[b].width = W + "px"), (p = (R = P.current.colGroupPinnedBottom) == null ? void 0 : R.children) != null && p[b] && (P.current.colGroupPinnedBottom.children[b].width = W + "px");
794
794
  }
795
795
  }
796
- $.current && $.current.setWidth(g), q.current && q.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), j.current && (j.current.style.width = g ? g + "px" : "");
796
+ $.current && $.current.setWidth(g), q.current && q.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" : "");
797
797
  } else {
798
798
  let g = 0;
799
799
  if (!P.current.colGroupMain)
800
800
  return;
801
- const x = P.current.colGroupMain.children;
802
- for (let R = 0; R < x.length; R++) {
803
- const _ = x[R].width;
801
+ const S = P.current.colGroupMain.children;
802
+ for (let b = 0; b < S.length; b++) {
803
+ const _ = S[b].width;
804
804
  if (!_) {
805
805
  g = 0;
806
806
  break;
807
807
  }
808
808
  g += parseFloat(_.toString());
809
809
  }
810
- g = Math.round(g), $.current && $.current.setWidth(g), q.current && q.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), j.current && (j.current.style.width = g ? g + "px" : "");
810
+ g = Math.round(g), $.current && $.current.setWidth(g), q.current && q.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" : "");
811
811
  }
812
- Ie.current && Zt();
813
- }, Zt = () => {
814
- const e = H.current, n = e ? e.scrollWidth > e.clientWidth : !1;
815
- Ie.current && (Ie.current.style.marginBlockEnd = n ? "var(--kendo-scrollbar-width, 0px)" : "");
816
- }, Je = () => {
812
+ Ee.current && en();
813
+ }, en = () => {
814
+ const e = G.current, n = e ? e.scrollWidth > e.clientWidth : !1;
815
+ Ee.current && (Ee.current.style.marginBlockEnd = n ? "var(--kendo-scrollbar-width, 0px)" : "");
816
+ }, Qe = () => {
817
817
  var e;
818
- t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0);
819
- }, ge = () => {
818
+ t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = H.current) == null ? void 0 : e.offsetWidth) || 0);
819
+ }, fe = () => {
820
820
  var e;
821
- t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = H.current) == null ? void 0 : e.offsetHeight) || 0);
822
- }, Jt = () => {
821
+ t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = G.current) == null ? void 0 : e.offsetHeight) || 0);
822
+ }, tn = () => {
823
823
  const e = t.gridProps.minRowHeightRef;
824
824
  if (e && !e.current && !t.gridProps.rowHeight) {
825
- const n = Jn(T.current);
825
+ const n = tr(M.current);
826
826
  n && (e.current = n, Y());
827
827
  }
828
- }, fe = c.useCallback(
828
+ }, me = c.useCallback(
829
829
  (e, n, o, r, i) => {
830
830
  var s;
831
- if (!Xt() && !o || !e)
831
+ if (!nn() && !o || !e)
832
832
  return;
833
833
  const a = {
834
834
  type: e,
@@ -839,13 +839,13 @@ const sr = (t, S, b, z) => {
839
839
  field: i,
840
840
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
841
841
  ...o
842
- }, d = D(), l = Kn({
842
+ }, d = k(), l = An({
843
843
  event: a,
844
844
  data: d,
845
845
  selectedState: (s = t.gridProps.select) != null ? s : {},
846
- previousCopiedItems: tt.current
846
+ previousCopiedItems: at.current
847
847
  });
848
- e !== ze.paste && (tt.current = l.copiedItems), t.gridProps.onClipboard && S && f(t.gridProps.onClipboard, {
848
+ e !== Ne.paste && (at.current = l.copiedItems), t.gridProps.onClipboard && x && f(t.gridProps.onClipboard, {
849
849
  ...a,
850
850
  ...l
851
851
  });
@@ -857,15 +857,15 @@ const sr = (t, S, b, z) => {
857
857
  t.gridProps.clipboard,
858
858
  t.gridProps.onClipboard
859
859
  ]
860
- ), Xt = () => {
860
+ ), nn = () => {
861
861
  var i, a, d;
862
862
  if (!ae)
863
863
  return !1;
864
- const e = yn(p()), n = e ? e.matches(".k-table-td") ? e : (i = p()) == null ? void 0 : i.body : (a = p()) == null ? void 0 : a.body, o = n.closest(".k-grid-container"), r = n && ((d = M.current) == null ? void 0 : d.contains(n));
864
+ const e = Dn(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 == null ? void 0 : n.closest(".k-grid-container"), r = n && ((d = H.current) == null ? void 0 : d.contains(n));
865
865
  return !!(n && r && o);
866
- }, Xe = (e, n, o, r, i, a, d) => {
867
- Ke(), be.current = !0, Ge.current = !0, t.gridProps.onColumnResize && S && f(t.gridProps.onColumnResize, {
868
- columns: de(),
866
+ }, et = (e, n, o, r, i, a, d) => {
867
+ Ge(), Ie.current = !0, He.current = !0, t.gridProps.onColumnResize && x && f(t.gridProps.onColumnResize, {
868
+ columns: se(),
869
869
  nativeEvent: r,
870
870
  targetColumnId: d,
871
871
  index: e,
@@ -873,8 +873,8 @@ const sr = (t, S, b, z) => {
873
873
  oldWidth: o,
874
874
  end: i,
875
875
  target: E.current
876
- }), i && De(a);
877
- }, Yt = () => {
876
+ }), i && Me(a);
877
+ }, rn = () => {
878
878
  var e;
879
879
  return {
880
880
  filter: t.gridProps.filter,
@@ -887,7 +887,7 @@ const sr = (t, S, b, z) => {
887
887
  nativeEvent: e && e.nativeEvent,
888
888
  syntheticEvent: e,
889
889
  target: E.current
890
- }), Qt = (e) => ({
890
+ }), on = (e) => ({
891
891
  ...e,
892
892
  nativeEvent: void 0,
893
893
  syntheticEvent: void 0,
@@ -899,69 +899,69 @@ const sr = (t, S, b, z) => {
899
899
  e(n);
900
900
  return;
901
901
  }
902
- e(Qt(n));
903
- }, en = () => {
902
+ e(on(n));
903
+ }, an = () => {
904
904
  var e, n, o;
905
- if (T.current && ((e = T.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
906
- Me.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? He.current = document.activeElement : He.current = void 0;
907
- const r = Array.from((o = T.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
908
- r.length > Be.current.length ? Re.current = r.filter(
909
- (i) => !Be.current.includes(i)
910
- )[0] : r.length === 1 && (Re.current = r[0], Me.current = !0), Be.current = r;
905
+ if (M.current && ((e = M.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
906
+ Le.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? Fe.current = document.activeElement : Fe.current = void 0;
907
+ const r = Array.from((o = M.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
908
+ r.length > Oe.current.length ? Ce.current = r.filter(
909
+ (i) => !Oe.current.includes(i)
910
+ )[0] : r.length === 1 && (Ce.current = r[0], Le.current = !0), Oe.current = r;
911
911
  }
912
- }, D = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), p = () => {
912
+ }, k = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), O = () => {
913
913
  var e;
914
914
  if (ae)
915
- return ((e = me()) == null ? void 0 : e.ownerDocument) || document;
916
- }, me = () => M.current, Pe = c.useCallback(
915
+ return ((e = Pe()) == null ? void 0 : e.ownerDocument) || document;
916
+ }, Pe = () => H.current, he = c.useCallback(
917
917
  (e) => {
918
918
  var r, i;
919
- if (!C.current || !((r = C.current) != null && r.container) || t.gridProps.scrollable === "none")
919
+ if (!C.current || !((r = C.current) != null && r.container) || z === "none")
920
920
  return;
921
- G.current && G.current.disconnect();
922
- const { rowIndex: n } = e, o = me();
923
- if (K) {
921
+ T.current && T.current.disconnect();
922
+ const { rowIndex: n } = e, o = Pe();
923
+ if (D) {
924
924
  const a = ((i = C.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
925
925
  C.current.container.scroll(0, a);
926
926
  } else if (o) {
927
927
  const a = n < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${n + 1})`);
928
- a && H.current && (H.current.scrollTop = a.offsetTop);
928
+ a && G.current && (G.current.scrollTop = a.offsetTop);
929
929
  }
930
930
  },
931
- [t.gridProps.scrollable]
932
- ), Ye = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), tn = () => Ye(vn) === Ye(t.columnsRef), nn = () => {
933
- ve.current = window.innerWidth, tn() || Y();
934
- }, rn = () => {
931
+ [z]
932
+ ), tt = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), cn = () => tt(En) === tt(t.columnsRef), dn = () => {
933
+ we.current = window.innerWidth, cn() || Y();
934
+ }, sn = () => {
935
935
  var a;
936
936
  const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = C.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
937
- r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = Bt, r.pageSize = n, r.scrollableVirtual = K, r.container = H.current, r.tableBody = T.current, r.scrollHeightContainer = et.current, r.table = j.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new kn(e, i)));
938
- }, Qe = c.useCallback(
937
+ r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = Nt, r.pageSize = n, r.scrollableVirtual = D, r.container = G.current, r.tableBody = M.current, r.scrollHeightContainer = rt.current, r.scrollbarOverlaySpacerElement = ot.current, r.table = V.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new Gn(e, i)));
938
+ }, nt = c.useCallback(
939
939
  (e) => {
940
- const n = { rowIndex: Le.current };
940
+ const n = { rowIndex: ze.current };
941
941
  e.forEach((o) => {
942
- o.boundingClientRect.height !== o.intersectionRect.height && Pe(n);
942
+ o.boundingClientRect.height !== o.intersectionRect.height && he(n);
943
943
  });
944
944
  },
945
- [Pe]
945
+ [he]
946
946
  ), Y = () => {
947
947
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
948
- }, on = (e) => e.left !== void 0 ? We !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, E = c.useRef(null), C = c.useRef(void 0), P = c.useRef(void 0), U = c.useRef(void 0), V = c.useRef(void 0), Q = c.useRef(void 0), he = c.useRef(void 0), G = c.useRef(null), T = c.useRef(null), an = c.useRef(null), H = c.useRef(null), j = c.useRef(null), cn = c.useRef(null), M = c.useRef(null), et = c.useRef(null), q = c.useRef(null), $ = c.useRef(null), A = c.useRef(null), F = c.useRef(null), L = c.useRef(null), B = c.useRef(null), dn = c.useRef(null), sn = 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(
948
+ }, ln = (e) => e.left !== void 0 ? pe !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, E = c.useRef(null), C = c.useRef(void 0), P = c.useRef(void 0), j = c.useRef(void 0), U = c.useRef(void 0), Q = c.useRef(void 0), Re = c.useRef(void 0), T = c.useRef(null), M = c.useRef(null), un = c.useRef(null), G = c.useRef(null), V = c.useRef(null), gn = c.useRef(null), H = c.useRef(null), rt = c.useRef(null), be = c.useRef(null), ot = c.useRef(null), it = c.useRef(!1), ve = c.useRef(null), q = c.useRef(null), $ = c.useRef(null), A = c.useRef(null), F = c.useRef(null), L = c.useRef(null), B = c.useRef(null), fn = c.useRef(null), mn = c.useRef(null), He = c.useRef(!1), Ae = c.useRef(!1), Ce = c.useRef(void 0), Fe = c.useRef(void 0), Le = c.useRef(!1), Ie = c.useRef(!0), Be = c.useRef(0), We = c.useRef(void 0), ze = c.useRef(void 0), Oe = c.useRef([]), at = c.useRef([]), we = c.useRef(0), ye = c.useRef(
949
949
  null
950
- ), ln = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, un = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, gn = !!((it = t.gridProps.group) != null && it.length), {
951
- stickyHeaderItems: fn,
952
- stickyHeaderRef: mn,
953
- stickyFooterItems: Pn,
954
- stickyFooterRef: Ie,
955
- scrollToStickyGroup: hn,
956
- update: nt
957
- } = qn({
958
- enabled: ln,
959
- enabledFooters: un,
950
+ ), Pn = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, hn = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, Rn = !!((lt = t.gridProps.group) != null && lt.length), {
951
+ stickyHeaderItems: bn,
952
+ stickyHeaderRef: vn,
953
+ stickyFooterItems: Cn,
954
+ stickyFooterRef: Ee,
955
+ scrollToStickyGroup: In,
956
+ update: ct
957
+ } = Xn({
958
+ enabled: Pn,
959
+ enabledFooters: hn,
960
960
  flatData: t.dataRef,
961
- containerRef: H,
962
- tableBodyRef: T,
961
+ containerRef: G,
962
+ tableBodyRef: M,
963
963
  rowHeight: t.gridProps.rowHeight,
964
- isGrouped: gn,
964
+ isGrouped: Rn,
965
965
  virtualSkipRef: t.gridProps.virtualSkipRef,
966
966
  rowHeightServiceRef: {
967
967
  get current() {
@@ -969,156 +969,156 @@ const sr = (t, S, b, z) => {
969
969
  return (e = C.current) == null ? void 0 : e.rowHeightService;
970
970
  }
971
971
  }
972
- }), ie = c.useRef(null), Rn = c.useRef(null), bn = c.useRef(null), We = En(M), K = t.isVirtualScroll, vn = 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 = Gn(t.gridProps.editable), Cn = ve.current && re && ve.current <= re.medium && t.gridProps.adaptive;
972
+ }), ie = c.useRef(null), wn = c.useRef(null), yn = c.useRef(null), pe = Kn(H), D = t.isVirtualScroll, En = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), dt = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, v = Se(t.gridProps.selectable), st = Fn(t.gridProps.editable), Sn = we.current && Z && we.current <= Z.medium && t.gridProps.adaptive;
973
973
  return c.useMemo(() => {
974
974
  ne.onConstructor({
975
975
  navigatable: !!t.gridProps.navigatable,
976
- contextStateRef: V,
976
+ contextStateRef: U,
977
977
  navigationStateRef: Q,
978
978
  idPrefix: t.id
979
- }), C.current = new er();
979
+ }), C.current = new ir();
980
980
  }, []), c.useMemo(() => {
981
981
  var e;
982
982
  (e = C.current) == null || e.reset();
983
983
  }, [
984
- t.gridProps.scrollable,
984
+ z,
985
985
  t.gridProps.total,
986
986
  t.gridProps.filter,
987
987
  t.gridProps.group,
988
- rt,
988
+ dt,
989
989
  t.gridProps.sort,
990
990
  t.gridProps.rowHeight
991
991
  ]), c.useEffect(() => {
992
- O.current = {};
993
- }), c.useEffect(() => (t.gridProps.clipboard && (he.current = new Tn(fe), he.current.addEventListeners(p())), () => {
994
- he.current && he.current.removeEventListeners(p());
995
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, fe, p]), c.useEffect(() => (Je(), Ke(), at(), ne.onComponentDidMount({
996
- scope: M.current || void 0,
997
- contextStateRef: V,
992
+ ce.current = {};
993
+ }), c.useEffect(() => (t.gridProps.clipboard && (Re.current = new Ln(me), Re.current.addEventListeners(O())), () => {
994
+ Re.current && Re.current.removeEventListeners(O());
995
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard, me, O]), c.useEffect(() => (Qe(), Ge(), ut(), ne.onComponentDidMount({
996
+ scope: H.current || void 0,
997
+ contextStateRef: U,
998
998
  navigationStateRef: Q
999
999
  }), () => {
1000
- clearTimeout(Fe.current);
1000
+ clearTimeout(We.current);
1001
1001
  }), []), c.useEffect(() => {
1002
1002
  var e;
1003
- Je(), Ke(), at(), K && (ge(), Jt(), (e = C.current) == null || e.update()), nt(), en(), ne.onComponentDidUpdate({
1004
- scope: M.current || void 0,
1005
- contextStateRef: V,
1003
+ Qe(), Ge(), ut(), D && (fe(), tn(), (e = C.current) == null || e.update()), ct(), an(), ne.onComponentDidUpdate({
1004
+ scope: H.current || void 0,
1005
+ contextStateRef: U,
1006
1006
  navigationStateRef: Q,
1007
- focusFirst: Te.current,
1008
- newEditableRow: Re.current,
1009
- singleEditRow: Me.current,
1010
- lastActiveElement: He.current,
1007
+ focusFirst: Ae.current,
1008
+ newEditableRow: Ce.current,
1009
+ singleEditRow: Le.current,
1010
+ lastActiveElement: Fe.current,
1011
1011
  navigatable: t.gridProps.navigatable
1012
- }), ht(), Te.current = !1, Re.current = void 0, Ce.current = void 0;
1012
+ }), It(), Ae.current = !1, Ce.current = void 0, ye.current = void 0;
1013
1013
  }), c.useEffect(() => {
1014
1014
  if (ae) {
1015
1015
  const e = {
1016
1016
  rootMargin: "0px",
1017
1017
  threshold: 0.9
1018
1018
  };
1019
- G.current = window.IntersectionObserver && new window.IntersectionObserver(Qe, e) || null;
1019
+ T.current = window.IntersectionObserver && new window.IntersectionObserver(nt, e) || null;
1020
1020
  }
1021
1021
  return () => {
1022
- G.current && (G.current.disconnect(), G.current = null);
1022
+ T.current && (T.current.disconnect(), T.current = null);
1023
1023
  };
1024
- }, [Qe]), c.useEffect(() => {
1024
+ }, [nt]), c.useEffect(() => {
1025
1025
  var n;
1026
1026
  let e;
1027
1027
  return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
1028
- nn(), K && ge();
1029
- }), e.observe((n = p()) == null ? void 0 : n.body)), () => {
1028
+ dn(), D && fe();
1029
+ }), e.observe((n = O()) == null ? void 0 : n.body)), () => {
1030
1030
  e == null || e.disconnect();
1031
1031
  };
1032
1032
  }, []), c.useEffect(() => {
1033
- if (!ae || !window.ResizeObserver || !K || !H.current)
1033
+ if (!ae || !window.ResizeObserver || !D || !G.current)
1034
1034
  return;
1035
1035
  const e = () => {
1036
1036
  var i, a;
1037
1037
  const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
1038
- ge();
1038
+ fe();
1039
1039
  const r = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
1040
1040
  (o === 0 && r > 0 || Math.abs(r - o) > 10) && Y();
1041
1041
  }, n = new window.ResizeObserver(e);
1042
- return n.observe(H.current), () => {
1042
+ return n.observe(G.current), () => {
1043
1043
  n.disconnect();
1044
1044
  };
1045
- }, [K, ge]), c.useImperativeHandle(
1045
+ }, [D, fe]), c.useImperativeHandle(
1046
1046
  E,
1047
1047
  () => ({
1048
1048
  get element() {
1049
- return me();
1049
+ return Pe();
1050
1050
  },
1051
1051
  props: t.gridProps,
1052
1052
  get columns() {
1053
- return de();
1053
+ return se();
1054
1054
  },
1055
1055
  scrollIntoView: (e) => {
1056
1056
  var r;
1057
- if (!((r = C.current) != null && r.container) || t.gridProps.scrollable === "none")
1057
+ if (!((r = C.current) != null && r.container) || z === "none")
1058
1058
  return;
1059
1059
  const { rowIndex: n } = e;
1060
- Le.current = n;
1061
- const o = me();
1062
- if (G.current && o) {
1063
- G.current.disconnect();
1064
- const i = o.querySelector(`[absolute-row-index="${Le.current}"]`);
1065
- i ? G.current.observe(i) : Pe(e);
1060
+ ze.current = n;
1061
+ const o = Pe();
1062
+ if (T.current && o) {
1063
+ T.current.disconnect();
1064
+ const i = o.querySelector(`[absolute-row-index="${ze.current}"]`);
1065
+ i ? T.current.observe(i) : he(e);
1066
1066
  }
1067
1067
  },
1068
1068
  fitColumns: (e) => {
1069
1069
  P.current.dblClickHandler(null, e);
1070
1070
  },
1071
- exportAsPdf: Se,
1072
- saveAsCsv: $e,
1073
- getCsvBlob: _e,
1074
- getTotal: xe,
1075
- getLeafDataItems: D
1071
+ exportAsPdf: Ke,
1072
+ saveAsCsv: Je,
1073
+ getCsvBlob: Xe,
1074
+ getTotal: De,
1075
+ getLeafDataItems: k
1076
1076
  })
1077
1077
  ), c.useImperativeHandle(t.gridRef, () => E.current), c.useMemo(() => {
1078
- P.current = new Vn(Xe);
1078
+ P.current = new Zn(et);
1079
1079
  }, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
1080
- U.current = new jn(ue, $t, Ze);
1080
+ j.current = new Jn(ge, Yt, Ye);
1081
1081
  }, [
1082
1082
  t.gridProps.onColumnReorder,
1083
1083
  t.gridProps.onGroupChange,
1084
1084
  t.gridProps.group,
1085
1085
  t.columnsRef,
1086
1086
  t.gridProps.groupable
1087
- ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState = xn(t.columnsState), U.current.reorderable = t.gridProps.reorderable || !1, U.current.groupable = rt, U.current.columns = t.columnsRef, U.current.dir = We, rn(), Sn("grid", E, t.gridProps, t.gridProps.webMcp), /* @__PURE__ */ c.createElement(
1088
- cr.Provider,
1087
+ ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState = Tn(t.columnsState), j.current.reorderable = t.gridProps.reorderable || !1, j.current.groupable = dt, j.current.columns = t.columnsRef, j.current.dir = pe, sn(), Mn("grid", E, t.gridProps, t.gridProps.webMcp), /* @__PURE__ */ c.createElement(
1088
+ gr.Provider,
1089
1089
  {
1090
1090
  value: {
1091
- isClient: S,
1091
+ isClient: x,
1092
1092
  rowReorder: oe,
1093
1093
  activeDragRowDataItemRef: ie,
1094
- reorderRowDragTargetRef: Rn,
1095
- reorderRowDropTargetRef: bn,
1096
- dir: We,
1097
- getCellPositionStyle: on,
1094
+ reorderRowDragTargetRef: wn,
1095
+ reorderRowDropTargetRef: yn,
1096
+ dir: pe,
1097
+ getCellPositionStyle: ln,
1098
1098
  dataItemKey: t.gridProps.dataItemKey,
1099
1099
  columnsState: t.columnsState,
1100
1100
  columnsRef: t.columnsRef,
1101
1101
  hiddenColumnsRef: t.hiddenColumnsRef,
1102
- onColumnsStateChange: De,
1102
+ onColumnsStateChange: Me,
1103
1103
  groupable: t.gridProps.groupable,
1104
1104
  group: t.gridProps.group,
1105
1105
  reorderable: t.gridProps.reorderable,
1106
1106
  defaultGroup: t.gridProps.defaultGroup,
1107
- groupChange: ke,
1108
- selectionRelease: Ve,
1109
- pinnedSelectionRelease: Ht,
1110
- pagerPageChange: pt,
1111
- onContextMenu: ft,
1112
- rowClick: Ct,
1113
- rowDblClick: It,
1114
- cellClick: Et,
1115
- headerCellClick: Ue,
1116
- itemChange: Dt,
1117
- onDialogEditCancel: yt,
1118
- onDialogEditSubmit: wt,
1119
- columnReorder: ue,
1120
- onResize: Xe,
1121
- getTotal: xe,
1107
+ groupChange: Te,
1108
+ selectionRelease: $e,
1109
+ pinnedSelectionRelease: Bt,
1110
+ pagerPageChange: qt,
1111
+ onContextMenu: bt,
1112
+ rowClick: St,
1113
+ rowDblClick: xt,
1114
+ cellClick: Kt,
1115
+ headerCellClick: qe,
1116
+ itemChange: Ht,
1117
+ onDialogEditCancel: Dt,
1118
+ onDialogEditSubmit: kt,
1119
+ columnReorder: ge,
1120
+ onResize: et,
1121
+ getTotal: De,
1122
1122
  sortable: t.gridProps.sortable,
1123
1123
  pageable: t.gridProps.pageable,
1124
1124
  pageSize: t.gridProps.pageSize,
@@ -1126,95 +1126,99 @@ const sr = (t, S, b, z) => {
1126
1126
  skip: t.gridProps.skip,
1127
1127
  take: t.gridProps.take,
1128
1128
  defaultSort: t.gridProps.defaultSort,
1129
- sortChange: je,
1129
+ sortChange: _e,
1130
1130
  filterable: t.gridProps.filterable,
1131
1131
  filter: t.gridProps.filter,
1132
1132
  defaultFilter: t.gridProps.defaultFilter,
1133
- filterOperators: t.gridProps.filterOperators || dr,
1134
- getLeafDataItems: D,
1135
- filterChange: Nt,
1136
- applyHighlightDescriptor: Ut,
1137
- applySelectionDescriptor: Ft,
1133
+ filterOperators: t.gridProps.filterOperators || fr,
1134
+ getLeafDataItems: k,
1135
+ filterChange: $t,
1136
+ applyHighlightDescriptor: _t,
1137
+ applySelectionDescriptor: Ot,
1138
1138
  highlight: t.gridProps.highlight,
1139
1139
  select: t.gridProps.select,
1140
- searchChange: Vt,
1141
- exportAsPdf: Se,
1142
- exportAsCsv: $e,
1143
- getCsvBlob: _e,
1144
- onHeaderSelectionChange: Tt,
1145
- columnGroupChange: _t,
1146
- onKeyDown: Rt,
1147
- onFocus: bt,
1148
- scrollHandler: mt,
1149
- selectionChange: Kt,
1150
- mobileMode: Cn,
1151
- adaptiveColumnMenuRef: ve.current,
1140
+ searchChange: Zt,
1141
+ exportAsPdf: Ke,
1142
+ exportAsCsv: Je,
1143
+ getCsvBlob: Xe,
1144
+ onHeaderSelectionChange: Lt,
1145
+ columnGroupChange: Qt,
1146
+ onKeyDown: wt,
1147
+ onFocus: yt,
1148
+ scrollHandler: vt,
1149
+ selectionChange: At,
1150
+ mobileMode: Sn,
1151
+ adaptiveColumnMenuRef: we.current,
1152
1152
  adpativeTitle: t.gridProps.adaptiveTitle,
1153
1153
  adaptive: t.gridProps.adaptive,
1154
- dispatchDetailExpand: xt,
1155
- dispatchGroupExpand: St,
1154
+ dispatchDetailExpand: Tt,
1155
+ dispatchGroupExpand: Mt,
1156
1156
  columnResizeRef: P,
1157
- dragLogicRef: U,
1157
+ dragLogicRef: j,
1158
1158
  navigationStateRef: Q,
1159
- tableElementRef: j,
1160
- tableBodyElementRef: T,
1161
- headerElementRef: an,
1162
- containerElementRef: H,
1163
- headTableElementRef: cn,
1164
- elementRef: M,
1165
- virtualScrollHeightContainerRef: et,
1159
+ tableElementRef: V,
1160
+ tableBodyElementRef: M,
1161
+ headerElementRef: un,
1162
+ containerElementRef: G,
1163
+ headTableElementRef: gn,
1164
+ elementRef: H,
1165
+ virtualScrollHeightContainerRef: rt,
1166
+ scrollbarContainerRef: be,
1167
+ scrollbarSpacerRef: ot,
1168
+ vScrollDraggingRef: it,
1169
+ scrollbarShowCallbackRef: ve,
1166
1170
  footerRef: q,
1167
1171
  headerRef: $,
1168
1172
  vsRef: C,
1169
- stickyHeaderItems: fn,
1170
- stickyHeaderRef: mn,
1171
- stickyFooterItems: Pn,
1172
- stickyFooterRef: Ie,
1173
+ stickyHeaderItems: bn,
1174
+ stickyHeaderRef: vn,
1175
+ stickyFooterItems: Cn,
1176
+ stickyFooterRef: Ee,
1173
1177
  stickyHeaderTableRef: A,
1174
1178
  stickyFooterTableRef: F,
1175
1179
  pinnedTopTableRef: L,
1176
1180
  pinnedBottomTableRef: B,
1177
- pinnedTopRef: dn,
1178
- pinnedBottomRef: sn,
1179
- onRowPin: se,
1180
- getRowPinPosition: kt
1181
+ pinnedTopRef: fn,
1182
+ pinnedBottomRef: mn,
1183
+ onRowPin: le,
1184
+ getRowPinPosition: Gt
1181
1185
  }
1182
1186
  },
1183
- /* @__PURE__ */ c.createElement(Hn.Provider, { value: V.current }, t.children),
1187
+ /* @__PURE__ */ c.createElement(Bn.Provider, { value: U.current }, t.children),
1184
1188
  /* @__PURE__ */ c.createElement(
1185
- tr,
1189
+ ar,
1186
1190
  {
1187
- show: b.show && (ce == null ? void 0 : ce.length),
1188
- dataItem: b.dataItem,
1189
- field: b.field,
1190
- items: ce,
1191
- offset: b.offset,
1192
- onClose: Oe,
1193
- onSelect: gt
1191
+ show: h.show && (de == null ? void 0 : de.length),
1192
+ dataItem: h.dataItem,
1193
+ field: h.field,
1194
+ items: de,
1195
+ offset: h.offset,
1196
+ onClose: je,
1197
+ onSelect: Rt
1194
1198
  }
1195
1199
  ),
1196
1200
  t.gridProps.pdf && /* @__PURE__ */ c.createElement(
1197
- ir,
1201
+ lr,
1198
1202
  {
1199
1203
  gridProps: t.gridProps,
1200
1204
  innerGrid: t.innerGrid,
1201
1205
  pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
1202
- onPdfExport: jt,
1203
- ref: (e) => Z.current = e
1206
+ onPdfExport: Jt,
1207
+ ref: (e) => K.current = e
1204
1208
  }
1205
1209
  ),
1206
1210
  t.gridProps.csv && /* @__PURE__ */ c.createElement(
1207
- ar,
1211
+ ur,
1208
1212
  {
1209
1213
  gridProps: t.gridProps,
1210
1214
  csv: typeof t.gridProps.csv == "object" ? t.gridProps.csv : {},
1211
- onCsvExport: qt,
1215
+ onCsvExport: Xt,
1212
1216
  columnsState: t.columnsState,
1213
- ref: (e) => k.current = e
1217
+ ref: (e) => N.current = e
1214
1218
  }
1215
1219
  )
1216
1220
  );
1217
1221
  };
1218
1222
  export {
1219
- xr as GridClientWrapper
1223
+ Tr as GridClientWrapper
1220
1224
  };