@progress/kendo-react-grid 7.5.0-develop.12 → 7.5.0-develop.14
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 +220 -215
- package/constants/index.js +1 -1
- package/constants/index.mjs +4 -3
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +10 -0
- package/index.d.ts +10 -0
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
package/Grid.mjs
CHANGED
|
@@ -7,38 +7,39 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as r from "react";
|
|
10
|
-
import
|
|
11
|
-
import { RowHeightService 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
|
|
33
|
-
import { operators as
|
|
34
|
-
import { FooterRow as
|
|
35
|
-
import { normalize as
|
|
36
|
-
import { packageMetadata as
|
|
37
|
-
import { GridDetailCell as
|
|
10
|
+
import o from "prop-types";
|
|
11
|
+
import { RowHeightService as re, dispatchEvent as Ge, canUseDOM as V, getActiveElement as Ke, memoizeOne as S, validatePackage as Oe, shouldShowValidationUI as Pe, setScrollbarWidth as ae, getter as Ve, classNames as F, kendoThemeMaps as G, WatermarkOverlay as Ue } from "@progress/kendo-react-common";
|
|
12
|
+
import { tableKeyboardNavigation as x, getSelectionOptions as le, mapColumns as We, ClipboardService as Be, TableKeyboardNavigationContext as U, isRtl as $e, tableKeyboardNavigationTools as N, tableColumnsVirtualization as je, Pager as qe, tableKeyboardNavigationScopeAttributes as ne, TableSelection as he, tableKeyboardNavigationBodyAttributes as pe, DropClue as de, DragClue as ce, updateLeft as Xe, updateRight as Je } from "@progress/kendo-react-data-tools";
|
|
13
|
+
import { GridSelectionCell as Qe } from "./cells/GridSelectionCell.mjs";
|
|
14
|
+
import { GridHierarchyCell as Ye } from "./cells/GridHierarchyCell.mjs";
|
|
15
|
+
import { GridEditCell as Ze } from "./cells/GridEditCell.mjs";
|
|
16
|
+
import { Header as et } from "./header/Header.mjs";
|
|
17
|
+
import { HeaderRow as tt } from "./header/HeaderRow.mjs";
|
|
18
|
+
import { FilterRow as st } from "./header/FilterRow.mjs";
|
|
19
|
+
import { GroupPanel as it } from "./header/GroupPanel.mjs";
|
|
20
|
+
import { Footer as ot } from "./footer/Footer.mjs";
|
|
21
|
+
import { provideLocalizationService as rt, registerForLocalization as at } from "@progress/kendo-react-intl";
|
|
22
|
+
import { pagerMessagesMap as lt, gridAriaLabel as ue, messages as nt } from "./messages/index.mjs";
|
|
23
|
+
import { VirtualScroll as ht } from "./VirtualScroll.mjs";
|
|
24
|
+
import { VirtualScrollFixed as ge } from "./VirtualScrollFixed.mjs";
|
|
25
|
+
import { ColumnResize as pt } from "./drag/ColumnResize.mjs";
|
|
26
|
+
import { CommonDragLogic as dt } from "./drag/CommonDragLogic.mjs";
|
|
27
|
+
import { firefox as me, firefoxMaxHeight as fe, flatData as ct, readColumns as ut, sanitizeColumns as gt, getColumnWidth as W, autoGenerateColumns as mt, getNestedValue as be, resolveCells as ft } from "./utils/index.mjs";
|
|
28
|
+
import { GridCell as bt } from "./cells/GridCell.mjs";
|
|
29
|
+
import { GridGroupCell as ve } from "./cells/GridGroupCell.mjs";
|
|
30
|
+
import { GridRow as vt } from "./rows/GridRow.mjs";
|
|
31
|
+
import { GridHeaderSelectionCell as Ct } from "./header/GridHeaderSelectionCell.mjs";
|
|
32
|
+
import { GridNoRecords as Rt } from "./GridNoRecords.mjs";
|
|
33
|
+
import { operators as Ce } from "./filterCommon.mjs";
|
|
34
|
+
import { FooterRow as yt } from "./footer/FooterRow.mjs";
|
|
35
|
+
import { normalize as wt } from "./paging/GridPagerSettings.mjs";
|
|
36
|
+
import { packageMetadata as Re } from "./package-metadata.mjs";
|
|
37
|
+
import { GridDetailCell as St } from "./cells/GridDetailCell.mjs";
|
|
38
38
|
import { GridDetailHierarchyCell as It } from "./cells/GridDetailHierarchyCell.mjs";
|
|
39
|
+
import { SAFARI_REGEX as kt } from "./constants/index.mjs";
|
|
39
40
|
const _ = class _ 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._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
44
|
e.forEach((i) => {
|
|
44
45
|
i.isIntersecting || this.setCurrentOnTop(t);
|
|
@@ -78,8 +79,8 @@ const _ = class _ extends r.Component {
|
|
|
78
79
|
this.props.onContextMenu.call(void 0, n);
|
|
79
80
|
}
|
|
80
81
|
}, this.getVirtualScroll = (e) => {
|
|
81
|
-
const { rowHeight: t, detailRowHeight: i, detail: n, expandField: h, groupable: l } = e, d = this.isAllData(), f = t !== void 0 && t > 0, R = i !== void 0 && i > 0,
|
|
82
|
-
return !f ||
|
|
82
|
+
const { rowHeight: t, detailRowHeight: i, detail: n, expandField: h, groupable: l } = e, d = this.isAllData(), f = t !== void 0 && t > 0, R = i !== void 0 && i > 0, k = l === !0 || typeof l == "object" && l.enabled !== !1;
|
|
83
|
+
return !f || k && !d || !!(n && h) && (!R || !d) ? ht : 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;
|
|
@@ -93,15 +94,15 @@ const _ = class _ extends r.Component {
|
|
|
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
96
|
const i = this.props.rowHeight * e;
|
|
96
|
-
this.vs.containerHeight =
|
|
97
|
+
this.vs.containerHeight = me ? Math.min(fe, i) : i;
|
|
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
|
+
if (this.vs.containerRef = this.containerRef, this.vs.tableBodyRef = this.tableBodyRef, this.vs.table = this.tableElement, this._slicedData = void 0, this.vs instanceof ge) {
|
|
100
101
|
const { rowHeight: i = 0, detail: n, expandField: h } = this.props;
|
|
101
102
|
let { detailRowHeight: l = 0 } = this.props;
|
|
102
|
-
l = n && h ? l : i, 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, i, l, this._data)) : this.vs.rowHeightService = new
|
|
103
|
+
l = n && h ? l : i, 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, i, l, this._data)) : this.vs.rowHeightService = new re(e, i, l);
|
|
103
104
|
const d = this.vs.rowHeightService.totalHeight();
|
|
104
|
-
this.vs.containerHeight =
|
|
105
|
+
this.vs.containerHeight = me ? Math.min(fe, d) : d;
|
|
105
106
|
}
|
|
106
107
|
}, this.scrollHandler = (e) => {
|
|
107
108
|
if (e.target !== e.currentTarget)
|
|
@@ -110,14 +111,14 @@ const _ = class _ extends r.Component {
|
|
|
110
111
|
const t = e.currentTarget.scrollLeft, i = e.currentTarget.scrollTop;
|
|
111
112
|
this.props.columnVirtualization && (!this.vs.scrollableVirtual || i === 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 && i !== this.wrapperScrollTop && this.vs.scrollHandler(e),
|
|
114
|
+
}, 0)), this._header && this._header.setScrollLeft(t), this._footer && this._footer.setScrollLeft(t), this.vs && i !== this.wrapperScrollTop && this.vs.scrollHandler(e), Ge(this.props.onScroll, e, this, void 0), this.wrapperScrollTop = i;
|
|
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: i } =
|
|
121
|
+
const { mode: t, cell: i } = le(this.props.selectable), n = {
|
|
121
122
|
dataItems: this.getLeafDataItems(),
|
|
122
123
|
mode: t,
|
|
123
124
|
cell: i,
|
|
@@ -193,16 +194,18 @@ const _ = class _ extends r.Component {
|
|
|
193
194
|
);
|
|
194
195
|
}, this.selectionRelease = (e) => {
|
|
195
196
|
if (this.props.onSelectionChange) {
|
|
196
|
-
const t = {
|
|
197
|
+
const t = this.getSlicedLeafDataItems()[e.startRowIndex], i = this.getSlicedLeafDataItems()[e.endRowIndex], n = {
|
|
197
198
|
syntheticEvent: void 0,
|
|
198
199
|
target: this,
|
|
199
200
|
selectedField: this.props.selectedField || "",
|
|
200
201
|
componentId: this._gridId,
|
|
201
202
|
dataItems: this.getLeafDataItems(),
|
|
202
203
|
dataItem: null,
|
|
204
|
+
startDataItem: t,
|
|
205
|
+
endDataItem: i,
|
|
203
206
|
...e
|
|
204
207
|
};
|
|
205
|
-
this.props.onSelectionChange.call(void 0,
|
|
208
|
+
this.props.onSelectionChange.call(void 0, n);
|
|
206
209
|
}
|
|
207
210
|
}, this.pageChange = (e, t, i) => {
|
|
208
211
|
this.raiseDataEvent(
|
|
@@ -255,7 +258,7 @@ const _ = class _ extends r.Component {
|
|
|
255
258
|
var h, l, d;
|
|
256
259
|
if (!V)
|
|
257
260
|
return !1;
|
|
258
|
-
const e =
|
|
261
|
+
const e = Ke(this.document), t = e ? e.matches(".k-table-td") ? e : (h = this.document) == null ? void 0 : h.body : (l = this.document) == null ? void 0 : l.body, i = t.closest(".k-grid-container"), n = t && ((d = this._element) == null ? void 0 : d.contains(t));
|
|
259
262
|
return !!(t && n && i);
|
|
260
263
|
}, this.onResize = (e, t, i, n, h, l) => {
|
|
261
264
|
this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(
|
|
@@ -276,7 +279,7 @@ const _ = class _ extends r.Component {
|
|
|
276
279
|
const d = this.getVirtualScroll(this.props);
|
|
277
280
|
this.vs = new d(l);
|
|
278
281
|
}), this.flatData = S((e, t, i, n, h, l, d) => {
|
|
279
|
-
const f = [], R =
|
|
282
|
+
const f = [], R = ct(
|
|
280
283
|
f,
|
|
281
284
|
e,
|
|
282
285
|
t,
|
|
@@ -285,16 +288,16 @@ const _ = class _ extends r.Component {
|
|
|
285
288
|
h
|
|
286
289
|
);
|
|
287
290
|
return { flattedData: f, resolvedGroupsCount: R };
|
|
288
|
-
}), this.rowHeightService = S((e, t, i, n, h) => new
|
|
291
|
+
}), this.rowHeightService = S((e, t, i, n, h) => new re(t, i, n, h)), this.childrenToArray = S((e) => r.Children.toArray(e)), this.readColumns = S(
|
|
289
292
|
(e, t, i) => {
|
|
290
293
|
const n = e.filter((h) => h && h.type && h.type.displayName === "KendoReactGridColumn");
|
|
291
|
-
return
|
|
294
|
+
return ut(n, this.columns, { prevId: 0, idPrefix: t });
|
|
292
295
|
}
|
|
293
296
|
), this.mapColumns = S(
|
|
294
|
-
(e, t) =>
|
|
297
|
+
(e, t) => We(e, t)
|
|
295
298
|
), this.configureColumns = S((e, t, i) => {
|
|
296
299
|
this.props.selectedField && e.filter((l) => l.field === this.props.selectedField).forEach((l) => {
|
|
297
|
-
l.width = l.width || "50px", l.cell = l.cell ||
|
|
300
|
+
l.width = l.width || "50px", l.cell = l.cell || Qe, l.headerCell = l.headerCell || Ct;
|
|
298
301
|
});
|
|
299
302
|
const n = {
|
|
300
303
|
id: "",
|
|
@@ -318,7 +321,7 @@ const _ = class _ extends r.Component {
|
|
|
318
321
|
let h = 0;
|
|
319
322
|
this.props.expandField && this.props.onExpandChange && this.props.detail && (e.unshift({
|
|
320
323
|
...n,
|
|
321
|
-
cell:
|
|
324
|
+
cell: Ye,
|
|
322
325
|
field: this.props.expandField,
|
|
323
326
|
headerClassName: "k-hierarchy-cell k-header"
|
|
324
327
|
}), h++);
|
|
@@ -326,13 +329,13 @@ const _ = class _ extends r.Component {
|
|
|
326
329
|
e.unshift({
|
|
327
330
|
...n,
|
|
328
331
|
isAccessible: !1,
|
|
329
|
-
cell:
|
|
332
|
+
cell: ve,
|
|
330
333
|
field: "value",
|
|
331
334
|
locked: this.props.lockGroups
|
|
332
335
|
}), h++;
|
|
333
336
|
e.slice(h).forEach((l) => l.parentIndex >= 0 && (l.parentIndex += h));
|
|
334
|
-
}), this.getHeaderRow = S((e, t, i, n, h, l, d, f, R,
|
|
335
|
-
|
|
337
|
+
}), this.getHeaderRow = S((e, t, i, n, h, l, d, f, R, k, z, C) => /* @__PURE__ */ r.createElement(
|
|
338
|
+
tt,
|
|
336
339
|
{
|
|
337
340
|
cells: this.props.cells,
|
|
338
341
|
sort: e,
|
|
@@ -347,7 +350,7 @@ const _ = class _ extends r.Component {
|
|
|
347
350
|
filterChange: this.filterChange,
|
|
348
351
|
columnMenu: R,
|
|
349
352
|
selectionChange: this.onHeaderSelectionChange,
|
|
350
|
-
columns:
|
|
353
|
+
columns: k,
|
|
351
354
|
columnResize: this.columnResize,
|
|
352
355
|
pressHandler: this.dragLogic.pressHandler,
|
|
353
356
|
dragHandler: this.dragLogic.dragHandler,
|
|
@@ -364,13 +367,13 @@ const _ = class _ extends r.Component {
|
|
|
364
367
|
)), this.resolveTitle = (e) => {
|
|
365
368
|
const t = this._columns.find((n) => n.field === e), i = t && (t.title || t.field);
|
|
366
369
|
return i === void 0 ? e : i;
|
|
367
|
-
}, this.getLeafDataItems = () => this._data.filter((e) => e.rowType === "data").map((e) => e.dataItem),
|
|
370
|
+
}, 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 = Pe(Re);
|
|
368
371
|
const p = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1, c = this.getVirtualScroll(a);
|
|
369
|
-
this.vs = new c(p || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new
|
|
372
|
+
this.vs = new c(p || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new dt(
|
|
370
373
|
this.columnReorder.bind(this),
|
|
371
374
|
this.groupReorder.bind(this),
|
|
372
375
|
this.columnToGroup.bind(this)
|
|
373
|
-
), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new
|
|
376
|
+
), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new pt(this.onResize), this.props.clipboard && (this.clipboardService = new Be(this.onClipboard)), x.onConstructor({
|
|
374
377
|
navigatable: !!a.navigatable,
|
|
375
378
|
contextStateRef: this.contextStateRef,
|
|
376
379
|
navigationStateRef: this.navigationStateRef,
|
|
@@ -419,7 +422,7 @@ const _ = class _ extends r.Component {
|
|
|
419
422
|
// tslint:enable:max-line-length
|
|
420
423
|
get columns() {
|
|
421
424
|
const a = this._columns.filter((p) => p.declarationIndex >= 0 && p.parentIndex === -1);
|
|
422
|
-
return
|
|
425
|
+
return gt(a);
|
|
423
426
|
}
|
|
424
427
|
/**
|
|
425
428
|
* Returns the HTML element of the Grid component.
|
|
@@ -441,8 +444,8 @@ const _ = class _ extends r.Component {
|
|
|
441
444
|
* @hidden
|
|
442
445
|
*/
|
|
443
446
|
componentDidMount() {
|
|
444
|
-
this.resetTableWidth(),
|
|
445
|
-
const a =
|
|
447
|
+
navigator.userAgent.match(kt) || (this.headTable && (this.headTable.style.display = "block"), this.tableElement && (this.tableElement.style.display = "block")), this.resetTableWidth(), ae();
|
|
448
|
+
const a = $e(this.element);
|
|
446
449
|
this.isRtl = a, x.onComponentDidMount({
|
|
447
450
|
scope: this.element || void 0,
|
|
448
451
|
contextStateRef: this.contextStateRef,
|
|
@@ -468,7 +471,7 @@ const _ = class _ extends r.Component {
|
|
|
468
471
|
* @hidden
|
|
469
472
|
*/
|
|
470
473
|
componentDidUpdate() {
|
|
471
|
-
this.resetTableWidth(),
|
|
474
|
+
this.resetTableWidth(), ae(), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), x.onComponentDidUpdate({
|
|
472
475
|
scope: this.element || void 0,
|
|
473
476
|
contextStateRef: this.contextStateRef,
|
|
474
477
|
navigationStateRef: this.navigationStateRef
|
|
@@ -484,9 +487,9 @@ const _ = class _ extends r.Component {
|
|
|
484
487
|
* @hidden
|
|
485
488
|
*/
|
|
486
489
|
render() {
|
|
487
|
-
var
|
|
490
|
+
var ie;
|
|
488
491
|
let a = this.props.total || 0;
|
|
489
|
-
const p = N.getIdPrefix(this.navigationStateRef), c =
|
|
492
|
+
const p = N.getIdPrefix(this.navigationStateRef), c = rt(this);
|
|
490
493
|
let e = [];
|
|
491
494
|
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
495
|
const t = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", i = this.props.scrollable === "virtual", { resolvedGroupsCount: n, flattedData: h } = this.flatData(
|
|
@@ -505,8 +508,8 @@ const _ = class _ extends r.Component {
|
|
|
505
508
|
this.initializeVirtualization(a, l);
|
|
506
509
|
const f = this.childrenToArray(this.props.children);
|
|
507
510
|
this.initColumns(f, n);
|
|
508
|
-
const R = f.map((
|
|
509
|
-
|
|
511
|
+
const R = f.map((s) => s && s.type && s.type.displayName === "KendoReactGridToolbar" ? r.cloneElement(s, { ...s.props, ariaControls: this._gridId }) : null), k = f.filter((s) => s && s.type && s.type.displayName === "KendoReactGridNoRecords"), z = f.filter((s) => s && s.type && s.type.displayName === "KendoReactGridStatusBar"), C = this._columns.filter((s) => s.children.length === 0), $ = l && /* @__PURE__ */ r.createElement(
|
|
512
|
+
it,
|
|
510
513
|
{
|
|
511
514
|
group: this.props.group || [],
|
|
512
515
|
groupChange: this.groupChange,
|
|
@@ -518,8 +521,8 @@ const _ = class _ extends r.Component {
|
|
|
518
521
|
ariaControls: this._gridId,
|
|
519
522
|
onContextMenu: this.onContextMenu
|
|
520
523
|
}
|
|
521
|
-
), { sort:
|
|
522
|
-
|
|
524
|
+
), { sort: ye, sortable: we, group: Se, filter: Ie, filterable: ke, filterOperators: Ee = Ce, headerCellRender: xe, columnMenu: _e } = this.props, j = /* @__PURE__ */ r.createElement(
|
|
525
|
+
et,
|
|
523
526
|
{
|
|
524
527
|
size: this.props.size,
|
|
525
528
|
columnResize: this.columnResize,
|
|
@@ -529,27 +532,27 @@ const _ = class _ extends r.Component {
|
|
|
529
532
|
ref: this.headerRef,
|
|
530
533
|
elemRef: this.headerElementRef,
|
|
531
534
|
headerRow: this.getHeaderRow(
|
|
535
|
+
ye,
|
|
532
536
|
we,
|
|
533
537
|
Se,
|
|
534
|
-
ke,
|
|
535
538
|
l,
|
|
536
539
|
Ie,
|
|
540
|
+
ke,
|
|
537
541
|
Ee,
|
|
538
542
|
xe,
|
|
539
543
|
_e,
|
|
540
|
-
ze,
|
|
541
544
|
this._columns,
|
|
542
545
|
this._columnsMap,
|
|
543
546
|
this.isRtl
|
|
544
547
|
),
|
|
545
548
|
filterRow: this.props.filterable && /* @__PURE__ */ r.createElement(
|
|
546
|
-
|
|
549
|
+
st,
|
|
547
550
|
{
|
|
548
551
|
cells: this.props.cells,
|
|
549
552
|
size: this.props.size,
|
|
550
553
|
columns: this._columns,
|
|
551
554
|
filter: this.props.filter,
|
|
552
|
-
filterOperators: this.props.filterOperators ||
|
|
555
|
+
filterOperators: this.props.filterOperators || Ce,
|
|
553
556
|
filterChange: this.filterChange,
|
|
554
557
|
sort: this.props.sort,
|
|
555
558
|
cellRender: this.props.filterCellRender,
|
|
@@ -557,33 +560,33 @@ const _ = class _ extends r.Component {
|
|
|
557
560
|
ariaRowIndex: this._columnsMap.length + 1
|
|
558
561
|
}
|
|
559
562
|
) || void 0,
|
|
560
|
-
cols: C.map((
|
|
563
|
+
cols: C.map((s, g) => /* @__PURE__ */ r.createElement(
|
|
561
564
|
"col",
|
|
562
565
|
{
|
|
563
566
|
key: g.toString(),
|
|
564
|
-
width: W(
|
|
567
|
+
width: W(s)
|
|
565
568
|
}
|
|
566
569
|
))
|
|
567
570
|
}
|
|
568
|
-
),
|
|
571
|
+
), ze = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, De = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns: Te } = je({
|
|
569
572
|
enabled: this.props.columnVirtualization,
|
|
570
573
|
columns: C,
|
|
571
|
-
tableViewPortWidth:
|
|
572
|
-
scrollLeft:
|
|
573
|
-
}),
|
|
574
|
+
tableViewPortWidth: De,
|
|
575
|
+
scrollLeft: ze
|
|
576
|
+
}), Le = (s, g, m) => {
|
|
574
577
|
let E = !1;
|
|
575
|
-
const
|
|
578
|
+
const I = this.props.selectedField ? be(this.props.selectedField, s.dataItem) : void 0;
|
|
576
579
|
return {
|
|
577
580
|
row: C.map((u, b) => {
|
|
578
|
-
if (
|
|
581
|
+
if (Te[b])
|
|
579
582
|
return null;
|
|
580
583
|
const H = u.id ? u.id : b, T = `${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
584
|
let w = !1;
|
|
582
585
|
if (u.editable && this.props.editField) {
|
|
583
|
-
const v =
|
|
586
|
+
const v = be(this.props.editField, s.dataItem);
|
|
584
587
|
v && (v === !0 || v === u.field) && (E = !0, w = !0);
|
|
585
588
|
}
|
|
586
|
-
const P = u.cell || w &&
|
|
589
|
+
const P = u.cell || w && Ze || bt, L = this.props.expandField && this.props.detail && u.field === this.props.expandField;
|
|
587
590
|
return /* @__PURE__ */ r.createElement(
|
|
588
591
|
P,
|
|
589
592
|
{
|
|
@@ -595,63 +598,63 @@ const _ = class _ extends r.Component {
|
|
|
595
598
|
p,
|
|
596
599
|
L ? "nodata" : "cell"
|
|
597
600
|
),
|
|
598
|
-
colSpan:
|
|
599
|
-
dataItem:
|
|
601
|
+
colSpan: He[b],
|
|
602
|
+
dataItem: s.dataItem,
|
|
600
603
|
field: u.field,
|
|
601
604
|
editor: u.editor,
|
|
602
605
|
format: u.format,
|
|
603
606
|
className: T,
|
|
604
607
|
render: this.props.cellRender,
|
|
605
|
-
cells:
|
|
608
|
+
cells: ft(this.props.cells, u.cells),
|
|
606
609
|
onChange: this.itemChange,
|
|
607
610
|
selectionChange: this.props.onSelectionChange ? (v) => {
|
|
608
|
-
this.selectionChange({ event: v, dataItem:
|
|
611
|
+
this.selectionChange({ event: v, dataItem: s.dataItem, dataIndex: m, columnIndex: b });
|
|
609
612
|
} : void 0,
|
|
610
613
|
columnIndex: b,
|
|
611
614
|
columnsCount: C.length,
|
|
612
|
-
rowType:
|
|
613
|
-
level:
|
|
614
|
-
expanded:
|
|
615
|
-
dataIndex:
|
|
615
|
+
rowType: s.rowType,
|
|
616
|
+
level: s.level,
|
|
617
|
+
expanded: s.expanded,
|
|
618
|
+
dataIndex: s.dataIndex,
|
|
616
619
|
style: y,
|
|
617
620
|
ariaColumnIndex: u.ariaColumnIndex,
|
|
618
|
-
isSelected: Array.isArray(
|
|
621
|
+
isSelected: Array.isArray(I) && I.indexOf(b) > -1
|
|
619
622
|
}
|
|
620
623
|
);
|
|
621
624
|
}),
|
|
622
625
|
isInEdit: E,
|
|
623
|
-
isSelected: typeof
|
|
626
|
+
isSelected: typeof I == "boolean" && I
|
|
624
627
|
};
|
|
625
628
|
};
|
|
626
629
|
let q = 0;
|
|
627
630
|
if (i)
|
|
628
|
-
for (let
|
|
631
|
+
for (let s = 0; s < this.vs.topCacheCount + this.vs.attendedSkip - (this.props.skip || 0); s++) {
|
|
629
632
|
const g = this._data.shift();
|
|
630
633
|
if (g)
|
|
631
|
-
this._data.push(g), q++, g.rowType === "groupHeader" &&
|
|
634
|
+
this._data.push(g), q++, g.rowType === "groupHeader" && s--;
|
|
632
635
|
else
|
|
633
636
|
break;
|
|
634
637
|
}
|
|
635
|
-
const
|
|
636
|
-
let
|
|
638
|
+
const X = (s) => s >= this._data.length - q;
|
|
639
|
+
let J = this.vs.realSkip || 0;
|
|
637
640
|
const A = [];
|
|
638
641
|
let K = !1;
|
|
639
642
|
const O = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
|
|
640
643
|
let D = 0;
|
|
641
644
|
if (this._data.length) {
|
|
642
|
-
let
|
|
645
|
+
let s = -1, g = 0;
|
|
643
646
|
(this._slicedData || this._data).forEach((m, E) => {
|
|
644
|
-
m.rowType === "data" && (
|
|
645
|
-
const
|
|
647
|
+
m.rowType === "data" && (J++, s++);
|
|
648
|
+
const I = J % 2 === 0, u = this.props.dataItemKey && Ve(this.props.dataItemKey)(m.dataItem), b = E + (this.vs.realSkip || 0), H = u || "ai" + b, T = H + "_1", y = Le(m, H, s);
|
|
646
649
|
if (D = b + O + g, A.push(/* @__PURE__ */ r.createElement(
|
|
647
|
-
|
|
650
|
+
vt,
|
|
648
651
|
{
|
|
649
652
|
key: H,
|
|
650
653
|
dataItem: m.dataItem,
|
|
651
|
-
isAltRow:
|
|
654
|
+
isAltRow: I,
|
|
652
655
|
isInEdit: y.isInEdit,
|
|
653
656
|
rowType: m.rowType,
|
|
654
|
-
isHidden:
|
|
657
|
+
isHidden: X(E),
|
|
655
658
|
onClick: (w) => this.rowClick(w, m),
|
|
656
659
|
onDoubleClick: (w) => this.rowDblClick(w, m),
|
|
657
660
|
selectedField: this.props.selectedField,
|
|
@@ -659,7 +662,7 @@ const _ = class _ extends r.Component {
|
|
|
659
662
|
render: this.props.rowRender,
|
|
660
663
|
ariaRowIndex: D,
|
|
661
664
|
absoluteRowIndex: b,
|
|
662
|
-
dataIndex: this.vs.scrollableVirtual ? b :
|
|
665
|
+
dataIndex: this.vs.scrollableVirtual ? b : s,
|
|
663
666
|
isSelected: y.isSelected
|
|
664
667
|
},
|
|
665
668
|
y.row
|
|
@@ -671,24 +674,24 @@ const _ = class _ extends r.Component {
|
|
|
671
674
|
key: T,
|
|
672
675
|
className: F(
|
|
673
676
|
"k-table-row",
|
|
674
|
-
|
|
677
|
+
I ? "k-detail-row k-table-alt-row k-alt" : "k-detail-row"
|
|
675
678
|
),
|
|
676
|
-
style: { visibility:
|
|
679
|
+
style: { visibility: X(E) ? "hidden" : "", height: this.props.detailRowHeight },
|
|
677
680
|
role: "row",
|
|
678
681
|
"aria-rowindex": D
|
|
679
682
|
},
|
|
680
683
|
this.props.group && this.props.group.map((P, L) => {
|
|
681
|
-
var
|
|
682
|
-
const v = (
|
|
684
|
+
var oe;
|
|
685
|
+
const v = (oe = y == null ? void 0 : y.row[L]) == null ? void 0 : oe.props.style, Me = v ? this.isRtl ? { left: v.right, right: v.left } : { left: v.left, right: v.right } : {};
|
|
683
686
|
return /* @__PURE__ */ r.createElement(
|
|
684
|
-
|
|
687
|
+
ve,
|
|
685
688
|
{
|
|
686
689
|
id: "",
|
|
687
690
|
dataIndex: m.dataIndex,
|
|
688
691
|
field: P.field,
|
|
689
692
|
dataItem: m.dataItem,
|
|
690
693
|
key: L,
|
|
691
|
-
style:
|
|
694
|
+
style: Me,
|
|
692
695
|
ariaColumnIndex: 1 + L,
|
|
693
696
|
isSelected: !1,
|
|
694
697
|
locked: this.props.lockGroups,
|
|
@@ -704,7 +707,7 @@ const _ = class _ extends r.Component {
|
|
|
704
707
|
}
|
|
705
708
|
),
|
|
706
709
|
/* @__PURE__ */ r.createElement(
|
|
707
|
-
|
|
710
|
+
St,
|
|
708
711
|
{
|
|
709
712
|
onContextMenu: this.onContextMenu,
|
|
710
713
|
dataItem: m.dataItem,
|
|
@@ -720,38 +723,38 @@ const _ = class _ extends r.Component {
|
|
|
720
723
|
});
|
|
721
724
|
} else
|
|
722
725
|
K = !0;
|
|
723
|
-
const
|
|
724
|
-
const
|
|
725
|
-
return
|
|
726
|
-
},
|
|
726
|
+
const Fe = () => {
|
|
727
|
+
const s = this._header;
|
|
728
|
+
return s && s.table.clientWidth;
|
|
729
|
+
}, Q = () => /* @__PURE__ */ r.createElement("div", { key: "no-records", className: "k-grid-norecords", "aria-rowindex": O, style: { width: Fe() } }, /* @__PURE__ */ r.createElement("div", { className: "k-grid-norecords-template" }, k.length ? k : /* @__PURE__ */ r.createElement(Rt, null))), Y = {
|
|
727
730
|
size: this.props.size,
|
|
728
731
|
onPageChange: this.pagerPageChange,
|
|
729
732
|
total: a,
|
|
730
733
|
dir: this.isRtl ? "rtl" : void 0,
|
|
731
734
|
skip: this.vs.propsSkip || 0,
|
|
732
735
|
take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
|
|
733
|
-
messagesMap:
|
|
734
|
-
...
|
|
735
|
-
}, Z = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...Y }) : /* @__PURE__ */ r.createElement(
|
|
736
|
+
messagesMap: lt,
|
|
737
|
+
...wt(this.props.pageable || {})
|
|
738
|
+
}, Z = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...Y }) : /* @__PURE__ */ r.createElement(qe, { className: "k-grid-pager", ...Y }), Ne = (s) => this.props.sort && this.props.sort.filter((g) => g.field === s).length > 0, Ae = (s, g) => /* @__PURE__ */ r.createElement(
|
|
736
739
|
"col",
|
|
737
740
|
{
|
|
738
741
|
key: g.toString(),
|
|
739
|
-
width: W(
|
|
742
|
+
width: W(s)
|
|
740
743
|
}
|
|
741
|
-
), ee = (
|
|
742
|
-
(
|
|
744
|
+
), ee = (ie = this.props.cells) != null && ie.footerCell || this._columns.some(
|
|
745
|
+
(s) => {
|
|
743
746
|
var g;
|
|
744
|
-
return !!(
|
|
747
|
+
return !!(s.footerCell || (g = s.cells) != null && g.footerCell);
|
|
745
748
|
}
|
|
746
749
|
) ? /* @__PURE__ */ r.createElement(
|
|
747
|
-
|
|
750
|
+
ot,
|
|
748
751
|
{
|
|
749
752
|
size: this.props.size,
|
|
750
753
|
columnResize: this.columnResize,
|
|
751
754
|
staticHeaders: this.props.scrollable !== "none",
|
|
752
|
-
ref: (
|
|
755
|
+
ref: (s) => this._footer = s,
|
|
753
756
|
row: /* @__PURE__ */ r.createElement(
|
|
754
|
-
|
|
757
|
+
yt,
|
|
755
758
|
{
|
|
756
759
|
cells: this.props.cells,
|
|
757
760
|
columns: this._columns,
|
|
@@ -759,26 +762,26 @@ const _ = class _ extends r.Component {
|
|
|
759
762
|
ariaRowIndex: D + 1
|
|
760
763
|
}
|
|
761
764
|
),
|
|
762
|
-
cols: C.map(
|
|
765
|
+
cols: C.map(Ae)
|
|
763
766
|
}
|
|
764
767
|
) : null, te = /* @__PURE__ */ r.createElement(
|
|
765
768
|
"colgroup",
|
|
766
769
|
{
|
|
767
|
-
ref: (
|
|
768
|
-
this.columnResize.colGroupMain =
|
|
770
|
+
ref: (s) => {
|
|
771
|
+
this.columnResize.colGroupMain = s;
|
|
769
772
|
}
|
|
770
773
|
},
|
|
771
774
|
C.map(
|
|
772
|
-
(
|
|
775
|
+
(s, g) => /* @__PURE__ */ r.createElement(
|
|
773
776
|
"col",
|
|
774
777
|
{
|
|
775
778
|
key: g.toString(),
|
|
776
|
-
className:
|
|
777
|
-
width: W(
|
|
779
|
+
className: Ne(s.field) ? "k-sorted" : void 0,
|
|
780
|
+
width: W(s)
|
|
778
781
|
}
|
|
779
782
|
)
|
|
780
783
|
)
|
|
781
|
-
), se = this.dragLogic.reorderable || this.dragLogic.groupable
|
|
784
|
+
), se = this.dragLogic.reorderable || this.dragLogic.groupable;
|
|
782
785
|
if (this.props.scrollable === "none")
|
|
783
786
|
return /* @__PURE__ */ r.createElement(U.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
784
787
|
"div",
|
|
@@ -793,42 +796,43 @@ const _ = class _ extends r.Component {
|
|
|
793
796
|
},
|
|
794
797
|
this.props.className
|
|
795
798
|
),
|
|
796
|
-
ref: (
|
|
797
|
-
this._element =
|
|
799
|
+
ref: (s) => {
|
|
800
|
+
this._element = s;
|
|
798
801
|
},
|
|
799
802
|
"aria-label": this.props.ariaLabel,
|
|
800
803
|
onKeyDown: this.onKeyDown,
|
|
801
804
|
onFocus: this.onFocus,
|
|
802
|
-
...
|
|
805
|
+
...ne
|
|
803
806
|
},
|
|
804
807
|
R,
|
|
805
808
|
$,
|
|
806
809
|
/* @__PURE__ */ r.createElement(
|
|
807
|
-
|
|
810
|
+
he,
|
|
808
811
|
{
|
|
809
812
|
selectable: this.props.selectable,
|
|
810
813
|
onRelease: this.selectionRelease,
|
|
811
|
-
childRef: (
|
|
812
|
-
this.tableElement =
|
|
814
|
+
childRef: (s) => {
|
|
815
|
+
this.tableElement = s, this.headTable = s;
|
|
813
816
|
}
|
|
814
817
|
},
|
|
815
818
|
/* @__PURE__ */ r.createElement(
|
|
816
819
|
"table",
|
|
817
820
|
{
|
|
821
|
+
ref: (s) => this.headTable = s,
|
|
818
822
|
className: F(
|
|
819
823
|
"k-table k-grid-table",
|
|
820
824
|
{ [`k-table-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size }
|
|
821
825
|
),
|
|
822
|
-
style: { userSelect: d
|
|
826
|
+
style: { userSelect: d }
|
|
823
827
|
},
|
|
824
828
|
te,
|
|
825
829
|
j,
|
|
826
|
-
/* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...
|
|
830
|
+
/* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...pe }, A),
|
|
827
831
|
ee
|
|
828
832
|
)
|
|
829
833
|
),
|
|
830
|
-
K &&
|
|
831
|
-
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
|
|
834
|
+
K && Q(),
|
|
835
|
+
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue }))
|
|
832
836
|
), z, this.props.pageable && Z);
|
|
833
837
|
let M = this.props.style || {};
|
|
834
838
|
return i && (M.height || (M = Object.assign({}, M, { height: "450px" }))), /* @__PURE__ */ r.createElement(U.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
@@ -845,13 +849,13 @@ const _ = class _ extends r.Component {
|
|
|
845
849
|
},
|
|
846
850
|
this.props.className
|
|
847
851
|
),
|
|
848
|
-
ref: (
|
|
849
|
-
this._element =
|
|
852
|
+
ref: (s) => {
|
|
853
|
+
this._element = s;
|
|
850
854
|
},
|
|
851
855
|
"aria-label": this.props.ariaLabel,
|
|
852
856
|
onKeyDown: this.onKeyDown,
|
|
853
857
|
onFocus: this.onFocus,
|
|
854
|
-
...
|
|
858
|
+
...ne
|
|
855
859
|
},
|
|
856
860
|
R,
|
|
857
861
|
$,
|
|
@@ -863,7 +867,7 @@ const _ = class _ extends r.Component {
|
|
|
863
867
|
"aria-colcount": C.length,
|
|
864
868
|
"aria-rowcount": a,
|
|
865
869
|
id: this._gridId,
|
|
866
|
-
"aria-label": c.toLanguageString(
|
|
870
|
+
"aria-label": c.toLanguageString(ue, nt[ue])
|
|
867
871
|
},
|
|
868
872
|
j,
|
|
869
873
|
/* @__PURE__ */ r.createElement("div", { className: "k-grid-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
@@ -875,17 +879,18 @@ const _ = class _ extends r.Component {
|
|
|
875
879
|
role: "presentation"
|
|
876
880
|
},
|
|
877
881
|
/* @__PURE__ */ r.createElement("div", { className: "k-grid-table-wrap", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
878
|
-
|
|
882
|
+
he,
|
|
879
883
|
{
|
|
880
884
|
selectable: this.props.selectable,
|
|
881
885
|
onRelease: this.selectionRelease,
|
|
882
|
-
childRef: (
|
|
883
|
-
this.tableElement =
|
|
886
|
+
childRef: (s) => {
|
|
887
|
+
this.tableElement = s;
|
|
884
888
|
}
|
|
885
889
|
},
|
|
886
890
|
/* @__PURE__ */ r.createElement(
|
|
887
891
|
"table",
|
|
888
892
|
{
|
|
893
|
+
ref: (s) => this.tableElement = s,
|
|
889
894
|
className: F(
|
|
890
895
|
"k-table k-grid-table",
|
|
891
896
|
{
|
|
@@ -894,7 +899,7 @@ const _ = class _ extends r.Component {
|
|
|
894
899
|
}
|
|
895
900
|
),
|
|
896
901
|
role: "presentation",
|
|
897
|
-
style: { userSelect: d
|
|
902
|
+
style: { userSelect: d }
|
|
898
903
|
},
|
|
899
904
|
te,
|
|
900
905
|
/* @__PURE__ */ r.createElement(
|
|
@@ -903,12 +908,12 @@ const _ = class _ extends r.Component {
|
|
|
903
908
|
className: "k-table-tbody",
|
|
904
909
|
ref: this.tableBodyRef,
|
|
905
910
|
role: "rowgroup",
|
|
906
|
-
...
|
|
911
|
+
...pe
|
|
907
912
|
},
|
|
908
913
|
A
|
|
909
914
|
)
|
|
910
915
|
)
|
|
911
|
-
), K &&
|
|
916
|
+
), K && Q()),
|
|
912
917
|
i && /* @__PURE__ */ r.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
|
|
913
918
|
"div",
|
|
914
919
|
{
|
|
@@ -917,8 +922,8 @@ const _ = class _ extends r.Component {
|
|
|
917
922
|
))
|
|
918
923
|
)),
|
|
919
924
|
ee,
|
|
920
|
-
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
|
|
921
|
-
this.showLicenseWatermark && /* @__PURE__ */ r.createElement(
|
|
925
|
+
se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue })),
|
|
926
|
+
this.showLicenseWatermark && /* @__PURE__ */ r.createElement(Ue, null)
|
|
922
927
|
),
|
|
923
928
|
z,
|
|
924
929
|
this.props.pageable && Z
|
|
@@ -926,7 +931,7 @@ const _ = class _ extends r.Component {
|
|
|
926
931
|
}
|
|
927
932
|
selectionChange(a) {
|
|
928
933
|
if (this.props.onSelectionChange) {
|
|
929
|
-
const { event: p, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: i, cell: n } =
|
|
934
|
+
const { event: p, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: i, cell: n } = le(this.props.selectable), h = {
|
|
930
935
|
...this.getArguments(p.syntheticEvent),
|
|
931
936
|
dataItem: c,
|
|
932
937
|
startColIndex: t,
|
|
@@ -974,7 +979,7 @@ const _ = class _ extends r.Component {
|
|
|
974
979
|
}, n = this._columns.splice(a, i(a) - a);
|
|
975
980
|
this._columns.splice(a < p ? i(p - n.length) : p, 0, ...n), this._columns.filter((d) => d.declarationIndex >= 0).forEach((d, f) => d.orderIndex = f), this._columnsMutations++;
|
|
976
981
|
const h = this._columns[a].locked && this._columns[p].locked;
|
|
977
|
-
|
|
982
|
+
Xe(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), Je(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
|
|
978
983
|
const l = this.columns;
|
|
979
984
|
if (this.forceUpdate(), this.props.onColumnReorder) {
|
|
980
985
|
const d = {
|
|
@@ -1018,7 +1023,7 @@ const _ = class _ extends r.Component {
|
|
|
1018
1023
|
}
|
|
1019
1024
|
initColumns(a, p) {
|
|
1020
1025
|
const c = N.getIdPrefix(this.navigationStateRef), e = this.readColumns(a, c, this._columnsMutations), t = e.length !== this._columns.length;
|
|
1021
|
-
this._columns = e, this._columns.length === 0 && (this._columns =
|
|
1026
|
+
this._columns = e, this._columns.length === 0 && (this._columns = mt(this.props.data, this.props.group, this.props.expandField, { prevId: 0, idPrefix: c })), this.configureColumns(this._columns, p, c), this._columnsMap = this.mapColumns(this._columns, t), this.columnResize.columns = this._columns, this.dragLogic.columns = this._columns;
|
|
1022
1027
|
}
|
|
1023
1028
|
getDataState() {
|
|
1024
1029
|
return {
|
|
@@ -1040,84 +1045,84 @@ const _ = class _ extends r.Component {
|
|
|
1040
1045
|
_.displayName = "KendoReactGrid", _.defaultProps = {
|
|
1041
1046
|
// never use this
|
|
1042
1047
|
}, _.propTypes = {
|
|
1043
|
-
data:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
data:
|
|
1047
|
-
total:
|
|
1048
|
+
data: o.oneOfType([
|
|
1049
|
+
o.array,
|
|
1050
|
+
o.shape({
|
|
1051
|
+
data: o.array,
|
|
1052
|
+
total: o.number
|
|
1048
1053
|
})
|
|
1049
1054
|
]),
|
|
1050
|
-
sortable:
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
mode:
|
|
1054
|
-
allowUnsort:
|
|
1055
|
+
sortable: o.oneOfType([
|
|
1056
|
+
o.bool,
|
|
1057
|
+
o.shape({
|
|
1058
|
+
mode: o.oneOf(["single", "multiple"]),
|
|
1059
|
+
allowUnsort: o.bool
|
|
1055
1060
|
})
|
|
1056
1061
|
]),
|
|
1057
|
-
onSortChange:
|
|
1058
|
-
sort:
|
|
1059
|
-
filterable:
|
|
1060
|
-
filter:
|
|
1061
|
-
onFilterChange:
|
|
1062
|
-
pageable:
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
buttonCount:
|
|
1066
|
-
responsive:
|
|
1067
|
-
info:
|
|
1068
|
-
type:
|
|
1069
|
-
pageSizes:
|
|
1062
|
+
onSortChange: o.func,
|
|
1063
|
+
sort: o.array,
|
|
1064
|
+
filterable: o.bool,
|
|
1065
|
+
filter: o.any,
|
|
1066
|
+
onFilterChange: o.func,
|
|
1067
|
+
pageable: o.oneOfType([
|
|
1068
|
+
o.bool,
|
|
1069
|
+
o.shape({
|
|
1070
|
+
buttonCount: o.number,
|
|
1071
|
+
responsive: o.bool,
|
|
1072
|
+
info: o.bool,
|
|
1073
|
+
type: o.oneOf(["numeric", "input"]),
|
|
1074
|
+
pageSizes: o.oneOfType(
|
|
1070
1075
|
[
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1076
|
+
o.bool,
|
|
1077
|
+
o.arrayOf(o.oneOfType([
|
|
1078
|
+
o.string,
|
|
1079
|
+
o.number
|
|
1075
1080
|
]))
|
|
1076
1081
|
]
|
|
1077
1082
|
),
|
|
1078
|
-
previousNext:
|
|
1083
|
+
previousNext: o.bool
|
|
1079
1084
|
})
|
|
1080
1085
|
]),
|
|
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:
|
|
1086
|
+
pageSize: o.number,
|
|
1087
|
+
onPageChange: o.func,
|
|
1088
|
+
total: o.number,
|
|
1089
|
+
skip: o.number,
|
|
1090
|
+
take: o.number,
|
|
1091
|
+
fixedScroll: o.bool,
|
|
1092
|
+
onExpandChange: o.func,
|
|
1093
|
+
expandField: o.string,
|
|
1094
|
+
selectedField: o.string,
|
|
1095
|
+
onSelectionChange: o.func,
|
|
1096
|
+
onHeaderSelectionChange: o.func,
|
|
1097
|
+
resizable: o.bool,
|
|
1098
|
+
reorderable: o.bool,
|
|
1099
|
+
group: o.any,
|
|
1100
|
+
groupable: o.oneOfType([
|
|
1101
|
+
o.bool,
|
|
1102
|
+
o.shape({
|
|
1103
|
+
enabled: o.bool,
|
|
1104
|
+
footer: o.oneOf(["always", "visible", "none"])
|
|
1100
1105
|
})
|
|
1101
1106
|
]),
|
|
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:
|
|
1107
|
+
onGroupChange: o.func,
|
|
1108
|
+
onRowClick: o.func,
|
|
1109
|
+
onRowDoubleClick: o.func,
|
|
1110
|
+
onItemChange: o.func,
|
|
1111
|
+
editField: o.string,
|
|
1112
|
+
scrollable: o.oneOf(["none", "scrollable", "virtual"]),
|
|
1113
|
+
rowHeight: o.number,
|
|
1114
|
+
detailRowHeight: o.number,
|
|
1115
|
+
detail: o.any,
|
|
1116
|
+
style: o.object,
|
|
1117
|
+
onDataStateChange: o.func,
|
|
1118
|
+
onColumnResize: o.func,
|
|
1119
|
+
onColumnReorder: o.func,
|
|
1120
|
+
dataItemKey: o.string,
|
|
1121
|
+
navigatable: o.bool,
|
|
1122
|
+
size: o.oneOf(["small", "medium"])
|
|
1118
1123
|
}, _.contextType = U;
|
|
1119
1124
|
let B = _;
|
|
1120
|
-
|
|
1125
|
+
at(B);
|
|
1121
1126
|
export {
|
|
1122
1127
|
B as Grid
|
|
1123
1128
|
};
|