@progress/kendo-react-grid 9.4.0-develop.19 → 9.4.0-develop.20

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/GridComponent.mjs CHANGED
@@ -6,78 +6,93 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as l from "react";
9
- import { validatePackage as ht, uGrid as Ct, getter as K, classNames as u, canUseDOM as wt } from "@progress/kendo-react-common";
10
- import { process as Et } from "@progress/kendo-data-query";
11
- import { combineFilters as It, getDetailExpandableOptions as vt, getGroupExpandableOptions as Rt, getSelectionOptions as St, tableKeyboardNavigationTools as p, Pager as xt, tableKeyboardNavigationBodyAttributes as Gt, tableKeyboardNavigationScopeAttributes as He, tableColumnsVirtualization as kt } from "@progress/kendo-react-data-tools";
12
- import { GridSelectionCell as Nt } from "./cells/GridSelectionCell.mjs";
13
- import { GridHierarchyCell as Ft } from "./cells/GridHierarchyCell.mjs";
14
- import { GridEditCell as Dt } from "./cells/GridEditCell.mjs";
15
- import { Header as Tt } from "./header/Header.mjs";
16
- import { HeaderRow as Kt } from "./header/HeaderRow.mjs";
17
- import { FilterRow as Ht } from "./header/FilterRow.mjs";
18
- import { GroupPanel as At } from "./header/GroupPanel.mjs";
19
- import { Footer as Pt } from "./footer/Footer.mjs";
20
- import { getRowSpanOptions as Ae, getColumnWidth as ee, isSorted as Pe, flatData as Bt, autoGenerateColumns as Vt, mapColumns as Lt, clientColumn as Ot, getNestedValue as Be, getColSpan as Ve, resolveCells as _t, isClientReference as zt, sanitizeColumns as Mt, readColumns as Wt } from "./utils/index.mjs";
21
- import { GridCell as jt } from "./cells/GridCell.mjs";
9
+ import { validatePackage as wt, uGrid as Et, getter as H, classNames as f, canUseDOM as It } from "@progress/kendo-react-common";
10
+ import { process as St } from "@progress/kendo-data-query";
11
+ import { combineFilters as vt, getDetailExpandableOptions as Rt, getGroupExpandableOptions as xt, getSelectionOptions as Gt, tableKeyboardNavigationTools as p, Pager as kt, tableKeyboardNavigationBodyAttributes as Nt, tableKeyboardNavigationScopeAttributes as Ke, tableColumnsVirtualization as Ft } from "@progress/kendo-react-data-tools";
12
+ import { GridSelectionCell as Dt } from "./cells/GridSelectionCell.mjs";
13
+ import { GridHierarchyCell as Tt } from "./cells/GridHierarchyCell.mjs";
14
+ import { GridEditCell as Ht } from "./cells/GridEditCell.mjs";
15
+ import { Header as Kt } from "./header/Header.mjs";
16
+ import { HeaderRow as At } from "./header/HeaderRow.mjs";
17
+ import { FilterRow as Bt } from "./header/FilterRow.mjs";
18
+ import { GroupPanel as Pt } from "./header/GroupPanel.mjs";
19
+ import { Footer as Vt } from "./footer/Footer.mjs";
20
+ import { getRowSpanOptions as Ae, getColumnWidth as ee, isSorted as Be, flatData as Lt, autoGenerateColumns as Ot, mapColumns as _t, clientColumn as zt, getNestedValue as Pe, getColSpan as Ve, resolveCells as Mt, isClientReference as Wt, sanitizeColumns as jt, readColumns as $t } from "./utils/index.mjs";
21
+ import { GridCell as Ut } from "./cells/GridCell.mjs";
22
22
  import { GridGroupCell as Le } from "./cells/GridGroupCell.mjs";
23
- import { GridRow as $t } from "./rows/GridRow.mjs";
24
- import { GridHeaderSelectionCell as Ut } from "./header/GridHeaderSelectionCell.mjs";
23
+ import { GridRow as Jt } from "./rows/GridRow.mjs";
24
+ import { GridHeaderSelectionCell as Qt } from "./header/GridHeaderSelectionCell.mjs";
25
25
  import { GridNoRecords as Oe } from "./components/noRecords/GridNoRecords.mjs";
26
26
  import { operators as _e } from "./filterCommon.mjs";
27
- import { FooterRow as Jt } from "./footer/FooterRow.mjs";
28
- import { normalize as Qt } from "./paging/GridPagerSettings.mjs";
29
- import { packageMetadata as Xt } from "./package-metadata.mjs";
30
- import { GridDetailCell as Yt } from "./cells/GridDetailCell.mjs";
31
- import { GridDetailHierarchyCell as Zt } from "./cells/GridDetailHierarchyCell.mjs";
27
+ import { FooterRow as Xt } from "./footer/FooterRow.mjs";
28
+ import { normalize as Yt } from "./paging/GridPagerSettings.mjs";
29
+ import { packageMetadata as Zt } from "./package-metadata.mjs";
30
+ import { GridDetailCell as qt } from "./cells/GridDetailCell.mjs";
31
+ import { GridDetailHierarchyCell as pt } from "./cells/GridDetailHierarchyCell.mjs";
32
32
  import { GridNoRecordsContainer as ze } from "./components/noRecords/GridNoRecordsContainer.mjs";
33
- import { GridWatermarkOverlay as qt } from "./GridWatermarkOverlay.mjs";
33
+ import { GridWatermarkOverlay as el } from "./GridWatermarkOverlay.mjs";
34
34
  import { GridClientWrapper as Me } from "./GridClientWrapper.mjs";
35
- import { GridColGroup as pt } from "./components/colGroup/GridColGroup.mjs";
36
- import { GridTable as el } from "./components/table/GridTable.mjs";
35
+ import { GridColGroup as tl } from "./components/colGroup/GridColGroup.mjs";
36
+ import { GridTable as ll } from "./components/table/GridTable.mjs";
37
37
  import { GridDropClue as We } from "./components/GridDropClue.mjs";
38
38
  import { GridDragClue as je } from "./components/GridDragClue.mjs";
39
39
  import { GridTableBody as $e } from "./components/table/GridTableBody.mjs";
40
- import { PagerContainer as tl } from "./components/PagerContainer.mjs";
41
- import { GridTableScrollable as ll } from "./components/table/GridTableScrollable.mjs";
40
+ import { PagerContainer as al } from "./components/PagerContainer.mjs";
41
+ import { GridTableScrollable as rl } from "./components/table/GridTableScrollable.mjs";
42
42
  import { GridElementContainer as Ue } from "./components/GridElementContainer.mjs";
43
- import { GridContainerElementContainer as al } from "./components/GridContainerElementContainer.mjs";
44
- import { VirtualScrollHeightContainer as rl } from "./components/VirtualScrollHeightContainer.mjs";
45
- import { LocalizationService as nl, IntlService as il } from "@progress/kendo-react-intl";
46
- import { gridAriaLabel as Je, messages as ol } from "./messages/index.mjs";
43
+ import { GridContainerElementContainer as nl } from "./components/GridContainerElementContainer.mjs";
44
+ import { VirtualScrollHeightContainer as il } from "./components/VirtualScrollHeightContainer.mjs";
45
+ import { LocalizationService as ol, IntlService as dl } from "@progress/kendo-react-intl";
46
+ import { gridAriaLabel as Je, messages as cl } from "./messages/index.mjs";
47
47
  import { VirtualScrollFixed as j } from "./VirtualScrollFixed.mjs";
48
- import { VirtualScroll as dl } from "./VirtualScroll.mjs";
49
- import { GridCustomCellClientContainer as cl } from "./components/GridCustomCellClientContainer.mjs";
50
- import { GridReorderableRowsContainer as sl } from "./components/GridDraggableRowsContainer.mjs";
51
- import { GridRowReorderCell as ml } from "./cells/GridRowReorderCell.mjs";
52
- import { GridHeaderRowReorderCell as ul } from "./header/client/GridHeaderRowReorderCell.mjs";
48
+ import { VirtualScroll as sl } from "./VirtualScroll.mjs";
49
+ import { GridCustomCellClientContainer as ml } from "./components/GridCustomCellClientContainer.mjs";
50
+ import { GridReorderableRowsContainer as ul } from "./components/GridDraggableRowsContainer.mjs";
51
+ import { GridRowReorderCell as fl } from "./cells/GridRowReorderCell.mjs";
52
+ import { GridHeaderRowReorderCell as gl } from "./header/client/GridHeaderRowReorderCell.mjs";
53
53
  import { GridLoader as Qe } from "./components/GridLoader.mjs";
54
- const fl = l.forwardRef((e, te) => {
55
- var Ie, ve, Re, Se, xe, Ge, ke;
56
- const S = e.id + "-role-element-id", x = e.navigatable ? S : "";
57
- ht(Xt);
58
- const Xe = (t, n, s, o, i, a, d) => {
59
- const c = [], y = Bt(
60
- c,
54
+ const bl = l.forwardRef((e, te) => {
55
+ var Ie, Se, ve, Re, xe, Ge, ke;
56
+ const R = e.id + "-role-element-id", x = e.navigatable ? R : "";
57
+ wt(Zt);
58
+ const Xe = (t, r, d, o, i, a, c) => {
59
+ const s = [], h = Lt(
60
+ s,
61
61
  C,
62
62
  t,
63
- { index: n },
64
- s !== void 0,
63
+ { index: r },
64
+ d !== void 0,
65
65
  o,
66
66
  i,
67
67
  a,
68
- nt.defaultExpand,
69
- d
68
+ ot.defaultExpand,
69
+ c
70
70
  );
71
- return { flattedData: c, resolvedGroupsCount: y };
71
+ return { flattedData: s, resolvedGroupsCount: h };
72
72
  }, Ye = (t) => {
73
- const n = t.filter(
73
+ const r = t.filter(
74
74
  (i) => i && i.type && i.type.displayName === "KendoReactGridColumn"
75
- ), s = f.current.filter((i) => i.declarationIndex >= 0 && i.parentIndex === -1), o = Mt(s);
76
- return Wt(n, o, { prevId: 0, idPrefix: x });
77
- }, Ze = (t) => t.filter((n) => wt && n && n.media ? window.matchMedia(n.media).matches : n), qe = (t, n) => {
75
+ ), d = m.current.filter((i) => i.declarationIndex >= 0 && i.parentIndex === -1), o = jt(d);
76
+ return $t(r, o, { prevId: 0, idPrefix: x });
77
+ }, Ze = (t) => t.filter((r) => It && r && r.media ? window.matchMedia(r.media).matches : r), qe = () => {
78
+ const t = [], r = (d, o) => d == null ? void 0 : d.forEach((i) => {
79
+ const a = i.hidden || o;
80
+ t.push({
81
+ ...i,
82
+ hidden: a
83
+ }), r(i.children, a);
84
+ });
85
+ return r(e.columnsState, !1), t;
86
+ }, pe = (t) => {
87
+ const r = qe();
88
+ return t.filter((d) => {
89
+ var o;
90
+ return !((o = r.find((i) => i.id === d.id)) != null && o.hidden);
91
+ });
92
+ }, et = (t, r) => {
78
93
  var i;
79
- const s = Ye(t), o = Ze(s);
80
- f.current = o, f.current.length === 0 && (f.current = Vt(
94
+ const d = Ye(t), o = Ze(d);
95
+ m.current = o, m.current.length === 0 && (m.current = Ot(
81
96
  C,
82
97
  e.group,
83
98
  {
@@ -87,15 +102,15 @@ const fl = l.forwardRef((e, te) => {
87
102
  prevId: 0,
88
103
  idPrefix: x
89
104
  }
90
- )), pe(f.current, n), G = Lt(f.current, !0), ae.current = f.current.map(Ot);
91
- }, pe = (t, n) => {
105
+ )), m.current = pe(m.current), tt(m.current, r), G = _t(m.current, !0), ae.current = m.current.map(zt);
106
+ }, tt = (t, r) => {
92
107
  var i;
93
108
  t.filter((a) => e.selectedField && a.field === e.selectedField || a.columnType === "checkbox").forEach((a) => {
94
- a.width = a.width || "50px", a.cell = a.cell || Nt, a._type = "edit", a.headerCell = a.headerCell || Ut;
109
+ a.width = a.width || "50px", a.cell = a.cell || Dt, a._type = "edit", a.headerCell = a.headerCell || Qt;
95
110
  }), N !== void 0 && t.filter((a) => a.columnType === "reorder").forEach((a) => {
96
- a.width = a.width || "50px", a.cell = a.cell || ml, a.headerCell = a.headerCell || ul, a.sortable = !1, a.filterable = !1, a.editable = !1;
111
+ a.width = a.width || "50px", a.cell = a.cell || fl, a.headerCell = a.headerCell || gl, a.sortable = !1, a.filterable = !1, a.editable = !1;
97
112
  });
98
- const s = {
113
+ const d = {
99
114
  id: "",
100
115
  resizable: !0,
101
116
  width: "32px",
@@ -117,15 +132,15 @@ const fl = l.forwardRef((e, te) => {
117
132
  };
118
133
  let o = 0;
119
134
  (e.expandField || A.enabled) && e.detail && (t.unshift({
120
- ...s,
135
+ ...d,
121
136
  _type: "expand",
122
- cell: Ft,
137
+ cell: Tt,
123
138
  field: (i = A.column) != null ? i : e.expandField,
124
- headerClassName: u(m.hierarchyCell({}))
139
+ headerClassName: f(u.hierarchyCell({}))
125
140
  }), o++);
126
- for (let a = 0; a < n; a++)
141
+ for (let a = 0; a < r; a++)
127
142
  t.unshift({
128
- ...s,
143
+ ...d,
129
144
  isAccessible: !1,
130
145
  cell: Le,
131
146
  field: "value",
@@ -134,32 +149,32 @@ const fl = l.forwardRef((e, te) => {
134
149
  t.slice(o).forEach((a) => {
135
150
  a.parentIndex >= 0 && (a.parentIndex += o), a.rowSpannable = a.rowSpannable !== void 0 ? Ae(a.rowSpannable) : ne;
136
151
  });
137
- }, le = () => C.length === e.total, et = () => {
138
- const { rowHeight: t, detailRowHeight: n, detail: s, expandField: o } = e, i = le(), a = t !== void 0 && t > 0, d = n !== void 0 && n > 0;
139
- return !a || H && !i || !!(s && o) && (!d || !i) ? dl : j;
140
- }, $ = () => e.isClient ? f : ae, tt = (t, n, s, o, i, a) => {
141
- let d = Ve(t, n);
152
+ }, le = () => C.length === e.total, lt = () => {
153
+ const { rowHeight: t, detailRowHeight: r, detail: d, expandField: o } = e, i = le(), a = t !== void 0 && t > 0, c = r !== void 0 && r > 0;
154
+ return !a || K && !i || !!(d && o) && (!c || !i) ? sl : j;
155
+ }, $ = () => e.isClient ? m : ae, at = (t, r, d, o, i, a) => {
156
+ let c = Ve(t, r);
142
157
  if (e.columnVirtualization && t.colSpan === 1)
143
158
  return { colSpan: a, colsToSkip: i };
144
- let c = s.length - 1 === o, y = s.length - o;
145
- return e.columnVirtualization && (c = b.length - 1 === o, y = b.length - o), d > 1 && !c ? i = d - 1 : d = 1, y <= d && !c && (d = y), { colSpan: d, colsToSkip: i };
159
+ let s = d.length - 1 === o, h = d.length - o;
160
+ return e.columnVirtualization && (s = b.length - 1 === o, h = b.length - o), c > 1 && !s ? i = c - 1 : c = 1, h <= c && !s && (c = h), { colSpan: c, colsToSkip: i };
146
161
  };
147
162
  let U, g = [], O;
148
- const f = e.columnsRef || { current: [] }, ae = { current: [] };
163
+ const m = e.columnsRef || { current: [] }, ae = { current: [] };
149
164
  let G = [[]];
150
- const lt = e.scrollLeftRef || { current: 0 }, _ = e.localization || new nl(), at = e.intl || new il("en"), k = e.unstyled, m = k && k.uGrid ? k.uGrid : Ct, N = typeof e.rowReorderable == "object" ? e.rowReorderable.enabled : e.rowReorderable, F = e.autoProcessData === !0 ? {
165
+ const rt = e.scrollLeftRef || { current: 0 }, _ = e.localization || new ol(), nt = e.intl || new dl("en"), k = e.unstyled, u = k && k.uGrid ? k.uGrid : Et, N = typeof e.rowReorderable == "object" ? e.rowReorderable.enabled : e.rowReorderable, F = e.autoProcessData === !0 ? {
151
166
  group: !0,
152
167
  sort: !0,
153
168
  filter: !0,
154
169
  search: !0,
155
170
  page: !0
156
171
  } : e.autoProcessData;
157
- let C, R;
158
- if (Array.isArray(e.data) ? (C = e.data, R = (Ie = e.total) != null ? Ie : C.length) : (C = ((ve = e.data) == null ? void 0 : ve.data) || [], R = (xe = (Se = e.total) != null ? Se : (Re = e.data) == null ? void 0 : Re.total) != null ? xe : C.length), F) {
159
- const { data: t, total: n } = Et(C, {
172
+ let C, v;
173
+ if (Array.isArray(e.data) ? (C = e.data, v = (Ie = e.total) != null ? Ie : C.length) : (C = ((Se = e.data) == null ? void 0 : Se.data) || [], v = (xe = (Re = e.total) != null ? Re : (ve = e.data) == null ? void 0 : ve.total) != null ? xe : C.length), F) {
174
+ const { data: t, total: r } = St(C, {
160
175
  group: F.group ? e.group : void 0,
161
176
  sort: F.sort ? e.sort : void 0,
162
- filter: It(
177
+ filter: vt(
163
178
  F.filter ? e.filter : void 0,
164
179
  F.search ? e.search : void 0
165
180
  ),
@@ -168,12 +183,12 @@ const fl = l.forwardRef((e, te) => {
168
183
  skip: e.skip
169
184
  } : {}
170
185
  });
171
- C = t, R = (Ge = e.total) != null ? Ge : n;
186
+ C = t, v = (Ge = e.total) != null ? Ge : r;
172
187
  }
173
- const { size: E = "medium" } = e, rt = typeof e.groupable == "object" && e.groupable.footer || "none", D = e.scrollable === "virtual", H = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, A = vt(!!e.detail), nt = Rt(
188
+ const { size: E = "medium" } = e, it = typeof e.groupable == "object" && e.groupable.footer || "none", D = e.scrollable === "virtual", K = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, A = Rt(!!e.detail), ot = xt(
174
189
  typeof e.groupable == "object" && e.groupable.enabled !== !1 ? e.groupable.expandable : e.groupable
175
- ), { resolvedGroupsCount: it, flattedData: ot } = Xe(
176
- rt,
190
+ ), { resolvedGroupsCount: dt, flattedData: ct } = Xe(
191
+ it,
177
192
  e.skip || 0,
178
193
  e.group,
179
194
  e.expandField,
@@ -181,52 +196,52 @@ const fl = l.forwardRef((e, te) => {
181
196
  e.groupExpand,
182
197
  e.dataItemKey
183
198
  );
184
- g = ot;
185
- const J = et();
199
+ g = ct;
200
+ const J = lt();
186
201
  J === j && le() && (O = g.slice(
187
202
  e.skip || 0,
188
203
  (e.skip || 0) + ((e.take !== void 0 ? e.take : e.pageSize) || 0)
189
204
  ));
190
- const re = St(e.selectable || !!e.selectedField), ne = Ae(e.rowSpannable), dt = re && re.drag ? "none" : void 0, z = l.Children.toArray(e.children);
191
- qe(z, it);
192
- const ie = z.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? l.cloneElement(t, { ...t.props, ariaControls: S }) : null), M = z.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), oe = z.filter(
205
+ const re = Gt(e.selectable || !!e.selectedField), ne = Ae(e.rowSpannable), st = re && re.drag ? "none" : void 0, z = l.Children.toArray(e.children);
206
+ et(z, dt);
207
+ const ie = z.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? l.cloneElement(t, { ...t.props, ariaControls: R }) : null), M = z.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), oe = z.filter(
193
208
  (t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
194
- ), b = f.current.filter((t) => t.children.length === 0), de = H && /* @__PURE__ */ l.createElement(At, { columns: $().current, group: e.group || [], ariaControls: S }), ce = /* @__PURE__ */ l.createElement(
195
- Tt,
209
+ ), b = m.current.filter((t) => t.children.length === 0), de = K && /* @__PURE__ */ l.createElement(Pt, { columns: $().current, group: e.group || [], ariaControls: R }), ce = /* @__PURE__ */ l.createElement(
210
+ Kt,
196
211
  {
197
212
  size: E,
198
213
  staticHeaders: e.scrollable !== "none",
199
- draggable: e.reorderable || H,
214
+ draggable: e.reorderable || K,
200
215
  headerRow: /* @__PURE__ */ l.createElement(
201
- Kt,
216
+ At,
202
217
  {
203
218
  cells: e.cells,
204
219
  sort: e.sort,
205
220
  sortable: e.sortable,
206
221
  group: e.group || [],
207
- groupable: H,
222
+ groupable: K,
208
223
  filter: e.filter,
209
224
  filterable: e.filterable,
210
225
  filterOperators: e.filterOperators || _e,
211
226
  columnMenu: e.columnMenu,
212
227
  columnMenuIcon: e.columnMenuIcon,
213
- columns: f.current,
228
+ columns: m.current,
214
229
  columnsMap: G,
215
230
  cellRender: e.headerCellRender,
216
231
  navigatable: !!e.navigatable,
217
232
  localization: _,
218
233
  unstyled: k,
219
234
  headerSelectionValue: !!(e.select && g.filter((t) => t.rowType === "data").every(
220
- (t) => e.select && e.dataItemKey && K(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[K(e.dataItemKey)(t.dataItem)] : void 0
235
+ (t) => e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0
221
236
  ))
222
237
  }
223
238
  ),
224
239
  filterRow: e.filterable && /* @__PURE__ */ l.createElement(
225
- Ht,
240
+ Bt,
226
241
  {
227
242
  cells: e.cells,
228
243
  size: E,
229
- columns: f.current,
244
+ columns: m.current,
230
245
  filter: e.filter,
231
246
  filterOperators: e.filterOperators || _e,
232
247
  sort: e.sort,
@@ -236,89 +251,89 @@ const fl = l.forwardRef((e, te) => {
236
251
  localization: _
237
252
  }
238
253
  ) || void 0,
239
- cols: b.map((t, n) => /* @__PURE__ */ l.createElement("col", { key: n.toString(), width: ee(t) }))
254
+ cols: b.map((t, r) => /* @__PURE__ */ l.createElement("col", { key: r.toString(), width: ee(t) }))
240
255
  }
241
- ), ct = lt.current || 0, st = parseFloat(((e.style || {}).width || "").toString()), mt = (t, n, s, o, i) => {
256
+ ), mt = rt.current || 0, ut = parseFloat(((e.style || {}).width || "").toString()), ft = (t, r, d, o, i) => {
242
257
  let a = !1;
243
- const d = e.selectedField ? Be(e.selectedField, t.dataItem) : e.select && e.dataItemKey && K(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[K(e.dataItemKey)(t.dataItem)] : void 0;
244
- let c = 0;
245
- const { colSpans: y, hiddenColumns: T } = kt({
258
+ const c = e.selectedField ? Pe(e.selectedField, t.dataItem) : e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0;
259
+ let s = 0;
260
+ const { colSpans: h, hiddenColumns: T } = Ft({
246
261
  enabled: e.columnVirtualization,
247
262
  columns: b,
248
- tableViewPortWidth: st,
249
- scrollLeft: ct,
263
+ tableViewPortWidth: ut,
264
+ scrollLeft: mt,
250
265
  getColSpan: Ve,
251
266
  dataItem: t.dataItem
252
- }), I = b.filter((r, h) => !T[h]);
267
+ }), I = b.filter((n, y) => !T[y]);
253
268
  return {
254
- row: b.map((r, h) => {
255
- var Fe, De, Te, Ke;
256
- if (T[h])
269
+ row: b.map((n, y) => {
270
+ var Fe, De, Te, He;
271
+ if (T[y])
257
272
  return null;
258
- if (c > 0)
259
- return c--, null;
273
+ if (s > 0)
274
+ return s--, null;
260
275
  let w;
261
- if ((Fe = r.rowSpannable) != null && Fe.enabled && t.rowType === "data" && r.field && i) {
262
- const v = r.field ? (Te = (De = r.rowSpannable).valueGetter) == null ? void 0 : Te.call(De, t.dataItem, r.field) : null;
263
- w = { value: v, count: 1 }, i[r.field] && ((Ke = i[r.field]) == null ? void 0 : Ke.value) === v && i[r.field] !== null ? (i[r.field].count++, w.count = null) : i[r.field] = w;
276
+ if ((Fe = n.rowSpannable) != null && Fe.enabled && t.rowType === "data" && n.field && i) {
277
+ const S = n.field ? (Te = (De = n.rowSpannable).valueGetter) == null ? void 0 : Te.call(De, t.dataItem, n.field) : null;
278
+ w = { value: S, count: 1 }, i[n.field] && ((He = i[n.field]) == null ? void 0 : He.value) === S && i[n.field] !== null ? (i[n.field].count++, w.count = null) : i[n.field] = w;
264
279
  }
265
- const { colSpan: B, colsToSkip: Y } = tt(
266
- r,
280
+ const { colSpan: P, colsToSkip: Y } = at(
281
+ n,
267
282
  t.dataItem,
268
283
  I,
269
- h,
270
- c,
271
- y[h]
284
+ y,
285
+ s,
286
+ h[y]
272
287
  );
273
- c = Y;
274
- const V = r.id ? r.id : h, gt = u(m.contentSticky({ locked: r.locked }), r.className), bt = r.left !== void 0 ? { left: r.left, right: r.right } : {};
288
+ s = Y;
289
+ const V = n.id ? n.id : y, ht = f(u.contentSticky({ locked: n.locked }), n.className), yt = n.left !== void 0 ? { left: n.left, right: n.right } : {};
275
290
  let Ne = !1;
276
- if (r.editable && (e.editable || e.editField)) {
277
- const v = e.editField ? Be(e.editField, t.dataItem) : e.edit && e.dataItemKey ? e.edit[K(e.dataItemKey)(t.dataItem)] : void 0, q = typeof v == "boolean" ? v : Array.isArray(v) ? v.indexOf(r.field) > -1 : r.field !== void 0 && v === r.field;
278
- q && r.columnType === "data" && (q === !0 || q === r.field) && (a = !0, Ne = !0);
291
+ if (n.editable && (e.editable || e.editField)) {
292
+ const S = e.editField ? Pe(e.editField, t.dataItem) : e.edit && e.dataItemKey ? e.edit[H(e.dataItemKey)(t.dataItem)] : void 0, q = typeof S == "boolean" ? S : Array.isArray(S) ? S.indexOf(n.field) > -1 : n.field !== void 0 && S === n.field;
293
+ q && n.columnType === "data" && (q === !0 || q === n.field) && (a = !0, Ne = !0);
279
294
  }
280
- const Z = r.cell || Ne && Dt || jt, yt = e.expandField && e.detail && r.field === e.expandField || r._type === "expand", L = {
295
+ const Z = n.cell || Ne && Ht || Ut, Ct = e.expandField && e.detail && n.field === e.expandField || n._type === "expand", L = {
281
296
  locked: e.lockGroups,
282
297
  id: p.generateNavigatableId(
283
- `${n}-${String(h)}`,
298
+ `${r}-${String(y)}`,
284
299
  x,
285
- yt || t.rowType === "groupHeader" || t.rowType === "groupFooter" || r.field === "value" ? "nodata" : "cell"
300
+ Ct || t.rowType === "groupHeader" || t.rowType === "groupFooter" || n.field === "value" ? "nodata" : "cell"
286
301
  ),
287
- colSpan: B,
302
+ colSpan: P,
288
303
  dataItem: t.dataItem,
289
- field: r.field,
290
- editor: r.editor,
291
- format: r.format,
292
- columnType: r.columnType,
304
+ field: n.field,
305
+ editor: n.editor,
306
+ format: n.format,
307
+ columnType: n.columnType,
293
308
  rowReorderable: N,
294
- className: gt,
309
+ className: ht,
295
310
  render: e.cellRender,
296
- cells: _t(e.cells, r.cells),
297
- columnIndex: h,
311
+ cells: Mt(e.cells, n.cells),
312
+ columnIndex: y,
298
313
  columnsCount: b.length,
299
314
  rowType: t.rowType,
300
315
  level: t.level,
301
316
  expanded: t.expanded,
302
317
  dataIndex: t.dataIndex,
303
- rowDataIndex: s,
304
- columnPosition: bt,
318
+ rowDataIndex: d,
319
+ columnPosition: yt,
305
320
  style: {},
306
- ariaColumnIndex: r.ariaColumnIndex,
307
- isSelected: (r == null ? void 0 : r._type) === "edit" ? d : Array.isArray(d) && d.indexOf(h) > -1,
308
- isSorted: !!Pe(r.field, e.sort),
321
+ ariaColumnIndex: n.ariaColumnIndex,
322
+ isSelected: (n == null ? void 0 : n._type) === "edit" ? c : Array.isArray(c) && c.indexOf(y) > -1,
323
+ isSorted: !!Be(n.field, e.sort),
309
324
  isInEdit: a,
310
325
  isAlt: o,
311
326
  unstyled: k,
312
327
  group: t.group,
313
328
  localization: _,
314
- intl: at,
329
+ intl: nt,
315
330
  _rowSpan: w
316
331
  };
317
- return r.cell ? /* @__PURE__ */ l.createElement(
318
- cl,
332
+ return n.cell ? /* @__PURE__ */ l.createElement(
333
+ ml,
319
334
  {
320
335
  key: V,
321
- isClient: zt(Z),
336
+ isClient: Wt(Z),
322
337
  dataItem: L.dataItem,
323
338
  rowDataIndex: L.rowDataIndex,
324
339
  columnIndex: L.columnIndex
@@ -327,33 +342,33 @@ const fl = l.forwardRef((e, te) => {
327
342
  ) : /* @__PURE__ */ l.createElement(Z, { key: V, ...L });
328
343
  }),
329
344
  isInEdit: a,
330
- isSelected: typeof d == "boolean" && d
345
+ isSelected: typeof c == "boolean" && c
331
346
  };
332
347
  };
333
348
  let se = 0;
334
349
  if (D && U)
335
350
  for (let t = 0; t < U.topCacheCount + U.attendedSkip - (e.skip || 0); t++) {
336
- const n = g.shift();
337
- if (n)
338
- g.push(n), se++, n.rowType === "groupHeader" && t--;
351
+ const r = g.shift();
352
+ if (r)
353
+ g.push(r), se++, r.rowType === "groupHeader" && t--;
339
354
  else
340
355
  break;
341
356
  }
342
357
  const me = (t) => t >= g.length - se;
343
358
  let ue = e.skip || 0;
344
359
  const Q = [], fe = !g.length, ge = G.length + (e.filterable ? 1 : 0) + 1;
345
- let P = 0;
360
+ let B = 0;
346
361
  if (g.length) {
347
- let t = -1, n = 0;
348
- const s = ne.enabled ? {} : void 0;
362
+ let t = -1, r = 0;
363
+ const d = ne.enabled ? {} : void 0;
349
364
  (O || g).forEach((o, i) => {
350
365
  o.rowType === "data" && (ue++, t++);
351
- const a = ue % 2 === 0, d = e.dataItemKey && K(e.dataItemKey)(o.dataItem), c = i + (e.skip || 0), y = d || "ai" + c, T = y + "_1", I = mt(o, y, t, a, s);
352
- if (P = c + ge + n, Q.push(
366
+ const a = ue % 2 === 0, c = e.dataItemKey && H(e.dataItemKey)(o.dataItem), s = i + (e.skip || 0), h = c || "ai" + s, T = h + "_1", I = ft(o, h, t, a, d);
367
+ if (B = s + ge + r, Q.push(
353
368
  /* @__PURE__ */ l.createElement(
354
- $t,
369
+ Jt,
355
370
  {
356
- key: y,
371
+ key: h,
357
372
  dataItem: o.dataItem,
358
373
  isAltRow: a,
359
374
  isInEdit: I.isInEdit,
@@ -365,38 +380,38 @@ const fl = l.forwardRef((e, te) => {
365
380
  selectedField: e.selectedField,
366
381
  rowHeight: e.rowHeight,
367
382
  render: e.rowRender,
368
- ariaRowIndex: P,
369
- absoluteRowIndex: c,
370
- dataIndex: D && !e.groupable ? c : t,
383
+ ariaRowIndex: B,
384
+ absoluteRowIndex: s,
385
+ dataIndex: D && !e.groupable ? s : t,
371
386
  isSelected: I.isSelected,
372
387
  rows: e.rows
373
388
  },
374
389
  I.row
375
390
  )
376
391
  ), e.detail && o.rowType === "data" && o.expanded) {
377
- const r = b.length - (e.expandField || A.enabled ? 1 : 0) - (e.group ? e.group.length : 0) || 1;
378
- n++, P = c + ge + n, Q.push(
392
+ const n = b.length - (e.expandField || A.enabled ? 1 : 0) - (e.group ? e.group.length : 0) || 1;
393
+ r++, B = s + ge + r, Q.push(
379
394
  /* @__PURE__ */ l.createElement(
380
395
  "tr",
381
396
  {
382
397
  key: T,
383
- className: u(m.detailTr({ isAlt: a })),
398
+ className: f(u.detailTr({ isAlt: a })),
384
399
  style: {
385
400
  visibility: me(i) ? "hidden" : "",
386
401
  height: e.detailRowHeight
387
402
  },
388
403
  role: "row",
389
- "aria-rowindex": P
404
+ "aria-rowindex": B
390
405
  },
391
- e.group && e.group.map((h, w) => {
406
+ e.group && e.group.map((y, w) => {
392
407
  var V;
393
- const B = (V = I == null ? void 0 : I.row[w]) == null ? void 0 : V.props.style, Y = B ? { left: B.left, right: B.right } : {};
408
+ const P = (V = I == null ? void 0 : I.row[w]) == null ? void 0 : V.props.style, Y = P ? { left: P.left, right: P.right } : {};
394
409
  return /* @__PURE__ */ l.createElement(
395
410
  Le,
396
411
  {
397
412
  id: "",
398
413
  dataIndex: o.dataIndex,
399
- field: h.field,
414
+ field: y.field,
400
415
  dataItem: o.dataItem,
401
416
  key: w,
402
417
  columnPosition: Y,
@@ -410,18 +425,18 @@ const fl = l.forwardRef((e, te) => {
410
425
  );
411
426
  }),
412
427
  (e.expandField || A.enabled) && /* @__PURE__ */ l.createElement(
413
- Zt,
428
+ pt,
414
429
  {
415
430
  unstyled: k,
416
431
  id: p.generateNavigatableId(`${T}-dhcell`, x)
417
432
  }
418
433
  ),
419
434
  /* @__PURE__ */ l.createElement(
420
- Yt,
435
+ qt,
421
436
  {
422
437
  dataItem: o.dataItem,
423
438
  dataIndex: o.dataIndex,
424
- colSpan: r,
439
+ colSpan: n,
425
440
  ariaColIndex: 2 + (e.group ? e.group.length : 0),
426
441
  detail: e.detail,
427
442
  id: p.generateNavigatableId(`${T}-dcell`, x)
@@ -434,51 +449,51 @@ const fl = l.forwardRef((e, te) => {
434
449
  }
435
450
  const be = {
436
451
  size: E,
437
- total: R,
452
+ total: v,
438
453
  skip: e.skip || 0,
439
454
  take: (e.take !== void 0 ? e.take : e.pageSize) || 10,
440
- ...Qt(e.pageable || {})
441
- }, ye = /* @__PURE__ */ l.createElement(tl, null, e.pager ? /* @__PURE__ */ l.createElement(e.pager, { ...be }) : /* @__PURE__ */ l.createElement(xt, { className: u(m.pager({})), ...be })), ut = (t, n) => /* @__PURE__ */ l.createElement("col", { key: n.toString(), width: ee(t) }), ft = (ke = e.cells) != null && ke.footerCell || f.current.some((t) => {
442
- var n;
443
- return !!(t.footerCell || (n = t.cells) != null && n.footerCell);
455
+ ...Yt(e.pageable || {})
456
+ }, he = /* @__PURE__ */ l.createElement(al, null, e.pager ? /* @__PURE__ */ l.createElement(e.pager, { ...be }) : /* @__PURE__ */ l.createElement(kt, { className: f(u.pager({})), ...be })), gt = (t, r) => /* @__PURE__ */ l.createElement("col", { key: r.toString(), width: ee(t) }), bt = (ke = e.cells) != null && ke.footerCell || m.current.some((t) => {
457
+ var r;
458
+ return !!(t.footerCell || (r = t.cells) != null && r.footerCell);
444
459
  }) ? /* @__PURE__ */ l.createElement(
445
- Pt,
460
+ Vt,
446
461
  {
447
462
  size: E,
448
463
  staticHeaders: e.scrollable !== "none",
449
464
  row: /* @__PURE__ */ l.createElement(
450
- Jt,
465
+ Xt,
451
466
  {
452
467
  cells: e.cells,
453
468
  idPrefix: x,
454
- columns: f.current,
455
- ariaRowIndex: P + 1
469
+ columns: m.current,
470
+ ariaRowIndex: B + 1
456
471
  }
457
472
  ),
458
- cols: b.map(ut)
473
+ cols: b.map(gt)
459
474
  }
460
- ) : null, he = /* @__PURE__ */ l.createElement(pt, null, b.map((t, n) => /* @__PURE__ */ l.createElement(
475
+ ) : null, ye = /* @__PURE__ */ l.createElement(tl, null, b.map((t, r) => /* @__PURE__ */ l.createElement(
461
476
  "col",
462
477
  {
463
- key: n.toString(),
464
- className: Pe(t.field, e.sort) ? u(m.sorted({})) : void 0,
478
+ key: r.toString(),
479
+ className: Be(t.field, e.sort) ? f(u.sorted({})) : void 0,
465
480
  width: ee(t)
466
481
  }
467
- ))), Ce = e.reorderable || H, { detail: gl, cells: bl, rows: yl, ...we } = e, Ee = /* @__PURE__ */ l.createElement(
482
+ ))), Ce = e.reorderable || K, { detail: hl, cells: yl, rows: Cl, ...we } = e, Ee = /* @__PURE__ */ l.createElement(
468
483
  "tbody",
469
484
  {
470
485
  role: "rowgroup",
471
- className: u(m.tbody({})),
472
- ...Gt
486
+ className: f(u.tbody({})),
487
+ ...Nt
473
488
  },
474
489
  Q
475
490
  );
476
491
  let X = Ee;
477
492
  if (N && (X = /* @__PURE__ */ l.createElement(
478
- sl,
493
+ ul,
479
494
  {
480
- unstyled: m,
481
- columns: f.current,
495
+ unstyled: u,
496
+ columns: m.current,
482
497
  rowReorderSettings: e.rowReorderable
483
498
  },
484
499
  Ee
@@ -493,8 +508,8 @@ const fl = l.forwardRef((e, te) => {
493
508
  dataRef: g,
494
509
  slicedData: O,
495
510
  isFixedVirtualScroll: J === j,
496
- id: S,
497
- total: R,
511
+ id: R,
512
+ total: v,
498
513
  detailExpandable: !!e.detail
499
514
  },
500
515
  /* @__PURE__ */ l.createElement(Ue, null, /* @__PURE__ */ l.createElement(
@@ -502,19 +517,19 @@ const fl = l.forwardRef((e, te) => {
502
517
  {
503
518
  id: e.id,
504
519
  style: e.style,
505
- className: u(m.wrapper({ size: E }), e.className),
520
+ className: f(u.wrapper({ size: E }), e.className),
506
521
  "aria-label": e.ariaLabel,
507
- ...He
522
+ ...Ke
508
523
  },
509
524
  ie,
510
525
  de,
511
526
  /* @__PURE__ */ l.createElement(
512
- el,
527
+ ll,
513
528
  {
514
529
  selectable: e.selectable,
515
- className: u(m.table({ size: E }))
530
+ className: f(u.table({ size: E }))
516
531
  },
517
- he,
532
+ ye,
518
533
  ce,
519
534
  /* @__PURE__ */ l.createElement($e, { rowReorderable: N }, X)
520
535
  ),
@@ -522,7 +537,7 @@ const fl = l.forwardRef((e, te) => {
522
537
  Ce && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(We, null), /* @__PURE__ */ l.createElement(je, null))
523
538
  )),
524
539
  oe,
525
- e.pageable && ye,
540
+ e.pageable && he,
526
541
  /* @__PURE__ */ l.createElement(Qe, { loader: e.loader, showLoader: e.showLoader })
527
542
  );
528
543
  let W = e.style || {};
@@ -536,8 +551,8 @@ const fl = l.forwardRef((e, te) => {
536
551
  dataRef: g,
537
552
  slicedData: O,
538
553
  isFixedVirtualScroll: J === j,
539
- id: S,
540
- total: R,
554
+ id: R,
555
+ total: v,
541
556
  detailExpandable: !!e.detail
542
557
  },
543
558
  /* @__PURE__ */ l.createElement(Ue, null, /* @__PURE__ */ l.createElement(
@@ -545,61 +560,61 @@ const fl = l.forwardRef((e, te) => {
545
560
  {
546
561
  id: e.id,
547
562
  style: W,
548
- className: u(
549
- m.wrapper({
563
+ className: f(
564
+ u.wrapper({
550
565
  size: E,
551
566
  virtual: D
552
567
  }),
553
568
  e.className
554
569
  ),
555
570
  "aria-label": e.ariaLabel,
556
- ...He
571
+ ...Ke
557
572
  },
558
573
  ie,
559
574
  de,
560
575
  /* @__PURE__ */ l.createElement(
561
576
  "div",
562
577
  {
563
- className: u(m.ariaRoot({})),
578
+ className: f(u.ariaRoot({})),
564
579
  role: "grid",
565
580
  "aria-colcount": b.length,
566
- "aria-rowcount": R,
567
- id: S,
568
- "aria-label": _.toLanguageString(Je, ol[Je])
581
+ "aria-rowcount": v,
582
+ id: R,
583
+ "aria-label": _.toLanguageString(Je, cl[Je])
569
584
  },
570
585
  ce,
571
- /* @__PURE__ */ l.createElement("div", { className: u(m.container({})), role: "presentation" }, /* @__PURE__ */ l.createElement(al, null, /* @__PURE__ */ l.createElement("div", { className: u(m.content({})), role: "presentation" }, /* @__PURE__ */ l.createElement("div", { className: u(m.tableWrap({})), role: "presentation" }, /* @__PURE__ */ l.createElement(
572
- ll,
586
+ /* @__PURE__ */ l.createElement("div", { className: f(u.container({})), role: "presentation" }, /* @__PURE__ */ l.createElement(nl, null, /* @__PURE__ */ l.createElement("div", { className: f(u.content({})), role: "presentation" }, /* @__PURE__ */ l.createElement("div", { className: f(u.tableWrap({})), role: "presentation" }, /* @__PURE__ */ l.createElement(
587
+ rl,
573
588
  {
574
589
  selectable: e.selectable,
575
- tableClassName: u(
576
- m.table({
590
+ tableClassName: f(
591
+ u.table({
577
592
  size: E
578
593
  })
579
594
  ),
580
- tableStyle: { userSelect: dt }
595
+ tableStyle: { userSelect: st }
581
596
  },
582
- he,
597
+ ye,
583
598
  /* @__PURE__ */ l.createElement($e, { rowReorderable: N }, X)
584
599
  ), fe && /* @__PURE__ */ l.createElement(ze, null, M.length ? M : /* @__PURE__ */ l.createElement(Oe, null))), D && /* @__PURE__ */ l.createElement(
585
600
  "div",
586
601
  {
587
- className: u(m.heightContainer({})),
602
+ className: f(u.heightContainer({})),
588
603
  role: "presentation"
589
604
  },
590
- /* @__PURE__ */ l.createElement(rl, { isVirtualScroll: D })
605
+ /* @__PURE__ */ l.createElement(il, { isVirtualScroll: D })
591
606
  )))),
592
- ft,
607
+ bt,
593
608
  Ce && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(We, null), /* @__PURE__ */ l.createElement(je, null)),
594
- /* @__PURE__ */ l.createElement(qt, null)
609
+ /* @__PURE__ */ l.createElement(el, null)
595
610
  ),
596
611
  oe,
597
- e.pageable && ye,
612
+ e.pageable && he,
598
613
  /* @__PURE__ */ l.createElement(Qe, { loader: e.loader, showLoader: e.showLoader })
599
614
  ))
600
615
  );
601
616
  });
602
- fl.displayName = "KendoReactGridComponent";
617
+ bl.displayName = "KendoReactGridComponent";
603
618
  export {
604
- fl as GridComponent
619
+ bl as GridComponent
605
620
  };