@progress/kendo-react-grid 11.0.0-develop.9 → 11.0.0

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