@progress/kendo-react-grid 9.4.0-develop.24 → 9.4.0-develop.4

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 (184) hide show
  1. package/Grid.js +1 -1
  2. package/Grid.mjs +5 -4
  3. package/GridClientContextReader.js +1 -2
  4. package/GridClientContextReader.mjs +14 -15
  5. package/GridClientWrapper.js +1 -2
  6. package/GridClientWrapper.mjs +375 -450
  7. package/GridColumn.js +1 -1
  8. package/GridColumn.mjs +5 -4
  9. package/GridComponent.js +1 -1
  10. package/GridComponent.mjs +310 -344
  11. package/GridState.js +1 -2
  12. package/GridState.mjs +67 -79
  13. package/GridToolbar.js +1 -1
  14. package/GridToolbar.mjs +6 -5
  15. package/GridWatermarkOverlay.js +1 -2
  16. package/GridWatermarkOverlay.mjs +2 -2
  17. package/NOTICE.txt +51 -40
  18. package/StatusBar.js +1 -1
  19. package/StatusBar.mjs +1 -0
  20. package/VirtualScroll.js +1 -1
  21. package/VirtualScroll.mjs +1 -0
  22. package/VirtualScrollFixed.js +1 -1
  23. package/VirtualScrollFixed.mjs +10 -9
  24. package/cells/GridCell.js +1 -1
  25. package/cells/GridCell.mjs +23 -25
  26. package/cells/GridDetailCell.js +1 -1
  27. package/cells/GridDetailCell.mjs +6 -5
  28. package/cells/GridDetailHierarchyCell.js +1 -1
  29. package/cells/GridDetailHierarchyCell.mjs +5 -4
  30. package/cells/GridEditCell.js +1 -1
  31. package/cells/GridEditCell.mjs +7 -6
  32. package/cells/GridFilterCell.js +1 -2
  33. package/cells/GridGroupCell.js +1 -1
  34. package/cells/GridGroupCell.mjs +12 -11
  35. package/cells/GridHierarchyCell.js +1 -1
  36. package/cells/GridHierarchyCell.mjs +8 -7
  37. package/cells/GridRowReorderCell.js +1 -1
  38. package/cells/GridRowReorderCell.mjs +4 -3
  39. package/cells/GridSelectionCell.js +1 -1
  40. package/cells/GridSelectionCell.mjs +13 -12
  41. package/cells/client/DetailCellContainer.js +1 -2
  42. package/cells/client/DetailCellContainer.mjs +2 -2
  43. package/cells/client/GridCellContainer.js +1 -2
  44. package/cells/client/GridEditCellContainer.js +1 -2
  45. package/cells/client/GridEditCellEditor.js +1 -2
  46. package/cells/client/GridEditCellEditor.mjs +14 -14
  47. package/cells/client/GridGroupCellContainer.js +1 -2
  48. package/cells/client/GridGroupCellContainer.mjs +39 -39
  49. package/cells/client/GridGroupCellToggle.js +1 -2
  50. package/cells/client/GridGroupCellToggle.mjs +3 -3
  51. package/cells/client/GridHierarchyCellContainer.js +1 -2
  52. package/cells/client/GridHierarchyCellToggle.js +1 -2
  53. package/cells/client/GridHierarchyCellToggle.mjs +15 -15
  54. package/cells/client/GridRowReorderContainer.js +1 -2
  55. package/cells/client/GridRowReorderContainer.mjs +8 -14
  56. package/cells/client/GridSelectionCellContainer.js +1 -2
  57. package/cells/client/GridSelectionCellInput.js +1 -2
  58. package/cells/client/GridSelectionCellInput.mjs +3 -3
  59. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -2
  60. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +55 -56
  61. package/columnMenu/GridColumnMenuColumnsList.js +1 -2
  62. package/columnMenu/GridColumnMenuColumnsList.mjs +16 -16
  63. package/columnMenu/GridColumnMenuFilter.js +1 -2
  64. package/columnMenu/GridColumnMenuFilterCell.js +1 -2
  65. package/columnMenu/GridColumnMenuFilterCell.mjs +3 -3
  66. package/columnMenu/GridColumnMenuFilterUI.js +1 -2
  67. package/columnMenu/GridColumnMenuGroup.js +1 -2
  68. package/columnMenu/GridColumnMenuGroup.mjs +5 -5
  69. package/columnMenu/GridColumnMenuItem.js +1 -2
  70. package/columnMenu/GridColumnMenuItem.mjs +2 -2
  71. package/columnMenu/GridColumnMenuItemContent.js +1 -2
  72. package/columnMenu/GridColumnMenuItemContent.mjs +4 -4
  73. package/columnMenu/GridColumnMenuItemGroup.js +1 -2
  74. package/columnMenu/GridColumnMenuItemGroup.mjs +4 -4
  75. package/columnMenu/GridColumnMenuSort.js +1 -2
  76. package/columnMenu/GridColumnMenuSort.mjs +8 -8
  77. package/columnMenu/GridColumnMenuWrapper.js +1 -2
  78. package/components/GridContainerElementContainer.js +1 -2
  79. package/components/GridCustomCellClientContainer.js +1 -2
  80. package/components/GridCustomCellClientContainer.mjs +2 -2
  81. package/components/GridDragClue.js +1 -2
  82. package/components/GridDragClue.mjs +5 -5
  83. package/components/GridDraggableRowsContainer.js +1 -2
  84. package/components/GridDropClue.js +1 -2
  85. package/components/GridDropClue.mjs +5 -5
  86. package/components/GridElementContainer.js +1 -2
  87. package/components/GridElementContainer.mjs +6 -6
  88. package/components/PagerContainer.js +1 -2
  89. package/components/PagerContainer.mjs +4 -4
  90. package/components/VirtualScrollHeightContainer.js +1 -2
  91. package/components/VirtualScrollHeightContainer.mjs +2 -2
  92. package/components/colGroup/GridColGroup.js +1 -2
  93. package/components/colGroup/GridColGroup.mjs +5 -5
  94. package/components/icons/reorder-row-svg.js +1 -2
  95. package/components/icons/reorder-row-svg.mjs +2 -2
  96. package/components/noRecords/GridNoRecords.js +1 -2
  97. package/components/noRecords/GridNoRecords.mjs +5 -5
  98. package/components/noRecords/GridNoRecordsContainer.js +1 -2
  99. package/components/noRecords/GridNoRecordsContainer.mjs +4 -4
  100. package/components/table/GridTable.js +1 -2
  101. package/components/table/GridTable.mjs +4 -4
  102. package/components/table/GridTableBody.js +1 -2
  103. package/components/table/GridTableBody.mjs +2 -2
  104. package/components/table/GridTableScrollable.js +1 -2
  105. package/components/table/GridTableScrollable.mjs +6 -6
  106. package/components/utils.js +1 -1
  107. package/components/utils.mjs +1 -0
  108. package/constants/index.js +1 -1
  109. package/constants/index.mjs +1 -0
  110. package/contextMenu/GridContextMenu.js +1 -2
  111. package/contextMenu/GridContextMenu.mjs +3 -3
  112. package/contextMenu/enums.js +1 -1
  113. package/contextMenu/enums.mjs +1 -0
  114. package/dist/cdn/js/kendo-react-grid.js +1 -8
  115. package/drag/ColumnDraggable.js +1 -2
  116. package/drag/ColumnDraggable.mjs +7 -7
  117. package/drag/ColumnResize.js +1 -1
  118. package/drag/ColumnResize.mjs +1 -0
  119. package/drag/CommonDragLogic.js +1 -1
  120. package/drag/CommonDragLogic.mjs +1 -0
  121. package/drag/GroupingIndicator.js +1 -2
  122. package/drag/GroupingIndicator.mjs +11 -11
  123. package/filterCommon.js +1 -1
  124. package/filterCommon.mjs +5 -4
  125. package/footer/Footer.js +1 -2
  126. package/footer/FooterCell.js +1 -1
  127. package/footer/FooterCell.mjs +4 -3
  128. package/footer/FooterRow.js +1 -1
  129. package/footer/FooterRow.mjs +7 -6
  130. package/footer/client/FooterCellContainer.js +1 -2
  131. package/footer/client/FooterCellContainer.mjs +5 -5
  132. package/header/FilterRow.js +1 -1
  133. package/header/FilterRow.mjs +43 -41
  134. package/header/GridHeaderCell.js +1 -2
  135. package/header/GridHeaderCell.mjs +4 -4
  136. package/header/GridHeaderSelectionCell.js +1 -2
  137. package/header/GroupPanel.js +1 -2
  138. package/header/Header.js +1 -2
  139. package/header/HeaderRow.js +1 -1
  140. package/header/HeaderRow.mjs +35 -33
  141. package/header/client/GridFilterCellContainer.js +1 -2
  142. package/header/client/GridFilterCellContainer.mjs +7 -7
  143. package/header/client/GridFilterCellElementContainer.js +1 -2
  144. package/header/client/GridHeaderCellContainer.js +1 -2
  145. package/header/client/GridHeaderCellContainer.mjs +18 -20
  146. package/header/client/GridHeaderCellElementContainer.js +1 -2
  147. package/header/client/GridHeaderCellElementContainer.mjs +10 -10
  148. package/header/client/GridHeaderRowContainer.js +1 -2
  149. package/header/client/GridHeaderRowReorderCell.js +1 -2
  150. package/header/client/GridHeaderRowReorderCell.mjs +2 -2
  151. package/header/client/HeaderCellResizer.js +1 -2
  152. package/header/client/HeaderRowDraggable.js +1 -2
  153. package/index.d.mts +5 -211
  154. package/index.d.ts +5 -211
  155. package/index.js +1 -1
  156. package/index.mjs +68 -71
  157. package/interfaces/GridSortSettings.js +8 -0
  158. package/{sortCommon.mjs → interfaces/GridSortSettings.mjs} +1 -0
  159. package/messages/index.js +1 -1
  160. package/messages/index.mjs +37 -38
  161. package/messages/messagesMap.js +1 -1
  162. package/messages/messagesMap.mjs +3 -2
  163. package/package-metadata.js +1 -1
  164. package/package-metadata.mjs +3 -2
  165. package/package.json +13 -14
  166. package/paging/GridPagerSettings.js +1 -1
  167. package/paging/GridPagerSettings.mjs +7 -6
  168. package/rows/GridDetailRow.js +1 -1
  169. package/rows/GridDetailRow.mjs +3 -2
  170. package/rows/GridRow.js +1 -2
  171. package/rows/GridRow.mjs +45 -45
  172. package/utils/_clientModule.js +1 -2
  173. package/utils/_clientModule.mjs +2 -2
  174. package/utils/_serverModule.js +1 -1
  175. package/utils/_serverModule.mjs +1 -0
  176. package/utils/index.js +1 -1
  177. package/utils/index.mjs +129 -138
  178. package/GridSearchBox.js +0 -8
  179. package/GridSearchBox.mjs +0 -35
  180. package/columnMenu/GridColumnMenuColumnsChooser.js +0 -9
  181. package/columnMenu/GridColumnMenuColumnsChooser.mjs +0 -82
  182. package/components/GridLoader.js +0 -9
  183. package/components/GridLoader.mjs +0 -22
  184. package/sortCommon.js +0 -8
@@ -7,22 +7,22 @@
7
7
  */
8
8
  "use client";
9
9
  import * as i from "react";
10
- import { canUseDOM as $, getActiveElement as zt, useDir as Nt, setScrollbarWidth as Fe, getter as J, getScrollbarWidth as Ot, RowHeightService as Le } from "@progress/kendo-react-common";
11
- import { getSelectionOptions as Y, populateClipboardData as Bt, ClipboardActionType as me, getEditableOptions as Ut, tableKeyboardNavigation as T, ClipboardService as Vt, TableKeyboardNavigationContext as Wt, getSelectedStateFromKeyDown as _t, closestTagName as Ge, getColumnIndex as jt, getRowIndex as qt, editReducer as Xt, EDIT_ACTION as $t, getDetailExpandableOptions as Jt, detailExpandReducer as ze, getGroupExpandableOptions as Yt, groupExpandReducer as Qt, DETAIL_EXPAND_ACTION as Zt, getSelectedState as Ne, updateLeft as pt, updateRight as er } from "@progress/kendo-react-data-tools";
12
- import { ColumnResize as tr } from "./drag/ColumnResize.mjs";
13
- import { CommonDragLogic as rr } from "./drag/CommonDragLogic.mjs";
14
- import { SAFARI_REGEX as nr } from "./constants/index.mjs";
15
- import { getDefaultHeadContextMenuItems as or, getDefaultBodyContextMenuItems as ar, isRowReorderEnabled as ir, sanitizeColumns as dr, getDataAsArray as cr, firefox as Oe, firefoxMaxHeight as Be } from "./utils/index.mjs";
16
- import { VirtualScrollFixed as Ue } from "./VirtualScrollFixed.mjs";
17
- import { VirtualScroll as lr } from "./VirtualScroll.mjs";
18
- import { GridContextMenu as sr } from "./contextMenu/GridContextMenu.mjs";
19
- import { GridContextMenuAnchorPart as Ve } from "./contextMenu/enums.mjs";
20
- import { normalize as ur, firstLevelSortSeqMap as gr } from "./sortCommon.mjs";
21
- const fr = i.createContext(void 0), Sr = (t) => {
22
- var ke, Ke;
23
- const v = t.gridProps.isClient, [b, Pe] = i.useState({}), We = (e) => {
24
- e.event.preventDefault(), Pe({
25
- ...b,
10
+ import { useDir as yt, setScrollbarWidth as ke, canUseDOM as q, getter as X, getActiveElement as St, getScrollbarWidth as kt, RowHeightService as De } from "@progress/kendo-react-common";
11
+ import { getSelectionOptions as $, getEditableOptions as Dt, tableKeyboardNavigation as M, ClipboardService as Kt, TableKeyboardNavigationContext as Mt, getSelectedStateFromKeyDown as Tt, closestTagName as Ke, getColumnIndex as At, getRowIndex as Ht, editReducer as Ft, EDIT_ACTION as Gt, getDetailExpandableOptions as zt, detailExpandReducer as Me, getGroupExpandableOptions as Lt, groupExpandReducer as Nt, DETAIL_EXPAND_ACTION as Ot, getSelectedState as Te, updateLeft as Bt, updateRight as Ut } from "@progress/kendo-react-data-tools";
12
+ import { ColumnResize as Vt } from "./drag/ColumnResize.mjs";
13
+ import { CommonDragLogic as Wt } from "./drag/CommonDragLogic.mjs";
14
+ import { SAFARI_REGEX as _t } from "./constants/index.mjs";
15
+ import { getDefaultHeadContextMenuItems as jt, getDefaultBodyContextMenuItems as qt, sanitizeColumns as Xt, firefox as Ae, firefoxMaxHeight as He } from "./utils/index.mjs";
16
+ import { VirtualScrollFixed as Fe } from "./VirtualScrollFixed.mjs";
17
+ import { VirtualScroll as $t } from "./VirtualScroll.mjs";
18
+ import { GridContextMenu as Jt } from "./contextMenu/GridContextMenu.mjs";
19
+ import { GridContextMenuAnchorPart as Ge } from "./contextMenu/enums.mjs";
20
+ import { normalize as Yt, firstLevelSortSeqMap as Qt } from "./interfaces/GridSortSettings.mjs";
21
+ const Zt = i.createContext(void 0), sr = (t) => {
22
+ var ye, Se;
23
+ const E = t.gridProps.isClient, [h, fe] = i.useState({}), ze = (e) => {
24
+ e.event.preventDefault(), fe({
25
+ ...h,
26
26
  show: !0,
27
27
  offset: {
28
28
  left: e.event.pageX,
@@ -31,31 +31,30 @@ const fr = i.createContext(void 0), Sr = (t) => {
31
31
  dataItem: e.dataItem,
32
32
  field: e.field
33
33
  });
34
- }, he = () => {
35
- Pe({});
36
- }, P = i.useMemo(() => t.columnsRef.current.find((e) => e.field === b.field), [t.columnsRef, b]), be = i.useMemo(() => {
37
- const e = t.gridProps.sortable && (P == null ? void 0 : P.sortable);
38
- return or({
34
+ }, me = () => {
35
+ fe({});
36
+ }, m = i.useMemo(() => t.columnsRef.current.find((e) => e.field === h.field), [t.columnsRef, h]), Pe = i.useMemo(() => {
37
+ const e = t.gridProps.sortable && (m == null ? void 0 : m.sortable);
38
+ return jt({
39
39
  sortable: !!e,
40
- selectable: Y(t.gridProps.selectable).enabled,
40
+ selectable: $(t.gridProps.selectable).enabled,
41
41
  clipboard: !!t.gridProps.clipboard
42
42
  });
43
- }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Ie = i.useMemo(() => {
44
- const e = t.gridProps.sortable && (P == null ? void 0 : P.sortable);
45
- return ar({
43
+ }, [m, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), he = i.useMemo(() => {
44
+ const e = t.gridProps.sortable && (m == null ? void 0 : m.sortable);
45
+ return qt({
46
46
  sortable: !!e,
47
- selectable: Y(t.gridProps.selectable).enabled,
48
- clipboard: !!t.gridProps.clipboard,
49
- rowReorderable: ir(t.gridProps.rowReorderable)
47
+ selectable: $(t.gridProps.selectable).enabled,
48
+ clipboard: !!t.gridProps.clipboard
50
49
  });
51
- }, [P, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), _e = i.useMemo(() => {
52
- const e = (P == null ? void 0 : P.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(b) : e;
53
- if (r && b.offset) {
54
- const n = b.dataItem ? Ve.body : Ve.head, o = r[n], a = b.dataItem ? Ie : be;
55
- return o === !1 ? void 0 : o === !0 || o === void 0 ? a : o;
50
+ }, [m, t.gridProps.sortable, t.gridProps.selectable, t.gridProps.clipboard]), Le = i.useMemo(() => {
51
+ const e = (m == null ? void 0 : m.contextMenu) || t.gridProps.contextMenu, r = typeof e == "function" ? e(h) : e;
52
+ if (r && h.offset) {
53
+ const n = h.dataItem ? Ge.body : Ge.head, o = r[n];
54
+ return o === !1 ? void 0 : o === !0 || o === void 0 ? h.dataItem ? he : Pe : o;
56
55
  }
57
- }, [t.gridProps.contextMenu, b, Ie, be, P]), je = (e) => {
58
- var l, f, m, s, C, Te, Me, Ae, He;
56
+ }, [t.gridProps.contextMenu, h, he, Pe, m]), Ne = (e) => {
57
+ var c;
59
58
  const r = e.event.item, n = {
60
59
  target: R.current,
61
60
  syntheticEvent: e.event.syntheticEvent,
@@ -63,8 +62,8 @@ const fr = i.createContext(void 0), Sr = (t) => {
63
62
  menuItem: r,
64
63
  ...e
65
64
  };
66
- t.gridProps.onContextMenuItemClick && u(t.gridProps.onContextMenuItemClick, n);
67
- const o = V(), a = {
65
+ t.gridProps.onContextMenuItemClick && s(t.gridProps.onContextMenuItemClick, n);
66
+ const o = Z(), a = {
68
67
  selectedField: t.gridProps.selectedField || "",
69
68
  componentId: t.id,
70
69
  dataItems: o,
@@ -78,45 +77,32 @@ const fr = i.createContext(void 0), Sr = (t) => {
78
77
  metaKey: !1,
79
78
  shiftKey: !1,
80
79
  isDrag: !1,
81
- ...Y(t.gridProps.selectable),
80
+ ...$(t.gridProps.selectable),
82
81
  ...n
83
- }, d = o.findIndex((fe) => fe === e.dataItem);
84
- switch ((l = r.data) == null ? void 0 : l.action) {
82
+ };
83
+ switch ((c = r.data) == null ? void 0 : c.action) {
85
84
  case "SortCommand":
86
- if (P) {
87
- const fe = (f = r.name) == null ? void 0 : f.toLowerCase().includes("asc"), Ft = ((m = r.name) == null ? void 0 : m.toLowerCase().includes("desc")) ? "desc" : void 0, Lt = fe ? "asc" : Ft, Gt = r.name ? Lt : void 0;
88
- Re(e.event.syntheticEvent, P, Gt);
85
+ if (m) {
86
+ const l = r.name ? r.name.toLowerCase().includes("asc") ? "asc" : r.name.toLowerCase().includes("desc") ? "desc" : void 0 : void 0;
87
+ be(e.event.syntheticEvent, m, l);
89
88
  }
90
89
  break;
91
90
  case "SelectRowCommand":
92
- dt(a);
91
+ et(a);
93
92
  break;
94
93
  case "SelectAllRowsCommand":
95
- it(a);
94
+ pe(a);
96
95
  break;
97
96
  case "ClearSelectionCommand":
98
- ct(a);
99
- break;
100
- case "ReorderRowCommand":
101
- G.current = e.dataItem, (s = r.name) != null && s.toLowerCase().includes("rowup") && d > 0 && A(e.event.syntheticEvent, d - 1, "before"), (C = r.name) != null && C.toLowerCase().includes("rowdown") && d < o.length - 1 && A(e.event.syntheticEvent, d + 1, "after"), (Te = r.name) != null && Te.toLowerCase().includes("rowtop") && A(e.event.syntheticEvent, 0, "before"), (Me = r.name) != null && Me.toLowerCase().includes("rowbottom") && A(e.event.syntheticEvent, o.length - 1, "after");
102
- break;
103
- case "CopySelectionCommand":
104
- B(me.copy, e.event.nativeEvent, {
105
- copyHeaders: !((Ae = r.name) != null && Ae.toLowerCase().includes("noheaders"))
106
- });
107
- break;
108
- case "PasteCommand":
109
- B(me.paste, e.event.nativeEvent, {
110
- copyHeaders: !((He = r.name) != null && He.toLowerCase().includes("noheaders"))
111
- });
97
+ tt(a);
112
98
  break;
113
99
  }
114
- he();
115
- }, z = () => {
116
- const e = g.current.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
117
- return dr(e);
118
- }, qe = (e, r, n) => {
119
- if (t.gridProps.onContextMenu && v) {
100
+ me();
101
+ }, G = () => {
102
+ const e = u.current.filter((r) => r.declarationIndex >= 0 && r.parentIndex === -1);
103
+ return Xt(e);
104
+ }, Oe = (e, r, n) => {
105
+ if (t.gridProps.onContextMenu && E) {
120
106
  const o = {
121
107
  target: R.current,
122
108
  syntheticEvent: e,
@@ -124,65 +110,65 @@ const fr = i.createContext(void 0), Sr = (t) => {
124
110
  dataItem: r,
125
111
  field: n
126
112
  };
127
- u(t.gridProps.onContextMenu, o);
113
+ s(t.gridProps.onContextMenu, o);
128
114
  }
129
- t.gridProps.contextMenu && We({
115
+ t.gridProps.contextMenu && ze({
130
116
  event: e,
131
117
  dataItem: r,
132
118
  field: n
133
119
  });
134
- }, Xe = (e) => {
120
+ }, Be = (e) => {
135
121
  if (e.target !== e.currentTarget)
136
122
  return;
137
- clearTimeout(se.current), c.current && (c.current.table = x.current);
123
+ clearTimeout(le.current), d.current && (d.current.table = x.current);
138
124
  const r = e.currentTarget.scrollLeft, n = e.currentTarget.scrollTop, o = t.gridProps.scrollable === "virtual";
139
- t.gridProps.columnVirtualization && (!o || n === le.current) && (se.current = window.setTimeout(() => {
140
- re();
141
- }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), L.current && L.current.setScrollLeft(r), F.current && F.current.setScrollLeft(r), c.current && n !== le.current && c.current.scrollHandler(e), t.gridProps.onScroll && v && u(t.gridProps.onScroll, {
142
- ...h(e)
143
- }), le.current = n;
144
- }, $e = (e) => {
145
- var n, o;
146
- T.onKeyDown(e, {
125
+ t.gridProps.columnVirtualization && (!o || n === ce.current) && (le.current = window.setTimeout(() => {
126
+ te();
127
+ }, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = r), H.current && H.current.setScrollLeft(r), A.current && A.current.setScrollLeft(r), d.current && n !== ce.current && d.current.scrollHandler(e), t.gridProps.onScroll && E && s(t.gridProps.onScroll, {
128
+ ...P(e)
129
+ }), ce.current = n;
130
+ }, Ue = (e) => {
131
+ var n, o, a, c;
132
+ M.onKeyDown(e, {
147
133
  navigatable: t.gridProps.navigatable || !1,
148
- contextStateRef: y,
149
- navigationStateRef: D,
150
- onNavigationAction: Ye,
151
- columns: z()
152
- }), T.onGetSnapshotBeforeUpdate({
153
- document: E(),
154
- contextStateRef: y,
155
- navigationStateRef: D
134
+ contextStateRef: w,
135
+ navigationStateRef: k,
136
+ onNavigationAction: We,
137
+ columns: G()
138
+ }), M.onGetSnapshotBeforeUpdate({
139
+ document: C(),
140
+ contextStateRef: w,
141
+ navigationStateRef: k
156
142
  });
157
143
  const r = {
158
- dataItems: U(),
159
- mode: I.mode,
160
- cell: I.cell,
144
+ dataItems: O(),
145
+ mode: b.mode,
146
+ cell: b.cell,
161
147
  componentId: t.id,
162
148
  selectedField: t.gridProps.selectedField,
163
- ...h(e)
149
+ ...P(e)
164
150
  };
165
- if (t.gridProps.onKeyDown && v && u(t.gridProps.onKeyDown, r), !t.gridProps.selectedField && I.enabled && t.gridProps.dataItemKey) {
166
- const a = _t({
151
+ if (t.gridProps.onKeyDown && E && s(t.gridProps.onKeyDown, r), !t.gridProps.selectedField && b.enabled && t.gridProps.dataItemKey) {
152
+ const l = Tt({
167
153
  event: r,
168
154
  selectedState: (n = t.gridProps.select) != null ? n : {},
169
155
  dataItemKey: t.gridProps.dataItemKey
170
156
  });
171
- if (a === t.gridProps.select)
157
+ if (l === t.gridProps.select)
172
158
  return;
173
- const d = e.target, l = Ge(d, "TD"), f = Ge(d, "TR"), m = jt(l), s = qt(f);
174
- if (m !== void 0 && s !== void 0) {
175
- const C = (o = cr(t.gridProps.data)) == null ? void 0 : o[s];
176
- t.gridProps.onSelectionChange && u(t.gridProps.onSelectionChange, {
159
+ const f = e.target, I = Ke(f, "TD"), g = Ke(f, "TR"), y = At(I), F = Ht(g);
160
+ if (y !== void 0 && F !== void 0) {
161
+ const ge = Array.isArray(t.gridProps.data) ? (o = t.gridProps.data) == null ? void 0 : o[F] : (c = (a = t.gridProps.data) == null ? void 0 : a.data) == null ? void 0 : c[F];
162
+ t.gridProps.onSelectionChange && s(t.gridProps.onSelectionChange, {
177
163
  ...r,
178
- select: a,
179
- dataItem: C,
180
- startRowIndex: s,
181
- startColIndex: m,
182
- startDataItem: C,
183
- endDataItem: C,
184
- endRowIndex: s,
185
- endColIndex: m,
164
+ select: l,
165
+ dataItem: ge,
166
+ startRowIndex: F,
167
+ startColIndex: y,
168
+ startDataItem: ge,
169
+ endDataItem: ge,
170
+ endRowIndex: F,
171
+ endColIndex: y,
186
172
  ctrlKey: e.ctrlKey,
187
173
  altKey: e.altKey,
188
174
  metaKey: e.metaKey,
@@ -191,83 +177,83 @@ const fr = i.createContext(void 0), Sr = (t) => {
191
177
  });
192
178
  }
193
179
  }
194
- }, Je = (e) => {
195
- T.onFocus(e, {
180
+ }, Ve = (e) => {
181
+ M.onFocus(e, {
196
182
  navigatable: !!t.gridProps.navigatable,
197
- contextStateRef: y
183
+ contextStateRef: w
198
184
  });
199
- }, Ye = (e) => {
200
- if (e.action === "moveToNextPage" && st(e.event), e.action === "moveToPrevPage" && ut(e.event), e.focusElement && e.action === "reorderToRight") {
185
+ }, We = (e) => {
186
+ if (e.action === "moveToNextPage" && nt(e.event), e.action === "moveToPrevPage" && ot(e.event), e.focusElement && e.action === "reorderToRight") {
201
187
  const r = parseInt(e.focusElement.ariaColIndex, 10) - 1;
202
- r < g.current.length - 1 && Z(r, r + 1, e.event);
188
+ r < u.current.length - 1 && Y(r, r + 1, e.event);
203
189
  }
204
190
  if (e.focusElement && e.action === "reorderToLeft") {
205
191
  const r = parseInt(e.focusElement.ariaColIndex, 10) - 1;
206
- r > 0 && Z(r, r - 1, e.event);
192
+ r > 0 && Y(r, r - 1, e.event);
207
193
  }
208
- if (t.gridProps.onNavigationAction && v) {
194
+ if (t.gridProps.onNavigationAction && E) {
209
195
  const r = {
210
196
  focusElement: e.focusElement,
211
- ...h(e.event)
197
+ ...P(e.event)
212
198
  };
213
- u(t.gridProps.onNavigationAction, r);
199
+ s(t.gridProps.onNavigationAction, r);
214
200
  }
215
- }, Qe = (e, r) => {
216
- t.gridProps.onRowClick && e.target.nodeName === "TD" && u(t.gridProps.onRowClick, {
201
+ }, _e = (e, r) => {
202
+ t.gridProps.onRowClick && e.target.nodeName === "TD" && s(t.gridProps.onRowClick, {
217
203
  dataItem: r,
218
- ...h(e)
204
+ ...P(e)
219
205
  });
220
- }, Ze = (e, r) => {
221
- t.gridProps.onRowDoubleClick && e.target.nodeName === "TD" && u(t.gridProps.onRowDoubleClick, {
206
+ }, je = (e, r) => {
207
+ t.gridProps.onRowDoubleClick && e.target.nodeName === "TD" && s(t.gridProps.onRowDoubleClick, {
222
208
  dataItem: r,
223
- ...h(e)
209
+ ...P(e)
224
210
  });
225
- }, pe = (e, r, n) => {
226
- if (Se.enabled && Se.mode === "incell" && t.gridProps.dataItemKey) {
227
- const o = Xt(t.gridProps.edit, {
228
- type: $t.ENTER_FIELD_EDIT,
211
+ }, qe = (e, r, n) => {
212
+ if (we.enabled && we.mode === "incell" && t.gridProps.dataItemKey) {
213
+ const o = Ft(t.gridProps.edit, {
214
+ type: Gt.ENTER_FIELD_EDIT,
229
215
  payload: { id: r[t.gridProps.dataItemKey], field: n }
230
216
  });
231
- t.gridProps.onEditChange && u(t.gridProps.onEditChange, {
217
+ t.gridProps.onEditChange && s(t.gridProps.onEditChange, {
232
218
  edit: o,
233
- ...h(e)
219
+ ...P(e)
234
220
  });
235
221
  }
236
- }, et = (e, r) => {
222
+ }, Xe = (e, r) => {
237
223
  var o;
238
- if (Jt(t.detailExpandable).enabled) {
239
- const a = ze((o = t.gridProps.detailExpand) != null ? o : {}, e);
240
- t.gridProps.onDetailExpandChange && u(t.gridProps.onDetailExpandChange, {
241
- ...h(r),
224
+ if (zt(t.detailExpandable).enabled) {
225
+ const a = Me((o = t.gridProps.detailExpand) != null ? o : {}, e);
226
+ t.gridProps.onDetailExpandChange && s(t.gridProps.onDetailExpandChange, {
227
+ ...P(r),
242
228
  detailExpand: a
243
229
  });
244
230
  }
245
- }, tt = (e, r) => {
231
+ }, $e = (e, r) => {
246
232
  var o;
247
- const n = Yt(
233
+ const n = Lt(
248
234
  typeof t.gridProps.groupable == "object" ? t.gridProps.groupable.expandable !== !1 : t.gridProps.groupable
249
235
  );
250
236
  if (n.enabled) {
251
- const a = Qt((o = t.gridProps.groupExpand) != null ? o : [], e, n);
252
- t.gridProps.onGroupExpandChange && u(t.gridProps.onGroupExpandChange, {
253
- ...h(r),
237
+ const a = Nt((o = t.gridProps.groupExpand) != null ? o : [], e, n);
238
+ t.gridProps.onGroupExpandChange && s(t.gridProps.onGroupExpandChange, {
239
+ ...P(r),
254
240
  groupExpand: a
255
241
  });
256
242
  }
257
- }, Re = (e, r, n) => {
258
- const { allowUnsort: o, mode: a } = ur(t.gridProps.sortable || !1, r.sortable || !1), d = (t.gridProps.sort || []).filter((m) => m.field === r.field)[0], l = n || gr[o][d && d.dir || ""], f = a === "single" ? [] : (t.gridProps.sort || []).filter((m) => m.field !== r.field);
259
- l !== "" && r.field && f.push({ field: r.field, dir: l }), Ce(f, e);
260
- }, rt = (e) => {
243
+ }, be = (e, r, n) => {
244
+ const { allowUnsort: o, mode: a } = Yt(t.gridProps.sortable || !1, r.sortable || !1), c = (t.gridProps.sort || []).filter((I) => I.field === r.field)[0], l = n || Qt[o][c && c.dir || ""], f = a === "single" ? [] : (t.gridProps.sort || []).filter((I) => I.field !== r.field);
245
+ l !== "" && r.field && f.push({ field: r.field, dir: l }), Ie(f, e);
246
+ }, Je = (e) => {
261
247
  var r;
262
248
  if (e.field === t.gridProps.expandField || e._expand || t.gridProps.group && e.field === void 0) {
263
249
  if (t.gridProps.onExpandChange) {
264
- const n = t.gridProps.dataItemKey ? ze((r = t.gridProps.detailExpand) != null ? r : {}, {
265
- type: Zt.SET,
250
+ const n = t.gridProps.dataItemKey ? Me((r = t.gridProps.detailExpand) != null ? r : {}, {
251
+ type: Ot.SET,
266
252
  id: e.dataItem[t.gridProps.dataItemKey],
267
253
  payload: e.value
268
254
  }) : t.gridProps.detailExpand;
269
- u(t.gridProps.onExpandChange, {
270
- ...h(e.syntheticEvent),
255
+ s(t.gridProps.onExpandChange, {
256
+ ...P(e.syntheticEvent),
271
257
  expand: n,
272
258
  dataItem: e.dataItem,
273
259
  dataIndex: e.dataIndex,
@@ -276,49 +262,49 @@ const fr = i.createContext(void 0), Sr = (t) => {
276
262
  }
277
263
  return;
278
264
  }
279
- t.gridProps.onItemChange && u(t.gridProps.onItemChange, {
280
- ...h(e.syntheticEvent),
265
+ t.gridProps.onItemChange && s(t.gridProps.onItemChange, {
266
+ ...P(e.syntheticEvent),
281
267
  dataItem: e.dataItem,
282
268
  dataIndex: e.dataIndex,
283
269
  field: e.field,
284
270
  value: e.value
285
271
  });
286
- }, nt = (e) => {
272
+ }, Ye = (e) => {
287
273
  var r;
288
- if (t.gridProps.onSelectionChange && I.enabled) {
289
- const { event: n, dataItem: o, dataIndex: a, columnIndex: d } = e, l = {
290
- ...h(n.syntheticEvent),
274
+ if (t.gridProps.onSelectionChange && b.enabled) {
275
+ const { event: n, dataItem: o, dataIndex: a, columnIndex: c } = e, l = {
276
+ ...P(n.syntheticEvent),
291
277
  dataItem: o,
292
- startColIndex: d,
293
- endColIndex: d,
278
+ startColIndex: c,
279
+ endColIndex: c,
294
280
  startRowIndex: a,
295
281
  endRowIndex: a,
296
- dataItems: U(),
282
+ dataItems: O(),
297
283
  altKey: !1,
298
284
  ctrlKey: !1,
299
285
  shiftKey: !1,
300
286
  metaKey: !1,
301
- mode: I.mode,
302
- cell: I.cell,
287
+ mode: b.mode,
288
+ cell: b.cell,
303
289
  isDrag: !1,
304
290
  componentId: t.id,
305
291
  selectedField: t.gridProps.selectedField || ""
306
292
  };
307
- u(t.gridProps.onSelectionChange, {
293
+ s(t.gridProps.onSelectionChange, {
308
294
  ...l,
309
- select: t.gridProps.dataItemKey ? Ne({
295
+ select: t.gridProps.dataItemKey ? Te({
310
296
  event: l,
311
297
  selectedState: (r = t.gridProps.select) != null ? r : {},
312
298
  dataItemKey: t.gridProps.dataItemKey
313
299
  }) : {}
314
300
  });
315
301
  }
316
- }, ot = (e) => {
302
+ }, Qe = (e) => {
317
303
  var r;
318
- if (t.gridProps.onHeaderSelectionChange && I.enabled) {
319
- const n = U();
320
- u(t.gridProps.onHeaderSelectionChange, {
321
- select: e.syntheticEvent.target.checked ? n.reduce((o, a) => (t.gridProps.dataItemKey && J(t.gridProps.dataItemKey)(a) !== void 0 && (o[J(t.gridProps.dataItemKey)(a)] = !0), o), {}) : {},
304
+ if (t.gridProps.onHeaderSelectionChange && b.enabled) {
305
+ const n = O();
306
+ s(t.gridProps.onHeaderSelectionChange, {
307
+ select: e.syntheticEvent.target.checked ? n.reduce((o, a) => (t.gridProps.dataItemKey && X(t.gridProps.dataItemKey)(a) !== void 0 && (o[X(t.gridProps.dataItemKey)(a)] = !0), o), {}) : {},
322
308
  field: e.field,
323
309
  nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
324
310
  syntheticEvent: e.syntheticEvent,
@@ -327,35 +313,35 @@ const fr = i.createContext(void 0), Sr = (t) => {
327
313
  selectedField: (r = t.gridProps.selectedField) != null ? r : ""
328
314
  });
329
315
  }
330
- }, N = (e, r) => {
331
- t.gridProps.onSelectionChange && v && I.enabled && u(t.gridProps.onSelectionChange, {
316
+ }, z = (e, r) => {
317
+ t.gridProps.onSelectionChange && E && b.enabled && s(t.gridProps.onSelectionChange, {
332
318
  ...e,
333
319
  select: r
334
320
  });
335
- }, at = (e) => {
321
+ }, Ze = (e) => {
336
322
  var r;
337
- if (t.gridProps.onSelectionChange && I.enabled) {
338
- const n = V()[e.startRowIndex], o = V()[e.endRowIndex], a = {
323
+ if (t.gridProps.onSelectionChange && b.enabled) {
324
+ const n = Z()[e.startRowIndex], o = Z()[e.endRowIndex], a = {
339
325
  syntheticEvent: void 0,
340
326
  target: R.current,
341
327
  selectedField: t.gridProps.selectedField || "",
342
328
  componentId: t.id,
343
- dataItems: U(),
329
+ dataItems: O(),
344
330
  dataItem: null,
345
331
  startDataItem: n,
346
332
  endDataItem: o,
347
333
  ...e
348
- }, d = Ne({
334
+ }, c = Te({
349
335
  event: a,
350
336
  selectedState: (r = t.gridProps.select) != null ? r : {},
351
337
  // Thats kinda strange, even through the `dataItemKey` is required by the `getSelectedState`
352
338
  // it does work correctly even without it
353
339
  dataItemKey: t.gridProps.dataItemKey
354
340
  });
355
- N(a, d);
341
+ z(a, c);
356
342
  }
357
- }, it = (e) => {
358
- if (t.gridProps.onSelectionChange && I.enabled) {
343
+ }, pe = (e) => {
344
+ if (t.gridProps.onSelectionChange && b.enabled) {
359
345
  const r = e.dataItems[0], n = e.dataItems[e.dataItems.length - 1], o = {}, a = {
360
346
  ...e,
361
347
  startDataItem: r,
@@ -363,223 +349,176 @@ const fr = i.createContext(void 0), Sr = (t) => {
363
349
  startRowIndex: 0,
364
350
  endRowIndex: e.dataItems.length - 1,
365
351
  startColIndex: 0,
366
- endColIndex: g.current.length - 1
352
+ endColIndex: u.current.length - 1
367
353
  };
368
- e.dataItems.forEach((d) => {
369
- const f = J(t.gridProps.dataItemKey)(d);
370
- o[f] = e.cell ? [...Array(g.current.length).keys()] : !0;
371
- }), N(a, o);
354
+ e.dataItems.forEach((c) => {
355
+ const f = X(t.gridProps.dataItemKey)(c);
356
+ o[f] = e.cell ? [...Array(u.current.length).keys()] : !0;
357
+ }), z(a, o);
372
358
  }
373
- }, dt = (e) => {
374
- if (t.gridProps.onSelectionChange && I.enabled) {
375
- const n = J(t.gridProps.dataItemKey)(e.dataItem), o = 0, a = g.current.length - 1, d = e.dataItems.findIndex(
376
- (C) => C[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
377
- ), m = {
359
+ }, et = (e) => {
360
+ if (t.gridProps.onSelectionChange && b.enabled) {
361
+ const n = X(t.gridProps.dataItemKey)(e.dataItem), o = 0, a = u.current.length - 1, c = e.dataItems.findIndex(
362
+ (y) => y[t.gridProps.dataItemKey] === e.dataItem[t.gridProps.dataItemKey]
363
+ ), I = {
378
364
  ...e,
379
- startDataItem: d,
380
- endDataItem: d,
381
- startRowIndex: d,
382
- endRowIndex: d,
365
+ startDataItem: c,
366
+ endDataItem: c,
367
+ startRowIndex: c,
368
+ endRowIndex: c,
383
369
  startColIndex: o,
384
370
  endColIndex: a
385
- }, s = e.mode === "multiple" ? t.gridProps.select || {} : {};
386
- s[n] === !0 || Array.isArray(s[n]) && s[n].length === g.current.length ? delete s[n] : s[n] = e.cell ? [...Array(g.current.length).keys()] : !0, N(m, s);
371
+ }, g = e.mode === "multiple" ? t.gridProps.select || {} : {};
372
+ g[n] === !0 || Array.isArray(g[n]) && g[n].length === u.current.length ? delete g[n] : g[n] = e.cell ? [...Array(u.current.length).keys()] : !0, z(I, g);
387
373
  }
388
- }, ct = (e) => {
389
- t.gridProps.onSelectionChange && I.enabled && N(e, {});
390
- }, M = (e, r, n, o, a) => {
391
- const d = t.gridProps.onDataStateChange;
374
+ }, tt = (e) => {
375
+ t.gridProps.onSelectionChange && b.enabled && z(e, {});
376
+ }, L = (e, r, n, o, a) => {
377
+ const c = t.gridProps.onDataStateChange;
392
378
  if (e) {
393
- const l = { ...h(o), ...r, targetEvent: a };
394
- u(e, l);
379
+ const l = { ...P(o), ...r, targetEvent: a };
380
+ s(e, l);
395
381
  } else
396
- d && u(d, {
397
- ...h(o),
382
+ c && s(c, {
383
+ ...P(o),
398
384
  targetEvent: a || {},
399
385
  dataState: {
400
- ...Ct(),
386
+ ...ft(),
401
387
  ...n
402
388
  }
403
389
  });
404
- }, O = (e, r, n) => {
405
- M(
390
+ }, N = (e, r, n) => {
391
+ L(
406
392
  t.gridProps.onPageChange,
407
393
  { page: e },
408
394
  { skip: e.skip, take: e.take },
409
395
  r,
410
396
  n
411
397
  );
412
- }, lt = () => {
398
+ }, rt = () => {
413
399
  let e = t.gridProps.total || 0;
414
400
  return Array.isArray(t.gridProps.data) ? e = e || t.gridProps.data.length : t.gridProps.data && (e = e || t.gridProps.data.total), e;
415
- }, st = (e) => {
416
- var a, d;
417
- const r = (d = (a = t.gridProps.take) != null ? a : t.gridProps.pageSize) != null ? d : 0, n = (t.gridProps.skip || 0) + r, o = lt();
418
- n < o && O({ skip: n, take: r }, e);
419
- }, ut = (e) => {
401
+ }, nt = (e) => {
402
+ var a, c;
403
+ const r = (c = (a = t.gridProps.take) != null ? a : t.gridProps.pageSize) != null ? c : 0, n = (t.gridProps.skip || 0) + r, o = rt();
404
+ n < o && N({ skip: n, take: r }, e);
405
+ }, ot = (e) => {
420
406
  var o, a;
421
407
  const r = (a = (o = t.gridProps.take) != null ? o : t.gridProps.pageSize) != null ? a : 0, n = (t.gridProps.skip || 0) - r;
422
- n >= 0 && O({ skip: n, take: r }, e);
423
- }, gt = (e) => {
424
- O({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
425
- }, Ce = (e, r) => {
426
- M(
408
+ n >= 0 && N({ skip: n, take: r }, e);
409
+ }, at = (e) => {
410
+ N({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
411
+ }, Ie = (e, r) => {
412
+ L(
427
413
  t.gridProps.onSortChange,
428
414
  { sort: e },
429
415
  { sort: e, ...t.gridProps.scrollable === "virtual" ? { skip: 0 } : {} },
430
416
  r
431
417
  );
432
- }, ft = (e, r) => {
433
- M(
418
+ }, it = (e, r) => {
419
+ L(
434
420
  t.gridProps.onFilterChange,
435
421
  { filter: e },
436
422
  { filter: e || void 0, skip: 0 },
437
423
  r
438
424
  );
439
- }, mt = (e) => {
440
- const r = t.gridProps.searchFields || g.current.map((a) => a.field) || [], n = e.nativeEvent.target.value, o = {
441
- logic: "or",
442
- filters: r.filter((a) => a !== void 0).map((a) => {
443
- var d;
444
- return typeof a == "string" ? { field: a, value: n, operator: "contains" } : {
445
- value: n,
446
- operator: (d = a.operator) != null ? d : "contains",
447
- field: a.field,
448
- ignoreCase: a.ignoreCase
449
- };
450
- })
451
- };
452
- M(
453
- t.gridProps.onSearchChange,
454
- {
455
- search: o
456
- },
457
- {},
458
- e.syntheticEvent
459
- );
460
- }, Q = (e, r) => {
425
+ }, J = (e, r) => {
461
426
  const n = r.nativeEvent ? r : { nativeEvent: r.nativeEvent || r.originalEvent };
462
- e.length === 0 && t.gridProps.navigatable && (ie.current = !0), M(
427
+ e.length === 0 && t.gridProps.navigatable && (ae.current = !0), L(
463
428
  t.gridProps.onGroupChange,
464
429
  { group: e },
465
430
  { group: e, skip: 0 },
466
431
  n
467
432
  );
468
- }, Pt = (e) => {
469
- if (t.gridProps.onColumnsStateChange) {
470
- const r = {
471
- target: R.current,
472
- columnsState: e
473
- };
474
- u(t.gridProps.onColumnsStateChange, r);
475
- }
476
- }, Z = (e, r, n) => {
477
- const o = g.current[e], a = o.depth, d = (s) => {
433
+ }, Y = (e, r, n) => {
434
+ const o = u.current[e], a = o.depth, c = (g) => {
478
435
  do
479
- s++;
480
- while (s < g.current.length && g.current[s].depth > a);
481
- return s;
482
- }, l = g.current.splice(e, d(e) - e);
483
- g.current.splice(e < r ? d(r - l.length) : r, 0, ...l), g.current.filter((s) => s.declarationIndex >= 0).forEach((s, C) => s.orderIndex = C);
484
- const f = g.current[e].locked && g.current[r].locked;
485
- pt(t.columnsMapRef, g.current, f || X.current), er(t.columnsMapRef, g.current, f || X.current), ae.current && (X.current = !1, ae.current = !1);
486
- const m = z();
487
- if (re(), t.gridProps.onColumnReorder) {
488
- const s = {
436
+ g++;
437
+ while (g < u.current.length && u.current[g].depth > a);
438
+ return g;
439
+ }, l = u.current.splice(e, c(e) - e);
440
+ u.current.splice(e < r ? c(r - l.length) : r, 0, ...l), u.current.filter((g) => g.declarationIndex >= 0).forEach((g, y) => g.orderIndex = y);
441
+ const f = u.current[e].locked && u.current[r].locked;
442
+ Bt(t.columnsMapRef, u.current, f || _.current), Ut(t.columnsMapRef, u.current, f || _.current), oe.current && (_.current = !1, oe.current = !1);
443
+ const I = G();
444
+ if (te(), t.gridProps.onColumnReorder) {
445
+ const g = {
489
446
  target: R.current,
490
- columns: m,
447
+ columns: I,
491
448
  columnId: o.id,
492
449
  nativeEvent: n
493
450
  };
494
- u(t.gridProps.onColumnReorder, s);
451
+ s(t.gridProps.onColumnReorder, g);
495
452
  }
496
- }, A = (e, r, n) => {
453
+ }, dt = (e, r, n) => {
497
454
  const o = typeof t.gridProps.rowReorderable == "object" ? t.gridProps.rowReorderable.enabled : t.gridProps.rowReorderable;
498
- if (n === "forbidden" || !o || !G.current)
455
+ if (n === "forbidden" || !o || !j.current)
499
456
  return;
500
- const { slicedData: a, dataRef: d } = t, l = (a || d)[r];
501
- t.gridProps.onRowReorder && u(t.gridProps.onRowReorder, {
502
- draggedDataItems: [G.current],
457
+ const { slicedData: a, dataRef: c } = t, l = (a || c)[r];
458
+ t.gridProps.onRowReorder && s(t.gridProps.onRowReorder, {
459
+ draggedDataItems: [j.current],
503
460
  droppedDataItem: l == null ? void 0 : l.dataItem,
504
461
  dropPosition: n,
505
462
  nativeEvent: e.originalEvent,
506
463
  dragEvent: e,
507
464
  target: R.current
508
- }), G.current = null;
509
- }, ht = (e, r, n) => {
465
+ }), j.current = null;
466
+ }, ct = (e, r, n) => {
510
467
  if (t.gridProps.group === void 0)
511
468
  return;
512
469
  const o = t.gridProps.group.slice();
513
- o.splice(r, 0, ...o.splice(e, 1)), Q(o, n);
514
- }, ve = (e, r, n) => {
515
- const o = g.current[e].field;
470
+ o.splice(r, 0, ...o.splice(e, 1)), J(o, n);
471
+ }, Re = (e, r, n) => {
472
+ const o = u.current[e].field;
516
473
  if (!o)
517
474
  return;
518
475
  const a = (t.gridProps.group || []).slice();
519
- a.splice(r, 0, { field: o }), Q(a, n);
520
- }, bt = (e, r) => {
476
+ a.splice(r, 0, { field: o }), J(a, n);
477
+ }, lt = (e, r) => {
521
478
  const n = S.current.getCurrentGroupsLength;
522
- ve(e, n, r);
523
- }, p = () => {
479
+ Re(e, n, r);
480
+ }, Q = () => {
524
481
  let e = 0;
525
- if (!w.current.colGroupMain)
482
+ if (!v.current.colGroupMain)
526
483
  return;
527
- const r = w.current.colGroupMain.children;
484
+ const r = v.current.colGroupMain.children;
528
485
  for (let n = 0; n < r.length; n++) {
529
486
  const o = r[n].width;
530
487
  if (!o)
531
488
  return;
532
489
  e += parseFloat(o.toString());
533
490
  }
534
- e = Math.round(e), L.current && L.current.setWidth(e), F.current && F.current.setWidth(e), x.current && (x.current.style.width = e + "px");
535
- }, B = i.useCallback(
536
- (e, r, n) => {
537
- var l;
538
- if (!It() && !n || !e)
491
+ e = Math.round(e), H.current && H.current.setWidth(e), A.current && A.current.setWidth(e), x.current && (x.current.style.width = e + "px");
492
+ }, st = (e, r) => {
493
+ if (t.gridProps.onClipboard && E) {
494
+ if (!ut() || !e)
539
495
  return;
540
- const o = {
496
+ s(t.gridProps.onClipboard, {
541
497
  type: e,
542
498
  nativeEvent: r,
543
- columns: g.current,
499
+ columns: u.current,
544
500
  dataItemKey: t.gridProps.dataItemKey || "",
545
- ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {},
546
- ...n
547
- }, a = V(), d = Bt({
548
- event: o,
549
- data: a,
550
- selectedState: (l = t.gridProps.select) != null ? l : {},
551
- previousCopiedItems: ye.current
552
- });
553
- e !== me.paste && (ye.current = d.copiedItems), t.gridProps.onClipboard && v && u(t.gridProps.onClipboard, {
554
- ...o,
555
- ...d
501
+ ...typeof t.gridProps.clipboard != "boolean" ? t.gridProps.clipboard : {}
556
502
  });
557
- },
558
- [
559
- t.gridProps.select,
560
- t.gridProps.dataItemKey,
561
- t.gridProps.data,
562
- t.gridProps.clipboard,
563
- t.gridProps.onClipboard
564
- ]
565
- ), It = () => {
566
- var a, d, l;
567
- if (!$)
503
+ }
504
+ }, ut = () => {
505
+ var a, c, l;
506
+ if (!q)
568
507
  return !1;
569
- const e = zt(E()), r = e ? e.matches(".k-table-td") ? e : (a = E()) == null ? void 0 : a.body : (d = E()) == null ? void 0 : d.body, n = r.closest(".k-grid-container"), o = r && ((l = K.current) == null ? void 0 : l.contains(r));
508
+ const e = St(C()), r = e ? e.matches(".k-table-td") ? e : (a = C()) == null ? void 0 : a.body : (c = C()) == null ? void 0 : c.body, n = r.closest(".k-grid-container"), o = r && ((l = K.current) == null ? void 0 : l.contains(r));
570
509
  return !!(r && o && n);
571
- }, Rt = (e, r, n, o, a, d) => {
572
- p(), X.current = !0, ae.current = !0, t.gridProps.onColumnResize && v && u(t.gridProps.onColumnResize, {
573
- columns: z(),
510
+ }, gt = (e, r, n, o, a, c) => {
511
+ Q(), _.current = !0, oe.current = !0, t.gridProps.onColumnResize && E && s(t.gridProps.onColumnResize, {
512
+ columns: G(),
574
513
  nativeEvent: o,
575
- targetColumnId: d,
514
+ targetColumnId: c,
576
515
  index: e,
577
516
  newWidth: r,
578
517
  oldWidth: n,
579
518
  end: a,
580
519
  target: R.current
581
520
  });
582
- }, Ct = () => {
521
+ }, ft = () => {
583
522
  var e;
584
523
  return {
585
524
  filter: t.gridProps.filter,
@@ -588,112 +527,103 @@ const fr = i.createContext(void 0), Sr = (t) => {
588
527
  take: (e = t.gridProps.take) != null ? e : t.gridProps.pageSize,
589
528
  group: t.gridProps.group
590
529
  };
591
- }, h = (e) => ({
530
+ }, P = (e) => ({
592
531
  nativeEvent: e && e.nativeEvent,
593
532
  syntheticEvent: e,
594
533
  target: R.current
595
- }), vt = (e) => ({
534
+ }), mt = (e) => ({
596
535
  ...e,
597
536
  nativeEvent: void 0,
598
537
  syntheticEvent: void 0,
599
538
  target: void 0,
600
539
  targetEvent: void 0,
601
540
  focusElement: void 0
602
- }), u = (e, r) => {
541
+ }), s = (e, r) => {
603
542
  if (e.name === "proxy") {
604
- e.call(void 0, vt(r));
543
+ e.call(void 0, mt(r));
605
544
  return;
606
545
  }
607
546
  e.call(void 0, r);
608
- }, Et = () => {
547
+ }, Pt = () => {
609
548
  var e, r, n;
610
- if (H.current && ((e = H.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
611
- ce.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? de.current = document.activeElement : de.current = void 0;
612
- const o = Array.from((n = H.current) == null ? void 0 : n.getElementsByClassName("k-grid-edit-row"));
613
- o.length > ge.current.length ? q.current = o.filter(
614
- (a) => !ge.current.includes(a)
615
- )[0] : o.length === 1 && (q.current = o[0], ce.current = !0), ge.current = o;
549
+ if (T.current && ((e = T.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
550
+ de.current = !1, (r = document.activeElement) != null && r.closest(".k-grid-edit-row") ? ie.current = document.activeElement : ie.current = void 0;
551
+ const o = Array.from((n = T.current) == null ? void 0 : n.getElementsByClassName("k-grid-edit-row"));
552
+ o.length > ue.current.length ? W.current = o.filter(
553
+ (a) => !ue.current.includes(a)
554
+ )[0] : o.length === 1 && (W.current = o[0], de.current = !0), ue.current = o;
616
555
  }
617
- }, U = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), V = () => (t.slicedData || t.dataRef).filter((e) => e.rowType === "data").map((e) => e.dataItem), ee = () => (oe.current || (oe.current = Ot() || void 0), oe.current), E = () => {
556
+ }, O = () => t.dataRef.filter((e) => e.rowType === "data").map((e) => e.dataItem), Z = () => (t.slicedData || t.dataRef).filter((e) => e.rowType === "data").map((e) => e.dataItem), p = () => (ne.current || (ne.current = kt() || void 0), ne.current), C = () => {
618
557
  var e;
619
- if ($)
620
- return ((e = W()) == null ? void 0 : e.ownerDocument) || document;
621
- }, W = () => K.current, te = i.useCallback(
558
+ if (q)
559
+ return ((e = B()) == null ? void 0 : e.ownerDocument) || document;
560
+ }, B = () => K.current, ee = i.useCallback(
622
561
  (e) => {
623
562
  var o;
624
- if (!c.current || !((o = c.current) != null && o.container) || t.gridProps.scrollable === "none")
563
+ if (!d.current || !((o = d.current) != null && o.container) || t.gridProps.scrollable === "none")
625
564
  return;
626
- k.current && k.current.disconnect();
627
- const { rowIndex: r } = e, n = W();
565
+ D.current && D.current.disconnect();
566
+ const { rowIndex: r } = e, n = B();
628
567
  if (t.gridProps.scrollable === "virtual")
629
- c.current.askedSkip = r, c.current.container.scroll(
568
+ d.current.askedSkip = r, d.current.container.scroll(
630
569
  0,
631
- Math.round(c.current.askedSkip / c.current.total * c.current.container.scrollHeight)
570
+ Math.round(d.current.askedSkip / d.current.total * d.current.container.scrollHeight)
632
571
  );
633
572
  else if (n) {
634
573
  const a = r < 1 ? n.querySelector("tbody > tr:nth-child(1)") : n.querySelector(`tbody > tr:nth-child(${r + 1})`);
635
- a && j.current && (j.current.scrollTop = a.offsetTop);
574
+ a && V.current && (V.current.scrollTop = a.offsetTop);
636
575
  }
637
576
  },
638
577
  [t.gridProps.scrollable]
639
- ), Ee = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), wt = () => Ee(At) === Ee(g.current), yt = () => {
640
- wt() || re();
641
- }, xt = () => {
578
+ ), Ee = (e) => JSON.stringify(e.map((r) => ({ id: r.id, field: r.field, title: r.title, children: r.children }))), ht = () => Ee(xt) === Ee(u.current), bt = () => {
579
+ ht() || te();
580
+ }, It = () => {
642
581
  const { data: e, total: r } = t.gridProps;
643
582
  return Array.isArray(e) ? e.length === r : e ? r === e.total : !1;
644
- }, St = (e, r) => {
583
+ }, Rt = (e, r) => {
645
584
  var n, o;
646
- if (c.current) {
647
- if (c.current.fixedScroll = t.gridProps.fixedScroll || !1, c.current.PageChange = O, c.current.realSkip = t.gridProps.skip || 0, c.current.pageSize = (o = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? o : 0, c.current.scrollableVirtual = t.gridProps.scrollable === "virtual", c.current.total = e, c.current.propsSkip = (t.gridProps.skip || 0) + (t.gridProps.scrollable === "virtual" ? c.current.topCacheCount + (c.current.attendedSkip - (t.gridProps.skip || 0)) : 0), t.gridProps.rowHeight !== void 0 && t.gridProps.rowHeight > 0 && !r) {
585
+ if (d.current) {
586
+ if (d.current.fixedScroll = t.gridProps.fixedScroll || !1, d.current.PageChange = N, d.current.realSkip = t.gridProps.skip || 0, d.current.pageSize = (o = (n = t.gridProps.take) != null ? n : t.gridProps.pageSize) != null ? o : 0, d.current.scrollableVirtual = t.gridProps.scrollable === "virtual", d.current.total = e, d.current.propsSkip = (t.gridProps.skip || 0) + (t.gridProps.scrollable === "virtual" ? d.current.topCacheCount + (d.current.attendedSkip - (t.gridProps.skip || 0)) : 0), t.gridProps.rowHeight !== void 0 && t.gridProps.rowHeight > 0 && !r) {
648
587
  const a = t.gridProps.rowHeight * e;
649
- c.current.containerHeight = Oe ? Math.min(Be, a) : a;
588
+ d.current.containerHeight = Ae ? Math.min(He, a) : a;
650
589
  } else
651
- c.current.containerHeight = 1533915;
652
- if (c.current.containerRef = j, c.current.tableBodyRef = H, c.current.table = x.current, c.current instanceof Ue) {
653
- const { rowHeight: a = 0, detail: d, expandField: l } = t.gridProps;
590
+ d.current.containerHeight = 1533915;
591
+ if (d.current.containerRef = V, d.current.tableBodyRef = T, d.current.table = x.current, d.current instanceof Fe) {
592
+ const { rowHeight: a = 0, detail: c, expandField: l } = t.gridProps;
654
593
  let { detailRowHeight: f = 0 } = t.gridProps;
655
- f = d && l ? f : a, xt() ? (c.current.total = t.dataRef.length, c.current.rowHeightService = new Le(
594
+ f = c && l ? f : a, It() ? (d.current.total = t.dataRef.length, d.current.rowHeightService = new De(
656
595
  t.dataRef.length,
657
596
  a,
658
597
  f,
659
598
  t.dataRef
660
- )) : c.current.rowHeightService = new Le(e, a, f);
661
- const m = c.current.rowHeightService.totalHeight();
662
- c.current.containerHeight = Oe ? Math.min(Be, m) : m;
599
+ )) : d.current.rowHeightService = new De(e, a, f);
600
+ const I = d.current.rowHeightService.totalHeight();
601
+ d.current.containerHeight = Ae ? Math.min(He, I) : I;
663
602
  }
664
603
  }
665
- }, Dt = () => {
666
- const e = (n) => n.map((o) => ({
667
- id: o.id,
668
- field: o.field,
669
- title: o.title,
670
- hidden: !1,
671
- children: o.children ? e(o.children) : null
672
- })), r = t.columnsRef.current.filter((n) => n.depth === 0);
673
- return e(r);
674
- }, we = i.useCallback(
604
+ }, Ce = i.useCallback(
675
605
  (e) => {
676
- const r = { rowIndex: ue.current };
606
+ const r = { rowIndex: se.current };
677
607
  e.forEach((n) => {
678
- n.isIntersecting || te(r);
608
+ n.isIntersecting || ee(r);
679
609
  });
680
610
  },
681
- [te]
682
- ), re = () => {
611
+ [ee]
612
+ ), te = () => {
683
613
  t.gridProps.forceUpdate && t.gridProps.forceUpdate();
684
- }, kt = (e) => e.left !== void 0 ? xe !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, R = i.useRef(null), g = t.columnsRef, c = i.useRef(), w = i.useRef(), S = i.useRef(), y = i.useRef(), D = i.useRef(), _ = i.useRef(), k = i.useRef(null), H = i.useRef(null), Kt = i.useRef(null), j = i.useRef(null), x = i.useRef(null), ne = i.useRef(null), K = i.useRef(null), F = i.useRef(null), L = i.useRef(null), oe = i.useRef(), ae = i.useRef(!1), ie = i.useRef(!1), q = i.useRef(), de = i.useRef(), ce = i.useRef(!1), X = i.useRef(!0), le = i.useRef(0), se = i.useRef(), ue = i.useRef(), ge = i.useRef([]), ye = i.useRef([]), G = i.useRef(null), Tt = i.useRef(null), Mt = i.useRef(null), xe = Nt(K), At = i.useMemo(() => i.Children.toArray(t.gridProps.children), [t.gridProps.children]), I = Y((ke = t.gridProps.selectable) != null ? ke : !!t.gridProps.selectedField), Se = Ut((Ke = t.gridProps.editable) != null ? Ke : !!t.gridProps.editField);
614
+ }, Et = (e) => e.left !== void 0 ? ve !== "rtl" ? { left: e.left, right: e.right } : { left: e.right, right: e.left } : {}, R = i.useRef(null), u = t.columnsRef, d = i.useRef(), v = i.useRef(), S = i.useRef(), w = i.useRef(), k = i.useRef(), U = i.useRef(), D = i.useRef(null), T = i.useRef(null), Ct = i.useRef(null), V = i.useRef(null), x = i.useRef(null), re = i.useRef(null), K = i.useRef(null), A = i.useRef(null), H = i.useRef(null), ne = i.useRef(), oe = i.useRef(!1), ae = i.useRef(!1), W = i.useRef(), ie = i.useRef(), de = i.useRef(!1), _ = i.useRef(!0), ce = i.useRef(0), le = i.useRef(), se = i.useRef(), ue = i.useRef([]), j = i.useRef(null), vt = i.useRef(null), wt = i.useRef(null), ve = yt(K), xt = i.useMemo(() => i.Children.toArray(t.gridProps.children), [t.gridProps.children]), b = $((ye = t.gridProps.selectable) != null ? ye : !!t.gridProps.selectedField), we = Dt((Se = t.gridProps.editable) != null ? Se : !!t.gridProps.editField);
685
615
  i.useMemo(() => {
686
- T.onConstructor({
616
+ M.onConstructor({
687
617
  navigatable: !!t.gridProps.navigatable,
688
- contextStateRef: y,
689
- navigationStateRef: D,
618
+ contextStateRef: w,
619
+ navigationStateRef: k,
690
620
  idPrefix: t.id
691
621
  });
692
622
  }, []), i.useMemo(() => {
693
623
  var n;
694
- (n = c.current) == null || n.reset();
695
- const e = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, r = t.isFixedVirtualScroll ? Ue : lr;
696
- c.current = new r(e || t.gridProps.rowHeight === void 0 || t.gridProps.rowHeight === 0);
624
+ (n = d.current) == null || n.reset();
625
+ const e = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1, r = t.isFixedVirtualScroll ? Fe : $t;
626
+ d.current = new r(e || t.gridProps.rowHeight === void 0 || t.gridProps.rowHeight === 0);
697
627
  }, [
698
628
  t.gridProps.scrollable,
699
629
  t.gridProps.total,
@@ -702,145 +632,140 @@ const fr = i.createContext(void 0), Sr = (t) => {
702
632
  t.gridProps.groupable,
703
633
  t.gridProps.sort,
704
634
  t.gridProps.rowHeight
705
- ]), i.useEffect(() => (t.gridProps.clipboard && (_.current = new Vt(B), _.current.addEventListeners(E())), () => {
706
- _.current && _.current.removeEventListeners(E());
707
- }), [t.gridProps.onClipboard, t.gridProps.clipboard, B, E]), i.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(nr) && (ne.current && (ne.current.style.display = "block"), x.current && (x.current.style.display = "block")), p(), Fe(ee()), T.onComponentDidMount({
635
+ ]), i.useEffect(() => (t.gridProps.clipboard && (U.current = new Kt(st), U.current.addEventListeners(C())), () => {
636
+ U.current && U.current.removeEventListeners(C());
637
+ }), [t.gridProps.onClipboard, t.gridProps.clipboard]), i.useEffect(() => (t.gridProps.columnVirtualization && !window.navigator.userAgent.match(_t) && (re.current && (re.current.style.display = "block"), x.current && (x.current.style.display = "block")), Q(), ke(p()), M.onComponentDidMount({
708
638
  scope: K.current || void 0,
709
- contextStateRef: y,
710
- navigationStateRef: D
639
+ contextStateRef: w,
640
+ navigationStateRef: k
711
641
  }), () => {
712
- clearTimeout(se.current);
642
+ clearTimeout(le.current);
713
643
  }), []), i.useEffect(() => {
714
644
  var e;
715
- p(), Fe(ee()), (e = c.current) != null && e.tableTransform && c.current.table && (c.current.table.style.transform = c.current.tableTransform, c.current.tableTransform = ""), Et(), T.onComponentDidUpdate({
645
+ Q(), ke(p()), (e = d.current) != null && e.tableTransform && d.current.table && (d.current.table.style.transform = d.current.tableTransform, d.current.tableTransform = ""), Pt(), M.onComponentDidUpdate({
716
646
  scope: K.current || void 0,
717
- contextStateRef: y,
718
- navigationStateRef: D,
719
- focusFirst: ie.current,
720
- newEditableRow: q.current,
721
- singleEditRow: ce.current,
722
- lastActiveElement: de.current,
647
+ contextStateRef: w,
648
+ navigationStateRef: k,
649
+ focusFirst: ae.current,
650
+ newEditableRow: W.current,
651
+ singleEditRow: de.current,
652
+ lastActiveElement: ie.current,
723
653
  navigatable: t.gridProps.navigatable
724
- }), ie.current = !1, q.current = void 0;
654
+ }), ae.current = !1, W.current = void 0;
725
655
  }), i.useEffect(() => {
726
- if ($) {
656
+ if (q) {
727
657
  const e = {
728
658
  rootMargin: "0px",
729
659
  threshold: 0.9
730
660
  };
731
- k.current = window.IntersectionObserver && new window.IntersectionObserver(we, e) || null;
661
+ D.current = window.IntersectionObserver && new window.IntersectionObserver(Ce, e) || null;
732
662
  }
733
- }, [we]), i.useEffect(() => {
663
+ }, [Ce]), i.useEffect(() => {
734
664
  var r;
735
665
  let e;
736
- return $ && window.ResizeObserver && (e = new window.ResizeObserver(yt), e.observe((r = E()) == null ? void 0 : r.body)), () => {
666
+ return q && window.ResizeObserver && (e = new window.ResizeObserver(bt), e.observe((r = C()) == null ? void 0 : r.body)), () => {
737
667
  e == null || e.disconnect();
738
668
  };
739
669
  }, []), i.useImperativeHandle(
740
670
  R,
741
671
  () => ({
742
672
  get element() {
743
- return W();
673
+ return B();
744
674
  },
745
675
  props: t.gridProps,
746
676
  get columns() {
747
- return z();
677
+ return G();
748
678
  },
749
679
  scrollIntoView: (e) => {
750
680
  var o;
751
- if (!((o = c.current) != null && o.container) || t.gridProps.scrollable === "none")
681
+ if (!((o = d.current) != null && o.container) || t.gridProps.scrollable === "none")
752
682
  return;
753
683
  const { rowIndex: r } = e;
754
- ue.current = r;
755
- const n = W();
756
- if (k.current && n) {
757
- k.current.disconnect();
758
- const a = n.querySelector(`[absolute-row-index="${ue.current}"]`);
759
- a ? k.current.observe(a) : te(e);
684
+ se.current = r;
685
+ const n = B();
686
+ if (D.current && n) {
687
+ D.current.disconnect();
688
+ const a = n.querySelector(`[absolute-row-index="${se.current}"]`);
689
+ a ? D.current.observe(a) : ee(e);
760
690
  }
761
691
  },
762
692
  fitColumns: (e) => {
763
- w.current.dblClickHandler(null, e);
693
+ v.current.dblClickHandler(null, e);
764
694
  }
765
695
  })
766
696
  ), i.useImperativeHandle(t.gridRef, () => R.current), i.useMemo(() => {
767
- w.current = new tr(Rt);
697
+ v.current = new Vt(gt);
768
698
  }, [t.gridProps.onColumnResize]), i.useMemo(() => {
769
- S.current = new rr(Z, ht, ve);
699
+ S.current = new Wt(Y, ct, Re);
770
700
  }, [
771
701
  t.gridProps.onColumnReorder,
772
702
  t.gridProps.onGroupChange,
773
703
  t.gridProps.group,
774
704
  t.gridProps.groupable
775
- ]), w.current.resizable = t.gridProps.resizable || !1, w.current.columns = g.current;
776
- const De = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1;
777
- S.current.reorderable = t.gridProps.reorderable || !1, S.current.groupable = De, S.current.columns = g.current, St(t.total, De);
778
- const Ht = t.gridProps.columnsState || Dt();
779
- return /* @__PURE__ */ i.createElement(
780
- fr.Provider,
705
+ ]), v.current.resizable = t.gridProps.resizable || !1, v.current.columns = u.current;
706
+ const xe = t.gridProps.groupable === !0 || typeof t.gridProps.groupable == "object" && t.gridProps.groupable.enabled !== !1;
707
+ return S.current.reorderable = t.gridProps.reorderable || !1, S.current.groupable = xe, S.current.columns = u.current, Rt(t.total, xe), /* @__PURE__ */ i.createElement(
708
+ Zt.Provider,
781
709
  {
782
710
  value: {
783
- isClient: v,
784
- rowReorder: A,
785
- activeDragRowDataItemRef: G,
786
- reorderRowDragTargetRef: Tt,
787
- reorderRowDropTargetRef: Mt,
788
- dir: xe,
789
- getCellPositionStyle: kt,
711
+ isClient: E,
712
+ rowReorder: dt,
713
+ activeDragRowDataItemRef: j,
714
+ reorderRowDragTargetRef: vt,
715
+ reorderRowDropTargetRef: wt,
716
+ dir: ve,
717
+ getCellPositionStyle: Et,
790
718
  dataItemKey: t.gridProps.dataItemKey,
791
- columnsState: Ht,
792
- onColumnsStateChange: Pt,
793
- groupChange: Q,
794
- selectionRelease: at,
795
- pagerPageChange: gt,
796
- onContextMenu: qe,
797
- rowClick: Qe,
798
- rowDblClick: Ze,
799
- cellClick: pe,
800
- headerCellClick: Re,
801
- itemChange: rt,
802
- sortChange: Ce,
803
- filterChange: ft,
804
- searchChange: mt,
805
- onHeaderSelectionChange: ot,
806
- columnGroupChange: bt,
807
- onKeyDown: $e,
808
- onFocus: Je,
809
- scrollHandler: Xe,
810
- selectionChange: nt,
811
- dispatchDetailExpand: et,
812
- dispatchGroupExpand: tt,
813
- columnResizeRef: w,
719
+ groupChange: J,
720
+ selectionRelease: Ze,
721
+ pagerPageChange: at,
722
+ onContextMenu: Oe,
723
+ rowClick: _e,
724
+ rowDblClick: je,
725
+ cellClick: qe,
726
+ headerCellClick: be,
727
+ itemChange: Je,
728
+ sortChange: Ie,
729
+ filterChange: it,
730
+ onHeaderSelectionChange: Qe,
731
+ columnGroupChange: lt,
732
+ onKeyDown: Ue,
733
+ onFocus: Ve,
734
+ scrollHandler: Be,
735
+ selectionChange: Ye,
736
+ dispatchDetailExpand: Xe,
737
+ dispatchGroupExpand: $e,
738
+ columnResizeRef: v,
814
739
  dragLogicRef: S,
815
- navigationStateRef: D,
740
+ navigationStateRef: k,
816
741
  tableElementRef: x,
817
- tableBodyElementRef: H,
818
- headerElementRef: Kt,
819
- containerElementRef: j,
820
- headTableElementRef: ne,
742
+ tableBodyElementRef: T,
743
+ headerElementRef: Ct,
744
+ containerElementRef: V,
745
+ headTableElementRef: re,
821
746
  elementRef: K,
822
- footerRef: F,
823
- headerRef: L,
824
- getCachedScrollbarWidth: ee,
825
- vsRef: c
747
+ footerRef: A,
748
+ headerRef: H,
749
+ getCachedScrollbarWidth: p,
750
+ vsRef: d
826
751
  }
827
752
  },
828
- /* @__PURE__ */ i.createElement(Wt.Provider, { value: y.current }, t.children),
753
+ /* @__PURE__ */ i.createElement(Mt.Provider, { value: w.current }, t.children),
829
754
  /* @__PURE__ */ i.createElement(
830
- sr,
755
+ Jt,
831
756
  {
832
- show: b.show,
833
- dataItem: b.dataItem,
834
- field: b.field,
835
- items: _e,
836
- offset: b.offset,
837
- onClose: he,
838
- onSelect: je
757
+ show: h.show,
758
+ dataItem: h.dataItem,
759
+ field: h.field,
760
+ items: Le,
761
+ offset: h.offset,
762
+ onClose: me,
763
+ onSelect: Ne
839
764
  }
840
765
  )
841
766
  );
842
767
  };
843
768
  export {
844
- Sr as GridClientWrapper,
845
- fr as GridContext
769
+ sr as GridClientWrapper,
770
+ Zt as GridContext
846
771
  };