@progress/kendo-react-grid 9.0.0-develop.1 → 9.0.0-develop.3
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/README.md +34 -33
- package/VirtualScroll.mjs +14 -11
- package/cells/GridCell.mjs +6 -3
- package/cells/GridDetailCell.mjs +6 -3
- package/cells/GridEditCell.mjs +10 -38
- package/cells/GridGroupCell.mjs +24 -30
- package/cells/GridHierarchyCell.mjs +2 -13
- package/cells/GridSelectionCell.mjs +3 -24
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +36 -42
- package/columnMenu/GridColumnMenuFilter.mjs +18 -28
- package/columnMenu/GridColumnMenuFilterCell.mjs +1 -9
- package/columnMenu/GridColumnMenuFilterUI.mjs +1 -8
- package/columnMenu/GridColumnMenuWrapper.mjs +6 -18
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnDraggable.mjs +14 -2
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +36 -44
- package/drag/GroupingIndicator.mjs +1 -15
- package/filterCommon.mjs +1 -3
- package/footer/Footer.mjs +22 -22
- package/footer/FooterRow.mjs +6 -5
- package/header/FilterRow.mjs +38 -42
- package/header/GridHeaderSelectionCell.mjs +3 -1
- package/header/Header.mjs +19 -4
- package/header/HeaderRow.mjs +24 -27
- package/messages/index.mjs +4 -1
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/rows/GridRow.mjs +10 -8
- package/utils/index.js +1 -1
- package/utils/index.mjs +35 -39
package/utils/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import { gridDefaultProps as x } from "../GridColumn.mjs";
|
|
10
10
|
import { tableKeyboardNavigationTools as g } from "@progress/kendo-react-data-tools";
|
|
11
|
-
function
|
|
11
|
+
function l(e, r) {
|
|
12
12
|
const i = (e || "").split(".");
|
|
13
13
|
let o = r;
|
|
14
14
|
return i.forEach((d) => {
|
|
@@ -24,12 +24,12 @@ function p(e, r, i, o, d, s, h = 0) {
|
|
|
24
24
|
dataItem: r[n],
|
|
25
25
|
rowType: "data",
|
|
26
26
|
level: h,
|
|
27
|
-
expanded: s === void 0 ||
|
|
27
|
+
expanded: s === void 0 || l(s, r[n])
|
|
28
28
|
}, o.index++;
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
31
|
t = Math.max(t, h + 1);
|
|
32
|
-
const a = s === void 0 ||
|
|
32
|
+
const a = s === void 0 || l(s, r[n]) === void 0 || l(s, r[n]);
|
|
33
33
|
e[e.length] = {
|
|
34
34
|
dataIndex: -1,
|
|
35
35
|
dataItem: r[n],
|
|
@@ -50,12 +50,17 @@ function p(e, r, i, o, d, s, h = 0) {
|
|
|
50
50
|
return t;
|
|
51
51
|
}
|
|
52
52
|
function I(e, r, i, o = 0) {
|
|
53
|
-
|
|
53
|
+
const d = [];
|
|
54
54
|
if (!e)
|
|
55
55
|
return [];
|
|
56
56
|
e && e.length === void 0 && (e = [e]), e.filter((t) => t && t.props ? !t.props.hidden : !t.hidden).forEach((t, n) => {
|
|
57
57
|
t = t.props ? t.props : t;
|
|
58
|
-
const a = r[n] || null, f = I(
|
|
58
|
+
const a = r[n] || null, f = I(
|
|
59
|
+
t.children,
|
|
60
|
+
a && a.children || [],
|
|
61
|
+
i,
|
|
62
|
+
o + 1
|
|
63
|
+
);
|
|
59
64
|
d.push(
|
|
60
65
|
Object.assign(
|
|
61
66
|
{ depth: o },
|
|
@@ -78,9 +83,8 @@ function I(e, r, i, o = 0) {
|
|
|
78
83
|
});
|
|
79
84
|
const h = (t, n) => t.orderIndex === n.orderIndex ? t.declarationIndex - n.declarationIndex : (t.orderIndex || 0) - (n.orderIndex || 0);
|
|
80
85
|
if (d.sort(h), o === 0) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
l.parentIndex = f, n(l.children, t.push(l) - 1);
|
|
86
|
+
const t = [], n = (a, f) => a.forEach((c) => {
|
|
87
|
+
c.parentIndex = f, n(c.children, t.push(c) - 1);
|
|
84
88
|
});
|
|
85
89
|
return n(d, -1), t;
|
|
86
90
|
}
|
|
@@ -96,25 +100,27 @@ function b(e, r, i, o) {
|
|
|
96
100
|
for (let n = 0; n < r.length; n++)
|
|
97
101
|
h = h.items && h.items[0];
|
|
98
102
|
Object.getOwnPropertyNames(h).forEach((n) => {
|
|
99
|
-
n !== i && s.push(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
n !== i && s.push(
|
|
104
|
+
Object.assign(
|
|
105
|
+
{
|
|
106
|
+
id: g.generateNavigatableId(`${o.prevId++}`, o.idPrefix, "column"),
|
|
107
|
+
declarationIndex: -1,
|
|
108
|
+
parentIndex: -1,
|
|
109
|
+
depth: 0,
|
|
110
|
+
colSpan: 0,
|
|
111
|
+
rowSpan: 0,
|
|
112
|
+
index: 0,
|
|
113
|
+
left: 0,
|
|
114
|
+
right: 0,
|
|
115
|
+
rightBorder: !1,
|
|
116
|
+
children: [],
|
|
117
|
+
ariaColumnIndex: 0,
|
|
118
|
+
isAccessible: !0
|
|
119
|
+
},
|
|
120
|
+
x,
|
|
121
|
+
{ field: n }
|
|
122
|
+
)
|
|
123
|
+
);
|
|
118
124
|
});
|
|
119
125
|
}
|
|
120
126
|
return s;
|
|
@@ -128,17 +134,7 @@ const v = (e, r) => {
|
|
|
128
134
|
}
|
|
129
135
|
return !1;
|
|
130
136
|
}, S = (e) => e.filter((r) => v(e, r) ? !1 : !!r.footerCell || !(r.children && r.children.length > 0)), m = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, F = (e, r) => r && r.filter((i) => i.field === e).length > 0, w = (e) => (e.sort((r, i) => r.declarationIndex - i.declarationIndex), e.map((r) => {
|
|
131
|
-
const {
|
|
132
|
-
declarationIndex: i,
|
|
133
|
-
parentIndex: o,
|
|
134
|
-
depth: d,
|
|
135
|
-
colSpan: s,
|
|
136
|
-
rowSpan: h,
|
|
137
|
-
index: t,
|
|
138
|
-
kFirst: n,
|
|
139
|
-
children: a,
|
|
140
|
-
...f
|
|
141
|
-
} = r;
|
|
137
|
+
const { declarationIndex: i, parentIndex: o, depth: d, colSpan: s, rowSpan: h, index: t, kFirst: n, children: a, ...f } = r;
|
|
142
138
|
return a.length ? {
|
|
143
139
|
children: w(a),
|
|
144
140
|
...f
|
|
@@ -173,7 +169,7 @@ export {
|
|
|
173
169
|
p as flatData,
|
|
174
170
|
S as footerColumns,
|
|
175
171
|
m as getColumnWidth,
|
|
176
|
-
|
|
172
|
+
l as getNestedValue,
|
|
177
173
|
F as isSorted,
|
|
178
174
|
I as readColumns,
|
|
179
175
|
N as resolveCells,
|