@progress/kendo-react-grid 11.0.0-develop.6 → 11.0.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 (138) hide show
  1. package/GridClientContextReader.js +1 -1
  2. package/GridClientContextReader.mjs +16 -13
  3. package/GridClientWrapper.js +1 -1
  4. package/GridClientWrapper.mjs +419 -421
  5. package/GridComponent.js +1 -1
  6. package/GridComponent.mjs +402 -395
  7. package/VirtualScroll.js +1 -1
  8. package/VirtualScroll.mjs +65 -107
  9. package/cells/GridDetailHierarchyCell.js +1 -1
  10. package/cells/GridDetailHierarchyCell.mjs +4 -4
  11. package/cells/datacell/GridCell.js +9 -0
  12. package/cells/datacell/GridCell.mjs +29 -0
  13. package/cells/datacell/GridCellServer.js +8 -0
  14. package/cells/datacell/GridCellServer.mjs +27 -0
  15. package/cells/datacell/GridCellServerContainer.js +9 -0
  16. package/cells/datacell/GridCellServerContainer.mjs +26 -0
  17. package/cells/datacell/useCellClientTdProps.js +9 -0
  18. package/cells/datacell/useCellClientTdProps.mjs +30 -0
  19. package/cells/datacell/utils.js +8 -0
  20. package/cells/datacell/utils.mjs +47 -0
  21. package/cells/detailcell/GridDetailCell.js +9 -0
  22. package/cells/detailcell/GridDetailCell.mjs +18 -0
  23. package/cells/detailcell/GridDetailCellServer.js +8 -0
  24. package/cells/detailcell/GridDetailCellServer.mjs +17 -0
  25. package/cells/detailcell/GridDetailCellServerContainer.js +9 -0
  26. package/cells/detailcell/GridDetailCellServerContainer.mjs +19 -0
  27. package/cells/detailcell/useDetailCellClientTdProps.js +9 -0
  28. package/cells/detailcell/useDetailCellClientTdProps.mjs +20 -0
  29. package/cells/detailcell/utils.js +8 -0
  30. package/cells/detailcell/utils.mjs +20 -0
  31. package/cells/editcell/GridEditCell.js +9 -0
  32. package/cells/editcell/GridEditCell.mjs +26 -0
  33. package/cells/editcell/GridEditCellServer.js +8 -0
  34. package/cells/editcell/GridEditCellServer.mjs +32 -0
  35. package/cells/editcell/GridEditCellServerContainer.js +9 -0
  36. package/cells/editcell/GridEditCellServerContainer.mjs +26 -0
  37. package/cells/editcell/useEditCellClientTdProps.js +9 -0
  38. package/cells/editcell/useEditCellClientTdProps.mjs +21 -0
  39. package/cells/editcell/utils.js +8 -0
  40. package/cells/editcell/utils.mjs +29 -0
  41. package/cells/groupcell/GridGroupCell.js +9 -0
  42. package/cells/groupcell/GridGroupCell.mjs +24 -0
  43. package/cells/groupcell/GridGroupCellServer.js +8 -0
  44. package/cells/groupcell/GridGroupCellServer.mjs +44 -0
  45. package/cells/groupcell/GridGroupCellServerContainer.js +9 -0
  46. package/cells/groupcell/GridGroupCellServerContainer.mjs +38 -0
  47. package/cells/groupcell/useGroupCellClientTdProps.js +9 -0
  48. package/cells/groupcell/useGroupCellClientTdProps.mjs +44 -0
  49. package/cells/groupcell/utils.js +8 -0
  50. package/cells/groupcell/utils.mjs +48 -0
  51. package/cells/hierarchycell/GridHierarchyCell.js +9 -0
  52. package/cells/hierarchycell/GridHierarchyCell.mjs +25 -0
  53. package/cells/hierarchycell/GridHierarchyCellServer.js +8 -0
  54. package/cells/hierarchycell/GridHierarchyCellServer.mjs +32 -0
  55. package/cells/hierarchycell/GridHierarchyCellServerContainer.js +9 -0
  56. package/cells/hierarchycell/GridHierarchyCellServerContainer.mjs +26 -0
  57. package/cells/hierarchycell/useHierarchyCellClientTdProps.js +9 -0
  58. package/cells/hierarchycell/useHierarchyCellClientTdProps.mjs +35 -0
  59. package/cells/hierarchycell/utils.js +8 -0
  60. package/cells/hierarchycell/utils.mjs +30 -0
  61. package/cells/hooks.js +9 -0
  62. package/cells/hooks.mjs +41 -0
  63. package/cells/rowreordercell/GridRowReorderCell.js +9 -0
  64. package/cells/rowreordercell/GridRowReorderCell.mjs +19 -0
  65. package/cells/rowreordercell/GridRowReorderCellServer.js +8 -0
  66. package/cells/rowreordercell/GridRowReorderCellServer.mjs +18 -0
  67. package/cells/rowreordercell/GridRowReorderCellServerContainer.js +9 -0
  68. package/cells/rowreordercell/GridRowReorderCellServerContainer.mjs +19 -0
  69. package/cells/rowreordercell/useRowReorderCellClientTdProps.js +9 -0
  70. package/cells/rowreordercell/useRowReorderCellClientTdProps.mjs +26 -0
  71. package/cells/rowreordercell/utils.js +8 -0
  72. package/cells/rowreordercell/utils.mjs +30 -0
  73. package/cells/selectioncell/GridSelectionCell.js +9 -0
  74. package/cells/selectioncell/GridSelectionCell.mjs +26 -0
  75. package/cells/selectioncell/GridSelectionCellServer.js +8 -0
  76. package/cells/selectioncell/GridSelectionCellServer.mjs +33 -0
  77. package/cells/selectioncell/GridSelectionCellServerContainer.js +9 -0
  78. package/cells/selectioncell/GridSelectionCellServerContainer.mjs +26 -0
  79. package/cells/selectioncell/useSelectionCellClientTdProps.js +9 -0
  80. package/cells/selectioncell/useSelectionCellClientTdProps.mjs +21 -0
  81. package/cells/selectioncell/utils.js +8 -0
  82. package/cells/selectioncell/utils.mjs +25 -0
  83. package/components/GridDraggableRowsContainer.js +1 -1
  84. package/components/GridDraggableRowsContainer.mjs +71 -67
  85. package/components/VirtualScrollHeightContainer.js +1 -1
  86. package/components/VirtualScrollHeightContainer.mjs +4 -4
  87. package/components/table/GridTableScrollable.js +1 -1
  88. package/components/table/GridTableScrollable.mjs +16 -15
  89. package/components/utils.js +1 -1
  90. package/components/utils.mjs +9 -10
  91. package/dist/cdn/js/kendo-react-grid.js +1 -1
  92. package/index.d.mts +19 -5
  93. package/index.d.ts +19 -5
  94. package/index.js +1 -1
  95. package/index.mjs +5 -5
  96. package/package-metadata.js +1 -1
  97. package/package-metadata.mjs +2 -2
  98. package/package.json +16 -16
  99. package/utils/index.js +1 -1
  100. package/utils/index.mjs +112 -104
  101. package/VirtualScrollFixed.js +0 -8
  102. package/VirtualScrollFixed.mjs +0 -52
  103. package/cells/GridCell.js +0 -8
  104. package/cells/GridCell.mjs +0 -52
  105. package/cells/GridDetailCell.js +0 -8
  106. package/cells/GridDetailCell.mjs +0 -26
  107. package/cells/GridEditCell.js +0 -8
  108. package/cells/GridEditCell.mjs +0 -35
  109. package/cells/GridGroupCell.js +0 -8
  110. package/cells/GridGroupCell.mjs +0 -74
  111. package/cells/GridHierarchyCell.js +0 -8
  112. package/cells/GridHierarchyCell.mjs +0 -33
  113. package/cells/GridRowReorderCell.js +0 -8
  114. package/cells/GridRowReorderCell.mjs +0 -42
  115. package/cells/GridSelectionCell.js +0 -8
  116. package/cells/GridSelectionCell.mjs +0 -30
  117. package/cells/client/DetailCellContainer.js +0 -9
  118. package/cells/client/DetailCellContainer.mjs +0 -27
  119. package/cells/client/GridCellContainer.js +0 -9
  120. package/cells/client/GridCellContainer.mjs +0 -69
  121. package/cells/client/GridEditCellContainer.js +0 -9
  122. package/cells/client/GridEditCellContainer.mjs +0 -61
  123. package/cells/client/GridGroupCellContainer.js +0 -9
  124. package/cells/client/GridGroupCellContainer.mjs +0 -88
  125. package/cells/client/GridHierarchyCellContainer.js +0 -9
  126. package/cells/client/GridHierarchyCellContainer.mjs +0 -64
  127. package/cells/client/GridRowReorderContainer.js +0 -9
  128. package/cells/client/GridRowReorderContainer.mjs +0 -31
  129. package/cells/client/GridSelectionCellContainer.js +0 -9
  130. package/cells/client/GridSelectionCellContainer.mjs +0 -61
  131. /package/cells/{client → editcell}/GridEditCellEditor.js +0 -0
  132. /package/cells/{client → editcell}/GridEditCellEditor.mjs +0 -0
  133. /package/cells/{client → groupcell}/GridGroupCellToggle.js +0 -0
  134. /package/cells/{client → groupcell}/GridGroupCellToggle.mjs +0 -0
  135. /package/cells/{client → hierarchycell}/GridHierarchyCellToggle.js +0 -0
  136. /package/cells/{client → hierarchycell}/GridHierarchyCellToggle.mjs +0 -0
  137. /package/cells/{client → selectioncell}/GridSelectionCellInput.js +0 -0
  138. /package/cells/{client → selectioncell}/GridSelectionCellInput.mjs +0 -0
package/utils/index.mjs CHANGED
@@ -5,79 +5,79 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as w from "react";
9
- import { gridDefaultProps as b } from "../GridColumn.mjs";
8
+ import * as y from "react";
9
+ import { gridDefaultProps as E } from "../GridColumn.mjs";
10
10
  import { getter as v } from "@progress/kendo-data-query";
11
- import { findGroupExpand as M, updateLeft as A, updateRight as D, tableKeyboardNavigationTools as E } from "@progress/kendo-react-data-tools";
12
- import { ServerFragment as m } from "./_serverModule.mjs";
13
- import { ClientFragment as T } from "./_clientModule.mjs";
11
+ import { findGroupExpand as b, updateLeft as A, updateRight as D, tableKeyboardNavigationTools as M } from "@progress/kendo-react-data-tools";
12
+ import { ServerFragment as R } from "./_serverModule.mjs";
13
+ import { ClientFragment as m } from "./_clientModule.mjs";
14
14
  import { GridContextMenuItemNames as g } from "../contextMenu/enums.mjs";
15
- import { canUseDOM as B } from "@progress/kendo-react-common";
15
+ import { canUseDOM as T } from "@progress/kendo-react-common";
16
16
  function u(e, t) {
17
17
  const r = (e != null ? e : "").split(".");
18
- let i = t;
18
+ let a = t;
19
19
  return r.forEach((o) => {
20
- i = i ? i[o] : void 0;
21
- }), i;
20
+ a = a ? a[o] : void 0;
21
+ }), a;
22
22
  }
23
- function F(e, t, r, i, o, d, n, a, l, f, c = 0, h) {
24
- var C;
23
+ function F(e, t, r, a, o, l, n, i, d, f, c = 0, s) {
24
+ var S;
25
25
  let x = c;
26
- for (let s = 0; s < t.length; s++) {
27
- let S;
28
- if (!o || t[s].value === void 0 || t[s].items === void 0) {
26
+ for (let h = 0; h < t.length; h++) {
27
+ let w;
28
+ if (!o || t[h].value === void 0 || t[h].items === void 0) {
29
29
  e[e.length] = {
30
- dataIndex: i.index,
31
- dataItem: t[s],
30
+ dataIndex: a.index,
31
+ dataItem: t[h],
32
32
  rowType: "data",
33
33
  level: c,
34
- group: h,
34
+ group: s,
35
35
  // This is related to detail-row expansion
36
- expanded: (C = d ? u(d, t[s]) : f && !!(n != null && n[v(f)(t[s])])) != null ? C : !1
37
- }, i.index++;
36
+ expanded: (S = l ? u(l, t[h]) : f && !!(n != null && n[v(f)(t[h])])) != null ? S : !1
37
+ }, a.index++;
38
38
  continue;
39
39
  } else {
40
- let y;
41
- h != null && h.parents ? y = [{ field: h.field, value: h.value }, ...h.parents] : h ? y = [h] : y = [], S = {
42
- field: t[s].field,
43
- value: t[s].value,
44
- parents: y
40
+ let C;
41
+ s != null && s.parents ? C = [{ field: s.field, value: s.value }, ...s.parents] : s ? C = [s] : C = [], w = {
42
+ field: t[h].field,
43
+ value: t[h].value,
44
+ parents: C
45
45
  };
46
46
  }
47
47
  x = Math.max(x, c + 1);
48
48
  let I = !1;
49
- if (d)
50
- I = u(d, t[s]) !== !1;
49
+ if (l)
50
+ I = u(l, t[h]) !== !1;
51
51
  else {
52
- const y = M(a || [], S);
53
- y ? I = y.expanded !== !1 : I = l !== !1;
52
+ const C = b(i || [], w);
53
+ C ? I = C.expanded !== !1 : I = d !== !1;
54
54
  }
55
55
  e[e.length] = {
56
56
  dataIndex: -1,
57
- dataItem: t[s],
57
+ dataItem: t[h],
58
58
  level: c,
59
- group: S,
59
+ group: w,
60
60
  rowType: "groupHeader",
61
61
  expanded: I
62
- }, I && (S.expanded = I, x = Math.max(
62
+ }, I && (w.expanded = I, x = Math.max(
63
63
  F(
64
64
  e,
65
- t[s].items,
65
+ t[h].items,
66
66
  r,
67
- i,
68
- o,
69
- d,
70
- n,
71
67
  a,
68
+ o,
72
69
  l,
70
+ n,
71
+ i,
72
+ d,
73
73
  f,
74
74
  c + 1,
75
- S
75
+ w
76
76
  ),
77
77
  x
78
78
  )), (r === "always" || I && r === "visible") && (e[e.length] = {
79
79
  dataIndex: -1,
80
- dataItem: t[s],
80
+ dataItem: t[h],
81
81
  rowType: "groupFooter",
82
82
  level: c,
83
83
  expanded: I
@@ -88,75 +88,75 @@ function F(e, t, r, i, o, d, n, a, l, f, c = 0, h) {
88
88
  const K = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1;
89
89
  function Q(e, t) {
90
90
  const r = [[]];
91
- let i = 0;
91
+ let a = 0;
92
92
  for (let n = e.length - 1; n >= 0; n--)
93
- i = Math.max(i, e[n].depth), e[n].headerColSpan = e[n].headerColSpan || 1, e[n].children.length > 0 && (e[n].headerColSpan = e[n].children.reduce(
94
- (a, l) => l.hidden ? a : a + l.headerColSpan,
93
+ a = Math.max(a, e[n].depth), e[n].headerColSpan = e[n].headerColSpan || 1, e[n].children.length > 0 && (e[n].headerColSpan = e[n].children.reduce(
94
+ (i, d) => d.hidden ? i : i + d.headerColSpan,
95
95
  0
96
96
  ));
97
97
  const o = [];
98
- let d = 1;
99
- return e.forEach((n, a) => {
98
+ let l = 1;
99
+ return e.forEach((n, i) => {
100
100
  r[n.depth] = r[n.depth] || [];
101
- let l = !1;
102
- r[n.depth].length === 0 && (d <= 1 ? d = 1 + (n.children.length > 0 ? 0 : i - n.depth) : (d--, l = !0)), n.rowSpan = 1 + (n.children.length > 0 ? 0 : i - n.depth), n.kFirst = l, n.index = r[n.depth].length, r[n.depth].push(a), n.ariaColumnIndex = o[n.depth] ? o[n.depth] + 1 : 1;
101
+ let d = !1;
102
+ r[n.depth].length === 0 && (l <= 1 ? l = 1 + (n.children.length > 0 ? 0 : a - n.depth) : (l--, d = !0)), n.rowSpan = 1 + (n.children.length > 0 ? 0 : a - n.depth), n.kFirst = d, n.index = r[n.depth].length, r[n.depth].push(i), n.ariaColumnIndex = o[n.depth] ? o[n.depth] + 1 : 1;
103
103
  for (let f = n.depth; f < n.depth + n.rowSpan; f++)
104
104
  o[f] = (o[f] || 0) + n.headerColSpan;
105
105
  }), A(r, e, t), D(r, e, t), r;
106
106
  }
107
- function j(e, t, r, i = 0, o = !1) {
108
- const d = [];
107
+ function H(e, t, r, a = 0, o = !1) {
108
+ const l = [];
109
109
  if (!e)
110
110
  return [];
111
- e && e.length === void 0 && (e = [e]), e.forEach((a, l) => {
112
- a = a.props ? a.props : a;
113
- const f = a.id ? a.id : E.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), c = B && a.media && window.matchMedia ? !window.matchMedia(a.media).matches : !1, h = o || c || a.hidden, x = t == null ? void 0 : t.find((s) => s.id === f), C = j(a.children, (x == null ? void 0 : x.children) || [], r, i + 1, h);
114
- d.push(
111
+ e && e.length === void 0 && (e = [e]), e.forEach((i, d) => {
112
+ i = i.props ? i.props : i;
113
+ const f = i.id ? i.id : M.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), c = T && i.media && window.matchMedia ? !window.matchMedia(i.media).matches : !1, s = o || c || i.hidden, x = t == null ? void 0 : t.find((h) => h.id === f), S = H(i.children, (x == null ? void 0 : x.children) || [], r, a + 1, s);
114
+ l.push(
115
115
  Object.assign(
116
- { depth: i },
117
- b,
118
- C.length ? { cell: () => null, filterCell: () => null } : {},
119
- a,
116
+ { depth: a },
117
+ E,
118
+ S.length ? { cell: () => null, filterCell: () => null } : {},
119
+ i,
120
120
  {
121
121
  id: f,
122
- declarationIndex: d.length,
123
- children: C,
122
+ declarationIndex: l.length,
123
+ children: S,
124
124
  headerColSpan: 0,
125
125
  rowSpan: 0,
126
- columnType: a.columnType || "data",
127
- colSpan: a.colSpan || 1,
126
+ columnType: i.columnType || "data",
127
+ colSpan: i.colSpan || 1,
128
128
  isAccessible: !0,
129
- hidden: h,
129
+ hidden: s,
130
130
  left: null,
131
131
  right: null,
132
- rowSpannable: a.rowSpannable
132
+ rowSpannable: i.rowSpannable
133
133
  },
134
134
  x ? { width: x.width, orderIndex: x.orderIndex } : {}
135
135
  )
136
136
  );
137
137
  });
138
- const n = (a, l) => a.orderIndex === l.orderIndex ? a.declarationIndex - l.declarationIndex : (a.orderIndex || 0) - (l.orderIndex || 0);
139
- if (d.sort(n), i === 0) {
140
- const a = [], l = (f, c) => f.forEach((h) => {
141
- h.parentIndex = c, l(h.children, a.push(h) - 1);
138
+ const n = (i, d) => i.orderIndex === d.orderIndex ? i.declarationIndex - d.declarationIndex : (i.orderIndex || 0) - (d.orderIndex || 0);
139
+ if (l.sort(n), a === 0) {
140
+ const i = [], d = (f, c) => f.forEach((s) => {
141
+ s.parentIndex = c, d(s.children, i.push(s) - 1);
142
142
  });
143
- return l(d, -1), a;
143
+ return d(l, -1), i;
144
144
  }
145
- return d;
145
+ return l;
146
146
  }
147
- const H = (e) => Array.isArray(e) ? e : e ? e.data : [];
148
- function X(e, t, r, i) {
149
- const o = H(e), d = [];
147
+ const j = (e) => Array.isArray(e) ? e : e ? e.data : [];
148
+ function X(e, t, r, a) {
149
+ const o = j(e), l = [];
150
150
  if (o.length > 0) {
151
151
  let n = o[0];
152
152
  if (t)
153
- for (let l = 0; l < t.length; l++)
153
+ for (let d = 0; d < t.length; d++)
154
154
  n = n.items && n.items[0];
155
- Object.getOwnPropertyNames(n).forEach((l) => {
156
- l !== r.column && d.push(
155
+ Object.getOwnPropertyNames(n).forEach((d) => {
156
+ d !== r.column && l.push(
157
157
  Object.assign(
158
158
  {
159
- id: E.generateNavigatableId(`${i.prevId++}`, i.idPrefix, "column"),
159
+ id: M.generateNavigatableId(`${a.prevId++}`, a.idPrefix, "column"),
160
160
  declarationIndex: -1,
161
161
  parentIndex: -1,
162
162
  depth: 0,
@@ -172,15 +172,15 @@ function X(e, t, r, i) {
172
172
  ariaColumnIndex: 0,
173
173
  isAccessible: !0
174
174
  },
175
- b,
176
- { field: l }
175
+ E,
176
+ { field: d }
177
177
  )
178
178
  );
179
179
  });
180
180
  }
181
- return d;
181
+ return l;
182
182
  }
183
- const O = (e, t) => {
183
+ const B = (e, t) => {
184
184
  let r = e[t.parentIndex];
185
185
  for (; r; ) {
186
186
  if (r.footerCell)
@@ -188,27 +188,27 @@ const O = (e, t) => {
188
188
  r = e[r.parentIndex];
189
189
  }
190
190
  return !1;
191
- }, Y = (e) => e.filter((t) => O(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), Z = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, _ = (e, t) => t && t.filter((r) => r.field === e).length > 0, R = (e) => (e.sort((t, r) => t.declarationIndex - r.declarationIndex), e.map((t) => {
192
- const { declarationIndex: r, parentIndex: i, depth: o, headerColSpan: d, rowSpan: n, index: a, kFirst: l, children: f, ...c } = t;
191
+ }, Y = (e) => e.filter((t) => B(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), Z = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, _ = (e, t) => t && t.filter((r) => r.field === e).length > 0, O = (e) => (e.sort((t, r) => t.declarationIndex - r.declarationIndex), e.map((t) => {
192
+ const { declarationIndex: r, parentIndex: a, depth: o, headerColSpan: l, rowSpan: n, index: i, kFirst: d, children: f, ...c } = t;
193
193
  return f.length ? {
194
- children: R(f),
194
+ children: O(f),
195
195
  ...c
196
196
  } : c;
197
- })), N = (e) => {
198
- const { filterCell: t, headerCell: r, footerCell: i, cells: o, cell: d, rowSpannable: n, ...a } = e;
197
+ })), p = (e) => {
198
+ const { filterCell: t, headerCell: r, footerCell: a, cells: o, cell: l, rowSpannable: n, defaultCell: i, ...d } = e;
199
199
  return e.children.length ? {
200
- ...a,
201
- children: e.children.map(N)
202
- } : a;
203
- }, k = (e) => ({
200
+ ...d,
201
+ children: e.children.map(p)
202
+ } : d;
203
+ }, N = (e) => ({
204
204
  id: e.id,
205
205
  field: e.field,
206
206
  title: e.title,
207
207
  width: e.width,
208
208
  hidden: !1,
209
- children: e.children ? p(e.children) : null
210
- }), p = (e) => e.map(k), G = (e) => {
211
- const t = [], r = (i) => i == null ? void 0 : i.forEach((o) => {
209
+ children: e.children ? k(e.children) : null
210
+ }), k = (e) => e.map(N), G = (e) => {
211
+ const t = [], r = (a) => a == null ? void 0 : a.forEach((o) => {
212
212
  t.push(o), r(o.children);
213
213
  });
214
214
  return r(e), t;
@@ -248,10 +248,10 @@ const O = (e, t) => {
248
248
  ...t.edit || {}
249
249
  }
250
250
  } : t : e;
251
- }, ae = (e) => {
251
+ }, ie = (e) => {
252
252
  var r;
253
253
  return typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1;
254
- }, ie = () => m === T, de = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), le = (e) => ({
254
+ }, ae = () => R === m, de = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), le = (e) => ({
255
255
  id: e.id,
256
256
  ariaColumnIndex: e.ariaColumnIndex,
257
257
  isSelected: e.isSelected,
@@ -278,19 +278,27 @@ const O = (e, t) => {
278
278
  columnPosition: e.columnPosition,
279
279
  group: e.group
280
280
  }), oe = (e) => {
281
- var i, o;
282
- const t = typeof e == "object" ? (i = e.enabled) != null ? i : !0 : e != null ? e : !1, r = typeof e == "object" ? (o = e.valueGetter) != null ? o : (d, n) => v(n)(d) : (d, n) => v(n)(d);
281
+ var a, o;
282
+ const t = typeof e == "object" ? (a = e.enabled) != null ? a : !0 : e != null ? e : !1, r = typeof e == "object" ? (o = e.valueGetter) != null ? o : (l, n) => v(n)(l) : (l, n) => v(n)(l);
283
283
  return { enabled: t, valueGetter: r };
284
284
  }, $ = (e) => {
285
285
  var t;
286
- return w.isValidElement(e) ? e : (t = w.Children.toArray(e)) == null ? void 0 : t[0];
286
+ return y.isValidElement(e) ? e : (t = y.Children.toArray(e)) == null ? void 0 : t[0];
287
287
  }, fe = (e, t) => {
288
288
  const r = $(e);
289
- return r ? w.cloneElement(r, t) : null;
289
+ return r ? y.cloneElement(r, t) : null;
290
+ }, se = (e) => {
291
+ let t = 0;
292
+ if (e) {
293
+ const r = e.insertRow(0), a = r.insertCell(0);
294
+ a.textContent = "&nbsp;", t = r.getBoundingClientRect().height, e.deleteRow(0);
295
+ }
296
+ return t;
290
297
  };
291
298
  export {
292
299
  X as autoGenerateColumns,
293
- N as clientColumn,
300
+ se as calcRowHeight,
301
+ p as clientColumn,
294
302
  fe as cloneReactElement,
295
303
  P as firefox,
296
304
  ee as firefoxMaxHeight,
@@ -298,22 +306,22 @@ export {
298
306
  Y as footerColumns,
299
307
  le as getClientCellProps,
300
308
  K as getColSpan,
301
- k as getColumnState,
309
+ N as getColumnState,
302
310
  Z as getColumnWidth,
303
- p as getColumnsState,
304
- H as getDataAsArray,
311
+ k as getColumnsState,
312
+ j as getDataAsArray,
305
313
  ne as getDefaultBodyContextMenuItems,
306
314
  te as getDefaultHeadContextMenuItems,
307
315
  G as getFlatColumnsState,
308
316
  u as getNestedValue,
309
317
  $ as getReactElement,
310
318
  oe as getRowSpanOptions,
311
- ie as isClient,
319
+ ae as isClient,
312
320
  de as isClientReference,
313
- ae as isRowReorderEnabled,
321
+ ie as isRowReorderEnabled,
314
322
  _ as isSorted,
315
323
  Q as mapColumns,
316
- j as readColumns,
324
+ H as readColumns,
317
325
  re as resolveCells,
318
- R as sanitizeColumns
326
+ O as sanitizeColumns
319
327
  };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const p=u(d);class S{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(p.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){var t;return((t=this.containerRef)==null?void 0:t.current)||void 0}translate(t,e){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||e?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){var l;if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!((l=this.containerRef)!=null&&l.current))return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,a=this.lastScrollTop>=e,h=!a;this.lastScrollTop=e;let i=this.rowHeightService.index(e),o=this.rowHeightService.offset(i);const{offsetHeight:n}=this.containerRef.current,c=this.rowHeightService.index(e+n);if(h&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,o=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(o);const f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,t)}else if(a&&i<this.firstLoaded){const r=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-r,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.VirtualScrollFixed=S;
@@ -1,52 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import * as f from "react";
9
- import { firefox as d } from "./utils/index.mjs";
10
- class S {
11
- constructor(t) {
12
- this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(f.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
13
- }
14
- get container() {
15
- var t;
16
- return ((t = this.containerRef) == null ? void 0 : t.current) || void 0;
17
- }
18
- translate(t, i) {
19
- this.scrollableVirtual && this.table && (d || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
20
- }
21
- changePage(t, i) {
22
- this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, i);
23
- }
24
- reset() {
25
- this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
26
- }
27
- scrollHandler(t) {
28
- var h;
29
- if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !((h = this.containerRef) != null && h.current))
30
- return;
31
- if (this.scrollSyncing) {
32
- this.scrollSyncing = !1;
33
- return;
34
- }
35
- const i = this.container.scrollTop, a = this.lastScrollTop >= i, o = !a;
36
- this.lastScrollTop = i;
37
- let s = this.rowHeightService.index(i), r = this.rowHeightService.offset(s);
38
- const { offsetHeight: l } = this.containerRef.current, n = this.rowHeightService.index(i + l);
39
- if (o && n >= this.lastLoaded && this.lastLoaded < this.total) {
40
- const e = s + this.pageSize - this.total;
41
- e > 0 && (s = s - e, r = this.rowHeightService.offset(s)), this.firstLoaded = s, this.translate(r);
42
- const c = this.firstLoaded + this.pageSize;
43
- this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
44
- } else if (a && s < this.firstLoaded) {
45
- const e = Math.floor(this.pageSize * 0.3);
46
- this.firstLoaded = Math.max(s - e, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
47
- }
48
- }
49
- }
50
- export {
51
- S as VirtualScrollFixed
52
- };
package/cells/GridCell.js DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),u=require("../utils/index.js"),T=require("../constants/index.js"),g=require("./client/GridCellContainer.js"),S=require("@progress/kendo-react-common");function b(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=b(G),w=e=>{var m,f,C;let n=null,t=null,l=null;const r=e.unstyled,y=r&&r.uGrid?r.uGrid:S.uGrid;if(((m=e._rowSpan)==null?void 0:m.count)===null)return null;if(e.rowType==="groupFooter")t={className:e.className},n=a.createElement("td",{...t},l);else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const i=u.getNestedValue(e.field,e.dataItem);i!=null&&(l=e.intl&&e.format?e.intl.format(e.format,i):i.toString())}const c=S.classNames(y.td({selected:e.isSelected,sorted:e.isSorted,alt:e.isAlt}),e.className);t={rowSpan:(C=(f=e._rowSpan)==null?void 0:f.count)!=null?C:void 0,colSpan:e.colSpan,style:e.style,className:c,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[T.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex},n=a.createElement("td",{...t},l)}const o=u.getClientCellProps(e),s=e.rowType||"data",d=e.cells;if(d&&d[s]){const c=d[s],i=u.isClientReference(c);return a.createElement(g.GridCellContainer,{cellProps:o,tdProps:t,isCustom:!0,isClient:i},a.createElement(c,{...o,tdProps:t},l))}return a.createElement(g.GridCellContainer,{cellProps:o,content:l,tdProps:t},n)};exports.GridCell=w;
@@ -1,52 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import * as a from "react";
9
- import { getNestedValue as g, getClientCellProps as y, isClientReference as w } from "../utils/index.mjs";
10
- import { GRID_COL_INDEX_ATTRIBUTE as E } from "../constants/index.mjs";
11
- import { GridCellContainer as C } from "./client/GridCellContainer.mjs";
12
- import { uGrid as N, classNames as T } from "@progress/kendo-react-common";
13
- const x = (e) => {
14
- var u, s, f;
15
- let c = null, t = null, n = null;
16
- const d = e.unstyled, S = d && d.uGrid ? d.uGrid : N;
17
- if (((u = e._rowSpan) == null ? void 0 : u.count) === null)
18
- return null;
19
- if (e.rowType === "groupFooter")
20
- t = {
21
- className: e.className
22
- }, c = /* @__PURE__ */ a.createElement("td", { ...t }, n);
23
- else if (e.rowType !== "groupHeader") {
24
- if (e.field !== void 0) {
25
- const l = g(e.field, e.dataItem);
26
- l != null && (n = e.intl && e.format ? e.intl.format(e.format, l) : l.toString());
27
- }
28
- const i = T(
29
- S.td({ selected: e.isSelected, sorted: e.isSorted, alt: e.isAlt }),
30
- e.className
31
- );
32
- t = {
33
- rowSpan: (f = (s = e._rowSpan) == null ? void 0 : s.count) != null ? f : void 0,
34
- colSpan: e.colSpan,
35
- style: e.style,
36
- className: i,
37
- role: "gridcell",
38
- "aria-colindex": e.ariaColumnIndex,
39
- "aria-selected": e.isSelected,
40
- [E]: e.columnIndex
41
- }, c = /* @__PURE__ */ a.createElement("td", { ...t }, n);
42
- }
43
- const o = y(e), m = e.rowType || "data", r = e.cells;
44
- if (r && r[m]) {
45
- const i = r[m], l = w(i);
46
- return /* @__PURE__ */ a.createElement(C, { cellProps: o, tdProps: t, isCustom: !0, isClient: l }, /* @__PURE__ */ a.createElement(i, { ...o, tdProps: t }, n));
47
- }
48
- return /* @__PURE__ */ a.createElement(C, { cellProps: o, content: n, tdProps: t }, c);
49
- };
50
- export {
51
- x as GridCell
52
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("@progress/kendo-react-common"),u=require("./client/DetailCellContainer.js");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=m(s),f=e=>{const{colSpan:a,ariaColIndex:t,dataItem:n,dataIndex:i,id:o}=e,l=e.unstyled,d=l&&l.uGrid?l.uGrid:c.uGrid;return r.createElement(u.DetailCellContainer,{id:o,dataItem:n},r.createElement("td",{className:c.classNames(d.detailTd({})),colSpan:a,"aria-colindex":t,role:"gridcell"},r.createElement(e.detail,{dataItem:n,dataIndex:i})))};exports.GridDetailCell=f;
@@ -1,26 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import * as a from "react";
9
- import { uGrid as c, classNames as s } from "@progress/kendo-react-common";
10
- import { DetailCellContainer as m } from "./client/DetailCellContainer.mjs";
11
- const x = (e) => {
12
- const { colSpan: r, ariaColIndex: d, dataItem: l, dataIndex: i, id: n } = e, t = e.unstyled, o = t && t.uGrid ? t.uGrid : c;
13
- return /* @__PURE__ */ a.createElement(m, { id: n, dataItem: l }, /* @__PURE__ */ a.createElement(
14
- "td",
15
- {
16
- className: s(o.detailTd({})),
17
- colSpan: r,
18
- "aria-colindex": d,
19
- role: "gridcell"
20
- },
21
- /* @__PURE__ */ a.createElement(e.detail, { dataItem: l, dataIndex: i })
22
- ));
23
- };
24
- export {
25
- x as GridDetailCell
26
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),u=require("../utils/index.js"),C=require("@progress/kendo-react-common"),g=require("../constants/index.js"),G=require("./client/GridEditCellEditor.js"),m=require("./client/GridEditCellContainer.js");function y(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,c.get?c:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const r=y(f),S=e=>{const t=e.unstyled,l=t&&t.uGrid?t.uGrid:C.uGrid,c=C.classNames(l.editTd({selected:e.isSelected}),e.className),d={colSpan:e.colSpan,style:e.style,className:c,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[g.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell"},s=u.getClientCellProps(e),o=r.createElement(G.GridEditCellEditor,{cellProps:s}),a=e.editor||"text",i=e.cells;if(i){let n;if(i.edit&&i.edit[a]?n=i.edit[a]:i.data&&(n=i.data),n){const E=u.isClientReference(n);return r.createElement(m.GridEditCellContainer,{cellProps:s,tdProps:d,isCustom:!0,isClient:E},r.createElement(n,{...s,tdProps:d},o))}}return r.createElement(m.GridEditCellContainer,{cellProps:s,content:o,tdProps:d},r.createElement("td",{...d},o))};exports.GridEditCell=S;
@@ -1,35 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import * as i from "react";
9
- import { getClientCellProps as u, isClientReference as f } from "../utils/index.mjs";
10
- import { uGrid as E, classNames as G } from "@progress/kendo-react-common";
11
- import { GRID_COL_INDEX_ATTRIBUTE as x } from "../constants/index.mjs";
12
- import { GridEditCellEditor as I } from "./client/GridEditCellEditor.mjs";
13
- import { GridEditCellContainer as o } from "./client/GridEditCellContainer.mjs";
14
- const T = (e) => {
15
- const c = e.unstyled, a = c && c.uGrid ? c.uGrid : E, m = G(a.editTd({ selected: e.isSelected }), e.className), n = {
16
- colSpan: e.colSpan,
17
- style: e.style,
18
- className: m,
19
- "aria-colindex": e.ariaColumnIndex,
20
- "aria-selected": e.isSelected,
21
- [x]: e.columnIndex,
22
- role: "gridcell"
23
- }, s = u(e), d = /* @__PURE__ */ i.createElement(I, { cellProps: s }), r = e.editor || "text", t = e.cells;
24
- if (t) {
25
- let l;
26
- if (t.edit && t.edit[r] ? l = t.edit[r] : t.data && (l = t.data), l) {
27
- const C = f(l);
28
- return /* @__PURE__ */ i.createElement(o, { cellProps: s, tdProps: n, isCustom: !0, isClient: C }, /* @__PURE__ */ i.createElement(l, { ...s, tdProps: n }, d));
29
- }
30
- }
31
- return /* @__PURE__ */ i.createElement(o, { cellProps: s, content: d, tdProps: n }, /* @__PURE__ */ i.createElement("td", { ...n }, d));
32
- };
33
- export {
34
- T as GridEditCell
35
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@progress/kendo-react-common"),E=require("react"),N=require("./client/GridGroupCellToggle.js"),p=require("./client/GridGroupCellContainer.js"),k=require("../utils/index.js");function O(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(l,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return l.default=e,Object.freeze(l)}const o=O(E),R=e=>{const{columnIndex:l,level:r,columnsCount:n,rowType:G,dataItem:a,field:b,expanded:S,render:j,ariaColumnIndex:v}=e,c=b||"";let t=null,i=null,d=null,m=!1,s=!1,C=!1;const u=k.getClientCellProps(e);l===void 0||r===void 0||l<r||n===void 0||G!=="groupHeader"||a[c]===void 0?(s=!0,t={style:e.style,key:"g"+l,className:w.classNames("k-table-td","k-group-cell",{"k-grid-content-sticky":e.locked}),role:"gridcell"}):l===r&&(s=!0,t={className:"k-table-td",style:e.style,colSpan:n-l,key:"g-colspan",role:"gridcell","aria-selected":!1,"aria-expanded":S,"aria-colindex":v},d=o.createElement("p",{className:"k-reset"},o.createElement(N.GridGroupCellToggle,{...u}),a[c]instanceof Date&&a[c].toString?a[c].toString():a[c]),m=!0,e.locked&&(C=!0,t={...t,colSpan:0,style:{...e.style,position:"sticky",zIndex:2}},i={className:"k-table-td",role:"gridcell",colSpan:n-l,style:{borderLeftWidth:0,borderRightWidth:0}}));const f=e.rowType||"data",g=e.cells;if(g&&g.group&&g.group[f]){const y=g.group[f],T=k.isClientReference(y);return o.createElement(p.GridGroupCellContainer,{cellProps:u,tdProps:t,td2Props:i,isCustom:!0,isClient:T,addKeyDownHandler:!0},o.createElement(y,{...u,tdProps:t,td2Props:i},d))}const x=s?o.createElement("td",{...t,key:t==null?void 0:t.key},d):null;return o.createElement(p.GridGroupCellContainer,{cellProps:u,addKeyDownHandler:m,tdProps:t,td2Props:i,renderFirstCell:s,renderSecondCell:C,content:d},x)};exports.GridGroupCell=R;