@progress/kendo-react-grid 8.3.0-develop.3 → 8.3.0-develop.4

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 N, 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 (!N)
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) => N && 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 (N)
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 = N && window.IntersectionObserver && new window.IntersectionObserver(this.handleIntersection, p) || null, this.resizeObserver = N && 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,40 +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
573
  headerRow: this.getHeaderRow(
574
- we,
575
- ye,
576
- Ee,
577
- n,
578
- Se,
579
- Ie,
580
- ke,
581
574
  _e,
582
575
  xe,
576
+ ke,
577
+ v,
578
+ Te,
579
+ De,
580
+ He,
583
581
  ze,
582
+ Ae,
583
+ Fe,
584
584
  this._columns,
585
585
  this._columnsMap,
586
586
  this.isRtl
587
587
  ),
588
588
  filterRow: this.props.filterable && /* @__PURE__ */ r.createElement(
589
- rt,
589
+ nt,
590
590
  {
591
591
  cells: this.props.cells,
592
- size: this.props.size,
592
+ size: t,
593
593
  columns: this._columns,
594
594
  filter: this.props.filter,
595
- filterOperators: this.props.filterOperators || Ce,
595
+ filterOperators: this.props.filterOperators || Se,
596
596
  filterChange: this.filterChange,
597
597
  sort: this.props.sort,
598
598
  cellRender: this.props.filterCellRender,
@@ -601,65 +601,67 @@ const z = class z extends r.Component {
601
601
  ariaRowIndex: this._columnsMap.length + 1
602
602
  }
603
603
  ) || void 0,
604
- cols: C.map((i, g) => /* @__PURE__ */ r.createElement(
604
+ cols: R.map((i, f) => /* @__PURE__ */ r.createElement(
605
605
  "col",
606
606
  {
607
- key: g.toString(),
608
- width: V(i)
607
+ key: f.toString(),
608
+ width: U(i)
609
609
  }
610
610
  ))
611
611
  }
612
- ), Te = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, De = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: He, hiddenColumns: Ae } = 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({
613
613
  enabled: this.props.columnVirtualization,
614
- columns: C,
615
- tableViewPortWidth: De,
616
- scrollLeft: Te
617
- }), Fe = (i, g, m) => {
614
+ columns: R,
615
+ tableViewPortWidth: Le,
616
+ scrollLeft: Ne
617
+ }), Oe = (i, f, b, F) => {
618
618
  let k = !1;
619
- 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;
620
620
  return {
621
- row: C.map((u, b) => {
622
- if (Ae[b])
621
+ row: R.map((u, C) => {
622
+ if (Ge[C])
623
623
  return null;
624
- const H = u.id ? u.id : b, A = `${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 } : {};
625
- 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;
626
626
  if (u.editable && this.props.editField) {
627
- const v = be(this.props.editField, i.dataItem);
628
- 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);
629
629
  }
630
- const W = u.cell || y && st || Rt, F = 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;
631
631
  return /* @__PURE__ */ r.createElement(
632
- W,
632
+ L,
633
633
  {
634
634
  onContextMenu: this.onContextMenu,
635
- key: H,
635
+ key: N,
636
636
  locked: this.props.lockGroups,
637
- id: x.generateNavigatableId(
638
- `${g}-${String(b)}`,
639
- p,
640
- F || 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"
641
641
  ),
642
- colSpan: He[b],
642
+ colSpan: Me[C],
643
643
  dataItem: i.dataItem,
644
644
  field: u.field,
645
645
  editor: u.editor,
646
646
  format: u.format,
647
- className: A,
647
+ className: w,
648
648
  render: this.props.cellRender,
649
- cells: Ct(this.props.cells, u.cells),
649
+ cells: yt(this.props.cells, u.cells),
650
650
  onChange: this.itemChange,
651
- selectionChange: this.props.onSelectionChange ? (v) => {
652
- 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 });
653
653
  } : void 0,
654
- columnIndex: b,
655
- columnsCount: C.length,
654
+ columnIndex: C,
655
+ columnsCount: R.length,
656
656
  rowType: i.rowType,
657
657
  level: i.level,
658
658
  expanded: i.expanded,
659
659
  dataIndex: i.dataIndex,
660
- style: w,
660
+ style: I,
661
661
  ariaColumnIndex: u.ariaColumnIndex,
662
- 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
663
665
  }
664
666
  );
665
667
  }),
@@ -667,73 +669,72 @@ const z = class z extends r.Component {
667
669
  isSelected: typeof S == "boolean" && S
668
670
  };
669
671
  };
670
- let j = 0;
671
- if (s)
672
+ let X = 0;
673
+ if (p)
672
674
  for (let i = 0; i < this.vs.topCacheCount + this.vs.attendedSkip - (this.props.skip || 0); i++) {
673
- const g = this._data.shift();
674
- if (g)
675
- 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--;
676
678
  else
677
679
  break;
678
680
  }
679
- const q = (i) => i >= this._data.length - j;
680
- let J = this.vs.realSkip || 0;
681
- const O = [];
682
- let K = !1;
683
- const X = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
684
- 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;
685
687
  if (this._data.length) {
686
- let i = -1, g = 0;
687
- (this._slicedData || this._data).forEach((m, k) => {
688
- m.rowType === "data" && (J++, i++);
689
- 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, A = H + "_1", w = Fe(m, H, i);
690
- if (D = b + X + g, O.push(/* @__PURE__ */ r.createElement(
691
- 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,
692
694
  {
693
- key: H,
694
- dataItem: m.dataItem,
695
- isAltRow: S,
695
+ key: C,
696
+ dataItem: b.dataItem,
697
+ isAltRow: k,
696
698
  isInEdit: w.isInEdit,
697
- rowType: m.rowType,
698
- isHidden: q(k),
699
- onClick: (y) => this.rowClick(y, m),
700
- 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),
701
703
  selectedField: this.props.selectedField,
702
704
  rowHeight: this.props.rowHeight,
703
705
  render: this.props.rowRender,
704
- ariaRowIndex: D,
705
- absoluteRowIndex: b,
706
- 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,
707
709
  isSelected: w.isSelected
708
710
  },
709
711
  w.row
710
- )), this.props.detail && m.rowType === "data" && m.expanded) {
711
- const y = C.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
712
- 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(
713
715
  "tr",
714
716
  {
715
- key: A,
716
- className: L(
717
- "k-table-row",
718
- S ? "k-detail-row k-table-alt-row k-alt" : "k-detail-row"
717
+ key: N,
718
+ className: m(
719
+ s.detailTr({ isAlt: k })
719
720
  ),
720
- style: { visibility: q(k) ? "hidden" : "", height: this.props.detailRowHeight },
721
+ style: { visibility: Y(F) ? "hidden" : "", height: this.props.detailRowHeight },
721
722
  role: "row",
722
- "aria-rowindex": D
723
+ "aria-rowindex": A
723
724
  },
724
- this.props.group && this.props.group.map((W, F) => {
725
- var oe;
726
- const v = (oe = w == null ? void 0 : w.row[F]) == 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 } : {};
727
728
  return /* @__PURE__ */ r.createElement(
728
- ve,
729
+ Ee,
729
730
  {
730
731
  id: "",
731
- dataIndex: m.dataIndex,
732
- field: W.field,
733
- dataItem: m.dataItem,
734
- key: F,
735
- style: Oe,
736
- ariaColumnIndex: 1 + F,
732
+ dataIndex: b.dataIndex,
733
+ field: K.field,
734
+ dataItem: b.dataItem,
735
+ key: L,
736
+ style: x,
737
+ ariaColumnIndex: 1 + L,
737
738
  isSelected: !1,
738
739
  locked: this.props.lockGroups,
739
740
  isRtl: this.isRtl,
@@ -742,109 +743,112 @@ const z = class z extends r.Component {
742
743
  );
743
744
  }),
744
745
  this.props.expandField && /* @__PURE__ */ r.createElement(
745
- _t,
746
+ Dt,
746
747
  {
747
- id: x.generateNavigatableId(`${A}-dhcell`, p)
748
+ id: D.generateNavigatableId(`${N}-dhcell`, n)
748
749
  }
749
750
  ),
750
751
  /* @__PURE__ */ r.createElement(
751
- kt,
752
+ Tt,
752
753
  {
753
754
  onContextMenu: this.onContextMenu,
754
- dataItem: m.dataItem,
755
- dataIndex: m.dataIndex,
756
- colSpan: y,
755
+ dataItem: b.dataItem,
756
+ dataIndex: b.dataIndex,
757
+ colSpan: I,
757
758
  ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
758
759
  detail: this.props.detail,
759
- id: x.generateNavigatableId(`${A}-dcell`, p)
760
+ id: D.generateNavigatableId(`${N}-dcell`, n)
760
761
  }
761
762
  )
762
763
  ));
763
764
  }
764
765
  });
765
766
  } else
766
- K = !0;
767
- const Ne = () => {
767
+ B = !0;
768
+ const Pe = () => {
768
769
  const i = this._header;
769
770
  return i && i.table && i.table.clientWidth;
770
- }, Y = () => /* @__PURE__ */ r.createElement(
771
+ }, ee = () => /* @__PURE__ */ r.createElement(
771
772
  "div",
772
773
  {
773
774
  key: "no-records",
774
- className: "k-grid-norecords",
775
- style: { width: Ne() }
775
+ className: m(s.noRecords({})),
776
+ style: { width: Pe() }
776
777
  },
777
- /* @__PURE__ */ r.createElement("div", { className: "k-grid-norecords-template", [Ze]: x.generateNavigatableId("no-records", p) }, I.length ? I : /* @__PURE__ */ r.createElement(Et, null))
778
- ), Q = {
779
- 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,
780
788
  onPageChange: this.pagerPageChange,
781
789
  total: a,
782
790
  dir: this.isRtl ? "rtl" : void 0,
783
791
  skip: this.vs.propsSkip || 0,
784
792
  take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
785
- messagesMap: pt,
786
- ...It(this.props.pageable || {})
787
- }, 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(
788
796
  "col",
789
797
  {
790
- key: g.toString(),
791
- width: V(i)
798
+ key: f.toString(),
799
+ width: U(i)
792
800
  }
793
- ), ee = (ie = this.props.cells) != null && ie.footerCell || this._columns.some(
801
+ ), ie = (ae = this.props.cells) != null && ae.footerCell || this._columns.some(
794
802
  (i) => {
795
- var g;
796
- return !!(i.footerCell || (g = i.cells) != null && g.footerCell);
803
+ var f;
804
+ return !!(i.footerCell || (f = i.cells) != null && f.footerCell);
797
805
  }
798
806
  ) ? /* @__PURE__ */ r.createElement(
799
- lt,
807
+ dt,
800
808
  {
801
- size: this.props.size,
809
+ size: t,
802
810
  columnResize: this.columnResize,
803
811
  staticHeaders: this.props.scrollable !== "none",
804
812
  hasScrollbarWidth: !!this.getCachedScrollbarWidth(),
805
813
  ref: (i) => this._footer = i,
806
814
  row: /* @__PURE__ */ r.createElement(
807
- St,
815
+ xt,
808
816
  {
809
817
  cells: this.props.cells,
810
- idPrefix: p,
818
+ idPrefix: n,
811
819
  columns: this._columns,
812
820
  isRtl: this.isRtl,
813
- ariaRowIndex: D + 1
821
+ ariaRowIndex: A + 1
814
822
  }
815
823
  ),
816
- cols: C.map(Me)
824
+ cols: R.map(We)
817
825
  }
818
- ) : null, te = /* @__PURE__ */ r.createElement(
826
+ ) : null, oe = /* @__PURE__ */ r.createElement(
819
827
  "colgroup",
820
828
  {
821
829
  ref: (i) => {
822
830
  this.columnResize.colGroupMain = i;
823
831
  }
824
832
  },
825
- C.map(
826
- (i, g) => /* @__PURE__ */ r.createElement(
833
+ R.map(
834
+ (i, f) => /* @__PURE__ */ r.createElement(
827
835
  "col",
828
836
  {
829
- key: g.toString(),
830
- className: Le(i.field) ? "k-sorted" : void 0,
831
- width: V(i)
837
+ key: f.toString(),
838
+ className: we(i.field, this.props.sort) ? m(s.sorted({})) : void 0,
839
+ width: U(i)
832
840
  }
833
841
  )
834
842
  )
835
- ), se = this.dragLogic.reorderable || this.dragLogic.groupable;
843
+ ), re = this.dragLogic.reorderable || this.dragLogic.groupable;
836
844
  if (this.props.scrollable === "none")
837
- 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(
838
846
  "div",
839
847
  {
840
848
  id: this.props.id,
841
849
  style: this.props.style,
842
- className: L(
843
- "k-grid",
844
- {
845
- "k-grid-md": !this.props.size,
846
- [`k-grid-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size
847
- },
850
+ className: m(
851
+ s.wrapper({ size: t }),
848
852
  this.props.className
849
853
  ),
850
854
  ref: (i) => {
@@ -853,12 +857,12 @@ const z = class z extends r.Component {
853
857
  "aria-label": this.props.ariaLabel,
854
858
  onKeyDown: this.onKeyDown,
855
859
  onFocus: this.onFocus,
856
- ...ne
860
+ ...ce
857
861
  },
858
- R,
859
- M,
862
+ G,
863
+ q,
860
864
  /* @__PURE__ */ r.createElement(
861
- he,
865
+ ue,
862
866
  {
863
867
  selectable: this.props.selectable,
864
868
  onRelease: this.selectionRelease,
@@ -870,34 +874,28 @@ const z = class z extends r.Component {
870
874
  "table",
871
875
  {
872
876
  ref: (i) => this.headTable = i,
873
- className: L(
874
- "k-table k-grid-table",
875
- { [`k-table-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size }
876
- ),
877
- style: { userSelect: d }
877
+ className: m(s.table({ size: t }))
878
878
  },
879
- te,
880
- $,
881
- /* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...pe }, O),
882
- ee
879
+ oe,
880
+ J,
881
+ /* @__PURE__ */ r.createElement("tbody", { role: "rowgroup", className: m(s.tbody({})), ...ge }, P),
882
+ ie
883
883
  )
884
884
  ),
885
- K && Y(),
886
- se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue }))
887
- ), T, this.props.pageable && Z);
888
- let P = this.props.style || {};
889
- 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(
890
890
  "div",
891
891
  {
892
892
  id: this.props.id,
893
- style: P,
894
- className: L(
895
- "k-grid",
896
- {
897
- "k-grid-md": !this.props.size,
898
- [`k-grid-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size,
899
- "k-grid-virtual": s
900
- },
893
+ style: W,
894
+ className: m(
895
+ s.wrapper({
896
+ size: t,
897
+ virtual: p
898
+ }),
901
899
  this.props.className
902
900
  ),
903
901
  ref: (i) => {
@@ -906,31 +904,31 @@ const z = class z extends r.Component {
906
904
  "aria-label": this.props.ariaLabel,
907
905
  onKeyDown: this.onKeyDown,
908
906
  onFocus: this.onFocus,
909
- ...ne
907
+ ...ce
910
908
  },
911
- R,
912
- M,
909
+ G,
910
+ q,
913
911
  /* @__PURE__ */ r.createElement(
914
912
  "div",
915
913
  {
916
- className: "k-grid-aria-root",
914
+ className: m(s.ariaRoot({})),
917
915
  role: "grid",
918
- "aria-colcount": C.length,
916
+ "aria-colcount": R.length,
919
917
  "aria-rowcount": a,
920
918
  id: this._gridId,
921
- "aria-label": c.toLanguageString(ue, dt[ue])
919
+ "aria-label": c.toLanguageString(be, gt[be])
922
920
  },
923
- $,
924
- /* @__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(
925
923
  "div",
926
924
  {
927
925
  ref: this.containerRef,
928
- className: "k-grid-content k-virtual-content",
926
+ className: m(s.content({})),
929
927
  onScroll: this.scrollHandler,
930
928
  role: "presentation"
931
929
  },
932
- /* @__PURE__ */ r.createElement("div", { className: "k-grid-table-wrap", role: "presentation" }, /* @__PURE__ */ r.createElement(
933
- he,
930
+ /* @__PURE__ */ r.createElement("div", { className: m(s.tableWrap({})), role: "presentation" }, /* @__PURE__ */ r.createElement(
931
+ ue,
934
932
  {
935
933
  selectable: this.props.selectable,
936
934
  onRelease: this.selectionRelease,
@@ -942,42 +940,40 @@ const z = class z extends r.Component {
942
940
  "table",
943
941
  {
944
942
  ref: (i) => this.tableElement = i,
945
- className: L(
946
- "k-table k-grid-table",
947
- {
948
- "k-table-md": !this.props.size,
949
- [`k-table-${G.sizeMap[this.props.size] || this.props.size}`]: this.props.size
950
- }
943
+ className: m(
944
+ s.table({
945
+ size: t
946
+ })
951
947
  ),
952
948
  role: "presentation",
953
- style: { userSelect: d }
949
+ style: { userSelect: z }
954
950
  },
955
- te,
951
+ oe,
956
952
  /* @__PURE__ */ r.createElement(
957
953
  "tbody",
958
954
  {
959
- className: "k-table-tbody",
955
+ className: m(s.tbody({})),
960
956
  ref: this.tableBodyRef,
961
957
  role: "rowgroup",
962
- ...pe
958
+ ...ge
963
959
  },
964
- O
960
+ P
965
961
  )
966
962
  )
967
- ), K && Y()),
968
- 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(
969
965
  "div",
970
966
  {
971
- style: s ? { height: this.vs.containerHeight + "px" } : {}
967
+ style: p ? { height: this.vs.containerHeight + "px" } : {}
972
968
  }
973
969
  ))
974
970
  )),
975
- ee,
976
- se && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(de, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ r.createElement(ce, { ref: this.dragLogic.refDragElementClue })),
977
- 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)
978
974
  ),
979
- T,
980
- this.props.pageable && Z
975
+ j,
976
+ this.props.pageable && se
981
977
  ));
982
978
  }
983
979
  calculateMedia() {
@@ -985,8 +981,8 @@ const z = class z extends r.Component {
985
981
  }
986
982
  selectionChange(a) {
987
983
  if (this.props.onSelectionChange) {
988
- const { event: p, dataItem: c, dataIndex: e, columnIndex: t } = a, { mode: s, cell: l } = le(this.props.selectable), h = {
989
- ...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),
990
986
  dataItem: c,
991
987
  startColIndex: t,
992
988
  endColIndex: t,
@@ -1003,13 +999,13 @@ const z = class z extends r.Component {
1003
999
  componentId: this._gridId,
1004
1000
  selectedField: this.props.selectedField || ""
1005
1001
  };
1006
- this.props.onSelectionChange.call(void 0, h);
1002
+ this.props.onSelectionChange.call(void 0, d);
1007
1003
  }
1008
1004
  }
1009
- raiseDataEvent(a, p, c, e, t) {
1005
+ raiseDataEvent(a, n, c, e, t) {
1010
1006
  const s = this.props.onDataStateChange;
1011
1007
  if (a) {
1012
- const l = { ...this.getArguments(e), ...p, targetEvent: t };
1008
+ const l = { ...this.getArguments(e), ...n, targetEvent: t };
1013
1009
  a.call(void 0, l);
1014
1010
  } else
1015
1011
  s && s.call(
@@ -1024,60 +1020,60 @@ const z = class z extends r.Component {
1024
1020
  }
1025
1021
  );
1026
1022
  }
1027
- columnReorder(a, p, c) {
1028
- 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) => {
1029
1025
  do
1030
- d++;
1031
- while (d < this._columns.length && this._columns[d].depth > t);
1032
- return d;
1026
+ h++;
1027
+ while (h < this._columns.length && this._columns[h].depth > t);
1028
+ return h;
1033
1029
  }, l = this._columns.splice(a, s(a) - a);
1034
- 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++;
1035
- const h = this._columns[a].locked && this._columns[p].locked;
1036
- Ye(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), Qe(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
1037
- 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;
1038
1034
  if (this.forceUpdate(), this.props.onColumnReorder) {
1039
- const d = {
1035
+ const h = {
1040
1036
  target: this,
1041
- columns: n,
1037
+ columns: p,
1042
1038
  columnId: e.id,
1043
1039
  nativeEvent: c
1044
1040
  };
1045
- this.props.onColumnReorder.call(void 0, d);
1041
+ this.props.onColumnReorder.call(void 0, h);
1046
1042
  }
1047
1043
  }
1048
- groupReorder(a, p, c) {
1044
+ groupReorder(a, n, c) {
1049
1045
  if (this.props.group === void 0)
1050
1046
  return;
1051
1047
  const e = this.props.group.slice();
1052
- 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);
1053
1049
  }
1054
- columnToGroup(a, p, c) {
1050
+ columnToGroup(a, n, c) {
1055
1051
  const e = this._columns[a].field;
1056
1052
  if (!e)
1057
1053
  return;
1058
1054
  const t = (this.props.group || []).slice();
1059
- t.splice(p, 0, { field: e }), this.groupChange(t, c);
1055
+ t.splice(n, 0, { field: e }), this.groupChange(t, c);
1060
1056
  }
1061
- columnGroupChange(a, p) {
1057
+ columnGroupChange(a, n) {
1062
1058
  const c = this.dragLogic.getCurrentGroupsLength;
1063
- this.columnToGroup(a, c, p);
1059
+ this.columnToGroup(a, c, n);
1064
1060
  }
1065
1061
  resetTableWidth() {
1066
1062
  let a = 0;
1067
1063
  if (!this.columnResize.colGroupMain)
1068
1064
  return;
1069
- const p = this.columnResize.colGroupMain.children;
1070
- for (let c = 0; c < p.length; c++) {
1071
- 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;
1072
1068
  if (!e)
1073
1069
  return;
1074
1070
  a += parseFloat(e.toString());
1075
1071
  }
1076
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");
1077
1073
  }
1078
- initColumns(a, p) {
1079
- const c = x.getIdPrefix(this.navigationStateRef), e = this.readColumns(a, c, this._columnsMutations), t = this.filterColumnsByMediaProp(e);
1080
- 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;
1081
1077
  }
1082
1078
  getDataState() {
1083
1079
  return {
@@ -1096,9 +1092,9 @@ const z = class z extends r.Component {
1096
1092
  };
1097
1093
  }
1098
1094
  };
1099
- z.displayName = "KendoReactGrid", z.defaultProps = {
1095
+ H.displayName = "KendoReactGrid", H.defaultProps = {
1100
1096
  // never use this
1101
- }, z.propTypes = {
1097
+ }, H.propTypes = {
1102
1098
  data: o.oneOfType([
1103
1099
  o.array,
1104
1100
  o.shape({
@@ -1179,9 +1175,9 @@ z.displayName = "KendoReactGrid", z.defaultProps = {
1179
1175
  })
1180
1176
  ]),
1181
1177
  size: o.oneOf(["small", "medium"])
1182
- }, z.contextType = B;
1183
- let U = z;
1184
- ht(U);
1178
+ }, H.contextType = V;
1179
+ let $ = H;
1180
+ ct($);
1185
1181
  export {
1186
- U as Grid
1182
+ $ as Grid
1187
1183
  };