@progress/kendo-react-grid 15.2.0-develop.7 → 15.2.0-develop.8

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.
Files changed (55) hide show
  1. package/GridClientWrapper.d.ts +1 -0
  2. package/GridClientWrapper.js +1 -1
  3. package/GridClientWrapper.mjs +478 -450
  4. package/GridColumn.d.ts +18 -1
  5. package/GridComponent.js +1 -1
  6. package/GridComponent.mjs +509 -433
  7. package/cells/groupcell/GridGroupCell.js +1 -1
  8. package/cells/groupcell/GridGroupCell.mjs +60 -10
  9. package/cells/groupcell/GridGroupCellServer.js +1 -1
  10. package/cells/groupcell/GridGroupCellServer.mjs +31 -18
  11. package/cells/groupcell/utils.d.ts +19 -4
  12. package/cells/groupcell/utils.js +1 -1
  13. package/cells/groupcell/utils.mjs +255 -33
  14. package/cells/selectioncell/GridSelectionCellInput.d.ts +1 -0
  15. package/cells/selectioncell/GridSelectionCellInput.js +1 -1
  16. package/cells/selectioncell/GridSelectionCellInput.mjs +19 -14
  17. package/components/StickyGroupTable.d.ts +2 -0
  18. package/components/StickyGroupTable.js +1 -1
  19. package/components/StickyGroupTable.mjs +29 -27
  20. package/dist/cdn/js/kendo-react-grid.js +1 -1
  21. package/drag/GroupingIndicator.d.ts +1 -0
  22. package/drag/GroupingIndicator.js +1 -1
  23. package/drag/GroupingIndicator.mjs +33 -30
  24. package/getRowContents.d.ts +5 -0
  25. package/getRowContents.js +1 -1
  26. package/getRowContents.mjs +77 -67
  27. package/header/GridHeaderCell.js +1 -1
  28. package/header/GridHeaderCell.mjs +17 -8
  29. package/header/GroupPanel.d.ts +3 -0
  30. package/header/GroupPanel.js +1 -1
  31. package/header/GroupPanel.mjs +35 -33
  32. package/header/HeaderRow.js +1 -1
  33. package/header/HeaderRow.mjs +48 -47
  34. package/index.d.mts +4 -2
  35. package/index.d.ts +4 -2
  36. package/interfaces/GridCellProps.d.ts +21 -0
  37. package/interfaces/GridCellsSettings.d.ts +60 -0
  38. package/interfaces/GridGroupColumnSettings.d.ts +170 -0
  39. package/interfaces/GridGroupableSettings.d.ts +66 -0
  40. package/interfaces/GridHeaderCellProps.d.ts +4 -0
  41. package/messages/index.d.ts +5 -0
  42. package/messages/index.js +2 -2
  43. package/messages/index.mjs +149 -147
  44. package/package-metadata.js +1 -1
  45. package/package-metadata.mjs +2 -2
  46. package/package.json +17 -17
  47. package/rows/GridRowRenderer.d.ts +2 -0
  48. package/rows/GridRowRenderer.js +1 -1
  49. package/rows/GridRowRenderer.mjs +21 -19
  50. package/stacked/StackedModeRow.d.ts +2 -0
  51. package/stacked/StackedModeRow.js +1 -1
  52. package/stacked/StackedModeRow.mjs +97 -85
  53. package/utils/index.d.ts +7 -1
  54. package/utils/index.js +1 -1
  55. package/utils/index.mjs +67 -62
package/GridComponent.mjs CHANGED
@@ -5,143 +5,150 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as n from "react";
9
- import { uGrid as Ot, hasValidLicense as Vt, getLicenseMessage as _t, validatePackage as jt, getter as te, classNames as c, WatermarkOverlay as Ye } from "@progress/kendo-react-common";
10
- import { getDetailExpandableOptions as $t, getGroupExpandableOptions as Zt, getSelectionOptions as Ut, tableKeyboardNavigationTools as $, Pager as Yt, tableKeyboardNavigationBodyAttributes as qt, tableKeyboardNavigationScopeAttributes as qe } from "@progress/kendo-react-data-tools";
11
- import { GridHierarchyCell as Jt } from "./cells/hierarchycell/GridHierarchyCell.mjs";
12
- import { Header as Qt } from "./header/Header.mjs";
13
- import { HeaderRow as Xt } from "./header/HeaderRow.mjs";
14
- import { FilterRow as pt } from "./header/FilterRow.mjs";
15
- import { GroupPanel as ea } from "./header/GroupPanel.mjs";
16
- import { Footer as ta } from "./footer/Footer.mjs";
17
- import { isRowReorderEnabled as aa, getRowSpanOptions as Je, getColumnWidth as ae, isSorted as la, flatData as na, autoGenerateColumns as ia, mapColumns as ra, clientColumn as oa, getColSpan as da, readColumns as sa, getFlatColumnsState as ma, getColumnState as le } from "./utils/index.mjs";
18
- import { normalizeAutoProcessData as ca, processData as ua } from "./utils/dataProcessing.mjs";
19
- import { orderBy as Qe } from "@progress/kendo-data-query";
20
- import { GridGroupCell as fa } from "./cells/groupcell/GridGroupCell.mjs";
21
- import { GridHeaderGroupSpacerCell as ga } from "./header/GridHeaderGroupSpacerCell.mjs";
22
- import { GridHeaderSelectionCell as ba } from "./header/GridHeaderSelectionCell.mjs";
23
- import { GridNoRecords as Xe } from "./components/noRecords/GridNoRecords.mjs";
24
- import { operators as pe } from "./filterCommon.mjs";
25
- import { FooterRow as ha } from "./footer/FooterRow.mjs";
26
- import { normalize as wa } from "./paging/GridPagerSettings.mjs";
27
- import { packageMetadata as ne } from "./package-metadata.mjs";
28
- import { GridDetailCell as Ca } from "./cells/detailcell/GridDetailCell.mjs";
29
- import { GridNoRecordsContainer as et } from "./components/noRecords/GridNoRecordsContainer.mjs";
30
- import { GridClientWrapper as tt } from "./GridClientWrapper.mjs";
31
- import { GridColGroup as ya } from "./components/colGroup/GridColGroup.mjs";
32
- import { GridTable as Ra } from "./components/table/GridTable.mjs";
33
- import { GridDropClue as at } from "./components/GridDropClue.mjs";
34
- import { GridDragClue as lt } from "./components/GridDragClue.mjs";
35
- import { GridTableBody as nt } from "./components/table/GridTableBody.mjs";
36
- import { PagerContainer as Ea } from "./components/PagerContainer.mjs";
37
- import { GridTableScrollable as Sa } from "./components/table/GridTableScrollable.mjs";
38
- import { GridElementContainer as it } from "./components/GridElementContainer.mjs";
39
- import { GridContainerElementContainer as va } from "./components/GridContainerElementContainer.mjs";
40
- import { VirtualScrollHeightContainer as Ga } from "./components/VirtualScrollHeightContainer.mjs";
41
- import { VirtualScrollOverlay as ka } from "./components/VirtualScrollOverlay.mjs";
42
- import { gridAriaLabel as Z, messages as rt } from "./messages/index.mjs";
43
- import { GridReorderableRowsContainer as Ia } from "./components/GridDraggableRowsContainer.mjs";
44
- import { GridRowReorderCell as xa } from "./cells/rowreordercell/GridRowReorderCell.mjs";
45
- import { GridHeaderRowReorderCell as Ha } from "./header/client/GridHeaderRowReorderCell.mjs";
46
- import { GridLoader as ot } from "./components/GridLoader.mjs";
47
- import { gridPremiumFeatures as La } from "./utils/premium.mjs";
48
- import { LocalizationService as Na, IntlService as Da } from "@progress/kendo-react-intl";
49
- import { getVirtualCellsToRender as Ta } from "./utils/virtualColumns.mjs";
50
- import { GridEditDialog as Pa } from "./components/GridEditDialog.mjs";
51
- import { GridSelectionCellServer as Ba } from "./cells/selectioncell/GridSelectionCellServer.mjs";
52
- import { GridSelectionCell as Ma } from "./cells/selectioncell/GridSelectionCell.mjs";
53
- import { GridHierarchyCellServer as Wa } from "./cells/hierarchycell/GridHierarchyCellServer.mjs";
54
- import { GridRowReorderCellServer as za } from "./cells/rowreordercell/GridRowReorderCellServer.mjs";
55
- import { GridDetailCellServer as Ka } from "./cells/detailcell/GridDetailCellServer.mjs";
56
- import { GridGroupCellServer as Aa } from "./cells/groupcell/GridGroupCellServer.mjs";
57
- import { GridPinCell as Fa } from "./cells/pincell/GridPinCell.mjs";
58
- import { GridPinCellServer as Oa } from "./cells/pincell/GridPinCellServer.mjs";
59
- import { GridHeaderPinCell as Va } from "./header/client/GridHeaderPinCell.mjs";
60
- import { StackedModeColGroup as _a } from "./stacked/StackedModeComponents.mjs";
61
- import { GridRowRenderer as ja } from "./rows/GridRowRenderer.mjs";
62
- import { GridDetailRowRenderer as $a } from "./rows/GridDetailRowRenderer.mjs";
63
- import { StickyGroupTable as dt } from "./components/StickyGroupTable.mjs";
64
- import { PinnedRowsTable as st } from "./components/PinnedRowsTable.mjs";
65
- import { getRowContents as Za } from "./getRowContents.mjs";
66
- const Ua = n.forwardRef((e, mt) => {
67
- var Pe, Be, Me, We, ze, Ke, Ae, Fe, Oe, Ve, _e, je, $e, Ze;
68
- const G = e.id + "-role-element-id", E = e.navigatable ? G : "";
69
- let C = e.columnsState || [];
70
- const ct = (t, i, r, o, a, l, d) => {
71
- const w = [], O = na(
72
- w,
8
+ import * as l from "react";
9
+ import { uGrid as ua, hasValidLicense as ma, getLicenseMessage as ca, validatePackage as fa, getter as we, classNames as b, WatermarkOverlay as gt } from "@progress/kendo-react-common";
10
+ import { getDetailExpandableOptions as ga, getGroupExpandableOptions as ba, getSelectionOptions as ha, tableKeyboardNavigationTools as de, Pager as Ca, tableKeyboardNavigationBodyAttributes as wa, tableKeyboardNavigationScopeAttributes as bt } from "@progress/kendo-react-data-tools";
11
+ import { GridHierarchyCell as ya } from "./cells/hierarchycell/GridHierarchyCell.mjs";
12
+ import { Header as Ra } from "./header/Header.mjs";
13
+ import { HeaderRow as Ea } from "./header/HeaderRow.mjs";
14
+ import { FilterRow as Ga } from "./header/FilterRow.mjs";
15
+ import { GroupPanel as va } from "./header/GroupPanel.mjs";
16
+ import { Footer as Sa } from "./footer/Footer.mjs";
17
+ import { isRowReorderEnabled as ka, getRowSpanOptions as ht, mapColumns as Ct, getColumnWidth as ye, isSorted as xa, flatData as Ia, autoGenerateColumns as Ha, clientColumn as Na, getColSpan as Ma, readColumns as Ta, getFlatColumnsState as Pa, getColumnState as Re } from "./utils/index.mjs";
18
+ import { normalizeAutoProcessData as Da, processData as Wa } from "./utils/dataProcessing.mjs";
19
+ import { orderBy as wt } from "@progress/kendo-data-query";
20
+ import { GridGroupCell as Ba } from "./cells/groupcell/GridGroupCell.mjs";
21
+ import { GridHeaderGroupSpacerCell as yt } from "./header/GridHeaderGroupSpacerCell.mjs";
22
+ import { GridHeaderSelectionCell as La } from "./header/GridHeaderSelectionCell.mjs";
23
+ import { GridNoRecords as Rt } from "./components/noRecords/GridNoRecords.mjs";
24
+ import { operators as Et } from "./filterCommon.mjs";
25
+ import { FooterRow as za } from "./footer/FooterRow.mjs";
26
+ import { normalize as Fa } from "./paging/GridPagerSettings.mjs";
27
+ import { packageMetadata as Ee } from "./package-metadata.mjs";
28
+ import { GridDetailCell as Ka } from "./cells/detailcell/GridDetailCell.mjs";
29
+ import { GridNoRecordsContainer as Gt } from "./components/noRecords/GridNoRecordsContainer.mjs";
30
+ import { GridClientWrapper as vt } from "./GridClientWrapper.mjs";
31
+ import { GridColGroup as Aa } from "./components/colGroup/GridColGroup.mjs";
32
+ import { GridTable as Oa } from "./components/table/GridTable.mjs";
33
+ import { GridDropClue as St } from "./components/GridDropClue.mjs";
34
+ import { GridDragClue as kt } from "./components/GridDragClue.mjs";
35
+ import { GridTableBody as xt } from "./components/table/GridTableBody.mjs";
36
+ import { PagerContainer as ja } from "./components/PagerContainer.mjs";
37
+ import { GridTableScrollable as Va } from "./components/table/GridTableScrollable.mjs";
38
+ import { GridElementContainer as It } from "./components/GridElementContainer.mjs";
39
+ import { GridContainerElementContainer as _a } from "./components/GridContainerElementContainer.mjs";
40
+ import { VirtualScrollHeightContainer as $a } from "./components/VirtualScrollHeightContainer.mjs";
41
+ import { VirtualScrollOverlay as Za } from "./components/VirtualScrollOverlay.mjs";
42
+ import { gridAriaLabel as se, messages as Ge, groupColumnTitle as Ht } from "./messages/index.mjs";
43
+ import { GridReorderableRowsContainer as Ua } from "./components/GridDraggableRowsContainer.mjs";
44
+ import { GridRowReorderCell as Ya } from "./cells/rowreordercell/GridRowReorderCell.mjs";
45
+ import { GridHeaderRowReorderCell as qa } from "./header/client/GridHeaderRowReorderCell.mjs";
46
+ import { GridLoader as Nt } from "./components/GridLoader.mjs";
47
+ import { gridPremiumFeatures as Ja } from "./utils/premium.mjs";
48
+ import { LocalizationService as Qa, IntlService as Xa } from "@progress/kendo-react-intl";
49
+ import { getVirtualCellsToRender as pa } from "./utils/virtualColumns.mjs";
50
+ import { GridEditDialog as el } from "./components/GridEditDialog.mjs";
51
+ import { GridSelectionCellServer as tl } from "./cells/selectioncell/GridSelectionCellServer.mjs";
52
+ import { GridSelectionCell as al } from "./cells/selectioncell/GridSelectionCell.mjs";
53
+ import { GridHierarchyCellServer as ll } from "./cells/hierarchycell/GridHierarchyCellServer.mjs";
54
+ import { GridRowReorderCellServer as nl } from "./cells/rowreordercell/GridRowReorderCellServer.mjs";
55
+ import { GridDetailCellServer as il } from "./cells/detailcell/GridDetailCellServer.mjs";
56
+ import { GridGroupCellServer as ol } from "./cells/groupcell/GridGroupCellServer.mjs";
57
+ import { GridPinCell as rl } from "./cells/pincell/GridPinCell.mjs";
58
+ import { GridPinCellServer as dl } from "./cells/pincell/GridPinCellServer.mjs";
59
+ import { GridHeaderPinCell as sl } from "./header/client/GridHeaderPinCell.mjs";
60
+ import { StackedModeColGroup as ul } from "./stacked/StackedModeComponents.mjs";
61
+ import { GridRowRenderer as ml } from "./rows/GridRowRenderer.mjs";
62
+ import { GridDetailRowRenderer as cl } from "./rows/GridDetailRowRenderer.mjs";
63
+ import { StickyGroupTable as Mt } from "./components/StickyGroupTable.mjs";
64
+ import { PinnedRowsTable as Tt } from "./components/PinnedRowsTable.mjs";
65
+ import { getRowContents as fl } from "./getRowContents.mjs";
66
+ const gl = l.forwardRef((e, Pt) => {
67
+ var Qe, Xe, pe, et, tt, at, lt, nt, it, ot, rt, dt, st, ut, mt, ct;
68
+ const D = e.id + "-role-element-id", N = e.navigatable ? D : "";
69
+ let y = e.columnsState || [];
70
+ const Dt = (t, i, o, r, a, d, u) => {
71
+ const f = [], x = Ia(
72
+ f,
73
73
  t,
74
74
  i,
75
- { index: r },
76
- o !== void 0,
75
+ { index: o },
76
+ r !== void 0,
77
77
  a,
78
- l,
79
- xt.defaultExpand,
80
- d
78
+ d,
79
+ qt.defaultExpand,
80
+ u
81
81
  );
82
- return { flattedData: w, resolvedGroupsCount: O };
83
- }, ut = (t) => {
82
+ return { flattedData: f, resolvedGroupsCount: x };
83
+ }, Wt = (t) => {
84
84
  const i = t.filter(
85
- (r) => r && r.type && r.type.displayName === "KendoReactGridColumn"
85
+ (o) => o && o.type && o.type.displayName === "KendoReactGridColumn"
86
86
  );
87
- return sa(i, C, { prevId: 0, idPrefix: E });
88
- }, ft = () => {
89
- const t = [], i = (r, o) => r == null ? void 0 : r.forEach((a) => {
90
- const l = a.hidden || o;
87
+ return Ta(i, y, { prevId: 0, idPrefix: N });
88
+ }, Bt = () => {
89
+ const t = [], i = (o, r) => o == null ? void 0 : o.forEach((a) => {
90
+ const d = a.hidden || r;
91
91
  t.push({
92
92
  ...a,
93
- hidden: l
94
- }), i(a.children, l);
93
+ hidden: d
94
+ }), i(a.children, d);
95
95
  });
96
- return i(C, !1), t;
97
- }, gt = (t) => {
98
- const i = ft();
96
+ return i(y, !1), t;
97
+ }, Lt = (t) => {
98
+ const i = Bt();
99
99
  return [
100
- t.filter((r) => {
101
- var o;
102
- return !r.hidden && !((o = i.find((a) => a.id === r.id)) != null && o.hidden);
100
+ t.filter((o) => {
101
+ var r;
102
+ return !o.hidden && !((r = i.find((a) => a.id === o.id)) != null && r.hidden);
103
103
  }),
104
- t.filter((r) => {
105
- var o;
106
- return r.hidden || ((o = i.find((a) => a.id === r.id)) == null ? void 0 : o.hidden);
104
+ t.filter((o) => {
105
+ var r;
106
+ return o.hidden || ((r = i.find((a) => a.id === o.id)) == null ? void 0 : r.hidden);
107
107
  })
108
108
  ];
109
- }, bt = (t, i) => {
110
- s = ut(t), s.filter((a) => !a.hidden).length === 0 && (s = ia(
111
- y,
109
+ }, zt = (t, i) => {
110
+ m = Wt(t), m.filter((a) => !a.hidden).length === 0 && (m = Ha(
111
+ k,
112
112
  e.group,
113
113
  {
114
- column: v.column
114
+ column: T.column
115
115
  },
116
116
  {
117
117
  prevId: 0,
118
- idPrefix: E
118
+ idPrefix: N
119
119
  }
120
- )), wt(s, i);
121
- const [r, o] = gt(s);
122
- s = r, oe = o, N = ra(s, C, !0), de = s.map(oa);
123
- }, ht = (t, i) => {
124
- const r = (o) => {
125
- var l;
126
- const a = i.find((d) => d.id === o.id);
120
+ )), Kt(m, i);
121
+ const [o, r] = Lt(m);
122
+ m = o, J = r, X = Ct(m, y, !0), Q = m.map(Na);
123
+ }, Ft = (t, i) => {
124
+ const o = (r) => {
125
+ var d;
126
+ const a = i.find((u) => u.id === r.id);
127
127
  if (a) {
128
- const d = { ...a };
129
- return d.children = (l = o.children) == null ? void 0 : l.map(r), d;
128
+ const u = { ...a };
129
+ return u.children = (d = r.children) == null ? void 0 : d.map(o), u;
130
130
  }
131
- return le(o);
131
+ return Re(r);
132
132
  };
133
- C = t.filter((o) => o.parentIndex === -1).map(r);
134
- }, wt = (t, i) => {
135
- t.filter((l) => l.columnType === "checkbox").forEach((l) => {
136
- l.width = l.width || "50px", l.defaultCell = e.isClient ? Ma : Ba, l.defaultHeaderCell = ba, l._type = "edit", l.sortable = !1, l.filterable = !1, l.editable = !1;
137
- }), I !== void 0 && t.filter((l) => l.columnType === "reorder").forEach((l) => {
138
- l.width = l.width || "50px", l.defaultCell = e.isClient ? xa : za, l.defaultHeaderCell = Ha, l.sortable = !1, l.filterable = !1, l.editable = !1;
139
- }), e.pinnable && t.filter((l) => l.columnType === "pin").forEach((l) => {
140
- l.width = l.width || "48px", l.defaultCell = e.isClient ? Fa : Oa, l.defaultHeaderCell = Va, l.sortable = !1, l.filterable = !1, l.editable = !1;
133
+ y = t.filter((r) => r.parentIndex === -1).map(o);
134
+ }, Kt = (t, i) => {
135
+ var ie, q, P, oe;
136
+ if (typeof e.groupable == "object" && e.groupable.hideGroupedColumns === !0 && (h === "singleColumn" || h === "multipleColumns")) {
137
+ const n = new Set((e.group || []).map((g) => g.field));
138
+ t.filter((g) => g.field !== void 0 && n.has(g.field)).forEach((g) => {
139
+ g.hidden = !0;
140
+ });
141
+ }
142
+ t.filter((n) => n.columnType === "checkbox").forEach((n) => {
143
+ n.width = n.width || "50px", n.defaultCell = e.isClient ? al : tl, n.defaultHeaderCell = La, n._type = "edit", n.sortable = !1, n.filterable = !1, n.editable = !1;
144
+ }), L !== void 0 && t.filter((n) => n.columnType === "reorder").forEach((n) => {
145
+ n.width = n.width || "50px", n.defaultCell = e.isClient ? Ya : nl, n.defaultHeaderCell = qa, n.sortable = !1, n.filterable = !1, n.editable = !1;
146
+ }), e.pinnable && t.filter((n) => n.columnType === "pin").forEach((n) => {
147
+ n.width = n.width || "48px", n.defaultCell = e.isClient ? rl : dl, n.defaultHeaderCell = sl, n.sortable = !1, n.filterable = !1, n.editable = !1;
141
148
  });
142
- const r = ma(C);
143
- ht(t, r);
144
- const o = {
149
+ const r = Pa(y);
150
+ Ft(t, r);
151
+ const a = {
145
152
  id: "",
146
153
  resizable: !0,
147
154
  width: "32px",
@@ -161,77 +168,128 @@ const Ua = n.forwardRef((e, mt) => {
161
168
  ariaColumnIndex: 0,
162
169
  isAccessible: !0
163
170
  };
164
- let a = 0;
165
- if (v.enabled && e.detail) {
166
- const l = {
167
- ...o,
171
+ let d = 0;
172
+ if (T.enabled && e.detail) {
173
+ const n = {
174
+ ...a,
168
175
  _type: "expand",
169
- id: $.generateNavigatableId(`${a++}`, "expand", "column"),
170
- defaultCell: e.isClient ? Jt : Wa,
171
- field: v.column,
172
- headerClassName: c(m.hierarchyCell({}))
176
+ id: de.generateNavigatableId(`${d++}`, "expand", "column"),
177
+ defaultCell: e.isClient ? ya : ll,
178
+ field: T.column,
179
+ headerClassName: b(c.hierarchyCell({}))
173
180
  };
174
- t.unshift(l), C.unshift(r.find((d) => d.id === l.id) || le(l));
181
+ t.unshift(n), y.unshift(r.find((g) => g.id === n.id) || Re(n));
175
182
  }
176
- for (let l = 0; l < i; l++) {
177
- const d = {
178
- ...o,
179
- isAccessible: !1,
180
- defaultCell: e.isClient ? fa : Aa,
181
- defaultHeaderCell: ga,
182
- id: $.generateNavigatableId(`${a++}`, "group", "column"),
183
+ const u = h === "compact", f = h === "singleColumn", x = h === "multipleColumns", A = u || f ? Math.min(i, 1) : i, O = (n, g) => {
184
+ var v, s, V, re;
185
+ if (n === "singleColumn")
186
+ return W.toLanguageString(Ht, Ge[Ht]);
187
+ if (n !== "multipleColumns")
188
+ return a.title;
189
+ const j = (s = (v = e.group) == null ? void 0 : v[g]) == null ? void 0 : s.field, I = t.find((ft) => ft.field === j && ft.declarationIndex >= 0);
190
+ return (re = (V = I == null ? void 0 : I.title) != null ? V : j) != null ? re : a.title;
191
+ }, G = typeof e.groupable == "object" ? e.groupable.groupColumn : void 0;
192
+ for (let n = A - 1; n >= 0; n--) {
193
+ const g = f || x;
194
+ let j = a.width;
195
+ u ? j = "0px" : g && (j = void 0);
196
+ const I = (ie = e.group) == null ? void 0 : ie[n];
197
+ let v;
198
+ G !== void 0 && (typeof G == "function" ? I !== void 0 && (v = G(I)) : v = G);
199
+ const s = g ? v : void 0, V = {
200
+ ...a,
201
+ isAccessible: g,
202
+ isGroupColumn: g,
203
+ defaultCell: e.isClient ? Ba : ol,
204
+ defaultHeaderCell: g ? void 0 : yt,
205
+ id: de.generateNavigatableId(`${d++}`, "group", "column"),
183
206
  field: "value",
184
- locked: e.lockGroups
207
+ groupField: I == null ? void 0 : I.field,
208
+ title: (q = s == null ? void 0 : s.title) != null ? q : O(h, n),
209
+ width: (P = s == null ? void 0 : s.width) != null ? P : j,
210
+ locked: (oe = s == null ? void 0 : s.locked) != null ? oe : e.lockGroups,
211
+ sortable: !1,
212
+ filterable: !1,
213
+ editable: !1,
214
+ groupable: !1,
215
+ ...(s == null ? void 0 : s.resizable) !== void 0 && {
216
+ resizable: s.resizable
217
+ },
218
+ ...(s == null ? void 0 : s.reorderable) !== void 0 && {
219
+ reorderable: s.reorderable
220
+ },
221
+ ...(s == null ? void 0 : s.minWidth) !== void 0 && {
222
+ minWidth: s.minWidth
223
+ },
224
+ ...(s == null ? void 0 : s.maxWidth) !== void 0 && {
225
+ maxWidth: s.maxWidth
226
+ },
227
+ // A single group column can represent multiple grouped fields at once in
228
+ // 'singleColumn' mode, so a per-field column menu never applies there.
229
+ ...f ? { disableColumnMenu: !0 } : (s == null ? void 0 : s.columnMenu) !== void 0 && {
230
+ columnMenu: s.columnMenu
231
+ },
232
+ ...(v == null ? void 0 : v.cells) !== void 0 && {
233
+ cells: {
234
+ group: {
235
+ groupHeader: v.cells.groupHeader,
236
+ groupFooter: v.cells.groupFooter
237
+ }
238
+ }
239
+ }
185
240
  };
186
- t.unshift(d), C.unshift(r.find((w) => w.id === d.id) || le(d));
241
+ t.unshift(V), y.unshift(
242
+ r.find((re) => re.id === V.id) || Re(V)
243
+ );
187
244
  }
188
- t.slice(a).forEach((l) => {
189
- l.parentIndex >= 0 && (l.parentIndex += a), l.rowSpannable = l.rowSpannable !== void 0 ? Je(l.rowSpannable) : ue;
245
+ t.slice(d).forEach((n) => {
246
+ n.parentIndex >= 0 && (n.parentIndex += d), n.rowSpannable = n.rowSpannable !== void 0 ? ht(n.rowSpannable) : He;
190
247
  });
191
- }, ie = () => e.isClient ? s : de, re = (t) => {
248
+ }, ve = () => e.isClient ? m : Q, Se = (t) => {
192
249
  const i = [];
193
- let r = null, o = 0;
194
- if (u.forEach((a, l) => {
195
- let d = parseFloat(((a == null ? void 0 : a.width) || "").toString()) || 10;
196
- if (typeof (a == null ? void 0 : a.width) == "number" && (a != null && a.minResizableWidth) && (a == null ? void 0 : a.width) < (a == null ? void 0 : a.minResizableWidth) && (d = a == null ? void 0 : a.minResizableWidth), typeof (a == null ? void 0 : a.width) == "number" && (a != null && a.minWidth) && (a == null ? void 0 : a.width) < (a == null ? void 0 : a.minWidth) ? d = a == null ? void 0 : a.minWidth : typeof (a == null ? void 0 : a.width) == "number" && (a != null && a.maxWidth) && (a == null ? void 0 : a.width) > (a == null ? void 0 : a.maxWidth) && (d = a == null ? void 0 : a.maxWidth), o) {
197
- o--, r && (r.width += d);
250
+ let o = null, r = 0;
251
+ if (S.forEach((a, d) => {
252
+ const u = parseFloat(((a == null ? void 0 : a.width) || "").toString());
253
+ let f = Number.isNaN(u) ? 10 : u;
254
+ if (typeof (a == null ? void 0 : a.width) == "number" && (a != null && a.minResizableWidth) && (a == null ? void 0 : a.width) < (a == null ? void 0 : a.minResizableWidth) && (f = a == null ? void 0 : a.minResizableWidth), typeof (a == null ? void 0 : a.width) == "number" && (a != null && a.minWidth) && (a == null ? void 0 : a.width) < (a == null ? void 0 : a.minWidth) ? f = a == null ? void 0 : a.minWidth : typeof (a == null ? void 0 : a.width) == "number" && (a != null && a.maxWidth) && (a == null ? void 0 : a.width) > (a == null ? void 0 : a.maxWidth) && (f = a == null ? void 0 : a.maxWidth), r) {
255
+ r--, o && (o.width += f);
198
256
  return;
199
257
  }
200
- const w = Math.min(da(a, t), u.length - l);
201
- o = w - 1, r = {
202
- width: d,
203
- colSpan: w,
204
- columnIndex: l
205
- }, i.push(r);
258
+ const x = Math.min(Ma(a, t), S.length - d);
259
+ r = x - 1, o = {
260
+ width: f,
261
+ colSpan: x,
262
+ columnIndex: d
263
+ }, i.push(o);
206
264
  }), e.columnVirtualization) {
207
- const a = yt.current || 0, l = Rt.current || parseFloat(((e.style || {}).width || "").toString());
208
- return Ta({
265
+ const a = Ot.current || 0, d = jt.current || parseFloat(((e.style || {}).width || "").toString());
266
+ return pa({
209
267
  cellModels: i,
210
- columns: u,
211
- tableViewPortWidth: l,
268
+ columns: S,
269
+ tableViewPortWidth: d,
212
270
  scrollLeft: a
213
271
  });
214
272
  }
215
273
  return i;
216
- }, Ct = () => {
217
- const { pageable: t, take: i, pageSize: r } = e;
218
- if (!b)
274
+ }, At = () => {
275
+ const { pageable: t, take: i, pageSize: o } = e;
276
+ if (!R)
219
277
  return 0;
220
278
  if (!t) {
221
279
  if (i)
222
280
  return i;
223
- if (r)
224
- return r;
281
+ if (o)
282
+ return o;
225
283
  }
226
- const o = e.rowHeight || St.current, a = Et.current;
227
- return a && o ? Math.ceil(a / o * 1.5) : 0;
284
+ const r = e.rowHeight || _t.current, a = Vt.current;
285
+ return a && r ? Math.ceil(a / r * 1.5) : 0;
228
286
  };
229
- let f = [], U, s = [], oe = [], de = [], N = [[]];
230
- const yt = e.scrollLeftRef || { current: 0 }, Rt = e.widthRef || { current: 0 }, Et = e.containerHeightRef || { current: 0 }, St = e.minRowHeightRef || { current: 0 }, D = e.localization || new Na(e.language), vt = e.intl || new Da((Pe = e.locale) != null ? Pe : "en"), k = e.unstyled, m = k && k.uGrid ? k.uGrid : Ot, I = aa(e.rowReorderable), T = typeof e.scrollable == "object" ? e.scrollable.mode : e.scrollable, Y = typeof e.scrollable == "object" && e.scrollable.scrollbar === "proxied", b = T === "virtual" || T === void 0 && e.isClient && Vt(ne) || !1, h = e.dataLayoutMode === "stacked", S = ((Be = e.group) == null ? void 0 : Be.length) || 0, se = _t(ne), x = ca(e.autoProcessData);
231
- let y, R;
232
- if (Array.isArray(e.data) ? (y = e.data, R = (Me = e.total) != null ? Me : y.length) : (y = ((We = e.data) == null ? void 0 : We.data) || [], R = (Ae = (Ke = e.total) != null ? Ke : (ze = e.data) == null ? void 0 : ze.total) != null ? Ae : y.length), x) {
233
- const t = ua(y, {
234
- autoProcessData: x,
287
+ let C = [], ue, m = [], J = [], Q = [], X = [[]];
288
+ const Ot = e.scrollLeftRef || { current: 0 }, jt = e.widthRef || { current: 0 }, Vt = e.containerHeightRef || { current: 0 }, _t = e.minRowHeightRef || { current: 0 }, W = e.localization || new Qa(e.language), $t = e.intl || new Xa((Qe = e.locale) != null ? Qe : "en"), B = e.unstyled, c = B && B.uGrid ? B.uGrid : ua, L = ka(e.rowReorderable), _ = typeof e.scrollable == "object" ? e.scrollable.mode : e.scrollable, me = typeof e.scrollable == "object" && e.scrollable.scrollbar === "proxied", R = _ === "virtual" || _ === void 0 && e.isClient && ma(Ee) || !1, E = e.dataLayoutMode === "stacked", h = typeof e.groupable == "object" && e.groupable.displayMode || "default", M = h === "compact" ? 0 : ((Xe = e.group) == null ? void 0 : Xe.length) || 0, ke = ca(Ee), z = Da(e.autoProcessData);
289
+ let k, H;
290
+ if (Array.isArray(e.data) ? (k = e.data, H = (pe = e.total) != null ? pe : k.length) : (k = ((et = e.data) == null ? void 0 : et.data) || [], H = (lt = (at = e.total) != null ? at : (tt = e.data) == null ? void 0 : tt.total) != null ? lt : k.length), z) {
291
+ const t = Wa(k, {
292
+ autoProcessData: z,
235
293
  group: e.group,
236
294
  sort: e.sort,
237
295
  filter: e.filter,
@@ -240,444 +298,462 @@ const Ua = n.forwardRef((e, mt) => {
240
298
  take: e.take,
241
299
  skip: e.skip,
242
300
  total: e.total,
243
- isVirtualScroll: b,
301
+ isVirtualScroll: R,
244
302
  includePaging: !0
245
303
  });
246
- y = t.data, R = t.total;
304
+ k = t.data, H = t.total;
247
305
  }
248
- const M = y.length === R, { size: g } = e, Gt = typeof e.groupable == "object" && e.groupable.footer || "none", kt = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, It = typeof e.groupable == "object" && !!e.groupable.stickyFooters, W = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, v = $t(!!e.detail), xt = Zt(
306
+ const p = k.length === H, { size: w } = e, Zt = typeof e.groupable == "object" && e.groupable.footer || "none", Ut = typeof e.groupable == "object" && !!e.groupable.stickyHeaders, Yt = typeof e.groupable == "object" && !!e.groupable.stickyFooters, ee = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, T = ga(!!e.detail), qt = ba(
249
307
  typeof e.groupable == "object" && e.groupable.enabled !== !1 ? e.groupable.expandable : e.groupable
250
- ), z = !!((Fe = e.group) != null && Fe.length), { resolvedGroupsCount: Ht, flattedData: Lt } = ct(
251
- y,
252
- Gt,
253
- M ? 0 : e.skip || 0,
308
+ ), te = !!((nt = e.group) != null && nt.length), { resolvedGroupsCount: Jt, flattedData: Qt } = Dt(
309
+ k,
310
+ Zt,
311
+ p ? 0 : e.skip || 0,
254
312
  e.group,
255
313
  e.detailExpand,
256
314
  e.groupExpand,
257
315
  e.dataItemKey
258
316
  );
259
- f = Lt;
260
- const q = Ct(), K = ((Oe = e.virtualSkipRef) == null ? void 0 : Oe.current) || 0;
261
- let me = R;
262
- if (b) {
317
+ C = Qt;
318
+ const ce = At(), ae = ((it = e.virtualSkipRef) == null ? void 0 : it.current) || 0;
319
+ let xe = H;
320
+ if (R) {
263
321
  let t = e.skip || 0;
264
- if ((z || e.pageable) && (t = K, me = f.length), M || z || e.pageable)
265
- if (q === 0) {
266
- const i = Math.min(e.take || e.pageSize || 20, f.length);
267
- U = f.slice(t, t + i);
322
+ if ((te || e.pageable) && (t = ae, xe = C.length), p || te || e.pageable)
323
+ if (ce === 0) {
324
+ const i = Math.min(e.take || e.pageSize || 20, C.length);
325
+ ue = C.slice(t, t + i);
268
326
  } else
269
- U = f.slice(t, t + q);
327
+ ue = C.slice(t, t + ce);
270
328
  }
271
- const ce = Ut(e.selectable), ue = Je(e.rowSpannable), Nt = ce && ce.drag ? "none" : void 0, A = n.useMemo(() => n.Children.toArray(e.children), [e.children]);
272
- bt(A, Ht);
273
- const J = n.useMemo(() => {
274
- const t = La(e, s);
329
+ const Ie = ha(e.selectable), He = ht(e.rowSpannable), Xt = Ie && Ie.drag ? "none" : void 0, le = l.useMemo(() => l.Children.toArray(e.children), [e.children]), pt = Math.max(Jt, (rt = (ot = e.group) == null ? void 0 : ot.length) != null ? rt : 0);
330
+ zt(le, pt);
331
+ const fe = l.useMemo(() => {
332
+ const t = Ja(e, m);
275
333
  return {
276
334
  premium: t.length > 0,
277
335
  features: t
278
336
  };
279
- }, [e, s]), fe = n.useMemo(() => J.premium ? !jt(ne, { component: "Grid", features: J.features }) : !1, [J.premium]), ge = A.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? n.cloneElement(t, { ...t.props, _ariaControls: G, ariaLabel: "Top toolbar" }) : null), F = A.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), be = A.filter(
337
+ }, [e, m]), Ne = l.useMemo(() => fe.premium ? !fa(Ee, { component: "Grid", features: fe.features }) : !1, [fe.premium]), Me = le.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? l.cloneElement(t, { ...t.props, _ariaControls: D, ariaLabel: "Top toolbar" }) : null), ne = le.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), Te = le.filter(
280
338
  (t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
281
- ), u = s.filter((t) => t.children.length === 0), he = W && !h && /* @__PURE__ */ n.createElement(ea, { columns: ie(), group: e.group || [], ariaControls: G }), we = h ? null : /* @__PURE__ */ n.createElement(
282
- Qt,
339
+ ), S = m.filter((t) => t.children.length === 0), $ = h === "compact", Pe = (t) => $ && t.children.length === 0 && t.defaultHeaderCell === yt, Z = $ ? m.filter((t) => !Pe(t)) : m, ea = $ ? Q.filter((t) => !Pe(t)) : Q, De = $ ? Ct(Z, y) : X, F = Z.filter((t) => t.children.length === 0), ta = ($ || h === "singleColumn" || h === "multipleColumns") && F.some((t) => t.columnType === "checkbox"), We = ee && !E && /* @__PURE__ */ l.createElement(
340
+ va,
283
341
  {
284
- size: g,
285
- staticHeaders: T !== "none",
286
- draggable: e.reorderable || W,
287
- headerRow: /* @__PURE__ */ n.createElement(
288
- Xt,
342
+ columns: ve(),
343
+ hiddenColumns: J,
344
+ group: e.group || [],
345
+ ariaControls: D,
346
+ mode: h
347
+ }
348
+ ), Be = E ? null : /* @__PURE__ */ l.createElement(
349
+ Ra,
350
+ {
351
+ size: w,
352
+ staticHeaders: _ !== "none",
353
+ draggable: e.reorderable || ee,
354
+ headerRow: /* @__PURE__ */ l.createElement(
355
+ Ea,
289
356
  {
290
357
  cells: e.cells,
291
358
  sort: e.sort,
292
359
  sortable: e.sortable,
293
360
  group: e.group || [],
294
- groupable: W,
361
+ groupable: ee,
295
362
  filter: e.filter,
296
363
  filterable: e.filterable,
297
- filterOperators: e.filterOperators || pe,
364
+ filterOperators: e.filterOperators || Et,
298
365
  columnMenu: e.columnMenu,
299
366
  columnMenuIcon: e.columnMenuIcon,
300
- columns: s,
301
- columnsMap: N,
367
+ columns: Z,
368
+ columnsMap: De,
302
369
  navigatable: !!e.navigatable,
303
- localization: D,
304
- unstyled: k,
305
- columnsState: C,
306
- headerSelectionValue: !!(e.select && f.filter((t) => t.rowType === "data").every(
307
- (t) => e.select && e.dataItemKey && te(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[te(e.dataItemKey)(t.dataItem)] : void 0
370
+ localization: W,
371
+ unstyled: B,
372
+ columnsState: y,
373
+ headerSelectionValue: !!(e.select && C.filter((t) => t.rowType === "data").every(
374
+ (t) => e.select && e.dataItemKey && we(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[we(e.dataItemKey)(t.dataItem)] : void 0
308
375
  ))
309
376
  }
310
377
  ),
311
- filterRow: e.filterable && /* @__PURE__ */ n.createElement(
312
- pt,
378
+ filterRow: e.filterable && /* @__PURE__ */ l.createElement(
379
+ Ga,
313
380
  {
314
381
  cells: e.cells,
315
- size: g,
316
- columns: s,
382
+ size: w,
383
+ columns: Z,
317
384
  filter: e.filter,
318
- filterOperators: e.filterOperators || pe,
385
+ filterOperators: e.filterOperators || Et,
319
386
  sort: e.sort,
320
387
  navigatable: !!e.navigatable,
321
- ariaRowIndex: N.length + 1,
322
- localization: D
388
+ ariaRowIndex: De.length + 1,
389
+ localization: W
323
390
  }
324
391
  ) || void 0,
325
- cols: u.map((t, i) => /* @__PURE__ */ n.createElement("col", { key: i.toString(), width: ae(t) }))
392
+ cols: F.map((t, i) => /* @__PURE__ */ l.createElement("col", { key: i.toString(), width: ye(t) }))
326
393
  }
327
- ), Ce = u.findIndex((t) => typeof t.colSpan == "function") > -1;
328
- let ye;
329
- Ce || (ye = re(null));
330
- const Q = ((Ve = e.editable) == null ? void 0 : Ve.mode) === "dialog", Dt = (_e = e.editable) == null ? void 0 : _e.enabled, Re = ($e = (je = e.editZoneRef) == null ? void 0 : je.current) != null ? $e : "body", Tt = Re === "pinned" ? void 0 : e.edit, Ee = Re === "body" ? void 0 : e.edit, P = {
331
- leafColumns: u,
332
- columnsState: C,
333
- cellsToRender: ye,
334
- getCellsToRender: re,
335
- hasDynamicColSpan: Ce,
336
- idPrefix: E,
337
- gridClasses: m,
338
- unstyled: k,
339
- localization: D,
340
- intl: vt,
394
+ ), Le = S.findIndex((t) => typeof t.colSpan == "function") > -1;
395
+ let ze;
396
+ Le || (ze = Se(null));
397
+ const ge = ((dt = e.editable) == null ? void 0 : dt.mode) === "dialog", aa = (st = e.editable) == null ? void 0 : st.enabled, Fe = (mt = (ut = e.editZoneRef) == null ? void 0 : ut.current) != null ? mt : "body", la = Fe === "pinned" ? void 0 : e.edit, Ke = Fe === "body" ? void 0 : e.edit, U = {
398
+ leafColumns: S,
399
+ renderedColumnsCount: F.length,
400
+ columnsState: y,
401
+ cellsToRender: ze,
402
+ getCellsToRender: Se,
403
+ hasDynamicColSpan: Le,
404
+ idPrefix: N,
405
+ gridClasses: c,
406
+ unstyled: B,
407
+ localization: W,
408
+ intl: $t,
341
409
  cells: e.cells,
342
- isRowReorderable: I,
410
+ isRowReorderable: L,
343
411
  sort: e.sort,
344
412
  editable: e.editable,
345
413
  isClient: e.isClient,
346
- isEditDialog: Q,
414
+ isEditDialog: ge,
347
415
  dataItemKey: e.dataItemKey,
348
416
  select: e.select,
349
- highlight: e.highlight
350
- }, Pt = 0;
351
- let X = null;
352
- const Se = (t) => t >= f.length - Pt, p = [], ve = !f.length, Ge = n.useMemo(() => {
417
+ highlight: e.highlight,
418
+ hiddenColumns: J,
419
+ groupingMode: h,
420
+ hasCheckboxColumn: ta
421
+ }, na = 0;
422
+ let be = null;
423
+ const Ae = (t) => t >= C.length - na, he = [], Oe = !C.length, je = l.useMemo(() => {
353
424
  var i;
354
425
  const t = e.pinnedTopRows || [];
355
- return x && ((i = e.sort) != null && i.length) ? Qe([...t], e.sort) : t;
356
- }, [e.pinnedTopRows, e.sort, x]), ke = n.useMemo(() => {
426
+ return z && ((i = e.sort) != null && i.length) ? wt([...t], e.sort) : t;
427
+ }, [e.pinnedTopRows, e.sort, z]), Ve = l.useMemo(() => {
357
428
  var i;
358
429
  const t = e.pinnedBottomRows || [];
359
- return x && ((i = e.sort) != null && i.length) ? Qe([...t], e.sort) : t;
360
- }, [e.pinnedBottomRows, e.sort, x]), Bt = e.pinnable && Ge.length > 0, Mt = e.pinnable && ke.length > 0;
361
- let B = 0;
362
- const Wt = n.useMemo(() => {
430
+ return z && ((i = e.sort) != null && i.length) ? wt([...t], e.sort) : t;
431
+ }, [e.pinnedBottomRows, e.sort, z]), ia = e.pinnable && je.length > 0, oa = e.pinnable && Ve.length > 0;
432
+ let Y = 0;
433
+ const ra = l.useMemo(() => {
363
434
  const t = /* @__PURE__ */ new Set();
364
435
  return e.pinnedTopRows && e.pinnedTopRows.forEach((i) => t.add(i)), e.pinnedBottomRows && e.pinnedBottomRows.forEach((i) => t.add(i)), t;
365
436
  }, [e.pinnedTopRows, e.pinnedBottomRows]);
366
- if (f.length) {
367
- const t = N.length + (e.filterable ? 1 : 0) + 1;
368
- let i = e.skip || 0, r = -1, o = 0;
369
- const a = ue.enabled ? {} : void 0;
370
- if (b) {
371
- if (K > 0) {
372
- const l = f.slice(0, K).filter((d) => d.rowType === "data").length;
373
- r += l, i += K;
437
+ if (C.length) {
438
+ const t = X.length + (e.filterable ? 1 : 0) + 1;
439
+ let i = e.skip || 0, o = -1, r = 0;
440
+ const a = He.enabled ? {} : void 0;
441
+ if (R) {
442
+ if (ae > 0) {
443
+ const d = C.slice(0, ae).filter((u) => u.rowType === "data").length;
444
+ o += d, i += ae;
374
445
  }
375
- !e.pageable && M && (r += e.skip || 0);
446
+ !e.pageable && p && (o += e.skip || 0);
376
447
  }
377
- (U || f).forEach((l, d) => {
378
- var Ue;
379
- l.rowType === "data" && r++;
380
- const w = l.dataIndex % 2 !== 0, O = e.dataItemKey && te(e.dataItemKey)(l.dataItem), V = d + i, _ = O || "ai" + V, L = Za(P, Tt, l, _, r, w, a), At = l.rowType === "data" ? Wt.has(l.dataItem) : !1;
381
- if (B = V + t + o, Q && Dt && L.isInEdit && (X = l.dataItem), p.push(
382
- /* @__PURE__ */ n.createElement(
383
- ja,
448
+ (ue || C).forEach((d, u) => {
449
+ var q;
450
+ d.rowType === "data" && o++;
451
+ const f = d.dataIndex % 2 !== 0, x = e.dataItemKey && we(e.dataItemKey)(d.dataItem), A = u + i, O = x || "ai" + A, G = fl(U, la, d, O, o, f, a), ie = d.rowType === "data" ? ra.has(d.dataItem) : !1;
452
+ if (Y = A + t + r, ge && aa && G.isInEdit && (be = d.dataItem), he.push(
453
+ /* @__PURE__ */ l.createElement(
454
+ ml,
384
455
  {
385
- key: _,
386
- isStackedMode: h,
387
- item: l,
388
- rowId: _,
389
- dataIndex: r,
390
- idPrefix: E,
391
- ariaRowIndex: B,
392
- absoluteRowIndex: V,
393
- isAltRow: w,
394
- isHidden: Se(d),
395
- isRowReorderable: I,
456
+ key: O,
457
+ isStackedMode: E,
458
+ item: d,
459
+ rowId: O,
460
+ dataIndex: o,
461
+ idPrefix: N,
462
+ ariaRowIndex: Y,
463
+ absoluteRowIndex: A,
464
+ isAltRow: f,
465
+ isHidden: Ae(u),
466
+ isRowReorderable: L,
396
467
  rowHeight: e.rowHeight,
397
468
  rows: e.rows,
398
- leafColumns: u,
399
- groupLevelCount: S,
469
+ leafColumns: S,
470
+ groupLevelCount: M,
471
+ groupingMode: h,
400
472
  stackedLayoutSettings: e.stackedLayoutSettings,
401
473
  cells: e.cells,
402
- editMode: (Ue = e.editable) == null ? void 0 : Ue.mode,
403
- isSelected: L.isSelected,
404
- isHighlighted: L.isHighlighted,
405
- isInEdit: L.isInEdit && !Q,
406
- preparedCells: L.row,
407
- showDetailToggle: !!e.detail && !!v.enabled,
408
- isDetailExpanded: !!l.expanded,
409
- detailExpandField: v.column,
410
- isPinned: At
474
+ editMode: (q = e.editable) == null ? void 0 : q.mode,
475
+ isSelected: G.isSelected,
476
+ isHighlighted: G.isHighlighted,
477
+ isInEdit: G.isInEdit && !ge,
478
+ preparedCells: G.row,
479
+ showDetailToggle: !!e.detail && !!T.enabled,
480
+ isDetailExpanded: !!d.expanded,
481
+ detailExpandField: T.column,
482
+ isPinned: ie
411
483
  }
412
484
  )
413
- ), e.detail && l.rowType === "data" && l.expanded) {
414
- o++;
415
- const j = _ + "_1";
416
- B = V + t + o;
417
- const Ft = e.isClient ? Ca : Ka;
418
- p.push(
419
- /* @__PURE__ */ n.createElement(
420
- $a,
485
+ ), e.detail && d.rowType === "data" && d.expanded) {
486
+ r++;
487
+ const P = O + "_1";
488
+ Y = A + t + r;
489
+ const oe = e.isClient ? Ka : il;
490
+ he.push(
491
+ /* @__PURE__ */ l.createElement(
492
+ cl,
421
493
  {
422
- key: j,
423
- isStackedMode: h,
424
- detailRowId: j,
425
- isHidden: Se(d),
494
+ key: P,
495
+ isStackedMode: E,
496
+ detailRowId: P,
497
+ isHidden: Ae(u),
426
498
  detailRowHeight: e.detailRowHeight,
427
- ariaRowIndex: B,
428
- item: l,
429
- groupLevelCount: S,
499
+ ariaRowIndex: Y,
500
+ item: d,
501
+ groupLevelCount: M,
430
502
  groupDescriptors: e.group,
431
503
  lockGroups: e.lockGroups,
432
504
  cells: e.cells,
433
- leafColumns: u,
434
- detailExpandableEnabled: !!v.enabled,
435
- preparedCells: L.row,
436
- DetailCell: Ft,
505
+ leafColumns: S,
506
+ detailExpandableEnabled: !!T.enabled,
507
+ preparedCells: G.row,
508
+ DetailCell: oe,
437
509
  detail: e.detail,
438
- detailCellId: $.generateNavigatableId(`${j}-dcell`, E),
439
- detailHierarchyCellId: v.enabled ? $.generateNavigatableId(`${j}-dhcell`, E) : void 0,
440
- detailTrClassName: c(m.detailTr({ isAlt: w })),
441
- unstyled: k
510
+ detailCellId: de.generateNavigatableId(`${P}-dcell`, N),
511
+ detailHierarchyCellId: T.enabled ? de.generateNavigatableId(`${P}-dhcell`, N) : void 0,
512
+ detailTrClassName: b(c.detailTr({ isAlt: f })),
513
+ unstyled: B
442
514
  }
443
515
  )
444
516
  );
445
517
  }
446
518
  });
447
519
  }
448
- const Ie = {
449
- size: g,
450
- total: R,
520
+ const _e = {
521
+ size: w,
522
+ total: H,
451
523
  skip: e.skip || 0,
452
524
  take: (e.take !== void 0 ? e.take : e.pageSize) || 10,
453
- ...wa(e.pageable || {})
454
- }, xe = /* @__PURE__ */ n.createElement(Ea, null, e.pager ? /* @__PURE__ */ n.createElement(e.pager, { ...Ie }) : /* @__PURE__ */ n.createElement(Yt, { className: c(m.pager({})), ...Ie })), zt = (t, i) => /* @__PURE__ */ n.createElement("col", { key: i.toString(), width: ae(t) }), He = (Ze = e.cells) != null && Ze.footerCell || s.some((t) => {
525
+ ...Fa(e.pageable || {})
526
+ }, $e = /* @__PURE__ */ l.createElement(ja, null, e.pager ? /* @__PURE__ */ l.createElement(e.pager, { ..._e }) : /* @__PURE__ */ l.createElement(Ca, { className: b(c.pager({})), ..._e })), da = (t, i) => /* @__PURE__ */ l.createElement("col", { key: i.toString(), width: ye(t) }), Ze = (ct = e.cells) != null && ct.footerCell || m.some((t) => {
455
527
  var i;
456
528
  return !!((i = t.cells) != null && i.footerCell);
457
- }) ? /* @__PURE__ */ n.createElement(
458
- ta,
529
+ }) ? /* @__PURE__ */ l.createElement(
530
+ Sa,
459
531
  {
460
- size: g,
461
- staticHeaders: T !== "none",
462
- row: /* @__PURE__ */ n.createElement(
463
- ha,
532
+ size: w,
533
+ staticHeaders: _ !== "none",
534
+ row: /* @__PURE__ */ l.createElement(
535
+ za,
464
536
  {
465
537
  cells: e.cells,
466
- idPrefix: E,
467
- columns: s,
468
- ariaRowIndex: B + 1
538
+ idPrefix: N,
539
+ columns: m,
540
+ ariaRowIndex: Y + 1
469
541
  }
470
542
  ),
471
- cols: u.map(zt)
543
+ cols: S.map(da)
472
544
  }
473
- ) : null, H = h ? /* @__PURE__ */ n.createElement(_a, { groupLevelCount: S }) : /* @__PURE__ */ n.createElement(ya, null, u.map((t, i) => /* @__PURE__ */ n.createElement(
545
+ ) : null, K = E ? /* @__PURE__ */ l.createElement(ul, { groupLevelCount: M }) : /* @__PURE__ */ l.createElement(Aa, null, F.map((t, i) => /* @__PURE__ */ l.createElement(
474
546
  "col",
475
547
  {
476
548
  key: i.toString(),
477
- className: la(t.field, e.sort) ? c(m.sorted({})) : void 0,
478
- width: ae(t)
549
+ className: xa(t.field, e.sort) ? b(c.sorted({})) : void 0,
550
+ width: ye(t)
479
551
  }
480
- ))), Le = e.reorderable || W, { detail: Ya, cells: qa, rows: Ja, ...Kt } = e, Ne = /* @__PURE__ */ n.createElement(
552
+ ))), Ue = e.reorderable || ee, { detail: Cl, cells: wl, rows: yl, ...sa } = e, Ye = /* @__PURE__ */ l.createElement(
481
553
  "tbody",
482
554
  {
483
555
  role: "rowgroup",
484
- className: c(m.tbody({})),
485
- ...qt
556
+ className: b(c.tbody({})),
557
+ ...wa
486
558
  },
487
- p
488
- ), De = X ? /* @__PURE__ */ n.createElement(Pa, { columns: u, customEditDialog: e.editDialog, dataItem: X }) : null;
489
- let ee = Ne;
490
- I && (ee = /* @__PURE__ */ n.createElement(
491
- Ia,
559
+ he
560
+ ), qe = be ? /* @__PURE__ */ l.createElement(el, { columns: S, customEditDialog: e.editDialog, dataItem: be }) : null;
561
+ let Ce = Ye;
562
+ L && (Ce = /* @__PURE__ */ l.createElement(
563
+ Ua,
492
564
  {
493
- unstyled: m,
494
- columns: s,
565
+ unstyled: c,
566
+ columns: m,
495
567
  rowReorderSettings: e.rowReorderable
496
568
  },
497
- Ne
569
+ Ye
498
570
  ));
499
- const Te = {
500
- gridRef: mt,
571
+ const Je = {
572
+ gridRef: Pt,
501
573
  innerGrid: e.innerGrid,
502
- gridProps: Kt,
503
- columnsRef: ie(),
504
- hiddenColumnsRef: oe,
505
- columnsMapRef: N,
506
- columnsState: C,
507
- dataRef: f,
508
- id: G,
509
- virtualTotal: me,
510
- isAllData: M,
511
- virtualPageSize: q,
512
- isVirtualScroll: b,
574
+ gridProps: sa,
575
+ columnsRef: ve(),
576
+ renderedColumnsRef: e.isClient ? Z : ea,
577
+ hiddenColumnsRef: J,
578
+ columnsMapRef: X,
579
+ columnsState: y,
580
+ dataRef: C,
581
+ id: D,
582
+ virtualTotal: xe,
583
+ isAllData: p,
584
+ virtualPageSize: ce,
585
+ isVirtualScroll: R,
513
586
  detailExpandable: !!e.detail
514
587
  };
515
- return T === "none" ? /* @__PURE__ */ n.createElement(tt, { ...Te }, /* @__PURE__ */ n.createElement(it, null, /* @__PURE__ */ n.createElement(
588
+ return _ === "none" ? /* @__PURE__ */ l.createElement(vt, { ...Je }, /* @__PURE__ */ l.createElement(It, null, /* @__PURE__ */ l.createElement(
516
589
  "div",
517
590
  {
518
591
  id: e.id,
519
592
  style: e.style,
520
- className: c(m.wrapper({ size: g, isStackedMode: h }), e.className),
521
- ...qe
593
+ className: b(c.wrapper({ size: w, isStackedMode: E }), e.className),
594
+ ...bt
522
595
  },
523
- ge,
524
- he,
525
- /* @__PURE__ */ n.createElement(
596
+ Me,
597
+ We,
598
+ /* @__PURE__ */ l.createElement(
526
599
  "div",
527
600
  {
528
- className: c(m.ariaRoot({})),
601
+ className: b(c.ariaRoot({})),
529
602
  role: "grid",
530
- "aria-colcount": u.length,
531
- "aria-rowcount": R,
532
- id: G,
533
- "aria-label": D.toLanguageString(Z, rt[Z])
603
+ "aria-colcount": S.length,
604
+ "aria-rowcount": H,
605
+ id: D,
606
+ "aria-label": W.toLanguageString(se, Ge[se])
534
607
  },
535
- /* @__PURE__ */ n.createElement(
536
- Ra,
608
+ /* @__PURE__ */ l.createElement(
609
+ Oa,
537
610
  {
538
611
  selectable: e.selectable,
539
- tableClassName: c(m.table({ size: g }))
612
+ tableClassName: b(c.table({ size: w }))
540
613
  },
541
- H,
542
- we,
543
- /* @__PURE__ */ n.createElement(nt, { rowReorderable: I }, ee),
544
- He
614
+ K,
615
+ Be,
616
+ /* @__PURE__ */ l.createElement(xt, { rowReorderable: L }, Ce),
617
+ Ze
545
618
  )
546
619
  ),
547
- ve && /* @__PURE__ */ n.createElement(et, null, F.length ? F : /* @__PURE__ */ n.createElement(Xe, null)),
548
- Le && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(at, null), /* @__PURE__ */ n.createElement(lt, null))
549
- )), be, e.pageable && xe, /* @__PURE__ */ n.createElement(ot, { loader: e.loader, showLoader: e.showLoader }), De, fe && /* @__PURE__ */ n.createElement(Ye, { message: se })) : /* @__PURE__ */ n.createElement(tt, { ...Te }, /* @__PURE__ */ n.createElement(it, null, /* @__PURE__ */ n.createElement(
620
+ Oe && /* @__PURE__ */ l.createElement(Gt, null, ne.length ? ne : /* @__PURE__ */ l.createElement(Rt, null)),
621
+ Ue && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(St, null), /* @__PURE__ */ l.createElement(kt, null))
622
+ )), Te, e.pageable && $e, /* @__PURE__ */ l.createElement(Nt, { loader: e.loader, showLoader: e.showLoader }), qe, Ne && /* @__PURE__ */ l.createElement(gt, { message: ke })) : /* @__PURE__ */ l.createElement(vt, { ...Je }, /* @__PURE__ */ l.createElement(It, null, /* @__PURE__ */ l.createElement(
550
623
  "div",
551
624
  {
552
625
  id: e.id,
553
626
  style: e.style,
554
- className: c(
555
- m.wrapper({
556
- size: g,
557
- virtual: b,
558
- isStackedMode: h
627
+ className: b(
628
+ c.wrapper({
629
+ size: w,
630
+ virtual: R,
631
+ isStackedMode: E
559
632
  }),
560
633
  e.className
561
634
  ),
562
- ...qe
635
+ ...bt
563
636
  },
564
- ge,
565
- he,
566
- /* @__PURE__ */ n.createElement(
637
+ Me,
638
+ We,
639
+ /* @__PURE__ */ l.createElement(
567
640
  "div",
568
641
  {
569
- className: c(m.ariaRoot({})),
642
+ className: b(c.ariaRoot({})),
570
643
  role: "grid",
571
- "aria-colcount": u.length,
572
- "aria-rowcount": R,
573
- id: G,
574
- "aria-label": D.toLanguageString(Z, rt[Z])
644
+ "aria-colcount": F.length,
645
+ "aria-rowcount": H,
646
+ id: D,
647
+ "aria-label": W.toLanguageString(se, Ge[se])
575
648
  },
576
- we,
577
- e.isClient && Bt && /* @__PURE__ */ n.createElement(
578
- st,
649
+ Be,
650
+ e.isClient && ia && /* @__PURE__ */ l.createElement(
651
+ Tt,
579
652
  {
580
- size: g,
581
- colGroups: H,
582
- dataRowContext: P,
583
- edit: Ee,
653
+ size: w,
654
+ colGroups: K,
655
+ dataRowContext: U,
656
+ edit: Ke,
584
657
  position: "top",
585
- pinnedItems: Ge,
586
- isStackedMode: h,
587
- groupLevelCount: S,
658
+ pinnedItems: je,
659
+ isStackedMode: E,
660
+ groupLevelCount: M,
588
661
  stackedLayoutSettings: e.stackedLayoutSettings,
589
662
  rowHeight: e.rowHeight,
590
663
  rows: e.rows,
591
664
  selectable: e.selectable
592
665
  }
593
666
  ),
594
- /* @__PURE__ */ n.createElement("div", { className: c(m.container({})), role: "presentation" }, e.isClient && z && kt && /* @__PURE__ */ n.createElement(
595
- dt,
667
+ /* @__PURE__ */ l.createElement("div", { className: b(c.container({})), role: "presentation" }, e.isClient && te && Ut && /* @__PURE__ */ l.createElement(
668
+ Mt,
596
669
  {
597
- size: g,
598
- colGroups: H,
599
- dataRowContext: P,
670
+ size: w,
671
+ colGroups: K,
672
+ dataRowContext: U,
600
673
  position: "top",
601
- isStackedMode: h,
602
- groupLevelCount: S,
674
+ isStackedMode: E,
675
+ groupLevelCount: M,
603
676
  stackedLayoutSettings: e.stackedLayoutSettings,
604
- rowHeight: e.rowHeight
677
+ rowHeight: e.rowHeight,
678
+ rows: e.rows
605
679
  }
606
- ), /* @__PURE__ */ n.createElement(va, null, /* @__PURE__ */ n.createElement(
680
+ ), /* @__PURE__ */ l.createElement(_a, null, /* @__PURE__ */ l.createElement(
607
681
  "div",
608
682
  {
609
- className: c(
610
- m.content({}),
611
- b && Y && "k-grid-content--hide-scrollbar"
683
+ className: b(
684
+ c.content({}),
685
+ R && me && "k-grid-content--hide-scrollbar"
612
686
  ),
613
687
  style: {
614
- ...b && Y && { overflowY: "scroll", scrollbarWidth: "none" }
688
+ ...R && me && { overflowY: "scroll", scrollbarWidth: "none" }
615
689
  },
616
690
  role: "presentation"
617
691
  },
618
- /* @__PURE__ */ n.createElement("div", { className: c(m.tableWrap({})), role: "presentation" }, /* @__PURE__ */ n.createElement(
619
- Sa,
692
+ /* @__PURE__ */ l.createElement("div", { className: b(c.tableWrap({})), role: "presentation" }, /* @__PURE__ */ l.createElement(
693
+ Va,
620
694
  {
621
695
  selectable: e.selectable,
622
- tableClassName: c(
623
- m.table({
624
- size: g
696
+ tableClassName: b(
697
+ c.table({
698
+ size: w
625
699
  })
626
700
  ),
627
- tableStyle: { userSelect: Nt }
701
+ tableStyle: { userSelect: Xt }
628
702
  },
629
- H,
630
- /* @__PURE__ */ n.createElement(nt, { rowReorderable: I }, ee)
631
- ), ve && /* @__PURE__ */ n.createElement(et, null, F.length ? F : /* @__PURE__ */ n.createElement(Xe, null))),
632
- b && /* @__PURE__ */ n.createElement(
703
+ K,
704
+ /* @__PURE__ */ l.createElement(xt, { rowReorderable: L }, Ce)
705
+ ), Oe && /* @__PURE__ */ l.createElement(Gt, null, ne.length ? ne : /* @__PURE__ */ l.createElement(Rt, null))),
706
+ R && /* @__PURE__ */ l.createElement(
633
707
  "div",
634
708
  {
635
- className: c(m.heightContainer({})),
709
+ className: b(c.heightContainer({})),
710
+ "aria-colcount": F.length,
636
711
  role: "presentation"
637
712
  },
638
- /* @__PURE__ */ n.createElement(Ga, { isVirtualScroll: b })
713
+ /* @__PURE__ */ l.createElement($a, { isVirtualScroll: R })
639
714
  )
640
- )), e.isClient && b && Y && /* @__PURE__ */ n.createElement(ka, null), e.isClient && z && It && /* @__PURE__ */ n.createElement(
641
- dt,
715
+ )), e.isClient && R && me && /* @__PURE__ */ l.createElement(Za, null), e.isClient && te && Yt && /* @__PURE__ */ l.createElement(
716
+ Mt,
642
717
  {
643
- size: g,
644
- colGroups: H,
645
- dataRowContext: P,
718
+ size: w,
719
+ colGroups: K,
720
+ dataRowContext: U,
646
721
  position: "bottom",
647
- isStackedMode: h,
648
- groupLevelCount: S,
722
+ isStackedMode: E,
723
+ groupLevelCount: M,
649
724
  stackedLayoutSettings: e.stackedLayoutSettings,
650
- rowHeight: e.rowHeight
725
+ rowHeight: e.rowHeight,
726
+ rows: e.rows
651
727
  }
652
728
  )),
653
- e.isClient && Mt && /* @__PURE__ */ n.createElement(
654
- st,
729
+ e.isClient && oa && /* @__PURE__ */ l.createElement(
730
+ Tt,
655
731
  {
656
- size: g,
657
- colGroups: H,
658
- dataRowContext: P,
659
- edit: Ee,
732
+ size: w,
733
+ colGroups: K,
734
+ dataRowContext: U,
735
+ edit: Ke,
660
736
  position: "bottom",
661
- pinnedItems: ke,
662
- isStackedMode: h,
663
- groupLevelCount: S,
737
+ pinnedItems: Ve,
738
+ isStackedMode: E,
739
+ groupLevelCount: M,
664
740
  stackedLayoutSettings: e.stackedLayoutSettings,
665
741
  rowHeight: e.rowHeight,
666
742
  rows: e.rows,
667
743
  selectable: e.selectable
668
744
  }
669
745
  ),
670
- He,
671
- Le && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(at, null), /* @__PURE__ */ n.createElement(lt, null)),
672
- fe && /* @__PURE__ */ n.createElement(Ye, { message: se })
746
+ Ze,
747
+ Ue && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(St, null), /* @__PURE__ */ l.createElement(kt, null)),
748
+ Ne && /* @__PURE__ */ l.createElement(gt, { message: ke })
673
749
  ),
674
- be,
675
- e.pageable && xe,
676
- /* @__PURE__ */ n.createElement(ot, { loader: e.loader, showLoader: e.showLoader }),
677
- De
750
+ Te,
751
+ e.pageable && $e,
752
+ /* @__PURE__ */ l.createElement(Nt, { loader: e.loader, showLoader: e.showLoader }),
753
+ qe
678
754
  )));
679
755
  });
680
- Ua.displayName = "KendoReactGridComponent";
756
+ gl.displayName = "KendoReactGridComponent";
681
757
  export {
682
- Ua as GridComponent
758
+ gl as GridComponent
683
759
  };