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