@progress/kendo-react-grid 16.2.0-develop.6 → 16.2.0-develop.7

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 Wr } from "@progress/kendo-data-query";
12
+ import { getSelectionOptions as xe, populateClipboardData as Lr, 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, D, p, K) => {
28
+ const Y = Object.keys(D.cells).map((M) => p.findIndex((Q) => Q.field === M)), C = Object.keys(D.cells).length > 0 ? Y : !0;
29
+ return t.reduce((M, Q) => (M[Q[K != null ? K : "id"]] = C, M), {});
30
+ }, Rt = (t, D, p, K) => D.reduce((C, M) => ({
31
+ ...C,
32
+ ...In(Wr(t, M), M, p, K)
33
+ }), {}), zn = (t) => {
34
+ var ft;
35
+ const D = t.gridProps.isClient, p = typeof t.gridProps.scrollable == "object" ? t.gridProps.scrollable.mode : t.gridProps.scrollable, { overlayScrollbar: K, 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,67 +43,67 @@ 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 || "", o = C.dataItem, n = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = r ? o[r] : void 0, d = a !== void 0 && n.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 o = C.dataItem ? ht.body : ht.head, n = r[o], 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 n === !0 || n === void 0 ? a = i : n !== !1 && (a = n), 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, o = {
96
+ target: S.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, o);
103
+ const n = T(), i = {
102
104
  selectedField: "",
103
105
  componentId: t.id,
104
- dataItems: o,
106
+ dataItems: n,
105
107
  dataItem: e.dataItem,
106
108
  startRowIndex: -1,
107
109
  endRowIndex: -1,
@@ -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
+ ...o
119
+ }, a = n.findIndex((k) => k === 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 k = (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 = k ? "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 < n.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, n.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) {
178
- const o = {
179
- target: E.current,
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, o) => {
179
+ if (t.gridProps.onContextMenu && D) {
180
+ const n = {
181
+ target: S.current,
180
182
  syntheticEvent: e,
181
183
  nativeEvent: e.nativeEvent,
182
- dataItem: n,
183
- field: r
184
+ dataItem: r,
185
+ field: o
184
186
  };
185
- m(t.gridProps.onContextMenu, o);
187
+ m(t.gridProps.onContextMenu, n);
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: o
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, o = e.currentTarget.scrollTop, n = o !== Be.current;
200
+ t.gridProps.columnVirtualization && (!x || o === 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), W != null && W.current && W.current.setScrollLeft(r), L != null && L.current && L.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 && n && y.current.scrollHandler(e);
205
+ const a = x && ((s = t.gridProps.virtualSkipRef) == null ? void 0 : s.current) !== i;
206
+ t.gridProps.onScroll && D && m(t.gridProps.onScroll, {
207
+ ...I(e)
208
+ }), Be.current = o, !dt.current && q.current && Math.abs(q.current.scrollTop - o) > 1 && (Fe.current = !0, q.current.scrollTop = o), a || st();
209
+ }, wt = (e) => {
210
+ var o, n;
211
+ const r = e.target;
212
+ if ((e.keyCode === 38 || e.keyCode === 40) && r.closest(".k-grid-sticky-container")) {
213
+ const i = parseInt(((o = r.closest("tr")) == null ? void 0 : o.getAttribute("absolute-row-index")) || "", 10), a = r.getAttribute("data-keyboardnavid");
214
+ if (!isNaN(i) && a && !((n = H.current) == null ? void 0 : n.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: o, keyCode: n } = 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
- keyCode: o,
232
+ key: r,
233
+ code: o,
234
+ keyCode: n,
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 && D && 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 o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
271
+ if (!r[o].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" && o < t.columnsRef.length - 1) {
274
+ if (r[o + 1].disableReorder)
273
275
  return;
274
- ge(r, r + 1, e.event);
276
+ fe(o, o + 1, e.event);
275
277
  }
276
- if (e.action === "reorderToLeft" && r > 0) {
277
- if (n[r - 1].disableReorder)
278
+ if (e.action === "reorderToLeft" && o > 0) {
279
+ if (r[o - 1].disableReorder)
278
280
  return;
279
- ge(r, r - 1, e.event);
281
+ fe(o, o - 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 && D) {
285
+ const o = {
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, o);
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) => {
312
- var o, i;
313
- if (lt.enabled && lt.mode === "incell" && t.gridProps.dataItemKey) {
313
+ }, Gt = (e, r, o) => {
314
+ var n, i;
315
+ if (gt.enabled && gt.mode === "incell" && t.gridProps.dataItemKey) {
314
316
  if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
315
- const d = !!((i = (o = e.target).closest) != null && i.call(o, ".k-grid-pinned-container"));
317
+ const d = !!((i = (n = e.target).closest) != null && i.call(n, ".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: o }
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) => {
328
- var o;
329
- if (jn(t.detailExpandable).enabled) {
330
- const i = Un((o = t.gridProps.detailExpand) != null ? o : {}, e);
329
+ }, Ht = (e, r) => {
330
+ var n;
331
+ if (Vr(t.detailExpandable).enabled) {
332
+ const i = qr((n = t.gridProps.detailExpand) != null ? n : {}, 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) => {
337
- var o;
338
- const r = pn(
338
+ }, At = (e, r) => {
339
+ var n;
340
+ const o = 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 (o.enabled) {
344
+ const i = Ur((n = t.gridProps.groupExpand) != null ? n : [], e, o);
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: o = [], pinnedBottomRows: n = [] } = 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 o != null && o.some((a) => a[r] === i) ? "top" : n != null && n.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: o = "", pinnedTopRows: n = [], pinnedBottomRows: i = [] } = t.gridProps, a = r[o], d = n.filter((u) => u[o] !== a), s = i.filter((u) => u[o] !== 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, o) => {
380
+ const { allowUnsort: n, 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 = o || hn[n][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
+ }, Wt = (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
+ }, Lt = (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
- dataItem: o,
396
+ const { event: o, dataItem: n, dataIndex: i, columnIndex: a } = e, d = {
397
+ ...I(o),
398
+ dataItem: n,
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: o, selectAll: n } = e, i = X(t.gridProps.dataItemKey), a = dn(o), 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 && (n ? l[v] = !0 : delete l[v]);
429
431
  }), m(t.gridProps.onSelectionChange, {
430
- ...C(n),
431
- dataItem: r,
432
+ ...I(r),
433
+ dataItem: o,
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
+ }, o = 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 (o === 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 n = e.target, i = ke(n, "TD"), a = ke(n, "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: o,
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((o, n) => (t.gridProps.dataItemKey && X(t.gridProps.dataItemKey)(n) !== void 0 && (o[X(t.gridProps.dataItemKey)(n)] = !0), o), {}) : {},
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: S.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 o = t.gridProps.dataItemKey;
507
+ if (!o || !r)
506
508
  return;
507
- const o = Z(r), i = k().findIndex((a) => o(a) === o(n));
508
- i !== -1 && $e({
509
+ const n = X(o), i = T().findIndex((a) => n(a) === n(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 o = T(), n = o[e.startRowIndex], i = o[e.endRowIndex], a = {
517
519
  syntheticEvent: void 0,
518
- target: E.current,
520
+ target: S.current,
519
521
  selectedField: "",
520
522
  componentId: t.id,
521
- dataItems: r,
523
+ dataItems: o,
522
524
  dataItem: null,
523
- startDataItem: o,
525
+ startDataItem: n,
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], o = e.dataItems[e.dataItems.length - 1], n = {}, i = {
536
538
  ...e,
537
- startDataItem: n,
538
- endDataItem: r,
539
+ startDataItem: r,
540
+ endDataItem: o,
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);
546
- o[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
547
- }), X(i, o);
547
+ const s = X(t.gridProps.dataItemKey)(a);
548
+ n[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
549
+ }), ee(i, n);
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 o = X(t.gridProps.dataItemKey)(e.dataItem), n = 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,
@@ -556,21 +558,21 @@ const hr = (t, x, z, R) => {
556
558
  endDataItem: a,
557
559
  startRowIndex: a,
558
560
  endRowIndex: a,
559
- startColIndex: o,
561
+ startColIndex: n,
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[o] === !0 || Array.isArray(u[o]) && u[o].length === t.columnsRef.length ? delete u[o] : u[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, 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(), o = {
568
570
  syntheticEvent: void 0,
569
571
  nativeEvent: void 0,
570
- target: E.current,
572
+ target: S.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,34 +586,34 @@ const hr = (t, x, z, R) => {
584
586
  };
585
587
  if (!e || e.length === 0) {
586
588
  const f = {
587
- ...r,
589
+ ...o,
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 n = Rt(
597
599
  t.gridProps.data,
598
600
  e,
599
601
  t.columnsRef,
600
602
  t.gridProps.dataItemKey
601
603
  ), i = {};
602
- Object.keys(o).forEach((f) => {
603
- o[f] && (i[f] = h.cell ? [...Array(t.columnsRef.length).keys()] : !0);
604
+ Object.keys(n).forEach((f) => {
605
+ n[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 && n[R] && (a === -1 && (a = v, s = r[v]), d = v, l = r[v]);
611
613
  }
612
614
  }
613
615
  const u = {
614
- ...r,
616
+ ...o,
615
617
  startRowIndex: a,
616
618
  endRowIndex: d,
617
619
  startColIndex: 0,
@@ -619,260 +621,260 @@ 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, o, n, 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(n), ...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
+ ...o
634
636
  }, m(a, {
635
- ...C(o),
637
+ ...I(n),
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) => {
643
- var o;
644
- D && t.gridProps.pageable && ((o = w.current) == null || o.reset()), Y(
644
+ }, ge = (e, r, o) => {
645
+ var n;
646
+ x && t.gridProps.pageable && ((n = y.current) == null || n.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
+ o
650
652
  );
651
- }, jt = (e, n, r) => {
652
- 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 = () => {
653
+ }, qt = (e, r, o) => {
654
+ var n;
655
+ t.gridProps.pageable || (n = t.gridProps.group) != null && n.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, re()) : ge(e, r, o);
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
+ x && 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) => {
664
- 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(
663
+ const r = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + r, n = Te();
664
+ o < n && ge({ skip: o, take: r }, e);
665
+ }, Zt = (e) => {
666
+ var n, i;
667
+ const r = (i = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - r;
668
+ o >= 0 && ge({ skip: o, 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, ...x && !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) || [], o = e.nativeEvent.target.value, n = {
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: o, operator: "contains" } : {
710
+ value: o,
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
- search: o
720
+ search: n
719
721
  },
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 };
740
- let o = {};
741
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (o = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Ae.current = !0), Y(
733
+ return ((e = Ke.current) == null ? void 0 : e.getBlob()) || null;
734
+ }, er = async (e) => {
735
+ var r, o;
736
+ (r = t.gridProps) != null && r.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
737
+ }, tr = (e) => {
738
+ var r, o;
739
+ return (r = t.gridProps) != null && r.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
740
+ }, Ge = (e, r) => {
741
+ const o = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
742
+ let n = {};
743
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (n = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Le.current = !0), te(
742
744
  t.gridProps.onGroupChange,
743
745
  { group: e },
744
- { group: e, skip: 0, ...o },
745
- r
746
+ { group: e, skip: 0, ...n },
747
+ o
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: S.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, o) => {
758
+ const { columnsRef: n, columnsState: i } = t, a = n[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;
761
- }, 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);
760
+ R++;
761
+ while (R < n.length && n[R].depth > s);
762
+ return R;
763
+ }, u = n.splice(e, l(e) - e);
764
+ n.splice(e < r ? l(r - u.length) : r, 0, ...u), n.filter((R) => R.declarationIndex >= 0).forEach((R, j) => {
765
+ R.orderIndex = j;
766
+ const g = d.find((k) => k.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 = n[e].locked && n[r].locked;
770
+ pr(t.columnsMapRef, n, f || Ie.current), Nr(t.columnsMapRef, n, f || Ie.current), We.current && (Ie.current = !1, We.current = !1);
771
+ const v = se();
772
+ if (re(), t.gridProps.onColumnReorder) {
773
+ const R = {
774
+ target: S.current,
775
+ columns: v,
774
776
  columnId: a.id,
775
- nativeEvent: r
777
+ nativeEvent: o
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
- const o = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
782
- if (r === "forbidden" || !o || !ie.current)
781
+ He(i);
782
+ }, ae = (e, r, o) => {
783
+ const n = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
784
+ if (o === "forbidden" || !n || !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: o,
789
791
  nativeEvent: e.originalEvent,
790
792
  dragEvent: e,
791
- target: E.current
792
- }), ie.current = null;
793
- }, Qt = (e, n, r) => {
793
+ target: S.current
794
+ }), ce.current = null;
795
+ }, rr = (e, r, o) => {
794
796
  if (t.gridProps.group === void 0)
795
797
  return;
796
- const o = t.gridProps.group.slice();
797
- o.splice(n, 0, ...o.splice(e, 1)), Ge(o, r);
798
- }, Ye = (e, n, r) => {
799
- const o = t.columnsRef[e].field;
800
- if (!o)
798
+ const n = t.gridProps.group.slice();
799
+ n.splice(r, 0, ...n.splice(e, 1)), Ge(n, o);
800
+ }, rt = (e, r, o) => {
801
+ const n = t.columnsRef[e].field;
802
+ if (!n)
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: n }), Ge(i, o);
806
+ }, nr = (e, r) => {
807
+ const o = U.current.getCurrentGroupsLength;
808
+ rt(e, o, r);
809
+ }, Ae = () => {
810
+ var e, r, o, n, 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 k = P.current.colGroupMain.children, b = k.length - 1;
815
+ if (b >= 0) {
816
+ let Z = 0;
817
+ for (let oe = 0; oe < b; oe++) {
818
+ const Kr = parseFloat((k[oe].width || 0).toString()) || k[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
+ k[b].width = B + "px", (n = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && n[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), W.current && W.current.setWidth(g), L.current && L.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 k = P.current.colGroupMain.children;
831
+ for (let b = 0; b < k.length; b++) {
832
+ const Z = k[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), W.current && W.current.setWidth(g), L.current && L.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, o, n, i) => {
857
859
  var l;
858
- if (!rn() && !r || !e)
860
+ if (!ar() && !o || !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
- dataItem: o,
867
+ dataItem: n,
866
868
  field: i,
867
869
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
868
- ...r
869
- }, d = k(), s = Fn({
870
+ ...o
871
+ }, d = T(), s = Lr({
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 && D && 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(),
896
- nativeEvent: o,
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, o = r == null ? void 0 : r.closest(".k-grid-container"), n = r && ((d = F.current) == null ? void 0 : d.contains(r));
894
+ return !!(r && n && o);
895
+ }, ot = (e, r, o, n, i, a, d) => {
896
+ Ae(), Ie.current = !0, We.current = !0, t.gridProps.onColumnResize && D && m(t.gridProps.onColumnResize, {
897
+ columns: se(),
898
+ nativeEvent: n,
897
899
  targetColumnId: d,
898
900
  index: e,
899
- newWidth: n,
900
- oldWidth: r,
901
+ newWidth: r,
902
+ oldWidth: o,
901
903
  end: i,
902
- target: E.current
903
- }), i && Te(a);
904
- }, on = () => {
904
+ target: S.current
905
+ }), i && He(a);
906
+ }, cr = () => {
905
907
  var e;
906
908
  return {
907
909
  filter: t.gridProps.filter,
@@ -910,242 +912,264 @@ 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: S.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, o;
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 n = Array.from((o = H.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
937
+ n.length > je.current.length ? Ce.current = n.filter(
938
+ (i) => !je.current.includes(i)
939
+ )[0] : n.length === 1 && (Ce.current = n[0], ze.current = !0), je.current = n;
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
- var o, i;
946
- if (!w.current || !((o = w.current) != null && o.container) || z === "none")
947
+ var n, i;
948
+ if (!y.current || !((n = y.current) != null && n.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, o = he();
952
+ if (x) {
953
+ const a = ((i = y.current.rowHeightService) == null ? void 0 : i.offset(r)) || 0;
954
+ y.current.container.scroll(0, a);
955
+ } else if (o) {
956
+ const a = r < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.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: o } = t, n = y.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
966
+ n && (n.fixedScroll = o.fixedScroll || !1, n.PageChange = qt, n.pageSize = r, n.scrollableVirtual = x, n.container = E.current, n.tableBody = H.current, n.scrollHeightContainer = ct.current, n.scrollbarOverlaySpacerElement = ve.current, n.overlaySyncingRef = Fe, n.table = A.current, (!n.rowHeightService || n.total !== e) && i && (n.total = e, n.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((o) => {
971
+ o.boundingClientRect.height !== o.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 } : {}, S = 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), W = c.useRef(null), L = c.useRef(null), O = c.useRef(null), z = c.useRef(null), hr = c.useRef(null), Rr = c.useRef(null), We = c.useRef(!1), Le = 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), x = 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(), x && (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: Le.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(), Le.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(), x && 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 || !x || !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 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();
1066
+ const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
1067
+ me();
1068
+ const n = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
1069
+ (o === 0 && n > 0 || Math.abs(n - o) > 10) && re();
1070
+ }, r = new window.ResizeObserver(e);
1071
+ return r.observe(E.current), () => {
1072
+ r.disconnect();
1073
+ };
1074
+ }, [x, me]);
1075
+ const Se = c.useCallback(() => {
1076
+ var n;
1077
+ const e = E.current;
1078
+ if (!e)
1079
+ return;
1080
+ const r = ((n = q.current) == null ? void 0 : n.offsetWidth) || 17, o = e.scrollWidth > e.clientWidth ? r : 0;
1081
+ q.current && (q.current.style.bottom = o + "px"), ve.current && (ve.current.style.height = Math.max(0, e.scrollHeight - o) + "px");
1082
+ }, []);
1083
+ return c.useEffect(() => {
1084
+ if (!J || !K || !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();
1071
1089
  };
1072
- }, [D, fe]), c.useImperativeHandle(
1073
- E,
1090
+ }, [K, Se]), c.useEffect(() => {
1091
+ !J || !K || !E.current || Se();
1092
+ }, [K, Se, t.columnsState, t.gridProps.data]), c.useEffect(() => {
1093
+ const e = E.current, r = x && K;
1094
+ if (!(!e || !r && Y === 1))
1095
+ return un(e, { wheelMultiplier: Y, overlayRequiresCustomWheel: r });
1096
+ }, [x, K, Y]), c.useImperativeHandle(
1097
+ S,
1074
1098
  () => ({
1075
1099
  get element() {
1076
- return Pe();
1100
+ return he();
1077
1101
  },
1078
1102
  props: t.gridProps,
1079
1103
  get columns() {
1080
- return le();
1104
+ return se();
1081
1105
  },
1082
1106
  scrollIntoView: (e) => {
1083
- var o;
1084
- if (!((o = w.current) != null && o.container) || z === "none")
1107
+ var n;
1108
+ if (!((n = y.current) != null && n.container) || p === "none")
1085
1109
  return;
1086
- const { rowIndex: n } = e;
1087
- ze.current = n;
1088
- const r = Pe();
1089
- if (G.current && r) {
1110
+ const { rowIndex: r } = e;
1111
+ Ne.current = r;
1112
+ const o = he();
1113
+ if (G.current && o) {
1090
1114
  G.current.disconnect();
1091
- const i = r.querySelector(`[absolute-row-index="${ze.current}"]`);
1092
- i ? G.current.observe(i) : he(e);
1115
+ const i = o.querySelector(`[absolute-row-index="${Ne.current}"]`);
1116
+ i ? G.current.observe(i) : Re(e);
1093
1117
  }
1094
1118
  },
1095
1119
  fitColumns: (e) => {
1096
1120
  P.current.dblClickHandler(null, e);
1097
1121
  },
1098
- exportAsPdf: Ke,
1099
- saveAsCsv: Je,
1100
- getCsvBlob: Xe,
1101
- getTotal: De,
1102
- getLeafDataItems: k
1122
+ exportAsPdf: Me,
1123
+ saveAsCsv: et,
1124
+ getCsvBlob: tt,
1125
+ getTotal: Te,
1126
+ getLeafDataItems: T
1103
1127
  })
1104
- ), c.useImperativeHandle(t.gridRef, () => E.current), c.useMemo(() => {
1105
- P.current = new Jn(et);
1128
+ ), c.useImperativeHandle(t.gridRef, () => S.current), c.useMemo(() => {
1129
+ P.current = new Yr(ot);
1106
1130
  }, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
1107
- j.current = new Xn(ge, Qt, Ye);
1131
+ U.current = new Qr(fe, rr, rt);
1108
1132
  }, [
1109
1133
  t.gridProps.onColumnReorder,
1110
1134
  t.gridProps.onGroupChange,
1111
1135
  t.gridProps.group,
1112
1136
  t.columnsRef,
1113
1137
  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,
1138
+ ]), 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", S, t.gridProps, t.gridProps.webMcp), /* @__PURE__ */ c.createElement(
1139
+ vn.Provider,
1116
1140
  {
1117
1141
  value: {
1118
- isClient: x,
1119
- rowReorder: oe,
1120
- activeDragRowDataItemRef: ie,
1121
- reorderRowDragTargetRef: yn,
1122
- reorderRowDropTargetRef: En,
1123
- dir: pe,
1124
- getCellPositionStyle: un,
1142
+ isClient: D,
1143
+ rowReorder: ae,
1144
+ activeDragRowDataItemRef: ce,
1145
+ reorderRowDragTargetRef: Sr,
1146
+ reorderRowDropTargetRef: xr,
1147
+ dir: Ue,
1148
+ getCellPositionStyle: fr,
1125
1149
  dataItemKey: t.gridProps.dataItemKey,
1126
1150
  columnsState: t.columnsState,
1127
1151
  columnsRef: t.columnsRef,
1128
1152
  hiddenColumnsRef: t.hiddenColumnsRef,
1129
- onColumnsStateChange: Te,
1153
+ onColumnsStateChange: He,
1130
1154
  groupable: t.gridProps.groupable,
1131
1155
  group: t.gridProps.group,
1132
1156
  reorderable: t.gridProps.reorderable,
1133
1157
  defaultGroup: t.gridProps.defaultGroup,
1134
1158
  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,
1159
+ selectionRelease: Xe,
1160
+ pinnedSelectionRelease: pt,
1161
+ pagerPageChange: Jt,
1162
+ onContextMenu: It,
1163
+ rowClick: Dt,
1164
+ rowDblClick: Kt,
1165
+ cellClick: Gt,
1166
+ headerCellClick: Je,
1167
+ itemChange: Wt,
1168
+ onDialogEditCancel: Mt,
1169
+ onDialogEditSubmit: Tt,
1170
+ columnReorder: fe,
1171
+ onResize: ot,
1172
+ getTotal: Te,
1149
1173
  sortable: t.gridProps.sortable,
1150
1174
  pageable: t.gridProps.pageable,
1151
1175
  pageSize: t.gridProps.pageSize,
@@ -1153,101 +1177,101 @@ const hr = (t, x, z, R) => {
1153
1177
  skip: t.gridProps.skip,
1154
1178
  take: t.gridProps.take,
1155
1179
  defaultSort: t.gridProps.defaultSort,
1156
- sortChange: _e,
1180
+ sortChange: Ye,
1157
1181
  filterable: t.gridProps.filterable,
1158
1182
  filter: t.gridProps.filter,
1159
1183
  defaultFilter: t.gridProps.defaultFilter,
1160
- filterOperators: t.gridProps.filterOperators || Pr,
1161
- getLeafDataItems: k,
1162
- filterChange: _t,
1163
- applyHighlightDescriptor: Zt,
1164
- applySelectionDescriptor: pt,
1184
+ filterOperators: t.gridProps.filterOperators || Cn,
1185
+ getLeafDataItems: T,
1186
+ filterChange: Xt,
1187
+ applyHighlightDescriptor: Yt,
1188
+ applySelectionDescriptor: Ut,
1165
1189
  highlight: t.gridProps.highlight,
1166
1190
  select: t.gridProps.select,
1167
1191
  selectable: t.gridProps.selectable,
1168
- searchChange: Jt,
1169
- exportAsPdf: Ke,
1170
- exportAsCsv: Je,
1171
- getCsvBlob: Xe,
1192
+ searchChange: Qt,
1193
+ exportAsPdf: Me,
1194
+ exportAsCsv: et,
1195
+ getCsvBlob: tt,
1172
1196
  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,
1197
+ columnGroupChange: nr,
1198
+ onKeyDown: St,
1199
+ onFocus: xt,
1200
+ scrollHandler: yt,
1201
+ selectionChange: Lt,
1202
+ groupSelectionChange: Ot,
1203
+ mobileMode: Dr,
1204
+ adaptiveColumnMenuRef: ye.current,
1181
1205
  adpativeTitle: t.gridProps.adaptiveTitle,
1182
1206
  adaptive: t.gridProps.adaptive,
1183
- dispatchDetailExpand: Gt,
1184
- dispatchGroupExpand: Tt,
1207
+ dispatchDetailExpand: Ht,
1208
+ dispatchGroupExpand: At,
1185
1209
  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,
1210
+ dragLogicRef: U,
1211
+ navigationStateRef: ne,
1212
+ tableElementRef: A,
1213
+ tableBodyElementRef: H,
1214
+ headerElementRef: mr,
1215
+ containerElementRef: E,
1216
+ headTableElementRef: Pr,
1217
+ elementRef: F,
1218
+ virtualScrollHeightContainerRef: ct,
1219
+ scrollbarContainerRef: q,
1220
+ scrollbarSpacerRef: ve,
1221
+ vScrollDraggingRef: dt,
1222
+ overlaySyncingRef: Fe,
1223
+ footerRef: $,
1224
+ headerRef: _,
1225
+ vsRef: y,
1226
+ stickyHeaderItems: Ir,
1227
+ stickyHeaderRef: yr,
1228
+ stickyFooterItems: wr,
1205
1229
  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
1230
+ stickyHeaderTableRef: W,
1231
+ stickyFooterTableRef: L,
1232
+ pinnedTopTableRef: O,
1233
+ pinnedBottomTableRef: z,
1234
+ pinnedTopRef: hr,
1235
+ pinnedBottomRef: Rr,
1236
+ onRowPin: ue,
1237
+ getRowPinPosition: Ft
1214
1238
  }
1215
1239
  },
1216
- /* @__PURE__ */ c.createElement(Wn.Provider, { value: U.current }, t.children),
1240
+ /* @__PURE__ */ c.createElement(Br.Provider, { value: V.current }, t.children),
1217
1241
  /* @__PURE__ */ c.createElement(
1218
- dr,
1242
+ fn,
1219
1243
  {
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
1244
+ show: C.show && (le == null ? void 0 : le.length),
1245
+ dataItem: C.dataItem,
1246
+ field: C.field,
1247
+ items: le,
1248
+ offset: C.offset,
1249
+ onClose: $e,
1250
+ onSelect: Ct
1227
1251
  }
1228
1252
  ),
1229
1253
  t.gridProps.pdf && /* @__PURE__ */ c.createElement(
1230
- gr,
1254
+ Rn,
1231
1255
  {
1232
1256
  gridProps: t.gridProps,
1233
1257
  innerGrid: t.innerGrid,
1234
1258
  pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
1235
- onPdfExport: Xt,
1236
- ref: (e) => K.current = e
1259
+ onPdfExport: er,
1260
+ ref: (e) => qe.current = e
1237
1261
  }
1238
1262
  ),
1239
1263
  t.gridProps.csv && /* @__PURE__ */ c.createElement(
1240
- fr,
1264
+ bn,
1241
1265
  {
1242
1266
  gridProps: t.gridProps,
1243
1267
  csv: typeof t.gridProps.csv == "object" ? t.gridProps.csv : {},
1244
- onCsvExport: Yt,
1268
+ onCsvExport: tr,
1245
1269
  columnsState: t.columnsState,
1246
- ref: (e) => N.current = e
1270
+ ref: (e) => Ke.current = e
1247
1271
  }
1248
1272
  )
1249
1273
  );
1250
1274
  };
1251
1275
  export {
1252
- Mr as GridClientWrapper
1276
+ zn as GridClientWrapper
1253
1277
  };