@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.
@@ -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 p=1,u=20;class g{constructor(f){this.columns=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=c=>{this.isRtl=c},this.dragHandler=(c,n,e,r)=>{const t=c.originalEvent;r||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation());const o=e.closest("th");if(!o||!o)return;const s=o.clientWidth;let l=s;if(this.isRtl?l+=e.getBoundingClientRect().right-e.offsetWidth/2-c.clientX:l+=c.clientX-e.getBoundingClientRect().left-e.offsetWidth/2,!r&&Math.abs(l-s)<1)return;this.fixateInitialWidths(o.parentElement.clientWidth),this.setWidths(n,Math.floor(l)/s);const d=this.columns.filter(i=>!i.children.length).findIndex(i=>i.id===n.id);this.onResize(d,s,l,t,r,n.id)},this.dblClickHandler=(c,n)=>{const e=this.columns.filter(h=>n.indexOf(h.id)>-1);if(!this.colGroupMain||!e.length)return;const r={},t=e;for(;t.length>0;){const h=t.pop();if(!h)break;h.children.length?t.push(...h.children):r[h.id]=h}const o=this.columns.filter(h=>!h.children.length),s=[];o.forEach((h,a)=>{r[h.id]&&s.push(a)});const l=[this.colGroupMain.parentElement],d=[this.colGroupMain];this.colGroupHeader&&(l.push(this.colGroupHeader.parentElement),d.push(this.colGroupHeader)),this.colGroupFooter&&(l.push(this.colGroupFooter.parentElement),d.push(this.colGroupFooter)),l.forEach(h=>h.classList.add("k-autofitting"));const i=[];d.forEach(h=>{s.forEach(a=>{h.children[a]&&(h.children[a].width="",i[a]=Math.max(i[a]||0,h.children[a].offsetWidth+p))})}),d.forEach(h=>{s.forEach(a=>{h.children[a]&&(h.children[a].width=i[a]+"px",o[a].width=i[a])})}),l.forEach(h=>h.classList.remove("k-autofitting")),this.onResize(s[0],0,0,c,!0,n[0])},this.updateColElements=c=>{const n=this.columns.filter(r=>!r.children.length);let e=1e-10;for(let r=0;r<c.length;r++){const t=c[r],o=n.findIndex(i=>i.id===t.id),s=parseFloat((t.width||0).toString()),l=Math.floor(s);e+=s-l;const d=l+Math.floor(e);if(e-=Math.floor(e),this.colGroupMain&&this.colGroupMain.children[o]){const i=parseInt(this.colGroupMain.children[o].width,10);this.colGroupMain.children[o].width=d+"px",this.updateNextLockedCol(this.colGroupMain.parentElement,t,i-d)}if(this.colGroupHeader&&this.colGroupHeader.children[o]){const i=parseInt(this.colGroupHeader.children[o].width,10);this.colGroupHeader.children[o].width=d+"px",this.updateNextLockedCol(this.colGroupHeader.parentElement,t,i-d)}if(this.colGroupFooter&&this.colGroupFooter.children[o]){const i=parseInt(this.colGroupFooter.children[o].width,10);this.colGroupFooter.children[o].width=d+"px",this.updateNextLockedCol(this.colGroupFooter.parentElement,t,i-d)}}},this.onResize=f}fixateInitialWidths(f){const c=this.columns.filter(t=>!t.children.length);let n=0;const e=this.colGroupMain?this.colGroupMain.children:[];for(let t=0;t<e.length;t++)e[t].width?f-=parseFloat(e[t].width):n++;if(n===0)return;const r=Math.floor(f/n);for(let t=0;t<e.length;t++){const o=e[t];o.width||(o.width=r,c[t].width=r.toString(),this.colGroupHeader&&(this.colGroupHeader.children[t].width=r),this.colGroupFooter&&(this.colGroupFooter.children[t].width=r))}}setWidths(f,c){const n=this.columns.findIndex(t=>t.id===f.id),e=[];let r=f.children.length;for(let t=n+1;t<this.columns.length&&!(r<=0);t++){const o=this.columns[t];o.children.length?r+=o.children.length:e.push(o),r--}return e.length===0&&e.push(f),e.forEach(t=>{let o=t.width?parseFloat(t.width.toString())*c:0;const s=t.minResizableWidth===void 0?10:t.minResizableWidth;o<s&&(o=s),t.width=o}),this.updateColElements(e),e}updateNextLockedCol(f,c,n){const e=c.index,r=this.colGroupMain.parentElement.closest(".k-grid"),t=r==null?void 0:r.clientWidth,o=this.columns.filter(s=>s.locked).map(s=>parseInt(s.width+"",10)).reduce((s,l)=>s+l,0);!c.locked||t<=o+u||this.columns.forEach(s=>{if(s!=null&&s.locked&&n){const l=f==null?void 0:f.querySelectorAll('[aria-colindex="'+s.ariaColumnIndex+'"]');l==null||l.forEach(d=>{const i=d.style;this.isRtl?(s.index>e&&i&&i.right&&(i.right=parseInt(i.right,10)-n+"px"),s.index<e&&i&&i.left&&(i.left=parseInt(i.left,10)-n+"px")):(s.index>e&&i&&i.left&&(i.left=parseInt(i.left,10)-n+"px"),s.index<e&&i&&i.right&&(i.right=parseInt(i.right,10)-n+"px"))})}})}}exports.ColumnResize=g;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../utils/index.js"),G=1,w=20;class F{constructor(u){this.columns=[],this.columnsState=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=c=>{this.isRtl=c},this.initWidths=()=>{var r;const c=((r=this.colGroupMain)==null?void 0:r.children)||[],l=p.getFlatColumnsState(this.columnsState),h=this.columns.filter(s=>{var o;return!((o=s.children)!=null&&o.length)});for(let s=0;s<c.length;s++){const o=c[s];let t="";const i=l.find(n=>n.id===h[s].id);i&&(t=i.width||""),o.width=t,this.colGroupHeader&&(this.colGroupHeader.children[s].width=t),this.colGroupFooter&&(this.colGroupFooter.children[s].width=t)}},this.dragHandler=(c,l,h,r)=>{const s=c.originalEvent;r||(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation());const o=h.closest("th");if(!o||!o)return;const t=o.clientWidth;let i=t;if(this.isRtl?i+=h.getBoundingClientRect().right-h.offsetWidth/2-c.clientX:i+=c.clientX-h.getBoundingClientRect().left-h.offsetWidth/2,!r&&Math.abs(i-t)<1)return;this.fixateInitialWidths(o.parentElement.clientWidth),this.setWidths(l,Math.floor(i)/t);const n=this.columns.filter(e=>!e.children.length).findIndex(e=>e.id===l.id);this.onResize(n,t,i,s,r,this.columnsState,l.id)},this.dblClickHandler=(c,l)=>{const h=this.columns.filter(d=>l.indexOf(d.id)>-1),r=p.getFlatColumnsState(this.columnsState);if(!this.colGroupMain||!h.length)return;const s={},o=h;for(;o.length>0;){const d=o.pop();if(!d)break;d.children.length?o.push(...d.children):s[d.id]=d}const t=this.columns.filter(d=>!d.children.length),i=[];t.forEach((d,f)=>{s[d.id]&&i.push(f)});const n=[this.colGroupMain.parentElement],e=[this.colGroupMain];this.colGroupHeader&&(n.push(this.colGroupHeader.parentElement),e.push(this.colGroupHeader)),this.colGroupFooter&&(n.push(this.colGroupFooter.parentElement),e.push(this.colGroupFooter)),n.forEach(d=>d.classList.add("k-autofitting"));const a=[];e.forEach(d=>{i.forEach(f=>{d.children[f]&&(d.children[f].width="",a[f]=Math.max(a[f]||0,d.children[f].offsetWidth+G))})}),e.forEach(d=>{i.forEach(f=>{if(d.children[f]){d.children[f].width=a[f]+"px";const g=r.find(m=>m.id===t[f].id);g&&(g.width=a[f])}})}),n.forEach(d=>d.classList.remove("k-autofitting")),this.onResize(i[0],0,0,c,!0,this.columnsState,l[0])},this.updateColElements=c=>{const l=this.columns.filter(r=>!r.hidden&&!r.children.length);let h=1e-10;for(let r=0;r<c.length;r++){const s=c[r],o=l.findIndex(a=>a.id===s.id),t=parseFloat((s.width||0).toString()),i=Math.floor(t);h+=t-i;const n=i+Math.floor(h);h-=Math.floor(h);const e=l.find(a=>a.id===s.id);if(!e)return;if(this.colGroupMain&&this.colGroupMain.children[o]){const a=parseInt(this.colGroupMain.children[o].width,10);this.colGroupMain.children[o].width=n+"px",this.updateNextLockedCol(this.colGroupMain.parentElement,e,a-n)}if(this.colGroupHeader&&this.colGroupHeader.children[o]){const a=parseInt(this.colGroupHeader.children[o].width,10);this.colGroupHeader.children[o].width=n+"px",this.updateNextLockedCol(this.colGroupHeader.parentElement,e,a-n)}if(this.colGroupFooter&&this.colGroupFooter.children[o]){const a=parseInt(this.colGroupFooter.children[o].width,10);this.colGroupFooter.children[o].width=n+"px",this.updateNextLockedCol(this.colGroupFooter.parentElement,e,a-n)}}},this.onResize=u}fixateInitialWidths(u){var o;let c=0;const l=((o=this.colGroupMain)==null?void 0:o.children)||[];for(let t=0;t<l.length;t++)l[t].width?u-=parseFloat(l[t].width):c++;if(c===0)return;const h=Math.floor(u/c),r=p.getFlatColumnsState(this.columnsState),s=this.columns.filter(t=>!t.children.length);for(let t=0;t<l.length;t++){const i=l[t];if(!i.width){i.width=h;const n=r.find(e=>e.id===s[t].id);n&&(n.width=h.toString()),this.colGroupHeader&&(this.colGroupHeader.children[t].width=h),this.colGroupFooter&&(this.colGroupFooter.children[t].width=h)}}}setWidths(u,c){const l=p.getFlatColumnsState(this.columnsState),h=this.columns.findIndex(t=>t.id===u.id),r=[];let s=u.children.filter(t=>!t.hidden).length;for(let t=h+1;t<this.columns.length&&!(s<=0);t++){const i=this.columns[t];i.children.length?s+=i.children.filter(n=>!n.hidden).length:r.push(i),s--}r.length===0&&r.push(u);const o=[];r.forEach(t=>{const i=l.find(n=>n.id===t.id);if(i){let n=i.width?parseFloat(i.width.toString())*c:0;const e=t.minResizableWidth===void 0?10:t.minResizableWidth;n<e&&(n=e),i.width=n,o.push(i)}}),this.updateColElements(o)}updateNextLockedCol(u,c,l){const h=c.index,r=this.colGroupMain.parentElement.closest(".k-grid"),s=r==null?void 0:r.clientWidth,o=this.columns.filter(t=>t.locked).map(t=>parseInt(t.width+"",10)).reduce((t,i)=>t+i,0);!c.locked||s<=o+w||this.columns.forEach(t=>{if(t!=null&&t.locked&&l){const i=u==null?void 0:u.querySelectorAll('[aria-colindex="'+t.ariaColumnIndex+'"]');i==null||i.forEach(n=>{const e=n.style;this.isRtl?(t.index>h&&e&&e.right&&(e.right=parseInt(e.right,10)-l+"px"),t.index<h&&e&&e.left&&(e.left=parseInt(e.left,10)-l+"px")):(t.index>h&&e&&e.left&&(e.left=parseInt(e.left,10)-l+"px"),t.index<h&&e&&e.right&&(e.right=parseInt(e.right,10)-l+"px"))})}})}}exports.ColumnResize=F;
@@ -5,115 +5,146 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- class u {
9
- constructor(f) {
10
- this.columns = [], this.resizable = !1, this.isRtl = !1, this.setIsRtl = (c) => {
8
+ import { getFlatColumnsState as u } from "../utils/index.mjs";
9
+ const m = 1, w = 20;
10
+ class E {
11
+ constructor(p) {
12
+ this.columns = [], this.columnsState = [], this.resizable = !1, this.isRtl = !1, this.setIsRtl = (c) => {
11
13
  this.isRtl = c;
12
- }, this.dragHandler = (c, n, e, r) => {
13
- const t = c.originalEvent;
14
- r || (t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation());
15
- const o = e.closest("th");
14
+ }, this.initWidths = () => {
15
+ var r;
16
+ const c = ((r = this.colGroupMain) == null ? void 0 : r.children) || [], l = u(this.columnsState), n = this.columns.filter((s) => {
17
+ var o;
18
+ return !((o = s.children) != null && o.length);
19
+ });
20
+ for (let s = 0; s < c.length; s++) {
21
+ const o = c[s];
22
+ let t = "";
23
+ const i = l.find((h) => h.id === n[s].id);
24
+ i && (t = i.width || ""), o.width = t, this.colGroupHeader && (this.colGroupHeader.children[s].width = t), this.colGroupFooter && (this.colGroupFooter.children[s].width = t);
25
+ }
26
+ }, this.dragHandler = (c, l, n, r) => {
27
+ const s = c.originalEvent;
28
+ r || (s.preventDefault(), s.stopPropagation(), s.stopImmediatePropagation());
29
+ const o = n.closest("th");
16
30
  if (!o || !o)
17
31
  return;
18
- const s = o.clientWidth;
19
- let l = s;
20
- if (this.isRtl ? l += e.getBoundingClientRect().right - e.offsetWidth / 2 - c.clientX : l += c.clientX - e.getBoundingClientRect().left - e.offsetWidth / 2, !r && Math.abs(l - s) < 1)
32
+ const t = o.clientWidth;
33
+ let i = t;
34
+ if (this.isRtl ? i += n.getBoundingClientRect().right - n.offsetWidth / 2 - c.clientX : i += c.clientX - n.getBoundingClientRect().left - n.offsetWidth / 2, !r && Math.abs(i - t) < 1)
21
35
  return;
22
- this.fixateInitialWidths(o.parentElement.clientWidth), this.setWidths(n, Math.floor(l) / s);
23
- const d = this.columns.filter((i) => !i.children.length).findIndex((i) => i.id === n.id);
24
- this.onResize(d, s, l, t, r, n.id);
25
- }, this.dblClickHandler = (c, n) => {
26
- const e = this.columns.filter((h) => n.indexOf(h.id) > -1);
27
- if (!this.colGroupMain || !e.length)
36
+ this.fixateInitialWidths(o.parentElement.clientWidth), this.setWidths(l, Math.floor(i) / t);
37
+ const h = this.columns.filter((e) => !e.children.length).findIndex((e) => e.id === l.id);
38
+ this.onResize(h, t, i, s, r, this.columnsState, l.id);
39
+ }, this.dblClickHandler = (c, l) => {
40
+ const n = this.columns.filter((d) => l.indexOf(d.id) > -1), r = u(this.columnsState);
41
+ if (!this.colGroupMain || !n.length)
28
42
  return;
29
- const r = {}, t = e;
30
- for (; t.length > 0; ) {
31
- const h = t.pop();
32
- if (!h)
43
+ const s = {}, o = n;
44
+ for (; o.length > 0; ) {
45
+ const d = o.pop();
46
+ if (!d)
33
47
  break;
34
- h.children.length ? t.push(...h.children) : r[h.id] = h;
48
+ d.children.length ? o.push(...d.children) : s[d.id] = d;
35
49
  }
36
- const o = this.columns.filter((h) => !h.children.length), s = [];
37
- o.forEach((h, a) => {
38
- r[h.id] && s.push(a);
50
+ const t = this.columns.filter((d) => !d.children.length), i = [];
51
+ t.forEach((d, f) => {
52
+ s[d.id] && i.push(f);
39
53
  });
40
- const l = [this.colGroupMain.parentElement], d = [this.colGroupMain];
41
- this.colGroupHeader && (l.push(this.colGroupHeader.parentElement), d.push(this.colGroupHeader)), this.colGroupFooter && (l.push(this.colGroupFooter.parentElement), d.push(this.colGroupFooter)), l.forEach((h) => h.classList.add("k-autofitting"));
42
- const i = [];
43
- d.forEach((h) => {
44
- s.forEach((a) => {
45
- h.children[a] && (h.children[a].width = "", i[a] = Math.max(
46
- i[a] || 0,
47
- h.children[a].offsetWidth + 1
54
+ const h = [this.colGroupMain.parentElement], e = [this.colGroupMain];
55
+ this.colGroupHeader && (h.push(this.colGroupHeader.parentElement), e.push(this.colGroupHeader)), this.colGroupFooter && (h.push(this.colGroupFooter.parentElement), e.push(this.colGroupFooter)), h.forEach((d) => d.classList.add("k-autofitting"));
56
+ const a = [];
57
+ e.forEach((d) => {
58
+ i.forEach((f) => {
59
+ d.children[f] && (d.children[f].width = "", a[f] = Math.max(
60
+ a[f] || 0,
61
+ d.children[f].offsetWidth + m
48
62
  ));
49
63
  });
50
- }), d.forEach((h) => {
51
- s.forEach((a) => {
52
- h.children[a] && (h.children[a].width = i[a] + "px", o[a].width = i[a]);
64
+ }), e.forEach((d) => {
65
+ i.forEach((f) => {
66
+ if (d.children[f]) {
67
+ d.children[f].width = a[f] + "px";
68
+ const g = r.find((G) => G.id === t[f].id);
69
+ g && (g.width = a[f]);
70
+ }
53
71
  });
54
- }), l.forEach((h) => h.classList.remove("k-autofitting")), this.onResize(s[0], 0, 0, c, !0, n[0]);
72
+ }), h.forEach((d) => d.classList.remove("k-autofitting")), this.onResize(i[0], 0, 0, c, !0, this.columnsState, l[0]);
55
73
  }, this.updateColElements = (c) => {
56
- const n = this.columns.filter((r) => !r.children.length);
57
- let e = 1e-10;
74
+ const l = this.columns.filter((r) => !r.hidden && !r.children.length);
75
+ let n = 1e-10;
58
76
  for (let r = 0; r < c.length; r++) {
59
- const t = c[r], o = n.findIndex((i) => i.id === t.id), s = parseFloat((t.width || 0).toString()), l = Math.floor(s);
60
- e += s - l;
61
- const d = l + Math.floor(e);
62
- if (e -= Math.floor(e), this.colGroupMain && this.colGroupMain.children[o]) {
63
- const i = parseInt(this.colGroupMain.children[o].width, 10);
64
- this.colGroupMain.children[o].width = d + "px", this.updateNextLockedCol(this.colGroupMain.parentElement, t, i - d);
77
+ const s = c[r], o = l.findIndex((a) => a.id === s.id), t = parseFloat((s.width || 0).toString()), i = Math.floor(t);
78
+ n += t - i;
79
+ const h = i + Math.floor(n);
80
+ n -= Math.floor(n);
81
+ const e = l.find((a) => a.id === s.id);
82
+ if (!e)
83
+ return;
84
+ if (this.colGroupMain && this.colGroupMain.children[o]) {
85
+ const a = parseInt(this.colGroupMain.children[o].width, 10);
86
+ this.colGroupMain.children[o].width = h + "px", this.updateNextLockedCol(this.colGroupMain.parentElement, e, a - h);
65
87
  }
66
88
  if (this.colGroupHeader && this.colGroupHeader.children[o]) {
67
- const i = parseInt(this.colGroupHeader.children[o].width, 10);
68
- this.colGroupHeader.children[o].width = d + "px", this.updateNextLockedCol(this.colGroupHeader.parentElement, t, i - d);
89
+ const a = parseInt(this.colGroupHeader.children[o].width, 10);
90
+ this.colGroupHeader.children[o].width = h + "px", this.updateNextLockedCol(this.colGroupHeader.parentElement, e, a - h);
69
91
  }
70
92
  if (this.colGroupFooter && this.colGroupFooter.children[o]) {
71
- const i = parseInt(this.colGroupFooter.children[o].width, 10);
72
- this.colGroupFooter.children[o].width = d + "px", this.updateNextLockedCol(this.colGroupFooter.parentElement, t, i - d);
93
+ const a = parseInt(this.colGroupFooter.children[o].width, 10);
94
+ this.colGroupFooter.children[o].width = h + "px", this.updateNextLockedCol(this.colGroupFooter.parentElement, e, a - h);
73
95
  }
74
96
  }
75
- }, this.onResize = f;
97
+ }, this.onResize = p;
76
98
  }
77
- fixateInitialWidths(f) {
78
- const c = this.columns.filter((t) => !t.children.length);
79
- let n = 0;
80
- const e = this.colGroupMain ? this.colGroupMain.children : [];
81
- for (let t = 0; t < e.length; t++)
82
- e[t].width ? f -= parseFloat(e[t].width) : n++;
83
- if (n === 0)
99
+ fixateInitialWidths(p) {
100
+ var o;
101
+ let c = 0;
102
+ const l = ((o = this.colGroupMain) == null ? void 0 : o.children) || [];
103
+ for (let t = 0; t < l.length; t++)
104
+ l[t].width ? p -= parseFloat(l[t].width) : c++;
105
+ if (c === 0)
84
106
  return;
85
- const r = Math.floor(f / n);
86
- for (let t = 0; t < e.length; t++) {
87
- const o = e[t];
88
- o.width || (o.width = r, c[t].width = r.toString(), this.colGroupHeader && (this.colGroupHeader.children[t].width = r), this.colGroupFooter && (this.colGroupFooter.children[t].width = r));
107
+ const n = Math.floor(p / c), r = u(this.columnsState), s = this.columns.filter((t) => !t.children.length);
108
+ for (let t = 0; t < l.length; t++) {
109
+ const i = l[t];
110
+ if (!i.width) {
111
+ i.width = n;
112
+ const h = r.find((e) => e.id === s[t].id);
113
+ h && (h.width = n.toString()), this.colGroupHeader && (this.colGroupHeader.children[t].width = n), this.colGroupFooter && (this.colGroupFooter.children[t].width = n);
114
+ }
89
115
  }
90
116
  }
91
- setWidths(f, c) {
92
- const n = this.columns.findIndex((t) => t.id === f.id), e = [];
93
- let r = f.children.length;
94
- for (let t = n + 1; t < this.columns.length && !(r <= 0); t++) {
95
- const o = this.columns[t];
96
- o.children.length ? r += o.children.length : e.push(o), r--;
117
+ setWidths(p, c) {
118
+ const l = u(this.columnsState), n = this.columns.findIndex((t) => t.id === p.id), r = [];
119
+ let s = p.children.filter((t) => !t.hidden).length;
120
+ for (let t = n + 1; t < this.columns.length && !(s <= 0); t++) {
121
+ const i = this.columns[t];
122
+ i.children.length ? s += i.children.filter((h) => !h.hidden).length : r.push(i), s--;
97
123
  }
98
- return e.length === 0 && e.push(f), e.forEach((t) => {
99
- let o = t.width ? parseFloat(t.width.toString()) * c : 0;
100
- const s = t.minResizableWidth === void 0 ? 10 : t.minResizableWidth;
101
- o < s && (o = s), t.width = o;
102
- }), this.updateColElements(e), e;
124
+ r.length === 0 && r.push(p);
125
+ const o = [];
126
+ r.forEach((t) => {
127
+ const i = l.find((h) => h.id === t.id);
128
+ if (i) {
129
+ let h = i.width ? parseFloat(i.width.toString()) * c : 0;
130
+ const e = t.minResizableWidth === void 0 ? 10 : t.minResizableWidth;
131
+ h < e && (h = e), i.width = h, o.push(i);
132
+ }
133
+ }), this.updateColElements(o);
103
134
  }
104
- updateNextLockedCol(f, c, n) {
105
- const e = c.index, r = this.colGroupMain.parentElement.closest(".k-grid"), t = r == null ? void 0 : r.clientWidth, o = this.columns.filter((s) => s.locked).map((s) => parseInt(s.width + "", 10)).reduce((s, l) => s + l, 0);
106
- !c.locked || t <= o + 20 || this.columns.forEach((s) => {
107
- if (s != null && s.locked && n) {
108
- const l = f == null ? void 0 : f.querySelectorAll('[aria-colindex="' + s.ariaColumnIndex + '"]');
109
- l == null || l.forEach((d) => {
110
- const i = d.style;
111
- this.isRtl ? (s.index > e && i && i.right && (i.right = parseInt(i.right, 10) - n + "px"), s.index < e && i && i.left && (i.left = parseInt(i.left, 10) - n + "px")) : (s.index > e && i && i.left && (i.left = parseInt(i.left, 10) - n + "px"), s.index < e && i && i.right && (i.right = parseInt(i.right, 10) - n + "px"));
135
+ updateNextLockedCol(p, c, l) {
136
+ const n = c.index, r = this.colGroupMain.parentElement.closest(".k-grid"), s = r == null ? void 0 : r.clientWidth, o = this.columns.filter((t) => t.locked).map((t) => parseInt(t.width + "", 10)).reduce((t, i) => t + i, 0);
137
+ !c.locked || s <= o + w || this.columns.forEach((t) => {
138
+ if (t != null && t.locked && l) {
139
+ const i = p == null ? void 0 : p.querySelectorAll('[aria-colindex="' + t.ariaColumnIndex + '"]');
140
+ i == null || i.forEach((h) => {
141
+ const e = h.style;
142
+ this.isRtl ? (t.index > n && e && e.right && (e.right = parseInt(e.right, 10) - l + "px"), t.index < n && e && e.left && (e.left = parseInt(e.left, 10) - l + "px")) : (t.index > n && e && e.left && (e.left = parseInt(e.left, 10) - l + "px"), t.index < n && e && e.right && (e.right = parseInt(e.right, 10) - l + "px"));
112
143
  });
113
144
  }
114
145
  });
115
146
  }
116
147
  }
117
148
  export {
118
- u as ColumnResize
149
+ E as ColumnResize
119
150
  };
package/index.d.mts CHANGED
@@ -1242,6 +1242,14 @@ export declare interface GridColumnState {
1242
1242
  * The value indicating whether a column is visible or not.
1243
1243
  */
1244
1244
  hidden?: boolean;
1245
+ /**
1246
+ * The width of the column (in pixels).
1247
+ */
1248
+ width?: string | number;
1249
+ /**
1250
+ * The position of the column.
1251
+ */
1252
+ orderIndex?: number;
1245
1253
  /**
1246
1254
  * A collection of child states.
1247
1255
  */
package/index.d.ts CHANGED
@@ -1242,6 +1242,14 @@ export declare interface GridColumnState {
1242
1242
  * The value indicating whether a column is visible or not.
1243
1243
  */
1244
1244
  hidden?: boolean;
1245
+ /**
1246
+ * The width of the column (in pixels).
1247
+ */
1248
+ width?: string | number;
1249
+ /**
1250
+ * The position of the column.
1251
+ */
1252
+ orderIndex?: number;
1245
1253
  /**
1246
1254
  * A collection of child states.
1247
1255
  */
@@ -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 e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741187343,version:"10.0.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741335179,version:"10.0.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1741187343,
14
- version: "10.0.0-develop.2",
13
+ publishDate: 1741335179,
14
+ version: "10.0.0-develop.4",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-grid",
3
- "version": "10.0.0-develop.2",
3
+ "version": "10.0.0-develop.4",
4
4
  "description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -28,17 +28,17 @@
28
28
  "@progress/kendo-data-query": "^1.0.0",
29
29
  "@progress/kendo-drawing": "^1.21.2",
30
30
  "@progress/kendo-licensing": "^1.5.0",
31
- "@progress/kendo-react-animation": "10.0.0-develop.2",
32
- "@progress/kendo-react-buttons": "10.0.0-develop.2",
33
- "@progress/kendo-react-common": "10.0.0-develop.2",
34
- "@progress/kendo-react-data-tools": "10.0.0-develop.2",
35
- "@progress/kendo-react-dateinputs": "10.0.0-develop.2",
36
- "@progress/kendo-react-indicators": "10.0.0-develop.2",
37
- "@progress/kendo-react-dropdowns": "10.0.0-develop.2",
38
- "@progress/kendo-react-inputs": "10.0.0-develop.2",
39
- "@progress/kendo-react-intl": "10.0.0-develop.2",
40
- "@progress/kendo-react-popup": "10.0.0-develop.2",
41
- "@progress/kendo-react-layout": "10.0.0-develop.2",
31
+ "@progress/kendo-react-animation": "10.0.0-develop.4",
32
+ "@progress/kendo-react-buttons": "10.0.0-develop.4",
33
+ "@progress/kendo-react-common": "10.0.0-develop.4",
34
+ "@progress/kendo-react-data-tools": "10.0.0-develop.4",
35
+ "@progress/kendo-react-dateinputs": "10.0.0-develop.4",
36
+ "@progress/kendo-react-indicators": "10.0.0-develop.4",
37
+ "@progress/kendo-react-dropdowns": "10.0.0-develop.4",
38
+ "@progress/kendo-react-inputs": "10.0.0-develop.4",
39
+ "@progress/kendo-react-intl": "10.0.0-develop.4",
40
+ "@progress/kendo-react-popup": "10.0.0-develop.4",
41
+ "@progress/kendo-react-layout": "10.0.0-develop.4",
42
42
  "@progress/kendo-svg-icons": "^4.0.0",
43
43
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
44
44
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -84,7 +84,7 @@
84
84
  "package": {
85
85
  "productName": "KendoReact",
86
86
  "productCode": "KENDOUIREACT",
87
- "publishDate": 1741187343,
87
+ "publishDate": 1741335179,
88
88
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
89
89
  }
90
90
  },
package/utils/index.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 T=require("react"),b=require("../GridColumn.js"),y=require("@progress/kendo-data-query"),m=require("@progress/kendo-react-data-tools"),O=require("./_serverModule.js"),j=require("./_clientModule.js"),u=require("../contextMenu/enums.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=p(T);function M(e,t){const r=(e!=null?e:"").split(".");let i=t;return r.forEach(o=>{i=i?i[o]:void 0}),i}function w(e,t,r,i,o,s,n,a,d,l,c=0,f){var v;let C=c;for(let h=0;h<t.length;h++){let I;if(!o||t[h].value===void 0||t[h].items===void 0){e[e.length]={dataIndex:i.index,dataItem:t[h],rowType:"data",level:c,group:f,expanded:(v=s?M(s,t[h]):l&&!!(n!=null&&n[y.getter(l)(t[h])]))!=null?v:!1},i.index++;continue}else{let x;f!=null&&f.parents?x=[{field:f.field,value:f.value},...f.parents]:f?x=[f]:x=[],I={field:t[h].field,value:t[h].value,parents:x}}C=Math.max(C,c+1);let g=!1;if(s)g=M(s,t[h])!==!1;else{const x=m.findGroupExpand(a||[],I);x?g=x.expanded!==!1:g=d!==!1}e[e.length]={dataIndex:-1,dataItem:t[h],level:c,group:I,rowType:"groupHeader",expanded:g},g&&(I.expanded=g,C=Math.max(w(e,t[h].items,r,i,o,s,n,a,d,l,c+1,I),C)),(r==="always"||g&&r==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[h],rowType:"groupFooter",level:c,expanded:g})}return C}const k=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function G(e,t){const r=[[]];let i=0;for(let n=e.length-1;n>=0;n--)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((a,d)=>d.hidden?a:a+d.headerColSpan,0));const o=[];let s=1;return e.forEach((n,a)=>{r[n.depth]=r[n.depth]||[];let d=!1;r[n.depth].length===0&&(s<=1?s=1+(n.children.length>0?0:i-n.depth):(s--,d=!0)),n.rowSpan=1+(n.children.length>0?0:i-n.depth),n.kFirst=d,n.index=r[n.depth].length,r[n.depth].push(a),n.ariaColumnIndex=o[n.depth]?o[n.depth]+1:1;for(let l=n.depth;l<n.depth+n.rowSpan;l++)o[l]=(o[l]||0)+n.headerColSpan}),m.updateLeft(r,e,t),m.updateRight(r,e,t),r}function N(e,t,r,i=0){const o=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.filter(a=>a&&a.props?!a.props.hidden:!a.hidden).forEach((a,d)=>{a=a.props?a.props:a;const l=t[d]||null,c=N(a.children,l&&l.children||[],r,i+1);o.push(Object.assign({depth:i},b.gridDefaultProps,c.length?{cell:()=>null,filterCell:()=>null}:{},l?{width:l.width,orderIndex:l.orderIndex}:{},a,{id:a.id?a.id:m.tableKeyboardNavigationTools.generateNavigatableId(`${r.prevId++}`,r.idPrefix,"column"),declarationIndex:o.length,children:c,headerColSpan:a.headerColSpan,rowSpan:0,columnType:a.columnType||"data",colSpan:a.colSpan||1,isAccessible:!0,left:a.lockedColumn?l&&Math.floor(l.left):null,right:a.lockedColumn?l&&Math.floor(l.right):null,rowSpannable:a.rowSpannable}))});const n=(a,d)=>a.orderIndex===d.orderIndex?a.declarationIndex-d.declarationIndex:(a.orderIndex||0)-(d.orderIndex||0);if(o.sort(n),i===0){const a=[],d=(l,c)=>l.forEach(f=>{f.parentIndex=c,d(f.children,a.push(f)-1)});return d(o,-1),a}return o}const D=e=>Array.isArray(e)?e:e?e.data:[];function q(e,t,r,i){const o=D(e),s=[];if(o.length>0){let n=o[0];if(t)for(let d=0;d<t.length;d++)n=n.items&&n.items[0];Object.getOwnPropertyNames(n).forEach(d=>{d!==r.column&&s.push(Object.assign({id:m.tableKeyboardNavigationTools.generateNavigatableId(`${i.prevId++}`,i.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},b.gridDefaultProps,{field:d}))})}return s}const B=(e,t)=>{let r=e[t.parentIndex];for(;r;){if(r.footerCell)return!0;r=e[r.parentIndex]}return!1},F=e=>e.filter(t=>B(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),H=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,E=e=>(e.sort((t,r)=>t.declarationIndex-r.declarationIndex),e.map(t=>{const{declarationIndex:r,parentIndex:i,depth:o,headerColSpan:s,rowSpan:n,index:a,kFirst:d,children:l,...c}=t;return l.length?{children:E(l),...c}:c})),R=e=>{const{filterCell:t,headerCell:r,footerCell:i,cells:o,cell:s,rowSpannable:n,...a}=e;return e.children.length?{...a,children:e.children.map(R)}:a},$=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),z=17895697,V=e=>{let t=[];return e.sortable&&(t=t.concat([u.GridContextMenuItemNames.sortAsc,u.GridContextMenuItemNames.sortDesc])),t},L=e=>{let t=[];return e.clipboard&&(t=t.concat([u.GridContextMenuItemNames.copySelection,u.GridContextMenuItemNames.copySelectionNoHeaders,u.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([u.GridContextMenuItemNames.separator])),t=t.concat([u.GridContextMenuItemNames.create,u.GridContextMenuItemNames.edit,u.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([u.GridContextMenuItemNames.separator])),t=t.concat([u.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([u.GridContextMenuItemNames.separator])),t=t.concat([u.GridContextMenuItemNames.reorderRow])),t},W=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e},K=e=>{var r;return typeof e=="object"?(r=e.enabled)!=null?r:!0:e!=null?e:!1},Q=()=>O.ServerFragment===j.ClientFragment,J=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),P=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,render:e.render,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),U=e=>{var i,o;const t=typeof e=="object"?(i=e.enabled)!=null?i:!0:e!=null?e:!1,r=typeof e=="object"?(o=e.valueGetter)!=null?o:(s,n)=>y.getter(n)(s):(s,n)=>y.getter(n)(s);return{enabled:t,valueGetter:r}},A=e=>{var t;return S.isValidElement(e)?e:(t=S.Children.toArray(e))==null?void 0:t[0]},X=(e,t)=>{const r=A(e);return r?S.cloneElement(r,t):null};exports.autoGenerateColumns=q;exports.clientColumn=R;exports.cloneReactElement=X;exports.firefox=$;exports.firefoxMaxHeight=z;exports.flatData=w;exports.footerColumns=F;exports.getClientCellProps=P;exports.getColSpan=k;exports.getColumnWidth=H;exports.getDataAsArray=D;exports.getDefaultBodyContextMenuItems=L;exports.getDefaultHeadContextMenuItems=V;exports.getNestedValue=M;exports.getReactElement=A;exports.getRowSpanOptions=U;exports.isClient=Q;exports.isClientReference=J;exports.isRowReorderEnabled=K;exports.isSorted=_;exports.mapColumns=G;exports.readColumns=N;exports.resolveCells=W;exports.sanitizeColumns=E;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),w=require("../GridColumn.js"),S=require("@progress/kendo-data-query"),y=require("@progress/kendo-react-data-tools"),q=require("./_serverModule.js"),G=require("./_clientModule.js"),g=require("../contextMenu/enums.js"),k=require("@progress/kendo-react-common");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=p(j);function v(e,t){const n=(e!=null?e:"").split(".");let i=t;return n.forEach(l=>{i=i?i[l]:void 0}),i}function b(e,t,n,i,l,d,r,a,o,s,h=0,c){var I;let u=h;for(let f=0;f<t.length;f++){let m;if(!l||t[f].value===void 0||t[f].items===void 0){e[e.length]={dataIndex:i.index,dataItem:t[f],rowType:"data",level:h,group:c,expanded:(I=d?v(d,t[f]):s&&!!(r!=null&&r[S.getter(s)(t[f])]))!=null?I:!1},i.index++;continue}else{let C;c!=null&&c.parents?C=[{field:c.field,value:c.value},...c.parents]:c?C=[c]:C=[],m={field:t[f].field,value:t[f].value,parents:C}}u=Math.max(u,h+1);let x=!1;if(d)x=v(d,t[f])!==!1;else{const C=y.findGroupExpand(a||[],m);C?x=C.expanded!==!1:x=o!==!1}e[e.length]={dataIndex:-1,dataItem:t[f],level:h,group:m,rowType:"groupHeader",expanded:x},x&&(m.expanded=x,u=Math.max(b(e,t[f].items,n,i,l,d,r,a,o,s,h+1,m),u)),(n==="always"||x&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[f],rowType:"groupFooter",level:h,expanded:x})}return u}const B=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function F(e,t){const n=[[]];let i=0;for(let r=e.length-1;r>=0;r--)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((a,o)=>o.hidden?a:a+o.headerColSpan,0));const l=[];let d=1;return e.forEach((r,a)=>{n[r.depth]=n[r.depth]||[];let o=!1;n[r.depth].length===0&&(d<=1?d=1+(r.children.length>0?0:i-r.depth):(d--,o=!0)),r.rowSpan=1+(r.children.length>0?0:i-r.depth),r.kFirst=o,r.index=n[r.depth].length,n[r.depth].push(a),r.ariaColumnIndex=l[r.depth]?l[r.depth]+1:1;for(let s=r.depth;s<r.depth+r.rowSpan;s++)l[s]=(l[s]||0)+r.headerColSpan}),y.updateLeft(n,e,t),y.updateRight(n,e,t),n}function N(e,t,n,i=0,l=!1){const d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((a,o)=>{a=a.props?a.props:a;const s=a.id?a.id:y.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),h=k.canUseDOM&&a.media&&window.matchMedia?!window.matchMedia(a.media).matches:!1,c=l||h||a.hidden,u=t==null?void 0:t.find(f=>f.id===s),I=N(a.children,(u==null?void 0:u.children)||[],n,i+1,c);d.push(Object.assign({depth:i},w.gridDefaultProps,I.length?{cell:()=>null,filterCell:()=>null}:{},a,{id:s,declarationIndex:d.length,children:I,headerColSpan:0,rowSpan:0,columnType:a.columnType||"data",colSpan:a.colSpan||1,isAccessible:!0,hidden:c,left:null,right:null,rowSpannable:a.rowSpannable},u?{width:u.width,orderIndex:u.orderIndex}:{}))});const r=(a,o)=>a.orderIndex===o.orderIndex?a.declarationIndex-o.declarationIndex:(a.orderIndex||0)-(o.orderIndex||0);if(d.sort(r),i===0){const a=[],o=(s,h)=>s.forEach(c=>{c.parentIndex=h,o(c.children,a.push(c)-1)});return o(d,-1),a}return d}const D=e=>Array.isArray(e)?e:e?e.data:[];function H(e,t,n,i){const l=D(e),d=[];if(l.length>0){let r=l[0];if(t)for(let o=0;o<t.length;o++)r=r.items&&r.items[0];Object.getOwnPropertyNames(r).forEach(o=>{o!==n.column&&d.push(Object.assign({id:y.tableKeyboardNavigationTools.generateNavigatableId(`${i.prevId++}`,i.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},w.gridDefaultProps,{field:o}))})}return d}const _=(e,t)=>{let n=e[t.parentIndex];for(;n;){if(n.footerCell)return!0;n=e[n.parentIndex]}return!1},$=e=>e.filter(t=>_(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,V=(e,t)=>t&&t.filter(n=>n.field===e).length>0,E=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:i,depth:l,headerColSpan:d,rowSpan:r,index:a,kFirst:o,children:s,...h}=t;return s.length?{children:E(s),...h}:h})),R=e=>{const{filterCell:t,headerCell:n,footerCell:i,cells:l,cell:d,rowSpannable:r,...a}=e;return e.children.length?{...a,children:e.children.map(R)}:a},A=e=>({id:e.id,field:e.field,title:e.title,width:e.width,hidden:!1,children:e.children?O(e.children):null}),O=e=>e.map(A),L=e=>{const t=[],n=i=>i==null?void 0:i.forEach(l=>{t.push(l),n(l.children)});return n(e),t},W=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),K=17895697,Q=e=>{let t=[];return e.sortable&&(t=t.concat([g.GridContextMenuItemNames.sortAsc,g.GridContextMenuItemNames.sortDesc])),t},U=e=>{let t=[];return e.clipboard&&(t=t.concat([g.GridContextMenuItemNames.copySelection,g.GridContextMenuItemNames.copySelectionNoHeaders,g.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.create,g.GridContextMenuItemNames.edit,g.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.reorderRow])),t},J=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e},P=e=>{var n;return typeof e=="object"?(n=e.enabled)!=null?n:!0:e!=null?e:!1},X=()=>q.ServerFragment===G.ClientFragment,Y=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),Z=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,render:e.render,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),ee=e=>{var i,l;const t=typeof e=="object"?(i=e.enabled)!=null?i:!0:e!=null?e:!1,n=typeof e=="object"?(l=e.valueGetter)!=null?l:(d,r)=>S.getter(r)(d):(d,r)=>S.getter(r)(d);return{enabled:t,valueGetter:n}},T=e=>{var t;return M.isValidElement(e)?e:(t=M.Children.toArray(e))==null?void 0:t[0]},te=(e,t)=>{const n=T(e);return n?M.cloneElement(n,t):null};exports.autoGenerateColumns=H;exports.clientColumn=R;exports.cloneReactElement=te;exports.firefox=W;exports.firefoxMaxHeight=K;exports.flatData=b;exports.footerColumns=$;exports.getClientCellProps=Z;exports.getColSpan=B;exports.getColumnState=A;exports.getColumnWidth=z;exports.getColumnsState=O;exports.getDataAsArray=D;exports.getDefaultBodyContextMenuItems=U;exports.getDefaultHeadContextMenuItems=Q;exports.getFlatColumnsState=L;exports.getNestedValue=v;exports.getReactElement=T;exports.getRowSpanOptions=ee;exports.isClient=X;exports.isClientReference=Y;exports.isRowReorderEnabled=P;exports.isSorted=V;exports.mapColumns=F;exports.readColumns=N;exports.resolveCells=J;exports.sanitizeColumns=E;