@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.
- package/BasePDFExport.js +8 -0
- package/BasePDFExport.mjs +52 -0
- package/Grid.js +1 -1
- package/Grid.mjs +13 -18
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +300 -288
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +387 -429
- package/GridPdfExportButton.js +8 -0
- package/GridPdfExportButton.mjs +35 -0
- package/GridSearchBox.js +1 -1
- package/GridSearchBox.mjs +1 -1
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +15 -20
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +23 -23
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +46 -46
- package/cells/datacell/GridCell.js +1 -1
- package/cells/datacell/GridCell.mjs +9 -15
- package/cells/datacell/GridCellServerContainer.js +1 -1
- package/cells/datacell/GridCellServerContainer.mjs +1 -1
- package/cells/datacell/useCellClientTdProps.js +1 -1
- package/cells/datacell/useCellClientTdProps.mjs +1 -1
- package/cells/editcell/GridEditCell.js +1 -1
- package/cells/editcell/GridEditCell.mjs +7 -13
- package/cells/editcell/GridEditCellEditor.js +1 -1
- package/cells/editcell/GridEditCellEditor.mjs +1 -1
- package/cells/editcell/GridEditCellServerContainer.js +1 -1
- package/cells/editcell/GridEditCellServerContainer.mjs +1 -1
- package/cells/groupcell/GridGroupCell.js +1 -1
- package/cells/groupcell/GridGroupCell.mjs +8 -10
- package/cells/groupcell/GridGroupCellServerContainer.js +1 -1
- package/cells/groupcell/GridGroupCellServerContainer.mjs +1 -1
- package/cells/groupcell/GridGroupCellToggle.js +1 -1
- package/cells/groupcell/GridGroupCellToggle.mjs +1 -1
- package/cells/groupcell/useGroupCellClientTdProps.js +1 -1
- package/cells/groupcell/useGroupCellClientTdProps.mjs +1 -1
- package/cells/hierarchycell/GridHierarchyCell.js +1 -1
- package/cells/hierarchycell/GridHierarchyCell.mjs +8 -14
- package/cells/hierarchycell/GridHierarchyCellServerContainer.js +1 -1
- package/cells/hierarchycell/GridHierarchyCellServerContainer.mjs +1 -1
- package/cells/hierarchycell/GridHierarchyCellToggle.js +1 -1
- package/cells/hierarchycell/GridHierarchyCellToggle.mjs +1 -1
- package/cells/hierarchycell/useHierarchyCellClientTdProps.js +1 -1
- package/cells/hierarchycell/useHierarchyCellClientTdProps.mjs +15 -18
- package/cells/hooks.js +1 -1
- package/cells/hooks.mjs +1 -1
- package/cells/rowreordercell/useRowReorderCellClientTdProps.js +1 -1
- package/cells/rowreordercell/useRowReorderCellClientTdProps.mjs +1 -1
- package/cells/selectioncell/GridSelectionCell.js +1 -1
- package/cells/selectioncell/GridSelectionCell.mjs +7 -13
- package/cells/selectioncell/GridSelectionCellInput.js +1 -1
- package/cells/selectioncell/GridSelectionCellInput.mjs +1 -1
- package/cells/selectioncell/GridSelectionCellServerContainer.js +1 -1
- package/cells/selectioncell/GridSelectionCellServerContainer.mjs +1 -1
- package/codemods/v11/cell-render.js +9 -0
- package/codemods/v11/column-cell.js +9 -0
- package/codemods/v11/column-filter-cell.js +9 -0
- package/codemods/v11/column-footer-cell.js +9 -0
- package/codemods/v11/column-header-cell.js +9 -0
- package/codemods/v11/detail-expand-state.js +9 -0
- package/codemods/v11/edit-state.js +9 -0
- package/codemods/v11/filter-cell-render.js +9 -0
- package/codemods/v11/group-expand-state.js +9 -0
- package/codemods/v11/header-cell-render.js +9 -0
- package/codemods/v11/index.js +9 -0
- package/codemods/v11/row-render.js +9 -0
- package/codemods/v11/selection-state.js +9 -0
- package/codemods/v11/utils.js +9 -0
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +3 -2
- package/columnMenu/GridColumnMenuColumnsChooser.js +1 -1
- package/columnMenu/GridColumnMenuColumnsChooser.mjs +1 -1
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +1 -1
- package/columnMenu/GridColumnMenuFilterCell.js +1 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +35 -28
- package/columnMenu/GridColumnMenuFilterUI.js +1 -1
- package/columnMenu/GridColumnMenuFilterUI.mjs +1 -1
- package/columnMenu/GridColumnMenuItem.js +1 -1
- package/columnMenu/GridColumnMenuItem.mjs +1 -1
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +62 -49
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.mjs +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.mjs +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnMenu.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnMenu.mjs +2 -2
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.mjs +1 -1
- package/components/GridContainerElementContainer.js +1 -1
- package/components/GridContainerElementContainer.mjs +1 -1
- package/components/GridDragClue.js +1 -1
- package/components/GridDragClue.mjs +1 -1
- package/components/GridDraggableRowsContainer.js +1 -1
- package/components/GridDraggableRowsContainer.mjs +1 -1
- package/components/GridDropClue.js +1 -1
- package/components/GridDropClue.mjs +1 -1
- package/components/GridEditDialog.js +1 -1
- package/components/GridEditDialog.mjs +1 -1
- package/components/GridElementContainer.js +1 -1
- package/components/GridElementContainer.mjs +1 -1
- package/components/PagerContainer.js +1 -1
- package/components/PagerContainer.mjs +1 -1
- package/components/VirtualScrollHeightContainer.js +1 -1
- package/components/VirtualScrollHeightContainer.mjs +1 -1
- package/components/colGroup/GridColGroup.js +1 -1
- package/components/colGroup/GridColGroup.mjs +1 -1
- package/components/noRecords/GridNoRecordsContainer.js +1 -1
- package/components/noRecords/GridNoRecordsContainer.mjs +1 -1
- package/components/table/GridTable.js +1 -1
- package/components/table/GridTable.mjs +1 -1
- package/components/table/GridTableBody.js +1 -1
- package/components/table/GridTableBody.mjs +1 -1
- package/components/table/GridTableScrollable.js +1 -1
- package/components/table/GridTableScrollable.mjs +1 -1
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +1 -1
- package/footer/FooterCell.js +1 -1
- package/footer/FooterCell.mjs +14 -14
- package/footer/client/FooterCellContainer.js +1 -1
- package/footer/client/FooterCellContainer.mjs +1 -1
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +42 -46
- package/header/GridHeaderCell.js +1 -1
- package/header/GridHeaderCell.mjs +11 -11
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +14 -14
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +1 -1
- package/header/Header.js +1 -1
- package/header/Header.mjs +1 -1
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +19 -20
- package/header/client/GridFilterCellContainer.js +1 -1
- package/header/client/GridFilterCellContainer.mjs +11 -12
- package/header/client/GridFilterCellElementContainer.js +1 -1
- package/header/client/GridFilterCellElementContainer.mjs +1 -1
- package/header/client/GridHeaderCellContainer.js +1 -1
- package/header/client/GridHeaderCellContainer.mjs +7 -8
- package/header/client/GridHeaderCellElementContainer.js +1 -1
- package/header/client/GridHeaderCellElementContainer.mjs +1 -1
- package/header/client/GridHeaderRowContainer.js +1 -1
- package/header/client/GridHeaderRowContainer.mjs +1 -1
- package/header/client/HeaderCellResizer.js +1 -1
- package/header/client/HeaderCellResizer.mjs +1 -1
- package/header/client/HeaderRowDraggable.js +1 -1
- package/header/client/HeaderRowDraggable.mjs +1 -1
- package/index.d.mts +293 -186
- package/index.d.ts +293 -186
- package/index.js +1 -1
- package/index.mjs +81 -71
- package/messages/index.js +1 -1
- package/messages/index.mjs +94 -76
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +77 -21
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +32 -33
- package/toolbar-tools/GridToolbarCheckboxFilter.js +8 -0
- package/toolbar-tools/GridToolbarCheckboxFilter.mjs +312 -0
- package/toolbar-tools/GridToolbarColumnsChooser.js +8 -0
- package/toolbar-tools/GridToolbarColumnsChooser.mjs +178 -0
- package/toolbar-tools/GridToolbarFilter.js +8 -0
- package/toolbar-tools/GridToolbarFilter.mjs +281 -0
- package/toolbar-tools/GridToolbarSort.js +8 -0
- package/toolbar-tools/GridToolbarSort.mjs +146 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarCheckboxFilter.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarCheckboxFilter.mjs +114 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarColumnChooser.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarColumnChooser.mjs +89 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.mjs +98 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.mjs +68 -0
- package/toolbar-tools/adaptiveContext/GridToolbarAdaptiveContext.js +9 -0
- package/toolbar-tools/adaptiveContext/GridToolbarAdaptiveContext.mjs +17 -0
- package/utils/GridContext.js +9 -0
- package/{codemods/index.js → utils/GridContext.mjs} +6 -1
- package/utils/index.js +1 -1
- package/utils/index.mjs +145 -148
- package/utils/premium.js +1 -1
- package/utils/premium.mjs +26 -25
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +13 -7
- package/components/GridCustomCellClientContainer.js +0 -9
- package/components/GridCustomCellClientContainer.mjs +0 -34
package/GridClientWrapper.mjs
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as a from "react";
|
|
10
|
-
import { useAdaptiveModeContext as
|
|
11
|
-
import { getSelectionOptions as re, populateClipboardData as
|
|
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
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
},
|
|
34
|
-
|
|
35
|
-
}, P = a.useMemo(() => t.columnsRef.find((e) => e.field ===
|
|
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]),
|
|
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]),
|
|
51
|
-
const e = (P == null ? void 0 : P.contextMenu) || t.gridProps.contextMenu, n = typeof e == "function" ? e(
|
|
52
|
-
if (n &&
|
|
53
|
-
const o =
|
|
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,
|
|
57
|
-
var
|
|
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 &&
|
|
69
|
+
t.gridProps.onContextMenuItemClick && l(t.gridProps.onContextMenuItemClick, o);
|
|
66
70
|
const r = C(), i = {
|
|
67
|
-
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 ((
|
|
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"),
|
|
87
|
-
|
|
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
|
-
|
|
95
|
+
ct(i);
|
|
92
96
|
break;
|
|
93
97
|
case "SelectAllRowsCommand":
|
|
94
|
-
|
|
98
|
+
dt(i);
|
|
99
|
+
break;
|
|
100
|
+
case "ExportPDFCommand":
|
|
101
|
+
oe();
|
|
95
102
|
break;
|
|
96
103
|
case "ClearSelectionCommand":
|
|
97
|
-
|
|
104
|
+
lt(i);
|
|
98
105
|
break;
|
|
99
106
|
case "ReorderRowCommand":
|
|
100
|
-
|
|
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
|
-
|
|
110
|
+
X(
|
|
111
|
+
Ie.copy,
|
|
105
112
|
e.event.nativeEvent,
|
|
106
113
|
{
|
|
107
|
-
copyHeaders: !((
|
|
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
|
-
|
|
121
|
+
X(
|
|
122
|
+
Ie.paste,
|
|
116
123
|
e.event.nativeEvent,
|
|
117
124
|
{
|
|
118
|
-
copyHeaders: !((
|
|
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
|
-
|
|
126
|
-
},
|
|
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
|
-
|
|
145
|
+
l(t.gridProps.onContextMenu, r);
|
|
139
146
|
}
|
|
140
|
-
t.gridProps.contextMenu &&
|
|
147
|
+
t.gridProps.contextMenu && Be({
|
|
141
148
|
event: e,
|
|
142
149
|
dataItem: n,
|
|
143
150
|
field: o
|
|
144
151
|
});
|
|
145
|
-
},
|
|
152
|
+
}, _e = (e) => {
|
|
146
153
|
if (e.target !== e.currentTarget)
|
|
147
154
|
return;
|
|
148
|
-
clearTimeout(
|
|
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 ===
|
|
151
|
-
|
|
152
|
-
}, 0)), t.gridProps.scrollLeftRef && (t.gridProps.scrollLeftRef.current = n),
|
|
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
|
-
}),
|
|
155
|
-
},
|
|
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:
|
|
160
|
-
onNavigationAction:
|
|
161
|
-
columns:
|
|
166
|
+
navigationStateRef: M,
|
|
167
|
+
onNavigationAction: Xe,
|
|
168
|
+
columns: _()
|
|
162
169
|
}), H.onGetSnapshotBeforeUpdate({
|
|
163
170
|
document: E(),
|
|
164
171
|
contextStateRef: D,
|
|
165
|
-
navigationStateRef:
|
|
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:
|
|
179
|
+
selectedField: "",
|
|
173
180
|
...g(e)
|
|
174
181
|
};
|
|
175
|
-
t.gridProps.onKeyDown && S &&
|
|
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
|
-
},
|
|
182
|
-
if (e.action === "moveToNextPage" &&
|
|
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 &&
|
|
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 &&
|
|
195
|
+
n > 0 && de(n, n - 1, e.event);
|
|
189
196
|
}
|
|
190
|
-
if (e.action === "select" &&
|
|
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
|
-
|
|
202
|
+
l(t.gridProps.onNavigationAction, n);
|
|
196
203
|
}
|
|
197
|
-
},
|
|
198
|
-
t.gridProps.onRowClick && e.target.nodeName === "TD" &&
|
|
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
|
-
},
|
|
203
|
-
t.gridProps.onRowDoubleClick && e.target.nodeName === "TD" &&
|
|
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
|
-
},
|
|
208
|
-
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
|
-
},
|
|
215
|
-
t.gridProps.onItemChange && 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
|
-
},
|
|
220
|
-
if (
|
|
221
|
-
const r =
|
|
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 &&
|
|
232
|
+
t.gridProps.onEditChange && l(t.gridProps.onEditChange, {
|
|
226
233
|
edit: r,
|
|
227
234
|
...g(e)
|
|
228
235
|
});
|
|
229
236
|
}
|
|
230
|
-
},
|
|
237
|
+
}, et = (e, n) => {
|
|
231
238
|
var r;
|
|
232
239
|
if (Yt(t.detailExpandable).enabled) {
|
|
233
|
-
const i =
|
|
234
|
-
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
|
-
},
|
|
246
|
+
}, tt = (e, n) => {
|
|
240
247
|
var r;
|
|
241
|
-
const o =
|
|
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 =
|
|
246
|
-
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
|
-
},
|
|
252
|
-
const { allowUnsort: r, mode: i } =
|
|
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],
|
|
256
|
-
|
|
257
|
-
},
|
|
258
|
-
|
|
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
|
-
},
|
|
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,
|
|
287
|
-
...g(o
|
|
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:
|
|
291
|
+
selectedField: ""
|
|
303
292
|
};
|
|
304
|
-
|
|
305
|
-
...
|
|
306
|
-
select: t.gridProps.dataItemKey ?
|
|
307
|
-
event:
|
|
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
|
-
},
|
|
302
|
+
}, ot = (e) => {
|
|
314
303
|
var u, m;
|
|
315
|
-
if (
|
|
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:
|
|
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"),
|
|
332
|
-
if (
|
|
333
|
-
const
|
|
334
|
-
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:
|
|
326
|
+
dataItem: I,
|
|
338
327
|
startRowIndex: s,
|
|
339
|
-
startColIndex:
|
|
340
|
-
startDataItem:
|
|
341
|
-
endDataItem:
|
|
328
|
+
startColIndex: c,
|
|
329
|
+
startDataItem: I,
|
|
330
|
+
endDataItem: I,
|
|
342
331
|
endRowIndex: s,
|
|
343
|
-
endColIndex:
|
|
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
|
-
},
|
|
352
|
-
var n;
|
|
340
|
+
}, it = (e) => {
|
|
353
341
|
if (t.gridProps.onHeaderSelectionChange && h.enabled) {
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
select: e.syntheticEvent.target.checked ?
|
|
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:
|
|
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 &&
|
|
353
|
+
t.gridProps.onSelectionChange && h.enabled && l(t.gridProps.onSelectionChange, {
|
|
367
354
|
...e,
|
|
368
355
|
select: n
|
|
369
356
|
});
|
|
370
|
-
},
|
|
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:
|
|
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 =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
(
|
|
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
|
-
},
|
|
410
|
+
}, lt = (e) => {
|
|
424
411
|
t.gridProps.onSelectionChange && h.enabled && q(e, {});
|
|
425
|
-
},
|
|
426
|
-
|
|
412
|
+
}, G = (e, n, o, r, i) => {
|
|
413
|
+
gt();
|
|
427
414
|
const d = t.gridProps.onDataStateChange;
|
|
428
415
|
if (e) {
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
} else 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
|
-
},
|
|
426
|
+
}, $ = (e, n, o) => {
|
|
440
427
|
var r;
|
|
441
|
-
y && t.gridProps.pageable && ((r = f.current) == null || r.reset()),
|
|
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
|
-
},
|
|
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,
|
|
451
|
-
},
|
|
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
|
-
},
|
|
441
|
+
}, gt = () => {
|
|
455
442
|
y && t.gridProps.virtualSkipRef && (t.gridProps.virtualSkipRef.current = 0);
|
|
456
|
-
},
|
|
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 =
|
|
459
|
-
o < r &&
|
|
460
|
-
},
|
|
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 &&
|
|
464
|
-
},
|
|
465
|
-
|
|
466
|
-
},
|
|
467
|
-
|
|
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
|
-
},
|
|
474
|
-
|
|
460
|
+
}, ht = (e, n) => {
|
|
461
|
+
G(
|
|
475
462
|
t.gridProps.onFilterChange,
|
|
476
463
|
{ filter: e },
|
|
477
|
-
{ filter: e
|
|
464
|
+
{ filter: e, skip: 0 },
|
|
478
465
|
n
|
|
479
466
|
);
|
|
480
|
-
},
|
|
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
|
-
|
|
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 = (
|
|
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 && (
|
|
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
|
-
},
|
|
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
|
-
|
|
509
|
+
l(t.gridProps.onColumnsStateChange, n);
|
|
517
510
|
}
|
|
518
|
-
},
|
|
519
|
-
const { columnsRef: r, columnsState: i } = t, d = r[e],
|
|
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,
|
|
526
|
-
R.orderIndex =
|
|
527
|
-
const
|
|
528
|
-
|
|
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
|
|
531
|
-
rn(t.columnsMapRef, r,
|
|
532
|
-
const ee =
|
|
533
|
-
if (
|
|
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
|
-
|
|
533
|
+
l(t.gridProps.onColumnReorder, R);
|
|
541
534
|
}
|
|
542
|
-
|
|
543
|
-
},
|
|
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 || !
|
|
538
|
+
if (o === "forbidden" || !r || !U.current)
|
|
546
539
|
return;
|
|
547
540
|
const i = t.dataRef[n];
|
|
548
|
-
t.gridProps.onRowReorder &&
|
|
549
|
-
draggedDataItems: [
|
|
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
|
-
}),
|
|
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)),
|
|
561
|
-
},
|
|
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 }),
|
|
567
|
-
},
|
|
559
|
+
i.splice(n, 0, { field: r }), ie(i, o);
|
|
560
|
+
}, It = (e, n) => {
|
|
568
561
|
const o = x.current.getCurrentGroupsLength;
|
|
569
|
-
|
|
570
|
-
},
|
|
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),
|
|
584
|
-
},
|
|
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
|
-
},
|
|
580
|
+
}, Te = () => {
|
|
588
581
|
var e;
|
|
589
|
-
t.gridProps.containerHeightRef && (t.gridProps.containerHeightRef.current = ((e =
|
|
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,
|
|
587
|
+
n && (e.current = n, z());
|
|
595
588
|
}
|
|
596
|
-
},
|
|
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
|
-
},
|
|
603
|
+
}, c = C(), s = jt({
|
|
611
604
|
event: d,
|
|
612
|
-
data:
|
|
605
|
+
data: c,
|
|
613
606
|
selectedState: (u = t.gridProps.select) != null ? u : {},
|
|
614
|
-
previousCopiedItems:
|
|
607
|
+
previousCopiedItems: Le.current
|
|
615
608
|
});
|
|
616
|
-
e !==
|
|
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,
|
|
622
|
+
var i, d, c;
|
|
630
623
|
if (!te)
|
|
631
624
|
return !1;
|
|
632
|
-
const e =
|
|
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,
|
|
635
|
-
|
|
636
|
-
columns:
|
|
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:
|
|
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 &&
|
|
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
|
-
}),
|
|
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
|
-
|
|
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 >
|
|
677
|
-
(i) => !
|
|
678
|
-
)[0] : r.length === 1 && (Q.current = r[0],
|
|
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,
|
|
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
|
-
|
|
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 &&
|
|
689
|
+
d && F.current && (F.current.scrollTop = d.offsetTop);
|
|
697
690
|
}
|
|
698
691
|
},
|
|
699
692
|
[t.gridProps.scrollable]
|
|
700
|
-
),
|
|
701
|
-
p.current = window.innerWidth, Dt() ||
|
|
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 =
|
|
706
|
-
},
|
|
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:
|
|
701
|
+
const n = { rowIndex: Re.current };
|
|
709
702
|
e.forEach((o) => {
|
|
710
|
-
o.isIntersecting ||
|
|
703
|
+
o.isIntersecting || le(n);
|
|
711
704
|
});
|
|
712
705
|
},
|
|
713
|
-
[
|
|
714
|
-
),
|
|
706
|
+
[le]
|
|
707
|
+
), z = () => {
|
|
715
708
|
t.gridProps.forceUpdate && t.gridProps.forceUpdate();
|
|
716
|
-
},
|
|
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:
|
|
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
|
-
|
|
725
|
+
ze,
|
|
733
726
|
t.gridProps.sort,
|
|
734
727
|
t.gridProps.rowHeight
|
|
735
|
-
]), a.useEffect(() => (t.gridProps.clipboard && (Y.current = new qt(
|
|
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,
|
|
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:
|
|
733
|
+
navigationStateRef: M
|
|
741
734
|
}), () => {
|
|
742
|
-
clearTimeout(
|
|
735
|
+
clearTimeout(he.current);
|
|
743
736
|
}), []), a.useEffect(() => {
|
|
744
737
|
var e;
|
|
745
|
-
|
|
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:
|
|
749
|
-
focusFirst:
|
|
741
|
+
navigationStateRef: M,
|
|
742
|
+
focusFirst: ge.current,
|
|
750
743
|
newEditableRow: Q.current,
|
|
751
|
-
singleEditRow:
|
|
752
|
-
lastActiveElement:
|
|
744
|
+
singleEditRow: me.current,
|
|
745
|
+
lastActiveElement: fe.current,
|
|
753
746
|
navigatable: t.gridProps.navigatable
|
|
754
|
-
}),
|
|
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
|
-
|
|
754
|
+
T.current = window.IntersectionObserver && new window.IntersectionObserver(He, e) || null;
|
|
762
755
|
}
|
|
763
|
-
}, [
|
|
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 &&
|
|
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
|
|
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
|
-
|
|
779
|
+
Re.current = n;
|
|
787
780
|
const o = J();
|
|
788
|
-
if (
|
|
789
|
-
|
|
790
|
-
const i = o.querySelector(`[absolute-row-index="${
|
|
791
|
-
i ?
|
|
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(
|
|
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 =
|
|
809
|
-
|
|
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:
|
|
814
|
-
activeDragRowDataItemRef:
|
|
807
|
+
rowReorder: L,
|
|
808
|
+
activeDragRowDataItemRef: U,
|
|
815
809
|
reorderRowDragTargetRef: At,
|
|
816
810
|
reorderRowDropTargetRef: Ht,
|
|
817
|
-
dir:
|
|
818
|
-
getCellPositionStyle:
|
|
811
|
+
dir: ve,
|
|
812
|
+
getCellPositionStyle: Mt,
|
|
819
813
|
dataItemKey: t.gridProps.dataItemKey,
|
|
820
814
|
columnsState: t.columnsState,
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
815
|
+
columnsRef: t.columnsRef,
|
|
816
|
+
onColumnsStateChange: ae,
|
|
817
|
+
groupChange: ie,
|
|
818
|
+
selectionRelease: at,
|
|
819
|
+
pagerPageChange: Pt,
|
|
825
820
|
onContextMenu: je,
|
|
826
|
-
rowClick:
|
|
827
|
-
rowDblClick:
|
|
828
|
-
cellClick:
|
|
829
|
-
headerCellClick:
|
|
830
|
-
itemChange:
|
|
831
|
-
onDialogEditCancel:
|
|
832
|
-
onDialogEditSubmit:
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
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:
|
|
841
|
-
selectionChange:
|
|
842
|
-
mobileMode:
|
|
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:
|
|
847
|
-
dispatchGroupExpand:
|
|
849
|
+
dispatchDetailExpand: et,
|
|
850
|
+
dispatchGroupExpand: tt,
|
|
848
851
|
columnResizeRef: w,
|
|
849
852
|
dragLogicRef: x,
|
|
850
|
-
navigationStateRef:
|
|
853
|
+
navigationStateRef: M,
|
|
851
854
|
tableElementRef: k,
|
|
852
855
|
tableBodyElementRef: A,
|
|
853
|
-
headerElementRef:
|
|
854
|
-
containerElementRef:
|
|
855
|
-
headTableElementRef:
|
|
856
|
+
headerElementRef: Tt,
|
|
857
|
+
containerElementRef: F,
|
|
858
|
+
headTableElementRef: se,
|
|
856
859
|
elementRef: K,
|
|
857
|
-
virtualScrollHeightContainerRef:
|
|
858
|
-
footerRef:
|
|
859
|
-
headerRef:
|
|
860
|
+
virtualScrollHeightContainerRef: Ge,
|
|
861
|
+
footerRef: O,
|
|
862
|
+
headerRef: N,
|
|
860
863
|
vsRef: f
|
|
861
864
|
}
|
|
862
865
|
},
|
|
863
|
-
/* @__PURE__ */ a.createElement(
|
|
866
|
+
/* @__PURE__ */ a.createElement($t.Provider, { value: D.current }, t.children),
|
|
864
867
|
/* @__PURE__ */ a.createElement(
|
|
865
868
|
Rn,
|
|
866
869
|
{
|
|
867
|
-
show:
|
|
868
|
-
dataItem:
|
|
869
|
-
field:
|
|
870
|
-
items:
|
|
871
|
-
offset:
|
|
872
|
-
onClose:
|
|
873
|
-
onSelect:
|
|
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
|
-
|
|
880
|
-
bn as GridContext
|
|
892
|
+
Fn as GridClientWrapper
|
|
881
893
|
};
|