@progress/kendo-react-grid 9.4.1 → 9.4.2-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,21 +7,21 @@
7
7
  */
8
8
  "use client";
9
9
  import * as i from "react";
10
- import { canUseDOM as $, getActiveElement as zt, useDir as Nt, setScrollbarWidth as Fe, getter as J, getScrollbarWidth as Ot, RowHeightService as Le } from "@progress/kendo-react-common";
11
- import { getSelectionOptions as Y, populateClipboardData as Bt, ClipboardActionType as me, getEditableOptions as Ut, tableKeyboardNavigation as T, ClipboardService as Vt, TableKeyboardNavigationContext as Wt, getSelectedStateFromKeyDown as _t, closestTagName as Ge, getColumnIndex as jt, getRowIndex as qt, editReducer as Xt, EDIT_ACTION as $t, getDetailExpandableOptions as Jt, detailExpandReducer as ze, getGroupExpandableOptions as Yt, groupExpandReducer as Qt, DETAIL_EXPAND_ACTION as Zt, getSelectedState as Ne, updateLeft as pt, updateRight as er } from "@progress/kendo-react-data-tools";
12
- import { ColumnResize as tr } from "./drag/ColumnResize.mjs";
13
- import { CommonDragLogic as rr } from "./drag/CommonDragLogic.mjs";
14
- import { SAFARI_REGEX as nr } from "./constants/index.mjs";
15
- import { getDefaultHeadContextMenuItems as or, getDefaultBodyContextMenuItems as ar, isRowReorderEnabled as ir, sanitizeColumns as dr, getDataAsArray as cr, firefox as Oe, firefoxMaxHeight as Be } from "./utils/index.mjs";
16
- import { VirtualScrollFixed as Ue } from "./VirtualScrollFixed.mjs";
17
- import { VirtualScroll as lr } from "./VirtualScroll.mjs";
18
- import { GridContextMenu as sr } from "./contextMenu/GridContextMenu.mjs";
19
- import { GridContextMenuAnchorPart as Ve } from "./contextMenu/enums.mjs";
20
- import { normalize as ur, firstLevelSortSeqMap as gr } from "./sortCommon.mjs";
21
- const fr = i.createContext(void 0), Sr = (t) => {
22
- var ke, Ke;
23
- const E = t.gridProps.isClient, [b, Pe] = i.useState({}), We = (e) => {
24
- e.event.preventDefault(), Pe({
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";
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";
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) => {
22
+ var Se, De;
23
+ const E = t.gridProps.isClient, [b, fe] = i.useState({}), Ue = (e) => {
24
+ e.event.preventDefault(), fe({
25
25
  ...b,
26
26
  show: !0,
27
27
  offset: {
@@ -31,33 +31,33 @@ const fr = i.createContext(void 0), Sr = (t) => {
31
31
  dataItem: e.dataItem,
32
32
  field: e.field
33
33
  });
34
- }, he = () => {
35
- Pe({});
36
- }, P = i.useMemo(() => t.columnsRef.current.find((e) => e.field === b.field), [t.columnsRef, b]), be = i.useMemo(() => {
34
+ }, me = () => {
35
+ fe({});
36
+ }, P = i.useMemo(() => t.columnsRef.current.find((e) => e.field === b.field), [t.columnsRef, b]), Pe = i.useMemo(() => {
37
37
  const e = t.gridProps.sortable && (P == null ? void 0 : P.sortable);
38
- return or({
38
+ return tr({
39
39
  sortable: !!e,
40
40
  selectable: Y(t.gridProps.selectable).enabled,
41
41
  clipboard: !!t.gridProps.clipboard
42
42
  });
43
- }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ie = i.useMemo(() => {
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 ar({
45
+ return rr({
46
46
  sortable: !!e,
47
47
  selectable: Y(t.gridProps.selectable).enabled,
48
48
  clipboard: !!t.gridProps.clipboard,
49
- rowReorderable: ir(t.gridProps.rowReorderable)
49
+ rowReorderable: nr(t.gridProps.rowReorderable)
50
50
  });
51
- }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), _e = i.useMemo(() => {
51
+ }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ve = i.useMemo(() => {
52
52
  const e = (P == null ? void 0 : P.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(b) : e;
53
53
  if (r && b.offset) {
54
- const n = b.dataItem ? Ve.body : Ve.head, o = r[n], a = b.dataItem ? Ie : be;
54
+ const n = b.dataItem ? Be.body : Be.head, o = r[n], a = b.dataItem ? he : Pe;
55
55
  return o === !1 ? void 0 : o === !0 || o === void 0 ? a : o;
56
56
  }
57
- }, [t.gridProps.contextMenu, b, Ie, be, P]), je = (e) => {
58
- var l, f, m, s, C, Te, Me, Ae, He;
57
+ }, [t.gridProps.contextMenu, b, he, Pe, P]), _e = (e) => {
58
+ var l, f, m, s, R, ke, Ke, Te, Me;
59
59
  const r = e.event.item, n = {
60
- target: R.current,
60
+ target: C.current,
61
61
  syntheticEvent: e.event.syntheticEvent,
62
62
  nativeEvent: e.event.nativeEvent,
63
63
  menuItem: r,
@@ -80,32 +80,32 @@ const fr = i.createContext(void 0), Sr = (t) => {
80
80
  isDrag: !1,
81
81
  ...Y(t.gridProps.selectable),
82
82
  ...n
83
- }, d = o.findIndex((fe) => fe === e.dataItem);
83
+ }, d = o.findIndex((ue) => ue === e.dataItem);
84
84
  switch ((l = r.data) == null ? void 0 : l.action) {
85
85
  case "SortCommand":
86
86
  if (P) {
87
- const fe = (f = r.name) == null ? void 0 : f.toLowerCase().includes("asc"), Ft = ((m = r.name) == null ? void 0 : m.toLowerCase().includes("desc")) ? "desc" : void 0, Lt = fe ? "asc" : Ft, Gt = r.name ? Lt : void 0;
88
- Re(e.event.syntheticEvent, P, Gt);
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);
89
89
  }
90
90
  break;
91
91
  case "SelectRowCommand":
92
- dt(a);
92
+ at(a);
93
93
  break;
94
94
  case "SelectAllRowsCommand":
95
- it(a);
95
+ ot(a);
96
96
  break;
97
97
  case "ClearSelectionCommand":
98
- ct(a);
98
+ it(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"), (C = r.name) != null && C.toLowerCase().includes("rowdown") && d < o.length - 1 && A(e.event.syntheticEvent, d + 1, "after"), (Te = r.name) != null && Te.toLowerCase().includes("rowtop") && A(e.event.syntheticEvent, 0, "before"), (Me = r.name) != null && Me.toLowerCase().includes("rowbottom") && A(e.event.syntheticEvent, o.length - 1, "after");
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");
102
102
  break;
103
103
  case "CopySelectionCommand":
104
104
  B(
105
- me.copy,
105
+ ge.copy,
106
106
  e.event.nativeEvent,
107
107
  {
108
- copyHeaders: !((Ae = r.name) != null && Ae.toLowerCase().includes("noheaders"))
108
+ copyHeaders: !((Te = r.name) != null && Te.toLowerCase().includes("noheaders"))
109
109
  },
110
110
  e.dataItem,
111
111
  e.field
@@ -113,24 +113,24 @@ const fr = i.createContext(void 0), Sr = (t) => {
113
113
  break;
114
114
  case "PasteCommand":
115
115
  B(
116
- me.paste,
116
+ ge.paste,
117
117
  e.event.nativeEvent,
118
118
  {
119
- copyHeaders: !((He = r.name) != null && He.toLowerCase().includes("noheaders"))
119
+ copyHeaders: !((Me = r.name) != null && Me.toLowerCase().includes("noheaders"))
120
120
  },
121
121
  e.dataItem,
122
122
  e.field
123
123
  );
124
124
  break;
125
125
  }
126
- he();
126
+ me();
127
127
  }, z = () => {
128
128
  const e = g.current.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
129
- return dr(e);
130
- }, qe = (e, r, n) => {
129
+ return or(e);
130
+ }, We = (e, r, n) => {
131
131
  if (t.gridProps.onContextMenu && E) {
132
132
  const o = {
133
- target: R.current,
133
+ target: C.current,
134
134
  syntheticEvent: e,
135
135
  nativeEvent: e.nativeEvent,
136
136
  dataItem: r,
@@ -138,28 +138,28 @@ const fr = i.createContext(void 0), Sr = (t) => {
138
138
  };
139
139
  u(t.gridProps.onContextMenu, o);
140
140
  }
141
- t.gridProps.contextMenu && We({
141
+ t.gridProps.contextMenu && Ue({
142
142
  event: e,
143
143
  dataItem: r,
144
144
  field: n
145
145
  });
146
- }, Xe = (e) => {
146
+ }, je = (e) => {
147
147
  if (e.target !== e.currentTarget)
148
148
  return;
149
- clearTimeout(se.current), c.current && (c.current.table = x.current);
149
+ clearTimeout(ce.current), c.current && (c.current.table = x.current);
150
150
  const r = e.currentTarget.scrollLeft, n = e.currentTarget.scrollTop, o = t.gridProps.scrollable === "virtual";
151
- t.gridProps.columnVirtualization && (!o || n === le.current) && (se.current = window.setTimeout(() => {
152
- re();
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 !== le.current && c.current.scrollHandler(e), t.gridProps.onScroll && E && u(t.gridProps.onScroll, {
151
+ t.gridProps.columnVirtualization && (!o || n === de.current) && (ce.current = window.setTimeout(() => {
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, {
154
154
  ...h(e)
155
- }), le.current = n;
156
- }, $e = (e) => {
155
+ }), de.current = n;
156
+ }, qe = (e) => {
157
157
  var n, o;
158
158
  T.onKeyDown(e, {
159
159
  navigatable: t.gridProps.navigatable || !1,
160
160
  contextStateRef: y,
161
161
  navigationStateRef: D,
162
- onNavigationAction: Ye,
162
+ onNavigationAction: $e,
163
163
  columns: z()
164
164
  }), T.onGetSnapshotBeforeUpdate({
165
165
  document: v(),
@@ -175,24 +175,24 @@ const fr = i.createContext(void 0), Sr = (t) => {
175
175
  ...h(e)
176
176
  };
177
177
  if (t.gridProps.onKeyDown && E && u(t.gridProps.onKeyDown, r), !t.gridProps.selectedField && I.enabled && t.gridProps.dataItemKey) {
178
- const a = _t({
178
+ const a = Ut({
179
179
  event: r,
180
180
  selectedState: (n = t.gridProps.select) != null ? n : {},
181
181
  dataItemKey: t.gridProps.dataItemKey
182
182
  });
183
183
  if (a === t.gridProps.select)
184
184
  return;
185
- const d = e.target, l = Ge(d, "TD"), f = Ge(d, "TR"), m = jt(l), s = qt(f);
185
+ const d = e.target, l = Fe(d, "TD"), f = Fe(d, "TR"), m = Vt(l), s = _t(f);
186
186
  if (m !== void 0 && s !== void 0) {
187
- const C = (o = cr(t.gridProps.data)) == null ? void 0 : o[s];
187
+ const R = (o = ar(t.gridProps.data)) == null ? void 0 : o[s];
188
188
  t.gridProps.onSelectionChange && u(t.gridProps.onSelectionChange, {
189
189
  ...r,
190
190
  select: a,
191
- dataItem: C,
191
+ dataItem: R,
192
192
  startRowIndex: s,
193
193
  startColIndex: m,
194
- startDataItem: C,
195
- endDataItem: C,
194
+ startDataItem: R,
195
+ endDataItem: R,
196
196
  endRowIndex: s,
197
197
  endColIndex: m,
198
198
  ctrlKey: e.ctrlKey,
@@ -203,13 +203,13 @@ const fr = i.createContext(void 0), Sr = (t) => {
203
203
  });
204
204
  }
205
205
  }
206
- }, Je = (e) => {
206
+ }, Xe = (e) => {
207
207
  T.onFocus(e, {
208
208
  navigatable: !!t.gridProps.navigatable,
209
209
  contextStateRef: y
210
210
  });
211
- }, Ye = (e) => {
212
- if (e.action === "moveToNextPage" && st(e.event), e.action === "moveToPrevPage" && ut(e.event), e.focusElement && e.action === "reorderToRight") {
211
+ }, $e = (e) => {
212
+ if (e.action === "moveToNextPage" && ct(e.event), e.action === "moveToPrevPage" && lt(e.event), e.focusElement && e.action === "reorderToRight") {
213
213
  const r = parseInt(e.focusElement.ariaColIndex, 10) - 1;
214
214
  r < g.current.length - 1 && Z(r, r + 1, e.event);
215
215
  }
@@ -224,20 +224,20 @@ const fr = i.createContext(void 0), Sr = (t) => {
224
224
  };
225
225
  u(t.gridProps.onNavigationAction, r);
226
226
  }
227
- }, Qe = (e, r) => {
227
+ }, Je = (e, r) => {
228
228
  t.gridProps.onRowClick && e.target.nodeName === "TD" && u(t.gridProps.onRowClick, {
229
229
  dataItem: r,
230
230
  ...h(e)
231
231
  });
232
- }, Ze = (e, r) => {
232
+ }, Ye = (e, r) => {
233
233
  t.gridProps.onRowDoubleClick && e.target.nodeName === "TD" && u(t.gridProps.onRowDoubleClick, {
234
234
  dataItem: r,
235
235
  ...h(e)
236
236
  });
237
- }, pe = (e, r, n) => {
238
- if (Se.enabled && Se.mode === "incell" && t.gridProps.dataItemKey) {
239
- const o = Xt(t.gridProps.edit, {
240
- type: $t.ENTER_FIELD_EDIT,
237
+ }, Qe = (e, r, n) => {
238
+ if (ye.enabled && ye.mode === "incell" && t.gridProps.dataItemKey) {
239
+ const o = Wt(t.gridProps.edit, {
240
+ type: jt.ENTER_FIELD_EDIT,
241
241
  payload: { id: r[t.gridProps.dataItemKey], field: n }
242
242
  });
243
243
  t.gridProps.onEditChange && u(t.gridProps.onEditChange, {
@@ -245,36 +245,36 @@ const fr = i.createContext(void 0), Sr = (t) => {
245
245
  ...h(e)
246
246
  });
247
247
  }
248
- }, et = (e, r) => {
248
+ }, Ze = (e, r) => {
249
249
  var o;
250
- if (Jt(t.detailExpandable).enabled) {
251
- const a = ze((o = t.gridProps.detailExpand) != null ? o : {}, e);
250
+ if (qt(t.detailExpandable).enabled) {
251
+ const a = Le((o = t.gridProps.detailExpand) != null ? o : {}, e);
252
252
  t.gridProps.onDetailExpandChange && u(t.gridProps.onDetailExpandChange, {
253
253
  ...h(r),
254
254
  detailExpand: a
255
255
  });
256
256
  }
257
- }, tt = (e, r) => {
257
+ }, pe = (e, r) => {
258
258
  var o;
259
- const n = Yt(
259
+ const n = Xt(
260
260
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
261
261
  );
262
262
  if (n.enabled) {
263
- const a = Qt((o = t.gridProps.groupExpand) != null ? o : [], e, n);
263
+ const a = $t((o = t.gridProps.groupExpand) != null ? o : [], e, n);
264
264
  t.gridProps.onGroupExpandChange && u(t.gridProps.onGroupExpandChange, {
265
265
  ...h(r),
266
266
  groupExpand: a
267
267
  });
268
268
  }
269
- }, Re = (e, r, n) => {
270
- const { allowUnsort: o, mode: a } = ur(t.gridProps.sortable || !1, r.sortable || !1), d = (t.gridProps.sort || []).filter((m) => m.field === r.field)[0], l = n || gr[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 }), Ce(f, e);
272
- }, rt = (e) => {
269
+ }, 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);
272
+ }, et = (e) => {
273
273
  var r;
274
274
  if (e.field === t.gridProps.expandField || e._expand || t.gridProps.group && e.field === void 0) {
275
275
  if (t.gridProps.onExpandChange) {
276
- const n = t.gridProps.dataItemKey ? ze((r = t.gridProps.detailExpand) != null ? r : {}, {
277
- type: Zt.SET,
276
+ const n = t.gridProps.dataItemKey ? Le((r = t.gridProps.detailExpand) != null ? r : {}, {
277
+ type: Jt.SET,
278
278
  id: e.dataItem[t.gridProps.dataItemKey],
279
279
  payload: e.value
280
280
  }) : t.gridProps.detailExpand;
@@ -295,7 +295,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
295
295
  field: e.field,
296
296
  value: e.value
297
297
  });
298
- }, nt = (e) => {
298
+ }, tt = (e) => {
299
299
  var r;
300
300
  if (t.gridProps.onSelectionChange && I.enabled) {
301
301
  const { event: n, dataItem: o, dataIndex: a, columnIndex: d } = e, l = {
@@ -318,14 +318,14 @@ const fr = i.createContext(void 0), Sr = (t) => {
318
318
  };
319
319
  u(t.gridProps.onSelectionChange, {
320
320
  ...l,
321
- select: t.gridProps.dataItemKey ? Ne({
321
+ select: t.gridProps.dataItemKey ? Ge({
322
322
  event: l,
323
323
  selectedState: (r = t.gridProps.select) != null ? r : {},
324
324
  dataItemKey: t.gridProps.dataItemKey
325
325
  }) : {}
326
326
  });
327
327
  }
328
- }, ot = (e) => {
328
+ }, rt = (e) => {
329
329
  var r;
330
330
  if (t.gridProps.onHeaderSelectionChange && I.enabled) {
331
331
  const n = U();
@@ -334,7 +334,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
334
334
  field: e.field,
335
335
  nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
336
336
  syntheticEvent: e.syntheticEvent,
337
- target: R.current,
337
+ target: C.current,
338
338
  dataItems: n,
339
339
  selectedField: (r = t.gridProps.selectedField) != null ? r : ""
340
340
  });
@@ -344,12 +344,12 @@ const fr = i.createContext(void 0), Sr = (t) => {
344
344
  ...e,
345
345
  select: r
346
346
  });
347
- }, at = (e) => {
347
+ }, nt = (e) => {
348
348
  var r;
349
349
  if (t.gridProps.onSelectionChange && I.enabled) {
350
350
  const n = V()[e.startRowIndex], o = V()[e.endRowIndex], a = {
351
351
  syntheticEvent: void 0,
352
- target: R.current,
352
+ target: C.current,
353
353
  selectedField: t.gridProps.selectedField || "",
354
354
  componentId: t.id,
355
355
  dataItems: U(),
@@ -357,7 +357,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
357
357
  startDataItem: n,
358
358
  endDataItem: o,
359
359
  ...e
360
- }, d = Ne({
360
+ }, d = Ge({
361
361
  event: a,
362
362
  selectedState: (r = t.gridProps.select) != null ? r : {},
363
363
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
@@ -366,7 +366,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
366
366
  });
367
367
  N(a, d);
368
368
  }
369
- }, it = (e) => {
369
+ }, ot = (e) => {
370
370
  if (t.gridProps.onSelectionChange && I.enabled) {
371
371
  const r = e.dataItems[0], n = e.dataItems[e.dataItems.length - 1], o = {}, a = {
372
372
  ...e,
@@ -382,10 +382,10 @@ const fr = i.createContext(void 0), Sr = (t) => {
382
382
  o[f] = e.cell ? [...Array(g.current.length).keys()] : !0;
383
383
  }), N(a, o);
384
384
  }
385
- }, dt = (e) => {
385
+ }, at = (e) => {
386
386
  if (t.gridProps.onSelectionChange && I.enabled) {
387
387
  const n = J(t.gridProps.dataItemKey)(e.dataItem), o = 0, a = g.current.length - 1, d = e.dataItems.findIndex(
388
- (C) => C[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
388
+ (R) => R[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
389
389
  ), m = {
390
390
  ...e,
391
391
  startDataItem: d,
@@ -397,7 +397,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
397
397
  }, s = e.mode === "multiple" ? t.gridProps.select || {} : {};
398
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);
399
399
  }
400
- }, ct = (e) => {
400
+ }, it = (e) => {
401
401
  t.gridProps.onSelectionChange && I.enabled && N(e, {});
402
402
  }, M = (e, r, n, o, a) => {
403
403
  const d = t.gridProps.onDataStateChange;
@@ -409,7 +409,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
409
409
  ...h(o),
410
410
  targetEvent: a || {},
411
411
  dataState: {
412
- ...Ct(),
412
+ ...It(),
413
413
  ...n
414
414
  }
415
415
  });
@@ -421,34 +421,34 @@ const fr = i.createContext(void 0), Sr = (t) => {
421
421
  r,
422
422
  n
423
423
  );
424
- }, lt = () => {
424
+ }, dt = () => {
425
425
  let e = t.gridProps.total || 0;
426
426
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
427
- }, st = (e) => {
427
+ }, ct = (e) => {
428
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 = lt();
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
430
  n < o && O({ skip: n, take: r }, e);
431
- }, ut = (e) => {
431
+ }, lt = (e) => {
432
432
  var o, a;
433
433
  const r = (a = (o = t.gridProps.take) != null ? o : t.gridProps.pageSize) != null ? a : 0, n = (t.gridProps.skip || 0) - r;
434
434
  n >= 0 && O({ skip: n, take: r }, e);
435
- }, gt = (e) => {
435
+ }, st = (e) => {
436
436
  O({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
437
- }, Ce = (e, r) => {
437
+ }, Ie = (e, r) => {
438
438
  M(
439
439
  t.gridProps.onSortChange,
440
440
  { sort: e },
441
441
  { sort: e, ...t.gridProps.scrollable === "virtual" ? { skip: 0 } : {} },
442
442
  r
443
443
  );
444
- }, ft = (e, r) => {
444
+ }, ut = (e, r) => {
445
445
  M(
446
446
  t.gridProps.onFilterChange,
447
447
  { filter: e },
448
448
  { filter: e || void 0, skip: 0 },
449
449
  r
450
450
  );
451
- }, mt = (e) => {
451
+ }, gt = (e) => {
452
452
  const r = t.gridProps.searchFields || g.current.map((a) => a.field) || [], n = e.nativeEvent.target.value, o = {
453
453
  logic: "or",
454
454
  filters: r.filter((a) => a !== void 0).map((a) => {
@@ -471,16 +471,16 @@ const fr = i.createContext(void 0), Sr = (t) => {
471
471
  );
472
472
  }, Q = (e, r) => {
473
473
  const n = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
474
- e.length === 0 && t.gridProps.navigatable && (ie.current = !0), M(
474
+ e.length === 0 && t.gridProps.navigatable && (oe.current = !0), M(
475
475
  t.gridProps.onGroupChange,
476
476
  { group: e },
477
477
  { group: e, skip: 0 },
478
478
  n
479
479
  );
480
- }, Pt = (e) => {
480
+ }, ft = (e) => {
481
481
  if (t.gridProps.onColumnsStateChange) {
482
482
  const r = {
483
- target: R.current,
483
+ target: C.current,
484
484
  columnsState: e
485
485
  };
486
486
  u(t.gridProps.onColumnsStateChange, r);
@@ -492,13 +492,13 @@ const fr = i.createContext(void 0), Sr = (t) => {
492
492
  while (s < g.current.length && g.current[s].depth > a);
493
493
  return s;
494
494
  }, 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, C) => s.orderIndex = C);
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
496
  const f = g.current[e].locked && g.current[r].locked;
497
- pt(t.columnsMapRef, g.current, f || X.current), er(t.columnsMapRef, g.current, f || X.current), ae.current && (X.current = !1, ae.current = !1);
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
498
  const m = z();
499
- if (re(), t.gridProps.onColumnReorder) {
499
+ if (te(), t.gridProps.onColumnReorder) {
500
500
  const s = {
501
- target: R.current,
501
+ target: C.current,
502
502
  columns: m,
503
503
  columnId: o.id,
504
504
  nativeEvent: n
@@ -516,22 +516,22 @@ const fr = i.createContext(void 0), Sr = (t) => {
516
516
  dropPosition: n,
517
517
  nativeEvent: e.originalEvent,
518
518
  dragEvent: e,
519
- target: R.current
519
+ target: C.current
520
520
  }), G.current = null;
521
- }, ht = (e, r, n) => {
521
+ }, mt = (e, r, n) => {
522
522
  if (t.gridProps.group === void 0)
523
523
  return;
524
524
  const o = t.gridProps.group.slice();
525
525
  o.splice(r, 0, ...o.splice(e, 1)), Q(o, n);
526
- }, ve = (e, r, n) => {
526
+ }, Ce = (e, r, n) => {
527
527
  const o = g.current[e].field;
528
528
  if (!o)
529
529
  return;
530
530
  const a = (t.gridProps.group || []).slice();
531
531
  a.splice(r, 0, { field: o }), Q(a, n);
532
- }, bt = (e, r) => {
532
+ }, Pt = (e, r) => {
533
533
  const n = S.current.getCurrentGroupsLength;
534
- ve(e, n, r);
534
+ Ce(e, n, r);
535
535
  }, p = () => {
536
536
  let e = 0;
537
537
  if (!w.current.colGroupMain)
@@ -547,7 +547,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
547
547
  }, B = i.useCallback(
548
548
  (e, r, n, o, a) => {
549
549
  var m;
550
- if (!It() && !n || !e)
550
+ if (!ht() && !n || !e)
551
551
  return;
552
552
  const d = {
553
553
  type: e,
@@ -558,13 +558,13 @@ const fr = i.createContext(void 0), Sr = (t) => {
558
558
  field: a,
559
559
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
560
560
  ...n
561
- }, l = V(), f = Bt({
561
+ }, l = V(), f = zt({
562
562
  event: d,
563
563
  data: l,
564
564
  selectedState: (m = t.gridProps.select) != null ? m : {},
565
- previousCopiedItems: ye.current
565
+ previousCopiedItems: Ee.current
566
566
  });
567
- e !== me.paste && (ye.current = f.copiedItems), t.gridProps.onClipboard && E && u(t.gridProps.onClipboard, {
567
+ e !== ge.paste && (Ee.current = f.copiedItems), t.gridProps.onClipboard && E && u(t.gridProps.onClipboard, {
568
568
  ...d,
569
569
  ...f
570
570
  });
@@ -576,14 +576,14 @@ const fr = i.createContext(void 0), Sr = (t) => {
576
576
  t.gridProps.clipboard,
577
577
  t.gridProps.onClipboard
578
578
  ]
579
- ), It = () => {
579
+ ), ht = () => {
580
580
  var a, d, l;
581
581
  if (!$)
582
582
  return !1;
583
- const e = zt(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));
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));
584
584
  return !!(r && o && n);
585
- }, Rt = (e, r, n, o, a, d) => {
586
- p(), X.current = !0, ae.current = !0, t.gridProps.onColumnResize && E && u(t.gridProps.onColumnResize, {
585
+ }, bt = (e, r, n, o, a, d) => {
586
+ p(), X.current = !0, ne.current = !0, t.gridProps.onColumnResize && E && u(t.gridProps.onColumnResize, {
587
587
  columns: z(),
588
588
  nativeEvent: o,
589
589
  targetColumnId: d,
@@ -591,9 +591,9 @@ const fr = i.createContext(void 0), Sr = (t) => {
591
591
  newWidth: r,
592
592
  oldWidth: n,
593
593
  end: a,
594
- target: R.current
594
+ target: C.current
595
595
  });
596
- }, Ct = () => {
596
+ }, It = () => {
597
597
  var e;
598
598
  return {
599
599
  filter: t.gridProps.filter,
@@ -605,8 +605,8 @@ const fr = i.createContext(void 0), Sr = (t) => {
605
605
  }, h = (e) => ({
606
606
  nativeEvent: e && e.nativeEvent,
607
607
  syntheticEvent: e,
608
- target: R.current
609
- }), vt = (e) => ({
608
+ target: C.current
609
+ }), Ct = (e) => ({
610
610
  ...e,
611
611
  nativeEvent: void 0,
612
612
  syntheticEvent: void 0,
@@ -618,27 +618,27 @@ const fr = i.createContext(void 0), Sr = (t) => {
618
618
  e(r);
619
619
  return;
620
620
  }
621
- e(vt(r));
622
- }, Et = () => {
621
+ e(Ct(r));
622
+ }, Rt = () => {
623
623
  var e, r, n;
624
624
  if (H.current && ((e = H.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
625
- ce.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? de.current = document.activeElement : de.current = void 0;
625
+ ie.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? ae.current = document.activeElement : ae.current = void 0;
626
626
  const o = Array.from((n = H.current) == null ? void 0 : n.getElementsByClassName("k-grid-edit-row"));
627
- o.length > ge.current.length ? q.current = o.filter(
628
- (a) => !ge.current.includes(a)
629
- )[0] : o.length === 1 && (q.current = o[0], ce.current = !0), ge.current = o;
627
+ o.length > se.current.length ? q.current = o.filter(
628
+ (a) => !se.current.includes(a)
629
+ )[0] : o.length === 1 && (q.current = o[0], ie.current = !0), se.current = o;
630
630
  }
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), ee = () => (oe.current || (oe.current = Ot() || void 0), oe.current), v = () => {
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 = () => {
632
632
  var e;
633
633
  if ($)
634
- return ((e = W()) == null ? void 0 : e.ownerDocument) || document;
635
- }, W = () => K.current, te = i.useCallback(
634
+ return ((e = _()) == null ? void 0 : e.ownerDocument) || document;
635
+ }, _ = () => K.current, ee = i.useCallback(
636
636
  (e) => {
637
637
  var o;
638
638
  if (!c.current || !((o = c.current) != null && o.container) || t.gridProps.scrollable === "none")
639
639
  return;
640
640
  k.current && k.current.disconnect();
641
- const { rowIndex: r } = e, n = W();
641
+ const { rowIndex: r } = e, n = _();
642
642
  if (t.gridProps.scrollable === "virtual")
643
643
  c.current.askedSkip = r, c.current.container.scroll(
644
644
  0,
@@ -650,33 +650,33 @@ const fr = i.createContext(void 0), Sr = (t) => {
650
650
  }
651
651
  },
652
652
  [t.gridProps.scrollable]
653
- ), Ee = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), wt = () => Ee(At) === Ee(g.current), yt = () => {
654
- wt() || re();
655
- }, xt = () => {
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 = () => {
656
656
  const { data: e, total: r } = t.gridProps;
657
657
  return Array.isArray(e) ? e.length === r : e ? r === e.total : !1;
658
- }, St = (e, r) => {
658
+ }, yt = (e, r) => {
659
659
  var n, o;
660
660
  if (c.current) {
661
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) {
662
662
  const a = t.gridProps.rowHeight * e;
663
- c.current.containerHeight = Oe ? Math.min(Be, a) : a;
663
+ c.current.containerHeight = ze ? Math.min(Ne, a) : a;
664
664
  } else
665
665
  c.current.containerHeight = 1533915;
666
- if (c.current.containerRef = j, c.current.tableBodyRef = H, c.current.table = x.current, c.current instanceof Ue) {
666
+ if (c.current.containerRef = j, c.current.tableBodyRef = H, c.current.table = x.current, c.current instanceof Oe) {
667
667
  const { rowHeight: a = 0, detail: d, expandField: l } = t.gridProps;
668
668
  let { detailRowHeight: f = 0 } = t.gridProps;
669
- f = d && l ? f : a, xt() ? (c.current.total = t.dataRef.length, c.current.rowHeightService = new Le(
669
+ f = d && l ? f : a, wt() ? (c.current.total = t.dataRef.length, c.current.rowHeightService = new He(
670
670
  t.dataRef.length,
671
671
  a,
672
672
  f,
673
673
  t.dataRef
674
- )) : c.current.rowHeightService = new Le(e, a, f);
674
+ )) : c.current.rowHeightService = new He(e, a, f);
675
675
  const m = c.current.rowHeightService.totalHeight();
676
- c.current.containerHeight = Oe ? Math.min(Be, m) : m;
676
+ c.current.containerHeight = ze ? Math.min(Ne, m) : m;
677
677
  }
678
678
  }
679
- }, Dt = () => {
679
+ }, xt = () => {
680
680
  const e = (n) => n.map((o) => ({
681
681
  id: o.id,
682
682
  field: o.field,
@@ -685,17 +685,17 @@ const fr = i.createContext(void 0), Sr = (t) => {
685
685
  children: o.children ? e(o.children) : null
686
686
  })), r = t.columnsRef.current.filter((n) => n.depth === 0);
687
687
  return e(r);
688
- }, we = i.useCallback(
688
+ }, ve = i.useCallback(
689
689
  (e) => {
690
- const r = { rowIndex: ue.current };
690
+ const r = { rowIndex: le.current };
691
691
  e.forEach((n) => {
692
- n.isIntersecting || te(r);
692
+ n.isIntersecting || ee(r);
693
693
  });
694
694
  },
695
- [te]
696
- ), re = () => {
695
+ [ee]
696
+ ), te = () => {
697
697
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
698
- }, kt = (e) => e.left !== void 0 ? xe !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, R = i.useRef(null), g = t.columnsRef, c = i.useRef(), w = i.useRef(), S = i.useRef(), y = i.useRef(), D = i.useRef(), _ = i.useRef(), k = i.useRef(null), H = i.useRef(null), Kt = i.useRef(null), j = i.useRef(null), x = i.useRef(null), ne = i.useRef(null), K = i.useRef(null), F = i.useRef(null), L = i.useRef(null), oe = i.useRef(), ae = i.useRef(!1), ie = i.useRef(!1), q = i.useRef(), de = i.useRef(), ce = i.useRef(!1), X = i.useRef(!0), le = i.useRef(0), se = i.useRef(), ue = i.useRef(), ge = i.useRef([]), ye = i.useRef([]), G = i.useRef(null), Tt = i.useRef(null), Mt = i.useRef(null), xe = Nt(K), At = i.useMemo(() => i.Children.toArray(t.gridProps.children), [t.gridProps.children]), I = Y((ke = t.gridProps.selectable) != null ? ke : !!t.gridProps.selectedField), Se = Ut((Ke = t.gridProps.editable) != null ? Ke : !!t.gridProps.editField);
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);
699
699
  i.useMemo(() => {
700
700
  T.onConstructor({
701
701
  navigatable: !!t.gridProps.navigatable,
@@ -706,7 +706,7 @@ const fr = i.createContext(void 0), Sr = (t) => {
706
706
  }, []), i.useMemo(() => {
707
707
  var n;
708
708
  (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 ? Ue : lr;
709
+ const e = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, r = t.isFixedVirtualScroll ? Oe : ir;
710
710
  c.current = new r(e || t.gridProps.rowHeight === void 0 || t.gridProps.rowHeight === 0);
711
711
  }, [
712
712
  t.gridProps.scrollable,
@@ -716,45 +716,45 @@ const fr = i.createContext(void 0), Sr = (t) => {
716
716
  t.gridProps.groupable,
717
717
  t.gridProps.sort,
718
718
  t.gridProps.rowHeight
719
- ]), i.useEffect(() => (t.gridProps.clipboard && (_.current = new Vt(B), _.current.addEventListeners(v())), () => {
720
- _.current && _.current.removeEventListeners(v());
721
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, B, v]), i.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(nr) && (ne.current && (ne.current.style.display = "block"), x.current && (x.current.style.display = "block")), p(), Fe(ee()), T.onComponentDidMount({
719
+ ]), i.useEffect(() => (t.gridProps.clipboard && (W.current = new Ot(B), W.current.addEventListeners(v())), () => {
720
+ 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({
722
722
  scope: K.current || void 0,
723
723
  contextStateRef: y,
724
724
  navigationStateRef: D
725
725
  }), () => {
726
- clearTimeout(se.current);
726
+ clearTimeout(ce.current);
727
727
  }), []), i.useEffect(() => {
728
728
  var e;
729
- p(), Fe(ee()), (e = c.current) != null && e.tableTransform && c.current.table && (c.current.table.style.transform = c.current.tableTransform, c.current.tableTransform = ""), Et(), T.onComponentDidUpdate({
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({
730
730
  scope: K.current || void 0,
731
731
  contextStateRef: y,
732
732
  navigationStateRef: D,
733
- focusFirst: ie.current,
733
+ focusFirst: oe.current,
734
734
  newEditableRow: q.current,
735
- singleEditRow: ce.current,
736
- lastActiveElement: de.current,
735
+ singleEditRow: ie.current,
736
+ lastActiveElement: ae.current,
737
737
  navigatable: t.gridProps.navigatable
738
- }), ie.current = !1, q.current = void 0;
738
+ }), oe.current = !1, q.current = void 0;
739
739
  }), i.useEffect(() => {
740
740
  if ($) {
741
741
  const e = {
742
742
  rootMargin: "0px",
743
743
  threshold: 0.9
744
744
  };
745
- k.current = window.IntersectionObserver && new window.IntersectionObserver(we, e) || null;
745
+ k.current = window.IntersectionObserver && new window.IntersectionObserver(ve, e) || null;
746
746
  }
747
- }, [we]), i.useEffect(() => {
747
+ }, [ve]), i.useEffect(() => {
748
748
  var r;
749
749
  let e;
750
- return $ && window.ResizeObserver && (e = new window.ResizeObserver(yt), e.observe((r = v()) == null ? void 0 : r.body)), () => {
750
+ return $ && window.ResizeObserver && (e = new window.ResizeObserver(Et), e.observe((r = v()) == null ? void 0 : r.body)), () => {
751
751
  e == null || e.disconnect();
752
752
  };
753
753
  }, []), i.useImperativeHandle(
754
- R,
754
+ C,
755
755
  () => ({
756
756
  get element() {
757
- return W();
757
+ return _();
758
758
  },
759
759
  props: t.gridProps,
760
760
  get columns() {
@@ -765,96 +765,95 @@ const fr = i.createContext(void 0), Sr = (t) => {
765
765
  if (!((o = c.current) != null && o.container) || t.gridProps.scrollable === "none")
766
766
  return;
767
767
  const { rowIndex: r } = e;
768
- ue.current = r;
769
- const n = W();
768
+ le.current = r;
769
+ const n = _();
770
770
  if (k.current && n) {
771
771
  k.current.disconnect();
772
- const a = n.querySelector(`[absolute-row-index="${ue.current}"]`);
773
- a ? k.current.observe(a) : te(e);
772
+ const a = n.querySelector(`[absolute-row-index="${le.current}"]`);
773
+ a ? k.current.observe(a) : ee(e);
774
774
  }
775
775
  },
776
776
  fitColumns: (e) => {
777
777
  w.current.dblClickHandler(null, e);
778
778
  }
779
779
  })
780
- ), i.useImperativeHandle(t.gridRef, () => R.current), i.useMemo(() => {
781
- w.current = new tr(Rt);
780
+ ), i.useImperativeHandle(t.gridRef, () => C.current), i.useMemo(() => {
781
+ w.current = new Zt(bt);
782
782
  }, [t.gridProps.onColumnResize]), i.useMemo(() => {
783
- S.current = new rr(Z, ht, ve);
783
+ S.current = new pt(Z, mt, Ce);
784
784
  }, [
785
785
  t.gridProps.onColumnReorder,
786
786
  t.gridProps.onGroupChange,
787
787
  t.gridProps.group,
788
788
  t.gridProps.groupable
789
789
  ]), w.current.resizable = t.gridProps.resizable || !1, w.current.columns = g.current;
790
- const De = 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 = De, S.current.columns = g.current, St(t.total, De);
792
- const Ht = t.gridProps.columnsState || Dt();
790
+ 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();
793
793
  return /* @__PURE__ */ i.createElement(
794
- fr.Provider,
794
+ sr.Provider,
795
795
  {
796
796
  value: {
797
797
  isClient: E,
798
798
  rowReorder: A,
799
799
  activeDragRowDataItemRef: G,
800
- reorderRowDragTargetRef: Tt,
801
- reorderRowDropTargetRef: Mt,
802
- dir: xe,
803
- getCellPositionStyle: kt,
800
+ reorderRowDragTargetRef: kt,
801
+ reorderRowDropTargetRef: Kt,
802
+ dir: we,
803
+ getCellPositionStyle: St,
804
804
  dataItemKey: t.gridProps.dataItemKey,
805
- columnsState: Ht,
806
- onColumnsStateChange: Pt,
805
+ columnsState: Mt,
806
+ onColumnsStateChange: ft,
807
807
  groupChange: Q,
808
- selectionRelease: at,
809
- pagerPageChange: gt,
810
- onContextMenu: qe,
811
- rowClick: Qe,
812
- rowDblClick: Ze,
813
- cellClick: pe,
814
- headerCellClick: Re,
815
- itemChange: rt,
816
- sortChange: Ce,
817
- filterChange: ft,
818
- searchChange: mt,
819
- onHeaderSelectionChange: ot,
820
- columnGroupChange: bt,
821
- onKeyDown: $e,
822
- onFocus: Je,
823
- scrollHandler: Xe,
824
- selectionChange: nt,
825
- dispatchDetailExpand: et,
826
- dispatchGroupExpand: tt,
808
+ selectionRelease: nt,
809
+ pagerPageChange: st,
810
+ onContextMenu: We,
811
+ rowClick: Je,
812
+ rowDblClick: Ye,
813
+ cellClick: Qe,
814
+ headerCellClick: be,
815
+ itemChange: et,
816
+ sortChange: Ie,
817
+ filterChange: ut,
818
+ searchChange: gt,
819
+ onHeaderSelectionChange: rt,
820
+ columnGroupChange: Pt,
821
+ onKeyDown: qe,
822
+ onFocus: Xe,
823
+ scrollHandler: je,
824
+ selectionChange: tt,
825
+ dispatchDetailExpand: Ze,
826
+ dispatchGroupExpand: pe,
827
827
  columnResizeRef: w,
828
828
  dragLogicRef: S,
829
829
  navigationStateRef: D,
830
830
  tableElementRef: x,
831
831
  tableBodyElementRef: H,
832
- headerElementRef: Kt,
832
+ headerElementRef: Dt,
833
833
  containerElementRef: j,
834
- headTableElementRef: ne,
834
+ headTableElementRef: re,
835
835
  elementRef: K,
836
836
  footerRef: F,
837
837
  headerRef: L,
838
- getCachedScrollbarWidth: ee,
839
838
  vsRef: c
840
839
  }
841
840
  },
842
- /* @__PURE__ */ i.createElement(Wt.Provider, { value: y.current }, t.children),
841
+ /* @__PURE__ */ i.createElement(Bt.Provider, { value: y.current }, t.children),
843
842
  /* @__PURE__ */ i.createElement(
844
- sr,
843
+ dr,
845
844
  {
846
845
  show: b.show,
847
846
  dataItem: b.dataItem,
848
847
  field: b.field,
849
- items: _e,
848
+ items: Ve,
850
849
  offset: b.offset,
851
- onClose: he,
852
- onSelect: je
850
+ onClose: me,
851
+ onSelect: _e
853
852
  }
854
853
  )
855
854
  );
856
855
  };
857
856
  export {
858
- Sr as GridClientWrapper,
859
- fr as GridContext
857
+ wr as GridClientWrapper,
858
+ sr as GridContext
860
859
  };