@progress/kendo-react-grid 12.3.0-develop.9 → 13.0.0

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,30 +7,30 @@
7
7
  */
8
8
  "use client";
9
9
  import * as a from "react";
10
- import { useAdaptiveModeContext as Ut, canUseDOM as ae, getActiveElement as Vt, useDir as Wt, setScrollbarWidth as Ue, cloneArray as jt, getter as de, RowHeightService as _t } from "@progress/kendo-react-common";
11
- import { filterBy as qt } from "@progress/kendo-data-query";
12
- import { getSelectionOptions as ce, populateClipboardData as $t, ClipboardActionType as xe, getEditableOptions as Xt, tableKeyboardNavigation as O, ClipboardService as Jt, TableKeyboardNavigationContext as Yt, closestTagName as le, editReducer as Qt, EDIT_ACTION as Zt, getDetailExpandableOptions as pt, detailExpandReducer as en, getGroupExpandableOptions as tn, groupExpandReducer as nn, getSelectedState as Ve, getSelectedStateFromKeyDown as rn, getColumnIndex as on, getRowIndex as an, updateLeft as dn, updateRight as cn } from "@progress/kendo-react-data-tools";
13
- import { ColumnResize as ln } from "./drag/ColumnResize.mjs";
14
- import { CommonDragLogic as sn } from "./drag/CommonDragLogic.mjs";
15
- import { SAFARI_REGEX as un } from "./constants/index.mjs";
16
- import { getDefaultHeadContextMenuItems as gn, getDefaultBodyContextMenuItems as fn, isRowReorderEnabled as mn, sanitizeColumns as Pn, getDataAsArray as hn, getFlatColumnsState as Rn, calcRowHeight as bn } from "./utils/index.mjs";
17
- import { VirtualScroll as vn } from "./VirtualScroll.mjs";
18
- import { GridContextMenu as Cn } from "./contextMenu/GridContextMenu.mjs";
19
- import { GridContextMenuAnchorPart as We } from "./contextMenu/enums.mjs";
20
- import { normalizeSortable as In, firstLevelSortSeqMap as En } from "./sortCommon.mjs";
21
- import { BasePDFExport as wn } from "./BasePDFExport.mjs";
22
- import { GridContext as yn } from "./utils/GridContext.mjs";
23
- import { operators as Sn } from "./filterCommon.mjs";
24
- const xn = (t, v, g, y) => {
25
- const N = Object.keys(v.cells).map((E) => g.findIndex((H) => H.field === E)), A = Object.keys(v.cells).length > 0 ? N : !0;
26
- return t.reduce((E, H) => (E[H[y != null ? y : "id"]] = A, E), {});
27
- }, kn = (t, v, g, y) => v.reduce((A, E) => ({
28
- ...A,
29
- ...xn(qt(t, E), E, g, y)
30
- }), {}), Wn = (t) => {
31
- const v = t.gridProps.isClient, [g, y] = a.useState({}), N = Ut(), A = a.useRef(null), E = (e) => {
32
- e.event.preventDefault(), y({
33
- ...g,
10
+ import { useAdaptiveModeContext as Wt, canUseDOM as Q, getActiveElement as jt, useDir as _t, setScrollbarWidth as Ve, cloneArray as qt, getter as Z, RowHeightService as $t } from "@progress/kendo-react-common";
11
+ import { filterBy as Xt } from "@progress/kendo-data-query";
12
+ import { getSelectionOptions as se, populateClipboardData as Jt, ClipboardActionType as De, getEditableOptions as Yt, tableKeyboardNavigation as V, ClipboardService as Qt, TableKeyboardNavigationContext as Zt, closestTagName as ue, editReducer as pt, EDIT_ACTION as en, getDetailExpandableOptions as tn, detailExpandReducer as nn, getGroupExpandableOptions as rn, groupExpandReducer as on, getSelectedState as We, getSelectedStateFromKeyDown as an, getColumnIndex as dn, getRowIndex as ln, updateLeft as cn, updateRight as sn } from "@progress/kendo-react-data-tools";
13
+ import { ColumnResize as un } from "./drag/ColumnResize.mjs";
14
+ import { CommonDragLogic as gn } from "./drag/CommonDragLogic.mjs";
15
+ import { SAFARI_REGEX as fn } from "./constants/index.mjs";
16
+ import { getDefaultHeadContextMenuItems as mn, getDefaultBodyContextMenuItems as Pn, isRowReorderEnabled as hn, sanitizeColumns as Rn, getDataAsArray as bn, getFlatColumnsState as vn, calcRowHeight as In } from "./utils/index.mjs";
17
+ import { VirtualScroll as Cn } from "./VirtualScroll.mjs";
18
+ import { GridContextMenu as En } from "./contextMenu/GridContextMenu.mjs";
19
+ import { GridContextMenuAnchorPart as je } from "./contextMenu/enums.mjs";
20
+ import { normalizeSortable as wn, firstLevelSortSeqMap as yn } from "./sortCommon.mjs";
21
+ import { BasePDFExport as xn } from "./BasePDFExport.mjs";
22
+ import { GridContext as Sn } from "./utils/GridContext.mjs";
23
+ import { operators as Dn } from "./filterCommon.mjs";
24
+ const kn = (t, I, h, S) => {
25
+ const W = Object.keys(I.cells).map((x) => h.findIndex((L) => L.field === x)), G = Object.keys(I.cells).length > 0 ? W : !0;
26
+ return t.reduce((x, L) => (x[L[S != null ? S : "id"]] = G, x), {});
27
+ }, _e = (t, I, h, S) => I.reduce((G, x) => ({
28
+ ...G,
29
+ ...kn(Xt(t, x), x, h, S)
30
+ }), {}), jn = (t) => {
31
+ const I = t.gridProps.isClient, [h, S] = a.useState({}), W = Wt(), G = a.useRef(null), x = (e) => {
32
+ e.event.preventDefault(), S({
33
+ ...h,
34
34
  show: !0,
35
35
  offset: {
36
36
  left: e.event.pageX,
@@ -39,33 +39,33 @@ const xn = (t, v, g, y) => {
39
39
  dataItem: e.dataItem,
40
40
  field: e.field
41
41
  });
42
- }, H = () => {
43
- y({});
44
- }, h = a.useMemo(() => t.columnsRef.find((e) => e.field === g.field), [t.columnsRef, g]), ke = a.useMemo(() => {
45
- const e = t.gridProps.sortable && (h == null ? void 0 : h.sortable);
46
- return gn({
42
+ }, L = () => {
43
+ S({});
44
+ }, v = a.useMemo(() => t.columnsRef.find((e) => e.field === h.field), [t.columnsRef, h]), ke = a.useMemo(() => {
45
+ const e = t.gridProps.sortable && (v == null ? void 0 : v.sortable);
46
+ return mn({
47
47
  pdf: !!t.gridProps.pdf,
48
48
  sortable: !!e,
49
- selectable: ce(t.gridProps.selectable).enabled,
49
+ selectable: se(t.gridProps.selectable).enabled,
50
50
  clipboard: !!t.gridProps.clipboard
51
51
  });
52
- }, [h, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), De = a.useMemo(() => {
53
- const e = t.gridProps.sortable && (h == null ? void 0 : h.sortable);
54
- return fn({
52
+ }, [v, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ke = a.useMemo(() => {
53
+ const e = t.gridProps.sortable && (v == null ? void 0 : v.sortable);
54
+ return Pn({
55
55
  pdf: !!t.gridProps.pdf,
56
56
  sortable: !!e,
57
- selectable: ce(t.gridProps.selectable).enabled,
57
+ selectable: se(t.gridProps.selectable).enabled,
58
58
  clipboard: !!t.gridProps.clipboard,
59
- rowReorderable: mn(t.gridProps.rowReorderable)
59
+ rowReorderable: hn(t.gridProps.rowReorderable)
60
60
  });
61
- }, [h, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), J = a.useMemo(() => {
62
- const e = (h == null ? void 0 : h.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(g) : e;
63
- if (n && g.offset) {
64
- const o = g.dataItem ? We.body : We.head, r = n[o], i = g.dataItem ? De : ke;
61
+ }, [v, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), p = a.useMemo(() => {
62
+ const e = (v == null ? void 0 : v.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(h) : e;
63
+ if (n && h.offset) {
64
+ const o = h.dataItem ? je.body : je.head, r = n[o], i = h.dataItem ? Ke : ke;
65
65
  return r === !1 ? void 0 : r === !0 || r === void 0 ? i : r;
66
66
  }
67
- }, [t.gridProps.contextMenu, g, De, ke, h]), je = (e) => {
68
- var c, s, u, P, I, ie, b, q, $;
67
+ }, [t.gridProps.contextMenu, h, Ke, ke, v]), qe = (e) => {
68
+ var l, s, u, m, f, E, P, X, J;
69
69
  const n = e.event.item, o = {
70
70
  target: C.current,
71
71
  syntheticEvent: e.event.syntheticEvent,
@@ -73,7 +73,7 @@ const xn = (t, v, g, y) => {
73
73
  menuItem: n,
74
74
  ...e
75
75
  };
76
- t.gridProps.onContextMenuItemClick && l(t.gridProps.onContextMenuItemClick, o);
76
+ t.gridProps.onContextMenuItemClick && c(t.gridProps.onContextMenuItemClick, o);
77
77
  const r = w(), i = {
78
78
  selectedField: "",
79
79
  componentId: t.id,
@@ -88,60 +88,60 @@ const xn = (t, v, g, y) => {
88
88
  metaKey: !1,
89
89
  shiftKey: !1,
90
90
  isDrag: !1,
91
- ...ce(t.gridProps.selectable),
91
+ ...se(t.gridProps.selectable),
92
92
  ...o
93
- }, d = r.findIndex((X) => X === e.dataItem);
94
- switch ((c = n.data) == null ? void 0 : c.action) {
93
+ }, d = r.findIndex((Y) => Y === e.dataItem);
94
+ switch ((l = n.data) == null ? void 0 : l.action) {
95
95
  case "SortCommand":
96
- if (h) {
97
- const X = (s = n.name) == null ? void 0 : s.toLowerCase().includes("asc"), Ot = ((u = n.name) == null ? void 0 : u.toLowerCase().includes("desc")) ? "desc" : void 0, Nt = X ? "asc" : Ot, Bt = n.name ? Nt : void 0;
98
- Ke(e.event.syntheticEvent, h, Bt);
96
+ if (v) {
97
+ const Y = (s = n.name) == null ? void 0 : s.toLowerCase().includes("asc"), Bt = ((u = n.name) == null ? void 0 : u.toLowerCase().includes("desc")) ? "desc" : void 0, Ut = Y ? "asc" : Bt, Vt = n.name ? Ut : void 0;
98
+ Me(e.event.syntheticEvent, v, Vt);
99
99
  }
100
100
  break;
101
101
  case "SelectRowCommand":
102
- lt(i);
102
+ ut(i);
103
103
  break;
104
104
  case "SelectAllRowsCommand":
105
- ct(i);
105
+ st(i);
106
106
  break;
107
107
  case "ExportPDFCommand":
108
- se();
108
+ ge();
109
109
  break;
110
110
  case "ClearSelectionCommand":
111
- st(i);
111
+ ft(i);
112
112
  break;
113
113
  case "ReorderRowCommand":
114
- _.current = e.dataItem, (P = n.name) != null && P.toLowerCase().includes("rowup") && d > 0 && B(e.event.syntheticEvent, d - 1, "before"), (I = n.name) != null && I.toLowerCase().includes("rowdown") && d < r.length - 1 && B(e.event.syntheticEvent, d + 1, "after"), (ie = n.name) != null && ie.toLowerCase().includes("rowtop") && B(e.event.syntheticEvent, 0, "before"), (b = n.name) != null && b.toLowerCase().includes("rowbottom") && B(e.event.syntheticEvent, r.length - 1, "after");
114
+ $.current = e.dataItem, (m = n.name) != null && m.toLowerCase().includes("rowup") && d > 0 && j(e.event.syntheticEvent, d - 1, "before"), (f = n.name) != null && f.toLowerCase().includes("rowdown") && d < r.length - 1 && j(e.event.syntheticEvent, d + 1, "after"), (E = n.name) != null && E.toLowerCase().includes("rowtop") && j(e.event.syntheticEvent, 0, "before"), (P = n.name) != null && P.toLowerCase().includes("rowbottom") && j(e.event.syntheticEvent, r.length - 1, "after");
115
115
  break;
116
116
  case "CopySelectionCommand":
117
- p(
118
- xe.copy,
117
+ oe(
118
+ De.copy,
119
119
  e.event.nativeEvent,
120
120
  {
121
- copyHeaders: !((q = n.name) != null && q.toLowerCase().includes("noheaders"))
121
+ copyHeaders: !((X = n.name) != null && X.toLowerCase().includes("noheaders"))
122
122
  },
123
123
  e.dataItem,
124
124
  e.field
125
125
  );
126
126
  break;
127
127
  case "PasteCommand":
128
- p(
129
- xe.paste,
128
+ oe(
129
+ De.paste,
130
130
  e.event.nativeEvent,
131
131
  {
132
- copyHeaders: !(($ = n.name) != null && $.toLowerCase().includes("noheaders"))
132
+ copyHeaders: !((J = n.name) != null && J.toLowerCase().includes("noheaders"))
133
133
  },
134
134
  e.dataItem,
135
135
  e.field
136
136
  );
137
137
  break;
138
138
  }
139
- H();
140
- }, Y = () => {
139
+ L();
140
+ }, ee = () => {
141
141
  const e = t.columnsRef.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
142
- return Pn(e);
143
- }, _e = (e, n, o) => {
144
- if (t.gridProps.onContextMenu && v) {
142
+ return Rn(e);
143
+ }, $e = (e, n, o) => {
144
+ if (t.gridProps.onContextMenu && I) {
145
145
  const r = {
146
146
  target: C.current,
147
147
  syntheticEvent: e,
@@ -149,146 +149,146 @@ const xn = (t, v, g, y) => {
149
149
  dataItem: n,
150
150
  field: o
151
151
  };
152
- l(t.gridProps.onContextMenu, r);
152
+ c(t.gridProps.onContextMenu, r);
153
153
  }
154
- t.gridProps.contextMenu && E({
154
+ t.gridProps.contextMenu && x({
155
155
  event: e,
156
156
  dataItem: n,
157
157
  field: o
158
158
  });
159
- }, qe = (e) => {
159
+ }, Xe = (e) => {
160
160
  if (e.target !== e.currentTarget)
161
161
  return;
162
- clearTimeout(Ee.current), m.current && (m.current.table = T.current);
162
+ clearTimeout(we.current), b.current && (b.current.table = H.current);
163
163
  const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
164
- t.gridProps.columnVirtualization && (!k || o === Ie.current) && (Ee.current = window.setTimeout(() => {
165
- U();
166
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), j.current && j.current.setScrollLeft(n), W.current && W.current.setScrollLeft(n), m.current && o !== Ie.current && m.current.scrollHandler(e), t.gridProps.onScroll && v && l(t.gridProps.onScroll, {
167
- ...f(e)
168
- }), Ie.current = o;
169
- }, $e = (e) => {
170
- O.onKeyDown(e, {
164
+ t.gridProps.columnVirtualization && (!y || o === Ee.current) && (we.current = window.setTimeout(() => {
165
+ O();
166
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), q.current && q.current.setScrollLeft(n), _.current && _.current.setScrollLeft(n), b.current && o !== Ee.current && b.current.scrollHandler(e), t.gridProps.onScroll && I && c(t.gridProps.onScroll, {
167
+ ...R(e)
168
+ }), Ee.current = o;
169
+ }, Je = (e) => {
170
+ V.onKeyDown(e, {
171
171
  navigatable: t.gridProps.navigatable || !1,
172
- contextStateRef: K,
173
- navigationStateRef: L,
174
- onNavigationAction: Je,
175
- columns: Y()
176
- }), O.onGetSnapshotBeforeUpdate({
177
- document: S(),
178
- contextStateRef: K,
179
- navigationStateRef: L
172
+ contextStateRef: M,
173
+ navigationStateRef: N,
174
+ onNavigationAction: Qe,
175
+ columns: ee()
176
+ }), V.onGetSnapshotBeforeUpdate({
177
+ document: D(),
178
+ contextStateRef: M,
179
+ navigationStateRef: N
180
180
  });
181
181
  const n = {
182
182
  dataItems: w(),
183
- mode: R.mode,
184
- cell: R.cell,
183
+ mode: g.mode,
184
+ cell: g.cell,
185
185
  componentId: t.id,
186
186
  selectedField: "",
187
- ...f(e)
187
+ ...R(e)
188
188
  };
189
- t.gridProps.onKeyDown && v && l(t.gridProps.onKeyDown, n);
190
- }, Xe = (e) => {
191
- O.onFocus(e, {
189
+ t.gridProps.onKeyDown && I && c(t.gridProps.onKeyDown, n);
190
+ }, Ye = (e) => {
191
+ V.onFocus(e, {
192
192
  navigatable: !!t.gridProps.navigatable,
193
- contextStateRef: K
193
+ contextStateRef: M
194
194
  });
195
- }, Je = (e) => {
195
+ }, Qe = (e) => {
196
196
  const { columnsRef: n } = t;
197
- if (e.action === "moveToNextPage" && mt(e.event), e.action === "moveToPrevPage" && Pt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
197
+ if (e.action === "moveToNextPage" && Rt(e.event), e.action === "moveToPrevPage" && bt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
198
198
  const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
199
199
  if (!n[o].reorderable)
200
200
  return;
201
201
  if (e.action === "reorderToRight" && o < t.columnsRef.length - 1) {
202
202
  if (n[o + 1].disableReorder)
203
203
  return;
204
- fe(o, o + 1, e.event);
204
+ ne(o, o + 1, e.event);
205
205
  }
206
206
  if (e.action === "reorderToLeft" && o > 0) {
207
207
  if (n[o - 1].disableReorder)
208
208
  return;
209
- fe(o, o - 1, e.event);
209
+ ne(o, o - 1, e.event);
210
210
  }
211
211
  }
212
- if (e.action === "select" && it(e.event), t.gridProps.onNavigationAction && v) {
212
+ if (e.action === "select" && dt(e.event), t.gridProps.onNavigationAction && I) {
213
213
  const o = {
214
214
  focusElement: e.focusElement,
215
- ...f(e.event)
215
+ ...R(e.event)
216
216
  };
217
- l(t.gridProps.onNavigationAction, o);
217
+ c(t.gridProps.onNavigationAction, o);
218
218
  }
219
- }, Ye = (e, n) => {
220
- t.gridProps.onRowClick && le(e.target, "TD") && l(t.gridProps.onRowClick, {
219
+ }, Ze = (e, n) => {
220
+ t.gridProps.onRowClick && ue(e.target, "TD") && c(t.gridProps.onRowClick, {
221
221
  dataItem: n,
222
- ...f(e)
222
+ ...R(e)
223
223
  });
224
- }, Qe = (e, n) => {
225
- t.gridProps.onRowDoubleClick && le(e.target, "TD") && l(t.gridProps.onRowDoubleClick, {
224
+ }, pe = (e, n) => {
225
+ t.gridProps.onRowDoubleClick && ue(e.target, "TD") && c(t.gridProps.onRowDoubleClick, {
226
226
  dataItem: n,
227
- ...f(e)
227
+ ...R(e)
228
228
  });
229
- }, Ze = (e) => {
230
- t.gridProps.onItemChange && l(t.gridProps.onItemChange, {
231
- ...f(e.syntheticEvent),
229
+ }, et = (e) => {
230
+ t.gridProps.onItemChange && c(t.gridProps.onItemChange, {
231
+ ...R(e.syntheticEvent),
232
232
  dataItem: e.dataItem,
233
233
  field: void 0,
234
234
  value: void 0
235
235
  });
236
- }, pe = (e) => {
237
- t.gridProps.onItemChange && t.gridProps.onEditChange && l(t.gridProps.onEditChange, {
236
+ }, tt = (e) => {
237
+ t.gridProps.onItemChange && t.gridProps.onEditChange && c(t.gridProps.onEditChange, {
238
238
  edit: {},
239
- ...f(e.syntheticEvent)
239
+ ...R(e.syntheticEvent)
240
240
  });
241
- }, et = (e, n, o) => {
242
- if (Be.enabled && Be.mode === "incell" && t.gridProps.dataItemKey) {
243
- const r = Qt(t.gridProps.edit, {
244
- type: Zt.ENTER_FIELD_EDIT,
241
+ }, nt = (e, n, o) => {
242
+ if (Ue.enabled && Ue.mode === "incell" && t.gridProps.dataItemKey) {
243
+ const r = pt(t.gridProps.edit, {
244
+ type: en.ENTER_FIELD_EDIT,
245
245
  payload: { id: n[t.gridProps.dataItemKey], field: o }
246
246
  });
247
- t.gridProps.onEditChange && l(t.gridProps.onEditChange, {
247
+ t.gridProps.onEditChange && c(t.gridProps.onEditChange, {
248
248
  edit: r,
249
- ...f(e)
249
+ ...R(e)
250
250
  });
251
251
  }
252
- }, tt = (e, n) => {
252
+ }, rt = (e, n) => {
253
253
  var r;
254
- if (pt(t.detailExpandable).enabled) {
255
- const i = en((r = t.gridProps.detailExpand) != null ? r : {}, e);
256
- t.gridProps.onDetailExpandChange && l(t.gridProps.onDetailExpandChange, {
257
- ...f(n),
254
+ if (tn(t.detailExpandable).enabled) {
255
+ const i = nn((r = t.gridProps.detailExpand) != null ? r : {}, e);
256
+ t.gridProps.onDetailExpandChange && c(t.gridProps.onDetailExpandChange, {
257
+ ...R(n),
258
258
  detailExpand: i
259
259
  });
260
260
  }
261
- }, nt = (e, n) => {
261
+ }, ot = (e, n) => {
262
262
  var r;
263
- const o = tn(
263
+ const o = rn(
264
264
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
265
265
  );
266
266
  if (o.enabled) {
267
- const i = nn((r = t.gridProps.groupExpand) != null ? r : [], e, o);
268
- t.gridProps.onGroupExpandChange && l(t.gridProps.onGroupExpandChange, {
269
- ...f(n),
267
+ const i = on((r = t.gridProps.groupExpand) != null ? r : [], e, o);
268
+ t.gridProps.onGroupExpandChange && c(t.gridProps.onGroupExpandChange, {
269
+ ...R(n),
270
270
  groupExpand: i
271
271
  });
272
272
  }
273
- }, Ke = (e, n, o) => {
274
- const { allowUnsort: r, mode: i } = In(
273
+ }, Me = (e, n, o) => {
274
+ const { allowUnsort: r, mode: i } = wn(
275
275
  t.gridProps.sortable || !1,
276
276
  n.sortable || !1
277
- ), d = (t.gridProps.sort || []).filter((u) => u.field === n.field)[0], c = o || En[r][d && d.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((u) => u.field !== n.field);
278
- c !== "" && n.field && s.push({ field: n.field, dir: c }), Te(s, e);
279
- }, rt = (e) => {
280
- t.gridProps.onItemChange && l(t.gridProps.onItemChange, {
281
- ...f(e.syntheticEvent),
277
+ ), d = (t.gridProps.sort || []).filter((u) => u.field === n.field)[0], l = o || yn[r][d && d.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((u) => u.field !== n.field);
278
+ l !== "" && n.field && s.push({ field: n.field, dir: l }), Te(s, e);
279
+ }, it = (e) => {
280
+ t.gridProps.onItemChange && c(t.gridProps.onItemChange, {
281
+ ...R(e.syntheticEvent),
282
282
  dataItem: e.dataItem,
283
283
  dataIndex: e.dataIndex,
284
284
  field: e.field,
285
285
  value: e.value
286
286
  });
287
- }, ot = (e) => {
287
+ }, at = (e) => {
288
288
  var n;
289
- if (t.gridProps.onSelectionChange && R.enabled) {
290
- const { event: o, dataItem: r, dataIndex: i, columnIndex: d } = e, c = {
291
- ...f(o),
289
+ if (t.gridProps.onSelectionChange && g.enabled) {
290
+ const { event: o, dataItem: r, dataIndex: i, columnIndex: d } = e, l = {
291
+ ...R(o),
292
292
  dataItem: r,
293
293
  startColIndex: d,
294
294
  endColIndex: d,
@@ -299,52 +299,52 @@ const xn = (t, v, g, y) => {
299
299
  ctrlKey: !1,
300
300
  shiftKey: !1,
301
301
  metaKey: !1,
302
- mode: R.mode,
303
- cell: R.cell,
302
+ mode: g.mode,
303
+ cell: g.cell,
304
304
  isDrag: !1,
305
305
  componentId: t.id,
306
306
  selectedField: ""
307
307
  };
308
- l(t.gridProps.onSelectionChange, {
309
- ...c,
310
- select: t.gridProps.dataItemKey ? Ve({
311
- event: c,
308
+ c(t.gridProps.onSelectionChange, {
309
+ ...l,
310
+ select: t.gridProps.dataItemKey ? We({
311
+ event: l,
312
312
  selectedState: (n = t.gridProps.select) != null ? n : {},
313
313
  dataItemKey: t.gridProps.dataItemKey
314
314
  }) : {}
315
315
  });
316
316
  }
317
- }, it = (e) => {
318
- var u, P;
319
- if (!R.enabled || !t.gridProps.dataItemKey)
317
+ }, dt = (e) => {
318
+ var u, m;
319
+ if (!g.enabled || !t.gridProps.dataItemKey)
320
320
  return;
321
321
  const n = {
322
322
  dataItems: w(),
323
- mode: R.mode,
324
- cell: R.cell,
323
+ mode: g.mode,
324
+ cell: g.cell,
325
325
  componentId: t.id,
326
326
  selectedField: "",
327
- ...f(e)
328
- }, o = rn({
327
+ ...R(e)
328
+ }, o = an({
329
329
  event: n,
330
330
  selectedState: (u = t.gridProps.select) != null ? u : {},
331
331
  dataItemKey: t.gridProps.dataItemKey
332
332
  });
333
333
  if (o === t.gridProps.select)
334
334
  return;
335
- const r = e.target, i = le(r, "TD"), d = le(r, "TR"), c = on(i), s = an(d);
336
- if (c !== void 0 && s !== void 0) {
337
- const I = (P = hn(t.gridProps.data)) == null ? void 0 : P[s];
338
- t.gridProps.onSelectionChange && l(t.gridProps.onSelectionChange, {
335
+ const r = e.target, i = ue(r, "TD"), d = ue(r, "TR"), l = dn(i), s = ln(d);
336
+ if (l !== void 0 && s !== void 0) {
337
+ const f = (m = bn(t.gridProps.data)) == null ? void 0 : m[s];
338
+ t.gridProps.onSelectionChange && c(t.gridProps.onSelectionChange, {
339
339
  ...n,
340
340
  select: o,
341
- dataItem: I,
341
+ dataItem: f,
342
342
  startRowIndex: s,
343
- startColIndex: c,
344
- startDataItem: I,
345
- endDataItem: I,
343
+ startColIndex: l,
344
+ startDataItem: f,
345
+ endDataItem: f,
346
346
  endRowIndex: s,
347
- endColIndex: c,
347
+ endColIndex: l,
348
348
  ctrlKey: e.ctrlKey,
349
349
  altKey: e.altKey,
350
350
  metaKey: e.metaKey,
@@ -352,11 +352,11 @@ const xn = (t, v, g, y) => {
352
352
  isDrag: !1
353
353
  });
354
354
  }
355
- }, at = (e) => {
356
- if (t.gridProps.onHeaderSelectionChange && R.enabled) {
355
+ }, lt = (e) => {
356
+ if (t.gridProps.onHeaderSelectionChange && g.enabled) {
357
357
  const n = w();
358
- l(t.gridProps.onHeaderSelectionChange, {
359
- select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey && de(t.gridProps.dataItemKey)(r) !== void 0 && (o[de(t.gridProps.dataItemKey)(r)] = !0), o), {}) : {},
358
+ c(t.gridProps.onHeaderSelectionChange, {
359
+ select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey && Z(t.gridProps.dataItemKey)(r) !== void 0 && (o[Z(t.gridProps.dataItemKey)(r)] = !0), o), {}) : {},
360
360
  field: e.field,
361
361
  nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
362
362
  syntheticEvent: e.syntheticEvent,
@@ -364,14 +364,14 @@ const xn = (t, v, g, y) => {
364
364
  dataItems: n
365
365
  });
366
366
  }
367
- }, Q = (e, n) => {
368
- t.gridProps.onSelectionChange && R.enabled && l(t.gridProps.onSelectionChange, {
367
+ }, z = (e, n) => {
368
+ t.gridProps.onSelectionChange && g.enabled && c(t.gridProps.onSelectionChange, {
369
369
  ...e,
370
370
  select: n
371
371
  });
372
- }, dt = (e) => {
372
+ }, ct = (e) => {
373
373
  var n;
374
- if (t.gridProps.onSelectionChange && R.enabled) {
374
+ if (t.gridProps.onSelectionChange && g.enabled) {
375
375
  const o = w()[e.startRowIndex], r = w()[e.endRowIndex], i = {
376
376
  syntheticEvent: void 0,
377
377
  target: C.current,
@@ -382,17 +382,17 @@ const xn = (t, v, g, y) => {
382
382
  startDataItem: o,
383
383
  endDataItem: r,
384
384
  ...e
385
- }, d = Ve({
385
+ }, d = We({
386
386
  event: i,
387
387
  selectedState: (n = t.gridProps.select) != null ? n : {},
388
388
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
389
389
  // it does work correctly even without it
390
390
  dataItemKey: t.gridProps.dataItemKey
391
391
  });
392
- Q(i, d);
392
+ z(i, d);
393
393
  }
394
- }, ct = (e) => {
395
- if (t.gridProps.onSelectionChange && R.enabled) {
394
+ }, st = (e) => {
395
+ if (t.gridProps.onSelectionChange && g.enabled) {
396
396
  const n = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], r = {}, i = {
397
397
  ...e,
398
398
  startDataItem: n,
@@ -403,14 +403,14 @@ const xn = (t, v, g, y) => {
403
403
  endColIndex: t.columnsRef.length - 1
404
404
  };
405
405
  e.dataItems.forEach((d) => {
406
- const s = de(t.gridProps.dataItemKey)(d);
406
+ const s = Z(t.gridProps.dataItemKey)(d);
407
407
  r[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
408
- }), Q(i, r);
408
+ }), z(i, r);
409
409
  }
410
- }, lt = (e) => {
411
- if (t.gridProps.onSelectionChange && R.enabled) {
412
- const o = de(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1, d = e.dataItems.findIndex(
413
- (I) => I[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
410
+ }, ut = (e) => {
411
+ if (t.gridProps.onSelectionChange && g.enabled) {
412
+ const o = Z(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1, d = e.dataItems.findIndex(
413
+ (f) => f[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
414
414
  ), u = {
415
415
  ...e,
416
416
  startDataItem: d,
@@ -419,86 +419,145 @@ const xn = (t, v, g, y) => {
419
419
  endRowIndex: d,
420
420
  startColIndex: r,
421
421
  endColIndex: i
422
- }, P = e.mode === "multiple" ? t.gridProps.select || {} : {};
423
- P[o] === !0 || Array.isArray(P[o]) && P[o].length === t.columnsRef.length ? delete P[o] : P[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, Q(u, P);
422
+ }, m = e.mode === "multiple" ? t.gridProps.select || {} : {};
423
+ m[o] === !0 || Array.isArray(m[o]) && m[o].length === t.columnsRef.length ? delete m[o] : m[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, z(u, m);
424
424
  }
425
- }, st = (e) => {
426
- t.gridProps.onSelectionChange && R.enabled && Q(e, {});
427
- }, G = (e, n, o, r, i) => {
428
- ft();
425
+ }, gt = (e) => {
426
+ if (!g.enabled)
427
+ return;
428
+ const n = w(), o = {
429
+ syntheticEvent: void 0,
430
+ nativeEvent: void 0,
431
+ target: C.current,
432
+ selectedField: "",
433
+ componentId: t.id,
434
+ dataItems: n,
435
+ dataItem: null,
436
+ startDataItem: null,
437
+ endDataItem: null,
438
+ ctrlKey: !1,
439
+ altKey: !1,
440
+ metaKey: !1,
441
+ shiftKey: !1,
442
+ isDrag: !1,
443
+ mode: g.mode,
444
+ cell: g.cell
445
+ };
446
+ if (!e || e.length === 0) {
447
+ const f = {
448
+ ...o,
449
+ startRowIndex: -1,
450
+ endRowIndex: -1,
451
+ startColIndex: -1,
452
+ endColIndex: -1
453
+ };
454
+ z(f, {});
455
+ return;
456
+ }
457
+ const r = _e(
458
+ t.gridProps.data,
459
+ e,
460
+ t.columnsRef,
461
+ t.gridProps.dataItemKey
462
+ ), i = {};
463
+ Object.keys(r).forEach((f) => {
464
+ r[f] && (i[f] = g.cell ? [...Array(t.columnsRef.length).keys()] : !0);
465
+ });
466
+ let d = -1, l = -1, s = n[0] || null, u = n[n.length - 1] || null;
467
+ if (t.gridProps.dataItemKey) {
468
+ const f = Z(t.gridProps.dataItemKey);
469
+ for (let E = 0; E < n.length; E++) {
470
+ const P = f(n[E]);
471
+ P !== void 0 && r[P] && (d === -1 && (d = E, s = n[E]), l = E, u = n[E]);
472
+ }
473
+ }
474
+ const m = {
475
+ ...o,
476
+ startRowIndex: d,
477
+ endRowIndex: l,
478
+ startColIndex: 0,
479
+ endColIndex: t.columnsRef.length - 1,
480
+ startDataItem: s,
481
+ endDataItem: u
482
+ };
483
+ z(m, i);
484
+ }, ft = (e) => {
485
+ t.gridProps.onSelectionChange && g.enabled && z(e, {});
486
+ }, F = (e, n, o, r, i) => {
487
+ ht();
429
488
  const d = t.gridProps.onDataStateChange;
430
489
  if (e) {
431
- const c = { ...f(r), ...n, targetEvent: i };
432
- l(e, c);
433
- } else d && l(d, {
434
- ...f(r),
490
+ const l = { ...R(r), ...n, targetEvent: i };
491
+ c(e, l);
492
+ } else d && c(d, {
493
+ ...R(r),
435
494
  targetEvent: i || {},
436
495
  dataState: {
437
- ...xt(),
496
+ ...kt(),
438
497
  ...o
439
498
  }
440
499
  });
441
- }, Z = (e, n, o) => {
500
+ }, te = (e, n, o) => {
442
501
  var r;
443
- k && t.gridProps.pageable && ((r = m.current) == null || r.reset()), G(
502
+ y && t.gridProps.pageable && ((r = b.current) == null || r.reset()), F(
444
503
  t.gridProps.onPageChange,
445
504
  { page: e },
446
505
  { skip: e.skip, take: e.take },
447
506
  n,
448
507
  o
449
508
  );
450
- }, ut = (e, n, o) => {
509
+ }, mt = (e, n, o) => {
451
510
  var r;
452
- t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, U()) : Z(e, n, o);
453
- }, gt = () => {
511
+ t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, O()) : te(e, n, o);
512
+ }, Pt = () => {
454
513
  let e = t.gridProps.total || 0;
455
514
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
456
- }, ft = () => {
457
- k && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
458
- }, mt = (e) => {
515
+ }, ht = () => {
516
+ y && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
517
+ }, Rt = (e) => {
459
518
  var i, d;
460
- const n = (d = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? d : 0, o = (t.gridProps.skip || 0) + n, r = gt();
461
- o < r && Z({ skip: o, take: n }, e);
462
- }, Pt = (e) => {
519
+ const n = (d = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? d : 0, o = (t.gridProps.skip || 0) + n, r = Pt();
520
+ o < r && te({ skip: o, take: n }, e);
521
+ }, bt = (e) => {
463
522
  var r, i;
464
523
  const n = (i = (r = t.gridProps.take) != null ? r : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - n;
465
- o >= 0 && Z({ skip: o, take: n }, e);
466
- }, ht = (e) => {
467
- Z({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
524
+ o >= 0 && te({ skip: o, take: n }, e);
525
+ }, vt = (e) => {
526
+ te({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
468
527
  }, Te = (e, n) => {
469
- G(
528
+ F(
470
529
  t.gridProps.onSortChange,
471
530
  { sort: e },
472
- { sort: e, ...k && !t.gridProps.pageable ? { skip: 0 } : {} },
531
+ { sort: e, ...y && !t.gridProps.pageable ? { skip: 0 } : {} },
473
532
  n
474
533
  );
475
- }, Rt = (e, n) => {
476
- G(
534
+ }, It = (e, n) => {
535
+ F(
477
536
  t.gridProps.onFilterChange,
478
537
  { filter: e },
479
538
  { filter: e, skip: 0 },
480
539
  n
481
540
  );
482
- }, bt = (e) => {
541
+ }, Ct = (e) => {
483
542
  if (!e || e.length === 0) {
484
- Me({});
543
+ He({});
485
544
  return;
486
545
  }
487
- const n = kn(
546
+ const n = _e(
488
547
  t.gridProps.data,
489
548
  e,
490
549
  t.columnsRef,
491
550
  t.gridProps.dataItemKey
492
551
  );
493
- Me({ ...n });
494
- }, Me = (e) => {
495
- G(
552
+ He({ ...n });
553
+ }, He = (e) => {
554
+ F(
496
555
  t.gridProps.onHighlightChange,
497
556
  { highlight: e },
498
557
  {},
499
558
  {}
500
559
  );
501
- }, vt = (e) => {
560
+ }, Et = (e) => {
502
561
  const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
503
562
  logic: "or",
504
563
  filters: n.filter((i) => i !== void 0).map((i) => {
@@ -511,7 +570,7 @@ const xn = (t, v, g, y) => {
511
570
  };
512
571
  })
513
572
  };
514
- G(
573
+ F(
515
574
  t.gridProps.onSearchChange,
516
575
  {
517
576
  search: r
@@ -519,86 +578,86 @@ const xn = (t, v, g, y) => {
519
578
  { skip: 0 },
520
579
  e.syntheticEvent
521
580
  );
522
- }, se = () => {
581
+ }, ge = () => {
523
582
  var e;
524
- (e = A.current) == null || e.save();
525
- }, Ct = async (e) => {
583
+ (e = G.current) == null || e.save();
584
+ }, wt = async (e) => {
526
585
  var n, o;
527
586
  (n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
528
- }, ue = (e, n) => {
587
+ }, fe = (e, n) => {
529
588
  const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
530
589
  let r = {};
531
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (be.current = !0), G(
590
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (ve.current = !0), F(
532
591
  t.gridProps.onGroupChange,
533
592
  { group: e },
534
593
  { group: e, skip: 0, ...r },
535
594
  o
536
595
  );
537
- }, ge = (e) => {
596
+ }, me = (e) => {
538
597
  if (t.gridProps.onColumnsStateChange) {
539
598
  const n = {
540
599
  target: C.current,
541
600
  columnsState: e
542
601
  };
543
- l(t.gridProps.onColumnsStateChange, n);
602
+ c(t.gridProps.onColumnsStateChange, n);
544
603
  }
545
- }, fe = (e, n, o) => {
546
- const { columnsRef: r, columnsState: i } = t, d = r[e], c = Rn(i), s = d.depth, u = (b) => {
604
+ }, ne = (e, n, o) => {
605
+ const { columnsRef: r, columnsState: i } = t, d = r[e], l = vn(i), s = d.depth, u = (P) => {
547
606
  do
548
- b++;
549
- while (b < r.length && r[b].depth > s);
550
- return b;
551
- }, P = r.splice(e, u(e) - e);
552
- r.splice(e < n ? u(n - P.length) : n, 0, ...P), r.filter((b) => b.declarationIndex >= 0).forEach((b, q) => {
553
- b.orderIndex = q;
554
- const $ = c.find((X) => X.id === b.id);
555
- $ && ($.orderIndex = q);
607
+ P++;
608
+ while (P < r.length && r[P].depth > s);
609
+ return P;
610
+ }, m = r.splice(e, u(e) - e);
611
+ r.splice(e < n ? u(n - m.length) : n, 0, ...m), r.filter((P) => P.declarationIndex >= 0).forEach((P, X) => {
612
+ P.orderIndex = X;
613
+ const J = l.find((Y) => Y.id === P.id);
614
+ J && (J.orderIndex = X);
556
615
  });
557
- const I = r[e].locked && r[n].locked;
558
- dn(t.columnsMapRef, r, I || re.current), cn(t.columnsMapRef, r, I || re.current), Re.current && (re.current = !1, Re.current = !1);
559
- const ie = Y();
560
- if (U(), t.gridProps.onColumnReorder) {
561
- const b = {
616
+ const f = r[e].locked && r[n].locked;
617
+ cn(t.columnsMapRef, r, f || le.current), sn(t.columnsMapRef, r, f || le.current), be.current && (le.current = !1, be.current = !1);
618
+ const E = ee();
619
+ if (O(), t.gridProps.onColumnReorder) {
620
+ const P = {
562
621
  target: C.current,
563
- columns: ie,
622
+ columns: E,
564
623
  columnId: d.id,
565
624
  nativeEvent: o
566
625
  };
567
- l(t.gridProps.onColumnReorder, b);
626
+ c(t.gridProps.onColumnReorder, P);
568
627
  }
569
- ge(i);
570
- }, B = (e, n, o) => {
628
+ me(i);
629
+ }, j = (e, n, o) => {
571
630
  const r = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
572
- if (o === "forbidden" || !r || !_.current)
631
+ if (o === "forbidden" || !r || !$.current)
573
632
  return;
574
633
  const i = t.dataRef[n];
575
- t.gridProps.onRowReorder && l(t.gridProps.onRowReorder, {
576
- draggedDataItems: [_.current],
634
+ t.gridProps.onRowReorder && c(t.gridProps.onRowReorder, {
635
+ draggedDataItems: [$.current],
577
636
  droppedDataItem: i == null ? void 0 : i.dataItem,
578
637
  dropPosition: o,
579
638
  nativeEvent: e.originalEvent,
580
639
  dragEvent: e,
581
640
  target: C.current
582
- }), _.current = null;
583
- }, It = (e, n, o) => {
641
+ }), $.current = null;
642
+ }, yt = (e, n, o) => {
584
643
  if (t.gridProps.group === void 0)
585
644
  return;
586
645
  const r = t.gridProps.group.slice();
587
- r.splice(n, 0, ...r.splice(e, 1)), ue(r, o);
646
+ r.splice(n, 0, ...r.splice(e, 1)), fe(r, o);
588
647
  }, Ae = (e, n, o) => {
589
648
  const r = t.columnsRef[e].field;
590
649
  if (!r)
591
650
  return;
592
651
  const i = (t.gridProps.group || []).slice();
593
- i.splice(n, 0, { field: r }), ue(i, o);
594
- }, Et = (e, n) => {
595
- const o = D.current.getCurrentGroupsLength;
652
+ i.splice(n, 0, { field: r }), fe(i, o);
653
+ }, xt = (e, n) => {
654
+ const o = K.current.getCurrentGroupsLength;
596
655
  Ae(e, o, n);
597
- }, me = () => {
656
+ }, Pe = () => {
598
657
  let e = 0;
599
- if (!x.current.colGroupMain)
658
+ if (!k.current.colGroupMain)
600
659
  return;
601
- const n = x.current.colGroupMain.children;
660
+ const n = k.current.colGroupMain.children;
602
661
  for (let o = 0; o < n.length; o++) {
603
662
  const r = n[o].width;
604
663
  if (!r) {
@@ -607,23 +666,23 @@ const xn = (t, v, g, y) => {
607
666
  }
608
667
  e += parseFloat(r.toString());
609
668
  }
610
- e = Math.round(e), j.current && j.current.setWidth(e), W.current && W.current.setWidth(e), T.current && (T.current.style.width = e ? e + "px" : "");
611
- }, He = () => {
612
- var e;
613
- t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0);
669
+ e = Math.round(e), q.current && q.current.setWidth(e), _.current && _.current.setWidth(e), H.current && (H.current.style.width = e ? e + "px" : "");
614
670
  }, Ge = () => {
615
671
  var e;
616
- t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = V.current) == null ? void 0 : e.offsetHeight) || 0);
617
- }, wt = () => {
672
+ t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = A.current) == null ? void 0 : e.offsetWidth) || 0);
673
+ }, re = () => {
674
+ var e;
675
+ t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = T.current) == null ? void 0 : e.offsetHeight) || 0);
676
+ }, St = () => {
618
677
  const e = t.gridProps.minRowHeightRef;
619
678
  if (e && !e.current && !t.gridProps.rowHeight) {
620
- const n = bn(z.current);
621
- n && (e.current = n, U());
679
+ const n = In(U.current);
680
+ n && (e.current = n, O());
622
681
  }
623
- }, p = a.useCallback(
682
+ }, oe = a.useCallback(
624
683
  (e, n, o, r, i) => {
625
684
  var u;
626
- if (!yt() && !o || !e)
685
+ if (!Dt() && !o || !e)
627
686
  return;
628
687
  const d = {
629
688
  type: e,
@@ -634,13 +693,13 @@ const xn = (t, v, g, y) => {
634
693
  field: i,
635
694
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
636
695
  ...o
637
- }, c = w(), s = $t({
696
+ }, l = w(), s = Jt({
638
697
  event: d,
639
- data: c,
698
+ data: l,
640
699
  selectedState: (u = t.gridProps.select) != null ? u : {},
641
- previousCopiedItems: Oe.current
700
+ previousCopiedItems: Ne.current
642
701
  });
643
- e !== xe.paste && (Oe.current = s.copiedItems), t.gridProps.onClipboard && v && l(t.gridProps.onClipboard, {
702
+ e !== De.paste && (Ne.current = s.copiedItems), t.gridProps.onClipboard && I && c(t.gridProps.onClipboard, {
644
703
  ...d,
645
704
  ...s
646
705
  });
@@ -652,24 +711,24 @@ const xn = (t, v, g, y) => {
652
711
  t.gridProps.clipboard,
653
712
  t.gridProps.onClipboard
654
713
  ]
655
- ), yt = () => {
656
- var i, d, c;
657
- if (!ae)
714
+ ), Dt = () => {
715
+ var i, d, l;
716
+ if (!Q)
658
717
  return !1;
659
- const e = Vt(S()), n = e ? e.matches(".k-table-td") ? e : (i = S()) == null ? void 0 : i.body : (d = S()) == null ? void 0 : d.body, o = n.closest(".k-grid-container"), r = n && ((c = M.current) == null ? void 0 : c.contains(n));
718
+ const e = jt(D()), n = e ? e.matches(".k-table-td") ? e : (i = D()) == null ? void 0 : i.body : (d = D()) == null ? void 0 : d.body, o = n.closest(".k-grid-container"), r = n && ((l = A.current) == null ? void 0 : l.contains(n));
660
719
  return !!(n && r && o);
661
- }, St = (e, n, o, r, i, d, c) => {
662
- me(), re.current = !0, Re.current = !0, t.gridProps.onColumnResize && v && l(t.gridProps.onColumnResize, {
663
- columns: Y(),
720
+ }, Le = (e, n, o, r, i, d, l) => {
721
+ Pe(), le.current = !0, be.current = !0, t.gridProps.onColumnResize && I && c(t.gridProps.onColumnResize, {
722
+ columns: ee(),
664
723
  nativeEvent: r,
665
- targetColumnId: c,
724
+ targetColumnId: l,
666
725
  index: e,
667
726
  newWidth: n,
668
727
  oldWidth: o,
669
728
  end: i,
670
729
  target: C.current
671
- }), i && ge(d);
672
- }, xt = () => {
730
+ }), i && me(d);
731
+ }, kt = () => {
673
732
  var e;
674
733
  return {
675
734
  filter: t.gridProps.filter,
@@ -678,190 +737,207 @@ const xn = (t, v, g, y) => {
678
737
  take: (e = t.gridProps.take) != null ? e : t.gridProps.pageSize,
679
738
  group: t.gridProps.group
680
739
  };
681
- }, f = (e) => ({
740
+ }, R = (e) => ({
682
741
  nativeEvent: e && e.nativeEvent,
683
742
  syntheticEvent: e,
684
743
  target: C.current
685
- }), kt = (e) => ({
744
+ }), Kt = (e) => ({
686
745
  ...e,
687
746
  nativeEvent: void 0,
688
747
  syntheticEvent: void 0,
689
748
  target: void 0,
690
749
  targetEvent: void 0,
691
750
  focusElement: void 0
692
- }), l = (e, n) => {
751
+ }), c = (e, n) => {
693
752
  if (t.gridProps.isClient) {
694
753
  e(n);
695
754
  return;
696
755
  }
697
- e(kt(n));
698
- }, Dt = () => {
756
+ e(Kt(n));
757
+ }, Mt = () => {
699
758
  var e, n, o;
700
- if (z.current && ((e = z.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
701
- Ce.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? ve.current = document.activeElement : ve.current = void 0;
702
- const r = Array.from((o = z.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
703
- r.length > ye.current.length ? ne.current = r.filter(
704
- (i) => !ye.current.includes(i)
705
- )[0] : r.length === 1 && (ne.current = r[0], Ce.current = !0), ye.current = r;
759
+ if (U.current && ((e = U.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
760
+ Ce.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? Ie.current = document.activeElement : Ie.current = void 0;
761
+ const r = Array.from((o = U.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
762
+ r.length > xe.current.length ? de.current = r.filter(
763
+ (i) => !xe.current.includes(i)
764
+ )[0] : r.length === 1 && (de.current = r[0], Ce.current = !0), xe.current = r;
706
765
  }
707
- }, w = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), S = () => {
766
+ }, w = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), D = () => {
708
767
  var e;
709
- if (ae)
710
- return ((e = ee()) == null ? void 0 : e.ownerDocument) || document;
711
- }, ee = () => M.current, Pe = a.useCallback(
768
+ if (Q)
769
+ return ((e = ie()) == null ? void 0 : e.ownerDocument) || document;
770
+ }, ie = () => A.current, he = a.useCallback(
712
771
  (e) => {
713
772
  var r, i;
714
- if (!m.current || !((r = m.current) != null && r.container) || t.gridProps.scrollable === "none")
773
+ if (!b.current || !((r = b.current) != null && r.container) || t.gridProps.scrollable === "none")
715
774
  return;
716
- F.current && F.current.disconnect();
717
- const { rowIndex: n } = e, o = ee();
718
- if (k) {
719
- const d = ((i = m.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
720
- m.current.container.scroll(0, d);
775
+ B.current && B.current.disconnect();
776
+ const { rowIndex: n } = e, o = ie();
777
+ if (y) {
778
+ const d = ((i = b.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
779
+ b.current.container.scroll(0, d);
721
780
  } else if (o) {
722
781
  const d = n < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${n + 1})`);
723
- d && V.current && (V.current.scrollTop = d.offsetTop);
782
+ d && T.current && (T.current.scrollTop = d.offsetTop);
724
783
  }
725
784
  },
726
785
  [t.gridProps.scrollable]
727
- ), Le = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), Kt = () => Le(Ft) === Le(t.columnsRef), Tt = () => {
728
- oe.current = window.innerWidth, Kt() || U();
729
- }, Mt = () => {
786
+ ), ze = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), Tt = () => ze(Ot) === ze(t.columnsRef), Ht = () => {
787
+ ce.current = window.innerWidth, Tt() || O();
788
+ }, At = () => {
730
789
  var d;
731
- const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = m.current, i = t.gridProps.rowHeight || ((d = o.minRowHeightRef) == null ? void 0 : d.current) || 0;
732
- r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = ut, r.pageSize = n, r.scrollableVirtual = k, r.container = V.current, r.tableBody = z.current, r.scrollHeightContainer = ze.current, r.table = T.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new _t(e, i)));
790
+ const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = b.current, i = t.gridProps.rowHeight || ((d = o.minRowHeightRef) == null ? void 0 : d.current) || 0;
791
+ r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = mt, r.pageSize = n, r.scrollableVirtual = y, r.container = T.current, r.tableBody = U.current, r.scrollHeightContainer = Oe.current, r.table = H.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new $t(e, i)));
733
792
  }, Fe = a.useCallback(
734
793
  (e) => {
735
- const n = { rowIndex: we.current };
794
+ const n = { rowIndex: ye.current };
736
795
  e.forEach((o) => {
737
- o.boundingClientRect.height !== o.intersectionRect.height && Pe(n);
796
+ o.boundingClientRect.height !== o.intersectionRect.height && he(n);
738
797
  });
739
798
  },
740
- [Pe]
741
- ), U = () => {
799
+ [he]
800
+ ), O = () => {
742
801
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
743
- }, At = (e) => e.left !== void 0 ? Se !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, C = a.useRef(null), m = a.useRef(void 0), x = a.useRef(void 0), D = a.useRef(void 0), K = a.useRef(void 0), L = a.useRef(void 0), te = a.useRef(void 0), F = a.useRef(null), z = a.useRef(null), Ht = a.useRef(null), V = a.useRef(null), T = a.useRef(null), he = a.useRef(null), M = a.useRef(null), ze = a.useRef(null), W = a.useRef(null), j = a.useRef(null), Re = a.useRef(!1), be = a.useRef(!1), ne = a.useRef(void 0), ve = a.useRef(void 0), Ce = a.useRef(!1), re = a.useRef(!0), Ie = a.useRef(0), Ee = a.useRef(void 0), we = a.useRef(void 0), ye = a.useRef([]), Oe = a.useRef([]), oe = a.useRef(0), _ = a.useRef(null), Gt = a.useRef(null), Lt = a.useRef(null), Se = Wt(M), k = t.isVirtualScroll, Ft = a.useMemo(() => a.Children.toArray(t.gridProps.children), [t.gridProps.children]), Ne = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, R = ce(t.gridProps.selectable), Be = Xt(t.gridProps.editable), zt = oe.current && N && oe.current <= N.medium && t.gridProps.adaptive;
802
+ }, Gt = (e) => e.left !== void 0 ? Se !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, C = a.useRef(null), b = a.useRef(void 0), k = a.useRef(void 0), K = a.useRef(void 0), M = a.useRef(void 0), N = a.useRef(void 0), ae = a.useRef(void 0), B = a.useRef(null), U = a.useRef(null), Lt = a.useRef(null), T = a.useRef(null), H = a.useRef(null), Re = a.useRef(null), A = a.useRef(null), Oe = a.useRef(null), _ = a.useRef(null), q = a.useRef(null), be = a.useRef(!1), ve = a.useRef(!1), de = a.useRef(void 0), Ie = a.useRef(void 0), Ce = a.useRef(!1), le = a.useRef(!0), Ee = a.useRef(0), we = a.useRef(void 0), ye = a.useRef(void 0), xe = a.useRef([]), Ne = a.useRef([]), ce = a.useRef(0), $ = a.useRef(null), zt = a.useRef(null), Ft = a.useRef(null), Se = _t(A), y = t.isVirtualScroll, Ot = a.useMemo(() => a.Children.toArray(t.gridProps.children), [t.gridProps.children]), Be = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, g = se(t.gridProps.selectable), Ue = Yt(t.gridProps.editable), Nt = ce.current && W && ce.current <= W.medium && t.gridProps.adaptive;
744
803
  return a.useMemo(() => {
745
- O.onConstructor({
804
+ V.onConstructor({
746
805
  navigatable: !!t.gridProps.navigatable,
747
- contextStateRef: K,
748
- navigationStateRef: L,
806
+ contextStateRef: M,
807
+ navigationStateRef: N,
749
808
  idPrefix: t.id
750
- }), m.current = new vn();
809
+ }), b.current = new Cn();
751
810
  }, []), a.useMemo(() => {
752
811
  var e;
753
- (e = m.current) == null || e.reset();
812
+ (e = b.current) == null || e.reset();
754
813
  }, [
755
814
  t.gridProps.scrollable,
756
815
  t.gridProps.total,
757
816
  t.gridProps.filter,
758
817
  t.gridProps.group,
759
- Ne,
818
+ Be,
760
819
  t.gridProps.sort,
761
820
  t.gridProps.rowHeight
762
- ]), a.useEffect(() => (t.gridProps.clipboard && (te.current = new Jt(p), te.current.addEventListeners(S())), () => {
763
- te.current && te.current.removeEventListeners(S());
764
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, p, S]), a.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(un) && (he.current && (he.current.style.display = "block"), T.current && (T.current.style.display = "block")), He(), me(), Ue(), O.onComponentDidMount({
765
- scope: M.current || void 0,
766
- contextStateRef: K,
767
- navigationStateRef: L
821
+ ]), a.useEffect(() => (t.gridProps.clipboard && (ae.current = new Qt(oe), ae.current.addEventListeners(D())), () => {
822
+ ae.current && ae.current.removeEventListeners(D());
823
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard, oe, D]), a.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(fn) && (Re.current && (Re.current.style.display = "block"), H.current && (H.current.style.display = "block")), Ge(), Pe(), Ve(), V.onComponentDidMount({
824
+ scope: A.current || void 0,
825
+ contextStateRef: M,
826
+ navigationStateRef: N
768
827
  }), () => {
769
- clearTimeout(Ee.current);
828
+ clearTimeout(we.current);
770
829
  }), []), a.useEffect(() => {
771
830
  var e;
772
- He(), me(), Ue(), k && (Ge(), wt(), (e = m.current) == null || e.update()), Dt(), O.onComponentDidUpdate({
773
- scope: M.current || void 0,
774
- contextStateRef: K,
775
- navigationStateRef: L,
776
- focusFirst: be.current,
777
- newEditableRow: ne.current,
831
+ Ge(), Pe(), Ve(), y && (re(), St(), (e = b.current) == null || e.update()), Mt(), V.onComponentDidUpdate({
832
+ scope: A.current || void 0,
833
+ contextStateRef: M,
834
+ navigationStateRef: N,
835
+ focusFirst: ve.current,
836
+ newEditableRow: de.current,
778
837
  singleEditRow: Ce.current,
779
- lastActiveElement: ve.current,
838
+ lastActiveElement: Ie.current,
780
839
  navigatable: t.gridProps.navigatable
781
- }), be.current = !1, ne.current = void 0;
840
+ }), ve.current = !1, de.current = void 0;
782
841
  }), a.useEffect(() => {
783
- if (ae) {
842
+ if (Q) {
784
843
  const e = {
785
844
  rootMargin: "0px",
786
845
  threshold: 0.9
787
846
  };
788
- F.current = window.IntersectionObserver && new window.IntersectionObserver(Fe, e) || null;
847
+ B.current = window.IntersectionObserver && new window.IntersectionObserver(Fe, e) || null;
789
848
  }
790
849
  }, [Fe]), a.useEffect(() => {
791
850
  var n;
792
851
  let e;
793
- return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
794
- Tt(), k && Ge();
795
- }), e.observe((n = S()) == null ? void 0 : n.body)), () => {
852
+ return Q && window.ResizeObserver && (e = new window.ResizeObserver(() => {
853
+ Ht(), y && re();
854
+ }), e.observe((n = D()) == null ? void 0 : n.body)), () => {
796
855
  e == null || e.disconnect();
797
856
  };
798
- }, []), a.useImperativeHandle(
857
+ }, []), a.useEffect(() => {
858
+ if (!Q || !window.ResizeObserver || !y || !T.current)
859
+ return;
860
+ const e = () => {
861
+ var i, d;
862
+ const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
863
+ re();
864
+ const r = ((d = t.gridProps.containerHeightRef) == null ? void 0 : d.current) || 0;
865
+ (o === 0 && r > 0 || Math.abs(r - o) > 10) && O();
866
+ }, n = new window.ResizeObserver(e);
867
+ return n.observe(T.current), () => {
868
+ n.disconnect();
869
+ };
870
+ }, [y, re]), a.useImperativeHandle(
799
871
  C,
800
872
  () => ({
801
873
  get element() {
802
- return ee();
874
+ return ie();
803
875
  },
804
876
  props: t.gridProps,
805
877
  get columns() {
806
- return Y();
878
+ return ee();
807
879
  },
808
880
  scrollIntoView: (e) => {
809
881
  var r;
810
- if (!((r = m.current) != null && r.container) || t.gridProps.scrollable === "none")
882
+ if (!((r = b.current) != null && r.container) || t.gridProps.scrollable === "none")
811
883
  return;
812
884
  const { rowIndex: n } = e;
813
- we.current = n;
814
- const o = ee();
815
- if (F.current && o) {
816
- F.current.disconnect();
817
- const i = o.querySelector(`[absolute-row-index="${we.current}"]`);
818
- i ? F.current.observe(i) : Pe(e);
885
+ ye.current = n;
886
+ const o = ie();
887
+ if (B.current && o) {
888
+ B.current.disconnect();
889
+ const i = o.querySelector(`[absolute-row-index="${ye.current}"]`);
890
+ i ? B.current.observe(i) : he(e);
819
891
  }
820
892
  },
821
893
  fitColumns: (e) => {
822
- x.current.dblClickHandler(null, e);
894
+ k.current.dblClickHandler(null, e);
823
895
  },
824
- exportAsPdf: se
896
+ exportAsPdf: ge
825
897
  })
826
898
  ), a.useImperativeHandle(t.gridRef, () => C.current), a.useMemo(() => {
827
- x.current = new ln(St);
899
+ k.current = new un(Le);
828
900
  }, [t.gridProps.onColumnResize, t.columnsRef]), a.useMemo(() => {
829
- D.current = new sn(fe, It, Ae);
901
+ K.current = new gn(ne, yt, Ae);
830
902
  }, [
831
903
  t.gridProps.onColumnReorder,
832
904
  t.gridProps.onGroupChange,
833
905
  t.gridProps.group,
834
906
  t.columnsRef,
835
907
  t.gridProps.groupable
836
- ]), x.current.resizable = t.gridProps.resizable || !1, x.current.columns = t.columnsRef, x.current.columnsState = jt(t.columnsState), D.current.reorderable = t.gridProps.reorderable || !1, D.current.groupable = Ne, D.current.columns = t.columnsRef, D.current.dir = Se, Mt(), /* @__PURE__ */ a.createElement(
837
- yn.Provider,
908
+ ]), k.current.resizable = t.gridProps.resizable || !1, k.current.columns = t.columnsRef, k.current.columnsState = qt(t.columnsState), K.current.reorderable = t.gridProps.reorderable || !1, K.current.groupable = Be, K.current.columns = t.columnsRef, K.current.dir = Se, At(), /* @__PURE__ */ a.createElement(
909
+ Sn.Provider,
838
910
  {
839
911
  value: {
840
- isClient: v,
841
- rowReorder: B,
842
- activeDragRowDataItemRef: _,
843
- reorderRowDragTargetRef: Gt,
844
- reorderRowDropTargetRef: Lt,
912
+ isClient: I,
913
+ rowReorder: j,
914
+ activeDragRowDataItemRef: $,
915
+ reorderRowDragTargetRef: zt,
916
+ reorderRowDropTargetRef: Ft,
845
917
  dir: Se,
846
- getCellPositionStyle: At,
918
+ getCellPositionStyle: Gt,
847
919
  dataItemKey: t.gridProps.dataItemKey,
848
920
  columnsState: t.columnsState,
849
921
  columnsRef: t.columnsRef,
850
- onColumnsStateChange: ge,
922
+ hiddenColumnsRef: t.hiddenColumnsRef,
923
+ onColumnsStateChange: me,
851
924
  groupable: t.gridProps.groupable,
852
925
  group: t.gridProps.group,
926
+ reorderable: t.gridProps.reorderable,
853
927
  defaultGroup: t.gridProps.defaultGroup,
854
- groupChange: ue,
855
- selectionRelease: dt,
856
- pagerPageChange: ht,
857
- onContextMenu: _e,
858
- rowClick: Ye,
859
- rowDblClick: Qe,
860
- cellClick: et,
861
- headerCellClick: Ke,
862
- itemChange: rt,
863
- onDialogEditCancel: pe,
864
- onDialogEditSubmit: Ze,
928
+ groupChange: fe,
929
+ selectionRelease: ct,
930
+ pagerPageChange: vt,
931
+ onContextMenu: $e,
932
+ rowClick: Ze,
933
+ rowDblClick: pe,
934
+ cellClick: nt,
935
+ headerCellClick: Me,
936
+ itemChange: it,
937
+ onDialogEditCancel: tt,
938
+ onDialogEditSubmit: et,
939
+ columnReorder: ne,
940
+ onResize: Le,
865
941
  sortable: t.gridProps.sortable,
866
942
  sort: t.gridProps.sort,
867
943
  defaultSort: t.gridProps.defaultSort,
@@ -869,64 +945,65 @@ const xn = (t, v, g, y) => {
869
945
  filterable: t.gridProps.filterable,
870
946
  filter: t.gridProps.filter,
871
947
  defaultFilter: t.gridProps.defaultFilter,
872
- filterOperators: t.gridProps.filterOperators || Sn,
873
- filterChange: Rt,
874
- applyHighlightDescriptor: bt,
948
+ filterOperators: t.gridProps.filterOperators || Dn,
949
+ filterChange: It,
950
+ applyHighlightDescriptor: Ct,
951
+ applySelectionDescriptor: gt,
875
952
  highlight: t.gridProps.highlight,
876
- searchChange: vt,
877
- exportAsPdf: se,
878
- onHeaderSelectionChange: at,
879
- columnGroupChange: Et,
880
- onKeyDown: $e,
881
- onFocus: Xe,
882
- scrollHandler: qe,
883
- selectionChange: ot,
884
- mobileMode: zt,
885
- adaptiveColumnMenuRef: oe.current,
953
+ searchChange: Et,
954
+ exportAsPdf: ge,
955
+ onHeaderSelectionChange: lt,
956
+ columnGroupChange: xt,
957
+ onKeyDown: Je,
958
+ onFocus: Ye,
959
+ scrollHandler: Xe,
960
+ selectionChange: at,
961
+ mobileMode: Nt,
962
+ adaptiveColumnMenuRef: ce.current,
886
963
  adpativeTitle: t.gridProps.adaptiveTitle,
887
964
  adaptive: t.gridProps.adaptive,
888
- dispatchDetailExpand: tt,
889
- dispatchGroupExpand: nt,
890
- columnResizeRef: x,
891
- dragLogicRef: D,
892
- navigationStateRef: L,
893
- tableElementRef: T,
894
- tableBodyElementRef: z,
895
- headerElementRef: Ht,
896
- containerElementRef: V,
897
- headTableElementRef: he,
898
- elementRef: M,
899
- virtualScrollHeightContainerRef: ze,
900
- footerRef: W,
901
- headerRef: j,
902
- vsRef: m
965
+ dispatchDetailExpand: rt,
966
+ dispatchGroupExpand: ot,
967
+ columnResizeRef: k,
968
+ dragLogicRef: K,
969
+ navigationStateRef: N,
970
+ tableElementRef: H,
971
+ tableBodyElementRef: U,
972
+ headerElementRef: Lt,
973
+ containerElementRef: T,
974
+ headTableElementRef: Re,
975
+ elementRef: A,
976
+ virtualScrollHeightContainerRef: Oe,
977
+ footerRef: _,
978
+ headerRef: q,
979
+ vsRef: b
903
980
  }
904
981
  },
905
- /* @__PURE__ */ a.createElement(Yt.Provider, { value: K.current }, t.children),
982
+ /* @__PURE__ */ a.createElement(Zt.Provider, { value: M.current }, t.children),
906
983
  /* @__PURE__ */ a.createElement(
907
- Cn,
984
+ En,
908
985
  {
909
- show: g.show && (J == null ? void 0 : J.length),
910
- dataItem: g.dataItem,
911
- field: g.field,
912
- items: J,
913
- offset: g.offset,
914
- onClose: H,
915
- onSelect: je
986
+ show: h.show && (p == null ? void 0 : p.length),
987
+ dataItem: h.dataItem,
988
+ field: h.field,
989
+ items: p,
990
+ offset: h.offset,
991
+ onClose: L,
992
+ onSelect: qe
916
993
  }
917
994
  ),
918
995
  t.gridProps.pdf && /* @__PURE__ */ a.createElement(
919
- wn,
996
+ xn,
920
997
  {
921
998
  gridProps: t.gridProps,
922
999
  innerGrid: t.innerGrid,
923
1000
  pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
924
- onPdfExport: Ct,
925
- ref: (e) => A.current = e
1001
+ onPdfExport: wt,
1002
+ ref: (e) => G.current = e
926
1003
  }
927
1004
  )
928
1005
  );
929
1006
  };
930
1007
  export {
931
- Wn as GridClientWrapper
1008
+ jn as GridClientWrapper
932
1009
  };