@progress/kendo-react-grid 10.0.0-develop.2 → 10.0.0-develop.4

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/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 y from "react";
8
+ import * as w from "react";
9
9
  import { gridDefaultProps as b } from "../GridColumn.mjs";
10
- import { getter as u } from "@progress/kendo-data-query";
11
- import { findGroupExpand as A, updateLeft as E, updateRight as M, tableKeyboardNavigationTools as m } from "@progress/kendo-react-data-tools";
12
- import { ServerFragment as D } from "./_serverModule.mjs";
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
- function w(e, t) {
16
- const n = (e != null ? e : "").split(".");
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 n.forEach((l) => {
19
- i = i ? i[l] : void 0;
19
+ return r.forEach((o) => {
20
+ i = i ? i[o] : void 0;
20
21
  }), i;
21
22
  }
22
- function B(e, t, n, i, l, f, r, a, d, o, s = 0, c) {
23
- var v;
24
- let C = s;
25
- for (let h = 0; h < t.length; h++) {
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 (!l || t[h].value === void 0 || t[h].items === void 0) {
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[h],
31
+ dataItem: t[s],
31
32
  rowType: "data",
32
- level: s,
33
- group: c,
33
+ level: c,
34
+ group: h,
34
35
  // This is related to detail-row expansion
35
- expanded: (v = f ? w(f, t[h]) : o && !!(r != null && r[u(o)(t[h])])) != null ? v : !1
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 I;
40
- c != null && c.parents ? I = [{ field: c.field, value: c.value }, ...c.parents] : c ? I = [c] : I = [], S = {
41
- field: t[h].field,
42
- value: t[h].value,
43
- parents: I
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
- C = Math.max(C, s + 1);
47
- let x = !1;
48
- if (f)
49
- x = w(f, t[h]) !== !1;
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 I = A(a || [], S);
52
- I ? x = I.expanded !== !1 : x = d !== !1;
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[h],
57
- level: s,
57
+ dataItem: t[s],
58
+ level: c,
58
59
  group: S,
59
60
  rowType: "groupHeader",
60
- expanded: x
61
- }, x && (S.expanded = x, C = Math.max(
62
- B(
61
+ expanded: I
62
+ }, I && (S.expanded = I, x = Math.max(
63
+ F(
63
64
  e,
64
- t[h].items,
65
- n,
65
+ t[s].items,
66
+ r,
66
67
  i,
68
+ o,
69
+ d,
70
+ n,
71
+ a,
67
72
  l,
68
73
  f,
69
- r,
70
- a,
71
- d,
72
- o,
73
- s + 1,
74
+ c + 1,
74
75
  S
75
76
  ),
76
- C
77
- )), (n === "always" || x && n === "visible") && (e[e.length] = {
77
+ x
78
+ )), (r === "always" || I && r === "visible") && (e[e.length] = {
78
79
  dataIndex: -1,
79
- dataItem: t[h],
80
+ dataItem: t[s],
80
81
  rowType: "groupFooter",
81
- level: s,
82
- expanded: x
82
+ level: c,
83
+ expanded: I
83
84
  });
84
85
  }
85
- return C;
86
+ return x;
86
87
  }
87
- const z = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1;
88
- function W(e, t) {
89
- const n = [[]];
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 r = e.length - 1; r >= 0; r--)
92
- i = Math.max(i, e[r].depth), e[r].headerColSpan = e[r].headerColSpan || 1, e[r].children.length > 0 && (e[r].headerColSpan = e[r].children.reduce(
93
- (a, d) => d.hidden ? a : a + d.headerColSpan,
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 l = [];
97
- let f = 1;
98
- return e.forEach((r, a) => {
99
- n[r.depth] = n[r.depth] || [];
100
- let d = !1;
101
- n[r.depth].length === 0 && (f <= 1 ? f = 1 + (r.children.length > 0 ? 0 : i - r.depth) : (f--, d = !0)), r.rowSpan = 1 + (r.children.length > 0 ? 0 : i - r.depth), r.kFirst = d, r.index = n[r.depth].length, n[r.depth].push(a), r.ariaColumnIndex = l[r.depth] ? l[r.depth] + 1 : 1;
102
- for (let o = r.depth; o < r.depth + r.rowSpan; o++)
103
- l[o] = (l[o] || 0) + r.headerColSpan;
104
- }), E(n, e, t), M(n, e, t), n;
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, n, i = 0) {
107
- const l = [];
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.filter((a) => a && a.props ? !a.props.hidden : !a.hidden).forEach((a, d) => {
111
+ e && e.length === void 0 && (e = [e]), e.forEach((a, l) => {
111
112
  a = a.props ? a.props : a;
112
- const o = t[d] || null, s = j(
113
- a.children,
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
- s.length ? { cell: () => null, filterCell: () => null } : {},
123
- o ? { width: o.width, orderIndex: o.orderIndex } : {},
118
+ C.length ? { cell: () => null, filterCell: () => null } : {},
124
119
  a,
125
120
  {
126
- id: a.id ? a.id : m.generateNavigatableId(`${n.prevId++}`, n.idPrefix, "column"),
127
- declarationIndex: l.length,
128
- children: s,
129
- headerColSpan: a.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
- left: a.lockedColumn ? o && Math.floor(o.left) : null,
135
- right: a.lockedColumn ? o && Math.floor(o.right) : null,
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 r = (a, d) => a.orderIndex === d.orderIndex ? a.declarationIndex - d.declarationIndex : (a.orderIndex || 0) - (d.orderIndex || 0);
142
- if (l.sort(r), i === 0) {
143
- const a = [], d = (o, s) => o.forEach((c) => {
144
- c.parentIndex = s, d(c.children, a.push(c) - 1);
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(l, -1), a;
143
+ return l(d, -1), a;
147
144
  }
148
- return l;
145
+ return d;
149
146
  }
150
- const k = (e) => Array.isArray(e) ? e : e ? e.data : [];
151
- function J(e, t, n, i) {
152
- const l = k(e), f = [];
153
- if (l.length > 0) {
154
- let r = l[0];
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 d = 0; d < t.length; d++)
157
- r = r.items && r.items[0];
158
- Object.getOwnPropertyNames(r).forEach((d) => {
159
- d !== n.column && f.push(
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: m.generateNavigatableId(`${i.prevId++}`, i.idPrefix, "column"),
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: d }
176
+ { field: l }
180
177
  )
181
178
  );
182
179
  });
183
180
  }
184
- return f;
181
+ return d;
185
182
  }
186
- const p = (e, t) => {
187
- let n = e[t.parentIndex];
188
- for (; n; ) {
189
- if (n.footerCell)
183
+ const O = (e, t) => {
184
+ let r = e[t.parentIndex];
185
+ for (; r; ) {
186
+ if (r.footerCell)
190
187
  return !0;
191
- n = e[n.parentIndex];
188
+ r = e[r.parentIndex];
192
189
  }
193
190
  return !1;
194
- }, K = (e) => e.filter((t) => p(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), Q = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, U = (e, t) => t && t.filter((n) => n.field === e).length > 0, F = (e) => (e.sort((t, n) => t.declarationIndex - n.declarationIndex), e.map((t) => {
195
- const { declarationIndex: n, parentIndex: i, depth: l, headerColSpan: f, rowSpan: r, index: a, kFirst: d, children: o, ...s } = t;
196
- return o.length ? {
197
- children: F(o),
198
- ...s
199
- } : s;
200
- })), R = (e) => {
201
- const { filterCell: t, headerCell: n, footerCell: i, cells: l, cell: f, rowSpannable: r, ...a } = e;
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(R)
201
+ children: e.children.map(N)
205
202
  } : a;
206
- }, X = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), Y = 17895697, Z = (e) => {
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
- }, _ = (e) => {
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
- }, G = (e, t) => {
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
- }, P = (e) => {
243
- var n;
244
- return typeof e == "object" ? (n = e.enabled) != null ? n : !0 : e != null ? e : !1;
245
- }, ee = () => D === T, te = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), re = (e) => ({
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
- }), ne = (e) => {
272
- var i, l;
273
- const t = typeof e == "object" ? (i = e.enabled) != null ? i : !0 : e != null ? e : !1, n = typeof e == "object" ? (l = e.valueGetter) != null ? l : (f, r) => u(r)(f) : (f, r) => u(r)(f);
274
- return { enabled: t, valueGetter: n };
275
- }, N = (e) => {
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 y.isValidElement(e) ? e : (t = y.Children.toArray(e)) == null ? void 0 : t[0];
278
- }, ae = (e, t) => {
279
- const n = N(e);
280
- return n ? y.cloneElement(n, t) : null;
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
- J as autoGenerateColumns,
284
- R as clientColumn,
285
- ae as cloneReactElement,
286
- X as firefox,
287
- Y as firefoxMaxHeight,
288
- B as flatData,
289
- K as footerColumns,
290
- re as getClientCellProps,
291
- z as getColSpan,
292
- Q as getColumnWidth,
293
- k as getDataAsArray,
294
- _ as getDefaultBodyContextMenuItems,
295
- Z as getDefaultHeadContextMenuItems,
296
- w as getNestedValue,
297
- N as getReactElement,
298
- ne as getRowSpanOptions,
299
- ee as isClient,
300
- te as isClientReference,
301
- P as isRowReorderEnabled,
302
- U as isSorted,
303
- W as mapColumns,
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
- G as resolveCells,
306
- F as sanitizeColumns
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"),c=require("../paging/GridPagerSettings.js");function s(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=s(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==="checkbox"?!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&&c.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,pager:!!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;
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 c = (e) => ({
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
- columnCellTemplate: e.some((l) => l.columnType === "checkbox" ? !1 : l.cells || l.cell || l.headerCell || l.footerCell || l.filterCell)
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
- pager: !!e.pager,
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 = {