@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.
- package/GridClientContextReader.js +1 -1
- package/GridClientContextReader.mjs +16 -13
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +419 -421
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +402 -395
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +65 -107
- package/cells/GridDetailHierarchyCell.js +1 -1
- package/cells/GridDetailHierarchyCell.mjs +4 -4
- package/cells/datacell/GridCell.js +9 -0
- package/cells/datacell/GridCell.mjs +29 -0
- package/cells/datacell/GridCellServer.js +8 -0
- package/cells/datacell/GridCellServer.mjs +27 -0
- package/cells/datacell/GridCellServerContainer.js +9 -0
- package/cells/datacell/GridCellServerContainer.mjs +26 -0
- package/cells/datacell/useCellClientTdProps.js +9 -0
- package/cells/datacell/useCellClientTdProps.mjs +30 -0
- package/cells/datacell/utils.js +8 -0
- package/cells/datacell/utils.mjs +47 -0
- package/cells/detailcell/GridDetailCell.js +9 -0
- package/cells/detailcell/GridDetailCell.mjs +18 -0
- package/cells/detailcell/GridDetailCellServer.js +8 -0
- package/cells/detailcell/GridDetailCellServer.mjs +17 -0
- package/cells/detailcell/GridDetailCellServerContainer.js +9 -0
- package/cells/detailcell/GridDetailCellServerContainer.mjs +19 -0
- package/cells/detailcell/useDetailCellClientTdProps.js +9 -0
- package/cells/detailcell/useDetailCellClientTdProps.mjs +20 -0
- package/cells/detailcell/utils.js +8 -0
- package/cells/detailcell/utils.mjs +20 -0
- package/cells/editcell/GridEditCell.js +9 -0
- package/cells/editcell/GridEditCell.mjs +26 -0
- package/cells/editcell/GridEditCellServer.js +8 -0
- package/cells/editcell/GridEditCellServer.mjs +32 -0
- package/cells/editcell/GridEditCellServerContainer.js +9 -0
- package/cells/editcell/GridEditCellServerContainer.mjs +26 -0
- package/cells/editcell/useEditCellClientTdProps.js +9 -0
- package/cells/editcell/useEditCellClientTdProps.mjs +21 -0
- package/cells/editcell/utils.js +8 -0
- package/cells/editcell/utils.mjs +29 -0
- package/cells/groupcell/GridGroupCell.js +9 -0
- package/cells/groupcell/GridGroupCell.mjs +24 -0
- package/cells/groupcell/GridGroupCellServer.js +8 -0
- package/cells/groupcell/GridGroupCellServer.mjs +44 -0
- package/cells/groupcell/GridGroupCellServerContainer.js +9 -0
- package/cells/groupcell/GridGroupCellServerContainer.mjs +38 -0
- package/cells/groupcell/useGroupCellClientTdProps.js +9 -0
- package/cells/groupcell/useGroupCellClientTdProps.mjs +44 -0
- package/cells/groupcell/utils.js +8 -0
- package/cells/groupcell/utils.mjs +48 -0
- package/cells/hierarchycell/GridHierarchyCell.js +9 -0
- package/cells/hierarchycell/GridHierarchyCell.mjs +25 -0
- package/cells/hierarchycell/GridHierarchyCellServer.js +8 -0
- package/cells/hierarchycell/GridHierarchyCellServer.mjs +32 -0
- package/cells/hierarchycell/GridHierarchyCellServerContainer.js +9 -0
- package/cells/hierarchycell/GridHierarchyCellServerContainer.mjs +26 -0
- package/cells/hierarchycell/useHierarchyCellClientTdProps.js +9 -0
- package/cells/hierarchycell/useHierarchyCellClientTdProps.mjs +35 -0
- package/cells/hierarchycell/utils.js +8 -0
- package/cells/hierarchycell/utils.mjs +30 -0
- package/cells/hooks.js +9 -0
- package/cells/hooks.mjs +41 -0
- package/cells/rowreordercell/GridRowReorderCell.js +9 -0
- package/cells/rowreordercell/GridRowReorderCell.mjs +19 -0
- package/cells/rowreordercell/GridRowReorderCellServer.js +8 -0
- package/cells/rowreordercell/GridRowReorderCellServer.mjs +18 -0
- package/cells/rowreordercell/GridRowReorderCellServerContainer.js +9 -0
- package/cells/rowreordercell/GridRowReorderCellServerContainer.mjs +19 -0
- package/cells/rowreordercell/useRowReorderCellClientTdProps.js +9 -0
- package/cells/rowreordercell/useRowReorderCellClientTdProps.mjs +26 -0
- package/cells/rowreordercell/utils.js +8 -0
- package/cells/rowreordercell/utils.mjs +30 -0
- package/cells/selectioncell/GridSelectionCell.js +9 -0
- package/cells/selectioncell/GridSelectionCell.mjs +26 -0
- package/cells/selectioncell/GridSelectionCellServer.js +8 -0
- package/cells/selectioncell/GridSelectionCellServer.mjs +33 -0
- package/cells/selectioncell/GridSelectionCellServerContainer.js +9 -0
- package/cells/selectioncell/GridSelectionCellServerContainer.mjs +26 -0
- package/cells/selectioncell/useSelectionCellClientTdProps.js +9 -0
- package/cells/selectioncell/useSelectionCellClientTdProps.mjs +21 -0
- package/cells/selectioncell/utils.js +8 -0
- package/cells/selectioncell/utils.mjs +25 -0
- package/components/GridDraggableRowsContainer.js +1 -1
- package/components/GridDraggableRowsContainer.mjs +71 -67
- package/components/VirtualScrollHeightContainer.js +1 -1
- package/components/VirtualScrollHeightContainer.mjs +4 -4
- package/components/table/GridTableScrollable.js +1 -1
- package/components/table/GridTableScrollable.mjs +16 -15
- package/components/utils.js +1 -1
- package/components/utils.mjs +9 -10
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +19 -5
- package/index.d.ts +19 -5
- package/index.js +1 -1
- package/index.mjs +5 -5
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +16 -16
- package/utils/index.js +1 -1
- package/utils/index.mjs +112 -104
- package/VirtualScrollFixed.js +0 -8
- package/VirtualScrollFixed.mjs +0 -52
- package/cells/GridCell.js +0 -8
- package/cells/GridCell.mjs +0 -52
- package/cells/GridDetailCell.js +0 -8
- package/cells/GridDetailCell.mjs +0 -26
- package/cells/GridEditCell.js +0 -8
- package/cells/GridEditCell.mjs +0 -35
- package/cells/GridGroupCell.js +0 -8
- package/cells/GridGroupCell.mjs +0 -74
- package/cells/GridHierarchyCell.js +0 -8
- package/cells/GridHierarchyCell.mjs +0 -33
- package/cells/GridRowReorderCell.js +0 -8
- package/cells/GridRowReorderCell.mjs +0 -42
- package/cells/GridSelectionCell.js +0 -8
- package/cells/GridSelectionCell.mjs +0 -30
- package/cells/client/DetailCellContainer.js +0 -9
- package/cells/client/DetailCellContainer.mjs +0 -27
- package/cells/client/GridCellContainer.js +0 -9
- package/cells/client/GridCellContainer.mjs +0 -69
- package/cells/client/GridEditCellContainer.js +0 -9
- package/cells/client/GridEditCellContainer.mjs +0 -61
- package/cells/client/GridGroupCellContainer.js +0 -9
- package/cells/client/GridGroupCellContainer.mjs +0 -88
- package/cells/client/GridHierarchyCellContainer.js +0 -9
- package/cells/client/GridHierarchyCellContainer.mjs +0 -64
- package/cells/client/GridRowReorderContainer.js +0 -9
- package/cells/client/GridRowReorderContainer.mjs +0 -31
- package/cells/client/GridSelectionCellContainer.js +0 -9
- package/cells/client/GridSelectionCellContainer.mjs +0 -61
- /package/cells/{client → editcell}/GridEditCellEditor.js +0 -0
- /package/cells/{client → editcell}/GridEditCellEditor.mjs +0 -0
- /package/cells/{client → groupcell}/GridGroupCellToggle.js +0 -0
- /package/cells/{client → groupcell}/GridGroupCellToggle.mjs +0 -0
- /package/cells/{client → hierarchycell}/GridHierarchyCellToggle.js +0 -0
- /package/cells/{client → hierarchycell}/GridHierarchyCellToggle.mjs +0 -0
- /package/cells/{client → selectioncell}/GridSelectionCellInput.js +0 -0
- /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
|
|
9
|
-
import { gridDefaultProps as
|
|
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
|
|
12
|
-
import { ServerFragment as
|
|
13
|
-
import { ClientFragment as
|
|
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
|
|
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
|
|
18
|
+
let a = t;
|
|
19
19
|
return r.forEach((o) => {
|
|
20
|
-
|
|
21
|
-
}),
|
|
20
|
+
a = a ? a[o] : void 0;
|
|
21
|
+
}), a;
|
|
22
22
|
}
|
|
23
|
-
function F(e, t, r,
|
|
24
|
-
var
|
|
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
|
|
27
|
-
let
|
|
28
|
-
if (!o || t[
|
|
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:
|
|
31
|
-
dataItem: t[
|
|
30
|
+
dataIndex: a.index,
|
|
31
|
+
dataItem: t[h],
|
|
32
32
|
rowType: "data",
|
|
33
33
|
level: c,
|
|
34
|
-
group:
|
|
34
|
+
group: s,
|
|
35
35
|
// This is related to detail-row expansion
|
|
36
|
-
expanded: (
|
|
37
|
-
},
|
|
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
|
|
41
|
-
|
|
42
|
-
field: t[
|
|
43
|
-
value: t[
|
|
44
|
-
parents:
|
|
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 (
|
|
50
|
-
I = u(
|
|
49
|
+
if (l)
|
|
50
|
+
I = u(l, t[h]) !== !1;
|
|
51
51
|
else {
|
|
52
|
-
const
|
|
53
|
-
|
|
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[
|
|
57
|
+
dataItem: t[h],
|
|
58
58
|
level: c,
|
|
59
|
-
group:
|
|
59
|
+
group: w,
|
|
60
60
|
rowType: "groupHeader",
|
|
61
61
|
expanded: I
|
|
62
|
-
}, I && (
|
|
62
|
+
}, I && (w.expanded = I, x = Math.max(
|
|
63
63
|
F(
|
|
64
64
|
e,
|
|
65
|
-
t[
|
|
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
|
-
|
|
75
|
+
w
|
|
76
76
|
),
|
|
77
77
|
x
|
|
78
78
|
)), (r === "always" || I && r === "visible") && (e[e.length] = {
|
|
79
79
|
dataIndex: -1,
|
|
80
|
-
dataItem: t[
|
|
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
|
|
91
|
+
let a = 0;
|
|
92
92
|
for (let n = e.length - 1; n >= 0; n--)
|
|
93
|
-
|
|
94
|
-
(
|
|
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
|
|
99
|
-
return e.forEach((n,
|
|
98
|
+
let l = 1;
|
|
99
|
+
return e.forEach((n, i) => {
|
|
100
100
|
r[n.depth] = r[n.depth] || [];
|
|
101
|
-
let
|
|
102
|
-
r[n.depth].length === 0 && (
|
|
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
|
|
108
|
-
const
|
|
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((
|
|
112
|
-
|
|
113
|
-
const f =
|
|
114
|
-
|
|
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:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
{ depth: a },
|
|
117
|
+
E,
|
|
118
|
+
S.length ? { cell: () => null, filterCell: () => null } : {},
|
|
119
|
+
i,
|
|
120
120
|
{
|
|
121
121
|
id: f,
|
|
122
|
-
declarationIndex:
|
|
123
|
-
children:
|
|
122
|
+
declarationIndex: l.length,
|
|
123
|
+
children: S,
|
|
124
124
|
headerColSpan: 0,
|
|
125
125
|
rowSpan: 0,
|
|
126
|
-
columnType:
|
|
127
|
-
colSpan:
|
|
126
|
+
columnType: i.columnType || "data",
|
|
127
|
+
colSpan: i.colSpan || 1,
|
|
128
128
|
isAccessible: !0,
|
|
129
|
-
hidden:
|
|
129
|
+
hidden: s,
|
|
130
130
|
left: null,
|
|
131
131
|
right: null,
|
|
132
|
-
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 = (
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
|
|
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
|
|
143
|
+
return d(l, -1), i;
|
|
144
144
|
}
|
|
145
|
-
return
|
|
145
|
+
return l;
|
|
146
146
|
}
|
|
147
|
-
const
|
|
148
|
-
function X(e, t, r,
|
|
149
|
-
const o =
|
|
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
|
|
153
|
+
for (let d = 0; d < t.length; d++)
|
|
154
154
|
n = n.items && n.items[0];
|
|
155
|
-
Object.getOwnPropertyNames(n).forEach((
|
|
156
|
-
|
|
155
|
+
Object.getOwnPropertyNames(n).forEach((d) => {
|
|
156
|
+
d !== r.column && l.push(
|
|
157
157
|
Object.assign(
|
|
158
158
|
{
|
|
159
|
-
id:
|
|
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
|
-
|
|
176
|
-
{ field:
|
|
175
|
+
E,
|
|
176
|
+
{ field: d }
|
|
177
177
|
)
|
|
178
178
|
);
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
return
|
|
181
|
+
return l;
|
|
182
182
|
}
|
|
183
|
-
const
|
|
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) =>
|
|
192
|
-
const { declarationIndex: r, parentIndex:
|
|
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:
|
|
194
|
+
children: O(f),
|
|
195
195
|
...c
|
|
196
196
|
} : c;
|
|
197
|
-
})),
|
|
198
|
-
const { filterCell: t, headerCell: r, footerCell:
|
|
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
|
-
...
|
|
201
|
-
children: e.children.map(
|
|
202
|
-
} :
|
|
203
|
-
},
|
|
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 ?
|
|
210
|
-
}),
|
|
211
|
-
const t = [], r = (
|
|
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
|
-
},
|
|
251
|
+
}, ie = (e) => {
|
|
252
252
|
var r;
|
|
253
253
|
return typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1;
|
|
254
|
-
},
|
|
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
|
|
282
|
-
const t = typeof e == "object" ? (
|
|
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
|
|
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 ?
|
|
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 = " ", t = r.getBoundingClientRect().height, e.deleteRow(0);
|
|
295
|
+
}
|
|
296
|
+
return t;
|
|
290
297
|
};
|
|
291
298
|
export {
|
|
292
299
|
X as autoGenerateColumns,
|
|
293
|
-
|
|
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
|
-
|
|
309
|
+
N as getColumnState,
|
|
302
310
|
Z as getColumnWidth,
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
319
|
+
ae as isClient,
|
|
312
320
|
de as isClientReference,
|
|
313
|
-
|
|
321
|
+
ie as isRowReorderEnabled,
|
|
314
322
|
_ as isSorted,
|
|
315
323
|
Q as mapColumns,
|
|
316
|
-
|
|
324
|
+
H as readColumns,
|
|
317
325
|
re as resolveCells,
|
|
318
|
-
|
|
326
|
+
O as sanitizeColumns
|
|
319
327
|
};
|
package/VirtualScrollFixed.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 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;
|
package/VirtualScrollFixed.mjs
DELETED
|
@@ -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;
|
package/cells/GridCell.mjs
DELETED
|
@@ -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
|
-
};
|
package/cells/GridDetailCell.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 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;
|
package/cells/GridDetailCell.mjs
DELETED
|
@@ -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
|
-
};
|
package/cells/GridEditCell.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 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;
|
package/cells/GridEditCell.mjs
DELETED
|
@@ -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
|
-
};
|
package/cells/GridGroupCell.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 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;
|