@progress/kendo-react-grid 7.5.0-develop.2 → 7.5.0-develop.21
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 +412 -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 +45 -59
- package/index.d.ts +45 -59
- package/package-metadata.mjs +1 -1
- package/package.json +12 -12
- package/paging/GridPagerSettings.js +1 -1
- package/paging/GridPagerSettings.mjs +14 -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,87 @@ 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
|
+
navigatable: this.props.navigatable,
|
|
767
|
+
...It(this.props.pageable || {})
|
|
768
|
+
}, 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
769
|
"col",
|
|
737
770
|
{
|
|
738
771
|
key: g.toString(),
|
|
739
|
-
width:
|
|
772
|
+
width: B(i)
|
|
740
773
|
}
|
|
741
|
-
),
|
|
774
|
+
), ee = (ie = this.props.cells) != null && ie.footerCell || this._columns.some(
|
|
742
775
|
(i) => {
|
|
743
776
|
var g;
|
|
744
777
|
return !!(i.footerCell || (g = i.cells) != null && g.footerCell);
|
|
745
778
|
}
|
|
746
779
|
) ? /* @__PURE__ */ r.createElement(
|
|
747
|
-
|
|
780
|
+
at,
|
|
748
781
|
{
|
|
749
782
|
size: this.props.size,
|
|
750
783
|
columnResize: this.columnResize,
|
|
751
784
|
staticHeaders: this.props.scrollable !== "none",
|
|
752
785
|
ref: (i) => this._footer = i,
|
|
753
786
|
row: /* @__PURE__ */ r.createElement(
|
|
754
|
-
|
|
787
|
+
St,
|
|
755
788
|
{
|
|
756
789
|
cells: this.props.cells,
|
|
790
|
+
idPrefix: h,
|
|
757
791
|
columns: this._columns,
|
|
758
792
|
isRtl: this.isRtl,
|
|
759
|
-
ariaRowIndex:
|
|
793
|
+
ariaRowIndex: D + 1
|
|
760
794
|
}
|
|
761
795
|
),
|
|
762
|
-
cols:
|
|
796
|
+
cols: C.map(Me)
|
|
763
797
|
}
|
|
764
|
-
) : null,
|
|
798
|
+
) : null, te = /* @__PURE__ */ r.createElement(
|
|
765
799
|
"colgroup",
|
|
766
800
|
{
|
|
767
801
|
ref: (i) => {
|
|
768
802
|
this.columnResize.colGroupMain = i;
|
|
769
803
|
}
|
|
770
804
|
},
|
|
771
|
-
|
|
805
|
+
C.map(
|
|
772
806
|
(i, g) => /* @__PURE__ */ r.createElement(
|
|
773
807
|
"col",
|
|
774
808
|
{
|
|
775
809
|
key: g.toString(),
|
|
776
|
-
className:
|
|
777
|
-
width:
|
|
810
|
+
className: Ae(i.field) ? "k-sorted" : void 0,
|
|
811
|
+
width: B(i)
|
|
778
812
|
}
|
|
779
813
|
)
|
|
780
814
|
)
|
|
781
|
-
),
|
|
815
|
+
), se = this.dragLogic.reorderable || this.dragLogic.groupable;
|
|
782
816
|
if (this.props.scrollable === "none")
|
|
783
|
-
return /* @__PURE__ */ r.createElement(
|
|
817
|
+
return /* @__PURE__ */ r.createElement(W.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
784
818
|
"div",
|
|
785
819
|
{
|
|
786
820
|
id: this.props.id,
|
|
787
821
|
style: this.props.style,
|
|
788
|
-
className:
|
|
822
|
+
className: N(
|
|
789
823
|
"k-grid",
|
|
790
824
|
{
|
|
791
825
|
"k-grid-md": !this.props.size,
|
|
792
|
-
[`k-grid-${
|
|
826
|
+
[`k-grid-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
793
827
|
},
|
|
794
828
|
this.props.className
|
|
795
829
|
),
|
|
@@ -799,49 +833,50 @@ const _ = class _ extends r.Component {
|
|
|
799
833
|
"aria-label": this.props.ariaLabel,
|
|
800
834
|
onKeyDown: this.onKeyDown,
|
|
801
835
|
onFocus: this.onFocus,
|
|
802
|
-
...
|
|
836
|
+
...ne
|
|
803
837
|
},
|
|
804
|
-
|
|
805
|
-
|
|
838
|
+
R,
|
|
839
|
+
A,
|
|
806
840
|
/* @__PURE__ */ r.createElement(
|
|
807
|
-
|
|
841
|
+
he,
|
|
808
842
|
{
|
|
809
843
|
selectable: this.props.selectable,
|
|
810
844
|
onRelease: this.selectionRelease,
|
|
811
845
|
childRef: (i) => {
|
|
812
|
-
this.tableElement = i;
|
|
846
|
+
this.tableElement = i, this.headTable = i;
|
|
813
847
|
}
|
|
814
848
|
},
|
|
815
849
|
/* @__PURE__ */ r.createElement(
|
|
816
850
|
"table",
|
|
817
851
|
{
|
|
818
|
-
|
|
852
|
+
ref: (i) => this.headTable = i,
|
|
853
|
+
className: N(
|
|
819
854
|
"k-table k-grid-table",
|
|
820
|
-
{ [`k-table-${
|
|
855
|
+
{ [`k-table-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size }
|
|
821
856
|
),
|
|
822
|
-
style: { userSelect:
|
|
857
|
+
style: { userSelect: d }
|
|
823
858
|
},
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
/* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...
|
|
827
|
-
|
|
859
|
+
te,
|
|
860
|
+
j,
|
|
861
|
+
/* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...pe }, M),
|
|
862
|
+
ee
|
|
828
863
|
)
|
|
829
864
|
),
|
|
830
|
-
K &&
|
|
831
|
-
|
|
832
|
-
),
|
|
833
|
-
let
|
|
834
|
-
return
|
|
865
|
+
K && J(),
|
|
866
|
+
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue }))
|
|
867
|
+
), z, this.props.pageable && Z);
|
|
868
|
+
let G = this.props.style || {};
|
|
869
|
+
return s && (G.height || (G = Object.assign({}, G, { height: "450px" }))), /* @__PURE__ */ r.createElement(W.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
835
870
|
"div",
|
|
836
871
|
{
|
|
837
872
|
id: this.props.id,
|
|
838
|
-
style:
|
|
839
|
-
className:
|
|
873
|
+
style: G,
|
|
874
|
+
className: N(
|
|
840
875
|
"k-grid",
|
|
841
876
|
{
|
|
842
877
|
"k-grid-md": !this.props.size,
|
|
843
|
-
[`k-grid-${
|
|
844
|
-
"k-grid-virtual":
|
|
878
|
+
[`k-grid-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size,
|
|
879
|
+
"k-grid-virtual": s
|
|
845
880
|
},
|
|
846
881
|
this.props.className
|
|
847
882
|
),
|
|
@@ -851,21 +886,21 @@ const _ = class _ extends r.Component {
|
|
|
851
886
|
"aria-label": this.props.ariaLabel,
|
|
852
887
|
onKeyDown: this.onKeyDown,
|
|
853
888
|
onFocus: this.onFocus,
|
|
854
|
-
...
|
|
889
|
+
...ne
|
|
855
890
|
},
|
|
856
|
-
|
|
857
|
-
|
|
891
|
+
R,
|
|
892
|
+
A,
|
|
858
893
|
/* @__PURE__ */ r.createElement(
|
|
859
894
|
"div",
|
|
860
895
|
{
|
|
861
896
|
className: "k-grid-aria-root",
|
|
862
897
|
role: "grid",
|
|
863
|
-
"aria-colcount":
|
|
898
|
+
"aria-colcount": C.length,
|
|
864
899
|
"aria-rowcount": a,
|
|
865
900
|
id: this._gridId,
|
|
866
|
-
"aria-label": c.toLanguageString(
|
|
901
|
+
"aria-label": c.toLanguageString(ue, pt[ue])
|
|
867
902
|
},
|
|
868
|
-
|
|
903
|
+
j,
|
|
869
904
|
/* @__PURE__ */ r.createElement("div", { className: "k-grid-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
870
905
|
"div",
|
|
871
906
|
{
|
|
@@ -875,7 +910,7 @@ const _ = class _ extends r.Component {
|
|
|
875
910
|
role: "presentation"
|
|
876
911
|
},
|
|
877
912
|
/* @__PURE__ */ r.createElement("div", { className: "k-grid-table-wrap", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
878
|
-
|
|
913
|
+
he,
|
|
879
914
|
{
|
|
880
915
|
selectable: this.props.selectable,
|
|
881
916
|
onRelease: this.selectionRelease,
|
|
@@ -886,48 +921,49 @@ const _ = class _ extends r.Component {
|
|
|
886
921
|
/* @__PURE__ */ r.createElement(
|
|
887
922
|
"table",
|
|
888
923
|
{
|
|
889
|
-
|
|
924
|
+
ref: (i) => this.tableElement = i,
|
|
925
|
+
className: N(
|
|
890
926
|
"k-table k-grid-table",
|
|
891
927
|
{
|
|
892
928
|
"k-table-md": !this.props.size,
|
|
893
|
-
[`k-table-${
|
|
929
|
+
[`k-table-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
894
930
|
}
|
|
895
931
|
),
|
|
896
932
|
role: "presentation",
|
|
897
|
-
style: { userSelect:
|
|
933
|
+
style: { userSelect: d }
|
|
898
934
|
},
|
|
899
|
-
|
|
935
|
+
te,
|
|
900
936
|
/* @__PURE__ */ r.createElement(
|
|
901
937
|
"tbody",
|
|
902
938
|
{
|
|
903
939
|
className: "k-table-tbody",
|
|
904
940
|
ref: this.tableBodyRef,
|
|
905
941
|
role: "rowgroup",
|
|
906
|
-
...
|
|
942
|
+
...pe
|
|
907
943
|
},
|
|
908
|
-
|
|
944
|
+
M
|
|
909
945
|
)
|
|
910
946
|
)
|
|
911
|
-
), K &&
|
|
912
|
-
/* @__PURE__ */ r.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
947
|
+
), K && J()),
|
|
948
|
+
s && /* @__PURE__ */ r.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
913
949
|
"div",
|
|
914
950
|
{
|
|
915
|
-
style:
|
|
951
|
+
style: s ? { height: this.vs.containerHeight + "px" } : {}
|
|
916
952
|
}
|
|
917
953
|
))
|
|
918
954
|
)),
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
this.showLicenseWatermark && /* @__PURE__ */ r.createElement(
|
|
955
|
+
ee,
|
|
956
|
+
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue })),
|
|
957
|
+
this.showLicenseWatermark && /* @__PURE__ */ r.createElement(We, null)
|
|
922
958
|
),
|
|
923
|
-
|
|
924
|
-
this.props.pageable &&
|
|
959
|
+
z,
|
|
960
|
+
this.props.pageable && Z
|
|
925
961
|
));
|
|
926
962
|
}
|
|
927
963
|
selectionChange(a) {
|
|
928
964
|
if (this.props.onSelectionChange) {
|
|
929
|
-
const { event:
|
|
930
|
-
...this.getArguments(
|
|
965
|
+
const { event: h, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: s, cell: l } = le(this.props.selectable), p = {
|
|
966
|
+
...this.getArguments(h.syntheticEvent),
|
|
931
967
|
dataItem: c,
|
|
932
968
|
startColIndex: t,
|
|
933
969
|
endColIndex: t,
|
|
@@ -938,22 +974,22 @@ const _ = class _ extends r.Component {
|
|
|
938
974
|
ctrlKey: !1,
|
|
939
975
|
shiftKey: !1,
|
|
940
976
|
metaKey: !1,
|
|
941
|
-
mode:
|
|
942
|
-
cell:
|
|
977
|
+
mode: s,
|
|
978
|
+
cell: l,
|
|
943
979
|
isDrag: !1,
|
|
944
980
|
componentId: this._gridId,
|
|
945
981
|
selectedField: this.props.selectedField || ""
|
|
946
982
|
};
|
|
947
|
-
this.props.onSelectionChange.call(void 0,
|
|
983
|
+
this.props.onSelectionChange.call(void 0, p);
|
|
948
984
|
}
|
|
949
985
|
}
|
|
950
|
-
raiseDataEvent(a,
|
|
951
|
-
const
|
|
986
|
+
raiseDataEvent(a, h, c, e, t) {
|
|
987
|
+
const s = this.props.onDataStateChange;
|
|
952
988
|
if (a) {
|
|
953
|
-
const
|
|
954
|
-
a.call(void 0,
|
|
989
|
+
const l = { ...this.getArguments(e), ...h, targetEvent: t };
|
|
990
|
+
a.call(void 0, l);
|
|
955
991
|
} else
|
|
956
|
-
|
|
992
|
+
s && s.call(
|
|
957
993
|
void 0,
|
|
958
994
|
{
|
|
959
995
|
...this.getArguments(e),
|
|
@@ -965,60 +1001,60 @@ const _ = class _ extends r.Component {
|
|
|
965
1001
|
}
|
|
966
1002
|
);
|
|
967
1003
|
}
|
|
968
|
-
columnReorder(a,
|
|
969
|
-
const e = this._columns[a], t = e.depth,
|
|
1004
|
+
columnReorder(a, h, c) {
|
|
1005
|
+
const e = this._columns[a], t = e.depth, s = (d) => {
|
|
970
1006
|
do
|
|
971
1007
|
d++;
|
|
972
1008
|
while (d < this._columns.length && this._columns[d].depth > t);
|
|
973
1009
|
return d;
|
|
974
|
-
},
|
|
975
|
-
this._columns.splice(a <
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
const
|
|
1010
|
+
}, l = this._columns.splice(a, s(a) - a);
|
|
1011
|
+
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++;
|
|
1012
|
+
const p = this._columns[a].locked && this._columns[h].locked;
|
|
1013
|
+
Ye(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), Je(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
|
|
1014
|
+
const n = this.columns;
|
|
979
1015
|
if (this.forceUpdate(), this.props.onColumnReorder) {
|
|
980
1016
|
const d = {
|
|
981
1017
|
target: this,
|
|
982
|
-
columns:
|
|
1018
|
+
columns: n,
|
|
983
1019
|
columnId: e.id,
|
|
984
1020
|
nativeEvent: c
|
|
985
1021
|
};
|
|
986
1022
|
this.props.onColumnReorder.call(void 0, d);
|
|
987
1023
|
}
|
|
988
1024
|
}
|
|
989
|
-
groupReorder(a,
|
|
1025
|
+
groupReorder(a, h, c) {
|
|
990
1026
|
if (this.props.group === void 0)
|
|
991
1027
|
return;
|
|
992
1028
|
const e = this.props.group.slice();
|
|
993
|
-
e.splice(
|
|
1029
|
+
e.splice(h, 0, ...e.splice(a, 1)), this.groupChange(e, c);
|
|
994
1030
|
}
|
|
995
|
-
columnToGroup(a,
|
|
1031
|
+
columnToGroup(a, h, c) {
|
|
996
1032
|
const e = this._columns[a].field;
|
|
997
1033
|
if (!e)
|
|
998
1034
|
return;
|
|
999
1035
|
const t = (this.props.group || []).slice();
|
|
1000
|
-
t.splice(
|
|
1036
|
+
t.splice(h, 0, { field: e }), this.groupChange(t, c);
|
|
1001
1037
|
}
|
|
1002
|
-
columnGroupChange(a,
|
|
1038
|
+
columnGroupChange(a, h) {
|
|
1003
1039
|
const c = this.dragLogic.getCurrentGroupsLength;
|
|
1004
|
-
this.columnToGroup(a, c,
|
|
1040
|
+
this.columnToGroup(a, c, h);
|
|
1005
1041
|
}
|
|
1006
1042
|
resetTableWidth() {
|
|
1007
1043
|
let a = 0;
|
|
1008
1044
|
if (!this.columnResize.colGroupMain)
|
|
1009
1045
|
return;
|
|
1010
|
-
const
|
|
1011
|
-
for (let c = 0; c <
|
|
1012
|
-
const e =
|
|
1046
|
+
const h = this.columnResize.colGroupMain.children;
|
|
1047
|
+
for (let c = 0; c < h.length; c++) {
|
|
1048
|
+
const e = h[c].width;
|
|
1013
1049
|
if (!e)
|
|
1014
1050
|
return;
|
|
1015
1051
|
a += parseFloat(e.toString());
|
|
1016
1052
|
}
|
|
1017
1053
|
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
1054
|
}
|
|
1019
|
-
initColumns(a,
|
|
1020
|
-
const c =
|
|
1021
|
-
this._columns = e, this._columns.length === 0 && (this._columns =
|
|
1055
|
+
initColumns(a, h) {
|
|
1056
|
+
const c = _.getIdPrefix(this.navigationStateRef), e = this.readColumns(a, c, this._columnsMutations), t = e.length !== this._columns.length;
|
|
1057
|
+
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
1058
|
}
|
|
1023
1059
|
getDataState() {
|
|
1024
1060
|
return {
|
|
@@ -1037,87 +1073,87 @@ const _ = class _ extends r.Component {
|
|
|
1037
1073
|
};
|
|
1038
1074
|
}
|
|
1039
1075
|
};
|
|
1040
|
-
|
|
1076
|
+
T.displayName = "KendoReactGrid", T.defaultProps = {
|
|
1041
1077
|
// never use this
|
|
1042
|
-
},
|
|
1043
|
-
data:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
data:
|
|
1047
|
-
total:
|
|
1078
|
+
}, T.propTypes = {
|
|
1079
|
+
data: o.oneOfType([
|
|
1080
|
+
o.array,
|
|
1081
|
+
o.shape({
|
|
1082
|
+
data: o.array,
|
|
1083
|
+
total: o.number
|
|
1048
1084
|
})
|
|
1049
1085
|
]),
|
|
1050
|
-
sortable:
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
mode:
|
|
1054
|
-
allowUnsort:
|
|
1086
|
+
sortable: o.oneOfType([
|
|
1087
|
+
o.bool,
|
|
1088
|
+
o.shape({
|
|
1089
|
+
mode: o.oneOf(["single", "multiple"]),
|
|
1090
|
+
allowUnsort: o.bool
|
|
1055
1091
|
})
|
|
1056
1092
|
]),
|
|
1057
|
-
onSortChange:
|
|
1058
|
-
sort:
|
|
1059
|
-
filterable:
|
|
1060
|
-
filter:
|
|
1061
|
-
onFilterChange:
|
|
1062
|
-
pageable:
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
buttonCount:
|
|
1066
|
-
responsive:
|
|
1067
|
-
info:
|
|
1068
|
-
type:
|
|
1069
|
-
pageSizes:
|
|
1093
|
+
onSortChange: o.func,
|
|
1094
|
+
sort: o.array,
|
|
1095
|
+
filterable: o.bool,
|
|
1096
|
+
filter: o.any,
|
|
1097
|
+
onFilterChange: o.func,
|
|
1098
|
+
pageable: o.oneOfType([
|
|
1099
|
+
o.bool,
|
|
1100
|
+
o.shape({
|
|
1101
|
+
buttonCount: o.number,
|
|
1102
|
+
responsive: o.bool,
|
|
1103
|
+
info: o.bool,
|
|
1104
|
+
type: o.oneOf(["numeric", "input"]),
|
|
1105
|
+
pageSizes: o.oneOfType(
|
|
1070
1106
|
[
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1107
|
+
o.bool,
|
|
1108
|
+
o.arrayOf(o.oneOfType([
|
|
1109
|
+
o.string,
|
|
1110
|
+
o.number
|
|
1075
1111
|
]))
|
|
1076
1112
|
]
|
|
1077
1113
|
),
|
|
1078
|
-
previousNext:
|
|
1114
|
+
previousNext: o.bool
|
|
1079
1115
|
})
|
|
1080
1116
|
]),
|
|
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:
|
|
1117
|
+
pageSize: o.number,
|
|
1118
|
+
onPageChange: o.func,
|
|
1119
|
+
total: o.number,
|
|
1120
|
+
skip: o.number,
|
|
1121
|
+
take: o.number,
|
|
1122
|
+
fixedScroll: o.bool,
|
|
1123
|
+
onExpandChange: o.func,
|
|
1124
|
+
expandField: o.string,
|
|
1125
|
+
selectedField: o.string,
|
|
1126
|
+
onSelectionChange: o.func,
|
|
1127
|
+
onHeaderSelectionChange: o.func,
|
|
1128
|
+
resizable: o.bool,
|
|
1129
|
+
reorderable: o.bool,
|
|
1130
|
+
group: o.any,
|
|
1131
|
+
groupable: o.oneOfType([
|
|
1132
|
+
o.bool,
|
|
1133
|
+
o.shape({
|
|
1134
|
+
enabled: o.bool,
|
|
1135
|
+
footer: o.oneOf(["always", "visible", "none"])
|
|
1100
1136
|
})
|
|
1101
1137
|
]),
|
|
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
|
-
|
|
1138
|
+
onGroupChange: o.func,
|
|
1139
|
+
onRowClick: o.func,
|
|
1140
|
+
onRowDoubleClick: o.func,
|
|
1141
|
+
onItemChange: o.func,
|
|
1142
|
+
editField: o.string,
|
|
1143
|
+
scrollable: o.oneOf(["none", "scrollable", "virtual"]),
|
|
1144
|
+
rowHeight: o.number,
|
|
1145
|
+
detailRowHeight: o.number,
|
|
1146
|
+
detail: o.any,
|
|
1147
|
+
style: o.object,
|
|
1148
|
+
onDataStateChange: o.func,
|
|
1149
|
+
onColumnResize: o.func,
|
|
1150
|
+
onColumnReorder: o.func,
|
|
1151
|
+
dataItemKey: o.string,
|
|
1152
|
+
navigatable: o.bool,
|
|
1153
|
+
size: o.oneOf(["small", "medium"])
|
|
1154
|
+
}, T.contextType = W;
|
|
1155
|
+
let $ = T;
|
|
1156
|
+
nt($);
|
|
1121
1157
|
export {
|
|
1122
|
-
|
|
1158
|
+
$ as Grid
|
|
1123
1159
|
};
|