@progress/kendo-react-grid 16.2.0-develop.2 → 16.2.0-develop.20

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=require("../utils/index.js"),W=1,x=20;class S{constructor(a){this.columns=[],this.columnsState=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=c=>{this.isRtl=c},this.initWidths=()=>{var l;const c=((l=this.colGroupMain)==null?void 0:l.children)||[],o=p.getFlatColumnsState(this.columnsState),n=this.columns.filter(e=>{var r;return!((r=e.children)!=null&&r.length)});for(let e=0;e<c.length;e++){const r=n[e];let t="";const i=o.find(d=>d.id===n[e].id);i&&(t=this.applyWidthConstraints(i,r)),this.colGroups.forEach(d=>{d.children[e].width=t})}},this.dragHandler=(c,o,n,l)=>{const e=c.originalEvent;l||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation());const r=n.closest("th");if(!r)return;const t=r.clientWidth;let i=t;if(this.isRtl?i+=n.getBoundingClientRect().right-n.offsetWidth/2-c.clientX:i+=c.clientX-n.getBoundingClientRect().left-n.offsetWidth/2,!l&&Math.abs(i-t)<1)return;this.fixateInitialWidths(r.parentElement.clientWidth),this.setWidths(o,Math.floor(i)/t);const d=this.columns.filter(s=>!s.children.length).findIndex(s=>s.id===o.id);this.onResize(d,t,i,e,l,this.columnsState,o.id)},this.dblClickHandler=(c,o)=>{const n=this.columns.filter(h=>o.indexOf(h.id)>-1),l=p.getFlatColumnsState(this.columnsState);if(!this.colGroupMain||!n.length)return;const e={},r=n;for(;r.length>0;){const h=r.pop();if(!h)break;h.children.length?r.push(...h.children):e[h.id]=h}const t=this.columns.filter(h=>!h.children.length),i=[];t.forEach((h,u)=>{e[h.id]&&i.push(u)});const d=this.colGroups,s=d.map(h=>h.parentElement);s.forEach(h=>h.classList.add("k-autofitting"));const f=[];d.forEach(h=>{i.forEach(u=>{h.children[u]&&(h.children[u].width="",f[u]=Math.max(f[u]||0,h.children[u].offsetWidth+W))})}),d.forEach(h=>{i.forEach(u=>{if(h.children[u]){h.children[u].width=f[u]+"px";const g=l.find(m=>m.id===t[u].id);g&&(g.width=f[u])}})}),s.forEach(h=>h.classList.remove("k-autofitting")),this.onResize(i[0],0,0,c,!0,this.columnsState,o[0])},this.updateColElements=c=>{const o=this.columns.filter(l=>!l.hidden&&!l.children.length);let n=1e-10;for(let l=0;l<c.length;l++){const e=c[l],r=o.findIndex(f=>f.id===e.id),t=parseFloat((e.width||0).toString()),i=Math.floor(t);n+=t-i;const d=i+Math.floor(n);n-=Math.floor(n);const s=o.find(f=>f.id===e.id);if(!s)return;this.colGroups.forEach(f=>{if(f.children[r]){const h=parseInt(f.children[r].width,10);f.children[r].width=d+"px",this.updateNextLockedCol(f.parentElement,s,h-d)}})}},this.onResize=a}get colGroups(){return[this.colGroupMain,this.colGroupHeader,this.colGroupFooter,this.colGroupStickyHeader,this.colGroupStickyFooter,this.colGroupPinnedTop,this.colGroupPinnedBottom].filter(Boolean)}applyWidthConstraints(a,c,o=1){if(!a.width)return a.width||"";const n=a.width.toString();if(n.includes("%")){const f=parseFloat(n)*o,h=Math.max(0,Math.min(100,f));return a.width=h+"%",a.width}let e=parseFloat(n)*o;const r=c.minResizableWidth===void 0?10:c.minResizableWidth,t=c.minWidth,i=t!==void 0?Math.max(r,t):r,d=c.maxWidth;return e<i&&(e=i),d!==void 0&&e>d&&(e=d),a.width=e,e}fixateInitialWidths(a){var r;let c=0;const o=((r=this.colGroupMain)==null?void 0:r.children)||[];for(let t=0;t<o.length;t++)o[t].width?a-=o[t].clientWidth:c++;if(c===0)return;const n=Math.floor(a/c),l=p.getFlatColumnsState(this.columnsState),e=this.columns.filter(t=>!t.children.length);for(let t=0;t<o.length;t++){const i=o[t],d=i.width?i.clientWidth:n,s=l.find(f=>f.id===e[t].id);s&&(s.width=d.toString()),this.colGroups.forEach(f=>{f.children[t].width=d})}}setWidths(a,c){const o=p.getFlatColumnsState(this.columnsState),n=this.columns.findIndex(t=>t.id===a.id),l=[];let e=a.children.filter(t=>!t.hidden).length;for(let t=n+1;t<this.columns.length&&!(e<=0);t++){const i=this.columns[t];i.children.length?e+=i.children.filter(d=>!d.hidden).length:l.push(i),e--}l.length===0&&l.push(a);const r=[];l.forEach(t=>{const i=o.find(d=>d.id===t.id);i&&(this.applyWidthConstraints(i,t,c),r.push(i))}),this.updateColElements(r)}updateNextLockedCol(a,c,o){const n=c.index,l=this.colGroupMain.parentElement.closest(".k-grid"),e=l==null?void 0:l.clientWidth,r=this.columns.filter(t=>t.locked).map(t=>parseInt(t.width+"",10)).reduce((t,i)=>t+i,0);!c.locked||e<=r+x||this.columns.forEach(t=>{if(t!=null&&t.locked&&o){const i=a==null?void 0:a.querySelectorAll('[aria-colindex="'+t.ariaColumnIndex+'"]');i==null||i.forEach(d=>{const s=d.style;this.isRtl?(t.index>n&&s&&s.right&&(s.right=parseInt(s.right,10)-o+"px"),t.index<n&&s&&s.left&&(s.left=parseInt(s.left,10)-o+"px")):(t.index>n&&s&&s.left&&(s.left=parseInt(s.left,10)-o+"px"),t.index<n&&s&&s.right&&(s.right=parseInt(s.right,10)-o+"px"))})}})}}exports.ColumnResize=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../utils/index.js"),W=1,w=20;class S{constructor(f){this.columns=[],this.columnsState=[],this.resizable=!1,this.isRtl=!1,this.setIsRtl=c=>{this.isRtl=c},this.initWidths=()=>{var l;const c=((l=this.colGroupMain)==null?void 0:l.children)||[],o=p.getFlatColumnsState(this.columnsState),s=this.columns.filter(e=>{var r;return!((r=e.children)!=null&&r.length)});for(let e=0;e<c.length;e++){const r=s[e];let t="";const i=o.find(d=>d.id===s[e].id);i&&(t=this.applyWidthConstraints(i,r)),this.colGroups.forEach(d=>{d.children[e].width=t})}},this.dragHandler=(c,o,s,l)=>{const e=c.originalEvent;l||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation());const r=s.closest("th");if(!r)return;const t=r.clientWidth;let i=t;if(this.isRtl?i+=s.getBoundingClientRect().right-s.offsetWidth/2-c.clientX:i+=c.clientX-s.getBoundingClientRect().left-s.offsetWidth/2,!l&&Math.abs(i-t)<1)return;this.fixateInitialWidths(r.parentElement.clientWidth),this.setWidths(o,Math.floor(i)/t);const d=this.columns.filter(n=>!n.children.length).findIndex(n=>n.id===o.id);this.onResize(d,t,i,e,l,this.columnsState,o.id)},this.dblClickHandler=(c,o)=>{const s=this.columns.filter(h=>o.indexOf(h.id)>-1),l=p.getFlatColumnsState(this.columnsState);if(!this.colGroupMain||!s.length)return;const e={},r=s;for(;r.length>0;){const h=r.pop();if(!h)break;h.children.length?r.push(...h.children):e[h.id]=h}const t=this.columns.filter(h=>!h.children.length),i=[];t.forEach((h,u)=>{e[h.id]&&i.push(u)});const d=this.colGroups,n=d.map(h=>h.parentElement);n.forEach(h=>h.classList.add("k-autofitting"));const a=[];d.forEach(h=>{i.forEach(u=>{h.children[u]&&(h.children[u].width="",a[u]=Math.max(a[u]||0,h.children[u].offsetWidth+W))})}),d.forEach(h=>{i.forEach(u=>{if(h.children[u]){h.children[u].width=a[u]+"px";const g=l.find(m=>m.id===t[u].id);g&&(g.width=a[u],t[u].width=a[u])}})}),n.forEach(h=>h.classList.remove("k-autofitting")),this.onResize(i[0],0,0,c,!0,this.columnsState,o[0])},this.updateColElements=c=>{const o=this.columns.filter(l=>!l.hidden&&!l.children.length);let s=1e-10;for(let l=0;l<c.length;l++){const e=c[l],r=o.findIndex(a=>a.id===e.id),t=parseFloat((e.width||0).toString()),i=Math.floor(t);s+=t-i;const d=i+Math.floor(s);s-=Math.floor(s);const n=o.find(a=>a.id===e.id);if(!n)return;this.colGroups.forEach(a=>{if(a.children[r]){const h=parseInt(a.children[r].width,10);a.children[r].width=d+"px",this.updateNextLockedCol(a.parentElement,n,h-d)}})}},this.onResize=f}get colGroups(){return[this.colGroupMain,this.colGroupHeader,this.colGroupFooter,this.colGroupStickyHeader,this.colGroupStickyFooter,this.colGroupPinnedTop,this.colGroupPinnedBottom].filter(Boolean)}applyWidthConstraints(f,c,o=1){if(!f.width)return f.width||"";const s=f.width.toString();if(s.includes("%")){const a=parseFloat(s)*o,h=Math.max(0,Math.min(100,a));return f.width=h+"%",f.width}let e=parseFloat(s)*o;const r=c.minResizableWidth===void 0?10:c.minResizableWidth,t=c.minWidth,i=t!==void 0?Math.max(r,t):r,d=c.maxWidth;return e<i&&(e=i),d!==void 0&&e>d&&(e=d),f.width=e,e}fixateInitialWidths(f){var r;let c=0;const o=((r=this.colGroupMain)==null?void 0:r.children)||[];for(let t=0;t<o.length;t++)o[t].width?f-=o[t].clientWidth:c++;if(c===0)return;const s=Math.floor(f/c),l=p.getFlatColumnsState(this.columnsState),e=this.columns.filter(t=>!t.children.length);for(let t=0;t<o.length;t++){const i=o[t],d=i.width?i.clientWidth:s,n=l.find(a=>a.id===e[t].id);n&&(n.width=d.toString(),e[t].width=n.width),this.colGroups.forEach(a=>{a.children[t].width=d})}}setWidths(f,c){const o=p.getFlatColumnsState(this.columnsState),s=this.columns.findIndex(t=>t.id===f.id),l=[];let e=f.children.filter(t=>!t.hidden).length;for(let t=s+1;t<this.columns.length&&!(e<=0);t++){const i=this.columns[t];i.children.length?e+=i.children.filter(d=>!d.hidden).length:l.push(i),e--}l.length===0&&l.push(s>=0?this.columns[s]:f);const r=[];l.forEach(t=>{const i=o.find(d=>d.id===t.id);i&&(this.applyWidthConstraints(i,t,c),t.width=i.width,r.push(i))}),this.updateColElements(r)}updateNextLockedCol(f,c,o){const s=c.index,l=this.colGroupMain.parentElement.closest(".k-grid"),e=l==null?void 0:l.clientWidth,r=this.columns.filter(t=>t.locked).map(t=>parseInt(t.width+"",10)).reduce((t,i)=>t+i,0);!c.locked||e<=r+w||this.columns.forEach(t=>{if(t!=null&&t.locked&&o){const i=f==null?void 0:f.querySelectorAll('[aria-colindex="'+t.ariaColumnIndex+'"]');i==null||i.forEach(d=>{const n=d.style;this.isRtl?(t.index>s&&n&&n.right&&(n.right=parseInt(n.right,10)-o+"px"),t.index<s&&n&&n.left&&(n.left=parseInt(n.left,10)-o+"px")):(t.index>s&&n&&n.left&&(n.left=parseInt(n.left,10)-o+"px"),t.index<s&&n&&n.right&&(n.right=parseInt(n.right,10)-o+"px"))})}})}}exports.ColumnResize=S;
@@ -5,44 +5,44 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { getFlatColumnsState as p } from "../utils/index.mjs";
9
- const W = 1, x = 20;
8
+ import { getFlatColumnsState as u } from "../utils/index.mjs";
9
+ const W = 1, w = 20;
10
10
  class S {
11
- constructor(a) {
11
+ constructor(f) {
12
12
  this.columns = [], this.columnsState = [], this.resizable = !1, this.isRtl = !1, this.setIsRtl = (c) => {
13
13
  this.isRtl = c;
14
14
  }, this.initWidths = () => {
15
15
  var l;
16
- const c = ((l = this.colGroupMain) == null ? void 0 : l.children) || [], o = p(this.columnsState), n = this.columns.filter((e) => {
16
+ const c = ((l = this.colGroupMain) == null ? void 0 : l.children) || [], o = u(this.columnsState), s = this.columns.filter((e) => {
17
17
  var r;
18
18
  return !((r = e.children) != null && r.length);
19
19
  });
20
20
  for (let e = 0; e < c.length; e++) {
21
- const r = n[e];
21
+ const r = s[e];
22
22
  let t = "";
23
- const i = o.find((d) => d.id === n[e].id);
23
+ const i = o.find((d) => d.id === s[e].id);
24
24
  i && (t = this.applyWidthConstraints(i, r)), this.colGroups.forEach((d) => {
25
25
  d.children[e].width = t;
26
26
  });
27
27
  }
28
- }, this.dragHandler = (c, o, n, l) => {
28
+ }, this.dragHandler = (c, o, s, l) => {
29
29
  const e = c.originalEvent;
30
30
  l || (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
31
- const r = n.closest("th");
31
+ const r = s.closest("th");
32
32
  if (!r)
33
33
  return;
34
34
  const t = r.clientWidth;
35
35
  let i = t;
36
- if (this.isRtl ? i += n.getBoundingClientRect().right - n.offsetWidth / 2 - c.clientX : i += c.clientX - n.getBoundingClientRect().left - n.offsetWidth / 2, !l && Math.abs(i - t) < 1)
36
+ if (this.isRtl ? i += s.getBoundingClientRect().right - s.offsetWidth / 2 - c.clientX : i += c.clientX - s.getBoundingClientRect().left - s.offsetWidth / 2, !l && Math.abs(i - t) < 1)
37
37
  return;
38
38
  this.fixateInitialWidths(r.parentElement.clientWidth), this.setWidths(o, Math.floor(i) / t);
39
- const d = this.columns.filter((s) => !s.children.length).findIndex((s) => s.id === o.id);
39
+ const d = this.columns.filter((n) => !n.children.length).findIndex((n) => n.id === o.id);
40
40
  this.onResize(d, t, i, e, l, this.columnsState, o.id);
41
41
  }, this.dblClickHandler = (c, o) => {
42
- const n = this.columns.filter((h) => o.indexOf(h.id) > -1), l = p(this.columnsState);
43
- if (!this.colGroupMain || !n.length)
42
+ const s = this.columns.filter((h) => o.indexOf(h.id) > -1), l = u(this.columnsState);
43
+ if (!this.colGroupMain || !s.length)
44
44
  return;
45
- const e = {}, r = n;
45
+ const e = {}, r = s;
46
46
  for (; r.length > 0; ) {
47
47
  const h = r.pop();
48
48
  if (!h)
@@ -50,47 +50,47 @@ class S {
50
50
  h.children.length ? r.push(...h.children) : e[h.id] = h;
51
51
  }
52
52
  const t = this.columns.filter((h) => !h.children.length), i = [];
53
- t.forEach((h, u) => {
54
- e[h.id] && i.push(u);
53
+ t.forEach((h, p) => {
54
+ e[h.id] && i.push(p);
55
55
  });
56
- const d = this.colGroups, s = d.map((h) => h.parentElement);
57
- s.forEach((h) => h.classList.add("k-autofitting"));
58
- const f = [];
56
+ const d = this.colGroups, n = d.map((h) => h.parentElement);
57
+ n.forEach((h) => h.classList.add("k-autofitting"));
58
+ const a = [];
59
59
  d.forEach((h) => {
60
- i.forEach((u) => {
61
- h.children[u] && (h.children[u].width = "", f[u] = Math.max(
62
- f[u] || 0,
63
- h.children[u].offsetWidth + W
60
+ i.forEach((p) => {
61
+ h.children[p] && (h.children[p].width = "", a[p] = Math.max(
62
+ a[p] || 0,
63
+ h.children[p].offsetWidth + W
64
64
  ));
65
65
  });
66
66
  }), d.forEach((h) => {
67
- i.forEach((u) => {
68
- if (h.children[u]) {
69
- h.children[u].width = f[u] + "px";
70
- const g = l.find((m) => m.id === t[u].id);
71
- g && (g.width = f[u]);
67
+ i.forEach((p) => {
68
+ if (h.children[p]) {
69
+ h.children[p].width = a[p] + "px";
70
+ const g = l.find((m) => m.id === t[p].id);
71
+ g && (g.width = a[p], t[p].width = a[p]);
72
72
  }
73
73
  });
74
- }), s.forEach((h) => h.classList.remove("k-autofitting")), this.onResize(i[0], 0, 0, c, !0, this.columnsState, o[0]);
74
+ }), n.forEach((h) => h.classList.remove("k-autofitting")), this.onResize(i[0], 0, 0, c, !0, this.columnsState, o[0]);
75
75
  }, this.updateColElements = (c) => {
76
76
  const o = this.columns.filter((l) => !l.hidden && !l.children.length);
77
- let n = 1e-10;
77
+ let s = 1e-10;
78
78
  for (let l = 0; l < c.length; l++) {
79
- const e = c[l], r = o.findIndex((f) => f.id === e.id), t = parseFloat((e.width || 0).toString()), i = Math.floor(t);
80
- n += t - i;
81
- const d = i + Math.floor(n);
82
- n -= Math.floor(n);
83
- const s = o.find((f) => f.id === e.id);
84
- if (!s)
79
+ const e = c[l], r = o.findIndex((a) => a.id === e.id), t = parseFloat((e.width || 0).toString()), i = Math.floor(t);
80
+ s += t - i;
81
+ const d = i + Math.floor(s);
82
+ s -= Math.floor(s);
83
+ const n = o.find((a) => a.id === e.id);
84
+ if (!n)
85
85
  return;
86
- this.colGroups.forEach((f) => {
87
- if (f.children[r]) {
88
- const h = parseInt(f.children[r].width, 10);
89
- f.children[r].width = d + "px", this.updateNextLockedCol(f.parentElement, s, h - d);
86
+ this.colGroups.forEach((a) => {
87
+ if (a.children[r]) {
88
+ const h = parseInt(a.children[r].width, 10);
89
+ a.children[r].width = d + "px", this.updateNextLockedCol(a.parentElement, n, h - d);
90
90
  }
91
91
  });
92
92
  }
93
- }, this.onResize = a;
93
+ }, this.onResize = f;
94
94
  }
95
95
  get colGroups() {
96
96
  return [
@@ -103,56 +103,56 @@ class S {
103
103
  this.colGroupPinnedBottom
104
104
  ].filter(Boolean);
105
105
  }
106
- applyWidthConstraints(a, c, o = 1) {
107
- if (!a.width)
108
- return a.width || "";
109
- const n = a.width.toString();
110
- if (n.includes("%")) {
111
- const f = parseFloat(n) * o, h = Math.max(0, Math.min(100, f));
112
- return a.width = h + "%", a.width;
106
+ applyWidthConstraints(f, c, o = 1) {
107
+ if (!f.width)
108
+ return f.width || "";
109
+ const s = f.width.toString();
110
+ if (s.includes("%")) {
111
+ const a = parseFloat(s) * o, h = Math.max(0, Math.min(100, a));
112
+ return f.width = h + "%", f.width;
113
113
  }
114
- let e = parseFloat(n) * o;
114
+ let e = parseFloat(s) * o;
115
115
  const r = c.minResizableWidth === void 0 ? 10 : c.minResizableWidth, t = c.minWidth, i = t !== void 0 ? Math.max(r, t) : r, d = c.maxWidth;
116
- return e < i && (e = i), d !== void 0 && e > d && (e = d), a.width = e, e;
116
+ return e < i && (e = i), d !== void 0 && e > d && (e = d), f.width = e, e;
117
117
  }
118
- fixateInitialWidths(a) {
118
+ fixateInitialWidths(f) {
119
119
  var r;
120
120
  let c = 0;
121
121
  const o = ((r = this.colGroupMain) == null ? void 0 : r.children) || [];
122
122
  for (let t = 0; t < o.length; t++)
123
- o[t].width ? a -= o[t].clientWidth : c++;
123
+ o[t].width ? f -= o[t].clientWidth : c++;
124
124
  if (c === 0)
125
125
  return;
126
- const n = Math.floor(a / c), l = p(this.columnsState), e = this.columns.filter((t) => !t.children.length);
126
+ const s = Math.floor(f / c), l = u(this.columnsState), e = this.columns.filter((t) => !t.children.length);
127
127
  for (let t = 0; t < o.length; t++) {
128
- const i = o[t], d = i.width ? i.clientWidth : n, s = l.find((f) => f.id === e[t].id);
129
- s && (s.width = d.toString()), this.colGroups.forEach((f) => {
130
- f.children[t].width = d;
128
+ const i = o[t], d = i.width ? i.clientWidth : s, n = l.find((a) => a.id === e[t].id);
129
+ n && (n.width = d.toString(), e[t].width = n.width), this.colGroups.forEach((a) => {
130
+ a.children[t].width = d;
131
131
  });
132
132
  }
133
133
  }
134
- setWidths(a, c) {
135
- const o = p(this.columnsState), n = this.columns.findIndex((t) => t.id === a.id), l = [];
136
- let e = a.children.filter((t) => !t.hidden).length;
137
- for (let t = n + 1; t < this.columns.length && !(e <= 0); t++) {
134
+ setWidths(f, c) {
135
+ const o = u(this.columnsState), s = this.columns.findIndex((t) => t.id === f.id), l = [];
136
+ let e = f.children.filter((t) => !t.hidden).length;
137
+ for (let t = s + 1; t < this.columns.length && !(e <= 0); t++) {
138
138
  const i = this.columns[t];
139
139
  i.children.length ? e += i.children.filter((d) => !d.hidden).length : l.push(i), e--;
140
140
  }
141
- l.length === 0 && l.push(a);
141
+ l.length === 0 && l.push(s >= 0 ? this.columns[s] : f);
142
142
  const r = [];
143
143
  l.forEach((t) => {
144
144
  const i = o.find((d) => d.id === t.id);
145
- i && (this.applyWidthConstraints(i, t, c), r.push(i));
145
+ i && (this.applyWidthConstraints(i, t, c), t.width = i.width, r.push(i));
146
146
  }), this.updateColElements(r);
147
147
  }
148
- updateNextLockedCol(a, c, o) {
149
- const n = c.index, l = this.colGroupMain.parentElement.closest(".k-grid"), e = l == null ? void 0 : l.clientWidth, r = this.columns.filter((t) => t.locked).map((t) => parseInt(t.width + "", 10)).reduce((t, i) => t + i, 0);
150
- !c.locked || e <= r + x || this.columns.forEach((t) => {
148
+ updateNextLockedCol(f, c, o) {
149
+ const s = c.index, l = this.colGroupMain.parentElement.closest(".k-grid"), e = l == null ? void 0 : l.clientWidth, r = this.columns.filter((t) => t.locked).map((t) => parseInt(t.width + "", 10)).reduce((t, i) => t + i, 0);
150
+ !c.locked || e <= r + w || this.columns.forEach((t) => {
151
151
  if (t != null && t.locked && o) {
152
- const i = a == null ? void 0 : a.querySelectorAll('[aria-colindex="' + t.ariaColumnIndex + '"]');
152
+ const i = f == null ? void 0 : f.querySelectorAll('[aria-colindex="' + t.ariaColumnIndex + '"]');
153
153
  i == null || i.forEach((d) => {
154
- const s = d.style;
155
- this.isRtl ? (t.index > n && s && s.right && (s.right = parseInt(s.right, 10) - o + "px"), t.index < n && s && s.left && (s.left = parseInt(s.left, 10) - o + "px")) : (t.index > n && s && s.left && (s.left = parseInt(s.left, 10) - o + "px"), t.index < n && s && s.right && (s.right = parseInt(s.right, 10) - o + "px"));
154
+ const n = d.style;
155
+ this.isRtl ? (t.index > s && n && n.right && (n.right = parseInt(n.right, 10) - o + "px"), t.index < s && n && n.left && (n.left = parseInt(n.left, 10) - o + "px")) : (t.index > s && n && n.left && (n.left = parseInt(n.left, 10) - o + "px"), t.index < s && n && n.right && (n.right = parseInt(n.right, 10) - o + "px"));
156
156
  });
157
157
  }
158
158
  });
@@ -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 _=require("react"),F=require("./GridHeaderCell.js"),s=require("@progress/kendo-react-common"),$=require("@progress/kendo-react-data-tools"),k=require("../messages/index.js"),N=require("@progress/kendo-svg-icons"),d=require("../utils/index.js"),P=require("./client/GridHeaderCellContainer.js"),B=require("./client/HeaderRowDraggable.js"),J=require("./client/GridHeaderRowContainer.js"),K=require("./client/GridHeaderCellElementContainer.js"),Q=require("./client/HeaderCellResizer.js");function U(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return i.default=e,Object.freeze(i)}const t=U(_),X={none:"none",asc:"ascending",desc:"descending"},Y=e=>{const i=e.columnsState||[],a=e.unstyled,o=a&&a.uGrid?a.uGrid:s.uGrid;let w=0,O=-1;const D=r=>{if(!e.sort)return null;const n=s.classNames(o.sortIcon({}));return r>=0&&[t.createElement("span",{key:1,className:n},t.createElement(s.IconWrap,{name:"sort-"+e.sort[r].dir+"-small",icon:e.sort[r].dir==="asc"?N.sortAscSmallIcon:N.sortDescSmallIcon})),e.sort.length>1&&t.createElement("span",{key:2,className:n},t.createElement("span",{className:s.classNames(o.sortOrder({}))},r+1))]},x=r=>r.map(n=>{var I,M,q,v;const l=e.columns[n],u=i[n],m=(M=(I=l.locked)!=null?I:u==null?void 0:u.locked)!=null?M:!1,C=e.sortable&&l.sortable,f=e.sort?e.sort.findIndex(c=>c.field===l.field):-1,j=f>=0&&e.sort[f].dir||"none",b=l.disableColumnMenu?null:l.columnMenu||e.columnMenu,A=l.menuIcon||e.columnMenuIcon,L=s.classNames(s.classNames(o.headerTh({first:l.kFirst,filterable:!!b,locked:m,sorted:e.sort&&e.sort.some(c=>c.field===l.field),sortable:C})),l.headerClassName);m===!1&&(l.left=0);const z=e.localization.toLanguageString(k.sortAriaLabel,k.messages[k.sortAriaLabel]),W=l.isAccessible?{ariaSort:X[j],role:"columnheader",ariaColumnIndex:l.ariaColumnIndex,ariaSelected:!1,ariaDescription:C?z:"",ariaHasPopup:b?"dialog":void 0}:{role:"presentation"},E=l.declarationIndex>=0?++O:--w,g={field:l.field,title:l.title,isGroupColumn:l.isGroupColumn,selectionValue:(q=l.headerSelectionValue)!=null?q:e.headerSelectionValue,children:D(f),selectionChange:null,columnMenuWrapperProps:{column:{field:(v=l.groupField)!=null?v:l.field,title:l.title,locked:m,filter:l.filter,id:l.id},sortable:C&&e.sortable,sort:e.sort,filter:e.filter,filterable:e.filterable&&l.filterable,filterOperators:e.filterOperators,navigatable:e.navigatable,group:e.group,groupable:e.groupable,columnMenu:b,columnMenuIcon:A}},H={...W,colSpan:l.headerColSpan,rowSpan:l.rowSpan,className:L,columnId:l.id,navigatable:l.navigatable,role:"columnheader"},S=d.clientColumn(l),R={column:S,sortable:e.sortable,sort:e.sort,columnMenuWrapperProps:g.columnMenuWrapperProps},G=l.defaultHeaderCell?l.defaultHeaderCell:F.GridHeaderCell,y=[t.createElement(P.GridHeaderCellContainer,{key:1,...R,isClient:d.isClientReference(G)},t.createElement(G,{...g})),t.createElement(Q.HeaderCellResizer,{key:2,column:S})],h=d.resolveCells(e.cells,l.cells);if(h&&h.headerCell){const c=h.headerCell,V=d.isClientReference(c);return t.createElement(P.GridHeaderCellContainer,{key:E,...R,thProps:H,isCustom:!0,isClient:V},t.createElement(c,{...g,thProps:H,index:n},y))}return t.createElement(K.GridHeaderCellElementContainer,{key:E,column:S},t.createElement($.HeaderThElement,{...H},y))}),T=e.columns.map(d.clientColumn);return t.createElement(J.GridHeaderRowContainer,{sortable:e.sortable,sort:e.sort,navigatable:e.navigatable,groupable:e.groupable,columns:T},e.columnsMap.map((r,n)=>t.createElement(B.HeaderRowDraggable,{key:n,className:s.classNames(o.simpleTr({})),ariaRowIndex:n+1},x(r))))};exports.HeaderRow=Y;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),K=require("./GridHeaderCell.js"),s=require("@progress/kendo-react-common"),Q=require("@progress/kendo-react-data-tools"),h=require("../messages/index.js"),y=require("@progress/kendo-svg-icons"),d=require("../utils/index.js"),v=require("./client/GridHeaderCellContainer.js"),U=require("./client/HeaderRowDraggable.js"),X=require("./client/GridHeaderRowContainer.js"),Y=require("./client/GridHeaderCellElementContainer.js"),Z=require("./client/HeaderCellResizer.js"),p=require("./client/GridCustomHeaderColumnMenu.js");function ee(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const t=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,t.get?t:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const l=ee(J),ne={none:"none",asc:"ascending",desc:"descending"},le=e=>{const u=e.columnsState||[],a=e.unstyled,t=a&&a.uGrid?a.uGrid:s.uGrid;let O=0,D=-1;const T=o=>{if(!e.sort)return null;const r=s.classNames(t.sortIcon({}));return o>=0&&[l.createElement("span",{key:1,className:r},l.createElement(s.IconWrap,{name:"sort-"+e.sort[o].dir+"-small",icon:e.sort[o].dir==="asc"?y.sortAscSmallIcon:y.sortDescSmallIcon})),e.sort.length>1&&l.createElement("span",{key:2,className:r},l.createElement("span",{className:s.classNames(t.sortOrder({}))},o+1))]},x=o=>o.map(r=>{var R,P,q,w;const n=e.columns[r],m=u[r],C=(P=(R=n.locked)!=null?R:m==null?void 0:m.locked)!=null?P:!1,f=e.sortable&&n.sortable,b=e.sort?e.sort.findIndex(i=>i.field===n.field):-1,z=b>=0&&e.sort[b].dir||"none",g=n.disableColumnMenu?null:n.columnMenu||e.columnMenu,j=n.menuIcon||e.columnMenuIcon,A=s.classNames(s.classNames(t.headerTh({first:n.kFirst,filterable:!!g,locked:C,sorted:e.sort&&e.sort.some(i=>i.field===n.field),sortable:f})),n.headerClassName);C===!1&&(n.left=0);const L=e.localization.toLanguageString(h.sortAriaLabel,h.messages[h.sortAriaLabel]),V=n.isAccessible?{ariaSort:ne[z],role:"columnheader",ariaColumnIndex:n.ariaColumnIndex,ariaSelected:!1,ariaDescription:f?L:"",ariaHasPopup:g?"dialog":void 0}:{role:"presentation"},E=n.declarationIndex>=0?++D:--O,c={field:n.field,title:n.title,isGroupColumn:n.isGroupColumn,selectionValue:(q=n.headerSelectionValue)!=null?q:e.headerSelectionValue,children:T(b),selectionChange:null,columnMenuWrapperProps:{column:{field:(w=n.groupField)!=null?w:n.field,title:n.title,locked:C,filter:n.filter,id:n.id},sortable:f&&e.sortable,sort:e.sort,filter:e.filter,filterable:e.filterable&&n.filterable,filterOperators:e.filterOperators,navigatable:e.navigatable,group:e.group,groupable:e.groupable,columnMenu:g,columnMenuIcon:j}},H={...V,colSpan:n.headerColSpan,rowSpan:n.rowSpan,className:A,columnId:n.id,navigatable:n.navigatable,role:"columnheader"},M=d.clientColumn(n),G={column:M,sortable:e.sortable,sort:e.sort,columnMenuWrapperProps:c.columnMenuWrapperProps},I=n.defaultHeaderCell?n.defaultHeaderCell:K.GridHeaderCell,N=l.createElement(Z.HeaderCellResizer,{key:2,column:M}),k=[l.createElement(v.GridHeaderCellContainer,{key:1,...G,isClient:d.isClientReference(I)},l.createElement(I,{...c})),N],S=d.resolveCells(e.cells,n.cells);if(S&&S.headerCell){const i=S.headerCell,_=d.isClientReference(i),F=l.createElement("span",{className:s.classNames(t.columnTitle({}),n.isGroupColumn&&t.groupingRowText({}))},n.title||n.field||" "),$=c.children||null,B=c.columnMenuWrapperProps.columnMenu?l.createElement(p.GridCustomHeaderColumnMenu,{columnMenuWrapperProps:c.columnMenuWrapperProps,field:n.field}):null;return l.createElement(v.GridHeaderCellContainer,{key:E,...G,thProps:H,isCustom:!0,isClient:_},l.createElement(i,{...c,thProps:H,index:r,titleElement:F,sortIcon:$,columnMenu:B,resizer:N},k))}return l.createElement(Y.GridHeaderCellElementContainer,{key:E,column:M},l.createElement(Q.HeaderThElement,{...H},k))}),W=e.columns.map(d.clientColumn);return l.createElement(X.GridHeaderRowContainer,{sortable:e.sortable,sort:e.sort,navigatable:e.navigatable,groupable:e.groupable,columns:W},e.columnsMap.map((o,r)=>l.createElement(U.HeaderRowDraggable,{key:r,className:s.classNames(t.simpleTr({})),ariaRowIndex:r+1},x(o))))};exports.HeaderRow=le;
@@ -6,133 +6,161 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { GridHeaderCell as j } from "./GridHeaderCell.mjs";
10
- import { uGrid as q, classNames as r, IconWrap as J } from "@progress/kendo-react-common";
11
- import { HeaderThElement as K } from "@progress/kendo-react-data-tools";
12
- import { sortAriaLabel as y, messages as Q } from "../messages/index.mjs";
13
- import { sortAscSmallIcon as U, sortDescSmallIcon as X } from "@progress/kendo-svg-icons";
14
- import { clientColumn as P, isClientReference as N, resolveCells as Y } from "../utils/index.mjs";
9
+ import { GridHeaderCell as K } from "./GridHeaderCell.mjs";
10
+ import { uGrid as Q, classNames as c, IconWrap as U } from "@progress/kendo-react-common";
11
+ import { HeaderThElement as X } from "@progress/kendo-react-data-tools";
12
+ import { sortAriaLabel as v, messages as Y } from "../messages/index.mjs";
13
+ import { sortAscSmallIcon as Z, sortDescSmallIcon as _ } from "@progress/kendo-svg-icons";
14
+ import { clientColumn as w, isClientReference as y, resolveCells as $ } from "../utils/index.mjs";
15
15
  import { GridHeaderCellContainer as R } from "./client/GridHeaderCellContainer.mjs";
16
- import { HeaderRowDraggable as Z } from "./client/HeaderRowDraggable.mjs";
17
- import { GridHeaderRowContainer as _ } from "./client/GridHeaderRowContainer.mjs";
18
- import { GridHeaderCellElementContainer as $ } from "./client/GridHeaderCellElementContainer.mjs";
19
- import { HeaderCellResizer as p } from "./client/HeaderCellResizer.mjs";
20
- const ee = {
16
+ import { HeaderRowDraggable as ee } from "./client/HeaderRowDraggable.mjs";
17
+ import { GridHeaderRowContainer as le } from "./client/GridHeaderRowContainer.mjs";
18
+ import { GridHeaderCellElementContainer as te } from "./client/GridHeaderCellElementContainer.mjs";
19
+ import { HeaderCellResizer as ne } from "./client/HeaderCellResizer.mjs";
20
+ import { GridCustomHeaderColumnMenu as oe } from "./client/GridCustomHeaderColumnMenu.mjs";
21
+ const re = {
21
22
  none: "none",
22
23
  asc: "ascending",
23
24
  desc: "descending"
24
- }, ue = (e) => {
25
- const w = e.columnsState || [], c = e.unstyled, s = c && c.uGrid ? c.uGrid : q;
26
- let x = 0, A = -1;
27
- const D = (a) => {
28
- if (!e.sort)
25
+ }, Ee = (l) => {
26
+ const W = l.columnsState || [], i = l.unstyled, r = i && i.uGrid ? i.uGrid : Q;
27
+ let x = 0, T = -1;
28
+ const z = (o) => {
29
+ if (!l.sort)
29
30
  return null;
30
- const n = r(s.sortIcon({}));
31
- return a >= 0 && [
31
+ const n = c(r.sortIcon({}));
32
+ return o >= 0 && [
32
33
  /* @__PURE__ */ t.createElement("span", { key: 1, className: n }, /* @__PURE__ */ t.createElement(
33
- J,
34
+ U,
34
35
  {
35
- name: "sort-" + e.sort[a].dir + "-small",
36
- icon: e.sort[a].dir === "asc" ? U : X
36
+ name: "sort-" + l.sort[o].dir + "-small",
37
+ icon: l.sort[o].dir === "asc" ? Z : _
37
38
  }
38
39
  )),
39
- e.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className: r(s.sortOrder({})) }, a + 1))
40
+ l.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className: c(r.sortOrder({})) }, o + 1))
40
41
  ];
41
- }, L = (a) => a.map((n) => {
42
- var I, M, v, G;
43
- const l = e.columns[n], i = w[n], m = (M = (I = l.locked) != null ? I : i == null ? void 0 : i.locked) != null ? M : !1, d = e.sortable && l.sortable, u = e.sort ? e.sort.findIndex((o) => o.field === l.field) : -1, O = u >= 0 && e.sort[u].dir || "none", f = l.disableColumnMenu ? null : l.columnMenu || e.columnMenu, T = l.menuIcon || e.columnMenuIcon, V = r(
44
- r(
45
- s.headerTh({
46
- first: l.kFirst,
47
- filterable: !!f,
48
- locked: m,
49
- sorted: e.sort && e.sort.some((o) => o.field === l.field),
42
+ }, A = (o) => o.map((n) => {
43
+ var k, G, N, P;
44
+ const e = l.columns[n], m = W[n], u = (G = (k = e.locked) != null ? k : m == null ? void 0 : m.locked) != null ? G : !1, d = l.sortable && e.sortable, f = l.sort ? l.sort.findIndex((s) => s.field === e.field) : -1, L = f >= 0 && l.sort[f].dir || "none", C = e.disableColumnMenu ? null : e.columnMenu || l.columnMenu, O = e.menuIcon || l.columnMenuIcon, V = c(
45
+ c(
46
+ r.headerTh({
47
+ first: e.kFirst,
48
+ filterable: !!C,
49
+ locked: u,
50
+ sorted: l.sort && l.sort.some((s) => s.field === e.field),
50
51
  sortable: d
51
52
  })
52
53
  ),
53
- l.headerClassName
54
+ e.headerClassName
54
55
  );
55
- m === !1 && (l.left = 0);
56
- const z = e.localization.toLanguageString(y, Q[y]), F = l.isAccessible ? {
57
- ariaSort: ee[O],
56
+ u === !1 && (e.left = 0);
57
+ const p = l.localization.toLanguageString(v, Y[v]), F = e.isAccessible ? {
58
+ ariaSort: re[L],
58
59
  role: "columnheader",
59
- ariaColumnIndex: l.ariaColumnIndex,
60
+ ariaColumnIndex: e.ariaColumnIndex,
60
61
  ariaSelected: !1,
61
- ariaDescription: d ? z : "",
62
- ariaHasPopup: f ? "dialog" : void 0
62
+ ariaDescription: d ? p : "",
63
+ ariaHasPopup: C ? "dialog" : void 0
63
64
  } : {
64
65
  role: "presentation"
65
- }, E = l.declarationIndex >= 0 ? ++A : --x, C = {
66
- field: l.field,
67
- title: l.title,
68
- isGroupColumn: l.isGroupColumn,
69
- selectionValue: (v = l.headerSelectionValue) != null ? v : e.headerSelectionValue,
70
- children: D(u),
66
+ }, M = e.declarationIndex >= 0 ? ++T : --x, a = {
67
+ field: e.field,
68
+ title: e.title,
69
+ isGroupColumn: e.isGroupColumn,
70
+ selectionValue: (N = e.headerSelectionValue) != null ? N : l.headerSelectionValue,
71
+ children: z(f),
71
72
  selectionChange: null,
72
73
  columnMenuWrapperProps: {
73
74
  column: {
74
- field: (G = l.groupField) != null ? G : l.field,
75
- title: l.title,
76
- locked: m,
77
- filter: l.filter,
78
- id: l.id
75
+ field: (P = e.groupField) != null ? P : e.field,
76
+ title: e.title,
77
+ locked: u,
78
+ filter: e.filter,
79
+ id: e.id
79
80
  },
80
- sortable: d && e.sortable,
81
- sort: e.sort,
82
- filter: e.filter,
83
- filterable: e.filterable && l.filterable,
84
- filterOperators: e.filterOperators,
85
- navigatable: e.navigatable,
86
- group: e.group,
87
- groupable: e.groupable,
88
- columnMenu: f,
89
- columnMenuIcon: T
81
+ sortable: d && l.sortable,
82
+ sort: l.sort,
83
+ filter: l.filter,
84
+ filterable: l.filterable && e.filterable,
85
+ filterOperators: l.filterOperators,
86
+ navigatable: l.navigatable,
87
+ group: l.group,
88
+ groupable: l.groupable,
89
+ columnMenu: C,
90
+ columnMenuIcon: O
90
91
  }
91
92
  }, b = {
92
93
  ...F,
93
- colSpan: l.headerColSpan,
94
- rowSpan: l.rowSpan,
94
+ colSpan: e.headerColSpan,
95
+ rowSpan: e.rowSpan,
95
96
  className: V,
96
- columnId: l.id,
97
- navigatable: l.navigatable,
97
+ columnId: e.id,
98
+ navigatable: e.navigatable,
98
99
  role: "columnheader"
99
- }, g = P(l), S = {
100
+ }, g = w(e), E = {
100
101
  column: g,
101
- sortable: e.sortable,
102
- sort: e.sort,
103
- columnMenuWrapperProps: C.columnMenuWrapperProps
104
- }, k = l.defaultHeaderCell ? l.defaultHeaderCell : j, H = [
105
- /* @__PURE__ */ t.createElement(R, { key: 1, ...S, isClient: N(k) }, /* @__PURE__ */ t.createElement(k, { ...C })),
106
- /* @__PURE__ */ t.createElement(p, { key: 2, column: g })
107
- ], h = Y(e.cells, l.cells);
102
+ sortable: l.sortable,
103
+ sort: l.sort,
104
+ columnMenuWrapperProps: a.columnMenuWrapperProps
105
+ }, I = e.defaultHeaderCell ? e.defaultHeaderCell : K, S = /* @__PURE__ */ t.createElement(ne, { key: 2, column: g }), H = [
106
+ /* @__PURE__ */ t.createElement(R, { key: 1, ...E, isClient: y(I) }, /* @__PURE__ */ t.createElement(I, { ...a })),
107
+ S
108
+ ], h = $(l.cells, e.cells);
108
109
  if (h && h.headerCell) {
109
- const o = h.headerCell, B = N(o);
110
+ const s = h.headerCell, B = y(s), j = /* @__PURE__ */ t.createElement(
111
+ "span",
112
+ {
113
+ className: c(
114
+ r.columnTitle({}),
115
+ e.isGroupColumn && r.groupingRowText({})
116
+ )
117
+ },
118
+ e.title || e.field || " "
119
+ ), q = a.children || null, J = a.columnMenuWrapperProps.columnMenu ? /* @__PURE__ */ t.createElement(
120
+ oe,
121
+ {
122
+ columnMenuWrapperProps: a.columnMenuWrapperProps,
123
+ field: e.field
124
+ }
125
+ ) : null;
110
126
  return /* @__PURE__ */ t.createElement(
111
127
  R,
112
128
  {
113
- key: E,
114
- ...S,
129
+ key: M,
130
+ ...E,
115
131
  thProps: b,
116
132
  isCustom: !0,
117
133
  isClient: B
118
134
  },
119
- /* @__PURE__ */ t.createElement(o, { ...C, thProps: b, index: n }, H)
135
+ /* @__PURE__ */ t.createElement(
136
+ s,
137
+ {
138
+ ...a,
139
+ thProps: b,
140
+ index: n,
141
+ titleElement: j,
142
+ sortIcon: q,
143
+ columnMenu: J,
144
+ resizer: S
145
+ },
146
+ H
147
+ )
120
148
  );
121
149
  }
122
- return /* @__PURE__ */ t.createElement($, { key: E, column: g }, /* @__PURE__ */ t.createElement(K, { ...b }, H));
123
- }), W = e.columns.map(P);
150
+ return /* @__PURE__ */ t.createElement(te, { key: M, column: g }, /* @__PURE__ */ t.createElement(X, { ...b }, H));
151
+ }), D = l.columns.map(w);
124
152
  return /* @__PURE__ */ t.createElement(
125
- _,
153
+ le,
126
154
  {
127
- sortable: e.sortable,
128
- sort: e.sort,
129
- navigatable: e.navigatable,
130
- groupable: e.groupable,
131
- columns: W
155
+ sortable: l.sortable,
156
+ sort: l.sort,
157
+ navigatable: l.navigatable,
158
+ groupable: l.groupable,
159
+ columns: D
132
160
  },
133
- e.columnsMap.map((a, n) => /* @__PURE__ */ t.createElement(Z, { key: n, className: r(s.simpleTr({})), ariaRowIndex: n + 1 }, L(a)))
161
+ l.columnsMap.map((o, n) => /* @__PURE__ */ t.createElement(ee, { key: n, className: c(r.simpleTr({})), ariaRowIndex: n + 1 }, A(o)))
134
162
  );
135
163
  };
136
164
  export {
137
- ue as HeaderRow
165
+ Ee as HeaderRow
138
166
  };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 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 { GridColumnMenuWrapperProps } from '../../columnMenu/GridColumnMenuWrapper.js';
9
+ import * as React from 'react';
10
+ /**
11
+ * @hidden
12
+ *
13
+ * Internal client wrapper used by the custom `headerCell` `columnMenu` slot. Reads the
14
+ * enrichment (change handlers, show state, column state) from the Grid contexts and
15
+ * forwards it to `GridColumnMenuWrapper`, so the slot works both in a fully client-rendered
16
+ * Grid and inside a React Server Components tree — regardless of whether the custom header
17
+ * cell itself is a server or client component.
18
+ */
19
+ export declare const GridCustomHeaderColumnMenu: (props: {
20
+ columnMenuWrapperProps: GridColumnMenuWrapperProps;
21
+ field?: string;
22
+ }) => React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 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 client";
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),a=require("../../columnMenu/GridColumnMenuWrapper.js"),i=require("../../utils/GridContext.js"),s=require("./GridHeaderRowContainer.js");function c(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const r=c(u),l=t=>{const n=r.useContext(i.GridContext),e=r.useContext(s.GridHeaderRowContext),o={...t.columnMenuWrapperProps,onSortChange:n.sortChange,onFilterChange:n.filterChange,onGroupChange:n.groupChange,onColumnsStateChange:n.onColumnsStateChange,show:(e==null?void 0:e.showColumnMenuField)===t.field?!0:void 0,onCloseMenu:e==null?void 0:e.handleCloseMenu,columnsState:n.columnsState};return r.createElement(a.GridColumnMenuWrapper,{...o})};exports.GridCustomHeaderColumnMenu=l;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 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 client";
9
+ import * as o from "react";
10
+ import { GridColumnMenuWrapper as u } from "../../columnMenu/GridColumnMenuWrapper.mjs";
11
+ import { GridContext as m } from "../../utils/GridContext.mjs";
12
+ import { GridHeaderRowContext as s } from "./GridHeaderRowContainer.mjs";
13
+ const i = (t) => {
14
+ const n = o.useContext(m), e = o.useContext(s), r = {
15
+ ...t.columnMenuWrapperProps,
16
+ onSortChange: n.sortChange,
17
+ onFilterChange: n.filterChange,
18
+ onGroupChange: n.groupChange,
19
+ onColumnsStateChange: n.onColumnsStateChange,
20
+ show: (e == null ? void 0 : e.showColumnMenuField) === t.field ? !0 : void 0,
21
+ onCloseMenu: e == null ? void 0 : e.handleCloseMenu,
22
+ columnsState: n.columnsState
23
+ };
24
+ return /* @__PURE__ */ o.createElement(u, { ...r });
25
+ };
26
+ export {
27
+ i as GridCustomHeaderColumnMenu
28
+ };