@progress/kendo-react-grid 14.3.0-develop.6 → 14.3.0-develop.8

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