@progress/kendo-react-grid 8.2.1-develop.5 → 8.3.0-develop.10

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,36 +8,36 @@
8
8
  "use client";
9
9
  import * as r from "react";
10
10
  import o from "prop-types";
11
- import { RowHeightService as re, getScrollbarWidth as Pe, dispatchEvent as Ge, canUseDOM as F, getActiveElement as Ke, memoizeOne as E, validatePackage as We, shouldShowValidationUI as Be, setScrollbarWidth as ae, getter as Ve, classNames as L, kendoThemeMaps as G, WatermarkOverlay as Ue } from "@progress/kendo-react-common";
12
- import { tableKeyboardNavigation as _, getSelectionOptions as le, mapColumns as $e, ClipboardService as je, TableKeyboardNavigationContext as B, isRtl as qe, tableKeyboardNavigationTools as x, 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
- import { VirtualScrollFixed as ge } from "./VirtualScrollFixed.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 V, 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 wt } from "./rows/GridRow.mjs";
31
- import { GridHeaderSelectionCell as yt } from "./header/GridHeaderSelectionCell.mjs";
32
- import { GridNoRecords as Et } from "./GridNoRecords.mjs";
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";
36
- import { packageMetadata as Re } from "./package-metadata.mjs";
37
- import { GridDetailCell as kt } from "./cells/GridDetailCell.mjs";
38
- import { GridDetailHierarchyCell as _t } from "./cells/GridDetailHierarchyCell.mjs";
39
- import { SAFARI_REGEX as xt } from "./constants/index.mjs";
40
- const z = class z extends r.Component {
11
+ import { RowHeightService as ne, getScrollbarWidth as Ke, dispatchEvent as Be, canUseDOM as M, getActiveElement as Ve, memoizeOne as y, uGrid as he, classNames as m, validatePackage as Ue, shouldShowValidationUI as $e, setScrollbarWidth as de, getter as je, WatermarkOverlay as qe } from "@progress/kendo-react-common";
12
+ import { tableKeyboardNavigation as T, getSelectionOptions as pe, mapColumns as Je, ClipboardService as Xe, TableKeyboardNavigationContext as V, isRtl as Ye, tableKeyboardNavigationTools as D, tableColumnsVirtualization as Qe, Pager as Ze, tableKeyboardNavigationScopeAttributes as ce, TableSelection as ue, tableKeyboardNavigationBodyAttributes as ge, DropClue as fe, DragClue as me, updateLeft as et, updateRight as tt, KEYBOARD_NAV_DATA_ID as st } from "@progress/kendo-react-data-tools";
13
+ import { GridSelectionCell as it } from "./cells/GridSelectionCell.mjs";
14
+ import { GridHierarchyCell as ot } from "./cells/GridHierarchyCell.mjs";
15
+ import { GridEditCell as rt } from "./cells/GridEditCell.mjs";
16
+ import { Header as at } from "./header/Header.mjs";
17
+ import { HeaderRow as lt } from "./header/HeaderRow.mjs";
18
+ import { FilterRow as nt } from "./header/FilterRow.mjs";
19
+ import { GroupPanel as ht } from "./header/GroupPanel.mjs";
20
+ import { Footer as dt } from "./footer/Footer.mjs";
21
+ import { provideLocalizationService as pt, registerForLocalization as ct } from "@progress/kendo-react-intl";
22
+ import { pagerMessagesMap as ut, gridAriaLabel as be, messages as gt } from "./messages/index.mjs";
23
+ import { VirtualScroll as ft } from "./VirtualScroll.mjs";
24
+ import { VirtualScrollFixed as ve } from "./VirtualScrollFixed.mjs";
25
+ import { ColumnResize as mt } from "./drag/ColumnResize.mjs";
26
+ import { CommonDragLogic as bt } from "./drag/CommonDragLogic.mjs";
27
+ import { firefox as Ce, firefoxMaxHeight as Re, flatData as vt, readColumns as Ct, sanitizeColumns as Rt, getColumnWidth as U, isSorted as we, autoGenerateColumns as wt, getNestedValue as ye, resolveCells as yt } from "./utils/index.mjs";
28
+ import { GridCell as Et } from "./cells/GridCell.mjs";
29
+ import { GridGroupCell as Ee } from "./cells/GridGroupCell.mjs";
30
+ import { GridRow as St } from "./rows/GridRow.mjs";
31
+ import { GridHeaderSelectionCell as It } from "./header/GridHeaderSelectionCell.mjs";
32
+ import { GridNoRecords as _t } from "./GridNoRecords.mjs";
33
+ import { operators as Se } from "./filterCommon.mjs";
34
+ import { FooterRow as xt } from "./footer/FooterRow.mjs";
35
+ import { normalize as kt } from "./paging/GridPagerSettings.mjs";
36
+ import { packageMetadata as Ie } from "./package-metadata.mjs";
37
+ import { GridDetailCell as Tt } from "./cells/GridDetailCell.mjs";
38
+ import { GridDetailHierarchyCell as Dt } from "./cells/GridDetailHierarchyCell.mjs";
39
+ import { SAFARI_REGEX as Ht } from "./constants/index.mjs";
40
+ const H = class H extends r.Component {
41
41
  constructor(a) {
42
42
  super(a), this._columns = [], this._columnsMap = [[]], this._columnsMutations = 0, this._resized = !1, this._focusFirst = !1, this._singleEditRow = !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.rowsInEdit = [], this.observer = null, this.handleIntersection = (e) => {
43
43
  const t = { rowIndex: this.rowIndex };
@@ -82,8 +82,8 @@ const z = class z extends r.Component {
82
82
  this.props.onContextMenu.call(void 0, l);
83
83
  }
84
84
  }, this.getVirtualScroll = (e) => {
85
- const { rowHeight: t, detailRowHeight: s, detail: l, expandField: h, groupable: n } = e, d = this.isAllData(), f = t !== void 0 && t > 0, R = s !== void 0 && s > 0, I = n === !0 || typeof n == "object" && n.enabled !== !1;
86
- return !f || I && !d || !!(l && h) && (!R || !d) ? ct : ge;
85
+ const { rowHeight: t, detailRowHeight: s, detail: l, expandField: d, groupable: p } = e, h = this.isAllData(), g = t !== void 0 && t > 0, v = s !== void 0 && s > 0, z = p === !0 || typeof p == "object" && p.enabled !== !1;
86
+ return !g || z && !h || !!(l && d) && (!v || !h) ? ft : ve;
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;
@@ -97,33 +97,33 @@ const z = class z extends r.Component {
97
97
  t || this.props.rowHeight === void 0 || this.props.rowHeight === 0
98
98
  ), 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) {
99
99
  const s = this.props.rowHeight * e;
100
- this.vs.containerHeight = me ? Math.min(fe, s) : s;
100
+ this.vs.containerHeight = Ce ? Math.min(Re, s) : s;
101
101
  } else
102
102
  this.vs.containerHeight = 1533915;
103
- if (this.vs.containerRef = this.containerRef, this.vs.tableBodyRef = this.tableBodyRef, this.vs.table = this.tableElement, this._slicedData = void 0, this.vs instanceof ge) {
104
- const { rowHeight: s = 0, detail: l, expandField: h } = this.props;
105
- let { detailRowHeight: n = 0 } = this.props;
106
- n = l && h ? n : s, this.isAllData() ? (this.vs.total = this._data.length, this._slicedData = this._data.slice(this.vs.realSkip, this.vs.realSkip + this.vs.pageSize), this.vs.rowHeightService = this.rowHeightService(this.vs, this._data.length, s, n, this._data)) : this.vs.rowHeightService = new re(e, s, n);
107
- const d = this.vs.rowHeightService.totalHeight();
108
- this.vs.containerHeight = me ? Math.min(fe, d) : d;
103
+ 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
+ const { rowHeight: s = 0, detail: l, expandField: d } = this.props;
105
+ 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);
107
+ const h = this.vs.rowHeightService.totalHeight();
108
+ this.vs.containerHeight = Ce ? Math.min(Re, h) : h;
109
109
  }
110
- }, this.getCachedScrollbarWidth = () => (this._scrollbarWidth || (this._scrollbarWidth = Pe() || void 0), this._scrollbarWidth), this.scrollHandler = (e) => {
110
+ }, this.getCachedScrollbarWidth = () => (this._scrollbarWidth || (this._scrollbarWidth = Ke() || 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), Be(this.props.onScroll, e, this, void 0), this.wrapperScrollTop = s;
118
118
  }, this.onKeyDown = (e) => {
119
- if (_.onKeyDown(e, {
119
+ if (T.onKeyDown(e, {
120
120
  navigatable: this.props.navigatable || !1,
121
121
  contextStateRef: this.contextStateRef,
122
122
  navigationStateRef: this.navigationStateRef,
123
123
  onNavigationAction: this.onNavigationAction,
124
124
  columns: this.columns
125
125
  }), this.props.onKeyDown) {
126
- const { mode: t, cell: s } = le(this.props.selectable), l = {
126
+ const { mode: t, cell: s } = pe(this.props.selectable), l = {
127
127
  dataItems: this.getLeafDataItems(),
128
128
  mode: t,
129
129
  cell: s,
@@ -134,7 +134,7 @@ const z = class z extends r.Component {
134
134
  this.props.onKeyDown.call(void 0, l);
135
135
  }
136
136
  }, this.onFocus = (e) => {
137
- _.onFocus(e, {
137
+ T.onFocus(e, {
138
138
  navigatable: !!this.props.navigatable,
139
139
  contextStateRef: this.contextStateRef
140
140
  });
@@ -278,51 +278,51 @@ const z = class z extends r.Component {
278
278
  );
279
279
  }
280
280
  }, this.inActiveElement = () => {
281
- var h, n, d;
282
- if (!F)
281
+ var d, p, h;
282
+ if (!M)
283
283
  return !1;
284
- const e = Ke(this.document), t = e ? e.matches(".k-table-td") ? e : (h = this.document) == null ? void 0 : h.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));
284
+ 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
285
  return !!(t && l && s);
286
- }, this.onResize = (e, t, s, l, h, n) => {
286
+ }, this.onResize = (e, t, s, l, d, p) => {
287
287
  this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(
288
288
  void 0,
289
289
  {
290
290
  columns: this.columns,
291
291
  nativeEvent: l,
292
- targetColumnId: n,
292
+ targetColumnId: p,
293
293
  index: e,
294
294
  newWidth: t,
295
295
  oldWidth: s,
296
- end: h,
296
+ end: d,
297
297
  target: this
298
298
  }
299
299
  );
300
- }, this.reInitVirtualization = E((e, t, s, l, h, n) => {
300
+ }, this.reInitVirtualization = y((e, t, s, l, d, p) => {
301
301
  this.vs.reset();
302
- const d = this.getVirtualScroll(this.props);
303
- this.vs = new d(n);
304
- }), this.flatData = E((e, t, s, l, h, n, d) => {
305
- const f = [], R = mt(
306
- f,
302
+ const h = this.getVirtualScroll(this.props);
303
+ this.vs = new h(p);
304
+ }), this.flatData = y((e, t, s, l, d, p, h) => {
305
+ const g = [], v = vt(
306
+ g,
307
307
  e,
308
308
  t,
309
309
  { index: s },
310
310
  l !== void 0,
311
- h
311
+ d
312
312
  );
313
- return { flattedData: f, resolvedGroupsCount: R };
314
- }), this.rowHeightService = E((e, t, s, l, h) => new re(t, s, l, h)), this.childrenToArray = E((e) => r.Children.toArray(e)), this.readColumns = E(
313
+ 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
315
  (e, t, s) => {
316
- const l = e.filter((h) => h && h.type && h.type.displayName === "KendoReactGridColumn");
317
- return ft(l, this.columns, { prevId: 0, idPrefix: t });
316
+ const l = e.filter((d) => d && d.type && d.type.displayName === "KendoReactGridColumn");
317
+ return Ct(l, this.columns, { prevId: 0, idPrefix: t });
318
318
  }
319
- ), this.mapColumns = E(
320
- (e, t) => $e(e, !0)
321
- ), this.filterColumnsByMediaProp = (e) => e.filter((t) => F && t && t.media ? window.matchMedia(t.media).matches : t), this.configureColumns = E((e, t, s) => {
322
- this.props.selectedField && e.filter((n) => n.field === this.props.selectedField).forEach((n) => {
323
- n.width = n.width || "50px", n.cell = n.cell || et, n.headerCell = n.headerCell || yt;
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) => {
322
+ this.props.selectedField && e.filter((g) => g.field === this.props.selectedField).forEach((g) => {
323
+ g.width = g.width || "50px", g.cell = g.cell || it, g.headerCell = g.headerCell || It;
324
324
  });
325
- const l = {
325
+ const { unstyled: l } = this.props, d = l && l.uGrid ? l.uGrid : he, p = {
326
326
  id: "",
327
327
  resizable: !0,
328
328
  width: "32px",
@@ -343,22 +343,22 @@ const z = class z extends r.Component {
343
343
  };
344
344
  let h = 0;
345
345
  this.props.expandField && this.props.onExpandChange && this.props.detail && (e.unshift({
346
- ...l,
347
- cell: tt,
346
+ ...p,
347
+ cell: ot,
348
348
  field: this.props.expandField,
349
- headerClassName: "k-hierarchy-cell k-header"
349
+ headerClassName: m(d.hierarchyCell({}))
350
350
  }), h++);
351
- for (let n = 0; n < t; n++)
351
+ for (let g = 0; g < t; g++)
352
352
  e.unshift({
353
- ...l,
353
+ ...p,
354
354
  isAccessible: !1,
355
- cell: ve,
355
+ cell: Ee,
356
356
  field: "value",
357
357
  locked: this.props.lockGroups
358
358
  }), h++;
359
- e.slice(h).forEach((n) => n.parentIndex >= 0 && (n.parentIndex += h));
360
- }), this.getHeaderRow = E((e, t, s, l, h, n, d, f, R, I, T, C, M) => /* @__PURE__ */ r.createElement(
361
- ot,
359
+ 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
362
  {
363
363
  cells: this.props.cells,
364
364
  sort: e,
@@ -367,21 +367,21 @@ const z = class z extends r.Component {
367
367
  group: s || [],
368
368
  groupable: l,
369
369
  groupChange: this.groupChange,
370
- filter: h,
371
- filterable: n,
372
- filterOperators: d,
370
+ filter: d,
371
+ filterable: p,
372
+ filterOperators: h,
373
373
  filterChange: this.filterChange,
374
- columnMenu: R,
375
- columnMenuIcon: I,
374
+ columnMenu: v,
375
+ columnMenuIcon: z,
376
376
  selectionChange: this.onHeaderSelectionChange,
377
- columns: T,
377
+ columns: E,
378
378
  columnResize: this.columnResize,
379
379
  pressHandler: this.dragLogic.pressHandler,
380
380
  dragHandler: this.dragLogic.dragHandler,
381
381
  releaseHandler: this.dragLogic.releaseHandler,
382
- columnsMap: C,
383
- cellRender: f,
384
- isRtl: M,
382
+ columnsMap: G,
383
+ cellRender: g,
384
+ isRtl: O,
385
385
  dragClue: this.dragLogic.dragClueRef,
386
386
  headerRef: this.headerElementRef,
387
387
  containerRef: this.containerRef,
@@ -396,15 +396,15 @@ const z = class z extends r.Component {
396
396
  if (this.tableBodyRef.current && ((e = this.tableBodyRef.current) == null ? void 0 : e.getElementsByClassName("k-grid-edit-row").length) > 0) {
397
397
  this._singleEditRow = !1, (t = document.activeElement) != null && t.closest(".k-grid-edit-row") ? this._lastActiveElement = document.activeElement : this._lastActiveElement = void 0;
398
398
  const l = Array.from((s = this.tableBodyRef.current) == null ? void 0 : s.getElementsByClassName("k-grid-edit-row"));
399
- l.length > this.rowsInEdit.length ? this._newEditableRow = l.filter((h) => !this.rowsInEdit.includes(h))[0] : l.length === 1 && (this._newEditableRow = l[0], this._singleEditRow = !0), this.rowsInEdit = l;
399
+ l.length > this.rowsInEdit.length ? this._newEditableRow = l.filter((d) => !this.rowsInEdit.includes(d))[0] : l.length === 1 && (this._newEditableRow = l[0], this._singleEditRow = !0), this.rowsInEdit = l;
400
400
  }
401
- }, We(Re), this.showLicenseWatermark = Be(Re);
402
- const p = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1, c = this.getVirtualScroll(a);
403
- this.vs = new c(p || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new gt(
401
+ }, Ue(Ie), this.showLicenseWatermark = $e(Ie);
402
+ const n = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1, c = this.getVirtualScroll(a);
403
+ this.vs = new c(n || a.rowHeight === void 0 || a.rowHeight === 0), this.dragLogic = new bt(
404
404
  this.columnReorder.bind(this),
405
405
  this.groupReorder.bind(this),
406
406
  this.columnToGroup.bind(this)
407
- ), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new ut(this.onResize), this.props.clipboard && (this.clipboardService = new je(this.onClipboard)), _.onConstructor({
407
+ ), this.columnGroupChange = this.columnGroupChange.bind(this), this.columnResize = new mt(this.onResize), this.props.clipboard && (this.clipboardService = new Xe(this.onClipboard)), T.onConstructor({
408
408
  navigatable: !!a.navigatable,
409
409
  contextStateRef: this.contextStateRef,
410
410
  navigationStateRef: this.navigationStateRef,
@@ -452,8 +452,8 @@ const z = class z extends r.Component {
452
452
  */
453
453
  // tslint:enable:max-line-length
454
454
  get columns() {
455
- const a = this._columns.filter((p) => p.declarationIndex >= 0 && p.parentIndex === -1);
456
- return bt(a);
455
+ const a = this._columns.filter((n) => n.declarationIndex >= 0 && n.parentIndex === -1);
456
+ return Rt(a);
457
457
  }
458
458
  /**
459
459
  * Returns the HTML element of the Grid component.
@@ -462,7 +462,7 @@ const z = class z extends r.Component {
462
462
  return this._element;
463
463
  }
464
464
  get document() {
465
- if (F)
465
+ if (M)
466
466
  return this.element && this.element.ownerDocument || document;
467
467
  }
468
468
  get _header() {
@@ -476,24 +476,24 @@ const z = class z extends r.Component {
476
476
  */
477
477
  componentDidMount() {
478
478
  var c;
479
- this.props.columnVirtualization && !navigator.userAgent.match(xt) && (this.headTable && (this.headTable.style.display = "block"), this.tableElement && (this.tableElement.style.display = "block")), this.resetTableWidth(), ae(this.getCachedScrollbarWidth());
480
- const a = qe(this.element);
481
- this.isRtl = a, _.onComponentDidMount({
479
+ this.props.columnVirtualization && !navigator.userAgent.match(Ht) && (this.headTable && (this.headTable.style.display = "block"), this.tableElement && (this.tableElement.style.display = "block")), this.resetTableWidth(), de(this.getCachedScrollbarWidth());
480
+ const a = Ye(this.element);
481
+ this.isRtl = a, T.onComponentDidMount({
482
482
  scope: this.element || void 0,
483
483
  contextStateRef: this.contextStateRef,
484
484
  navigationStateRef: this.navigationStateRef
485
485
  }), this.isRtl && this.forceUpdate();
486
- const p = {
486
+ const n = {
487
487
  rootMargin: "0px",
488
488
  threshold: 0.9
489
489
  };
490
- this.clipboardService && this.clipboardService.addEventListeners(this.document), this.observer = F && window.IntersectionObserver && new window.IntersectionObserver(this.handleIntersection, p) || null, this.resizeObserver = F && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), (c = this.document) != null && c.body && this.resizeObserver && this.resizeObserver.observe(this.document.body);
490
+ this.clipboardService && this.clipboardService.addEventListeners(this.document), this.observer = M && window.IntersectionObserver && new window.IntersectionObserver(this.handleIntersection, n) || null, this.resizeObserver = M && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), (c = this.document) != null && c.body && this.resizeObserver && this.resizeObserver.observe(this.document.body);
491
491
  }
492
492
  /**
493
493
  * @hidden
494
494
  */
495
495
  getSnapshotBeforeUpdate() {
496
- return _.onGetSnapshotBeforeUpdate({
496
+ return T.onGetSnapshotBeforeUpdate({
497
497
  document: this.document,
498
498
  contextStateRef: this.contextStateRef,
499
499
  navigationStateRef: this.navigationStateRef
@@ -503,7 +503,7 @@ const z = class z extends r.Component {
503
503
  * @hidden
504
504
  */
505
505
  componentDidUpdate() {
506
- this.resetTableWidth(), ae(this.getCachedScrollbarWidth()), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), this.handleFocusInEditableRows(), _.onComponentDidUpdate({
506
+ this.resetTableWidth(), de(this.getCachedScrollbarWidth()), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), this.handleFocusInEditableRows(), T.onComponentDidUpdate({
507
507
  scope: this.element || void 0,
508
508
  contextStateRef: this.contextStateRef,
509
509
  navigationStateRef: this.navigationStateRef,
@@ -525,29 +525,29 @@ const z = class z extends r.Component {
525
525
  * @hidden
526
526
  */
527
527
  render() {
528
- var ie;
528
+ var ae;
529
529
  let a = this.props.total || 0;
530
- const p = x.getIdPrefix(this.navigationStateRef), c = nt(this);
531
- let e = [];
532
- 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);
533
- const t = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", s = this.props.scrollable === "virtual", { resolvedGroupsCount: l, flattedData: h } = this.flatData(
534
- e,
535
- t,
530
+ const n = D.getIdPrefix(this.navigationStateRef), c = pt(this), { unstyled: e, size: t = "medium" } = this.props, s = e && e.uGrid ? e.uGrid : he;
531
+ let l = [];
532
+ Array.isArray(this.props.data) ? (l = this.props.data, a = a || this.props.data.length) : this.props.data && (l = this.props.data.data, a = a || this.props.data.total);
533
+ const d = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", p = this.props.scrollable === "virtual", { resolvedGroupsCount: h, flattedData: g } = this.flatData(
534
+ l,
535
+ d,
536
536
  this.props.skip || 0,
537
537
  this.props.group,
538
538
  this.props.expandField,
539
539
  this.props.filter,
540
540
  this.props.sort
541
541
  );
542
- this._data = h;
543
- const n = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1;
544
- this.columnResize.resizable = this.props.resizable || !1, this.dragLogic.reorderable = this.props.reorderable || !1, this.dragLogic.groupable = n;
545
- const d = this.props.selectable && this.props.selectable.drag ? "none" : void 0;
546
- this.initializeVirtualization(a, n);
547
- const f = this.childrenToArray(this.props.children);
548
- this.initColumns(f, l);
549
- const R = f.map((i) => i && i.type && i.type.displayName === "KendoReactGridToolbar" ? r.cloneElement(i, { ...i.props, ariaControls: this._gridId }) : null), I = f.filter((i) => i && i.type && i.type.displayName === "KendoReactGridNoRecords"), T = f.filter((i) => i && i.type && i.type.displayName === "KendoReactGridStatusBar"), C = this._columns.filter((i) => i.children.length === 0), M = n && /* @__PURE__ */ r.createElement(
550
- at,
542
+ this._data = g;
543
+ const v = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1;
544
+ this.columnResize.resizable = this.props.resizable || !1, this.dragLogic.reorderable = this.props.reorderable || !1, this.dragLogic.groupable = v;
545
+ const z = this.props.selectable && this.props.selectable.drag ? "none" : void 0;
546
+ this.initializeVirtualization(a, v);
547
+ const E = this.childrenToArray(this.props.children);
548
+ 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(
550
+ ht,
551
551
  {
552
552
  group: this.props.group || [],
553
553
  groupChange: this.groupChange,
@@ -559,41 +559,40 @@ const z = class z extends r.Component {
559
559
  ariaControls: this._gridId,
560
560
  onContextMenu: this.onContextMenu
561
561
  }
562
- ), { sort: we, sortable: ye, group: Ee, filter: Se, filterable: Ie, filterOperators: ke = Ce, headerCellRender: _e, columnMenu: xe, columnMenuIcon: ze } = this.props, $ = /* @__PURE__ */ r.createElement(
563
- it,
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(
563
+ at,
564
564
  {
565
- size: this.props.size,
565
+ size: t,
566
566
  columnResize: this.columnResize,
567
567
  staticHeaders: this.props.scrollable !== "none",
568
568
  scrollableDataElement: () => this.vs.container,
569
569
  hasScrollbarWidth: !!this.getCachedScrollbarWidth(),
570
- draggable: this.props.reorderable || n,
570
+ draggable: this.props.reorderable || v,
571
571
  ref: this.headerRef,
572
572
  elemRef: this.headerElementRef,
573
- className: this.props.headerClassName,
574
573
  headerRow: this.getHeaderRow(
575
- we,
576
- ye,
577
- Ee,
578
- n,
579
- Se,
580
- Ie,
581
- ke,
582
574
  _e,
583
575
  xe,
576
+ ke,
577
+ v,
578
+ Te,
579
+ De,
580
+ He,
584
581
  ze,
582
+ Ae,
583
+ Fe,
585
584
  this._columns,
586
585
  this._columnsMap,
587
586
  this.isRtl
588
587
  ),
589
588
  filterRow: this.props.filterable && /* @__PURE__ */ r.createElement(
590
- rt,
589
+ nt,
591
590
  {
592
591
  cells: this.props.cells,
593
- size: this.props.size,
592
+ size: t,
594
593
  columns: this._columns,
595
594
  filter: this.props.filter,
596
- filterOperators: this.props.filterOperators || Ce,
595
+ filterOperators: this.props.filterOperators || Se,
597
596
  filterChange: this.filterChange,
598
597
  sort: this.props.sort,
599
598
  cellRender: this.props.filterCellRender,
@@ -602,65 +601,67 @@ const z = class z extends r.Component {
602
601
  ariaRowIndex: this._columnsMap.length + 1
603
602
  }
604
603
  ) || void 0,
605
- cols: C.map((i, g) => /* @__PURE__ */ r.createElement(
604
+ cols: R.map((i, f) => /* @__PURE__ */ r.createElement(
606
605
  "col",
607
606
  {
608
- key: g.toString(),
609
- width: V(i)
607
+ key: f.toString(),
608
+ width: U(i)
610
609
  }
611
610
  ))
612
611
  }
613
- ), Te = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, De = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns: Ne } = Je({
612
+ ), Ne = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, Le = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: Me, hiddenColumns: Ge } = Qe({
614
613
  enabled: this.props.columnVirtualization,
615
- columns: C,
616
- tableViewPortWidth: De,
617
- scrollLeft: Te
618
- }), Ae = (i, g, m) => {
614
+ columns: R,
615
+ tableViewPortWidth: Le,
616
+ scrollLeft: Ne
617
+ }), Oe = (i, f, b, F) => {
619
618
  let k = !1;
620
- const S = this.props.selectedField ? be(this.props.selectedField, i.dataItem) : void 0;
619
+ const S = this.props.selectedField ? ye(this.props.selectedField, i.dataItem) : void 0;
621
620
  return {
622
- row: C.map((u, b) => {
623
- if (Ne[b])
621
+ row: R.map((u, C) => {
622
+ if (Ge[C])
624
623
  return null;
625
- const H = u.id ? u.id : b, N = `${u.className ? u.className + " " : ""}${u.locked ? "k-grid-content-sticky" : ""}`, w = u.left !== void 0 ? this.isRtl ? { left: u.right, right: u.left } : { left: u.left, right: u.right } : {};
626
- let y = !1;
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 } : {};
625
+ let K = !1;
627
626
  if (u.editable && this.props.editField) {
628
- const v = be(this.props.editField, i.dataItem);
629
- v && (v === !0 || v === u.field) && (k = !0, y = !0);
627
+ const x = ye(this.props.editField, i.dataItem);
628
+ x && (x === !0 || x === u.field) && (k = !0, K = !0);
630
629
  }
631
- const W = u.cell || y && st || Rt, A = this.props.expandField && this.props.detail && u.field === this.props.expandField;
630
+ const L = u.cell || K && rt || Et, _ = this.props.expandField && this.props.detail && u.field === this.props.expandField;
632
631
  return /* @__PURE__ */ r.createElement(
633
- W,
632
+ L,
634
633
  {
635
634
  onContextMenu: this.onContextMenu,
636
- key: H,
635
+ key: N,
637
636
  locked: this.props.lockGroups,
638
- id: x.generateNavigatableId(
639
- `${g}-${String(b)}`,
640
- p,
641
- A || i.rowType === "groupHeader" || i.rowType === "groupFooter" || u.field === "value" ? "nodata" : "cell"
637
+ id: D.generateNavigatableId(
638
+ `${f}-${String(C)}`,
639
+ n,
640
+ _ || i.rowType === "groupHeader" || i.rowType === "groupFooter" || u.field === "value" ? "nodata" : "cell"
642
641
  ),
643
- colSpan: He[b],
642
+ colSpan: Me[C],
644
643
  dataItem: i.dataItem,
645
644
  field: u.field,
646
645
  editor: u.editor,
647
646
  format: u.format,
648
- className: N,
647
+ className: w,
649
648
  render: this.props.cellRender,
650
- cells: Ct(this.props.cells, u.cells),
649
+ cells: yt(this.props.cells, u.cells),
651
650
  onChange: this.itemChange,
652
- selectionChange: this.props.onSelectionChange ? (v) => {
653
- this.selectionChange({ event: v, dataItem: i.dataItem, dataIndex: m, columnIndex: b });
651
+ selectionChange: this.props.onSelectionChange ? (x) => {
652
+ this.selectionChange({ event: x, dataItem: i.dataItem, dataIndex: b, columnIndex: C });
654
653
  } : void 0,
655
- columnIndex: b,
656
- columnsCount: C.length,
654
+ columnIndex: C,
655
+ columnsCount: R.length,
657
656
  rowType: i.rowType,
658
657
  level: i.level,
659
658
  expanded: i.expanded,
660
659
  dataIndex: i.dataIndex,
661
- style: w,
660
+ style: I,
662
661
  ariaColumnIndex: u.ariaColumnIndex,
663
- isSelected: Array.isArray(S) && S.indexOf(b) > -1
662
+ isSelected: Array.isArray(S) && S.indexOf(C) > -1,
663
+ isSorted: !!we(u.field, this.props.sort),
664
+ isAlt: F
664
665
  }
665
666
  );
666
667
  }),
@@ -668,73 +669,72 @@ const z = class z extends r.Component {
668
669
  isSelected: typeof S == "boolean" && S
669
670
  };
670
671
  };
671
- let j = 0;
672
- if (s)
672
+ let X = 0;
673
+ if (p)
673
674
  for (let i = 0; i < this.vs.topCacheCount + this.vs.attendedSkip - (this.props.skip || 0); i++) {
674
- const g = this._data.shift();
675
- if (g)
676
- this._data.push(g), j++, g.rowType === "groupHeader" && i--;
675
+ const f = this._data.shift();
676
+ if (f)
677
+ this._data.push(f), X++, f.rowType === "groupHeader" && i--;
677
678
  else
678
679
  break;
679
680
  }
680
- const q = (i) => i >= this._data.length - j;
681
- let J = this.vs.realSkip || 0;
682
- const O = [];
683
- let K = !1;
684
- const X = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
685
- let D = 0;
681
+ const Y = (i) => i >= this._data.length - X;
682
+ let Q = this.vs.realSkip || 0;
683
+ const P = [];
684
+ let B = !1;
685
+ const Z = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
686
+ let A = 0;
686
687
  if (this._data.length) {
687
- let i = -1, g = 0;
688
- (this._slicedData || this._data).forEach((m, k) => {
689
- m.rowType === "data" && (J++, i++);
690
- const S = J % 2 === 0, u = this.props.dataItemKey && Ve(this.props.dataItemKey)(m.dataItem), b = k + (this.vs.realSkip || 0), H = u || "ai" + b, N = H + "_1", w = Ae(m, H, i);
691
- if (D = b + X + g, O.push(/* @__PURE__ */ r.createElement(
692
- wt,
688
+ let i = -1, f = 0;
689
+ (this._slicedData || this._data).forEach((b, F) => {
690
+ b.rowType === "data" && (Q++, i++);
691
+ 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,
693
694
  {
694
- key: H,
695
- dataItem: m.dataItem,
696
- isAltRow: S,
695
+ key: C,
696
+ dataItem: b.dataItem,
697
+ isAltRow: k,
697
698
  isInEdit: w.isInEdit,
698
- rowType: m.rowType,
699
- isHidden: q(k),
700
- onClick: (y) => this.rowClick(y, m),
701
- onDoubleClick: (y) => this.rowDblClick(y, m),
699
+ rowType: b.rowType,
700
+ isHidden: Y(F),
701
+ onClick: (I) => this.rowClick(I, b),
702
+ onDoubleClick: (I) => this.rowDblClick(I, b),
702
703
  selectedField: this.props.selectedField,
703
704
  rowHeight: this.props.rowHeight,
704
705
  render: this.props.rowRender,
705
- ariaRowIndex: D,
706
- absoluteRowIndex: b,
707
- dataIndex: this.vs.scrollableVirtual && !this.props.groupable ? b : i,
706
+ ariaRowIndex: A,
707
+ absoluteRowIndex: u,
708
+ dataIndex: this.vs.scrollableVirtual && !this.props.groupable ? u : i,
708
709
  isSelected: w.isSelected
709
710
  },
710
711
  w.row
711
- )), this.props.detail && m.rowType === "data" && m.expanded) {
712
- const y = C.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
713
- g++, D = b + X + g, O.push(/* @__PURE__ */ r.createElement(
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(
714
715
  "tr",
715
716
  {
716
717
  key: N,
717
- className: L(
718
- "k-table-row",
719
- S ? "k-detail-row k-table-alt-row k-alt" : "k-detail-row"
718
+ className: m(
719
+ s.detailTr({ isAlt: k })
720
720
  ),
721
- style: { visibility: q(k) ? "hidden" : "", height: this.props.detailRowHeight },
721
+ style: { visibility: Y(F) ? "hidden" : "", height: this.props.detailRowHeight },
722
722
  role: "row",
723
- "aria-rowindex": D
723
+ "aria-rowindex": A
724
724
  },
725
- this.props.group && this.props.group.map((W, A) => {
726
- var oe;
727
- const v = (oe = w == null ? void 0 : w.row[A]) == null ? void 0 : oe.props.style, Oe = v ? this.isRtl ? { left: v.right, right: v.left } : { left: v.left, right: v.right } : {};
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
728
  return /* @__PURE__ */ r.createElement(
729
- ve,
729
+ Ee,
730
730
  {
731
731
  id: "",
732
- dataIndex: m.dataIndex,
733
- field: W.field,
734
- dataItem: m.dataItem,
735
- key: A,
736
- style: Oe,
737
- ariaColumnIndex: 1 + A,
732
+ dataIndex: b.dataIndex,
733
+ field: K.field,
734
+ dataItem: b.dataItem,
735
+ key: L,
736
+ style: x,
737
+ ariaColumnIndex: 1 + L,
738
738
  isSelected: !1,
739
739
  locked: this.props.lockGroups,
740
740
  isRtl: this.isRtl,
@@ -743,109 +743,112 @@ const z = class z extends r.Component {
743
743
  );
744
744
  }),
745
745
  this.props.expandField && /* @__PURE__ */ r.createElement(
746
- _t,
746
+ Dt,
747
747
  {
748
- id: x.generateNavigatableId(`${N}-dhcell`, p)
748
+ id: D.generateNavigatableId(`${N}-dhcell`, n)
749
749
  }
750
750
  ),
751
751
  /* @__PURE__ */ r.createElement(
752
- kt,
752
+ Tt,
753
753
  {
754
754
  onContextMenu: this.onContextMenu,
755
- dataItem: m.dataItem,
756
- dataIndex: m.dataIndex,
757
- colSpan: y,
755
+ dataItem: b.dataItem,
756
+ dataIndex: b.dataIndex,
757
+ colSpan: I,
758
758
  ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
759
759
  detail: this.props.detail,
760
- id: x.generateNavigatableId(`${N}-dcell`, p)
760
+ id: D.generateNavigatableId(`${N}-dcell`, n)
761
761
  }
762
762
  )
763
763
  ));
764
764
  }
765
765
  });
766
766
  } else
767
- K = !0;
768
- const Fe = () => {
767
+ B = !0;
768
+ const Pe = () => {
769
769
  const i = this._header;
770
770
  return i && i.table && i.table.clientWidth;
771
- }, Y = () => /* @__PURE__ */ r.createElement(
771
+ }, ee = () => /* @__PURE__ */ r.createElement(
772
772
  "div",
773
773
  {
774
774
  key: "no-records",
775
- className: "k-grid-norecords",
776
- style: { width: Fe() }
775
+ className: m(s.noRecords({})),
776
+ style: { width: Pe() }
777
777
  },
778
- /* @__PURE__ */ r.createElement("div", { className: "k-grid-norecords-template", [Ze]: x.generateNavigatableId("no-records", p) }, I.length ? I : /* @__PURE__ */ r.createElement(Et, null))
779
- ), Q = {
780
- size: this.props.size,
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 = {
787
+ size: t,
781
788
  onPageChange: this.pagerPageChange,
782
789
  total: a,
783
790
  dir: this.isRtl ? "rtl" : void 0,
784
791
  skip: this.vs.propsSkip || 0,
785
792
  take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
786
- messagesMap: pt,
787
- ...It(this.props.pageable || {})
788
- }, Z = this.props.pager ? /* @__PURE__ */ r.createElement(this.props.pager, { ...Q }) : /* @__PURE__ */ r.createElement(Xe, { className: "k-grid-pager", ...Q }), Le = (i) => this.props.sort && this.props.sort.filter((g) => g.field === i).length > 0, Me = (i, g) => /* @__PURE__ */ r.createElement(
793
+ messagesMap: ut,
794
+ ...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(
789
796
  "col",
790
797
  {
791
- key: g.toString(),
792
- width: V(i)
798
+ key: f.toString(),
799
+ width: U(i)
793
800
  }
794
- ), ee = (ie = this.props.cells) != null && ie.footerCell || this._columns.some(
801
+ ), ie = (ae = this.props.cells) != null && ae.footerCell || this._columns.some(
795
802
  (i) => {
796
- var g;
797
- return !!(i.footerCell || (g = i.cells) != null && g.footerCell);
803
+ var f;
804
+ return !!(i.footerCell || (f = i.cells) != null && f.footerCell);
798
805
  }
799
806
  ) ? /* @__PURE__ */ r.createElement(
800
- lt,
807
+ dt,
801
808
  {
802
- size: this.props.size,
809
+ size: t,
803
810
  columnResize: this.columnResize,
804
811
  staticHeaders: this.props.scrollable !== "none",
805
812
  hasScrollbarWidth: !!this.getCachedScrollbarWidth(),
806
813
  ref: (i) => this._footer = i,
807
814
  row: /* @__PURE__ */ r.createElement(
808
- St,
815
+ xt,
809
816
  {
810
817
  cells: this.props.cells,
811
- idPrefix: p,
818
+ idPrefix: n,
812
819
  columns: this._columns,
813
820
  isRtl: this.isRtl,
814
- ariaRowIndex: D + 1
821
+ ariaRowIndex: A + 1
815
822
  }
816
823
  ),
817
- cols: C.map(Me)
824
+ cols: R.map(We)
818
825
  }
819
- ) : null, te = /* @__PURE__ */ r.createElement(
826
+ ) : null, oe = /* @__PURE__ */ r.createElement(
820
827
  "colgroup",
821
828
  {
822
829
  ref: (i) => {
823
830
  this.columnResize.colGroupMain = i;
824
831
  }
825
832
  },
826
- C.map(
827
- (i, g) => /* @__PURE__ */ r.createElement(
833
+ R.map(
834
+ (i, f) => /* @__PURE__ */ r.createElement(
828
835
  "col",
829
836
  {
830
- key: g.toString(),
831
- className: Le(i.field) ? "k-sorted" : void 0,
832
- width: V(i)
837
+ key: f.toString(),
838
+ className: we(i.field, this.props.sort) ? m(s.sorted({})) : void 0,
839
+ width: U(i)
833
840
  }
834
841
  )
835
842
  )
836
- ), se = this.dragLogic.reorderable || this.dragLogic.groupable;
843
+ ), re = this.dragLogic.reorderable || this.dragLogic.groupable;
837
844
  if (this.props.scrollable === "none")
838
- return /* @__PURE__ */ r.createElement(B.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
845
+ return /* @__PURE__ */ r.createElement(V.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
839
846
  "div",
840
847
  {
841
848
  id: this.props.id,
842
849
  style: this.props.style,
843
- className: L(
844
- "k-grid",
845
- {
846
- "k-grid-md": !this.props.size,
847
- [`k-grid-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size
848
- },
850
+ className: m(
851
+ s.wrapper({ size: t }),
849
852
  this.props.className
850
853
  ),
851
854
  ref: (i) => {
@@ -854,12 +857,12 @@ const z = class z extends r.Component {
854
857
  "aria-label": this.props.ariaLabel,
855
858
  onKeyDown: this.onKeyDown,
856
859
  onFocus: this.onFocus,
857
- ...ne
860
+ ...ce
858
861
  },
859
- R,
860
- M,
862
+ G,
863
+ q,
861
864
  /* @__PURE__ */ r.createElement(
862
- he,
865
+ ue,
863
866
  {
864
867
  selectable: this.props.selectable,
865
868
  onRelease: this.selectionRelease,
@@ -871,34 +874,28 @@ const z = class z extends r.Component {
871
874
  "table",
872
875
  {
873
876
  ref: (i) => this.headTable = i,
874
- className: L(
875
- "k-table k-grid-table",
876
- { [`k-table-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size }
877
- ),
878
- style: { userSelect: d }
877
+ className: m(s.table({ size: t }))
879
878
  },
880
- te,
881
- $,
882
- /* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...pe }, O),
883
- ee
879
+ oe,
880
+ J,
881
+ /* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: m(s.tbody({})), ...ge }, P),
882
+ ie
884
883
  )
885
884
  ),
886
- K && Y(),
887
- se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue }))
888
- ), T, this.props.pageable && Z);
889
- let P = this.props.style || {};
890
- return s && (P.height || (P = Object.assign({}, P, { height: "450px" }))), /* @__PURE__ */ r.createElement(B.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
885
+ B && ee(),
886
+ re && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(fe, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(me, { ref: this.dragLogic.refDragElementClue }))
887
+ ), j, this.props.pageable && se);
888
+ let W = this.props.style || {};
889
+ return p && (W.height || (W = Object.assign({}, W, { height: "450px" }))), /* @__PURE__ */ r.createElement(V.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ r.createElement(
891
890
  "div",
892
891
  {
893
892
  id: this.props.id,
894
- style: P,
895
- className: L(
896
- "k-grid",
897
- {
898
- "k-grid-md": !this.props.size,
899
- [`k-grid-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size,
900
- "k-grid-virtual": s
901
- },
893
+ style: W,
894
+ className: m(
895
+ s.wrapper({
896
+ size: t,
897
+ virtual: p
898
+ }),
902
899
  this.props.className
903
900
  ),
904
901
  ref: (i) => {
@@ -907,31 +904,31 @@ const z = class z extends r.Component {
907
904
  "aria-label": this.props.ariaLabel,
908
905
  onKeyDown: this.onKeyDown,
909
906
  onFocus: this.onFocus,
910
- ...ne
907
+ ...ce
911
908
  },
912
- R,
913
- M,
909
+ G,
910
+ q,
914
911
  /* @__PURE__ */ r.createElement(
915
912
  "div",
916
913
  {
917
- className: "k-grid-aria-root",
914
+ className: m(s.ariaRoot({})),
918
915
  role: "grid",
919
- "aria-colcount": C.length,
916
+ "aria-colcount": R.length,
920
917
  "aria-rowcount": a,
921
918
  id: this._gridId,
922
- "aria-label": c.toLanguageString(ue, dt[ue])
919
+ "aria-label": c.toLanguageString(be, gt[be])
923
920
  },
924
- $,
925
- /* @__PURE__ */ r.createElement("div", { className: "k-grid-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
921
+ J,
922
+ /* @__PURE__ */ r.createElement("div", { className: m(s.container({})), role: "presentation" }, /* @__PURE__ */ r.createElement(
926
923
  "div",
927
924
  {
928
925
  ref: this.containerRef,
929
- className: "k-grid-content k-virtual-content",
926
+ className: m(s.content({})),
930
927
  onScroll: this.scrollHandler,
931
928
  role: "presentation"
932
929
  },
933
- /* @__PURE__ */ r.createElement("div", { className: "k-grid-table-wrap", role: "presentation" }, /* @__PURE__ */ r.createElement(
934
- he,
930
+ /* @__PURE__ */ r.createElement("div", { className: m(s.tableWrap({})), role: "presentation" }, /* @__PURE__ */ r.createElement(
931
+ ue,
935
932
  {
936
933
  selectable: this.props.selectable,
937
934
  onRelease: this.selectionRelease,
@@ -943,42 +940,40 @@ const z = class z extends r.Component {
943
940
  "table",
944
941
  {
945
942
  ref: (i) => this.tableElement = i,
946
- className: L(
947
- "k-table k-grid-table",
948
- {
949
- "k-table-md": !this.props.size,
950
- [`k-table-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size
951
- }
943
+ className: m(
944
+ s.table({
945
+ size: t
946
+ })
952
947
  ),
953
948
  role: "presentation",
954
- style: { userSelect: d }
949
+ style: { userSelect: z }
955
950
  },
956
- te,
951
+ oe,
957
952
  /* @__PURE__ */ r.createElement(
958
953
  "tbody",
959
954
  {
960
- className: "k-table-tbody",
955
+ className: m(s.tbody({})),
961
956
  ref: this.tableBodyRef,
962
957
  role: "rowgroup",
963
- ...pe
958
+ ...ge
964
959
  },
965
- O
960
+ P
966
961
  )
967
962
  )
968
- ), K && Y()),
969
- s && /* @__PURE__ */ r.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ r.createElement(
963
+ ), B && ee()),
964
+ p && /* @__PURE__ */ r.createElement("div", { className: m(s.heightContainer({})), role: "presentation" }, /* @__PURE__ */ r.createElement(
970
965
  "div",
971
966
  {
972
- style: s ? { height: this.vs.containerHeight + "px" } : {}
967
+ style: p ? { height: this.vs.containerHeight + "px" } : {}
973
968
  }
974
969
  ))
975
970
  )),
976
- ee,
977
- se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue })),
978
- this.showLicenseWatermark && /* @__PURE__ */ r.createElement(Ue, null)
971
+ ie,
972
+ re && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(fe, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(me, { ref: this.dragLogic.refDragElementClue })),
973
+ this.showLicenseWatermark && /* @__PURE__ */ r.createElement(qe, null)
979
974
  ),
980
- T,
981
- this.props.pageable && Z
975
+ j,
976
+ this.props.pageable && se
982
977
  ));
983
978
  }
984
979
  calculateMedia() {
@@ -986,8 +981,8 @@ const z = class z extends r.Component {
986
981
  }
987
982
  selectionChange(a) {
988
983
  if (this.props.onSelectionChange) {
989
- const { event: p, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: s, cell: l } = le(this.props.selectable), h = {
990
- ...this.getArguments(p.syntheticEvent),
984
+ const { event: n, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: s, cell: l } = pe(this.props.selectable), d = {
985
+ ...this.getArguments(n.syntheticEvent),
991
986
  dataItem: c,
992
987
  startColIndex: t,
993
988
  endColIndex: t,
@@ -1004,13 +999,13 @@ const z = class z extends r.Component {
1004
999
  componentId: this._gridId,
1005
1000
  selectedField: this.props.selectedField || ""
1006
1001
  };
1007
- this.props.onSelectionChange.call(void 0, h);
1002
+ this.props.onSelectionChange.call(void 0, d);
1008
1003
  }
1009
1004
  }
1010
- raiseDataEvent(a, p, c, e, t) {
1005
+ raiseDataEvent(a, n, c, e, t) {
1011
1006
  const s = this.props.onDataStateChange;
1012
1007
  if (a) {
1013
- const l = { ...this.getArguments(e), ...p, targetEvent: t };
1008
+ const l = { ...this.getArguments(e), ...n, targetEvent: t };
1014
1009
  a.call(void 0, l);
1015
1010
  } else
1016
1011
  s && s.call(
@@ -1025,60 +1020,60 @@ const z = class z extends r.Component {
1025
1020
  }
1026
1021
  );
1027
1022
  }
1028
- columnReorder(a, p, c) {
1029
- const e = this._columns[a], t = e.depth, s = (d) => {
1023
+ columnReorder(a, n, c) {
1024
+ const e = this._columns[a], t = e.depth, s = (h) => {
1030
1025
  do
1031
- d++;
1032
- while (d < this._columns.length && this._columns[d].depth > t);
1033
- return d;
1026
+ h++;
1027
+ while (h < this._columns.length && this._columns[h].depth > t);
1028
+ return h;
1034
1029
  }, l = this._columns.splice(a, s(a) - a);
1035
- this._columns.splice(a < p ? s(p - l.length) : p, 0, ...l), this._columns.filter((d) => d.declarationIndex >= 0).forEach((d, f) => d.orderIndex = f), this._columnsMutations++;
1036
- const h = this._columns[a].locked && this._columns[p].locked;
1037
- Ye(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), Qe(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
1038
- const n = this.columns;
1030
+ this._columns.splice(a < n ? s(n - l.length) : n, 0, ...l), this._columns.filter((h) => h.declarationIndex >= 0).forEach((h, g) => h.orderIndex = g), this._columnsMutations++;
1031
+ const d = this._columns[a].locked && this._columns[n].locked;
1032
+ et(this._columnsMap, this._columns, d || this._shouldUpdateLeftRight), tt(this._columnsMap, this._columns, d || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
1033
+ const p = this.columns;
1039
1034
  if (this.forceUpdate(), this.props.onColumnReorder) {
1040
- const d = {
1035
+ const h = {
1041
1036
  target: this,
1042
- columns: n,
1037
+ columns: p,
1043
1038
  columnId: e.id,
1044
1039
  nativeEvent: c
1045
1040
  };
1046
- this.props.onColumnReorder.call(void 0, d);
1041
+ this.props.onColumnReorder.call(void 0, h);
1047
1042
  }
1048
1043
  }
1049
- groupReorder(a, p, c) {
1044
+ groupReorder(a, n, c) {
1050
1045
  if (this.props.group === void 0)
1051
1046
  return;
1052
1047
  const e = this.props.group.slice();
1053
- e.splice(p, 0, ...e.splice(a, 1)), this.groupChange(e, c);
1048
+ e.splice(n, 0, ...e.splice(a, 1)), this.groupChange(e, c);
1054
1049
  }
1055
- columnToGroup(a, p, c) {
1050
+ columnToGroup(a, n, c) {
1056
1051
  const e = this._columns[a].field;
1057
1052
  if (!e)
1058
1053
  return;
1059
1054
  const t = (this.props.group || []).slice();
1060
- t.splice(p, 0, { field: e }), this.groupChange(t, c);
1055
+ t.splice(n, 0, { field: e }), this.groupChange(t, c);
1061
1056
  }
1062
- columnGroupChange(a, p) {
1057
+ columnGroupChange(a, n) {
1063
1058
  const c = this.dragLogic.getCurrentGroupsLength;
1064
- this.columnToGroup(a, c, p);
1059
+ this.columnToGroup(a, c, n);
1065
1060
  }
1066
1061
  resetTableWidth() {
1067
1062
  let a = 0;
1068
1063
  if (!this.columnResize.colGroupMain)
1069
1064
  return;
1070
- const p = this.columnResize.colGroupMain.children;
1071
- for (let c = 0; c < p.length; c++) {
1072
- const e = p[c].width;
1065
+ const n = this.columnResize.colGroupMain.children;
1066
+ for (let c = 0; c < n.length; c++) {
1067
+ const e = n[c].width;
1073
1068
  if (!e)
1074
1069
  return;
1075
1070
  a += parseFloat(e.toString());
1076
1071
  }
1077
1072
  a = Math.round(a), this._header && this._header.setWidth(a), this._footer && this._footer.setWidth(a), this.tableElement && (this.tableElement.style.width = a + "px");
1078
1073
  }
1079
- initColumns(a, p) {
1080
- const c = x.getIdPrefix(this.navigationStateRef), e = this.readColumns(a, c, this._columnsMutations), t = this.filterColumnsByMediaProp(e);
1081
- this._columns = t, this._columns.length === 0 && (this._columns = vt(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, this._columnsMutations), this.columnResize.columns = this._columns, this.dragLogic.columns = this._columns;
1074
+ initColumns(a, n) {
1075
+ 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;
1082
1077
  }
1083
1078
  getDataState() {
1084
1079
  return {
@@ -1097,9 +1092,9 @@ const z = class z extends r.Component {
1097
1092
  };
1098
1093
  }
1099
1094
  };
1100
- z.displayName = "KendoReactGrid", z.defaultProps = {
1095
+ H.displayName = "KendoReactGrid", H.defaultProps = {
1101
1096
  // never use this
1102
- }, z.propTypes = {
1097
+ }, H.propTypes = {
1103
1098
  data: o.oneOfType([
1104
1099
  o.array,
1105
1100
  o.shape({
@@ -1180,9 +1175,9 @@ z.displayName = "KendoReactGrid", z.defaultProps = {
1180
1175
  })
1181
1176
  ]),
1182
1177
  size: o.oneOf(["small", "medium"])
1183
- }, z.contextType = B;
1184
- let U = z;
1185
- ht(U);
1178
+ }, H.contextType = V;
1179
+ let $ = H;
1180
+ ct($);
1186
1181
  export {
1187
- U as Grid
1182
+ $ as Grid
1188
1183
  };