@progress/kendo-react-grid 9.5.0-develop.3 → 9.5.0-develop.5

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,22 +7,22 @@
7
7
  */
8
8
  "use client";
9
9
  import * as i from "react";
10
- import { canUseDOM as $, getActiveElement as Lt, useDir as Gt, setScrollbarWidth as Ae, getter as J, RowHeightService as He } from "@progress/kendo-react-common";
11
- import { getSelectionOptions as Y, populateClipboardData as zt, ClipboardActionType as ge, getEditableOptions as Nt, tableKeyboardNavigation as T, ClipboardService as Ot, TableKeyboardNavigationContext as Bt, getSelectedStateFromKeyDown as Ut, closestTagName as Fe, getColumnIndex as Vt, getRowIndex as _t, editReducer as Wt, EDIT_ACTION as jt, getDetailExpandableOptions as qt, detailExpandReducer as Le, getGroupExpandableOptions as Xt, groupExpandReducer as $t, DETAIL_EXPAND_ACTION as Jt, getSelectedState as Ge, updateLeft as Yt, updateRight as Qt } from "@progress/kendo-react-data-tools";
12
- import { ColumnResize as Zt } from "./drag/ColumnResize.mjs";
13
- import { CommonDragLogic as pt } from "./drag/CommonDragLogic.mjs";
14
- import { SAFARI_REGEX as er } from "./constants/index.mjs";
15
- import { getDefaultHeadContextMenuItems as tr, getDefaultBodyContextMenuItems as rr, isRowReorderEnabled as nr, sanitizeColumns as or, getDataAsArray as ar, firefox as ze, firefoxMaxHeight as Ne } from "./utils/index.mjs";
10
+ import { canUseDOM as $, getActiveElement as Gt, useDir as zt, setScrollbarWidth as Ae, getter as J, RowHeightService as He } from "@progress/kendo-react-common";
11
+ import { getSelectionOptions as Y, populateClipboardData as Nt, ClipboardActionType as ge, getEditableOptions as Ot, tableKeyboardNavigation as T, ClipboardService as Bt, TableKeyboardNavigationContext as Ut, editReducer as Vt, EDIT_ACTION as _t, getDetailExpandableOptions as Wt, detailExpandReducer as Fe, getGroupExpandableOptions as jt, groupExpandReducer as qt, DETAIL_EXPAND_ACTION as Xt, getSelectedState as Le, getSelectedStateFromKeyDown as $t, closestTagName as Ge, getColumnIndex as Jt, getRowIndex as Yt, updateLeft as Qt, updateRight as Zt } from "@progress/kendo-react-data-tools";
12
+ import { ColumnResize as pt } from "./drag/ColumnResize.mjs";
13
+ import { CommonDragLogic as er } from "./drag/CommonDragLogic.mjs";
14
+ import { SAFARI_REGEX as tr } from "./constants/index.mjs";
15
+ import { getDefaultHeadContextMenuItems as rr, getDefaultBodyContextMenuItems as nr, isRowReorderEnabled as or, sanitizeColumns as ar, getDataAsArray as ir, firefox as ze, firefoxMaxHeight as Ne } from "./utils/index.mjs";
16
16
  import { VirtualScrollFixed as Oe } from "./VirtualScrollFixed.mjs";
17
- import { VirtualScroll as ir } from "./VirtualScroll.mjs";
18
- import { GridContextMenu as dr } from "./contextMenu/GridContextMenu.mjs";
17
+ import { VirtualScroll as dr } from "./VirtualScroll.mjs";
18
+ import { GridContextMenu as cr } from "./contextMenu/GridContextMenu.mjs";
19
19
  import { GridContextMenuAnchorPart as Be } from "./contextMenu/enums.mjs";
20
- import { normalize as cr, firstLevelSortSeqMap as lr } from "./sortCommon.mjs";
21
- const sr = i.createContext(void 0), wr = (t) => {
20
+ import { normalize as lr, firstLevelSortSeqMap as sr } from "./sortCommon.mjs";
21
+ const ur = i.createContext(void 0), yr = (t) => {
22
22
  var Se, De;
23
- const E = t.gridProps.isClient, [b, fe] = i.useState({}), Ue = (e) => {
23
+ const E = t.gridProps.isClient, [I, fe] = i.useState({}), Ue = (e) => {
24
24
  e.event.preventDefault(), fe({
25
- ...b,
25
+ ...I,
26
26
  show: !0,
27
27
  offset: {
28
28
  left: e.event.pageX,
@@ -33,29 +33,29 @@ const sr = i.createContext(void 0), wr = (t) => {
33
33
  });
34
34
  }, me = () => {
35
35
  fe({});
36
- }, P = i.useMemo(() => t.columnsRef.current.find((e) => e.field === b.field), [t.columnsRef, b]), Pe = i.useMemo(() => {
36
+ }, P = i.useMemo(() => t.columnsRef.current.find((e) => e.field === I.field), [t.columnsRef, I]), Pe = i.useMemo(() => {
37
37
  const e = t.gridProps.sortable && (P == null ? void 0 : P.sortable);
38
- return tr({
38
+ return rr({
39
39
  sortable: !!e,
40
40
  selectable: Y(t.gridProps.selectable).enabled,
41
41
  clipboard: !!t.gridProps.clipboard
42
42
  });
43
43
  }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), he = i.useMemo(() => {
44
44
  const e = t.gridProps.sortable && (P == null ? void 0 : P.sortable);
45
- return rr({
45
+ return nr({
46
46
  sortable: !!e,
47
47
  selectable: Y(t.gridProps.selectable).enabled,
48
48
  clipboard: !!t.gridProps.clipboard,
49
- rowReorderable: nr(t.gridProps.rowReorderable)
49
+ rowReorderable: or(t.gridProps.rowReorderable)
50
50
  });
51
51
  }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ve = i.useMemo(() => {
52
- const e = (P == null ? void 0 : P.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(b) : e;
53
- if (r && b.offset) {
54
- const n = b.dataItem ? Be.body : Be.head, o = r[n], a = b.dataItem ? he : Pe;
52
+ const e = (P == null ? void 0 : P.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(I) : e;
53
+ if (r && I.offset) {
54
+ const n = I.dataItem ? Be.body : Be.head, o = r[n], a = I.dataItem ? he : Pe;
55
55
  return o === !1 ? void 0 : o === !0 || o === void 0 ? a : o;
56
56
  }
57
- }, [t.gridProps.contextMenu, b, he, Pe, P]), _e = (e) => {
58
- var l, f, m, s, R, ke, Ke, Te, Me;
57
+ }, [t.gridProps.contextMenu, I, he, Pe, P]), _e = (e) => {
58
+ var l, s, m, f, R, ke, Ke, Te, Me;
59
59
  const r = e.event.item, n = {
60
60
  target: C.current,
61
61
  syntheticEvent: e.event.syntheticEvent,
@@ -84,24 +84,24 @@ const sr = i.createContext(void 0), wr = (t) => {
84
84
  switch ((l = r.data) == null ? void 0 : l.action) {
85
85
  case "SortCommand":
86
86
  if (P) {
87
- const ue = (f = r.name) == null ? void 0 : f.toLowerCase().includes("asc"), At = ((m = r.name) == null ? void 0 : m.toLowerCase().includes("desc")) ? "desc" : void 0, Ht = ue ? "asc" : At, Ft = r.name ? Ht : void 0;
88
- be(e.event.syntheticEvent, P, Ft);
87
+ const ue = (s = r.name) == null ? void 0 : s.toLowerCase().includes("asc"), Ht = ((m = r.name) == null ? void 0 : m.toLowerCase().includes("desc")) ? "desc" : void 0, Ft = ue ? "asc" : Ht, Lt = r.name ? Ft : void 0;
88
+ be(e.event.syntheticEvent, P, Lt);
89
89
  }
90
90
  break;
91
91
  case "SelectRowCommand":
92
- at(a);
92
+ it(a);
93
93
  break;
94
94
  case "SelectAllRowsCommand":
95
- ot(a);
95
+ at(a);
96
96
  break;
97
97
  case "ClearSelectionCommand":
98
- it(a);
98
+ dt(a);
99
99
  break;
100
100
  case "ReorderRowCommand":
101
- G.current = e.dataItem, (s = r.name) != null && s.toLowerCase().includes("rowup") && d > 0 && A(e.event.syntheticEvent, d - 1, "before"), (R = r.name) != null && R.toLowerCase().includes("rowdown") && d < o.length - 1 && A(e.event.syntheticEvent, d + 1, "after"), (ke = r.name) != null && ke.toLowerCase().includes("rowtop") && A(e.event.syntheticEvent, 0, "before"), (Ke = r.name) != null && Ke.toLowerCase().includes("rowbottom") && A(e.event.syntheticEvent, o.length - 1, "after");
101
+ z.current = e.dataItem, (f = r.name) != null && f.toLowerCase().includes("rowup") && d > 0 && A(e.event.syntheticEvent, d - 1, "before"), (R = r.name) != null && R.toLowerCase().includes("rowdown") && d < o.length - 1 && A(e.event.syntheticEvent, d + 1, "after"), (ke = r.name) != null && ke.toLowerCase().includes("rowtop") && A(e.event.syntheticEvent, 0, "before"), (Ke = r.name) != null && Ke.toLowerCase().includes("rowbottom") && A(e.event.syntheticEvent, o.length - 1, "after");
102
102
  break;
103
103
  case "CopySelectionCommand":
104
- B(
104
+ U(
105
105
  ge.copy,
106
106
  e.event.nativeEvent,
107
107
  {
@@ -112,7 +112,7 @@ const sr = i.createContext(void 0), wr = (t) => {
112
112
  );
113
113
  break;
114
114
  case "PasteCommand":
115
- B(
115
+ U(
116
116
  ge.paste,
117
117
  e.event.nativeEvent,
118
118
  {
@@ -124,9 +124,9 @@ const sr = i.createContext(void 0), wr = (t) => {
124
124
  break;
125
125
  }
126
126
  me();
127
- }, z = () => {
127
+ }, N = () => {
128
128
  const e = g.current.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
129
- return or(e);
129
+ return ar(e);
130
130
  }, We = (e, r, n) => {
131
131
  if (t.gridProps.onContextMenu && E) {
132
132
  const o = {
@@ -150,66 +150,37 @@ const sr = i.createContext(void 0), wr = (t) => {
150
150
  const r = e.currentTarget.scrollLeft, n = e.currentTarget.scrollTop, o = t.gridProps.scrollable === "virtual";
151
151
  t.gridProps.columnVirtualization && (!o || n === de.current) && (ce.current = window.setTimeout(() => {
152
152
  te();
153
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), L.current && L.current.setScrollLeft(r), F.current && F.current.setScrollLeft(r), c.current && n !== de.current && c.current.scrollHandler(e), t.gridProps.onScroll && E && u(t.gridProps.onScroll, {
153
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), G.current && G.current.setScrollLeft(r), L.current && L.current.setScrollLeft(r), c.current && n !== de.current && c.current.scrollHandler(e), t.gridProps.onScroll && E && u(t.gridProps.onScroll, {
154
154
  ...h(e)
155
155
  }), de.current = n;
156
156
  }, qe = (e) => {
157
- var n, o;
158
157
  T.onKeyDown(e, {
159
158
  navigatable: t.gridProps.navigatable || !1,
160
159
  contextStateRef: y,
161
160
  navigationStateRef: D,
162
161
  onNavigationAction: $e,
163
- columns: z()
162
+ columns: N()
164
163
  }), T.onGetSnapshotBeforeUpdate({
165
164
  document: v(),
166
165
  contextStateRef: y,
167
166
  navigationStateRef: D
168
167
  });
169
168
  const r = {
170
- dataItems: U(),
171
- mode: I.mode,
172
- cell: I.cell,
169
+ dataItems: H(),
170
+ mode: b.mode,
171
+ cell: b.cell,
173
172
  componentId: t.id,
174
173
  selectedField: t.gridProps.selectedField,
175
174
  ...h(e)
176
175
  };
177
- if (t.gridProps.onKeyDown && E && u(t.gridProps.onKeyDown, r), !t.gridProps.selectedField && I.enabled && t.gridProps.dataItemKey) {
178
- const a = Ut({
179
- event: r,
180
- selectedState: (n = t.gridProps.select) != null ? n : {},
181
- dataItemKey: t.gridProps.dataItemKey
182
- });
183
- if (a === t.gridProps.select)
184
- return;
185
- const d = e.target, l = Fe(d, "TD"), f = Fe(d, "TR"), m = Vt(l), s = _t(f);
186
- if (m !== void 0 && s !== void 0) {
187
- const R = (o = ar(t.gridProps.data)) == null ? void 0 : o[s];
188
- t.gridProps.onSelectionChange && u(t.gridProps.onSelectionChange, {
189
- ...r,
190
- select: a,
191
- dataItem: R,
192
- startRowIndex: s,
193
- startColIndex: m,
194
- startDataItem: R,
195
- endDataItem: R,
196
- endRowIndex: s,
197
- endColIndex: m,
198
- ctrlKey: e.ctrlKey,
199
- altKey: e.altKey,
200
- metaKey: e.metaKey,
201
- shiftKey: e.shiftKey,
202
- isDrag: !1
203
- });
204
- }
205
- }
176
+ t.gridProps.onKeyDown && E && u(t.gridProps.onKeyDown, r);
206
177
  }, Xe = (e) => {
207
178
  T.onFocus(e, {
208
179
  navigatable: !!t.gridProps.navigatable,
209
180
  contextStateRef: y
210
181
  });
211
182
  }, $e = (e) => {
212
- if (e.action === "moveToNextPage" && ct(e.event), e.action === "moveToPrevPage" && lt(e.event), e.focusElement && e.action === "reorderToRight") {
183
+ if (e.action === "moveToNextPage" && lt(e.event), e.action === "moveToPrevPage" && st(e.event), e.focusElement && e.action === "reorderToRight") {
213
184
  const r = parseInt(e.focusElement.ariaColIndex, 10) - 1;
214
185
  r < g.current.length - 1 && Z(r, r + 1, e.event);
215
186
  }
@@ -217,7 +188,7 @@ const sr = i.createContext(void 0), wr = (t) => {
217
188
  const r = parseInt(e.focusElement.ariaColIndex, 10) - 1;
218
189
  r > 0 && Z(r, r - 1, e.event);
219
190
  }
220
- if (t.gridProps.onNavigationAction && E) {
191
+ if (e.action === "select" && rt(e.event), t.gridProps.onNavigationAction && E) {
221
192
  const r = {
222
193
  focusElement: e.focusElement,
223
194
  ...h(e.event)
@@ -236,8 +207,8 @@ const sr = i.createContext(void 0), wr = (t) => {
236
207
  });
237
208
  }, Qe = (e, r, n) => {
238
209
  if (ye.enabled && ye.mode === "incell" && t.gridProps.dataItemKey) {
239
- const o = Wt(t.gridProps.edit, {
240
- type: jt.ENTER_FIELD_EDIT,
210
+ const o = Vt(t.gridProps.edit, {
211
+ type: _t.ENTER_FIELD_EDIT,
241
212
  payload: { id: r[t.gridProps.dataItemKey], field: n }
242
213
  });
243
214
  t.gridProps.onEditChange && u(t.gridProps.onEditChange, {
@@ -247,8 +218,8 @@ const sr = i.createContext(void 0), wr = (t) => {
247
218
  }
248
219
  }, Ze = (e, r) => {
249
220
  var o;
250
- if (qt(t.detailExpandable).enabled) {
251
- const a = Le((o = t.gridProps.detailExpand) != null ? o : {}, e);
221
+ if (Wt(t.detailExpandable).enabled) {
222
+ const a = Fe((o = t.gridProps.detailExpand) != null ? o : {}, e);
252
223
  t.gridProps.onDetailExpandChange && u(t.gridProps.onDetailExpandChange, {
253
224
  ...h(r),
254
225
  detailExpand: a
@@ -256,25 +227,25 @@ const sr = i.createContext(void 0), wr = (t) => {
256
227
  }
257
228
  }, pe = (e, r) => {
258
229
  var o;
259
- const n = Xt(
230
+ const n = jt(
260
231
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
261
232
  );
262
233
  if (n.enabled) {
263
- const a = $t((o = t.gridProps.groupExpand) != null ? o : [], e, n);
234
+ const a = qt((o = t.gridProps.groupExpand) != null ? o : [], e, n);
264
235
  t.gridProps.onGroupExpandChange && u(t.gridProps.onGroupExpandChange, {
265
236
  ...h(r),
266
237
  groupExpand: a
267
238
  });
268
239
  }
269
240
  }, be = (e, r, n) => {
270
- const { allowUnsort: o, mode: a } = cr(t.gridProps.sortable || !1, r.sortable || !1), d = (t.gridProps.sort || []).filter((m) => m.field === r.field)[0], l = n || lr[o][d && d.dir || ""], f = a === "single" ? [] : (t.gridProps.sort || []).filter((m) => m.field !== r.field);
271
- l !== "" && r.field && f.push({ field: r.field, dir: l }), Ie(f, e);
241
+ const { allowUnsort: o, mode: a } = lr(t.gridProps.sortable || !1, r.sortable || !1), d = (t.gridProps.sort || []).filter((m) => m.field === r.field)[0], l = n || sr[o][d && d.dir || ""], s = a === "single" ? [] : (t.gridProps.sort || []).filter((m) => m.field !== r.field);
242
+ l !== "" && r.field && s.push({ field: r.field, dir: l }), Ie(s, e);
272
243
  }, et = (e) => {
273
244
  var r;
274
245
  if (e.field === t.gridProps.expandField || e._expand || t.gridProps.group && e.field === void 0) {
275
246
  if (t.gridProps.onExpandChange) {
276
- const n = t.gridProps.dataItemKey ? Le((r = t.gridProps.detailExpand) != null ? r : {}, {
277
- type: Jt.SET,
247
+ const n = t.gridProps.dataItemKey ? Fe((r = t.gridProps.detailExpand) != null ? r : {}, {
248
+ type: Xt.SET,
278
249
  id: e.dataItem[t.gridProps.dataItemKey],
279
250
  payload: e.value
280
251
  }) : t.gridProps.detailExpand;
@@ -297,7 +268,7 @@ const sr = i.createContext(void 0), wr = (t) => {
297
268
  });
298
269
  }, tt = (e) => {
299
270
  var r;
300
- if (t.gridProps.onSelectionChange && I.enabled) {
271
+ if (t.gridProps.onSelectionChange && b.enabled) {
301
272
  const { event: n, dataItem: o, dataIndex: a, columnIndex: d } = e, l = {
302
273
  ...h(n.syntheticEvent),
303
274
  dataItem: o,
@@ -305,20 +276,20 @@ const sr = i.createContext(void 0), wr = (t) => {
305
276
  endColIndex: d,
306
277
  startRowIndex: a,
307
278
  endRowIndex: a,
308
- dataItems: U(),
279
+ dataItems: H(),
309
280
  altKey: !1,
310
281
  ctrlKey: !1,
311
282
  shiftKey: !1,
312
283
  metaKey: !1,
313
- mode: I.mode,
314
- cell: I.cell,
284
+ mode: b.mode,
285
+ cell: b.cell,
315
286
  isDrag: !1,
316
287
  componentId: t.id,
317
288
  selectedField: t.gridProps.selectedField || ""
318
289
  };
319
290
  u(t.gridProps.onSelectionChange, {
320
291
  ...l,
321
- select: t.gridProps.dataItemKey ? Ge({
292
+ select: t.gridProps.dataItemKey ? Le({
322
293
  event: l,
323
294
  selectedState: (r = t.gridProps.select) != null ? r : {},
324
295
  dataItemKey: t.gridProps.dataItemKey
@@ -326,9 +297,47 @@ const sr = i.createContext(void 0), wr = (t) => {
326
297
  });
327
298
  }
328
299
  }, rt = (e) => {
300
+ var m, f;
301
+ if (t.gridProps.selectedField || !b.enabled || !t.gridProps.dataItemKey)
302
+ return;
303
+ const r = {
304
+ dataItems: H(),
305
+ mode: b.mode,
306
+ cell: b.cell,
307
+ componentId: t.id,
308
+ selectedField: t.gridProps.selectedField,
309
+ ...h(e)
310
+ }, n = $t({
311
+ event: r,
312
+ selectedState: (m = t.gridProps.select) != null ? m : {},
313
+ dataItemKey: t.gridProps.dataItemKey
314
+ });
315
+ if (n === t.gridProps.select)
316
+ return;
317
+ const o = e.target, a = Ge(o, "TD"), d = Ge(o, "TR"), l = Jt(a), s = Yt(d);
318
+ if (l !== void 0 && s !== void 0) {
319
+ const R = (f = ir(t.gridProps.data)) == null ? void 0 : f[s];
320
+ t.gridProps.onSelectionChange && u(t.gridProps.onSelectionChange, {
321
+ ...r,
322
+ select: n,
323
+ dataItem: R,
324
+ startRowIndex: s,
325
+ startColIndex: l,
326
+ startDataItem: R,
327
+ endDataItem: R,
328
+ endRowIndex: s,
329
+ endColIndex: l,
330
+ ctrlKey: e.ctrlKey,
331
+ altKey: e.altKey,
332
+ metaKey: e.metaKey,
333
+ shiftKey: e.shiftKey,
334
+ isDrag: !1
335
+ });
336
+ }
337
+ }, nt = (e) => {
329
338
  var r;
330
- if (t.gridProps.onHeaderSelectionChange && I.enabled) {
331
- const n = U();
339
+ if (t.gridProps.onHeaderSelectionChange && b.enabled) {
340
+ const n = H();
332
341
  u(t.gridProps.onHeaderSelectionChange, {
333
342
  select: e.syntheticEvent.target.checked ? n.reduce((o, a) => (t.gridProps.dataItemKey && J(t.gridProps.dataItemKey)(a) !== void 0 && (o[J(t.gridProps.dataItemKey)(a)] = !0), o), {}) : {},
334
343
  field: e.field,
@@ -339,35 +348,35 @@ const sr = i.createContext(void 0), wr = (t) => {
339
348
  selectedField: (r = t.gridProps.selectedField) != null ? r : ""
340
349
  });
341
350
  }
342
- }, N = (e, r) => {
343
- t.gridProps.onSelectionChange && I.enabled && u(t.gridProps.onSelectionChange, {
351
+ }, O = (e, r) => {
352
+ t.gridProps.onSelectionChange && b.enabled && u(t.gridProps.onSelectionChange, {
344
353
  ...e,
345
354
  select: r
346
355
  });
347
- }, nt = (e) => {
356
+ }, ot = (e) => {
348
357
  var r;
349
- if (t.gridProps.onSelectionChange && I.enabled) {
358
+ if (t.gridProps.onSelectionChange && b.enabled) {
350
359
  const n = V()[e.startRowIndex], o = V()[e.endRowIndex], a = {
351
360
  syntheticEvent: void 0,
352
361
  target: C.current,
353
362
  selectedField: t.gridProps.selectedField || "",
354
363
  componentId: t.id,
355
- dataItems: U(),
364
+ dataItems: H(),
356
365
  dataItem: null,
357
366
  startDataItem: n,
358
367
  endDataItem: o,
359
368
  ...e
360
- }, d = Ge({
369
+ }, d = Le({
361
370
  event: a,
362
371
  selectedState: (r = t.gridProps.select) != null ? r : {},
363
372
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
364
373
  // it does work correctly even without it
365
374
  dataItemKey: t.gridProps.dataItemKey
366
375
  });
367
- N(a, d);
376
+ O(a, d);
368
377
  }
369
- }, ot = (e) => {
370
- if (t.gridProps.onSelectionChange && I.enabled) {
378
+ }, at = (e) => {
379
+ if (t.gridProps.onSelectionChange && b.enabled) {
371
380
  const r = e.dataItems[0], n = e.dataItems[e.dataItems.length - 1], o = {}, a = {
372
381
  ...e,
373
382
  startDataItem: r,
@@ -378,12 +387,12 @@ const sr = i.createContext(void 0), wr = (t) => {
378
387
  endColIndex: g.current.length - 1
379
388
  };
380
389
  e.dataItems.forEach((d) => {
381
- const f = J(t.gridProps.dataItemKey)(d);
382
- o[f] = e.cell ? [...Array(g.current.length).keys()] : !0;
383
- }), N(a, o);
390
+ const s = J(t.gridProps.dataItemKey)(d);
391
+ o[s] = e.cell ? [...Array(g.current.length).keys()] : !0;
392
+ }), O(a, o);
384
393
  }
385
- }, at = (e) => {
386
- if (t.gridProps.onSelectionChange && I.enabled) {
394
+ }, it = (e) => {
395
+ if (t.gridProps.onSelectionChange && b.enabled) {
387
396
  const n = J(t.gridProps.dataItemKey)(e.dataItem), o = 0, a = g.current.length - 1, d = e.dataItems.findIndex(
388
397
  (R) => R[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
389
398
  ), m = {
@@ -394,11 +403,11 @@ const sr = i.createContext(void 0), wr = (t) => {
394
403
  endRowIndex: d,
395
404
  startColIndex: o,
396
405
  endColIndex: a
397
- }, s = e.mode === "multiple" ? t.gridProps.select || {} : {};
398
- s[n] === !0 || Array.isArray(s[n]) && s[n].length === g.current.length ? delete s[n] : s[n] = e.cell ? [...Array(g.current.length).keys()] : !0, N(m, s);
406
+ }, f = e.mode === "multiple" ? t.gridProps.select || {} : {};
407
+ f[n] === !0 || Array.isArray(f[n]) && f[n].length === g.current.length ? delete f[n] : f[n] = e.cell ? [...Array(g.current.length).keys()] : !0, O(m, f);
399
408
  }
400
- }, it = (e) => {
401
- t.gridProps.onSelectionChange && I.enabled && N(e, {});
409
+ }, dt = (e) => {
410
+ t.gridProps.onSelectionChange && b.enabled && O(e, {});
402
411
  }, M = (e, r, n, o, a) => {
403
412
  const d = t.gridProps.onDataStateChange;
404
413
  if (e) {
@@ -409,11 +418,11 @@ const sr = i.createContext(void 0), wr = (t) => {
409
418
  ...h(o),
410
419
  targetEvent: a || {},
411
420
  dataState: {
412
- ...It(),
421
+ ...Ct(),
413
422
  ...n
414
423
  }
415
424
  });
416
- }, O = (e, r, n) => {
425
+ }, B = (e, r, n) => {
417
426
  M(
418
427
  t.gridProps.onPageChange,
419
428
  { page: e },
@@ -421,19 +430,19 @@ const sr = i.createContext(void 0), wr = (t) => {
421
430
  r,
422
431
  n
423
432
  );
424
- }, dt = () => {
433
+ }, ct = () => {
425
434
  let e = t.gridProps.total || 0;
426
435
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
427
- }, ct = (e) => {
428
- var a, d;
429
- const r = (d = (a = t.gridProps.take) != null ? a : t.gridProps.pageSize) != null ? d : 0, n = (t.gridProps.skip || 0) + r, o = dt();
430
- n < o && O({ skip: n, take: r }, e);
431
436
  }, lt = (e) => {
437
+ var a, d;
438
+ const r = (d = (a = t.gridProps.take) != null ? a : t.gridProps.pageSize) != null ? d : 0, n = (t.gridProps.skip || 0) + r, o = ct();
439
+ n < o && B({ skip: n, take: r }, e);
440
+ }, st = (e) => {
432
441
  var o, a;
433
442
  const r = (a = (o = t.gridProps.take) != null ? o : t.gridProps.pageSize) != null ? a : 0, n = (t.gridProps.skip || 0) - r;
434
- n >= 0 && O({ skip: n, take: r }, e);
435
- }, st = (e) => {
436
- O({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
443
+ n >= 0 && B({ skip: n, take: r }, e);
444
+ }, ut = (e) => {
445
+ B({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
437
446
  }, Ie = (e, r) => {
438
447
  M(
439
448
  t.gridProps.onSortChange,
@@ -441,14 +450,14 @@ const sr = i.createContext(void 0), wr = (t) => {
441
450
  { sort: e, ...t.gridProps.scrollable === "virtual" ? { skip: 0 } : {} },
442
451
  r
443
452
  );
444
- }, ut = (e, r) => {
453
+ }, gt = (e, r) => {
445
454
  M(
446
455
  t.gridProps.onFilterChange,
447
456
  { filter: e },
448
457
  { filter: e || void 0, skip: 0 },
449
458
  r
450
459
  );
451
- }, gt = (e) => {
460
+ }, ft = (e) => {
452
461
  const r = t.gridProps.searchFields || g.current.map((a) => a.field) || [], n = e.nativeEvent.target.value, o = {
453
462
  logic: "or",
454
463
  filters: r.filter((a) => a !== void 0).map((a) => {
@@ -477,7 +486,7 @@ const sr = i.createContext(void 0), wr = (t) => {
477
486
  { group: e, skip: 0 },
478
487
  n
479
488
  );
480
- }, ft = (e) => {
489
+ }, mt = (e) => {
481
490
  if (t.gridProps.onColumnsStateChange) {
482
491
  const r = {
483
492
  target: C.current,
@@ -486,39 +495,39 @@ const sr = i.createContext(void 0), wr = (t) => {
486
495
  u(t.gridProps.onColumnsStateChange, r);
487
496
  }
488
497
  }, Z = (e, r, n) => {
489
- const o = g.current[e], a = o.depth, d = (s) => {
498
+ const o = g.current[e], a = o.depth, d = (f) => {
490
499
  do
491
- s++;
492
- while (s < g.current.length && g.current[s].depth > a);
493
- return s;
500
+ f++;
501
+ while (f < g.current.length && g.current[f].depth > a);
502
+ return f;
494
503
  }, l = g.current.splice(e, d(e) - e);
495
- g.current.splice(e < r ? d(r - l.length) : r, 0, ...l), g.current.filter((s) => s.declarationIndex >= 0).forEach((s, R) => s.orderIndex = R);
496
- const f = g.current[e].locked && g.current[r].locked;
497
- Yt(t.columnsMapRef, g.current, f || X.current), Qt(t.columnsMapRef, g.current, f || X.current), ne.current && (X.current = !1, ne.current = !1);
498
- const m = z();
504
+ g.current.splice(e < r ? d(r - l.length) : r, 0, ...l), g.current.filter((f) => f.declarationIndex >= 0).forEach((f, R) => f.orderIndex = R);
505
+ const s = g.current[e].locked && g.current[r].locked;
506
+ Qt(t.columnsMapRef, g.current, s || X.current), Zt(t.columnsMapRef, g.current, s || X.current), ne.current && (X.current = !1, ne.current = !1);
507
+ const m = N();
499
508
  if (te(), t.gridProps.onColumnReorder) {
500
- const s = {
509
+ const f = {
501
510
  target: C.current,
502
511
  columns: m,
503
512
  columnId: o.id,
504
513
  nativeEvent: n
505
514
  };
506
- u(t.gridProps.onColumnReorder, s);
515
+ u(t.gridProps.onColumnReorder, f);
507
516
  }
508
517
  }, A = (e, r, n) => {
509
518
  const o = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
510
- if (n === "forbidden" || !o || !G.current)
519
+ if (n === "forbidden" || !o || !z.current)
511
520
  return;
512
521
  const { slicedData: a, dataRef: d } = t, l = (a || d)[r];
513
522
  t.gridProps.onRowReorder && u(t.gridProps.onRowReorder, {
514
- draggedDataItems: [G.current],
523
+ draggedDataItems: [z.current],
515
524
  droppedDataItem: l == null ? void 0 : l.dataItem,
516
525
  dropPosition: n,
517
526
  nativeEvent: e.originalEvent,
518
527
  dragEvent: e,
519
528
  target: C.current
520
- }), G.current = null;
521
- }, mt = (e, r, n) => {
529
+ }), z.current = null;
530
+ }, Pt = (e, r, n) => {
522
531
  if (t.gridProps.group === void 0)
523
532
  return;
524
533
  const o = t.gridProps.group.slice();
@@ -529,7 +538,7 @@ const sr = i.createContext(void 0), wr = (t) => {
529
538
  return;
530
539
  const a = (t.gridProps.group || []).slice();
531
540
  a.splice(r, 0, { field: o }), Q(a, n);
532
- }, Pt = (e, r) => {
541
+ }, ht = (e, r) => {
533
542
  const n = S.current.getCurrentGroupsLength;
534
543
  Ce(e, n, r);
535
544
  }, p = () => {
@@ -543,11 +552,11 @@ const sr = i.createContext(void 0), wr = (t) => {
543
552
  return;
544
553
  e += parseFloat(o.toString());
545
554
  }
546
- e = Math.round(e), L.current && L.current.setWidth(e), F.current && F.current.setWidth(e), x.current && (x.current.style.width = e + "px");
547
- }, B = i.useCallback(
555
+ e = Math.round(e), G.current && G.current.setWidth(e), L.current && L.current.setWidth(e), x.current && (x.current.style.width = e + "px");
556
+ }, U = i.useCallback(
548
557
  (e, r, n, o, a) => {
549
558
  var m;
550
- if (!ht() && !n || !e)
559
+ if (!bt() && !n || !e)
551
560
  return;
552
561
  const d = {
553
562
  type: e,
@@ -558,15 +567,15 @@ const sr = i.createContext(void 0), wr = (t) => {
558
567
  field: a,
559
568
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
560
569
  ...n
561
- }, l = V(), f = zt({
570
+ }, l = V(), s = Nt({
562
571
  event: d,
563
572
  data: l,
564
573
  selectedState: (m = t.gridProps.select) != null ? m : {},
565
574
  previousCopiedItems: Ee.current
566
575
  });
567
- e !== ge.paste && (Ee.current = f.copiedItems), t.gridProps.onClipboard && E && u(t.gridProps.onClipboard, {
576
+ e !== ge.paste && (Ee.current = s.copiedItems), t.gridProps.onClipboard && E && u(t.gridProps.onClipboard, {
568
577
  ...d,
569
- ...f
578
+ ...s
570
579
  });
571
580
  },
572
581
  [
@@ -576,15 +585,15 @@ const sr = i.createContext(void 0), wr = (t) => {
576
585
  t.gridProps.clipboard,
577
586
  t.gridProps.onClipboard
578
587
  ]
579
- ), ht = () => {
588
+ ), bt = () => {
580
589
  var a, d, l;
581
590
  if (!$)
582
591
  return !1;
583
- const e = Lt(v()), r = e ? e.matches(".k-table-td") ? e : (a = v()) == null ? void 0 : a.body : (d = v()) == null ? void 0 : d.body, n = r.closest(".k-grid-container"), o = r && ((l = K.current) == null ? void 0 : l.contains(r));
592
+ const e = Gt(v()), r = e ? e.matches(".k-table-td") ? e : (a = v()) == null ? void 0 : a.body : (d = v()) == null ? void 0 : d.body, n = r.closest(".k-grid-container"), o = r && ((l = K.current) == null ? void 0 : l.contains(r));
584
593
  return !!(r && o && n);
585
- }, bt = (e, r, n, o, a, d) => {
594
+ }, It = (e, r, n, o, a, d) => {
586
595
  p(), X.current = !0, ne.current = !0, t.gridProps.onColumnResize && E && u(t.gridProps.onColumnResize, {
587
- columns: z(),
596
+ columns: N(),
588
597
  nativeEvent: o,
589
598
  targetColumnId: d,
590
599
  index: e,
@@ -593,7 +602,7 @@ const sr = i.createContext(void 0), wr = (t) => {
593
602
  end: a,
594
603
  target: C.current
595
604
  });
596
- }, It = () => {
605
+ }, Ct = () => {
597
606
  var e;
598
607
  return {
599
608
  filter: t.gridProps.filter,
@@ -606,7 +615,7 @@ const sr = i.createContext(void 0), wr = (t) => {
606
615
  nativeEvent: e && e.nativeEvent,
607
616
  syntheticEvent: e,
608
617
  target: C.current
609
- }), Ct = (e) => ({
618
+ }), Rt = (e) => ({
610
619
  ...e,
611
620
  nativeEvent: void 0,
612
621
  syntheticEvent: void 0,
@@ -618,17 +627,17 @@ const sr = i.createContext(void 0), wr = (t) => {
618
627
  e(r);
619
628
  return;
620
629
  }
621
- e(Ct(r));
622
- }, Rt = () => {
630
+ e(Rt(r));
631
+ }, vt = () => {
623
632
  var e, r, n;
624
- if (H.current && ((e = H.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
633
+ if (F.current && ((e = F.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
625
634
  ie.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? ae.current = document.activeElement : ae.current = void 0;
626
- const o = Array.from((n = H.current) == null ? void 0 : n.getElementsByClassName("k-grid-edit-row"));
635
+ const o = Array.from((n = F.current) == null ? void 0 : n.getElementsByClassName("k-grid-edit-row"));
627
636
  o.length > se.current.length ? q.current = o.filter(
628
637
  (a) => !se.current.includes(a)
629
638
  )[0] : o.length === 1 && (q.current = o[0], ie.current = !0), se.current = o;
630
639
  }
631
- }, U = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), V = () => (t.slicedData || t.dataRef).filter((e) => e.rowType === "data").map((e) => e.dataItem), v = () => {
640
+ }, H = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), V = () => (t.slicedData || t.dataRef).filter((e) => e.rowType === "data").map((e) => e.dataItem), v = () => {
632
641
  var e;
633
642
  if ($)
634
643
  return ((e = _()) == null ? void 0 : e.ownerDocument) || document;
@@ -650,33 +659,33 @@ const sr = i.createContext(void 0), wr = (t) => {
650
659
  }
651
660
  },
652
661
  [t.gridProps.scrollable]
653
- ), Re = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), vt = () => Re(Tt) === Re(g.current), Et = () => {
654
- vt() || te();
655
- }, wt = () => {
662
+ ), Re = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), Et = () => Re(Mt) === Re(g.current), wt = () => {
663
+ Et() || te();
664
+ }, yt = () => {
656
665
  const { data: e, total: r } = t.gridProps;
657
666
  return Array.isArray(e) ? e.length === r : e ? r === e.total : !1;
658
- }, yt = (e, r) => {
667
+ }, xt = (e, r) => {
659
668
  var n, o;
660
669
  if (c.current) {
661
- if (c.current.fixedScroll = t.gridProps.fixedScroll || !1, c.current.PageChange = O, c.current.realSkip = t.gridProps.skip || 0, c.current.pageSize = (o = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? o : 0, c.current.scrollableVirtual = t.gridProps.scrollable === "virtual", c.current.total = e, c.current.propsSkip = (t.gridProps.skip || 0) + (t.gridProps.scrollable === "virtual" ? c.current.topCacheCount + (c.current.attendedSkip - (t.gridProps.skip || 0)) : 0), t.gridProps.rowHeight !== void 0 && t.gridProps.rowHeight > 0 && !r) {
670
+ if (c.current.fixedScroll = t.gridProps.fixedScroll || !1, c.current.PageChange = B, c.current.realSkip = t.gridProps.skip || 0, c.current.pageSize = (o = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? o : 0, c.current.scrollableVirtual = t.gridProps.scrollable === "virtual", c.current.total = e, c.current.propsSkip = (t.gridProps.skip || 0) + (t.gridProps.scrollable === "virtual" ? c.current.topCacheCount + (c.current.attendedSkip - (t.gridProps.skip || 0)) : 0), t.gridProps.rowHeight !== void 0 && t.gridProps.rowHeight > 0 && !r) {
662
671
  const a = t.gridProps.rowHeight * e;
663
672
  c.current.containerHeight = ze ? Math.min(Ne, a) : a;
664
673
  } else
665
674
  c.current.containerHeight = 1533915;
666
- if (c.current.containerRef = j, c.current.tableBodyRef = H, c.current.table = x.current, c.current instanceof Oe) {
675
+ if (c.current.containerRef = j, c.current.tableBodyRef = F, c.current.table = x.current, c.current instanceof Oe) {
667
676
  const { rowHeight: a = 0, detail: d, expandField: l } = t.gridProps;
668
- let { detailRowHeight: f = 0 } = t.gridProps;
669
- f = d && l ? f : a, wt() ? (c.current.total = t.dataRef.length, c.current.rowHeightService = new He(
677
+ let { detailRowHeight: s = 0 } = t.gridProps;
678
+ s = d && l ? s : a, yt() ? (c.current.total = t.dataRef.length, c.current.rowHeightService = new He(
670
679
  t.dataRef.length,
671
680
  a,
672
- f,
681
+ s,
673
682
  t.dataRef
674
- )) : c.current.rowHeightService = new He(e, a, f);
683
+ )) : c.current.rowHeightService = new He(e, a, s);
675
684
  const m = c.current.rowHeightService.totalHeight();
676
685
  c.current.containerHeight = ze ? Math.min(Ne, m) : m;
677
686
  }
678
687
  }
679
- }, xt = () => {
688
+ }, St = () => {
680
689
  const e = (n) => n.map((o) => ({
681
690
  id: o.id,
682
691
  field: o.field,
@@ -695,7 +704,7 @@ const sr = i.createContext(void 0), wr = (t) => {
695
704
  [ee]
696
705
  ), te = () => {
697
706
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
698
- }, St = (e) => e.left !== void 0 ? we !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, C = i.useRef(null), g = t.columnsRef, c = i.useRef(), w = i.useRef(), S = i.useRef(), y = i.useRef(), D = i.useRef(), W = i.useRef(), k = i.useRef(null), H = i.useRef(null), Dt = i.useRef(null), j = i.useRef(null), x = i.useRef(null), re = i.useRef(null), K = i.useRef(null), F = i.useRef(null), L = i.useRef(null), ne = i.useRef(!1), oe = i.useRef(!1), q = i.useRef(), ae = i.useRef(), ie = i.useRef(!1), X = i.useRef(!0), de = i.useRef(0), ce = i.useRef(), le = i.useRef(), se = i.useRef([]), Ee = i.useRef([]), G = i.useRef(null), kt = i.useRef(null), Kt = i.useRef(null), we = Gt(K), Tt = i.useMemo(() => i.Children.toArray(t.gridProps.children), [t.gridProps.children]), I = Y((Se = t.gridProps.selectable) != null ? Se : !!t.gridProps.selectedField), ye = Nt((De = t.gridProps.editable) != null ? De : !!t.gridProps.editField);
707
+ }, Dt = (e) => e.left !== void 0 ? we !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, C = i.useRef(null), g = t.columnsRef, c = i.useRef(), w = i.useRef(), S = i.useRef(), y = i.useRef(), D = i.useRef(), W = i.useRef(), k = i.useRef(null), F = i.useRef(null), kt = i.useRef(null), j = i.useRef(null), x = i.useRef(null), re = i.useRef(null), K = i.useRef(null), L = i.useRef(null), G = i.useRef(null), ne = i.useRef(!1), oe = i.useRef(!1), q = i.useRef(), ae = i.useRef(), ie = i.useRef(!1), X = i.useRef(!0), de = i.useRef(0), ce = i.useRef(), le = i.useRef(), se = i.useRef([]), Ee = i.useRef([]), z = i.useRef(null), Kt = i.useRef(null), Tt = i.useRef(null), we = zt(K), Mt = i.useMemo(() => i.Children.toArray(t.gridProps.children), [t.gridProps.children]), b = Y((Se = t.gridProps.selectable) != null ? Se : !!t.gridProps.selectedField), ye = Ot((De = t.gridProps.editable) != null ? De : !!t.gridProps.editField);
699
708
  i.useMemo(() => {
700
709
  T.onConstructor({
701
710
  navigatable: !!t.gridProps.navigatable,
@@ -706,7 +715,7 @@ const sr = i.createContext(void 0), wr = (t) => {
706
715
  }, []), i.useMemo(() => {
707
716
  var n;
708
717
  (n = c.current) == null || n.reset();
709
- const e = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, r = t.isFixedVirtualScroll ? Oe : ir;
718
+ const e = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, r = t.isFixedVirtualScroll ? Oe : dr;
710
719
  c.current = new r(e || t.gridProps.rowHeight === void 0 || t.gridProps.rowHeight === 0);
711
720
  }, [
712
721
  t.gridProps.scrollable,
@@ -716,9 +725,9 @@ const sr = i.createContext(void 0), wr = (t) => {
716
725
  t.gridProps.groupable,
717
726
  t.gridProps.sort,
718
727
  t.gridProps.rowHeight
719
- ]), i.useEffect(() => (t.gridProps.clipboard && (W.current = new Ot(B), W.current.addEventListeners(v())), () => {
728
+ ]), i.useEffect(() => (t.gridProps.clipboard && (W.current = new Bt(U), W.current.addEventListeners(v())), () => {
720
729
  W.current && W.current.removeEventListeners(v());
721
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, B, v]), i.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(er) && (re.current && (re.current.style.display = "block"), x.current && (x.current.style.display = "block")), p(), Ae(), T.onComponentDidMount({
730
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard, U, v]), i.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(tr) && (re.current && (re.current.style.display = "block"), x.current && (x.current.style.display = "block")), p(), Ae(), T.onComponentDidMount({
722
731
  scope: K.current || void 0,
723
732
  contextStateRef: y,
724
733
  navigationStateRef: D
@@ -726,7 +735,7 @@ const sr = i.createContext(void 0), wr = (t) => {
726
735
  clearTimeout(ce.current);
727
736
  }), []), i.useEffect(() => {
728
737
  var e;
729
- p(), Ae(), (e = c.current) != null && e.tableTransform && c.current.table && (c.current.table.style.transform = c.current.tableTransform, c.current.tableTransform = ""), Rt(), T.onComponentDidUpdate({
738
+ p(), Ae(), (e = c.current) != null && e.tableTransform && c.current.table && (c.current.table.style.transform = c.current.tableTransform, c.current.tableTransform = ""), vt(), T.onComponentDidUpdate({
730
739
  scope: K.current || void 0,
731
740
  contextStateRef: y,
732
741
  navigationStateRef: D,
@@ -747,7 +756,7 @@ const sr = i.createContext(void 0), wr = (t) => {
747
756
  }, [ve]), i.useEffect(() => {
748
757
  var r;
749
758
  let e;
750
- return $ && window.ResizeObserver && (e = new window.ResizeObserver(Et), e.observe((r = v()) == null ? void 0 : r.body)), () => {
759
+ return $ && window.ResizeObserver && (e = new window.ResizeObserver(wt), e.observe((r = v()) == null ? void 0 : r.body)), () => {
751
760
  e == null || e.disconnect();
752
761
  };
753
762
  }, []), i.useImperativeHandle(
@@ -758,7 +767,7 @@ const sr = i.createContext(void 0), wr = (t) => {
758
767
  },
759
768
  props: t.gridProps,
760
769
  get columns() {
761
- return z();
770
+ return N();
762
771
  },
763
772
  scrollIntoView: (e) => {
764
773
  var o;
@@ -778,9 +787,9 @@ const sr = i.createContext(void 0), wr = (t) => {
778
787
  }
779
788
  })
780
789
  ), i.useImperativeHandle(t.gridRef, () => C.current), i.useMemo(() => {
781
- w.current = new Zt(bt);
790
+ w.current = new pt(It);
782
791
  }, [t.gridProps.onColumnResize]), i.useMemo(() => {
783
- S.current = new pt(Z, mt, Ce);
792
+ S.current = new er(Z, Pt, Ce);
784
793
  }, [
785
794
  t.gridProps.onColumnReorder,
786
795
  t.gridProps.onGroupChange,
@@ -788,25 +797,25 @@ const sr = i.createContext(void 0), wr = (t) => {
788
797
  t.gridProps.groupable
789
798
  ]), w.current.resizable = t.gridProps.resizable || !1, w.current.columns = g.current;
790
799
  const xe = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1;
791
- S.current.reorderable = t.gridProps.reorderable || !1, S.current.groupable = xe, S.current.columns = g.current, yt(t.total, xe);
792
- const Mt = t.gridProps.columnsState || xt();
800
+ S.current.reorderable = t.gridProps.reorderable || !1, S.current.groupable = xe, S.current.columns = g.current, xt(t.total, xe);
801
+ const At = t.gridProps.columnsState || St();
793
802
  return /* @__PURE__ */ i.createElement(
794
- sr.Provider,
803
+ ur.Provider,
795
804
  {
796
805
  value: {
797
806
  isClient: E,
798
807
  rowReorder: A,
799
- activeDragRowDataItemRef: G,
800
- reorderRowDragTargetRef: kt,
801
- reorderRowDropTargetRef: Kt,
808
+ activeDragRowDataItemRef: z,
809
+ reorderRowDragTargetRef: Kt,
810
+ reorderRowDropTargetRef: Tt,
802
811
  dir: we,
803
- getCellPositionStyle: St,
812
+ getCellPositionStyle: Dt,
804
813
  dataItemKey: t.gridProps.dataItemKey,
805
- columnsState: Mt,
806
- onColumnsStateChange: ft,
814
+ columnsState: At,
815
+ onColumnsStateChange: mt,
807
816
  groupChange: Q,
808
- selectionRelease: nt,
809
- pagerPageChange: st,
817
+ selectionRelease: ot,
818
+ pagerPageChange: ut,
810
819
  onContextMenu: We,
811
820
  rowClick: Je,
812
821
  rowDblClick: Ye,
@@ -814,10 +823,10 @@ const sr = i.createContext(void 0), wr = (t) => {
814
823
  headerCellClick: be,
815
824
  itemChange: et,
816
825
  sortChange: Ie,
817
- filterChange: ut,
818
- searchChange: gt,
819
- onHeaderSelectionChange: rt,
820
- columnGroupChange: Pt,
826
+ filterChange: gt,
827
+ searchChange: ft,
828
+ onHeaderSelectionChange: nt,
829
+ columnGroupChange: ht,
821
830
  onKeyDown: qe,
822
831
  onFocus: Xe,
823
832
  scrollHandler: je,
@@ -828,25 +837,25 @@ const sr = i.createContext(void 0), wr = (t) => {
828
837
  dragLogicRef: S,
829
838
  navigationStateRef: D,
830
839
  tableElementRef: x,
831
- tableBodyElementRef: H,
832
- headerElementRef: Dt,
840
+ tableBodyElementRef: F,
841
+ headerElementRef: kt,
833
842
  containerElementRef: j,
834
843
  headTableElementRef: re,
835
844
  elementRef: K,
836
- footerRef: F,
837
- headerRef: L,
845
+ footerRef: L,
846
+ headerRef: G,
838
847
  vsRef: c
839
848
  }
840
849
  },
841
- /* @__PURE__ */ i.createElement(Bt.Provider, { value: y.current }, t.children),
850
+ /* @__PURE__ */ i.createElement(Ut.Provider, { value: y.current }, t.children),
842
851
  /* @__PURE__ */ i.createElement(
843
- dr,
852
+ cr,
844
853
  {
845
- show: b.show,
846
- dataItem: b.dataItem,
847
- field: b.field,
854
+ show: I.show,
855
+ dataItem: I.dataItem,
856
+ field: I.field,
848
857
  items: Ve,
849
- offset: b.offset,
858
+ offset: I.offset,
850
859
  onClose: me,
851
860
  onSelect: _e
852
861
  }
@@ -854,6 +863,6 @@ const sr = i.createContext(void 0), wr = (t) => {
854
863
  );
855
864
  };
856
865
  export {
857
- wr as GridClientWrapper,
858
- sr as GridContext
866
+ yr as GridClientWrapper,
867
+ ur as GridContext
859
868
  };