@progress/kendo-react-grid 8.2.0-develop.8 → 8.2.0-develop.9

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
@@ -8,38 +8,38 @@
8
8
  "use client";
9
9
  import * as r from "react";
10
10
  import o from "prop-types";
11
- import { RowHeightService as re, dispatchEvent as Ge, canUseDOM as L, getActiveElement as Oe, memoizeOne as S, validatePackage as Ke, shouldShowValidationUI as Ve, setScrollbarWidth as ae, getter as Ue, classNames as M, kendoThemeMaps as O, WatermarkOverlay as Be } from "@progress/kendo-react-common";
12
- import { tableKeyboardNavigationTools as k, tableKeyboardNavigation as _, getSelectionOptions as le, mapColumns as We, ClipboardService as $e, TableKeyboardNavigationContext as U, isRtl as je, tableColumnsVirtualization as qe, Pager as Je, tableKeyboardNavigationScopeAttributes as ne, TableSelection as he, tableKeyboardNavigationBodyAttributes as pe, DropClue as de, DragClue as ce, updateLeft as Xe, updateRight as Ye, KEYBOARD_NAV_DATA_ID as Qe } from "@progress/kendo-react-data-tools";
13
- import { GridSelectionCell as Ze } from "./cells/GridSelectionCell.mjs";
14
- import { GridHierarchyCell as et } from "./cells/GridHierarchyCell.mjs";
15
- import { GridEditCell as tt } from "./cells/GridEditCell.mjs";
16
- import { Header as st } from "./header/Header.mjs";
17
- import { HeaderRow as it } from "./header/HeaderRow.mjs";
18
- import { FilterRow as ot } from "./header/FilterRow.mjs";
19
- import { GroupPanel as rt } from "./header/GroupPanel.mjs";
20
- import { Footer as at } from "./footer/Footer.mjs";
21
- import { provideLocalizationService as lt, registerForLocalization as nt } from "@progress/kendo-react-intl";
22
- import { pagerMessagesMap as ht, gridAriaLabel as ue, messages as pt } from "./messages/index.mjs";
23
- import { VirtualScroll as dt } from "./VirtualScroll.mjs";
11
+ import { RowHeightService as re, getScrollbarWidth as Ge, dispatchEvent as Oe, canUseDOM as L, getActiveElement as Ke, memoizeOne as w, validatePackage as We, shouldShowValidationUI as Ve, setScrollbarWidth as ae, getter as Ue, classNames as M, kendoThemeMaps as O, WatermarkOverlay as Be } from "@progress/kendo-react-common";
12
+ import { tableKeyboardNavigationTools as k, tableKeyboardNavigation as _, getSelectionOptions as le, mapColumns as $e, ClipboardService as je, TableKeyboardNavigationContext as V, isRtl as qe, tableColumnsVirtualization as Je, Pager as Xe, tableKeyboardNavigationScopeAttributes as ne, TableSelection as he, tableKeyboardNavigationBodyAttributes as pe, DropClue as de, DragClue as ce, updateLeft as Ye, updateRight as Qe, KEYBOARD_NAV_DATA_ID as Ze } from "@progress/kendo-react-data-tools";
13
+ import { GridSelectionCell as et } from "./cells/GridSelectionCell.mjs";
14
+ import { GridHierarchyCell as tt } from "./cells/GridHierarchyCell.mjs";
15
+ import { GridEditCell as st } from "./cells/GridEditCell.mjs";
16
+ import { Header as it } from "./header/Header.mjs";
17
+ import { HeaderRow as ot } from "./header/HeaderRow.mjs";
18
+ import { FilterRow as rt } from "./header/FilterRow.mjs";
19
+ import { GroupPanel as at } from "./header/GroupPanel.mjs";
20
+ import { Footer as lt } from "./footer/Footer.mjs";
21
+ import { provideLocalizationService as nt, registerForLocalization as ht } from "@progress/kendo-react-intl";
22
+ import { pagerMessagesMap as pt, gridAriaLabel as ue, messages as dt } from "./messages/index.mjs";
23
+ import { VirtualScroll as ct } from "./VirtualScroll.mjs";
24
24
  import { VirtualScrollFixed as ge } from "./VirtualScrollFixed.mjs";
25
- import { ColumnResize as ct } from "./drag/ColumnResize.mjs";
26
- import { CommonDragLogic as ut } from "./drag/CommonDragLogic.mjs";
27
- import { firefox as me, firefoxMaxHeight as fe, flatData as gt, readColumns as mt, sanitizeColumns as ft, getColumnWidth as B, autoGenerateColumns as vt, getNestedValue as ve, resolveCells as bt } from "./utils/index.mjs";
28
- import { GridCell as Ct } from "./cells/GridCell.mjs";
29
- import { GridGroupCell as be } from "./cells/GridGroupCell.mjs";
30
- import { GridRow as Rt } from "./rows/GridRow.mjs";
31
- import { GridHeaderSelectionCell as yt } from "./header/GridHeaderSelectionCell.mjs";
25
+ import { ColumnResize as ut } from "./drag/ColumnResize.mjs";
26
+ import { CommonDragLogic as gt } from "./drag/CommonDragLogic.mjs";
27
+ import { firefox as me, firefoxMaxHeight as fe, flatData as mt, readColumns as ft, sanitizeColumns as bt, getColumnWidth as U, autoGenerateColumns as vt, getNestedValue as be, resolveCells as Ct } from "./utils/index.mjs";
28
+ import { GridCell as Rt } from "./cells/GridCell.mjs";
29
+ import { GridGroupCell as ve } from "./cells/GridGroupCell.mjs";
30
+ import { GridRow as yt } from "./rows/GridRow.mjs";
31
+ import { GridHeaderSelectionCell as St } from "./header/GridHeaderSelectionCell.mjs";
32
32
  import { GridNoRecords as wt } from "./GridNoRecords.mjs";
33
33
  import { operators as Ce } from "./filterCommon.mjs";
34
- import { FooterRow as St } from "./footer/FooterRow.mjs";
35
- import { normalize as It } from "./paging/GridPagerSettings.mjs";
34
+ import { FooterRow as It } from "./footer/FooterRow.mjs";
35
+ import { normalize as kt } from "./paging/GridPagerSettings.mjs";
36
36
  import { packageMetadata as Re } from "./package-metadata.mjs";
37
- import { GridDetailCell as kt } from "./cells/GridDetailCell.mjs";
38
- import { GridDetailHierarchyCell as Et } from "./cells/GridDetailHierarchyCell.mjs";
39
- import { SAFARI_REGEX as xt } from "./constants/index.mjs";
37
+ import { GridDetailCell as Et } from "./cells/GridDetailCell.mjs";
38
+ import { GridDetailHierarchyCell as xt } from "./cells/GridDetailHierarchyCell.mjs";
39
+ import { SAFARI_REGEX as _t } from "./constants/index.mjs";
40
40
  const z = class z extends r.Component {
41
41
  constructor(a) {
42
- super(a), this._columns = [], this._columnsMap = [[]], this._columnsMutations = 0, this._resized = !1, this._focusFirst = !1, this._shouldUpdateLeftRight = !0, this.contextStateRef = { current: void 0 }, this.navigationStateRef = { current: void 0 }, this._data = [], this._slicedData = void 0, this.wrapperScrollTop = 0, this.showLicenseWatermark = !1, this.headerRef = r.createRef(), this.headerElementRef = r.createRef(), this._element = null, this.tableElement = null, this.containerRef = r.createRef(), this.tableBodyRef = r.createRef(), this._footer = null, this.forceUpdateTimeout = void 0, this.isRtl = !1, this.headTable = null, this.observer = null, this.handleIntersection = (e) => {
42
+ super(a), this._columns = [], this._columnsMap = [[]], this._columnsMutations = 0, this._resized = !1, this._focusFirst = !1, this._shouldUpdateLeftRight = !0, this._scrollbarWidth = void 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) => {
43
43
  const t = { rowIndex: this.rowIndex };
44
44
  e.forEach((s) => {
45
45
  s.isIntersecting || this.setCurrentOnTop(t);
@@ -83,7 +83,7 @@ const z = class z extends r.Component {
83
83
  }
84
84
  }, this.getVirtualScroll = (e) => {
85
85
  const { rowHeight: t, detailRowHeight: s, detail: l, expandField: p, groupable: n } = e, d = this.isAllData(), f = t !== void 0 && t > 0, R = s !== void 0 && s > 0, E = n === !0 || typeof n == "object" && n.enabled !== !1;
86
- return !f || E && !d || !!(l && p) && (!R || !d) ? dt : ge;
86
+ return !f || E && !d || !!(l && p) && (!R || !d) ? ct : ge;
87
87
  }, this.isAllData = () => {
88
88
  const { data: e, total: t } = this.props;
89
89
  return Array.isArray(e) ? e.length === t : e ? t === e.total : !1;
@@ -107,14 +107,14 @@ const z = class z extends r.Component {
107
107
  const d = this.vs.rowHeightService.totalHeight();
108
108
  this.vs.containerHeight = me ? Math.min(fe, d) : d;
109
109
  }
110
- }, this.scrollHandler = (e) => {
110
+ }, this.getCachedScrollbarWidth = () => (this._scrollbarWidth || (this._scrollbarWidth = Ge() || void 0), this._scrollbarWidth), this.scrollHandler = (e) => {
111
111
  if (e.target !== e.currentTarget)
112
112
  return;
113
113
  clearTimeout(this.forceUpdateTimeout), this.vs.table = this.tableElement;
114
114
  const t = e.currentTarget.scrollLeft, s = e.currentTarget.scrollTop;
115
115
  this.props.columnVirtualization && (!this.vs.scrollableVirtual || s === this.wrapperScrollTop) && (this.forceUpdateTimeout = window.setTimeout(() => {
116
116
  this.forceUpdate();
117
- }, 0)), this._header && this._header.setScrollLeft(t), this._footer && this._footer.setScrollLeft(t), this.vs && s !== this.wrapperScrollTop && this.vs.scrollHandler(e), Ge(this.props.onScroll, e, this, void 0), this.wrapperScrollTop = s;
117
+ }, 0)), this._header && this._header.setScrollLeft(t), this._footer && this._footer.setScrollLeft(t), this.vs && s !== this.wrapperScrollTop && this.vs.scrollHandler(e), Oe(this.props.onScroll, e, this, void 0), this.wrapperScrollTop = s;
118
118
  }, this.onKeyDown = (e) => {
119
119
  if (_.onKeyDown(e, {
120
120
  contextStateRef: this.contextStateRef,
@@ -278,7 +278,7 @@ const z = class z extends r.Component {
278
278
  var p, n, d;
279
279
  if (!L)
280
280
  return !1;
281
- const e = Oe(this.document), t = e ? e.matches(".k-table-td") ? e : (p = this.document) == null ? void 0 : p.body : (n = this.document) == null ? void 0 : n.body, s = t.closest(".k-grid-container"), l = t && ((d = this._element) == null ? void 0 : d.contains(t));
281
+ const e = Ke(this.document), t = e ? e.matches(".k-table-td") ? e : (p = this.document) == null ? void 0 : p.body : (n = this.document) == null ? void 0 : n.body, s = t.closest(".k-grid-container"), l = t && ((d = this._element) == null ? void 0 : d.contains(t));
282
282
  return !!(t && l && s);
283
283
  }, this.onResize = (e, t, s, l, p, n) => {
284
284
  this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(
@@ -294,12 +294,12 @@ const z = class z extends r.Component {
294
294
  target: this
295
295
  }
296
296
  );
297
- }, this.reInitVirtualization = S((e, t, s, l, p, n) => {
297
+ }, this.reInitVirtualization = w((e, t, s, l, p, n) => {
298
298
  this.vs.reset();
299
299
  const d = this.getVirtualScroll(this.props);
300
300
  this.vs = new d(n);
301
- }), this.flatData = S((e, t, s, l, p, n, d) => {
302
- const f = [], R = gt(
301
+ }), this.flatData = w((e, t, s, l, p, n, d) => {
302
+ const f = [], R = mt(
303
303
  f,
304
304
  e,
305
305
  t,
@@ -308,13 +308,13 @@ const z = class z extends r.Component {
308
308
  p
309
309
  );
310
310
  return { flattedData: f, resolvedGroupsCount: R };
311
- }), this.rowHeightService = S((e, t, s, l, p) => new re(t, s, l, p)), this.childrenToArray = S((e) => r.Children.toArray(e)), this.readColumns = S(
311
+ }), this.rowHeightService = w((e, t, s, l, p) => new re(t, s, l, p)), this.childrenToArray = w((e) => r.Children.toArray(e)), this.readColumns = w(
312
312
  (e, t, s) => {
313
313
  const l = e.filter((p) => p && p.type && p.type.displayName === "KendoReactGridColumn");
314
- return mt(l, this.columns, { prevId: 0, idPrefix: t });
314
+ return ft(l, this.columns, { prevId: 0, idPrefix: t });
315
315
  }
316
- ), this.mapColumns = S(
317
- (e, t) => We(e, !0)
316
+ ), this.mapColumns = w(
317
+ (e, t) => $e(e, !0)
318
318
  ), this.filterHiddenColumns = (e) => {
319
319
  const t = (s) => {
320
320
  const l = s;
@@ -327,9 +327,9 @@ const z = class z extends r.Component {
327
327
  };
328
328
  };
329
329
  return [...e].filter((s) => r.isValidElement(s) && !s.props.hidden).filter((s) => L && s && r.isValidElement(s) && s.props.media ? window.matchMedia(s.props.media).matches : s).map((s) => t(s));
330
- }, this.configureColumns = S((e, t, s) => {
330
+ }, this.configureColumns = w((e, t, s) => {
331
331
  this.props.selectedField && e.filter((n) => n.field === this.props.selectedField).forEach((n) => {
332
- n.width = n.width || "50px", n.cell = n.cell || Ze, n.headerCell = n.headerCell || yt;
332
+ n.width = n.width || "50px", n.cell = n.cell || et, n.headerCell = n.headerCell || St;
333
333
  });
334
334
  const l = {
335
335
  id: "",
@@ -353,7 +353,7 @@ const z = class z extends r.Component {
353
353
  let p = 0;
354
354
  this.props.expandField && this.props.onExpandChange && this.props.detail && (e.unshift({
355
355
  ...l,
356
- cell: et,
356
+ cell: tt,
357
357
  field: this.props.expandField,
358
358
  headerClassName: "k-hierarchy-cell k-header"
359
359
  }), p++);
@@ -361,13 +361,13 @@ const z = class z extends r.Component {
361
361
  e.unshift({
362
362
  ...l,
363
363
  isAccessible: !1,
364
- cell: be,
364
+ cell: ve,
365
365
  field: "value",
366
366
  locked: this.props.lockGroups
367
367
  }), p++;
368
368
  e.slice(p).forEach((n) => n.parentIndex >= 0 && (n.parentIndex += p));
369
- }), this.getHeaderRow = S((e, t, s, l, p, n, d, f, R, E, D, C, A) => /* @__PURE__ */ r.createElement(
370
- it,
369
+ }), this.getHeaderRow = w((e, t, s, l, p, n, d, f, R, E, D, C, A) => /* @__PURE__ */ r.createElement(
370
+ ot,
371
371
  {
372
372
  cells: this.props.cells,
373
373
  sort: e,
@@ -400,13 +400,13 @@ const z = class z extends r.Component {
400
400
  )), this.resolveTitle = (e) => {
401
401
  const t = this._columns.find((l) => l.field === e), s = t && (t.title || t.field);
402
402
  return s === void 0 ? e : s;
403
- }, 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), Ke(Re), this.showLicenseWatermark = Ve(Re);
403
+ }, 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), We(Re), this.showLicenseWatermark = Ve(Re);
404
404
  const h = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1, c = this.getVirtualScroll(a);
405
- this.vs = new c(h || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new ut(
405
+ this.vs = new c(h || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new gt(
406
406
  this.columnReorder.bind(this),
407
407
  this.groupReorder.bind(this),
408
408
  this.columnToGroup.bind(this)
409
- ), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new ct(this.onResize), this.props.clipboard && (this.clipboardService = new $e(this.onClipboard)), _.onConstructor({
409
+ ), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new ut(this.onResize), this.props.clipboard && (this.clipboardService = new je(this.onClipboard)), _.onConstructor({
410
410
  navigatable: !!a.navigatable,
411
411
  contextStateRef: this.contextStateRef,
412
412
  navigationStateRef: this.navigationStateRef,
@@ -455,7 +455,7 @@ const z = class z extends r.Component {
455
455
  // tslint:enable:max-line-length
456
456
  get columns() {
457
457
  const a = this._columns.filter((h) => h.declarationIndex >= 0 && h.parentIndex === -1);
458
- return ft(a);
458
+ return bt(a);
459
459
  }
460
460
  /**
461
461
  * Returns the HTML element of the Grid component.
@@ -478,8 +478,8 @@ const z = class z extends r.Component {
478
478
  */
479
479
  componentDidMount() {
480
480
  var c;
481
- this.props.columnVirtualization && !navigator.userAgent.match(xt) && (this.headTable && (this.headTable.style.display = "block"), this.tableElement && (this.tableElement.style.display = "block")), this.resetTableWidth(), ae();
482
- const a = je(this.element);
481
+ this.props.columnVirtualization && !navigator.userAgent.match(_t) && (this.headTable && (this.headTable.style.display = "block"), this.tableElement && (this.tableElement.style.display = "block")), this.resetTableWidth(), ae(this.getCachedScrollbarWidth());
482
+ const a = qe(this.element);
483
483
  this.isRtl = a, _.onComponentDidMount({
484
484
  scope: this.element || void 0,
485
485
  contextStateRef: this.contextStateRef,
@@ -505,7 +505,7 @@ const z = class z extends r.Component {
505
505
  * @hidden
506
506
  */
507
507
  componentDidUpdate() {
508
- this.resetTableWidth(), ae(), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), _.onComponentDidUpdate({
508
+ this.resetTableWidth(), ae(this.getCachedScrollbarWidth()), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), _.onComponentDidUpdate({
509
509
  scope: this.element || void 0,
510
510
  contextStateRef: this.contextStateRef,
511
511
  navigationStateRef: this.navigationStateRef,
@@ -525,7 +525,7 @@ const z = class z extends r.Component {
525
525
  render() {
526
526
  var ie;
527
527
  let a = this.props.total || 0;
528
- const h = k.getIdPrefix(this.navigationStateRef), c = lt(this);
528
+ const h = k.getIdPrefix(this.navigationStateRef), c = nt(this);
529
529
  let e = [];
530
530
  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);
531
531
  const t = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", s = this.props.scrollable === "virtual", { resolvedGroupsCount: l, flattedData: p } = this.flatData(
@@ -545,7 +545,7 @@ const z = class z extends r.Component {
545
545
  const f = this.childrenToArray(this.props.children);
546
546
  this.initColumns(f, l);
547
547
  const R = f.map((i) => i && i.type && i.type.displayName === "KendoReactGridToolbar" ? r.cloneElement(i, { ...i.props, ariaControls: this._gridId }) : null), E = f.filter((i) => i && i.type && i.type.displayName === "KendoReactGridNoRecords"), D = f.filter((i) => i && i.type && i.type.displayName === "KendoReactGridStatusBar"), C = this._columns.filter((i) => i.children.length === 0), A = n && /* @__PURE__ */ r.createElement(
548
- rt,
548
+ at,
549
549
  {
550
550
  group: this.props.group || [],
551
551
  groupChange: this.groupChange,
@@ -557,20 +557,21 @@ const z = class z extends r.Component {
557
557
  ariaControls: this._gridId,
558
558
  onContextMenu: this.onContextMenu
559
559
  }
560
- ), { sort: ye, sortable: we, group: Se, filter: Ie, filterable: ke, filterOperators: Ee = Ce, headerCellRender: xe, columnMenu: _e, columnMenuIcon: ze } = this.props, $ = /* @__PURE__ */ r.createElement(
561
- st,
560
+ ), { sort: ye, sortable: Se, group: we, filter: Ie, filterable: ke, filterOperators: Ee = Ce, headerCellRender: xe, columnMenu: _e, columnMenuIcon: ze } = this.props, $ = /* @__PURE__ */ r.createElement(
561
+ it,
562
562
  {
563
563
  size: this.props.size,
564
564
  columnResize: this.columnResize,
565
565
  staticHeaders: this.props.scrollable !== "none",
566
566
  scrollableDataElement: () => this.vs.container,
567
+ hasScrollbarWidth: !!this.getCachedScrollbarWidth(),
567
568
  draggable: this.props.reorderable || n,
568
569
  ref: this.headerRef,
569
570
  elemRef: this.headerElementRef,
570
571
  headerRow: this.getHeaderRow(
571
572
  ye,
572
- we,
573
573
  Se,
574
+ we,
574
575
  n,
575
576
  Ie,
576
577
  ke,
@@ -583,7 +584,7 @@ const z = class z extends r.Component {
583
584
  this.isRtl
584
585
  ),
585
586
  filterRow: this.props.filterable && /* @__PURE__ */ r.createElement(
586
- ot,
587
+ rt,
587
588
  {
588
589
  cells: this.props.cells,
589
590
  size: this.props.size,
@@ -601,53 +602,53 @@ const z = class z extends r.Component {
601
602
  "col",
602
603
  {
603
604
  key: g.toString(),
604
- width: B(i)
605
+ width: U(i)
605
606
  }
606
607
  ))
607
608
  }
608
- ), De = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, Te = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns: Fe } = qe({
609
+ ), De = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, Te = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns: Fe } = Je({
609
610
  enabled: this.props.columnVirtualization,
610
611
  columns: C,
611
612
  tableViewPortWidth: Te,
612
613
  scrollLeft: De
613
614
  }), Ne = (i, g, m) => {
614
615
  let x = !1;
615
- const I = this.props.selectedField ? ve(this.props.selectedField, i.dataItem) : void 0;
616
+ const I = this.props.selectedField ? be(this.props.selectedField, i.dataItem) : void 0;
616
617
  return {
617
- row: C.map((u, v) => {
618
- if (Fe[v])
618
+ row: C.map((u, b) => {
619
+ if (Fe[b])
619
620
  return null;
620
- const H = u.id ? u.id : v, F = `${u.className ? u.className + " " : ""}${u.locked ? "k-grid-content-sticky" : ""}`, y = u.left !== void 0 ? this.isRtl ? { left: u.right, right: u.left } : { left: u.left, right: u.right } : {};
621
- let w = !1;
621
+ const H = u.id ? u.id : b, F = `${u.className ? u.className + " " : ""}${u.locked ? "k-grid-content-sticky" : ""}`, y = u.left !== void 0 ? this.isRtl ? { left: u.right, right: u.left } : { left: u.left, right: u.right } : {};
622
+ let S = !1;
622
623
  if (u.editable && this.props.editField) {
623
- const b = ve(this.props.editField, i.dataItem);
624
- b && (b === !0 || b === u.field) && (x = !0, w = !0);
624
+ const v = be(this.props.editField, i.dataItem);
625
+ v && (v === !0 || v === u.field) && (x = !0, S = !0);
625
626
  }
626
- const V = u.cell || w && tt || Ct, N = this.props.expandField && this.props.detail && u.field === this.props.expandField;
627
+ const W = u.cell || S && st || Rt, N = this.props.expandField && this.props.detail && u.field === this.props.expandField;
627
628
  return /* @__PURE__ */ r.createElement(
628
- V,
629
+ W,
629
630
  {
630
631
  onContextMenu: this.onContextMenu,
631
632
  key: H,
632
633
  locked: this.props.lockGroups,
633
634
  id: k.generateNavigatableId(
634
- `${g}-${String(v)}`,
635
+ `${g}-${String(b)}`,
635
636
  h,
636
637
  N || i.rowType === "groupHeader" || i.rowType === "groupFooter" || u.field === "value" ? "nodata" : "cell"
637
638
  ),
638
- colSpan: He[v],
639
+ colSpan: He[b],
639
640
  dataItem: i.dataItem,
640
641
  field: u.field,
641
642
  editor: u.editor,
642
643
  format: u.format,
643
644
  className: F,
644
645
  render: this.props.cellRender,
645
- cells: bt(this.props.cells, u.cells),
646
+ cells: Ct(this.props.cells, u.cells),
646
647
  onChange: this.itemChange,
647
- selectionChange: this.props.onSelectionChange ? (b) => {
648
- this.selectionChange({ event: b, dataItem: i.dataItem, dataIndex: m, columnIndex: v });
648
+ selectionChange: this.props.onSelectionChange ? (v) => {
649
+ this.selectionChange({ event: v, dataItem: i.dataItem, dataIndex: m, columnIndex: b });
649
650
  } : void 0,
650
- columnIndex: v,
651
+ columnIndex: b,
651
652
  columnsCount: C.length,
652
653
  rowType: i.rowType,
653
654
  level: i.level,
@@ -655,7 +656,7 @@ const z = class z extends r.Component {
655
656
  dataIndex: i.dataIndex,
656
657
  style: y,
657
658
  ariaColumnIndex: u.ariaColumnIndex,
658
- isSelected: Array.isArray(I) && I.indexOf(v) > -1
659
+ isSelected: Array.isArray(I) && I.indexOf(b) > -1
659
660
  }
660
661
  );
661
662
  }),
@@ -682,9 +683,9 @@ const z = class z extends r.Component {
682
683
  let i = -1, g = 0;
683
684
  (this._slicedData || this._data).forEach((m, x) => {
684
685
  m.rowType === "data" && (J++, i++);
685
- const I = J % 2 === 0, u = this.props.dataItemKey && Ue(this.props.dataItemKey)(m.dataItem), v = x + (this.vs.realSkip || 0), H = u || "ai" + v, F = H + "_1", y = Ne(m, H, i);
686
- if (T = v + X + g, P.push(/* @__PURE__ */ r.createElement(
687
- Rt,
686
+ const I = J % 2 === 0, u = this.props.dataItemKey && Ue(this.props.dataItemKey)(m.dataItem), b = x + (this.vs.realSkip || 0), H = u || "ai" + b, F = H + "_1", y = Ne(m, H, i);
687
+ if (T = b + X + g, P.push(/* @__PURE__ */ r.createElement(
688
+ yt,
688
689
  {
689
690
  key: H,
690
691
  dataItem: m.dataItem,
@@ -692,20 +693,20 @@ const z = class z extends r.Component {
692
693
  isInEdit: y.isInEdit,
693
694
  rowType: m.rowType,
694
695
  isHidden: q(x),
695
- onClick: (w) => this.rowClick(w, m),
696
- onDoubleClick: (w) => this.rowDblClick(w, m),
696
+ onClick: (S) => this.rowClick(S, m),
697
+ onDoubleClick: (S) => this.rowDblClick(S, m),
697
698
  selectedField: this.props.selectedField,
698
699
  rowHeight: this.props.rowHeight,
699
700
  render: this.props.rowRender,
700
701
  ariaRowIndex: T,
701
- absoluteRowIndex: v,
702
- dataIndex: this.vs.scrollableVirtual && !this.props.groupable ? v : i,
702
+ absoluteRowIndex: b,
703
+ dataIndex: this.vs.scrollableVirtual && !this.props.groupable ? b : i,
703
704
  isSelected: y.isSelected
704
705
  },
705
706
  y.row
706
707
  )), this.props.detail && m.rowType === "data" && m.expanded) {
707
- const w = C.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
708
- g++, T = v + X + g, P.push(/* @__PURE__ */ r.createElement(
708
+ const S = C.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
709
+ g++, T = b + X + g, P.push(/* @__PURE__ */ r.createElement(
709
710
  "tr",
710
711
  {
711
712
  key: F,
@@ -717,15 +718,15 @@ const z = class z extends r.Component {
717
718
  role: "row",
718
719
  "aria-rowindex": T
719
720
  },
720
- this.props.group && this.props.group.map((V, N) => {
721
+ this.props.group && this.props.group.map((W, N) => {
721
722
  var oe;
722
- const b = (oe = y == null ? void 0 : y.row[N]) == null ? void 0 : oe.props.style, Pe = b ? this.isRtl ? { left: b.right, right: b.left } : { left: b.left, right: b.right } : {};
723
+ const v = (oe = y == null ? void 0 : y.row[N]) == null ? void 0 : oe.props.style, Pe = v ? this.isRtl ? { left: v.right, right: v.left } : { left: v.left, right: v.right } : {};
723
724
  return /* @__PURE__ */ r.createElement(
724
- be,
725
+ ve,
725
726
  {
726
727
  id: "",
727
728
  dataIndex: m.dataIndex,
728
- field: V.field,
729
+ field: W.field,
729
730
  dataItem: m.dataItem,
730
731
  key: N,
731
732
  style: Pe,
@@ -738,18 +739,18 @@ const z = class z extends r.Component {
738
739
  );
739
740
  }),
740
741
  this.props.expandField && /* @__PURE__ */ r.createElement(
741
- Et,
742
+ xt,
742
743
  {
743
744
  id: k.generateNavigatableId(`${F}-dhcell`, h)
744
745
  }
745
746
  ),
746
747
  /* @__PURE__ */ r.createElement(
747
- kt,
748
+ Et,
748
749
  {
749
750
  onContextMenu: this.onContextMenu,
750
751
  dataItem: m.dataItem,
751
752
  dataIndex: m.dataIndex,
752
- colSpan: w,
753
+ colSpan: S,
753
754
  ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
754
755
  detail: this.props.detail,
755
756
  id: k.generateNavigatableId(`${F}-dcell`, h)
@@ -770,7 +771,7 @@ const z = class z extends r.Component {
770
771
  className: "k-grid-norecords",
771
772
  style: { width: Le() }
772
773
  },
773
- /* @__PURE__ */ r.createElement("div", { className: "k-grid-norecords-template", [Qe]: k.generateNavigatableId("no-records", h) }, E.length ? E : /* @__PURE__ */ r.createElement(wt, null))
774
+ /* @__PURE__ */ r.createElement("div", { className: "k-grid-norecords-template", [Ze]: k.generateNavigatableId("no-records", h) }, E.length ? E : /* @__PURE__ */ r.createElement(wt, null))
774
775
  ), Q = {
775
776
  size: this.props.size,
776
777
  onPageChange: this.pagerPageChange,
@@ -778,14 +779,14 @@ const z = class z extends r.Component {
778
779
  dir: this.isRtl ? "rtl" : void 0,
779
780
  skip: this.vs.propsSkip || 0,
780
781
  take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
781
- messagesMap: ht,
782
+ messagesMap: pt,
782
783
  navigatable: this.props.navigatable,
783
- ...It(this.props.pageable || {})
784
- }, Z = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...Q }) : /* @__PURE__ */ r.createElement(Je, { className: "k-grid-pager", ...Q }), Me = (i) => this.props.sort && this.props.sort.filter((g) => g.field === i).length > 0, Ae = (i, g) => /* @__PURE__ */ r.createElement(
784
+ ...kt(this.props.pageable || {})
785
+ }, Z = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...Q }) : /* @__PURE__ */ r.createElement(Xe, { className: "k-grid-pager", ...Q }), Me = (i) => this.props.sort && this.props.sort.filter((g) => g.field === i).length > 0, Ae = (i, g) => /* @__PURE__ */ r.createElement(
785
786
  "col",
786
787
  {
787
788
  key: g.toString(),
788
- width: B(i)
789
+ width: U(i)
789
790
  }
790
791
  ), ee = (ie = this.props.cells) != null && ie.footerCell || this._columns.some(
791
792
  (i) => {
@@ -793,14 +794,15 @@ const z = class z extends r.Component {
793
794
  return !!(i.footerCell || (g = i.cells) != null && g.footerCell);
794
795
  }
795
796
  ) ? /* @__PURE__ */ r.createElement(
796
- at,
797
+ lt,
797
798
  {
798
799
  size: this.props.size,
799
800
  columnResize: this.columnResize,
800
801
  staticHeaders: this.props.scrollable !== "none",
802
+ hasScrollbarWidth: !!this.getCachedScrollbarWidth(),
801
803
  ref: (i) => this._footer = i,
802
804
  row: /* @__PURE__ */ r.createElement(
803
- St,
805
+ It,
804
806
  {
805
807
  cells: this.props.cells,
806
808
  idPrefix: h,
@@ -824,13 +826,13 @@ const z = class z extends r.Component {
824
826
  {
825
827
  key: g.toString(),
826
828
  className: Me(i.field) ? "k-sorted" : void 0,
827
- width: B(i)
829
+ width: U(i)
828
830
  }
829
831
  )
830
832
  )
831
833
  ), se = this.dragLogic.reorderable || this.dragLogic.groupable;
832
834
  if (this.props.scrollable === "none")
833
- return /* @__PURE__ */ r.createElement(U.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
835
+ return /* @__PURE__ */ r.createElement(V.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
834
836
  "div",
835
837
  {
836
838
  id: this.props.id,
@@ -882,7 +884,7 @@ const z = class z extends r.Component {
882
884
  se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue }))
883
885
  ), D, this.props.pageable && Z);
884
886
  let G = this.props.style || {};
885
- return s && (G.height || (G = Object.assign({}, G, { height: "450px" }))), /* @__PURE__ */ r.createElement(U.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
887
+ return s && (G.height || (G = Object.assign({}, G, { height: "450px" }))), /* @__PURE__ */ r.createElement(V.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
886
888
  "div",
887
889
  {
888
890
  id: this.props.id,
@@ -914,7 +916,7 @@ const z = class z extends r.Component {
914
916
  "aria-colcount": C.length,
915
917
  "aria-rowcount": a,
916
918
  id: this._gridId,
917
- "aria-label": c.toLanguageString(ue, pt[ue])
919
+ "aria-label": c.toLanguageString(ue, dt[ue])
918
920
  },
919
921
  $,
920
922
  /* @__PURE__ */ r.createElement("div", { className: "k-grid-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
@@ -1029,7 +1031,7 @@ const z = class z extends r.Component {
1029
1031
  }, l = this._columns.splice(a, s(a) - a);
1030
1032
  this._columns.splice(a < h ? s(h - l.length) : h, 0, ...l), this._columns.filter((d) => d.declarationIndex >= 0).forEach((d, f) => d.orderIndex = f), this._columnsMutations++;
1031
1033
  const p = this._columns[a].locked && this._columns[h].locked;
1032
- Xe(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), Ye(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
1034
+ Ye(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), Qe(this._columnsMap, this._columns, p || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
1033
1035
  const n = this.columns;
1034
1036
  if (this.forceUpdate(), this.props.onColumnReorder) {
1035
1037
  const d = {
@@ -1170,9 +1172,9 @@ z.displayName = "KendoReactGrid", z.defaultProps = {
1170
1172
  dataItemKey: o.string,
1171
1173
  navigatable: o.bool,
1172
1174
  size: o.oneOf(["small", "medium"])
1173
- }, z.contextType = U;
1174
- let W = z;
1175
- nt(W);
1175
+ }, z.contextType = V;
1176
+ let B = z;
1177
+ ht(B);
1176
1178
  export {
1177
- W as Grid
1179
+ B as Grid
1178
1180
  };