@progress/kendo-react-grid 10.0.0-develop.3 → 10.0.0-develop.5
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 +14 -15
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +427 -432
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +374 -357
- package/README.md +61 -15
- package/components/colGroup/GridColGroup.js +1 -1
- package/components/colGroup/GridColGroup.mjs +6 -6
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +111 -80
- package/index.d.mts +10 -2
- package/index.d.ts +10 -2
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/utils/index.js +1 -1
- package/utils/index.mjs +163 -151
- package/utils/premium.js +1 -1
- package/utils/premium.mjs +6 -6
package/utils/index.mjs
CHANGED
|
@@ -5,161 +5,158 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as w from "react";
|
|
9
9
|
import { gridDefaultProps as b } from "../GridColumn.mjs";
|
|
10
|
-
import { getter as
|
|
11
|
-
import { findGroupExpand as
|
|
12
|
-
import { ServerFragment as
|
|
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
13
|
import { ClientFragment as T } from "./_clientModule.mjs";
|
|
14
14
|
import { GridContextMenuItemNames as g } from "../contextMenu/enums.mjs";
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
import { canUseDOM as B } from "@progress/kendo-react-common";
|
|
16
|
+
function u(e, t) {
|
|
17
|
+
const r = (e != null ? e : "").split(".");
|
|
17
18
|
let i = t;
|
|
18
|
-
return
|
|
19
|
-
i = i ? i[
|
|
19
|
+
return r.forEach((o) => {
|
|
20
|
+
i = i ? i[o] : void 0;
|
|
20
21
|
}), i;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
var
|
|
24
|
-
let
|
|
25
|
-
for (let
|
|
23
|
+
function F(e, t, r, i, o, d, n, a, l, f, c = 0, h) {
|
|
24
|
+
var C;
|
|
25
|
+
let x = c;
|
|
26
|
+
for (let s = 0; s < t.length; s++) {
|
|
26
27
|
let S;
|
|
27
|
-
if (!
|
|
28
|
+
if (!o || t[s].value === void 0 || t[s].items === void 0) {
|
|
28
29
|
e[e.length] = {
|
|
29
30
|
dataIndex: i.index,
|
|
30
|
-
dataItem: t[
|
|
31
|
+
dataItem: t[s],
|
|
31
32
|
rowType: "data",
|
|
32
|
-
level:
|
|
33
|
-
group:
|
|
33
|
+
level: c,
|
|
34
|
+
group: h,
|
|
34
35
|
// This is related to detail-row expansion
|
|
35
|
-
expanded: (
|
|
36
|
+
expanded: (C = d ? u(d, t[s]) : f && !!(n != null && n[v(f)(t[s])])) != null ? C : !1
|
|
36
37
|
}, i.index++;
|
|
37
38
|
continue;
|
|
38
39
|
} else {
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
field: t[
|
|
42
|
-
value: t[
|
|
43
|
-
parents:
|
|
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
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
if (
|
|
49
|
-
|
|
47
|
+
x = Math.max(x, c + 1);
|
|
48
|
+
let I = !1;
|
|
49
|
+
if (d)
|
|
50
|
+
I = u(d, t[s]) !== !1;
|
|
50
51
|
else {
|
|
51
|
-
const
|
|
52
|
-
|
|
52
|
+
const y = M(a || [], S);
|
|
53
|
+
y ? I = y.expanded !== !1 : I = l !== !1;
|
|
53
54
|
}
|
|
54
55
|
e[e.length] = {
|
|
55
56
|
dataIndex: -1,
|
|
56
|
-
dataItem: t[
|
|
57
|
-
level:
|
|
57
|
+
dataItem: t[s],
|
|
58
|
+
level: c,
|
|
58
59
|
group: S,
|
|
59
60
|
rowType: "groupHeader",
|
|
60
|
-
expanded:
|
|
61
|
-
},
|
|
62
|
-
|
|
61
|
+
expanded: I
|
|
62
|
+
}, I && (S.expanded = I, x = Math.max(
|
|
63
|
+
F(
|
|
63
64
|
e,
|
|
64
|
-
t[
|
|
65
|
-
|
|
65
|
+
t[s].items,
|
|
66
|
+
r,
|
|
66
67
|
i,
|
|
68
|
+
o,
|
|
69
|
+
d,
|
|
70
|
+
n,
|
|
71
|
+
a,
|
|
67
72
|
l,
|
|
68
73
|
f,
|
|
69
|
-
|
|
70
|
-
a,
|
|
71
|
-
d,
|
|
72
|
-
o,
|
|
73
|
-
s + 1,
|
|
74
|
+
c + 1,
|
|
74
75
|
S
|
|
75
76
|
),
|
|
76
|
-
|
|
77
|
-
)), (
|
|
77
|
+
x
|
|
78
|
+
)), (r === "always" || I && r === "visible") && (e[e.length] = {
|
|
78
79
|
dataIndex: -1,
|
|
79
|
-
dataItem: t[
|
|
80
|
+
dataItem: t[s],
|
|
80
81
|
rowType: "groupFooter",
|
|
81
|
-
level:
|
|
82
|
-
expanded:
|
|
82
|
+
level: c,
|
|
83
|
+
expanded: I
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
|
-
return
|
|
86
|
+
return x;
|
|
86
87
|
}
|
|
87
|
-
const
|
|
88
|
-
function
|
|
89
|
-
const
|
|
88
|
+
const K = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1;
|
|
89
|
+
function Q(e, t) {
|
|
90
|
+
const r = [[]];
|
|
90
91
|
let i = 0;
|
|
91
|
-
for (let
|
|
92
|
-
i = Math.max(i, e[
|
|
93
|
-
(a,
|
|
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,
|
|
94
95
|
0
|
|
95
96
|
));
|
|
96
|
-
const
|
|
97
|
-
let
|
|
98
|
-
return e.forEach((
|
|
99
|
-
n
|
|
100
|
-
let
|
|
101
|
-
n
|
|
102
|
-
for (let
|
|
103
|
-
|
|
104
|
-
}),
|
|
97
|
+
const o = [];
|
|
98
|
+
let d = 1;
|
|
99
|
+
return e.forEach((n, a) => {
|
|
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;
|
|
103
|
+
for (let f = n.depth; f < n.depth + n.rowSpan; f++)
|
|
104
|
+
o[f] = (o[f] || 0) + n.headerColSpan;
|
|
105
|
+
}), A(r, e, t), D(r, e, t), r;
|
|
105
106
|
}
|
|
106
|
-
function j(e, t,
|
|
107
|
-
const
|
|
107
|
+
function j(e, t, r, i = 0, o = !1) {
|
|
108
|
+
const d = [];
|
|
108
109
|
if (!e)
|
|
109
110
|
return [];
|
|
110
|
-
e && e.length === void 0 && (e = [e]), e.
|
|
111
|
+
e && e.length === void 0 && (e = [e]), e.forEach((a, l) => {
|
|
111
112
|
a = a.props ? a.props : a;
|
|
112
|
-
const o = t
|
|
113
|
-
|
|
114
|
-
o && o.children || [],
|
|
115
|
-
n,
|
|
116
|
-
i + 1
|
|
117
|
-
);
|
|
118
|
-
l.push(
|
|
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(
|
|
119
115
|
Object.assign(
|
|
120
116
|
{ depth: i },
|
|
121
117
|
b,
|
|
122
|
-
|
|
123
|
-
o ? { width: o.width, orderIndex: o.orderIndex } : {},
|
|
118
|
+
C.length ? { cell: () => null, filterCell: () => null } : {},
|
|
124
119
|
a,
|
|
125
120
|
{
|
|
126
|
-
id:
|
|
127
|
-
declarationIndex:
|
|
128
|
-
children:
|
|
129
|
-
headerColSpan:
|
|
121
|
+
id: f,
|
|
122
|
+
declarationIndex: d.length,
|
|
123
|
+
children: C,
|
|
124
|
+
headerColSpan: 0,
|
|
130
125
|
rowSpan: 0,
|
|
131
126
|
columnType: a.columnType || "data",
|
|
132
127
|
colSpan: a.colSpan || 1,
|
|
133
128
|
isAccessible: !0,
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
hidden: h,
|
|
130
|
+
left: null,
|
|
131
|
+
right: null,
|
|
136
132
|
rowSpannable: a.rowSpannable
|
|
137
|
-
}
|
|
133
|
+
},
|
|
134
|
+
x ? { width: x.width, orderIndex: x.orderIndex } : {}
|
|
138
135
|
)
|
|
139
136
|
);
|
|
140
137
|
});
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
const a = [],
|
|
144
|
-
|
|
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);
|
|
145
142
|
});
|
|
146
|
-
return d
|
|
143
|
+
return l(d, -1), a;
|
|
147
144
|
}
|
|
148
|
-
return
|
|
145
|
+
return d;
|
|
149
146
|
}
|
|
150
|
-
const
|
|
151
|
-
function
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
let
|
|
147
|
+
const H = (e) => Array.isArray(e) ? e : e ? e.data : [];
|
|
148
|
+
function X(e, t, r, i) {
|
|
149
|
+
const o = H(e), d = [];
|
|
150
|
+
if (o.length > 0) {
|
|
151
|
+
let n = o[0];
|
|
155
152
|
if (t)
|
|
156
|
-
for (let
|
|
157
|
-
|
|
158
|
-
Object.getOwnPropertyNames(
|
|
159
|
-
|
|
153
|
+
for (let l = 0; l < t.length; l++)
|
|
154
|
+
n = n.items && n.items[0];
|
|
155
|
+
Object.getOwnPropertyNames(n).forEach((l) => {
|
|
156
|
+
l !== r.column && d.push(
|
|
160
157
|
Object.assign(
|
|
161
158
|
{
|
|
162
|
-
id:
|
|
159
|
+
id: E.generateNavigatableId(`${i.prevId++}`, i.idPrefix, "column"),
|
|
163
160
|
declarationIndex: -1,
|
|
164
161
|
parentIndex: -1,
|
|
165
162
|
depth: 0,
|
|
@@ -176,37 +173,49 @@ function J(e, t, n, i) {
|
|
|
176
173
|
isAccessible: !0
|
|
177
174
|
},
|
|
178
175
|
b,
|
|
179
|
-
{ field:
|
|
176
|
+
{ field: l }
|
|
180
177
|
)
|
|
181
178
|
);
|
|
182
179
|
});
|
|
183
180
|
}
|
|
184
|
-
return
|
|
181
|
+
return d;
|
|
185
182
|
}
|
|
186
|
-
const
|
|
187
|
-
let
|
|
188
|
-
for (;
|
|
189
|
-
if (
|
|
183
|
+
const O = (e, t) => {
|
|
184
|
+
let r = e[t.parentIndex];
|
|
185
|
+
for (; r; ) {
|
|
186
|
+
if (r.footerCell)
|
|
190
187
|
return !0;
|
|
191
|
-
|
|
188
|
+
r = e[r.parentIndex];
|
|
192
189
|
}
|
|
193
190
|
return !1;
|
|
194
|
-
},
|
|
195
|
-
const { declarationIndex:
|
|
196
|
-
return
|
|
197
|
-
children:
|
|
198
|
-
...
|
|
199
|
-
} :
|
|
200
|
-
})),
|
|
201
|
-
const { filterCell: t, headerCell:
|
|
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;
|
|
193
|
+
return f.length ? {
|
|
194
|
+
children: R(f),
|
|
195
|
+
...c
|
|
196
|
+
} : c;
|
|
197
|
+
})), N = (e) => {
|
|
198
|
+
const { filterCell: t, headerCell: r, footerCell: i, cells: o, cell: d, rowSpannable: n, ...a } = e;
|
|
202
199
|
return e.children.length ? {
|
|
203
200
|
...a,
|
|
204
|
-
children: e.children.map(
|
|
201
|
+
children: e.children.map(N)
|
|
205
202
|
} : a;
|
|
206
|
-
},
|
|
203
|
+
}, k = (e) => ({
|
|
204
|
+
id: e.id,
|
|
205
|
+
field: e.field,
|
|
206
|
+
title: e.title,
|
|
207
|
+
width: e.width,
|
|
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) => {
|
|
212
|
+
t.push(o), r(o.children);
|
|
213
|
+
});
|
|
214
|
+
return r(e), t;
|
|
215
|
+
}, P = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), ee = 17895697, te = (e) => {
|
|
207
216
|
let t = [];
|
|
208
217
|
return e.sortable && (t = t.concat([g.sortAsc, g.sortDesc])), t;
|
|
209
|
-
},
|
|
218
|
+
}, ne = (e) => {
|
|
210
219
|
let t = [];
|
|
211
220
|
return e.clipboard && (t = t.concat([
|
|
212
221
|
g.copySelection,
|
|
@@ -217,7 +226,7 @@ const p = (e, t) => {
|
|
|
217
226
|
g.edit,
|
|
218
227
|
g.delete
|
|
219
228
|
])), e.selectable && (t.length && (t = t.concat([g.separator])), t = t.concat([g.select])), e.rowReorderable && (t.length && (t = t.concat([g.separator])), t = t.concat([g.reorderRow])), t;
|
|
220
|
-
},
|
|
229
|
+
}, re = (e, t) => {
|
|
221
230
|
if (!(!e && !t))
|
|
222
231
|
return t ? e ? {
|
|
223
232
|
...e,
|
|
@@ -239,10 +248,10 @@ const p = (e, t) => {
|
|
|
239
248
|
...t.edit || {}
|
|
240
249
|
}
|
|
241
250
|
} : t : e;
|
|
242
|
-
},
|
|
243
|
-
var
|
|
244
|
-
return typeof e == "object" ? (
|
|
245
|
-
},
|
|
251
|
+
}, ae = (e) => {
|
|
252
|
+
var r;
|
|
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) => ({
|
|
246
255
|
id: e.id,
|
|
247
256
|
ariaColumnIndex: e.ariaColumnIndex,
|
|
248
257
|
isSelected: e.isSelected,
|
|
@@ -268,40 +277,43 @@ const p = (e, t) => {
|
|
|
268
277
|
rowDataIndex: e.rowDataIndex,
|
|
269
278
|
columnPosition: e.columnPosition,
|
|
270
279
|
group: e.group
|
|
271
|
-
}),
|
|
272
|
-
var i,
|
|
273
|
-
const t = typeof e == "object" ? (i = e.enabled) != null ? i : !0 : e != null ? e : !1,
|
|
274
|
-
return { enabled: t, valueGetter:
|
|
275
|
-
},
|
|
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);
|
|
283
|
+
return { enabled: t, valueGetter: r };
|
|
284
|
+
}, $ = (e) => {
|
|
276
285
|
var t;
|
|
277
|
-
return
|
|
278
|
-
},
|
|
279
|
-
const
|
|
280
|
-
return
|
|
286
|
+
return w.isValidElement(e) ? e : (t = w.Children.toArray(e)) == null ? void 0 : t[0];
|
|
287
|
+
}, fe = (e, t) => {
|
|
288
|
+
const r = $(e);
|
|
289
|
+
return r ? w.cloneElement(r, t) : null;
|
|
281
290
|
};
|
|
282
291
|
export {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
292
|
+
X as autoGenerateColumns,
|
|
293
|
+
N as clientColumn,
|
|
294
|
+
fe as cloneReactElement,
|
|
295
|
+
P as firefox,
|
|
296
|
+
ee as firefoxMaxHeight,
|
|
297
|
+
F as flatData,
|
|
298
|
+
Y as footerColumns,
|
|
299
|
+
le as getClientCellProps,
|
|
300
|
+
K as getColSpan,
|
|
301
|
+
k as getColumnState,
|
|
302
|
+
Z as getColumnWidth,
|
|
303
|
+
p as getColumnsState,
|
|
304
|
+
H as getDataAsArray,
|
|
305
|
+
ne as getDefaultBodyContextMenuItems,
|
|
306
|
+
te as getDefaultHeadContextMenuItems,
|
|
307
|
+
G as getFlatColumnsState,
|
|
308
|
+
u as getNestedValue,
|
|
309
|
+
$ as getReactElement,
|
|
310
|
+
oe as getRowSpanOptions,
|
|
311
|
+
ie as isClient,
|
|
312
|
+
de as isClientReference,
|
|
313
|
+
ae as isRowReorderEnabled,
|
|
314
|
+
_ as isSorted,
|
|
315
|
+
Q as mapColumns,
|
|
304
316
|
j as readColumns,
|
|
305
|
-
|
|
306
|
-
|
|
317
|
+
re as resolveCells,
|
|
318
|
+
R as sanitizeColumns
|
|
307
319
|
};
|
package/utils/premium.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),n=require("@progress/kendo-react-data-tools"),d=require("../sortCommon.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),n=require("@progress/kendo-react-data-tools"),d=require("../sortCommon.js"),s=require("../paging/GridPagerSettings.js");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const r=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,r.get?r:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const m=c(u),b=e=>({lockedColumn:e.some(t=>t.locked)}),g=e=>({multiColumn:e.some(t=>t.children&&t.children.length>0)}),C=e=>({columnCellTemplate:e.some(t=>t.columnType!=="data"?!1:t.cells||t.cell||t.headerCell||t.footerCell||t.filterCell)}),f=e=>({columnMenu:e.some(t=>t.columnMenu)}),y=e=>m.Children.toArray(e.children).some(l=>l&&l.type&&l.type.displayName==="KendoReactGridColumn"?l.props.hidden:!1),a=e=>{const t=n.getSelectionOptions(e.selectable),l=n.getEditableOptions(e.editable),r=e.sortable&&d.normalizeSortable(e.sortable),o=e.pageable&&s.normalize(e.pageable);return{cells:!!e.cells,detail:!!e.detail,cellRender:!!e.cellRender,rows:!!e.rows,rowRender:!!e.rowRender,filterCellRender:!!e.filterCellRender,headerCellRender:!!e.headerCellRender,editableInline:l.mode==="inline",selectionMultiple:t.enabled&&t.mode==="multiple",selectionDrag:t.enabled&&t.drag,columnMenu:!!e.columnMenu,filterOperators:!!e.filterOperators,groupable:!!e.groupable,group:!!e.group,groupExpand:!!e.groupExpand,customPager:!!e.pager,clipboard:!!e.clipboard,contextMenu:!!e.contextMenu,serverGrid:!e.isClient,scrollableVirtual:e.scrollable==="virtual",pageableInput:!!(e.pageable&&o.type==="input"),sortableMultiple:!!(e.sortable&&r.mode==="multiple"),hiddenColumns:y(e)}},i=e=>({...b(e),...g(e),...C(e),...f(e)}),h=(e,t)=>{const l={...a(e),...i(t)};return Object.keys(l).filter(r=>l[r]===!0)};exports.gridPremiumFeatures=h;exports.isPremiumGridByColumns=i;exports.isPremiumGridByProps=a;
|
package/utils/premium.mjs
CHANGED
|
@@ -9,12 +9,12 @@ import * as a from "react";
|
|
|
9
9
|
import { getSelectionOptions as i, getEditableOptions as o } from "@progress/kendo-react-data-tools";
|
|
10
10
|
import { normalizeSortable as d } from "../sortCommon.mjs";
|
|
11
11
|
import { normalize as u } from "../paging/GridPagerSettings.mjs";
|
|
12
|
-
const
|
|
12
|
+
const m = (e) => ({
|
|
13
13
|
lockedColumn: e.some((l) => l.locked)
|
|
14
|
-
}), m = (e) => ({
|
|
15
|
-
multiColumn: e.some((l) => l.children && l.children.length > 0)
|
|
16
14
|
}), s = (e) => ({
|
|
17
|
-
|
|
15
|
+
multiColumn: e.some((l) => l.children && l.children.length > 0)
|
|
16
|
+
}), c = (e) => ({
|
|
17
|
+
columnCellTemplate: e.some((l) => l.columnType !== "data" ? !1 : l.cells || l.cell || l.headerCell || l.footerCell || l.filterCell)
|
|
18
18
|
}), b = (e) => ({
|
|
19
19
|
columnMenu: e.some((l) => l.columnMenu)
|
|
20
20
|
}), C = (e) => a.Children.toArray(e.children).some((t) => t && t.type && t.type.displayName === "KendoReactGridColumn" ? t.props.hidden : !1), g = (e) => {
|
|
@@ -35,7 +35,7 @@ const c = (e) => ({
|
|
|
35
35
|
groupable: !!e.groupable,
|
|
36
36
|
group: !!e.group,
|
|
37
37
|
groupExpand: !!e.groupExpand,
|
|
38
|
-
|
|
38
|
+
customPager: !!e.pager,
|
|
39
39
|
clipboard: !!e.clipboard,
|
|
40
40
|
contextMenu: !!e.contextMenu,
|
|
41
41
|
serverGrid: !e.isClient,
|
|
@@ -45,9 +45,9 @@ const c = (e) => ({
|
|
|
45
45
|
hiddenColumns: C(e)
|
|
46
46
|
};
|
|
47
47
|
}, h = (e) => ({
|
|
48
|
-
...c(e),
|
|
49
48
|
...m(e),
|
|
50
49
|
...s(e),
|
|
50
|
+
...c(e),
|
|
51
51
|
...b(e)
|
|
52
52
|
}), M = (e, l) => {
|
|
53
53
|
const t = {
|