@progress/kendo-react-grid 16.2.0-develop.2 → 16.2.0-develop.20

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