@progress/kendo-react-grid 8.3.0-develop.9 → 8.4.0-develop.1
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 +245 -249
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +3 -1
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +67 -52
- package/columnMenu/GridColumnMenuColumnsList.mjs +24 -10
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +52 -49
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +4 -0
- package/index.d.ts +4 -0
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
package/Grid.mjs
CHANGED
|
@@ -50,7 +50,10 @@ const H = class H extends r.Component {
|
|
|
50
50
|
this.observer && this.observer.disconnect();
|
|
51
51
|
const { rowIndex: t } = e;
|
|
52
52
|
if (this.props.scrollable === "virtual")
|
|
53
|
-
this.vs.askedSkip = t, this.vs.container.scroll(
|
|
53
|
+
this.vs.askedSkip = t, this.vs.container.scroll(
|
|
54
|
+
0,
|
|
55
|
+
Math.round(this.vs.askedSkip / this.vs.total * this.vs.container.scrollHeight)
|
|
56
|
+
);
|
|
54
57
|
else if (this.element) {
|
|
55
58
|
const s = t < 1 ? this.element.querySelector("tbody > tr:nth-child(1)") : this.element.querySelector(`tbody > tr:nth-child(${t + 1})`);
|
|
56
59
|
s && this.containerRef.current && (this.containerRef.current.scrollTop = s.offsetTop);
|
|
@@ -103,7 +106,13 @@ const H = class H extends r.Component {
|
|
|
103
106
|
if (this.vs.containerRef = this.containerRef, this.vs.tableBodyRef = this.tableBodyRef, this.vs.table = this.tableElement, this._slicedData = void 0, this.vs instanceof ve) {
|
|
104
107
|
const { rowHeight: s = 0, detail: l, expandField: d } = this.props;
|
|
105
108
|
let { detailRowHeight: p = 0 } = this.props;
|
|
106
|
-
p = l && d ? p : 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(
|
|
109
|
+
p = l && d ? p : 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(
|
|
110
|
+
this.vs,
|
|
111
|
+
this._data.length,
|
|
112
|
+
s,
|
|
113
|
+
p,
|
|
114
|
+
this._data
|
|
115
|
+
)) : this.vs.rowHeightService = new ne(e, s, p);
|
|
107
116
|
const h = this.vs.rowHeightService.totalHeight();
|
|
108
117
|
this.vs.containerHeight = Ce ? Math.min(Re, h) : h;
|
|
109
118
|
}
|
|
@@ -155,57 +164,43 @@ const H = class H extends r.Component {
|
|
|
155
164
|
this.props.onNavigationAction.call(void 0, t);
|
|
156
165
|
}
|
|
157
166
|
}, this.rowClick = (e, t) => {
|
|
158
|
-
this.props.onRowClick && e.target.nodeName === "TD" && this.props.onRowClick.call(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
...this.getArguments(e)
|
|
163
|
-
}
|
|
164
|
-
);
|
|
167
|
+
this.props.onRowClick && e.target.nodeName === "TD" && this.props.onRowClick.call(void 0, {
|
|
168
|
+
dataItem: t.dataItem,
|
|
169
|
+
...this.getArguments(e)
|
|
170
|
+
});
|
|
165
171
|
}, this.rowDblClick = (e, t) => {
|
|
166
|
-
this.props.onRowDoubleClick && e.target.nodeName === "TD" && this.props.onRowDoubleClick.call(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
...this.getArguments(e)
|
|
171
|
-
}
|
|
172
|
-
);
|
|
172
|
+
this.props.onRowDoubleClick && e.target.nodeName === "TD" && this.props.onRowDoubleClick.call(void 0, {
|
|
173
|
+
dataItem: t.dataItem,
|
|
174
|
+
...this.getArguments(e)
|
|
175
|
+
});
|
|
173
176
|
}, this.itemChange = (e) => {
|
|
174
177
|
const t = this.props.onItemChange;
|
|
175
178
|
if (e.field === this.props.expandField || this.props.group && e.field === void 0) {
|
|
176
179
|
const s = this.props.onExpandChange;
|
|
177
|
-
s && s.call(
|
|
178
|
-
void 0,
|
|
179
|
-
{
|
|
180
|
-
...this.getArguments(e.syntheticEvent),
|
|
181
|
-
dataItem: e.dataItem,
|
|
182
|
-
dataIndex: e.dataIndex,
|
|
183
|
-
value: e.value
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
t && t.call(
|
|
189
|
-
void 0,
|
|
190
|
-
{
|
|
180
|
+
s && s.call(void 0, {
|
|
191
181
|
...this.getArguments(e.syntheticEvent),
|
|
192
182
|
dataItem: e.dataItem,
|
|
193
|
-
|
|
183
|
+
dataIndex: e.dataIndex,
|
|
194
184
|
value: e.value
|
|
195
|
-
}
|
|
196
|
-
|
|
185
|
+
});
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
t && t.call(void 0, {
|
|
189
|
+
...this.getArguments(e.syntheticEvent),
|
|
190
|
+
dataItem: e.dataItem,
|
|
191
|
+
dataIndex: e.dataIndex,
|
|
192
|
+
field: e.field,
|
|
193
|
+
value: e.value
|
|
194
|
+
});
|
|
197
195
|
}, this.onHeaderSelectionChange = (e) => {
|
|
198
|
-
this.props.onHeaderSelectionChange && this.props.onHeaderSelectionChange.call(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
selectedField: this.props.selectedField
|
|
207
|
-
}
|
|
208
|
-
);
|
|
196
|
+
this.props.onHeaderSelectionChange && this.props.onHeaderSelectionChange.call(void 0, {
|
|
197
|
+
field: e.field,
|
|
198
|
+
nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
|
|
199
|
+
syntheticEvent: e.syntheticEvent,
|
|
200
|
+
target: this,
|
|
201
|
+
dataItems: this.getLeafDataItems(),
|
|
202
|
+
selectedField: this.props.selectedField
|
|
203
|
+
});
|
|
209
204
|
}, this.selectionRelease = (e) => {
|
|
210
205
|
if (this.props.onSelectionChange) {
|
|
211
206
|
const t = this.getSlicedLeafDataItems()[e.startRowIndex], s = this.getSlicedLeafDataItems()[e.endRowIndex], l = {
|
|
@@ -266,16 +261,13 @@ const H = class H extends r.Component {
|
|
|
266
261
|
if (this.props.onClipboard) {
|
|
267
262
|
if (!this.inActiveElement() || !e)
|
|
268
263
|
return;
|
|
269
|
-
this.props.onClipboard.call(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
...typeof this.props.clipboard != "boolean" ? this.props.clipboard : {}
|
|
277
|
-
}
|
|
278
|
-
);
|
|
264
|
+
this.props.onClipboard.call(void 0, {
|
|
265
|
+
type: e,
|
|
266
|
+
nativeEvent: t,
|
|
267
|
+
columns: this._columns,
|
|
268
|
+
dataItemKey: this.props.dataItemKey || "",
|
|
269
|
+
...typeof this.props.clipboard != "boolean" ? this.props.clipboard : {}
|
|
270
|
+
});
|
|
279
271
|
}
|
|
280
272
|
}, this.inActiveElement = () => {
|
|
281
273
|
var d, p, h;
|
|
@@ -284,24 +276,23 @@ const H = class H extends r.Component {
|
|
|
284
276
|
const e = Ve(this.document), t = e ? e.matches(".k-table-td") ? e : (d = this.document) == null ? void 0 : d.body : (p = this.document) == null ? void 0 : p.body, s = t.closest(".k-grid-container"), l = t && ((h = this._element) == null ? void 0 : h.contains(t));
|
|
285
277
|
return !!(t && l && s);
|
|
286
278
|
}, this.onResize = (e, t, s, l, d, p) => {
|
|
287
|
-
this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}), this.flatData = y((e, t, s, l, d, p, h) => {
|
|
279
|
+
this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(void 0, {
|
|
280
|
+
columns: this.columns,
|
|
281
|
+
nativeEvent: l,
|
|
282
|
+
targetColumnId: p,
|
|
283
|
+
index: e,
|
|
284
|
+
newWidth: t,
|
|
285
|
+
oldWidth: s,
|
|
286
|
+
end: d,
|
|
287
|
+
target: this
|
|
288
|
+
});
|
|
289
|
+
}, this.reInitVirtualization = y(
|
|
290
|
+
(e, t, s, l, d, p) => {
|
|
291
|
+
this.vs.reset();
|
|
292
|
+
const h = this.getVirtualScroll(this.props);
|
|
293
|
+
this.vs = new h(p);
|
|
294
|
+
}
|
|
295
|
+
), this.flatData = y((e, t, s, l, d, p, h) => {
|
|
305
296
|
const g = [], v = vt(
|
|
306
297
|
g,
|
|
307
298
|
e,
|
|
@@ -311,14 +302,14 @@ const H = class H extends r.Component {
|
|
|
311
302
|
d
|
|
312
303
|
);
|
|
313
304
|
return { flattedData: g, resolvedGroupsCount: v };
|
|
314
|
-
}), this.rowHeightService = y(
|
|
315
|
-
(e, t, s) =>
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
(
|
|
321
|
-
), this.filterColumnsByMediaProp = (e) => e.filter((t) => M && t && t.media ? window.matchMedia(t.media).matches : t), this.configureColumns = y((e, t, s) => {
|
|
305
|
+
}), this.rowHeightService = y(
|
|
306
|
+
(e, t, s, l, d) => new ne(t, s, l, d)
|
|
307
|
+
), this.childrenToArray = y((e) => r.Children.toArray(e)), this.readColumns = y((e, t, s) => {
|
|
308
|
+
const l = e.filter(
|
|
309
|
+
(d) => d && d.type && d.type.displayName === "KendoReactGridColumn"
|
|
310
|
+
);
|
|
311
|
+
return Ct(l, this.columns, { prevId: 0, idPrefix: t });
|
|
312
|
+
}), this.mapColumns = y((e, t) => Je(e, !0)), this.filterColumnsByMediaProp = (e) => e.filter((t) => M && t && t.media ? window.matchMedia(t.media).matches : t), this.configureColumns = y((e, t, s) => {
|
|
322
313
|
this.props.selectedField && e.filter((g) => g.field === this.props.selectedField).forEach((g) => {
|
|
323
314
|
g.width = g.width || "50px", g.cell = g.cell || it, g.headerCell = g.headerCell || It;
|
|
324
315
|
});
|
|
@@ -357,38 +348,40 @@ const H = class H extends r.Component {
|
|
|
357
348
|
locked: this.props.lockGroups
|
|
358
349
|
}), h++;
|
|
359
350
|
e.slice(h).forEach((g) => g.parentIndex >= 0 && (g.parentIndex += h));
|
|
360
|
-
}), this.getHeaderRow = y(
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
351
|
+
}), this.getHeaderRow = y(
|
|
352
|
+
(e, t, s, l, d, p, h, g, v, z, E, G, O) => /* @__PURE__ */ r.createElement(
|
|
353
|
+
lt,
|
|
354
|
+
{
|
|
355
|
+
cells: this.props.cells,
|
|
356
|
+
sort: e,
|
|
357
|
+
sortable: t,
|
|
358
|
+
sortChange: this.sortChange,
|
|
359
|
+
group: s || [],
|
|
360
|
+
groupable: l,
|
|
361
|
+
groupChange: this.groupChange,
|
|
362
|
+
filter: d,
|
|
363
|
+
filterable: p,
|
|
364
|
+
filterOperators: h,
|
|
365
|
+
filterChange: this.filterChange,
|
|
366
|
+
columnMenu: v,
|
|
367
|
+
columnMenuIcon: z,
|
|
368
|
+
selectionChange: this.onHeaderSelectionChange,
|
|
369
|
+
columns: E,
|
|
370
|
+
columnResize: this.columnResize,
|
|
371
|
+
pressHandler: this.dragLogic.pressHandler,
|
|
372
|
+
dragHandler: this.dragLogic.dragHandler,
|
|
373
|
+
releaseHandler: this.dragLogic.releaseHandler,
|
|
374
|
+
columnsMap: G,
|
|
375
|
+
cellRender: g,
|
|
376
|
+
isRtl: O,
|
|
377
|
+
dragClue: this.dragLogic.dragClueRef,
|
|
378
|
+
headerRef: this.headerElementRef,
|
|
379
|
+
containerRef: this.containerRef,
|
|
380
|
+
navigatable: !!this.props.navigatable,
|
|
381
|
+
columnGroupChange: this.columnGroupChange
|
|
382
|
+
}
|
|
383
|
+
)
|
|
384
|
+
), this.resolveTitle = (e) => {
|
|
392
385
|
const t = this._columns.find((l) => l.field === e), s = t && (t.title || t.field);
|
|
393
386
|
return s === void 0 ? e : s;
|
|
394
387
|
}, 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), this.handleFocusInEditableRows = () => {
|
|
@@ -546,7 +539,11 @@ const H = class H extends r.Component {
|
|
|
546
539
|
this.initializeVirtualization(a, v);
|
|
547
540
|
const E = this.childrenToArray(this.props.children);
|
|
548
541
|
this.initColumns(E, h);
|
|
549
|
-
const G = E.map((i) => i && i.type && i.type.displayName === "KendoReactGridToolbar" ? r.cloneElement(i, { ...i.props, ariaControls: this._gridId }) : null), O = E.filter(
|
|
542
|
+
const G = E.map((i) => i && i.type && i.type.displayName === "KendoReactGridToolbar" ? r.cloneElement(i, { ...i.props, ariaControls: this._gridId }) : null), O = E.filter(
|
|
543
|
+
(i) => i && i.type && i.type.displayName === "KendoReactGridNoRecords"
|
|
544
|
+
), j = E.filter(
|
|
545
|
+
(i) => i && i.type && i.type.displayName === "KendoReactGridStatusBar"
|
|
546
|
+
), R = this._columns.filter((i) => i.children.length === 0), q = v && /* @__PURE__ */ r.createElement(
|
|
550
547
|
ht,
|
|
551
548
|
{
|
|
552
549
|
group: this.props.group || [],
|
|
@@ -559,7 +556,17 @@ const H = class H extends r.Component {
|
|
|
559
556
|
ariaControls: this._gridId,
|
|
560
557
|
onContextMenu: this.onContextMenu
|
|
561
558
|
}
|
|
562
|
-
), {
|
|
559
|
+
), {
|
|
560
|
+
sort: _e,
|
|
561
|
+
sortable: xe,
|
|
562
|
+
group: ke,
|
|
563
|
+
filter: Te,
|
|
564
|
+
filterable: De,
|
|
565
|
+
filterOperators: He = Se,
|
|
566
|
+
headerCellRender: ze,
|
|
567
|
+
columnMenu: Ae,
|
|
568
|
+
columnMenuIcon: Fe
|
|
569
|
+
} = this.props, J = /* @__PURE__ */ r.createElement(
|
|
563
570
|
at,
|
|
564
571
|
{
|
|
565
572
|
size: t,
|
|
@@ -601,13 +608,7 @@ const H = class H extends r.Component {
|
|
|
601
608
|
ariaRowIndex: this._columnsMap.length + 1
|
|
602
609
|
}
|
|
603
610
|
) || void 0,
|
|
604
|
-
cols: R.map((i, f) => /* @__PURE__ */ r.createElement(
|
|
605
|
-
"col",
|
|
606
|
-
{
|
|
607
|
-
key: f.toString(),
|
|
608
|
-
width: U(i)
|
|
609
|
-
}
|
|
610
|
-
))
|
|
611
|
+
cols: R.map((i, f) => /* @__PURE__ */ r.createElement("col", { key: f.toString(), width: U(i) }))
|
|
611
612
|
}
|
|
612
613
|
), Ne = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, Le = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: Me, hiddenColumns: Ge } = Qe({
|
|
613
614
|
enabled: this.props.columnVirtualization,
|
|
@@ -621,7 +622,10 @@ const H = class H extends r.Component {
|
|
|
621
622
|
row: R.map((u, C) => {
|
|
622
623
|
if (Ge[C])
|
|
623
624
|
return null;
|
|
624
|
-
const N = u.id ? u.id : C, w = m(
|
|
625
|
+
const N = u.id ? u.id : C, w = m(
|
|
626
|
+
s.contentSticky({ locked: u.locked }),
|
|
627
|
+
u.className
|
|
628
|
+
), I = u.left !== void 0 ? this.isRtl ? { left: u.right, right: u.left } : { left: u.left, right: u.right } : {};
|
|
625
629
|
let K = !1;
|
|
626
630
|
if (u.editable && this.props.editField) {
|
|
627
631
|
const x = ye(this.props.editField, i.dataItem);
|
|
@@ -649,7 +653,12 @@ const H = class H extends r.Component {
|
|
|
649
653
|
cells: yt(this.props.cells, u.cells),
|
|
650
654
|
onChange: this.itemChange,
|
|
651
655
|
selectionChange: this.props.onSelectionChange ? (x) => {
|
|
652
|
-
this.selectionChange({
|
|
656
|
+
this.selectionChange({
|
|
657
|
+
event: x,
|
|
658
|
+
dataItem: i.dataItem,
|
|
659
|
+
dataIndex: b,
|
|
660
|
+
columnIndex: C
|
|
661
|
+
});
|
|
653
662
|
} : void 0,
|
|
654
663
|
columnIndex: C,
|
|
655
664
|
columnsCount: R.length,
|
|
@@ -689,78 +698,83 @@ const H = class H extends r.Component {
|
|
|
689
698
|
(this._slicedData || this._data).forEach((b, F) => {
|
|
690
699
|
b.rowType === "data" && (Q++, i++);
|
|
691
700
|
const k = Q % 2 === 0, S = this.props.dataItemKey && je(this.props.dataItemKey)(b.dataItem), u = F + (this.vs.realSkip || 0), C = S || "ai" + u, N = C + "_1", w = Oe(b, C, i, k);
|
|
692
|
-
if (A = u + Z + f, P.push(
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
key: C,
|
|
696
|
-
dataItem: b.dataItem,
|
|
697
|
-
isAltRow: k,
|
|
698
|
-
isInEdit: w.isInEdit,
|
|
699
|
-
rowType: b.rowType,
|
|
700
|
-
isHidden: Y(F),
|
|
701
|
-
onClick: (I) => this.rowClick(I, b),
|
|
702
|
-
onDoubleClick: (I) => this.rowDblClick(I, b),
|
|
703
|
-
selectedField: this.props.selectedField,
|
|
704
|
-
rowHeight: this.props.rowHeight,
|
|
705
|
-
render: this.props.rowRender,
|
|
706
|
-
ariaRowIndex: A,
|
|
707
|
-
absoluteRowIndex: u,
|
|
708
|
-
dataIndex: this.vs.scrollableVirtual && !this.props.groupable ? u : i,
|
|
709
|
-
isSelected: w.isSelected
|
|
710
|
-
},
|
|
711
|
-
w.row
|
|
712
|
-
)), this.props.detail && b.rowType === "data" && b.expanded) {
|
|
713
|
-
const I = R.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
|
|
714
|
-
f++, A = u + Z + f, P.push(/* @__PURE__ */ r.createElement(
|
|
715
|
-
"tr",
|
|
701
|
+
if (A = u + Z + f, P.push(
|
|
702
|
+
/* @__PURE__ */ r.createElement(
|
|
703
|
+
St,
|
|
716
704
|
{
|
|
717
|
-
key:
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
705
|
+
key: C,
|
|
706
|
+
dataItem: b.dataItem,
|
|
707
|
+
isAltRow: k,
|
|
708
|
+
isInEdit: w.isInEdit,
|
|
709
|
+
rowType: b.rowType,
|
|
710
|
+
isHidden: Y(F),
|
|
711
|
+
onClick: (I) => this.rowClick(I, b),
|
|
712
|
+
onDoubleClick: (I) => this.rowDblClick(I, b),
|
|
713
|
+
selectedField: this.props.selectedField,
|
|
714
|
+
rowHeight: this.props.rowHeight,
|
|
715
|
+
render: this.props.rowRender,
|
|
716
|
+
ariaRowIndex: A,
|
|
717
|
+
absoluteRowIndex: u,
|
|
718
|
+
dataIndex: this.vs.scrollableVirtual && !this.props.groupable ? u : i,
|
|
719
|
+
isSelected: w.isSelected
|
|
724
720
|
},
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
721
|
+
w.row
|
|
722
|
+
)
|
|
723
|
+
), this.props.detail && b.rowType === "data" && b.expanded) {
|
|
724
|
+
const I = R.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
|
|
725
|
+
f++, A = u + Z + f, P.push(
|
|
726
|
+
/* @__PURE__ */ r.createElement(
|
|
727
|
+
"tr",
|
|
728
|
+
{
|
|
729
|
+
key: N,
|
|
730
|
+
className: m(s.detailTr({ isAlt: k })),
|
|
731
|
+
style: {
|
|
732
|
+
visibility: Y(F) ? "hidden" : "",
|
|
733
|
+
height: this.props.detailRowHeight
|
|
734
|
+
},
|
|
735
|
+
role: "row",
|
|
736
|
+
"aria-rowindex": A
|
|
737
|
+
},
|
|
738
|
+
this.props.group && this.props.group.map((K, L) => {
|
|
739
|
+
var le;
|
|
740
|
+
const _ = (le = w == null ? void 0 : w.row[L]) == null ? void 0 : le.props.style, x = _ ? this.isRtl ? { left: _.right, right: _.left } : { left: _.left, right: _.right } : {};
|
|
741
|
+
return /* @__PURE__ */ r.createElement(
|
|
742
|
+
Ee,
|
|
743
|
+
{
|
|
744
|
+
id: "",
|
|
745
|
+
dataIndex: b.dataIndex,
|
|
746
|
+
field: K.field,
|
|
747
|
+
dataItem: b.dataItem,
|
|
748
|
+
key: L,
|
|
749
|
+
style: x,
|
|
750
|
+
ariaColumnIndex: 1 + L,
|
|
751
|
+
isSelected: !1,
|
|
752
|
+
locked: this.props.lockGroups,
|
|
753
|
+
isRtl: this.isRtl,
|
|
754
|
+
cells: this.props.cells
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
}),
|
|
758
|
+
this.props.expandField && /* @__PURE__ */ r.createElement(
|
|
759
|
+
Dt,
|
|
730
760
|
{
|
|
731
|
-
id:
|
|
732
|
-
|
|
733
|
-
|
|
761
|
+
id: D.generateNavigatableId(`${N}-dhcell`, n)
|
|
762
|
+
}
|
|
763
|
+
),
|
|
764
|
+
/* @__PURE__ */ r.createElement(
|
|
765
|
+
Tt,
|
|
766
|
+
{
|
|
767
|
+
onContextMenu: this.onContextMenu,
|
|
734
768
|
dataItem: b.dataItem,
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
isRtl: this.isRtl,
|
|
741
|
-
cells: this.props.cells
|
|
769
|
+
dataIndex: b.dataIndex,
|
|
770
|
+
colSpan: I,
|
|
771
|
+
ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
|
|
772
|
+
detail: this.props.detail,
|
|
773
|
+
id: D.generateNavigatableId(`${N}-dcell`, n)
|
|
742
774
|
}
|
|
743
|
-
)
|
|
744
|
-
}),
|
|
745
|
-
this.props.expandField && /* @__PURE__ */ r.createElement(
|
|
746
|
-
Dt,
|
|
747
|
-
{
|
|
748
|
-
id: D.generateNavigatableId(`${N}-dhcell`, n)
|
|
749
|
-
}
|
|
750
|
-
),
|
|
751
|
-
/* @__PURE__ */ r.createElement(
|
|
752
|
-
Tt,
|
|
753
|
-
{
|
|
754
|
-
onContextMenu: this.onContextMenu,
|
|
755
|
-
dataItem: b.dataItem,
|
|
756
|
-
dataIndex: b.dataIndex,
|
|
757
|
-
colSpan: I,
|
|
758
|
-
ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
|
|
759
|
-
detail: this.props.detail,
|
|
760
|
-
id: D.generateNavigatableId(`${N}-dcell`, n)
|
|
761
|
-
}
|
|
775
|
+
)
|
|
762
776
|
)
|
|
763
|
-
)
|
|
777
|
+
);
|
|
764
778
|
}
|
|
765
779
|
});
|
|
766
780
|
} else
|
|
@@ -768,22 +782,14 @@ const H = class H extends r.Component {
|
|
|
768
782
|
const Pe = () => {
|
|
769
783
|
const i = this._header;
|
|
770
784
|
return i && i.table && i.table.clientWidth;
|
|
771
|
-
}, ee = () => /* @__PURE__ */ r.createElement(
|
|
785
|
+
}, ee = () => /* @__PURE__ */ r.createElement("div", { key: "no-records", className: m(s.noRecords({})), style: { width: Pe() } }, /* @__PURE__ */ r.createElement(
|
|
772
786
|
"div",
|
|
773
787
|
{
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
style: { width: Pe() }
|
|
788
|
+
className: m(s.noRecordsTemplate({})),
|
|
789
|
+
[st]: D.generateNavigatableId("no-records", n)
|
|
777
790
|
},
|
|
778
|
-
/* @__PURE__ */ r.createElement(
|
|
779
|
-
|
|
780
|
-
{
|
|
781
|
-
className: m(s.noRecordsTemplate({})),
|
|
782
|
-
[st]: D.generateNavigatableId("no-records", n)
|
|
783
|
-
},
|
|
784
|
-
O.length ? O : /* @__PURE__ */ r.createElement(_t, null)
|
|
785
|
-
)
|
|
786
|
-
), te = {
|
|
791
|
+
O.length ? O : /* @__PURE__ */ r.createElement(_t, null)
|
|
792
|
+
)), te = {
|
|
787
793
|
size: t,
|
|
788
794
|
onPageChange: this.pagerPageChange,
|
|
789
795
|
total: a,
|
|
@@ -792,18 +798,10 @@ const H = class H extends r.Component {
|
|
|
792
798
|
take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
|
|
793
799
|
messagesMap: ut,
|
|
794
800
|
...kt(this.props.pageable || {})
|
|
795
|
-
}, se = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...te }) : /* @__PURE__ */ r.createElement(Ze, { className: m(s.pager({})), ...te }), We = (i, f) => /* @__PURE__ */ r.createElement(
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
width: U(i)
|
|
800
|
-
}
|
|
801
|
-
), ie = (ae = this.props.cells) != null && ae.footerCell || this._columns.some(
|
|
802
|
-
(i) => {
|
|
803
|
-
var f;
|
|
804
|
-
return !!(i.footerCell || (f = i.cells) != null && f.footerCell);
|
|
805
|
-
}
|
|
806
|
-
) ? /* @__PURE__ */ r.createElement(
|
|
801
|
+
}, se = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...te }) : /* @__PURE__ */ r.createElement(Ze, { className: m(s.pager({})), ...te }), We = (i, f) => /* @__PURE__ */ r.createElement("col", { key: f.toString(), width: U(i) }), ie = (ae = this.props.cells) != null && ae.footerCell || this._columns.some((i) => {
|
|
802
|
+
var f;
|
|
803
|
+
return !!(i.footerCell || (f = i.cells) != null && f.footerCell);
|
|
804
|
+
}) ? /* @__PURE__ */ r.createElement(
|
|
807
805
|
dt,
|
|
808
806
|
{
|
|
809
807
|
size: t,
|
|
@@ -830,16 +828,14 @@ const H = class H extends r.Component {
|
|
|
830
828
|
this.columnResize.colGroupMain = i;
|
|
831
829
|
}
|
|
832
830
|
},
|
|
833
|
-
R.map(
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
)
|
|
842
|
-
)
|
|
831
|
+
R.map((i, f) => /* @__PURE__ */ r.createElement(
|
|
832
|
+
"col",
|
|
833
|
+
{
|
|
834
|
+
key: f.toString(),
|
|
835
|
+
className: we(i.field, this.props.sort) ? m(s.sorted({})) : void 0,
|
|
836
|
+
width: U(i)
|
|
837
|
+
}
|
|
838
|
+
))
|
|
843
839
|
), re = this.dragLogic.reorderable || this.dragLogic.groupable;
|
|
844
840
|
if (this.props.scrollable === "none")
|
|
845
841
|
return /* @__PURE__ */ r.createElement(V.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
|
|
@@ -847,10 +843,7 @@ const H = class H extends r.Component {
|
|
|
847
843
|
{
|
|
848
844
|
id: this.props.id,
|
|
849
845
|
style: this.props.style,
|
|
850
|
-
className: m(
|
|
851
|
-
s.wrapper({ size: t }),
|
|
852
|
-
this.props.className
|
|
853
|
-
),
|
|
846
|
+
className: m(s.wrapper({ size: t }), this.props.className),
|
|
854
847
|
ref: (i) => {
|
|
855
848
|
this._element = i;
|
|
856
849
|
},
|
|
@@ -878,7 +871,15 @@ const H = class H extends r.Component {
|
|
|
878
871
|
},
|
|
879
872
|
oe,
|
|
880
873
|
J,
|
|
881
|
-
/* @__PURE__ */ r.createElement(
|
|
874
|
+
/* @__PURE__ */ r.createElement(
|
|
875
|
+
"tbody",
|
|
876
|
+
{
|
|
877
|
+
role: "rowgroup",
|
|
878
|
+
className: m(s.tbody({})),
|
|
879
|
+
...ge
|
|
880
|
+
},
|
|
881
|
+
P
|
|
882
|
+
),
|
|
882
883
|
ie
|
|
883
884
|
)
|
|
884
885
|
),
|
|
@@ -1008,17 +1009,14 @@ const H = class H extends r.Component {
|
|
|
1008
1009
|
const l = { ...this.getArguments(e), ...n, targetEvent: t };
|
|
1009
1010
|
a.call(void 0, l);
|
|
1010
1011
|
} else
|
|
1011
|
-
s && s.call(
|
|
1012
|
-
|
|
1013
|
-
{
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
...this.getDataState(),
|
|
1018
|
-
...c
|
|
1019
|
-
}
|
|
1012
|
+
s && s.call(void 0, {
|
|
1013
|
+
...this.getArguments(e),
|
|
1014
|
+
targetEvent: t || {},
|
|
1015
|
+
dataState: {
|
|
1016
|
+
...this.getDataState(),
|
|
1017
|
+
...c
|
|
1020
1018
|
}
|
|
1021
|
-
);
|
|
1019
|
+
});
|
|
1022
1020
|
}
|
|
1023
1021
|
columnReorder(a, n, c) {
|
|
1024
1022
|
const e = this._columns[a], t = e.depth, s = (h) => {
|
|
@@ -1073,7 +1071,10 @@ const H = class H extends r.Component {
|
|
|
1073
1071
|
}
|
|
1074
1072
|
initColumns(a, n) {
|
|
1075
1073
|
const c = D.getIdPrefix(this.navigationStateRef), e = this.readColumns(a, c, this._columnsMutations), t = this.filterColumnsByMediaProp(e);
|
|
1076
|
-
this._columns = t, this._columns.length === 0 && (this._columns = wt(this.props.data, this.props.group, this.props.expandField, {
|
|
1074
|
+
this._columns = t, this._columns.length === 0 && (this._columns = wt(this.props.data, this.props.group, this.props.expandField, {
|
|
1075
|
+
prevId: 0,
|
|
1076
|
+
idPrefix: c
|
|
1077
|
+
})), this.configureColumns(this._columns, n, c), this._columnsMap = this.mapColumns(this._columns, this._columnsMutations), this.columnResize.columns = this._columns, this.dragLogic.columns = this._columns;
|
|
1077
1078
|
}
|
|
1078
1079
|
getDataState() {
|
|
1079
1080
|
return {
|
|
@@ -1121,15 +1122,10 @@ H.displayName = "KendoReactGrid", H.defaultProps = {
|
|
|
1121
1122
|
responsive: o.bool,
|
|
1122
1123
|
info: o.bool,
|
|
1123
1124
|
type: o.oneOf(["numeric", "input"]),
|
|
1124
|
-
pageSizes: o.oneOfType(
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
o.string,
|
|
1129
|
-
o.number
|
|
1130
|
-
]))
|
|
1131
|
-
]
|
|
1132
|
-
),
|
|
1125
|
+
pageSizes: o.oneOfType([
|
|
1126
|
+
o.bool,
|
|
1127
|
+
o.arrayOf(o.oneOfType([o.string, o.number]))
|
|
1128
|
+
]),
|
|
1133
1129
|
previousNext: o.bool
|
|
1134
1130
|
})
|
|
1135
1131
|
]),
|