@progress/kendo-react-grid 7.5.0-develop.2 → 7.5.0-develop.20
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 +411 -376
- package/GridColumn.js +1 -1
- package/GridColumn.mjs +2 -1
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +18 -53
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +10 -9
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +16 -15
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +53 -53
- package/constants/index.js +1 -1
- package/constants/index.mjs +4 -3
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +13 -9
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +40 -35
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +57 -56
- package/index.d.mts +40 -59
- package/index.d.ts +40 -59
- package/package-metadata.mjs +1 -1
- package/package.json +12 -12
package/Grid.mjs
CHANGED
|
@@ -7,41 +7,42 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as r from "react";
|
|
10
|
-
import
|
|
11
|
-
import { dispatchEvent as
|
|
12
|
-
import { tableKeyboardNavigation as x, getSelectionOptions as
|
|
13
|
-
import { GridSelectionCell as
|
|
14
|
-
import { GridHierarchyCell as
|
|
15
|
-
import { GridEditCell as
|
|
16
|
-
import { Header as
|
|
17
|
-
import { HeaderRow as
|
|
18
|
-
import { FilterRow as
|
|
19
|
-
import { GroupPanel as
|
|
20
|
-
import { Footer as
|
|
21
|
-
import { provideLocalizationService as
|
|
22
|
-
import { pagerMessagesMap as
|
|
23
|
-
import { VirtualScroll as
|
|
24
|
-
import { VirtualScrollFixed as
|
|
25
|
-
import { ColumnResize as
|
|
26
|
-
import { CommonDragLogic as
|
|
27
|
-
import { firefox as
|
|
28
|
-
import { GridCell as
|
|
29
|
-
import { GridGroupCell as
|
|
30
|
-
import { GridRow as
|
|
31
|
-
import { GridHeaderSelectionCell as
|
|
32
|
-
import { GridNoRecords as
|
|
10
|
+
import o from "prop-types";
|
|
11
|
+
import { RowHeightService as re, dispatchEvent as Pe, canUseDOM as U, getActiveElement as Ke, memoizeOne as S, validatePackage as Oe, shouldShowValidationUI as Ve, setScrollbarWidth as ae, getter as Ue, classNames as N, kendoThemeMaps as P, WatermarkOverlay as We } from "@progress/kendo-react-common";
|
|
12
|
+
import { tableKeyboardNavigation as x, getSelectionOptions as le, mapColumns as Be, ClipboardService as $e, TableKeyboardNavigationContext as W, isRtl as je, tableKeyboardNavigationTools as _, tableColumnsVirtualization as qe, Pager as Xe, tableKeyboardNavigationScopeAttributes as ne, TableSelection as he, tableKeyboardNavigationBodyAttributes as pe, DropClue as de, DragClue as ce, updateLeft as Ye, updateRight as Je, KEYBOARD_NAV_DATA_ID as Qe } from "@progress/kendo-react-data-tools";
|
|
13
|
+
import { GridSelectionCell as Ze } from "./cells/GridSelectionCell.mjs";
|
|
14
|
+
import { GridHierarchyCell as et } from "./cells/GridHierarchyCell.mjs";
|
|
15
|
+
import { GridEditCell as tt } from "./cells/GridEditCell.mjs";
|
|
16
|
+
import { Header as st } from "./header/Header.mjs";
|
|
17
|
+
import { HeaderRow as it } from "./header/HeaderRow.mjs";
|
|
18
|
+
import { FilterRow as ot } from "./header/FilterRow.mjs";
|
|
19
|
+
import { GroupPanel as rt } from "./header/GroupPanel.mjs";
|
|
20
|
+
import { Footer as at } from "./footer/Footer.mjs";
|
|
21
|
+
import { provideLocalizationService as lt, registerForLocalization as nt } from "@progress/kendo-react-intl";
|
|
22
|
+
import { pagerMessagesMap as ht, gridAriaLabel as ue, messages as pt } from "./messages/index.mjs";
|
|
23
|
+
import { VirtualScroll as dt } from "./VirtualScroll.mjs";
|
|
24
|
+
import { VirtualScrollFixed as ge } from "./VirtualScrollFixed.mjs";
|
|
25
|
+
import { ColumnResize as ct } from "./drag/ColumnResize.mjs";
|
|
26
|
+
import { CommonDragLogic as ut } from "./drag/CommonDragLogic.mjs";
|
|
27
|
+
import { firefox as fe, firefoxMaxHeight as me, flatData as gt, readColumns as ft, sanitizeColumns as mt, getColumnWidth as B, autoGenerateColumns as vt, getNestedValue as ve, resolveCells as bt } from "./utils/index.mjs";
|
|
28
|
+
import { GridCell as Ct } from "./cells/GridCell.mjs";
|
|
29
|
+
import { GridGroupCell as be } from "./cells/GridGroupCell.mjs";
|
|
30
|
+
import { GridRow as Rt } from "./rows/GridRow.mjs";
|
|
31
|
+
import { GridHeaderSelectionCell as yt } from "./header/GridHeaderSelectionCell.mjs";
|
|
32
|
+
import { GridNoRecords as wt } from "./GridNoRecords.mjs";
|
|
33
33
|
import { operators as Ce } from "./filterCommon.mjs";
|
|
34
|
-
import { FooterRow as
|
|
35
|
-
import { normalize as
|
|
34
|
+
import { FooterRow as St } from "./footer/FooterRow.mjs";
|
|
35
|
+
import { normalize as It } from "./paging/GridPagerSettings.mjs";
|
|
36
36
|
import { packageMetadata as Re } from "./package-metadata.mjs";
|
|
37
|
-
import { GridDetailCell as
|
|
38
|
-
import { GridDetailHierarchyCell as
|
|
39
|
-
|
|
37
|
+
import { GridDetailCell as kt } from "./cells/GridDetailCell.mjs";
|
|
38
|
+
import { GridDetailHierarchyCell as Et } from "./cells/GridDetailHierarchyCell.mjs";
|
|
39
|
+
import { SAFARI_REGEX as xt } from "./constants/index.mjs";
|
|
40
|
+
const T = class T extends r.Component {
|
|
40
41
|
constructor(a) {
|
|
41
|
-
super(a), this._columns = [], this._columnsMap = [[]], this._columnsMutations = 0, this._resized = !1, this._shouldUpdateLeftRight = !0, this.contextStateRef = { current: void 0 }, this.navigationStateRef = { current: void 0 }, this._data = [], this._slicedData = void 0, this.wrapperScrollTop = 0, this.showLicenseWatermark = !1, this.headerRef = r.createRef(), this.headerElementRef = r.createRef(), this._element = null, this.tableElement = null, this.containerRef = r.createRef(), this.tableBodyRef = r.createRef(), this._footer = null, this.forceUpdateTimeout = void 0, this.isRtl = !1, this.observer = null, this.handleIntersection = (e) => {
|
|
42
|
+
super(a), this._columns = [], this._columnsMap = [[]], this._columnsMutations = 0, this._resized = !1, this._focusFirst = !1, this._shouldUpdateLeftRight = !0, this.contextStateRef = { current: void 0 }, this.navigationStateRef = { current: void 0 }, this._data = [], this._slicedData = void 0, this.wrapperScrollTop = 0, this.showLicenseWatermark = !1, this.headerRef = r.createRef(), this.headerElementRef = r.createRef(), this._element = null, this.tableElement = null, this.containerRef = r.createRef(), this.tableBodyRef = r.createRef(), this._footer = null, this.forceUpdateTimeout = void 0, this.isRtl = !1, this.headTable = null, this.observer = null, this.handleIntersection = (e) => {
|
|
42
43
|
const t = { rowIndex: this.rowIndex };
|
|
43
|
-
e.forEach((
|
|
44
|
-
|
|
44
|
+
e.forEach((s) => {
|
|
45
|
+
s.isIntersecting || this.setCurrentOnTop(t);
|
|
45
46
|
});
|
|
46
47
|
}, this.setCurrentOnTop = (e) => {
|
|
47
48
|
if (!this.vs.container || this.props.scrollable === "none")
|
|
@@ -51,35 +52,35 @@ const _ = class _ extends r.Component {
|
|
|
51
52
|
if (this.props.scrollable === "virtual")
|
|
52
53
|
this.vs.askedSkip = t, this.vs.container.scroll(0, Math.round(this.vs.askedSkip / this.vs.total * this.vs.container.scrollHeight));
|
|
53
54
|
else if (this.element) {
|
|
54
|
-
const
|
|
55
|
-
|
|
55
|
+
const s = t < 1 ? this.element.querySelector("tbody > tr:nth-child(1)") : this.element.querySelector(`tbody > tr:nth-child(${t + 1})`);
|
|
56
|
+
s && this.containerRef.current && (this.containerRef.current.scrollTop = s.offsetTop);
|
|
56
57
|
}
|
|
57
58
|
}, this.scrollIntoView = (e) => {
|
|
58
59
|
if (!this.vs.container || this.props.scrollable === "none")
|
|
59
60
|
return;
|
|
60
61
|
this.rowIndex = e.rowIndex;
|
|
61
|
-
const { rowIndex: t } = e,
|
|
62
|
-
if (this.observer &&
|
|
62
|
+
const { rowIndex: t } = e, s = this.element;
|
|
63
|
+
if (this.observer && s) {
|
|
63
64
|
this.observer.disconnect();
|
|
64
|
-
const
|
|
65
|
-
|
|
65
|
+
const l = s.querySelector(`[absolute-row-index="${t}"]`);
|
|
66
|
+
l ? this.observer.observe(l) : this.setCurrentOnTop(e);
|
|
66
67
|
}
|
|
67
68
|
}, this.fitColumns = (e) => {
|
|
68
69
|
this.columnResize.dblClickHandler(null, e);
|
|
69
|
-
}, this.onContextMenu = (e, t,
|
|
70
|
+
}, this.onContextMenu = (e, t, s) => {
|
|
70
71
|
if (this.props.onContextMenu) {
|
|
71
|
-
const
|
|
72
|
+
const l = {
|
|
72
73
|
target: this,
|
|
73
74
|
syntheticEvent: e,
|
|
74
75
|
nativeEvent: e.nativeEvent,
|
|
75
76
|
dataItem: t,
|
|
76
|
-
field:
|
|
77
|
+
field: s
|
|
77
78
|
};
|
|
78
|
-
this.props.onContextMenu.call(void 0,
|
|
79
|
+
this.props.onContextMenu.call(void 0, l);
|
|
79
80
|
}
|
|
80
81
|
}, this.getVirtualScroll = (e) => {
|
|
81
|
-
const { rowHeight: t, detailRowHeight:
|
|
82
|
-
return !
|
|
82
|
+
const { rowHeight: t, detailRowHeight: s, detail: l, expandField: p, groupable: n } = e, d = this.isAllData(), m = t !== void 0 && t > 0, R = s !== void 0 && s > 0, k = n === !0 || typeof n == "object" && n.enabled !== !1;
|
|
83
|
+
return !m || k && !d || !!(l && p) && (!R || !d) ? dt : ge;
|
|
83
84
|
}, this.isAllData = () => {
|
|
84
85
|
const { data: e, total: t } = this.props;
|
|
85
86
|
return Array.isArray(e) ? e.length === t : e ? t === e.total : !1;
|
|
@@ -92,46 +93,54 @@ const _ = class _ extends r.Component {
|
|
|
92
93
|
this.props.sort,
|
|
93
94
|
t || this.props.rowHeight === void 0 || this.props.rowHeight === 0
|
|
94
95
|
), this.vs.fixedScroll = this.props.fixedScroll || !1, this.vs.PageChange = this.pageChange, this.vs.realSkip = this.props.skip || 0, this.vs.pageSize = (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 0, this.vs.scrollableVirtual = this.props.scrollable === "virtual", this.vs.total = e, this.vs.propsSkip = (this.props.skip || 0) + (this.props.scrollable === "virtual" ? this.vs.topCacheCount + (this.vs.attendedSkip - (this.props.skip || 0)) : 0), this.props.rowHeight !== void 0 && this.props.rowHeight > 0 && !t) {
|
|
95
|
-
const
|
|
96
|
-
this.vs.containerHeight =
|
|
96
|
+
const s = this.props.rowHeight * e;
|
|
97
|
+
this.vs.containerHeight = fe ? Math.min(me, s) : s;
|
|
97
98
|
} else
|
|
98
99
|
this.vs.containerHeight = 1533915;
|
|
99
|
-
if (this.vs.containerRef = this.containerRef, this.vs.tableBodyRef = this.tableBodyRef, this.vs.table = this.tableElement, this._slicedData = void 0, this.vs instanceof
|
|
100
|
-
const { rowHeight:
|
|
101
|
-
let { detailRowHeight:
|
|
102
|
-
|
|
100
|
+
if (this.vs.containerRef = this.containerRef, this.vs.tableBodyRef = this.tableBodyRef, this.vs.table = this.tableElement, this._slicedData = void 0, this.vs instanceof ge) {
|
|
101
|
+
const { rowHeight: s = 0, detail: l, expandField: p } = this.props;
|
|
102
|
+
let { detailRowHeight: n = 0 } = this.props;
|
|
103
|
+
n = l && p ? n : s, this.isAllData() ? (this.vs.total = this._data.length, this._slicedData = this._data.slice(this.vs.realSkip, this.vs.realSkip + this.vs.pageSize), this.vs.rowHeightService = this.rowHeightService(this.vs, this._data.length, s, n, this._data)) : this.vs.rowHeightService = new re(e, s, n);
|
|
103
104
|
const d = this.vs.rowHeightService.totalHeight();
|
|
104
|
-
this.vs.containerHeight =
|
|
105
|
+
this.vs.containerHeight = fe ? Math.min(me, d) : d;
|
|
105
106
|
}
|
|
106
107
|
}, this.scrollHandler = (e) => {
|
|
107
108
|
if (e.target !== e.currentTarget)
|
|
108
109
|
return;
|
|
109
110
|
clearTimeout(this.forceUpdateTimeout), this.vs.table = this.tableElement;
|
|
110
|
-
const t = e.currentTarget.scrollLeft,
|
|
111
|
-
this.props.columnVirtualization && (!this.vs.scrollableVirtual ||
|
|
111
|
+
const t = e.currentTarget.scrollLeft, s = e.currentTarget.scrollTop;
|
|
112
|
+
this.props.columnVirtualization && (!this.vs.scrollableVirtual || s === this.wrapperScrollTop) && (this.forceUpdateTimeout = window.setTimeout(() => {
|
|
112
113
|
this.forceUpdate();
|
|
113
|
-
}, 0)), this._header && this._header.setScrollLeft(t), this._footer && this._footer.setScrollLeft(t), this.vs &&
|
|
114
|
+
}, 0)), this._header && this._header.setScrollLeft(t), this._footer && this._footer.setScrollLeft(t), this.vs && s !== this.wrapperScrollTop && this.vs.scrollHandler(e), Pe(this.props.onScroll, e, this, void 0), this.wrapperScrollTop = s;
|
|
114
115
|
}, this.onKeyDown = (e) => {
|
|
115
116
|
if (x.onKeyDown(e, {
|
|
116
117
|
contextStateRef: this.contextStateRef,
|
|
117
118
|
navigationStateRef: this.navigationStateRef,
|
|
118
119
|
onNavigationAction: this.onNavigationAction
|
|
119
120
|
}), this.props.onKeyDown) {
|
|
120
|
-
const { mode: t, cell:
|
|
121
|
+
const { mode: t, cell: s } = le(this.props.selectable), l = {
|
|
121
122
|
dataItems: this.getLeafDataItems(),
|
|
122
123
|
mode: t,
|
|
123
|
-
cell:
|
|
124
|
+
cell: s,
|
|
124
125
|
componentId: this._gridId,
|
|
125
126
|
selectedField: this.props.selectedField,
|
|
126
127
|
...this.getArguments(e)
|
|
127
128
|
};
|
|
128
|
-
this.props.onKeyDown.call(void 0,
|
|
129
|
+
this.props.onKeyDown.call(void 0, l);
|
|
129
130
|
}
|
|
130
131
|
}, this.onFocus = (e) => {
|
|
131
132
|
x.onFocus(e, {
|
|
132
133
|
contextStateRef: this.contextStateRef
|
|
133
134
|
});
|
|
134
135
|
}, this.onNavigationAction = (e) => {
|
|
136
|
+
if (e.action === "moveToNextPage" && this.moveToNextPage(e.event), e.action === "moveToPrevPage" && this.moveToPrevPage(e.event), e.focusElement && e.action === "reorderToRight") {
|
|
137
|
+
const t = parseInt(e.focusElement.ariaColIndex, 10) - 1;
|
|
138
|
+
t < this._columns.length - 1 && this.columnReorder(t, t + 1, e.event);
|
|
139
|
+
}
|
|
140
|
+
if (e.focusElement && e.action === "reorderToLeft") {
|
|
141
|
+
const t = parseInt(e.focusElement.ariaColIndex, 10) - 1;
|
|
142
|
+
t > 0 && this.columnReorder(t, t - 1, e.event);
|
|
143
|
+
}
|
|
135
144
|
if (this.props.onNavigationAction) {
|
|
136
145
|
const t = {
|
|
137
146
|
focusElement: e.focusElement,
|
|
@@ -158,8 +167,8 @@ const _ = class _ extends r.Component {
|
|
|
158
167
|
}, this.itemChange = (e) => {
|
|
159
168
|
const t = this.props.onItemChange;
|
|
160
169
|
if (e.field === this.props.expandField || this.props.group && e.field === void 0) {
|
|
161
|
-
const
|
|
162
|
-
|
|
170
|
+
const s = this.props.onExpandChange;
|
|
171
|
+
s && s.call(
|
|
163
172
|
void 0,
|
|
164
173
|
{
|
|
165
174
|
...this.getArguments(e.syntheticEvent),
|
|
@@ -193,25 +202,36 @@ const _ = class _ extends r.Component {
|
|
|
193
202
|
);
|
|
194
203
|
}, this.selectionRelease = (e) => {
|
|
195
204
|
if (this.props.onSelectionChange) {
|
|
196
|
-
const t = {
|
|
205
|
+
const t = this.getSlicedLeafDataItems()[e.startRowIndex], s = this.getSlicedLeafDataItems()[e.endRowIndex], l = {
|
|
197
206
|
syntheticEvent: void 0,
|
|
198
207
|
target: this,
|
|
199
208
|
selectedField: this.props.selectedField || "",
|
|
200
209
|
componentId: this._gridId,
|
|
201
210
|
dataItems: this.getLeafDataItems(),
|
|
202
211
|
dataItem: null,
|
|
212
|
+
startDataItem: t,
|
|
213
|
+
endDataItem: s,
|
|
203
214
|
...e
|
|
204
215
|
};
|
|
205
|
-
this.props.onSelectionChange.call(void 0,
|
|
216
|
+
this.props.onSelectionChange.call(void 0, l);
|
|
206
217
|
}
|
|
207
|
-
}, this.pageChange = (e, t,
|
|
218
|
+
}, this.pageChange = (e, t, s) => {
|
|
208
219
|
this.raiseDataEvent(
|
|
209
220
|
this.props.onPageChange,
|
|
210
221
|
{ page: e },
|
|
211
222
|
{ skip: e.skip, take: e.take },
|
|
212
223
|
t,
|
|
213
|
-
|
|
224
|
+
s
|
|
214
225
|
);
|
|
226
|
+
}, this.getTotal = () => {
|
|
227
|
+
let e = this.props.total || 0;
|
|
228
|
+
return Array.isArray(this.props.data) ? e = e || this.props.data.length : this.props.data && (e = e || this.props.data.total), e;
|
|
229
|
+
}, this.moveToNextPage = (e) => {
|
|
230
|
+
const t = this.props.take || 0, s = (this.props.skip || 0) + t, l = this.getTotal();
|
|
231
|
+
s < l && this.pageChange({ skip: s, take: t }, e);
|
|
232
|
+
}, this.moveToPrevPage = (e) => {
|
|
233
|
+
const t = this.props.take || 0, s = (this.props.skip || 0) - t;
|
|
234
|
+
s >= 0 && this.pageChange({ skip: s, take: t }, e);
|
|
215
235
|
}, this.pagerPageChange = (e) => {
|
|
216
236
|
this.pageChange({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
|
|
217
237
|
}, this.sortChange = (e, t) => {
|
|
@@ -229,12 +249,12 @@ const _ = class _ extends r.Component {
|
|
|
229
249
|
t
|
|
230
250
|
);
|
|
231
251
|
}, this.groupChange = (e, t) => {
|
|
232
|
-
const
|
|
233
|
-
this.raiseDataEvent(
|
|
252
|
+
const s = t.nativeEvent ? t : { nativeEvent: t.nativeEvent || t.originalEvent };
|
|
253
|
+
e.length === 0 && this.props.navigatable && (this._focusFirst = !0), this.raiseDataEvent(
|
|
234
254
|
this.props.onGroupChange,
|
|
235
255
|
{ group: e },
|
|
236
256
|
{ group: e, skip: 0 },
|
|
237
|
-
|
|
257
|
+
s
|
|
238
258
|
);
|
|
239
259
|
}, this.onClipboard = (e, t) => {
|
|
240
260
|
if (this.props.onClipboard) {
|
|
@@ -252,51 +272,51 @@ const _ = class _ extends r.Component {
|
|
|
252
272
|
);
|
|
253
273
|
}
|
|
254
274
|
}, this.inActiveElement = () => {
|
|
255
|
-
var
|
|
256
|
-
if (!
|
|
275
|
+
var p, n, d;
|
|
276
|
+
if (!U)
|
|
257
277
|
return !1;
|
|
258
|
-
const e = Ke(this.document), t = e ? e.matches(".k-table-td") ? e : (
|
|
259
|
-
return !!(t &&
|
|
260
|
-
}, this.onResize = (e, t,
|
|
278
|
+
const e = Ke(this.document), t = e ? e.matches(".k-table-td") ? e : (p = this.document) == null ? void 0 : p.body : (n = this.document) == null ? void 0 : n.body, s = t.closest(".k-grid-container"), l = t && ((d = this._element) == null ? void 0 : d.contains(t));
|
|
279
|
+
return !!(t && l && s);
|
|
280
|
+
}, this.onResize = (e, t, s, l, p, n) => {
|
|
261
281
|
this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(
|
|
262
282
|
void 0,
|
|
263
283
|
{
|
|
264
284
|
columns: this.columns,
|
|
265
|
-
nativeEvent:
|
|
266
|
-
targetColumnId:
|
|
285
|
+
nativeEvent: l,
|
|
286
|
+
targetColumnId: n,
|
|
267
287
|
index: e,
|
|
268
288
|
newWidth: t,
|
|
269
|
-
oldWidth:
|
|
270
|
-
end:
|
|
289
|
+
oldWidth: s,
|
|
290
|
+
end: p,
|
|
271
291
|
target: this
|
|
272
292
|
}
|
|
273
293
|
);
|
|
274
|
-
}, this.reInitVirtualization = S((e, t,
|
|
294
|
+
}, this.reInitVirtualization = S((e, t, s, l, p, n) => {
|
|
275
295
|
this.vs.reset();
|
|
276
296
|
const d = this.getVirtualScroll(this.props);
|
|
277
|
-
this.vs = new d(
|
|
278
|
-
}), this.flatData = S((e, t,
|
|
279
|
-
const
|
|
280
|
-
|
|
297
|
+
this.vs = new d(n);
|
|
298
|
+
}), this.flatData = S((e, t, s, l, p, n, d) => {
|
|
299
|
+
const m = [], R = gt(
|
|
300
|
+
m,
|
|
281
301
|
e,
|
|
282
302
|
t,
|
|
283
|
-
{ index:
|
|
284
|
-
|
|
285
|
-
|
|
303
|
+
{ index: s },
|
|
304
|
+
l !== void 0,
|
|
305
|
+
p
|
|
286
306
|
);
|
|
287
|
-
return { flattedData:
|
|
288
|
-
}), this.rowHeightService = S((e, t,
|
|
289
|
-
(e, t,
|
|
290
|
-
const
|
|
291
|
-
return
|
|
307
|
+
return { flattedData: m, resolvedGroupsCount: R };
|
|
308
|
+
}), this.rowHeightService = S((e, t, s, l, p) => new re(t, s, l, p)), this.childrenToArray = S((e) => r.Children.toArray(e)), this.readColumns = S(
|
|
309
|
+
(e, t, s) => {
|
|
310
|
+
const l = e.filter((p) => p && p.type && p.type.displayName === "KendoReactGridColumn");
|
|
311
|
+
return ft(l, this.columns, { prevId: 0, idPrefix: t });
|
|
292
312
|
}
|
|
293
313
|
), this.mapColumns = S(
|
|
294
|
-
(e, t) =>
|
|
295
|
-
), this.configureColumns = S((e, t,
|
|
296
|
-
this.props.selectedField && e.filter((
|
|
297
|
-
|
|
314
|
+
(e, t) => Be(e, t)
|
|
315
|
+
), this.configureColumns = S((e, t, s) => {
|
|
316
|
+
this.props.selectedField && e.filter((n) => n.field === this.props.selectedField).forEach((n) => {
|
|
317
|
+
n.width = n.width || "50px", n.cell = n.cell || Ze, n.headerCell = n.headerCell || yt;
|
|
298
318
|
});
|
|
299
|
-
const
|
|
319
|
+
const l = {
|
|
300
320
|
id: "",
|
|
301
321
|
resizable: !0,
|
|
302
322
|
width: "32px",
|
|
@@ -315,46 +335,47 @@ const _ = class _ extends r.Component {
|
|
|
315
335
|
ariaColumnIndex: 0,
|
|
316
336
|
isAccessible: !0
|
|
317
337
|
};
|
|
318
|
-
let
|
|
338
|
+
let p = 0;
|
|
319
339
|
this.props.expandField && this.props.onExpandChange && this.props.detail && (e.unshift({
|
|
320
|
-
...
|
|
321
|
-
cell:
|
|
340
|
+
...l,
|
|
341
|
+
cell: et,
|
|
322
342
|
field: this.props.expandField,
|
|
323
343
|
headerClassName: "k-hierarchy-cell k-header"
|
|
324
|
-
}),
|
|
325
|
-
for (let
|
|
344
|
+
}), p++);
|
|
345
|
+
for (let n = 0; n < t; n++)
|
|
326
346
|
e.unshift({
|
|
327
|
-
...
|
|
347
|
+
...l,
|
|
328
348
|
isAccessible: !1,
|
|
329
|
-
cell:
|
|
349
|
+
cell: be,
|
|
330
350
|
field: "value",
|
|
331
351
|
locked: this.props.lockGroups
|
|
332
|
-
}),
|
|
333
|
-
e.slice(
|
|
334
|
-
}), this.getHeaderRow = S((e, t,
|
|
335
|
-
|
|
352
|
+
}), p++;
|
|
353
|
+
e.slice(p).forEach((n) => n.parentIndex >= 0 && (n.parentIndex += p));
|
|
354
|
+
}), this.getHeaderRow = S((e, t, s, l, p, n, d, m, R, k, z, C, A) => /* @__PURE__ */ r.createElement(
|
|
355
|
+
it,
|
|
336
356
|
{
|
|
337
357
|
cells: this.props.cells,
|
|
338
358
|
sort: e,
|
|
339
359
|
sortable: t,
|
|
340
360
|
sortChange: this.sortChange,
|
|
341
|
-
group:
|
|
342
|
-
groupable:
|
|
361
|
+
group: s || [],
|
|
362
|
+
groupable: l,
|
|
343
363
|
groupChange: this.groupChange,
|
|
344
|
-
filter:
|
|
345
|
-
filterable:
|
|
364
|
+
filter: p,
|
|
365
|
+
filterable: n,
|
|
346
366
|
filterOperators: d,
|
|
347
367
|
filterChange: this.filterChange,
|
|
348
368
|
columnMenu: R,
|
|
369
|
+
columnMenuIcon: k,
|
|
349
370
|
selectionChange: this.onHeaderSelectionChange,
|
|
350
|
-
columns:
|
|
371
|
+
columns: z,
|
|
351
372
|
columnResize: this.columnResize,
|
|
352
373
|
pressHandler: this.dragLogic.pressHandler,
|
|
353
374
|
dragHandler: this.dragLogic.dragHandler,
|
|
354
375
|
releaseHandler: this.dragLogic.releaseHandler,
|
|
355
|
-
columnsMap:
|
|
356
|
-
cellRender:
|
|
357
|
-
isRtl:
|
|
376
|
+
columnsMap: C,
|
|
377
|
+
cellRender: m,
|
|
378
|
+
isRtl: A,
|
|
358
379
|
dragClue: this.dragLogic.dragClueRef,
|
|
359
380
|
headerRef: this.headerElementRef,
|
|
360
381
|
containerRef: this.containerRef,
|
|
@@ -362,15 +383,15 @@ const _ = class _ extends r.Component {
|
|
|
362
383
|
columnGroupChange: this.columnGroupChange
|
|
363
384
|
}
|
|
364
385
|
)), this.resolveTitle = (e) => {
|
|
365
|
-
const t = this._columns.find((
|
|
366
|
-
return
|
|
367
|
-
}, this.getLeafDataItems = () => this._data.filter((e) => e.rowType === "data").map((e) => e.dataItem), Oe(Re), this.showLicenseWatermark =
|
|
368
|
-
const
|
|
369
|
-
this.vs = new c(
|
|
386
|
+
const t = this._columns.find((l) => l.field === e), s = t && (t.title || t.field);
|
|
387
|
+
return s === void 0 ? e : s;
|
|
388
|
+
}, this.getLeafDataItems = () => this._data.filter((e) => e.rowType === "data").map((e) => e.dataItem), this.getSlicedLeafDataItems = () => (this._slicedData || this._data).filter((e) => e.rowType === "data").map((e) => e.dataItem), Oe(Re), this.showLicenseWatermark = Ve(Re);
|
|
389
|
+
const h = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1, c = this.getVirtualScroll(a);
|
|
390
|
+
this.vs = new c(h || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new ut(
|
|
370
391
|
this.columnReorder.bind(this),
|
|
371
392
|
this.groupReorder.bind(this),
|
|
372
393
|
this.columnToGroup.bind(this)
|
|
373
|
-
), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new
|
|
394
|
+
), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new ct(this.onResize), this.props.clipboard && (this.clipboardService = new $e(this.onClipboard)), x.onConstructor({
|
|
374
395
|
navigatable: !!a.navigatable,
|
|
375
396
|
contextStateRef: this.contextStateRef,
|
|
376
397
|
navigationStateRef: this.navigationStateRef,
|
|
@@ -418,8 +439,8 @@ const _ = class _ extends r.Component {
|
|
|
418
439
|
*/
|
|
419
440
|
// tslint:enable:max-line-length
|
|
420
441
|
get columns() {
|
|
421
|
-
const a = this._columns.filter((
|
|
422
|
-
return
|
|
442
|
+
const a = this._columns.filter((h) => h.declarationIndex >= 0 && h.parentIndex === -1);
|
|
443
|
+
return mt(a);
|
|
423
444
|
}
|
|
424
445
|
/**
|
|
425
446
|
* Returns the HTML element of the Grid component.
|
|
@@ -428,7 +449,7 @@ const _ = class _ extends r.Component {
|
|
|
428
449
|
return this._element;
|
|
429
450
|
}
|
|
430
451
|
get document() {
|
|
431
|
-
if (
|
|
452
|
+
if (U)
|
|
432
453
|
return this.element && this.element.ownerDocument || document;
|
|
433
454
|
}
|
|
434
455
|
get _header() {
|
|
@@ -441,18 +462,18 @@ const _ = class _ extends r.Component {
|
|
|
441
462
|
* @hidden
|
|
442
463
|
*/
|
|
443
464
|
componentDidMount() {
|
|
444
|
-
this.resetTableWidth(),
|
|
445
|
-
const a =
|
|
465
|
+
this.props.columnVirtualization && !navigator.userAgent.match(xt) && (this.headTable && (this.headTable.style.display = "block"), this.tableElement && (this.tableElement.style.display = "block")), this.resetTableWidth(), ae();
|
|
466
|
+
const a = je(this.element);
|
|
446
467
|
this.isRtl = a, x.onComponentDidMount({
|
|
447
468
|
scope: this.element || void 0,
|
|
448
469
|
contextStateRef: this.contextStateRef,
|
|
449
470
|
navigationStateRef: this.navigationStateRef
|
|
450
471
|
}), this.isRtl && this.forceUpdate();
|
|
451
|
-
const
|
|
472
|
+
const h = {
|
|
452
473
|
rootMargin: "0px",
|
|
453
474
|
threshold: 0.9
|
|
454
475
|
};
|
|
455
|
-
this.clipboardService && this.clipboardService.addEventListeners(this.document), this.observer =
|
|
476
|
+
this.clipboardService && this.clipboardService.addEventListeners(this.document), this.observer = U && window.IntersectionObserver && new window.IntersectionObserver(this.handleIntersection, h) || null;
|
|
456
477
|
}
|
|
457
478
|
/**
|
|
458
479
|
* @hidden
|
|
@@ -468,11 +489,12 @@ const _ = class _ extends r.Component {
|
|
|
468
489
|
* @hidden
|
|
469
490
|
*/
|
|
470
491
|
componentDidUpdate() {
|
|
471
|
-
this.resetTableWidth(),
|
|
492
|
+
this.resetTableWidth(), ae(), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), x.onComponentDidUpdate({
|
|
472
493
|
scope: this.element || void 0,
|
|
473
494
|
contextStateRef: this.contextStateRef,
|
|
474
|
-
navigationStateRef: this.navigationStateRef
|
|
475
|
-
|
|
495
|
+
navigationStateRef: this.navigationStateRef,
|
|
496
|
+
focusFirst: this._focusFirst
|
|
497
|
+
}), this._focusFirst = !1;
|
|
476
498
|
}
|
|
477
499
|
/**
|
|
478
500
|
* @hidden
|
|
@@ -486,10 +508,10 @@ const _ = class _ extends r.Component {
|
|
|
486
508
|
render() {
|
|
487
509
|
var ie;
|
|
488
510
|
let a = this.props.total || 0;
|
|
489
|
-
const
|
|
511
|
+
const h = _.getIdPrefix(this.navigationStateRef), c = lt(this);
|
|
490
512
|
let e = [];
|
|
491
513
|
Array.isArray(this.props.data) ? (e = this.props.data, a = a || this.props.data.length) : this.props.data && (e = this.props.data.data, a = a || this.props.data.total);
|
|
492
|
-
const t = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", { resolvedGroupsCount:
|
|
514
|
+
const t = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", s = this.props.scrollable === "virtual", { resolvedGroupsCount: l, flattedData: p } = this.flatData(
|
|
493
515
|
e,
|
|
494
516
|
t,
|
|
495
517
|
this.props.skip || 0,
|
|
@@ -498,15 +520,15 @@ const _ = class _ extends r.Component {
|
|
|
498
520
|
this.props.filter,
|
|
499
521
|
this.props.sort
|
|
500
522
|
);
|
|
501
|
-
this._data =
|
|
502
|
-
const
|
|
503
|
-
this.columnResize.resizable = this.props.resizable || !1, this.dragLogic.reorderable = this.props.reorderable || !1, this.dragLogic.groupable =
|
|
504
|
-
const
|
|
505
|
-
this.initializeVirtualization(a,
|
|
506
|
-
const
|
|
507
|
-
this.initColumns(
|
|
508
|
-
const
|
|
509
|
-
|
|
523
|
+
this._data = p;
|
|
524
|
+
const n = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1;
|
|
525
|
+
this.columnResize.resizable = this.props.resizable || !1, this.dragLogic.reorderable = this.props.reorderable || !1, this.dragLogic.groupable = n;
|
|
526
|
+
const d = this.props.selectable && this.props.selectable.drag ? "none" : void 0;
|
|
527
|
+
this.initializeVirtualization(a, n);
|
|
528
|
+
const m = this.childrenToArray(this.props.children);
|
|
529
|
+
this.initColumns(m, l);
|
|
530
|
+
const R = m.map((i) => i && i.type && i.type.displayName === "KendoReactGridToolbar" ? r.cloneElement(i, { ...i.props, ariaControls: this._gridId }) : null), k = m.filter((i) => i && i.type && i.type.displayName === "KendoReactGridNoRecords"), z = m.filter((i) => i && i.type && i.type.displayName === "KendoReactGridStatusBar"), C = this._columns.filter((i) => i.children.length === 0), A = n && /* @__PURE__ */ r.createElement(
|
|
531
|
+
rt,
|
|
510
532
|
{
|
|
511
533
|
group: this.props.group || [],
|
|
512
534
|
groupChange: this.groupChange,
|
|
@@ -518,32 +540,33 @@ const _ = class _ extends r.Component {
|
|
|
518
540
|
ariaControls: this._gridId,
|
|
519
541
|
onContextMenu: this.onContextMenu
|
|
520
542
|
}
|
|
521
|
-
), { sort: ye, sortable: we, group: Se, filter:
|
|
522
|
-
|
|
543
|
+
), { sort: ye, sortable: we, group: Se, filter: Ie, filterable: ke, filterOperators: Ee = Ce, headerCellRender: xe, columnMenu: _e, columnMenuIcon: Te } = this.props, j = /* @__PURE__ */ r.createElement(
|
|
544
|
+
st,
|
|
523
545
|
{
|
|
524
546
|
size: this.props.size,
|
|
525
547
|
columnResize: this.columnResize,
|
|
526
548
|
staticHeaders: this.props.scrollable !== "none",
|
|
527
549
|
scrollableDataElement: () => this.vs.container,
|
|
528
|
-
draggable: this.props.reorderable ||
|
|
550
|
+
draggable: this.props.reorderable || n,
|
|
529
551
|
ref: this.headerRef,
|
|
530
552
|
elemRef: this.headerElementRef,
|
|
531
553
|
headerRow: this.getHeaderRow(
|
|
532
554
|
ye,
|
|
533
555
|
we,
|
|
534
556
|
Se,
|
|
535
|
-
|
|
536
|
-
ke,
|
|
557
|
+
n,
|
|
537
558
|
Ie,
|
|
559
|
+
ke,
|
|
538
560
|
Ee,
|
|
539
561
|
xe,
|
|
540
562
|
_e,
|
|
563
|
+
Te,
|
|
541
564
|
this._columns,
|
|
542
565
|
this._columnsMap,
|
|
543
566
|
this.isRtl
|
|
544
567
|
),
|
|
545
568
|
filterRow: this.props.filterable && /* @__PURE__ */ r.createElement(
|
|
546
|
-
|
|
569
|
+
ot,
|
|
547
570
|
{
|
|
548
571
|
cells: this.props.cells,
|
|
549
572
|
size: this.props.size,
|
|
@@ -557,139 +580,139 @@ const _ = class _ extends r.Component {
|
|
|
557
580
|
ariaRowIndex: this._columnsMap.length + 1
|
|
558
581
|
}
|
|
559
582
|
) || void 0,
|
|
560
|
-
cols:
|
|
583
|
+
cols: C.map((i, g) => /* @__PURE__ */ r.createElement(
|
|
561
584
|
"col",
|
|
562
585
|
{
|
|
563
586
|
key: g.toString(),
|
|
564
|
-
width:
|
|
587
|
+
width: B(i)
|
|
565
588
|
}
|
|
566
589
|
))
|
|
567
590
|
}
|
|
568
|
-
), ze = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, De = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns:
|
|
591
|
+
), ze = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, De = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns: Fe } = qe({
|
|
569
592
|
enabled: this.props.columnVirtualization,
|
|
570
|
-
columns:
|
|
593
|
+
columns: C,
|
|
571
594
|
tableViewPortWidth: De,
|
|
572
595
|
scrollLeft: ze
|
|
573
|
-
}), Le = (i, g,
|
|
596
|
+
}), Le = (i, g, f) => {
|
|
574
597
|
let E = !1;
|
|
575
|
-
const
|
|
598
|
+
const I = this.props.selectedField ? ve(this.props.selectedField, i.dataItem) : void 0;
|
|
576
599
|
return {
|
|
577
|
-
row:
|
|
578
|
-
if (
|
|
600
|
+
row: C.map((u, v) => {
|
|
601
|
+
if (Fe[v])
|
|
579
602
|
return null;
|
|
580
|
-
const
|
|
603
|
+
const H = u.id ? u.id : v, F = `${u.className ? u.className + " " : ""}${u.locked ? "k-grid-content-sticky" : ""}`, y = u.left !== void 0 ? this.isRtl ? { left: u.right, right: u.left } : { left: u.left, right: u.right } : {};
|
|
581
604
|
let w = !1;
|
|
582
605
|
if (u.editable && this.props.editField) {
|
|
583
|
-
const
|
|
584
|
-
|
|
606
|
+
const b = ve(this.props.editField, i.dataItem);
|
|
607
|
+
b && (b === !0 || b === u.field) && (E = !0, w = !0);
|
|
585
608
|
}
|
|
586
|
-
const
|
|
609
|
+
const V = u.cell || w && tt || Ct, L = this.props.expandField && this.props.detail && u.field === this.props.expandField;
|
|
587
610
|
return /* @__PURE__ */ r.createElement(
|
|
588
|
-
|
|
611
|
+
V,
|
|
589
612
|
{
|
|
590
613
|
onContextMenu: this.onContextMenu,
|
|
591
|
-
key:
|
|
614
|
+
key: H,
|
|
592
615
|
locked: this.props.lockGroups,
|
|
593
|
-
id:
|
|
594
|
-
`${g}-${String(
|
|
595
|
-
|
|
596
|
-
|
|
616
|
+
id: _.generateNavigatableId(
|
|
617
|
+
`${g}-${String(v)}`,
|
|
618
|
+
h,
|
|
619
|
+
L || i.rowType === "groupHeader" || i.rowType === "groupFooter" || u.field === "value" ? "nodata" : "cell"
|
|
597
620
|
),
|
|
598
|
-
colSpan: He[
|
|
621
|
+
colSpan: He[v],
|
|
599
622
|
dataItem: i.dataItem,
|
|
600
623
|
field: u.field,
|
|
601
624
|
editor: u.editor,
|
|
602
625
|
format: u.format,
|
|
603
|
-
className:
|
|
626
|
+
className: F,
|
|
604
627
|
render: this.props.cellRender,
|
|
605
|
-
cells:
|
|
628
|
+
cells: bt(this.props.cells, u.cells),
|
|
606
629
|
onChange: this.itemChange,
|
|
607
|
-
selectionChange: this.props.onSelectionChange ? (
|
|
608
|
-
this.selectionChange({ event:
|
|
630
|
+
selectionChange: this.props.onSelectionChange ? (b) => {
|
|
631
|
+
this.selectionChange({ event: b, dataItem: i.dataItem, dataIndex: f, columnIndex: v });
|
|
609
632
|
} : void 0,
|
|
610
|
-
columnIndex:
|
|
611
|
-
columnsCount:
|
|
633
|
+
columnIndex: v,
|
|
634
|
+
columnsCount: C.length,
|
|
612
635
|
rowType: i.rowType,
|
|
613
636
|
level: i.level,
|
|
614
637
|
expanded: i.expanded,
|
|
615
638
|
dataIndex: i.dataIndex,
|
|
616
639
|
style: y,
|
|
617
640
|
ariaColumnIndex: u.ariaColumnIndex,
|
|
618
|
-
isSelected: Array.isArray(
|
|
641
|
+
isSelected: Array.isArray(I) && I.indexOf(v) > -1
|
|
619
642
|
}
|
|
620
643
|
);
|
|
621
644
|
}),
|
|
622
645
|
isInEdit: E,
|
|
623
|
-
isSelected: typeof
|
|
646
|
+
isSelected: typeof I == "boolean" && I
|
|
624
647
|
};
|
|
625
648
|
};
|
|
626
|
-
let
|
|
627
|
-
if (
|
|
649
|
+
let q = 0;
|
|
650
|
+
if (s)
|
|
628
651
|
for (let i = 0; i < this.vs.topCacheCount + this.vs.attendedSkip - (this.props.skip || 0); i++) {
|
|
629
652
|
const g = this._data.shift();
|
|
630
653
|
if (g)
|
|
631
|
-
this._data.push(g),
|
|
654
|
+
this._data.push(g), q++, g.rowType === "groupHeader" && i--;
|
|
632
655
|
else
|
|
633
656
|
break;
|
|
634
657
|
}
|
|
635
|
-
const
|
|
636
|
-
let
|
|
637
|
-
const
|
|
658
|
+
const X = (i) => i >= this._data.length - q;
|
|
659
|
+
let Y = this.vs.realSkip || 0;
|
|
660
|
+
const M = [];
|
|
638
661
|
let K = !1;
|
|
639
662
|
const O = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
|
|
640
|
-
let
|
|
663
|
+
let D = 0;
|
|
641
664
|
if (this._data.length) {
|
|
642
665
|
let i = -1, g = 0;
|
|
643
|
-
(this._slicedData || this._data).forEach((
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
if (
|
|
647
|
-
|
|
666
|
+
(this._slicedData || this._data).forEach((f, E) => {
|
|
667
|
+
f.rowType === "data" && (Y++, i++);
|
|
668
|
+
const I = Y % 2 === 0, u = this.props.dataItemKey && Ue(this.props.dataItemKey)(f.dataItem), v = E + (this.vs.realSkip || 0), H = u || "ai" + v, F = H + "_1", y = Le(f, H, i);
|
|
669
|
+
if (D = v + O + g, M.push(/* @__PURE__ */ r.createElement(
|
|
670
|
+
Rt,
|
|
648
671
|
{
|
|
649
|
-
key:
|
|
650
|
-
dataItem:
|
|
651
|
-
isAltRow:
|
|
672
|
+
key: H,
|
|
673
|
+
dataItem: f.dataItem,
|
|
674
|
+
isAltRow: I,
|
|
652
675
|
isInEdit: y.isInEdit,
|
|
653
|
-
rowType:
|
|
654
|
-
isHidden:
|
|
655
|
-
onClick: (w) => this.rowClick(w,
|
|
656
|
-
onDoubleClick: (w) => this.rowDblClick(w,
|
|
676
|
+
rowType: f.rowType,
|
|
677
|
+
isHidden: X(E),
|
|
678
|
+
onClick: (w) => this.rowClick(w, f),
|
|
679
|
+
onDoubleClick: (w) => this.rowDblClick(w, f),
|
|
657
680
|
selectedField: this.props.selectedField,
|
|
658
681
|
rowHeight: this.props.rowHeight,
|
|
659
682
|
render: this.props.rowRender,
|
|
660
|
-
ariaRowIndex:
|
|
661
|
-
absoluteRowIndex:
|
|
662
|
-
dataIndex: this.vs.scrollableVirtual ?
|
|
683
|
+
ariaRowIndex: D,
|
|
684
|
+
absoluteRowIndex: v,
|
|
685
|
+
dataIndex: this.vs.scrollableVirtual ? v : i,
|
|
663
686
|
isSelected: y.isSelected
|
|
664
687
|
},
|
|
665
688
|
y.row
|
|
666
|
-
)), this.props.detail &&
|
|
667
|
-
const w =
|
|
668
|
-
g++,
|
|
689
|
+
)), this.props.detail && f.rowType === "data" && f.expanded) {
|
|
690
|
+
const w = C.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
|
|
691
|
+
g++, D = v + O + g, M.push(/* @__PURE__ */ r.createElement(
|
|
669
692
|
"tr",
|
|
670
693
|
{
|
|
671
|
-
key:
|
|
672
|
-
className:
|
|
694
|
+
key: F,
|
|
695
|
+
className: N(
|
|
673
696
|
"k-table-row",
|
|
674
|
-
|
|
697
|
+
I ? "k-detail-row k-table-alt-row k-alt" : "k-detail-row"
|
|
675
698
|
),
|
|
676
|
-
style: { visibility:
|
|
699
|
+
style: { visibility: X(E) ? "hidden" : "", height: this.props.detailRowHeight },
|
|
677
700
|
role: "row",
|
|
678
|
-
"aria-rowindex":
|
|
701
|
+
"aria-rowindex": D
|
|
679
702
|
},
|
|
680
|
-
this.props.group && this.props.group.map((
|
|
703
|
+
this.props.group && this.props.group.map((V, L) => {
|
|
681
704
|
var oe;
|
|
682
|
-
const
|
|
705
|
+
const b = (oe = y == null ? void 0 : y.row[L]) == null ? void 0 : oe.props.style, Ge = b ? this.isRtl ? { left: b.right, right: b.left } : { left: b.left, right: b.right } : {};
|
|
683
706
|
return /* @__PURE__ */ r.createElement(
|
|
684
|
-
|
|
707
|
+
be,
|
|
685
708
|
{
|
|
686
709
|
id: "",
|
|
687
|
-
dataIndex:
|
|
688
|
-
field:
|
|
689
|
-
dataItem:
|
|
690
|
-
key:
|
|
691
|
-
style:
|
|
692
|
-
ariaColumnIndex: 1 +
|
|
710
|
+
dataIndex: f.dataIndex,
|
|
711
|
+
field: V.field,
|
|
712
|
+
dataItem: f.dataItem,
|
|
713
|
+
key: L,
|
|
714
|
+
style: Ge,
|
|
715
|
+
ariaColumnIndex: 1 + L,
|
|
693
716
|
isSelected: !1,
|
|
694
717
|
locked: this.props.lockGroups,
|
|
695
718
|
isRtl: this.isRtl,
|
|
@@ -698,21 +721,21 @@ const _ = class _ extends r.Component {
|
|
|
698
721
|
);
|
|
699
722
|
}),
|
|
700
723
|
this.props.expandField && /* @__PURE__ */ r.createElement(
|
|
701
|
-
|
|
724
|
+
Et,
|
|
702
725
|
{
|
|
703
|
-
id:
|
|
726
|
+
id: _.generateNavigatableId(`${F}-dhcell`, h)
|
|
704
727
|
}
|
|
705
728
|
),
|
|
706
729
|
/* @__PURE__ */ r.createElement(
|
|
707
|
-
|
|
730
|
+
kt,
|
|
708
731
|
{
|
|
709
732
|
onContextMenu: this.onContextMenu,
|
|
710
|
-
dataItem:
|
|
711
|
-
dataIndex:
|
|
733
|
+
dataItem: f.dataItem,
|
|
734
|
+
dataIndex: f.dataIndex,
|
|
712
735
|
colSpan: w,
|
|
713
736
|
ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
|
|
714
737
|
detail: this.props.detail,
|
|
715
|
-
id:
|
|
738
|
+
id: _.generateNavigatableId(`${F}-dcell`, h)
|
|
716
739
|
}
|
|
717
740
|
)
|
|
718
741
|
));
|
|
@@ -720,76 +743,86 @@ const _ = class _ extends r.Component {
|
|
|
720
743
|
});
|
|
721
744
|
} else
|
|
722
745
|
K = !0;
|
|
723
|
-
const
|
|
746
|
+
const Ne = () => {
|
|
724
747
|
const i = this._header;
|
|
725
748
|
return i && i.table.clientWidth;
|
|
726
|
-
},
|
|
749
|
+
}, J = () => /* @__PURE__ */ r.createElement(
|
|
750
|
+
"div",
|
|
751
|
+
{
|
|
752
|
+
key: "no-records",
|
|
753
|
+
className: "k-grid-norecords",
|
|
754
|
+
"aria-rowindex": O,
|
|
755
|
+
style: { width: Ne() }
|
|
756
|
+
},
|
|
757
|
+
/* @__PURE__ */ r.createElement("div", { className: "k-grid-norecords-template", [Qe]: _.generateNavigatableId("no-records", h) }, k.length ? k : /* @__PURE__ */ r.createElement(wt, null))
|
|
758
|
+
), Q = {
|
|
727
759
|
size: this.props.size,
|
|
728
760
|
onPageChange: this.pagerPageChange,
|
|
729
761
|
total: a,
|
|
730
762
|
dir: this.isRtl ? "rtl" : void 0,
|
|
731
763
|
skip: this.vs.propsSkip || 0,
|
|
732
764
|
take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
|
|
733
|
-
messagesMap:
|
|
734
|
-
...
|
|
735
|
-
},
|
|
765
|
+
messagesMap: ht,
|
|
766
|
+
...It(this.props.pageable || {})
|
|
767
|
+
}, Z = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...Q }) : /* @__PURE__ */ r.createElement(Xe, { className: "k-grid-pager", ...Q }), Ae = (i) => this.props.sort && this.props.sort.filter((g) => g.field === i).length > 0, Me = (i, g) => /* @__PURE__ */ r.createElement(
|
|
736
768
|
"col",
|
|
737
769
|
{
|
|
738
770
|
key: g.toString(),
|
|
739
|
-
width:
|
|
771
|
+
width: B(i)
|
|
740
772
|
}
|
|
741
|
-
),
|
|
773
|
+
), ee = (ie = this.props.cells) != null && ie.footerCell || this._columns.some(
|
|
742
774
|
(i) => {
|
|
743
775
|
var g;
|
|
744
776
|
return !!(i.footerCell || (g = i.cells) != null && g.footerCell);
|
|
745
777
|
}
|
|
746
778
|
) ? /* @__PURE__ */ r.createElement(
|
|
747
|
-
|
|
779
|
+
at,
|
|
748
780
|
{
|
|
749
781
|
size: this.props.size,
|
|
750
782
|
columnResize: this.columnResize,
|
|
751
783
|
staticHeaders: this.props.scrollable !== "none",
|
|
752
784
|
ref: (i) => this._footer = i,
|
|
753
785
|
row: /* @__PURE__ */ r.createElement(
|
|
754
|
-
|
|
786
|
+
St,
|
|
755
787
|
{
|
|
756
788
|
cells: this.props.cells,
|
|
789
|
+
idPrefix: h,
|
|
757
790
|
columns: this._columns,
|
|
758
791
|
isRtl: this.isRtl,
|
|
759
|
-
ariaRowIndex:
|
|
792
|
+
ariaRowIndex: D + 1
|
|
760
793
|
}
|
|
761
794
|
),
|
|
762
|
-
cols:
|
|
795
|
+
cols: C.map(Me)
|
|
763
796
|
}
|
|
764
|
-
) : null,
|
|
797
|
+
) : null, te = /* @__PURE__ */ r.createElement(
|
|
765
798
|
"colgroup",
|
|
766
799
|
{
|
|
767
800
|
ref: (i) => {
|
|
768
801
|
this.columnResize.colGroupMain = i;
|
|
769
802
|
}
|
|
770
803
|
},
|
|
771
|
-
|
|
804
|
+
C.map(
|
|
772
805
|
(i, g) => /* @__PURE__ */ r.createElement(
|
|
773
806
|
"col",
|
|
774
807
|
{
|
|
775
808
|
key: g.toString(),
|
|
776
|
-
className:
|
|
777
|
-
width:
|
|
809
|
+
className: Ae(i.field) ? "k-sorted" : void 0,
|
|
810
|
+
width: B(i)
|
|
778
811
|
}
|
|
779
812
|
)
|
|
780
813
|
)
|
|
781
|
-
),
|
|
814
|
+
), se = this.dragLogic.reorderable || this.dragLogic.groupable;
|
|
782
815
|
if (this.props.scrollable === "none")
|
|
783
|
-
return /* @__PURE__ */ r.createElement(
|
|
816
|
+
return /* @__PURE__ */ r.createElement(W.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
784
817
|
"div",
|
|
785
818
|
{
|
|
786
819
|
id: this.props.id,
|
|
787
820
|
style: this.props.style,
|
|
788
|
-
className:
|
|
821
|
+
className: N(
|
|
789
822
|
"k-grid",
|
|
790
823
|
{
|
|
791
824
|
"k-grid-md": !this.props.size,
|
|
792
|
-
[`k-grid-${
|
|
825
|
+
[`k-grid-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
793
826
|
},
|
|
794
827
|
this.props.className
|
|
795
828
|
),
|
|
@@ -799,49 +832,50 @@ const _ = class _ extends r.Component {
|
|
|
799
832
|
"aria-label": this.props.ariaLabel,
|
|
800
833
|
onKeyDown: this.onKeyDown,
|
|
801
834
|
onFocus: this.onFocus,
|
|
802
|
-
...
|
|
835
|
+
...ne
|
|
803
836
|
},
|
|
804
|
-
|
|
805
|
-
|
|
837
|
+
R,
|
|
838
|
+
A,
|
|
806
839
|
/* @__PURE__ */ r.createElement(
|
|
807
|
-
|
|
840
|
+
he,
|
|
808
841
|
{
|
|
809
842
|
selectable: this.props.selectable,
|
|
810
843
|
onRelease: this.selectionRelease,
|
|
811
844
|
childRef: (i) => {
|
|
812
|
-
this.tableElement = i;
|
|
845
|
+
this.tableElement = i, this.headTable = i;
|
|
813
846
|
}
|
|
814
847
|
},
|
|
815
848
|
/* @__PURE__ */ r.createElement(
|
|
816
849
|
"table",
|
|
817
850
|
{
|
|
818
|
-
|
|
851
|
+
ref: (i) => this.headTable = i,
|
|
852
|
+
className: N(
|
|
819
853
|
"k-table k-grid-table",
|
|
820
|
-
{ [`k-table-${
|
|
854
|
+
{ [`k-table-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size }
|
|
821
855
|
),
|
|
822
|
-
style: { userSelect:
|
|
856
|
+
style: { userSelect: d }
|
|
823
857
|
},
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
/* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...
|
|
827
|
-
|
|
858
|
+
te,
|
|
859
|
+
j,
|
|
860
|
+
/* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...pe }, M),
|
|
861
|
+
ee
|
|
828
862
|
)
|
|
829
863
|
),
|
|
830
|
-
K &&
|
|
831
|
-
|
|
832
|
-
),
|
|
833
|
-
let
|
|
834
|
-
return
|
|
864
|
+
K && J(),
|
|
865
|
+
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue }))
|
|
866
|
+
), z, this.props.pageable && Z);
|
|
867
|
+
let G = this.props.style || {};
|
|
868
|
+
return s && (G.height || (G = Object.assign({}, G, { height: "450px" }))), /* @__PURE__ */ r.createElement(W.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
835
869
|
"div",
|
|
836
870
|
{
|
|
837
871
|
id: this.props.id,
|
|
838
|
-
style:
|
|
839
|
-
className:
|
|
872
|
+
style: G,
|
|
873
|
+
className: N(
|
|
840
874
|
"k-grid",
|
|
841
875
|
{
|
|
842
876
|
"k-grid-md": !this.props.size,
|
|
843
|
-
[`k-grid-${
|
|
844
|
-
"k-grid-virtual":
|
|
877
|
+
[`k-grid-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size,
|
|
878
|
+
"k-grid-virtual": s
|
|
845
879
|
},
|
|
846
880
|
this.props.className
|
|
847
881
|
),
|
|
@@ -851,21 +885,21 @@ const _ = class _ extends r.Component {
|
|
|
851
885
|
"aria-label": this.props.ariaLabel,
|
|
852
886
|
onKeyDown: this.onKeyDown,
|
|
853
887
|
onFocus: this.onFocus,
|
|
854
|
-
...
|
|
888
|
+
...ne
|
|
855
889
|
},
|
|
856
|
-
|
|
857
|
-
|
|
890
|
+
R,
|
|
891
|
+
A,
|
|
858
892
|
/* @__PURE__ */ r.createElement(
|
|
859
893
|
"div",
|
|
860
894
|
{
|
|
861
895
|
className: "k-grid-aria-root",
|
|
862
896
|
role: "grid",
|
|
863
|
-
"aria-colcount":
|
|
897
|
+
"aria-colcount": C.length,
|
|
864
898
|
"aria-rowcount": a,
|
|
865
899
|
id: this._gridId,
|
|
866
|
-
"aria-label": c.toLanguageString(
|
|
900
|
+
"aria-label": c.toLanguageString(ue, pt[ue])
|
|
867
901
|
},
|
|
868
|
-
|
|
902
|
+
j,
|
|
869
903
|
/* @__PURE__ */ r.createElement("div", { className: "k-grid-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
870
904
|
"div",
|
|
871
905
|
{
|
|
@@ -875,7 +909,7 @@ const _ = class _ extends r.Component {
|
|
|
875
909
|
role: "presentation"
|
|
876
910
|
},
|
|
877
911
|
/* @__PURE__ */ r.createElement("div", { className: "k-grid-table-wrap", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
878
|
-
|
|
912
|
+
he,
|
|
879
913
|
{
|
|
880
914
|
selectable: this.props.selectable,
|
|
881
915
|
onRelease: this.selectionRelease,
|
|
@@ -886,48 +920,49 @@ const _ = class _ extends r.Component {
|
|
|
886
920
|
/* @__PURE__ */ r.createElement(
|
|
887
921
|
"table",
|
|
888
922
|
{
|
|
889
|
-
|
|
923
|
+
ref: (i) => this.tableElement = i,
|
|
924
|
+
className: N(
|
|
890
925
|
"k-table k-grid-table",
|
|
891
926
|
{
|
|
892
927
|
"k-table-md": !this.props.size,
|
|
893
|
-
[`k-table-${
|
|
928
|
+
[`k-table-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
894
929
|
}
|
|
895
930
|
),
|
|
896
931
|
role: "presentation",
|
|
897
|
-
style: { userSelect:
|
|
932
|
+
style: { userSelect: d }
|
|
898
933
|
},
|
|
899
|
-
|
|
934
|
+
te,
|
|
900
935
|
/* @__PURE__ */ r.createElement(
|
|
901
936
|
"tbody",
|
|
902
937
|
{
|
|
903
938
|
className: "k-table-tbody",
|
|
904
939
|
ref: this.tableBodyRef,
|
|
905
940
|
role: "rowgroup",
|
|
906
|
-
...
|
|
941
|
+
...pe
|
|
907
942
|
},
|
|
908
|
-
|
|
943
|
+
M
|
|
909
944
|
)
|
|
910
945
|
)
|
|
911
|
-
), K &&
|
|
912
|
-
/* @__PURE__ */ r.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
946
|
+
), K && J()),
|
|
947
|
+
s && /* @__PURE__ */ r.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
913
948
|
"div",
|
|
914
949
|
{
|
|
915
|
-
style:
|
|
950
|
+
style: s ? { height: this.vs.containerHeight + "px" } : {}
|
|
916
951
|
}
|
|
917
952
|
))
|
|
918
953
|
)),
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
this.showLicenseWatermark && /* @__PURE__ */ r.createElement(
|
|
954
|
+
ee,
|
|
955
|
+
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue })),
|
|
956
|
+
this.showLicenseWatermark && /* @__PURE__ */ r.createElement(We, null)
|
|
922
957
|
),
|
|
923
|
-
|
|
924
|
-
this.props.pageable &&
|
|
958
|
+
z,
|
|
959
|
+
this.props.pageable && Z
|
|
925
960
|
));
|
|
926
961
|
}
|
|
927
962
|
selectionChange(a) {
|
|
928
963
|
if (this.props.onSelectionChange) {
|
|
929
|
-
const { event:
|
|
930
|
-
...this.getArguments(
|
|
964
|
+
const { event: h, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: s, cell: l } = le(this.props.selectable), p = {
|
|
965
|
+
...this.getArguments(h.syntheticEvent),
|
|
931
966
|
dataItem: c,
|
|
932
967
|
startColIndex: t,
|
|
933
968
|
endColIndex: t,
|
|
@@ -938,22 +973,22 @@ const _ = class _ extends r.Component {
|
|
|
938
973
|
ctrlKey: !1,
|
|
939
974
|
shiftKey: !1,
|
|
940
975
|
metaKey: !1,
|
|
941
|
-
mode:
|
|
942
|
-
cell:
|
|
976
|
+
mode: s,
|
|
977
|
+
cell: l,
|
|
943
978
|
isDrag: !1,
|
|
944
979
|
componentId: this._gridId,
|
|
945
980
|
selectedField: this.props.selectedField || ""
|
|
946
981
|
};
|
|
947
|
-
this.props.onSelectionChange.call(void 0,
|
|
982
|
+
this.props.onSelectionChange.call(void 0, p);
|
|
948
983
|
}
|
|
949
984
|
}
|
|
950
|
-
raiseDataEvent(a,
|
|
951
|
-
const
|
|
985
|
+
raiseDataEvent(a, h, c, e, t) {
|
|
986
|
+
const s = this.props.onDataStateChange;
|
|
952
987
|
if (a) {
|
|
953
|
-
const
|
|
954
|
-
a.call(void 0,
|
|
988
|
+
const l = { ...this.getArguments(e), ...h, targetEvent: t };
|
|
989
|
+
a.call(void 0, l);
|
|
955
990
|
} else
|
|
956
|
-
|
|
991
|
+
s && s.call(
|
|
957
992
|
void 0,
|
|
958
993
|
{
|
|
959
994
|
...this.getArguments(e),
|
|
@@ -965,60 +1000,60 @@ const _ = class _ extends r.Component {
|
|
|
965
1000
|
}
|
|
966
1001
|
);
|
|
967
1002
|
}
|
|
968
|
-
columnReorder(a,
|
|
969
|
-
const e = this._columns[a], t = e.depth,
|
|
1003
|
+
columnReorder(a, h, c) {
|
|
1004
|
+
const e = this._columns[a], t = e.depth, s = (d) => {
|
|
970
1005
|
do
|
|
971
1006
|
d++;
|
|
972
1007
|
while (d < this._columns.length && this._columns[d].depth > t);
|
|
973
1008
|
return d;
|
|
974
|
-
},
|
|
975
|
-
this._columns.splice(a <
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
const
|
|
1009
|
+
}, l = this._columns.splice(a, s(a) - a);
|
|
1010
|
+
this._columns.splice(a < h ? s(h - l.length) : h, 0, ...l), this._columns.filter((d) => d.declarationIndex >= 0).forEach((d, m) => d.orderIndex = m), this._columnsMutations++;
|
|
1011
|
+
const p = this._columns[a].locked && this._columns[h].locked;
|
|
1012
|
+
Ye(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), Je(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
|
|
1013
|
+
const n = this.columns;
|
|
979
1014
|
if (this.forceUpdate(), this.props.onColumnReorder) {
|
|
980
1015
|
const d = {
|
|
981
1016
|
target: this,
|
|
982
|
-
columns:
|
|
1017
|
+
columns: n,
|
|
983
1018
|
columnId: e.id,
|
|
984
1019
|
nativeEvent: c
|
|
985
1020
|
};
|
|
986
1021
|
this.props.onColumnReorder.call(void 0, d);
|
|
987
1022
|
}
|
|
988
1023
|
}
|
|
989
|
-
groupReorder(a,
|
|
1024
|
+
groupReorder(a, h, c) {
|
|
990
1025
|
if (this.props.group === void 0)
|
|
991
1026
|
return;
|
|
992
1027
|
const e = this.props.group.slice();
|
|
993
|
-
e.splice(
|
|
1028
|
+
e.splice(h, 0, ...e.splice(a, 1)), this.groupChange(e, c);
|
|
994
1029
|
}
|
|
995
|
-
columnToGroup(a,
|
|
1030
|
+
columnToGroup(a, h, c) {
|
|
996
1031
|
const e = this._columns[a].field;
|
|
997
1032
|
if (!e)
|
|
998
1033
|
return;
|
|
999
1034
|
const t = (this.props.group || []).slice();
|
|
1000
|
-
t.splice(
|
|
1035
|
+
t.splice(h, 0, { field: e }), this.groupChange(t, c);
|
|
1001
1036
|
}
|
|
1002
|
-
columnGroupChange(a,
|
|
1037
|
+
columnGroupChange(a, h) {
|
|
1003
1038
|
const c = this.dragLogic.getCurrentGroupsLength;
|
|
1004
|
-
this.columnToGroup(a, c,
|
|
1039
|
+
this.columnToGroup(a, c, h);
|
|
1005
1040
|
}
|
|
1006
1041
|
resetTableWidth() {
|
|
1007
1042
|
let a = 0;
|
|
1008
1043
|
if (!this.columnResize.colGroupMain)
|
|
1009
1044
|
return;
|
|
1010
|
-
const
|
|
1011
|
-
for (let c = 0; c <
|
|
1012
|
-
const e =
|
|
1045
|
+
const h = this.columnResize.colGroupMain.children;
|
|
1046
|
+
for (let c = 0; c < h.length; c++) {
|
|
1047
|
+
const e = h[c].width;
|
|
1013
1048
|
if (!e)
|
|
1014
1049
|
return;
|
|
1015
1050
|
a += parseFloat(e.toString());
|
|
1016
1051
|
}
|
|
1017
1052
|
a = Math.round(a), this._header && this._header.setWidth(a), this._footer && this._footer.setWidth(a), this.tableElement && (this.tableElement.style.width = a + "px");
|
|
1018
1053
|
}
|
|
1019
|
-
initColumns(a,
|
|
1020
|
-
const c =
|
|
1021
|
-
this._columns = e, this._columns.length === 0 && (this._columns =
|
|
1054
|
+
initColumns(a, h) {
|
|
1055
|
+
const c = _.getIdPrefix(this.navigationStateRef), e = this.readColumns(a, c, this._columnsMutations), t = e.length !== this._columns.length;
|
|
1056
|
+
this._columns = e, this._columns.length === 0 && (this._columns = vt(this.props.data, this.props.group, this.props.expandField, { prevId: 0, idPrefix: c })), this.configureColumns(this._columns, h, c), this._columnsMap = this.mapColumns(this._columns, t), this.columnResize.columns = this._columns, this.dragLogic.columns = this._columns;
|
|
1022
1057
|
}
|
|
1023
1058
|
getDataState() {
|
|
1024
1059
|
return {
|
|
@@ -1037,87 +1072,87 @@ const _ = class _ extends r.Component {
|
|
|
1037
1072
|
};
|
|
1038
1073
|
}
|
|
1039
1074
|
};
|
|
1040
|
-
|
|
1075
|
+
T.displayName = "KendoReactGrid", T.defaultProps = {
|
|
1041
1076
|
// never use this
|
|
1042
|
-
},
|
|
1043
|
-
data:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
data:
|
|
1047
|
-
total:
|
|
1077
|
+
}, T.propTypes = {
|
|
1078
|
+
data: o.oneOfType([
|
|
1079
|
+
o.array,
|
|
1080
|
+
o.shape({
|
|
1081
|
+
data: o.array,
|
|
1082
|
+
total: o.number
|
|
1048
1083
|
})
|
|
1049
1084
|
]),
|
|
1050
|
-
sortable:
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
mode:
|
|
1054
|
-
allowUnsort:
|
|
1085
|
+
sortable: o.oneOfType([
|
|
1086
|
+
o.bool,
|
|
1087
|
+
o.shape({
|
|
1088
|
+
mode: o.oneOf(["single", "multiple"]),
|
|
1089
|
+
allowUnsort: o.bool
|
|
1055
1090
|
})
|
|
1056
1091
|
]),
|
|
1057
|
-
onSortChange:
|
|
1058
|
-
sort:
|
|
1059
|
-
filterable:
|
|
1060
|
-
filter:
|
|
1061
|
-
onFilterChange:
|
|
1062
|
-
pageable:
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
buttonCount:
|
|
1066
|
-
responsive:
|
|
1067
|
-
info:
|
|
1068
|
-
type:
|
|
1069
|
-
pageSizes:
|
|
1092
|
+
onSortChange: o.func,
|
|
1093
|
+
sort: o.array,
|
|
1094
|
+
filterable: o.bool,
|
|
1095
|
+
filter: o.any,
|
|
1096
|
+
onFilterChange: o.func,
|
|
1097
|
+
pageable: o.oneOfType([
|
|
1098
|
+
o.bool,
|
|
1099
|
+
o.shape({
|
|
1100
|
+
buttonCount: o.number,
|
|
1101
|
+
responsive: o.bool,
|
|
1102
|
+
info: o.bool,
|
|
1103
|
+
type: o.oneOf(["numeric", "input"]),
|
|
1104
|
+
pageSizes: o.oneOfType(
|
|
1070
1105
|
[
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1106
|
+
o.bool,
|
|
1107
|
+
o.arrayOf(o.oneOfType([
|
|
1108
|
+
o.string,
|
|
1109
|
+
o.number
|
|
1075
1110
|
]))
|
|
1076
1111
|
]
|
|
1077
1112
|
),
|
|
1078
|
-
previousNext:
|
|
1113
|
+
previousNext: o.bool
|
|
1079
1114
|
})
|
|
1080
1115
|
]),
|
|
1081
|
-
pageSize:
|
|
1082
|
-
onPageChange:
|
|
1083
|
-
total:
|
|
1084
|
-
skip:
|
|
1085
|
-
take:
|
|
1086
|
-
fixedScroll:
|
|
1087
|
-
onExpandChange:
|
|
1088
|
-
expandField:
|
|
1089
|
-
selectedField:
|
|
1090
|
-
onSelectionChange:
|
|
1091
|
-
onHeaderSelectionChange:
|
|
1092
|
-
resizable:
|
|
1093
|
-
reorderable:
|
|
1094
|
-
group:
|
|
1095
|
-
groupable:
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
enabled:
|
|
1099
|
-
footer:
|
|
1116
|
+
pageSize: o.number,
|
|
1117
|
+
onPageChange: o.func,
|
|
1118
|
+
total: o.number,
|
|
1119
|
+
skip: o.number,
|
|
1120
|
+
take: o.number,
|
|
1121
|
+
fixedScroll: o.bool,
|
|
1122
|
+
onExpandChange: o.func,
|
|
1123
|
+
expandField: o.string,
|
|
1124
|
+
selectedField: o.string,
|
|
1125
|
+
onSelectionChange: o.func,
|
|
1126
|
+
onHeaderSelectionChange: o.func,
|
|
1127
|
+
resizable: o.bool,
|
|
1128
|
+
reorderable: o.bool,
|
|
1129
|
+
group: o.any,
|
|
1130
|
+
groupable: o.oneOfType([
|
|
1131
|
+
o.bool,
|
|
1132
|
+
o.shape({
|
|
1133
|
+
enabled: o.bool,
|
|
1134
|
+
footer: o.oneOf(["always", "visible", "none"])
|
|
1100
1135
|
})
|
|
1101
1136
|
]),
|
|
1102
|
-
onGroupChange:
|
|
1103
|
-
onRowClick:
|
|
1104
|
-
onRowDoubleClick:
|
|
1105
|
-
onItemChange:
|
|
1106
|
-
editField:
|
|
1107
|
-
scrollable:
|
|
1108
|
-
rowHeight:
|
|
1109
|
-
detailRowHeight:
|
|
1110
|
-
detail:
|
|
1111
|
-
style:
|
|
1112
|
-
onDataStateChange:
|
|
1113
|
-
onColumnResize:
|
|
1114
|
-
onColumnReorder:
|
|
1115
|
-
dataItemKey:
|
|
1116
|
-
navigatable:
|
|
1117
|
-
size:
|
|
1118
|
-
},
|
|
1119
|
-
let
|
|
1120
|
-
|
|
1137
|
+
onGroupChange: o.func,
|
|
1138
|
+
onRowClick: o.func,
|
|
1139
|
+
onRowDoubleClick: o.func,
|
|
1140
|
+
onItemChange: o.func,
|
|
1141
|
+
editField: o.string,
|
|
1142
|
+
scrollable: o.oneOf(["none", "scrollable", "virtual"]),
|
|
1143
|
+
rowHeight: o.number,
|
|
1144
|
+
detailRowHeight: o.number,
|
|
1145
|
+
detail: o.any,
|
|
1146
|
+
style: o.object,
|
|
1147
|
+
onDataStateChange: o.func,
|
|
1148
|
+
onColumnResize: o.func,
|
|
1149
|
+
onColumnReorder: o.func,
|
|
1150
|
+
dataItemKey: o.string,
|
|
1151
|
+
navigatable: o.bool,
|
|
1152
|
+
size: o.oneOf(["small", "medium"])
|
|
1153
|
+
}, T.contextType = W;
|
|
1154
|
+
let $ = T;
|
|
1155
|
+
nt($);
|
|
1121
1156
|
export {
|
|
1122
|
-
|
|
1157
|
+
$ as Grid
|
|
1123
1158
|
};
|