@progress/kendo-react-grid 8.3.0-develop.8 → 8.3.0

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