@progress/kendo-react-grid 14.3.0-develop.1 → 14.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.
Files changed (88) hide show
  1. package/GridClientContextReader.js +1 -1
  2. package/GridClientContextReader.mjs +10 -9
  3. package/GridClientWrapper.js +1 -1
  4. package/GridClientWrapper.mjs +711 -624
  5. package/GridComponent.js +1 -1
  6. package/GridComponent.mjs +427 -374
  7. package/GridState.d.ts +2 -0
  8. package/GridState.js +1 -1
  9. package/GridState.mjs +98 -90
  10. package/{toolbar-tools/smartbox/SegmentedControl.d.ts → cells/pincell/GridPinCell.d.ts} +4 -2
  11. package/cells/pincell/GridPinCell.js +9 -0
  12. package/cells/pincell/GridPinCell.mjs +19 -0
  13. package/cells/pincell/GridPinCellServer.d.ts +15 -0
  14. package/cells/pincell/GridPinCellServer.js +8 -0
  15. package/cells/pincell/GridPinCellServer.mjs +32 -0
  16. package/cells/pincell/GridPinCellServerContainer.d.ts +11 -0
  17. package/cells/pincell/GridPinCellServerContainer.js +9 -0
  18. package/cells/pincell/GridPinCellServerContainer.mjs +26 -0
  19. package/cells/pincell/GridPinDropdownButton.d.ts +21 -0
  20. package/cells/pincell/GridPinDropdownButton.js +9 -0
  21. package/cells/pincell/GridPinDropdownButton.mjs +58 -0
  22. package/cells/pincell/useGridPinCellClientTdProps.d.ts +24 -0
  23. package/cells/pincell/useGridPinCellClientTdProps.js +9 -0
  24. package/cells/pincell/useGridPinCellClientTdProps.mjs +21 -0
  25. package/cells/pincell/utils.d.ts +20 -0
  26. package/cells/pincell/utils.js +8 -0
  27. package/cells/pincell/utils.mjs +47 -0
  28. package/components/PinnedRowsTable.d.ts +48 -0
  29. package/components/PinnedRowsTable.js +9 -0
  30. package/components/PinnedRowsTable.mjs +133 -0
  31. package/components/StickyGroupTable.js +1 -1
  32. package/components/StickyGroupTable.mjs +1 -1
  33. package/contextMenu/GridContextMenu.d.ts +42 -0
  34. package/contextMenu/GridContextMenu.js +1 -1
  35. package/contextMenu/GridContextMenu.mjs +101 -51
  36. package/contextMenu/enums.d.ts +5 -1
  37. package/contextMenu/enums.js +1 -1
  38. package/contextMenu/enums.mjs +2 -2
  39. package/dist/cdn/js/kendo-react-grid.js +1 -1
  40. package/drag/ColumnResize.d.ts +9 -0
  41. package/drag/ColumnResize.js +1 -1
  42. package/drag/ColumnResize.mjs +105 -115
  43. package/getRowContents.d.ts +2 -2
  44. package/getRowContents.js +1 -1
  45. package/getRowContents.mjs +13 -14
  46. package/header/client/GridHeaderPinCell.d.ts +12 -0
  47. package/header/client/GridHeaderPinCell.js +9 -0
  48. package/header/client/GridHeaderPinCell.mjs +14 -0
  49. package/index.d.mts +5 -2
  50. package/index.d.ts +5 -2
  51. package/index.js +1 -1
  52. package/index.mjs +97 -95
  53. package/interfaces/ColumnType.d.ts +1 -1
  54. package/interfaces/GridCellsSettings.d.ts +23 -0
  55. package/interfaces/GridProps.d.ts +70 -1
  56. package/interfaces/GridRowProps.d.ts +4 -0
  57. package/interfaces/GridRowsSettings.d.ts +11 -0
  58. package/interfaces/events.d.ts +17 -0
  59. package/messages/index.d.ts +20 -0
  60. package/messages/index.js +2 -2
  61. package/messages/index.mjs +110 -102
  62. package/package-metadata.js +1 -1
  63. package/package-metadata.mjs +2 -2
  64. package/package.json +17 -17
  65. package/rows/GridRow.js +1 -1
  66. package/rows/GridRow.mjs +25 -24
  67. package/rows/GridRowRenderer.d.ts +1 -0
  68. package/rows/GridRowRenderer.js +1 -1
  69. package/rows/GridRowRenderer.mjs +39 -36
  70. package/stacked/GridStackedRow.d.ts +5 -0
  71. package/stacked/GridStackedRow.js +1 -1
  72. package/stacked/GridStackedRow.mjs +118 -116
  73. package/stacked/StackedModeRow.d.ts +1 -0
  74. package/stacked/StackedModeRow.js +1 -1
  75. package/stacked/StackedModeRow.mjs +13 -11
  76. package/toolbar-tools/smartbox/SmartBox.js +1 -1
  77. package/toolbar-tools/smartbox/SmartBox.mjs +102 -94
  78. package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.d.ts +12 -3
  79. package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.js +1 -1
  80. package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.mjs +42 -41
  81. package/toolbar-tools/smartbox/index.d.ts +0 -1
  82. package/toolbar-tools/smartbox/interfaces/index.d.ts +0 -1
  83. package/utils/index.d.ts +1 -0
  84. package/utils/index.js +1 -1
  85. package/utils/index.mjs +44 -44
  86. package/toolbar-tools/smartbox/SegmentedControl.js +0 -8
  87. package/toolbar-tools/smartbox/SegmentedControl.mjs +0 -109
  88. package/toolbar-tools/smartbox/interfaces/SegmentedControlTypes.d.ts +0 -66
@@ -6,32 +6,32 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as c from "react";
10
- import { useAdaptiveModeContext as lr, canUseDOM as te, getActiveElement as sr, useDir as ur, setScrollbarWidth as pe, cloneArray as gr, RowHeightService as fr, getter as re } from "@progress/kendo-react-common";
11
- import { filterBy as mr } from "@progress/kendo-data-query";
12
- import { getSelectionOptions as Pe, populateClipboardData as hr, ClipboardActionType as Te, getEditableOptions as Pr, tableKeyboardNavigation as Y, ClipboardService as Rr, TableKeyboardNavigationContext as br, updateLeft as vr, updateRight as Cr, getGroupExpandableOptions as Ir, groupExpandReducer as yr, getDetailExpandableOptions as wr, detailExpandReducer as Er, getSelectedState as et, editReducer as Sr, EDIT_ACTION as xr, closestTagName as Re, getSelectedStateFromKeyDown as kr, getColumnIndex as Dr, getRowIndex as Kr } from "@progress/kendo-react-data-tools";
13
- import { ColumnResize as Hr } from "./drag/ColumnResize.mjs";
14
- import { CommonDragLogic as Gr } from "./drag/CommonDragLogic.mjs";
15
- import { useStickyGroups as Mr } from "./hooks/useStickyGroups.mjs";
16
- import { getDefaultHeadContextMenuItems as Tr, getDefaultBodyContextMenuItems as Ar, isRowReorderEnabled as Fr, calcRowHeight as Lr, sanitizeColumns as zr, getFlatColumnsState as Or, getDataAsArray as Wr } from "./utils/index.mjs";
17
- import { VirtualScroll as Nr } from "./VirtualScroll.mjs";
18
- import { GridContextMenu as Br } from "./contextMenu/GridContextMenu.mjs";
19
- import { GridContextMenuAnchorPart as tt } from "./contextMenu/enums.mjs";
20
- import { normalizeSortable as Vr, firstLevelSortSeqMap as jr } from "./sortCommon.mjs";
21
- import { BasePDFExport as Ur } from "./BasePDFExport.mjs";
22
- import { BaseCSVExport as qr } from "./BaseCSVExport.mjs";
23
- import { GridContext as $r } from "./utils/GridContext.mjs";
24
- import { operators as _r } from "./filterCommon.mjs";
25
- const Jr = (t, E, b, T) => {
26
- const Q = Object.keys(E.cells).map((k) => b.findIndex((Z) => Z.field === k)), V = Object.keys(E.cells).length > 0 ? Q : !0;
27
- return t.reduce((k, Z) => (k[Z[T != null ? T : "id"]] = V, k), {});
28
- }, rt = (t, E, b, T) => E.reduce((V, k) => ({
29
- ...V,
30
- ...Jr(mr(t, k), k, b, T)
31
- }), {}), un = (t) => {
32
- var Ze;
33
- const E = t.gridProps.isClient, [b, T] = c.useState({}), Q = lr(), V = c.useRef(null), k = c.useRef(null), Z = (e) => {
34
- e.event.preventDefault(), T({
9
+ import * as d from "react";
10
+ import { useAdaptiveModeContext as In, canUseDOM as ae, getActiveElement as wn, useDir as yn, setScrollbarWidth as at, cloneArray as En, RowHeightService as xn, getter as ee } from "@progress/kendo-react-common";
11
+ import { filterBy as Sn } from "@progress/kendo-data-query";
12
+ import { getSelectionOptions as we, populateClipboardData as kn, ClipboardActionType as ze, getEditableOptions as Dn, tableKeyboardNavigation as te, ClipboardService as Kn, TableKeyboardNavigationContext as Gn, updateLeft as Tn, updateRight as Hn, getGroupExpandableOptions as Mn, groupExpandReducer as An, getDetailExpandableOptions as Fn, detailExpandReducer as Ln, getSelectedState as dt, editReducer as Bn, EDIT_ACTION as Wn, closestTagName as ye, getSelectedStateFromKeyDown as zn, getColumnIndex as On, getRowIndex as pn } from "@progress/kendo-react-data-tools";
13
+ import { ColumnResize as Nn } from "./drag/ColumnResize.mjs";
14
+ import { CommonDragLogic as Un } from "./drag/CommonDragLogic.mjs";
15
+ import { useStickyGroups as Vn } from "./hooks/useStickyGroups.mjs";
16
+ import { getDefaultHeadContextMenuItems as jn, getDefaultBodyContextMenuItems as qn, isRowReorderEnabled as $n, calcRowHeight as _n, sanitizeColumns as Zn, getFlatColumnsState as Jn, getDataAsArray as Xn } from "./utils/index.mjs";
17
+ import { VirtualScroll as Yn } from "./VirtualScroll.mjs";
18
+ import { GridContextMenu as Qn, contextMenuItemsMap as er } from "./contextMenu/GridContextMenu.mjs";
19
+ import { GridContextMenuAnchorPart as ct, GridContextMenuItemNames as Ee } from "./contextMenu/enums.mjs";
20
+ import { normalizeSortable as tr, firstLevelSortSeqMap as nr } from "./sortCommon.mjs";
21
+ import { BasePDFExport as rr } from "./BasePDFExport.mjs";
22
+ import { BaseCSVExport as or } from "./BaseCSVExport.mjs";
23
+ import { GridContext as ir } from "./utils/GridContext.mjs";
24
+ import { operators as ar } from "./filterCommon.mjs";
25
+ const dr = (t, x, b, W) => {
26
+ const ne = Object.keys(x.cells).map((k) => b.findIndex((re) => re.field === k)), $ = Object.keys(x.cells).length > 0 ? ne : !0;
27
+ return t.reduce((k, re) => (k[re[W != null ? W : "id"]] = $, k), {});
28
+ }, lt = (t, x, b, W) => x.reduce(($, k) => ({
29
+ ...$,
30
+ ...dr(Sn(t, k), k, b, W)
31
+ }), {}), yr = (t) => {
32
+ var it;
33
+ const x = t.gridProps.isClient, [b, W] = d.useState({}), ne = In(), $ = d.useRef(null), k = d.useRef(null), re = (e) => {
34
+ e.event.preventDefault(), W({
35
35
  ...b,
36
36
  show: !0,
37
37
  offset: {
@@ -41,41 +41,67 @@ const Jr = (t, E, b, T) => {
41
41
  dataItem: e.dataItem,
42
42
  field: e.field
43
43
  });
44
- }, Ae = () => {
45
- T({});
46
- }, y = c.useMemo(() => t.columnsRef.find((e) => e.field === b.field), [t.columnsRef, b]), Fe = c.useMemo(() => {
44
+ }, Oe = () => {
45
+ W({});
46
+ }, st = (e) => {
47
+ const n = t.gridProps.dataItemKey || "", o = b.dataItem, r = t.gridProps.pinnedTopRows || [], i = t.gridProps.pinnedBottomRows || [], a = n ? o[n] : void 0, c = a !== void 0 && r.some((l) => l[n] === a), s = a !== void 0 && i.some((l) => l[n] === a);
48
+ return e.map((l) => {
49
+ const u = typeof l == "string" ? er[l] : l;
50
+ return (u == null ? void 0 : u.name) === Ee.pinRow && u.items ? {
51
+ ...u,
52
+ items: u.items.filter((m) => m.name === Ee.pinTop ? !c : m.name === Ee.pinBottom ? !s : m.name === Ee.unpin ? c || s : !0)
53
+ } : l;
54
+ });
55
+ }, y = d.useMemo(() => t.columnsRef.find((e) => e.field === b.field), [t.columnsRef, b]), pe = d.useMemo(() => {
47
56
  const e = t.gridProps.sortable && (y == null ? void 0 : y.sortable);
48
- return Tr({
57
+ return jn({
49
58
  pdf: !!t.gridProps.pdf,
50
59
  sortable: !!e,
51
- selectable: Pe(t.gridProps.selectable).enabled,
60
+ selectable: we(t.gridProps.selectable).enabled,
52
61
  clipboard: !!t.gridProps.clipboard
53
62
  });
54
- }, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Le = c.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), Ar({
63
+ }, [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ne = d.useMemo(() => (t.gridProps.sortable && (y == null || y.sortable), qn({
55
64
  pdf: !!t.gridProps.pdf,
56
- selectable: Pe(t.gridProps.selectable).enabled,
65
+ selectable: we(t.gridProps.selectable).enabled,
57
66
  clipboard: !!t.gridProps.clipboard,
58
- rowReorderable: Fr(t.gridProps.rowReorderable)
59
- })), [y, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), ne = c.useMemo(() => {
60
- const e = (y == null ? void 0 : y.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(b) : e;
61
- if (r && b.offset) {
62
- const o = b.dataItem ? tt.body : tt.head, n = r[o], i = b.dataItem ? Le : Fe;
63
- return n === !1 ? void 0 : n === !0 || n === void 0 ? i : n;
67
+ rowReorderable: $n(t.gridProps.rowReorderable),
68
+ pinnable: !!t.gridProps.pinnable
69
+ })), [
70
+ y,
71
+ t.gridProps.sortable,
72
+ t.gridProps.selectable,
73
+ t.gridProps.clipboard,
74
+ t.gridProps.pinnable,
75
+ t.gridProps.rowReorderable,
76
+ t.gridProps.pdf
77
+ ]), de = d.useMemo(() => {
78
+ const e = (y == null ? void 0 : y.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(b) : e;
79
+ if (n && b.offset) {
80
+ const o = b.dataItem ? ct.body : ct.head, r = n[o], i = b.dataItem ? Ne : pe;
81
+ let a;
82
+ return r === !0 || r === void 0 ? a = i : r !== !1 && (a = r), t.gridProps.pinnable && a && b.dataItem ? st(a) : a;
64
83
  }
65
- }, [t.gridProps.contextMenu, b, Le, Fe, y]), nt = (e) => {
66
- var d, u, g, m, f, I, l, w, R;
67
- const r = e.event.item, o = {
68
- target: x.current,
84
+ }, [
85
+ t.gridProps.contextMenu,
86
+ t.gridProps.pinnable,
87
+ b,
88
+ Ne,
89
+ pe,
90
+ y
91
+ ]), ut = (e) => {
92
+ var c, s, l, u, m, w, h, O, g;
93
+ const n = e.event.item, o = {
94
+ target: S.current,
69
95
  syntheticEvent: e.event.syntheticEvent,
70
96
  nativeEvent: e.event.nativeEvent,
71
- menuItem: r,
97
+ menuItem: n,
72
98
  ...e
73
99
  };
74
- t.gridProps.onContextMenuItemClick && s(t.gridProps.onContextMenuItemClick, o);
75
- const n = S(), i = {
100
+ t.gridProps.onContextMenuItemClick && f(t.gridProps.onContextMenuItemClick, o);
101
+ const r = D(), i = {
76
102
  selectedField: "",
77
103
  componentId: t.id,
78
- dataItems: n,
104
+ dataItems: r,
79
105
  dataItem: e.dataItem,
80
106
  startRowIndex: -1,
81
107
  endRowIndex: -1,
@@ -86,301 +112,343 @@ const Jr = (t, E, b, T) => {
86
112
  metaKey: !1,
87
113
  shiftKey: !1,
88
114
  isDrag: !1,
89
- ...Pe(t.gridProps.selectable),
115
+ ...we(t.gridProps.selectable),
90
116
  ...o
91
- }, a = n.findIndex((L) => L === e.dataItem);
92
- switch ((d = r.data) == null ? void 0 : d.action) {
117
+ }, a = r.findIndex((E) => E === e.dataItem);
118
+ switch ((c = n.data) == null ? void 0 : c.action) {
93
119
  case "SortCommand":
94
120
  if (y) {
95
- const L = (u = r.name) == null ? void 0 : u.toLowerCase().includes("asc"), X = ((g = r.name) == null ? void 0 : g.toLowerCase().includes("desc")) ? "desc" : void 0, Me = L ? "asc" : X, dr = r.name ? Me : void 0;
96
- ze(e.event.syntheticEvent, y, dr);
121
+ const E = (s = n.name) == null ? void 0 : s.toLowerCase().includes("asc"), q = ((l = n.name) == null ? void 0 : l.toLowerCase().includes("desc")) ? "desc" : void 0, B = E ? "asc" : q, Q = n.name ? B : void 0;
122
+ Ue(e.event.syntheticEvent, y, Q);
97
123
  }
98
124
  break;
99
125
  case "SelectRowCommand":
100
- Et(i);
126
+ Mt(i);
101
127
  break;
102
128
  case "SelectAllRowsCommand":
103
- wt(i);
129
+ Ht(i);
104
130
  break;
105
131
  case "ExportPDFCommand":
106
- ve();
132
+ Se();
107
133
  break;
108
134
  case "ClearSelectionCommand":
109
- xt(i);
135
+ Ft(i);
110
136
  break;
111
137
  case "ReorderRowCommand":
112
- ee.current = e.dataItem, (m = r.name) != null && m.toLowerCase().includes("rowup") && a > 0 && p(e.event.syntheticEvent, a - 1, "before"), (f = r.name) != null && f.toLowerCase().includes("rowdown") && a < n.length - 1 && p(e.event.syntheticEvent, a + 1, "after"), (I = r.name) != null && I.toLowerCase().includes("rowtop") && p(e.event.syntheticEvent, 0, "before"), (l = r.name) != null && l.toLowerCase().includes("rowbottom") && p(e.event.syntheticEvent, n.length - 1, "after");
138
+ ie.current = e.dataItem, (u = n.name) != null && u.toLowerCase().includes("rowup") && a > 0 && oe(e.event.syntheticEvent, a - 1, "before"), (m = n.name) != null && m.toLowerCase().includes("rowdown") && a < r.length - 1 && oe(e.event.syntheticEvent, a + 1, "after"), (w = n.name) != null && w.toLowerCase().includes("rowtop") && oe(e.event.syntheticEvent, 0, "before"), (h = n.name) != null && h.toLowerCase().includes("rowbottom") && oe(e.event.syntheticEvent, r.length - 1, "after");
113
139
  break;
114
140
  case "CopySelectionCommand":
115
- de(
116
- Te.copy,
141
+ fe(
142
+ ze.copy,
117
143
  e.event.nativeEvent,
118
144
  {
119
- copyHeaders: !((w = r.name) != null && w.toLowerCase().includes("noheaders"))
145
+ copyHeaders: !((O = n.name) != null && O.toLowerCase().includes("noheaders"))
120
146
  },
121
147
  e.dataItem,
122
148
  e.field
123
149
  );
124
150
  break;
125
151
  case "PasteCommand":
126
- de(
127
- Te.paste,
152
+ fe(
153
+ ze.paste,
128
154
  e.event.nativeEvent,
129
155
  {
130
- copyHeaders: !((R = r.name) != null && R.toLowerCase().includes("noheaders"))
156
+ copyHeaders: !((g = n.name) != null && g.toLowerCase().includes("noheaders"))
131
157
  },
132
158
  e.dataItem,
133
159
  e.field
134
160
  );
135
161
  break;
162
+ case "PinTopCommand":
163
+ le("pinTop", e.dataItem);
164
+ break;
165
+ case "PinBottomCommand":
166
+ le("pinBottom", e.dataItem);
167
+ break;
168
+ case "UnpinCommand":
169
+ le("unpin", e.dataItem);
170
+ break;
136
171
  }
137
- Ae();
138
- }, oe = () => {
139
- const e = t.columnsRef.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
140
- return zr(e);
141
- }, ot = (e, r, o) => {
142
- if (t.gridProps.onContextMenu && E) {
143
- const n = {
144
- target: x.current,
172
+ Oe();
173
+ }, ce = () => {
174
+ const e = t.columnsRef.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
175
+ return Zn(e);
176
+ }, gt = (e, n, o) => {
177
+ if (t.gridProps.onContextMenu && x) {
178
+ const r = {
179
+ target: S.current,
145
180
  syntheticEvent: e,
146
181
  nativeEvent: e.nativeEvent,
147
- dataItem: r,
182
+ dataItem: n,
148
183
  field: o
149
184
  };
150
- s(t.gridProps.onContextMenu, n);
185
+ f(t.gridProps.onContextMenu, r);
151
186
  }
152
- t.gridProps.contextMenu && Z({
187
+ t.gridProps.contextMenu && re({
153
188
  event: e,
154
- dataItem: r,
189
+ dataItem: n,
155
190
  field: o
156
191
  });
157
- }, it = (e) => {
158
- var a, d;
192
+ }, ft = (e) => {
193
+ var a, c;
159
194
  if (e.target !== e.currentTarget)
160
195
  return;
161
- clearTimeout(De.current), v.current && (v.current.table = W.current);
162
- const r = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
163
- t.gridProps.columnVirtualization && (!D || o === ke.current) && (De.current = window.setTimeout(() => {
164
- q();
165
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), B.current && B.current.setScrollLeft(r), N.current && N.current.setScrollLeft(r), G != null && G.current && G.current.setScrollLeft(r), M != null && M.current && M.current.setScrollLeft(r);
166
- const n = (a = t.gridProps.virtualSkipRef) == null ? void 0 : a.current;
167
- v.current && o !== ke.current && v.current.scrollHandler(e);
168
- const i = D && ((d = t.gridProps.virtualSkipRef) == null ? void 0 : d.current) !== n;
169
- t.gridProps.onScroll && E && s(t.gridProps.onScroll, {
170
- ...C(e)
171
- }), ke.current = o, i || Xe();
172
- }, at = (e) => {
173
- var o, n;
174
- const r = e.target;
175
- if ((e.keyCode === 38 || e.keyCode === 40) && r.closest(".k-grid-sticky-container")) {
176
- const i = parseInt(((o = r.closest("tr")) == null ? void 0 : o.getAttribute("absolute-row-index")) || "", 10), a = r.getAttribute("data-keyboardnavid");
177
- if (!isNaN(i) && a && !((n = K.current) == null ? void 0 : n.querySelector(`tr[absolute-row-index="${i}"]`)))
178
- return he.current = {
196
+ clearTimeout(Fe.current), C.current && (C.current.table = U.current);
197
+ const n = e.currentTarget.scrollLeft, o = e.currentTarget.scrollTop;
198
+ t.gridProps.columnVirtualization && (!K || o === Ae.current) && (Fe.current = window.setTimeout(() => {
199
+ J();
200
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n), j.current && j.current.setScrollLeft(n), V.current && V.current.setScrollLeft(n), M != null && M.current && M.current.setScrollLeft(n), A != null && A.current && A.current.setScrollLeft(n), F != null && F.current && F.current.setScrollLeft(n), L != null && L.current && L.current.setScrollLeft(n);
201
+ const r = (a = t.gridProps.virtualSkipRef) == null ? void 0 : a.current;
202
+ C.current && o !== Ae.current && C.current.scrollHandler(e);
203
+ const i = K && ((c = t.gridProps.virtualSkipRef) == null ? void 0 : c.current) !== r;
204
+ t.gridProps.onScroll && x && f(t.gridProps.onScroll, {
205
+ ...I(e)
206
+ }), Ae.current = o, i || nt();
207
+ }, mt = (e) => {
208
+ var o, r;
209
+ const n = e.target;
210
+ if ((e.keyCode === 38 || e.keyCode === 40) && n.closest(".k-grid-sticky-container")) {
211
+ const i = parseInt(((o = n.closest("tr")) == null ? void 0 : o.getAttribute("absolute-row-index")) || "", 10), a = n.getAttribute("data-keyboardnavid");
212
+ if (!isNaN(i) && a && !((r = G.current) == null ? void 0 : r.querySelector(`tr[absolute-row-index="${i}"]`)))
213
+ return Ce.current = {
179
214
  navId: a,
180
215
  key: e.key,
181
216
  code: e.code,
182
217
  keyCode: e.keyCode
183
- }, e.preventDefault(), e.stopPropagation(), se({ rowIndex: i }), !0;
218
+ }, e.preventDefault(), e.stopPropagation(), Pe({ rowIndex: i }), !0;
184
219
  }
185
220
  return !1;
186
- }, ct = () => {
221
+ }, Pt = () => {
187
222
  var a;
188
- if (!he.current || !H.current)
223
+ if (!Ce.current || !H.current)
189
224
  return;
190
- const { navId: e, key: r, code: o, keyCode: n } = he.current, i = (a = K.current) == null ? void 0 : a.querySelector(
225
+ const { navId: e, key: n, code: o, keyCode: r } = Ce.current, i = (a = G.current) == null ? void 0 : a.querySelector(
191
226
  `[data-keyboardnavid="${e}"]`
192
227
  );
193
228
  i && i.dispatchEvent(
194
229
  new KeyboardEvent("keydown", {
195
- key: r,
230
+ key: n,
196
231
  code: o,
197
- keyCode: n,
232
+ keyCode: r,
198
233
  bubbles: !0,
199
234
  cancelable: !0
200
235
  })
201
236
  );
202
- }, dt = (e) => {
203
- if (at(e))
237
+ }, ht = (e) => {
238
+ if (mt(e))
204
239
  return;
205
- Y.onKeyDown(e, {
240
+ te.onKeyDown(e, {
206
241
  navigatable: t.gridProps.navigatable || !1,
207
- contextStateRef: O,
208
- navigationStateRef: $,
209
- onNavigationAction: st,
210
- columns: oe()
211
- }), Y.onGetSnapshotBeforeUpdate({
212
- document: A(),
213
- contextStateRef: O,
214
- navigationStateRef: $
242
+ contextStateRef: N,
243
+ navigationStateRef: X,
244
+ onNavigationAction: bt,
245
+ columns: ce()
246
+ }), te.onGetSnapshotBeforeUpdate({
247
+ document: z(),
248
+ contextStateRef: N,
249
+ navigationStateRef: X
215
250
  });
216
- const r = {
217
- dataItems: S(),
218
- mode: P.mode,
219
- cell: P.cell,
251
+ const n = {
252
+ dataItems: D(),
253
+ mode: v.mode,
254
+ cell: v.cell,
220
255
  componentId: t.id,
221
256
  selectedField: "",
222
- ...C(e)
257
+ ...I(e)
223
258
  };
224
- t.gridProps.onKeyDown && E && s(t.gridProps.onKeyDown, r);
225
- }, lt = (e) => {
226
- Y.onFocus(e, {
259
+ t.gridProps.onKeyDown && x && f(t.gridProps.onKeyDown, n);
260
+ }, Rt = (e) => {
261
+ te.onFocus(e, {
227
262
  navigatable: !!t.gridProps.navigatable,
228
- contextStateRef: O
263
+ contextStateRef: N
229
264
  });
230
- }, st = (e) => {
231
- const { columnsRef: r } = t;
232
- if (e.action === "moveToNextPage" && Kt(e.event), e.action === "moveToPrevPage" && Ht(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
265
+ }, bt = (e) => {
266
+ const { columnsRef: n } = t;
267
+ if (e.action === "moveToNextPage" && Wt(e.event), e.action === "moveToPrevPage" && zt(e.event), e.focusElement && (e.action === "reorderToRight" || e.action === "reorderToLeft")) {
233
268
  const o = parseInt(e.focusElement.ariaColIndex, 10) - 1;
234
- if (!r[o].reorderable)
269
+ if (!n[o].reorderable)
235
270
  return;
236
271
  if (e.action === "reorderToRight" && o < t.columnsRef.length - 1) {
237
- if (r[o + 1].disableReorder)
272
+ if (n[o + 1].disableReorder)
238
273
  return;
239
- ae(o, o + 1, e.event);
274
+ ue(o, o + 1, e.event);
240
275
  }
241
276
  if (e.action === "reorderToLeft" && o > 0) {
242
- if (r[o - 1].disableReorder)
277
+ if (n[o - 1].disableReorder)
243
278
  return;
244
- ae(o, o - 1, e.event);
279
+ ue(o, o - 1, e.event);
245
280
  }
246
281
  }
247
- if (e.action === "select" && Ct(e.event), t.gridProps.onNavigationAction && E) {
282
+ if (e.action === "select" && Kt(e.event), t.gridProps.onNavigationAction && x) {
248
283
  const o = {
249
284
  focusElement: e.focusElement,
250
- ...C(e.event)
285
+ ...I(e.event)
251
286
  };
252
- s(t.gridProps.onNavigationAction, o);
287
+ f(t.gridProps.onNavigationAction, o);
253
288
  }
254
- }, ut = (e, r) => {
255
- t.gridProps.onRowClick && Re(e.target, "TD") && s(t.gridProps.onRowClick, {
256
- dataItem: r,
257
- ...C(e)
289
+ }, vt = (e, n) => {
290
+ t.gridProps.onRowClick && ye(e.target, "TD") && f(t.gridProps.onRowClick, {
291
+ dataItem: n,
292
+ ...I(e)
258
293
  });
259
- }, gt = (e, r) => {
260
- t.gridProps.onRowDoubleClick && Re(e.target, "TD") && s(t.gridProps.onRowDoubleClick, {
261
- dataItem: r,
262
- ...C(e)
294
+ }, Ct = (e, n) => {
295
+ t.gridProps.onRowDoubleClick && ye(e.target, "TD") && f(t.gridProps.onRowDoubleClick, {
296
+ dataItem: n,
297
+ ...I(e)
263
298
  });
264
- }, ft = (e) => {
265
- t.gridProps.onItemChange && s(t.gridProps.onItemChange, {
266
- ...C(e.syntheticEvent),
299
+ }, It = (e) => {
300
+ t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
301
+ ...I(e.syntheticEvent),
267
302
  dataItem: e.dataItem,
268
303
  field: void 0,
269
304
  value: void 0
270
305
  });
271
- }, mt = (e) => {
272
- t.gridProps.onItemChange && t.gridProps.onEditChange && s(t.gridProps.onEditChange, {
306
+ }, wt = (e) => {
307
+ t.gridProps.onItemChange && t.gridProps.onEditChange && f(t.gridProps.onEditChange, {
273
308
  edit: {},
274
- ...C(e.syntheticEvent)
309
+ ...I(e.syntheticEvent)
275
310
  });
276
- }, ht = (e, r, o) => {
277
- if (Qe.enabled && Qe.mode === "incell" && t.gridProps.dataItemKey) {
278
- const n = Sr(t.gridProps.edit, {
279
- type: xr.ENTER_FIELD_EDIT,
280
- payload: { id: r[t.gridProps.dataItemKey], field: o }
311
+ }, yt = (e, n, o) => {
312
+ var r, i;
313
+ if (ot.enabled && ot.mode === "incell" && t.gridProps.dataItemKey) {
314
+ if (t.gridProps.pinnable && t.gridProps.editZoneRef) {
315
+ const c = !!((i = (r = e.target).closest) != null && i.call(r, ".k-grid-pinned-container"));
316
+ t.gridProps.editZoneRef.current = c ? "pinned" : "body";
317
+ }
318
+ const a = Bn(t.gridProps.edit, {
319
+ type: Wn.ENTER_FIELD_EDIT,
320
+ payload: { id: n[t.gridProps.dataItemKey], field: o }
281
321
  });
282
- t.gridProps.onEditChange && s(t.gridProps.onEditChange, {
283
- edit: n,
284
- ...C(e)
322
+ t.gridProps.onEditChange && f(t.gridProps.onEditChange, {
323
+ edit: a,
324
+ ...I(e)
285
325
  });
286
326
  }
287
- }, Pt = (e, r) => {
288
- var n;
289
- if (wr(t.detailExpandable).enabled) {
290
- const i = Er((n = t.gridProps.detailExpand) != null ? n : {}, e);
291
- t.gridProps.onDetailExpandChange && s(t.gridProps.onDetailExpandChange, {
292
- ...C(r),
327
+ }, Et = (e, n) => {
328
+ var r;
329
+ if (Fn(t.detailExpandable).enabled) {
330
+ const i = Ln((r = t.gridProps.detailExpand) != null ? r : {}, e);
331
+ t.gridProps.onDetailExpandChange && f(t.gridProps.onDetailExpandChange, {
332
+ ...I(n),
293
333
  detailExpand: i
294
334
  });
295
335
  }
296
- }, Rt = (e, r) => {
297
- var n;
298
- const o = Ir(
336
+ }, xt = (e, n) => {
337
+ var r;
338
+ const o = Mn(
299
339
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
300
340
  );
301
341
  if (o.enabled) {
302
- const i = yr((n = t.gridProps.groupExpand) != null ? n : [], e, o);
303
- t.gridProps.onGroupExpandChange && s(t.gridProps.onGroupExpandChange, {
304
- ...C(r),
342
+ const i = An((r = t.gridProps.groupExpand) != null ? r : [], e, o);
343
+ t.gridProps.onGroupExpandChange && f(t.gridProps.onGroupExpandChange, {
344
+ ...I(n),
305
345
  groupExpand: i
306
346
  });
307
347
  }
308
- nr(e.group);
309
- }, ze = (e, r, o) => {
310
- const { allowUnsort: n, mode: i } = Vr(
348
+ Pn(e.group);
349
+ }, St = d.useCallback(
350
+ (e) => {
351
+ const { dataItemKey: n = "", pinnedTopRows: o = [], pinnedBottomRows: r = [] } = t.gridProps;
352
+ if (!n || !e)
353
+ return "none";
354
+ const i = e[n];
355
+ return o != null && o.some((a) => a[n] === i) ? "top" : r != null && r.some((a) => a[n] === i) ? "bottom" : "none";
356
+ },
357
+ [t.gridProps.pinnedTopRows, t.gridProps.pinnedBottomRows, t.gridProps.dataItemKey]
358
+ ), le = (e, n) => {
359
+ if (!t.gridProps.pinnable)
360
+ return;
361
+ const { dataItemKey: o = "", pinnedTopRows: r = [], pinnedBottomRows: i = [] } = t.gridProps, a = n[o], c = r.filter((u) => u[o] !== a), s = i.filter((u) => u[o] !== a);
362
+ let l;
363
+ switch (e) {
364
+ case "pinTop":
365
+ l = { pinnedTopRows: [...c, n], pinnedBottomRows: s, dataItem: n };
366
+ break;
367
+ case "pinBottom":
368
+ l = { pinnedTopRows: c, pinnedBottomRows: [...s, n], dataItem: n };
369
+ break;
370
+ case "unpin":
371
+ l = { pinnedTopRows: c, pinnedBottomRows: s, dataItem: n };
372
+ break;
373
+ default:
374
+ return;
375
+ }
376
+ t.gridProps.onRowPinChange && f(t.gridProps.onRowPinChange, l);
377
+ }, Ue = (e, n, o) => {
378
+ const { allowUnsort: r, mode: i } = tr(
311
379
  t.gridProps.sortable || !1,
312
- r.sortable || !1
313
- ), a = (t.gridProps.sort || []).filter((g) => g.field === r.field)[0], d = o || jr[n][a && a.dir || ""], u = i === "single" ? [] : (t.gridProps.sort || []).filter((g) => g.field !== r.field);
314
- d !== "" && r.field && u.push({ field: r.field, dir: d }), Oe(u, e);
315
- }, bt = (e) => {
316
- t.gridProps.onItemChange && s(t.gridProps.onItemChange, {
317
- ...C(e.syntheticEvent),
380
+ n.sortable || !1
381
+ ), a = (t.gridProps.sort || []).filter((l) => l.field === n.field)[0], c = o || nr[r][a && a.dir || ""], s = i === "single" ? [] : (t.gridProps.sort || []).filter((l) => l.field !== n.field);
382
+ c !== "" && n.field && s.push({ field: n.field, dir: c }), je(s, e);
383
+ }, kt = (e) => {
384
+ t.gridProps.onItemChange && f(t.gridProps.onItemChange, {
385
+ ...I(e.syntheticEvent),
318
386
  dataItem: e.dataItem,
319
387
  dataIndex: e.dataIndex,
320
388
  field: e.field,
321
389
  value: e.value
322
390
  });
323
- }, vt = (e) => {
324
- var r;
325
- if (t.gridProps.onSelectionChange && P.enabled) {
326
- const { event: o, dataItem: n, dataIndex: i, columnIndex: a } = e, d = {
327
- ...C(o),
328
- dataItem: n,
391
+ }, Dt = (e) => {
392
+ var n;
393
+ if (t.gridProps.onSelectionChange && v.enabled) {
394
+ const { event: o, dataItem: r, dataIndex: i, columnIndex: a } = e, c = {
395
+ ...I(o),
396
+ dataItem: r,
329
397
  startColIndex: a,
330
398
  endColIndex: a,
331
399
  startRowIndex: i,
332
400
  endRowIndex: i,
333
- dataItems: S(),
401
+ dataItems: D(),
334
402
  altKey: !1,
335
403
  ctrlKey: !1,
336
404
  shiftKey: !1,
337
405
  metaKey: !1,
338
- mode: P.mode,
339
- cell: P.cell,
406
+ mode: v.mode,
407
+ cell: v.cell,
340
408
  isDrag: !1,
341
409
  componentId: t.id,
342
410
  selectedField: ""
343
411
  };
344
- s(t.gridProps.onSelectionChange, {
345
- ...d,
346
- select: t.gridProps.dataItemKey ? et({
347
- event: d,
348
- selectedState: (r = t.gridProps.select) != null ? r : {},
412
+ f(t.gridProps.onSelectionChange, {
413
+ ...c,
414
+ select: t.gridProps.dataItemKey ? dt({
415
+ event: c,
416
+ selectedState: (n = t.gridProps.select) != null ? n : {},
349
417
  dataItemKey: t.gridProps.dataItemKey
350
418
  }) : {}
351
419
  });
352
420
  }
353
- }, Ct = (e) => {
354
- var g, m;
355
- if (!P.enabled || !t.gridProps.dataItemKey)
421
+ }, Kt = (e) => {
422
+ var l, u;
423
+ if (!v.enabled || !t.gridProps.dataItemKey)
356
424
  return;
357
- const r = {
358
- dataItems: S(),
359
- mode: P.mode,
360
- cell: P.cell,
425
+ const n = {
426
+ dataItems: D(),
427
+ mode: v.mode,
428
+ cell: v.cell,
361
429
  componentId: t.id,
362
430
  selectedField: "",
363
- ...C(e)
364
- }, o = kr({
365
- event: r,
366
- selectedState: (g = t.gridProps.select) != null ? g : {},
431
+ ...I(e)
432
+ }, o = zn({
433
+ event: n,
434
+ selectedState: (l = t.gridProps.select) != null ? l : {},
367
435
  dataItemKey: t.gridProps.dataItemKey
368
436
  });
369
437
  if (o === t.gridProps.select)
370
438
  return;
371
- const n = e.target, i = Re(n, "TD"), a = Re(n, "TR"), d = Dr(i), u = Kr(a);
372
- if (d !== void 0 && u !== void 0) {
373
- const f = (m = Wr(t.gridProps.data)) == null ? void 0 : m[u];
374
- t.gridProps.onSelectionChange && s(t.gridProps.onSelectionChange, {
375
- ...r,
439
+ const r = e.target, i = ye(r, "TD"), a = ye(r, "TR"), c = On(i), s = pn(a);
440
+ if (c !== void 0 && s !== void 0) {
441
+ const m = (u = Xn(t.gridProps.data)) == null ? void 0 : u[s];
442
+ t.gridProps.onSelectionChange && f(t.gridProps.onSelectionChange, {
443
+ ...n,
376
444
  select: o,
377
- dataItem: f,
378
- startRowIndex: u,
379
- startColIndex: d,
380
- startDataItem: f,
381
- endDataItem: f,
382
- endRowIndex: u,
383
- endColIndex: d,
445
+ dataItem: m,
446
+ startRowIndex: s,
447
+ startColIndex: c,
448
+ startDataItem: m,
449
+ endDataItem: m,
450
+ endRowIndex: s,
451
+ endColIndex: c,
384
452
  ctrlKey: e.ctrlKey,
385
453
  altKey: e.altKey,
386
454
  metaKey: e.metaKey,
@@ -388,50 +456,58 @@ const Jr = (t, E, b, T) => {
388
456
  isDrag: !1
389
457
  });
390
458
  }
391
- }, It = (e) => {
392
- if (t.gridProps.onHeaderSelectionChange && P.enabled) {
393
- const r = S();
394
- s(t.gridProps.onHeaderSelectionChange, {
395
- select: e.syntheticEvent.target.checked ? r.reduce((o, n) => (t.gridProps.dataItemKey && re(t.gridProps.dataItemKey)(n) !== void 0 && (o[re(t.gridProps.dataItemKey)(n)] = !0), o), {}) : {},
459
+ }, Gt = (e) => {
460
+ if (t.gridProps.onHeaderSelectionChange && v.enabled) {
461
+ const n = D();
462
+ f(t.gridProps.onHeaderSelectionChange, {
463
+ select: e.syntheticEvent.target.checked ? n.reduce((o, r) => (t.gridProps.dataItemKey && ee(t.gridProps.dataItemKey)(r) !== void 0 && (o[ee(t.gridProps.dataItemKey)(r)] = !0), o), {}) : {},
396
464
  field: e.field,
397
465
  nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
398
466
  syntheticEvent: e.syntheticEvent,
399
- target: x.current,
400
- dataItems: r
467
+ target: S.current,
468
+ dataItems: n
401
469
  });
402
470
  }
403
- }, j = (e, r) => {
404
- t.gridProps.onSelectionChange && P.enabled && s(t.gridProps.onSelectionChange, {
471
+ }, _ = (e, n) => {
472
+ t.gridProps.onSelectionChange && v.enabled && f(t.gridProps.onSelectionChange, {
405
473
  ...e,
406
- select: r
474
+ select: n
407
475
  });
408
- }, yt = (e) => {
409
- var r;
410
- if (t.gridProps.onSelectionChange && P.enabled) {
411
- const o = S()[e.startRowIndex], n = S()[e.endRowIndex], i = {
476
+ }, Tt = (e, n) => {
477
+ const o = t.gridProps.dataItemKey;
478
+ if (!o || !n)
479
+ return;
480
+ const r = ee(o), i = D().findIndex((a) => r(a) === r(n));
481
+ i !== -1 && Ve({
482
+ ...e,
483
+ startRowIndex: i,
484
+ endRowIndex: i
485
+ });
486
+ }, Ve = (e) => {
487
+ var n;
488
+ if (t.gridProps.onSelectionChange && v.enabled) {
489
+ const o = D(), r = o[e.startRowIndex], i = o[e.endRowIndex], a = {
412
490
  syntheticEvent: void 0,
413
- target: x.current,
491
+ target: S.current,
414
492
  selectedField: "",
415
493
  componentId: t.id,
416
- dataItems: S(),
494
+ dataItems: o,
417
495
  dataItem: null,
418
- startDataItem: o,
419
- endDataItem: n,
496
+ startDataItem: r,
497
+ endDataItem: i,
420
498
  ...e
421
- }, a = et({
422
- event: i,
423
- selectedState: (r = t.gridProps.select) != null ? r : {},
424
- // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
425
- // it does work correctly even without it
499
+ }, c = dt({
500
+ event: a,
501
+ selectedState: (n = t.gridProps.select) != null ? n : {},
426
502
  dataItemKey: t.gridProps.dataItemKey
427
503
  });
428
- j(i, a);
504
+ _(a, c);
429
505
  }
430
- }, wt = (e) => {
431
- if (t.gridProps.onSelectionChange && P.enabled) {
432
- const r = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], n = {}, i = {
506
+ }, Ht = (e) => {
507
+ if (t.gridProps.onSelectionChange && v.enabled) {
508
+ const n = e.dataItems[0], o = e.dataItems[e.dataItems.length - 1], r = {}, i = {
433
509
  ...e,
434
- startDataItem: r,
510
+ startDataItem: n,
435
511
  endDataItem: o,
436
512
  startRowIndex: 0,
437
513
  endRowIndex: e.dataItems.length - 1,
@@ -439,35 +515,35 @@ const Jr = (t, E, b, T) => {
439
515
  endColIndex: t.columnsRef.length - 1
440
516
  };
441
517
  e.dataItems.forEach((a) => {
442
- const u = re(t.gridProps.dataItemKey)(a);
443
- n[u] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
444
- }), j(i, n);
518
+ const s = ee(t.gridProps.dataItemKey)(a);
519
+ r[s] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0;
520
+ }), _(i, r);
445
521
  }
446
- }, Et = (e) => {
447
- if (t.gridProps.onSelectionChange && P.enabled) {
448
- const o = re(t.gridProps.dataItemKey)(e.dataItem), n = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
449
- (f) => f[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
450
- ), g = {
522
+ }, Mt = (e) => {
523
+ if (t.gridProps.onSelectionChange && v.enabled) {
524
+ const o = ee(t.gridProps.dataItemKey)(e.dataItem), r = 0, i = t.columnsRef.length - 1, a = e.dataItems.findIndex(
525
+ (m) => m[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
526
+ ), l = {
451
527
  ...e,
452
528
  startDataItem: a,
453
529
  endDataItem: a,
454
530
  startRowIndex: a,
455
531
  endRowIndex: a,
456
- startColIndex: n,
532
+ startColIndex: r,
457
533
  endColIndex: i
458
- }, m = e.mode === "multiple" ? t.gridProps.select || {} : {};
459
- 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, j(g, m);
534
+ }, u = e.mode === "multiple" ? t.gridProps.select || {} : {};
535
+ u[o] === !0 || Array.isArray(u[o]) && u[o].length === t.columnsRef.length ? delete u[o] : u[o] = e.cell ? [...Array(t.columnsRef.length).keys()] : !0, _(l, u);
460
536
  }
461
- }, St = (e) => {
462
- if (!P.enabled)
537
+ }, At = (e) => {
538
+ if (!v.enabled)
463
539
  return;
464
- const r = S(), o = {
540
+ const n = D(), o = {
465
541
  syntheticEvent: void 0,
466
542
  nativeEvent: void 0,
467
- target: x.current,
543
+ target: S.current,
468
544
  selectedField: "",
469
545
  componentId: t.id,
470
- dataItems: r,
546
+ dataItems: n,
471
547
  dataItem: null,
472
548
  startDataItem: null,
473
549
  endDataItem: null,
@@ -476,127 +552,127 @@ const Jr = (t, E, b, T) => {
476
552
  metaKey: !1,
477
553
  shiftKey: !1,
478
554
  isDrag: !1,
479
- mode: P.mode,
480
- cell: P.cell
555
+ mode: v.mode,
556
+ cell: v.cell
481
557
  };
482
558
  if (!e || e.length === 0) {
483
- const f = {
559
+ const m = {
484
560
  ...o,
485
561
  startRowIndex: -1,
486
562
  endRowIndex: -1,
487
563
  startColIndex: -1,
488
564
  endColIndex: -1
489
565
  };
490
- j(f, {});
566
+ _(m, {});
491
567
  return;
492
568
  }
493
- const n = rt(
569
+ const r = lt(
494
570
  t.gridProps.data,
495
571
  e,
496
572
  t.columnsRef,
497
573
  t.gridProps.dataItemKey
498
574
  ), i = {};
499
- Object.keys(n).forEach((f) => {
500
- n[f] && (i[f] = P.cell ? [...Array(t.columnsRef.length).keys()] : !0);
575
+ Object.keys(r).forEach((m) => {
576
+ r[m] && (i[m] = v.cell ? [...Array(t.columnsRef.length).keys()] : !0);
501
577
  });
502
- let a = -1, d = -1, u = r[0] || null, g = r[r.length - 1] || null;
578
+ let a = -1, c = -1, s = n[0] || null, l = n[n.length - 1] || null;
503
579
  if (t.gridProps.dataItemKey) {
504
- const f = re(t.gridProps.dataItemKey);
505
- for (let I = 0; I < r.length; I++) {
506
- const l = f(r[I]);
507
- l !== void 0 && n[l] && (a === -1 && (a = I, u = r[I]), d = I, g = r[I]);
580
+ const m = ee(t.gridProps.dataItemKey);
581
+ for (let w = 0; w < n.length; w++) {
582
+ const h = m(n[w]);
583
+ h !== void 0 && r[h] && (a === -1 && (a = w, s = n[w]), c = w, l = n[w]);
508
584
  }
509
585
  }
510
- const m = {
586
+ const u = {
511
587
  ...o,
512
588
  startRowIndex: a,
513
- endRowIndex: d,
589
+ endRowIndex: c,
514
590
  startColIndex: 0,
515
591
  endColIndex: t.columnsRef.length - 1,
516
- startDataItem: u,
517
- endDataItem: g
592
+ startDataItem: s,
593
+ endDataItem: l
518
594
  };
519
- j(m, i);
520
- }, xt = (e) => {
521
- t.gridProps.onSelectionChange && P.enabled && j(e, {});
522
- }, U = (e, r, o, n, i) => {
523
- Dt();
595
+ _(u, i);
596
+ }, Ft = (e) => {
597
+ t.gridProps.onSelectionChange && v.enabled && _(e, {});
598
+ }, Z = (e, n, o, r, i) => {
599
+ Bt();
524
600
  const a = t.gridProps.onDataStateChange;
525
601
  if (e) {
526
- const d = { ...C(n), ...r, targetEvent: i };
527
- s(e, d);
528
- } else a && s(a, {
529
- ...C(n),
602
+ const c = { ...I(r), ...n, targetEvent: i };
603
+ f(e, c);
604
+ } else a && f(a, {
605
+ ...I(r),
530
606
  targetEvent: i || {},
531
607
  dataState: {
532
- ...Bt(),
608
+ ...Xt(),
533
609
  ...o
534
610
  }
535
611
  });
536
- }, ie = (e, r, o) => {
537
- var n;
538
- D && t.gridProps.pageable && ((n = v.current) == null || n.reset()), U(
612
+ }, se = (e, n, o) => {
613
+ var r;
614
+ K && t.gridProps.pageable && ((r = C.current) == null || r.reset()), Z(
539
615
  t.gridProps.onPageChange,
540
616
  { page: e },
541
617
  { skip: e.skip, take: e.take },
542
- r,
618
+ n,
543
619
  o
544
620
  );
545
- }, kt = (e, r, o) => {
546
- var n;
547
- t.gridProps.pageable || (n = t.gridProps.group) != null && n.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, q()) : ie(e, r, o);
548
- }, be = () => {
621
+ }, Lt = (e, n, o) => {
622
+ var r;
623
+ t.gridProps.pageable || (r = t.gridProps.group) != null && r.length ? t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = e.skip, J()) : se(e, n, o);
624
+ }, xe = () => {
549
625
  let e = t.gridProps.total || 0;
550
626
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
551
- }, Dt = () => {
552
- D && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
553
- }, Kt = (e) => {
627
+ }, Bt = () => {
628
+ K && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
629
+ }, Wt = (e) => {
554
630
  var i, a;
555
- const r = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + r, n = be();
556
- o < n && ie({ skip: o, take: r }, e);
557
- }, Ht = (e) => {
558
- var n, i;
559
- const r = (i = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - r;
560
- o >= 0 && ie({ skip: o, take: r }, e);
561
- }, Gt = (e) => {
562
- ie({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
563
- }, Oe = (e, r) => {
564
- U(
631
+ const n = (a = (i = t.gridProps.take) != null ? i : t.gridProps.pageSize) != null ? a : 0, o = (t.gridProps.skip || 0) + n, r = xe();
632
+ o < r && se({ skip: o, take: n }, e);
633
+ }, zt = (e) => {
634
+ var r, i;
635
+ const n = (i = (r = t.gridProps.take) != null ? r : t.gridProps.pageSize) != null ? i : 0, o = (t.gridProps.skip || 0) - n;
636
+ o >= 0 && se({ skip: o, take: n }, e);
637
+ }, Ot = (e) => {
638
+ se({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
639
+ }, je = (e, n) => {
640
+ Z(
565
641
  t.gridProps.onSortChange,
566
642
  { sort: e },
567
- { sort: e, ...D && !t.gridProps.pageable ? { skip: 0 } : {} },
568
- r
643
+ { sort: e, ...K && !t.gridProps.pageable ? { skip: 0 } : {} },
644
+ n
569
645
  );
570
- }, Mt = (e, r) => {
571
- U(
646
+ }, pt = (e, n) => {
647
+ Z(
572
648
  t.gridProps.onFilterChange,
573
649
  { filter: e },
574
650
  { filter: e, skip: 0 },
575
- r
651
+ n
576
652
  );
577
- }, Tt = (e) => {
653
+ }, Nt = (e) => {
578
654
  if (!e || e.length === 0) {
579
- We({});
655
+ qe({});
580
656
  return;
581
657
  }
582
- const r = rt(
658
+ const n = lt(
583
659
  t.gridProps.data,
584
660
  e,
585
661
  t.columnsRef,
586
662
  t.gridProps.dataItemKey
587
663
  );
588
- We({ ...r });
589
- }, We = (e) => {
590
- U(
664
+ qe({ ...n });
665
+ }, qe = (e) => {
666
+ Z(
591
667
  t.gridProps.onHighlightChange,
592
668
  { highlight: e },
593
669
  {},
594
670
  {}
595
671
  );
596
- }, At = (e) => {
597
- const r = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, n = {
672
+ }, Ut = (e) => {
673
+ const n = t.gridProps.searchFields || t.columnsRef.map((i) => i.field) || [], o = e.nativeEvent.target.value, r = {
598
674
  logic: "or",
599
- filters: r.filter((i) => i !== void 0).map((i) => {
675
+ filters: n.filter((i) => i !== void 0).map((i) => {
600
676
  var a;
601
677
  return typeof i == "string" ? { field: i, value: o, operator: "contains" } : {
602
678
  value: o,
@@ -606,165 +682,169 @@ const Jr = (t, E, b, T) => {
606
682
  };
607
683
  })
608
684
  };
609
- U(
685
+ Z(
610
686
  t.gridProps.onSearchChange,
611
687
  {
612
- search: n
688
+ search: r
613
689
  },
614
690
  { skip: 0 },
615
691
  e.syntheticEvent
616
692
  );
617
- }, ve = () => {
693
+ }, Se = () => {
618
694
  var e;
619
- (e = V.current) == null || e.save();
620
- }, Ne = async () => {
695
+ (e = $.current) == null || e.save();
696
+ }, $e = async () => {
621
697
  var e;
622
698
  await ((e = k.current) == null ? void 0 : e.save());
623
- }, Be = () => {
699
+ }, _e = () => {
624
700
  var e;
625
701
  return ((e = k.current) == null ? void 0 : e.getBlob()) || null;
626
- }, Ft = async (e) => {
627
- var r, o;
628
- (r = t.gridProps) != null && r.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
629
- }, Lt = (e) => {
630
- var r, o;
631
- return (r = t.gridProps) != null && r.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
632
- }, Ce = (e, r) => {
633
- const o = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
634
- let n = {};
635
- t.isVirtualScroll && e.length && !t.gridProps.pageable && (n = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Ee.current = !0), U(
702
+ }, Vt = async (e) => {
703
+ var n, o;
704
+ (n = t.gridProps) != null && n.onPdfExport && await ((o = t.gridProps) == null ? void 0 : o.onPdfExport(e));
705
+ }, jt = (e) => {
706
+ var n, o;
707
+ return (n = t.gridProps) != null && n.onCsvExport ? (o = t.gridProps) == null ? void 0 : o.onCsvExport(e) : e;
708
+ }, ke = (e, n) => {
709
+ const o = n.nativeEvent ? n : { nativeEvent: n.nativeEvent || n.originalEvent };
710
+ let r = {};
711
+ t.isVirtualScroll && e.length && !t.gridProps.pageable && (r = { take: void 0 }), e.length === 0 && t.gridProps.navigatable && (Te.current = !0), Z(
636
712
  t.gridProps.onGroupChange,
637
713
  { group: e },
638
- { group: e, skip: 0, ...n },
714
+ { group: e, skip: 0, ...r },
639
715
  o
640
716
  );
641
- }, Ie = (e) => {
717
+ }, De = (e) => {
642
718
  if (t.gridProps.onColumnsStateChange) {
643
- const r = {
644
- target: x.current,
719
+ const n = {
720
+ target: S.current,
645
721
  columnsState: e
646
722
  };
647
- s(t.gridProps.onColumnsStateChange, r);
723
+ f(t.gridProps.onColumnsStateChange, n);
648
724
  }
649
- }, ae = (e, r, o) => {
650
- const { columnsRef: n, columnsState: i } = t, a = n[e], d = Or(i), u = a.depth, g = (l) => {
725
+ }, ue = (e, n, o) => {
726
+ const { columnsRef: r, columnsState: i } = t, a = r[e], c = Jn(i), s = a.depth, l = (h) => {
651
727
  do
652
- l++;
653
- while (l < n.length && n[l].depth > u);
654
- return l;
655
- }, m = n.splice(e, g(e) - e);
656
- n.splice(e < r ? g(r - m.length) : r, 0, ...m), n.filter((l) => l.declarationIndex >= 0).forEach((l, w) => {
657
- l.orderIndex = w;
658
- const R = d.find((L) => L.id === l.id);
659
- R && (R.orderIndex = w);
728
+ h++;
729
+ while (h < r.length && r[h].depth > s);
730
+ return h;
731
+ }, u = r.splice(e, l(e) - e);
732
+ r.splice(e < n ? l(n - u.length) : n, 0, ...u), r.filter((h) => h.declarationIndex >= 0).forEach((h, O) => {
733
+ h.orderIndex = O;
734
+ const g = c.find((E) => E.id === h.id);
735
+ g && (g.orderIndex = O);
660
736
  });
661
- const f = n[e].locked && n[r].locked;
662
- vr(t.columnsMapRef, n, f || fe.current), Cr(t.columnsMapRef, n, f || fe.current), we.current && (fe.current = !1, we.current = !1);
663
- const I = oe();
664
- if (q(), t.gridProps.onColumnReorder) {
665
- const l = {
666
- target: x.current,
667
- columns: I,
737
+ const m = r[e].locked && r[n].locked;
738
+ Tn(t.columnsMapRef, r, m || be.current), Hn(t.columnsMapRef, r, m || be.current), Ge.current && (be.current = !1, Ge.current = !1);
739
+ const w = ce();
740
+ if (J(), t.gridProps.onColumnReorder) {
741
+ const h = {
742
+ target: S.current,
743
+ columns: w,
668
744
  columnId: a.id,
669
745
  nativeEvent: o
670
746
  };
671
- s(t.gridProps.onColumnReorder, l);
747
+ f(t.gridProps.onColumnReorder, h);
672
748
  }
673
- Ie(i);
674
- }, p = (e, r, o) => {
675
- const n = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
676
- if (o === "forbidden" || !n || !ee.current)
749
+ De(i);
750
+ }, oe = (e, n, o) => {
751
+ const r = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
752
+ if (o === "forbidden" || !r || !ie.current)
677
753
  return;
678
- const i = t.dataRef[r];
679
- t.gridProps.onRowReorder && s(t.gridProps.onRowReorder, {
680
- draggedDataItems: [ee.current],
754
+ const i = t.dataRef[n];
755
+ t.gridProps.onRowReorder && f(t.gridProps.onRowReorder, {
756
+ draggedDataItems: [ie.current],
681
757
  droppedDataItem: i == null ? void 0 : i.dataItem,
682
758
  dropPosition: o,
683
759
  nativeEvent: e.originalEvent,
684
760
  dragEvent: e,
685
- target: x.current
686
- }), ee.current = null;
687
- }, zt = (e, r, o) => {
761
+ target: S.current
762
+ }), ie.current = null;
763
+ }, qt = (e, n, o) => {
688
764
  if (t.gridProps.group === void 0)
689
765
  return;
690
- const n = t.gridProps.group.slice();
691
- n.splice(r, 0, ...n.splice(e, 1)), Ce(n, o);
692
- }, Ve = (e, r, o) => {
693
- const n = t.columnsRef[e].field;
694
- if (!n)
766
+ const r = t.gridProps.group.slice();
767
+ r.splice(n, 0, ...r.splice(e, 1)), ke(r, o);
768
+ }, Ze = (e, n, o) => {
769
+ const r = t.columnsRef[e].field;
770
+ if (!r)
695
771
  return;
696
772
  const i = (t.gridProps.group || []).slice();
697
- i.splice(r, 0, { field: n }), Ce(i, o);
698
- }, Ot = (e, r) => {
699
- const o = z.current.getCurrentGroupsLength;
700
- Ve(e, o, r);
701
- }, ye = () => {
702
- var o, n, i, a, d, u, g, m, f, I;
773
+ i.splice(n, 0, { field: r }), ke(i, o);
774
+ }, $t = (e, n) => {
775
+ const o = p.current.getCurrentGroupsLength;
776
+ Ze(e, o, n);
777
+ }, Ke = () => {
778
+ var e, n, o, r, i, a, c, s, l, u, m, w, h, O;
703
779
  if (t.gridProps.dataLayoutMode === "stacked") {
704
- const l = ((o = H.current) == null ? void 0 : o.offsetWidth) || 0;
705
- if ((n = h.current) != null && n.colGroupMain && l) {
706
- const w = h.current.colGroupMain.children, R = w.length - 1;
780
+ const g = ((e = H.current) == null ? void 0 : e.offsetWidth) || 0;
781
+ if ((n = P.current) != null && n.colGroupMain && g) {
782
+ const E = P.current.colGroupMain.children, R = E.length - 1;
707
783
  if (R >= 0) {
708
- let L = 0;
709
- for (let X = 0; X < R; X++) {
710
- const Me = parseFloat((w[X].width || 0).toString()) || w[X].clientWidth;
711
- L += Me;
784
+ let q = 0;
785
+ for (let Q = 0; Q < R; Q++) {
786
+ const Cn = parseFloat((E[Q].width || 0).toString()) || E[Q].clientWidth;
787
+ q += Cn;
712
788
  }
713
- const J = Math.max(0, l - L);
714
- w[R].width = J + "px", (a = (i = h.current.colGroupHeader) == null ? void 0 : i.children) != null && a[R] && (h.current.colGroupHeader.children[R].width = J + "px"), (u = (d = h.current.colGroupFooter) == null ? void 0 : d.children) != null && u[R] && (h.current.colGroupFooter.children[R].width = J + "px"), (m = (g = h.current.colGroupStickyHeader) == null ? void 0 : g.children) != null && m[R] && (h.current.colGroupStickyHeader.children[R].width = J + "px"), (I = (f = h.current.colGroupStickyFooter) == null ? void 0 : f.children) != null && I[R] && (h.current.colGroupStickyFooter.children[R].width = J + "px");
789
+ const B = Math.max(0, g - q);
790
+ E[R].width = B + "px", (r = (o = P.current.colGroupHeader) == null ? void 0 : o.children) != null && r[R] && (P.current.colGroupHeader.children[R].width = B + "px"), (a = (i = P.current.colGroupFooter) == null ? void 0 : i.children) != null && a[R] && (P.current.colGroupFooter.children[R].width = B + "px"), (s = (c = P.current.colGroupStickyHeader) == null ? void 0 : c.children) != null && s[R] && (P.current.colGroupStickyHeader.children[R].width = B + "px"), (u = (l = P.current.colGroupStickyFooter) == null ? void 0 : l.children) != null && u[R] && (P.current.colGroupStickyFooter.children[R].width = B + "px"), (w = (m = P.current.colGroupPinnedTop) == null ? void 0 : m.children) != null && w[R] && (P.current.colGroupPinnedTop.children[R].width = B + "px"), (O = (h = P.current.colGroupPinnedBottom) == null ? void 0 : h.children) != null && O[R] && (P.current.colGroupPinnedBottom.children[R].width = B + "px");
715
791
  }
716
792
  }
717
- B.current && B.current.setWidth(l), N.current && N.current.setWidth(l), G.current && G.current.setWidth(l), M.current && M.current.setWidth(l), W.current && (W.current.style.width = l ? l + "px" : "");
718
- return;
719
- }
720
- let e = 0;
721
- if (!h.current.colGroupMain)
722
- return;
723
- const r = h.current.colGroupMain.children;
724
- for (let l = 0; l < r.length; l++) {
725
- const w = r[l].width;
726
- if (!w) {
727
- e = 0;
728
- break;
793
+ j.current && j.current.setWidth(g), V.current && V.current.setWidth(g), M.current && M.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), U.current && (U.current.style.width = g ? g + "px" : "");
794
+ } else {
795
+ let g = 0;
796
+ if (!P.current.colGroupMain)
797
+ return;
798
+ const E = P.current.colGroupMain.children;
799
+ for (let R = 0; R < E.length; R++) {
800
+ const q = E[R].width;
801
+ if (!q) {
802
+ g = 0;
803
+ break;
804
+ }
805
+ g += parseFloat(q.toString());
729
806
  }
730
- e += parseFloat(w.toString());
807
+ g = Math.round(g), j.current && j.current.setWidth(g), V.current && V.current.setWidth(g), M.current && M.current.setWidth(g), A.current && A.current.setWidth(g), F.current && F.current.setWidth(g), L.current && L.current.setWidth(g), U.current && (U.current.style.width = g ? g + "px" : "");
731
808
  }
732
- e = Math.round(e), B.current && B.current.setWidth(e), N.current && N.current.setWidth(e), G.current && G.current.setWidth(e), M.current && M.current.setWidth(e), W.current && (W.current.style.width = e ? e + "px" : "");
733
- }, je = () => {
809
+ Ie.current && _t();
810
+ }, _t = () => {
811
+ const e = T.current, n = e ? e.scrollWidth > e.clientWidth : !1;
812
+ Ie.current && (Ie.current.style.marginBlockEnd = n ? "var(--kendo-scrollbar-width, 0px)" : "");
813
+ }, Je = () => {
734
814
  var e;
735
815
  t.gridProps.widthRef && (t.gridProps.widthRef.current = ((e = H.current) == null ? void 0 : e.offsetWidth) || 0);
736
- }, ce = () => {
816
+ }, ge = () => {
737
817
  var e;
738
- t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = F.current) == null ? void 0 : e.offsetHeight) || 0);
739
- }, Wt = () => {
818
+ t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e = T.current) == null ? void 0 : e.offsetHeight) || 0);
819
+ }, Zt = () => {
740
820
  const e = t.gridProps.minRowHeightRef;
741
821
  if (e && !e.current && !t.gridProps.rowHeight) {
742
- const r = Lr(K.current);
743
- r && (e.current = r, q());
822
+ const n = _n(G.current);
823
+ n && (e.current = n, J());
744
824
  }
745
- }, de = c.useCallback(
746
- (e, r, o, n, i) => {
747
- var g;
748
- if (!Nt() && !o || !e)
825
+ }, fe = d.useCallback(
826
+ (e, n, o, r, i) => {
827
+ var l;
828
+ if (!Jt() && !o || !e)
749
829
  return;
750
830
  const a = {
751
831
  type: e,
752
- nativeEvent: r,
832
+ nativeEvent: n,
753
833
  columns: t.columnsRef,
754
834
  dataItemKey: t.gridProps.dataItemKey || "",
755
- dataItem: n,
835
+ dataItem: r,
756
836
  field: i,
757
837
  ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
758
838
  ...o
759
- }, d = S(), u = hr({
839
+ }, c = D(), s = kn({
760
840
  event: a,
761
- data: d,
762
- selectedState: (g = t.gridProps.select) != null ? g : {},
763
- previousCopiedItems: Je.current
841
+ data: c,
842
+ selectedState: (l = t.gridProps.select) != null ? l : {},
843
+ previousCopiedItems: tt.current
764
844
  });
765
- e !== Te.paste && (Je.current = u.copiedItems), t.gridProps.onClipboard && E && s(t.gridProps.onClipboard, {
845
+ e !== ze.paste && (tt.current = s.copiedItems), t.gridProps.onClipboard && x && f(t.gridProps.onClipboard, {
766
846
  ...a,
767
- ...u
847
+ ...s
768
848
  });
769
849
  },
770
850
  [
@@ -774,24 +854,24 @@ const Jr = (t, E, b, T) => {
774
854
  t.gridProps.clipboard,
775
855
  t.gridProps.onClipboard
776
856
  ]
777
- ), Nt = () => {
778
- var i, a, d;
779
- if (!te)
857
+ ), Jt = () => {
858
+ var i, a, c;
859
+ if (!ae)
780
860
  return !1;
781
- const e = sr(A()), r = e ? e.matches(".k-table-td") ? e : (i = A()) == null ? void 0 : i.body : (a = A()) == null ? void 0 : a.body, o = r.closest(".k-grid-container"), n = r && ((d = H.current) == null ? void 0 : d.contains(r));
782
- return !!(r && n && o);
783
- }, Ue = (e, r, o, n, i, a, d) => {
784
- ye(), fe.current = !0, we.current = !0, t.gridProps.onColumnResize && E && s(t.gridProps.onColumnResize, {
785
- columns: oe(),
786
- nativeEvent: n,
787
- targetColumnId: d,
861
+ const e = wn(z()), n = e ? e.matches(".k-table-td") ? e : (i = z()) == null ? void 0 : i.body : (a = z()) == null ? void 0 : a.body, o = n.closest(".k-grid-container"), r = n && ((c = H.current) == null ? void 0 : c.contains(n));
862
+ return !!(n && r && o);
863
+ }, Xe = (e, n, o, r, i, a, c) => {
864
+ Ke(), be.current = !0, Ge.current = !0, t.gridProps.onColumnResize && x && f(t.gridProps.onColumnResize, {
865
+ columns: ce(),
866
+ nativeEvent: r,
867
+ targetColumnId: c,
788
868
  index: e,
789
- newWidth: r,
869
+ newWidth: n,
790
870
  oldWidth: o,
791
871
  end: i,
792
- target: x.current
793
- }), i && Ie(a);
794
- }, Bt = () => {
872
+ target: S.current
873
+ }), i && De(a);
874
+ }, Xt = () => {
795
875
  var e;
796
876
  return {
797
877
  filter: t.gridProps.filter,
@@ -800,236 +880,237 @@ const Jr = (t, E, b, T) => {
800
880
  take: (e = t.gridProps.take) != null ? e : t.gridProps.pageSize,
801
881
  group: t.gridProps.group
802
882
  };
803
- }, C = (e) => ({
883
+ }, I = (e) => ({
804
884
  nativeEvent: e && e.nativeEvent,
805
885
  syntheticEvent: e,
806
- target: x.current
807
- }), Vt = (e) => ({
886
+ target: S.current
887
+ }), Yt = (e) => ({
808
888
  ...e,
809
889
  nativeEvent: void 0,
810
890
  syntheticEvent: void 0,
811
891
  target: void 0,
812
892
  targetEvent: void 0,
813
893
  focusElement: void 0
814
- }), s = (e, r) => {
894
+ }), f = (e, n) => {
815
895
  if (t.gridProps.isClient) {
816
- e(r);
896
+ e(n);
817
897
  return;
818
898
  }
819
- e(Vt(r));
820
- }, jt = () => {
821
- var e, r, o;
822
- if (K.current && ((e = K.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
823
- xe.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? Se.current = document.activeElement : Se.current = void 0;
824
- const n = Array.from((o = K.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
825
- n.length > He.current.length ? ge.current = n.filter(
826
- (i) => !He.current.includes(i)
827
- )[0] : n.length === 1 && (ge.current = n[0], xe.current = !0), He.current = n;
899
+ e(Yt(n));
900
+ }, Qt = () => {
901
+ var e, n, o;
902
+ if (G.current && ((e = G.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
903
+ Me.current = !1, (n = document.activeElement) != null && n.closest(".k-grid-edit-row") ? He.current = document.activeElement : He.current = void 0;
904
+ const r = Array.from((o = G.current) == null ? void 0 : o.getElementsByClassName("k-grid-edit-row"));
905
+ r.length > Be.current.length ? Re.current = r.filter(
906
+ (i) => !Be.current.includes(i)
907
+ )[0] : r.length === 1 && (Re.current = r[0], Me.current = !0), Be.current = r;
828
908
  }
829
- }, S = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), A = () => {
909
+ }, D = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), z = () => {
830
910
  var e;
831
- if (te)
832
- return ((e = le()) == null ? void 0 : e.ownerDocument) || document;
833
- }, le = () => H.current, se = c.useCallback(
911
+ if (ae)
912
+ return ((e = me()) == null ? void 0 : e.ownerDocument) || document;
913
+ }, me = () => H.current, Pe = d.useCallback(
834
914
  (e) => {
835
- var n, i;
836
- if (!v.current || !((n = v.current) != null && n.container) || t.gridProps.scrollable === "none")
915
+ var r, i;
916
+ if (!C.current || !((r = C.current) != null && r.container) || t.gridProps.scrollable === "none")
837
917
  return;
838
- _.current && _.current.disconnect();
839
- const { rowIndex: r } = e, o = le();
840
- if (D) {
841
- const a = ((i = v.current.rowHeightService) == null ? void 0 : i.offset(r)) || 0;
842
- v.current.container.scroll(0, a);
918
+ Y.current && Y.current.disconnect();
919
+ const { rowIndex: n } = e, o = me();
920
+ if (K) {
921
+ const a = ((i = C.current.rowHeightService) == null ? void 0 : i.offset(n)) || 0;
922
+ C.current.container.scroll(0, a);
843
923
  } else if (o) {
844
- const a = r < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${r + 1})`);
845
- a && F.current && (F.current.scrollTop = a.offsetTop);
924
+ const a = n < 1 ? o.querySelector("tbody > tr:nth-child(1)") : o.querySelector(`tbody > tr:nth-child(${n + 1})`);
925
+ a && T.current && (T.current.scrollTop = a.offsetTop);
846
926
  }
847
927
  },
848
928
  [t.gridProps.scrollable]
849
- ), qe = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), Ut = () => qe(ar) === qe(t.columnsRef), qt = () => {
850
- me.current = window.innerWidth, Ut() || q();
851
- }, $t = () => {
929
+ ), Ye = (e) => JSON.stringify(e.map((n) => ({ id: n.id, field: n.field, title: n.title, children: n.children }))), en = () => Ye(bn) === Ye(t.columnsRef), tn = () => {
930
+ ve.current = window.innerWidth, en() || J();
931
+ }, nn = () => {
852
932
  var a;
853
- const { virtualTotal: e, virtualPageSize: r, gridProps: o } = t, n = v.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
854
- n && (n.fixedScroll = o.fixedScroll || !1, n.PageChange = kt, n.pageSize = r, n.scrollableVirtual = D, n.container = F.current, n.tableBody = K.current, n.scrollHeightContainer = _e.current, n.table = W.current, (!n.rowHeightService || n.total !== e) && i && (n.total = e, n.rowHeightService = new fr(e, i)));
855
- }, $e = c.useCallback(
933
+ const { virtualTotal: e, virtualPageSize: n, gridProps: o } = t, r = C.current, i = t.gridProps.rowHeight || ((a = o.minRowHeightRef) == null ? void 0 : a.current) || 0;
934
+ r && (r.fixedScroll = o.fixedScroll || !1, r.PageChange = Lt, r.pageSize = n, r.scrollableVirtual = K, r.container = T.current, r.tableBody = G.current, r.scrollHeightContainer = et.current, r.table = U.current, (!r.rowHeightService || r.total !== e) && i && (r.total = e, r.rowHeightService = new xn(e, i)));
935
+ }, Qe = d.useCallback(
856
936
  (e) => {
857
- const r = { rowIndex: Ke.current };
937
+ const n = { rowIndex: Le.current };
858
938
  e.forEach((o) => {
859
- o.boundingClientRect.height !== o.intersectionRect.height && se(r);
939
+ o.boundingClientRect.height !== o.intersectionRect.height && Pe(n);
860
940
  });
861
941
  },
862
- [se]
863
- ), q = () => {
942
+ [Pe]
943
+ ), J = () => {
864
944
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
865
- }, _t = (e) => e.left !== void 0 ? Ge !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, x = c.useRef(null), v = c.useRef(void 0), h = c.useRef(void 0), z = c.useRef(void 0), O = c.useRef(void 0), $ = c.useRef(void 0), ue = c.useRef(void 0), _ = c.useRef(null), K = c.useRef(null), Jt = c.useRef(null), F = c.useRef(null), W = c.useRef(null), Xt = c.useRef(null), H = c.useRef(null), _e = c.useRef(null), N = c.useRef(null), B = c.useRef(null), G = c.useRef(null), M = c.useRef(null), we = c.useRef(!1), Ee = c.useRef(!1), ge = c.useRef(void 0), Se = c.useRef(void 0), xe = c.useRef(!1), fe = c.useRef(!0), ke = c.useRef(0), De = c.useRef(void 0), Ke = c.useRef(void 0), He = c.useRef([]), Je = c.useRef([]), me = c.useRef(0), he = c.useRef(
945
+ }, rn = (e) => e.left !== void 0 ? We !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, S = d.useRef(null), C = d.useRef(void 0), P = d.useRef(void 0), p = d.useRef(void 0), N = d.useRef(void 0), X = d.useRef(void 0), he = d.useRef(void 0), Y = d.useRef(null), G = d.useRef(null), on = d.useRef(null), T = d.useRef(null), U = d.useRef(null), an = d.useRef(null), H = d.useRef(null), et = d.useRef(null), V = d.useRef(null), j = d.useRef(null), M = d.useRef(null), A = d.useRef(null), F = d.useRef(null), L = d.useRef(null), dn = d.useRef(null), cn = d.useRef(null), Ge = d.useRef(!1), Te = d.useRef(!1), Re = d.useRef(void 0), He = d.useRef(void 0), Me = d.useRef(!1), be = d.useRef(!0), Ae = d.useRef(0), Fe = d.useRef(void 0), Le = d.useRef(void 0), Be = d.useRef([]), tt = d.useRef([]), ve = d.useRef(0), Ce = d.useRef(
866
946
  null
867
- ), Yt = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, Qt = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, Zt = !!((Ze = t.gridProps.group) != null && Ze.length), {
868
- stickyHeaderItems: pt,
869
- stickyHeaderRef: er,
870
- stickyFooterItems: tr,
871
- stickyFooterRef: rr,
872
- scrollToStickyGroup: nr,
873
- update: Xe
874
- } = Mr({
875
- enabled: Yt,
876
- enabledFooters: Qt,
947
+ ), ln = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyHeaders, sn = typeof t.gridProps.groupable == "object" && !!t.gridProps.groupable.stickyFooters, un = !!((it = t.gridProps.group) != null && it.length), {
948
+ stickyHeaderItems: gn,
949
+ stickyHeaderRef: fn,
950
+ stickyFooterItems: mn,
951
+ stickyFooterRef: Ie,
952
+ scrollToStickyGroup: Pn,
953
+ update: nt
954
+ } = Vn({
955
+ enabled: ln,
956
+ enabledFooters: sn,
877
957
  flatData: t.dataRef,
878
- containerRef: F,
879
- tableBodyRef: K,
958
+ containerRef: T,
959
+ tableBodyRef: G,
880
960
  rowHeight: t.gridProps.rowHeight,
881
- isGrouped: Zt,
961
+ isGrouped: un,
882
962
  virtualSkipRef: t.gridProps.virtualSkipRef,
883
963
  rowHeightServiceRef: {
884
964
  get current() {
885
965
  var e;
886
- return (e = v.current) == null ? void 0 : e.rowHeightService;
966
+ return (e = C.current) == null ? void 0 : e.rowHeightService;
887
967
  }
888
968
  }
889
- }), ee = c.useRef(null), or = c.useRef(null), ir = c.useRef(null), Ge = ur(H), D = t.isVirtualScroll, ar = c.useMemo(() => c.Children.toArray(t.gridProps.children), [t.gridProps.children]), Ye = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, P = Pe(t.gridProps.selectable), Qe = Pr(t.gridProps.editable), cr = me.current && Q && me.current <= Q.medium && t.gridProps.adaptive;
890
- return c.useMemo(() => {
891
- Y.onConstructor({
969
+ }), ie = d.useRef(null), hn = d.useRef(null), Rn = d.useRef(null), We = yn(H), K = t.isVirtualScroll, bn = d.useMemo(() => d.Children.toArray(t.gridProps.children), [t.gridProps.children]), rt = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, v = we(t.gridProps.selectable), ot = Dn(t.gridProps.editable), vn = ve.current && ne && ve.current <= ne.medium && t.gridProps.adaptive;
970
+ return d.useMemo(() => {
971
+ te.onConstructor({
892
972
  navigatable: !!t.gridProps.navigatable,
893
- contextStateRef: O,
894
- navigationStateRef: $,
973
+ contextStateRef: N,
974
+ navigationStateRef: X,
895
975
  idPrefix: t.id
896
- }), v.current = new Nr();
897
- }, []), c.useMemo(() => {
976
+ }), C.current = new Yn();
977
+ }, []), d.useMemo(() => {
898
978
  var e;
899
- (e = v.current) == null || e.reset();
979
+ (e = C.current) == null || e.reset();
900
980
  }, [
901
981
  t.gridProps.scrollable,
902
982
  t.gridProps.total,
903
983
  t.gridProps.filter,
904
984
  t.gridProps.group,
905
- Ye,
985
+ rt,
906
986
  t.gridProps.sort,
907
987
  t.gridProps.rowHeight
908
- ]), c.useEffect(() => (t.gridProps.clipboard && (ue.current = new Rr(de), ue.current.addEventListeners(A())), () => {
909
- ue.current && ue.current.removeEventListeners(A());
910
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, de, A]), c.useEffect(() => (je(), ye(), pe(), Y.onComponentDidMount({
988
+ ]), d.useEffect(() => (t.gridProps.clipboard && (he.current = new Kn(fe), he.current.addEventListeners(z())), () => {
989
+ he.current && he.current.removeEventListeners(z());
990
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard, fe, z]), d.useEffect(() => (Je(), Ke(), at(), te.onComponentDidMount({
911
991
  scope: H.current || void 0,
912
- contextStateRef: O,
913
- navigationStateRef: $
992
+ contextStateRef: N,
993
+ navigationStateRef: X
914
994
  }), () => {
915
- clearTimeout(De.current);
916
- }), []), c.useEffect(() => {
995
+ clearTimeout(Fe.current);
996
+ }), []), d.useEffect(() => {
917
997
  var e;
918
- je(), ye(), pe(), D && (ce(), Wt(), (e = v.current) == null || e.update()), Xe(), jt(), Y.onComponentDidUpdate({
998
+ Je(), Ke(), at(), K && (ge(), Zt(), (e = C.current) == null || e.update()), nt(), Qt(), te.onComponentDidUpdate({
919
999
  scope: H.current || void 0,
920
- contextStateRef: O,
921
- navigationStateRef: $,
922
- focusFirst: Ee.current,
923
- newEditableRow: ge.current,
924
- singleEditRow: xe.current,
925
- lastActiveElement: Se.current,
1000
+ contextStateRef: N,
1001
+ navigationStateRef: X,
1002
+ focusFirst: Te.current,
1003
+ newEditableRow: Re.current,
1004
+ singleEditRow: Me.current,
1005
+ lastActiveElement: He.current,
926
1006
  navigatable: t.gridProps.navigatable
927
- }), ct(), Ee.current = !1, ge.current = void 0, he.current = void 0;
928
- }), c.useEffect(() => {
929
- if (te) {
1007
+ }), Pt(), Te.current = !1, Re.current = void 0, Ce.current = void 0;
1008
+ }), d.useEffect(() => {
1009
+ if (ae) {
930
1010
  const e = {
931
1011
  rootMargin: "0px",
932
1012
  threshold: 0.9
933
1013
  };
934
- _.current = window.IntersectionObserver && new window.IntersectionObserver($e, e) || null;
1014
+ Y.current = window.IntersectionObserver && new window.IntersectionObserver(Qe, e) || null;
935
1015
  }
936
- }, [$e]), c.useEffect(() => {
937
- var r;
1016
+ }, [Qe]), d.useEffect(() => {
1017
+ var n;
938
1018
  let e;
939
- return te && window.ResizeObserver && (e = new window.ResizeObserver(() => {
940
- qt(), D && ce();
941
- }), e.observe((r = A()) == null ? void 0 : r.body)), () => {
1019
+ return ae && window.ResizeObserver && (e = new window.ResizeObserver(() => {
1020
+ tn(), K && ge();
1021
+ }), e.observe((n = z()) == null ? void 0 : n.body)), () => {
942
1022
  e == null || e.disconnect();
943
1023
  };
944
- }, []), c.useEffect(() => {
945
- if (!te || !window.ResizeObserver || !D || !F.current)
1024
+ }, []), d.useEffect(() => {
1025
+ if (!ae || !window.ResizeObserver || !K || !T.current)
946
1026
  return;
947
1027
  const e = () => {
948
1028
  var i, a;
949
1029
  const o = ((i = t.gridProps.containerHeightRef) == null ? void 0 : i.current) || 0;
950
- ce();
951
- const n = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
952
- (o === 0 && n > 0 || Math.abs(n - o) > 10) && q();
953
- }, r = new window.ResizeObserver(e);
954
- return r.observe(F.current), () => {
955
- r.disconnect();
1030
+ ge();
1031
+ const r = ((a = t.gridProps.containerHeightRef) == null ? void 0 : a.current) || 0;
1032
+ (o === 0 && r > 0 || Math.abs(r - o) > 10) && J();
1033
+ }, n = new window.ResizeObserver(e);
1034
+ return n.observe(T.current), () => {
1035
+ n.disconnect();
956
1036
  };
957
- }, [D, ce]), c.useImperativeHandle(
958
- x,
1037
+ }, [K, ge]), d.useImperativeHandle(
1038
+ S,
959
1039
  () => ({
960
1040
  get element() {
961
- return le();
1041
+ return me();
962
1042
  },
963
1043
  props: t.gridProps,
964
1044
  get columns() {
965
- return oe();
1045
+ return ce();
966
1046
  },
967
1047
  scrollIntoView: (e) => {
968
- var n;
969
- if (!((n = v.current) != null && n.container) || t.gridProps.scrollable === "none")
1048
+ var r;
1049
+ if (!((r = C.current) != null && r.container) || t.gridProps.scrollable === "none")
970
1050
  return;
971
- const { rowIndex: r } = e;
972
- Ke.current = r;
973
- const o = le();
974
- if (_.current && o) {
975
- _.current.disconnect();
976
- const i = o.querySelector(`[absolute-row-index="${Ke.current}"]`);
977
- i ? _.current.observe(i) : se(e);
1051
+ const { rowIndex: n } = e;
1052
+ Le.current = n;
1053
+ const o = me();
1054
+ if (Y.current && o) {
1055
+ Y.current.disconnect();
1056
+ const i = o.querySelector(`[absolute-row-index="${Le.current}"]`);
1057
+ i ? Y.current.observe(i) : Pe(e);
978
1058
  }
979
1059
  },
980
1060
  fitColumns: (e) => {
981
- h.current.dblClickHandler(null, e);
1061
+ P.current.dblClickHandler(null, e);
982
1062
  },
983
- exportAsPdf: ve,
984
- saveAsCsv: Ne,
985
- getCsvBlob: Be,
986
- getTotal: be,
987
- getLeafDataItems: S
1063
+ exportAsPdf: Se,
1064
+ saveAsCsv: $e,
1065
+ getCsvBlob: _e,
1066
+ getTotal: xe,
1067
+ getLeafDataItems: D
988
1068
  })
989
- ), c.useImperativeHandle(t.gridRef, () => x.current), c.useMemo(() => {
990
- h.current = new Hr(Ue);
991
- }, [t.gridProps.onColumnResize, t.columnsRef]), c.useMemo(() => {
992
- z.current = new Gr(ae, zt, Ve);
1069
+ ), d.useImperativeHandle(t.gridRef, () => S.current), d.useMemo(() => {
1070
+ P.current = new Nn(Xe);
1071
+ }, [t.gridProps.onColumnResize, t.columnsRef]), d.useMemo(() => {
1072
+ p.current = new Un(ue, qt, Ze);
993
1073
  }, [
994
1074
  t.gridProps.onColumnReorder,
995
1075
  t.gridProps.onGroupChange,
996
1076
  t.gridProps.group,
997
1077
  t.columnsRef,
998
1078
  t.gridProps.groupable
999
- ]), h.current.resizable = t.gridProps.resizable || !1, h.current.columns = t.columnsRef, h.current.columnsState = gr(t.columnsState), z.current.reorderable = t.gridProps.reorderable || !1, z.current.groupable = Ye, z.current.columns = t.columnsRef, z.current.dir = Ge, $t(), /* @__PURE__ */ c.createElement(
1000
- $r.Provider,
1079
+ ]), P.current.resizable = t.gridProps.resizable || !1, P.current.columns = t.columnsRef, P.current.columnsState = En(t.columnsState), p.current.reorderable = t.gridProps.reorderable || !1, p.current.groupable = rt, p.current.columns = t.columnsRef, p.current.dir = We, nn(), /* @__PURE__ */ d.createElement(
1080
+ ir.Provider,
1001
1081
  {
1002
1082
  value: {
1003
- isClient: E,
1004
- rowReorder: p,
1005
- activeDragRowDataItemRef: ee,
1006
- reorderRowDragTargetRef: or,
1007
- reorderRowDropTargetRef: ir,
1008
- dir: Ge,
1009
- getCellPositionStyle: _t,
1083
+ isClient: x,
1084
+ rowReorder: oe,
1085
+ activeDragRowDataItemRef: ie,
1086
+ reorderRowDragTargetRef: hn,
1087
+ reorderRowDropTargetRef: Rn,
1088
+ dir: We,
1089
+ getCellPositionStyle: rn,
1010
1090
  dataItemKey: t.gridProps.dataItemKey,
1011
1091
  columnsState: t.columnsState,
1012
1092
  columnsRef: t.columnsRef,
1013
1093
  hiddenColumnsRef: t.hiddenColumnsRef,
1014
- onColumnsStateChange: Ie,
1094
+ onColumnsStateChange: De,
1015
1095
  groupable: t.gridProps.groupable,
1016
1096
  group: t.gridProps.group,
1017
1097
  reorderable: t.gridProps.reorderable,
1018
1098
  defaultGroup: t.gridProps.defaultGroup,
1019
- groupChange: Ce,
1020
- selectionRelease: yt,
1021
- pagerPageChange: Gt,
1022
- onContextMenu: ot,
1023
- rowClick: ut,
1024
- rowDblClick: gt,
1025
- cellClick: ht,
1026
- headerCellClick: ze,
1027
- itemChange: bt,
1028
- onDialogEditCancel: mt,
1029
- onDialogEditSubmit: ft,
1030
- columnReorder: ae,
1031
- onResize: Ue,
1032
- getTotal: be,
1099
+ groupChange: ke,
1100
+ selectionRelease: Ve,
1101
+ pinnedSelectionRelease: Tt,
1102
+ pagerPageChange: Ot,
1103
+ onContextMenu: gt,
1104
+ rowClick: vt,
1105
+ rowDblClick: Ct,
1106
+ cellClick: yt,
1107
+ headerCellClick: Ue,
1108
+ itemChange: kt,
1109
+ onDialogEditCancel: wt,
1110
+ onDialogEditSubmit: It,
1111
+ columnReorder: ue,
1112
+ onResize: Xe,
1113
+ getTotal: xe,
1033
1114
  sortable: t.gridProps.sortable,
1034
1115
  pageable: t.gridProps.pageable,
1035
1116
  pageSize: t.gridProps.pageSize,
@@ -1037,83 +1118,89 @@ const Jr = (t, E, b, T) => {
1037
1118
  skip: t.gridProps.skip,
1038
1119
  take: t.gridProps.take,
1039
1120
  defaultSort: t.gridProps.defaultSort,
1040
- sortChange: Oe,
1121
+ sortChange: je,
1041
1122
  filterable: t.gridProps.filterable,
1042
1123
  filter: t.gridProps.filter,
1043
1124
  defaultFilter: t.gridProps.defaultFilter,
1044
- filterOperators: t.gridProps.filterOperators || _r,
1045
- getLeafDataItems: S,
1046
- filterChange: Mt,
1047
- applyHighlightDescriptor: Tt,
1048
- applySelectionDescriptor: St,
1125
+ filterOperators: t.gridProps.filterOperators || ar,
1126
+ getLeafDataItems: D,
1127
+ filterChange: pt,
1128
+ applyHighlightDescriptor: Nt,
1129
+ applySelectionDescriptor: At,
1049
1130
  highlight: t.gridProps.highlight,
1050
1131
  select: t.gridProps.select,
1051
- searchChange: At,
1052
- exportAsPdf: ve,
1053
- exportAsCsv: Ne,
1054
- getCsvBlob: Be,
1055
- onHeaderSelectionChange: It,
1056
- columnGroupChange: Ot,
1057
- onKeyDown: dt,
1058
- onFocus: lt,
1059
- scrollHandler: it,
1060
- selectionChange: vt,
1061
- mobileMode: cr,
1062
- adaptiveColumnMenuRef: me.current,
1132
+ searchChange: Ut,
1133
+ exportAsPdf: Se,
1134
+ exportAsCsv: $e,
1135
+ getCsvBlob: _e,
1136
+ onHeaderSelectionChange: Gt,
1137
+ columnGroupChange: $t,
1138
+ onKeyDown: ht,
1139
+ onFocus: Rt,
1140
+ scrollHandler: ft,
1141
+ selectionChange: Dt,
1142
+ mobileMode: vn,
1143
+ adaptiveColumnMenuRef: ve.current,
1063
1144
  adpativeTitle: t.gridProps.adaptiveTitle,
1064
1145
  adaptive: t.gridProps.adaptive,
1065
- dispatchDetailExpand: Pt,
1066
- dispatchGroupExpand: Rt,
1067
- columnResizeRef: h,
1068
- dragLogicRef: z,
1069
- navigationStateRef: $,
1070
- tableElementRef: W,
1071
- tableBodyElementRef: K,
1072
- headerElementRef: Jt,
1073
- containerElementRef: F,
1074
- headTableElementRef: Xt,
1146
+ dispatchDetailExpand: Et,
1147
+ dispatchGroupExpand: xt,
1148
+ columnResizeRef: P,
1149
+ dragLogicRef: p,
1150
+ navigationStateRef: X,
1151
+ tableElementRef: U,
1152
+ tableBodyElementRef: G,
1153
+ headerElementRef: on,
1154
+ containerElementRef: T,
1155
+ headTableElementRef: an,
1075
1156
  elementRef: H,
1076
- virtualScrollHeightContainerRef: _e,
1077
- footerRef: N,
1078
- headerRef: B,
1079
- vsRef: v,
1080
- stickyHeaderItems: pt,
1081
- stickyHeaderRef: er,
1082
- stickyFooterItems: tr,
1083
- stickyFooterRef: rr,
1084
- stickyHeaderTableRef: G,
1085
- stickyFooterTableRef: M
1157
+ virtualScrollHeightContainerRef: et,
1158
+ footerRef: V,
1159
+ headerRef: j,
1160
+ vsRef: C,
1161
+ stickyHeaderItems: gn,
1162
+ stickyHeaderRef: fn,
1163
+ stickyFooterItems: mn,
1164
+ stickyFooterRef: Ie,
1165
+ stickyHeaderTableRef: M,
1166
+ stickyFooterTableRef: A,
1167
+ pinnedTopTableRef: F,
1168
+ pinnedBottomTableRef: L,
1169
+ pinnedTopRef: dn,
1170
+ pinnedBottomRef: cn,
1171
+ onRowPin: le,
1172
+ getRowPinPosition: St
1086
1173
  }
1087
1174
  },
1088
- /* @__PURE__ */ c.createElement(br.Provider, { value: O.current }, t.children),
1089
- /* @__PURE__ */ c.createElement(
1090
- Br,
1175
+ /* @__PURE__ */ d.createElement(Gn.Provider, { value: N.current }, t.children),
1176
+ /* @__PURE__ */ d.createElement(
1177
+ Qn,
1091
1178
  {
1092
- show: b.show && (ne == null ? void 0 : ne.length),
1179
+ show: b.show && (de == null ? void 0 : de.length),
1093
1180
  dataItem: b.dataItem,
1094
1181
  field: b.field,
1095
- items: ne,
1182
+ items: de,
1096
1183
  offset: b.offset,
1097
- onClose: Ae,
1098
- onSelect: nt
1184
+ onClose: Oe,
1185
+ onSelect: ut
1099
1186
  }
1100
1187
  ),
1101
- t.gridProps.pdf && /* @__PURE__ */ c.createElement(
1102
- Ur,
1188
+ t.gridProps.pdf && /* @__PURE__ */ d.createElement(
1189
+ rr,
1103
1190
  {
1104
1191
  gridProps: t.gridProps,
1105
1192
  innerGrid: t.innerGrid,
1106
1193
  pdf: typeof t.gridProps.pdf == "object" ? t.gridProps.pdf : {},
1107
- onPdfExport: Ft,
1108
- ref: (e) => V.current = e
1194
+ onPdfExport: Vt,
1195
+ ref: (e) => $.current = e
1109
1196
  }
1110
1197
  ),
1111
- t.gridProps.csv && /* @__PURE__ */ c.createElement(
1112
- qr,
1198
+ t.gridProps.csv && /* @__PURE__ */ d.createElement(
1199
+ or,
1113
1200
  {
1114
1201
  gridProps: t.gridProps,
1115
1202
  csv: typeof t.gridProps.csv == "object" ? t.gridProps.csv : {},
1116
- onCsvExport: Lt,
1203
+ onCsvExport: jt,
1117
1204
  columnsState: t.columnsState,
1118
1205
  ref: (e) => k.current = e
1119
1206
  }
@@ -1121,5 +1208,5 @@ const Jr = (t, E, b, T) => {
1121
1208
  );
1122
1209
  };
1123
1210
  export {
1124
- un as GridClientWrapper
1211
+ yr as GridClientWrapper
1125
1212
  };