@progress/kendo-react-grid 9.5.0 → 10.0.0-develop.2

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