@progress/kendo-react-grid 12.2.1-develop.1 → 12.3.0-develop.10

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 Be, 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 Se, getEditableOptions as Xt, tableKeyboardNavigation as O, ClipboardService as Jt, TableKeyboardNavigationContext as Yt, editReducer as Qt, EDIT_ACTION as Zt, getDetailExpandableOptions as pt, detailExpandReducer as en, getGroupExpandableOptions as tn, groupExpandReducer as nn, getSelectedState as Ue, getSelectedStateFromKeyDown as rn, closestTagName as Ve, 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]), xe = 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]), ke = 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 ? ke : xe;
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, ke, xe, 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
- De(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
- le();
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
- Se.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
- Se.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(Ie.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 === Ce.current) && (Ie.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 !== Ce.current && m.current.scrollHandler(e), t.gridProps.onScroll && v && l(t.gridProps.onScroll, {
167
- ...f(e)
168
- }), Ce.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
- ge(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
- ge(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 && e.target.nodeName === "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 && e.target.nodeName === "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 (Ne.enabled && Ne.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
- }, De = (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 }), Ke(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 ? Ue({
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 = Ve(r, "TD"), d = Ve(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 = Ue({
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,81 +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);
468
- }, Ke = (e, n) => {
469
- G(
524
+ o >= 0 && te({ skip: o, take: n }, e);
525
+ }, vt = (e) => {
526
+ te({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
527
+ }, Te = (e, n) => {
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
- Te({});
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
- Te({ ...n });
494
- }, Te = (e) => {
495
- G(t.gridProps.onHighlightChange, { highlight: e }, {}, {});
496
- }, vt = (e) => {
552
+ He({ ...n });
553
+ }, He = (e) => {
554
+ F(
555
+ t.gridProps.onHighlightChange,
556
+ { highlight: e },
557
+ {},
558
+ {}
559
+ );
560
+ }, Et = (e) => {
497
561
  const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
498
562
  logic: "or",
499
563
  filters: n.filter((i) => i !== void 0).map((i) => {
@@ -506,7 +570,7 @@ const xn = (t, v, g, y) => {
506
570
  };
507
571
  })
508
572
  };
509
- G(
573
+ F(
510
574
  t.gridProps.onSearchChange,
511
575
  {
512
576
  search: r
@@ -514,86 +578,86 @@ const xn = (t, v, g, y) => {
514
578
  { skip: 0 },
515
579
  e.syntheticEvent
516
580
  );
517
- }, le = () => {
581
+ }, ge = () => {
518
582
  var e;
519
- (e = A.current) == null || e.save();
520
- }, Ct = async (e) => {
583
+ (e = G.current) == null || e.save();
584
+ }, wt = async (e) => {
521
585
  var n, o;
522
586
  (n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
523
- }, se = (e, n) => {
587
+ }, fe = (e, n) => {
524
588
  const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
525
589
  let r = {};
526
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Re.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(
527
591
  t.gridProps.onGroupChange,
528
592
  { group: e },
529
593
  { group: e, skip: 0, ...r },
530
594
  o
531
595
  );
532
- }, ue = (e) => {
596
+ }, me = (e) => {
533
597
  if (t.gridProps.onColumnsStateChange) {
534
598
  const n = {
535
599
  target: C.current,
536
600
  columnsState: e
537
601
  };
538
- l(t.gridProps.onColumnsStateChange, n);
602
+ c(t.gridProps.onColumnsStateChange, n);
539
603
  }
540
- }, ge = (e, n, o) => {
541
- 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) => {
542
606
  do
543
- b++;
544
- while (b < r.length && r[b].depth > s);
545
- return b;
546
- }, P = r.splice(e, u(e) - e);
547
- r.splice(e < n ? u(n - P.length) : n, 0, ...P), r.filter((b) => b.declarationIndex >= 0).forEach((b, q) => {
548
- b.orderIndex = q;
549
- const $ = c.find((X) => X.id === b.id);
550
- $ && ($.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);
551
615
  });
552
- const I = r[e].locked && r[n].locked;
553
- dn(t.columnsMapRef, r, I || re.current), cn(t.columnsMapRef, r, I || re.current), he.current && (re.current = !1, he.current = !1);
554
- const ie = Y();
555
- if (U(), t.gridProps.onColumnReorder) {
556
- 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 = {
557
621
  target: C.current,
558
- columns: ie,
622
+ columns: E,
559
623
  columnId: d.id,
560
624
  nativeEvent: o
561
625
  };
562
- l(t.gridProps.onColumnReorder, b);
626
+ c(t.gridProps.onColumnReorder, P);
563
627
  }
564
- ue(i);
565
- }, B = (e, n, o) => {
628
+ me(i);
629
+ }, j = (e, n, o) => {
566
630
  const r = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
567
- if (o === "forbidden" || !r || !_.current)
631
+ if (o === "forbidden" || !r || !$.current)
568
632
  return;
569
633
  const i = t.dataRef[n];
570
- t.gridProps.onRowReorder && l(t.gridProps.onRowReorder, {
571
- draggedDataItems: [_.current],
634
+ t.gridProps.onRowReorder && c(t.gridProps.onRowReorder, {
635
+ draggedDataItems: [$.current],
572
636
  droppedDataItem: i == null ? void 0 : i.dataItem,
573
637
  dropPosition: o,
574
638
  nativeEvent: e.originalEvent,
575
639
  dragEvent: e,
576
640
  target: C.current
577
- }), _.current = null;
578
- }, It = (e, n, o) => {
641
+ }), $.current = null;
642
+ }, yt = (e, n, o) => {
579
643
  if (t.gridProps.group === void 0)
580
644
  return;
581
645
  const r = t.gridProps.group.slice();
582
- r.splice(n, 0, ...r.splice(e, 1)), se(r, o);
583
- }, Me = (e, n, o) => {
646
+ r.splice(n, 0, ...r.splice(e, 1)), fe(r, o);
647
+ }, Ae = (e, n, o) => {
584
648
  const r = t.columnsRef[e].field;
585
649
  if (!r)
586
650
  return;
587
651
  const i = (t.gridProps.group || []).slice();
588
- i.splice(n, 0, { field: r }), se(i, o);
589
- }, Et = (e, n) => {
590
- const o = D.current.getCurrentGroupsLength;
591
- Me(e, o, n);
592
- }, fe = () => {
652
+ i.splice(n, 0, { field: r }), fe(i, o);
653
+ }, xt = (e, n) => {
654
+ const o = K.current.getCurrentGroupsLength;
655
+ Ae(e, o, n);
656
+ }, Pe = () => {
593
657
  let e = 0;
594
- if (!x.current.colGroupMain)
658
+ if (!k.current.colGroupMain)
595
659
  return;
596
- const n = x.current.colGroupMain.children;
660
+ const n = k.current.colGroupMain.children;
597
661
  for (let o = 0; o < n.length; o++) {
598
662
  const r = n[o].width;
599
663
  if (!r) {
@@ -602,23 +666,23 @@ const xn = (t, v, g, y) => {
602
666
  }
603
667
  e += parseFloat(r.toString());
604
668
  }
605
- 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" : "");
606
- }, Ae = () => {
669
+ e = Math.round(e), q.current && q.current.setWidth(e), _.current && _.current.setWidth(e), H.current && (H.current.style.width = e ? e + "px" : "");
670
+ }, Ge = () => {
607
671
  var e;
608
- t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = M.current) == null ? void 0 : e.offsetWidth) || 0);
609
- }, He = () => {
672
+ t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = A.current) == null ? void 0 : e.offsetWidth) || 0);
673
+ }, re = () => {
610
674
  var e;
611
- t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = V.current) == null ? void 0 : e.offsetHeight) || 0);
612
- }, wt = () => {
675
+ t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = T.current) == null ? void 0 : e.offsetHeight) || 0);
676
+ }, St = () => {
613
677
  const e = t.gridProps.minRowHeightRef;
614
678
  if (e && !e.current && !t.gridProps.rowHeight) {
615
- const n = bn(z.current);
616
- n && (e.current = n, U());
679
+ const n = In(U.current);
680
+ n && (e.current = n, O());
617
681
  }
618
- }, p = a.useCallback(
682
+ }, oe = a.useCallback(
619
683
  (e, n, o, r, i) => {
620
684
  var u;
621
- if (!yt() && !o || !e)
685
+ if (!Dt() && !o || !e)
622
686
  return;
623
687
  const d = {
624
688
  type: e,
@@ -629,13 +693,13 @@ const xn = (t, v, g, y) => {
629
693
  field: i,
630
694
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
631
695
  ...o
632
- }, c = w(), s = $t({
696
+ }, l = w(), s = Jt({
633
697
  event: d,
634
- data: c,
698
+ data: l,
635
699
  selectedState: (u = t.gridProps.select) != null ? u : {},
636
- previousCopiedItems: ze.current
700
+ previousCopiedItems: Ne.current
637
701
  });
638
- e !== Se.paste && (ze.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, {
639
703
  ...d,
640
704
  ...s
641
705
  });
@@ -647,24 +711,24 @@ const xn = (t, v, g, y) => {
647
711
  t.gridProps.clipboard,
648
712
  t.gridProps.onClipboard
649
713
  ]
650
- ), yt = () => {
651
- var i, d, c;
652
- if (!ae)
714
+ ), Dt = () => {
715
+ var i, d, l;
716
+ if (!Q)
653
717
  return !1;
654
- 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));
655
719
  return !!(n && r && o);
656
- }, St = (e, n, o, r, i, d, c) => {
657
- fe(), re.current = !0, he.current = !0, t.gridProps.onColumnResize && v && l(t.gridProps.onColumnResize, {
658
- 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(),
659
723
  nativeEvent: r,
660
- targetColumnId: c,
724
+ targetColumnId: l,
661
725
  index: e,
662
726
  newWidth: n,
663
727
  oldWidth: o,
664
728
  end: i,
665
729
  target: C.current
666
- }), i && ue(d);
667
- }, xt = () => {
730
+ }), i && me(d);
731
+ }, kt = () => {
668
732
  var e;
669
733
  return {
670
734
  filter: t.gridProps.filter,
@@ -673,255 +737,273 @@ const xn = (t, v, g, y) => {
673
737
  take: (e = t.gridProps.take) != null ? e : t.gridProps.pageSize,
674
738
  group: t.gridProps.group
675
739
  };
676
- }, f = (e) => ({
740
+ }, R = (e) => ({
677
741
  nativeEvent: e && e.nativeEvent,
678
742
  syntheticEvent: e,
679
743
  target: C.current
680
- }), kt = (e) => ({
744
+ }), Kt = (e) => ({
681
745
  ...e,
682
746
  nativeEvent: void 0,
683
747
  syntheticEvent: void 0,
684
748
  target: void 0,
685
749
  targetEvent: void 0,
686
750
  focusElement: void 0
687
- }), l = (e, n) => {
751
+ }), c = (e, n) => {
688
752
  if (t.gridProps.isClient) {
689
753
  e(n);
690
754
  return;
691
755
  }
692
- e(kt(n));
693
- }, Dt = () => {
756
+ e(Kt(n));
757
+ }, Mt = () => {
694
758
  var e, n, o;
695
- if (z.current && ((e = z.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
696
- ve.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? be.current = document.activeElement : be.current = void 0;
697
- const r = Array.from((o = z.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
698
- r.length > we.current.length ? ne.current = r.filter(
699
- (i) => !we.current.includes(i)
700
- )[0] : r.length === 1 && (ne.current = r[0], ve.current = !0), we.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;
701
765
  }
702
- }, 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 = () => {
703
767
  var e;
704
- if (ae)
705
- return ((e = ee()) == null ? void 0 : e.ownerDocument) || document;
706
- }, ee = () => M.current, me = a.useCallback(
768
+ if (Q)
769
+ return ((e = ie()) == null ? void 0 : e.ownerDocument) || document;
770
+ }, ie = () => A.current, he = a.useCallback(
707
771
  (e) => {
708
772
  var r, i;
709
- 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")
710
774
  return;
711
- F.current && F.current.disconnect();
712
- const { rowIndex: n } = e, o = ee();
713
- if (k) {
714
- const d = ((i = m.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
715
- 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);
716
780
  } else if (o) {
717
781
  const d = n < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${n + 1})`);
718
- d && V.current && (V.current.scrollTop = d.offsetTop);
782
+ d && T.current && (T.current.scrollTop = d.offsetTop);
719
783
  }
720
784
  },
721
785
  [t.gridProps.scrollable]
722
- ), Ge = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), Kt = () => Ge(Ft) === Ge(t.columnsRef), Tt = () => {
723
- oe.current = window.innerWidth, Kt() || U();
724
- }, 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 = () => {
725
789
  var d;
726
- const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = m.current, i = t.gridProps.rowHeight || ((d = o.minRowHeightRef) == null ? void 0 : d.current) || 0;
727
- 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 = Fe.current, r.table = T.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new _t(e, i)));
728
- }, Le = a.useCallback(
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)));
792
+ }, Fe = a.useCallback(
729
793
  (e) => {
730
- const n = { rowIndex: Ee.current };
794
+ const n = { rowIndex: ye.current };
731
795
  e.forEach((o) => {
732
- o.boundingClientRect.height !== o.intersectionRect.height && me(n);
796
+ o.boundingClientRect.height !== o.intersectionRect.height && he(n);
733
797
  });
734
798
  },
735
- [me]
736
- ), U = () => {
799
+ [he]
800
+ ), O = () => {
737
801
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
738
- }, At = (e) => e.left !== void 0 ? ye !== "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), Pe = a.useRef(null), M = a.useRef(null), Fe = a.useRef(null), W = a.useRef(null), j = a.useRef(null), he = a.useRef(!1), Re = a.useRef(!1), ne = a.useRef(void 0), be = a.useRef(void 0), ve = a.useRef(!1), re = a.useRef(!0), Ce = a.useRef(0), Ie = a.useRef(void 0), Ee = a.useRef(void 0), we = a.useRef([]), ze = a.useRef([]), oe = a.useRef(0), _ = a.useRef(null), Gt = a.useRef(null), Lt = a.useRef(null), ye = Wt(M), k = t.isVirtualScroll, Ft = a.useMemo(() => a.Children.toArray(t.gridProps.children), [t.gridProps.children]), Oe = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, R = ce(t.gridProps.selectable), Ne = 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;
739
803
  return a.useMemo(() => {
740
- O.onConstructor({
804
+ V.onConstructor({
741
805
  navigatable: !!t.gridProps.navigatable,
742
- contextStateRef: K,
743
- navigationStateRef: L,
806
+ contextStateRef: M,
807
+ navigationStateRef: N,
744
808
  idPrefix: t.id
745
- }), m.current = new vn();
809
+ }), b.current = new Cn();
746
810
  }, []), a.useMemo(() => {
747
811
  var e;
748
- (e = m.current) == null || e.reset();
812
+ (e = b.current) == null || e.reset();
749
813
  }, [
750
814
  t.gridProps.scrollable,
751
815
  t.gridProps.total,
752
816
  t.gridProps.filter,
753
817
  t.gridProps.group,
754
- Oe,
818
+ Be,
755
819
  t.gridProps.sort,
756
820
  t.gridProps.rowHeight
757
- ]), a.useEffect(() => (t.gridProps.clipboard && (te.current = new Jt(p), te.current.addEventListeners(S())), () => {
758
- te.current && te.current.removeEventListeners(S());
759
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, p, S]), a.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(un) && (Pe.current && (Pe.current.style.display = "block"), T.current && (T.current.style.display = "block")), Ae(), fe(), Be(), O.onComponentDidMount({
760
- scope: M.current || void 0,
761
- contextStateRef: K,
762
- 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
763
827
  }), () => {
764
- clearTimeout(Ie.current);
828
+ clearTimeout(we.current);
765
829
  }), []), a.useEffect(() => {
766
830
  var e;
767
- Ae(), fe(), Be(), k && (He(), wt(), (e = m.current) == null || e.update()), Dt(), O.onComponentDidUpdate({
768
- scope: M.current || void 0,
769
- contextStateRef: K,
770
- navigationStateRef: L,
771
- focusFirst: Re.current,
772
- newEditableRow: ne.current,
773
- singleEditRow: ve.current,
774
- lastActiveElement: be.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,
837
+ singleEditRow: Ce.current,
838
+ lastActiveElement: Ie.current,
775
839
  navigatable: t.gridProps.navigatable
776
- }), Re.current = !1, ne.current = void 0;
840
+ }), ve.current = !1, de.current = void 0;
777
841
  }), a.useEffect(() => {
778
- if (ae) {
842
+ if (Q) {
779
843
  const e = {
780
844
  rootMargin: "0px",
781
845
  threshold: 0.9
782
846
  };
783
- F.current = window.IntersectionObserver && new window.IntersectionObserver(Le, e) || null;
847
+ B.current = window.IntersectionObserver && new window.IntersectionObserver(Fe, e) || null;
784
848
  }
785
- }, [Le]), a.useEffect(() => {
849
+ }, [Fe]), a.useEffect(() => {
786
850
  var n;
787
851
  let e;
788
- return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
789
- Tt(), k && He();
790
- }), 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)), () => {
791
855
  e == null || e.disconnect();
792
856
  };
793
- }, []), 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(
794
871
  C,
795
872
  () => ({
796
873
  get element() {
797
- return ee();
874
+ return ie();
798
875
  },
799
876
  props: t.gridProps,
800
877
  get columns() {
801
- return Y();
878
+ return ee();
802
879
  },
803
880
  scrollIntoView: (e) => {
804
881
  var r;
805
- if (!((r = m.current) != null && r.container) || t.gridProps.scrollable === "none")
882
+ if (!((r = b.current) != null && r.container) || t.gridProps.scrollable === "none")
806
883
  return;
807
884
  const { rowIndex: n } = e;
808
- Ee.current = n;
809
- const o = ee();
810
- if (F.current && o) {
811
- F.current.disconnect();
812
- const i = o.querySelector(`[absolute-row-index="${Ee.current}"]`);
813
- i ? F.current.observe(i) : me(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);
814
891
  }
815
892
  },
816
893
  fitColumns: (e) => {
817
- x.current.dblClickHandler(null, e);
894
+ k.current.dblClickHandler(null, e);
818
895
  },
819
- exportAsPdf: le
896
+ exportAsPdf: ge
820
897
  })
821
898
  ), a.useImperativeHandle(t.gridRef, () => C.current), a.useMemo(() => {
822
- x.current = new ln(St);
899
+ k.current = new un(Le);
823
900
  }, [t.gridProps.onColumnResize, t.columnsRef]), a.useMemo(() => {
824
- D.current = new sn(ge, It, Me);
901
+ K.current = new gn(ne, yt, Ae);
825
902
  }, [
826
903
  t.gridProps.onColumnReorder,
827
904
  t.gridProps.onGroupChange,
828
905
  t.gridProps.group,
829
906
  t.columnsRef,
830
907
  t.gridProps.groupable
831
- ]), 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 = Oe, D.current.columns = t.columnsRef, D.current.dir = ye, Mt(), /* @__PURE__ */ a.createElement(
832
- 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,
833
910
  {
834
911
  value: {
835
- isClient: v,
836
- rowReorder: B,
837
- activeDragRowDataItemRef: _,
838
- reorderRowDragTargetRef: Gt,
839
- reorderRowDropTargetRef: Lt,
840
- dir: ye,
841
- getCellPositionStyle: At,
912
+ isClient: I,
913
+ rowReorder: j,
914
+ activeDragRowDataItemRef: $,
915
+ reorderRowDragTargetRef: zt,
916
+ reorderRowDropTargetRef: Ft,
917
+ dir: Se,
918
+ getCellPositionStyle: Gt,
842
919
  dataItemKey: t.gridProps.dataItemKey,
843
920
  columnsState: t.columnsState,
844
921
  columnsRef: t.columnsRef,
845
- onColumnsStateChange: ue,
922
+ hiddenColumnsRef: t.hiddenColumnsRef,
923
+ onColumnsStateChange: me,
846
924
  groupable: t.gridProps.groupable,
847
925
  group: t.gridProps.group,
926
+ reorderable: t.gridProps.reorderable,
848
927
  defaultGroup: t.gridProps.defaultGroup,
849
- groupChange: se,
850
- selectionRelease: dt,
851
- pagerPageChange: ht,
852
- onContextMenu: _e,
853
- rowClick: Ye,
854
- rowDblClick: Qe,
855
- cellClick: et,
856
- headerCellClick: De,
857
- itemChange: rt,
858
- onDialogEditCancel: pe,
859
- 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,
860
941
  sortable: t.gridProps.sortable,
861
942
  sort: t.gridProps.sort,
862
943
  defaultSort: t.gridProps.defaultSort,
863
- sortChange: Ke,
944
+ sortChange: Te,
864
945
  filterable: t.gridProps.filterable,
865
946
  filter: t.gridProps.filter,
866
947
  defaultFilter: t.gridProps.defaultFilter,
867
- filterOperators: t.gridProps.filterOperators || Sn,
868
- filterChange: Rt,
869
- applyHighlightDescriptor: bt,
948
+ filterOperators: t.gridProps.filterOperators || Dn,
949
+ filterChange: It,
950
+ applyHighlightDescriptor: Ct,
951
+ applySelectionDescriptor: gt,
870
952
  highlight: t.gridProps.highlight,
871
- searchChange: vt,
872
- exportAsPdf: le,
873
- onHeaderSelectionChange: at,
874
- columnGroupChange: Et,
875
- onKeyDown: $e,
876
- onFocus: Xe,
877
- scrollHandler: qe,
878
- selectionChange: ot,
879
- mobileMode: zt,
880
- 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,
881
963
  adpativeTitle: t.gridProps.adaptiveTitle,
882
964
  adaptive: t.gridProps.adaptive,
883
- dispatchDetailExpand: tt,
884
- dispatchGroupExpand: nt,
885
- columnResizeRef: x,
886
- dragLogicRef: D,
887
- navigationStateRef: L,
888
- tableElementRef: T,
889
- tableBodyElementRef: z,
890
- headerElementRef: Ht,
891
- containerElementRef: V,
892
- headTableElementRef: Pe,
893
- elementRef: M,
894
- virtualScrollHeightContainerRef: Fe,
895
- footerRef: W,
896
- headerRef: j,
897
- 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
898
980
  }
899
981
  },
900
- /* @__PURE__ */ a.createElement(Yt.Provider, { value: K.current }, t.children),
982
+ /* @__PURE__ */ a.createElement(Zt.Provider, { value: M.current }, t.children),
901
983
  /* @__PURE__ */ a.createElement(
902
- Cn,
984
+ En,
903
985
  {
904
- show: g.show && (J == null ? void 0 : J.length),
905
- dataItem: g.dataItem,
906
- field: g.field,
907
- items: J,
908
- offset: g.offset,
909
- onClose: H,
910
- 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
911
993
  }
912
994
  ),
913
995
  t.gridProps.pdf && /* @__PURE__ */ a.createElement(
914
- wn,
996
+ xn,
915
997
  {
916
998
  gridProps: t.gridProps,
917
999
  innerGrid: t.innerGrid,
918
1000
  pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
919
- onPdfExport: Ct,
920
- ref: (e) => A.current = e
1001
+ onPdfExport: wt,
1002
+ ref: (e) => G.current = e
921
1003
  }
922
1004
  )
923
1005
  );
924
1006
  };
925
1007
  export {
926
- Wn as GridClientWrapper
1008
+ jn as GridClientWrapper
927
1009
  };